瀏覽代碼

d.shade option rename and related changes (backport of https://trac.osgeo.org/grass/changeset/63740 and https://trac.osgeo.org/grass/changeset/63741)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63755 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 年之前
父節點
當前提交
b17b61b96c

+ 4 - 3
gui/wxpython/core/utils.py

@@ -123,11 +123,12 @@ def GetLayerNameFromCmd(dcmd, fullyQualified = False, param = None,
             if p == param:
                 params = [(idx, p, v)]
                 break
-            
+
+            # this does not use types, just some (incomplete subset of?) names
             if p in ('map', 'input', 'layer',
                      'red', 'blue', 'green',
-                     'h_map', 's_map', 'i_map',
-                     'reliefmap', 'labels'):
+                     'hue', 'saturation', 'intensity',
+                     'shade', 'labels'):
                 params.append((idx, p, v))
 
         if len(params) < 1:

+ 11 - 0
lib/gis/renamed_options

@@ -17,6 +17,10 @@ d.correlate|layers:map
 d.erase|background:bgcolor
 # d.legend
 d.legend|map:rast
+# d.his
+d.his|h_map:hue
+d.his|i_map:intensity
+d.his|s_map:saturation
 # d.rast
 d.rast|catlist:values
 d.rast|vallist:values
@@ -197,6 +201,13 @@ r.flow|barin:barrier
 r.flow|flout:flowline
 r.flow|lgout:flowpath
 r.flow|dsout:density
+# r.his
+r.his|h_map:hue
+r.his|i_map:intensity
+r.his|s_map:saturation
+r.his|r_map:red
+r.his|g_map:green
+r.his|b_map:blue
 # r.horizon
 r.horizon|elevin:elevation
 r.horizon|horizonstep:step

+ 1 - 1
raster/r.relief/r.relief.html

@@ -65,7 +65,7 @@ r.relief input=elevation output=elevation_shade
 
 Color can be added later using <em><a href="r.shade.html">r.shade</a></em>:
 <div class="code"><pre>
-r.shade reliefmap=elevation_shade drapemap=elevation output=elevation_shaded
+r.shade shade=elevation_shade color=elevation output=elevation_shaded
 </pre></div>
 
 <p>In Latitude-Longitude locations (or other non-metric locations), the

+ 1 - 1
raster/r.surf.fractal/r.surf.fractal.html

@@ -27,7 +27,7 @@ r.colors map=fractals color=byr
 r.relief input=fractals output=fractals_shade
 
 d.mon wx0
-d.shade relief=fractals_shade drape=fractals b=50
+d.shade shade=fractals_shade color=fractals b=50
 </pre></div>
 
 <center>

+ 1 - 1
raster/r.texture/r.texture.html

@@ -112,7 +112,7 @@ r.mapcalc "ortho_2001_t792_1m.greylevel = ortho_2001_t792_1m"
 r.texture ortho_2001_t792_1m.greylevel prefix=ortho_texture method=asm -s 
 # display
 g.region n=221461 s=221094 w=638279 e=638694
-d.shade drape=ortho_texture_ASM_0 rel=ortho_2001_t792_1m
+d.shade color=ortho_texture_ASM_0 shade=ortho_2001_t792_1m
 </pre></div>
 
 This calculates four maps (requested texture at four orientations):

+ 1 - 1
raster/r.watershed/front/r.watershed.html

@@ -450,7 +450,7 @@ cut-off value. This only works with SFD, not with MFD.
 Display output in a nice way
 <div class="code"><pre>
   r.relief map=elevation.dem
-  d.shade rel=elevation.dem.shade drape=rwater.basin bright=40
+  d.shade shade=elevation.dem.shade color=rwater.basin bright=40
   d.vect rwater_course color=orange
 </pre></div>
 

+ 2 - 2
scripts/d.shade/d.shade.html

@@ -32,7 +32,7 @@ dataset location is used to hillshade the <tt>elevation</tt> map:
 <div class="code"><pre>
 g.region raster=aspect -p
 d.mon wx0
-d.shade reliefmap=aspect drapemap=elevation
+d.shade shade=aspect color=elevation
 </pre></div>
 
 <!--
@@ -62,7 +62,7 @@ g.region raster=elevation
 r.relief input=elevation output=elevation_shaded_relief
 
 d.mon wx1
-d.shade reliefmap=elevation_shaded_relief drapemap=elevation
+d.shade shade=elevation_shaded_relief color=elevation
 </pre></div>
 
 Interesting visualizations can be created using different color tables for

+ 4 - 4
scripts/d.shade/d.shade.py

@@ -23,11 +23,11 @@
 #% keywords: visualization
 #%end
 #%option G_OPT_R_INPUT
-#% key: reliefmap
+#% key: shade
 #% description: Name of shaded relief or aspect raster map
 #%end
 #%option G_OPT_R_INPUT
-#% key: drapemap
+#% key: color
 #% label: Name of raster to drape over relief raster map
 #% description: Typically, this raster is elevation or other colorful raster
 #%end
@@ -47,8 +47,8 @@ from grass.exceptions import CalledModuleError
 def main():
     options, unused = gcore.parser()
 
-    drape_map = options['drapemap']
-    relief_map = options['reliefmap']
+    drape_map = options['color']
+    relief_map = options['shade']
     brighten = options['brighten']
 
     try:

+ 4 - 4
scripts/r.shade/r.shade.html

@@ -19,8 +19,8 @@ The input for this module can be created for example using
 <p>
 NULL values are propagated by default, so if any of the two input rasters
 contains NULL cell NULL will be also in the output. If <b>-c</b> flag is
-used and cell in <b>drapemap</b> raster is NULL, just <b>reliefmap</b>
-color is used. If cell in <b>reliefmap</b> raster is NULL, shading effect
+used and cell in <b>color</b> raster is NULL, just <b>shade</b>
+color is used. If cell in <b>shade</b> raster is NULL, shading effect
 is not applied and original colors are used. If <b>bgcolor</b> option is
 used, NULL value in any input raster will be in the output replaced
 by the given color.
@@ -46,7 +46,7 @@ dataset location is used to hillshade the <tt>elevation</tt> map:
 
 <div class="code"><pre>
 g.region raster=aspect -p
-r.shade reliefmap=aspect drapemap=elevation output=elevation_aspect_shaded
+r.shade shade=aspect color=elevation output=elevation_aspect_shaded
 
 d.mon wx0
 d.rast elevation_aspect_shaded
@@ -60,7 +60,7 @@ raster map for later use:
 g.region raster=elevation
 r.relief input=elevation output=elevation_shaded_relief
 
-r.shade reliefmap=elevation_shaded_relief drapemap=elevation \
+r.shade shade=elevation_shaded_relief color=elevation \
     output=elevation_relief_shaded
 
 d.mon wx1

+ 4 - 4
scripts/r.shade/r.shade.py

@@ -24,11 +24,11 @@
 #% keywords: visualization
 #%end
 #%option G_OPT_R_INPUT
-#% key: reliefmap
+#% key: shade
 #% description: Name of shaded relief or aspect raster map
 #%end
 #%option G_OPT_R_INPUT
-#% key: drapemap
+#% key: color
 #% label: Name of raster to drape over relief raster map
 #% description: Typically, this raster is elevation or other colorful raster
 #%end
@@ -77,8 +77,8 @@ def remove(maps):
 def main():
     options, flags = gcore.parser()
 
-    drape_map = options['drapemap']
-    relief_map = options['reliefmap']
+    drape_map = options['color']
+    relief_map = options['shade']
     brighten = int(options['brighten'])
     output_map = options['output']
     bgcolor = options['bgcolor']