What are raster functions?
A raster function is an operation that allows you to preview the results of a raster analysis before generating a new dataset. Multiple functions can be chained together in a raster function template to perform complex raster analysis workflows. These templates can be created, edited, saved, and shared with other members of your organization. ArcGIS contains a large collection of over 150 built-in raster functions that you can use for a variety of image processing, visualization, and anlaysis tasks.
Why use raster functions?
Raster functions enable efficient, flexible, and powerful raster processing and analysis workflows that can be easily shared and distributed across an organization.
- Efficient processing: Direct processing of the pixels in raster data, rather than creating intermediate datasets on disk. This allows calculations to be performed on-the-fly as the raster is displayed, which is much faster than generating new raster files.
- Flexible workflows: Raster functions can be chained together into custom "raster function templates" to create complex processing workflows. These templates can be tailored for specific applications and shared across an organization.
- Distributed processing: With ArcGIS, raster functions can be implemented using distributed server-based processing, which boosts performance even when working with full resolution and extent data.
- Wide range of functionality: ArcGIS provides over 150 raster functions for a variety of applications, including radiometric correction, geometric correction, data management, visualization, and advanced raster analysis.
How to perform a request with raster functions
The general steps to perform an analysis with a raster functions are:
- Use tools to create a raster function template.
- Get your raster analysis service URL.
- Provide the input parameter values.
- Make the request.
- Handle the results.
Example
This example shows how to perform a Terrain ruggedness index
raster function request using the raster analysis service.
Request
curl "{YOUR_RASTER_ANALYSIS_SERVICE_URL}/GenerateRaster/submitJob" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'f=json' \
-d 'functionArguments={"Raster": {"url":"https://tiledimageservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_terrain_10m/ImageServer"}}' \
-d "rasterFunction= {RASTER_FUNCTION_TEMPLATE_DATA}" \
-d 'outputName={"serviceProperties":{"name":"Santa Monica ri postman","capabilities":"Image, TilesOnly"},"itemProperties":{"description":"Output generated from running Terrain ruggedness index raster function","snippet":"Output generated from running Terrain ruggedness index raster function","folderId":""}}' \
-d "context={"extent":{"xmin":-13203076.318831703,"ymin":4035131.004497903,"xmax":-13193005.740355143,"ymax":4043863.934979473,"spatialReference":{"wkid":102100,"latestWkid":3857}}}" \
-d "token={ACCESS_TOKEN}"
Response
{
"jobId": "{JOB_ID}",
"jobStatus": "esriJobNew"
}
Types of raster functions
Raster functions are grouped based on the type of analysis they perform.
To Learn more, click on the categories below:
Category | Description |
---|---|
Analysis | Derive information from raster data based on algorithms for specific purposes like vegetation analysis, change detection, or image classification. |
Appearance | Modify the visual characteristics of raster data, such as enhancing contrast, sharpening edges, and applying filters. |
Classification | Prepare raster data for classification, including supervised and unsupervised classification techniques. |
Conversion | Convert raster data between different formats, color models, and data types. |
Correction | Correct or adjust raster data, such as removing noise, correcting for topographic distortions, or calibrating reflectance values. |
Data management | Prepare, clean, and generalize raster datasets to improve their quality and usability for analysis and visualization. |
Distance | Perform various types of distance analysis, including Euclidean distance, cost-weighted distance, and true surface distance calculations. |
Hydrology | Model the flow of water across a surface and extract hydrologic information from digital elevation models (DEMs). |
Math | Perform various mathematical operations on raster datasets, including arithmetic, trigonometric, and logical functions. |
Reclass | Group or remap raster cell values into new classes or ranges, which is particularly useful for tasks like land cover classification, suitability analysis, and terrain characterization. |
Statistical | Perform a wide range of statistical analyses and calculations on raster datasets to support spatial modeling, change detection, and other advanced raster-based applications. |
Surface | Derive and analyze surface information from raster datasets, particularly digital elevation models, to support a wide range of spatial analysis and modeling applications. |