Home | Trees | Indices | Help |
|
---|
|
Hausdorff distances.
Classes Hausdorff, HausdorffDegrees, HausdorffRadians, HausdorffCosineAndoyerLambert, HausdorffCosineForsytheAndoyerLambert, HausdorffCosineLaw, HausdorffDistanceTo, HausdorffEquirectangular, HausdorffEuclidean, HausdorffFlatLocal, HausdorffFlatPolar, HausdorffHaversine, HausdorffHubeny, HausdorffKarney, HausdorffThomas and HausdorffVincentys to compute Hausdorff distances between two sets of
LatLon
, NumPy
, tuples
or other
types of points.
Only HausdorffDistanceTo -iff used with ellipsoidalKarney.LatLon points- and HausdorffKarney requires installation of Charles Karney's geographiclib.
Typical usage is as follows. First, create a Hausdorff
calculator from a given set of LatLon
points, called the
model
or template
points.
h = HausdorffXyz(point1s, ...)
Get the directed
or symmetric
Hausdorff
distance to a second set of LatLon
points, named the
target
points, by using
t6 = h.directed(point2s)
respectively
t6 = h.symmetric(point2s)
.
Or, use function hausdorff_
with a proper
distance
function and optionally a point
function passed as keyword arguments as follows
t6 = hausdorff_(point1s, point2s, ..., distance=...,
point=...)
.
In all cases, the returned result t6
is a Hausdorff6Tuple.
For (lat, lon, ...)
points in a NumPy
array
or plain tuples
, wrap the points in a Numpy2LatLon respectively Tuple2LatLon instance, more details in the documentation
thereof.
For other points, create a Hausdorff sub-class with the appropriate
distance
method overloading Hausdorff.distance and optionally a point
method overriding Hausdorff.point as the next example.
>>> from pygeodesy import Hausdorff, hypot_ >>> >>> class H3D(Hausdorff): >>> """Custom Hausdorff example. >>> """ >>> def distance(self, p1, p2): >>> return hypot_(p1.x - p2.x, p1.y - p2.y, p1.z - p2.z) >>> >>> h3D = H3D(xyz1, ..., units="...") >>> d6 = h3D.directed(xyz2)
Transcribed from the original SciPy Directed Hausdorff Code version 0.19.0, Copyright (C)
Tyler Reddy, Richard Gowers, and Max Linke, 2016, distributed under the
same BSD license as SciPy, including early breaking
and
random sampling
as in Abdel Aziz Taha, Allan Hanbury "An Efficient Algorithm
for Calculating the Exact Hausdorff Distance", IEEE Trans.
Pattern Analysis Machine Intelligence (PAMI), vol 37, no 11, pp
2153-2163, Nov 2015.
Version: 24.06.15
Classes | |
HausdorffError Hausdorff issue. |
|
Hausdorff Hausdorff base class, requires method Hausdorff.distance to be overloaded. |
|
HausdorffDegrees Hausdorff base class for distances from LatLon points in degrees .
|
|
HausdorffRadians Hausdorff base class for distances from LatLon points converted from degrees to
radians .
|
|
HausdorffCosineAndoyerLambert Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.cosineAndoyerLambert.
|
|
HausdorffCosineForsytheAndoyerLambert Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.cosineForsytheAndoyerLambert.
|
|
HausdorffCosineLaw Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.cosineLaw_.
|
|
HausdorffDistanceTo Compute the Hausdorff distance based on the distance
from the points' LatLon.distanceTo method,
conventionally in meter .
|
|
HausdorffEquirectangular Compute the Hausdorff distance based on the
equirectangular distance in radians
squared like function pygeodesy.equirectangular.
|
|
HausdorffEuclidean Compute the Hausdorff distance based on the
Euclidean distance in radians from
function pygeodesy.euclidean_.
|
|
HausdorffExact Compute the Hausdorff distance based on the
angular distance in degrees from method GeodesicExact.Inverse .
|
|
HausdorffFlatLocal Compute the Hausdorff distance based on the
angular distance in radians squared like
function pygeodesy.flatLocal_/pygeodesy.hubeny_.
|
|
HausdorffFlatPolar Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.flatPolar_.
|
|
HausdorffHaversine Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.haversine_.
|
|
HausdorffHubeny | |
HausdorffKarney Compute the Hausdorff distance based on the
angular distance in degrees from
Karney's geographiclib Geodesic Inverse method.
|
|
HausdorffThomas Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.thomas_.
|
|
HausdorffVincentys Compute the Hausdorff distance based on the
angular distance in radians from function pygeodesy.vincentys_.
|
|
Hausdorff6Tuple 6-Tuple (hd, i, j, mn, md, units) with the Hausdorff distance hd , indices
i and j , the total count mn ,
the mean Hausdorff distance md and
the class or name of both distance units .
|
Functions | |||
|
|||
|
Variables | |
__all__ = _ALL_LAZY.hausdorff
|
Function Details |
Compute the
|
Return a
Note:
Random with Example: >>> rrange = randomrangenerator('R') >>> for r in rrange(n): >>> ... # r is random in 0..n-1 |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Oct 22 17:06:19 2024 | http://epydoc.sourceforge.net |