/// <summary> /// Computes the index for the closest point on the line to the /// given point. /// </summary> /// <param name="point">A point on the line.</param> /// <returns>The index of the point.</returns> /// <remarks> /// 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.) /// </remarks> public virtual double Project(Coordinate point) { return(LengthIndexOfPoint.IndexOf(linearGeom, point)); }
public static double IndexOf(Geometry linearGeom, Coordinate inputPt) { LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom); return(locater.IndexOf(inputPt)); }