This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Administrative Boundaries’ Lat/Long

0

Hi,

I've only discovered OSM tonight so please forgive me if this is a stupid question.

I'm wanting to extract the lat/long of the boundaries of certain administrative divisions. For example, I want the lat/long of the borders of all the states in the USA and of the divisions of the UK (such as East of England, South West England, etc).

What's the best way to extract this information?

Thanks in advance.

asked 23 May '12, 23:29

nmpolo's gravatar image

nmpolo
6111
accept rate: 0%


2 Answers:

1

You can get a file containing all such information for UK with the call

http://overpass-api.de/api/interpreter?data=[timeout:900][out:json];(rel[admin_level=4](50.0,-10.0,62.0,2.0);>>;);out;

Note that such a call may take up to 15 minutes and yield a file of several megabyte size. "(50.0,-10.0,62.0,2.0)" is the bounding box with latitude, then longitude, then lat and lon for the upper boundary and draw a boundary around UK. "[admin_level=4]" is the level of most important intra-nation borders. The levels are explained here.

answered 24 May '12, 08:28

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

0

Shapes are available for UK at geofabrik. They don't seem to be available for US, so you can pay geofabrik or extract them with overpass-api (as explained by Roland) or osmosis.

answered 25 May '12, 16:02

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

Source code available on GitHub .