[GRASS-user] v.rast.stats with mode?

Anna Petrášová kratochanna at gmail.com
Sat Apr 9 20:04:53 PDT 2016


On Thu, Mar 31, 2016 at 4:32 AM, patrick s. <patrick_gis at gmx.net> wrote:
> 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?

I am not sure I understand, is this related to this?
https://lists.osgeo.org/pipermail/grass-dev/2015-October/076654.html

Could you provide more details?

Thanks
Anna

> 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> 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
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>


More information about the grass-user mailing list