Skip to content

Conversation

rouault
Copy link
Member

@rouault rouault commented Jun 11, 2024

Backport of PR #10159

rouault added 4 commits June 11, 2024 15:35
…typically grads), when reading projection from ProjXXXXGeoKeys

Fixes OSGeo#10154

libgeotiff is unfortunately inconsistent. When it synthetizes the
projection parameters from the EPSG ProjectedCRS code, it returns
them normalized in degrees. But when it gets them from
ProjCoordTransGeoKey and other Proj....GeoKey's it return them in
a raw way, that is in the units of GeogAngularUnitSizeGeoKey
From GDAL 3.0 to 3.9.0, we didn't take the later case into account, and
lacked a conversion to degree.
And all versions of GDAL <= 3.9.0 when writing those geokeys, wrote
them as degrees, hence this GTIFF_READ_ANGULAR_PARAMS_IN_DEGREE
config option that can be set to YES to avoid that conversion and
assume that the angular parameters have been written as degree.
…typically grads), when writing ProjXXXXGeoKeys

Convert angular projection parameters from their normalized value in degree
to the units of GeogAngularUnitsGeoKey.
Note: for GDAL <= 3.9.0, we always have written them in degrees !
We can set GTIFF_WRITE_ANGULAR_PARAMS_IN_DEGREE=YES to get that
non-conformant behavior...

Relates to OSGeo#10154
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.12% (+0.002%) from 69.118%
when pulling d81f52e on rouault:backport-10159-to-release/3.9
into 48fb54f on OSGeo:release/3.9.

@rouault rouault merged commit 584d5ad into OSGeo:release/3.9 Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants