Imagery & Remote Sensing

Combining colored and grayshade rasters with high fidelity

By Rajinder Nagi, Esri Cartographic Product Engineer

Africa thumb

Have you ever noticed when you display a colored raster, such as elevation tints, transparently over a grayscale raster, such as a hillshaded surface, that you lose the intensity of your colors and that it is harder to see the hillshade details? This is a problem common to all software in which colors and grayshades are combined.

In this blog entry, we explain how you can overlay colored rasters on graytone rasters without losing detail in the graytones or intensity in the   colors. The example here uses a colormap file and mosaic dataset functions. In a related blog entry, we demonstrate the same overlay method using color ramps and Image Analysis functions. No matter how you work with your rasters, this new overlay method will allow you to retain the detail and colors in the overlaid rasters.

In the example below (figure 1), a layer tint with colors that relate to elevation values is overlain on a gray hillshade of the land surface. The resulting map looks washed out and relatively flat.

Color and Grayshade - Figure 1A
Color and Grayshade - Figure 1B

Color and Grayshade - Figure 1C

Figure 1. The first map above is a layer tint that shows elevation in different colors. The second map is a hillshade of the land surface. When the layer tint is overlain on the hillshade with 50% transparency, the colors of the elevation are washed out and the details of the hillshade are obscured.

Now there is a way you can retain your original colors and still show the detailed hillshade (figure 2). The method described uses the new mosaic datasets that were introduced in ArcGIS 10. A subsequent blog post explains how to achieve this effect with color ramps and Image Anakysis tools.

Color and Grayshade - Figure 2

Figure 2. This map right shows how the layer tint and hillshade can be combined to retain the original colors in the layer tint and the detail of the hillshade.

Combining the layer tint and hillshade to create the desired result is a three-step process:

  1. Create a mosaic dataset.
  2. Add data to the mosaic dataset.
  3. Define the functions that allow the mosaic dataset to be displayed properly.

In this example, a digital elevation model (DEM) is used to create both the layer tint and the hillshade. The layer tint is rendered using a color map which is a text file that contains a color specification for each elevation value. When using a color map file in ArcGIS 10, all values must be positive – the methods we used to create the color map file and modify the DEM to satisfy this requirement are described in two related blog entries on Mapping Center: Using ETOPO1 data and Symbolizing ETOPO1 data.

Create the Mosaic Dataset

A mosaic dataset is a type of data stored in a geodatabase that allows you to manage and view collections of raster data. You can add raster data to a mosaic dataset and then modify the properties and functions used to view the data.

  1. Start ArcMap and open ArcCatalog.
  2. In ArcCatalog, create a new file geodatabase by right clicking the folder for the new geodatabase and selecting New > File Geodatabase.
  3. Rename the geodatabase.
  4. Right click the geodatabase and click New > Mosaic Dataset.
  5. Input a name for the mosaic dataset and set a coordinate system. In this example we used the Robinson projection for the world.
  6. Click OK.
  7. The mosaic dataset will appear under the file geodatabase in ArcCatalog and a new layer will appear in the table of contents (figure 3).
    Color and Grayshade - Figure 3
    Figure 3. The mosaic dataset in the table of contents.

Add Data to the Mosaic Dataset

  1. In ArcCatalog, right click the mosaic dataset and click Add Rasters.
  2. Keep the default Raster Type as Raster Dataset, then click the browse button to input the raster dataset, and navigate to select the raster data you want to add.
  3. Click OK.

Define the Functions for the Mosaic Dataset

  1. In ArcCatalog, right click the mosaic dataset and click Properties.
  2. On the Functions tab, right click Mosaic Function > Properties.
  3. On the General tab of the Mosaic Dataset Properties dialog change the Output Pixel Type to 16 Bit Unsigned.
  4. Click OK.
  5. On the Functions tab, right click Mosaic Function > Insert > Colormap Function.
  6. Browse to the colormap file. (Note that you can download a colormap file for ETOPO1 and other elevation data from Mapping Center.)
  7. Right click Colormap Function > Insert > Colormap to RGB Function.
  8. On the General Tab, change the Output Pixel Type to 8 Bit Unsigned.
  9. On the Functions tab, right click Colormap to RGB Function > Insert > Pansharpen Function.
  10. For Panchromatic, select the hillshade, if you have one. If you do not, select the DEM.
  11. Change the Method as Simple Mean.
  12. Keep the rest of the defaults and click OK.
  13. If you do not select a hillshade in step 10, right click the DEM > Insert > HiIlshade. Keep the defaults and click OK. (If it is not projected, change the Z-factor according to the values in this entry: Setting the Z Factor Parameter Correctly.)
  14. Right click the Pansharpening Function > Insert > Stretch Function.
  15. Change the Type to Minimum-Maximum.
  16. Check the option to Use Gamma.
  17. Input 0.5 as the Gamma value for each of the three bands.
  18. Input 10 and 220 as the Min and Max Statistics values for each of the three bands. (After you have checked the results, feel free to experiment with these Gamma, Min, and Max values in the Stretch Function.)
  19. Click OK.
  20. To see the results in the ArcMap window, right click Footprint in the table of contents > Open Attribute Table, right click the MaxPS field, and click Field Calculator.
  21. For “MaxPS =”, input [MaxPS] * 10000 and click OK. (For more information about what scalar value to use in this equation, read the online help topic Cell size ranges in a mosaic dataset.)
  22. Close the attribute table.

The final function chain will look like figure 4.

Color and Grayshade - Figure 4

Figure 4. The final function chain.
The final result will look something like figure 5.
Color and Grayshade - Figure 5

Figure 5. The final results.

This method of displaying hillshade and layer tints produces a result that retains the fidelity of both the rasters. The same method can be applied to any colored raster combined with a grayscale raster.

Intrigued? Want to know technical details behind this method? Here is the full paper: Maintaining detail and color definition when integrating color and grayscale rasters using No Alteration of Grayscale or Intensity fusion method

About the author

Rajinder has more than 20 years of experience in GIS and Remote Sensing. In his current role, he leads the community elevation program at Esri and has wide experience in cartographic visualization, image processing, databases and geo-processing. Rajinder has developed a multi-directional hillshade ( algorithm to improve terrain visualization in Esri basemaps. He has also developed a fusion technique ( which maintains details and colors when integrating colored rasters with hillshades. Rajinder holds a Master of Science degree in Geoinformatics and a Bachelor of Science degree in Urban & Regional Planning.


Next Article

Deprecation Notice for ArcGIS GeoAnalytics Server

Read this article