I am working on upgrading to a newer version of GDAL and have an issue transforming coordinates using nadgrids (the beta2007.gsb ntv2 file which can be downloaded here) using GDAL 3.4.2.
The issue is that if I specify a nadgrid using a PROJ.4 string when using the gdaltransform commandline executable, I get an error that the transformation fails. Similar issues occur if I try to transform using the updated python or c++ libraries. For example, I try the following:
gdaltransform --version
GDAL 3.4.2, released 2022/03/08
gdaltransform --debug ON -s_srs EPSG:3044 -t_srs "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +ellps=bessel +nadgrids=C:\temp\BETA2007.gsb +units=m +no_defs"
Enter X Y [Z [T]] values separated by space, and press Return.
4547442.8444401 5290333.4162611
OGRCT: Invalid argument
transformation failed.
However, if I do the same command using gdaltransform in GDAL 2.3.1, I get a successful transformation:
gdaltransform --version
GDAL 2.3.1, released 2018/06/22
gdaltransform --debug ON -s_srs EPSG:3044 -t_srs "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +ellps=bessel +nadgrids=C:\temp\BETA2007.gsb +units=m +no_defs"
OGRCT: PROJ >= 4.8.0 features enabled
OGRCT: Source: +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
OGRCT: Target: +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +nadgrids=C:\\temp\\BETA2007.gsb +units=m +no_defs
OGRCT: Source: +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +nadgrids=C:\\temp\\BETA2007.gsb +units=m +no_defs
OGRCT: Target: +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
4547442.8444401 5290333.4162611
8171986.89299032 5104179.28005939 -3.96016985177994e-05
I have tried various things to get the transformation with the nadgrid to work, including using a wkt string with the nadgrid included. I am able to convert the coordinates from EPSG 3044 to EPSG 5678, but the coordinates are way off from where they should be. My question: Is there a way to define this BETA2007.gsb nadgrid that works correctly using the gdal commandline utilities, the python function calls, or the c++ function calls so I can get these coordinates converted without any errors?