I wanted to test the r.viewshed module from grass via the Toolbox in QGis. But no File is generated. This is the log output:
Algorithm r.viewshed - Computes the viewshed of a point on an elevation raster map. starting... g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs" r.external input="/home/matt/Desktop/slopes/N34E069.hgt" band=1 output=tmp14931314968715 --overwrite -o g.region n=35.0004166667 s=33.9995833333 e=70.0004166667 w=68.9995833333 res=0.000833333333333 r.viewshed input="tmp14931314968715" coordinates=69.6949645541,34.744452777 observer_elevation="2.00" target_elevation="0.0" max_distance="5000" refraction_coeff="0.14286" memory="500" -b output=output1415b59dffed4d07a82eb7ffa7b96a65 --overwrite g.region raster=output1415b59dffed4d07a82eb7ffa7b96a65 r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW" input=output1415b59dffed4d07a82eb7ffa7b96a65 output="/home/matt/.qgis2/processing/outputs/viewshed_test.tif" Starting GRASS GIS... Executing ... 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 WARNING: Over-riding projection check Reading band 1 of 1... r.external complete. Link to raster map created. Computing events... Aborted ERROR: Raster map not found ERROR: Raster map or group not found Execution of finished. Cleaning up temporary files... Starting GRASS GIS... Executing ... ERROR: Raster map not found ERROR: Raster map or group not found Execution of finished. Cleaning up temporary files... Converting outputs Loading resulting layers The following layers were not correctly generated. Intervisibility You can check the log messages to find more information about the execution of the algorithm
It says that the raster map was not found, however, the file exists at the specified location. I am using QGis 2.18.6
What am I doing wrong?
EDIT: This is the Dialogbox for the r.viewshed:
I've also tried with the python console, but there I do not get any log messages (no output file either):
import processing from PyQt4.QtCore import QFileInfo rasterPath="/home/matt/Desktop/slopes/N34E069.hgt" fileInfo=QFileInfo(rasterPath) baseName=fileInfo.baseName() rLayer = QgsRasterLayer(fileInfo.filePath(), baseName) # Define extent extent=rLayer.extent() xmin=extent.xMinimum() xmax=extent.xMaximum() ymin=extent.yMinimum() ymax=extent.yMaximum() extStr="%f,%f,%f,%f" % (xmin, xmax, ymin, ymax) # define viewpoint and outputDir coordStr = '%d,%d' % (34.841101,69.679670) outputViewshed = "/home/matt/Desktop/slopes/viewshed_test.tif" processing.runalg("grass7:r.viewshed", rLayer, coordStr, '0', '0', '800', 0.14286, 500, False, False, False, False, extStr, 0, outputViewshed)
ERROR 4: /home/matt/Desktop/slopes/viewshed_test.tif": No such file or directory
. This is the path to my output file. If I leave the output file path out (using a temp output file), the same error occurs. It seems like a permission problem to me but I am not sure.