Skip to content

Commit

Permalink
streamline code
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Jul 21, 2024
1 parent fbfedb6 commit c2828f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions osmnx/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 1 addition & 3 deletions osmnx/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c2828f6

Please sign in to comment.