[GRASS-dev] Re: [GRASS GIS] #1263: GUI d.legend tool gives error

GRASS GIS trac at osgeo.org
Tue Jan 18 16:09:59 EST 2011


#1263: GUI d.legend tool gives error
----------------------+-----------------------------------------------------
 Reporter:  epatton   |       Owner:  grass-dev@…              
     Type:  defect    |      Status:  new                      
 Priority:  normal    |   Milestone:  6.5.0                    
Component:  wxGUI     |     Version:  svn-develbranch6         
 Keywords:  d.legend  |    Platform:  Linux                    
      Cpu:  x86-64    |  
----------------------+-----------------------------------------------------

Comment(by hamish):

 {{{
 GRASS65:nc_spm_08> d.legend elevation use=50,70,90,110,125,150
 ERROR: use=50 out of range [55.579, 156.330] (extend with range= ?)
 }}}

 but using range= will not work if the underlying color table has no rules
 for out of range values. (the hint doesn't help much here)

 {{{
 GRASS65:nc_spm_08> r.colors elevation color=rules
 Enter rules, "end" when done, "help" if you need it.
 fp: Data range is 55.5787925720215 to 156.329864501953
 > 0 blue
 > 33.333 cyan
 > 66.667 yellow
 > 200 red
 > end
 Color table for raster map <elevation> set to 'rules'

 GRASS65:nc_spm_08> d.legend elevation use=50,70,90,110,125,150
 range=50,150
 WARNING: Color range exceeds lower limit of actual data
 }}}
 (despite that warning it then draws ok)


 so the problem here is that the wxGUI is not catching+passing the
 warning/error messages to the user?

 alternatively the error could be relaxed so out of (color table, not map)
 range requests display the null value (nv) color rule, but I'm not a fan
 of that. while it's not quite undefined, it is generally not what you
 want.


 Hamish

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



More information about the grass-dev mailing list