Class GeometryItemDistance
java.lang.Object
org.locationtech.jts.index.strtree.GeometryItemDistance
- All Implemented Interfaces:
ItemDistance
An ItemDistance function for
items which are
Geometrys,
using the Geometry.distance(Geometry) method.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance(ItemBoundable item1, ItemBoundable item2) Computes the distance between twoGeometryitems, using theGeometry.distance(Geometry)method.
-
Constructor Details
-
GeometryItemDistance
public GeometryItemDistance()
-
-
Method Details
-
distance
Computes the distance between twoGeometryitems, using theGeometry.distance(Geometry)method.- Specified by:
distancein interfaceItemDistance- Parameters:
item1- an item which is a Geometryitem2- an item which is a Geometry- Returns:
- the distance between the geometries
- Throws:
ClassCastException- if either item is not a Geometry
-