For each cell of the elevation raster map, count the number of cells from which it can be seen (mode=all):
r.cva elevation=MyDEM mode=all
For each cell that contains a point in an input vector map, compute the binary viewshed (0=invisible, 1=visible) from it and accumulate the results for all points (mode=sites):
r.cva -f elevation=MyDEM sites=observers output=visibility mode=sites
DESCRIPTION
This program performs multiple line-of-sight checks between one or more observer cells and
multiple cells within a distance threshold from the current observer. The number of cells
within all unbroken lines of sight is recorded for each observer and stored in the
raster output map as a cumulative count.
Two fundamental types of visibility can be computed:
In addition, there are several modes of operation, specified using the mode option:
The definition of which cells constitute "observers" depends on the mode of operation:
The cells used in the analysis can be constrained by one or both of two masks. Both masks should be binary raster maps in which the areas of interest are coded "1" and all other cells "0". target_mask determines which cells are targets: a cell which is not a target will be returned as not visible from a given viewpoint even if it is actually visible according to the line-of-sight analysis (i.e. this mask performs the same function as patt_map in r.los). viewpt_mask constrains which cells may be treated as observers. For example, suppose that the raster map `no_sea' codes sea (elevation = 0) as `0' and land (elevation > 0) as `1'. In this case, specifying `no_sea' as the target_mask would cause r.cva to count cells on land that are visible from any viewpoint. Alternatively, specifying `no_sea' as the viewpt_mask would count any cells visible from viewpoints on land. Finally, specifying `no_sea' as both the target_mask and viewpt_mask would count cells on land that are visible from viewpoints on land.
The geometry of the potential line of sight between each pair of cells may be altered by means of two offsets, obs_elev and target_elev. The height obs_elev is added to the viewpoint and the height target_elev to each target cell. Note that by swapping these values it is possible to produce maps showing the number of cells from which a viewpoint is visible, or if the -f flag is set, the number of viewpoints which it is possible to see from each map cell.
A particular set of viewpoint locations in a random sample can be repeated by specifying the same value for seed. Alternatively, different values can be used to produce independent samples for statistical testing.
d(height)=dist^2/(2*Re)
With Re being the radius of the earth (ca. 6,356,766 m).
Note that you can use the same control values in operation modes
other than 'sites', if you specify the equivalent parameters
(see above). The latter will also work
as global settings in 'sites' mode. Attributes stored in the vector
map table will override these global settings unless the -i
flag is specified. The meaning of OFFSETA, OFFSETB and RADIUS1 is
the same as obs_elev, target_elev and max_dist. The latter still
exists for compatibility with earlier versions of r.cva.
NOTES
Input sites can also be 3D points, in which case absolute observer height is represented
by the z coordinate. If spot= has been specified or a 'SPOT' attribute is present
in the input vector map's attribute table, then these settings will override the z coordinate.
Make sure that the top and bottom settings of the current region are set to a range that
encompasses all points of interest (use g.region -p -3 to review current 3D region
settings).
r.cva works in the current geographic region, but ignores the current mask. Masking is achieved by specifying a target_mask and/or a viewpt_mask. For accurate results, the program must be run with the resolution of the geographic region set equal to the resolution of the data (see g.region).
This program assumes all height and distance measurements in meters. Legacy units must be converted to meters by the user before running r.cva.
It is also assumed, that N-S and E-W resolution of the current region are the same. If they differ, distances calculated for limiting the viewshed will be imprecise and results affected accordingly.
The number of cells visible from a given viewpoint includes the viewpoint itself only if the viewpoint is a target cell. Consequently, if neither the viewpoint nor any other cell within max_dist of it is a target cell then the size of that viewpoint's viewshed will be zero. Set the -m flag to locate such viewpoints (they will show as cells coded `0' as opposed to `-1'). Similarly, set the -m flag when the -f flag has been set in order to differentiate cells which are genuinely not visible from any viewpoint as opposed to those that are not target cells.
r.cva always informs the user what sampling frequency was attempted and subsequently achieved. This information is printed to standard output and is also placed in the output map's history file (which can be viewed using r.info). The sample attempted may differ slightly from that requested owing to the need to sample a whole number of cells. Any such discrepancy will be greatest in the case of small maps of coarse resolution. The sample achieved may be further reduced when a viewpt_mask has been specified. This will not occur with the option `random', because its algorithm repeatedly allocates viewpoints until the number that fall within mask cells coded `1' produces the frequency attempted. Such a reduction can, however, occur with the options `all', `systematic' and `sites', because their algorithms allocate viewpoints without reference to the mask and then simply ignore those that fall in mask cells coded `0'.
Cumulative viewshed analysis was defined by D. Wheatley, 1995, `Cumulative viewshed analysis: a GIS-based method for investigating intervisibility, and its archaeological application', in G. R. Lock and Z. Stancic (eds.) Archaeology and Geographic Information Systems: A European Perspective, London: Taylor and Francis, pp. 171-186.
Lake et al. (M. W. Lake, P. E. Woodman and S. J. Mithen, 1998, `Tailoring GIS software for archaeological applications: an example concerning viewshed analysis', Journal of Archaeological Science 25: 27-38) discuss the first version of r.cva and provide some timing estimates. They also discuss the importance of eliminating the edge effect that occurs when calculating the number of cells visible from a viewpoint that is closer than max_dist to the edge of the map.
Fisher et al. (P. Fisher, C. Farrelly, A. Maddocks and C. Ruggles, 1997, `Spatial Analysis of Visible Areas from the Bronze Age Cairns of Mull', Journal of Archaeological Science 24: 581--592) provide a useful review of some of the pitfalls that may trap unwary users of cumulative viewshed analysis. Most of these are easily avoided using r.cva.
With contributions by: Benjamin Ducke, Institute of Archaeology, University of Kiel, Germany.
The first version of r.cva was written by the author as part of the MAGICAL Project directed by Dr. Steven Mithen (Dept. of Archaeology, University of Reading, U.K.). The MAGICAL Project was made possible by a Natural Environment Research Council award (NERC GR3/9540) to Dr. Mithen.
r.cva draws heavily on the code for r.los, which was written by Kewan Q. Khawaja, Intelligent Engineering Systems Laboratory, M.I.T.
Adaptation to GRASS 6 vector and raster formats, additional functionality, documentation updates by Benjamin Ducke.
This program's memory footprint is small, but computation times can be excessive for large regions. If this becomes a problem in mode "all", consider using modes "systematic" or "random" instead. In addition, consider using as a smaller setting for max_dist.
The default option values for observer/target heights and distance limits assume that the map units are meters.
When max_dist is set to 100, the N-S and E-W resolutions are 50, and a target_mask has been specified, the cells immediately NE, SE, SW and NW of the viewpoint may not be masked when they should be. Please report any others that you find to the author.
Note that r.cva fixes two bugs in the original version of r.los: that obs_elev is truncated to its integer component and that the target mask (patt_map in r.los) does not apply to the viewpoint or its eight immediate neighbours.
Last changed: 2015-11-10
Main index - raster index - Full index
© 2003-2014 GRASS Development Team