-
-
Save KalipheGTU/0c3db03c838b917d01a282f53d8e3446 to your computer and use it in GitHub Desktop.
Query for Overpass API to get bars and cafes in a specific area
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[out:csv( | |
::id,"name",::count,"brand","amenity","ref:vatin","opening_hours","operator","addr:postcode","addr:city","addr:street","addr:housenumber","opening_hours","contact:phone","contact:website",::lat,::lon,lastcheck; | |
true; "|" | |
)][timeout:20]; | |
area[admin_level=8][boundary=administrative]["ref:ISTAT"="015146"]->.boundaryarea; | |
( node(area.boundaryarea)[railway=subway_entrance]; | |
way(area.boundaryarea)[railway=subway_entrance]; | |
>; | |
) ->.sub_entrance; | |
( | |
way(around.sub_entrance:50)[amenity=cafe]; | |
node(around.sub_entrance:50)[amenity=cafe]; | |
relation(around.sub_entrance:50)[amenity=cafe]; | |
way(around.sub_entrance:50)[amenity=bar]; | |
node(around.sub_entrance:50)[amenity=bar]; | |
relation(around.sub_entrance:50)[amenity=bar]; | |
); | |
out center; | |
out count; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment