Creates an integer raster with random values in user defined range, cell size and extent. The extent can be imported from an existing feature dataset, raster or TIN.
Parameters
| Expression | Explanation |
|---|---|
| Function Name | CreateRandomRaster |
| <output raster> | A String - the full name of the output raster. |
| <minimum value> | An Integer representing the minimum value of the output raster. |
| <maximum value> | An Integer representing the maximum value of the output raster. |
| <cell size> | A Double representing the cell size. |
| <reference dataset> | A String - the full path to the reference dataset. |
| {MinX} | A Double - minimum X of the custom extent. |
| {MaxX} | A Double - maximum X of the custom extent. |
| {MinY} | A Double - minimum Y of the custom extent. |
| {MinX} | A Double - maximum Y of the custom extent. |
ETSPath used in the table below is the full path to ETSRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETSurface\ETSRun.exe")
| Language | Syntax |
|---|---|
| Python | subprocess.call([ETSPath, "CreateRandomRaster", "output raster", "minimum value", "maximum value", "cell size", "reference dataset", "MinX", "MaxX", "MinY", "MaxY"]) |
| .NET using ETSRun.exe | StartInfo.FileName = ETSPath StartInfo.Arguments = "CreateRandomRaster" "output raster" "minimum value" "maximum value" "cell size" "reference dataset" "MinX" "MaxX" "MinY" "MaxY" |
| .NET using ETSOutX.dll | CreateRandomRaster(output raster, minimum value, maximum value, cell size, reference dataset, MinX, MaxX, MinY, MaxY) |
| ArcPy | arcpy.CreateRandomRaster("output raster", "minimum value", "maximum value", "cell size", "reference dataset", "MinX", "MaxX", "MinY", "MaxY") |
Notes:
<> - required parameter
{} - optional parameter
The argument separator for StartInfo.Arguments is space. If a string might contain a space, you need to double quote it.