Class RectangleClipPolygon


  • public class RectangleClipPolygon
    extends java.lang.Object
    Clips polygonal geometry to a rectangle. This implementation is faster, more robust, and less sensitive to invalid input than Geometry.intersection(Geometry). It can also enforce a supplied precision model on the computed result. The inputs do not have to meet the precision model. This allows clipping using integer coordinates in the output, for example.
    Author:
    mdavis
    • Constructor Summary

      Constructors 
      Constructor Description
      RectangleClipPolygon​(org.locationtech.jts.geom.Envelope clipEnv)  
      RectangleClipPolygon​(org.locationtech.jts.geom.Envelope clipEnv, org.locationtech.jts.geom.PrecisionModel pm)  
      RectangleClipPolygon​(org.locationtech.jts.geom.Geometry clipRectangle)  
      RectangleClipPolygon​(org.locationtech.jts.geom.Geometry clipRectangle, org.locationtech.jts.geom.PrecisionModel pm)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.locationtech.jts.geom.Geometry clip​(org.locationtech.jts.geom.Geometry geom)  
      static org.locationtech.jts.geom.Geometry clip​(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.geom.Geometry rectangle)  
      static org.locationtech.jts.geom.Geometry clip​(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.geom.Geometry rectangle, org.locationtech.jts.geom.PrecisionModel pm)  
      org.locationtech.jts.geom.Geometry clipCollection​(org.locationtech.jts.geom.Geometry geom)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RectangleClipPolygon

        public RectangleClipPolygon​(org.locationtech.jts.geom.Envelope clipEnv)
      • RectangleClipPolygon

        public RectangleClipPolygon​(org.locationtech.jts.geom.Geometry clipRectangle)
      • RectangleClipPolygon

        public RectangleClipPolygon​(org.locationtech.jts.geom.Geometry clipRectangle,
                                    org.locationtech.jts.geom.PrecisionModel pm)
      • RectangleClipPolygon

        public RectangleClipPolygon​(org.locationtech.jts.geom.Envelope clipEnv,
                                    org.locationtech.jts.geom.PrecisionModel pm)
    • Method Detail

      • clip

        public static org.locationtech.jts.geom.Geometry clip​(org.locationtech.jts.geom.Geometry geom,
                                                              org.locationtech.jts.geom.Geometry rectangle)
      • clip

        public static org.locationtech.jts.geom.Geometry clip​(org.locationtech.jts.geom.Geometry geom,
                                                              org.locationtech.jts.geom.Geometry rectangle,
                                                              org.locationtech.jts.geom.PrecisionModel pm)
      • clip

        public org.locationtech.jts.geom.Geometry clip​(org.locationtech.jts.geom.Geometry geom)
      • clipCollection

        public org.locationtech.jts.geom.Geometry clipCollection​(org.locationtech.jts.geom.Geometry geom)