gis-tools-ts - v0.6.0
    Preparing search index...

    Function intersectionOfSegmentsRobust

    • Find the intersection of two segments. A more robust approach that uses predicates to ensure no false positives/negatives

      NOTE: If the segments are touching at end points, they PASS in this function. However, the caviat is that if the segments are coming from the same ring, then the result will be undefined (not considered an intersection).

      Parameters

      • a: [VectorPoint<Properties>, VectorPoint<Properties>]

        the first segment

      • b: [VectorPoint<Properties>, VectorPoint<Properties>]

        the second segment

      • OptionalaRingID: number

        the ring id of the first segment if provided

      • OptionalbRingID: number

        the ring id of the second segment if provided

      Returns undefined | VectorPoint<Properties>

      a point if the segments intersect where the intersection occurs, otherwise undefined