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 booleanhasIntersectionprivate Coordinatep0private Coordinatep1private EnveloperectEnvprivate RectangleLineIntersectorrectIntersector
-
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 voidcheckIntersectionWithLineStrings(java.util.List lines)private voidcheckIntersectionWithSegments(LineString testLine)booleanintersects()Reports whether any segment intersection exists.protected booleanisDone()protected voidvisit(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:
visitin classShortCircuitedGeometryVisitor
-
checkIntersectionWithLineStrings
private void checkIntersectionWithLineStrings(java.util.List lines)
-
checkIntersectionWithSegments
private void checkIntersectionWithSegments(LineString testLine)
-
isDone
protected boolean isDone()
- Specified by:
isDonein classShortCircuitedGeometryVisitor
-
-