mirror of
https://github.com/DerTyp7/local-analyzer-python.git
synced 2025-10-28 12:02:10 +01:00
offline
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
main.py
10
main.py
@@ -24,13 +24,19 @@ requestUrl = "https://overpass-api.de/api/map"
|
||||
requestsUrlParams = f"?bbox={minLon},{minLat},{maxLon},{maxLat}"
|
||||
|
||||
print(requestUrl + requestsUrlParams)
|
||||
|
||||
""" # ONLINE
|
||||
print("Downloading OSM-File...")
|
||||
# TODO Check if banned from overpass-api MAYBE get alternative API then
|
||||
r = requests.get(requestUrl + requestsUrlParams, headers={'Content-Type': 'application/xml'})
|
||||
print("Done: Downloading OSM-File")
|
||||
|
||||
osm = OSM(r.text)
|
||||
"""
|
||||
|
||||
# Offline
|
||||
print("Using offline file!")
|
||||
file = open("mapHH", encoding="utf8")
|
||||
osm = OSM(file.read())
|
||||
|
||||
pta = PublicTransportAccessibility(osm)
|
||||
shops = Shops(osm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user