A month ago it was working, now it doesn’t. Trying to understand the new API stuff, but it refuses to work still. It used to work so well, just put in the API key when prompted.
What I’ve tried: adding these lines of code before:
I just had a quick look and there are a couple of things that have been put in wrong in the request itself, and an issue relating to the creation and storage of the API key.
Firstly, the options part should be `options(openrouteservice.url = “https://api.heigit.org/openrouteservice/”)` - in particular note that it needs to be https rather than http else the authorization header gets stripped during a redirect.
Secondly, it seems that setting the api_key through the `ors_api_key` method only works if the url of the service is set to be the old default api.openroutservice.org address. To use your API key with the “customised” APIi address, you will need to set the key using environment variables, e.g. `Sys.setenv(ORS_API_KEY=‘xxx’)`. Then you should be able to use the package in the same way as before.
Hey it finally works. The package should definitely be updated to have the right link for this. Part of my problem was also the url being the v2 matrix one and not the generic one.
New problem. The way my thing works is it splits about 3000 features into 179 batches of 18 features each. Trying to get minimum drive times and I’m taking the distance between a feature and 10 candidate locations. Problem: with the original 18 batches with adjustments to have 93 batches of 35 features, I get:
Error in map(): In index: 81.
Caused by error:
! Openrouteservice API request failed
[6020] Unable to compute a distance/duration matrix: Search exceeds the limit of visited nodes.
Run rlang::last_trace() to see where the error occurred.
Called from: signal_abort(cnd, .file)
Increasing the batch size further (say splitting into 41 batches with more features) I get a different error:
Error in map(): In index: 31.
Caused by error:
! Openrouteservice API request failed
[6004] Request parameters exceed the server configuration limits. Only a total of 3500 routes are allowed.
Run rlang::last_trace() to see where the error occurred.
Called from: signal_abort(cnd, .file)
Previously the 18 per batch was successful. How might I solve such a problem?