Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRASS 7 r.viewshed fails #26611

Closed
qgib opened this issue Apr 15, 2018 · 1 comment
Closed

GRASS 7 r.viewshed fails #26611

qgib opened this issue Apr 15, 2018 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS

Comments

@qgib
Copy link
Contributor

qgib commented Apr 15, 2018

Author Name: Garth Fletcher (@fgfletcher)
Original Redmine Issue: 18724
Affected QGIS version: 3.0.0
Redmine category:grass


Testing QGIS 3.0, KyngChaos QGIS 3.0.0-3 (because MacPorts QGIS 3.1 crashes under OSX))

Have DEM and using GRASS r.viewshed - which works with QGIS 2.18.15

With QGIS 3.0 and using the same DEM file, it ppears to execute but no output.
The runtime processing log display disappears too quickly to capture any info

with GRASS set to log everything
GRASS log shows:
2018-04-15T03:04:21 INFO processInputs end. Commands: ['g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"', 'r.external input="/Users/garthfletcher/GPS MASON/CeremonialStones/Clipped_R_Ft_3614.tif" band=1 output="rast_5ad2f9755025c2" --overwrite -o', 'g.region n=183135.6038 s=-182403.73670000004 e=1165623.3353 w=893494.6569 res=29.682447469458985']
2018-04-15T03:04:21 INFO processCommands end. Commands: ['g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"', 'r.external input="/Users/garthfletcher/GPS MASON/CeremonialStones/Clipped_R_Ft_3614.tif" band=1 output="rast_5ad2f9755025c2" --overwrite -o', 'g.region n=183135.6038 s=-182403.73670000004 e=1165623.3353 w=893494.6569 res=29.682447469458985', 'r.viewshed input=rast_5ad2f9755025c2 coordinates=955736.0695305177,98639.23656404298 [EPSG:3614] observer_elevation=1.75 target_elevation=0 max_distance=-1 refraction_coeff=0.14286 memory=500 output=outputae439ea3cb0049e2af26c672b5d51650 --overwrite']

By running r.viewshed in batch mode I can capture a bit more:
Log shows:

Processing algorithm 1/1…
Algorithm r.viewshed - Computes the viewshed of a point on an elevation raster map. starting…
Input parameters:
{'-b': False, '-c': False, '-e': False, '-r': False, 'GRASS_RASTER_FORMAT_META': '', 'GRASS_RASTER_FORMAT_OPT': '', 'GRASS_REGION_CELLSIZE_PARAMETER': 0.0, 'GRASS_REGION_PARAMETER': None, 'coordinates': '955712.2255720419,98615.39260556722 [EPSG:3614]', 'input': 'Reprojected', 'max_distance': -1.0, 'memory': 500.0, 'observer_elevation': 1.75, 'output': <QgsProcessingOutputLayerDefinition {'sink':/Users/garthfletcher/Intervis.tif, 'createOptions': {}}>, 'refraction_coeff': 0.14286, 'target_elevation': 0.0}

g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"
r.external input="/var/folders/h5/jbjhn4xs6x37xt_2m6x2nkbm0000gp/T/processing_a329705d8a9546dab23ecfad71acf014/fa50552226784df3a49e92e535ad542d/OUTPUT.tif" band=1 output="rast_5ad2f773129716" --overwrite -o
g.region n=183135.60382465608 s=-182403.7367341584 e=1165623.3352567302 w=893494.6568772573 res=29.682447467219998
r.viewshed input=rast_5ad2f773129716 coordinates=955712.2255720419,98615.39260556722 [EPSG:3614] observer_elevation=1.75 target_elevation=0 max_distance=-1 refraction_coeff=0.14286 memory=500 output=output754c53d8373344569ae52aa9ebd1fc0a --overwrite
g.region raster=output754c53d8373344569ae52aa9ebd1fc0a
r.out.gdal -t -m input="output754c53d8373344569ae52aa9ebd1fc0a" output="/Users/garthfletcher/Intervis.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
/var/folders/h5/jbjhn4xs6x37xt_2m6x2nkbm0000gp/T/processing_a329705d8a9546dab23ecfad71acf014/grassdata/temp_location/PERMANENT: /Applications/QGIS_3.app/Contents/MacOS/grass/etc/colors/grass: Permission denied
/var/folders/h5/jbjhn4xs6x37xt_2m6x2nkbm0000gp/T/processing_a329705d8a9546dab23ecfad71acf014/grassdata/temp_location/PERMANENT: /Applications/QGIS_3.app/Contents/MacOS/grass/etc/colors/grass: Permission denied
Algorithm r.viewshed - Computes the viewshed of a point on an elevation raster map. correctly executed…
Execution completed in 0.18 seconds
Results:
{'output': <QgsProcessingOutputLayerDefinition {'sink':/Users/garthfletcher/Intervis.tif, 'createOptions': {}}>}

Loading resulting layers
Batch execution completed in 0.23 seconds

Note the above batch log includes:
"/Applications/QGIS_3.app/Contents/MacOS/grass/etc/colors/grass: Permission denied",

but there is a /Applications/QGIS_3.app/Contents/MacOS/grass/etc/colors/grass file and
changing its permissions to read/write for all has no effect.

I made sure that both DEM file and the display were using the same CRS.

Any ideas?

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2018

Author Name: Nyall Dawson (@nyalldawson)


Fixed in master, will be included on 3.0.2


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Apr 15, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS
Projects
None yet
Development

No branches or pull requests

1 participant