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

# Class Frechet

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

Known Subclasses:
  - _FrechetMeterRadians
  - , FrechetDegrees
  - , FrechetDistanceTo
  - , FrechetEquirectangular
  - , FrechetExact
  - , FrechetKarney
  - , FrechetRadians

Frechet base class, requires method Frechet.distance to be overloaded.

Instance Methods
__init__(self, point1s, fraction=None, name='', units='', **kwds) New `Frechet...` calculator/interpolator. |
discrete(self, point2s, fraction=None) Compute the `forward, discrete Fréchet` distance. |
distance(self, point1, point2) Return the distance between `point1` and `point2s`, subject to the supplied optional keyword arguments, see property `kwds`. |
point(self, point) Convert a point for the `.distance` method. |
points_(self, points, i) Get and convert a point for the `.distance` method. |
points_fraction(self, points, fi) Get and convert a fractional point for the `.distance` method. |
Inherited from `named._Named`: `__imatmul__`, `__matmul__`, `__repr__`, `__rmatmul__`, `__str__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| adjust Get the `adjust` setting (`bool` or `None`).
| datum Get the datum (Datum or `None` if not applicable).
| fraction Class `property` with retrievable name.
| kwds Get the supplied, optional keyword arguments (`dict`).
| units Class `property` with retrievable name.
| wrap Get the `wrap` setting (`bool` or `None`).
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __init__ (self, point1s, fraction=None, name='', units='', **kwds) (Constructor) |
New `Frechet...` calculator/interpolator. Arguments: `point1s` - First set of points (`LatLon`[], Numpy2LatLon[], Tuple2LatLon[] or `other`[]). `fraction` - Index fraction (`float` in EPS..EPS1) to interpolate intermediate `point1s` or use `None`, `0` or `1` for no intermediate `point1s` and no fractional indices. `name` - Optional calculator/interpolator name (`str`). `units` - Optional distance units (`Unit` or `str`). `kwds` - Optional keyword argument for distance function, retrievable with property `kwds`. Raises: `FrechetError` - Insufficient number of `point1s` or an invalid `point1`, `fraction` or `units`. Overrides: object.__init__

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

### point (self, point) |
Convert a point for the `.distance` method. Arguments: `point` - The point to convert ((`LatLon`, Numpy2LatLon, Tuple2LatLon or `other`). Returns: The converted `point`.

### points_ (self, points, i) |
Get and convert a point for the `.distance` method. Arguments: `points` - The orignal `points` to convert ((`LatLon`[], Numpy2LatLon[], Tuple2LatLon[] or `other`[]). `i` - The `points` index (`int`). Returns: The converted `points[i]`.

### points_fraction (self, points, fi) |
Get and convert a fractional point for the `.distance` method. Arguments: `points` - The orignal `points` to convert ((`LatLon`[], Numpy2LatLon[], Tuple2LatLon[] or `other`[]). `fi` - The fractional index in `points` (`float` or `int`). Returns: The interpolated, converted, intermediate `points[fi]`.

Property Details

### adjust Get the `adjust` setting (`bool` or `None`). Get method: adjust(self) - Get the `adjust` setting (`bool` or `None`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### datum Get the datum (Datum or `None` if not applicable). Get method: datum(self) - Get the datum (Datum or `None` if not applicable). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### fraction Class `property` with retrievable name. Get method: fraction(self) - Get the index fraction (`float` or `1`). Set method: fraction(self, fraction) - Set the index fraction (`float` in `EPS`..

### kwds Get the supplied, optional keyword arguments (`dict`). Get method: kwds(self) - Get the supplied, optional keyword arguments (`dict`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### units Class `property` with retrievable name. Get method: units(self) - Get the distance units (`Unit` or `str`). Set method: units(self, units) - Set the distance units (`Unit` or `str`).

### wrap Get the `wrap` setting (`bool` or `None`). Get method: wrap(self) - Get the `wrap` setting (`bool` or `None`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.