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

use of osmnx for local OSM files #51

Closed
sevamoo opened this issue May 6, 2017 · 3 comments
Closed

use of osmnx for local OSM files #51

sevamoo opened this issue May 6, 2017 · 3 comments

Comments

@sevamoo
Copy link

sevamoo commented May 6, 2017

Thanks a lot for your great and neat work @gboeing
What am I writing is not an issue, so I hope it is OK to post it here.
I am wondering if it is possible to use local sources of OSM instead of downloading from OSM server?
What I am interested is to take .png pics (e.g. only roads or only roads and buildings) of up to million locations in different continents.
So far, I am using static API of Mapbox with a certain styled map.
I have more info about my project here
Thanks in advance.
Best
Vahid

@gboeing
Copy link
Owner

gboeing commented May 7, 2017

Potentially, but it would take some hacking of OSMnx. If you're up for it, the key function would be ox.create_graph: https://github.com/gboeing/osmnx/blob/master/osmnx/core.py#L1134

This function takes a list of JSON responses from the Overpass API and turns them into a networkx graph. You could load your existing downloaded data (it would have to be in the correct format, as returned by the Overpass API), and pass it into create_graph. It wouldn't necessarily be easy, but it's possible.

@sevamoo
Copy link
Author

sevamoo commented May 7, 2017

Thanks. I will give it a try and update you here, if it worked.
Best
Vahid

@gboeing
Copy link
Owner

gboeing commented Oct 18, 2017

@sevamoo this "graph from .osm file" functionality has been added in #95

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

No branches or pull requests

2 participants