4

Is there a way to download the shp format file about eh county boundaries of China in OpenStreetMap?

MaM
  • 2,043
  • 10
  • 20
Ben
  • 665
  • 1
  • 10
  • 27

2 Answers2

7

You can get the administrative boundary via the Overpass API. The corresponding query is:

relation
  ["boundary"="administrative"]
  ["admin_level"="2"]
  ["name:en"="People's Republic of China"];
(._;>;);
out body;

In order to learn more about the specified tags take a look at the OSM wiki. Especially on relations with the administrative_boundary tag.

The returned XML file has to be converted to a shapefile afterwards.

scai
  • 20,297
  • 4
  • 56
  • 72
  • 1
    Thanks a lot. I'm not familiar with the Overpass API. But your answer seems pretty efficient. – Ben Mar 05 '14 at 06:36
0

I'm not sure if the shp files package also contains the boundary:
http://download.geofabrik.de/asia/china.html

Otherwise get the .poly file and convert it.

Please keep in mind, that political boundaries are a bit problematic and might get abused for different kinds of vandalism or political debates and result in inconsistency.

MaM
  • 2,043
  • 10
  • 20
  • note that the `.poly` file from geofabrik is strongly simplified (and always outside the real border of the country). – tyr Mar 04 '14 at 11:54
  • Thanks. I just downloaded this file. But it does not contain the boundary. – Ben Mar 04 '14 at 12:22
  • 2
    Now I remember, a German mapper created this service for export: http://osm.wno-edv-service.de:8080/boundaries/ You are looking for "peoples republic of china" and can get SHP, does it work for you? – MaM Mar 04 '14 at 12:27
  • @Mam Yeah. Thanks. That's what I wanted. – Ben Mar 05 '14 at 06:35