<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Javier,</p>
<p>yes the conventions are different. PROJ follows (mostly)
<a class="moz-txt-link-freetext" href="https://docs.ogc.org/is/18-010r7/18-010r7.html#37">https://docs.ogc.org/is/18-010r7/18-010r7.html#37</a>:</p>
<p>"""<br>
</p>
<p>Identifier is an optional attribute which references an external
description of the object and which may be applied to a coordinate
reference system, a coordinate operation or a bound CRS. It may
also be utilised for components of these objects although this is
recommended only for the following circumstances:</p>
<ul>
<li> coordinate operation methods and parameters;</li>
<li> source and target CRSs when embedded within a coordinate
transformation or a concatenated coordinate operation;</li>
<li> source CRS when embedded within a point motion operation;</li>
<li> individual coordinate operations embedded within a
concatenated coordinate operation;</li>
<li> base CRS when embedded within a derived CRS (including
projected CRS);</li>
<li> source CRS, target CRS and abridged transformation when
embedded within a bound CRS;</li>
<li> individual members of a datum ensemble.</li>
</ul>
<p>"""</p>
<p>So if the top object has an ID, generally its sub-objects won't
have their IDs emitted, except the above exceptions (I see we
don't emit ids for individual members of a datum ensemble. I
remember that those exceptions have been in flux, so probably this
was changed after this was implemented in PROJ. anyway I would be
inclined to to change that now, as datum ensemble are sufficiently
verbose as they are)</p>
<p>See
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/PROJ/blob/bafe3a91901b4515a8017a6b019e43edb74a0764/src/iso19111/io.cpp#L485">https://github.com/OSGeo/PROJ/blob/bafe3a91901b4515a8017a6b019e43edb74a0764/src/iso19111/io.cpp#L485</a>
for the logic. It could be tuned to whatever people fancy for
their WKT (there's actually a predefined WKT2_SIMPLIFIED variant
where there are no ids on projection methods and parameters),
since the omission of id is a convention, and not a hard rule<br>
</p>
<p>There's always a bit of "tension" about the appropriate verbosity
of WKT: should it be a full dump of the (extract of) the
underlying geodetic database or just a summary with the
appropriate level of detail.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 29/03/2023 à 18:46, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKvUdYGeEBkBLD0GOFiTiCdYBakRjFesLt8qhm8fJCi6Sg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>Comparing some WKT1 strings I found something strange. If I
ask for WKT1_GDAL based on an EPSG code, I get the authorities
of the spheroid, prime and the datum. However, If I use an
WKT2 as the input, they are not there.</div>
<div><br>
</div>
<div>Is that expected?<br>
</div>
<div><span style="font-family:monospace"><br>
</span></div>
<div><span style="font-family:monospace">> projinfo -o
wkt1_gdal EPSG:6318</span></div>
<span style="font-family:monospace">WKT1:GDAL string:<br>
GEOGCS["NAD83(2011)",<br>
DATUM["NAD83_National_Spatial_Reference_System_2011",<br>
SPHEROID["GRS 1980",6378137,298.257222101,<br>
AUTHORITY["EPSG","7019"]],<br>
AUTHORITY["EPSG","1116"]],<br>
PRIMEM["Greenwich",0,<br>
AUTHORITY["EPSG","8901"]],<br>
UNIT["degree",0.0174532925199433,<br>
AUTHORITY["EPSG","9122"]],<br>
AUTHORITY["EPSG","6318"]]<br>
<br>
> projinfo -o wkt1_gdal "$(projinfo EPSG:6318 -o wkt2_2019
-q)"<br>
WKT1:GDAL string:<br>
GEOGCS["NAD83(2011)",<br>
DATUM["NAD83_National_Spatial_Reference_System_2011",<br>
SPHEROID["GRS 1980",6378137,298.257222101]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.0174532925199433,<br>
AUTHORITY["EPSG","9122"]],<br>
</span>
<div><span style="font-family:monospace">
AUTHORITY["EPSG","6318"]]</span></div>
<div><br>
</div>
<div>Thank<br>
</div>
<div><br>
</div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>