Tuesday, July 27, 2010

Using Global Mapper to display non-elevation grid data

Global Mapper has nice rendering functions for displaying terrain elevation data; it is optimally designed for showing values in meters or feet. However, when you want to display other kinds of grid data e.g. in kilogram or degrees, you have to work a bit to get Global Mapper to display the data properly. It may be necessary to create your own color table file or custom shader in Global Mapper's terminology if you want to follow some specific color scheme. By default, the Elevation Legend shows values in meters or feet and it will be necessary to customize it to show the correct units. Here's how I did it to display an ESRI ArcGrid ASCII file containing slope values in degrees. .

Create a custom Surfer color table file
I have a specific slope color range from preexisting slope maps that I want to use to display the slope data, as shown below.

If I don't have the RGB values of the slope ranges above, then I can use an image editing program such as  Photoshop or GIMP to sample each color separately to get the RGB values. I prefer to create the custom color file outside of Global Mapper using a text editor. However, it is also possible to use the Global Mapper's Custom Shader graphical user interface to do the same thing.

An example of how the color file looks like in Notepad is shown below.


The first line of "ColorMap 1 1" should not be changed. The data values and the corresponding RGB numbers follows.

For example, the line "0.000000 56 168 0" says the slope data value of 0.0 will have the darker green RGB color of 56, 168, 0. Then the next line "9.0 56 168 0" says the slope data value of 9.0 will have the same darker green RGB color of 56, 168, 0. These two lines define the color for the first slope range of 0 - 9 degrees. I repeat for the remaining slope ranges until I have completely defined the slope legend.

Display the slope grid data 
  1. Start up Global Mapper and load in the ESRI ArcGrid ASCII file containing slope data.

    The slope data is displayed in Global Mapper. Note the legend is showing the slope values as meters and hill shading is turned on.
  2. Click the shader drop down list. Choose Add Custom Shader as shown below.



    The Custom Shader dialog box appears.
  3. In the Name field, type in a meaningful name, e.g. My Slope Shader. Click Initialize From Surfer CLR File. Browse and choose the color file created in the previous section. Click Open.

    The color file is loaded and displayed in the Elevation Colors list box
    Note: the buttons here can be used to graphically define the color ranges also instead of using a text editor like I did
    .
  4. Click OK.
    The data is rendered with the new color scheme.
  5. It may be necessary to turn off the hill shading in the rendering. Press ALT+C.

    The Configuration dialog box appears.

  6. Click the Vertical Options tab. Toggle off Enable Hill Shading. Click OK.

    The slope data is displayed without hill shading. Note the Elevation Legend is labeling the slope values as meters instead of degrees.

Customize the Elevation Legend.
  1. Right click anywhere on the Elevation Legend.

    A popup menu appears.

  2. Choose Set Custom Elevation Units Display Text.

    The Specify Display Unit Text prompt appears.

  3. Type in Degrees. Click OK.

    The Elevation Legend correctly labels the slope values in degrees.

2 comments:

thekoist said...

what a kickass blog!! I really like your article Man.... thank you very much for sharing this tips... since I really need it rite now... thank's!

greenovate said...

i have a grid map (30m Arc/Info AscIII Grid) with each pixel having a specific unitless value. its neither elevation, slope, meter nor feet. however, global mapper identifies my map as an elevation map with continuous z-value. how can i change that so that global matter recognises each pixel as one unique value, and NOT as continuous value as in elevation or slope??

Related Posts with Thumbnails