2

I am having problems with r.viewshed.cva in GRASS GIS 7.0.3 and 7.0.4. I run the addon with the DEM and 100 random vector points as input. The vector points are composed by the cat, and X and Y colum with coordinates. Finally I get this error:

Traceback (most recent call last): File "C:\Users\AppData\Roaming\GRASS7\addons/script s/r.viewshed.cva.py", line 174, in main() File "C:\Users\AppData\Roaming\GRASS7\addons/script s/r.viewshed.cva.py", line 140, in main if flags['k'] and options["name_col"] is not '': KeyError: 'name_col'

My laptop is a Core i7, Windows 10.

4
  • Could be something with the paths in the error message, both / and \ in same paths
    – BERA
    Aug 18, 2016 at 8:24
  • mmm. but I don't know if it's something that I can solve.
    – Peter
    Aug 18, 2016 at 8:27
  • Note that the routine is constrained to points in the current geographic region. Calculating viewshed for location 542525.84871155,4760171.41381201 (point name = 1 ) Traceback (most recent call last): File "C:\Users\Miguel\AppData\Roaming\GRASS7\addons/script s/r.viewshed.cva.py", line 174, in <module> main()
    – Peter
    Aug 18, 2016 at 8:33
  • And now, it says Note that the routine is constrained to points in the current geographic region. Calculating viewshed for location 538892.79570571,4756461.28637303 (point name = 1 ) WARNING: Illegal filename <vshed_1 >. Character < > not allowed.
    – Peter
    Aug 18, 2016 at 8:41

2 Answers 2

1

Have you set the region Before running viewshed? Maybe its trying to perform viewshed where you have no dem data?

You can set region in menu Settings-Region-Set region. You can also use a command line. To set to your DEM raster use command g.region rast=elevation.dem, replace elevation.dem with raster name

2
  • I have already set the region, but seems to not be that the problem
    – Peter
    Aug 18, 2016 at 18:18
  • Did you try to install it from the console? g.extension r.viewshed.cva
    – geo_dd
    Aug 23, 2016 at 17:27
1

The addon was broken and should be fixed now. For running it on Windows please wait for tomorrow to install the updated version. For these cases you might consider asking on grass-users mailing list where you usually get faster response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.