<div dir="ltr">Hi,<br>I tried to translate picture's resolution from 10mx10m to 50mx50m using "gdalwarp" command and got the problem.<br>I used it with "-r mode" like this.<br><br>$ gdalwarp -t_srs EPSG:4326 -tr 0.000416667 0.000416667 -r mode original.tif resize.tif<br><br>I thought that "-r mode" resamples specified resolution (in this case, 5x5 pixel), but the outcome was very strange.<br><br>So I made a test script and checked.<br>(The square that is surrounded (row,col)=(25,25)(74,74) is value 1,and others is value 0,100x100 pixel.)<br><br>This is the test script using GRASS(7.0.3).<br><br># set the resolution 100mx100m and a size is 100x100<br>$ g.region w=140 e=140.0083 s=36 n=36.0083 res=8.333333333333333e-05<br>$ r.mapcalc " dummy = if(row()>25,if(row()<75,if(col()>25,if(col()<75,1),0),0),0) "<br>$ r.out.gdal input=dummy output=original.tif<br><br># And checked.<br>$ gdalwarp -t_srs EPSG:4326 -tr 0.000416667 0.000416667 -r mode original.tif resize.tif<br><br>On the original.tif,the square that is surrounded (row,col)=(70,70),(75,75) account for 15/25 value 1, but the resize.tif the square that is surrounded (row,col)=(14,14),(15,15) is value 0.<br><br>Is this the problem of the mode algorithm?<br>The gdal version I used is 1.11.2 and OS is Ubuntu 14.04.<br><br>Thank you for your replies.<br>Katagi<br><br clear="all"><br>
</div>