Label | Explanation | Data Type |
Input Raster Function
| The name of a raster function, raster function JSON object, or function chain (in .rft.xml format). | File; String |
Output Raster Dataset
| The output raster dataset. | Raster Dataset |
Raster Function Arguments
(Optional) | The parameters associated with the function chain. For example, if the function chain applies the Hillshade raster function, set the data source, azimuth, and altitude. | Value Table |
Raster Properties
(Optional) | The output raster dataset key properties, such as the sensor or wavelength. | Value Table |
Format
(Optional) | The output raster format. The default format will be derived from the file extension specified in the Output Raster Dataset value.
| String |
Process as Multidimensional
(Optional) | Specifies whether the input mosaic dataset will be processed as a multidimensional raster dataset.
| Boolean |
Summary
Generates a raster dataset from an input raster function or function chain.
Usage
The tool is designed for raster processing using multiple threads to help speed up the processing.
The output raster format can be TIFF, GRID, ERDAS IMAGINE, CRF (Cloud Raster Format), or MRF (Meta Raster Format).
Parameters
arcpy.management.GenerateRasterFromRasterFunction(raster_function, out_raster_dataset, {raster_function_arguments}, {raster_properties}, {format}, {process_as_multidimensional})
Name | Explanation | Data Type |
raster_function | The name of a raster function, raster function JSON object, or function chain (in .rft.xml format). | File; String |
out_raster_dataset | The output raster dataset. | Raster Dataset |
raster_function_arguments [[Name, Value],...] (Optional) | The parameters associated with the function chain. For example, if the function chain applies the Hillshade raster function, set the data source, azimuth, and altitude. | Value Table |
raster_properties [[Name, Value],...] (Optional) | The output raster dataset key properties, such as the sensor or wavelength. | Value Table |
format (Optional) | The output raster format. The default format will be derived from the file extension specified in the output_raster_dataset value.
| String |
process_as_multidimensional (Optional) | Specifies whether the input mosaic dataset will be processed as a multidimensional raster dataset.
| Boolean |
Code sample
This Python sample uses the NDVI raster function to create a raster dataset.
import arcpy
arcpy.env.workspace = r"C:\PrjWorkspace"
arcpy.GenerateRasterFromRasterFunction_management(
raster_function="NDVI",
out_raster_dataset="c:/temp/ndvitest.crf",
raster_function_arguments="Raster \\\\somemachine\\data\\test.tif; VisibleBandID 3;InfraredBandID 4",
format="CRF")
This Python sample uses the Band Arithmetic raster function with the SAVI method to create a raster dataset.
## Generate raster from Band Arithmetic raster function where method is set to SAVI.
arcpy.management.GenerateRasterFromRasterFunction(
r"C:\Projects\SAVI.rft.xml", r"C:\Projects\Portland_SAVI.tif",
r"Raster C:\Projects\PortlandIKONOS.tif;Method SAVI;'Band Indexes' '4 3 0.33'",
None, "TIFF", "CURRENT_SLICE")