[GRASS-SVN] r65778 - grass/branches/releasebranch_7_0/vector/v.to.rast

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 23 18:39:34 PDT 2015


Author: neteler
Date: 2015-07-23 18:39:34 -0700 (Thu, 23 Jul 2015)
New Revision: 65778

Added:
   grass/branches/releasebranch_7_0/vector/v.to.rast/v_to_rast_binning.png
Modified:
   grass/branches/releasebranch_7_0/vector/v.to.rast/v.to.rast.html
Log:
v.to.rast manual: added raster binning example (r65777)

Modified: grass/branches/releasebranch_7_0/vector/v.to.rast/v.to.rast.html
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.rast/v.to.rast.html	2015-07-24 01:37:18 UTC (rev 65777)
+++ grass/branches/releasebranch_7_0/vector/v.to.rast/v.to.rast.html	2015-07-24 01:39:34 UTC (rev 65778)
@@ -88,6 +88,41 @@
 r.category myfields
 </pre></div>
 
+
+<h3>Convert vector points to raster with raster cell binning</h3>
+
+In this example, the number of schools per raster cell are counted
+(North Carolina sample dataset):
+
+<div class="code"><pre>
+g.copy vector=schools_wake,myschools_wake
+
+# set computation region for raster binning
+g.region vector=myschools_wake res=5000 -p -a
+
+# add new column for counting
+v.db.addcolumn myschools_wake column="value integer"
+v.db.update myschools_wake column=value value=1
+
+# verify attributes
+v.db.select myschools_wake column=cat,value
+v.out.ascii input=myschools_wake output=- column=value
+
+# export and import on the fly, use 4th column (value) as input
+v.out.ascii input=myschools_wake output=- column=value | r.in.xyz input=- \
+            z=4 output=schools_wake_aggreg method=sum
+
+d.mon wx0
+d.rast schools_wake_aggreg
+d.vect schools_wake 
+d.grid 5000
+</pre></div>
+
+<center>
+<img src="v_to_rast_binning.png" alt="Number of schools per raster cell" border=1><br>
+Number of schools per raster cell
+</center>
+
 <h2>SEE ALSO</h2>
 <em>
 <a href="db.describe.html">db.describe</a>,

Copied: grass/branches/releasebranch_7_0/vector/v.to.rast/v_to_rast_binning.png (from rev 65777, grass/trunk/vector/v.to.rast/v_to_rast_binning.png)
===================================================================
(Binary files differ)



More information about the grass-commit mailing list