Class GeometryEditor
java.lang.Object
com.vividsolutions.jump.workbench.ui.GeometryEditor
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsReference(Collection collection, Object o) org.locationtech.jts.geom.GeometrydeleteVertices(org.locationtech.jts.geom.Geometry geometry, Collection vertices) Deletes the given vertices (matched using ==, not #equals).org.locationtech.jts.geom.Geometryedit(org.locationtech.jts.geom.Geometry geometry, GeometryEditor.GeometryEditorOperation operation) org.locationtech.jts.geom.GeometryinsertVertex(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.GeometryinsertVertex(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.Geometryremove(org.locationtech.jts.geom.Geometry g, org.locationtech.jts.geom.Geometry itemToRemove) org.locationtech.jts.geom.GeometryremoveRepeatedPoints(org.locationtech.jts.geom.Geometry geometry) The input and output Geometries may share some Coordinate arrays.
-
Constructor Details
-
GeometryEditor
public GeometryEditor()
-
-
Method Details
-
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
-