Opened 11 years ago

Closed 11 years ago

Last modified 11 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 by hcho, 11 years ago

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

comment:2 by martinl, 11 years ago

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

comment:3 by martinl, 11 years ago

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

in reply to:  3 comment:4 by martinl, 11 years ago

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 by hcho, 11 years ago

Owner: changed from martinl to hcho
Status: assignednew

comment:6 by hcho, 11 years ago

Resolution: fixed
Status: newclosed

comment:7 by hcho, 11 years ago

Try r57841.

Note: See TracTickets for help on using tickets.