GeometryItemDistance

An {link ItemDistance} function for items which are {link Geometry}s, using the {link Geometry#distance(Geometry)} method.

To make this distance function suitable for using to query a single index tree, the distance metric is <i>anti-reflexive</i>. That is, if the two arguments are the same Geometry object, the distance returned is {link Double.MAX_VALUE}.

class Object
trait Matchable
class Any

Value members

Concrete methods

override def distance(item1: ItemBoundable, item2: ItemBoundable): Double

Computes the distance between two {link Geometry} items, using the {link Geometry#distance(Geometry)} method.

Computes the distance between two {link Geometry} items, using the {link Geometry#distance(Geometry)} method.

Value Params
item1

an item which is a Geometry

item2

an item which is a Geometry return the distance between the geometries throws ClassCastException if either item is not a Geometry

Definition Classes