Class LineLimiter

java.lang.Object
org.locationtech.jts.operation.overlayng.LineLimiter

public class LineLimiter extends Object
Limits the segments in a list of segments to those which intersect an envelope. This creates zero or more sections of the input segment sequences, containing only line segments which intersect the limit envelope. Segments are not clipped, since that can move line segments enough to alter topology, and it happens in the overlay in any case. This can substantially reduce the number of vertices which need to be processed during overlay.

This optimization is only applicable to Line geometries, since it does not maintain the closed topology of rings. Polygonal geometries are optimized using the RingClipper.

Author:
Martin Davis
See Also:
  • Constructor Details

    • LineLimiter

      public LineLimiter(Envelope env)
      Creates a new limiter for a given envelope.
      Parameters:
      env - the envelope to limit to
  • Method Details

    • limit

      public List<Coordinate[]> limit(Coordinate[] pts)
      Limits a list of segments.
      Parameters:
      pts - the segment sequence to limit
      Returns:
      the sections which intersect the limit envelope