My end goal is to get a CSV of restaurants in my area. I experimented with Turbo and then converted via convertcsv.com, but when I tried uploading it into a program, it was all errors. I opened it in Excel and saw that all of the info was jumbled up. Can anyone help me troubleshoot this or tell me if this is something I can even achieve using OSM? asked 17 Apr '21, 22:40 doakickflip |
One Answer:
Overpass Turbo is an interface for Overpass-API. CSV output is a feature of the Overpass-API query language rather than Overpass Turbo. Here's a script that finds fast_food and restaurants and outputs a few of the attributes:
Additional attributes can be added to output, each one has to be explicitly added to appear. The query language has quite a lot of functionality: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL answered 18 Apr '21, 15:01 maxerickson That was a very clear query command, thank you. But I'm still not clear on how to export the data.. (18 Apr '21, 15:40) doakickflip Just run execute... Or if you need it programmatically, you can export/copy the request, and run it when needed, with curl for example. (18 Apr '21, 15:46) H_mlet But if I can export it directly as a CSV from the query, I can't find that option. (18 Apr '21, 15:47) doakickflip Check Export -> Data -> raw data. (19 Apr '21, 07:11) scai ♦ |
Please share what you've tried so far. Your overpass-turbo query, the results... Also overpass has an option to directly output CSV IIRC. Have a look at the documentation. Regards.
I queried "restaurants" and it suggested "fast food" which is what I went with. Here is the coding result of it:
This is what I'm seeing as options when I try to export the data:
download/copy as GeoJSON
download/copy as GPX
download/copy as KML
download/copy as raw OSM data
raw data directly from Overpass API
load data into an OSM editor: JOSM, Level0
What am I overlooking for the CSV?