Beispiel #1
0
  /**
   * Edit the input {@link Geometry} with the given edit operation. Clients can create subclasses of
   * {@link GeometryEditorOperation} or {@link CoordinateOperation} to perform required
   * modifications.
   *
   * @param geometry the Geometry to edit
   * @param operation the edit operation to carry out
   * @return a new {@link Geometry} which is the result of the editing (which may be empty)
   */
  public Geometry edit(Geometry geometry, GeometryEditorOperation operation) {
    // nothing to do
    if (geometry == null) return null;

    Geometry result = editInternal(geometry, operation);
    if (isUserDataCopied) {
      result.setUserData(geometry.getUserData());
    }
    return result;
  }