浏览代码

color descriptions; moderninze interactive variable name

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33517 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 16 年之前
父节点
当前提交
646fdf6fd3
共有 3 个文件被更改,包括 14 次插入15 次删除
  1. 4 4
      lib/gis/colors.desc
  2. 6 7
      raster/r.colors/main.c
  3. 4 4
      raster/r.colors/r.colors.html

+ 4 - 4
lib/gis/colors.desc

@@ -5,10 +5,10 @@ bgyr: blue through green through yellow to red
 byg: blue through yellow to green
 byg: blue through yellow to green
 byr: blue through yellow to red
 byr: blue through yellow to red
 celsius: blue to red for degree Celsius temperature
 celsius: blue to red for degree Celsius temperature
-curvature: for terrain curvatures (from v.surf.rst and r.slope.aspect curvature colors)
+curvature: for terrain curvatures (from v.surf.rst and r.slope.aspect)
 differences: differences oriented colors
 differences: differences oriented colors
-elevation: maps percentage ranges of raster values to elevation color ramp
-etopo2: rainbow color ramp for the ETOPO2 2-minute Worldwide Bathymetry/Topography dataset
+elevation: maps relative ranges of raster values to elevation color ramp
+etopo2: colors for ETOPO2 worldwide bathymetry/topography
 evi: enhanced vegetative index colors
 evi: enhanced vegetative index colors
 grey: grey scale
 grey: grey scale
 grey1.0: grey scale for raster values between 0.0-1.0
 grey1.0: grey scale for raster values between 0.0-1.0
@@ -25,6 +25,6 @@ ryb: red through yellow to blue
 ryg: red through yellow to green
 ryg: red through yellow to green
 sepia: yellowish-brown through to white
 sepia: yellowish-brown through to white
 slope: r.slope.aspect-type slope colors for raster values 0-90
 slope: r.slope.aspect-type slope colors for raster values 0-90
-srtm: color palette for Shuttle Radar Topography Mission elevation values
+srtm: color palette for Shuttle Radar Topography Mission elevation
 terrain: global elevation color table covering -11000 to +8850m
 terrain: global elevation color table covering -11000 to +8850m
 wave: color wave
 wave: color wave

+ 6 - 7
raster/r.colors/main.c

@@ -135,7 +135,7 @@ static int find_rule(const char *name)
 int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
 {
     int overwrite;
     int overwrite;
-    int interactive;
+    int is_from_stdin;
     int remove;
     int remove;
     int have_colors;
     int have_colors;
     struct Colors colors, colors_tmp;
     struct Colors colors, colors_tmp;
@@ -235,7 +235,6 @@ int main(int argc, char **argv)
     remove = flag.r->answer;
     remove = flag.r->answer;
 
 
     name = opt.map->answer;
     name = opt.map->answer;
-
     style = opt.colr->answer;
     style = opt.colr->answer;
     cmap = opt.rast->answer;
     cmap = opt.rast->answer;
     rules = opt.rules->answer;
     rules = opt.rules->answer;
@@ -244,13 +243,13 @@ int main(int argc, char **argv)
 	G_fatal_error(_("No map specified"));
 	G_fatal_error(_("No map specified"));
 
 
     if (!cmap && !style && !rules && !remove)
     if (!cmap && !style && !rules && !remove)
-	G_fatal_error(_("One of \"-r\" or options \"color\", \"rast\" or \"rules\" must be specified!"));
+	G_fatal_error(_("One of \"-r\" or options \"color\", \"raster\" or \"rules\" must be specified!"));
 
 
     if (!!style + !!cmap + !!rules > 1)
     if (!!style + !!cmap + !!rules > 1)
 	G_fatal_error(_("\"color\", \"rules\", and \"raster\" options are mutually exclusive"));
 	G_fatal_error(_("\"color\", \"rules\", and \"raster\" options are mutually exclusive"));
 
 
-    interactive = rules && strcmp(rules, "-") == 0;
-    if (interactive)
+    is_from_stdin = rules && strcmp(rules, "-") == 0;
+    if (is_from_stdin)
 	rules = NULL;
 	rules = NULL;
 
 
     mapset = G_find_cell2(name, "");
     mapset = G_find_cell2(name, "");
@@ -281,7 +280,7 @@ int main(int argc, char **argv)
     G_read_fp_range(name, mapset, &range);
     G_read_fp_range(name, mapset, &range);
     G_get_fp_range_min_max(&range, &min, &max);
     G_get_fp_range_min_max(&range, &min, &max);
 
 
-    if (interactive) {
+    if (is_from_stdin) {
 	if (!read_color_rules(stdin, &colors, min, max, fp))
 	if (!read_color_rules(stdin, &colors, min, max, fp))
 	    exit(EXIT_FAILURE);
 	    exit(EXIT_FAILURE);
     }
     }
@@ -359,7 +358,7 @@ int main(int argc, char **argv)
 
 
     if (G_write_colors(name, mapset, &colors) >= 0)
     if (G_write_colors(name, mapset, &colors) >= 0)
 	G_message(_("Color table for <%s> set to %s"), name,
 	G_message(_("Color table for <%s> set to %s"), name,
-		  interactive ? "rules" : style ? style : rules ? rules :
+		  is_from_stdin ? "rules" : style ? style : rules ? rules :
 		  cmap);
 		  cmap);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 4 - 4
raster/r.colors/r.colors.html

@@ -16,10 +16,10 @@ following:
      byg         blue through yellow to green
      byg         blue through yellow to green
      byr         blue through yellow to red
      byr         blue through yellow to red
      celsius     blue to red for degree Celsius temperature
      celsius     blue to red for degree Celsius temperature
-     curvature   for terrain curvatures (from v.surf.rst and r.slope.aspect curvature colors)
+     curvature   for terrain curvatures (from v.surf.rst and r.slope.aspect)
      differences differences oriented colors
      differences differences oriented colors
-     elevation   maps percentage ranges of raster values to elevation color ramp
-     etopo2      rainbow color ramp for the ETOPO2 2-minute Worldwide Bathymetry/Topography dataset
+     elevation   maps relative ranges of raster values to elevation color ramp
+     etopo2      colors for ETOPO2 worldwide bathymetry/topography
      evi         enhanced vegetative index colors
      evi         enhanced vegetative index colors
      grey        grey scale
      grey        grey scale
      grey1.0     grey scale for raster values between 0.0-1.0
      grey1.0     grey scale for raster values between 0.0-1.0
@@ -33,7 +33,7 @@ following:
      ryg         red through yellow to green
      ryg         red through yellow to green
      sepia       yellowish-brown through to white
      sepia       yellowish-brown through to white
      slope       r.slope.aspect-type slope colors for raster values 0-90
      slope       r.slope.aspect-type slope colors for raster values 0-90
-     srtm        color palette for Shuttle Radar Topography Mission elevation values
+     srtm        color palette for Shuttle Radar Topography Mission elevation
      terrain     global elevation color table covering -11000 to +8850m
      terrain     global elevation color table covering -11000 to +8850m
      wave        color wave
      wave        color wave
      random      random color table
      random      random color table