POI interpretation service based on OSM Tags / OSM ID

Is there some kind of POI interpretation service or library based solely on a given OSM ID respectively it’s tags?

For example given this (chinese) restaurant

iD seems to interpret it as a “chinese restaurant” based on amenity and cuisine. Further, it has a matching icon. It is localized into German for me.

Further, wouldn’t it be nice if some service or library gave me some kind of html or data structure with all the interpreted data?
Further, something that may grabs additional information from relations, or even wikidata. Something that tries to interpret nearly every node reasonably and gives valueable insights. Something that localizes.

Why? For me, as a developer, it’s quite painful to need to understand every single possible tag and all the common and uncommon combinations. I need to spend a lot of time to understand every single tag. I need to through the wiki but also through the actual usage. It’s just pretty rough.

1 Like

Editors that support prests typically employ some kind of matching algorithm that will give you a list of presets that match the element in question.

Points to note:

  • you will often get more than one preset as a result (think shop tagged on a building outline)
  • which tags get assigned to which object depends both on the presets and the matching algorithm (and potentially has an element of randomness),
  • objects with ‘top level’ tags that don’t have presets will potentially not get matched at all,
  • oh yes and then there’s iD using data from taginfo that muddies the waters even further.

Simon

PS: I did a talk on the subject at SOTM Milano a couple of years back.

5 Likes

Sounds like you want tagging preset? Though these listed below are set of config files, not library on its own

https://josm.openstreetmap.de/ has its own preset somewhere

GitHub - osmlab/name-suggestion-index: Canonical common brand names, operators, transit and flags for OpenStreetMap. may or may not be useful


GitHub - westnordost/osmfeatures: A dictionary of OSM map features, accessible by terms and by tags, for Java, iOS and Android. may or may not be of interest and use (this one is actually a library)

1 Like

As well as editors, data consumers may do something like this too. For example here is a table that explains how OSM fast food / restaurant cuisine tags are mapped through to hardcoded Garmin search presets for a particular Garmin map style. This isn’t generic - this style shows “chinese” and “thai” restaurants under the same search preset, but another style might want them separated.

1 Like