Error on routing - method not allowed

I have an inputlayer with some lines (each has only 2 points). I want to route a possible way for each line. It should be routing between the starting and the end of the line.

Is this possible? Do i have to “transform” the layer?

If i try it i always get this error:

Network error #405: Error transferring https://api.openrouteservice.org/v2/directions/driving-car/geojson?coordinates=16.45334,48.26959%7C16.453581,48.270512&elevation=True&format=geojson&geometry=true&geometry_format=geojson&id=None&instructions=false&preference=fastest&profile=driving-car - server replied: Method Not Allowed

Hi @gitalexa,

The v2/directions/{profile}/geojson endpoint only takes POST requests.
You seem to be sending a GET request.

Please check the documentation on https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/geojson/post and take a look at the examples (example code button next to Call button)
You need to send your parameters in the Body of the request.

Best regards

Hi @amandus,

i am using the gui from the plugin in qgis. So i cant’t change the way how it send the request…

Can it also depending in the layertype of my qgis-project?

Alex

Hi @gitalexa,
I just looked into the code for the plugin and it seems it is a bug in there - I don’t know the code well though so I can’t say for sure. I have created an issue for it though, so when there is the next releases (which will hopefully be relatively soon) that should be fixed (https://github.com/GIScience/orstools-qgis-plugin/issues/123)

For now though, it seems the only way around would be to use point layers rather than line. I don’t think there is a way though of creating multiple routes from the same layer this way though

@gitalexa

this should be finally fixed in the new 1.3.0 release of the plugin

Cheers

1 Like