Page 1 of 1

calculateMatrixInfo negative values

Posted: Mon Oct 15, 2018 10:13 am
by MichaelSchwabl
Hello!

We call calculateMatrixInfo from xRoute and get sometimes negative values for time and distance.
What is going wrong here?
We use "hpr-car"

startpoint
{
Lat: 48.348959136573484
Lng: 14.4385445796628
}

endpoint
{
Lat: 48.2597276
Lng: 14.2576042
}

Re: calculateMatrixInfo negative values

Posted: Mon Oct 15, 2018 10:17 am
by MichaelSchwabl
to be more precise, we get always -3211 for time and distance

Re: calculateMatrixInfo negative values

Posted: Mon Oct 15, 2018 10:38 am
by Bernd Welter
Hello Michael,

negative values indicate
  • either a linking issue (at leat one coord is located outside the potential linking area)
  • or a routing error (all locations were succesfully linked but afterwards the router didn't find a valid way through the net, e.g. due to "no ferries allowed" or other blocking attributes).
Taken from the RouteInfo class:
time:
Travel time in (includes link time)
NOTE:
  • 1) This time includes waiting times if the calculateTour method is used.
  • 2) In case of a road blocking on the static route the dynamic time on static route resp. Td(Rs) is infinite.
    If so parameter time is set to -1 provided that DYNAMIC_TIME_ON_STATICROUTE is set to 'true'.
  • 3) Otherwise negative values show error codes. Most common error codes here are -3120: At least one of the stations in the linking request could not be linked to the road network (coordinates might be outside of the map, far away from streets or close to streets which cannot be used for routing such as pedestrian zones, wood-paths and so on). -3211: No valid route found, one of the stations is located in an isolated area, or there is no route for the given restrictions, check the routing restrictions. Furthermore, -3211 is issued when this relation has not been calculated due to request abort.


Best regards,
Bernd

http://xserver.ptvgroup.com/fileadmin/f ... %7C_____61