Class EnvelopeIntersector


  • public class EnvelopeIntersector
    extends Object
    • Constructor Detail

      • EnvelopeIntersector

        public EnvelopeIntersector()
    • Method Detail

      • intersects

        public static boolean intersects​(org.locationtech.jts.geom.Geometry geometry,
                                         org.locationtech.jts.geom.Envelope envelope)
        Returns whether the Geometry and the Envelope intersect, even if the Geometry is invalid. Checks whether any points or line segments of the geometry intersect the Envelope, or whether the Envelope is wholly contained in any polygons.

        This code will only work correctly on valid geometries. (For instance, it may return false if the Envelope is wholly contained in an invalid polygon.

        Parameters:
        envelope - the Envelope to test
        geometry - the Geometry to test, whether valid or not
        Returns:
        whether the Envelope intersects the Geometry