示例#1
0
 /// <summary>
 /// 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.)
 /// </summary>
 /// <param name="pt"></param>
 /// <returns></returns>
 public double Project(Coordinate pt)
 {
     return(LengthIndexOfPoint.IndexOf(_linearGeom, pt));
 }
示例#2
0
        public static double IndexOf(IGeometry linearGeom, Coordinate inputPt)
        {
            var locater = new LengthIndexOfPoint(linearGeom);

            return(locater.IndexOf(inputPt));
        }