flsgen_terrain: Fractal terrain generator
Description
Fractal terrain generation with the diamond-square algorithm
Usage
flsgen_terrain(
width,
height,
roughness = 0.5,
x = 0,
y = 0,
resolution = 1e-04,
epsg = "EPSG:4326"
)
Value
A terra::rast object
Arguments
- width
Width (in pixels) of output raster
- height
Height (in pixels) of output raster
- roughness
Roughness factor (or H), between 0 and 1
- x
X position (geographical coordinates) of the top-left output raster pixel
- y
Y position (geographical coordinates) of the top-left output raster pixel
- resolution
Spatial resolution (geographical units) of the output raster (i.e. pixel dimension)
- epsg
EPSG identifier of the output projection
Examples
Run this code if (FALSE) {
terrain <- flsgen_terrain(200, 200)
}
Run the code above in your browser using DataLab