Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip TOWGS84 when datum is known, in GTiff, Spatialite and GPKG drivers #2370

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

rouault
Copy link
Member

@rouault rouault commented Apr 2, 2020

Addresses qgis/QGIS#34993

Implements a simplified version of the idea mentioned in
https://lists.osgeo.org/pipermail/gdal-dev/2020-March/051881.html
with a variant of the more radical approach suggested in
https://lists.osgeo.org/pipermail/gdal-dev/2020-March/051885.html

That is the new method OGRSpatialReference::StripTOWGS84IfKnownDatumAndAllowed()
will remove TOWGS84 information from SRS whose datum name is known,
unless the OSR_STRIP_TOWGS84 configuration option is set to NO.
When TOWGS84 information is striped, a debug message is emitted.

Addresses qgis/QGIS#34993

Implements a simplified version of the idea mentioned in
https://lists.osgeo.org/pipermail/gdal-dev/2020-March/051881.html
with a variant of the more radical approach suggested in
https://lists.osgeo.org/pipermail/gdal-dev/2020-March/051885.html

That is the new method OGRSpatialReference::StripTOWGS84IfKnownDatumAndAllowed()
will remove TOWGS84 information from SRS whose datum name is known,
unless the OSR_STRIP_TOWGS84 configuration option is set to NO.
When TOWGS84 information is striped, a debug message is emitted.
@nyalldawson
Copy link
Collaborator

I'll test today, but just wanted to say that the logic looks good to me (and makes sense to me). Thanks for the fix!

@nyalldawson
Copy link
Collaborator

Tested and confirmed working as desired

@rouault rouault merged commit 5d093eb into OSGeo:master Apr 3, 2020
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