Calculate distance and time between maneouvres and segments

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
Patricia
Posts: 7
Joined: Wed Feb 25, 2015 7:42 am

Calculate distance and time between maneouvres and segments

Post by Patricia »

Is it posible calculate the distance and time between two segments of a route? and also, Is it posible calculate the distance and time between Maneouvres of a route?

I'm using CalculateExtendedRoute for get Route between two or more waypoints.

Thanks in advance.
User avatar
Bernd Welter
Site Admin
Posts: 2664
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Calculate distance and time between maneouvres and segme

Post by Bernd Welter »

Hello Patricia,

you can derive the required information from the various arrays that are part of the result "route" object:
http://xserver.ptvgroup.com/fileadmin/f ... %7C_____58

It contains several arrays that are cross referencing each other.

A spontaneous recommendation from my side is
  • The distance between two segments segment[index1] and segment[index2] is
    distance := route.segments[index2].accDist - route.segments[index1].accDist
  • The distance between two maneouvres is based on the manouvres segments:
    distance := route.segments[manoeuvres[index2].routeListSegmentIndex].accDist - route.segments[manoeuvres[index1].routeListSegmentIndex].accDist


Best regards Bernd
Post Reply