edit method

Geometry? edit(
  1. Geometry? geometry,
  2. GeometryEditorOperation operation
)

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)

Implementation

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;
}