north-road / qgis-processing-saga-nextgen

GNU General Public License v3.0
21 stars 11 forks source link

Empty result at every first run of SAGA raster algorithms #4

Open PedroVenancio opened 5 years ago

PedroVenancio commented 5 years ago

At every new run of any SAGA algorithm that involves raster layers, it gives no output, because it seems to only run

saga_cmd io_gdal 0 ... command

saga_batch_job.bat -> First run

set SAGA=C:/OSGeo4W64/saga-7.2.0_x64
set SAGA_MLB=C:/OSGeo4W64/saga-7.2.0_x64\modules
PATH=%PATH%;%SAGA%;%SAGA_MLB%
saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -FILES "D:\SIG\MDT\dem_srtm_pttm06_80m_clip.tif"
saga_cmd grid_tools "Invert Grid"  -GRID "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -INVERSE "D:/SIG/MDT/testes/dem_inverted.sdat"
exit

Log -> First run

Processing algorithm…
Algorithm 'Invert grid' starting…
Input parameters:
{ 'GRID' : 'D:/SIG/MDT/dem_srtm_pttm06_80m_clip.tif', 'INVERSE' : 'D:/SIG/MDT/testes/dem_inverted.sdat' }

io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -FILES "D:\SIG\MDT\dem_srtm_pttm06_80m_clip.tif"
grid_tools "Invert Grid" -GRID "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -INVERSE "D:/SIG/MDT/testes/dem_inverted.sdat"

C:\OSGeo4W64\bin>set SAGA=C:/OSGeo4W64/saga-7.2.0_x64

C:\OSGeo4W64\bin>set SAGA_MLB=C:/OSGeo4W64/saga-7.2.0_x64\modules

C:\OSGeo4W64\bin>PATH=C:\OSGEO4~1\apps\qgis-rel-dev\bin;C:\OSGEO4~1\apps\grass\grass-7.6.0\lib;C:\OSGEO4~1\apps\grass\grass-7.6.0\bin;C:\OSGEO4~1\apps\Python37;C:\OSGEO4~1\apps\Python37\Scripts;C:\OSGEO4~1\apps\qt5\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\OSGEO4~1\apps\msys\bin;C:\Program Files\RStudio\bin;C:\OSGEO4~1\apps\Python37\lib\site-packages\numpy\.libs;C:\OSGEO4~1\apps\Python37\lib\site-packages\scipy\extra-dll;C:/OSGeo4W64/saga-7.2.0_x64;C:/OSGeo4W64/saga-7.2.0_x64\modules

C:\OSGeo4W64\bin>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -FILES "D:\SIG\MDT\dem_srtm_pttm06_80m_clip.tif"
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 7.2.0 (64 bit)

ERROR 1: Can't load requested DLL: C:\OSGeo4W64\saga-7.2.0_x64\dll\gdal_KEA.dll
Execution completed in 2.38 seconds
Results:
{'INVERSE': 'D:/SIG/MDT/testes/dem_inverted.sdat'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>D:/SIG/MDT/testes/dem_inverted.sdat</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

In this first run, the temp raster is created by io_gdal 0, importing the input tif raster and transforming it to sgrd in temp folder C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd

But after this, it does not run the main algorithm, in this case, grid_tools "Invert Grid".

Running the algorithm again, as it already has the temp raster in sgrd C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd, just runs the grid_tools "Invert Grid":

saga_batch_job.bat -> Second run

set SAGA=C:/OSGeo4W64/saga-7.2.0_x64
set SAGA_MLB=C:/OSGeo4W64/saga-7.2.0_x64\modules
PATH=%PATH%;%SAGA%;%SAGA_MLB%
saga_cmd grid_tools "Invert Grid"  -GRID "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -INVERSE "D:/SIG/MDT/testes/dem_inverted.sdat"
exit

Log -> Second run

Processing algorithm…
Algorithm 'Invert grid' starting…
Input parameters:
{ 'GRID' : 'D:/SIG/MDT/dem_srtm_pttm06_80m_clip.tif', 'INVERSE' : 'D:/SIG/MDT/testes/dem_inverted.sdat' }

grid_tools "Invert Grid" -GRID "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -INVERSE "D:/SIG/MDT/testes/dem_inverted.sdat"

C:\OSGeo4W64\bin>set SAGA=C:/OSGeo4W64/saga-7.2.0_x64

C:\OSGeo4W64\bin>set SAGA_MLB=C:/OSGeo4W64/saga-7.2.0_x64\modules

C:\OSGeo4W64\bin>PATH=C:\OSGEO4~1\apps\qgis-rel-dev\bin;C:\OSGEO4~1\apps\grass\grass-7.6.0\lib;C:\OSGEO4~1\apps\grass\grass-7.6.0\bin;C:\OSGEO4~1\apps\Python37;C:\OSGEO4~1\apps\Python37\Scripts;C:\OSGEO4~1\apps\qt5\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\OSGEO4~1\apps\msys\bin;C:\Program Files\RStudio\bin;C:\OSGEO4~1\apps\Python37\lib\site-packages\numpy\.libs;C:\OSGEO4~1\apps\Python37\lib\site-packages\scipy\extra-dll;C:/OSGeo4W64/saga-7.2.0_x64;C:/OSGeo4W64/saga-7.2.0_x64\modules

C:\OSGeo4W64\bin>saga_cmd grid_tools "Invert Grid" -GRID "C:/Users/pedro.venancio/AppData/Local/Temp/processing_46a9a8edada443d68a7c07a0466c2a9a/8fcc35f8e29c4bacabd6b8e8b9082fe1/demsrtmpttm0680mclip.sgrd" -INVERSE "D:/SIG/MDT/testes/dem_inverted.sdat"
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 7.2.0 (64 bit)

Execution completed in 2.16 seconds
Results:
{'INVERSE': 'D:/SIG/MDT/testes/dem_inverted.sdat'}

Loading resulting layers
Algorithm 'Invert grid' finished

and the output is correctly created and loaded in QGIS.

So, this issue can be somehow related with https://github.com/north-road/qgis-processing-saga-nextgen/issues/3

mypitaya commented 2 years ago

same error above; cant load C:\Program Files\saga-7.2.0_x64\dll\gdal_KEA.dll