morpho_dem: calculates most important DEM parameters

Description Usage Arguments Value Note Examples

View source: R/rs_textures.R

Description

calculates most important DEM parameters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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,
  morphoMethod = 6,
  minScale = 1,
  maxScale = 8,
  numScale = 2,
  retRaster = TRUE,
  gdalLinks = NULL,
  sagaLinks = NULL
)

Arguments

dem

character filname to 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

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. of GDAL tools cli pathes

sagaLinks

list. of SAGA tools cli pathes

Value

raster* object

Note

please provide a GeoTiff file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
##- 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)
}

## End(Not run)

uavRst documentation built on Dec. 30, 2019, 5:06 p.m.