User:John Cummings/Archive/Map data
![]() |
Map data is geographical information stored as points, lines or polygons on a map which describes a physical area. It can store information for current and historical political boundaries, geological boundaries, species distribution maps etc and Earth, other planets and even fictional places. Map data can be used to display information in Wikidata queries and Kartographer maps. Map data is stored in Wikimedia Commons and can be linked to Wikidata items using geoshape (P3896), further information is available at MediaWiki Map Data. There are 4 steps to using map data:
Note: Maps on this page are displayed using Kartographer, see below for details |
![]() |
Find map data[edit]Note: Wikimedia Commons accepts the following licenses for map data; CC-BY (v1,2,3 or 4), CC-BY-SA (v1,2,3 or 4), ODbL, CC0, Public Domain license or not meet the minimum threshold of orginality for copyright. See here for more information. Map data files on Wikimedia Commons use the .GeoJSON file format, however polygon data is available in other formats including .KML, .TopoJSON, and .CSV. These formats require conversion to GeoJSON before being added to Wikimedia Commons, GeoJSON.io can be used to create, convert, and edit map data. You can find map data files at many sources including: Note: Wikimedia Commons has a filesize limit of 2MB for GeoJSON files |
![]() |
Import the map data into Wikimedia Commons[edit]Note: Wikimedia Commons does not have a visual editor for map data, you can check or edit the data on a map (adjust the boundaries, change the colour, move the shape) using Geojson.io. Click 'Help' to learn how to use the tool.
Note: Examples of map data files include Japan, Wakefield, Highway 1 in Israel and Leeds School of Medicine. |
![]() |
Link the map data to the Wikidata item[edit]Carew Castle (Q752721) is an example of an item with a map data file, a full list of the items with the proerty geoshape (P3896) are available here. To Add a map data file to a Wikidata item:
Note: To learn how to add statements please see Wikidata:Tours |
![]() |
Use map data in Wikidata queries and Kartographer maps[edit]See also: Wikidata:Wikidata in Wikimedia projects Wikidata Queries[edit]Note: Instructions to learn how to create Wikidata queries are available here Map data can be displayed in Wikidata queries by first defining the subject with a map data file, for example a country, and then including a statement with the geoshape property as the predicate (needs some help here). To query map data for countries the syntax is: ?item wdt:P31 wd:Q6256 . ?item wdt:P3896 ?geo . The first line defines the item as a country and the second clause states that the country has a map data file. Need to work out what to do with this bit Kartographer[edit]To learn how to use Kartographer (the extension used to display the maps at the top of the page) see Help:Extension:Kartographer. ??Write on this page how to convert a Wikidata query into a Kartographer map?? |
![]() |
Further reading[edit] |