project method

LinearLocation project(
  1. Coordinate pt
)

Computes the index for the closest point on the line to the given point. If more than one point has the closest distance the first one along the line is returned. (The point does not necessarily have to lie precisely on the line.)

@param pt a point on the line @return the index of the point

Implementation

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