data("swissAlti3D")

plot(swissAlti3D)
# Computing the slope of a raster dataset using the terrain() function
swissAlti3d_slope <- terrain(swissAlti3D, opt="slope", unit="degrees")
plot(swissAlti3d_slope)
# Computing the aspect of the terrain dataset
swissAlti3d_aspect <- terrain(swissAlti3D, opt="aspect", unit="degrees")
plot(swissAlti3d_aspect)


arc2r/book documentation built on March 5, 2021, 2:10 p.m.