Skip to content

Commit

Permalink
osmnx deprecated renames
Browse files Browse the repository at this point in the history
  • Loading branch information
chrieke committed Aug 25, 2023
1 parent a988547 commit 8c5d7d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prettymapp/osm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from osmnx.geometries import geometries_from_polygon
from osmnx.features import features_from_polygon
from osmnx import settings
from geopandas import clip, GeoDataFrame
from shapely.geometry import Polygon
Expand All @@ -19,7 +19,7 @@ def get_osm_geometries(aoi: Polygon) -> GeoDataFrame:
except TypeError: # e.g. "building": True
tags[k] = v

df = geometries_from_polygon(polygon=aoi, tags=tags)
df = features_from_polygon(polygon=aoi, tags=tags)
df = df.droplevel(level=0)
df = df[~df.geometry.geom_type.isin(["Point", "MultiPoint"])]

Expand Down

0 comments on commit 8c5d7d0

Please sign in to comment.