JTS Topology Suite version 1.13

## com.vividsolutions.jts.index.strtree
Class GeometryItemDistance

    java.lang.Object
      com.vividsolutions.jts.index.strtree.GeometryItemDistance

All Implemented Interfaces:
  ItemDistance

    public class GeometryItemDistance

extends java.lang.Object
implements ItemDistance

An ItemDistance function for items which are `Geometry`s, using the `Geometry.distance(Geometry)` method.

Author:
  Martin Davis

Constructor Summary
`GeometryItemDistance()`

Method Summary
`double` `distance(ItemBoundable item1, ItemBoundable item2)` Computes the distance between two `Geometry` items, using the `Geometry.distance(Geometry)` method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GeometryItemDistance

    public GeometryItemDistance()

Method Detail

### distance

    public double distance(ItemBoundable item1,
                           ItemBoundable item2)

  Computes the distance between two `Geometry` items, using the `Geometry.distance(Geometry)` method.

  Specified by:
    `distance` in interface `ItemDistance`
  Parameters:
    `item1` - an item which is a Geometry
    `item2` - an item which is a Geometry
  Returns:
    the distance between the geometries
  Throws:
    `java.lang.ClassCastException` - if either item is not a Geometry

JTS Topology Suite version 1.13