NaturalGIS / naturalgis_ntv2_transformations

A plugin for the QGIS Processing toolbox to allow users do Datum transformations with NTv2 grids
Other
15 stars 8 forks source link

Update the plugin to be compatible with the newest versions of GDAL and PROJ #44

Open gioman opened 4 years ago

gioman commented 4 years ago

After a first attempt (thanks @PedroVenancio) it seems that the ogr2ogr commands must be changed to something along the following lines: 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

where the "-ct" flag must be used (and is incompatible with GDAL 2.*).

Is unclear if an approach more similar to the one used with GDAL 2 can be used.

gioman commented 4 years ago

@PedroVenancio posted the question on the GDAL list: http://osgeo-org.1560.x6.nabble.com/gdal-dev-ogr2ogr-command-to-coordinate-transform-using-NTv2-grids-in-GDAL-3-td5431238.html

PedroVenancio commented 4 years ago

https://github.com/OSGeo/PROJ/pull/1998

PedroVenancio commented 4 years ago

It's fixed now with proj dev 7.1.0-3 shipped with OSGeo4W.

It will also be fixed in previous versions (https://github.com/OSGeo/PROJ/milestone/23 and https://github.com/OSGeo/PROJ/milestone/21) as soon as they be released.

gioman commented 4 years ago

It's fixed now with proj dev 7.1.0-3 shipped with OSGeo4W.

@PedroVenancio thanks for the heads up Pedro!