[GRASS-SVN] r57841 - grass/trunk/raster/r.water.outlet

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 25 22:40:12 PDT 2013


Author: hcho
Date: 2013-09-25 22:40:12 -0700 (Wed, 25 Sep 2013)
New Revision: 57841

Modified:
   grass/trunk/raster/r.water.outlet/main.c
   grass/trunk/raster/r.water.outlet/r.water.outlet.html
   grass/trunk/raster/r.water.outlet/r_water_outlet.png
   grass/trunk/raster/r.water.outlet/ramseg.h
Log:
Added recommended parentheses to make gcc happy.
Updated the example coordinates and screenshot in the manual using nc_spm_08_grass7.tar.gz.


Modified: grass/trunk/raster/r.water.outlet/main.c
===================================================================
--- grass/trunk/raster/r.water.outlet/main.c	2013-09-25 17:56:09 UTC (rev 57840)
+++ grass/trunk/raster/r.water.outlet/main.c	2013-09-26 05:40:12 UTC (rev 57841)
@@ -54,7 +54,7 @@
     double N, E;
     int row, col, basin_fd, drain_fd;
     CELL *cell_buf;
-    char drain_name[GNAME_MAX], E_f, ba_f, N_f, errr;
+    char drain_name[GNAME_MAX];
     struct GModule *module;
     struct {
       struct Option *input, *output, *coords;
@@ -98,7 +98,6 @@
     }
 
     G_get_set_window(&window);
-    ba_f = N_f = E_f = errr = 0;
 
     nrows = Rast_window_rows();
     ncols = Rast_window_cols();

Modified: grass/trunk/raster/r.water.outlet/r.water.outlet.html
===================================================================
--- grass/trunk/raster/r.water.outlet/r.water.outlet.html	2013-09-25 17:56:09 UTC (rev 57840)
+++ grass/trunk/raster/r.water.outlet/r.water.outlet.html	2013-09-26 05:40:12 UTC (rev 57841)
@@ -36,7 +36,7 @@
 # the watershed outlet position should be placed on a stream (from
 # accumulation map):
 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=638741.43125,220269.7
+r.water.outlet input=draindir_5K output=basin_A30 coord=638740.423248,220271.519225
 
 d.mon wx0
 d.rast map=accum_5K

Modified: grass/trunk/raster/r.water.outlet/r_water_outlet.png
===================================================================
(Binary files differ)

Modified: grass/trunk/raster/r.water.outlet/ramseg.h
===================================================================
--- grass/trunk/raster/r.water.outlet/ramseg.h	2013-09-25 17:56:09 UTC (rev 57840)
+++ grass/trunk/raster/r.water.outlet/ramseg.h	2013-09-26 05:40:12 UTC (rev 57841)
@@ -4,5 +4,5 @@
 #define SEGLENLESS 	15	/* 2 ^ ramsegbits - 1   */
 
 #define SEG_INDEX(s,r,c) (int) \
-   ((((r) >> RAMSEGBITS) * (s) + (((c) >> RAMSEGBITS)) << DOUBLEBITS) \
+   (((((r) >> RAMSEGBITS) * (s) + ((c) >> RAMSEGBITS)) << DOUBLEBITS) \
     + (((r) & SEGLENLESS) << RAMSEGBITS) + ((c) & SEGLENLESS))



More information about the grass-commit mailing list