Hi there,
I’m running the AI bridge v2.0.3, and I’m seeing latitude and longitude mixed up.
If I look at the Milestone configuration interface, it doesn’t specifically say which is which, but given latitude is -90 to +90 and longitude is -180 to +180, one would assume given the example that it’s latitude first, and longitude second.
The AI bridge, when queried, reverses the information, returning latitude as longitude, and vice versa.
Query:
query {
cameras(deviceIDs: ["8e3f96cb-ca83-4f54-abe5-d4da0ebbe5b2"]) {
id
geographicPosition { latitude longitude }
}
}
Response:
{
"data": {
"cameras": [
{
"id": "8e3f96cb-ca83-4f54-abe5-d4da0ebbe5b2",
"geographicPosition": {
"latitude": 151.206669,
"longitude": -33.871435
}
}
]
}
}
If I query the SOAP service on the server (/ManagementServer/ServerCommandService.svc), I get a value like so:
<DeviceId>8e3f96cb-ca83-4f54-abe5-d4da0ebbe5b2</DeviceId>
<DeviceIndex>0</DeviceIndex>
<GisPoint>POINT (151.206669 -33.871435)</GisPoint>
In the documentation at ConvertFrom-GisPoint - MilestonePSTools Module , it says:
Milestone stores GPS coordinates as X,Y coordinates on a standard coordinate plane. For example, the coordinates 47.25726, -122.51608 are represented in Milestone as “POINT (-122.51608 47.25726)” where the latitude and longitude are reversed. An unset coordinate for a camera is represented as “POINT EMPTY”.
So based on what I’m seeing, the SOAP API is “POINT(lng, lat)”, which is correct. This makes me think there’s a bug in the AI Bridge.
