Learn R Programming

horizon (version 1.2)

horizonSearch: Horizon elevation angle from DEM RasterLayer

Description

Computes the horizon elevation angle, within a maximum search distance, for a given azimith angle for each pixel in a digital elevation model raster object.

Usage

horizonSearch(x, azimuth, maxDist = 1000, degrees = FALSE, 
              ll = TRUE, filename = "", blockSize = NULL)

Arguments

x

RasterLayer object.

azimuth

numeric. Azimuth angle.

maxDist

integer. Maximum search distance in meters.

degrees

logical. If TRUE, input (azimuth) and output (horizon elevation) angles are in degrees; else in radian.

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.

Value

RasterLayer object

Details

Azimuth is measured from North over East.

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

See Also

svf

Examples

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

h <- horizonSearch(r, 60, degrees=TRUE, maxDist=2000, ll=TRUE)
# }

Run the code above in your browser using DataLab