[PROJ] Questions about declaring a CRS

Even Rouault even.rouault at spatialys.com
Tue Jun 29 06:11:53 PDT 2021


Le 29/06/2021 à 14:59, Floris Vanderhaeghe via PROJ a écrit :
> So I guess '+towgs84' is also a feature that will remain?? (I ask 
> because '+towgs84' and '+datum' are considered deprecated.)

+towgs84 is deprecated in the sense that using WGS84 as a pivot datum 
may add accuracy loss in transformations.

+datum is fine but there is only a small list of datums possible.

> Further, after comparing projinfo (in PROJ 7.2.1) and gdalsrsinfo (in 
> GDAL 3.2.1), it can be seen that:
>
>   * 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)
>   * 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)
>
Yes, the GDAL behaviour is for backward compatibility with GDAL < 3
>
>   * 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.
>
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:

$ projinfo EPSG:4171 -o PROJ -q
+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs +type=crs
If there are several choices possible, no +towgs84 is emitted

-- 

http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210629/7ab583ca/attachment.html>


More information about the PROJ mailing list