Is it possible to have more details about a 2500 error key ?

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
Rich
Posts: 3
Joined: Thu Apr 28, 2022 3:55 pm

Is it possible to have more details about a 2500 error key ?

Post by Rich »

Hello,

I use the API with the calculateRoute endpoint, and

I exclude ferries (AVOID_FERRIES to 2501) and to test that it works well, I use a route from Athens to Crete which only includes a ferry route. So I get a 500 with payload:

Code: Select all

{
    "errorMessage": "cannot calculate route (concerning leg 1)",
    "errorKey": "2500",
    "exceptionType": "com.ptvag.xserver.xroute.XRouteException"
}
However for other cases, how can I make sure that the error comes from the fact that the possible routes necessarily have a point with ferry and not for another reason?


Here the payload I send in the request:

Code: Select all

{
  "details": {
    "polygon": true
  },
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "OG_GEODECIMAL"
      },
      {
        "key": "Profile",
        "value": "truckfast"
      }
    ]
  },
  "options": [
    {
      "parameter": "EXCLUDE_COUNTRIES",
      "value": "CH"
    },
    {
      "parameter": "AVOID_FERRIES",
      "value": "2501"
    }
  ],
  "waypoints": [
    {
      "coords": [
        {
          "point": {
            "x": 25.3702,
            "y": 35.307293
          }
        }
      ],
      "linkType": "AUTO_LINKING"
    },
    {
      "coords": [
        {
          "point": {
            "x": 23.729842,
            "y": 37.985466
          }
        }
      ],
      "linkType": "AUTO_LINKING"
    }
  ]
}
Thanks
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Is it possible to have more details about a 2500 error k

Post by Bernd Welter »

Hi Rich,

here's a generic article that describes the most common errors in routing:
https://xserver.ptvgroup.com/forum/view ... ?f=7&t=460
  • Linking Error: at least one of the stops couldn't be linked to the road network
  • Routing error: all waypoints have been linked but at least one leg wasn't
Now coming back to your question:
However for other cases, how can I make sure that the error comes from the fact that the possible routes necessarily have a point with ferry and not for another reason?
I think you can't. The maximum information you could get from the engine is "what leg is crucial?".
You can't get the info whether the ferry malus or the toll malus or a weight restriction is responsible for the error.
This is because there is not just one source (segment, ferry) to be blamed.

Imagine the following situation:
  • A river where you want to travel from one side to the other
  • There's a bridge and a tunnel
  • Your vehicle is to heavy for the bridge
  • Your vehicle is to tall for the tunnel
  • Algorithm returns with a "I can't route from start to destination"
Now what output would you expect?

Bernd
Attachments
ferry tunnel.png
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Rich
Posts: 3
Joined: Thu Apr 28, 2022 3:55 pm

Re: Is it possible to have more details about a 2500 error k

Post by Rich »

I understand, thanks for your help and the article :)
Post Reply