[GRASS-user] interpolate raster map

Rainer M Krug r.m.krug at gmail.com
Thu May 22 09:11:33 EDT 2008


On Thu, May 22, 2008 at 2:17 PM, Hamish <hamish_b at yahoo.com> wrote:
> [ah, it dumped the server-error email in my draft folder. here it is]
>
>
> Rainer Krug:
>> I have two raster maps, one (mapA) based on a raster map of
>> a much lower resolution (see attached picture) and the other
>> one is in the MASK (pink). I would like to do two things:
>>
>> 1) "smooth" mapA, so that it is not as grainy as
>> it is now. I know that that will introduce error,
>> but the error will be less important then the edges
>> based on the coarser resolution.
>
> set resolution to that of the MASK and use r.resamp.interp or r.resamp.rst.
> then reapply the MASK with r.mapcalc "croped=interped"

Thanks for the answer - I am in the process of trying it out. But:
When I try to use r.resamp.rst, I get the error message "Input map
resolution differs from current region resolution!". I thought that
r.resamp.rst is doing exactly that - changing the resolution?

>
>> 2) extrapolate to the areas not covered by mapA, but part
>> of MASK. again - I am aware that this will introduce considerable
>> error, but the same applies as in the previous case. So what I would
>> like to do here, is essentially fill the edges with the values of the
>> adjacend cells which have values.
>
> r.grow for that, but r.resamp.rst may do a nice job around the edges and maybe it is good enough to keep.
>
>
>> I looked at resampling (for (1)), but it increases the edge
>> without data, which is not acceptable for me.
>
> which method?
> you could always use the original low res map as a mask.
>
>
> Hamish
>
>
>
>
>
>
>



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa


More information about the grass-user mailing list