Interface EditTransaction.SelectionEditor

Enclosing class:
EditTransaction

public static interface EditTransaction.SelectionEditor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.locationtech.jts.geom.Geometry
    edit(org.locationtech.jts.geom.Geometry geometryWithSelectedItems, Collection<org.locationtech.jts.geom.Geometry> selectedItems)
    selectedItems may have the whole geometry, parts (collection elements), or linestrings, or a mix of all three.
  • Method Details

    • edit

      org.locationtech.jts.geom.Geometry edit(org.locationtech.jts.geom.Geometry geometryWithSelectedItems, Collection<org.locationtech.jts.geom.Geometry> selectedItems)
      selectedItems may have the whole geometry, parts (collection elements), or linestrings, or a mix of all three. But there will be no duplicate data (that is, you can't select both the whole and one of its parts -- only the whole geometry will be selected; similarly, you can't select a part and one of its linestrings -- only the part will be selected).
      Parameters:
      geometryWithSelectedItems - a clone of the geometry containing the selected items. Because geometryWithSelectedItems is a clone, feel free to modify it, as no other parties reference it. Then return it (or return something totally different).
      selectedItems - clones of the selected items (each of which have class Geometry). selectedItems' elements are "live"; that is, they are objects taken from geometryWithSelectedItems. So, for example, modifying selectedItem's coordinates will modify geometryWithSelectedItems' coordinates.
      Returns:
      a new Geometry for the Feature (typically geometryWithSelectedItems, but can be a completely different Geometry), or an empty geometry to (undoably) remove the Feature from the Layer