fake_dem: Get a fake DEM

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Get a fake DEM

Usage

1
2
fake_dem(r = NULL, true_dem = NULL, n_random_data = ncell(r) * 0.01,
  z_range = c(0, 500))

Arguments

r

RasterLayer

true_dem

RasterLayer

z_range

Value

RasterLayer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# gerenate the frame for the fake DEM
r <- raster(ncol = 200, nrow = 100)
projection(r) <- NA
extent(r) <- extent(0, 200, 0, 100)

# load a DEM to use as the true DEM
path <- system.file("external/dtm.grd", package="rdems")
dtm <- raster(path)

fdem <- fake_dem(r, dtm)
plot(fdem)

GastonMauroDiaz/rdemtools documentation built on Oct. 22, 2019, 8:32 p.m.