indexOf method

LinearLocation indexOf(
  1. Coordinate pt
)

Computes the index for a given point on the line.

The supplied point does not necessarily have to lie precisely on the line, but if it is far from the line the accuracy and performance of this function is not guaranteed. Use {@link #project} to compute a guaranteed result for points which may be far from the line.

@param pt a point on the line @return the index of the point @see #project(Coordinate)

Implementation

LinearLocation indexOf(Coordinate pt) {
  return LocationIndexOfPoint.indexOfStatic(linearGeom, pt);
}