We try to calculate catchments with the r.water.outlet function from python console. To do so we use the following code:
import processingrlayer = QgsRasterLayer("/my/path/DrainageDirection.tif", "DrainageDirection")processing.runalg("grass:r.water.outlet", rlayer , 2621378.611131 ,1262320.888212, "2589700, 2640500, 1242200, 1270000", 73, "/my/path/zzz.tif")The result in the zzz.tif file ist only one pixel with no value. This result differs when running the r.water.outlet is called from the GRASS Tools GUI. So,three questions:1) Do we handle the input raster (rlayer) correct?2) Do we hanlde the outputraster correct?3) Would it be possible to read a GRASS Mapset raser directly from phython console?
أكثر...
import processingrlayer = QgsRasterLayer("/my/path/DrainageDirection.tif", "DrainageDirection")processing.runalg("grass:r.water.outlet", rlayer , 2621378.611131 ,1262320.888212, "2589700, 2640500, 1242200, 1270000", 73, "/my/path/zzz.tif")The result in the zzz.tif file ist only one pixel with no value. This result differs when running the r.water.outlet is called from the GRASS Tools GUI. So,three questions:1) Do we handle the input raster (rlayer) correct?2) Do we hanlde the outputraster correct?3) Would it be possible to read a GRASS Mapset raser directly from phython console?
أكثر...