![GRASS logo](grass_logo.png)
NAME
r.viewshed.cva.py
DESCRIPTION
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 addon r.viewshed
for the viewshed analysis (instead of the standard module r.los)
because r.viewshed is substantially faster,
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 and an input
vector points map with at least three columns of data: one contains
a unique identifier for each point (e.g., "cat"), one contains the
easting of the point, and one contains the northing of the point.
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. All other flags and options are inherited from
r.viewshed (see the r.viewshed help page for more
information on these).
NOTES
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). The required "name_column" can be any alpha numeric
value, as long as it is unique for each input point. The required
"x_column" and "y_column" columns can be added with v.db.addcol,
and the eastings and northings uploaded to these columns with
v.to.db. Note that using the flag -k allows you to keep any
interim viewshed maps created during the analysis. This is also
useful for simple creating a large number of individual viewsheds
from points in a vector file.
Also note that you must first install the GRASS addon r.viewshed
before you can use this module. r.viewshed offers
several significant advnatages over r.los, not least a
great increase in processing speed. Use of r.los would mean
that only a small number of input points could be used. Use of
r.viewshed means that a much larger number of points could be
used (trials showed that viewsheds were calculated for 100 input
points in about 1.5 hrs at a 10m resolution for a region spanning
some 40km by 10km).
EXAMPLES
Undertake a cumulative viewshed analysis from a digitized vector points map of prominent peaks in a region:
g.region rast=elevation_10m_dem@PERMANENT -p
v.db.addcol map=prominent_peaks_points@PERMANENT columns=x double, y double
v.to.db map=prominent_peaks_points@PERMANENT option=coor columns=x,y
r.viewshed.cva.py elev=elevation10m_demPERMANENT output=peaks_CVA_map \
vect=prominent_peaks_points@PERMANENT x_column=x y_column=y \
name_column=cat obs_elev=0.0 tgt_elev=1.75 max_dist=-1 mem=1500
Undertake a cumulative viewshed analysis from a 10% sample of landscape locations in a region:
g.region rast=elevation_10m_dem@PERMANENT
r.random input=elevation10m_demPERMANENT n=10% vector_output=rand_points_10p
v.db.addcol map=rand_points_10p@PERMANENT columns=x double, y double
v.to.db map=rand_points_10p@PERMANENT option=coor columns=x,y
r.viewshed.cva.py elev=elevation10m_demPERMANENT output=peaks_CVA_map \
vect=rand_points_10p@PERMANENT x_column=x y_column=y \
name_column=cat obs_elev=0.0 tgt_elev=1.75 max_dist=-1 mem=1500
SEE ALSO
r.viewshed
AUTHOR
Isaac Ullah
Last changed: $Date: 2013-05-10 11:36:36 -0700 (Fri, 10 May 2013) $
Main index - raster index - Full index
© 2003-2014 GRASS Development Team