Opened 14 years ago
Closed 12 years ago
#1263 closed defect (fixed)
GUI d.legend tool gives error
Reported by: | epatton | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.5.0 |
Component: | wxGUI | Version: | svn-develbranch6 |
Keywords: | d.legend | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
Hi, This error occurs when using the 'Add Map Elements' tool on the Map Display window: when the categories given in the 'use' parameter exceed the range of raster values in the map, the attached error is output to the Layer Manager.
In the North Carloina demo location, add the elevation map to the display, then add a legend using the tool, and give a range of values in the 'use' parameter that exceeds the raster range. I used the following: use=50,70,90,110,125,150 (the lowest value in the map is 55)
The module should probably exit more gracefully when values outside the range are given.
~ Eric.
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | Legend_tool_error.txt added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Yes, the problem is that you get a nasty wxpython error in the output window instead of the error message you posted from the command line use of d.legend.
~ Eric.
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Seems to be working now, traceback no longer appears. Instead there is only the d.legend 'out of range' error message which is ok.
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)
(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