-
Notifications
You must be signed in to change notification settings - Fork 84
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
osm loader -- support for very large queries #41
Comments
If you have a network that large won't you be unable to load it into memory anyway, even if it does make it to disk? |
Well, the final network shouldn't be that big. Before the OSM loader was added, @fscottfoti built me a network that covers the state of MD (an h5 file about 50mb). I want to create a similar network from scratch using the OSM loader, but when I try, eg:
python eats up all of the machine's RAM, then quits with a memory error message. The same thing happens on an amazon server with 80gb of ram. There's no way the network is actually that big. Is it possible that something weird is happening during the overpass query? maybe something like this? http://stackoverflow.com/questions/16694907/how-to-download-large-file-in-python-with-requests-py |
The overpass request response is JSON so there's really no way to stream it. You have to have the entire document in order to parse it. When I get a chance to work on this the first step will be to figure out exactly what's using all the memory, whether it's the query data or some subsequent step. |
BTW, I tried this out. First I tried using a network from the Bay Area - basically all the 9 counties out basically to Sacramento. It ran fine in only about 5GB of memory and about 24 minutes. So that was great. So I tried @knaaptime's query and did get a memory error on a 32GB machine. The place it errored for me was very strange though - in the
|
Not the newish https://github.com/UDST/osmnet may be relevant here. |
Thanks @Eh2406 that is correct the new OSMnet package fixes the issue with large bounding box queries: https://github.com/UDST/osmnet. The PR to replace the functions inside Pandana is still pending but will be merged soon so in the meantime anyone can use OSMnet to extract the nodes and edges from OSM and then place it inside a pandana network object. Will keep this issue open until the PR is merged and ready. |
Thanks for the heads up. I noticed osmnet when i saw urbanaccess was released, and figured it would solve this issue. I saw the PR get merged on friday so I ran the query again using osmnet. It finished in about an hour on my current-gen macbook pro
All looks good. Thanks for your great work |
Fixed with #63 |
right now, very large OSM queries fail because python runs out of memory before the network object can be written to disk.
Would it be possible to add an option in the OSM loader to stream the overpass request to disk, allowing for really big networks?
The text was updated successfully, but these errors were encountered: