diff --git a/osmnx/features.py b/osmnx/features.py index 7d725e90..90953d2e 100644 --- a/osmnx/features.py +++ b/osmnx/features.py @@ -266,8 +266,7 @@ def features_from_place( gdf """ # extract the geometry from the GeoDataFrame to use in query - gdf_place = geocoder.geocode_to_gdf(query, which_result=which_result) - polygon = gdf_place["geometry"].union_all() + polygon = geocoder.geocode_to_gdf(query, which_result=which_result).union_all() msg = "Constructed place geometry polygon(s) to query Overpass" utils.log(msg, level=lg.INFO) diff --git a/osmnx/graph.py b/osmnx/graph.py index abe1f707..d0304f71 100644 --- a/osmnx/graph.py +++ b/osmnx/graph.py @@ -356,9 +356,7 @@ def graph_from_place( documentation for caveats. """ # extract the geometry from the GeoDataFrame to use in query - gdf_place = geocoder.geocode_to_gdf(query, which_result=which_result) - polygon = gdf_place["geometry"].union_all() - + polygon = geocoder.geocode_to_gdf(query, which_result=which_result).union_all() msg = "Constructed place geometry polygon(s) to query Overpass" utils.log(msg, level=lg.INFO)