Hi,
Using current 6.3 CVS I had a strange issue with r.univar. For one of
my rasters most statistics are "nan" in r.univar, which I don't
understand why and while the r.univar.sh output is OK for the same
raster. Both outputs you'll find below. The raster is an product of
v.to.rast use=dir.
$ r.univar cieki10_2zl_dir
100%
total null and non-null cells: 378972
total null cells: 374849
Of the non-null cells:
----------------------
n: 4123
minimum: 0
maximum: 358.264
range: 358.264
mean: nan
mean of absolute values: nan
standard deviation: nan
variance: nan
variation coefficient: nan %
sum: nan
$ r.univar.sh cieki10_2zl_dir
WARNING: This module is superseded and will be removed in future
versions of GRASS. Use the much faster r.univar instead.
Calculation for map cieki10_2zl_dir (ignoring NULL cells)...
Reading raster map...
r.stats: 100%
Calculating statistics...
Number of cells (excluding NULL cells): 4123
Minimum: 0
Maximum: nan
Range: 0
Arithmetic mean: 160.434
Arithmetic mean of absolute values: 160.434
Variance: 11639.4
Standard deviation: 107.886
Variation coefficient: 67.2463 %
What's wrong?
I couldn't reproduce this in spearfish. Below's is the r.info output.
If my raster is needed for testing I can send it.
datatype=DCELL
min=0.000000
max=358.264295
nsres=10
ewres=10
north=5684100
south=5676270
east=601480
west=596640
Data Source:
Vector Map: cieki10_2zl in mapset melio2
Original Scale from Vector Map: 1:1
Data Description:
generated by v.to.rast
Comments:
v.to.rast input="cieki10_2zl" output="cieki10_2zl_dir" use="dir" lay\
er=1 value=1 rows=4096
Maciek