Page 1 of 1

planBasicTours not accepting GPScoordinates in OG_GEODECIMAL

Posted: Thu Apr 27, 2017 7:47 am
by mujeeb
Problem:
xtour api accepting GPS coordinates in PTV_MERCATOR(e.g 16777907.815,-4080923.1128)
but not accepting GPS coordinates in OG_GEODECIMAL (e.g -34.421025,150.887075)

although i am setting in callerContext
"key": "coordFormat", "value": "OG_GEODECIMAL"

Steps to reproduce:

PTV xServer Raw Request Runner
https://xlocate-au-n-test.cloud.ptvgrou ... quest.html

see attached payload1.json with GPS coordinates in PTV_MERCATOR

see payload2.json with exactly same as payload1.json but GPS coordinates in OG_GEODECIMAL

paste payload1.josn & payload2.json in request runner
https://xlocate-au-n-test.cloud.ptvgrou ... quest.html
payload1.json works fine as it have GPS coordinates in PTV_MERCATOR but

payload2.json throwing
error:

Code: Select all

{
  "errorMessage": "Could not plan basic tours (Reason: Could not calculate distance table for dima with ID 1). Engine error: Locations not linked (code: -1023).",
  "errorKey": "10003",
  "exceptionType": "com.ptvag.xserver.xtour.XTourException"
}
i have also tried to shuffle x & y in logistic point. but it didn't worked in either way

as an workaround
i'm bound to use xlocate -> findAddresses to convert GPS coordinates
from OG_GEODECIMAL to PTV_MERCATOR before using xtour. (i have option of javascript only)
causing overhead.

if planBasicTours cannot accept GPS coordinates in OG_GEODECIMAL
is there better quick (in term of performance) for GPS conversion?

Thanks in Advance

Re: planBasicTours not accepting GPScoordinates in OG_GEODEC

Posted: Thu Apr 27, 2017 11:02 am
by Bernd Welter
Hello Mujeeb,

you tried to use the CallerContext to change the coordinate format:

Code: Select all

{
        // wrong spelling!
        "key": "coordFormat",
        "value": "OG_GEODECIMAL"
},
Unfortunately the key has to be CoordFormat.
By using the wrong spelling the server falls back to the default which is PTV_MERCATOR ;-)

Best
regards Bernd