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

Hallo,

I'm trying to display differentiate symbols between big cities and small town, the filter is based on the place tag and population: For big cities, I would like to display the residential and industrial areas belonging to these cities.

I do not see how to get all the polygons (tagged with landuse) belonging to a given city.

Starting from http://www.openstreetmap.org/browse/node/1559853166

I get the boundaries of the city at http://www.openstreetmap.org/browse/relation/62407

but not the polygons inside it like this one http://www.openstreetmap.org/browse/relation/1394163

Any ideas how to get it right?

regards

asked 03 Dec '12, 16:38

Groquik's gravatar image

Groquik
11112
accept rate: 0%

edited 03 Dec '12, 16:38


As far as I know there is no connection between the unice place node of a city together with its boundary relataion AND any are that cobers a specific landuse.

So you have to build the connection on your own.

One possibility to solve this is to use the online service Overpass_API.

There you can query for any kind of OSM objects, either limited by a bounding box OR limited by an area relation. The key parameter is area_query like described here: extract-pois-for-a-region

Or read all guides and examples about overpass API in the OSM wiki.

permanent link

answered 03 Dec '12, 16:55

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Thanks for the hint.

Since I want to do it over a bigger area, I'm not sure that the overpass API would be a suitable tool, but the overall idea remains applicable.

I'll try to "enhance" the relation landuse and to add some private tags to link them to their respective "place" based on "does the relation polygon crosses the city boundaries"

(04 Dec '12, 09:19) Groquik
1

It depends on the size of the area but the Overpass API is usually better suited for large requests than most (if not all) other APIs. You can also increase the timeout as explained in the documentation if the default value is too low. But for really large requests you should better get a country or area extract.

(04 Dec '12, 09:42) scai ♦
1

You cannot add your own "private tags" just to solve a spatial query.

(04 Dec '12, 15:05) Pieren

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:

×103
×43

question asked: 03 Dec '12, 16:38

question was seen: 4,826 times

last updated: 04 Dec '12, 15:05

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