[STATSGRASS] Problems with raster map
Agustin Lobo
alobo at ija.csic.es
Mon Apr 7 11:52:11 EDT 2003
I'm finding problems at reading a
float Grass raster in gstat.
Gstat:
gstat -e semivariogram -c 20 -i 0.25 dum2
ncols 194
nrows 175
dum2 (GRASS raster)
attribute: dum2 [x:] x (map) : [ 289.5,
482.5]
n: 33950 [y:] y (map) : [ 551.5,
725.5]
sample mean: -1.54972e+36 sample std.: 2.1673e+37
100% done
But note the output of r.describe and r.univar:
r.describe -r dum2
READING [dum2 in alobo] ... 100%
-4.894597 thru 3.777469
r.univar dum2
This module calculates univariate statistics...
Calculation for full image dum2 at alobo...
(no base mask map set, ignoring NULL cells)
Reading raster map...
r.stats: 100%
Calculating statistics...
Number of cells: 33950
Minimum: -4.8945974869
Maximum: 3.7774692326
Range: 8.67207
Arithmetic mean: -1.74594e-06
Variance: 0.997496
Standard deviation: 0.998747
Variation coefficient: -5.72041e+07 %
Also, I have imported the raster to R using the Grass interface
and have checked it:
> a <- rast.get(gmeta(),rlist="dum2")
> summary(a)
Length Class Mode
dum2 33950 -none- numeric
> mean(a$dum2)
[1] -1.745935e-06
> any(!is.finite(a$dum2))
[1] FALSE
Do you want me to send you the raster?
It's quite small:
> cat ../cellhd/dum2
proj: 0
zone: 0
north: 726
south: 551
east: 483
west: 289
cols: 194
rows: 175
e-w resol: 1
n-s resol: 1
format: -1
compressed: 1
Agus
Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es
More information about the grass-stats
mailing list