Knowledge Base - Technical Articles


Technical Article   HowTo:  Use description of SDE Raster colormap values with an Image Service

Article ID: 23728
Software:  ArcIMS 4.0.1, 9.0, 9.1, 9.2, 9.3, 9.3.1
Platforms: N/A

Summary

The colormap for an ArcSDE Raster is stored, along with its dataset, in the database. The descriptions for the colormap indexes can be stored in a separate table within the database and displayed in the legend generated by the Image Server.

Instructions provided explain how to display these descriptions in the legend of an Image Service's output image.

 Colormap descriptions for file based images can be included in the *.clr file itself, so this article applies only to ArcSDE Rasters.


Procedure

The first step is to create a colormap description table.
For SDE raster, colormaps should have scheme: VARCHAR COLORMAP_INDEX, VARCHAR DESCRIPTION

The first column contains the index values and the second column contains the descriptions for these indexes. This table should be stored in the same database location as the raster.

Order of entries in the table is unimportant. If any of the field values has a null value, the record is skipped.
Also, if the entry index is out of data range, record is skipped.


Indexes refer to the value of cell, not the color value. The following example illustrates the indexes for a 3x3 raster:

0 1 2
1 2 3
2 3 4

The description table should look similar to this example:

Colormap_Index     Description

0 Water
1 Roads
2 Buildings
3 Grass


After the creation of the description table, include it in the legend by taking the following steps:

  1. Open the Image Service's configuration file (*.axl) in a text editor.
  2. Find the DATASET element of the ArcSDE raster layer and specify the table name as the value of the description attribute.
  3. Continuing in the same DATASET element, set the value of the showcolormaplegend attribute to true.

    This example shows the configuration file's modified ArcSDE raster LAYER element. The name of the description table is TEST.ELEVMAPDESC.

    <LAYER type="image" name="TEST.ELEVMAP" visible="true" id="0">
    
    <DATASET name="TEST.ELEVMAP.IMAGE" description="TEST.ELEVMAPDESC"
    showcolormaplegend ="true"
    workspace="sde_ws-0"/>
    </LAYER>


Created: 11/2/2002
Last Modified: 6/17/2010

If you would like to post a comment, please login

Comments

By Anonymous - 02/04/2004 11:45 PM

Firstly, even the AXL reference on the ESRI website does not show how to do this - it does not even describe the 'description' attribute of the DATASET tag. So if one didn't come across this article one would never know how to put legend descriptions of an ArcSDE raster into an ArcIMS html viewer. Secondly, once cannot actually implement what is suggested here because ArcSDE (8.3) does not allow a field called 'index' to be created!. I loaded my image from the command line as a GeoTIFF, us