[GRASS-dev] [GRASS GIS] #2084: Combine r.water.outlet easting=, northing= into coordinates= (G_OPT_M_COORDS) for mouse interactivity in g.gui.

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
-------------------------+--------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
I suggest to change the easting and northing parameters in r.water.outlet
to the standard G_OPT_M_COORDS parameter (coordinates=). This change will
allow the user to click in the monitor to delineate water basins.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
-------------------------+--------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Changes (by hcho):

  * platform: Unspecified => All
  * version: unspecified => svn-trunk
  * component: Default => Raster
  * cpu: Unspecified => All

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
-------------------------+--------------------------------------------------
Reporter: hcho | Owner: martinl
     Type: enhancement | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * owner: grass-dev@… => martinl
  * status: new => assigned

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
-------------------------+--------------------------------------------------
Reporter: hcho | Owner: martinl
     Type: enhancement | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------

Comment(by martinl):

Done in r57762. There are three open issues

(1) example noted in the manual gives strange result

{{{
r.report basin_A30 u=c -n -h --q
+-----------------------------------------------------------------------------+
| Category Information |
cell|
|#|description
|count|
|-----------------------------------------------------------------------------|
|1| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
6|
|-----------------------------------------------------------------------------|
|TOTAL |
6|
+-----------------------------------------------------------------------------+
}}}

(2) not sure about right fix of remaining compilator warning

{{{
In file included from basin.h:3:0,
                  from main.c:31:
main.c: In function ‘main’:
ramseg.h:7:32: warning: suggest parentheses around ‘+’ inside ‘<<’
[-Wparentheses]
     ((((r) >> RAMSEGBITS) * (s) + (((c) >> RAMSEGBITS)) << DOUBLEBITS) \
                                 ^
main.c:120:17: note: in expansion of macro ‘SEG_INDEX’
       drain_ptrs[SEG_INDEX(pt_seg, row, col)] = cell_buf[col];
                  ^
ramseg.h:7:32: warning: suggest parentheses around ‘+’ inside ‘<<’
[-Wparentheses]
     ((((r) >> RAMSEGBITS) * (s) + (((c) >> RAMSEGBITS)) << DOUBLEBITS) \
                                 ^
main.c:135:26: note: in expansion of macro ‘SEG_INDEX’
       cell_buf[col] = bas[SEG_INDEX(ba_seg, row, col)];
}}}

(3) `MIN` macro could be probably used from libgis

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
-------------------------+--------------------------------------------------
Reporter: hcho | Owner: martinl
     Type: enhancement | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:3 martinl]:
> Done in r57762. There are three open issues
>
> (1) example noted in the manual gives strange result

same result with r57761.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
-------------------------+--------------------------------------------------
Reporter: hcho | Owner: hcho
     Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Changes (by hcho):

  * owner: martinl => hcho
  * status: assigned => new

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
--------------------------+-------------------------------------------------
  Reporter: hcho | Owner: hcho
      Type: enhancement | Status: closed
  Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hcho):

  * status: new => closed
  * resolution: => fixed

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#2084: Combine r.water.outlet easting=, northing= into coordinates=
(G_OPT_M_COORDS) for mouse interactivity in g.gui.
--------------------------+-------------------------------------------------
  Reporter: hcho | Owner: hcho
      Type: enhancement | Status: closed
  Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------

Comment(by hcho):

Try r57841.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2084#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>