32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
from pprint import pprint
|
|
|
|
|
|
def fetch_bergbahnen(bbox) -> dict:
|
|
return {}
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
bbox = (46.72, 9.70, 46.92, 10.00)
|
|
result = fetch_bergbahnen(bbox)
|
|
pprint(result)
|
|
|
|
# TASK:
|
|
|
|
# Overpass-Query: -> wir wollen diesen in eine Python-Funktion 'fetch_bergbahnen()' einbauen
|
|
|
|
# [out:json][timeout:60];
|
|
# (
|
|
# node["aerialway"="station"]({{bbox}});
|
|
# way["aerialway"="station"]({{bbox}});
|
|
# node["railway"="funicular"]({{bbox}});
|
|
# way["railway"="funicular"]({{bbox}});
|
|
# node["railway"="station"]["funicular"="yes"]({{bbox}});
|
|
# );
|
|
# out center body;
|
|
|
|
# * Kopiert diesen auf `https://overpass-turbo.eu/` und führt ihn mal aus.
|
|
# * Spielt mit den Zoomstufen -> bbox
|
|
# * Versucht mehr über bbox herauszufinden (z.B. https://wiki.openstreetmap.org/wiki/Overpass_API)
|
|
# * Versucht eine einfache fetch_bergbahn() zu bauen, die API lautet "https://overpass-api.de/api/interpreter"
|
|
# Nutzt dazu die request-Library in Python, wo ihr post- und get-Requests bauen könnt |