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

Thomas Knudsen knudsen.thomas at gmail.com
Mon Dec 5 22:58:39 PST 2022


Jochem,

No wonder you find WKT representation of CRS annoying: The entire abstract
model
behind the ISO/OGC standards "Referencing by Coordinates" [1] and "WKT of
CRS" [2]
is slightly, but fundamentally flawed, and we need to work towards
repairing that in the
next standard revision cycle: Last revision, 2019, was a huge improvement,
but we're not there yet.

Geodetically speaking, the entire concept of a CRS is meaningless!

The ISO/OGC "CRS" concept is an unholy mess of a combination between a
reference
frame and a derivation, with enough internal state ("definition") to allow
software to
*derive* a transformation between any two CRS's, given their internal state.

But reference frames are empirical contraptions - they do not have any
formal
definition: The reference SYSTEM behind the reference frame may have a
formal definition, such as [3] for the ITRS, but you cannot refer geodetic
coordinates
to a purely conceptual system, only to a  materially realized frame.

I addressed this in a recent presentation [4] at the 2022 general assembly
of
the Nordic Geodetic Commission [5]

Geodetically speaking, what may pass as a CRS is simply a label: The
geodetically
meaningful items are the transformations - the CRS's are just labels,
allowing us to
identify the two coordinate systems the transformation transforms between.

To facilitate experiments toward a geodetically more realistic abstract
model, I am
working on "Rust Geodesy" [6], a platform for experimentation with
alternatives to
the current state of affairs in the ISO/OGC world (and more, cf. [7] and
[8]).
Hope you will take a look at it and consider contributing to the work
toward a
geodetically viable abstract model: We need it badly!

Your basic question: "Can you recommend a way to get started with
understanding WKT?"
can, unfortunately only be answered with a "no", as CRS's are fundamentally
meaningless,
while transformations are real. So no wonder you find PROJ pipelines a more
safe ground
than WKT representations of CRS's. While you may be able to construct a WKT
that in most
cases tricks PROJ into doing the right thing, formally this is entrirely a
coincidence:
CRS's are not geodetically meaningful.

Unfortunately, in contrast to the strict standardized terminology of
geoinformatics,
geodetic terminology is sloppy, so the entire subject is hard to discuss.
We need
to make geodetic terminology more strict, while making the ISO/OGC abstract
model more geodetically realistic, leaving definitions to that which can be
defined,
and focusing on transformations, rather than CRS's.

/Thomas

[1] Referencing by Coordinates,
http://docs.opengeospatial.org/as/18-005r4/18-005r4.html (also published as
ISO 19111)
[2] WKT of CRS, http://docs.opengeospatial.org/is/18-010r7/18-010r7.html
(also published as ISO 19162)
[3] IERS Conventions (2010),
https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html
(especially chapter 4)
[4] Thomas Knudsen: What is a CRS really? A geodetic view of the ISO/OGC
geospatial data model: Broken, but not beyond repair,
https://www.nordicgeodeticcommission.com/wp-content/uploads/2022/09/5-What-is-a-CRS-really-A-geodetic-view-of-the-ISOOGC-geospatial-data-model-Broken-but-not-beyond-repair.pdf
[5] NKG General Assembly 2022, Copenhagen,
https://www.nordicgeodeticcommission.com/general-assemblygeneral/copenhagen-denmark-2022/
[6] Rust Geodesy, https://github.com/busstoptaktik/geodesy#readme
[7] Why Rust Geodesy - some background,
https://github.com/busstoptaktik/geodesy/blob/main/ruminations/004-rumination.md
[8] Overall architecture and philosophy,
https://github.com/busstoptaktik/geodesy/blob/main/ruminations/000-rumination.md

Den man. 5. dec. 2022 kl. 13.46 skrev Even Rouault <
even.rouault at spatialys.com>:

> Jochem,
>
> Is "read the spec", the answer you expected ;-) ? I'm afraid that's the
> best I have: http://docs.opengeospatial.org/is/18-010r7/18-010r7.html
>
> Regarding indentation, don't worry about that. Write your WKT as you can
> in a file and then use "projinfo @your.wkt", and it will return a nicely
> reformatted string. But you need to get brackets right, otherwise the
> parser will be lost.
>
> You may also try the PROJJSON encoding as an input and feed it to
> "projinfo @your.json" and it will return a WKT, but I'm not sure it will
> help you, as it is more oriented to be machine friendly.
>
> For CRS definitions themselves, it is unlikely you can use the
> transformation constructs if you intend to have your CRS in EPSG.
> ABRIDGEDTRANSFORMATION is only for BoundCRS, and they are none of them in
> EPSG. GEOGTRAN is a Esri WKT specific thing. COORDINATETRANSFORMATION is
> for a standalone CoordinateTransformation object
>
> If your ultimate goal is to provide CRS and coordinate transformations to
> EPSG, then you don't need to create WKT. Go to
> https://epsg.org/dataset-change-requests.html and click on the "Template
> for data submission" link at the right of the page, and you'll get an Excel
> spreadsheet where you'll get a form with the decomposition of the objects.
>
> Even
> Le 05/12/2022 à 13:03, Lesparre, Jochem via PROJ a écrit :
>
> Dear PROJ maillist,
>
>
>
> At a the national mapping agency of the Netherlands we are responsible for
> defining the CRS of European Netherlands and the 3 islands of the Caribbean
> Netherlands. We are working on standardising the official transformations
> so these can be added to EPSG and the transformations become available in
> PROJ and other software. To perform transformations ourself, we create cct
> pipelines. I love the power cct pipelines. Unfortunately, other
> applications often expect a WKT string. For the transformations we added to
> EPSG, I can copy-paste the WKT from epsg.org. To experiment with a custom
> CRS, I sometimes try to create my own WKT strings. However, these attempts
> are not very successful for two reasons.
>
>
>
> Firstly, it takes an annoying lot of effort get the code indented to make
> it readable (the indent plugin in notepad++ only works after using search
> and replace to add line breaks) and to keep the brackets right for valid
> WKT while editing, before I can even start to experiment with the rest of
> the syntax. *Can you recommend a way to make creating WKT easier?*
>
>
>
> Secondly, I am quite confused by the different WKT examples that I find.
> Some seem to use different ways to define transformations in WKT (e.g.
> ABRIDGEDTRANSFORMATION, GEOGTRAN, COORDINATEOPERATION). *Can you
> recommend a way to get started with understanding WKT?* As a geodesist, I
> am familiar with transformation methods, so I only need information on how
> to translate between this theory and WKT.
>
>
>
> Kind regards, Jochem
>
>
> Disclaimer:
> De inhoud van deze e-mail is vertrouwelijk en uitsluitend bestemd voor de
> geadresseerde(n).
> Gebruik, openbaarmaking, vermenigvuldiging, verspreiding en/of
> verstrekking van deze informatie aan derden is niet toegestaan.
> Op al onze producten en diensten zijn onze algemene leveringsvoorwaarden
> van toepassing
> [https://www.kadaster.nl/algemene-leveringsvoorwaarden].
>
> Disclaimer:
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient, you are notified that disclosing,
> copying, distributing or taking any action in reliance on the contents of
> this information is strictly prohibited.
> Our general terms and conditions of delivery apply to all our products and
> services
> [https://www.kadaster.com/general-terms-and-conditions].
>
> _______________________________________________
> PROJ mailing listPROJ at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/proj
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20221206/77cc7d08/attachment.htm>


More information about the PROJ mailing list