[GRASS-user] Re: how to only fill small sinks with r.fill.dir
Bryan Keith
bkeith at itascadenver.com
Tue Apr 26 16:26:43 EDT 2011
On Tue, Apr 26, 2011 at 12:53, Markus Metz
<markus.metz.giswork at googlemail.com> wrote:
> On Tue, Apr 26, 2011 at 7:54 PM, Bryan Keith <bkeith at itascadenver.com> wrote:
>>
>> I think my problem is now with r.flow. I would like to see flows
>> continue through the filled sink and out the other end (as if it were
>> a lake), but that doesn't happen. I don't think it can happen with
>> r.flow because r.flow encounters a flat area.
>>
> r.watershed would do that. Also r.terrraflow, but r.terraflow fills
You mean with the stream output? The problem with that is you're
unable to specify where you'd like the streams to start. You only get
the largest accumulation streams, but I want output similar to r.flow
which distributes particles throughout the area of interest.
r.drain allows you to specify where the particulars start, but it's
limited to 8-directional flow instead of the smooth flow that r.flow
generates (which I prefer).
> all remaining sinks internally which is apparently not what you want.
> r.watershed also allows you to specify locations of real sinks which
> are not traversed.
>
> BTW, sometime in the next months I want to make available a new module
> that performs hydrological conditioning of a DEM using not sink
> filling but an impact reduction approach, and which has an option to
> remove only sinks smaller than a given size.
Sounds like this may be what I'm after!
Bryan
>
> Markus M
>
>
>> Not sure what to try next. This was a problem even before messing
>> around with the sink tolerance.
>>
>> Bryan
>>
>> On Tue, Apr 26, 2011 at 10:31, Saber <razmjooeis at faunalia.co.uk> wrote:
>>> 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
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>> _______________________________________________
>> 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