NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%


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.

permanent link

answered 24 May '12, 08:28

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

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.

permanent link

answered 25 May '12, 16:02

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

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:

×129
×63
×55
×45
×37

question asked: 23 May '12, 23:29

question was seen: 7,682 times

last updated: 25 May '12, 16:02

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum