Closed agisoft-metashape closed 3 months ago
What is the bug? Is it the different number of coordinates in
0.0157079633 (listgeo) and 0.015707963267949 (gdalinfo)
If angle was considered to be in degrees I would expect to see something like
ANGLEUNIT["degree",0.0174532925199433]
The bug is in the value of Latitude of natural origin reported by GDAL. It should be 49 grads, not 54.4444444444444 grads.
What is the bug?
When reading SRS definition from GeoTIFF file with AngularGrad units GDAL seem to incorrectly interpret ProjNatOriginLatGeoKey parameter as if it was written in degrees.
But according to GeoTIFF specification angular projection parameters (including ProjNatOriginLatGeoKey) shall have units specified by the GeogAngularUnitsGeoKey: https://docs.ogc.org/is/19-008r4/19-008r4.html#_map_projection_parameters_coordinate_operation_parameters
Steps to reproduce the issue
A test image in NTF (Paris) / Lambert Sud France (EPSG:27563) projection: test_27563_tif.zip
listgeo utility lists the ProjNatOriginLatGeoKey value in angular units (grads) as required by GeoTIFF specification:
$ listgeo test_27563.tif
But gdalinfo (GDAL 3.8.4) prints incorrect value for this parameter:
$ gdalinfo test_27563.tif
Complete listgeo output: test_27563_listgeo.txt Complete gdalinfo output: test_27563_gdalinfo.txt
Versions and provenance
GDAL 3.8.4, released 2024/02/08 running on Windows 10
Additional context
No response