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 Details

  • Constructor Details

    • RectangleIntersectsSegmentVisitor

      public RectangleIntersectsSegmentVisitor(Polygon rectangle)
      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

      protected void visit(Geometry geom)
      Specified by:
      visit in class ShortCircuitedGeometryVisitor
    • checkIntersectionWithLineStrings

      private void checkIntersectionWithLineStrings(List lines)
    • checkIntersectionWithSegments

      private void checkIntersectionWithSegments(LineString testLine)
    • isDone

      protected boolean isDone()
      Specified by:
      isDone in class ShortCircuitedGeometryVisitor