[GRASS-user] Fill holes with an area bigger of a specific value in a raster coverage

Jorge Arevalo jorgearevalo at libregis.org
Wed Apr 30 03:19:25 PDT 2014

Hello Markus,

On Tue, Apr 29, 2014 at 10:07 PM, Markus Neteler <neteler at osgeo.org> wrote:

> On Tue, Apr 29, 2014 at 6:48 PM, Jorge Arevalo
> <jorgearevalo at libregis.org> wrote:
> > I want to fill some areas of a raster coverage with a value of my choice.
> > Those areas now contain NODATA values. So, they look like holes in my
> > coverage.
> If you want to set all NODATA area to the same value, then use r.null
> with null=yourvalue:
> http://grass.osgeo.org/grass70/manuals/r.null.html#examples
Yep, we already solved that. But thanks!

> > I know I could use r.clump function , but I don't know how to specify the
> > maximum area. Because if a hole is bigger than that area, I don't want to
> > consider it as hole. Is that even possible with GRASS?
> You could assign all NODATA areas a specific, yet unused value (see above).
> Then extract this value with r.mapcalc (if condition) and extract from
> the resulting map only the smaller areas with
> http://grass.osgeo.org/grass70/manuals/r.reclass.area.html
> Then merge them back with r.patch into the original maps in order to
> create the final map.
> Maybe there are other possibilities, too.
> Markus

Sounds like a good plan. We will try that way. Many thanks!!

Jorge Arevalo
Freelance developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140430/78ef3fbc/attachment.html>

More information about the grass-user mailing list