[GRASS-dev] v.rast.stats: NULL values for very small areas

Martin Landa landa.martin at gmail.com
Tue Oct 6 08:51:38 PDT 2015


Hi,

2015-10-06 17:29 GMT+02:00 Moritz Lennert <mlennert at club.worldonline.be>:
> 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 ?

right, a flag could be an option.

[...]

> Get area and if area < pixel size then

> - number = 1

There can be more areas with same category.

> - 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...

Why? I have request from the users, they are not happy about NULL
values. I just wonder how to implement within Python script. Probably
rewriting to C would make sense(?)

Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa


More information about the grass-dev mailing list