<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 29/06/2021 à 14:59, Floris
      Vanderhaeghe via PROJ a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:2febc290-1039-67dc-3137-0ff5abbcdc25@inbo.be">So I guess
      '+towgs84' is also a feature that will remain?? (I ask because
      '+towgs84' and '+datum' are considered deprecated.)<br>
    </blockquote>
    <p>+towgs84 is deprecated in the sense that using WGS84 as a pivot
      datum may add accuracy loss in transformations.</p>
    <p>+datum is fine but there is only a small list of datums possible.<br>
    </p>
    <blockquote type="cite"
      cite="mid:2febc290-1039-67dc-3137-0ff5abbcdc25@inbo.be">
      <p>Further, after comparing projinfo (in PROJ 7.2.1) and
        gdalsrsinfo (in GDAL 3.2.1), it can be seen that:</p>
      <ul>
        <li>PROJ needs '+type=crs' in an inputted PROJ string to define
          a CRS, otherwise it is seen as a coordinate operation (as
          expected from most PROJ documentation)<br>
        </li>
        <li>GDAL seems to always interpret a PROJ string as a CRS, also
          without '+type=crs'. This seems in contradiction with PROJ
          (but maybe has its reasons)</li>
      </ul>
    </blockquote>
    Yes, the GDAL behaviour is for backward compatibility with GDAL <
    3<br>
    <blockquote type="cite"
      cite="mid:2febc290-1039-67dc-3137-0ff5abbcdc25@inbo.be">
      <ul>
        <li>both projinfo and gdalsrsinfo currently honour '+towgs84' in
          the input (returning a BOUNDCRS), and repeat the exact same
          PROJ string in the output (except that GDAL drops
          '+type=crs'). However '+towgs84' (as well as '+datum') is not
          in the returned PROJ string if the input is AUTHORITY:CODE, so
          such PROJ strings are partial CRS representations.<br>
        </li>
      </ul>
    </blockquote>
    <p>It really depends on the AUTHORITY:CODE. If there's only one
      transformation know from the datum of the CRS to WGS 84, then it
      will be used for +towgs84. e.g:<br>
    </p>
    <p>$ projinfo EPSG:4171 -o PROJ -q<br>
      +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
      +type=crs<br>
      If there are several choices possible, no +towgs84 is emitted</p>
    --
    <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>