I am trying to build a map of countries in the some countries in Europe (Spain/France/Portugal).

What is the best way to build such map:

  • Should I look for shp files, then concatenate them.
  • Is there any way to extract, and concatenate GeoJson of specific countries (with their boundaries data), then concatenate them.

It should be something similar to build such kind of maps. Any starting point ?


Take a look at https://osm.wno-edv-service.de/boundaries/ it contains a UI to download all know administrative boundaries from OSM in a variety of formats.


You need the boundaries of the countries, then make them in geojson format. For the data I suggest not to use OSM directly in the case you don't plan to go in bigger zoom levels, but use a global shapefile from Natural earth. For the map, you'll need Leaflet and load the file. I'd suggest to use topojson format instead of geojson. Here's the file I made some months ago https://github.com/sabas/sabas.github.io/blob/master/topojson/naturalearth_countries.topojson

but you can replicate with https://github.com/mbostock/topojson and the js plugin.

Take a look also to this page https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-topojson/


I suggest to use the Overpass API, and select the admin_levels you want.

Overpass API can export geojson.

Note that not all countries of the world are included in full detail in OSM, but much better than Natural Earth or GADM provide. See http://wiki.openstreetmap.org/wiki/User:Wambacher#International_Administrative_Boundaries for details countrywise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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