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, units='', **name__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`: `__format__`, `__imatmul__`, `__matmul__`, `__repr__`, `__rmatmul__`, `__str__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| adjust
| datum
| fraction Class `property` with a `.name` attribute.
| kwds
| units Class `property` with a `.name` attribute.
| wrap
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __init__ (self, point1s, fraction=None, units='', **name__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. `units` - Optional distance units (`Unit` or `str`). `name__kwds` - Optional `name=NN` for this calculator/interpolator (`str`) and any keyword arguments for the 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 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 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 a `.name` attribute. 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 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 a `.name` attribute. 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 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.