
JTS Topology Suite version 1.12  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object com.vividsolutions.jts.operation.distance.IndexedFacetDistance
public class IndexedFacetDistance
Computes the distance between the facets (segments and vertices)
of two Geometry
s
using a BranchandBound algorithm.
The BranchandBound algorithm operates over a
traversal of Rtrees built
on the target and possibly also the query geometries.
This approach provides the following benefits:
getDistance(Geometry)
when one or both
input geometries are large,
or when evaluating many distance computations against
a single geometry.
This class is not threadsafe.
Constructor Summary  

IndexedFacetDistance(Geometry g1)
Creates a new distancefinding instance for a given target Geometry . 
Method Summary  

static double 
distance(Geometry g1,
Geometry g2)
Computes the distance between two geometries using the indexed approach. 
double 
getDistance(Geometry g)
Computes the distance from the base geometry to the given geometry. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public IndexedFacetDistance(Geometry g1)
Geometry
.
Distances will be computed to all facets of the input geometry.
The facets of the geometry are the discrete segments and points
contained in its components.
In the case of Lineal
and Puntal
inputs,
this is equivalent to computing the conventional distance.
In the case of Polygonal
inputs, this is equivalent
to computing the distance to the polygons boundaries.
g1
 a Geometry, which may be of any type.Method Detail 

public static double distance(Geometry g1, Geometry g2)
For geometries with many segments or points, this can be faster than using a simple distance algorithm.
g1
 a geometryg2
 a geometry
public double getDistance(Geometry g)
g
 the geometry to compute the distance to

JTS Topology Suite version 1.12  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 