Page 1 of 1

PTV Result vs. GoogleMaps Result

Posted: Tue Apr 11, 2017 9:35 am
by peter.detzner
I was comparing some results of the calculateRoute from your xRouteService with the GoogleMaps Service.

And I am a little bit confused, since I am receiveng a small detour based upon xRoute.calculateRoute(...). The xRoute calculated Route has a length of approx. 2,2km, the Google Maps has a lenght of 400m.

Why do I have such a detour? I would assume, more or less, the same result as from Google Maps.
PTV xRoute.calculatedRoute() vs Google Maps.Route()
PTV xRoute.calculatedRoute() vs Google Maps.Route()
On the left side: xRoute.calculatedRoute(...)
Red Marker = Start
Orange Marker = Via
Green Marker = Destination

On the right side: Google Maps()

Addresses:
Street + HouseNumber; Plz;City
Bandstahlstraße 2;58093; Hagen;
Bandstahlstraße 4;58093; Hagen;
Walzenstr 2;58093; Hagen;
Werkzeugstraße 2;58093; Hagen;
Bandstahlstraße 15;58093; Hagen;

Re: PTV Result vs. GoogleMaps Result

Posted: Tue Apr 11, 2017 9:41 am
by Joost
Did you set the viaType on the intermediate points?

If you do not specify a viaType xRoute default to VIA. this means xRoute assumes you are staying on the road and will avoid making a U-turn. If you set the viaType to VIA_STOP, xRoute assumes you are leaving the road and this after the point can go back into the direction you came from.

For more details please check the API documentation.

Waypoint documentation:
http://xserver.ptvgroup.com/fileadmin/f ... ypointDesc
ViaType enumeration:
http://xserver.ptvgroup.com/fileadmin/f ... iaTypeEnum