pkdumpimg(1)
π pkdumpimg β the manual, but make it cute π
okay bestie, so this is the pkdumpimg(1) page β it's literally the glow-up guide for dumping raster image content to ASCII or STDOUT. sit down, hydrate, and let's get into it π«Ά
β¨ NAME β¨
pkdumpimg β a whole program whose job is dumping image content to ASCII or to STDOUT. that's it, that's the gig π
πΈ SYNOPSIS πΈ
pkdumpimg -i input [-o output] [options] [advanced options]
π¦ DESCRIPTION π¦
so pkdumpimg dumps the content of a raster dataset to (standard) output β and by standard output we mean either your screen or a filename, your call boo. π
the default vibe is dumping the output in matrix format. iconic. but if you use -of line, it dumps each pixel value on its own separate line, preceded by its position (the x and y value). one pixel per line, very main character energy.
you can also specify a bounding box to dump β either with the extent of an OGR vector dataset, or via the options -ulx, -uly, -lrx and -lry. yes girl, you get to choose your own rectangle π
π OPTIONS π
-ifilename,--inputfilename β input image file. the one you're dumping, obvi πΌοΈ-ofilename,--outputfilename β Output ASCII file (Default is empty: use STDOUT). so if you leave it empty it just screams directly into STDOUT π-ofmatrix|line,--oformatmatrix|line β Output format (matrix form or list (x,y,z) form). Default is matrix form π-bband,--bandband β band index to crop. pick your band, periodt πΆ-evector,--extentvector β get boundary from extent from polygons in vector file πΊοΈ-ulxvalue,--ulxvalue β Upper left x value bounding box (in geocoordinates if georef is true)-ulyvalue,--ulyvalue β Upper left y value bounding box (in geocoordinates if georef is true)-lrxvalue,--lrxvalue β Lower left x value bounding box (in geocoordinates if georef is true)-lryvalue,--lryvalue β Lower left y value bounding box (in geocoordinates if georef is true)-vlevel,--verboselevel β verbose (Default:0). crank it up if you wanna hear everything π₯
β Advanced options β
-dxvalue,--dxvalue β Output resolution in x (in meter) (0.0: keep original resolution)-dyvalue,--dyvalue β Output resolution in y (in meter) (0.0: keep original resolution)-rresampling,--resampling-methodresampling β Resampling method (near: nearest neighbour,bilinear: bi-linear interpolation). choose your fighter β¨-srcnodatavalue,--srcnodatavalue β set no data value(s) for input image-dstnodatavalue,--dstnodatavalue β nodata value for output if out of bounds.
π EXAMPLE π
okay so we create a 5x5 raster dataset containing all 0 values except for its center (value=1). little baby raster, so cute π
cat input.txt
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
Use pkascii2img(1) to create an raster dataset from input.txt
pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000
Dump the image content of output.tif to screen
pkdumpimg -i output.tif
like hello?? it just shows up on your screen. ate and left no crumbs π
π SEE ALSO π
pkascii2img(1) β go read that one next bestie, they're a matching set π
that's the whole page, no cap. every flag, every default, every little georef caveat β all still here, just with better vibes β¨
and that's a wrap on the 01 January 2025 edition of pkdumpimg(1) β mwah, love u, go dump some rasters πππ¦πΈπ
π¦ 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