[GRASS-user] interpolate raster map

Hi

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.

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.

Any ideas how I can achieve this?

I looked at resampling (for (1)), but it increases the edge without
data, which is not acceptable for me.

Thanks a lot,

Rainer

--
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

(attachments)

map.png

On Thu, 2008-05-22 at 13:14 +0200, Rainer M Krug wrote:

Hi

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.

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.

Any ideas how I can achieve this?

I looked at resampling (for (1)), but it increases the edge without
data, which is not acceptable for me.

Thanks a lot,

Rainer

Hi Rainer.

About 1:

The r.resamp module uses the nearest neighbour method which will not
"smooth" your map.
Have a look at r.resamp.interp
( http://grass.osgeo.org/grass63/manuals/html63_user/r.resamp.interp.html )
and I think the bicubic method should help.

--- On Thu, 5/22/08, Rainer M Krug <r.m.krug@gmail.com> wrote:

From: Rainer M Krug <r.m.krug@gmail.com>
Subject: [GRASS-user] interpolate raster map
To: grass-user@lists.osgeo.org
Date: Thursday, May 22, 2008, 11:14 AM
Hi

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.

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.

Any ideas how I can achieve this?

I looked at resampling (for (1)), but it increases the edge
without
data, which is not acceptable for me.

Thanks a lot,

Rainer

--
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_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

sorry for the last empty post, yahoo is quite broken these days and ate my reply.

key points:
- resample with r.resamp.interp or r.resamp.rst.
- use low res map as mask to crop interp'd map back to known borders if you like to do that.
- apply mask to new map with 'r.mapcalc "new=old"' with MASK in place.
- use r.grow to "smear" values outwards
- r.resamp.rst may be good enough at edges so that you don't need r.grow.

Hamish