Class RectangleIntersectsSegmentVisitor
- java.lang.Object
-
- org.locationtech.jts.geom.util.ShortCircuitedGeometryVisitor
-
- org.locationtech.jts.operation.predicate.RectangleIntersectsSegmentVisitor
-
class RectangleIntersectsSegmentVisitor extends ShortCircuitedGeometryVisitor
A visitor to test for intersection between the query rectangle and the line segments of the geometry.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
hasIntersection
private Coordinate
p0
private Coordinate
p1
private Envelope
rectEnv
private RectangleLineIntersector
rectIntersector
-
Constructor Summary
Constructors Constructor Description RectangleIntersectsSegmentVisitor(Polygon rectangle)
Creates a visitor for checking rectangle intersection with segments
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkIntersectionWithLineStrings(java.util.List lines)
private void
checkIntersectionWithSegments(LineString testLine)
boolean
intersects()
Reports whether any segment intersection exists.protected boolean
isDone()
protected void
visit(Geometry geom)
-
Methods inherited from class org.locationtech.jts.geom.util.ShortCircuitedGeometryVisitor
applyTo
-
-
-
-
Field Detail
-
rectEnv
private Envelope rectEnv
-
rectIntersector
private RectangleLineIntersector rectIntersector
-
hasIntersection
private boolean hasIntersection
-
p0
private Coordinate p0
-
p1
private Coordinate p1
-
-
Constructor Detail
-
RectangleIntersectsSegmentVisitor
public RectangleIntersectsSegmentVisitor(Polygon rectangle)
Creates a visitor for checking rectangle intersection with segments- Parameters:
rectangle
- the query rectangle
-
-
Method Detail
-
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
protected void visit(Geometry geom)
- Specified by:
visit
in classShortCircuitedGeometryVisitor
-
checkIntersectionWithLineStrings
private void checkIntersectionWithLineStrings(java.util.List lines)
-
checkIntersectionWithSegments
private void checkIntersectionWithSegments(LineString testLine)
-
isDone
protected boolean isDone()
- Specified by:
isDone
in classShortCircuitedGeometryVisitor
-
-