openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.36k stars 1.21k forks source link

Operation suggestion: cut off / cut out for splitting areas #8374

Open joepie91 opened 3 years ago

joepie91 commented 3 years ago

Something I've run into a couple of times now, is the desire to split an area into multiple parts; because a part of a park was repurposed, because two halves of a parking terrain had different access rules, and so on. I don't seem to be the only one either (eg. #6988).

I feel like this class of usecases could be addressed generically through the addition of two new operations to the operations menu that are very similar to each other, which I'd therefore like to propose:

In both cases, the new area would initially have the tags of the 'existing area' copied into it as-is; this means that when splitting an area to apply a subtle change (eg. differing parking access, connected houses with just a different street number), all the remaining metadata is retained and does not need to be re-entered.

This approach would not require redrawing any areas, thereby avoiding potential loss of precision in doing so. It would also use the existing drawing primitives for specifying the splitting boundaries instead of introducing new UI, reducing implementation complexity and keeping the UI simple.

The process illustrated, where red lines signify the line segments / polygons used to determine the split position, and the numbers indicate the resulting area features:

Selection_627

Thoughts?

UgnilJoZ commented 3 years ago

I share your desire to cut areas in a more-controllable way.

I would prefer a context menu option (analog to line-cutting) which prompts you to draw a line within the area (same UI as drawing a way). Whenever your line divides the area into two parts, the area is divided and the line disappears.

This would cover both use cases: cuttting off and cutting out.

k-yle commented 2 years ago

"Cut out" is already supported, if the inner area is completely within the outer area:

  1. Draw the outer and the inner area
  2. hold down Shift and select both areas
  3. then press C