Wheelchair direction problem

Hello,

In a free app, I’m trying to integrate the direction calculation for wheelchairs like: “v2/directions/wheelchair/gpx”

For this I am inspired by your documentation: GitHub - GIScience/openrouteservice-docs: This repository stores the swagger specifications of the openrouteservice API. Browse to swagger for a detailed overview.

However, I cannot get a correct response from your server, I get a 400 (bad request) error.

Please note that I have already implemented a successful “cycling” and “foot-hiking” call, so the problem must be with the JSON sent.

The JSON file is as follows:

{
	"coordinates":[[lon1,lat1],[lon2,lat2]],
	"elevation":true,
	"preference":"recommended",
	"units":"km",
	"language":"en-us",
	"profile_params":
	{
		"restrictions":
		{
			"surface_type":"cobblestone",
			"track_type":"grade1",
			"smoothness_type":"good",
			"maximum_sloped_curb":0.06,
			"maximum_incline":6
		}
	}
}

Another note: you write for the type of surface : default is “cobblestone:flattened”.

While on the site openstreetmap, it is specified that this value should not be used !?

Thank you in advance for your answer

Hi @COM-ADD,

i’d suggest you use our API playground to get familiar with the API, together with the backend documentation instead of the deprecated openrouteservice-docs repository.

I guess your problem is the usage of maximum_sloped_curb instead of maximum_sloped_kerb.

Regarding the surface type, you are indeed correct.

I have opened an Issue in our backend repo where you can track the status and comment if something is missing.

Best regards

Thank you very much for your very fast answer.

I did not see that in your API Playground that “profile_params” are under “options” section.

So the new JSON is:

{
	"coordinates":[[8.47672367095947,49.484676361084],[8.483469,49.486174]],
        "elevation":true,
        "preference":"recommended",
        "units":"km",
        "language":"fr-fr",
	"options":
	{
		"profile_params":
		{
			"restrictions":
			{
				"maximum_incline":6,
				"maximum_sloped_kerb":0.06,
				"minimum_width":2.5,
				"smoothness_type":"good",
				"surface_type":"cobblestone",
				"track_type":"grade1"
			}
		}
	}
}

Note that the 2 points are in Mannheim Germany.

But now, I have a 404 Notfound error with the message “Route Could Not Be Found - Unable to Find a road Between points 1 and point 2”.

And, my code have the same error as your API Playground !

What is amazing because using your OpenRouteService route planner - directions, isochrones and places service for a Wheelchair and the same data abd same coordinates of points 1 and 2, the interactive application finds a path and visualize it on the map ?!

Any suggestion ?

For me it doesn’t find a route for this setting:

https://maps.openrouteservice.org/#/directions/49.484676361084,8.47672367095947/49.486174,8.483469/data/{"coordinates":"8.47672367095947,49.484676361084;8.483469,49.486174","options":{"zoom":8,"profile":"wheelchair","preference":"recommended","options":{"profile_params":{"restrictions":{"maximum_incline":"6","maximum_sloped_kerb":"0.06","minimum_width":2,"smoothness_type":"good","surface_type":"cobblestone","track_type":"grade1"}}}}}

Did you choose sett instead of cobblestone as surface_type in the planner?
Because with sett it can find a route …

1 Like

Hello,

In fact now your service “maps.openrouteservice.org” also gives an error for the 2 points that I had indicated to you.

So I tried with two other points and it works.

Thank you for your help and thank you for making such a fantastic job available.

Best regards

1 Like