Task 1: add fetch_bergbahn function
This commit is contained in:
parent
3bdfa2d2f6
commit
be9ccefd6a
32
main.py
32
main.py
@ -0,0 +1,32 @@
|
||||
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
|
||||
Loading…
x
Reference in New Issue
Block a user