Problem with displaying route

PTV's mobile solution based on off-line maps - standard application and SDK
Post Reply
mnawias
Posts: 13
Joined: Fri Nov 06, 2020 12:15 pm

Problem with displaying route

Post by mnawias »

I have calculated route. When I draw it on xServer.NET it looks diferent then in PTV Navigaion SDK.

Code: Select all

[CLIENT]
ROUTENAME=xServer 2 - guided navigation route export
MAP_VERSION=unknown

[COORDINATES]
STATION1=2152917,6487583
STATION2=2291633,6826363
STATION3=2041433,7225973
STATION4=2179438,7132999

[VISITED]
STATION1=0
STATION2=0
STATION3=0
STATION4=0

[Station2Segmentcenters]
Point1=2153001,6487680,46
Point2=2152868,6488104,326
Point3=2152255,6488460,304
Point4=2152197,6488871,31
Point5=2153770,6490742,4
Point6=2153770,6491179,355
Point7=2154121,6491610,94
Point8=2153938,6491723,263
Point9=2146334,6494125,295
Point10=2139252,6494765,18
Point11=2140217,6503641,333
Point12=2137136,6510944,343
Point13=2136499,6512755,17
Point14=2138281,6520291,349
Point15=2134635,6527068,339
Point16=2132548,6535276,346
Point17=2129592,6542456,319
Point18=2127813,6550368,0
Point19=2127164,6558068,22
Point20=2130436,6565484,19
Point21=2130915,6572987,334
Point22=2127810,6579973,10
Point23=2128900,6584097,7
Point24=2130713,6592160,28
Point25=2131507,6593541,53
Point26=2132603,6594476,49
Point27=2137942,6601070,26
Point28=2142160,6608539,38
Point29=2147770,6617355,42
Point30=2152984,6624752,22
Point31=2156242,6633212,33
Point32=2163483,6642993,32
Point33=2166773,6651279,33
Point34=2171298,6658590,13
Point35=2173715,6666502,35
Point36=2179078,6674481,29
Point37=2182382,6682339,18
Point38=2183099,6685651,11
Point39=2182565,6698230,333
Point40=2179527,6709242,8
Point41=2177277,6720671,332
Point42=2176613,6728754,23
Point43=2179588,6738108,19
Point44=2179376,6746066,90
Point45=2181543,6755601,18
Point46=2185792,6762964,15
Point47=2184279,6771292,328
Point48=2184873,6773177,77
Point49=2197089,6777544,54
Point50=2208358,6786365,50
Point51=2217092,6792728,63
Point52=2224210,6797504,49
Point53=2234195,6801467,78
Point54=2242845,6804146,65
Point55=2251132,6806089,92
Point56=2262362,6807289,57
Point57=2272556,6811351,68
Point58=2282411,6814991,63
Point59=2292217,6818873,77
Point60=2292674,6818813,266
Point61=2291679,6819168,4
Point62=2291931,6819661,84
Point63=2291686,6826416,272

[Station3Segmentcenters]
Point1=2291847,6826416,88
Point2=2291934,6826561,0
Point3=2291840,6827915,270
Point4=2291429,6828523,274
Point5=2283043,6829182,278
Point6=2274833,6830416,270
Point7=2266717,6831628,279
Point8=2258591,6832835,283
Point9=2253097,6833217,223
Point10=2251678,6830382,224
Point11=2246450,6832051,224
Point12=2240445,6826303,230
Point13=2236126,6819700,244
Point14=2227726,6816283,246
Point15=2220021,6813767,276
Point16=2212016,6816975,303
Point17=2204015,6818724,281
Point18=2196452,6822432,299
Point19=2188860,6825539,288
Point20=2181218,6827737,301
Point21=2173225,6830860,279
Point22=2164180,6833588,321
Point23=2159246,6841918,326
Point24=2153135,6849442,344
Point25=2149071,6857888,316
Point26=2143506,6865694,322
Point27=2138824,6872747,309
Point28=2129792,6880731,288
Point29=2123710,6887603,309
Point30=2115938,6894176,310
Point31=2109190,6904492,331
Point32=2104563,6912125,309
Point33=2099961,6920344,326
Point34=2097029,6928085,3
Point35=2094620,6937168,321
Point36=2087680,6948500,322
Point37=2081740,6957409,343
Point38=2077794,6967009,323
Point39=2083103,6974308,349
Point40=2083320,6983020,23
Point41=2084986,6991326,354
Point42=2083993,7001263,14
Point43=2083813,7013476,356
Point44=2082228,7021660,0
Point45=2080218,7035930,5
Point46=2077784,7047627,353
Point47=2077139,7057383,317
Point48=2070259,7062442,352
Point49=2068554,7071542,342
Point50=2068982,7081072,346
Point51=2072198,7090694,16
Point52=2072106,7101746,343
Point53=2071404,7111565,7
Point54=2071469,7121326,350
Point55=2071298,7131618,355
Point56=2071361,7140153,14
Point57=2072784,7148408,354
Point58=2074850,7157392,355
Point59=2075918,7167052,15
Point60=2077075,7175844,45
Point61=2076901,7187067,345
Point62=2073273,7196335,320
Point63=2069656,7204608,0
Point64=2069177,7207633,3
Point65=2067225,7215773,345
Point66=2062377,7222735,341
Point67=2059356,7228492,282
Point68=2050677,7226777,242
Point69=2042316,7226991,270
Point70=2041881,7227143,282
Point71=2041563,7227008,204
Point72=2041193,7226029,108

[Station4Segmentcenters]
Point1=2041561,7226251,15
Point2=2042145,7226946,67
Point3=2042508,7226977,102
Point4=2051622,7227371,51
Point5=2059546,7227338,134
Point6=2064207,7219979,125
Point7=2066835,7217197,88
Point8=2076120,7221227,76
Point9=2085121,7222112,114
Point10=2092874,7218031,132
Point11=2103775,7211601,104
Point12=2116090,7207051,111
Point13=2124333,7202184,151
Point14=2132791,7196456,141
Point15=2142116,7193281,90
Point16=2151442,7193120,101
Point17=2158695,7188234,114
Point18=2166253,7183722,143
Point19=2174703,7180990,133
Point20=2181663,7175291,150
Point21=2187759,7167197,179
Point22=2190217,7157020,175
Point23=2192215,7147653,145
Point24=2193566,7143719,227
Point25=2187211,7137632,236
Point26=2180386,7133051,304
Przechwytywanie.PNG
Przechwytywanie2.PNG
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Problem with displaying route

Post by Bernd Welter »

Dzien dobre,

let's compare different perspectives and contributions. Here's my assumption:
  • You calculated a route with the xRoute2.calculateRoute and requested some result fields: polyline and guidedNavigationRoute. The polyline contains a large number of hundreds or even thousands of points that create a line that completely follows the whole segment network (on a visual level). At the same time the guidedNavigationRoute contains only a small subset of those points: only those so-called magnetic via points (MVP) that are needed to push a re-routing on the navigation device to follow the original route (e.g. if you follow a highway for hundred kilometers we only need a few MVPs
  • When you trigger a navigation process based on the MVP as contained in the BCR file the mobile device decides autonomously how to get from one point to the next one. Depending on the routing options on the mobile device the geometry of the route may look different.
Does this resolve the question?

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:
SebastianSchlichting
Posts: 18
Joined: Tue May 28, 2019 10:45 am

Re: Problem with displaying route

Post by SebastianSchlichting »

I've attached a screenshot. There you will see that the MVPs are on the exact position as the SDK is calculating the route. So the error lies within the creation process of the BCR with Guided Navigation.
Attachments
20210811.png
mnawias
Posts: 13
Joined: Fri Nov 06, 2020 12:15 pm

Re: Problem with displaying route

Post by mnawias »

Bernd Welter wrote:Dzien dobre,

let's compare different perspectives and contributions. Here's my assumption:
  • You calculated a route with the xRoute2.calculateRoute and requested some result fields: polyline and guidedNavigationRoute. The polyline contains a large number of hundreds or even thousands of points that create a line that completely follows the whole segment network (on a visual level). At the same time the guidedNavigationRoute contains only a small subset of those points: only those so-called magnetic via points (MVP) that are needed to push a re-routing on the navigation device to follow the original route (e.g. if you follow a highway for hundred kilometers we only need a few MVPs
  • When you trigger a navigation process based on the MVP as contained in the BCR file the mobile device decides autonomously how to get from one point to the next one. Depending on the routing options on the mobile device the geometry of the route may look different.
Does this resolve the question?

Best regards,
Bernd
This doesn't resolve the question. We need to display route exactly like in xServer.net. Is there any other method to do that? Can we draw polyline in PTV Navigation SDK?
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Problem with displaying route

Post by Bernd Welter »

Hello Mateusz,

I'd like to reproduce the whoile story. Could you please provide the xRoute request and the complete response?
First potential question is then "does the response polyline" look equal to the "BCR viapoints"?
Feel free to send it via email to bernd.welter@ptvgroup.com if the request is seen to contain "confidential" data.

I'm sceptic ;-)

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:
mnawias
Posts: 13
Joined: Fri Nov 06, 2020 12:15 pm

Re: Problem with displaying route

Post by mnawias »

Request and response are in attachments. Is there any method in api to draw polyline in PTV Navigation SDK?
request.txt
(2.98 KiB) Downloaded 489 times
response.txt
(1.06 MiB) Downloaded 501 times
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Problem with displaying route

Post by Bernd Welter »

Got it:
the two different geometries have been caused by some mistake. The pictures / geometries are based on
- shortest route
- fastest route
;-)
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