Is it possible to download establishment's data in a given location? I do not need it mapped out. For example, I want all the New York restaurants and their information in an excel file. BTW, I have almost zero working knowledge in IT. asked 12 Jan '15, 09:56 joshant edited 12 Jan '15, 20:04 aseerel4c26 ♦ |
One Answer:
Overpass API, an API, can give you data in CSV format, which should be loadable into Excel. Here's a sample Overpass query that gives a CSV file of restaurants, plus some data about them, just move the map to NY, and press Run again. answered 12 Jan '15, 13:22 rorym edited 12 Jan '15, 14:08 |
@joshant: and in case you do not yet know how specific types of "establishments" are described in the OpenStreetMap data, have a look at Map Features (takes a while to load) or which-tags-do-i-use. In your restaurant case the usual tag is
amenity=restaurant
which you will recognize in in rorym's sample query code ("amenity"="restaurant"
).The print section generated by overpass turbo is not ideal for CSV output mode, as you get a lot of almost empty lines starting at about row 215.
Those are all the nodes belonging to some restaurant way; they're primarily needed, if you want to draw some buildings on a map and need all coordinates.
My recommendation here is to just replace that section by
out center;
This is how the query would then look like: http://overpass-turbo.eu/s/6ZA
Another variant on the query, missing @mmd's suggestion with uses the around operator to point at NYC directly http://overpass-turbo.eu/s/6ZD
@SK53: while you are at "variants … is there a way to use the boundary relation of New York – in case one strictly wants to only get restaurants from New York (like in the example above)? – Okay, apparently not (at least not for all object types).
@aseerel4c26: yes, you could refer to that boundary relation as well: http://overpass-turbo.eu/s/6ZI