Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optiburb incompatible with osmnx 0.16 #12

Open
rgmerk opened this issue Oct 2, 2020 · 1 comment
Open

Optiburb incompatible with osmnx 0.16 #12

rgmerk opened this issue Oct 2, 2020 · 1 comment

Comments

@rgmerk
Copy link

rgmerk commented Oct 2, 2020

Hi,

it appears that optiburb is incompatible with osmnx 0.16.

I'd submit a patch if it was obvious what the correct replacement API call is, but it's not straightforward.

Reading the documentation, it seems that the correct way to do this in newer versions is to retrieve a graph and them convert to a gdf, as shown in the example here:

https://github.com/gboeing/osmnx-examples/blob/master/notebooks/02-routing-speed-time.ipynb

Unfortunately, I'm not sure exactly how you're using the gdf so I'm not sure on the exact values for all of the arguments.

Cheers,
Robert.

xubuntu@xubuntu-VirtualBox:~/src/optiburb$ pip3 freeze | grep osmnx
osmnx==0.16.0
xubuntu@xubuntu-VirtualBox:~/src/optiburb$ ./optiburb.py "brunswick, victoria, australia"
2020-10-02 14:03:06 Configured osmnx
2020-10-02 14:03:06 optiburb.py:__init__:86 [WARNING] WARNING - this program does not consider the direction of one-way roads or other roads that may be not suitable for your mode of transport. You must confirm the path safe for yourself
2020-10-02 14:03:06 optiburb.py:get_osm_polygon:113 [INFO] searching for query=brunswick, victoria, australia, which_result=1
Traceback (most recent call last):
  File "./optiburb.py", line 738, in <module>
    polygon = burbing.get_osm_polygon(name, args.select, args.buffer)
  File "./optiburb.py", line 115, in get_osm_polygon
    gdf = osmnx.gdf_from_place(name, buffer_dist=buffer_dist, which_result=select)
AttributeError: module 'osmnx' has no attribute 'gdf_from_place'
@jskinner
Copy link

FWIW, it appears to work for me if I replace osmnx.gdf_from_place with osmnx.geocode_to_gdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants