[GRASS-user] Defining color table rules- other classes

Markus Metz markus.metz.giswork at googlemail.com
Mon May 16 08:58:08 EDT 2011


On Mon, May 16, 2011 at 2:44 PM, Luis Lisboa <luislisboa1975 at gmail.com> wrote:
> So, it also creates an "black" entry for values from 21 til 255 right?

Yes, because the geotiff format requires an entry in the color table
for each value in the range of the selected data type, here apparently
Byte which ranges from 0 to 255. If the valid classes would range from
20 - 40, the color info for 0 - 19 and 41 - 255 would be set to black
(0:0:0) by gdal in the produced geotiff file.

>
> On Mon, May 16, 2011 at 12:38 PM, Markus Metz
> <markus.metz.giswork at googlemail.com> wrote:
>>
>> On Mon, May 16, 2011 at 1:09 PM, Luis Lisboa <luislisboa1975 at gmail.com>
>> wrote:
>> > Greetings
>> > I have created a color table and defined colors for classes between
>> > 0-20.
>> > But, when I export It (as geotiff), it also defines colors for classes
>> > that
>> > does not exist (all black) or even for classes between 0-20 that does
>> > not
>> > have any pixel with that value. Is this expected?
>>
>> gdal does that, because the geotiff format requires an entry in the
>> color table for each value in the range of the selected data type (or
>> no color table at all)
>>
>> Markus M
>
>


More information about the grass-user mailing list