[GRASSweb-list]colortable problem in ps.map

Brian Chen bchen at sjgeophysics.com
Thu Apr 10 15:41:47 EDT 2003


Hi,

I have a colortable and a category file for a raster map. According to 
the GRASS 5.x Reference Manual (colortable-ps.map, see the following 
appendix for details.), when  I use ps.map to create a color table, this 
color table will display the category labels specified in the category 
file. But I get the colortable with full range the category values 
nomatter how I change the category file. Why? (My GRASS version is 5.0.1)

Thanks,

Brian Chen


Appendix:

1.Map instruction for ps.map:
...
colortable
where 5.43 2
width 0.1
height 2
cols 1
nodata n
end
...

2.

Description in GRASS 5.x Reference Manual about colortable in ps.map:
The color table will display the colors for each raster map layer 
category value and the category label. ...

Another issue is that the color table only includes categories which 
have a label. If there are only a few categories, you can use r.support 
to manually add labels. If there are too many categories to do this, you 
could write a script to add dummy labels to the cats file
(<gisdbase>/<location>/<mapset>/cats/<mapname>).



3.Content of colortable file:
% 0 51630.873046875
0:0:0:155 15:0:0:155
15:0:0:155 25:0:0:155
25:0:0:188 35:0:0:188
35:0:0:221 45:0:0:221
45:0:0:254 50:0:0:254
50:0:17:254 100:0:17:254
100:0:34:254 150:0:34:254
150:0:51:254 200:0:51:254
200:0:68:254 300:0:68:254
300:0:85:254 400:0:85:254
400:0:102:254 500:0:102:254
500:0:119:254 600:0:119:254
600:0:136:254 700:0:136:254
700:0:153:254 800:0:153:254
800:0:170:254 900:0:170:254
900:0:187:254 1000:0:187:254
1000:0:204:254 1100:0:204:254
1100:0:221:254 1200:0:221:254
1200:0:238:254 1400:0:238:254
1400:0:255:254 1600:0:255:254
1600:0:255:191 1800:0:255:191
1800:0:255:127 2000:0:255:127
2000:0:255:63 2400:0:255:63
2400:0:255:0 2800:0:255:0
2800:85:255:0 3200:85:255:0
3200:170:255:0 3600:170:255:0
3600:255:255:0 4000:255:255:0
4000:255:212:0 4800:255:212:0
4800:255:170:0 5600:255:170:0
5600:255:127:0 6400:255:127:0
6400:255:85:0 7200:255:85:0
7200:255:42:0 8000:255:42:0
8000:255:0:0 9000:255:0:0
9000:255:0:99 10000:255:0:99
10000:255:0:199 51630.873046875:255:0:199

4.Content of category file:
# 255 categories


0.00 0.00 0.00 0.00
8.398309188358473065250109357294:8.5:8.50
38.5:48.5:48.50
150:200:200.00
500:600:600.00
900:1000:1000.00
1400:1600:1600.00
2400:2800:2800.00
4000:6000:6000.00
16000:24000:24000.00
64000:80000:80000.00





More information about the grass-web mailing list