Skip to contents

Create a Landscape with a Sharp Vegetation Boundary

Usage

create_landscape_sharp(
  width = 100,
  height = 100,
  boundary_position = 0.5,
  random_spots = c(0, 0),
  rotation = 0
)

Arguments

width

Integer. Width of the landscape in pixels (default: 100).

height

Integer. Height of the landscape in pixels (default: 100).

boundary_position

Numeric. Relative position of vegetation boundary from top (0-1) (default: 0.5).

random_spots

Numeric vector of length 2. Probabilities for flipping cells: [1→0, 0→1] (default: c(0,0)).

rotation

Numeric. Angle to rotate landscape in degrees (default: 0).

Value

A landscape object with pattern "sharp" containing:

data

SpatRaster with binary values (0 = bare ground, 1 = vegetation)

pattern

Character string "sharp"

params

List of all input parameters used to generate the landscape

Examples

# Default sharp vegetation boundary
sharp_default <- create_landscape_sharp()

# Modified sharp vegetation boundary with higher boundary position
sharp_modified <- create_landscape_sharp(
  boundary_position = 0.7
)

# Landscape with rotation and some spots
sharp_rotated <- create_landscape_sharp(
  boundary_position = 0.3,
  random_spots = c(0, 0.1),
  rotation = 45
)