I’d like to run such a query in overpass-turbo:
“id: 11111 or id:22222 or id:3333 or … or id:xxxx”
or like this "id in (1111,2222,3333, … xxxx) with a lot of id’s, therefore I’d like read these id’s from file.
So: if I have a file which contains OSM object id’s (i.e. a.csv = comma or semicolon separated text) how can I read this file in order to query all objects with the id’s read from the file.
Thanks in advance,
I don’t think that Overpass Turbo/API supports reading from an id file, there are probably better tools for this, like Osmium Tool.
But to understand the context: where are those object ids coming from?
Found on Stackxechange: openstreetmap - Overpass API query to retrieve way ids given a list of node ids - Geographic Information Systems Stack Exchange
way(bn) gives you the parent ways for nodes in the inputset
Is that good solution for you?
I dont’t know whether is it supported I only read but didn’t find example.
I try Osmium tool, thank you for the idea.
It is not reading the data (id’s) from file, but compatible solution for my problem.
The use case of that question is:
Given a list of node ids returned by an OSRM map matching query I am trying to find a list of corresponding way ids
Route Annotator was made exactly for that purpose and might be a better alternative than Overpass, at least for large scale uses (maybe also for this case).
That’s why I asked for context, as what is the best solution depends on the use case. There might be good reasons, but querying lots of ids from an online service like Overpass sounds like there is something wrong in the process to me.
You can also use this tool if you need to get XML data. CSV file must have headers
- Copy content from CSV or spreadsheet to Input 1
- Click on convert button
Toggle Get OSM data from Overpass API
- Get XML from Input 2
But if you need more flexibility then include the list of id’s in the query as @Marek-M already showed: