[GRASS-user] 'Growing' a raster on the edges only
Paulo van Breugel
p.vanbreugel at gmail.com
Sun Apr 14 23:54:18 PDT 2013
Try r.neighbors function with the mean or medium neighborhood
operation, or, if you are working with categorical values, use the
'mode' neighborhood operation. You can combine the result with the
original layer using r.patch so only the no-data cells at the borders
are filled with the newly created values
You may also have a look at r.fillnulls, which fills in no-data cells
using spline interpolation.
Paulo
On Mon 15 Apr 2013 03:06:29 AM CEST, Hanlie Pretorius wrote:
> Hi,
>
> I'm working in GRASS 6.4.2, WIndows 7.
>
> I have a raster file that, for various reasons, has shrunk to smaller
> than its original size and it now now longer crosses the boundaries of
> a vector layer to which I need to assign values from the raster.
>
> So I was wondering how I could 'grow' the raster all along its
> non-null edge by assigning a value to the edge of null cells that is
> one cell 'deep'. Ideally the value assigned should be based on the
> values of the surrounding non-null cells without affecting the value
> of the original non-null cells. I can then repeat this procedure until
> the raster exceeds the boundary of the vector layer everywhere.
>
> So I actually want to 'pad' the raster's non-null values based on
> themselves.
>
> I have looked at r.grow, r.spread and r.buffer, but none of them seems
> to do what I want.
>
> Any ideas?
>
> Thanks
> Hanlie
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
More information about the grass-user
mailing list