Пример #1
0
 /// <summary>
 /// Computes the minimum index for a point on the line.
 /// If the line is not simple (i.e. loops back on itself)
 /// a single point may have more than one possible index.
 /// In this case, the smallest index is returned.
 /// 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 <see cref="Project" /> to compute a guaranteed result for points
 /// which may be far from the line.
 /// </summary>
 /// <param name="pt">A point on the line.</param>
 /// <returns>The minimum index of the point.</returns>
 public double IndexOf(ICoordinate pt)
 {
     return(LengthIndexOfPoint.IndexOf(linearGeom, pt));
 }
Пример #2
0
 /// <summary>
 /// Finds the index for a point on the line
 /// which is greater than the given index.
 /// If no such index exists, returns <paramref name="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 <see cref="Project" /> to compute a guaranteed result for points
 /// which may be far from the line.
 /// </summary>
 /// <param name="pt">A point on the line.</param>
 /// <param name="minIndex">The value the returned index must be greater than.</param>
 /// <returns>The index of the point greater than the given minimum index.</returns>
 public double IndexOfAfter(ICoordinate pt, double minIndex)
 {
     return(LengthIndexOfPoint.IndexOfAfter(linearGeom, pt, minIndex));
 }
Пример #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="linearGeom"></param>
 /// <param name="inputPt"></param>
 /// <param name="minIndex"></param>
 /// <returns></returns>
 public static double IndexOfAfter(IGeometry linearGeom, ICoordinate inputPt, double minIndex)
 {
     LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom);
     return locater.IndexOfAfter(inputPt, minIndex);
 }
Пример #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="linearGeom"></param>
 /// <param name="inputPt"></param>
 /// <returns></returns>
 public static double IndexOf(IGeometry linearGeom, ICoordinate inputPt)
 {
     LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom);
     return locater.IndexOf(inputPt);
 }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="linearGeom"></param>
        /// <param name="inputPt"></param>
        /// <param name="minIndex"></param>
        /// <returns></returns>
        public static double IndexOfAfter(IGeometry linearGeom, ICoordinate inputPt, double minIndex)
        {
            LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom);

            return(locater.IndexOfAfter(inputPt, minIndex));
        }
Пример #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="linearGeom"></param>
        /// <param name="inputPt"></param>
        /// <returns></returns>
        public static double IndexOf(IGeometry linearGeom, ICoordinate inputPt)
        {
            LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom);

            return(locater.IndexOf(inputPt));
        }