Package pygeodesy :: Module frechet :: Class FrechetDistanceTo |
[frames] | no frames]

# Class FrechetDistanceTo

      object --+
               |
    named._Named --+
                   |
             Frechet --+
                       |
                      FrechetDistanceTo

Compute the `Frechet` distance based on the distance from the points' `LatLon.distanceTo` method, conventionally in `meter`.

See Also: FrechetCosineAndoyerLambert, FrechetCosineForsytheAndoyerLambert, FrechetFlatLocal, FrechetHubeny, FrechetThomas and FrechetKarney.

Instance Methods
__init__(self, points, fraction=None, name=`'````'`, **distanceTo_kwds) New FrechetDistanceTo calculator/interpolator. |
discrete(self, points, fraction=None) Compute the `forward, discrete Fréchet` distance. |
distance(self, p1, p2) Return the distance in `meter`. |
Inherited from `Frechet`: `point`, `points_`, `points_fraction` Inherited from `named._Named`: `__repr__`, `__str__`, `_dot_`, `attrs`, `classof`, `copy`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `Frechet`: `adjust`, `datum`, `fraction`, `units`, `wrap` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__ (self, points, fraction=None, name=`'````'`, **distanceTo_kwds) (Constructor) |
New FrechetDistanceTo calculator/interpolator. Arguments: `points` - First set of points (`LatLon`[]). `fraction` - Index fraction (`float` in EPS..EPS1) to interpolate intermediate `points` or use `None`, `0` or `1` for no intermediate `points` and no fractional indices. `name` - Optional calculator/interpolator name (`str`). `distanceTo_kwds` - Optional keyword arguments for the `points`' `LatLon.distanceTo` method. Raises: `FrechetError` - Insufficient number of `points` or an invalid `point` or `fraction`. `ImportError` - Package geographiclib missing iff `points` are ellipsoidalKarney.LatLons. Overrides: object.__init__ Note: All `points` must be instances of the same ellipsoidal or spherical `LatLon` class.

### discrete (self, points, fraction=None) |
Compute the `forward, discrete Fréchet` distance. Arguments: `points` - Second set of points (`LatLon`[], Numpy2LatLon[], Tuple2LatLon[] or `other`[]). `fraction` - Index fraction (`float` in EPS..EPS1) to interpolate intermediate `points` or use `None`, `0` or `1` for no intermediate `points` and no fractional indices. Returns: A Frechet6Tuple`(fd, fi1, fi2, r, n, units)`. Raises: `FrechetError` - Insufficient number of `points` or an invalid `point` or `fraction`. `RecursionError` - Recursion depth exceeded, see sys.getrecursionlimit(). Overrides: Frechet.discrete

### distance (self, p1, p2) |
Return the distance in `meter`. Overrides: Frechet.distance