Description Usage Arguments Value Author(s) See Also Examples
Function SpatialPixelsTopography
creates an object of class SpatialPixelsTopography-class
containing topographic variables for a set of points.
1 2 3 4 | SpatialPixelsTopography(points, elevation, slope, aspect,
tolerance = sqrt(.Machine$double.eps),
proj4string = CRS(as.character(NA)), round = NULL,
grid = NULL)
|
points |
An object of 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. |
tolerance |
Precision up to which extent points should be exactly on a grid. |
proj4string |
Object of class |
round |
default |
grid |
Grid topology using an object of class |
Function SpatialPixelsTopography
returns an object 'SpatialPixelsTopography-class
'.
Miquel De Cáceres Ainsa, Biodiversity and Landscape Ecology Laboratory, Centre Tecnologic Forestal de Catalunya
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(examplegridtopography)
#Creates spatial topography pixels as a subset of points in the grid
spt = as(examplegridtopography,"SpatialPointsTopography")
cc = spt@coords
center = 5160
d = sqrt((cc[,1]-cc[center,1])^2+(cc[,2]-cc[center,2])^2)
p = which(d<3000) #Select points at maximum distance of 3km from center
spxt = SpatialPixelsTopography(spt[p], spt$elevation[p],
spt$slope[p],
spt$aspect[p])
#Alternatively, use coercing and subsetting (drop = TRUE causes grid to be recalculated)
spxt = as(examplegridtopography, "SpatialPixelsTopography")[p, drop=TRUE]
#Display data
spplot(spxt, variable="elevation", scales=list(draw=TRUE))
spplot(spxt, variable="slope", scales=list(draw=TRUE))
spplot(spxt, variable="aspect", scales=list(draw=TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.