com.vividsolutions.jump.geom
Class EnvelopeIntersector

java.lang.Object
  extended by com.vividsolutions.jump.geom.EnvelopeIntersector

public class EnvelopeIntersector
extends java.lang.Object


Constructor Summary
EnvelopeIntersector()
           
 
Method Summary
static boolean intersects(com.vividsolutions.jts.geom.Geometry geometry, com.vividsolutions.jts.geom.Envelope envelope)
          Returns whether the Geometry and the Envelope intersect, even if the Geometry is invalid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvelopeIntersector

public EnvelopeIntersector()
Method Detail

intersects

public static boolean intersects(com.vividsolutions.jts.geom.Geometry geometry,
                                 com.vividsolutions.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