Class RectangleClipPolygon
java.lang.Object
org.locationtech.jtslab.clip.RectangleClipPolygon
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
ConstructorsConstructorDescriptionRectangleClipPolygon(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 TypeMethodDescriptionorg.locationtech.jts.geom.Geometryclip(org.locationtech.jts.geom.Geometry geom) static org.locationtech.jts.geom.Geometryclip(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.geom.Geometry rectangle) static org.locationtech.jts.geom.Geometryclip(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.geom.Geometry rectangle, org.locationtech.jts.geom.PrecisionModel pm) org.locationtech.jts.geom.GeometryclipCollection(org.locationtech.jts.geom.Geometry geom)
-
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)
-