NAME
pkdumpimg - program to dump image content to ASCII or STDOUT
SYNOPSIS
FCpkdumpimgF[0] FC-iF[0] input [FC-oF[0] output] [options] [advanced options]
DESCRIPTION
pkdumpimg dumps the content of a raster dataset to (standard) output (screen or filename). The default is to dump the output in matrix format. Use FC-ofF[0] line to dump each pixel value on a separate line, preceded by its position (x and y value). You can specify a bounding box to dump with either the extent of an OGR vector dataset or via the options FC-ulxF[0] FC-ulyF[0] FC-lrxF[0] and FC-lryF[0].
OPTIONS
- FC-iF[0] filename, FC--inputF[0] filename
-
input image file
- FC-oF[0] filename, FC--outputF[0] filename
-
Output ASCII file (Default is empty: use STDOUT)
- FC-ofF[0] matrix|line, FC--oformatF[0] matrix|line
-
Output format (matrix form or list (x,y,z) form). Default is matrix form
- FC-bF[0] band, FC--bandF[0] band
-
band index to crop
- FC-eF[0] vector, FC--extentF[0] vector
-
get boundary from extent from polygons in vector file
- FC-ulxF[0] value, FC--ulxF[0] value
-
Upper left x value bounding box (in geocoordinates if georef is true)
- FC-ulyF[0] value, FC--ulyF[0] value
-
Upper left y value bounding box (in geocoordinates if georef is true)
- FC-lrxF[0] value, FC--lrxF[0] value
-
Lower left x value bounding box (in geocoordinates if georef is true)
- FC-lryF[0] value, FC--lryF[0] value
-
Lower left y value bounding box (in geocoordinates if georef is true)
- FC-vF[0] level, FC--verboseF[0] level
-
verbose (Default: 0)
Advanced options
- FC-dxF[0] value, FC--dxF[0] value
-
Output resolution in x (in meter) (0.0: keep original resolution)
- FC-dyF[0] value, FC--dyF[0] value
-
Output resolution in y (in meter) (0.0: keep original resolution)
- FC-rF[0] resampling, FC--resampling-methodF[0] resampling
-
Resampling method (near: nearest neighbour, bilinear: bi-linear interpolation).
- FC-srcnodataF[0] value, FC--srcnodataF[0] value
-
set no data value(s) for input image
- FC-dstnodataF[0] value, FC--dstnodataF[0] value
-
nodata value for output if out of bounds.
EXAMPLE
We create a 5x5 raster dataset containing all 0 values except for its center (value=1)
FC
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
F[0]
Use pkascii2img(1) to create an raster dataset from input.txt
FC
pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000
F[0]
Dump the image content of output.tif to screen
FC
pkdumpimg -i output.tif
F[0]