- To generate a shaded relief map from any GDAL-supported elevation raster :
gdaldem hillshade input_dem output_hillshade
[-z ZFactor (default=1)] [-s scale* (default=1)]"
[-az Azimuth (default=315)] [-alt Altitude (default=45)]
[-alg ZevenbergenThorne]
[-compute_edges] [-b Band (default=1)] [-of format] [-co "NAME=VALUE"]* [-q]
- To generate a slope map from any GDAL-supported elevation raster :
gdaldem slope input_dem output_slope_map"
[-p use percent slope (default=degrees)] [-s scale* (default=1)]
[-alg ZevenbergenThorne]
[-compute_edges] [-b Band (default=1)] [-of format] [-co "NAME=VALUE"]* [-q]
- To generate an aspect map from any GDAL-supported elevation raster
Outputs a 32-bit float raster with pixel values from 0-360 indicating azimuth :
gdaldem aspect input_dem output_aspect_map"
[-trigonometric] [-zero_for_flat]
[-alg ZevenbergenThorne]
[-compute_edges] [-b Band (default=1)] [-of format] [-co "NAME=VALUE"]* [-q]
- To generate a color relief map from any GDAL-supported elevation raster
gdaldem color-relief input_dem color_text_file output_color_relief_map
[-alpha] [-exact_color_entry | -nearest_color_entry]
[-b Band (default=1)] [-of format] [-co "NAME=VALUE"]* [-q]
where color_text_file contains lines of the format "elevation_value red green blue"
- To generate a Terrain Ruggedness Index (TRI) map from any GDAL-supported elevation raster:
gdaldem TRI input_dem output_TRI_map
[-compute_edges] [-b Band (default=1)] [-of format] [-q]
- To generate a Topographic Position Index (TPI) map from any GDAL-supported elevation raster:
gdaldem TPI input_dem output_TPI_map
[-compute_edges] [-b Band (default=1)] [-of format] [-q]
- To generate a roughness map from any GDAL-supported elevation raster:
gdaldem roughness input_dem output_roughness_map
[-compute_edges] [-b Band (default=1)] [-of format] [-q]
Notes :
Scale is the ratio of vertical units to horizontal
for Feet:Latlong use scale=370400, for Meters:LatLong use scale=111120)
This utility has 7 different modes :
The following general options are available :
For all algorithms, except color-relief, a nodata value in the target dataset will be emitted if at least one pixel set to the nodata value is found in the 3x3 window centered around each source pixel. The consequence is that there will be a 1-pixel border around each image set with nodata value. From GDAL 1.8.0, if -compute_edges is specified, gdaldem will compute values at image edges or if a nodata value is found in the 3x3 window, by interpolating missing values.
The value 0 is used as the output nodata value.
The following specific options are available :
The value -9999 is used as the output nodata value.
The following specific options are available :
The following specifics options are available :
By using those 2 options, the aspect returned by gdaldem aspect should be identical to the one of GRASS r.slope.aspect. Otherwise, it's identical to the one of Matthew Perry's aspect.cpp utility.
The following specifics options are available :
The color-relief mode is the only mode that supports VRT as output format. In that case, it will translate the color configuration file into appropriate <LUT> elements. Note that elevations specified as percentage will be translated as absolute values, which must be taken into account when the statistics of the source raster differ from the one that was used when building the VRT.
The text-based color configuration file generally contains 4 columns per line : the elevation value and the corresponding Red, Green, Blue component (between 0 and 255). The elevation value can be any floating point value, or the nv keyword for the nodata value.. The elevation can also be expressed as a percentage : 0% being the minimum value found in the raster, 100% the maximum value.
An extra column can be optionnaly added for the alpha component. If it is not specified, full opacity (255) is assumed.
Various field separators are accepted : comma, tabulation, spaces, ':'.
Common colors used by GRASS can also be specified by using their name, instead of the RGB triplet. The supported list is : white, black, red, green, blue, yellow, magenta, cyan, aqua, grey/gray, orange, brown, purple/violet and indigo.
Note: the syntax of the color configuration file is derived from the one supported by GRASS r.colors utility. ESRI HDR color table files (.clr) also match that syntax. The alpha component and the support of tablulations and commma as separators are GDAL specific extensions.
For example :
3500 white 2500 235:220:175 50% 190 185 135 700 240 250 150 0 50 180 50 nv 0 0 0 0
The value -9999 is used as the output nodata value.
There are no specific options.
The value -9999 is used as the output nodata value.
There are no specific options.
The value -9999 is used as the output nodata value.
There are no specific options.
Derived from code by Michael Shapiro, Olga Waupotitsch, Marjorie Larson, Jim Westervelt : U.S. Army CERL, 1993. GRASS 4.1 Reference Manual. U.S. Army Corps of Engineers, Construction Engineering Research Laboratories, Champaign, Illinois, 1-425.
http://grass.osgeo.org/grass64/manuals/html64_user/r.slope.aspect.html
http://grass.osgeo.org/grass64/manuals/html64_user/r.shaded.relief.html
http://grass.osgeo.org/grass64/manuals/html64_user/r.colors.html
1.5.6.