Learn R Programming

meteoland (version 0.9.7)

SpatialPointsTopography: Creates a 'SpatialPointsTopography'

Description

Function SpatialPointsTopography creates an object of class SpatialPointsTopography-class containing topographic variables for a set of points.

Usage

SpatialPointsTopography(points, elevation, slope = NULL, aspect = NULL,
                        proj4string = CRS(as.character(NA)))

Arguments

points

An object of class SpatialPoints-class.

elevation

Elevation values (in m) of the points.

slope

Slope values (in degrees) of the points.

aspect

Aspect values (in degrees from North) of the points.

proj4string

Object of class '>CRS in the first form only used when points does not inherit from '>Spatial.

Value

Function SpatialPointsTopography returns an object 'SpatialPointsTopography-class'.

Details

If either slope = NULL or aspect = NULL then when estimating weather on the object locations radiation will be calculated assuming a flat surface.

See Also

SpatialPointsTopography-class

Examples

Run this code
# NOT RUN {
data(examplegridtopography)

#Creates spatial topography points from the grid
p = 1:2
points = as(examplegridtopography,"SpatialPoints")[p]
spt = SpatialPointsTopography(points, examplegridtopography$elevation[p],
                              examplegridtopography$slope[p],
                              examplegridtopography$aspect[p])
spt

#Alternatively, use coercing and subsetting
spt = as(examplegridtopography, "SpatialPointsTopography")[p]
spt
# }

Run the code above in your browser using DataLab