<div dir="ltr"><div>Dear all,</div><div><br></div><div>I'm trying to make transformations with ogr2ogr, using NTv2 grids, in GDAL/OGR 3, and it does not work.</div><div><br></div><div>The command I was using in GDAL/OGR 2 is</div><div><br></div><div>ogr2ogr -s_srs "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +nadgrids=C:\Users\PedroVenancio\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ntv2_transformations\grids\DLx_ETRS89_geo.gsb +wktext +pm=lisbon +units=m +no_defs" -t_srs EPSG:3763 -f "ESRI Shapefile" -lco ENCODING=UTF-8 D:/Testes/postos_vigia/postos_vigia_rede_nacional_3763.shp D:\Testes\postos_vigia\postos_vigia_rede_nacional_20790.shp</div><div><br></div><div>and the result in GDAL/OGR 3.0.2 or 3.0.4 is <br></div><div><br></div><div>ERROR 1: Failed to reproject feature 0 (geometry probably out of source or destination SRS).<br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer postos_vigia_rede_nacional_20790 (use -skipfailures to skip errors)</div><div><br></div><div>This command works well in GDAL/OGR 2.4.0 and 2.4.2.</div><div><br></div><div>Looking at the ogr2ogr documentation, I've found the new -ct option</div><div><br></div><div><a href="https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-ct">https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-ct</a></div><div><br></div><div>So, I can run the transformation in GDAL/OGR 3, with the command</div><div><br></div><div>ogr2ogr -s_srs EPSG:20790 -t_srs EPSG:3763 -ct "+proj=pipeline +step +inv +proj=tmerc +lat_0=39.6666666666667 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +pm=lisbon +step +proj=hgridshift +grids=DLx_ETRS89_geo.gsb +step +proj=tmerc +lat_0=39.6682583333333 +lon_0=-8.13310833333333 +k=1 +x_0=0 +y_0=0 +ellps=GRS80" -f "ESRI Shapefile" -lco ENCODING=UTF-8 D:/Testes/postos_vigia/postos_vigia_rede_nacional_3763_17.shp D:\Testes\postos_vigia\postos_vigia_rede_nacional_20790.shp</div><div><br></div><div>I've get the -ct string from QGIS and it works as expected, but the command becomes much more complex and not compatible with GDAL/OGR 2.x versions. <br></div><div><br></div><div>Is this the only and best way to make this operation, with NTv2 grids, in GDAL/OGR 3?</div><div><br></div><div>And where can I find documentation about the WKT2 string describing the CoordinateOperation to use in -ct? I can always use QGIS, but it is not very handy, and I suspect that I'm not using the best 
approach. <br></div><div><br></div><div>Thank you very much!</div><div><br></div><div>Best regards,</div><div>Pedro VenĂ¢ncio<br></div></div>