What I would like to do is extract all country borders into 1 vector map.

I have chosen OSM because of its regular updates and high resolution required for the project.

Also will need to to extract major roads and rivers at some point into another vector map.

How can I go about ding these things?

Thanks

asked 19 Jun '12, 09:42

stuart576's gravatar image

stuart576
71225
accept rate: 0%

I have looked at the, 'Tag:boundary=administrative' wiki and I guess I should use that, but what programs can I use, I've had a little play with GRASS and Osmosis but I'm not really sure what I am doing. Any advice?

(19 Jun '12, 10:09) stuart576

This is not a trivial task and it would be much easier for you to use the ready-made polygons from http://naturalearthdata.com/.

If you really want to go down the OSM route then try the links presented in this blog article: http://www.openstreetmap.org/user/dbusse/diary/17043 - be aware that country borders will include maritime borders and that you need to intersect them with the coastline (try http://www.openstreetmapdata.com/ ) to get "proper" country outlines. We are talking about very detailed polygons, some with hundreds of thousands of points, so be warned that not every GIS program on every computer will simply process them.

A good tool to export OSM data to shape files is "osmjs" but it probably requires some OSM and Linux knowledge to operate.

The OSM wiki has a list of OSM businesses here: http://wiki.openstreetmap.org/wiki/Commercial_OSM_Software_and_Services - some of them will be able to do this processing for you.

permanent link

answered 19 Jun '12, 10:15

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
69.2k806291083
accept rate: 24%

edited 19 Jun '12, 14:37

Andy%20Allan's gravatar image

Andy Allan
11.7k23121142

Thanks for the help so far, I have managed to get Osmosis working, but I have been unable to remove all but country borders (admin_level=2) from my maps, my test maps are South America and Great Britain. I have tried these commands so far:

(19 Jun '12, 14:32) stuart576

Osmosisosmosis-0.40.1bin>osmosis.bat --read-pbf "......MAP DataOSM PlanetSouth Americasouth-america .osm.pbf" --wkv keyValueList="admin_level=2" --used-node --write-xml output2.osm

Osmosisosmosis-0.40.1bin>osmosis.bat --read-pbf "......MAP DataOSM PlanetSouth Americasouth-america .osm.pbf" --tf accept-ways boundary=administrative --tf reject-relations --used-node --write-xml output.osm

But neither leave me with what I want. Any advice on how to exclude everything except admin_level=2 ?

(19 Jun '12, 14:32) stuart576
1

You don't write what the problem with these approaches is. I believe the first fails because you need to write admin_level.2 not admin_level=2 in --wkv. Check this mailing list thread where the issue is discussed: http://www.mail-archive.com/dev@openstreetmap.org/msg15500.html

(19 Jun '12, 14:44) Frederik Ramm ♦

Have a look at Osmfilter ... you can reduce big country extracts to any elements you want by filtering.

permanent link

answered 24 Jun '12, 16:48

stephan75's gravatar image

stephan75
12.5k453209
accept rate: 6%

If only the administrative boundary data is needed you can get it under http://download.geofabrik.de/

permanent link

answered 03 Jul '15, 14:21

katpatuka's gravatar image

katpatuka
936142535
accept rate: 12%

edited 03 Jul '15, 14:24

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×70
×47
×35

question asked: 19 Jun '12, 09:42

question was seen: 30,090 times

last updated: 03 Jul '15, 14:24

powered by OSQA