/// <summary>
        /// Computes the <see cref="LineString" /> for the interval
        /// on the line between the given indices.
        /// If the <paramref name="endIndex" /> lies before the <paramref name="startIndex" />,
        /// the computed geometry is reversed.
        /// </summary>
        /// <param name="startIndex"></param>
        /// <param name="endIndex"></param>
        /// <returns></returns>
        public IGeometry ExtractLine(double startIndex, double endIndex)
        {
            LocationIndexedLine lil      = new LocationIndexedLine(linearGeom);
            LinearLocation      startLoc = LocationOf(startIndex);
            LinearLocation      endLoc   = LocationOf(endIndex);

            return(ExtractLineByLocation.Extract(linearGeom, startLoc, endLoc));
        }
Example #2
0
 /// <summary>
 /// Computes the <see cref="LineString" /> for the interval
 /// on the line between the given indices.
 /// If the <paramref name="endIndex" /> lies before the <paramref name="startIndex" />,
 /// the computed geometry is reversed.
 /// </summary>
 /// <param name="startIndex"></param>
 /// <param name="endIndex"></param>
 /// <returns></returns>
 public IGeometry ExtractLine(double startIndex, double endIndex)
 {
     LocationIndexedLine lil = new LocationIndexedLine(linearGeom);
     LinearLocation startLoc = LocationOf(startIndex);
     LinearLocation endLoc = LocationOf(endIndex);
     return ExtractLineByLocation.Extract(linearGeom, startLoc, endLoc);
 }