Tutorial: Using Wikimapia data in QGIS
Initially posted by Léo Martine in French, this article has been kindly translated by Radyi Nurmametov, GIS Officer at the ICRC.
Introducing Wikimapia
Wikimapia is a participatory mapping online project launched in 2006 by two Russian computer scientists, based on satellite imagery from Google. The operation is relatively simple: it is to trace places compared to satellite images and then assign annotations to explain what it is: a park, a hospital, a school, a mountain, etc. In 2013, more than 20 million locations were identified throughout the world.
Since 2010, data from Wikimapia is available under Creative Commons License Attribution-ShareAlike (CC BY-SA). However, given that the premises are drawn from the Google imagery, data from Wikimapia can be considered as “derivative work” which may ask questions of reuse, especially for commercial use. More information about the license: http://en.wikipedia.org/wiki/WikiMapia#Licensing
Like OpenStreetMap, Wikimapia is supported by the work of volunteer contributors. The generated data can be extremely accurate, particularly for cities, and sometimes more than OpenStreetMap as shown in the following example:

Wikimapia data for the city of Al Qadarif in Sudan (10/07/2014)
(you have to imagine that every white polygon represents an identified place: a neighbourhood, a particular building, etc.)

Comparison : OpenStreetMap data for Al Qadarif in Sudan (10/07/2014)
To view the map Wikimapia data, please visit the site: http://wikimapia.org/
However, despite the huge volume of information that sometimes has nothing to envy to OpenStreetMap or other databases, Wikimapia suffers from some flaws that severely limit its potential:
- The data is often in the local language which requires a systematic translation.
- The attribute data system is much less extensive and effective than tags in OpenStreetMap.
- Export of data is much more complex than for OpenStreetMap, which is well equipped (Geofabrik, HOT Exports …).
The purpose of this tutorial is to show you one way (among others) to export the data of Wikimapia, and create a layer for each type of object (e.g. a hospital layer, a layer of schools, etc.) to use in your QGIS project.
Downloading data through Wikimapia API
The API (Application Programming Interface) of Wikimapia is an interface that allows downloading the data contained in the Wikimapia database. This interface is accessible via the following link: http://wikimapia.org/api
Using the API is relatively complicated, we have simplified it for this tutorial into an Excel spreadsheet that can be downloaded here: Wikimapia_API_Builder
The Builder API is configured to download all items within a category contained in a specific area. You only have to change the values of orange cells:
- Key: in the orange cell in front of Key, enter your API key. If you do not have one, leave example (export will still work but you will not be able to download excessive amounts of data). To generate a key, go here: http://wikimapia.org/api?action=create_key
- Category ID: in this cell, you must enter the ID of the category you want to download (e.g. 287 for hospitals). To know the ID of the different categories, click See category full list.
- Bbox: within 4 Bbox cells (Boundary Box), enter the limits of the area you want to export. To find the limits, you can use the OSM export tool: www.openstreetmap.org/export
Be careful not to choose too large of an area, it is only possible to download 100 objects at a time. If you want to cover a large area, divide it into multiple queries.
Once you have filled the settings, copy the link in blue (right click on cell A20 -> Copy) and paste it into the address bar of your browser, which will effectively start downloading a .kml file which contains all the objects that match your query.
To verify that your export went well, you can open the downloaded .kml file in Google Earth:

Example: Al Qadarif Schools (category ID: 203) in Wikimapia database
Converting the kml in .shp
KML created by API Wikimapia is of “multigeometry” type which means that for the same purpose, there is both a point (placemark) and a line (you can see it very clearly in the Google Earth screenshot above, each school has both a yellow and a white outline placemark).
The problem is that QGIS does not know how to open this type of kml, so we will have to convert it into two separate files, splitting lines from points.
For this we will use the KML2KML software, downloadable here: kml2kml.geoblogspot.com/
Follow the standard installation procedure, and once installed, open KML2KML.
Click on the folder icon at the top left to open the KML file that was created and uploaded by the Wikimapia API.
- Click the Export tab and choose “To Shapefile“
- Choose the path of shp output
KML2KML then creates 2 shapefiles, a polygon shapefile containing the centroids (marks) and another containing the polygon outline (lines).
You can open both shapefile in QGIS and thus add this additional source of data to your projects.
Bonus: if you want to get polygons from the lines shapefile, use the Lines to Polygons tool:
/!\ If you know a faster way to convert a shapefile to KML multigeometry (e.g. via a Python script), feel free to leave a comment 😉
Hi!, I’m been trying to download a data but every time that I do it, the kml file it’s empty. I followed every step but nothing… if you can help me, I would be very grateful… geoproyectosccs@gmail.com
I’m trying the same thing step by step as you mentioned I tried following two links to download kml file:
http://api.wikimapia.org/?function=box&key=%5Bmykey%5D&lon_min=73.3722&lat_min=18.0323&lon_max=73.5892&lat_max=18.1537&format=kml&category=181
&
http://api.wikimapia.org/?key=%5Bmykey%5D&function=box&coordsby=bbox&bbox=73.3722%2C18.0323%2C73.5892%2C18.1537&category=181&count=1000&format=kml
But every time it is downloading empty kml can you please help me. my email id is meenakshi.burman@gmail.com
I tried it as you mentioned and another option as well as shown below:
http://api.wikimapia.org/?function=box&key=%5Bmykey%5D&lon_min=73.3722&lat_min=18.0323&lon_max=73.5892&lat_max=18.1537&format=kml&category=181
& http://api.wikimapia.org/?key=%5Bmykey%5D&function=box&coordsby=bbox&bbox=73.3722%2C18.0323%2C73.5892%2C18.1537&category=181&count=1000&format=kml
From also I get a tiny kml.part file, that I then rename .kml. The file doesn’t open in Google Earth or QGIS. can you please tell me how can download this.
Also I wanted to ask how can i make shape files from this kml file need to download other parts of wikimap to prepare a base map in qgis. is it possible? if yes how?
Need help asap.. Meenakshi
hi Meenakshi,
It’s normal that you obtain an empty kml there’s no data on your area of interest 😉
I think that what you want to do is exporting the roads (that’s why you put 181 as Id), but the API only allows you to download polygons but not lines (roads).
So you are querying polygons with Road as ID which doesn’t exist (or maybe at some places, people might have trace a polygon around a thick road).
– Leo
Hi, i have da same problem – the kml file it’s empty.
Can you help me please h.yankov@mail.bg
Hi itso,
Can you please show me the query you are trying ?
– Leo
Great info here! The best I have found so far. I was able to generate the KML file for the desired area of interest. After reviewing it in both platforms, Google Pro and KML2KML, I can see it generated both the lines and the points (snice both geometries are vsisible). The issue here is that when I run the KML2KML tool, it only generates the points SHP but the line SHP comes with empty records. Any help will be really appreciated.
Hi, excellent tutorial! I second Ernesto’s comment: it is the best tutorial found so far, and I also find myself with an empty SHP file, although the KML seems to contain data since polygons are displayed on Google Earth.
My query is the following: http://api.wikimapia.org/?key=3B0ACEC0-F89D7A4D-92FA3FC4-72D438E8-AF083065-DFA217B3-FA91B04D-84EE2DEF&function=box&coordsby=bbox&bbox=30.999536%2C16.2837982%2C31.2393709%2C16.8804932&category=45057&count=100&format=kml
Many thanks in advance for your help!
Hi Myriam,
Thanks for the comment 🙂
Tell me if I’m wrong but looking at your query, it seems that you want to download residential neighbourhoods in Sudan ? I looked into the coordinated you entered and they seem to fall in the middle of the desert, west of Khartoum (so it makes sense that the result is empty). When I lunch your query I don’t even have a result in Google Earth.
Can you check if the coordinates you entered are the right ones ?
Cheers,
– Leo
Hello
I was trying this method and I want large data set of a city to compare this data with OSM data.
Please suggest if there any other method that can be used to download large Data?.
thanks
Hi,
Thank you for this. I have followed the steps until the download. I however get a download file with no extension and the KML2KML does not recognise it. the file type is “file” what does this mean?
download.http://api.wikimapia.org/key=example&function=box&coordsby=bbox&bbox=49.2654%2C25.8889%2C50.4245%2C26.8388&category=4621&count=100&format=kml
This is amazing; thank you! For those of you who are not trying to spend money on the KML2KML, you can actually download a KML tools plug-in on QGIS that will break your multigeometry KML file down into points and lines for you, automatically creating shapefiles usable in any GIS software.