Country Borders -> Shapefiles

So, I’ve been trying to work this out for around three hours now, and figured it was time to just admit that I need some more experienced people to point out whatever blatantly obvious functions I’m missing.

If anyone could walk me thru how take this country border http://www.openstreetmap.org/relation/382313#map=4/33.87/127.44
and convert it into a shape file which I could download and import into QGIS, I’d be extremely grateful.

Hi,

Download the relation with browser or curl or wget as japan.osm
http://www.openstreetmap.org/api/0.6/relation/382313/full

Theoretically you can open it directly with QGIS simply with Add vector layer - All files - japan.osm. However, it looks like GDAL which is opening the data wants that an environment variable “OSM_USE_CUSTOM_INDEXING=NO” is set. I am not sure how to set that for QGIS.

Myself I would convert the relation first into Spatialite db and open that with QGIS. Open GDAL command window and set the environment, on Windows as
set OSM_USE_CUSTOM_INDEXING=NO
next:
ogr2ogr -f SQLite -dsco spatialite=yes japan.sqlite japan.osm
then add Spatialite layer, Borders of Japan are on layer “multipolygons”

In the german subforum, wambacher published a Tool to export Boundary-Relations as Shape-Files. You could ask there to add Japan to the supported countries and/or open-source it to use it yourself.