[GRASS-dev] r.univar: 'nan' results

Maciej Sieczka tutey at o2.pl
Sun Sep 17 12:05:59 EDT 2006


Martin Landa wrote:

> Hamish wrote:

>> (nan = not a number, GRASS uses NULL for the same idea, but NULL is not
>> the same as nan.)

> agreed, for me, it seems like a bug (v.to.rast?), in any case a 'nan'
> value is an *invalid* cell value.

>> If there are nan in the cell data, the r.univar calculations can't cope.
>> The question is: how did nan cells get into the input raster map?

> v.to.rast ?

>> There is a possibility that there is a bug in r.univar..
>> Try using r.mapcalc to isolate the nans? What does "r.info -r" say?

> min=0.000000
> max=358.264295

It seems like a bug in v.to.rast. Take the location I attached, and do:

$ g.region vect=cieki10_2zl res=10 -a
$ v.to.rast input=cieki10_2zl output=cieki10_2zl_dir use=dir

There are several nan cells indeed:

$ r.stats -1g cieki10_2zl_dir | grep -i nan
r.stats: 600265 5680715 nan
600335 5680575 nan
600395 5680435 nan
599735 5680345 nan
598695 5679865 nan
600245 5679475 nan
599125 5679245 nan
599675 5678955 nan
598915 5678935 nan
599815 5678765 nan
598785 5678655 nan
600345 5678335 nan
600545 5678015 nan

Maciek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: univar2.tar.bz2
Type: application/x-bzip
Size: 74305 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20060917/ec06bfbf/univar2.tar.bin


More information about the grass-dev mailing list