[GIS] Flow Path length

flowqgissaga

I'm a student and pretty much new to QGIS, GRASS and SAGA tools.

I'm trying to calculate the longest flow path length using SAGA "flow path length" module in Qgis. Using the default parameters:

enter image description here

I've added the elevation raster in input but after running the algorithm gives me this message:

'NoneType' object has no attribute 'crs' See log for more details

It looks like there's a problem with the projection fo my elevation raster but I don't know how to solve it.

Here's the log:

  Avvio dell'algoritmo Flow path length...
io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/gj/24tjnl3d5q1cbmf8qrzp5l080000gp/T/processing910e7d22ea2041cc939e7488099b5565/92672e01a5cf41ee821f071e6242f7a5/dtm5x5reg.sgrd" -FILES "/Users/macbook/Desktop/TESI_ELABORATO/Analisi Idrologica/Area contribuente/AreaContribuente/AreaDTM5x5/dtm5x5reg.asc"
ta_hydrology "Flow Path Length" -ELEVATION "/var/folders/gj/24tjnl3d5q1cbmf8qrzp5l080000gp/T/processing910e7d22ea2041cc939e7488099b5565/92672e01a5cf41ee821f071e6242f7a5/dtm5x5reg.sgrd" -SEEDS_ONLY false -METHOD 0 -CONVERGENCE 1.1 -LENGTH "/var/folders/gj/24tjnl3d5q1cbmf8qrzp5l080000gp/T/processing910e7d22ea2041cc939e7488099b5565/3df24309d1b44b6a9b92e95176e61762/LENGTH.sdat"
/Users/macbook/.qgis2//processing/saga_batch_job.sh: line 3: 35670 Segmentation fault: 11 saga_cmd io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/gj/24tjnl3d5q1cbmf8qrzp5l080000gp/T/processing910e7d22ea2041cc939e7488099b5565/92672e01a5cf41ee821f071e6242f7a5/dtm5x5reg.sgrd" -FILES "/Users/macbook/Desktop/TESI_ELABORATO/Analisi Idrologica/Area contribuente/AreaContribuente/AreaDTM5x5/dtm5x5reg.asc"
Error: input file [/var/folders/gj/24tjnl3d5q1cbmf8qrzp5l080000gp/T/processing910e7d22ea2041cc939e7488099b5565/92672e01a5cf41ee821f071e6242f7a5/dtm5x5reg.sgrd]
Error: Elevation
____________________________

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

SAGA Version: 2.2.3

____________________________
library path: /Applications/QGIS.app/Contents/MacOS/lib/saga/
library name: libta_hydrology
library : Hydrology
tool : Flow Path Length
author : (c) 2005 by O.Conrad
____________________________

Load grid: /var/folders/gj/24tjnl3d5q1cbmf8qrzp5l080000gp/T/processing910e7d22ea2041cc939e7488099b5565/92672e01a5cf41ee821f071e6242f7a5/dtm5x5reg.sgrd...
failed

Usage: saga_cmd ta_hydrology 6 [-ELEVATION ] [-SEED ] [-LENGTH ] [-SEEDS_ONLY ] [-METHOD ] [-CONVERGENCE ]
-ELEVATION: Elevation
Grid (input)
-SEED: Seeds
Grid (optional input)
-LENGTH: Flow Path Length
Grid (output)
-SEEDS_ONLY: Seeds Only
Boolean
Default: 0
-METHOD: Flow Routing Algorithm
Choice
Available Choices:
[0] Deterministic 8 (D8)
[1] Multiple Flow Direction (FD8)
Default: 1
-CONVERGENCE: Convergence (FD8)
Floating point
Minimum: 0.000000
Default: 1.100000
Converting outputs

'NoneType' object has no attribute 'crs' See log for more details

Best Answer

Using your raster and the default input parameters:

enter image description here

it gives me a raster with only nanvalues (I think because I'm requesting something from an additional input layer that is not specified):

Instead, unchecking the Seeds only option, it seems to work:

enter image description here

but I don't know what this output means and if it is a correct result.

Related Question