[GRASS-user] Re: how to only fill small sinks with r.fill.dir
Saber
razmjooeis at faunalia.co.uk
Tue Apr 26 12:31:24 EDT 2011
Sorry...I thought the sinks are as null values.
Ignore my previous email.
I can't think of anything apart from improving your DEM to get rid of the
artifacts.
One way will be to get the initial result from the r.fill.dir. Identify
the areas where the depth is more than say 10 metre (r.nulls
map=initial_result setnull 0-9.99)
You can then add the new depth raster to the DEM to create the "filled
hole". (first r.mask to match initial_result and then r.mapcalc
filled_holes=initial_result+DEM)
Then remove the mast and r.patch
r.patch input=filled_holes,DEM output=patched_DEM
You can then use the patched_DEM for r.fill.dir
Hope that helps.
> Hmmm, I'm not following all your steps, but I don't want to manually
> identify valid sinks vs. invalid sinks. I have quite a lot of
> surfaces to process, and I'm happy to fill all sinks except those
> deeper than 10m.
>
> On Tue, Apr 26, 2011 at 10:04, Saber <razmjooeis at faunalia.co.uk> wrote:
>> Here is a (not a very quick) solution I can think of:
>>
>> 1- Create an inverse mask
>> 2- convert the mask to vector (r.to.vect)
>> 3- clean the vector file to get rid of the areas not required (v.clean)
>> 4- convert the vector back to raster (v.to.rast)
>> 5- Use the new raster as a mask for filling holes (probably you need
>> step
>> 4.5 to slightly buffer the raster)
>>
>> Hope that helps
>>
>>
>>> Any ideas on this?
>>>
>>> Bryan
>>>
>>> On Mon, Apr 18, 2011 at 14:49, Bryan Keith <bkeith at itascadenver.com>
>>> wrote:
>>>> Hello,
>>>>
>>>> Is there a way to only fill sinks in a DEM if they are smaller than a
>>>> certain tolerance? I have a couple areas of internal drainage that
>>>> really are correct (and quite large), and I have a quite few small
>>>> sinks that are incorrect and artifacts of the interpolation. Any
>>>> ideas how to this? r.fill.dir attempt to fill all the sinks.
>>>>
>>>> I'm trying to improve the results from r.flow Too many tracks end in
>>>> small holes where I'd like them to continue downstream. Thanks.
>>>>
>>>> Bryan
>>>>
>>> _______________________________________________
>>> 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