6

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
  • Which QGIS version are you using? – Joseph Dec 15 '16 at 11:00
  • @Joseph I'm using 2.14.7-Essen – Mirko Dec 15 '16 at 11:12
  • NoneType is the type for the None object and it represents the absence of a value. This means that the tool you are using failed to read your input raster. Can you provide it or a sample of it? If of interest, even your input parameters, thanks! – mgri Dec 15 '16 at 11:14
  • @HowToInQGIS I uploaded it here: infinit.io/_/XPYjrfG. – Mirko Dec 15 '16 at 12:01
3

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.

  • The result you showed is perfect. But unfortunately even unchecking the 'seeds only' option the massage still comes out. – Mirko Dec 15 '16 at 14:06
  • I have seen that the raster is from Italy, so even the CRS I used (EPSG:32632, WGS84/UTM zone 32N) should be correct. I didn't do any other particular operation: I loaded the raster in the Layers Panel and I ran the tool under the CRS above mentioned. Try to set it as the Project CRS (but I think it shouldn't is the origin of your error). Can you retrieve a log? – mgri Dec 15 '16 at 14:15
  • log in the original question – Mirko Dec 15 '16 at 14:35
  • Try this: firstly, copy&paste your raster to the Desktop; then, load the raster from the Desktop and run the tool without writing FlowPaths in the output path (don't write anything, as in my attachment of the dialog). Does it change something? – mgri Dec 15 '16 at 15:15
  • Therefore, from the log I read dtm5x5reg.asc, but your provided a .tif file. – mgri Dec 15 '16 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.