GRASS logo


r.viewshed.cva - Undertakes a "cumulative viewshed analysis" using a vector points map as input "viewing" locations, using r.viewshed to calculate the individual viewsheds.


raster, viewshed, line of sight, LOS


r.viewshed.cva --help
r.viewshed.cva [-kcrbe] input=name vector=name output=name [observer_elevation=float] [target_elevation=float] [max_distance=float] [memory=integer] [refraction_coeff=float] [name_column=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Keep all interim viewshed maps produced by the routine (maps will be named "vshed_'name'_uniquenumber", where 'name' is the value in "name_column" for each input point. If no value specified in "name_column", cat value will be used instead)
Consider the curvature of the earth (current ellipsoid)
Consider the effect of atmospheric refraction
Output format is {0 (invisible) 1 (visible)}
Output format is invisible = NULL, else current elev - viewpoint_elev
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=name [required]
Input elevation map (DEM)
vector=name [required]
Name of input vector map
Name of input vector points map containg the set of points for this analysis.
output=name [required]
Output cumulative viewshed raster
Height of observation points off the ground
Default: 1.75
Height of target areas off the ground
Default: 1.75
Maximum visibility radius. By default infinity (-1)
Default: -1
Amount of memory to use (in MB)
Default: 500
Refraction coefficient (with flag -r)
Options: 0.0-1.0
Default: 0.14286
Database column for point names (with flag -k)

Table of contents


r.viewshed.cva is a module that allows for the construction of "Cumulative Viewshed", or "visualscape" maps from a series of input points stored in a vector points map. The routine is a python wrapper script that iterative loops through each input point, calculating a viewshed map, and then creates an output map that is coded by the number of input locations that can "see" each cell. r.viewshed.cva uses the GRASS GIS module r.viewshed for the viewshed analysis. r.viewshed is very fast, thus allowing for a cumulative viewshed analysis to run in a reasonable amount of time. The final cumulative viewshed map is computed using the "count" method of r.series, rather than with mapcalc, as it better handles the null values in the individual constituent viewshed maps (and allows for interim viewshed maps to be coded in any way).

Options and flags

r.viewshed.cva requires an input elevation map, input, and an input vector points map, vector. There is currently only one native flag for r.viewshed.cva, -k, which allows you to keep the interim viewshed maps made for each input point. Optionally, option name_column can be used with -k to specify the suffix of the kept viewshed maps by a particular column in the input vector points' database. If no value is specified for name_column, then the cat value will be used.

All other flags and options are inherited from r.viewshed (see the r.viewshed help page for more information on these).


The input vector points map can be manually digitized (with v.digit) over topographic or cultural features, or can be created as a series of random points (with r.random or v.random). Note that using the flag -k allows you to keep any interim viewshed maps created during the analysis, and these resultant viewshed maps will be named according to the cat number of the original input points. This is also useful for simple creating a large number of individual viewsheds from points in a vector file.

An automated summit extraction can be done with r.geomorphon.


Undertake a cumulative viewshed analysis from a digitized vector points map of prominent peaks in a region (North Carolina sample dataset):
g.region raster=elevation -p
# use v.digit to digitize points or e.g. the r.geomorphon addon for summits
r.viewshed.cva input=elevation output=peaks_CVA_map \
  vector=prominent_peaks_points name_column=cat \
  observer_elevation=1.75 target_elevation=0

Undertake a cumulative viewshed analysis from a 10% sample of landscape locations in a region:
g.region raster=elevation -p
r.random input=elevation n=10% vector=rand_points_10p
r.viewshed.cva input=elevation output=peaks_CVA_map \
  vector=rand_points_10p name_column=cat \
  observer_elevation=1.75 target_elevation=0


r.geomorphon, r.viewshed


Isaac Ullah


Available at: r.viewshed.cva source code (history)

Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.3.3dev Reference Manual