PTV Result vs. GoogleMaps Result

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
peter.detzner
Posts: 12
Joined: Fri Feb 10, 2017 6:57 am

PTV Result vs. GoogleMaps Result

Post 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;
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: PTV Result vs. GoogleMaps Result

Post 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
Joost Claessen
Senior Technical Consultant
PTV Benelux
Post Reply