Modelos digitales de elevación en R
Manejo de DEM
DEM
Primero cargar la imagen y calcular el NDVI
library(raster)
## Loading required package: sp
plot(dem)
crs(dem)
## Coordinate Reference System:
## Deprecated Proj.4 representation: +proj=longlat +datum=WGS84 +no_defs
## WKT2 2019 representation:
## GEOGCRS["WGS 84 (with axis order normalized for visualization)",
## DATUM["World Geodetic System 1984",
## ELLIPSOID["WGS 84",6378137,298.257223563,
## LENGTHUNIT["metre",1]]],
## PRIMEM["Greenwich",0,
## ANGLEUNIT["degree",0.0174532925199433]],
## CS[ellipsoidal,2],
## AXIS["geodetic longitude (Lon)",east,
## ORDER[1],
## ANGLEUNIT["degree",0.0174532925199433,
## ID["EPSG",9122]]],
## AXIS["geodetic latitude (Lat)",north,
## ORDER[2],
## ANGLEUNIT["degree",0.0174532925199433,
## ID["EPSG",9122]]]]
res(dem)
## [1] 0.0002694946 0.0002694946
dim(dem)
## [1] 55 69 1
Calculo de pendiente
slope <- terrain(dem,
"slope",
unit = "degrees",
neighbors=4)
plot(slope)
Calculo de aspecto
slope <- terrain(dem,
unit = "degrees",
neighbors = 4)
plot(slope)