Why not ask your question on the new OpenStreetMap Community Forum?



I'm looking to get a list of states or regions for countries. I'm using Overpass Turbo to get the list of data. From searching the various questions, I found that someone used this specific code:

[timeout:900]; area["ISO3166-1"="us"]["admin_level"="2"];(rel(area)["admin_level"="4"];); out qt;

When I input this into Overpass Turbo it fails.

Can anyone help with generating the correct code to get a list of states or regions for a country? Thanks!

asked 20 Oct '16, 17:49

michael_arrivalist's gravatar image

accept rate: 0%

I can't get the Overpass Turbo query to work but this site may do it for you. https://wambachers-osm.website/boundaries/ The documentation link explains the process well

permanent link

answered 21 Oct '16, 01:05

nevw's gravatar image

accept rate: 9%

edited 05 Jul '17, 08:10

Frederik%20Ramm's gravatar image

Frederik Ramm ♦

If you really mean you need a list, something like this should work:

[out:csv(::type, ::id, name)][timeout:120];
out body;

This might even actually work for the whole US. If you need the geometry too, this is quite a heavy query to ask. It might like look something like this, but if it doesn't time out, it is sure to crash your browser. If you want the data without crashing your browser, check the answer here.

But if you need a map, you're probably better of with either the Boundaries tool or extract the data yourself (which I would do like this, but there are many ways up the mountain)

permanent link

answered 24 Oct '16, 10:02

joost%20schouppe's gravatar image

joost schouppe
accept rate: 12%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 20 Oct '16, 17:49

question was seen: 6,294 times

last updated: 05 Jul '17, 08:10

powered by OSQA