[GRASS-SVN] r65907 - grass/trunk/raster/r.slope.aspect
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 12 02:45:29 PDT 2015
Author: neteler
Date: 2015-08-12 02:45:29 -0700 (Wed, 12 Aug 2015)
New Revision: 65907
Added:
grass/trunk/raster/r.slope.aspect/r_slope_aspect_4_directions.png
Modified:
grass/trunk/raster/r.slope.aspect/
grass/trunk/raster/r.slope.aspect/r.slope.aspect.html
Log:
r.slope.aspect manual: compass oriented aspect map example added
Property changes on: grass/trunk/raster/r.slope.aspect
___________________________________________________________________
Modified: svn:ignore
- OBJ.*
+ OBJ.*
*.tmp.html
Modified: grass/trunk/raster/r.slope.aspect/r.slope.aspect.html
===================================================================
--- grass/trunk/raster/r.slope.aspect/r.slope.aspect.html 2015-08-12 08:04:09 UTC (rev 65906)
+++ grass/trunk/raster/r.slope.aspect/r.slope.aspect.html 2015-08-12 09:45:29 UTC (rev 65907)
@@ -170,6 +170,8 @@
<h2>EXAMPLES</h2>
+<h3>Calculation of slope, aspect, profile and tangential curvature</h3>
+
In this example a slope, aspect, profile and tangential curvature map
are computed from an elevation raster map (North Carolina sample
dataset):
@@ -194,6 +196,51 @@
Figure: Slope, aspect, profile and tangential curvature raster map (North Carolina dataset)
</center>
+<h3>Classification of major aspect directions in compass orientation</h3>
+
+In the following example (based on the North Carolina sample dataset)
+we first generate the standard aspect map (oriented CCW from East), then
+convert it to compass orientation, and finally classify four major aspect
+directions (N, E, S, W):
+
+<div class="code"><pre>
+g.region raster=elevation -p
+
+# generate aspect map with CCW orientation
+r.slope.aspect elevation=elevation aspect=myaspect
+
+# generate compass orientation and classify four major directions (N, E, S, W)
+r.mapcalc "aspect_4_directions = eval( \\
+ compass=(450 - myaspect ) % 360, \\
+ if(compass >=0. && compass < 45., 1) \\
+ + if(compass >=45. && compass < 135., 2) \\
+ + if(compass >=135. && compass < 225., 3) \\
+ + if(compass >=225. && compass < 315., 4) \\
+ + if(compass >=315., 1) \\
+)"
+
+# assign text labels
+r.category aspect_4_directions separator=comma rules=- << EOF
+1,north
+2,east
+3,south
+4,west
+EOF
+
+# assign color table
+r.colors aspect_4_directions rules=- << EOF
+1 253,184,99
+2 178,171,210
+3 230,97,1
+4 94,60,153
+EOF
+</pre></div>
+
+<center>
+<img src="r_slope_aspect_4_directions.png" alt="Aspect map classified to four major compass directions"><br>
+Aspect map classified to four major compass directions (zoomed subset shown)
+</center>
+
<h2>REFERENCES</h2>
<ul>
Added: grass/trunk/raster/r.slope.aspect/r_slope_aspect_4_directions.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/raster/r.slope.aspect/r_slope_aspect_4_directions.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
More information about the grass-commit
mailing list