.TH r.relief 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBr.relief\fR\fR \- Creates shaded relief map from an elevation map (DEM). .br .SH KEYWORDS raster, elevation, relief, terrain, hillshade .SH SYNOPSIS \fBr.relief\fR .br \fBr.relief \-\-help\fR .br \fBr.relief\fR \fBinput\fR=\fIname\fR \fBoutput\fR=\fIname\fR [\fBaltitude\fR=\fIfloat\fR] [\fBazimuth\fR=\fIfloat\fR] [\fBzscale\fR=\fIfloat\fR] [\fBscale\fR=\fIfloat\fR] [\fBunits\fR=\fIstring\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR \fB[required]\fR" 4m .br Name of input raster (typically elevation) map .IP "\fBoutput\fR=\fIname\fR \fB[required]\fR" 4m .br Name for output shaded relief map .IP "\fBaltitude\fR=\fIfloat\fR" 4m .br Altitude of the sun in degrees above the horizon .br Options: \fI0\-90\fR .br Default: \fI30\fR .IP "\fBazimuth\fR=\fIfloat\fR" 4m .br Azimuth of the sun in degrees to the east of north .br Options: \fI0\-360\fR .br Default: \fI270\fR .IP "\fBzscale\fR=\fIfloat\fR" 4m .br Factor for exaggerating relief .br Default: \fI1\fR .IP "\fBscale\fR=\fIfloat\fR" 4m .br Scale factor for converting meters to elevation units .br Default: \fI1\fR .IP "\fBunits\fR=\fIstring\fR" 4m .br Elevation units (overrides scale factor) .br Options: \fIintl, survey\fR .br \fBintl\fR: international feet .br \fBsurvey\fR: survey feet .SH DESCRIPTION \fIr.relief\fR creates a raster shaded relief map based on current resolution settings and on sun altitude, azimuth, and z\-exaggeration values entered by the user. .PP The parameters controlling the shading are: .IP .IP \fB1\fR An \fBinput\fR raster map to provide elevation values for the shaded relief map. Typically, this would be a map layer of elevation; however, any raster map layer can be named. .IP \fB2\fR The \fBaltitude\fR of the sun in degrees above the horizon (a value between 0 and 90 degrees). .IP \fB3\fR The \fBazimuth\fR of the sun in degrees to the east of north (a value between 0 and 360 degrees; clockwise from north) .IP \fB4\fR The scaling parameter, which compensates for a different horizontal \fBscale\fR than vertical scale. If \fBscale\fR is a number, then the ewres and nsres are multiplied by that scale to calculate the shading. (Default=1.0 for equivalent horizontal and vertical scales.) .IP \fB5\fR The \fBzscale\fR exaggeration factor that changes the apparent relief for the shaded relief map. This can be any positive (or negative) floating point value. (Default=1.0) .IP \fB6\fR Horizontal distances are calculated in meters, using geodesic distances for a latitude\-longitude projection. With an elevation map measured in feet, the \fBunits\fR option can be set to automatically convert meters to international feet (0.3048 meters = 1 foot) or survey feet (1200 / 3937 meters = 1 foot). The \fBunits\fR parameter overrides the \fBscale\fR parameter. .PP .PP \fIr.relief\fR assigns a grey\-scale color table to the new shaded relief map. .SH NOTES To visually improve the result of shade maps from low resolution elevation models, use \fIr.resamp.interp\fR with bilinear or bicubic method to resample the DEM at higher resolution. \fIr.relief\fR is then run on the resampled DEM. .PP The current mask is ignored. .SH EXAMPLES .SS Shaded relief map In this example, the aspect map in the North Carolina sample dataset location is used to hillshade the elevation map: .br .nf \fC g.region raster=elevation \-p r.relief input=elevation output=elevation_shade \fR .fi .br \fIr.relief: shaded elevation map (subset)\fR .SS Colorizing a shaded relief map Color can be added later using \fIr.shade\fR or \fId.shade\fR: .br .nf \fC r.shade shade=elevation_shade color=elevation output=elevation_shaded \fR .fi .SS Using the scale factor in Latitude\-Longitude In Latitude\-Longitude locations (or other non\-metric locations), the \fIscale\fR factor has to be used: .br .nf \fC # Latitude\-Longitude example g.region raster=srtm \-p r.relief input=srtm output=srtm_shaded scale=111120 \fR .fi .SS Exporting shaded relief maps to GeoTIFF 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. .PP 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 \fIr.mapcalc\fR, using the # operator to convert map category values to their grey scale equivalents: .br .nf \fC # using the map created above # create new map from map category values r.mapcalc expression=\(dqelevation_shade_byte = #elevation_shade\(dq # verify data range r.info elevation_shade_byte # assign grey color table r.colors elevation_shade_byte color=grey # export (optionally: createopt=\(dqCOMPRESS=DEFLATE,BIGTIFF=YES\(dq) r.out.gdal input=elevation_shade_byte createopt=\(dqCOMPRESS=DEFLATE\(dq \(rs 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 \fR .fi .SH SEE ALSO .PP \fI d.shade, d.his, g.region, r.shade, r.blend, r.colors, r.mapcalc, r.resamp.interp \fR .SH AUTHORS Jim Westervelt, U.S. Army Construction Engineering Research Laboratory .br Markus Metz: Enhanced fast C version of r.relief for GRASS GIS 7 .SH SOURCE CODE .PP Available at: r.relief source code (history) .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual