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

Error in setup_r5(data_path, verbose = FALSE) : java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 3447965 #191

Closed
Planetizan opened this issue Aug 6, 2021 · 8 comments

Comments

@Planetizan
Copy link

Planetizan commented Aug 6, 2021

When creating network from open street map file for Florida and southern region of USA, following error shows up:

Error in setup_r5(data_path, verbose = FALSE) :
java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 3447965

Could you please help how to solve this? Is this error caused by faulty open street map file.

Thank you!

@mvpsaraiva
Copy link
Collaborator

Hi @Planetizan.

I've got the same error here with the southern US osm.pbf file.This seems to be the same as issue #141, which apparently is caused by an upstream bug in R5. You can use the workaround of this comment and use osmconvert to remove turn restrictions from the OSM network. After I did this, I've managed to create the network with setup_r5().

Please let us know if it works.

@Planetizan
Copy link
Author

Planetizan commented Aug 6, 2021 via email

@Planetizan
Copy link
Author

Planetizan commented Aug 6, 2021 via email

@mvpsaraiva
Copy link
Collaborator

For drop relations, I wrote a script replacing --drop-author with --drop-relations and pressed enter.

That's exactly how I did it. It really takes a while to process, because the input file is quite large. setup_r5 should take a while as well, just remember to allocate enough memory for Java, by using something like options(java.parameters = "-Xmx16G") at the beginning of your script.

@Planetizan
Copy link
Author

Planetizan commented Aug 6, 2021 via email

@mvpsaraiva
Copy link
Collaborator

I've did it in macOS, and the app didn't close. The terminal console was stuck during the entire process, and then it finished without any hint.

@mvpsaraiva
Copy link
Collaborator

Hi @Planetizan. Did using osmconvert solve your problems? Can we close this issue?

@mvpsaraiva
Copy link
Collaborator

I'm closing this issue for now. @Planetizan, please feel free to reopen it if you need further help.

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