[GRASS-user] r.mapcalc and g.region
BLANDENIER Lucien
lucien.blandenier at unine.ch
Mon Mar 31 07:03:48 PDT 2014
Thank you for your answer. I read on the pages you mention :
"If the point falls exactly upon a grid line, the exact result will be determined by the direction of any rounding error. One consequence of this is that downsampling by a factor which is an even integer will always sample exactly on the boundary between cells, meaning that the result is ill-defined"
This should be the source of my problem !
Regards
________________________________________
De : Moritz Lennert [mlennert at club.worldonline.be]
Envoyé : lundi 31 mars 2014 15:54
À : BLANDENIER Lucien; grass-user at lists.osgeo.org
Objet : Re: [GRASS-user] r.mapcalc and g.region
On 31/03/14 15:33, BLANDENIER Lucien wrote:
> Hello,
>
> I'm wondering how does r.mapcalc compute the value of a new pixcel if the resolution have been reduced before (i.e. the pixcel is larger). Is it an average ?
>
> I did a simple test with a 10*10 pixcel raster. I reduced the resolution to 5*5 and made a new raster with r.mapcalc "newrast=oldrast*1" but the result was not an average but the higher value of the four underlying pixcels.
>
> I did then the same operation with a more coarser resulution and it seemed to be ok.
>
> Could someone explain this?
Short answer: GRASS uses nearest neighbor interpolation as the default
method for resampling.
For more details: http://grass.osgeo.org/grass64/manuals/rasterintro.html
"Resampling methods and interpolation methods"
Moritz
More information about the grass-user
mailing list