-
Notifications
You must be signed in to change notification settings - Fork 24
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
OSMnx has no attribute 'extended_stats' #27
Comments
AH ok I found this in the git history. extended_stats did exist within stats.py with the following message:
|
OK I updated this part to get the info straight from networkx. the following code will create the GPX file
|
Hi @joefizz, Thanks for looking at that, it seems that a new version of Thanks again! Matej |
For everyone looking for a workaround: if you want to create a GPX, the from libs.gpx_formatter import TEMPLATE, TRACE_POINT
from datetime import datetime
...
coordinates_path = convert_final_path_to_coordinates(org_graph, final_path)
trace_points = "\n\t\t\t".join([TRACE_POINT.format(
lat=lat, lon=lon, id=i, timestamp=datetime.now().isoformat()
) for i, (lat, lon) in enumerate(coordinates_path)])
gpx_payload = TEMPLATE.format(
name="everystreet route",
trace_points=trace_points,
center_lat=coordinates_path[0][0],
center_lon=coordinates_path[0][1]
)
with open("gpx_output.gpx", "w") as f:
f.write(gpx_payload) |
Trying to create the GPX file from the results but get an error that OSMnx has no attribute 'extended_stats'
Looking at the docs for OSMnx it seems extended_stats doesn't exist, unable to see if this has been deprecated either.
The text was updated successfully, but these errors were encountered: