Class RectangleIntersectsSegmentVisitor
java.lang.Object
org.locationtech.jts.geom.util.ShortCircuitedGeometryVisitor
org.locationtech.jts.operation.predicate.RectangleIntersectsSegmentVisitor
A visitor to test for intersection between the query
rectangle and the line segments of the geometry.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private Coordinate
private Coordinate
private Envelope
private RectangleLineIntersector
-
Constructor Summary
ConstructorsConstructorDescriptionRectangleIntersectsSegmentVisitor
(Polygon rectangle) Creates a visitor for checking rectangle intersection with segments -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
checkIntersectionWithSegments
(LineString testLine) boolean
Reports whether any segment intersection exists.protected boolean
isDone()
protected void
Methods inherited from class org.locationtech.jts.geom.util.ShortCircuitedGeometryVisitor
applyTo
-
Field Details
-
rectEnv
-
rectIntersector
-
hasIntersection
private boolean hasIntersection -
p0
-
p1
-
-
Constructor Details
-
RectangleIntersectsSegmentVisitor
Creates a visitor for checking rectangle intersection with segments- Parameters:
rectangle
- the query rectangle
-
-
Method Details
-
intersects
public boolean intersects()Reports whether any segment intersection exists.- Returns:
- true if a segment intersection exists or false if no segment intersection exists
-
visit
- Specified by:
visit
in classShortCircuitedGeometryVisitor
-
checkIntersectionWithLineStrings
-
checkIntersectionWithSegments
-
isDone
protected boolean isDone()- Specified by:
isDone
in classShortCircuitedGeometryVisitor
-