Manoeuvres long and lat infos

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
g.fiume
Posts: 30
Joined: Wed Jan 25, 2017 9:17 am

Manoeuvres long and lat infos

Post by g.fiume »

Is it possible to have the exact manoeuvres coordinates? I need long & lat infos about some kind of manoeuvres. I've tried to have this info reaching the correspondent node but in nodes struct I've only x-offset and y-offset.
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Manoeuvres long and lat infos

Post by Bernd Welter »

Hi there,

just use the manoeuvres array:
each manoeuvre is linked to
  • int routeListSegmentIdx: The index of the corresponding RouteListSegment.

which is linked to firstPolyIdx = index of the segments first x,y-Coordinate
Best regards Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Manoeuvres long and lat infos

Post by Bernd Welter »

Hi there,

this should clarify what you have to do to get the coordinates of a manoeuvre:

Code: Select all

Route route = tour.route;
// determine the polygon points
PlainPoint[] arrPolygonPoints = route.polygon.lineString.wrappedPoints;
// identify the manoeuvre, e.g. the 1st one
RouteManoeuvre manoeuvre = route.wrappedManoeuvres[0];
// identify the manoeuvres segment
RouteListSegment segment = route.wrappedSegments[manoeuvre.routeListSegmentIdx];
// identify the segments polygon point
PlainPoint manoeuvrePoint = arrPolygonPoints[segment.firstPolyIdx];
Best regards
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply