Can you advice how can I filter city part nodes displayed on tiles (standard layer) with parent relation from OSM database? I need to export hierarchy: city(city, town, village, hamlet in OSM) > cityPart(suburb, cityDistrict, administrative in OSM) https://nominatim.openstreetmap.org/details.php?place_id=198526448 asked 24 Oct '19, 08:55 atom-systems |
Nodes are not suitable for the upper levels of the hierarchy because you cannot find out which other nodes are "below" them. Nodes are only suitable for the lowest level of the hierarchy. One possible way is to install your own copy of Nominatim and extract the pre-computed hierarchies from Nominatim either through the API or by querying the database directly. What you can also do is use Then, you can build SQL queries that give you the hierarchy you want, for example to compute a list of cities and their suburbs
And so on. (Note that this assumes cities are on admin level 8 which some larger cities might not be, and that suburbs are just points - they could also be polygons so you'd want to repeat the query above for polygonal suburbs, etc.) answered 24 Oct '19, 09:42 Frederik Ramm ♦ It's working, thank you! Is there quick way how to add latitude and longitude to the select?
(24 Oct '19, 10:20)
atom-systems
1
Quick for the database, just not quick for you typing it:
and then continue as above. The complexity arises from (1) having to convert the database coordinates to lat/lon with
(24 Oct '19, 10:37)
Frederik Ramm ♦
|