ItemDistance
trait ItemDistance
A function method which computes the distance between two {link ItemBoundable}s in an {link STRtree}. Used for Nearest Neighbour searches.
To make a distance function suitable for querying a single index tree via {link STRtree#nearestNeighbour(ItemDistance)} , the function should have a non-zero <i>reflexive distance</i>. That is, if the two arguments are the same object, the distance returned should be non-zero. If it is required that only pairs of <b>distinct</b> items be returned, the distance function must be <i>anti-reflexive</i>, and must return {link Double#MAX_VALUE} for identical arguments.