[GRASS-SVN] r65908 - grass/branches/releasebranch_7_0/raster/r.slope.aspect

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 12 02:48:51 PDT 2015


Author: neteler
Date: 2015-08-12 02:48:51 -0700 (Wed, 12 Aug 2015)
New Revision: 65908

Added:
   grass/branches/releasebranch_7_0/raster/r.slope.aspect/r_slope_aspect_4_directions.png
Modified:
   grass/branches/releasebranch_7_0/raster/r.slope.aspect/
   grass/branches/releasebranch_7_0/raster/r.slope.aspect/r.slope.aspect.html
Log:
r.slope.aspect manual: compass oriented aspect map example added


Property changes on: grass/branches/releasebranch_7_0/raster/r.slope.aspect
___________________________________________________________________
Modified: svn:ignore
   - OBJ.*

   + OBJ.*
*.tmp.html


Modified: grass/branches/releasebranch_7_0/raster/r.slope.aspect/r.slope.aspect.html
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.slope.aspect/r.slope.aspect.html	2015-08-12 09:45:29 UTC (rev 65907)
+++ grass/branches/releasebranch_7_0/raster/r.slope.aspect/r.slope.aspect.html	2015-08-12 09:48:51 UTC (rev 65908)
@@ -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>

Copied: grass/branches/releasebranch_7_0/raster/r.slope.aspect/r_slope_aspect_4_directions.png (from rev 65907, grass/trunk/raster/r.slope.aspect/r_slope_aspect_4_directions.png)
===================================================================
(Binary files differ)



More information about the grass-commit mailing list