Where to find the UK's regions map on GeoJSON

2020-05-20 03:12发布

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?

标签: svg geojson
5条回答
干净又极端
2楼-- · 2020-05-20 03:58

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

查看更多
狗以群分
3楼-- · 2020-05-20 03:58

If you just want GeoJson files of UK boundaries (includes NI) you should just use - http://mapit.mysociety.org

Northern Ireland LGD (Council) boundaries - http://mapit.mysociety.org/areas/LGD.html

查看更多
相关推荐>>
4楼-- · 2020-05-20 04:07

Here is the ONS Website Data, which you can downlaod in different formats

https://data.gov.uk/data/search?theme-primary=Mapping&res_format=GeoJSON

查看更多
走好不送
5楼-- · 2020-05-20 04:11

There's a useful github repository containing GeoJSON boundary data for UK, converted from ONS shapefiles https://github.com/martinjc/UK-GeoJSON

  • Local Authority Districts (LAD)
  • European Electoral Regions (EER)
  • Westminster Parliamentary Constituencies (WPC)
  • Electoral Wards
  • Eurostat boundaries (NUTS level 1 & 2) for England, Scotland and Wales
  • Statistical areas (super output etc.) used by ONS

Northern Ireland is the exception to these due to the strict licensing of the government agency "public" information.

查看更多
可以哭但决不认输i
6楼-- · 2020-05-20 04:14

I can't tell whether you're looking for country-level or subcountry-level boundaries. If it's the former, then:

Some of the examples for d3.js use a GeoJSON file that contains all the countries in the world. You can find it here: https://github.com/mbostock/d3/blob/master/examples/data/world-countries.json.

D3.js is also an excellent framework for actually rendering this data in svg, so if you haven't already, you might wanna look into it. For example: http://bl.ocks.org/2206590.

查看更多
登录 后发表回答