qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.62k stars 3.01k forks source link

Wrong module name in some SAGA description files #47285

Closed ARTCON2020 closed 2 years ago

ARTCON2020 commented 2 years ago

What is the bug or the crash?

QGIS version: 3.22.3-Białowieża QGIS code revision: 1628765ec7 Qt version: 5.15.2 Python version: 3.9.5 GDAL version: 3.4.1 GEOS version: 3.10.0-CAPI-1.16.0 PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.3.0 (git-version: 9f35b7) SAGA Next Gen version: 0.0.7 Algorithm started at: 2022-02-10T11:53:24 Algorithm 'Flow accumulation (one step)' starting… Input parameters: { 'DEM' : 'D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif', 'FLOW_ROUTING' : 4, 'PREPROCESSING' : 0, 'SCA' : 'TEMPORARY_OUTPUT', 'TCA' : 'TEMPORARY_OUTPUT' }

io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/8b5de4332b8c4fb2b62a782c22a56ab5/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/8b5de4332b8c4fb2b62a782c22a56ab5/dtm133148187clip.sgrd" -PREPROCESSING 0 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/c9932a35b72b462eb3a0a085567d8c92/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/fc447358bbc34f4ab8788290752c3cb1/SCA.sdat" '\nas-aapen.tromkom.intern\home$\personlig04\azmtas01' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.

C:\Windows>set SAGA=C:/OSGeo4W/apps\saga

C:\Windows>set SAGA_MLB=C:/OSGeo4W/apps\saga\modules

C:\Windows>PATH=C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\apps\grass\grass78\lib;C:\OSGeo4W\apps\grass\grass78\bin;C:\OSGeo4W\apps\qt5\bin;C:\OSGeo4W\apps\Python39\Scripts;C:\OSGeo4W\bin;C:\windows\system32;C:\windows;C:\windows\system32\WBem;C:/OSGeo4W/apps\saga;C:/OSGeo4W/apps\saga\modules

C:\Windows>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/8b5de4332b8c4fb2b62a782c22a56ab5/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif"



SAGA Version: 7.8.2 (64 bit)


library path: C:\OSGeo4W\apps\saga\tools\ library name: io_gdal library : io_gdal tool : Import Raster identifier : 0 author : O.Conrad (c) 2007 (A.Ringeler) processors : 8 [8]


Parameters

Grids: No objects Files: "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" Multiple Bands Output: automatic Select from Multiple Bands: Transformation: true Resampling: B-Spline Interpolation Extent: original

loading: D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif

Driver: GTiff

Bands: 1

Rows: 3990

Columns: 5555

Transformation:

x' = 627771.083845 + x 1.000000 + y 0.000000

y' = 7745593.122450 + x 0.000000 + y -1.000000

loading: dtm1_33_148_187_clip

warning: top-to-bottom and left-to-right cell sizes differ. Difference: 0.000000

using cellsize: 1.000000

Saving grid: C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/8b5de4332b8c4fb2b62a782c22a56ab5/dtm133148187clip.sgrd...

C:\Windows>saga_cmd toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/8b5de4332b8c4fb2b62a782c22a56ab5/dtm133148187clip.sgrd" -PREPROCESSING 0 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/c9932a35b72b462eb3a0a085567d8c92/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/fc447358bbc34f4ab8788290752c3cb1/SCA.sdat"



SAGA Version: 7.8.2 (64 bit)

89 loaded tool libraries (789 tools):

*) tool chain libraries

Error: select a library type -h or --help for further information

C:\Windows>exit Execution completed in 13.69 seconds Results: {'SCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/fc447358bbc34f4ab8788290752c3cb1/SCA.sdat', 'TCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/c9932a35b72b462eb3a0a085567d8c92/TCA.sdat'}

Loading resulting layers The following layers were not correctly generated. • C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/c9932a35b72b462eb3a0a085567d8c92/TCA.sdat • C:/Users/azmtas01/AppData/Local/Temp/processing_FywiID/fc447358bbc34f4ab8788290752c3cb1/SCA.sdat You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

Steps to reproduce the issue

QGIS 3 22 3

Versions

QGIS 3.22.3

Supported QGIS version

New profile

Additional context

No response

roya0045 commented 2 years ago

That's the saga plugin, not qgis.

gioman commented 2 years ago

@ARTCON2020

in

C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description

(assuming you have used the osgeo4w v2 installer), edit "terrain_analysis_flowaccumulation(one_step).txt" and change the second line from "toolchains_terrain_analysis" to "terrain_analysis".

gioman commented 2 years ago

The change must be applied to other modules too:

C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_flow_accumulation_(one_step).txt (1 hit)
    Line 2: toolchains_terrain_analysis
  C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_ls_factor_(one_step).txt (1 hit)
    Line 2: toolchains_terrain_analysis
  C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_relief_segmentation.txt (1 hit)
    Line 2: toolchains_terrain_analysis
  C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_summit_extraction.txt (1 hit)
    Line 2: toolchains_terrain_analysis
  C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_terrain_clustering.txt (1 hit)
    Line 2: toolchains_terrain_analysis
  C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_topographic_wetness_index_(one_step).txt (1 hit)
    Line 2: toolchains_terrain_analysis
  C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description\terrain_analysis_upslope_height,_slope,_aspect.txt (1 hit)
    Line 2: toolchains_terrain_analysis
roya0045 commented 2 years ago

@gioman Shouldn't this be reported in the plugin issues as we usually close issues related to third parties plugin (even if that plugin is made by a core contributor)?

gioman commented 2 years ago

houldn't this be reported in the plugin issues as we usually close issues related to third parties plugin

@roya0045 The issue in not in Nyall or AlexB SAGA pugins, is in the description files we ship with the QGIS installer. I think that this description files are pulled down from an usptream SAGA repo, but they have many issues, and this is one of the many reason we need to do as we did in the past, use our own description files, until the moment that SAGA will get out of QGIS (QGIS 4 I guess).

roya0045 commented 2 years ago

Could this simply be because the plugins use version 7 and our docs are based on version 2 or 3 (can't recall)?

gioman commented 2 years ago

@roya0045 no, description files pulled down from upstream SAGA are for SAGA 7, but probably are generated automatically and they frequently have errors (probably also because SAGA has the very bad habit to change module/parameters names without keeping retro-compability).

ARTCON2020 commented 2 years ago

Hi, I changed everything as described above but I get the following feedback when I close the application:

============================================================= Crash ID: 2bba35ac54ec3f66db08369439704d5a7beb5523

Stack Trace

GDALDestroyDriver : dal::GDALRasterDriver::deregisterGDALDrivers : dal::Client::~Client : calc::DataStorageId::setId : ::operator() : __crt_seh_guarded_call::operator(), &, > : execute_onexit_table : calc::vs2CsfVs : calc::vs2CsfVs : LdrpCallInitRoutine : LdrShutdownProcess : RtlExitUserProcess : ExitProcessImplementation : exit_or_terminate_process : common_exit : BaseThreadInitThunk : RtlUserThreadStart :

QGIS Info QGIS Version: 3.22.3-Bia?owie?a QGIS code revision: 1628765ec7 Compiled against Qt: 5.15.2 Running against Qt: 5.15.2 Compiled against GDAL: 3.4.1 Running against GDAL: 3.4.1

System Info CPU Type: x8664 Kernel Type: winnt Kernel Version: 10.0.1904 ![QGIS 3 22 3](https://user-images.githubusercontent.com/72500978/153827289-7d279621-caa5-47c6-9e70-df63226907d6.PNG) 4

ARTCON2020 commented 2 years ago

The application does not work either by changing all the second seven lines as: "Terrain_analysis"

ARTCON2020 commented 2 years ago

QGIS version: 3.22.3-Białowieża QGIS code revision: 1628765ec7 Qt version: 5.15.2 Python version: 3.9.5 GDAL version: 3.4.1 GEOS version: 3.10.0-CAPI-1.16.0 PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.3.0 (git-version: 9f35b7) SAGA Next Gen version: 0.0.7 Algorithm started at: 2022-02-14T09:33:03 Algorithm 'Flow accumulation (one step)' starting… Input parameters: { 'DEM' : 'D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif', 'FLOW_ROUTING' : 4, 'PREPROCESSING' : 0, 'SCA' : 'TEMPORARY_OUTPUT', 'TCA' : 'TEMPORARY_OUTPUT' }

io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/42a15f8c61ff4a389d5a3974c7e38425/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/42a15f8c61ff4a389d5a3974c7e38425/dtm133148187clip.sgrd" -PREPROCESSING 0 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/1cf369df409b42bfa74f2a68d4eff3ca/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/c84ab885dd584180afa1a8f80ebbbcb9/SCA.sdat" '\nas-aapen.tromkom.intern\home$\personlig04\azmtas01' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.

C:\Windows>set SAGA=C:/OSGeo4W/apps\saga

C:\Windows>set SAGA_MLB=C:/OSGeo4W/apps\saga\modules

C:\Windows>PATH=C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\apps\grass\grass78\lib;C:\OSGeo4W\apps\grass\grass78\bin;C:\OSGeo4W\apps\qt5\bin;C:\OSGeo4W\apps\Python39\Scripts;C:\OSGeo4W\bin;C:\windows\system32;C:\windows;C:\windows\system32\WBem;C:/OSGeo4W/apps\saga;C:/OSGeo4W/apps\saga\modules

C:\Windows>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/42a15f8c61ff4a389d5a3974c7e38425/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif"



SAGA Version: 7.8.2 (64 bit)


library path: C:\OSGeo4W\apps\saga\tools\ library name: io_gdal library : io_gdal tool : Import Raster identifier : 0 author : O.Conrad (c) 2007 (A.Ringeler) processors : 8 [8]


Parameters

Grids: No objects Files: "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" Multiple Bands Output: automatic Select from Multiple Bands: Transformation: true Resampling: B-Spline Interpolation Extent: original

loading: D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif

Driver: GTiff

Bands: 1

Rows: 3990

Columns: 5555

Transformation:

x' = 627771.083845 + x 1.000000 + y 0.000000

y' = 7745593.122450 + x 0.000000 + y -1.000000

loading: dtm1_33_148_187_clip

warning: top-to-bottom and left-to-right cell sizes differ. Difference: 0.000000

using cellsize: 1.000000

Saving grid: C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/42a15f8c61ff4a389d5a3974c7e38425/dtm133148187clip.sgrd...

C:\Windows>saga_cmd toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/42a15f8c61ff4a389d5a3974c7e38425/dtm133148187clip.sgrd" -PREPROCESSING 0 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/1cf369df409b42bfa74f2a68d4eff3ca/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/c84ab885dd584180afa1a8f80ebbbcb9/SCA.sdat"



SAGA Version: 7.8.2 (64 bit)

89 loaded tool libraries (789 tools):

*) tool chain libraries

Error: select a library type -h or --help for further information

C:\Windows>exit Execution completed in 12.75 seconds Results: {'SCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/c84ab885dd584180afa1a8f80ebbbcb9/SCA.sdat', 'TCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/1cf369df409b42bfa74f2a68d4eff3ca/TCA.sdat'}

Loading resulting layers The following layers were not correctly generated. • C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/1cf369df409b42bfa74f2a68d4eff3ca/TCA.sdat • C:/Users/azmtas01/AppData/Local/Temp/processing_OwMokk/c84ab885dd584180afa1a8f80ebbbcb9/SCA.sdat You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

gioman commented 2 years ago

SAGA Version: 7.8.2 (64 bit)

89 loaded tool libraries (789 tools):

@ARTCON2020 the fact that the SAGA log shows you this list it means that 1) you have changed the wrong file or 2) you have did not the edit 100% right. Have you wrote "terrain_analysis lowercase?

File must look as

Flow Accumulation (One Step)
terrain_analysis
QgsProcessingParameterRasterLayer|DEM|Elevation|None|False
QgsProcessingParameterRasterDestination|TCA|Flow Accumulation
QgsProcessingParameterRasterDestination|SCA|Specific Catchment Area
QgsProcessingParameterEnum|PREPROCESSING|Preprocessing|[0] Fill Sinks (Wang & Liu);[1] Sink Removal|False|1
QgsProcessingParameterEnum|FLOW_ROUTING|Flow Routing|[0] Deterministic 8;[1] Rho 8;[2] Braunschweiger Reliefmodell;[3] Deterministic Infinity;[4] Multiple Flow Direction;[5] Multiple Triangular Flow Direction;[6] Multiple Maximum Downslope Gradient Based Flow Direction|False|4
ARTCON2020 commented 2 years ago

Sure, it was not in lowercase form. However after I changed all based on your recommendation it has still a problem as shown below.

QGIS version: 3.22.3-Białowieża QGIS code revision: 1628765ec7 Qt version: 5.15.2 Python version: 3.9.5 GDAL version: 3.4.1 GEOS version: 3.10.0-CAPI-1.16.0 QGIS 3 22 3_b

PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.3.0 (git-version: 9f35b7) SAGA Next Gen version: 0.0.7 Algorithm started at: 2022-02-14T10:34:48 Algorithm 'Flow accumulation (one step)' starting… Input parameters: { 'DEM' : 'D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif', 'FLOW_ROUTING' : 4, 'PREPROCESSING' : 0, 'SCA' : 'TEMPORARY_OUTPUT', 'TCA' : 'TEMPORARY_OUTPUT' }

io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/3af0a9fb29a348539bd8a8cd2b654040/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/3af0a9fb29a348539bd8a8cd2b654040/dtm133148187clip.sgrd" -PREPROCESSING 0 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f3f4fef96bfd4260a057d1c3520b54cd/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f00df545844a4aea8494f076cdfcc818/SCA.sdat" '\nas-aapen.tromkom.intern\home$\personlig04\azmtas01' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.

C:\Windows>set SAGA=C:/OSGeo4W/apps\saga

C:\Windows>set SAGA_MLB=C:/OSGeo4W/apps\saga\modules

C:\Windows>PATH=C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\apps\grass\grass78\lib;C:\OSGeo4W\apps\grass\grass78\bin;C:\OSGeo4W\apps\qt5\bin;C:\OSGeo4W\apps\Python39\Scripts;C:\OSGeo4W\bin;C:\windows\system32;C:\windows;C:\windows\system32\WBem;C:/OSGeo4W/apps\saga;C:/OSGeo4W/apps\saga\modules

C:\Windows>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/3af0a9fb29a348539bd8a8cd2b654040/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif"



SAGA Version: 7.8.2 (64 bit)


library path: C:\OSGeo4W\apps\saga\tools\ library name: io_gdal library : io_gdal tool : Import Raster identifier : 0 author : O.Conrad (c) 2007 (A.Ringeler) processors : 8 [8]


Parameters

Grids: No objects Files: "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" Multiple Bands Output: automatic Select from Multiple Bands: Transformation: true Resampling: B-Spline Interpolation Extent: original

loading: D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif

Driver: GTiff

Bands: 1

Rows: 3990

Columns: 5555

Transformation:

x' = 627771.083845 + x 1.000000 + y 0.000000

y' = 7745593.122450 + x 0.000000 + y -1.000000

loading: dtm1_33_148_187_clip

warning: top-to-bottom and left-to-right cell sizes differ. Difference: 0.000000

using cellsize: 1.000000

Saving grid: C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/3af0a9fb29a348539bd8a8cd2b654040/dtm133148187clip.sgrd...

C:\Windows>saga_cmd toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/3af0a9fb29a348539bd8a8cd2b654040/dtm133148187clip.sgrd" -PREPROCESSING 0 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f3f4fef96bfd4260a057d1c3520b54cd/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f00df545844a4aea8494f076cdfcc818/SCA.sdat"



SAGA Version: 7.8.2 (64 bit)

89 loaded tool libraries (789 tools):

*) tool chain libraries

Error: select a library type -h or --help for further information

C:\Windows>exit Execution completed in 10.25 seconds Results: {'SCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f00df545844a4aea8494f076cdfcc818/SCA.sdat', 'TCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f3f4fef96bfd4260a057d1c3520b54cd/TCA.sdat'}

Loading resulting layers The following layers were not correctly generated. • C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f00df545844a4aea8494f076cdfcc818/SCA.sdat • C:/Users/azmtas01/AppData/Local/Temp/processing_znOYcq/f3f4fef96bfd4260a057d1c3520b54cd/TCA.sdat You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

agiudiceandrea commented 2 years ago

description files pulled down from upstream SAGA are for SAGA 7, but probably are generated automatically

@roya0045 @gioman, QGIS installed via OSGeo4W v2 uses the SAGA-GIS 7.8.2 provider description files automatically generated by the OSGeo4W v2 packaging system using the SAGA-GIS 7.8.2 tool CQGIS_ToolBox "QGIS Tool Interface Generator" (via saga_cmd dev_tools 7) and not the ones for SAGA-GIS 2.x included in the QGIS source code.

Anyway, this issue and other similar ones previously reported (e.g. https://github.com/qgis/QGIS/issues/44514) have been already fixed in SAGA-GIS 8. See, for example: https://sourceforge.net/p/saga-gis/code/ci/eae0ba3daec349f1f464a5165954677e277c6fb0/ (https://github.com/saga-gis/saga-gis/commit/eae0ba3daec349f1f464a5165954677e277c6fb0) and https://sourceforge.net/p/saga-gis/code/ci/54d27c52376c7b6d27b89a67bdc7f433f177ca25/ (https://github.com/saga-gis/saga-gis/commit/54d27c52376c7b6d27b89a67bdc7f433f177ca25).

ARTCON2020 commented 2 years ago

Thank you for your quick response @agiudiceandrea. Can you send med a short description how can I do it, for I am not an expert or have no any experiences. Thank you for your understanding

agiudiceandrea commented 2 years ago

@ARTCON2020 as written in a pair of previous comments by Giovanni Manghi, you need to modify the file terrain_analysis_flow_accumulation_(one_step).txt in the \apps\qgis\python\plugins\sagaprovider\description\ subfolder of your QGIS OSGeo4W installation folder. You just need to:

I've made such change for the terrain_analysis_flow_accumulation_(one_step).txt file in my QGIS OSGeo4W (v2) installation folder and now the SAGA-GIS tool "Flow accumulation (one step)" works without issues.

gioman commented 2 years ago

x "QGIS Tool Interface Generator" (via saga_cmd dev_tools 7)

@agiudiceandrea still, that description files are often with problems, here why we need to take back control on them (as we did in the past). It is in my todo list.

ARTCON2020 commented 2 years ago

Hi again @gioman, I did all the comments and prosedyres provided, BUT sadly don't work.

QGIS version: 3.22.3-Białowieża QGIS code revision: 1628765ec7 Qt version: 5.15.2 Python version: 3.9.5 GDAL version: 3.4.1 GEOS version: 3.10.2-CAPI-1.16.0 PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.3.0 (git-version: 9f35b7) SAGA Next Gen version: 0.0.7 Algorithm started at: 2022-02-15T12:05:47 Algorithm 'Flow accumulation (one step)' starting… Input parameters: { 'DEM' : 'D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif', 'FLOW_ROUTING' : 4, 'PREPROCESSING' : 1, 'SCA' : 'TEMPORARY_OUTPUT', 'TCA' : 'TEMPORARY_OUTPUT' }

io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/fa5eb74727f84d22b4702dc9465b31bc/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/fa5eb74727f84d22b4702dc9465b31bc/dtm133148187clip.sgrd" -PREPROCESSING 1 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/06540ab8349645a5b07344262e7aa6b6/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/938deec490854107aced5ea31d0bae49/SCA.sdat"

C:\Users\Administrator\Documents>set SAGA=C:/OSGeo4W/apps\saga

C:\Users\Administrator\Documents>set SAGA_MLB=C:/OSGeo4W/apps\saga\modules

C:\Users\Administrator\Documents>PATH=C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\apps\grass\grass78\lib;C:\OSGeo4W\apps\grass\grass78\bin;C:\OSGeo4W\apps\qt5\bin;C:\OSGeo4W\apps\Python39\Scripts;C:\OSGeo4W\bin;C:\windows\system32;C:\windows;C:\windows\system32\WBem;C:/OSGeo4W/apps\saga;C:/OSGeo4W/apps\saga\modules

C:\Users\Administrator\Documents>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/fa5eb74727f84d22b4702dc9465b31bc/dtm133148187clip.sgrd" -FILES "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif"



SAGA Version: 7.8.2 (64 bit)


library path: C:\OSGeo4W\apps\saga\tools\ library name: io_gdal library : io_gdal tool : Import Raster identifier : 0 author : O.Conrad (c) 2007 (A.Ringeler) processors : 8 [8]


Parameters

Grids: No objects Files: "D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif" Multiple Bands Output: automatic Select from Multiple Bands: Transformation: true Resampling: B-Spline Interpolation Extent: original

loading: D:/Rekvikvannet/DTM/data/dtm1_33_148_187_clip.tif

Driver: GTiff

Bands: 1

Rows: 3990

Columns: 5555

Transformation:

x' = 627771.083845 + x 1.000000 + y 0.000000

y' = 7745593.122450 + x 0.000000 + y -1.000000

loading: dtm1_33_148_187_clip

warning: top-to-bottom and left-to-right cell sizes differ. Difference: 0.000000

using cellsize: 1.000000

Saving grid: C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/fa5eb74727f84d22b4702dc9465b31bc/dtm133148187clip.sgrd...

C:\Users\Administrator\Documents>saga_cmd toolchains_terrain_analysis "Flow Accumulation (One Step)" -DEM "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/fa5eb74727f84d22b4702dc9465b31bc/dtm133148187clip.sgrd" -PREPROCESSING 1 -FLOW_ROUTING 4 -TCA "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/06540ab8349645a5b07344262e7aa6b6/TCA.sdat" -SCA "C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/938deec490854107aced5ea31d0bae49/SCA.sdat"



SAGA Version: 7.8.2 (64 bit)

89 loaded tool libraries (789 tools):

*) tool chain libraries

Error: select a library type -h or --help for further information

C:\Users\Administrator\Documents>exit Execution completed in 10.30 seconds Results: {'SCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/938deec490854107aced5ea31d0bae49/SCA.sdat', 'TCA': 'C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/06540ab8349645a5b07344262e7aa6b6/TCA.sdat'}

Loading resulting layers The following layers were not correctly generated. • C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/06540ab8349645a5b07344262e7aa6b6/TCA.sdat • C:/Users/azmtas01/AppData/Local/Temp/processing_wuZeQe/938deec490854107aced5ea31d0bae49/SCA.sdat You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

gioman commented 2 years ago

SAGA Version: 7.8.2 (64 bit)

89 loaded tool libraries (789 tools):

* tin_viewer

* tin_tools

* table_tools

* table_calculus

* ta_slope_stabilit

@ARTCON2020 the fact you see this list means you have edited the wrong file. If you are using the osgeo4w installer and have installed both 3.16 and 3.22 you have two different folders with SAGA description files

C:\OSGeo4W\apps\qgis-ltr\python\plugins\processing\algs\saga\description

and

C:\OSGeo4W\apps\qgis\python\plugins\sagaprovider\description

check you have edited the right one (compared to the QGIS version you are using).

ARTCON2020 commented 2 years ago

@gioman Here is the final result from my analysis and bug? too. It works with Saga but not with Saga-Next-Gen. With Saga-next-gen I encounter the same problem as before. Either cases the following massage emerged when I close the QGIS application

============================================================== Crash ID: 2bba35ac54ec3f66db08369439704d5a7beb5523

Stack Trace

GDALDestroyDriver : dal::GDALRasterDriver::deregisterGDALDrivers : dal::Client::~Client : calc::DataStorageId::setId : ::operator() : __crt_seh_guarded_call::operator(), &, > : execute_onexit_table : calc::vs2CsfVs : calc::vs2CsfVs : LdrpCallInitRoutine : LdrShutdownProcess : RtlExitUserProcess : ExitProcessImplementation : exit_or_terminate_process : common_exit : BaseThreadInitThunk : RtlUserThreadStart :

QGIS Info QGIS Version: 3.22.3-Bia?owie?a QGIS code revision: 1628765ec7 Compiled against Qt: 5.15.2 Running against Qt: 5.15.2 Compiled against GDAL: 3.4.1 Running against GDAL: 3.4.1

System Info CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.19044

========================================

Saga-Next-Gen

gioman commented 2 years ago

Saga-Next-Gen

@ARTCON2020 that is a 3rd party plugin, that ships its own SAGA description files. You have to patch that too

C:\Users\yourusername\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\processing_saga_nextgen\description

ARTCON2020 commented 2 years ago

@gioman Thank you so much for your unfailing support, indeed!

ARTCON2020 commented 2 years ago

Hi again @gioman Why QGIS crashes during application exiting time? Here is the message during when I ended QGIS 3.22.3 window```

================================ Crash ID: 05c088143e924e10648f542579c377b8179b054e

Stack Trace

GDALDestroyDriver : dal::GDALRasterDriver::deregisterGDALDrivers : dal::Client::~Client : calc::DataStorageId::setId : ::operator() : __crt_seh_guarded_call::operator(), &, > : execute_onexit_table : calc::vs2CsfVs : calc::vs2CsfVs : LdrpCallInitRoutine : LdrShutdownProcess : RtlExitUserProcess : ExitProcessImplementation : RuntimeDesc::ShutdownAllActiveRuntimes : ShellShim_CorExitProcess : try_cor_exit_process : exit_or_terminate_process : common_exit : BaseThreadInitThunk : RtlUserThreadStart :

QGIS Info QGIS Version: 3.22.3-Bia?owie?a QGIS code revision: 1628765ec7 Compiled against Qt: 5.15.2 Running against Qt: 5.15.2 Compiled against GDAL: 3.4.1 Running against GDAL: 3.4.1

System Info CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.19044

gioman commented 2 years ago

Hi again @gioman Why QGIS crashes during application exiting time?

@ARTCON2020 post: what you are doing, with what parameters and attach the necessary input data.

agiudiceandrea commented 2 years ago

@gioman see https://github.com/qgis/QGIS/issues/46487#issuecomment-993503912 and https://github.com/qgis/QGIS/issues/46754#issuecomment-1029250998

ARTCON2020 commented 2 years ago

@gioman The issue is resolved by changing the existing profile with new one. Thank you you all