24.1.10. Raster Creation

24.1.10.1. Create constant raster layer

Generates raster layer for given extent and cell size filled with the specified value.

Additionally an output data type can be specified. The algorithm will abort if a value has been entered that cannot be represented by the selected output raster data type.

24.1.10.1.1. Parameters

24.1.10.1.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 0.1

Pixel size (X=Y) in map units. Minimum value: 0.01

Constant value

NUMBER

[number]

Default: 1

Constant pixel value for the output raster layer.

Constant

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.1.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 5

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Byte

  • 1 — Integer16

  • 2 — Unsigned Integer16

  • 3 — Integer32

  • 4 — Unsigned Integer32

  • 5 — Float32

  • 6 — Float64

24.1.10.1.2. Outputs

Label

Name

Type

Description

Constant

OUTPUT

[raster]

Raster covering the desired extent with the specified pixel size and value.

24.1.10.1.3. Python code

Algorithm ID: native:createconstantrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.2. Create random raster layer (binomial distribution)

Generates a raster layer for given extent and cell size filled with binomially distributed random values.

By default, the values will be chosen given an N of 10 and a probability of 0.5. This can be overridden by using the advanced parameter for N and probability. The raster data type is set to Integer types (Integer16 by default). The binomial distribution random values are defined as positive integer numbers. A floating point raster will represent a cast of integer values to floating point.

24.1.10.2.1. Parameters

24.1.10.2.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 0.1

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.2.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Integer16

  • 1 — Unsigned Integer16

  • 2 — Integer32

  • 3 — Unsigned Integer32

  • 4 — Float32

  • 5 — Float64

N

N

[number]

Default: 10

Probability

PROBABILITY

[number]

Default: 0.5

24.1.10.2.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with random values

24.1.10.2.3. Python code

Algorithm ID: native:createrandombinomialrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.3. Create random raster layer (exponential distribution)

Generates a raster layer for given extent and cell size filled with exponentially distributed random values.

By default, the values will be chosen given a lambda of 1.0. This can be overridden by using the advanced parameter for lambda. The raster data type is set to Float32 by default as the exponential distribution random values are floating point numbers.

24.1.10.3.1. Parameters

24.1.10.3.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.3.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Float32

  • 1 — Float64

Lambda

LAMBDA

[number]

Default: 1.0

24.1.10.3.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with random values

24.1.10.3.3. Python code

Algorithm ID: native:createrandomexponentialrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.4. Create random raster layer (gamma distribution)

Generates a raster layer for given extent and cell size filled with gamma distributed random values.

By default, the values will be chosen given an alpha and beta value of 1.0. This can be overridden by using the advanced parameter for alpha and beta. The raster data type is set to Float32 by default as the gamma distribution random values are floating point numbers.

24.1.10.4.1. Parameters

24.1.10.4.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.4.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Float32

  • 1 — Float64

Alpha

ALPHA

[number]

Default: 1.0

Beta

BETA

[number]

Default: 1.0

24.1.10.4.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with randomly distributed values

24.1.10.4.3. Python code

Algorithm ID: native:createrandomgammarasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.5. Create random raster layer (geometric distribution)

Generates a raster layer for given extent and cell size filled with geometrically distributed random values.

By default, the values will be chosen given a probability of 0.5. This can be overridden by using the advanced parameter for mean value. The raster data type is set to Integer types (Integer16 by default). The geometric distribution random values are defined as positive integer numbers. A floating point raster will represent a cast of integer values to floating point.

24.1.10.5.1. Parameters

24.1.10.5.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.5.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Integer16

  • 1 — Unsigned Integer16

  • 2 — Integer32

  • 3 — Unsigned Integer32

  • 4 — Float32

  • 5 — Float64

Probability

PROBABILITY

[number]

Default: 0.5

24.1.10.5.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with randomly distributed values

24.1.10.5.3. Python code

Algorithm ID: native:createrandomgeometricrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.6. Create random raster layer (negative binomial distribution)

Generates a raster layer for given extent and cell size filled with negative binomially distributed random values.

By default, the values will be chosen given a distribution parameter k of 10.0 and a probability of 0.5. This can be overridden by using the advanced parameters for k and probability. The raster data type is set to Integer types (Integer16 by default). The negative binomial distribution random values are defined as positive integer numbers. A floating point raster will represent a cast of integer values to floating point.

24.1.10.6.1. Parameters

24.1.10.6.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.6.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Integer16

  • 1 — Unsigned Integer16

  • 2 — Integer32

  • 3 — Unsigned Integer32

  • 4 — Float32

  • 5 — Float64

Distribution parameter k

K_PARAMETER

[number]

Default: 10

Probability

PROBABILITY

[number]

Default: 0.5

24.1.10.6.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with randomly distributed values

24.1.10.6.3. Python code

Algorithm ID: native:createrandomnegativebinomialrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.7. Create random raster layer (normal distribution)

Generates a raster layer for given extent and cell size filled with normally distributed random values.

By default, the values will be chosen given a mean of 0.0 and a standard deviation of 1.0. This can be overridden by using the advanced parameters for mean and standard deviation value. The raster data type is set to Float32 by default as the normal distribution random values are floating point numbers.

24.1.10.7.1. Parameters

24.1.10.7.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.7.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Float32

  • 1 — Float64

Mean of normal distribution

MEAN

[number]

Default: 0.0

Standard deviation of normal distribution

STDDEV

[number]

Default: 1.0

24.1.10.7.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with randomly distributed values

24.1.10.7.3. Python code

Algorithm ID: native:createrandomnormalrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.8. Create random raster layer (poisson distribution)

Generates a raster layer for given extent and cell size filled with poisson distributed random values.

By default, the values will be chosen given a mean of 1.0. This can be overridden by using the advanced parameter for mean value. The raster data type is set to Integer types (Integer16 by default). The poisson distribution random values are positive integer numbers. A floating point raster will represent a cast of integer values to floating point.

24.1.10.8.1. Parameters

24.1.10.8.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.8.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 0

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Integer16

  • 1 — Unsigned Integer16

  • 2 — Integer32

  • 3 — Unsigned Integer32

  • 4 — Float32

  • 5 — Float64

Mean

MEAN

[number]

Default: 1.0

24.1.10.8.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with randomly distributed values

24.1.10.8.3. Python code

Algorithm ID: native:createrandompoissonrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.

24.1.10.9. Create random raster layer (uniform distribution)

Generates a raster layer for given extent and cell size filled with random values.

By default, the values will range between the minimum and maximum value of the specified output raster type. This can be overridden by using the advanced parameters for lower and upper bound value. If the bounds have the same value or both are zero (default) the algorithm will create random values in the full value range of the chosen raster data type. Choosing bounds outside the acceptable range of the output raster type will abort the algorithm.

24.1.10.9.1. Parameters

24.1.10.9.1.1. Basic parameters

Label

Name

Type

Description

Desired extent

EXTENT

[extent]

Specify the extent (xmin, xmax, ymin, ymax) of the output raster layer. One of:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent…

It will internally be extended to a multiple of the tile size.

Target CRS

TARGET_CRS

[crs]

Default: Project CRS

CRS for the output raster layer

Pixel size

PIXEL_SIZE

[number]

Default: 1.0

Pixel size (X=Y) in map units. Minimum value: 0.01

Output raster

OUTPUT

[raster]

Default: [Save to temporary file]

Specification of the output raster. One of:

  • Save to a Temporary File

  • Save to File…

24.1.10.9.1.2. Advanced parameters

Label

Name

Type

Description

Output raster data type

OUTPUT_TYPE

Default: 5

[enumeration]

Defines the data type of the output raster file. Options:

  • 0 — Byte

  • 1 — Integer16

  • 2 — Unsigned Integer16

  • 3 — Integer32

  • 4 — Unsigned Integer32

  • 5 — Float32

  • 6 — Float64

Lower bound for random number range

LOWER_BOUND

[number]

Default: 0.0

Upper bound for random number range

UPPER_BOUND

[number]

Default: 0.0

24.1.10.9.2. Outputs

Label

Name

Type

Description

Output raster

OUTPUT

[raster]

Raster covering the desired extent with the cell size filled with randomly distributed values

24.1.10.9.3. Python code

Algorithm ID: native:createrandomuniformrasterlayer

import processing
processing.run("algorithm_id", {parameter_dictionary})

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Utilizar algoritmos de procesamiento desde la consola for details on how to run processing algorithms from the Python console.