[GRASS-SVN] r65777 - grass/trunk/vector/v.to.rast

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


Author: neteler
Date: 2015-07-23 18:37:18 -0700 (Thu, 23 Jul 2015)
New Revision: 65777

Added:
   grass/trunk/vector/v.to.rast/v_to_rast_binning.png
Modified:
   grass/trunk/vector/v.to.rast/v.to.rast.html
Log:
v.to.rast manual: added raster binning example

Modified: grass/trunk/vector/v.to.rast/v.to.rast.html
===================================================================
--- grass/trunk/vector/v.to.rast/v.to.rast.html	2015-07-23 21:08:45 UTC (rev 65776)
+++ grass/trunk/vector/v.to.rast/v.to.rast.html	2015-07-24 01:37:18 UTC (rev 65777)
@@ -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>,

Added: grass/trunk/vector/v.to.rast/v_to_rast_binning.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/vector/v.to.rast/v_to_rast_binning.png
___________________________________________________________________
Added: svn:mime-type
   + image/png



More information about the grass-commit mailing list