Constant function

Creates a virtual raster with a single pixel value.

The inputs for this function are the following:

The Constant is used for every pixel value in the raster.

The Raster Info includes raster dataset properties, such as the number of columns and rows, the number of bands, the pixel type, the extent, and the spatial reference. You can edit each specific value or select a raster dataset to use as a template.

Functions generally work on one or more input rasters; however, some do not require an input raster, including the Constant function. The Constant function does not take an input raster and behaves more like a raster dataset than a function. This means that particular care must be taken when adding it to or removing it from the function chain.

When adding the Constant function to a function chain, you must be careful. The chaining of functions takes place by using the raster created from one function as the input raster for the next one in the chain. Since the Constant function requires no input raster, if it is added within a chain, everything that could have been an input to a previous function is no longer required and thus disappears. This makes it very easy for you to completely destroy your mosaic dataset. Safeguards are in place to prevent you from adding a Constant function on top of a Mosaic function, thereby keeping the mosaic dataset safe. Removing the Constant function requires some additional steps because of the safeguards. You cannot remove a Constant function from a function chain by right-clicking the function and clicking Remove. This is because the function above it in the chain (the function that uses it as an input) needs to have a replacement input raster. Removing a Constant function uses the same steps as removing or replacing an input raster. Right-click the function that uses the Constant function as an input and click Properties. Then change the source of the input raster in the function to use a raster and not the output of the Constant function.

Related Topics

5/18/2014