Class LocationIndexOfLine

java.lang.Object
org.locationtech.jts.linearref.LocationIndexOfLine

class LocationIndexOfLine extends Object
Determines the location of a subline along a linear Geometry. The location is reported as a pair of LinearLocations.

Note: Currently this algorithm is not guaranteed to return the correct substring in some situations where an endpoint of the test line occurs more than once in the input line. (However, the common case of a ring is always handled correctly).

  • Field Details

    • linearGeom

      private Geometry linearGeom
  • Constructor Details

    • LocationIndexOfLine

      public LocationIndexOfLine(Geometry linearGeom)
  • Method Details

    • indicesOf

      public static LinearLocation[] indicesOf(Geometry linearGeom, Geometry 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.
    • indicesOf

      public LinearLocation[] indicesOf(Geometry subLine)