| Creates a constant raster with
user defined data type, cell size and extent. The extent can be imported
from an existing feature class or raster. Inputs:
- Raster data type - integer or floating point.
If Integer data type is specified, depending on the constant value
specified, the output might be:
- SHORT - signed 16 bit integer (values between
-32768 and 32768)
- LONG - signed 32 bit integer (values out of
the range above)
- Output raster name and format
- Constant value
- Cell Size of the output raster
- Extents of the output raster (can be copied
from an existing feature class or raster). The default extents are the
current extents of the active view.
- Output Spatial Reference. The default
spatial reference is the one assigned to the data frame. If the extents are
copied from an existing dataset, the default spatial reference is changed to
the projection of this dataset. The selected spatial reference must be
projected coordinate system.
Output:
- A raster with constant value for all
cells.
Notes:
- Initially the name of the output raster
defines the raster format
- no extension specified - ESRI binary GRID
- .img extension (for example raster1.img) -
ERDAS IMAGINE image.
- .tif extension (for example raster1.tif -
Tagged Image File Format (TIFF) image.
- The initial output raster format can be
changed by selecting the desired output in the dialog.
- Currently only file based rasters are
supported. Rasters cannot be stored in a GeoDatabase. After you get the
desired result, you can export the raster to a GeoDatabase using the
standard ArcGIS tools.
ToolBox
implementation
Command line syntax
ETS_GPConstantRaster <Out Raster>
{Out Spatial Reference} <Out Type> {Extent from Existing} <Extent><Cell
Size><Raster Value>
Parameters
| Expression |
Explanation |
| <Out
Raster> |
A String
- the full name of the output raster (A raster with the same full
name should not exist). The output raster type depends on the extension
of the output file(see Notes above) |
| {Out
Spatial Reference} |
The spatial reference of the
output raster. The dialog allows the user to select a predefined spatial
reference or import spatial reference from an existing dataset. If used
from the Command Line, the user can just specify the full name of an
existing dataset. |
| <Out Type> |
A String indicating the type
of the output raster. Valid values - "Float" and "Integer" |
| {Extent from Existing} |
A string representing the full
path to an existing dataset. The extent of the output raster will have the
extent of this dataset |
| <Extent> |
A String representing the
extent of the output raster. Example "0, 0, 500, 250" |
| <Cell Size> |
A Double representing the cell
size |
| <Raster Value> |
A Number representing the
minimum value of the output raster |
Examples:
-
ETS_GPConstantRaster
c:\test\r1.img
c:\test\source1.img Float
c:\test\source1.img # 10 50.51 - will create a
floating raster "r1.img" with Cell Size = 10 Value = 50.51 in c:\00
folder. The spatial reference and the extent will be the same as the
ones of the existing raster source1.img
-
ETS_GPConstantRaster
c:\test\r1.img
c:\test\source1.img Integer # "0, 0, 500, 250" 10 50 -
will create an integer raster "r1.img" with Cell Size = 10 Value = 50 in
c:\00 folder. The spatial reference will be the same as the one
of source1.img (must exist) and the extents will be defined by the
envelope with X Min = 0, Y Min = 0, X Max = 500 and Y Max = 250
Scripting syntax
ETS_GPRandomRaster (Out Raster,
Out Spatial Reference, Extent from Existing, Extent, Cell Size, Min Value, Max
Value)
See the explanations above:
<> - required parameter
{} - optional parameter
All ESRI
products mentioned are trademarks of Environmental Systems Research
Institute, Inc.
Copyright: Ianko Tchoukanski |