Skip to content

Obtaing maps from codes

Peter edited this page Jul 7, 2018 · 2 revisions

Using SP (wdId=Q174 at br-state-codes) as example. There are 3 ways to obtain a map from state code or wdId:

Link to the OSM map

When starting from WdId , you can directly use Wikidata JSON, Wikidata dump JSON, the OSM relation ID is the claim P402, and its value must be used with https://www.openstreetmap.org/relation/{value} that is 298204 in this case.

Locator map image

At the Wikidata dump JSON, the locator image is the claim P242, and its value must be used with the URL https://commons.wikimedia.org/wiki/File:. In this case you obtain the Wiki.commons file-descriptor of SP, so can to obtain the thumb-image:

Dumped GEOJSON

See /data/dump_osm folder and the 2-letter code, in this case SP, so data/dump_osm/SP.geojson.