Class 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:
    RingClipper
    • 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 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