Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iD incorrectly deletes the building= tag when applying preset of various amenity types #1404

Open
deevroman opened this issue Nov 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@deevroman
Copy link
Contributor

deevroman commented Nov 3, 2024

How to reproduce the issue?

  1. Select a building
  2. Apply the Morgue preset, for example
  3. The building=* tag has been removed
bug_id.mp4

This also happens with presets for hospitals, schools, etc. Some will say that these presets imply a territory and therefore remove building=. But I believe that iD should not clean up building=:

  1. building= + amenity= acceptable tagging
  2. iD doesn't remove additional building tags:
bug_id2.mp4

Which deployed environments do you see the issue in?

Released version at openstreetmap.org/edit

What version numbers does this issue effect?

No response

Which browsers are you seeing this problem on?

No response

@Deeptanshu-sankhwar
Copy link

Thanks for sharing this issue @deevroman. I have reproduced this issue, and I also see that this happens not just for building, but I believe for everything else as well. If we select a road, restaurant etc, and changes its preset, some of the initial tags are removed.

Here is an example below
ScreenRecording2024-11-30at8 57 50AM-ezgif com-video-to-gif-converter

@tyrasd
Copy link
Member

tyrasd commented Dec 10, 2024

In principle this is working as designed: The tags of the previous preset are removed from the feature and the tags from the new preset are applied to it. This is to allow changing features between different types, e.g. from natural=wood to landuse=forest. There is however also a mechanism which allows to keep (some) of the previous tags in a preset change: If the new preset has a field for the tag of the previous preset, the tag is kept. This is for example used in the building preset.

That said, this would be solved by adding a field for the building tag to the Morgue preset (and potentially also the Hospital preset1).

Footnotes

  1. See also the OSM wiki: “Note that the buildings should not carry the amenity=hospital tag.”

@tyrasd tyrasd transferred this issue from openstreetmap/iD Dec 10, 2024
@tyrasd tyrasd added the bug Something isn't working label Dec 10, 2024
@DujaOSM
Copy link

DujaOSM commented Dec 22, 2024

1. See also the OSM wiki: _“Note that the buildings should not carry the `amenity=hospital` tag.”

Duly tagged as {{questionable}} en route to deletion. According to taginfo, there are 20,000 out of 200,000 hospitals worldwide doubly-tagged as building=*.

I also think that building=* is an ancillary tag that can be applied to pretty much any amenity or shop, so it should not be deleted by applying a preset. I'm not sure if the schema distinguishes applying presets to point elements (in which case, building=* should probably be removed) from areas (where the existing building=* should be preserved).

@Hufkratzer
Copy link
Contributor

Hufkratzer commented Dec 23, 2024

Maybe it can be solved this way: If someone selects a building and tries to add an amenity (or other feature) tag for which the preset does not have a building field, then instead of deleting the building tag add a new node in the middle of or near the building, apply the new preset there and select this new node instead of the building. Perhaps ask/warn before doing it like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants