Skip to content

Commit

Permalink
refactor: ⬆️ Ready for OSMnx 2.0 (currently v1.9.2)
Browse files Browse the repository at this point in the history
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: gboeing/osmnx#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: gboeing/osmnx#1123   graph = ox.graph_from_bbox()

`north`, `south`, `east`, `west` parameters are deprecated use `bbox` as tuple parameter instead
  • Loading branch information
georgmangold committed Apr 7, 2024
1 parent b95ca36 commit fc66740
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pip_freeze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fc66740

Please sign in to comment.