Hi everyone, how can i get the relation id by the node id? Or in other words - how can i get from here: http://www.openstreetmap.org/api/0.6/node/240076989 to here: http://www.openstreetmap.org/api/0.6/relation/191645 (which both is the city of dresden) Thank you for every contribution. asked 29 Nov '17, 12:53 T4Titan |
Thank you for your fast answer. I have not expected such an easy way :D Which osm tool do i have to use to query big amounts of data? Maybe the overpass api is able to handle such volumes. https://overpass-api.de/api/interpreter?data=[out:json];out; But i have no idea how to do this query from above whit this api. Is there anyone who is able to formulate the correct query? ...a query that uses the node id of a city/village to get its direct parent relations id (which is the city also) https://overpass.kumi.systems/api/interpreter?data=[out:json];node( IdOfNode );<; filteringToGetTheParentRelationWhichDesribesAlsoTheCityOrVillage out; I need this id to be able to use nominatim to get the borders of all cities in my database. answered 29 Nov '17, 13:30 T4Titan 1
Which query? The main API is just an editing API and should not be used to perform large queries. Overpass API instead can handle rather large queries.
(29 Nov '17, 13:46)
scai ♦
1
...a query that uses the node id of a city/village to get its direct parent relations id (which is the city also) https://overpass.kumi.systems/api/interpreter?data=[out:json];node( IdOfNode );<; filteringToGetTheParentRelationIdOfTheRelationWhichDesribesAlsoTheCityOrVillage out;
(30 Nov '17, 09:33)
T4Titan
|
Just append This will return all relations the node is part of. This feature is described here. answered 29 Nov '17, 12:56 scai ♦ Greetings to dresden :)
(29 Nov '17, 13:44)
T4Titan
|