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

# Class Frechet

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

Known Subclasses:
  - FrechetRadians
  - , FrechetDegrees
  - , FrechetDistanceTo

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

Instance Methods
__init__(self, points, fraction=None, name='', units='', **wrap_adjust) New `Frechet...` calculator/interpolator. |
discrete(self, points, fraction=None) Compute the `forward, discrete Fréchet` distance. |
distance(self, point1, point2) (INTERNAL) Must be overloaded, see function `notOverloaded`. |
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`: `_DOT_`, `__repr__`, `__str__`, `attrs`, `classof`, `copy`, `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` if not applicable).
| datum Get the datum (Datum or `None` if not applicable).
| fraction Property to get and set the index fraction (`float`).
| units Property to get and set the distance units (`Unit` or `str`).
| wrap Get the wrap setting (`bool` or `None` if not applicable).
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, points, fraction=None, name='', units='', **wrap_adjust) (Constructor) |
New `Frechet...` calculator/interpolator. Arguments: `points` - First 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. `name` - Optional calculator/interpolator name (`str`). `units` - Optional, the distance units (`Unit` or `str`). `wrap_adjust` - Optionally, `wrap` and unroll longitudes, iff applicable (`bool`) and `adjust` wrapped, unrolled longitudinal delta by the cosine of the mean latitude, iff applicable. Raises: `FrechetError` - Insufficient number of `points` or invalid `fraction` or `wrap` or `ajust` not applicable. Overrides: object.__init__

### 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().

### 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` if not applicable). Get method: adjust(self) - Get the adjust setting (`bool` 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.

### 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 Property to get and set the index fraction (`float`). Get method: fraction(self) - Get the index fraction (`float` or `1`). Set method: fraction(self, fraction) - Set the index fraction (`float` or `1`).

### units Property to get and set the distance units (`Unit` or `str`). Get method: units(self) - Get the distance units (`Unit` or `str`). Set method: units(self, units) - Set the distance units.

### wrap Get the wrap setting (`bool` or `None` if not applicable). Get method: wrap(self) - Get the wrap setting (`bool` 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.