[GRASS-dev] t.rast.univar Unable to get statistics for raster map

Margherita Di Leo diregola at gmail.com
Thu Dec 6 01:42:12 PST 2018


Hi,

On Wed, Dec 5, 2018 at 1:36 PM Veronica Andreo <veroandreo at gmail.com> wrote:

> Hi,
>
> El mié., 5 dic. 2018 a las 11:04, Moritz Lennert (<
> mlennert at club.worldonline.be>) escribió:
>
>> On 5/12/18 10:47, Margherita Di Leo wrote:
>> > Hi,
>>
>> This can probably somehow be solved within t.rast.univar, but IIUC the
>> actual issue comes from the underlying r.univar call which has the same
>> behaviour, for example when call with the 'zones' parameter and the '-t'
>> flag: data is just absent if there are only null values in a given zone.
>> I've been struggling with that, for example for addon modules such as
>> i.segment.stats. I don't know how easy it would be to change that within
>> r.univar, but it would be nice.
>>
>> IIUC, the issue comes from stats.c [1]:
>>
>> 123             if (stats[z].n == 0)
>> 124                 continue;
>>
>> Maybe a flag to fill the stats with NULL values, instead of ignoring
>> them, would be appropriate ?
>
>
>
[...]


> +1!!
>
> But I don't know what an good NULL value would be here.
>>
>
> IIRC, r.out.xyz and t.rast.out.xyz use the '*' character.
>

Indeed, this is the case also for t.rast.what

It would be good to create a ticket for this, no? As to not forget
> afterwards...
>

Yes. I'm not sure if this should be put as a ticket for r.univar, or for
t.rast.univar or 2 separate tickets referring to each other?


-- 
Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181206/82763da1/attachment.html>


More information about the grass-dev mailing list