Class ColormapRenderer

java.lang.Object
com.esri.arcgisruntime.raster.RasterRenderer
com.esri.arcgisruntime.raster.ColormapRenderer

public final class ColormapRenderer extends RasterRenderer
A colormap renderer provides a discrete mapping of raster cell values to colors to help visualize the raster data in a RasterLayer.

All cells matching the specified value will be rendered using the mapped color. This is useful for thematic mapping tasks such as land classification when you want the values in the raster layer to be represented by a specified color. This concept of this class is similar to a UniqueValueRenderer, except that ColormapRenderer is specifically for rendering raster cell values.

Since:
100.0.0
  • Constructor Details

    • ColormapRenderer

      public ColormapRenderer(List<Color> colors)
      Creates a renderer based on a color map.
      Parameters:
      colors - the colors for this renderer, the color at the 0th index is used for raster pixels that have a value of 0, color at 1st index for value 1, and so on
      Throws:
      IllegalArgumentException - if colors is null
      Since:
      200.0.0
    • ColormapRenderer

      public ColormapRenderer(Colormap colormap)
      Creates a renderer based on a color map.
      Parameters:
      colormap - the color map for this renderer
      Throws:
      IllegalArgumentException - if colormap is null
      Since:
      100.4.0
  • Method Details

    • getColormap

      public Colormap getColormap()
      Gets the color map for this renderer.
      Returns:
      the color map
      Since:
      100.4.0