Instructions missing if Geometry is set to false

I’am calling directions with POSt and using this like body

{
   "preference":"shortest",
   "units":"km",
   "language":"fr",
   "geometry":"false",
   "instructions":"true",
   "coordinates":[
      [
         6.791700,
         51.999200
      ],
      [
         6.791700,
         53.109200
      ]
   ],
   "options":{
      "avoid_countries":[
         
      ],
      "avoid_borders":"none",
      "avoid_features":[
         
      ],
      "profile_params":{
         "restrictions":{
            "width":0.0,
            "height":0.0,
            "weight":32.0,
            "length":0.0,
            "axleload":3,
            "hazmat":false
         }
      }
   }
}

I went to have the response without geometry, but even with geometry = false I’am having it on my response. The only way to remove it, is to put instructions and geometry both to false, but this will also remove the segments and the instructions from the response.

Are there anyway to have the instructions without the geometry when i’am routing only two points?

PS: When having more than two points and geometry false and instructions true it worked, i can have the instructions without the geometry.

Hi @hamzarhaiem,

i can confirm the problem.
Would you mind opening an issue on https://github.com/GIScience/openrouteservice/issues and describe the problem?

Best regards

2 Likes

Done! I have a last question, can we juste have the segments without the steps?

Best regards

So basically you just need the summary of each step?

The whole step object is removed for instructions:false. Logic wise this could be considered a bug…
You could also discuss this in an issue in the backend.

But it also can be easily fixed on your side by looping over the response object and remove the parts you do not want.
Furthermore if you only need distances or durations between points you should rather use the v2/matrix endpoint.

1 Like

When i put instructions = false it wiped all the segments section too, should i report this too? Or it’s normal to tie segments and sections?