Problem with different Profiles

On my local version of ORS i’ve got some problems with the different profiles:

The profile “driving-car” is working well, all other profiles does not work!

curl -X POST -H ‘Content-Type: application/json; charset=utf-8’ -i ‘localhost:8080/ors/v2/isochrones/driving-car’ --data ‘{“locations”:[[7.2009147,51.5368948]],“range”:[100]}’ IS WORKING,

and e.g.

curl -X POST -H ‘Content-Type: application/json; charset=utf-8’ -i ‘localhost:8080/ors/v2/isochrones/wheelchair’ --data ‘{“locations”:[[7.2009147,51.5368948]],“range”:[100]}’ IS NOT WORKING

But i do NOT get an error. I just get a Error when i use a profile which does not exist e.g. wheelchair2.

ERROR: {“error”:{“code”:3003,“message”:“Parameter ‘profile’ has incorrect value or format.”},“info”:{“engine”:{“version”:“6.2.1”,“build_date”:“2020-09-07T12:55:33Z”},“timestamp”:1599557420954}}

I found this: Enable/Disable profiles
But in my app.config.sample looks everything good(?):

“profiles”: {
“active”: [
“car”,
“hgv”,
“bike-regular”,
“bike-mountain”,
“bike-road”,
“bike-electric”,
“walking”,
“hiking”,
“wheelchair”
]

For me it looks like everything is enabled… In my app.config there is just the car profile:

“profiles”: {
“active”: [
“car”
],

but i think that doesnt matters because i did the setup with the app.config sample!

Also i found this: https://github.com/GIScience/openrouteservice/issues/200
So i tried:
curl -X POST -H ‘Content-Type: application/json; charset=utf-8’ -i ‘localhost:8080/ors/v2/isochrones?profile=wheelchair’ --data ‘{“locations”:[[7.2009147,51.5368948]],“range”:[100]}’

But i get an error about missing profile:
{“error”:{“code”:3001,“message”:“Parameter ‘profile’ is missing.”},“info”:{“engine”:{“version”:“6.2.1”,“build_date”:“2020-09-07T12:55:33Z”},“timestamp”:1599557557286}}

So at last it tried:
curl -X POST -H ‘Content-Type: application/json; charset=utf-8’ -i ‘localhost:8080/ors/v2/isochrones/wheelchair?profile=wheelchair’ --data ‘{“locations”:[[7.2009147,51.5368948]],“range”:[100]}’
But i get nothing back, like i would hide “?profile=wheelchair”

Because i found this: No results for HGV profile
i tried it with the API Playground, and there everything works… so it does look for me there is a fault in my local setup(!?)

I addition i found a little fault(??) in the service:
When i use the “directions/driving-cat/json” , also without “/json”, because json is default i get very interesting geometry:
“geometry”: “{wpyHcl}j@kAGiApGo@pDEh@Bx@F\\hA|GaCtAyDjBYoE?gAFs@p@sBHs@?w@I}F?G?wA?s@@WHoAPqAHc@lA}EnBmHn@kAA_D~@aCNq@F_@Da@FaBAm@AO”
That does not look correct for me!

At last i want to know if its make sense for you, when i post in a new topic my solution for setting up the service with a few commands??? when i fixed all the errors?

I think it would be nice for future Users, but i dont know if your place for questions is the right location…

Best regards!

Hi @TommyK

There is no problem with the geometry. This is encoded polyline format.
See e.g. Encoded polylines

Please check the request structure in the API Playground thoroughly.
You can let it generate a curl request for you with the current settings if you click the example code button. Then just replace https://api.openrouteservice.org/ with localhost:8080/ors/ and it should work.
In the request above, you are passing the profile to the POST endpoint as a query parameter and not as an url parameter.

For your app.config and ors setup issues maybe someone else can help.
Best regards

Thanks for your answer, but i think i did try what you mean…

Yet i tried again and just copied from the Playground:
curl -X POST
‘localhost:8080/ors/v2/isochrones/driving-car’
-H ‘Content-Type: application/json; charset=utf-8’
-H ‘Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8’
-H ‘Authorization: myAPIkey’
-d ‘{“locations”:[[7.2009147,51.5368948]],“range”:[300]}’
IS WORKING

and

curl -X POST
‘localhost:8080/ors/v2/isochrones/driving-hgv’
-H ‘Content-Type: application/json; charset=utf-8’
-H ‘Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8’
-H ‘Authorization: myAPIkey’
-d ‘{“locations”:[[7.2009147,51.5368948]],“range”:[300]}’

IS NOT WORKING…

I still have problems with all the profiles apart from the car-driving, which is working well…

I think i need to change the “app.config” outside the docker (mapping ist working well)…

I added

    "hgv", "bike-regular"

TO

    "profiles": {
      "active": [
        "car"
      ],

and used

docker-compose up -d 

for updating ORS, i get back:

     ors-app is up-to-date

But the car-profile still is the only working one.

Eg in QGIS (ORS Tools connected with my local Setup) i get the Error:

 Traceback (most recent call last):
 File "C:/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_point_proc.py", line 199, in processAlgorithm
 response = clnt.request('/v2/isochrones/' + profile, {}, post_json=params)
 File "C:/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\client.py", line 192, in request
 return json.loads(content.decode('utf-8'))
 File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\json\__init__.py", line 348, in loads
 return _default_decoder.decode(s)
 File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\json\decoder.py", line 337, in decode
 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
 File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\json\decoder.py", line 355, in raw_decode
 raise JSONDecodeError("Expecting value", s, err.value) from None
 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

What i need to change for enabling all the other profiles??

For all of you with the same problem:

I have found a solution:
Before your first Setup of your local ORS you have to change somethin in the Dockerfile.

At the bottom of the file there is on line which disable all the profiles but cars. You can replace the vector

         [1, 2, 3, 4, 5, 6, 7, 8]

with

         [9]

because there is no profile with the Number 9.
Just deleting the content of the array ([]) doesn’t work.