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 |
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. answered 03 Dec '12, 16:55 stephan75 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 ♦
|