[GRASS5] [bug #4076] (grass) r.bilinear: does it work correctly ?

Maciek Sieczka via RT grass-bugs at intevation.de
Thu Feb 16 08:03:17 EST 2006


Urs,

Sorry I haven't replied earlier but you didn't forward to grass dev list -
currently bugtracker won't do it for you automatically.

Moreover, I can't be of any help more. You found a bug and we'll need to wait
for a developer wishing to fix it. Below I'm forwarding your messages so grass
dev subscribers can a have a look.

Urs wrote:

> I managed to use gdalwarp. The result of this procedure reveals the 
> correct result for the particular pixel, i.e. 1921.68.

Urs wrote, next:

> Just to illustrate my problem in more detail: I made a simple test with 
> a 4x4 cell 25m raster grid.

> Below the original grid in the ESRI ASCII format:

ncols 4
nrows 4
xllcorner 87.5
yllcorner 12.5
cellsize 25.000000
NODATA_value -9999
10.1 15.2 20.3 25.4
30.5 35.6 40.7 45.8
50.9 55.1 60.2 65.3
70.4 75.5 80.6 85.7

Here's the result of the bilinear interpolation to 10m by 
latticeresample (ArcInfo)

ncols 10
nrows 10
xllcorner 87.5
yllcorner 12.5
cellsize 10
NODATA_value -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 12.65 14.69 16.73 18.77 20.81 22.85 24.89 26.93 -9999
-9999 20.81 22.85 24.89 26.93 28.97 31.01 33.05 35.09 -9999
-9999 28.97 31.01 33.05 35.09 37.13 39.17 41.21 43.25 -9999
-9999 37.103 39.035 40.967 42.98 45.02 47.06 49.1 51.14 -9999
-9999 45.227 47.015 48.803 50.78 52.82 54.86 56.9 58.94 -9999
-9999 53.279 54.995 56.711 58.67 60.71 62.75 64.79 66.83 -9999
-9999 61.115 62.975 64.83501 66.83 68.87 70.91 72.95 74.99 -9999
-9999 68.951 70.955 72.959 74.99 77.03 79.07 81.11 83.14999 -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999

> And here's the result of r.bilinear to 10m:

ncols 10
nrows 10
xllcorner 87.5
yllcorner 12.5
cellsize 10.000000
NODATA_value -9999
10.5 11 13 15 17 19 21 23 25 25.5
12.6 13.1 15.1 17.1 19.1 21.1 23.1 25.1 27.1 27.6
21 21.5 23.5 25.5 27.5 29.5 31.5 33.5 35.5 36
29.4 29.9 31.9 33.900002 35.900002 37.900002 39.900002 41.900002 
43.900002 44.400002
37.5 37.970001 39.849998 41.73 43.700001 45.700001 47.700001 49.700001 
51.700001 52.200001
45.5 45.93 47.650002 49.369999 51.299999 53.299999 55.299999 57.299999 
59.299999 59.799999
53.400002 53.82 55.5 57.18 59.099998 61.099998 63.099998 65.099998 
67.099998 67.599998
61 61.5 63.5 65.5 67.5 69.5 71.5 73.5 75.5 76
68.599998 69.18 71.5 73.82 75.900002 77.900002 79.900002 81.900002 
83.900002 84.400002
70.5 71.099998 73.5 75.900002 78 80 82 84 86 86.5

> My basic question is, why the cell (3¦3) is with r.bilinear equal to 
> 23.5 and not as with latticeresample
> 22.85 (i.e. (10.5 + 15.2 + 30.5 + 35.6) / 4).


-------------------------------------------- Managed by Request Tracker




More information about the grass-dev mailing list