I got a DEM, created a slope layer from it, then used r.cost (Processing Toolbox) to create a cost surface. But when I run the r.drain module, I get an error and no file created. Here's the log with the error message:
A iniciar o algoritmo r.drain - Traces a flow through an elevation model on a raster map.... g.proj -c proj4="+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" r.external input="C:/.../Exercicios em teste/Novos exercicios/Least Cost Path/Cumulative-cost.tif" band=1 output=tmp14908042929517 --overwrite -o v.in.ogr min_area=0.0001 snap=-1 input="C.../Exercicios em teste/Novos exercicios/Least Cost Path" layer=Pontos-Alvo output=tmp14908042929518 --overwrite -o g.region -a n=9840380.0 s=9840130.0 e=785141.0 w=784667.0 res=1.0 r.drain input=tmp14908042929517 start_coordinates="(0,0)" start_points=tmp14908042929518 -c -a -n output=output41993ef1fbf245b780c12dd73c1c4c96 --overwrite g.region raster=output41993ef1fbf245b780c12dd73c1c4c96 r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW" input=output41993ef1fbf245b780c12dd73c1c4c96 output="C:/.../Exercicios em teste/Novos exercicios/Least Cost Path/LeastCostPath.tif"
C:\PROGRA~1\QGIS2~1.14\bin>set HOME=C:\Users\
C:\PROGRA~1\QGIS2~1.14\bin>set GISRC=C:\Users....qgis2\processing\processing.gisrc7
C:\PROGRA~1\QGIS2~1.14\bin>set WINGISBASE=C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0
C:\PROGRA~1\QGIS2~1.14\bin>set GISBASE=C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0
C:\PROGRA~1\QGIS2~1.14\bin>set GRASS_PROJSHARE=C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\share\proj
C:\PROGRA~1\QGIS2~1.14\bin>set GRASS_MESSAGE_FORMAT=plain
C:\PROGRA~1\QGIS2~1.14\bin>if "" == "" set PATH=C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\bin;C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\lib;C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg\shapely\DLLs;C:\PROGRA~1\QGIS2~1.14\apps\Python27\DLLs;C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\numpy\core;C:\PROGRA~1\QGIS2~1.14\apps\qgis-ltr\bin;C:\PROGRA~1\QGIS2~1.14\apps\Python27\Scripts;C:\PROGRA~1\QGIS2~1.14\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\WBem
C:\PROGRA~1\QGIS2~1.14\bin>if not "" == "" set PATH=C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\bin;C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\lib;;C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\bin;C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\lib;C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg\shapely\DLLs;C:\PROGRA~1\QGIS2~1.14\apps\Python27\DLLs;C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\numpy\core;C:\PROGRA~1\QGIS2~1.14\apps\qgis-ltr\bin;C:\PROGRA~1\QGIS2~1.14\apps\Python27\Scripts;C:\PROGRA~1\QGIS2~1.14\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\WBem
C:\PROGRA~1\QGIS2~1.14\bin>set GRASS_VERSION=7.0.0
C:\PROGRA~1\QGIS2~1.14\bin>if not "" == "" goto langset
C:\PROGRA~1\QGIS2~1.14\bin>FOR /F "usebackq delims==" %i IN ("C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\etc\winlocale"
) DO @set LANG=%i
C:\PROGRA~1\QGIS2~1.14\bin>set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY
C:\PROGRA~1\QGIS2~1.14\bin>set PYTHONPATH=;C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\etc\python;C:\PROGRA~1\QGIS2~1.14\apps\grass\grass-7.2.0\etc\wxpython\n
C:\PROGRA~1\QGIS2~1.14\bin>g.gisenv.exe set="MAPSET=PERMANENT"
C:\PROGRA~1\QGIS2~1.14\bin>g.gisenv.exe set="LOCATION=temp_location"
C:\PROGRA~1\QGIS2~1.14\bin>g.gisenv.exe set="LOCATION_NAME=temp_location"
C:\PROGRA~1\QGIS2~1.14\bin>g.gisenv.exe set="GISDBASE=C:\Users...\AppData\Local\Temp\processing961f3d92f1074413bf58edae90f70b98\grassdata"
C:\PROGRA~1\QGIS2~1.14\bin>g.gisenv.exe set="GRASS_GUI=text"
C:\PROGRA~1\QGIS2~1.14\bin>g.proj -c proj4="+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" Default region was updated to the new projection, but if you have multiple mapsets g.region -d
should be run in each to update the region from the default Projection information updated
C:\PROGRA~1\QGIS2~1.14\bin>r.external input="C:/Users/.../Exercicios em teste/Novos exercicios/Least Cost Path/Cumulative-cost.tif" band=1 output=tmp14908042929517 --overwrite -o ATENÇÃO: Over-riding projection check Reading band 1 of 1... r.external completo. Link to raster map created.
C:\PROGRA~1\QGIS2~1.14\bin>v.in.ogr min_area=0.0001 snap=-1 input="C:/.../Exercicios em teste/Novos exercicios/Least Cost Path" layer=Pontos-Alvo output=tmp14908042929518 --overwrite -o Over-riding projection check Check if OGR layer contains polygons... 0..50..100 Importing 2 features (OGR layer )... 0..50..100 ----------------------------------------------------- A construir topologia para mapa vectorial ... Registando primitivas...
2 primitives registered 2 vertices registered A construir áreas... 0..50..100 0 areas built 0 isles built A anexar ilhas... A anexar centróides... 50..100 Número de nós: 0 Número de primitivos: 2 Número de pontos: 2 Número de linhas: 0 Número de fronteiras: 0 Número de centróides: 0 Número de áreas: 0 Número de ilhas: 0
C:\PROGRA~1\QGIS2~1.14\bin>g.region -a n=9840380.0 s=9840130.0 e=785141.0 w=784667.0 res=1.0
C:\PROGRA~1\QGIS2~1.14\bin>r.drain input=tmp14908042929517 start_coordinates="(0,0)" start_points=tmp14908042929518 -c -a -n output=output41993ef1fbf245b780c12dd73c1c4c96 --overwrite
Description: Traces a flow through an elevation model or cost surface on a raster map.
Keywords: raster, hydrology, cost surface
Usage: r.drain [-cand] input=name [direction=name] output=name [drain=name] [start_coordinates=east,north] [start_points=name[,name,...]] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags: -c Copia valores da célula de entrada -a Acumula valores da entrada ao longo do caminho -n Conta número de células ao longo do caminho -d The input raster map is a cost surface (direction surface must also be specified) --o Permitir que os ficheiros de saída reescrevam os ficheiros existentes --h Print usage summary --v Saída do módulo verbosa --q Saída do módulo quiet --qq Super quiet module output --ui Force launching GUI dialog
Parameters: input Name of input elevation or cost surface raster map direction Name of input movement direction map associated with the cost surface output Nome do mapa raster de saída drain Name for output drain vector map Recommended for cost surface made using knight's move start_coordinates Coordinates of starting point(s) (E,N) start_points Name of starting vector points map(s)
ERROR: Missing value for parameter
C:\PROGRA~1\QGIS2~1.14\bin>g.region raster=output41993ef1fbf245b780c12dd73c1c4c96 ERRO:Raster map not found
C:\PROGRA~1\QGIS2~1.14\bin>r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW" input=output41993ef1fbf245b780c12dd73c1c4c96 output="C:/.../Exercicios em teste/Novos exercicios/Least Cost Path/LeastCostPath.tif" ERRO:Raster map or group not found
C:\PROGRA~1\QGIS2~1.14\bin>exit Converting outputs Carregando as camadas resultantes
The following layers were not correctly generated. • Least cost path You can check the log messages to find more information about the execution of the algorithm
I can't figure out what am I doing wrong.