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

# Class Frechet

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

Known Subclasses:
  - FrechetDegrees
  - , FrechetRadians

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

Instance Methods
__init__(self, points, fraction=None, name=`'````'`, units=`'````'`) New Frechet calculator/interpolator. |
discrete(self, points, fraction=None) Compute the `forward, discrete Fréchet` distance. |
distance(self, point1, point2) (INTERNAL) must be overloaded. |
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 fractional index point for the `.distance` method. |
Inherited from `named._Named`: `__repr__`, `__str__`, `_dot_`, `attrs`, `classof`, `copy`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| adjust
| fraction Property to get and set the index fraction (`float`).
| units Property to get and set the distance units (`str`).
| wrap
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__(self, points, fraction=None, name=`'````'`, units=`'````'`) (Constructor) |
New Frechet calculator/interpolator. Parameters: `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, distance units (`str`). Raises: `FrechetError` - Insufficient number of `points` or invalid `fraction`. Overrides: object.__init__

### discrete(self, points, fraction=None) |
Compute the `forward, discrete Fréchet` distance. Parameters: `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 invalid `fraction`. `RecursionError` - Recursion depth exceeded, see sys.getrecursionlimit().

### point(self, point) |
Convert a point for the `.distance` method. Parameters: `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. Parameters: `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 fractional index point for the `.distance` method. Parameters: `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 method: adjust(self) - Get the adjust setting (`bool` or `None` if not applicable). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### 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 the index fraction (`float` or `1`).

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

### wrap Get method: wrap(self) - Get the wrap setting (`bool` or `None` if not applicable). Set method: immutable(inst, value) - Throws an `AttributeError`, always.