[GRASS-dev] Re: [GRASS GIS] #256: r.colors enhancement

GRASS GIS trac at osgeo.org
Wed Aug 13 04:57:11 EDT 2008


#256: r.colors enhancement
--------------------------+-------------------------------------------------
  Reporter:  wegmann      |       Owner:  grass-dev at lists.osgeo.org
      Type:  enhancement  |      Status:  new                      
  Priority:  trivial      |   Milestone:  6.4.0                    
 Component:  Raster       |     Version:  6.3.0                    
Resolution:               |    Keywords:  r.colors colors range    
  Platform:  Linux        |         Cpu:  Unspecified              
--------------------------+-------------------------------------------------
Changes (by hamish):

  * component:  default => Raster

Comment:

 the "official" method for this would be something like:

 {{{
 for MAP in `g.mlist ...` ; do
   r.info -r $MAP
 done
 # find max/min range

 r.colors map=raster1 color=rules << EOF
 $MIN blue
 $MIN+($MAX-$MIN)*0.33333 green
 $MIN+($MAX-$MIN)*0.66667 yellow
 $MAX red
 EOF

 r.colors map=raster2 rast=raster1
 r.colors map=raster3 rast=raster1
 r.colors map=raster4 rast=raster1
 }}}

 or create a dummy map containing the full range and use color=bgyr.

 then show full range in legend with:

 {{{
 d.legend raster1 range=$MIN,$MAX
 }}}

 ok, so not at all optimal.


 * <tt>raster=raster1,raster2,raster3</tt> perverts the meaning of the
 raster= option.. :-(

 * I don't really get the purpose of -newflag. Isn't that redundant?


 Just on a pedantic note, I would point out that bcyr is superior to bgyr
 as it follows a more linear transition through the color cube. ;)


 Hamish

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/256#comment:1>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list