Skip to content

Commit

Permalink
replace gdf_from_place with geocode_to_gdf
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Jun 20, 2020
1 parent dbf5f3e commit e039471
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions osmnx/_api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Expose the core OSMnx API."""

from . import boundaries
from .bearing import add_edge_bearings
from .boundaries import gdf_from_place
from .boundaries import gdf_from_places
from .distance import get_nearest_edge
from .distance import get_nearest_edges
from .distance import get_nearest_node
Expand All @@ -14,9 +15,8 @@
from .footprints import footprints_from_place
from .footprints import footprints_from_point
from .footprints import footprints_from_polygon
from .geocoding import gdf_from_place
from .geocoding import gdf_from_places
from .geocoding import geocode
from .geocoding import geocode_to_gdf
from .graph import graph_from_address
from .graph import graph_from_bbox
from .graph import graph_from_place
Expand Down
2 changes: 1 addition & 1 deletion osmnx/footprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def footprints_from_place(place, footprint_type="building", retain_invalid=False
You can configure the Overpass server timeout, memory allocation, and
other custom settings via ox.config().
"""
city = geocoding.gdf_from_place(place, which_result=which_result)
city = geocoding.geocode_to_gdf(place, which_result=which_result)
polygon = city["geometry"].iloc[0]
return footprints_from_polygon(polygon, footprint_type, retain_invalid)

Expand Down
4 changes: 2 additions & 2 deletions osmnx/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@ def graph_from_place(
if isinstance(query, (str, dict)):
# if it is a string (place name) or dict (structured place query), then
# it is a single place
gdf_place = geocoding.gdf_from_place(
gdf_place = geocoding.geocode_to_gdf(
query, which_result=which_result, buffer_dist=buffer_dist
)
elif isinstance(query, list):
# if it is a list, it contains multiple places to get
gdf_place = geocoding.gdf_from_places(query, buffer_dist=buffer_dist)
gdf_place = geocoding.geocode_to_gdf(query, buffer_dist=buffer_dist)
else:
raise TypeError("query must be dict, string, or list of strings")

Expand Down
2 changes: 1 addition & 1 deletion osmnx/pois.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def pois_from_place(place, tags, which_result=1):
You can configure the Overpass server timeout, memory allocation, and
other custom settings via ox.config().
"""
city = geocoding.gdf_from_place(place, which_result=which_result)
city = geocoding.geocode_to_gdf(place, which_result=which_result)
polygon = city["geometry"].iloc[0]
return pois_from_polygon(polygon, tags)

Expand Down

0 comments on commit e039471

Please sign in to comment.