[GRASS-SVN] r71056 - in grass/branches/releasebranch_7_2/raster: r.stats.quantile r.stats.zonal

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 7 13:28:36 PDT 2017


Author: neteler
Date: 2017-05-07 13:28:36 -0700 (Sun, 07 May 2017)
New Revision: 71056

Modified:
   grass/branches/releasebranch_7_2/raster/r.stats.quantile/r.stats.quantile.html
   grass/branches/releasebranch_7_2/raster/r.stats.zonal/r.stats.zonal.html
Log:
r.stats.quantile and r.stats.zonal manuals: examples added (trunk, r71055)

Modified: grass/branches/releasebranch_7_2/raster/r.stats.quantile/r.stats.quantile.html
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.stats.quantile/r.stats.quantile.html	2017-05-07 20:27:56 UTC (rev 71055)
+++ grass/branches/releasebranch_7_2/raster/r.stats.quantile/r.stats.quantile.html	2017-05-07 20:28:36 UTC (rev 71056)
@@ -13,6 +13,30 @@
 which are absent from
 <em><a href="r.stats.zonal.html">r.stats.zonal</a></em>.
 
+<h2>EXAMPLE</h2>
+
+In this example, the raster polygon map <tt>zipcodes</tt> in the North 
+Carolina sample dataset is used to calculate quantile raster statistics using
+the <tt>elevation</tt> raster map: 
+
+<div class="code"><pre>
+g.region raster=zipcodes -p
+
+# print quantiles
+r.stats.quantile base=zipcodes cover=elevation quantiles=3 -p
+27511:0:33.333333:134.717392
+27511:1:66.666667:143.985723
+27513:0:33.333333:140.669993
+27513:1:66.666667:146.279449
+27518:0:33.333333:115.140101
+27518:1:66.666667:129.893723
+[...]
+
+# write out percentile raster maps
+r.stats.quantile base=zipcodes cover=elevation percentiles=25,50,75 \
+  output=zipcodes_elev_q25,zipcodes_elev_q50,zipcodes_elev_q75
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
 <em>

Modified: grass/branches/releasebranch_7_2/raster/r.stats.zonal/r.stats.zonal.html
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.stats.zonal/r.stats.zonal.html	2017-05-07 20:27:56 UTC (rev 71055)
+++ grass/branches/releasebranch_7_2/raster/r.stats.zonal/r.stats.zonal.html	2017-05-07 20:28:36 UTC (rev 71056)
@@ -12,6 +12,24 @@
 for floating-point cover maps at the expense of not supporting
 quantiles. For this, see <em>r.stats.quantile</em>.
 
+<h2>EXAMPLE</h2>
+
+In this example, the raster polygon map <tt>zipcodes</tt> in the North 
+Carolina sample dataset is used to calculate zonal raster statistics using
+the <tt>elevation</tt> raster map: 
+
+<div class="code"><pre>
+g.region raster=zipcodes -p
+
+# pixel count in zipcode areas
+r.stats.zonal base=zipcodes cover=elevation method=count output=zipcodes_elev_count
+r.colors zipcodes_elev_count color=gyr -g
+
+# average elevation in zipcode areas
+r.stats.zonal base=zipcodes cover=elevation method=average output=zipcodes_elev_avg
+r.colors zipcodes_elev_avg color=elevation -g
+</pre></div>
+
 <h2>SEE ALSO</h2>
 <em>
 <a href="r.quantile.html">r.quantile</a>,



More information about the grass-commit mailing list