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

deprecated shop values where fixing them requires resurvey as value is unclear - maybe treat them like shop=yes? #5594

Open
matkoniecz opened this issue Apr 24, 2024 · 6 comments

Comments

@matkoniecz
Copy link
Member

matkoniecz commented Apr 24, 2024

Use case
For example shop=boutique is highly confusing for many mappers as this is false friend in French with distinct meaning to English one.

Many, but not all would be well expressed by shop=clothes Some of them are completely different shops, again, especially in French speaking regions.

As result you cannot guess or fix tagging without resurvey or otherwise checking them.

Proposed Solution

in shop=yes quest start asking also in the same way about shop=boutique shops

See https://community.openstreetmap.org/t/shop-boutique-deprecation-proposal/104412 and https://wiki.openstreetmap.org/wiki/Tag:shop%3Dboutique

See https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt for quest to be modified

@westnordost
Copy link
Member

This feature request is too specific. It should rather be "Shall we treat deprecated shop types in the SpecifyShopType quest as if the shop type hasn't been specified yet?" , wouldn't you agree?

@matkoniecz
Copy link
Member Author

I would rather phrase it as "deprecated shop values where fixing them requires resurvey as value is unclear"

Say shop=mięsny is deprecated but can be easily retagged to shop=butcher and asking people to resurvey it would be waste of time.

@matkoniecz matkoniecz changed the title maybe treat shop=boutique as having no specified shop type? (like shop=yes) deprecated shop values where fixing them requires resurvey as value is unclear - maybe treat them like shop=yes? Apr 24, 2024
@westnordost
Copy link
Member

Fair enough. So, I would say, that makes sense.

Are there any other shop= keys that are deprecated and could not be fixed by an automated edit because it could be either X or Y?

@westnordost
Copy link
Member

westnordost commented Apr 24, 2024

I guess another prerequisite for any such deprecated shop key is that all viable alternative taggings exist in iD editor presets.

@matkoniecz
Copy link
Member Author

shop=hobby is the only other worth bothering that I know, but I would need to recheck whether known alternatives got iD presets already (created some PRs/issues some time ago)

@westnordost westnordost added the feedback required more info is needed, issue will be likely closed if it is not provided label Apr 25, 2024
@matkoniecz
Copy link
Member Author

matkoniecz commented Apr 30, 2024

hobby seems well covered, based on https://wiki.openstreetmap.org/wiki/Tag:shop%3Dhobby and taginfo listing of iD presets

verification code
import taginfo
import mwparserfromhell
import urllib

text = """** {{Tag|shop|bicycle}} – cycling
** {{Tag|shop|boat}} – sailing
** {{Tag|shop|fishing}} – fishing
** {{Tag|shop|hunting}} – hunting
** {{Tag|shop|outdoor}} – trekking, climbing, camping
** {{Tag|shop|photo}} – photography
** {{Tag|shop|sports}} – sport
* Indoor activity:
** {{Tag|shop|anime}} – manga, anime, cosplay
** {{Tag|shop|books}} – books
** {{Tag|shop|brewing_supplies}} – homebrewing
** {{Tag|shop|collector}} – stamps, coins, action figures
** {{Tag|shop|craft}} – painting
** {{Tag|shop|doityourself}} – do-it-yourself
** {{Tag|shop|fan}} – for fans of something, e.g. fan=harry_potter
** {{Tag|shop|games}} – board games, card games, RPG
** {{Tag|shop|model}} – scale models
** {{Tag|shop|music}} – recorded music
** {{Tag|shop|musical_instrument}} – musical instruments
** {{Tag|shop|radiotechnics}} – electronic components
** {{Tag|shop|stationery}} – cards, note books, pens, pencils
** {{Tag|shop|toys}} – toys
** {{Tag|shop|video_games}} – video games"""

# https://github.com/earwig/mwparserfromhell?tab=readme-ov-file#usage
wikicode = mwparserfromhell.parse(text)
templates = wikicode.filter_templates()
for template in templates:
   if template.name.lower() == "tag":
    key = str(template.get(1).value)
    value = str(template.get(2).value)
    print(key, value)
    entries_per_page = 500
    page = 1
    projects = []
    for entry in taginfo.query.projects_using_tag(key, value):
        projects.append(entry['project_id'])
    if "id_editor" not in projects:
        print(projects)
        raise


@matkoniecz matkoniecz removed the feedback required more info is needed, issue will be likely closed if it is not provided label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants