A bit of theory
The NTv2 (National Transformation version 2) shift is intended to facilitate the transformation between datums. It can be achieved by means of a grid file (encapsulates the shift values that are stored in a regular arrangement of geographic coordinates) which comes in two formats:
- .gsa : a readable (ASCII) format (GSA)
- .gsb : a binary format (GSB)
It can transform coordinates between two different Geodetic Reference Systems. The transformation provides height actuality and does not require ellipsoidal heights.
The National Transformation format has been developed by Natural Resources Canada's Geodetic Survey Division for conversions between NAD27 and NAD83 and it was adapted to several other countries (can be also downloaded from https://download.osgeo.org/proj/proj-datumgrid-world-latest.zip).
An example
Here in Baden-Württemberg(a state in Germany), I would try to execute a similar task.
For my region, I can get .gsa and .gsb files from the official authority Landesamt für Geoinformation und Landentwicklung Baden-Württemberg: https://www.lgl-bw.de/unsere-themen/Geoinformation/Liegenschaftskataster/ETRS89_UTM#downloads, downloaded as 'BWTA2017_gsa.zip' and 'BWTA2017.zip' correspondingly
I can also get the 'BWTA2017.gsb' e.g. from https://download.osgeo.org/proj/proj-datumgrid-europe-1.5.zip
This file actually relieves the transformation between DHDN and ETRS89.
Otherwise, for the whole of Germany, the 'BeTA2007.gsb' (Bundeseinheitliche Transformation für ATKIS) file is used, can be extracted from http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php.
So, now I want to perform two scenarios : (I) creating Custom Coordinate Reference System with an NTv2-transformation and (II) Datum Transformations from EPSG:31467 to EPSG:25832.
For this task I will be using two different versions of QGIS: 3.18.1-Zürich and 3.20.3-Odense installed under Windows 10.
I. CRS
QGIS 3.18 & QGIS 3.20
This scenario is nicely described in QGIS Documentation | QGIS User Guide | 10.5.1. Integrate an NTv2-transformation in QGIS.
Firstly copy&paste the 'BWTA2017.gsb' into C:/Program Files/QGIS 3.20.3/share/proj
(it may require Administrator's permission):
Proceed with Settings > Custom Projections
and add a new CRS with an additional parameter +nadgrids=YOUR_GSB_FILE
:
As far as I understood, '.gsb' is only applicable for CRSs that are "Mercator" based.
To be more secure regarding the file you are using, you may evidence it via a dummy change in '.gsb' name e.g. 'BWTAA2017.gsb'. The parameters of a custom CRS may looks as follows: +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +nadgrids=BWTAA2017.gsb +units=m +no_defs
It will cause the following error:
Also, you will see this problem when executing a Datum Transformation.
And this may be a workaround available for QGIS 3.20.
II. Datum Transformations
From EPSG:31467 to EPSG:25832.
This scenario is nicely described in QGIS Documentation | QGIS User Guide | 10.6. Datum Transformations. However it still does not differentiate between two types of files: .bsd and .tif.
QGIS 3.20
As you can see it utilizes the 'de_adv_BETA2007.tif'. It is stored under C:\Program Files\QGIS 3.20\share\proj
.
It is better to use a Destination CRS with the 'de_lgl_bw_BWTA2017.tif'
After switching to the 'de_lgl_bw_BWTA2017.tif' for Datum Transformation
And here comes a question: How to overcome it i.e. using the '.gsd' instead of the '.tif'?
Until now I could not find a way to integrate a '.gsd' file into transformation. I think it is impossible, because QGIS does not allow to apply a custom transformation based on a custom CRS (previously created in the scenario I), see the image below
As you can see it uses one of the files either 'de_adv_BETA2007.tif' or 'de_adv_BWTA2017.tif', but not the one I/you want. Perhaps, a failure done on purpose that I described in Scenario 1 can assist in solving the issue.
QGIS 3.18
As you can see it utilizes the 'BeTA2007.gsb' file that was mentioned above. It is stored under C:\Program Files\QGIS 3.18\share\proj
.
To modify that, edit the Transformation for a Destination CRS, that requires the 'BWTA2017.gsb'.
and restart the QGIS after all
After "installing" the 'BWTA2017.gsb' file, which is now available under C:\Users\...\AppData\Roaming\QGIS\QGIS3\profiles\default\proj
This thing was mentioned in the QGIS Documentation:
Usually, this requires the download of an external package of
transformation support files, and extracting these to the proj
folder under your QGIS user profile folder.
In the end, I could see the deployed 'BWTA2017.gsb' for Datum Transformation
As was written by @MarkusB in his question, "the previous transformation files, which are stored under C:/Program Files/QGIS 3.20.3/share/proj
, are no longer stored as .gsb but as .tif.", it is indeed True:
QGIS 3.18.1 on the left and QGIS 3.20.3 on the right
References: