[QGIS-it-user] Problema con r.viewshed

Buongiorno a tutti

···

Scusate se riprendo un vecchio post, spero di aver cercato male, ma non si era giunti ad una conclusione.
Il problema era ed è come fare l’intervisibilità da uno o più punti.
Visto che è una cosa che mi interessa (con ARCGIS andava tutto alla perfezione), mi piacerebbe farlo con QGIS e GRASS o altre librerie.

Su GRASS la funzione che ho provato è r.viewshed

Al momento utilizzo QGIS 2.14.18, con GRASS 7 su Win8

I miei dati di partenza sono:
DEM (chiamato ritaglio, dimensione dica 9x9Km) di coordinate ED50_32N e risoluzione 20m in formato .adf

Al momento dell’impostazione dei parametri inserisco il mio dem e le coordinate del punto (prese in automatico sulla carta) ed il resto tutto di default.

Questo è il risultato che ottengo:

The following layers were not correctly generated.

  • Intervisibility

You can check the log messages to find more information about the execution of the algorithm

Sottostante metto il log

Dove sbaglio?

Spero di avere una risposta

Grazie per la disponibilità

Buona giornata

Carlo

Questo è il risultato del log:
Avvio dell’algoritmo r.viewshed - Computes the viewshed of a point on an elevation raster map…

g.proj -c proj4=“+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs”

r.external input=“C:/Users/Carlo/Desktop/Intervisibilità/Ritaglio.adf” band=1 output=tmp1514634485085 --overwrite -o

g.region n=4784300.41447 s=4775860.41447 e=878428.146484 w=869488.146484 res=20.0

r.viewshed input=“tmp1514634485085” coordinates=874273.9051,4779833.1504 observer_elevation=“1.75” target_elevation=“0.0” max_distance=“-1” refraction_coeff=“0.14286” memory=“500” output=output748429110e1f4714a5552789a2099a4d --overwrite

g.region raster=output748429110e1f4714a5552789a2099a4d

r.out.gdal --overwrite -c createopt=“TFW=YES,COMPRESS=LZW” input=output748429110e1f4714a5552789a2099a4d output=“C:\Users\Carlo\AppData\Local\Temp\processingbd0e790536f444528effa8279a2507f8\868aad2d005d4b458a06db9238ea81b9\output.tif”

C:\OSGeo4W64\bin>set HOME=C:\Users\Carlo

C:\OSGeo4W64\bin>set GISRC=C:\Users\Carlo.qgis2\processing\processing.gisrc7

C:\OSGeo4W64\bin>set WINGISBASE=C:\OSGeo4W64\apps\grass\grass-7.2.1

C:\OSGeo4W64\bin>set GISBASE=C:\OSGeo4W64\apps\grass\grass-7.2.1

C:\OSGeo4W64\bin>set GRASS_PROJSHARE=C:\OSGeo4W64\apps\grass\grass-7.2.1\share\proj

C:\OSGeo4W64\bin>set GRASS_MESSAGE_FORMAT=plain

C:\OSGeo4W64\bin>if “” == “” set PATH=C:\OSGeo4W64\apps\grass\grass-7.2.1\bin;C:\OSGeo4W64\apps\grass\grass-7.2.1\lib;C:\OSGEO4~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg\shapely\DLLs;C:\OSGEO4~1\apps\Python27\DLLs;C:\OSGEO4~1\apps\Python27\lib\site-packages\numpy\core;C:\OSGEO4~1\apps\qgis\bin;C:\OSGEO4~1\apps\grass\grass-7.2.2\lib;C:\OSGEO4~1\apps\grass\grass-7.2.2\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\WBem

C:\OSGeo4W64\bin>if not “” == “” set PATH=C:\OSGeo4W64\apps\grass\grass-7.2.1\bin;C:\OSGeo4W64\apps\grass\grass-7.2.1\lib;;C:\OSGeo4W64\apps\grass\grass-7.2.1\bin;C:\OSGeo4W64\apps\grass\grass-7.2.1\lib;C:\OSGEO4~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg\shapely\DLLs;C:\OSGEO4~1\apps\Python27\DLLs;C:\OSGEO4~1\apps\Python27\lib\site-packages\numpy\core;C:\OSGEO4~1\apps\qgis\bin;C:\OSGEO4~1\apps\grass\grass-7.2.2\lib;C:\OSGEO4~1\apps\grass\grass-7.2.2\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\WBem

C:\OSGeo4W64\bin>set GRASS_VERSION=7.2.1

C:\OSGeo4W64\bin>if not “” == “” goto langset

C:\OSGeo4W64\bin>FOR /F “usebackq delims==” %i IN ("C:\OSGeo4W64\apps\grass\grass-7.2.1\etc\winlocale") DO @set LANG=%i

C:\OSGeo4W64\bin>set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY

C:\OSGeo4W64\bin>set PYTHONPATH=;C:\OSGeo4W64\apps\grass\grass-7.2.1\etc\python;C:\OSGeo4W64\apps\grass\grass-7.2.1\etc\wxpython\n

C:\OSGeo4W64\bin>g.gisenv.exe set=“MAPSET=PERMANENT”

C:\OSGeo4W64\bin>g.gisenv.exe set=“LOCATION=temp_location”

C:\OSGeo4W64\bin>g.gisenv.exe set=“LOCATION_NAME=temp_location”

C:\OSGeo4W64\bin>g.gisenv.exe set=“GISDBASE=C:\Users\Carlo\AppData\Local\Temp\processingbd0e790536f444528effa8279a2507f8\grassdata”

C:\OSGeo4W64\bin>g.gisenv.exe set=“GRASS_GUI=text”

C:\OSGeo4W64\bin>g.proj -c proj4=“+proj=utm +zone=32 +datum=WGS84 +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

Informazioni sulla proiezione aggiornate

C:\OSGeo4W64\bin>r.external input=“C:/Users/Carlo/Desktop/Intervisibilità /Ritaglio.adf” band=1 output=tmp1514634485085 --overwrite -o

ERROR 4: `C:/Users/Carlo/Desktop/Intervisibilit+á/Ritaglio.adf’ does not exist in the file system,

and is not recognized as a supported dataset name.

C:\OSGeo4W64\bin>g.region n=4784300.41447 s=4775860.41447 e=878428.146484 w=869488.146484 res=20.0

C:\OSGeo4W64\bin>r.viewshed input=“tmp1514634485085” coordinates=874273.9051,4779833.1504 observer_elevation=“1.75” target_elevation=“0.0” max_distance=“-1” refraction_coeff=“0.14286” memory=“500” output=output748429110e1f4714a5552789a2099a4d --overwrite

Computing events…

ERRORE: Raster map [tmp1514634485085] not found

C:\OSGeo4W64\bin>g.region raster=output748429110e1f4714a5552789a2099a4d

ERRORE: Mappa raster non trovata

C:\OSGeo4W64\bin>r.out.gdal --overwrite -c createopt=“TFW=YES,COMPRESS=LZW” input=output748429110e1f4714a5552789a2099a4d output=“C:\Users\Carlo\AppData\Local\Temp\processingbd0e790536f444528effa8279a2507f8\868aad2d005d4b458a06db9238ea81b9\output.tif”

ERRORE: Mappa raster o gruppo non trovato

C:\OSGeo4W64\bin>exit

Converting outputs

Caricamento layer

The following layers were not correctly generated.

  • Intervisibility

You can check the log messages to find more information about the execution of the algorithm

La prima cosa che proverei è rimuovere l’accento dal nome della cartella intervisibilità. Ovviamente non assicuro che sia risolutivo, ma mi viene in mente leggendo il primo errore:

C:\OSGeo4W64\bin>r.external input=“C:/Users/Carlo/Desktop/Intervisibilità /Ritaglio.adf” band=1 output=tmp1514634485085 --overwrite -o

ERROR 4: `C:/Users/Carlo/Desktop/Intervisibilit+á/Ritaglio.adf’ does not exist in the file system,

and is not recognized as a supported dataset name.

Facci sapere,

R

···

Il 08/01/2018 12:52, Carlo ha scritto:

Buongiorno a tutti

-- 
Eng. Roberto Marzocchi, PhD
GIS Project Coordinator
Gter srl Innovazione in Geomatica, Gnss e Gis (Unige spin-off)
Piazza De Marini 3/61 - 16123 Genova
P.IVA/CF 01998770992
ph: 010-8694830 - mob: 349-8786575
E-mail: [roberto.marzocchi@gter.it](mailto:roberto.marzocchi@gter.it)
skype: roberto.marzocchi84
[www.gter.it](http://www.gter.it)

--
Gter social
[www.twitter.com/Gteronline](http://www.twitter.com/Gteronline) - [www.facebook.com/Gteronline](http://www.facebook.com/Gteronline) - [https://plus.google.com/+GterIt/posts](https://plus.google.com/+GterIt/posts) 
[www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis](http://www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis)

-----------------------------------------------------------------
Please consider the environment before printing this email! 

Scusate se riprendo un vecchio post, spero di aver cercato male, ma non si era giunti ad una conclusione.
Il problema era ed è come fare l’intervisibilità da uno o più punti.
Visto che è una cosa che mi interessa (con ARCGIS andava tutto alla perfezione), mi piacerebbe farlo con QGIS e GRASS o altre librerie.

Su GRASS la funzione che ho provato è r.viewshed

Al momento utilizzo QGIS 2.14.18, con GRASS 7 su Win8

I miei dati di partenza sono:
DEM (chiamato ritaglio, dimensione dica 9x9Km) di coordinate ED50_32N e risoluzione 20m in formato .adf

Al momento dell’impostazione dei parametri inserisco il mio dem e le coordinate del punto (prese in automatico sulla carta) ed il resto tutto di default.

Questo è il risultato che ottengo:

The following layers were not correctly generated.

  • Intervisibility

You can check the log messages to find more information about the execution of the algorithm

Sottostante metto il log

Dove sbaglio?

Spero di avere una risposta

Grazie per la disponibilità

Buona giornata

Carlo

Questo è il risultato del log:
Avvio dell’algoritmo r.viewshed - Computes the viewshed of a point on an elevation raster map…

g.proj -c proj4=“+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs”

r.external input=“C:/Users/Carlo/Desktop/Intervisibilità/Ritaglio.adf” band=1 output=tmp1514634485085 --overwrite -o

g.region n=4784300.41447 s=4775860.41447 e=878428.146484 w=869488.146484 res=20.0

r.viewshed input=“tmp1514634485085” coordinates=874273.9051,4779833.1504 observer_elevation=“1.75” target_elevation=“0.0” max_distance=“-1” refraction_coeff=“0.14286” memory=“500” output=output748429110e1f4714a5552789a2099a4d --overwrite

g.region raster=output748429110e1f4714a5552789a2099a4d

r.out.gdal --overwrite -c createopt=“TFW=YES,COMPRESS=LZW” input=output748429110e1f4714a5552789a2099a4d output=“C:\Users\Carlo\AppData\Local\Temp\processingbd0e790536f444528effa8279a2507f8\868aad2d005d4b458a06db9238ea81b9\output.tif”

C:\OSGeo4W64\bin>set HOME=C:\Users\Carlo

C:\OSGeo4W64\bin>set GISRC=C:\Users\Carlo.qgis2\processing\processing.gisrc7

C:\OSGeo4W64\bin>set WINGISBASE=C:\OSGeo4W64\apps\grass\grass-7.2.1

C:\OSGeo4W64\bin>set GISBASE=C:\OSGeo4W64\apps\grass\grass-7.2.1

C:\OSGeo4W64\bin>set GRASS_PROJSHARE=C:\OSGeo4W64\apps\grass\grass-7.2.1\share\proj

C:\OSGeo4W64\bin>set GRASS_MESSAGE_FORMAT=plain

C:\OSGeo4W64\bin>if “” == “” set PATH=C:\OSGeo4W64\apps\grass\grass-7.2.1\bin;C:\OSGeo4W64\apps\grass\grass-7.2.1\lib;C:\OSGEO4~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg\shapely\DLLs;C:\OSGEO4~1\apps\Python27\DLLs;C:\OSGEO4~1\apps\Python27\lib\site-packages\numpy\core;C:\OSGEO4~1\apps\qgis\bin;C:\OSGEO4~1\apps\grass\grass-7.2.2\lib;C:\OSGEO4~1\apps\grass\grass-7.2.2\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\WBem

C:\OSGeo4W64\bin>if not “” == “” set PATH=C:\OSGeo4W64\apps\grass\grass-7.2.1\bin;C:\OSGeo4W64\apps\grass\grass-7.2.1\lib;;C:\OSGeo4W64\apps\grass\grass-7.2.1\bin;C:\OSGeo4W64\apps\grass\grass-7.2.1\lib;C:\OSGEO4~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg\shapely\DLLs;C:\OSGEO4~1\apps\Python27\DLLs;C:\OSGEO4~1\apps\Python27\lib\site-packages\numpy\core;C:\OSGEO4~1\apps\qgis\bin;C:\OSGEO4~1\apps\grass\grass-7.2.2\lib;C:\OSGEO4~1\apps\grass\grass-7.2.2\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\WBem

C:\OSGeo4W64\bin>set GRASS_VERSION=7.2.1

C:\OSGeo4W64\bin>if not “” == “” goto langset

C:\OSGeo4W64\bin>FOR /F “usebackq delims==” %i IN ("C:\OSGeo4W64\apps\grass\grass-7.2.1\etc\winlocale") DO @set LANG=%i

C:\OSGeo4W64\bin>set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY

C:\OSGeo4W64\bin>set PYTHONPATH=;C:\OSGeo4W64\apps\grass\grass-7.2.1\etc\python;C:\OSGeo4W64\apps\grass\grass-7.2.1\etc\wxpython\n

C:\OSGeo4W64\bin>g.gisenv.exe set=“MAPSET=PERMANENT”

C:\OSGeo4W64\bin>g.gisenv.exe set=“LOCATION=temp_location”

C:\OSGeo4W64\bin>g.gisenv.exe set=“LOCATION_NAME=temp_location”

C:\OSGeo4W64\bin>g.gisenv.exe set=“GISDBASE=C:\Users\Carlo\AppData\Local\Temp\processingbd0e790536f444528effa8279a2507f8\grassdata”

C:\OSGeo4W64\bin>g.gisenv.exe set=“GRASS_GUI=text”

C:\OSGeo4W64\bin>g.proj -c proj4=“+proj=utm +zone=32 +datum=WGS84 +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

Informazioni sulla proiezione aggiornate

C:\OSGeo4W64\bin>r.external input=“C:/Users/Carlo/Desktop/Intervisibilità /Ritaglio.adf” band=1 output=tmp1514634485085 --overwrite -o

ERROR 4: `C:/Users/Carlo/Desktop/Intervisibilit+á/Ritaglio.adf’ does not exist in the file system,

and is not recognized as a supported dataset name.

C:\OSGeo4W64\bin>g.region n=4784300.41447 s=4775860.41447 e=878428.146484 w=869488.146484 res=20.0

C:\OSGeo4W64\bin>r.viewshed input=“tmp1514634485085” coordinates=874273.9051,4779833.1504 observer_elevation=“1.75” target_elevation=“0.0” max_distance=“-1” refraction_coeff=“0.14286” memory=“500” output=output748429110e1f4714a5552789a2099a4d --overwrite

Computing events…

ERRORE: Raster map [tmp1514634485085] not found

C:\OSGeo4W64\bin>g.region raster=output748429110e1f4714a5552789a2099a4d

ERRORE: Mappa raster non trovata

C:\OSGeo4W64\bin>r.out.gdal --overwrite -c createopt=“TFW=YES,COMPRESS=LZW” input=output748429110e1f4714a5552789a2099a4d output=“C:\Users\Carlo\AppData\Local\Temp\processingbd0e790536f444528effa8279a2507f8\868aad2d005d4b458a06db9238ea81b9\output.tif”

ERRORE: Mappa raster o gruppo non trovato

C:\OSGeo4W64\bin>exit

Converting outputs

Caricamento layer

The following layers were not correctly generated.

  • Intervisibility

You can check the log messages to find more information about the execution of the algorithm

_______________________________________________
QGIS-it-user mailing list
[QGIS-it-user@lists.osgeo.org](mailto:QGIS-it-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/qgis-it-user](https://lists.osgeo.org/mailman/listinfo/qgis-it-user)

Il 08/01/2018 12:52, Carlo ha scritto:

ERROR 4: `C:/Users/Carlo/Desktop/Intervisibilit+á/Ritaglio.adf' does not
exist in the file system,

and is not recognized as a supported dataset name.

proverei ad evitare le accentate nel percorso.
Se questo è il problema, per cortesia riprova con la versione attuale
(2.18) e in caso sia confermato apri un ticket, dovrebbe essere faile da
sistemare.
Grazie.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis

prova a mettere una distanza finita e non -1.
magari non va bene se la distanza di visibilità è oltre l'extent.

s.

--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html