1

In an open-source tracking project that uses WKT in its API, we have a debate about what is the correct order for representing geographical coordinates. Lat and then Long or Long and than Lat.

In most popular libraries and documentation I saw, the prevalent order is Long first (Long, Lat).

But looking through the official documentation of WKT I cannot locate the official order.

Can someone point me to the specific documentation or other qualified sources of information?

2
  • 3
    {X,Y} order if the only order I've seen or used. If it's not written down then there are exceptions that make the opposite valid. KML and a few others make an explicit order; others like GML force you tag the values, which makes them that much more inefficient. I doubt you'll get a definitive answer, but you'd need a really good reason to not use {lon,lat}.
    – Vince
    Jul 5 '20 at 4:33
  • 1
    MySQL 8 started to use WKT in the official EPSG order. All other software that I know are using long/lat or easting/northing order.
    – user30184
    Jul 5 '20 at 9:39
3

For the axis order for any coordinate reference system where EPSG is the authority, you should use their registry http://www.epsg-registry.org/

For example for epsg:4326 (http://www.epsg-registry.org/export.htm?wkt=urn:ogc:def:crs:EPSG::4326).

The WKT output shows that for EPSG:4326 the axis order is lat/long

GEODCRS["WGS 84",
  DATUM["World Geodetic System 1984",
    ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1.0]]],
  CS[ellipsoidal,2],
    AXIS["latitude",north,ORDER[1]],
    AXIS["longitude",east,ORDER[2]],
    ANGLEUNIT["degree",0.01745329252],
  ID["EPSG",4326]]

Most EPSG geographic geographic coordinate systems follow the latitude then longitude, coordinate axis order, following the default of ISO 6709 Standard representation of geographic point location by coordinates

Order, positive direction, and units of coordinates are supposed to be defined by the CRS. When CRS identification is missing, the data must be interpreted by the following conventions:

Latitude comes before longitude

North latitude is positive

East longitude is positive

Fraction of degrees is preferred in digital data exchange, while sexagesimal notation is tolerated for compatibility

ref: https://en.wikipedia.org/wiki/ISO_6709

1
  • 4
    I do not quite agree with WKT. The standard portal.opengeospatial.org/files/?artifact_id=25355 does not say much about the coordinate order and majority of sofware that deal with WKT use systematically longitude/latitude or easting/northing order. It may be wrong but changing the order would mainly add confusion.
    – user30184
    Jul 5 '20 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.