Closed friedtea15 closed 1 year ago
To be clear - the only thing present in my osm_network folder is the us_01.pbf
No GTFS files.
Ran it with a smaller extract from the input .pbf (just one MSA; stl.pbf) and produced the same error:
Mar 17, 2023 9:49:52 AM org.hsqldb.persist.Logger logInfoEvent
INFO: dataFileCache open start
Error in setup_r5(data_path = "~/Documents/logistics crunch/national_analysis/spatial_data/osm_network") :
java.lang.NullPointerException
Closes an hour later with illegal reflective error. Same as above.
"extdata/poa" still works successfully.
Ran it with a smaller extract from the input .pbf (just one MSA; stl.pbf) and produced the same error:
Mar 17, 2023 9:49:52 AM org.hsqldb.persist.Logger logInfoEvent INFO: dataFileCache open start Error in setup_r5(data_path = "~/Documents/logistics crunch/national_analysis/spatial_data/osm_network") : java.lang.NullPointerException
Closes an hour later with illegal reflective error. Same as above.
"extdata/poa" still works successfully.
Hi @friedtea15, could you please run setup_r5()
with verbose = TRUE
?
Hi @friedtea15 . Thanks for sharing the files. I've tried building the network with the stl.pbf
file and encountered the same error message. Note that r5r
works fine with OSM data downloaded from Geofabrik, though. So I assume the error emerges because the OSM is being cropped. Unfortunately, the Java error messages are often not very informative, so I cannot really spot the cause of the problem. I would suggest though you have a look at these instructions from Conveyal on how to prepare OSM data.
ps. If you do not need the geometries of the trips, I would strongly suggest you do not use do not use detailed itinerary, and instead you should use the travel time matrix function, which is way way more efficient.
Thank you @rafapereirabr and @dhersz
I was able to remove the error using this workaround: https://github.com/conveyal/r5/issues/276
It had to do with the clipping with osmconvert. Switched to osmosis and kept the ways and relations.
However, I ran into an extent error:
Error in setup_r5(data_path = "~/Documents/logistics crunch/national_analysis/spatial_data/osm_test") :
java.lang.IllegalArgumentException: Geographic extent of street layer (36683282 km2) exceeds limit of 975000 km2.
From the closed issues, there doesn't appear to be a workaround for this. Odd given that the the extent used covered just one MSA and most certainly not 3 million sq km. I've uploaded the updated stl.osm.pbf to the drive.
Also alas, the route geographies are all I need from the tool :)
Hi @friedtea15 , I'm glad to hear there is a quick fix for the problem of clipping OSM data with osmosis. Regarding the extent limit of 975000 km2, this is hardcoded upstream in R5 there is nothing we can do from the r5r
side.
I guess we can close this issue now. Right?
Hi @friedtea15. I've opened the stl.osm.pbf in QGIS and it looks like it still covers the entirety of the US. Please, check the clipping process to see if there's something missing. Also, I think 20GB of RAM maybe not enough for running r5r in such large areas.
Hi - sorry for the delay. I was able to complete the process. Basically, I had to iterate the process for each MSA separately to workaround the extent and processing constraints. Worked like a charm. Thanks again for the replies, consider this closed!
Hi - I'm using r5r to run a detailed itinerary process for ~50 U.S. metropolitan areas. I downloaded the US osm.pbf file from Geofabrik, then used osmconvert to clip the file based on island bounding polygons (metropolitan area extents in one .poly). The outputted .pbf file is ~4gb (available here as us_01.pbf): https://drive.google.com/drive/folders/1gNW88nVDUhKxArF-KRWGe3j1RvwC0Knr?usp=sharing
When running setup_r5(), it appears I get several errors after ~4 hours of runtime:
Below is my r5r::r5r_sitrep():
I ran set up "extdata/poa" and it did not reproduce the error.
Here's the full console text. error.txt
Thank you for your work!