|
JTS Topology Suite version 1.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vividsolutions.jts.geom.util.GeometryEditor
public class GeometryEditor
A class which supports
creating new Geometrys
which are modifications of existing ones.
Geometry objects are intended to be treated as immutable.
This class "modifies" Geometrys
by traversing them, applying a user-defined
GeometryEditor.GeometryEditorOperation or GeometryEditor.CoordinateOperation
and creating new Geometrys with the same structure but
(possibly) modified components.
Examples of the kinds of modifications which can be made are:
GeometryTransformer.
This class supports the case where an edited Geometry needs to
be created under a new GeometryFactory, via the GeometryEditor(GeometryFactory)
constructor.
Examples of situations where this is required is if the geometry is
transformed to a new SRID and/or a new PrecisionModel.
The resulting Geometry is not checked for validity.
If validity needs to be enforced, the new Geometry's
Geometry.isValid() method should be called.
GeometryTransformer,
Geometry.isValid()| Nested Class Summary | |
|---|---|
static class |
GeometryEditor.CoordinateOperation
A GeometryEditor.GeometryEditorOperation which modifies the coordinate list of a Geometry. |
static interface |
GeometryEditor.GeometryEditorOperation
A interface which specifies an edit operation for Geometries. |
static class |
GeometryEditor.NoOpGeometryOperation
A GeometryEditorOperation which does not modify the input geometry. |
| Constructor Summary | |
|---|---|
GeometryEditor()
Creates a new GeometryEditor object which will create edited Geometrys with the same GeometryFactory as the input Geometry. |
|
GeometryEditor(GeometryFactory factory)
Creates a new GeometryEditor object which will create edited Geometrys 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()
Geometrys with the same GeometryFactory as the input Geometry.
public GeometryEditor(GeometryFactory factory)
Geometrys with the given GeometryFactory.
factory - the GeometryFactory to create edited Geometrys with| Method Detail |
|---|
public Geometry edit(Geometry geometry,
GeometryEditor.GeometryEditorOperation operation)
Geometry with the given edit operation.
Clients can 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
|
JTS Topology Suite version 1.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||