Where to find the UK's regions map on GeoJSON format

Carlos picture Carlos · Nov 19, 2012 · Viewed 14.4k times · Source

I am trying to get the uk's regions map, http://en.wikipedia.org/wiki/Regions_of_England, on GeoJSON format to use it on a web visits map on a website. Is there any place where you can get the data for different countries on GeoJSON format?

Answer

jaygooby picture jaygooby · Nov 22, 2012

You can download the UK administrative boundaries from: https://www.ordnancesurvey.co.uk/opendatadownload/products.html

Scroll down the page until you see Boundary-Line.

You'll need to convert the shape files to geojson with a GIS tool. Here's a step-by-step tutorial:

http://blog-en.openalfa.com/how-to-add-interactive-maps-to-a-web-site/

The shape files supplied by the Ordinance Survey have different levels of detail. It sounds like you'd just need to convert the european_region_region.shp shape file.

ogr2ogr -f GeoJSON european_region_region.json european_region_region.shp

EDIT: don't forget to convert from Northing/Easting to Lat/Long if you want to work with Leaflet, Google Maps, etc

ogr2ogr -t_srs WGS84 -f GeoJSON european_region_region.json european_region_region.shp

The Ordinance Survey have a licensing policy that you'll need to comply with:

https://www.ordnancesurvey.co.uk/oswebsite/docs/licences/os-opendata-licence.pdf