[GRASS-dev] v.rast.stats: NULL values for very small areas
Moritz Lennert
mlennert at club.worldonline.be
Tue Oct 6 08:29:43 PDT 2015
On 06/10/15 16:57, Martin Landa wrote:
> Hi all,
>
> `v.rast.stats` uploads NULL values for areas which are smaller that
> computation region resolution (ie. fits completely into one cell), see
> [1] --- region grid in black, red lines for area of given category. In
> this case v.rast.stats uploads NULL values. I wonder how to change
> this behaviour since the modules uses `v.to.rast` [2].
One can argue that setting them NULL is actually a valid choice as it
might not be legitimate to give them values of pixel so much larger. But
maybe this should be decided by a flag ?
> Any idea?
Get area and if area < pixel size then
- number = 1
- range = 0
- stddev,variance,coeff_var = 0 (or NULL)
- all other values = pixel value which you can get by replacing the
areas by their centroids, you could use v.what.rast to get the pixel value.
But I wonder if this is not a bit of overkill...
Moritz
More information about the grass-dev
mailing list