Home | Trees | Indices | Help |
|
---|
|
Handle 2-d NumPy,
arrays
or tuples as LatLon
or as
pseudo-x/-y
pairs.
NumPy
arrays are assumed to contain rows of points with a
lat-, a longitude -and possibly other- values in different columns.
While iterating over the array rows, create an instance of a given
LatLon
class "on-the-fly" for each row with the
row's lat- and longitude.
The original NumPy
array is read-accessed only and never
duplicated, except to create a subset of the original array.
For example, to process a NumPy
array, wrap the array by
instantiating class Numpy2LatLon and specifying the column index for the
lat- and longitude in each row. Then, pass the Numpy2LatLon instance to any pygeodesy function or
method accepting a points argument.
Similarly, class Tuple2LatLon is used to instantiate a
LatLon
for each 2+tuple in a list, tuple or sequence of such
2+tuples from the index for the lat- and longitude index in each
2+tuple.
Version: 18.10.26
Classes | |
LatLon_ Low-overhead LatLon class for Numpy2LatLon or Tuple2LatLon'
|
|
LatLon2psxy Wrapper for LatLon points as "on-the-fly"
pseudo-xy coordinates.
|
|
Numpy2LatLon Wrapper for NumPy arrays as "on-the-fly"
LatLon points.
|
|
Tuple2LatLon Wrapper for tuple sequences as "on-the-fly" LatLon points.
|
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Function Details |
Approximate the area of a polygon.
Note: This is an area approximation with limited accuracy, ill-suited for regions exceeding several hundred Km or Miles or with near-polar latitudes. See Also: sphericalNvector.areaOf, sphericalTrigonometry.areaOf and ellipsoidalKarney.areaOf. |
Determine the lower-left and upper-right corners of a polygon.
Example: >>> b = LatLon(45,1), LatLon(45,2), LatLon(46,2), LatLon(46,1) >>> bounds(b) # False >>> 45.0, 1.0, 46.0, 2.0 |
Determine the direction of a polygon.
Example: >>> f = LatLon(45,1), LatLon(45,2), LatLon(46,2), LatLon(46,1) >>> isclockwise(f) # False >>> isclockwise(reversed(f)) # True |
Determine whether a polygon is convex.
Example: >>> t = LatLon(45,1), LatLon(46,1), LatLon(46,2) >>> isconvex(t) # True >>> f = LatLon(45,1), LatLon(46,2), LatLon(45,2), LatLon(46,1) >>> isconvex(f) # False |
Determine whether a point is enclosed by a polygon.
|
Check whether a polygon encloses a pole.
|
Locate the point on a polygon closest to an other point. If the given point is within the extent of a polygon edge, the closest point is on that edge, otherwise the closest point is the nearest of that edge's end points. Distances are approximated by function equirectangular_, subject to the supplied options.
See Also:
Function nearestOn4. Use function degrees2m to convert |
Locate the point on a polygon closest to an other point. If the given point is within the extent of a polygon edge, the closest point is on that edge, otherwise the closest point is the nearest of that edge's end points. Distances are approximated by function equirectangular_, subject to the supplied options.
See Also:
Function nearestOn3. Use function degrees2m to convert |
Approximate the perimeter of a polygon.
Note: This perimeter is based on the equirectangular_ distance approximation and is ill-suited for regions exceeding several hundred Km or Miles or with near-polar latitudes. See Also: sphericalTrigonometry.perimeterOf and ellipsoidalKarney.perimeterOf. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Oct 27 15:39:38 2018 | http://epydoc.sourceforge.net |