Class GeometryItemDistance
- java.lang.Object
-
- org.locationtech.jts.index.strtree.GeometryItemDistance
-
- All Implemented Interfaces:
ItemDistance
public class GeometryItemDistance extends java.lang.Object implements ItemDistance
An ItemDistance function for items which areGeometry
s, using theGeometry.distance(Geometry)
method.- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description GeometryItemDistance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(ItemBoundable item1, ItemBoundable item2)
Computes the distance between twoGeometry
items, using theGeometry.distance(Geometry)
method.
-
-
-
Method Detail
-
distance
public double distance(ItemBoundable item1, ItemBoundable item2)
Computes the distance between twoGeometry
items, using theGeometry.distance(Geometry)
method.- Specified by:
distance
in interfaceItemDistance
- Parameters:
item1
- an item which is a Geometryitem2
- an item which is a Geometry- Returns:
- the distance between the geometries
- Throws:
java.lang.ClassCastException
- if either item is not a Geometry
-
-