[GRASS-user] Re: Limit r.fillnulls to interpolate only small gaps
LeeDaniel
Lee.Daniel.1986 at gmail.com
Fri Feb 18 09:45:44 EST 2011
I would do it like this:
- Make a mask of the gaps with r.mask (either by masking placeholder values
that stand for gaps or, if the map really has no values where there are
gaps, by making an inverse mask from the real values.
- Create an arbitrary raster that overlays the gaps (with the mask applied
just use e.g. "r.mapcalc newmap=1"
- Remove the mask
- Conver the raster to vectors
- Delete all vectors that are small enough to be interpolated over
- Conver the vectors back into raster
- Interpolate all the gaps in the old map
- Make an inverse mask from the raster that holds the locations of the too
large gaps
- Use r.mapcalc to remove the interpolated areas where the gap was too big
Another way, which is in my opinion better and faster, would be to use
r.clump on the raster of the gaps to give the contigious areas an identical
value, then run r.stats to spit out their areas, and then reclass the raster
so that the cell values match the area covered by the gaps. Then you could
remove the too big areas with r.reclass.
Hope that helps! :)
Daniel
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Limit-r-fillnulls-to-interpolate-only-small-gaps-tp6040101p6040155.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list