Use gdaldem to create Color Topographic Maps and slope shadows --thematicmapping.org (III)

Source: Internet
Author: User

Address: http://blog.thematicmapping.org/2012/06/creating-color-relief-and-slope-shading.html

Author: BJ? Rnsandvik (Google Plus: https://plus.google.com/118196887774002693676)

In my previous blog, we used gdaldem to preach grayscale images (mountain shadows ). Today, we will use DEM data to create Color Topographic Maps and slope shadows.

Color Topographic Maps and hierarchical color la s are used to represent the elevation data as the color data, and the color is used to represent the height and altitude of different heights. This helps map readers better understand the terrain. Different colors are required for representation at different heights. A typical color scheme is to use dark green to yellow/brown to gray and white in sequence from low altitude to high altitude. The following is an example of using the color scheme:

Elevation Color
0  
900  
1300  
1900  
2500  

Contains the value and the corresponding color value, each line of this file is generally composed of 4 columns, in turn: Elevation value, the corresponding RGB value, RGB value is 0 ~ The number between 255. The content of this file is as follows:

0 110 220 110900 240 250 1601300 230 220 1701900 220 220 2202500 250 250 250

The above number defines a gradient. 5 colors are used for gradient display at an altitude of less than 2500. The following command is used to generate a Color Topographic Map for the DEM Data in the jotunheimen region. Result 1 is displayed:

gdaldemcolor-relief jotunheimen.tif color_relief.txt jotunheimen_colour_relief.tif

Figure 1 Color Topographic Map processed by DEM

The digital elevation model can be used to calculate the slope, indicating the steep terrain. The slope is calculated by comparing each pixel of the DEM Based on the surrounding pixel elevation. Create a slope shadow using the gdaldem tool for two-step processing.

First, we use DEM to create a slope Raster image. each pixel in this image contains an angle value ranging from 0 to 90 degrees, which describes the changes of the terrain from horizontal to vertical.

gdaldem slope jotunheimen.tif jontunheimen_slope.tif 

Contains only the following two rows:

0 255 255 25590 0 0 0

The color table above indicates that if the slope is 0, it is displayed in white. If the slope is 90 degrees, it is indicated in black, and the middle is indicated in gray. The command line is as follows:

gdaldemcolor-relief jotunheimen_slope.tif color_slope.txt jotunheimen_slopeshade.tif


Figure 2 slope shadow data produced by DEM

In the next article, we will use the slope shadow, mountain shadow, and Color Topographic Map Data to synthesize a Color Topographic Map Data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.