Package org.locationtech.jts.geom.prep
Class PreparedLineStringIntersects
- java.lang.Object
-
- org.locationtech.jts.geom.prep.PreparedLineStringIntersects
-
class PreparedLineStringIntersects extends java.lang.ObjectComputes the intersects spatial relationship predicate for a targetPreparedLineStringrelative to otherGeometryclasses. Uses short-circuit tests and indexing to improve performance.
-
-
Field Summary
Fields Modifier and Type Field Description protected PreparedLineStringprepLine
-
Constructor Summary
Constructors Constructor Description PreparedLineStringIntersects(PreparedLineString prepLine)Creates an instance of this operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanintersects(Geometry geom)Tests whether this geometry intersects a given geometry.static booleanintersects(PreparedLineString prep, Geometry geom)Computes the intersects predicate between aPreparedLineStringand aGeometry.protected booleanisAnyTestPointInTarget(Geometry testGeom)Tests whether any representative point of the test Geometry intersects the target geometry.
-
-
-
Field Detail
-
prepLine
protected PreparedLineString prepLine
-
-
Constructor Detail
-
PreparedLineStringIntersects
public PreparedLineStringIntersects(PreparedLineString prepLine)
Creates an instance of this operation.- Parameters:
prepPoly- the target PreparedLineString
-
-
Method Detail
-
intersects
public static boolean intersects(PreparedLineString prep, Geometry geom)
Computes the intersects predicate between aPreparedLineStringand aGeometry.- Parameters:
prep- the prepared linestringgeom- 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)- Parameters:
geom- a Puntal geometry to test- Returns:
- true if any point of the argument intersects the prepared geometry
-
-