planBasicTours not accepting GPScoordinates in OG_GEODECIMAL

This forum deals with any kind of trip optimization based on xTour1, xTour2 and the Developer APIs "RouteOptimization" and "SequenceOptimization". No matter whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Attention: this does not refer to PTV Optiflow SaaS and PTV Developer RouteOptimization Optiflow.
Post Reply
mujeeb
Posts: 2
Joined: Wed Apr 26, 2017 2:33 pm
Location: Australia

planBasicTours not accepting GPScoordinates in OG_GEODECIMAL

Post 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
Attachments
payloads.zip
request json
(1.35 KiB) Downloaded 373 times
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: planBasicTours not accepting GPScoordinates in OG_GEODEC

Post 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
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