예제 #1
0
        public static double IndexOfAfter(Geometry linearGeom,
                                          Coordinate inputPt, double minIndex)
        {
            LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom);

            return(locater.IndexOfAfter(inputPt, minIndex));
        }
예제 #2
0
 /// <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));
 }
예제 #3
0
 /// <summary>
 /// Finds the index for a point on the line which is greater than
 /// the given index.
 /// </summary>
 /// <param name="point">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>
 /// <remarks>
 /// If no such index exists, returns <c>minIndex</c>.
 /// 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.
 /// <para>
 /// The supplied point does not <b>necessarily</b> 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.
 /// </para>
 /// </remarks>
 /// <seealso cref="Project"/>
 public virtual double IndexOfAfter(Coordinate point, double minIndex)
 {
     return(LengthIndexOfPoint.IndexOfAfter(linearGeom, point, minIndex));
 }
예제 #4
0
        public static double IndexOf(Geometry linearGeom, Coordinate inputPt)
        {
            LengthIndexOfPoint locater = new LengthIndexOfPoint(linearGeom);

            return(locater.IndexOf(inputPt));
        }