/// <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. */ var 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 = { 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. */ var 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) { var locIndex = LocationIndexOfLine.IndicesOf(_linearGeom, subLine); var index = new[] { LengthLocationMap.GetLength(_linearGeom, locIndex[0]), LengthLocationMap.GetLength(_linearGeom, locIndex[1]), }; return(index); }
/// <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 occur 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(Geometry subLine) { return(LocationIndexOfLine.IndicesOf(_linearGeom, subLine)); }