Opened 8 years ago
Closed 8 years ago
#3311 closed defect (invalid)
Mismatch between CLI and GUI for r.colors using external rules file
Reported by: | madi | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.1 |
Component: | Raster | Version: | svn-trunk |
Keywords: | r.colors | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
There is a mismatch between the command line and the GUI of r.colors when providing an external file for color rules. Via command line the correct (working) command is:
r.colors map=map_name rules=rules.file
but via GUI, browsing the rules.file, it will build the following command:
r.colors map=map_name file=rules.file
throwing an error like:
Usage: r.colors [-rwlngae] [map=name[,name,...]] [file=name] [color=style] [raster=name] [raster_3d=name] [rules=name] [--help] [--verbose] [--quiet] [--ui] Flags: -r Remove existing color table -w Only write new color table if it does not already exist -l List available rules then exit -n Invert colors -g Logarithmic scaling -a Logarithmic-absolute scaling -e Histogram equalization Parameters: map Name of raster map(s) file Input file with one map name per line color Name of color table options: aspect,aspectcolr,bcyr,bgyr,blues,byg,byr,celsius, corine,curvature,differences,elevation,etopo2,evi, fahrenheit,gdd,grass,greens,grey,grey.eq,grey.log, grey1.0,grey255,gyr,haxby,kelvin,ndvi,ndwi,oranges, population,population_dens,precipitation, precipitation_daily,precipitation_monthly,rainbow, ramp,random,reds,roygbiv,rstcurv,ryb,ryg,sepia,slope, soilmoisture,srtm,srtm_plus,terrain,viridis,water,wave raster Raster map from which to copy color table raster_3d 3D raster map from which to copy color table rules Path to rules file ERROR: Options <map>, <file> and <-l> are mutually exclusive ERROR: At least one of the following options is required: <raster>, <raster_3d>, <color>, <rules>, <-r> and <-l>
Change History (3)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Replying to madi:
There is a mismatch between the command line and the GUI of r.colors when providing an external file for color rules. Via command line the correct (working) command is:
r.colors map=map_name rules=rules.filebut via GUI, browsing the rules.file, it will build the following command:
r.colors map=map_name file=rules.file
taken from the manual:
file=name Input file with one map name per line Input map names can be defined in an input file in case a large amount of maps must be specified. This option is mutual exclusive to the map option.
file is on the first r.colors-GUI-tab, rules is on the second r.colors-GUI-tab.
I would say it works normal. ;-)
comment:3 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You're right. Sorry for the noise
Replying to madi:
here with the GUI the command expands to:
it works
tested with