<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 1, 2017 at 6:54 AM, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 01/05/17 12:43, Martin Landa wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I need a tool which converts vector features (points) to raster map<br>
using statistical method like min,max,mean (something like<br>
`r.in.lidar` does - if more points are found within one cell, raster<br>
value is computed by given method).<br>
<br>
I started with module `r.to.vect`, but it takes only one attribute<br>
value if more features found, `v.kernel` does not support attributes.<br>
There is probably such tool, I must overlook something...<br>
</blockquote>

<br></span>
I generally use v.to.db op=coor && v.db.select | <a href="http://r.in.xyz" rel="noreferrer" target="_blank">r.in.xyz</a> for such a task. I don't know if a dedicated module would be much faster than a script that wraps around these modules. I guess avoiding the v.to.db part could gain you some time when dealing with lots of points.</blockquote><div><br></div><div>Hi, this is certainly a missing feature. Even the v.to.rast documentation [1] says:<br></div><div><br>v.out.ascii input=myschools_wake output=- column=value | <a href="http://r.in.xyz">r.in.xyz</a> input=- <br></div></div><br></div><div class="gmail_extra">For certain cases, you may be able to use v.out.lidar instead of v.out.ascii, but it is probably less efficient (although it uses LAS instead of ASCII, you can't use pipes). You could also use v.mkgrid with rectangular grid and v.vect.stats [2] followed by v.to.rast (which avoids export, but for large grids it is likely very slow).<br><br></div><div class="gmail_extra">I have separated the binning code in r.in.lidar [3] so that it can be used in <a href="http://r.in.xyz">r.in.xyz</a> and the missing module which would do the binning of a vector map into a raster map. There is actually a large overlap with code for grid-based decimation of a point cloud (2D with gridded or averaged X and Y). I already committed the code to r.in.lidar [4], but we had a discussion on mailing list and decided that this functionality should not be part of r.in.lidar, so it is disabled [5] but the code is still there.<br><br>Anyway, a new module needs to be implemented for this. The name can be something like r.binning, r.vect.stats, r.point.stats, or r.points.stats. It might good project for beginners.<br><br></div><div class="gmail_extra">Vaclav<br></div><div class="gmail_extra"><br>[1] <a href="https://grass.osgeo.org/grass72/manuals/v.to.rast.html#convert-vector-points-to-raster-with-raster-cell-binning">https://grass.osgeo.org/grass72/manuals/v.to.rast.html#convert-vector-points-to-raster-with-raster-cell-binning</a><br>[2] <a href="https://grass.osgeo.org/grass72/manuals/v.vect.stats.html#point-statistics-in-a-hexagonal-grid">https://grass.osgeo.org/grass72/manuals/v.vect.stats.html#point-statistics-in-a-hexagonal-grid</a><br>[3] <a href="https://trac.osgeo.org/grass/changeset/66595">https://trac.osgeo.org/grass/changeset/66595</a><br>[4] <a href="https://trac.osgeo.org/grass/changeset/67210">https://trac.osgeo.org/grass/changeset/67210</a><br>[5] <a href="https://trac.osgeo.org/grass/changeset/68418">https://trac.osgeo.org/grass/changeset/68418</a><br><br></div></div>