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 `points`[`i`] for the `.distance` method. |
points_fraction(self, points, fi) Get and convert fractional `points`[`fi`] 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 An immutable property (`Read Only`).
| fraction Property to get and set the index fraction (`float`).
| units Property to get and set the distance units (`str`).
| wrap An immutable property (`Read Only`).
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 `None` 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 `None` 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 `points`[`i`] 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 `points`[`fi`] 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 An immutable property (`Read Only`). 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 An immutable property (`Read Only`). Get Method: wrap(self) - Get the wrap setting (`bool` or `None` if not applicable). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.