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 Charles Karney's Python implementation of 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: 19.07.14

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
ispolar(points, wrap=False) Check whether a polygon encloses a pole. |
areaOf(points, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) Compute the area of a (n ellipsoidal) polygon. |
isclockwise(points, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) Determine the direction of a path or polygon. |
perimeterOf(points, closed=False, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) Compute the perimeter of a (n ellipsoidal) polygon. |

Function Details

### ispolar(points, wrap=False) |
Check whether a polygon encloses a pole. Parameters: `points` - The polygon points (`LatLon`[]). `wrap` - Wrap and unroll longitudes (`bool`). Returns: `True` if the polygon encloses a pole, `False` otherwise. Raises: `ValueError` - Insufficient number of `points`. `TypeError` - Some `points` are not `LatLon` or don't have `bearingTo2`, `initialBearingTo` and `finalBearingTo` methods.

### areaOf(points, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) |
Compute the area of a (n ellipsoidal) polygon. Parameters: `points` - The polygon points (LatLon[]). `datum` - Optional datum (Datum). `wrap` - Wrap and unroll longitudes (`bool`). Returns: Area (`meter`, same as units of the `datum` ellipsoid, squared). Raises: `ImportError` - Package GeographicLib missing. `TypeError` - Some `points` are not LatLon. `ValueError` - Insufficient number of `points` or longitudes not wrapped, unrolled, `wrap` is `False`. Note: This function requires installation of the GeographicLib package. See Also: pygeodesy.areaOf, sphericalNvector.areaOf and sphericalTrigonometry.areaOf.

### isclockwise(points, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) |
Determine the direction of a path or polygon. Parameters: `points` - The path or polygon points (`LatLon`[]). `datum` - Optional datum (Datum). `wrap` - Wrap and unroll longitudes (`bool`). Returns: `True` if `points` are clockwise, `False` otherwise. Raises: `TypeError` - Some `points` are not `LatLon`. `ValueError` - Insufficient number of `points` or `points` enclose a pole or zero area. Note: This function requires installation of the GeographicLib package. See Also: pygeodesy.isclockwise.

### perimeterOf(points, closed=False, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, wrap=True) |
Compute the perimeter of a (n ellipsoidal) polygon. Parameters: `points` - The polygon points (LatLon[]). `closed` - Optionally, close the polygon (`bool`). `datum` - Optional datum (Datum). `wrap` - Wrap and unroll longitudes (`bool`). Returns: Perimeter (`meter`, same as units of the `datum` ellipsoid). Raises: `ImportError` - Package GeographicLib missing. `TypeError` - Some `points` are not LatLon. `ValueError` - Insufficient number of `points` or longitudes not wrapped, unrolled, `wrap` is `False`. Note: This function requires installation of the GeographicLib package. See Also: pygeodesy.perimeterOf and sphericalTrigonometry.perimeterOf.