Take me to pcigeomatics.com

PCI Geomatics Help Center

How can we help you today?

Creating a Continuous Color Legend in Focus

PCI Geomatics -

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:

  1. Open legend.pix in Focus
  2. From the Tools menu, select EASI Modeling
  3. 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:

  1. From the File menu, select Utility and Transfer Layers
  2. The Source file will be the file you saved the edited PCT to. The Destination file will be legend.pix.
  3. Under Source Layers, select the PCT layer to transfer and click Add.
  4. 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:

  1. Click the Files tree in Focus
  2. 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:

  1. From the File menu, select Utility, Translate
  2. Set the Source file to legend.pix
  3. Set the Destination file to legend.tif
  4. Move channel 1 to the Destination Layers
  5. Under Source Layers, select PCT Segments
  6. Move the PCT segment to the Destination Layers
  7. 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).

Have more questions? Submit a request

Comments

Powered by Zendesk