Create a Function Raster dataset


PurposeThis topic shows how to create a Function Raster dataset from a raster dataset. It opens a raster dataset, applies an Arithmetic Raster function onto it (which adds a constant value of 128 to each band for each pixel of the raster dataset), then saves the created Function Raster dataset to the specified file.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio and open the solution file.
  2. Edit the strings in the "Specify input directory and dataset name" region to specify the directory and name of the input dataset, and the full path to the output dataset including the .afr extension.
  3. Compile and run the program.
  4. If the program succeeds, the console shows a "Success" message. If an error occurs, it shows on the console window.
  5. Load the created output .afr file into ArcMap or ArcCatalog, which reflects the processing results.

CreateFunctionRasterDataset.cs Main source file that contains the components of the sample, including licensing code.
Download the C# files
CreateFunctionRasterDataset.vb Main source file that contains the components of the sample, including licensing code.
Download the VB.NET files

Download the files for all languages




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced