OpenStreetMap logo OpenStreetMap

Wikidata in OpenStreetMap

Posted by LogicalViolinist on 11 November 2016 in English.

Seeing as ID and Mapbox are pushing to incorporate wikidata into OSM, I thought it would be a perfect little project when mappers have nothing better to do or in their downtime.

The wikidata link can help developers get vital information like the current population, current mayor, flags, coat of arms,etc. The list goes on. This is a lot of data that can’t necessarily be encoded into OSM. This would help simplify the use of OSM data for small developers. Take for example mapbox’s example: Mapbox Data rich map

The items in the red square have all been obtained via the wikidata api using the wikidata ID. The flag in the green box, the population in the yellow, the website in the orange box.

There is a plethora of other data available via the wikidata api for example list of movies that happened in that location: Mapbox data rich map 2

The places can be extracted via the qa-tiles with country extracts available

Using tile-reduce and osm-tag-stats. The towns can be extracted via a simple filter:

    ["in", "place", "town", "village", "locality"],
    ["==", "@type", "node"]

And run with the following command:

osm-tag-stats --geojson=towns-output.geojson --mbtiles='canada.mbtiles' --filter='towns.json'

I’ve started a project on the OSMCanada Tasking Manager here:

Join in for a more data rich Canada :)

Location: Aylmer, Gatineau, Outaouais, Quebec, Canada


Log in to leave a comment