Skip to content

remove cuisine when retagging restaurant to something else - #1622

Closed
matkoniecz wants to merge 3 commits into
openstreetmap:mainfrom
matkoniecz:patch-16
Closed

matkoniecz wants to merge 3 commits into
openstreetmap:mainfrom
matkoniecz:patch-16

Conversation

@matkoniecz

Copy link
Copy Markdown
Collaborator

fixes openstreetmap/iD#11037

Description, Motivation & Context

retagging restaurant to shop should not leave cuisine tag behind

Note: now retagging restaurant to fast food will also delete it (but it seems fine)

Related issues

fixes openstreetmap/iD#11037

Links and data

Relevant OSM Wiki links:

  • …

Relevant tag usage stats:

…

Checklist and Test-Documentation Template

Read on to get your PR merged faster…

Follow these steps to test your PR yourself and make it a lot easier and faster for maintainers to check and approve it.

This is how it works:

  1. After you submit your PR, the system will create a preview and comment on your PR:

    🍱 Your pull request preview is ready.
    If this is your first contribution to this project, the preview will not happen right away but requires a click from one of the project members. We will do this ASAP.

  2. Once the preview is ready, use it to test your changes.

  3. Now copy the snippet below into a new comment and fill out the blanks.

  4. Now your PR is ready to be reviewed.

## Test-Documentation

### Preview links & Sidebar Screenshots

<!-- Use the preview to find examples, select the feature in question and **copy this link here**.
     Find examples of nodes/areas. Find examples with a lot of tags or very few tags. – Whatever helps to test this thoroughly.
     Add relevant **screenshots** of the sidebar of those examples. -->

<!-- FYI: What we will check:
     - Is the [icon](https://github.com/ideditor/schema-builder/blob/main/ICONS.md) well chosen.
     - Are the fields well-structured and have good labels.
     - Do the dropdowns (etc.) work well and show helpful data. -->

### Search

<!-- **Test the search** of your preset and share relevant **screenshots** here.
     - Test the preset name as search terms.
     - Also test the preset terms and aliases as search terms (if present). -->

### Info-`i`

<!-- **Test the info-i** for your fields and preset and share relevant **screenshots** here.
     The info needs to help mappers understand the preset and when to use it.
     [Learn more…](https://github.com/openstreetmap/id-tagging-schema/blob/main/CONTRIBUTING.md#info-i)
 -->

### Wording

- [ ] American English
- [ ] `name`, `aliases` (if present) use Title Case
- [ ] `terms` (if present) use lower case, sorted A-Z
<!-- Learn more in https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#2-design-the-preset -->

@github-actions

Copy link
Copy Markdown

🍱 Your pull request preview is ready

Please use this preview to check your changes. Ideally use the test documentation template and document your test results by commenting on the PR. This will speed up the review process for everyone.

FYI, once this PR is merged, you can use the iD Editor Preview to test your changes in interaction with all other changes.

@matkoniecz
matkoniecz marked this pull request as ready for review June 30, 2025 15:42
@matkoniecz

matkoniecz commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator Author

it works, tested on retagging into bank

will do full "Checklist and Test-Documentation Template" at some point (depending of availability of free time I will use on OSM volunteering in this way)

@matkoniecz
matkoniecz marked this pull request as draft July 1, 2025 05:46
@k-yle

k-yle commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

thinking about a long term solution: maybe when you change presets from A to B, iD should remove all tags from preset A that are not in preset B.

For example:

  • Changing House to Townhouse would preserve all building:* tags
  • Changing Restaurant to Café would preserve cuisine, etc.
  • Changing House to Park would remove building:*

In every case, generic tags like name would be preserved, and unknown tags like source:name, ref:*, ...

@matkoniecz

Copy link
Copy Markdown
Collaborator Author

Seems like a good idea and I am a bit surprised it is not happening already

@matkoniecz

Copy link
Copy Markdown
Collaborator Author

thinking about a long term solution: maybe when you change presets from A to B, iD should remove all tags from preset A that are not in preset B.

that would require change in iD, I guess? And would require no change in iD presets.

maybe it would be even relatively simple to implement - and maybe it can be even easily found looking where iD code uses removeTags

@peternewman

Copy link
Copy Markdown
Contributor
  • Changing Restaurant to Café would preserve cuisine, etc.

Isn't this a bit more subtle, are you reclassifying, it's really fast food not a restaurant, or saying it's now an entirely different restaurant/cafe etc (e.g. seafood to chinese). StreetComplete asks if it's still the same place to drive these updates.

In every case, generic tags like name would be preserved, and unknown tags like source:name, ref:*, ...

Certainly preserving name if it's changed ownership could be problematic...

@bryceco

bryceco commented Aug 1, 2025

Copy link
Copy Markdown
Contributor

thinking about a long term solution: maybe when you change presets from A to B, iD should remove all tags from preset A that are not in preset B.

I implemented this in my app yesterday and have been playing around with it (it's not yet live). If you convert a fast-food/cafe to a restaurant it drops keys about drive-through, which occasionally is inappropriate. I haven't seen other issues that are concerning.

I applied it to both fields and moreFields, but if you wanted to be more conservative you could look at fields from A and fields+moreFields from B.

@peternewman

Copy link
Copy Markdown
Contributor

See also @mnalis https://github.com/mnalis/StreetComplete-taginfo-categorize for a more hand-curated approach to the problem...

@matkoniecz

Copy link
Copy Markdown
Collaborator Author

reopening as openstreetmap/iD#11696 got reverted

see openstreetmap/iD#12072 and openstreetmap/iD#12071

@matkoniecz matkoniecz closed this May 11, 2026
@matkoniecz
matkoniecz deleted the patch-16 branch September 8, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retagging amenity=restaurant with cuisine=obscure_value leaves cuisine

5 participants