Browse Source

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 years ago
parent
commit
646fdf6fd3
3 changed files with 14 additions and 15 deletions
  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
 byr: blue through yellow to red
 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
-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
 grey: grey scale
 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
 sepia: yellowish-brown through to white
 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
 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 overwrite;
-    int interactive;
+    int is_from_stdin;
     int remove;
     int have_colors;
     struct Colors colors, colors_tmp;
@@ -235,7 +235,6 @@ int main(int argc, char **argv)
     remove = flag.r->answer;
 
     name = opt.map->answer;
-
     style = opt.colr->answer;
     cmap = opt.rast->answer;
     rules = opt.rules->answer;
@@ -244,13 +243,13 @@ int main(int argc, char **argv)
 	G_fatal_error(_("No map specified"));
 
     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)
 	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;
 
     mapset = G_find_cell2(name, "");
@@ -281,7 +280,7 @@ int main(int argc, char **argv)
     G_read_fp_range(name, mapset, &range);
     G_get_fp_range_min_max(&range, &min, &max);
 
-    if (interactive) {
+    if (is_from_stdin) {
 	if (!read_color_rules(stdin, &colors, min, max, fp))
 	    exit(EXIT_FAILURE);
     }
@@ -359,7 +358,7 @@ int main(int argc, char **argv)
 
     if (G_write_colors(name, mapset, &colors) >= 0)
 	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);
 
     exit(EXIT_SUCCESS);

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

@@ -16,10 +16,10 @@ following:
      byg         blue through yellow to green
      byr         blue through yellow to red
      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
-     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
      grey        grey scale
      grey1.0     grey scale for raster values between 0.0-1.0
@@ -33,7 +33,7 @@ following:
      ryg         red through yellow to green
      sepia       yellowish-brown through to white
      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
      wave        color wave
      random      random color table