NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

How can I lookup a human readable label in different languages for a OSM tag?

I.e. for amenity=charging_station it should give "electric vehicle charging station".

asked 17 Dec '19, 20:43

AddisMap_Alexander's gravatar image

AddisMap_Ale...
1.1k314062
accept rate: 0%


"Taginfo" compiles data from the OSM wiki into an SQLite database which can be downloaded here: https://taginfo.openstreetmap.org/download

permanent link

answered 17 Dec '19, 22:33

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

You could use a Wikidata query

SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P1282 'Tag:amenity=charging_station'.

    SERVICE wikibase:label { 
        bd:serviceParam wikibase:language "en"
    }
}
permanent link

answered 17 Dec '19, 20:44

AddisMap_Alexander's gravatar image

AddisMap_Ale...
1.1k314062
accept rate: 0%

edited 17 Dec '19, 20:45

Nominatim has a list of special phrases for various POIs in multiple languages, for example English. You can download the page content in plain text using the Mediawiki API:

https://wiki.openstreetmap.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Nominatim/Special_Phrases/EN
permanent link

answered 18 Dec '19, 08:13

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 18 Dec '19, 08:17

https://github.com/openstreetmap/Nominatim/blob/master/utils/specialphrases.php also downloads and parses the tables if you're fluent in PHP.

(18 Dec '19, 12:43) mtmail

This is actually not as simple as the other answers imply.

The problem is that there can be a, in principle unbounded, number of tags that define a specific real world object. It isn't even guaranteed that there is some hierarchical structure in the tag use. So expecting to get a meaningful plain text name from a single "top level" tag isn't going to work particularly well.

permanent link

answered 18 Dec '19, 19:22

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×930

question asked: 17 Dec '19, 20:43

question was seen: 1,227 times

last updated: 18 Dec '19, 19:22

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum