mirror of
https://github.com/DerTyp7/local-analyzer-python.git
synced 2025-10-28 20:12: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}"
|
requestsUrlParams = f"?bbox={minLon},{minLat},{maxLon},{maxLat}"
|
||||||
|
|
||||||
print(requestUrl + requestsUrlParams)
|
print(requestUrl + requestsUrlParams)
|
||||||
|
""" # ONLINE
|
||||||
print("Downloading OSM-File...")
|
print("Downloading OSM-File...")
|
||||||
# TODO Check if banned from overpass-api MAYBE get alternative API then
|
# TODO Check if banned from overpass-api MAYBE get alternative API then
|
||||||
r = requests.get(requestUrl + requestsUrlParams, headers={'Content-Type': 'application/xml'})
|
r = requests.get(requestUrl + requestsUrlParams, headers={'Content-Type': 'application/xml'})
|
||||||
print("Done: Downloading OSM-File")
|
print("Done: Downloading OSM-File")
|
||||||
|
|
||||||
osm = OSM(r.text)
|
osm = OSM(r.text)
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Offline
|
||||||
|
print("Using offline file!")
|
||||||
|
file = open("mapHH", encoding="utf8")
|
||||||
|
osm = OSM(file.read())
|
||||||
|
|
||||||
pta = PublicTransportAccessibility(osm)
|
pta = PublicTransportAccessibility(osm)
|
||||||
shops = Shops(osm)
|
shops = Shops(osm)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user