sim_forest_cover: Simulating forest cover maps with defined covariance...

Description Usage Arguments Value Author(s) Examples

View source: R/map_sim.R

Description

Simulating forest cover maps with defined covariance structure using random fields

Usage

1
2
sim_forest_cover(ras_dim, pxl_size, p, cov_model = NULL, alpha = 0.7,
  beta = 0.3, scale = floor(1/3 * sqrt((sum(ras_dim * pxl_size)^2))), ...)

Arguments

ras_dim

A vector of two values where the first specifies the number of columns and the second the number of rows of the output raster.

pxl_size

Pixel size of the output map.

p

Forest cover of the out put map, 0 < p <= 1.

cov_model

A covariance model used for the random fields simulation. Type RFgetModelNames(type="positive definite") to get a list of available models. Defaults to NULL in which case a generalized cauchy family covariance model is used (RMgencauchy).

alpha

See RMgencauchy

beta

See RMgencauchy

scale

See RMgencauchy. Default value is set to on third of the main diagonal taken from ras_dim and pxl_size.

...

Other parameters used by RMgencauchy.

Value

A binary raster map of simulated forest cover.

Author(s)

Paul Magdon, Sebastian Schnell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Raster size
ras_dim <- c(1000, 1000);

# Pixel size
pxl_size <- 30;

# Forest cover
p <- 0.7;
# Cauchy covariance model
# 0 < alpha <= 2 - low alpha -> high fragmentation
# beta > 0 - smaller beta -> longer long-range dependence
cov_model <- RMgencauchy(alpha = 1.95,
                         beta = 0.3,
                         scale = 1/3*sqrt((sum(ras_dim*pxl_size)^2)));
forest_ras <- sim_forest_cover(ras_dim, pxl_size, cov_model, p);
plot(forest_ras);

AWF-GAUG/gsgsim documentation built on May 29, 2019, 4:37 p.m.