calculates most important DEM parameters

calculates most important DEM parameters

morpho_dem(
  dem,
  item = c("hillshade", "slope", "aspect", "TRI", "TPI", "Roughness", "SLOPE", "ASPECT",
    "C_GENE", "C_PROF", "C_PLAN", " C_TANG", " C_LONG", "C_CROS", "C_MINI", "C_MAXI",
    "C_TOTA", "C_ROTO", "MTPI"),
  verbose = FALSE,
  saga_morphoMethod = 6,
  minScale = 1,
  maxScale = 8,
  numScale = 2,
  retRaster = TRUE,
  gdalLinks = NULL,
  sagaLinks = NULL
)

morpho_dem(
  dem,
  item = c("hillshade", "slope", "aspect", "TRI", "TPI", "Roughness", "SLOPE", "ASPECT",
    "C_GENE", "C_PROF", "C_PLAN", " C_TANG", " C_LONG", "C_CROS", "C_MINI", "C_MAXI",
    "C_TOTA", "C_ROTO", "MTPI"),
  verbose = FALSE,
  saga_morphoMethod = 6,
  minScale = 1,
  maxScale = 8,
  numScale = 2,
  retRaster = TRUE,
  gdalLinks = NULL,
  sagaLinks = NULL
)

Arguments

dem

character file name of GeoTiff containing one channel DEM

item

character list containing the keywords of the DEM parameter to be calculated. Default parameter are c("hillshade", "slope", "aspect", "TRI", "TPI", "Roughness", "SLOPE", "ASPECT", "C_GENE", "C_PROF", "C_PLAN", " C_TANG"," C_LONG", "C_CROS", "C_MINI", "C_MAXI", "C_TOTA", "C_ROTO", "MTPI")

verbose

logical. be quiet

saga_morphoMethod

numeric. saga morphometric method see also: SAGA GIS Help. GDAL parameters see also: gdaldem

minScale

numeric. in scale for multi scale TPI see also: SAGA GIS Help

maxScale

numeric. max scale for multi scale TPI see also: SAGA GIS Help

numScale

numeric. number of scale for multi scale TPI see also: SAGA GIS Help

retRaster

Boolean if TRUE a raster stack is returned

gdalLinks

list. GDAL tools CLI paths

sagaLinks

list. of SAGA tools CLI pathes

Value

raster* object

raster* object

Note

please provide a GeoTiff file

please provide a GeoTiff file

Examples

if (FALSE) {
##- required packages
require(uavRst)
require(link2GI)
setwd(tempdir())
## check if OTB exists
gdal <- link2GI::linkGDAL()
saga <- link2GI::linkSAGA()
if (gdal$exist & saga$exist) {
data("mrbiko")
proj = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
mrbiko <- raster::projectRaster(mrbiko, crs = proj,method = "ngb",res = 20)
raster::writeRaster(mrbiko,"dem.tif",overwrite=TRUE)
r<-morpho_dem(dem="dem.tif",c("hillshade", "slope", "aspect", "TRI", "TPI",
                              "Roughness", "SLOPE", "ASPECT",  "C_GENE", "C_PROF",
                              "C_PLAN", " C_TANG"," C_LONG", "C_CROS"),
                              gdalLinks= gdal,sagaLinks=saga)
r_st=raster::stack(r)
names(r_st)=names(r)
raster::plot(r_st)
}
}
if (FALSE) {
##- required packages
require(link2GI)
setwd(tempdir())
## check if OTB exists
gdal <- link2GI::linkGDAL()
saga <- link2GI::linkSAGA()
if (gdal$exist & saga$exist) {
data("mrbiko")
proj = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
mrbiko <- raster::projectRaster(mrbiko, crs = proj,method = "ngb",res = 20)
raster::writeRaster(mrbiko,"dem.tif",overwrite=TRUE)
r<-morpho_dem(dem="dem.tif",c("hillshade", "slope", "aspect", "TRI", "TPI",
                              "Roughness", "SLOPE", "ASPECT",  "C_GENE", "C_PROF",
                              "C_PLAN", " C_TANG"," C_LONG", "C_CROS"),
                              gdalLinks= gdal,sagaLinks=saga)
r_st=raster::stack(r)
names(r_st)=names(r)
raster::plot(r_st)
}
}