Class GeometryEditor

java.lang.Object
com.vividsolutions.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 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    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 existing2
    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.
    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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public boolean containsReference(Collection collection, Object o)