Class RectangleIntersectsSegmentVisitor


  • class RectangleIntersectsSegmentVisitor
    extends ShortCircuitedGeometryVisitor
    A visitor to test for intersection between the query rectangle and the line segments of the geometry.
    • 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
      • checkIntersectionWithLineStrings

        private void checkIntersectionWithLineStrings​(java.util.List lines)
      • checkIntersectionWithSegments

        private void checkIntersectionWithSegments​(LineString testLine)