|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.geom.util.GeometryEditor
Supports creating a new Geometry
which is a modification of an existing one.
Geometry objects are intended to be treated as immutable.
This class allows you to "modify" a Geometry
by traversing it and creating a new Geometry with the same overall structure but
possibly modified components.
The following kinds of modifications can be made:
The resulting Geometry is not checked for validity. If validity needs to be enforced, the new Geometry's #isValid should be checked.
Geometry.isValid()
Nested Class Summary | |
static class |
GeometryEditor.CoordinateOperation
A GeometryEditorOperation which modifies the coordinate list of a Geometry . |
static interface |
GeometryEditor.GeometryEditorOperation
A interface which specifies an edit operation for Geometries. |
Constructor Summary | |
GeometryEditor()
Creates a new GeometryEditor object which will create an edited Geometry with the same GeometryFactory as the input Geometry. |
|
GeometryEditor(GeometryFactory factory)
Creates a new GeometryEditor object which will create the edited Geometry with the given GeometryFactory |
Method Summary | |
Geometry |
edit(Geometry geometry,
GeometryEditor.GeometryEditorOperation operation)
Edit the input Geometry with the given edit operation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GeometryEditor()
Geometry
with the same GeometryFactory
as the input Geometry.
public GeometryEditor(GeometryFactory factory)
GeometryFactory
factory
- the GeometryFactory to create the edited Geometry withMethod Detail |
public Geometry edit(Geometry geometry, GeometryEditor.GeometryEditorOperation operation)
Geometry
with the given edit operation.
Clients will create subclasses of GeometryEditor.GeometryEditorOperation
or
GeometryEditor.CoordinateOperation
to perform required modifications.
geometry
- the Geometry to editoperation
- the edit operation to carry out
Geometry
which is the result of the editing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |