Class GeometryEditor
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.GeometryEditor
-
public class GeometryEditor extends Object
Geometry objects are unmodifiable; this class allows you to "modify" a Geometry in a sense -- the modified Geometry is returned as a new Geometry. The new Geometry's #isValid should be checked.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
GeometryEditor.GeometryEditorOperation
-
Constructor Summary
Constructors Constructor Description GeometryEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsReference(Collection collection, Object o)
org.locationtech.jts.geom.Geometry
deleteVertices(org.locationtech.jts.geom.Geometry geometry, Collection vertices)
Deletes the given vertices (matched using ==, not #equals).org.locationtech.jts.geom.Geometry
edit(org.locationtech.jts.geom.Geometry geometry, GeometryEditor.GeometryEditorOperation operation)
org.locationtech.jts.geom.Geometry
insertVertex(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Coordinate existing1, org.locationtech.jts.geom.Coordinate existing2, org.locationtech.jts.geom.Coordinate v)
Inserts v on the line segment with endpoints equal to existing1 and existing2org.locationtech.jts.geom.Geometry
insertVertex(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Coordinate target, org.locationtech.jts.geom.Geometry ignoreSegmentsOutside)
The vertex will be inserted at the point closest to the target.org.locationtech.jts.geom.Geometry
remove(org.locationtech.jts.geom.Geometry g, org.locationtech.jts.geom.Geometry itemToRemove)
org.locationtech.jts.geom.Geometry
removeRepeatedPoints(org.locationtech.jts.geom.Geometry geometry)
The input and output Geometries may share some Coordinate arrays.
-
-
-
Method Detail
-
edit
public org.locationtech.jts.geom.Geometry edit(org.locationtech.jts.geom.Geometry geometry, GeometryEditor.GeometryEditorOperation operation)
-
removeRepeatedPoints
public org.locationtech.jts.geom.Geometry removeRepeatedPoints(org.locationtech.jts.geom.Geometry geometry)
The input and output Geometries may share some Coordinate arrays.
-
remove
public org.locationtech.jts.geom.Geometry remove(org.locationtech.jts.geom.Geometry g, org.locationtech.jts.geom.Geometry itemToRemove)
- Returns:
- null if parent == itemToRemove
-
insertVertex
public org.locationtech.jts.geom.Geometry insertVertex(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Coordinate target, org.locationtech.jts.geom.Geometry ignoreSegmentsOutside)
The vertex will be inserted at the point closest to the target.
-
insertVertex
public org.locationtech.jts.geom.Geometry insertVertex(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Coordinate existing1, org.locationtech.jts.geom.Coordinate existing2, org.locationtech.jts.geom.Coordinate v)
Inserts v on the line segment with endpoints equal to existing1 and existing2
-
deleteVertices
public org.locationtech.jts.geom.Geometry deleteVertices(org.locationtech.jts.geom.Geometry geometry, Collection vertices)
Deletes the given vertices (matched using ==, not #equals).
-
containsReference
public boolean containsReference(Collection collection, Object o)
-
-