[GRASS-SVN] r70996 - in grass-addons/grass7/raster: . r.binning
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 1 17:49:05 PDT 2017
Author: wenzeslaus
Date: 2017-05-01 17:49:05 -0700 (Mon, 01 May 2017)
New Revision: 70996
Added:
grass-addons/grass7/raster/r.binning/
grass-addons/grass7/raster/r.binning/Makefile
grass-addons/grass7/raster/r.binning/r.binning.html
grass-addons/grass7/raster/r.binning/r.binning.py
Modified:
grass-addons/grass7/raster/Makefile
Log:
r.binning: create raster from vector points using binning (incomplete wrapper of v.out.ascii piped to r.in.xyz)
Modified: grass-addons/grass7/raster/Makefile
===================================================================
--- grass-addons/grass7/raster/Makefile 2017-05-01 21:36:33 UTC (rev 70995)
+++ grass-addons/grass7/raster/Makefile 2017-05-02 00:49:05 UTC (rev 70996)
@@ -17,6 +17,7 @@
r.agent \
r.area \
r.basin \
+ r.binning \
r.bioclim \
r.bitpattern \
r.catchment \
Added: grass-addons/grass7/raster/r.binning/Makefile
===================================================================
--- grass-addons/grass7/raster/r.binning/Makefile (rev 0)
+++ grass-addons/grass7/raster/r.binning/Makefile 2017-05-02 00:49:05 UTC (rev 70996)
@@ -0,0 +1,7 @@
+MODULE_TOPDIR = ../..
+
+PGM=r.binning
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+
+default: script
Added: grass-addons/grass7/raster/r.binning/r.binning.html
===================================================================
--- grass-addons/grass7/raster/r.binning/r.binning.html (rev 0)
+++ grass-addons/grass7/raster/r.binning/r.binning.html 2017-05-02 00:49:05 UTC (rev 70996)
@@ -0,0 +1,34 @@
+<h2>DESCRIPTION</h2>
+
+<em>r.binning</em> bins points from a vector map into a raster map.
+
+<p>
+Use <em><a href="g.region.html">g.region</a></em> to set the extent and
+resolution of the resulting raster.
+
+
+<h2>EXAMPLES</h2>
+
+Calculate for current region the beam irradiance (direct radiation)
+for DOY 355 in 2014 from 8am to 3pm:
+
+<div class="code"><pre>
+g.region vect=elev_lid792_bepts res=10
+</pre></div>
+
+
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="g.region.html">g.region</a>,
+<a href="r.in.xyz.html">r.in.xyz</a>,
+<a href="r.in.lidar.html">r.in.lidar</a>
+</em>
+
+
+<h2>AUTHOR</h2>
+
+Vaclav Petras, <a href="http://geospatial.ncsu.edu/osgeorel/">NCSU GeoForAll Lab</a>
+
+<p>
+<i>Last changed: $Date: 2017-04-14 18:20:35 -0400 (Fri, 14 Apr 2017) $</i>
Added: grass-addons/grass7/raster/r.binning/r.binning.py
===================================================================
--- grass-addons/grass7/raster/r.binning/r.binning.py (rev 0)
+++ grass-addons/grass7/raster/r.binning/r.binning.py 2017-05-02 00:49:05 UTC (rev 70996)
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE: r.binning
+# AUTHOR(S): Vaclav Petras
+# PURPOSE:
+# COPYRIGHT: (C) 2017 by Vaclav Petras and the GRASS Development Team
+#
+# This program is free software under the GNU General Public
+# License (>=v2). Read the file COPYING that comes with GRASS
+# for details.
+#
+#############################################################################
+
+#%module
+#% description: Bin vector points into a raster map
+#% keyword: raster
+#% keyword: vector
+#% keyword: points
+#% overwrite: yes
+#%end
+#%option G_OPT_V_INPUT
+#%end
+#%option G_OPT_R_OUTPUT
+#%end
+
+
+import grass.script as gs
+
+
+def main():
+ options, flags = grass.parser()
+
+ vector = options['input']
+ layer = 1
+ raster = options['output']
+ method = 'mean'
+ sep = 'pipe'
+
+ out_process = gs.pipe_command(
+ 'v.out.ascii', input=vector, layer=layer, format='point',
+ separator=sep)
+ in_process = gs.start_command(
+ 'r.in.xyz', input='-', output=raster, method=method,
+ separator=sep, stdin=out_process.stdout)
+ in_process.communicate()
+ out_process.wait()
+
+
+if __name__ == "__main__":
+ main()
Property changes on: grass-addons/grass7/raster/r.binning/r.binning.py
___________________________________________________________________
Added: svn:executable
+ *
More information about the grass-commit
mailing list