r.relief(1grass) | GRASS GIS User's Manual | r.relief(1grass) |
r.relief - Creates shaded relief map from an elevation map (DEM).
raster, elevation, relief, terrain, hillshade
r.relief
r.relief --help
r.relief input=name output=name
[altitude=float] [azimuth=float]
[zscale=float] [scale=float]
[units=string] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
r.relief creates a raster shaded relief map based on current resolution settings and on sun altitude, azimuth, and z-exaggeration values entered by the user.
The parameters controlling the shading are:
r.relief assigns a grey-scale color table to the new shaded relief map.
To visually improve the result of shade maps from low resolution elevation models, use r.resamp.interp with bilinear or bicubic method to resample the DEM at higher resolution. r.relief is then run on the resampled DEM.
The current mask is ignored.
In this example, the aspect map in the North Carolina sample
dataset location is used to hillshade the elevation map:
g.region raster=elevation -p r.relief input=elevation output=elevation_shade
r.relief: shaded elevation map (subset)
Color can be added later using r.shade or d.shade:
r.shade shade=elevation_shade color=elevation output=elevation_shaded
In Latitude-Longitude locations (or other non-metric locations),
the scale factor has to be used:
# Latitude-Longitude example g.region raster=srtm -p r.relief input=srtm output=srtm_shaded scale=111120
The data range of shaded relief maps usually does not permit exporting the map to GeoTIFF format along with its associated color table due to limitations in the GeoTIFF format.
The most simple way to export it while even reducing the file size
is to export as palette byte map. This requires a conversion done in
r.mapcalc, using the # operator to convert map category values to
their grey scale equivalents:
# using the map created above # create new map from map category values r.mapcalc expression="elevation_shade_byte = #elevation_shade" # verify data range r.info elevation_shade_byte # assign grey color table r.colors elevation_shade_byte color=grey # export (optionally: createopt="COMPRESS=DEFLATE,BIGTIFF=YES") r.out.gdal input=elevation_shade_byte createopt="COMPRESS=DEFLATE" \
output=elevation_shade.tif # add overview images in GeoTIFF file for faster zooming gdaladdo --config GDAL_CACHEMAX 2000 elevation_shade.tif 2 4 8 16
d.shade, d.his, g.region, r.shade, r.blend, r.colors, r.mapcalc, r.resamp.interp
Jim Westervelt, U.S. Army Construction Engineering Research
Laboratory
Markus Metz: Enhanced fast C version of r.relief for GRASS GIS 7
Available at: r.relief source code (history)
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
GRASS 7.8.5 |