name-suggestion-index icon indicating copy to clipboard operation
name-suggestion-index copied to clipboard

shop=coffee not handled properly when creating cafes

Open andrewpmk opened this issue 1 year ago • 2 comments

iD doesn't handle POIs tagged as "shop=coffee" properly when you accidentally create POIs for coffee shops (e.g. Starbucks, Tim Hortons, etc.) and then click "upgrade tags" in iD to add the proper tags https://wiki.openstreetmap.org/wiki/Tag:shop%3Dcoffee

The issue is some mappers are accidentally tagging Tim Hortons and Starbucks etc. as shop=coffee. shop=coffee is intended for shops that primarily sell coffee beans, etc. and mappers are incorrectly using shop=coffee to tag cafes.

How to reproduce:

  1. Create a node in iD with shop=coffee and name set to a popular chain (e.g. Starbucks)
  2. Click upgrade tags
  3. The result is amenity=cafe and brand:wikidata and some other tags are added, but shop=coffee is not removed. shop=coffee should be removed in this case.

Example overpass turbo query to find combination of shop=coffee and amenity=cafe, not all of these are necessarily wrong. I get 1091 nodes and 167 ways. Most of these obviously should be only amenity=cafe but the more obscure non chain shops need to be checked manually.

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“shop=coffee and amenity=cafe”
*/
[out:json][timeout:25];
// gather results
nwr["shop"="coffee"]["amenity"="cafe"]({{bbox}});
// print results
out geom;

Do we need to add "matchTags" to all the POIs in amenity=cafe to match shop=coffee or is there a better way?

andrewpmk avatar Dec 29 '23 00:12 andrewpmk

Hrm, looks like amenity/cafe and shop/coffee are both in the food matchGroup already: https://github.com/osmlab/name-suggestion-index/blob/main/config/matchGroups.json#L109. This should have the same effect as matchTags...

AntiCompositeNumber avatar Dec 29 '23 00:12 AntiCompositeNumber

I can check this - from what I remember, the NSI checks might only add tags, not remove tags. (I think behind the scenes it uses actionChangeTags not actionChangePreset)

bhousel avatar Dec 29 '23 03:12 bhousel