I'm very new to GIS and I have spent the last few days trying to find some kind of database with the aforementioned polygons with no luck. The purpose is simply to label a location at district level given its longitude and latitude. I tried reverse geocoding but very quickly exceeded my rate-limit because of the size of the data. I've also tried GADM but the data is not labeled and there seemed to be more polygons than districts. MongoDB works nicely with GeoJSON hence my preference for data in this format. What options do I have?

3 Answers 3


A really nice source for admin boundaries all over the world, at different scales with very nice cartographic quality, is found at Natural Earth.

If you are downloading shapefiles, there are several options for converting from a shapefile:

1) geojson.io, to which you upload your shapefile and save as geoJson 2) This converter, same idea without the map to check your data.


You can extract the administrative boundaries from the OSM data. There are multiple ways to do this (source).

Step 1: Extraction

Option 1: Use the allmighty osmosis:

osmosis --read-pbf source.osm.pbf --tf accept-relations boundary=administrative --used-way --used-node --wx relation-boundaries.osm

Option 2: Use osmfilter:

osmconvert source.osm.pbf --out-o5m >africa.o5m
o5mfilter africa.o5m --keep="boundary=administrative" >africa_boundaries.osm

To keep specific administrative levels only specify with admin_level=:

o5mfilter africa.o5m --keep="all boundary=administrative admin_level=2 =3 =4" >africa_boundaries.osm

Step 2: Conversion

To convert .osm to geoJSON use one of the many converters at hand:

  • I tried the first approach using osmosis but upon conversion I seem to be getting polygons of the surrounding admin units as opposed to admin units within country. Jul 19, 2015 at 5:48
  • Have you tried the 2nd approach, too? There you can specify the admin level for the filter.
    – Klaster
    Jul 19, 2015 at 11:23

Check this site - https://maps.mkeda.me/world/ (there are available import to geojson) or this - https://mapzen.com/

  • 1
    Could you provide additional context for your links? See our help on why we discourage link only answers
    – GISHuman
    May 17, 2017 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.