[GRASS-user] v.rast.stats with mode?
patrick s.
patrick_gis at gmx.net
Thu Mar 31 01:32:17 PDT 2016
Following Anna's suggestion I had to find out that r.mode has to option
to handle NULL values, i.e. exclude it from calculation? I need to
aggregate rasters to polygons, with rasters covering only a small part
of the polygon. As I realized now r.mode returns NULL in such case.
Setting NULL with r.null null=9999 it will return 9999 for all of these.
Is there a solution to that problem?
Patrick
On 16.03.2016 13:59, Anna Petrášová wrote:
>
>
> On Wed, Mar 16, 2016 at 6:23 AM, patrick s. <patrick_gis at gmx.net
> <mailto:patrick_gis at gmx.net>> wrote:
>
> Dear list
>
> Is it possible to get the "mode" (most common occurring value) in
> a polygon for discrete classes? It appears that v.rast.stats does
> not have this option.
>
>
> v.rast.stats uses r.univar and r.univar doesn't have mode implemented
> (it's a TODO in manual). You can look at r.mode but it returns raster
> map, not one number.
>
> Anna
>
>
> Thanks for a short feedback,
> Patrick
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160331/b239de35/attachment.html>
More information about the grass-user
mailing list