Skip to main content

Create Random Raster

Overview

This tool creates a raster layer whose cell values are random floating-point numbers between 0.0 and 1.0. You can customize the analysis extent and cell size. The random values can be used for simulation, model parameter initialization, environmental uncertainty analysis, and related workflows.

Use Cases

  • Simulation inputs for ecological and environmental modeling: Build base data with spatial randomness to simulate system responses to uncertainty or disturbance.
  • Monte Carlo simulation: Introduce random variables based on large-scale repeated experiments to evaluate model uncertainty.
  • Model uncertainty analysis: Add controlled random variation to each factor in multifactor overlay models, such as weighted overlay, to test the sensitivity of results to weight changes.
  • Random sampling and distribution testing: Use as a sampling mask or reference layer for spatial random sampling.

Parameters

ParameterDescriptionNotes
Seed valueThe value used to reseed the random number generator. It can be an integer or a floating-point number. A raster cannot be used as input.The same seed produces the same random sequence, which makes results reproducible.
Number of bandsThe number of bands in the output raster.Default: 1
Output typeWhen saving raster data, you can manually set raster output parameters or use a snap raster to match the parameters of a reference raster.See common raster output.
Output fileSpecifies the storage location and file name of the output raster data.See common raster output.

Steps

  1. Start the tool

    Open the Raster Basic Tools toolbox, go to Raster Data > Create Raster, and double-click to start the Create Random Raster tool pane.

  2. Set the random number seed

    • Seed value: Enter an integer, such as 600, to initialize the random number generator and make the result reproducible.
  3. Configure raster spatial properties

    • In the Output settings drop-down list, select a configuration mode:
      • Manual input: Manually define the Coordinate system, spatial Extent, and Cell size.
      • Use vector data: Select an existing vector layer. The system automatically reads its coordinate system and extent.
      • Use raster data: Select a reference raster. The system fully inherits its coordinate system, extent, cell size, and other spatial structure settings.
  4. Set the output file and raster properties

    • Click the button next to Output path and specify the output directory.
    • Enter a file name in Output file name, such as random_raster.tif.
    • Configure Data type based on the value range, such as single-precision floating point or 16-bit integer.
    • Set the NoData value. The default is Auto, but you can customize it for analysis requirements.
    • Select Compression type. Keeping the default LZW compression is recommended to balance storage space and read/write efficiency.
  5. Generate the raster

    • Click Run at the bottom of the window.
    • After the task is completed, the random raster is saved to the specified location and is usually loaded automatically into the current project.

Notes

  • Spatial parameters:

    • Set the analysis extent explicitly. It is recommended to obtain it from a layer or enter it manually to prevent the random raster size from mismatching the analysis object.
    • Cell size is the raster resolution. A cell size that is too large reduces precision, while one that is too small affects performance and storage efficiency. It should match the analysis requirements.
    • Use the same coordinate system as the objects used in subsequent analysis to avoid offsets in spatial overlay.
  • Data properties:

    • Random values are floating-point numbers from 0.0 to 1.0. Use the Float 32 data type to avoid precision loss caused by integer types.
    • A NoData value is usually not set. If some areas need to be masked, use this tool together with a mask layer.