/// <summary>
 /// 
 /// </summary>
 /// <param name="linearGeom"></param>
 /// <param name="subLine"></param>
 /// <returns></returns>
 public static LinearLocation[] IndicesOf(IGeometry linearGeom, IGeometry subLine)
 {
     /*
      * MD - this algorithm has been extracted into a class
      * because it is intended to validate that the subline truly is a subline,
      * and also to use the internal vertex information to unambiguously locate the subline.
      */
     LocationIndexOfLine locater = new LocationIndexOfLine(linearGeom);
     return locater.IndicesOf(subLine);
 }
 /// <summary>
 /// Computes the indices for a subline of the line.
 /// (The subline must conform to the line; that is,
 /// all vertices in the subline (except possibly the first and last)
 /// must be vertices of the line and occcur in the same order).
 /// </summary>
 /// <param name="subLine">A subLine of the line.</param>
 /// <returns>A pair of indices for the start and end of the subline..</returns>
 public double[] IndicesOf(IGeometry subLine)
 {
     LinearLocation[] locIndex = LocationIndexOfLine.IndicesOf(linearGeom, subLine);
     double[]         index    = new double[]
     {
         LengthLocationMap.GetLength(linearGeom, locIndex[0]),
         LengthLocationMap.GetLength(linearGeom, locIndex[1]),
     };
     return(index);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="linearGeom"></param>
 /// <param name="subLine"></param>
 /// <returns></returns>
 public static LinearLocation[] IndicesOf(IGeometry linearGeom, IGeometry subLine)
 {
     /*
      * MD - this algorithm has been extracted into a class
      * because it is intended to validate that the subline truly is a subline,
      * and also to use the internal vertex information to unambiguously locate the subline.
      */
     LocationIndexOfLine locater = new LocationIndexOfLine(linearGeom);
     return locater.IndicesOf(subLine);
 }
Beispiel #4
0
 /// <summary>
 /// Computes the indices for a subline of the line.
 /// (The subline must conform to the line; that is,
 /// all vertices in the subline (except possibly the first and last)
 /// must be vertices of the line and occcur in the same order).
 /// </summary>
 /// <param name="subLine">A subLine of the line.</param>
 /// <returns>A pair of indices for the start and end of the subline.</returns>
 public LinearLocation[] IndicesOf(IGeometry subLine)
 {
     return(LocationIndexOfLine.IndicesOf(linearGeom, subLine));
 }