Bug report #15787

Processing: GRASS: `r.viewshed` fails

Added by Paolo Cavallini almost 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/GRASS
Affected QGIS version:2.18.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:23707

Description

The command fails. Previously it was working fine. From the log it might be an upstream issue, or a consequence of a wrong param (refraction is new).
GRASS 7.0.5-2 here.

Avvio dell'algoritmo r.viewshed - Computes the viewshed of a point on an elevation raster map....
g.proj -c proj4="+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs" 
r.external input="/home/paolo/Scrivania/analisi/QGIS_data/processing/solar/dem.tif" band=1 output=tmp14776605316284 --overwrite -o
g.region n=4834913.78536 s=4803364.45416 e=1689398.6273 w=1650370.47057 res=25.0020222481
r.viewshed input=tmp14776605316284 coordinates="1685516.119,4822226.074" observer_elevation="100" target_elevation="0.0" max_distance="15000" refraction_coeff="0.14286" memory="500" output=output126caf0458524d93a4b0ca4b1eb55e17 --overwrite
g.region raster=output126caf0458524d93a4b0ca4b1eb55e17
r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW" input=output126caf0458524d93a4b0ca4b1eb55e17 output="/tmp/processing280351795abd4b46abfc4e193224ef92/426e9b3b2b1248afb45036cd951c3cbb/output.tif" 
Cleaning up temporary files... 
Sto avviando GRASS GIS... 
Sto eseguendo '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh'... 
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 
Informazioni sulla proiezione aggiornate 
ATTENZIONE: La verifica della proiezione verrà ignorata 
Reading band 1 of 1... 
r.external completo. Link to raster map created. 
ATTENZIONE: 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... 
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100 
Aborted 
ERRORE: Mappa raster non trovata 
ERRORE: Mappa raster o gruppo non trovato 
Esecuzione di '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh' terminata. 
Cleaning up temporary files... 
Cleaning up temporary files... 
Sto avviando GRASS GIS... 
Sto eseguendo '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh'... 
ERRORE: Mappa raster non trovata 
ERRORE: Mappa raster o gruppo non trovato 
Esecuzione di '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh' terminata. 
Cleaning up temporary files... 
Converting outputs
Caricamento layer

The following layers were not correctly generated.
Intervisibility

History

#1 Updated by Victor Olaya almost 10 years ago

It seems it cannot find the raster layer for the viewshed algorithm, but r.external seems to have created it.

Any more info you can provide?

#2 Updated by Paolo Cavallini almost 10 years ago

Checked again, I'm a bit lost here. Any suggestion what can I check?
Coords seem inverted here:
g.region n=4924820.77 s=4678320.77 e=1771747.23103 w=1554747.23103 res=100.0<code> <code>r.viewshed input=tmp1481281549583 coordinates="1621030.348,4879297.180" observer_elevation="1.75" but I tried swapping x,y, same result. In /tmp I find empty dirs. Thanks.

#3 Updated by Giovanni Manghi over 9 years ago

  • Resolution set to up/downstream
  • Status changed from Open to Closed

An upstream ticket must be filed.

This module in GRASS 7.* under Linux crashes when running against a raster imported with r.external. Works ok on Windows and against raster imported with r.in.gdal (that is not the case anymore in Processing).

#4 Updated by Markus Neteler over 9 years ago

I have created a test case and filed an upstream ticket at

https://trac.osgeo.org/grass/ticket/3285

Also available in: Atom PDF