1

Getting the following error message when running r.viewshed

Processing algorithm…
Algorithm 'r.viewshed' starting…
Input parameters:
{ '-b' : True, '-c' : True, '-e' : False, '-r' : False, 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'coordinates' : '574583.6879638762,4750016.0627968935 [EPSG:26710]', 'input' : 'C:/Users/seansuzedielois/Documents/GIS/Mastering QGIS/Exercises/elev_clip.tif', 'max_distance' : 32000, 'memory' : 500, 'observer_elevation' : 20, 'output' : 'C:/Users/seansuzedielois/AppData/Local/Temp/processing_5a9b7eb19ebd43a9abc1f2f18e08d391/c11c8acdc82b4f71b2eb4c4ab3a15496/output.tif', 'refraction_coeff' : 0.14286, 'target_elevation' : 0 }

g.region n=0.0 s=0.0 e=0.0 w=0.0 res=100.0
r.viewshed input=rast_5d05e88ecd7383 coordinates=574583.6879638762,4750016.0627968935 observer_elevation=20 target_elevation=0 max_distance=32000 refraction_coeff=0.14286 memory=500 -c -b output=output18d498a864564b1ebfcce3671ea42038 --overwrite
g.region raster=output18d498a864564b1ebfcce3671ea42038
r.out.gdal -t -m input="output18d498a864564b1ebfcce3671ea42038" output="C:\Users\seansuzedielois\AppData\Local\Temp\processing_5a9b7eb19ebd43a9abc1f2f18e08d391\c11c8acdc82b4f71b2eb4c4ab3a15496\output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Cleaning up temporary files...
Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows
Executing <C:\Users\seansuzedielois\AppData\Local\Temp\processing_5a9b7eb19ebd43a9abc1f2f18e08d391\grassdata\grass_batch_job.cmd> ...
C:\PROGRA~1\QGIS3~1.4\bin>chcp 1252 1>NUL
C:\PROGRA~1\QGIS3~1.4\bin>g.region n=0.0 s=0.0 e=0.0 w=0.0 res=100.0
ERROR: North must be larger than South
C:\PROGRA~1\QGIS3~1.4\bin>r.viewshed input=rast_5d05e88ecd7383 coordinates=574583.6879638762,4750016.0627968935 observer_elevation=20 target_elevation=0 max_distance=32000 refraction_coeff=0.14286 memory=500 -c -b output=output18d498a864564b1ebfcce3671ea42038 --overwrite
WARNING: East-west resolution does not equal north-south resolution. The viewshed computation assumes the cells are square, so in this case this may result in innacuracies.
Computing events...
ERROR: Raster map [rast_5d05e88ecd7383] not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=output18d498a864564b1ebfcce3671ea42038
ERROR: Raster map <output18d498a864564b1ebfcce3671ea42038> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="output18d498a864564b1ebfcce3671ea42038" output="C:\Users\seansuzedielois\AppData\Local\Temp\processing_5a9b7eb19ebd43a9abc1f2f18e08d391\c11c8acdc82b4f71b2eb4c4ab3a15496\output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <output18d498a864564b1ebfcce3671ea42038> not found
C:\PROGRA~1\QGIS3~1.4\bin>exit
Execution of <C:\Users\seansuzedielois\AppData\Local\Temp\processing_5a9b7eb19ebd43a9abc1f2f18e08d391\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
Press any key to continue . . .
Execution completed in 1.60 seconds
Results:
{'output': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/seansuzedielois/AppData/Local/Temp/processing_5a9b7eb19ebd43a9abc1f2f18e08d391/c11c8acdc82b4f71b2eb4c4ab3a15496/output.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers
The following layers were not correctly generated.<ul><li>C:/Users/seansuzedielois/AppData/Local/Temp/processing_5a9b7eb19ebd43a9abc1f2f18e08d391/c11c8acdc82b4f71b2eb4c4ab3a15496/output.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.
  • 2
    I'm not an expert in GRASS but it seems as though your "region" is an empty area: n=0.0 s=0.0 e=0.0 w=0.0 res=100.0 - how do you specify this? – wfgeo Jun 16 '19 at 11:46
  • As @wfgeo says, empty "region" is also suggested in the other part ERROR: North must be larger than South. Go to Advanced parameters area - GRASS GIS 7 region extent (it says [optional]) and select, say, Use Layer Extent. – Kazuhito Jun 16 '19 at 11:53
  • Hi - thanks extent now set but for some reason the algorithm is finding the input raster layer? Could this be something to do with the GRASS settings. My QGIS version is 3.4 – Sean Jarrett Jun 16 '19 at 19:13
  • Do you see anything new in the error message / log this time? – Kazuhito Jun 17 '19 at 12:00
0

Viewshed works using the following settings. I selected both output format options. See screen shot. Thanks for everyones help on this enter image description here

| improve this answer | |

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.