Produce a raster of a random Gaussian process.

Share:

Description

This is a wrapper for the RFsimulate function in the RandomFields package. The main addition is the speedup argument which allows for faster map generation. A speedup of 1 is normal and will get progressively faster as the number increases, at the expense of coarser pixel resolution of the pattern generated

Usage

1
gaussMap(x, scale = 10, var = 1, speedup = 10, inMemory = FALSE, ...)

Arguments

x

A spatial object (e.g., a RasterLayer).

scale

The spatial scale in map units of the Gaussian pattern.

var

Spatial variance.

speedup

An index of how much faster than normal to generate maps.

inMemory

Should the RasterLayer be forced to be in memory? Default FALSE.

...

Additional arguments to raster.

Value

A raster map of extent ext with a Gaussian random pattern.

See Also

RFsimulate and extent

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(RandomFields)
library(raster)
nx <- ny <- 100L
r <- raster(nrows = ny, ncols = nx, xmn = -nx/2, xmx = nx/2, ymn = -ny/2, ymx = ny/2)
speedup <- max(1, nx/5e2)
map1 <- gaussMap(r, scale = 300, var = 0.03, speedup = speedup, inMemory = TRUE)
Plot(map1)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.