Latitude Longitude order

The convention seems to be leaning toward latitude first followed by longitude.

In Google Maps & OpenStreetMaps as you scroll around it prints in the url latitude followed by longitude.

In Bing Maps & MapQuest if you right click somewhere it displays it’s latitude followed by longitude.

Bing and Google Geocoders&API both expect latitude followed longitude.

However I’m seeing some functions in Cartesian3.js that expect longitude, latitude order. Namely the ones that start with Cartesian3.fromDegrees and Cartesian3.fromRadians.

Also the constructor: var Cartographic = function(longitude, latitude, height) is longitude, latitude order, although being an object rather than an array the components in Cartographic don’t really have an order once created.

Granted it’s relatively simple to reverse the elements when using these functions, but it would be convenient if they instead used the prevalent convention. Not because the prevalent convention is better, but simply because it’s something people are familiar with. Otherwise the order would be inconsequential.

On the other hand, KML, GeoJSON, and many other software packages such as STK use lon, lat. Presumably this convention comes from a mathematical 2D XY axis, where a 2D projection typically orients +Y to north and +X to east, hence (x, y) -> (lon, lat).

Cesium always uses the lon, lat, height order, everywhere throughout the API.

The xy <-> lon-lat analogy makes sense. Indeed the KML coordinate tag and GeoJSON coordinate property are both longitude,latitude order.

Oh well, it would have been nice to have the same order across different systems, like the xyz Cartesian order.

This is probably one of the oldest debates in mapping APIs. The best thing we can do is be self-consistent within Cesium and CZML (which we already are). The craziest thing to me is that KML is backwards when compared to other Google APIs.

X,Y / long,lat makes more sense to me

The dominant standard that I have worked with is WKT/ OGC WKT

Prevalent among SQL Server Spatial. Oracle, ESRI ect … the OGC spatial tools, engineering CAD and science tools ect…

I’ll be honest, this is the first time I have ever come across anyone, in my limited experience, mentioning ISO 6709, or any other standard that places northings before eastings,

true some of the web apis have started with northings first, but this, seams counter intuitive to every thing else in the spatial infrastructure space.

What the team at Cesium have implemented, to me, makes more sense and seams more standards compliant

I suppose KML pre-dates Google buying Keyhole, but I couldn’t find any info to confirm this. Perhaps the order in KML would have been different if it wasn’t already established. It’s good that CZML is consistent with Cesium API.

ISO 6709 version 1 was in the year 1983, version 2 in 2008. I’m not sure which version declared the order when CRS (coordinate reference system) isn’t provided. It’s only a default order though, if the system description isn’t provided.

3D Polar Coordinates in Mathematics use radius, longitude, latitude order

One system is just as good as another system. I guess I just wish there was common system between multiple products, whatever system that might be. Especially since data isn’t labeled, such as 45la, 78lg. Only if one of the values exceeds 90 do you then know.