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

I'm a developer but I'm brand new to using Overpass.

I'm trying to get polygons for "inhabited areas" (villages, towns, cities) in the UK. They don't have to be perfect outlines, just rough outlines are fine.

This is what I've got so far, but it returns points rather than polygons, plus it only returns mid-size settlements; how would I get bigger and smaller ones too?

[out:json][timeout:25]; // fetch area “england” to search in {{geocodeArea:england}}->.searchArea; // gather results (   // query part for: “town”   node["place"="town"](area.searchArea); way["place"="town"](area.searchArea);  relation["place"="town"](area.searchArea); ); // print results out body;
>; out skel qt;

asked 26 Oct '18, 22:38

cakehoover's gravatar image

cakehoover
11112
accept rate: 0%


First, you only look for place="town", but OSM uses different values for settlements depending on the size, see the wiki. Furthermore the boundaries are mapped as administrative boundary relations.

Instead of writing the query yourself, you might use Wambacher's website to download the administrative boundaries in a variety of formats.

Long time ago, I wrote this Overpass query to retrieve admin levels 8 and 9. It can easily be adapted to retrieve all levels. Note it's written in the older XML-format.

You should also expect that the lowest level of settlements might not be mapped with administrative boundaries. I'm thinking of hamlets and neighbourhoods here.

permanent link

answered 27 Oct '18, 07:14

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

Thanks! I think the problem is that the UK simply doesn't consistently have administrative boundaries for towns and settlements (in some cases administrative regions overlap with towns, but frequently not), so using administrative regions isn't going to help me. If I was interested in admin boundaries, this would be a good suggestion. Instead I'm going to use these boundaries http://geoportal.statistics.gov.uk/datasets/built-up-areas-december-2011-boundaries-v2

(27 Oct '18, 13:17) cakehoover

OSM does not have any objects which correspond to urban areas. I wrote a series of blog posts on the subject, including identifying various approaches to finding such bounds using OSM data. A perhaps more recent version of British (excluding NI) urban areas is available is OS OpenData Strategic or Meridian. There is also a settlement & locality dataset for Scotland which may be a subset of that which you have located.

(28 Oct '18, 06:43) SK53 ♦

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:

×483
×228

question asked: 26 Oct '18, 22:38

question was seen: 4,359 times

last updated: 28 Oct '18, 06:43

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