[GRASS-user] r.average issue with rasters at different resolutions

Markus Neteler neteler at osgeo.org
Sat Feb 15 14:55:04 PST 2014

On Sat, Oct 19, 2013 at 5:20 PM, matteo poletti <pollo1_91 at yahoo.it> wrote:
> Hi Margherita,
> Thank you for your reply!
>> Da: Margherita Di Leo <diregola at gmail.com>
>>Which kind of map is the base map?
> Well, shouldn't be the base map just a raster map which assigns the same category to the cells that should be averaged together?
>> If you compare the average you get from 2 base maps at different resolutions, you probably will get two different values.
> I'm sorry but I don't get the point.

In the case of different resolutions GRASS performs resampling on the
fly which is nearest neighbor resampling.
It is usually better to do that in a user controlled way, i.e. prepare
the maps properly beforehand.

> The base map I use is always at the same resolution (res=0.2), which is also the resolution of the region. My problem is that I have a cover map with with a different resolution (res=200) and if I use it as it is I get wrong result. The workaround I found is to change the resolution of the cover map before running r.average (r.mapcalc "rescaled_cover_map=original_cover_map") but it's ugly.

Right. Please see
-> Resampling of raster maps to finer resolution

for better ways.


More information about the grass-user mailing list