indexOfAfter method

double indexOfAfter(
  1. Coordinate pt,
  2. double minIndex
)

Finds the index for a point on the line which is greater than the given index. If no such index exists, returns minIndex. This method can be used to determine all indexes for a point which occurs more than once on a non-simple line. It can also be used to disambiguate cases where the given point lies slightly off the line and is equidistant from two different points 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 @param minIndex the value the returned index must be greater than @return the index of the point greater than the given minimum index

@see #project(Coordinate)

Implementation

double indexOfAfter(Coordinate pt, double minIndex) {
  return LengthIndexOfPoint.indexOfAfterStatic(linearGeom, pt, minIndex);
}