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

Class Frechet

  object --+    
           |    
named._Named --+
               |
              Frechet
Known Subclasses:

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)
Distance between 2 points from .point.
 
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__, classof, copy, 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).
  fraction
Get the index fraction (float or 1).
  units
Get the distance units (str or "").
  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='')
(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:

distance(self, point1, point2)

 

Distance between 2 points from .point.

Raises:
  • AssertionError - Not overloaded.

Note: This method must be overloaded.

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

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:
Read_Only(self, ignored) - Throws an AttributeError, always.

fraction

Get the index fraction (float or 1).

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

Get the distance units (str or "").

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:
Read_Only(self, ignored) - Throws an AttributeError, always.