com.vividsolutions.jump.algorithm
Class VertexHausdorffDistance

java.lang.Object
  extended by com.vividsolutions.jump.algorithm.VertexHausdorffDistance

public class VertexHausdorffDistance
extends java.lang.Object

Implements algorithm for computing a distance metric which can be thought of as the "Vertex Hausdorff Distance". This is the Hausdorff distance restricted to vertices for one of the geometries. Also computes two points of the Geometries which are separated by the computed distance.

NOTE: This algorithm does NOT compute the full Hausdorff distance correctly, but an approximation that is correct for a large subset of useful cases. One important part of this subset is Linestrings that are roughly parallel to each other, and roughly equal in length - just what is needed for line matching.


Nested Class Summary
static class VertexHausdorffDistance.MaxPointDistanceFilter
           
 
Constructor Summary
VertexHausdorffDistance(com.vividsolutions.jts.geom.Geometry g0, com.vividsolutions.jts.geom.Geometry g1)
           
VertexHausdorffDistance(com.vividsolutions.jts.geom.LineSegment seg0, com.vividsolutions.jts.geom.LineSegment seg1)
           
 
Method Summary
 double distance()
           
static double distance(com.vividsolutions.jts.geom.Geometry g0, com.vividsolutions.jts.geom.Geometry g1)
           
 com.vividsolutions.jts.geom.Coordinate[] getCoordinates()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VertexHausdorffDistance

public VertexHausdorffDistance(com.vividsolutions.jts.geom.Geometry g0,
                               com.vividsolutions.jts.geom.Geometry g1)

VertexHausdorffDistance

public VertexHausdorffDistance(com.vividsolutions.jts.geom.LineSegment seg0,
                               com.vividsolutions.jts.geom.LineSegment seg1)
Method Detail

distance

public static double distance(com.vividsolutions.jts.geom.Geometry g0,
                              com.vividsolutions.jts.geom.Geometry g1)

distance

public double distance()

getCoordinates

public com.vividsolutions.jts.geom.Coordinate[] getCoordinates()