15

I am wondering what's the correct way to integrate a NTv2-transformation in QGIS.

I have successfully integrated a NTv2-transformation in QGIS but I am not sure if it's done the way it's meant to be.

For integrating NTV2-grids in QGIS I found several information that the name of the grid should be stored in the p1 column of the table tbl_datum_transform of the srs.db:

https://github.com/qgis/QGIS/pull/1502#issuecomment-50580199

https://dragons8mycat.com/2014/03/03/gis-tips-getting-ostn02-to-work-with-qgis-2-2/

https://web.archive.org/web/20140224182157/http://sourcepole.ch/ntv2-transformations-with-qgis

http://isticktoit.net/?p=371

enter image description here (Screenshot of http://www.gkg-kassel.de/pdf/Praezise_Transformation_im_QGIS_mit_Batchmodus.pdf (german) )

What makes me doubt if that's correct is the fact that the column seems to have a numeric field type:

enter image description here

Isn't the first parameter of a seven-parameter transformation stored in the p1 column of QGIS's tbl_datum_transform table?

According to the sqlite FAQ it's possible to store a string into a numeric column in sqlite ( https://sqlite.org/faq.html#q3 ) but it seems to me like a hack or workaround to store a string into a numeric column. Is this really the way it's meant to be done?

tl;dr: What's the correct way to integrate a NTv2-transformation in QGIS?

4
  • Perhaps the Answer to this gis.stackexchange.com/questions/298011/… can give a hint? Commented Oct 11, 2018 at 6:29
  • @JochenSchwarze: thanks for the link but thats just the way it's done by me and as described in the 4 example links I added in my question. The main point of my question is not how to get it work (as it's already working) but if the way it's done is really the way it is meant to be done and why the name of the gridfile is written in the p1 column ...so probably a question adressed to QGIS devs
    – Thomas B
    Commented Oct 11, 2018 at 8:22
  • then it's perhaps worth raising an issue... Commented Oct 11, 2018 at 8:49
  • I am not a QGIS dev. But this link may help stackoverflow.com/questions/43290487/…. In the spirit of KISS, the QGIS devs probably just repurpose column p1 rather than having to add an extra column which also means extra codes to deal with it. And if you look through QGIS source codes - "Yes"! This was how they had intended for it.
    – Ralph Tee
    Commented Nov 15, 2018 at 5:41

1 Answer 1

2

For the use of a NTv2 I create a custom CRS.

  1. Copy NTv2 to .. \ share \ proj
  2. Start QGIS (new)
  3. Define CRS (Settings-> Custom Projections)
  4. Check the Settings (Calulate)

enter image description here Whenever you use coordinates in the DHDN 3GK4 you bind them to the Custum CRS

Btw: It is better and safer to migrate / save all data to ETRS89_UTM. Then you can work without the "On The Fly" transformation.

2
  • 1
    I guess this will fail if you load a WMS that delivers EPSG:31467 (and nothing else).
    – AndreJ
    Commented Nov 14, 2018 at 16:11
  • 1
    For me it works this last solution! I will try to add to the QGIS manual Commented Apr 10, 2019 at 7:03

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.