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

QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves #38

Open PedroVenancio opened 5 years ago

PedroVenancio commented 5 years ago

Hi @gioman

When trying to do the transformation to "ED50 UTM 29N [EPSG:23029]" with the grid from DGT, QGIS throws an error:

An error has occurred while executing Python code: 

_core.QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves 
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis-rel-dev/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 136, in parametersHaveChanged
    commands = self.alg.getConsoleCommands(parameters, context, feedback, executing=False)
  File "C:/Users/pedro.venancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ntv2_transformations\RasterPT_ETR89PTTM06DirInv.py", line 127, in getConsoleCommands
    raise QgsProcessingException(text)
_core.QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.8.2-Zanzibar Zanzibar, c5de09d490 
QGIS version: 3.8.2-Zanzibar
QGIS code revision: c5de09d490
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.0 b55d2125
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…

Algorithm '[PT] Direct and inverse Raster Tranformation' starting…
Input parameters:
{ 'CRS' : 4, 'GRID' : 1, 'INPUT' : 'D:/SIG/MDT/SRTM/srtm_35_04_05_90m_cgiar_v4_3763_final_clip_relevo_sombreado.tif', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'TRANSF' : 1 }

Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-rel-dev/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 129, in processAlgorithm
commands = self.getConsoleCommands(parameters, context, feedback, executing=True)
File "C:/Users/pedro.venancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ntv2_transformations\RasterPT_ETR89PTTM06DirInv.py", line 127, in getConsoleCommands
raise QgsProcessingException(text)
_core.QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves

Execution failed after 0.01 seconds

Loading resulting layers
Algorithm '[PT] Direct and inverse Raster Tranformation' finished

This is expected, as for this transformation there is no grid from DGT.

The problem is the error, that can lead people to think that is a plugin or QGIS problem.

In the plugin old implementation, for QGIS 2.x, this was overcome using always the JAG grid, regardless the DGT grid be selected. If it is not possible to show a window reinforcing the information that the transformation to "ED50 UTM 29N [EPSG:23029]" is only possible with the grid from José Alberto Gonçalves, I think the same behavior than in QGIS 2.x is better than see the error, as the transformation is done with the best option actually available.