5

We want to roll out QGIS 3.20.3 in our state administration. Since we have our own transformation file for Hesse (a state in Germany), up to version 3.18.3 we were able to store it in the folder…/share/proj and after updating the proj.db, our transformation file was always accessible from QGIS.

With the new version, 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.

We were able to convert our .gsb into a .tif, but QGIS cannot find it.

Is there another file that we need to adjust? Does anyone have any instructions on how to do it?

1

1 Answer 1

8

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

gsa_and_gsb

I can also get the 'BWTA2017.gsb' e.g. from https://download.osgeo.org/proj/proj-datumgrid-europe-1.5.zip

bwta2017

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

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):

file_in_share

Proceed with Settings > Custom Projections and add a new CRS with an additional parameter +nadgrids=YOUR_GSB_FILE:

new_crs

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:

error1

Also, you will see this problem when executing a Datum Transformation.

error1

And this may be a workaround available for QGIS 3.20.

II. Datum Transformations

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.

datum_gis320

It is better to use a Destination CRS with the 'de_lgl_bw_BWTA2017.tif'

transformation_qgis320

After switching to the 'de_lgl_bw_BWTA2017.tif' for Datum Transformation

result_qgis320

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

no_positive_result

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

datum_gis318

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'.

transformation_qgis318

and restart the QGIS after all

restart_qgis318

After "installing" the 'BWTA2017.gsb' file, which is now available under C:\Users\...\AppData\Roaming\QGIS\QGIS3\profiles\default\proj

window_qgis318

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

result_qgis318


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_versions_gsb_vs_tif
QGIS 3.18.1 on the left and QGIS 3.20.3 on the right


References:

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.