com.vividsolutions.jts.geom.prep
Class PreparedLineStringIntersects

java.lang.Object
  extended bycom.vividsolutions.jts.geom.prep.PreparedLineStringIntersects

public class PreparedLineStringIntersects
extends java.lang.Object

Computes the intersects spatial relationship predicate for a target PreparedLineString relative to other Geometry classes. Uses short-circuit tests and indexing to improve performance.

Author:
Martin Davis

Field Summary
protected  PreparedLineString prepLine
           
 
Constructor Summary
PreparedLineStringIntersects(PreparedLineString prepLine)
          Creates an instance of this operation.
 
Method Summary
 boolean intersects(Geometry geom)
          Tests whether this geometry intersects a given geometry.
static boolean intersects(PreparedLineString prep, Geometry geom)
          Computes the intersects predicate between a PreparedLineString and a Geometry.
protected  boolean isAnyTestPointInTarget(Geometry testGeom)
          Tests whether any representative point of the test Geometry intersects the target geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prepLine

protected PreparedLineString prepLine
Constructor Detail

PreparedLineStringIntersects

public PreparedLineStringIntersects(PreparedLineString prepLine)
Creates an instance of this operation.

Method Detail

intersects

public static boolean intersects(PreparedLineString prep,
                                 Geometry geom)
Computes the intersects predicate between a PreparedLineString and a Geometry.

Parameters:
prep - the prepared linestring
geom - a test geometry
Returns:
true if the linestring intersects the geometry

intersects

public boolean intersects(Geometry geom)
Tests whether this geometry intersects a given geometry.

Parameters:
geom - the test geometry
Returns:
true if the test geometry intersects

isAnyTestPointInTarget

protected boolean isAnyTestPointInTarget(Geometry testGeom)
Tests whether any representative point of the test Geometry intersects the target geometry. Only handles test geometries which are Puntal (dimension 0)

Returns:
true if any point of the argument intersects the prepared geometry