Opened 11 years ago

Last modified 5 years ago

#2237 new enhancement

r.stream.basins to trunk?

Reported by: hellik Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Addons Version: unspecified
Keywords: r.stream.basins Cc:
CPU: All Platform: All

Description

summary of devML-discussion in order to avoid getting it lost for further decisions:

http://lists.osgeo.org/pipermail/grass-dev/2014-March/067987.html

hi,

at the Vienna Code Sprint we're discussing moving the r.stream.* -modules to
trunk.

transition most of the r.stream.* is clear, but there may be some
overlapping between r.water.outlet, r.watershed and r.stream.basins.

short comparison

- r.water.outlet [2] generates a watershed basin from a drainage direction
map and a set of coordinates representing the outlet point of watershed. 

- r.stream.basins [1] is prepared to delineate basins and subbasins with
different input data.
It can delineate basins with three methods:

    Using coordinates: this option simply copies functionality of
r.water.outlet.
    Using vector points: it allow to manually point outlets with any method
    Using streams (most advanced): it allow on lots of modifications. See
examples for more details.

This module is prepared to delineate unrestricted number of basins in one
step. 

- r.watershed [3]:

basin
    Output map: Unique label for each watershed basin. Each basin will be
given a unique positive even integer. Areas along edges may not be large
enough to create an exterior watershed basin.
	0 values indicate that the cell is not part of a complete watershed basin
in the current geographic region. 


as cloning/doubling functionality should be avoided, how to proceed now to
with these partly overlapping modules?

to the aim of avoiding duplicates in the core, we would like to have your
feedback about the following options:

1) to keep r.stream.basins as an add-on, demanding the delineation of
multiple subbasins from coordinates to a user´s script looping
r.water.outlet;
2) to include r.stream.basins and keep also r.water.outlet;
3) to include r.stream.basins in the core and remove r.water.outlet as
obsolete.
4) ?

regards from Vienna

Madi, Helmut

[1] http://grass.osgeo.org/grass70/manuals/addons/r.stream.basins.html
[2] http://grass.osgeo.org/grass70/manuals/r.water.outlet.html
[3] http://grass.osgeo.org/grass70/manuals/r.watershed.html

http://lists.osgeo.org/pipermail/grass-dev/2014-March/067988.html

Hi Folks,

I very much appreciate the efforts in the code sprint this week!

On Thu, Mar 27, 2014 at 8:54 AM, Helmut Kudrnovsky <hellik at web.de> wrote:

>
>
>
> 1) to keep r.stream.basins as an add-on, demanding the delineation of
> multiple subbasins from coordinates to a user´s script looping
> r.water.outlet;
> 2) to include r.stream.basins and keep also r.water.outlet;
> 3) to include r.stream.basins in the core and remove r.water.outlet as
> obsolete.
> 4) ?
>
> regards from Vienna
>
> Madi, Helmut
>
> [1] http://grass.osgeo.org/grass70/manuals/addons/r.stream.basins.html
> [2] http://grass.osgeo.org/grass70/manuals/r.water.outlet.html
> [3] http://grass.osgeo.org/grass70/manuals/r.watershed.html


If r.stream.basins can replicate the functionality of r.water.outlet, I
would prefer 3  . Some argument might be made for a conservative approach
for option 2 for version 7.0 and drop r.water.outlet in version 7.1, but
7.0 is in development status. Why not make the change now?


Doug

http://lists.osgeo.org/pipermail/grass-dev/2014-March/067989.html

> If r.stream.basins can replicate the functionality of r.water.outlet, I
> would prefer 3  . Some argument might be made for a conservative
> approach for option 2 for version 7.0 and drop r.water.outlet in version
> 7.1, but 7.0 is in development status. Why not make the change now?

As long as results are identical, +1. If not, this should be explored 
further.

Moritz

http://lists.osgeo.org/pipermail/grass-dev/2014-March/067992.html

> As long as results are identical, +1. If not, this should be explored
> further.
>
>
I reproduced the example given in the manual page (NC dataset) of
r.water.outlet using r.stream.basin:

g.region rast=elev_lid792_1m -p

r.watershed elev_lid792_1m thresh=5000 accum=accum_5K
drain=draindir_5K basin=basin_5K
r.water.outlet input=draindir_5K output=basin_A30
coord=638740.423248,220271.519225

r.stream.basins dirs=draindir_5K at testing
coors=638740.423248,220271.519225 basins=basin_rstreambasins

r.mapcalc expression="diff=basin_rstreambasins-basin_A30"

r.info diff
 +----------------------------------------------------------------------------+
 | Layer:    diff                           Date: Thu Mar 27 14:34:25 2014    |
 | Mapset:   testing                        Login of Creator: madi            |
 | Location: nc_spm_08                                                        |
 | DataBase: /home/madi/grassdata                                             |
 | Title:     ( diff )                                                        |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         750                                                        |
 |   Columns:      700                                                        |
 |   Total Cells:  525000                                                     |
 |        Projection: Lambert Conformal Conic                                 |
 |            N:     220750    S:     220000   Res:     1                     |
 |            E:     639000    W:     638300   Res:     1                     |
 |   Range of data:    min = 0  max = 0                                       |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.mapcalc                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    basin_rstreambasins - basin_A30                                         |
 |                                                                            |
 +----------------------------------------------------------------------------+

Best regards,
madi

for the record, all other r.stream.*-modules are already moved to grass7 trunk (http://lists.osgeo.org/pipermail/grass-dev/2014-March/068012.html)

Change History (10)

comment:1 by neteler, 10 years ago

Component: RasterAddons
Keywords: r.stream.basins added

TODO for all r.stream.* modules (reported by mmetz in grass-dev):

Most importantly it is the NULL handling that needs to be fixed, and synced between the ram and disk modes. More generally, the ram and disk modes need to be synced and validated. For ease of maintenance, the ram mode could be removed.

in reply to:  1 comment:2 by neteler, 10 years ago

Replying to neteler:

TODO for all r.stream.* modules (reported by mmetz in grass-dev):

Most importantly it is the NULL handling that needs to be fixed, and synced between the ram and disk modes. More generally, the ram and disk modes need to be synced and validated. For ease of maintenance, the ram mode could be removed.

This part in managed in #2296

comment:3 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:4 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:5 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:6 by neteler, 7 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:7 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:8 by martinl, 6 years ago

Milestone: 7.4.27.8.0

comment:9 by martinl, 6 years ago

Milestone: 7.8.0

Remove Milestone from Addons bugreports.

comment:10 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.