Pure Python implementation of n-vector-based spherical geodetic
(lat-/longitude) methods, transcoded from JavaScript originals by (C)
Chris Veness 2011-2024, published under the same MIT Licence**. See
Vector-based geodesy and Module latlon-nvector-spherical.
Tools for working with points and lines on (a spherical model of) the
earth’s surface using using n-vectors rather than the more common
spherical trigonometry. N-vectors make many calculations much simpler,
and easier to follow, compared with the trigonometric equivalents.
Note that the formulations below take x => 0°N,0°E, y =>
0°N,90°E and z => 90°N while Gade uses x => 90°N, y => 0°N,90°E,
z => 0°N,0°E.
Also note that on a spherical earth model, an n-vector is equivalent
to a normalised version of an (ECEF) cartesian coordinate.
|
ispolar(points,
wrap=False)
Check whether a polygon encloses a pole. |
|
|
|
areaOf(points,
radius=6371008.771415,
wrap=False)
Calculate the area of a (spherical) polygon or composite (with great
circle arcs joining consecutive points). |
|
|
|
intersecant2(center,
circle,
point,
other,
**radius_exact_height_wrap)
Compute the intersections of a circle and a (great circle) line given
as two points or as a point and bearing. |
|
|
|
intersection(start1,
end1,
start2,
end2,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalNvector.LatLon'>,
**LatLon_kwds)
Locate the intersections of two (great circle) lines each defined by
two points or by a start point and an (initial) bearing. |
|
|
|
intersection2(start1,
end1,
start2,
end2,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalNvector.LatLon'>,
**LatLon_kwds)
Locate the intersections of two (great circle) lines each defined by
two points or by a start point and an (initial) bearing. |
|
|
|
meanOf(points,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalNvector.LatLon'>,
**LatLon_kwds)
Compute the geographic mean of the supplied points. |
|
|
|
|
|
nearestOn3(point,
points,
closed=False,
radius=6371008.771415,
height=None,
wrap=False)
Locate the point on a polygon (with great circle arcs joining
consecutive points) closest to an other point. |
|
|
|
perimeterOf(points,
closed=False,
radius=6371008.771415,
wrap=False)
Compute the perimeter of a (spherical) polygon or composite (with
great circle arcs joining consecutive points). |
|
|
|
sumOf(nvectors,
Vector=<class 'pygeodesy.sphericalNvector.Nvector'>,
h=None,
**Vector_kwds)
Return the vectorial sum of two or more n-vectors. |
|
|
|
triangulate(point1,
bearing1,
point2,
bearing2,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalNvector.LatLon'>,
**LatLon_kwds)
Locate a point given two known points and the (initial) bearing from
those points. |
|
|
|
trilaterate(point1,
distance1,
point2,
distance2,
point3,
distance3,
radius=6371008.771415,
height=None,
useZ=False,
wrap=False,
LatLon=<class 'pygeodesy.sphericalNvector.LatLon'>,
**LatLon_kwds)
Locate a point at given distances from three other points. |
|
|