Continuous data such as elevation, aspect, slope, etc… is most often displayed with a ramped color scale. This tutorial will describe how to create a ramped legend for continuous data using an existing pseudo color table (PCT).
To create an empty pix file that will be used as the legend bar:
Launch EASI and run CIM with the following parameters:
FILE - Database File Name :c:\legend.pix
TEX1 - Database Descriptive Text 1 :
TEX2 - Database Descriptive Text 2 :
DBSZ - Database Size: Pixels, Lines > 255 75
PXSZ - Pixel Ground-Size in Metres > 1 1
DBNC - No. of Channels: 8U,16S,16U,32R > 1
DBLAYOUT- Database Layout: PIXEL/BAND/FILE:BAND
To create a ramped legend:
- Open legend.pix in Focus
- From the Tools menu, select EASI Modeling
- Run the following model on legend.pix
The DN values now increase horizontally from 0 to 255 in legend.pix
To transfer the PCT layer to the empty legend.pix file:
- From the File menu, select Utility and Transfer Layers
- The Source file will be the file you saved the edited PCT to. The Destination file will be legend.pix.
- Under Source Layers, select the PCT layer to transfer and click Add.
- Click Transfer Layers
This legend can now be used in a Focus Map project in a New Area or can be exported to a tiff file with the PCT. You may wish to export the legend to a tiff file if the map will be created outside of Focus.
To view the pix file with the transferred PCT:
- Click the Files tree in Focus
- Right-click on raster layer 1 of legend.pix, View, As Pseudocolor
The image is automatically displayed with the PCT that was transferred to the file.
To export the legend to a tiff file:
- From the File menu, select Utility, Translate
- Set the Source file to legend.pix
- Set the Destination file to legend.tif
- Move channel 1 to the Destination Layers
- Under Source Layers, select PCT Segments
- Move the PCT segment to the Destination Layers
- Click Translate
Note: if you are working with 16 or 32 bit data and do not wish to scale it down to 8 bits, the PCT that will be created is a BPCT (break-point pseudo color table). This BPCT cannot be exported to another file format, ex. tiff, however. To keep the data in 16 or 32 bits and export to another file format such as tiff while maintaining the colors from the PCT, use the program PCE, Pseudocolor Encoding.
Note: if you wish to create a vertical instead of a horizontal legend bar, change the values used for DBSZ accordingly (ex. dbsz = 75, 255 for a vertical bar). The model used to create a ramped legend also needs to be changed (ex. %1 = ((@y-1)*255)/@dby).