pkcreatect(1)
π NAME π
okay so bestie, welcome to pkcreatect β the program to create and import colour table to GTiff image. that's the whole vibe. she makes colour tables and she makes them pretty π
β¨ SYNOPSIS β¨
pkcreatect -i input -o output [-ct colortable | -min value -max value]
[options] [advanced options]
π¦ DESCRIPTION π¦
so like, pkcreatect is a utility to include a color table to a raster dataset. literally that's her job and she ate π
you got two paths, bestie, pick your fighter:
- define an existing color table (ASCII text file) with the option
-ct - OR define a minimum (
-min) and maximum (-max) value
that's it. that's the whole thing. iconic honestly π
πΈ OPTIONS πΈ
the core four (well, five) π
-ifilename,--inputfilename β input image-ofilename,--outputfilename β output classification image-ctfilename,--ctfilename β colour table in ASCII format having 5 columns:id R G B ALFA(0: transparent, 255: solid). yes ALFA with an A, that's her name, respect it π«Ά-minnumber,--minnumber β minimum value-maxnumber,--maxnumber β maximum value
options β¨
-g,--greyβ grey scale. no colour, just vibes in greyscale π©Ά-offormat,--oformatformat β Output image format (see alsogdal_translate(1))-cooption,--cooption β Creation option for output file. Multiple options can be specified. stack 'em up bestie π₯-ddescription,--descriptiondescription β Set image description-v,--verboseβ verbose. she will tell you EVERYTHING and honestly? we love a chatty queen π£οΈ
Advanced options π
-lfilename,--filenamefilename β Create legend as png file-dimcols-dimrows,--dimcols--dimrows β number of columns and rows in legend
π EXAMPLE π
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
heads up: the annotation needs to be drawn manually, so don't come for her when the legend has no labels, she did her part π
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
and that's the whole page bestie, no cap, every flag accounted for π
this one's from the pkcreatect(1) manual, dated 01 January 2025 β mwah, go make something cute πβ¨π
π¦ where this page comes from
- ubuntu questing: pktools 2.6.7.6+ds-6build4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms