Lat Lon or Lon Lat
Which coordinate order is correct?!
If you are a data scientist or developer new to dealing with geospatial data, this can be both confusing and an easy source of error.
Geographic coordinates are commonly presented as Latitude, Longitude e.g. in the World Geodetic System WGS 84 Standard as well as in popular culture, for example at the top of every wikipedia.org page about a geographic location.
In Mathematics however, the conventional order for Cartesian coordinates is horizontal or X coordinate, followed by the vertical axis or Y coordinate which would correspond to Longitude (X) followed by Latitude (Y).
One thing that quickly becomes clear when dealing with geospatial data is that there is no fixed standard on coordinate order.
In many web mapping APIs such as Google Maps, spatial coordinates are often returned in order of latitude then longitude. In spatial databases like PostGIS or modern data warehouses such as BigQuery, Snowflake or Redshift, spatial coordinates are in longitude followed by latitude.
There are even conflicting International Standards on the subject. ISO 19125…