CPTPG(1)

πŸ“¦ version 1.82, in fedora 43, fedora 44

πŸ’– CPTPG πŸ’–

okay bestie, welcome to cptpg, part of the User commands squad, and it's giving glow-up for your colour palettes ✨


🌸 NAME 🌸

cptpg β€” convert GMT colour palette tables (cpt) to PostGIS colour-maps. that's it, that's the girl πŸ’…


✨ SYNOPSIS ✨

cptpg [-h] [-o path] [-p] [-v] [-V] [path]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the cptpg utility takes the colour palette table (cpt) files that GMT uses and converts them into the colour-maps that PostGIS uses β€” specifically the ones for the ST_ColorMap function. πŸŽ€

and lowkey it's not just a PostGIS thing either: it should also be possible to use these maps in the GDAL program gdaldem, the GRASS r.colors utility, and in ESRI products which call for a HDR color table. versatility, she ate πŸ’…

if you don't hand it a file as that final argument, the program reads from stdin. and if you don't pass the --output option, it writes to stdout. classic, no cap 🫢


πŸ‘‘ OPTIONS πŸ‘‘

  • --backtrace-file path β€” pick a file to write a formatted backtrace into. ngl this file only gets created if there's actually a backtrace to write, which usually means something went wrong 😭 so like, an error happened bestie.
  • --backtrace-format format β€” set the format of the backtrace written to whatever file you gave --backtrace-file. you get exactly one of three choices, no mixing: plain, xml or json. ✨
  • --comments-write path β€” write the comments from the input out to the specified path. keeping the receipts πŸ“
  • -h, --help β€” brief help. the little "hey what is this" moment πŸ’–
  • --hinge-active β€” if your input cpt has a SOFT_HINGE directive, this activates that hinge, which means the two halves of the gradient either side of the hinge get scaled independently. πŸ”₯ and if your input doesn't have such a directive? then this option has no effect. literally nothing happens, she's just vibing πŸ™ˆ
  • -o, --output path β€” write the output to path instead of stdout. 🌈
  • -p, --percentage β€” convert (z) values to percentages. math but make it fashion πŸ’…
  • -v, --verbose β€” verbose operation. she will talk πŸ—£οΈ
  • -V, --version β€” version information. πŸ‘‘

🧚 AUTHOR 🧚

J.J. Green


and that's the whole page, bestie πŸ’œ go convert something iconic

this was cptutils 1.82, dated 9 July 2024 β€” mwah, periodt πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from