Learn R Programming

horizon (version 1.2)

svf: Sky view factor from DEM RasterLayer

Description

Computes the sky view factor (fraction of sky not obstructed by terrain within a hemisphere), within a maximum search distance, for each pixel in a digital elevation model raster object.

Usage

svf(x, nAngles = 16, maxDist = 1000, ll = TRUE,
    filename = "", blockSize = NULL, verbose = TRUE)

Arguments

x

RasterLayer object

nAngles

integer. Discrete number of angles used to calculate sky view factor.

maxDist

integer. Maximum search distance in meters.

ll

logical. If TRUE, coordinates should be in degrees; else planar.

filename

character. Output raster filename. Optional.

blockSize

integer>0. Number of raster rows processed simultaneously. Default is the number of rows in the input raster divided by 10.

verbose

logical. If TRUE, progress messages are displayed.

Value

RasterLayer object. Values between 0 and 1.

Details

The sky view factor is estimated by calculating and averaging the horizon elevation angle and sky view factor for a discrete number of azimuth angles. Increasing this discreet number of angles 'nAngles' will provide a better estimate of the actual sky view factor, at the expense of longer processing time.

The 'maxDist' parameter determines the maximum search radius for determining the horizon angle. Increasing the value of 'maxDist' will provide a better estimate of the actual sky view factor, at the expense of longer processing time.

The 'blockSize' parameter may be reduced to avoid memory errors when processing large input RasterLayer objects.

See Also

horizonSearch

Examples

Run this code
# NOT RUN {
r <- getData('alt', country='ALB')

s <- svf(r, nAngles=8, maxDist=500, ll=TRUE)
# }

Run the code above in your browser using DataLab