From fc667405f6e7689059b922f734d623e05e3fdd2b Mon Sep 17 00:00:00 2001 From: Georg Mangold <67909897+georgmangold@users.noreply.github.com> Date: Sun, 7 Apr 2024 10:56:07 +0200 Subject: [PATCH] refactor: :arrow_up: Ready for OSMnx 2.0 (currently v1.9.2) controller.py:431: FutureWarning: The `north`, `south`, `east`, and `west` parameters are deprecated and will be removed in the v2.0.0 release. Use the `bbox` parameter instead. See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123 polygon = ox.utils_geo.bbox_to_poly(north, south, east, west) controller.py:733: FutureWarning: The `north`, `south`, `east`, and `west` parameters are deprecated and will be removed in the v2.0.0 release. Use the `bbox` parameter instead. See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123 graph = ox.graph_from_bbox() `north`, `south`, `east`, `west` parameters are deprecated use `bbox` as tuple parameter instead --- controller.py | 7 ++----- pip_freeze.txt | 2 +- ui.py | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/controller.py b/controller.py index 8f22f11..5f79b97 100644 --- a/controller.py +++ b/controller.py @@ -428,7 +428,7 @@ def btn_auswahl_clicked(self): south, north = self.ui.canvas.axes.get_ylim() # Muss wegen Projizierung auf epsg:3857 wieder in epsg:4326 umgewandelt werden - polygon = ox.utils_geo.bbox_to_poly(north, south, east, west) + polygon = ox.utils_geo.bbox_to_poly(bbox=(north, south, east, west)) if self.graph.graph["crs"] == "epsg:3857": polygon, _ = ox.projection.project_geometry( polygon, crs="epsg:3857", to_crs="epsg:4326" @@ -731,10 +731,7 @@ def __init__(self, north, south, east, west, network_type): def run(self): graph = ox.graph_from_bbox( - self.north, - self.south, - self.east, - self.west, + bbox=(self.north, self.south, self.east, self.west), network_type=self.network_type, ) self.graphed.emit(graph) diff --git a/pip_freeze.txt b/pip_freeze.txt index d96f29b..175fbff 100644 --- a/pip_freeze.txt +++ b/pip_freeze.txt @@ -22,7 +22,7 @@ matplotlib==3.8.2 mercantile==1.2.1 networkx==3.2.1 numpy==1.26.2 -osmnx==1.8.0 +osmnx==1.9.2 packaging==23.2 pandas==2.1.4 Pillow==10.1.0 diff --git a/ui.py b/ui.py index 141cdea..4214fba 100644 --- a/ui.py +++ b/ui.py @@ -78,7 +78,7 @@ def __init__(self): self.setWindowTitle("W.O.L.F. - Ways with OpenStreetMap Location Finder") self.setWindowIcon(QIcon("gfx/wolf_logo_old.png")) - version = "1.00 vom 19.12.2023" + version = "1.01 vom 07.07.2024" main_widget = QWidget() self.setCentralWidget(main_widget)