[GRASS-user] Raster color tables missing entries

Some of the raster color table files in the ‘colr’ directory appears to be missing entries for some categories. However, if I plot the maps using d.rast color appears for all the categories. How do I make sure that color table has exactly same (and all) RGB values in the color table file in ‘colr’ directory as is being used for map display?

Thanks for your help,

Jitu

On Tue, Jan 10, 2012 at 5:36 AM, Jitendra Kumar <jitendra.ncsu@gmail.com> wrote:

Some of the raster color table files in the 'colr' directory appears to be
missing entries for some categories. However, if I plot the maps using
d.rast color appears for all the categories. How do I make sure that color
table has exactly same (and all) RGB values in the color table file in
'colr' directory as is being used for map display?

To my knowledge color "missing" values are linearly interpolated. So
they are not really missing.

Markus

On Tue, Jan 10, 2012 at 4:25 PM, Jitendra Kumar <jitu1503@gmail.com> wrote:

I am using the "random" color table for these rasters. Will it be
interpolating in that case too?

Is there a way to ensure all colors gets written to the color table?

I want to use the color table RGB values for each category, parse it in an
external program to add color legends in an Latex document.

Jitu

Late reply :slight_smile:

I guess that you will need to use the C API to get out a complete color list:

http://grass.osgeo.org/programming7/rasterlib.html#Raster_Color_Table

Markus

On Mon, Dec 17, 2012 at 10:45 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Jan 10, 2012 at 4:25 PM, Jitendra Kumar <jitu1503@gmail.com> wrote:

I am using the "random" color table for these rasters. Will it be
interpolating in that case too?

Is there a way to ensure all colors gets written to the color table?

I want to use the color table RGB values for each category, parse it in an
external program to add color legends in an Latex document.

Jitu

Late reply :slight_smile:

I guess that you will need to use the C API to get out a complete color list:

http://grass.osgeo.org/programming7/rasterlib.html#Raster_Color_Table

You can also try r.colors.out. It should create a color table with a
RGB value for each category.

Markus M