'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH pkcreatect 1 "06 December 2020" "" "" .SH NAME pkcreatect \- program to create and import colour table to GTiff image .SH SYNOPSIS 'nh .fi .ad l \fBpkcreatect\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \fB-i\fR \fIinput\fR \fB-o\fR \fIoutput\fR [\fB-ct\fR \fIcolortable\fR | \fB-min\fR \fIvalue\fR \fB-max\fR \fIvalue\fR] [\fIoptions\fR] [\fIadvanced options\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpkcreatect\fR 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 \*(T<\fB\-ct\fR\*(T> or define a minimum (\*(T<\fB\-min\fR\*(T>) and maximum (\*(T<\fB\-max\fR\*(T>) value. .SH OPTIONS .TP \*(T<\fB\-i\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-input\fR\*(T> \fIfilename\fR input image .TP \*(T<\fB\-o\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-output\fR\*(T> \fIfilename\fR output classification image .TP \*(T<\fB\-ct\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-ct\fR\*(T> \fIfilename\fR colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid) .TP \*(T<\fB\-min\fR\*(T> \fInumber\fR, \*(T<\fB\-\-min\fR\*(T> \fInumber\fR minimum value .TP \*(T<\fB\-max\fR\*(T> \fInumber\fR, \*(T<\fB\-\-max\fR\*(T> \fInumber\fR maximum value .PP options .TP \*(T<\fB\-g\fR\*(T>, \*(T<\fB\-\-grey\fR\*(T> grey scale .TP \*(T<\fB\-of\fR\*(T> \fIformat\fR, \*(T<\fB\-\-oformat\fR\*(T> \fIformat\fR Output image format (see also \fBgdal_translate\fR(1)). .TP \*(T<\fB\-co\fR\*(T> \fIoption\fR, \*(T<\fB\-\-co\fR\*(T> \fIoption\fR Creation option for output file. Multiple options can be specified. .TP \*(T<\fB\-d\fR\*(T> \fIdescription\fR, \*(T<\fB\-\-description\fR\*(T> \fIdescription\fR Set image description .TP \*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-verbose\fR\*(T> verbose .PP Advanced options .TP \*(T<\fB\-l\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-filename\fR\*(T> \fIfilename\fR Create legend as png file .TP \*(T<\fB\-dim\fR\*(T> \fIcols\fR \*(T<\fB\-dim\fR\*(T> \fIrows\fR, \*(T<\fB\-\-dim\fR\*(T> \fIcols\fR \*(T<\fB\-\-dim\fR\*(T> \fIrows\fR number of columns and rows in legend. .SH EXAMPLE Attach a color table to image with values between 0 and 50 .PP .nf \*(T< \fBpkcreatect\fR \fB\-i\fR \fIimage.tif\fR \fB\-o\fR \fIimage_ct.tif\fR \fB\-min\fR \fI0\fR \fB\-max\fR \fI50\fR \*(T> .fi .PP 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) .PP .nf \*(T< \fBpkcreatect\fR \fB\-i\fR \fIimage.tif\fR \fB\-o\fR \fIimage_ct.tif\fR \fB\-min\fR \fI0\fR \fB\-max\fR \fI100\fR \fB\-l\fR \fIlegend.tif\fR \fB\-g\fR \*(T> .fi .PP Attach a predefined color table to \*(T<\fIimage.tif\fR\*(T>. The colortable has 5 entries for the values 0 (black), 1 (red), 2 (green), 3 (blue) and 4 (grey) .PP .nf \*(T< \fBcat\fR \fIcolortable.txt\fR 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 \fBpkcreatect\fR \fB\-i\fR \fIimage.tif\fR \fB\-o\fR \fIimage_ct.tif\fR \fB\-ct\fR \fIcolortable.txt\fR \*(T> .fi .PP Remove the color table from an image .PP .nf \*(T< \fBpkcreatect\fR \fB\-i\fR \fIimage.tif\fR \fB\-o\fR \fIimage_noct.tif\fR \fB\-ct\fR none \*(T> .fi