Creating custom default raster renderers (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > Developing with ArcGIS > Learning ArcObjects > Extending ArcObjects > Mapping and visualization customizations > Creating custom default raster renderers (ArcObjects .NET 10.6 SDK)

Creating custom default raster renderers

This topic introduces the concept and capabilities of customizing default renderer behavior for displaying raster data in ArcMap.

About creating custom default raster renderers

Rater data can be single band or multiple band, with only a few unique pixel values or with a full range of values in the given pixel depth. To visualize raster data, ArcGIS supports many types of renderers including the following:
  • Raster stretch renderer
  • RGB renderer
  • Raster unique value renderer
  • Raster classified value renderer
  • Colormap renderer
  • Raster discrete value renderer
ArcMap has a set of default rules defining the best default raster renderer to use when initially displaying a raster dataset. When a RasterLayer is created from a raster dataset, a default renderer is created and associated with the layer. For example, if a raster dataset with multiple bands is added to ArcMap, a RasterRGBRenderer is created and used automatically. If a single band raster dataset has a raster attribute table that has 25 or less unique values, a RasterUniqueValueRenderer will be used. If a single band raster dataset has a colormap, a RasterColormapRenderer will be used. In other cases, a RasterStretchColorRampRenderer may be used. The default behavior is defined in the RasterRendererMakerDefault class. This class has a Priority property with a value of 1 (low priority). It is registered in the ESRI RasterRender Makers component category.
To change the default renderer for a certain raster data type or format, you can create a custom renderer and set a higher priority. The class with higher priority will be used by ArcMap or the Map control. An example of a custom default renderer in ArcGIS is a default renderer for displaying data in the digital terrain elevation data (DTED) format. When you add DTED to ArcMap, it displays with a raster stretch renderer and a color ramp of blue and yellow rather than the typical black and white. The component categories can be accessed by running the Component Category Manager (run categories.exe from the ArcGIS bin directory).
A raster catalog layer has a reference to a raster catalog and a list of available raster renderers. The RasterCatalogPickerDefault object selects the renderers from the list based on a set of default rules (similar to the default raster renderer rules) to display the rasters in the raster catalog. The RasterCatalogPickerDefault object has a Priority property with a value of 1 (low priority) and is registered in the ESRI RasterCastalogRenderPickers component category. You can create a customized RasterCatalogRenderPickerDefault with a higher priority value to overwrite the default value.

To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing Deployment licensing
ArcGIS Desktop Basic ArcGIS Desktop Basic
ArcGIS Desktop Standard ArcGIS Desktop Standard
ArcGIS Desktop Advanced ArcGIS Desktop Advanced
Engine Developer Kit