[PROJ] How to get started with CRS in WKT?

Martin Desruisseaux martin.desruisseaux at geomatys.com
Tue Dec 6 02:02:01 PST 2022


Hello Thomas and all

On the ISO 19111 model, I have a different view. One possible source of 
confusion is that a label such as "WGS84" or "ETRS89" is used for two 
different things:

  * A Coordinate Reference System (CRS)
  * A Reference Frame (previously known as geodetic datum)

In the ISO 19111 model, this is two different objects. There is an 
"ETRS89" reference frame. But there is also a "ETRS89" CRS. A reference 
frame is basically only a label ("ETRS89"). But a CRS is a reference 
frame augmented with the following information:

  * Number of dimensions.
  * Axis names, order and units of measurement.
  * The type of the coordinate system (Cartesian versus Ellipsoidal, etc.)

So a CRS is not just a label. We also need to know if axis order is 
(longitude, latitude) or (latitude, longitude), if units of measurement 
are degrees or grad (or metres, kilometres, foot, miles…), etc. Those 
information are independent of coordinate transformations and are 
necessary for correct understanding of the numerical values in a 
coordinate tuple.

When a transformation needs to be applied between two CRS, then indeed 
we use the CRS as labels and search for a transformation in a database. 
The ISO 19111 specification is already designed that way. But there is 
also some operations that do not need database. For example if we just 
switch axis order from (latitude, longitude) to (longitude, latitude), 
there is no need for a database for this operation. The result is two 
distinct CRS (because axis order is part of CRS definition), but both 
CRS are associated to the same reference frame.

When talking about coordinate operations, ISO 19111 makes a distinction 
between transformations and conversions. It can be understood as a 
distinction between "operations that need a database" and "operations 
that do not need a database" respectively. Changes of axis order and 
units conversions fall in the latter category. The key criterion for 
determining if an operation is a conversion or a transformation is 
whether the operation involves a change of reference frame. If the 
reference frame of both CRS is the same, then this is a conversion. 
Otherwise this is a transformation.

According above criterion, map projections also fall in the 
"conversions" category. National mapping agencies decide that /by 
definition/, the national CRS is the result of applying a specific set 
of formula (the map projection) on a geodetic CRS. Because the geodetic 
reference frame is not changed, the operation has theoretically an 
infinite precision (ignoring rounding errors). This is different than 
transformations, where change of geodetic reference frame brings 
stochastic errors. So in the slides shown at NKG General Assembly 2022, 
the following sentence in slice 6:

> But with enough internal state to derive transformations between two 
> different CRS!
Should be completed with /"if and only if there is no change of 
reference frame"/. The ISO 19111 model does not have internal state for 
deriving transformation between two different reference frames. It only 
has enough internal state for conversions between two CRS having the 
same reference frame. It means change of axis order, units conversion or 
map projection, but not datum shifts.

In slide 11:

> Transformations are seldom unique
Yes we agree on that, but /conversions/ are unique. See above 
distinction between transformations and conversions.

> You’ll need geodetic context to select the right one. And that context 
> is not sufficiently represented in the CRS data model
Yes we agree on that, and indeed the ISO 19111 model does not try to 
represent transformations in CRS data model. It represents only 
/conversions/, this distinction is important (I'm excluding the BOUNDCRS 
WKT element from this discussion, which is a WKT-specific thing added as 
a compromise for migrating away from the legacy TOWGS84).

Last slide:

> A CRS is a label
In ISO 19111 model, a Reference Frame is a label, and all the discussion 
in the NKG presentation about transformations is true, but applied to 
Reference Frame, not to CRS (again using ISO 19111 terminology). As said 
above, a possible source of confusion is that the same label (e.g. 
"WGS84") is often used for both kinds of objects.

     Regards,

         Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20221206/9411a999/attachment-0001.htm>


More information about the PROJ mailing list