Class LocationIndexOfLine


  • class LocationIndexOfLine
    extends java.lang.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 Detail

      • linearGeom

        private Geometry linearGeom
    • Constructor Detail

      • LocationIndexOfLine

        public LocationIndexOfLine​(Geometry linearGeom)
    • Method Detail

      • 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.