NaturalGIS / naturalgis_ntv2_transformations

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

Error with inverse transformations #55

Open gioman opened 1 year ago

gioman commented 1 year ago

QGIS 3.28.

It seems something changed in GDAL (/vsistdout/ and /vsistdin/) as this command (example) does not work anymore:

ogr2ogr -s_srs EPSG:3763 -t_srs "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.99 +ellps=intl +nadgrids=C:\\Users/giovanni/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ntv2_transformations\\grids\\D73_ETRS89_geo.gsb +wktext +units=m +no_defs" -f Geojson /vsistdout/ D:/Solos_Sul_25000/Solos_Sul_25000_ETRS.shp Solos_Sul_25000_ETRS -lco ENCODING=UTF-8 | ogr2ogr -f "GPKG" -a_srs EPSG:27493 C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/8500366e741e47bab08b1ad315e464f9/OUTPUT.gpkg /vsistdin/

ERROR 4: sqlite3_open(C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/8500366e741e47bab08b1ad315e464f9/OUTPUT.gpkg) failed: unable to open database file
ERROR 1: GPKG driver failed to create C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/8500366e741e47bab08b1ad315e464f9/OUTPUT.gpkg

Similar error when using SHP as final format.

It seems to work when using a physical intermediate datasource instead of stdout stdin

ogr2ogr -s_srs EPSG:3763 -t_srs "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.99 +ellps=intl +nadgrids=C:\\Users/giovanni/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ntv2_transformations\\grids\\pt73_e89.gsb +wktext +units=m +no_defs" -f Geojson C:/Users/giovanni/AppData/Local/Temp/temp.geojson D:/Solos_Sul_25000/Solos_Sul_25000_ETRS.shp Solos_Sul_25000_ETRS -lco ENCODING=UTF-8 && ogr2ogr -f "ESRI Shapefile" -a_srs EPSG:27493 D:/teste3.shp C:/Users/giovanni/AppData/Local/Temp/temp.geojson

This could be a possible solution.

nilufercipa commented 9 months ago

QGIS 2.22 & QGIS 2.28

I am getting a similar error while doing inverse transformations

image