openstreetmap / iD

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

Extract tool moves barrier tags to the node #9332

Open tohaklim opened 2 years ago

tohaklim commented 2 years ago

URL

No response

How to reproduce the issue?

  1. Locate or create an area with tags that include barrier, eg barrief=fence
  2. Use the Extract tool on the area
  3. Expected behaviour: tags are extracted from the area to a new node, barrier tag remains on the area itself.
  4. Actual behaviour: all tags, including barrier, are moved to the node.

Not sure if this is by design?

Screenshot(s) or anything else?

No response

Which deployed environments do you see the issue in?

Released version at openstreetmap.org/edit

What version numbers does this issue effect?

2.22.0

Which browsers are you seeing this problem on?

Chrome, Microsoft Edge

RudyTheDev commented 2 years ago

Note that this only "works" if the preset allows point geometry, e.g. you can have a natural=wetland point, but not landuse=residential. So here's a consistent repro case:

barrier=fence
natural=wetland
tohaklim commented 2 years ago

Well, isn't that just the limitation of the Extract tool (ie if it's not available for the selected area feature, of course the bug won't be reproducible as it relies on the use of the Extract tool)

Hufkratzer commented 2 years ago

A closed way with

barrier=fence
natural=wetland

is split to the old way with

area=yes

and a new point with

barrier=fence
natural=wetland

Is that how it should work? Compare https://github.com/openstreetmap/id-tagging-schema/blob/main/data/presets/barrier/fence.json