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

# Class Frechet

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

Known Subclasses:
  - FrechetRadians
  - , FrechetDegrees

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. |
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`: `__repr__`, `__str__`, `_dot_`, `attrs`, `classof`, `copy`, `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 (`str`).
| wrap Get the wrap setting (`bool` or `None` if not applicable).
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` 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 distance units (`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 invalid `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: immutable(inst, value) - Throws an `AttributeError`, always.

### 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: 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 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: immutable(inst, value) - Throws an `AttributeError`, always.