Class LineLimiter
- java.lang.Object
-
- org.locationtech.jts.operation.overlayng.LineLimiter
-
public class LineLimiter extends java.lang.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:
RingClipper
-
-
Constructor Summary
Constructors Constructor Description LineLimiter(Envelope env)
Creates a new limiter for a given envelope.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Coordinate[]>
limit(Coordinate[] pts)
Limits a list of segments.
-
-
-
Constructor Detail
-
LineLimiter
public LineLimiter(Envelope env)
Creates a new limiter for a given envelope.- Parameters:
env
- the envelope to limit to
-
-
Method Detail
-
limit
public java.util.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
-
-