You are here:
Geoprocessing tool reference
>
Data Management toolbox
>
Raster toolset
>
Tools
NOTE: This tool is available with an ArcView or ArcEditor license, if the Spatial Analyst extension or the 3D Analyst extension is installed.
Creates a random raster dataset based on a user-specified distribution and extent.
Learn more about how to Create Random Raster works
Usage tips
-
The Uniform, Integer, Normal, and Exponential distributions' processing times are independent to their arguments while the Poisson, Gamma, Binomial, Geometric, and Pascal distributions' processing times can vary considerably when arguments are changed.
-
The syntax for the available distributions can be found at The distribution syntax for random values. For a description of the distributions and how they are generally used, see Distributions for assigning random values.
-
A default value is calculated for the cell size parameter if no value is provided. This value is based on the size of the extent.
-
The following environments affect this tool: current workspace, scratch workspace, output coordinate system, output extent, output has Z values, Z resolution, output CONFIG keyword, output spatial grid 1,2,3, output XY domain, output Z domain, pyramid, raster statistics, compression, and tile size.
Command line syntax
An overview of the Command Line window
CreateRandomRaster_management <out_path> <out_name> {distribution} {raster_extent} {cellsize}
<out_path> |
The location to contain the output raster dataset.
|
Workspace | Raster Catalog |
<out_name> |
The name of the raster dataset to be created.
When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format.
|
String |
{distribution} |
The distribution of random values desired:
- UNIFORM {Minimum}, {Maximum} —
A uniform distribution with a range defined by the {Minimum} and {Maximum}. Both the {Minimum} and {Maximum} are of type double.
The default values are 0.0 for {Minimum} and 1.0 for {Maximum}. - INTEGER {Minimum}, {Maximum} —
An integer distribution with a range defined by the {Minimum} and {Maximum}. Both the {Minimum} and {Maximum} are of type long.
The default values are 1 for {Minimum} and 10 for {Maximum}.- NORMAL {Mean}, {Standard Deviation} —
A normal distribution with a defined {Mean} and {Standard Deviation}. Both the {Mean} and {Standard Deviation} are of type double.
The default values are 0.0 for {Mean} and 1.0 for {Standard Deviation}.- EXPONENTIAL {Mean} —
An exponential distribution with a defined {Mean}. The {Mean} is of type double.
The default value for {Mean} is 1.0. - POISSON {Mean} —
A Poisson distribution with a defined {Mean}. The {Mean} is of type double.
The default value for {Mean} is 1.0. - GAMMA {Alpha}, {Beta} —
A gamma distribution with a defined {Alpha} and {Beta}. Both the {Alpha} and {Beta} are of type double. The default values are 1.0 for {Alpha} and 1.0 for {Beta}.
- BINOMIAL {N}, {Probability} —
A binomial distribution with a defined {N} and {Probability}. The {N} is of type long and {Probability} is of type double.
The default values are 10 for {N} and 0.5 for {Probability}.- GEOMETRIC {Probability} —
A geometric distribution with a defined {Probability}. The {Probability} is of type double.
The default value for {Probability} is 0.5.- NEGATIVE BINOMIAL {N}, {Probability} —
A Pascal distribution with a defined {N} and {Probability}. The {N} is of type long and {Probability} is of type double.
The default values are 10 for {N} and 0.5 for {Probability}.
|
String |
{raster_extent} |
The extent in which the random raster dataset will be created.
|
Extent |
{cellsize} |
The cell size of the new random raster dataset.
|
Double |
Data types for geoprocessing tool parameters
Command line example
CreateRandomRaster_management c:\data\project randrast "uniform 0 2" "0 0 100 100" 1
Scripting syntax
About getting started with writing geoprocessing scripts
CreateRandomRaster_management (out_path, out_name, distribution, raster_extent, cellsize)
out_path (Required) |
The location to contain the output raster dataset.
|
Workspace | Raster Catalog |
out_name (Required) |
The name of the raster dataset to be created.
When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format.
|
String |
distribution (Optional) |
The distribution of random values desired:
- UNIFORM {Minimum}, {Maximum} —
A uniform distribution with a range defined by the {Minimum} and {Maximum}. Both the {Minimum} and {Maximum} are of type double.
The default values are 0.0 for {Minimum} and 1.0 for {Maximum}. - INTEGER {Minimum}, {Maximum} —
An integer distribution with a range defined by the {Minimum} and {Maximum}. Both the {Minimum} and {Maximum} are of type long.
The default values are 1 for {Minimum} and 10 for {Maximum}.- NORMAL {Mean}, {Standard Deviation} —
A normal distribution with a defined {Mean} and {Standard Deviation}. Both the {Mean} and {Standard Deviation} are of type double.
The default values are 0.0 for {Mean} and 1.0 for {Standard Deviation}.- EXPONENTIAL {Mean} —
An exponential distribution with a defined {Mean}. The {Mean} is of type double.
The default value for {Mean} is 1.0. - POISSON {Mean} —
A Poisson distribution with a defined {Mean}. The {Mean} is of type double.
The default value for {Mean} is 1.0. - GAMMA {Alpha}, {Beta} —
A gamma distribution with a defined {Alpha} and {Beta}. Both the {Alpha} and {Beta} are of type double. The default values are 1.0 for {Alpha} and 1.0 for {Beta}.
- BINOMIAL {N}, {Probability} —
A binomial distribution with a defined {N} and {Probability}. The {N} is of type long and {Probability} is of type double.
The default values are 10 for {N} and 0.5 for {Probability}.- GEOMETRIC {Probability} —
A geometric distribution with a defined {Probability}. The {Probability} is of type double.
The default value for {Probability} is 0.5.- NEGATIVE BINOMIAL {N}, {Probability} —
A Pascal distribution with a defined {N} and {Probability}. The {N} is of type long and {Probability} is of type double.
The default values are 10 for {N} and 0.5 for {Probability}.
|
String |
raster_extent (Optional) |
The extent in which the random raster dataset will be created.
|
Extent |
cellsize (Optional) |
The cell size of the new random raster dataset.
|
Double |
Data types for geoprocessing tool parameters
Script example
# Create geoprocessor
import arcgisscripting
gp= arcgisscripting.create()
# Create a raster of random values within an extent.
gp.CreateRandomRaster_management("C:/data/project", "RandGrd", "integer 0 100", "0 0 250 250", 1)
# Create a random raster within the extent of another raster.
# Random values will have a normal distribution with mean 10 and stdev 3
gp.CreateRandomRaster_management("C:/data/project/grids", "ErrorGrid", "normal 10 3", "C:/temp/SomeRasters/Grids/k_ne_g", 10)
Please visit the
Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.