Package pygeodesy :: Module ellipsoidalVincenty |
[frames] | no frames]

# Module ellipsoidalVincenty

Vincenty's ellipsoidal geodetic (lat-/longitude) and cartesian (x/y/z) classes LatLon, Cartesian and VincentyError anf functions areaOf and perimeterOf.

Pure Python implementation of geodesy tools for ellipsoidal earth models, transcribed from JavaScript originals by (C) Chris Veness 2005-2016 and published under the same MIT Licence**, see Vincenty geodesics. More at GeographicLib and GeoPy.

Calculate geodesic distance between two points using the Vincenty formulae and one of several ellipsoidal earth models. The default model is WGS-84, the most accurate and widely used globally-applicable model for the earth ellipsoid.

Other ellipsoids offering a better fit to the local geoid include Airy (1830) in the UK, Clarke (1880) in Africa, International 1924 in much of Europe, and GRS-67 in South America. North America (NAD83) and Australia (GDA) use GRS-80, which is equivalent to the WGS-84 model.

Great-circle distance uses a spherical model of the earth with the mean earth radius defined by the International Union of Geodesy and Geophysics (IUGG) as (2 * a + b) / 3 = 6371008.7714150598 meter or approx. 6371009 meter (for WGS-84, resulting in an error of up to about 0.5%).

Here's an example usage of Vincenty:

    >>> from pygeodesy.ellipsoidalVincenty import LatLon
    >>> Newport_RI = LatLon(41.49008, -71.312796)
    >>> Cleveland_OH = LatLon(41.499498, -81.695391)
    >>> Newport_RI.distanceTo(Cleveland_OH)
    866455.4329158525  # meter

You can change the ellipsoid model used by the Vincenty formulae as follows:

    >>> from pygeodesy import Datums
    >>> from pygeodesy.ellipsoidalVincenty import LatLon
    >>> p = LatLon(0, 0, datum=Datums.OSGB36)

or by converting to anothor datum:

    >>> p = p.convertDatum(Datums.OSGB36)

Version: 18.08.28

Classes
| VincentyError Error raised from Vincenty's direct and inverse methods for coincident points and lack of convergence.
| LatLon Using the formulae devised by Thaddeus Vincenty (1975) with an ellipsoidal model of the earth to compute the geodesic distance and bearings between two given points or the destination point given an start point and initial bearing.
| Cartesian Extended to convert (geocentric) Cartesian points to Vincenty-based (ellipsoidal) geodetic LatLon.

Functions
areaOf(points, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) Compute the area of a polygon defined by an array, list, sequence, set or tuple of points on the given datum. |
perimeterOf(points, closed=False, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) Compute the perimeter of a polygon/-line defined by an array, list, sequence, set or tuple of points on the given datum. |

Function Details

### areaOf(points, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) |
Compute the area of a polygon defined by an array, list, sequence, set or tuple of points on the given datum. Parameters: `points` - The points defining the polygon (LatLon[]). `datum` - Optional datum (Datum). `wrap` - Wrap and unroll longitudes (bool). Returns: Area (meter squared). Raises: `ImportError` - Package GeographicLib missing. `TypeError` - Some points are not LatLon. `ValueError` - Insufficient number of points or longitudes not wrapped, unrolled. Note: This function requires the GeographicLib package to be installed. See Also: pygeodesy.areaOf, sphericalNvector.areaOf and sphericalTrigonometry.areaOf.

### perimeterOf(points, closed=False, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) |
Compute the perimeter of a polygon/-line defined by an array, list, sequence, set or tuple of points on the given datum. Parameters: `points` - The points defining the polygon (LatLon[]). `closed` - Optionally, close the polygon/-line (bool). `datum` - Optional datum (Datum). `wrap` - Wrap and unroll longitudes (bool). Returns: Perimeter (meter). Raises: `ImportError` - Package GeographicLib missing. `TypeError` - Some points are not LatLon. `ValueError` - Insufficient number of points or longitudes not wrapped, unrolled. Note: This function requires the GeographicLib package to be installed. See Also: pygeodesy.perimeterOf and sphericalTrigonometry.perimeterOf.