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

# Module ellipsoidalKarney

Ellipsoidal geodetic (lat-/longitude) and cartesian (x/y/z) classes LatLon and Cartesian and functions areaOf and perimeterOf based on the Python implementation of Charles F. F. Karney's GeographicLib.

Here's an example usage of `ellipsoidalKarney`:

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

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

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

or by converting to anothor datum:

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

Version: 18.09.30

Classes
| LatLon An ellipsoidal LatLon similar to ellipsoidalVincenty.LatLon but using Charles F. F. Karney's Python GeographicLib to compute the geodesic distance, initial and final bearing (azimuths) between two given points or the destination point given a start point and an initial bearing.
| Cartesian Extended to convert (geocentric) Cartesian points to Karney-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.