xRoute calculateRoute not using Roundabout for turn

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.

xRoute calculateRoute not using Roundabout for turn

Postby Ries » Fri Aug 02, 2019 12:22 pm

Hi,

I have a problem with xRoute's calculateRoute function: Having three waypoints the calculated route makes a long detour instead of using a roundabout for a much shorter route (on the attached image I have marked the expected route in green).

Any help/pointers would be appreciated.

Json Request:
Code: Select all
{
  "waypoints": [
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x":   10.805523,
            "y": 53.696013
          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 10.80550016454624,
            "y": 53.696549005418177

          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 10.805411578124581,
            "y": 53.695153428461083

           
          }
        }
      ]
    }
  ],
  "exceptionPaths": null,
  "details": {
    "manoeuvres": true,
    "polygon": true,
    "detailLevel": "STANDARD",
    "segments": true,
    "featureDescriptions": true
  },
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "OG_GEODECIMAL"
      },
      {
        "key": "ResponseGeometry",
        "value": "WKB"
      },
      {
        "key": "Profile",
        "value": "Truck"
      }
    ]
  }
}


Image
Ries
 
Posts: 5
Joined: Wed Aug 16, 2017 7:57 am

Re: xRoute calculateRoute not using Roundabout for turn

Postby Bernd Welter » Mon Aug 05, 2019 1:59 pm

Hello Tobias,

which map (or Service URL) do you use?
WHat happens if you add a point of the roundabout to the input waypoints list?

Best regards,
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1353
Joined: Mon Apr 14, 2014 10:28 am

Re: xRoute calculateRoute not using Roundabout for turn

Postby Bernd Welter » Mon Aug 05, 2019 2:09 pm

Hi again,

I reproduced the scenario on the following service URL:
https://api-test.cloud.ptvgroup.com/pag ... quest.html
4stops.PNG
shorter distance (496m) but longer period (112sec)
3stops.PNG
longer distance (512m), but shorter period (105sec)

So by optimizing "by period" you get the track without the roundabout...

Any further questions?

Best regards,
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1353
Joined: Mon Apr 14, 2014 10:28 am

Re: xRoute calculateRoute not using Roundabout for turn

Postby Ries » Tue Aug 13, 2019 1:03 pm

Hi Bernd,

thanks for your reply, but it does not quite capture my problem.
In your case the difference between the two routes is only 7 seconds / 16 meters and depending on distance or time one or the other route is better.

However in my case, as displayed on the screenshot in my original post, the computed route is much worse in time as well as distance.

Computed Route (red): distance: 2869, time: 398
Expected Route (green): distance: ~568, time: ~86

I'm using the PTV xServer Raw Request Runner on a local server (JSON, xRoute, calculateRoute).

Best regards, Tobias
Ries
 
Posts: 5
Joined: Wed Aug 16, 2017 7:57 am


Return to PTV xRouteServer

cron