[GRASS-SVN] r41766 - in grass/trunk/raster/r.watershed: front ram
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 8 16:43:31 EDT 2010
Author: martinl
Date: 2010-04-08 16:43:31 -0400 (Thu, 08 Apr 2010)
New Revision: 41766
Modified:
grass/trunk/raster/r.watershed/front/main.c
grass/trunk/raster/r.watershed/ram/Gwater.h
grass/trunk/raster/r.watershed/ram/init_vars.c
grass/trunk/raster/r.watershed/ram/usage.c
Log:
fix ram after renaming options
Modified: grass/trunk/raster/r.watershed/front/main.c
===================================================================
--- grass/trunk/raster/r.watershed/front/main.c 2010-04-08 20:23:12 UTC (rev 41765)
+++ grass/trunk/raster/r.watershed/front/main.c 2010-04-08 20:43:31 UTC (rev 41766)
@@ -72,9 +72,10 @@
module->description = _("Computes watershed basins.");
opt1 = G_define_standard_option(G_OPT_R_ELEV);
+ opt1->key = "elevation_input";
opt2 = G_define_standard_option(G_OPT_R_INPUT);
- opt2->key = "depression_input";
+ opt2->key = "delevation_input";
opt2->label = _("Name of input depressions raster map");
opt2->description = _("All non-NULL and non-zero cells are considered as real depressions");
opt2->required = NO;
Modified: grass/trunk/raster/r.watershed/ram/Gwater.h
===================================================================
--- grass/trunk/raster/r.watershed/ram/Gwater.h 2010-04-08 20:23:12 UTC (rev 41765)
+++ grass/trunk/raster/r.watershed/ram/Gwater.h 2010-04-08 20:43:31 UTC (rev 41766)
@@ -135,7 +135,7 @@
CELL split_stream(int, int, int[], int[], int, CELL, double, CELL);
/* usage.c */
-void usage(char *);
+void usage();
#endif /* __G_WATER_H__ */
Modified: grass/trunk/raster/r.watershed/ram/init_vars.c
===================================================================
--- grass/trunk/raster/r.watershed/ram/init_vars.c 2010-04-08 20:23:12 UTC (rev 41765)
+++ grass/trunk/raster/r.watershed/ram/init_vars.c 2010-04-08 20:43:31 UTC (rev 41766)
@@ -36,36 +36,36 @@
ele_scale = 1;
for (r = 1; r < argc; r++) {
- if (sscanf(argv[r], "elevation=%s", ele_name) == 1)
+ if (sscanf(argv[r], "elevation_input=%s", ele_name) == 1)
ele_flag++;
- else if (sscanf(argv[r], "accumulation=%s", wat_name) == 1)
+ else if (sscanf(argv[r], "accumulation_output=%s", wat_name) == 1)
wat_flag++;
- else if (sscanf(argv[r], "drainage=%s", asp_name) == 1)
+ else if (sscanf(argv[r], "drainage_output=%s", asp_name) == 1)
asp_flag++;
- else if (sscanf(argv[r], "depression=%s", pit_name) == 1)
+ else if (sscanf(argv[r], "delevation_input=%s", pit_name) == 1)
pit_flag++;
else if (sscanf(argv[r], "threshold=%d", &bas_thres) == 1) ;
- else if (sscanf(argv[r], "max_slope_length=%lf", &max_length) == 1) ;
- else if (sscanf(argv[r], "basin=%s", bas_name) == 1)
+ else if (sscanf(argv[r], "slope_length_output=%lf", &max_length) == 1) ;
+ else if (sscanf(argv[r], "basin_output=%s", bas_name) == 1)
bas_flag++;
- else if (sscanf(argv[r], "stream=%s", seg_name) == 1)
+ else if (sscanf(argv[r], "stream_output=%s", seg_name) == 1)
seg_flag++;
- else if (sscanf(argv[r], "half_basin=%s", haf_name) == 1)
+ else if (sscanf(argv[r], "half_basin_output=%s", haf_name) == 1)
haf_flag++;
- else if (sscanf(argv[r], "flow=%s", run_name) == 1)
+ else if (sscanf(argv[r], "flow_input=%s", run_name) == 1)
run_flag++;
else if (sscanf(argv[r], "ar=%s", arm_name) == 1)
arm_flag++;
/* slope length
else if (sscanf(argv[r], "sl=%[^\n]", sl_name) == 1)
sl_flag++; */
- else if (sscanf(argv[r], "length_slope=%s", ls_name) == 1)
+ else if (sscanf(argv[r], "slope_length_output=%s", ls_name) == 1)
ls_flag++;
- else if (sscanf(argv[r], "slope_steepness=%s", sg_name) == 1)
+ else if (sscanf(argv[r], "slope_steep_output=%s", sg_name) == 1)
sg_flag++;
- else if (sscanf(argv[r], "blocking=%s", ob_name) == 1)
+ else if (sscanf(argv[r], "block_input=%s", ob_name) == 1)
ob_flag++;
- else if (sscanf(argv[r], "disturbed_land=%s", ril_name) == 1) {
+ else if (sscanf(argv[r], "land_input=%s", ril_name) == 1) {
if (sscanf(ril_name, "%lf", &ril_value) == 0) {
ril_value = -1.0;
ril_flag++;
@@ -75,7 +75,7 @@
else if (sscanf (argv[r], "sd=%[^\n]", dep_name) == 1) dep_flag++; */
else if (sscanf(argv[r], "-%d", &sides) == 1) {
if (sides != 4)
- usage(argv[0]);
+ usage();
}
else if (sscanf(argv[r], "convergence=%d", &c_fac) == 1) ;
else if (strcmp(argv[r], "-s") == 0)
@@ -83,7 +83,7 @@
else if (strcmp(argv[r], "-a") == 0)
abs_acc = 1;
else
- usage(argv[0]);
+ usage();
}
if (mfd == 1 && (c_fac < 1 || c_fac > 10)) {
G_fatal_error("Convergence factor must be between 1 and 10.");
@@ -97,7 +97,7 @@
((bas_flag == 1) || (seg_flag == 1) || (haf_flag == 1) ||
(sl_flag == 1) || (sg_flag == 1) || (ls_flag == 1)))
)
- usage(argv[0]);
+ usage();
tot_parts = 4;
if (ls_flag || sg_flag)
tot_parts++;
Modified: grass/trunk/raster/r.watershed/ram/usage.c
===================================================================
--- grass/trunk/raster/r.watershed/ram/usage.c 2010-04-08 20:23:12 UTC (rev 41765)
+++ grass/trunk/raster/r.watershed/ram/usage.c 2010-04-08 20:43:31 UTC (rev 41766)
@@ -4,24 +4,24 @@
#include <grass/glocale.h>
-void usage(char *me)
+void usage(void)
{
- G_fatal_error(_("USAGE for basin delineation:\n%s -4 elevation=elevation_map "
- "threshold=swale_threshold [flow=overland_flow_map] "
- "[drainage=drain_direction_map] [depression=depression_map] "
- "[accumulation=accumulation_map] [basin=watershed_basin_map] "
- "[stream=stream_segment_map]\n\n"
- "USAGE for slope length determination:\n%s [-4] "
- "elevation=elevation_map threshold=swale_threshold "
- "[drainage=drain_direction_map] [depression=depression_map] "
- "[accumulation=accumulation_map] [max_slope_length=max_slope_length] "
- "[blocking=overland_blocking_map] [slope_steepness=slope_steepness_map] "
- "length_slope=length_slope_map [disturbed_land=rill_erosion_map] "
- "[slope_deposition=slope_deposition value or map]"
- "USAGE for ARMSED FILE creation:\n%s [-4] elevation=elevation_map "
- "threshold=swale_threshold [flow=overland_flow_map] "
- "[drainage=drain_direction_map] [depression=depression_map] "
- "[accumulation=accumulation_map] [basin=watershed_basin_map] "
- "[stream=stream_segment_map] [half_basin=half_basin_map] "
- "ar=ARMSED_file_name\n\n"), me, me, me);
+ G_fatal_error(_("USAGE for basin delineation:\n\n%s -4 elevation_input=elevation_map "
+ "threshold=swale_threshold [flow_input=overland_flow_map] "
+ "[drainage_output=drain_direction_map] [delevation_input=depression_map] "
+ "[accumulation_output=accumulation_map] [basin_output=watershed_basin_map] "
+ "[stream_output=stream_segment_map]\n\n"
+ "USAGE for slope length determination:\n\n%s [-4] "
+ "elevation_input=elevation_map threshold=swale_threshold "
+ "[drainage_output=drain_direction_map] [delevation_input=depression_map] "
+ "[accumulation_output=accumulation_map] [slope_length_output=max_slope_length] "
+ "[block_input=overland_blocking_map] [slope_steep_output=slope_steepness_map] "
+ "length_slope=length_slope_map [land_input=rill_erosion_map] "
+ "[slope_deposition=slope_deposition value or map]\n\n"
+ "USAGE for ARMSED FILE creation:\n\n%s [-4] elevation_input=elevation_map "
+ "threshold=swale_threshold [flow_input=overland_flow_map] "
+ "[drainage_output=drain_direction_map] [delevation_input=depression_map] "
+ "[accumulation_output=accumulation_map] [basin_output=watershed_basin_map] "
+ "[stream_output=stream_segment_map] [half_basin_output=half_basin_map] "
+ "ar=ARMSED_file_name\n\n"), G_program_name(), G_program_name(), G_program_name());
}
More information about the grass-commit
mailing list