Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2084 closed enhancement (fixed)

Combine r.water.outlet easting=, northing= into coordinates= (G_OPT_M_COORDS) for mouse interactivity in g.gui.

Reported by: hcho Owned by: hcho
Priority: major Milestone: 7.0.0
Component: Raster Version: svn-trunk
Keywords: Cc: grass-dev@…
CPU: All Platform: All

Description

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.

Change History (7)

comment:1 Changed 6 years ago by hcho

Component: DefaultRaster
CPU: UnspecifiedAll
Platform: UnspecifiedAll
Version: unspecifiedsvn-trunk

comment:2 Changed 6 years ago by martinl

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:3 Changed 6 years ago 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

comment:4 in reply to:  3 Changed 6 years ago by martinl

Replying to martinl:

Done in r57762. There are three open issues

(1) example noted in the manual gives strange result

same result with r57761.

comment:5 Changed 6 years ago by hcho

Owner: changed from martinl to hcho
Status: assignednew

comment:6 Changed 6 years ago by hcho

Resolution: fixed
Status: newclosed

comment:7 Changed 6 years ago by hcho

Try r57841.

Note: See TracTickets for help on using tickets.