DOKK / manpages / debian 10 / pktools / pkcreatect.1.en
pkcreatect(1) pkcreatect(1)

pkcreatect - program to create and import colour table to GTiff image


pkcreatect
-i input -o output [-ct colortable | -min value -max value] [options] [advanced options]

pkcreatect is a utility to include a color table to a raster dataset. You can either define an existing color table (ASCII text file) with the option -ct or define a minimum (-min) and maximum (-max) value.

input image
output classification image
colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)
minimum value
maximum value

options

grey scale
Output image format (see also gdal_translate(1)).
Creation option for output file. Multiple options can be specified.
Set image description
verbose

Advanced options

Create legend as png file
number of columns and rows in legend.

Attach a color table to image with values between 0 and 50

pkcreatect -i image.tif -o image_ct.tif -min 0 -max 50

Attach a grey scale "color" table to image with values between 0 and 100 and create a legend image (annotation needs to be drawn manually)

pkcreatect -i image.tif -o image_ct.tif -min 0 -max 100 -l legend.tif -g

Attach a predefined color table to image.tif. The colortable has 5 entries for the values 0 (black), 1 (red), 2 (green), 3 (blue) and 4 (grey)

cat colortable.txt
0 0 0 0 255
1 255 0 0 255
2 0 255 0 255
3 0 0 255 255
4 100 100 100 255
pkcreatect -i image.tif -o image_ct.tif -ct colortable.txt

Remove the color table from an image

pkcreatect -i image.tif -o image_noct.tif -ct none

02 January 2019