[GRASS-dev] [GRASS GIS] #2820: r.surf.idw gives broken results - Don't match v.surf.idw
GRASS GIS
trac at osgeo.org
Fri Dec 4 06:01:45 PST 2015
#2820: r.surf.idw gives broken results - Don't match v.surf.idw
---------------------+-------------------------
Reporter: lrntct | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.3
Component: Raster | Version: 7.0.1
Resolution: | Keywords:
CPU: x86-64 | Platform: Linux
---------------------+-------------------------
Comment (by mlennert):
I can reproduce the issue in the NC data set:
{{{
g.region vect=nc_state res=500 -a
v.surf.idw precip_30ynormals col=annual out=vsurfidw --o
v.to.rast precip_30ynormals use=attr attr_col=annual out=precip --o
r.mapcalc "precip_int = int(precip * 100)" --o
r.surf.idw in=precip_int out=rsurfidw_tmp --o
r.mapcalc "rsurfidw = float(rsurfidw_tmp) / 100" --o
r.mapcalc "diff = rsurfidw - vsurfidw"
}}}
Analysing the differences, you get:
{{{
r.univar map=diff
total null and non-null cells: 24840200
total null cells: 0
Of the non-null cells:
----------------------
n: 24840200
minimum: -370.28
maximum: 1020.98
range: 1391.26
mean: 48.8595
mean of absolute values: 127.803
standard deviation: 180.027
variance: 32409.7
variation coefficient: 368.458 %
sum: 1213680178.7663
}}}
and
{{{
r.covar -r map=rsurfidw,vsurfidw
r.covar: complete ...
N = 24840200
1.000000 0.284021
0.284021 1.000000
}}}
Looking at the individual result maps:
{{{
r.univar map=rsurfidw
total null and non-null cells: 24840200
total null cells: 0
Of the non-null cells:
----------------------
n: 24840200
minimum: 947.42
maximum: 2329.17
range: 1381.75
mean: 1346.31
mean of absolute values: 1346.31
standard deviation: 183.013
variance: 33493.9
variation coefficient: 13.5937 %
sum: 33442685677.211
}}}
and
{{{
r.univar map=vsurfidw
total null and non-null cells: 24840200
total null cells: 0
Of the non-null cells:
----------------------
n: 24840200
minimum: 1120.14
maximum: 1546.86
range: 426.72
mean: 1297.45
mean of absolute values: 1297.45
standard deviation: 92.1991
variance: 8500.67
variation coefficient: 7.10616 %
sum: 32229005498.4201
}}}
I will also attach some maps, including a map of the original data points.
The interpolated maps use the following color table:
{{{
947.42 255:255:255
2329.17 0:0:255
}}}
v.surf.idw smoothes the map much more...
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2820#comment:2>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list