Creates a constant raster with user defined data type, cell size and extent. The extent can be imported from an existing feature dataset, raster or TIN.
Parameters
| Expression | Explanation |
|---|---|
| Function Name | CreateConstantRaster |
| <output raster> | A String - the full name of the output raster. |
| <constant value> | A Number representing the cell 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, "CreateConstantRaster", "output raster", "constant value", "cell size", "reference dataset", "MinX", "MaxX", "MinY", "MaxY"]) |
| .NET using ETSRun.exe | StartInfo.FileName = ETSPath StartInfo.Arguments = "CreateConstantRaster" "output raster" "constant value" "cell size" "reference dataset" "MinX" "MaxX" "MinY" "MaxY" |
| .NET using ETSOutX.dll | CreateConstantRaster(output raster, constant value, cell size, reference dataset, MinX, MaxX, MinY, MaxY) |
| ArcPy | arcpy.CreateConstantRaster("output raster", "constant 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.