I am trying to run this from QGIS python console to extract the channel network from the DEM, based on the catchment area:

processing.runalg('saga:channelnetwork', 'C:/Data/filled.tif', None, 'C:/Data/catchment_area.tif', 2, 10000000, None, 10, None, 10, 'C:/Data/channel_network.tif', 'C:/Data/africa/channel_route.tif', 'C:/Data/channel_network.shp')

The output is empty with nan values.

This is how I have derived the catchment area:

import processing
processing.runalg('saga:fillsinks', "C:/Data/clipped.tif", 0.010000, "C:/Data/filled.tif")
processing.runalg('saga:flowaccumulationtopdown', 'C:/Data/filled.tif', 0, 'C:/Data/catchment_area.tif')

I am using QGIS 2.18.11 with SAGA 2.3.2

  • What values are you getting in catchment_area.tif? Try lowering the threshold if your values are lower – firefly-orange Nov 21 '17 at 11:13
  • Thanks. The issue was with the projection not the threshold. – MKJ Nov 21 '17 at 12:46

The issue was a projection issue and by changing from the coordinate system to projection system, it worked well.

Here is the link for the solution from SAGA forum: SAGA Forum

  • Please mark your question as answered. – Dan B Apr 5 '18 at 17:44

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.