Class RectangleClipPolygon

java.lang.Object
org.locationtech.jtslab.clip.RectangleClipPolygon

public class RectangleClipPolygon extends 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

    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 Object

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

    • 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 Details

    • 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)