[GRASS-user] how to only fill small sinks with r.fill.dir

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

Any ideas on this?

Bryan

On Mon, Apr 18, 2011 at 14:49, Bryan Keith <bkeith@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

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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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@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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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@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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Great ideas, thank you. I did something like this:

r.fill.dir input=wl200310_krig_g elevation=wl200310_fill_g
direction=wl200310_dir_g
r.mapcalc wl200310diff_g=wl200310_fill_g - wl200310_krig_g

r.mapcalc wl200310diffsel_g = if("wl200310diff_g > 5.0", 0, wl200310diff_g)
r.mapcalc wl200310sel_g = wl200310diffsel_g + wl200310_krig_g
r.fill.dir input=wl200310sel_g elevation=wl200310sel_fill_g
direction=wl200310sel_dir_g

r.flow elevin=wl200310sel_fill_g flout=test_ln

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.

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@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@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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

You probably need a full 2D hydraulic model to do work based on water
level gradient.
Maybe something like like ANUGA:
http://sourceforge.net/projects/anuga/

On Tue, 2011-04-26 at 11:54 -0600, Bryan Keith wrote:

Great ideas, thank you. I did something like this:

r.fill.dir input=wl200310_krig_g elevation=wl200310_fill_g
direction=wl200310_dir_g
r.mapcalc wl200310diff_g=wl200310_fill_g - wl200310_krig_g

r.mapcalc wl200310diffsel_g = if("wl200310diff_g > 5.0", 0, wl200310diff_g)
r.mapcalc wl200310sel_g = wl200310diffsel_g + wl200310_krig_g
r.fill.dir input=wl200310sel_g elevation=wl200310sel_fill_g
direction=wl200310sel_dir_g

r.flow elevin=wl200310sel_fill_g flout=test_ln

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.

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@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@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@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@lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>
>>>
>>>
>>
>
>
>

On Tue, Apr 26, 2011 at 7:54 PM, Bryan Keith <bkeith@itascadenver.com> wrote:

Great ideas, thank you. I did something like this:

r.fill.dir input=wl200310_krig_g elevation=wl200310_fill_g
direction=wl200310_dir_g
r.mapcalc wl200310diff_g=wl200310_fill_g - wl200310_krig_g

r.mapcalc wl200310diffsel_g = if("wl200310diff_g > 5.0", 0, wl200310diff_g)
r.mapcalc wl200310sel_g = wl200310diffsel_g + wl200310_krig_g
r.fill.dir input=wl200310sel_g elevation=wl200310sel_fill_g
direction=wl200310sel_dir_g

r.flow elevin=wl200310sel_fill_g flout=test_ln

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
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.

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@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@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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Apr 26, 2011 at 12:53, Markus Metz
<markus.metz.giswork@googlemail.com> wrote:

On Tue, Apr 26, 2011 at 7:54 PM, Bryan Keith <bkeith@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@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@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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Apr 26, 2011 at 12:51, Saber Razmjooei
<razmjooeis@faunalia.co.uk> wrote:

You probably need a full 2D hydraulic model to do work based on water
level gradient.
Maybe something like like ANUGA:
http://sourceforge.net/projects/anuga/

This seems like an overkill.

What I want is to do be able to put particles on a 2d field and
generate smooth (not 8-directional) flow paths. I also have the
cavaet of not having perfect input data. I have a surface that has
small sinks that need to be removed but has large sinks that are valid
data.

r.flow gets very close to what I want. Actually I think r.flow would
do exactly what I want if my input sinks were filled and pointed
toward the new outlet (something that doesn't happen when they're
filled manually).

With the manual sink filling or r.watershed or r.drain, I'm still not
much closer than the original r.flow output.

Bryan

On Tue, 2011-04-26 at 11:54 -0600, Bryan Keith wrote:

Great ideas, thank you. I did something like this:

r.fill.dir input=wl200310_krig_g elevation=wl200310_fill_g
direction=wl200310_dir_g
r.mapcalc wl200310diff_g=wl200310_fill_g - wl200310_krig_g

r.mapcalc wl200310diffsel_g = if("wl200310diff_g > 5.0", 0, wl200310diff_g)
r.mapcalc wl200310sel_g = wl200310diffsel_g + wl200310_krig_g
r.fill.dir input=wl200310sel_g elevation=wl200310sel_fill_g
direction=wl200310sel_dir_g

r.flow elevin=wl200310sel_fill_g flout=test_ln

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.

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@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@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@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@lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>
>>>
>>>
>>
>
>
>

On Tue, Apr 26, 2011 at 10:26 PM, Bryan Keith <bkeith@itascadenver.com> wrote:

On Tue, Apr 26, 2011 at 12:53, Markus Metz
<markus.metz.giswork@googlemail.com> wrote:

On Tue, Apr 26, 2011 at 7:54 PM, Bryan Keith <bkeith@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.

You can use the flow option of r.watershed: create a raster map where
all the starting points get a value of 100, all others get a value of
0, this map is then used as flow option. As threshold for stream
initiation you would then use 100. The resulting flow accumulation
(with MFD) shows you the percentage trickling down to a given cell
from a start cell, the streams would start at the cells with value
100. Of course the value 100 is arbitrary, it can also be 1 or any
other positive number, the important part is that overland flow for
non-start cells must be zero.

Markus M

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@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@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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user