[GRASSLIST:3152] Re: d.colormode float

Glynn Clements glynn.clements at virgin.net
Fri Feb 15 22:27:21 EST 2002


DeanRNet6 at netscape.net wrote:

> Just installed GRASS.  I'm a newboot, forgive me.  I'm pretty darn good 
> GISer though.
> So, I'm using MacOSX 10.1.2 because I need a break from Windoze, VB and 
> ESRI on occasion.  I'm having trouble with d.colormode float.
> 
> When I type it at the command line
>  >GRASS 5.0.0pre3 > d.colormode float
> 
> I get the following message:
>  >WARNING: Color_table_float: not available on this device
>  >Sorry, floating color table not available on this device

Yep. This feature is only possible on "PseudoColor" visuals, which
usually corresponds to display modes with 256 colours or less. 
However, you shouldn't really need the feature in "true colour" modes.

> So here I am following the tutorial and it tells me this:
> 
> Display the satellite image again.
> 
>  >Commands :
>  >
>  >d.mon select=x0
>  >d.rast image
> 
> Which I do.
> 
>  >Discussion The image should consist of approximately 8 shades of grey 
> - enough >to identify most of the features of the study area. As GRASS 
> is capable of >displaying up to 240 colours on an most workstations, why 
> are there only 8 grey >shades making up this image? GRASS has a fixed 
> palette of colours all of which >can be displayed simultaneously. Since 
> an image can consist of any range of >colours, only a few can be 
> reserved for grey scales. GRASS simply matches each >raster cell value 
> to the nearest available colour.
> 
>  >We can produce an improved image by abandoning GRASS' fixed palette 
> and >dedicating most of the range of colours to one image.

The above assumes that the display is limited to 256 colours. Recent
versions of GRASS can use the full colour range of the display. For a
"true colour" mode, this usually corresponds to between 32 and 256
grey shades (15-bpp gives 32 shades, 24-bpp gives 256 shades).

>  >Make sure the pointer is resting over the graphics window x0.
> 
> What exactly does this mean.  If my cursor is over the window x0, then I 
> can't type 'Enter' and have the terminal window respond.

That depends upon your window manager (WM). If the WM is of the "focus
follows mouse" type (e.g. twm), then you are correct. However, most
modern window managers use "click to focus", where the keyboard focus
doesn't automatically follow the mouse. It just so happens that the
default X configuration starts twm; other WMs are available.

However, this is likely to be irrelevant in your case. The behaviour
which the tutorial describes (where the display palette changes with
the window focus) only applies to PseudoColor visuals.

>  >Commands :
>  >
>  >d.colormode float
>  >d.rast image
>  >
>  >Discussion You should see an improved satellite image of the study 
> area. The >majority of the workstation's colours have now been allocated 
> to grey values in >this one window. When using this floating colour 
> table, GRASS allocates the >correct colours to the window on which the 
> pointer is resting.
> 
> So I type d.colormode float and get the error I mentioned before.
> 
> Anybody have any insight on this? 

In short, ignore any references to "d.colormode". On displays with
more than 256 colours, it doesn't work and isn't necessary.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list