'\" -*- coding: us-ascii -*- .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 pkdumpimg 1 "14 June 2016" "" "" .SH NAME pkdumpimg \- program to dump image content to ASCII or STDOUT .SH SYNOPSIS 'nh .fi .ad l \fBpkdumpimg\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] [\fIoptions\fR] [\fIadvanced options\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpkdumpimg\fR dumps the content of a raster dataset to (standard) output (screen or filename). The default is to dump the output in matrix format. Use \*(T<\fB\-of\fR\*(T> 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 \*(T<\fB\-ulx\fR\*(T> \*(T<\fB\-uly\fR\*(T> \*(T<\fB\-lrx\fR\*(T> and \*(T<\fB\-lry\fR\*(T>. .SH OPTIONS .TP \*(T<\fB\-i\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-input\fR\*(T> \fIfilename\fR input image file .TP \*(T<\fB\-o\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-output\fR\*(T> \fIfilename\fR Output ASCII file (Default is empty: use STDOUT) .TP \*(T<\fB\-of\fR\*(T> \fImatrix|line\fR, \*(T<\fB\-\-oformat\fR\*(T> \fImatrix|line\fR Output format (matrix form or list (x,y,z) form). Default is matrix form .TP \*(T<\fB\-b\fR\*(T> \fIband\fR, \*(T<\fB\-\-band\fR\*(T> \fIband\fR band index to crop .TP \*(T<\fB\-e\fR\*(T> \fIvector\fR, \*(T<\fB\-\-extent\fR\*(T> \fIvector\fR get boundary from extent from polygons in vector file .TP \*(T<\fB\-ulx\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-ulx\fR\*(T> \fIvalue\fR Upper left x value bounding box (in geocoordinates if georef is true) .TP \*(T<\fB\-uly\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-uly\fR\*(T> \fIvalue\fR Upper left y value bounding box (in geocoordinates if georef is true) .TP \*(T<\fB\-lrx\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-lrx\fR\*(T> \fIvalue\fR Lower left x value bounding box (in geocoordinates if georef is true) .TP \*(T<\fB\-lry\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-lry\fR\*(T> \fIvalue\fR Lower left y value bounding box (in geocoordinates if georef is true) .TP \*(T<\fB\-v\fR\*(T> \fIlevel\fR, \*(T<\fB\-\-verbose\fR\*(T> \fIlevel\fR verbose (Default: 0) .PP Advanced options .TP \*(T<\fB\-dx\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-dx\fR\*(T> \fIvalue\fR Output resolution in x (in meter) (0.0: keep original resolution) .TP \*(T<\fB\-dy\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-dy\fR\*(T> \fIvalue\fR Output resolution in y (in meter) (0.0: keep original resolution) .TP \*(T<\fB\-r\fR\*(T> \fIresampling\fR, \*(T<\fB\-\-resampling\-method\fR\*(T> \fIresampling\fR Resampling method (near: nearest neighbour, bilinear: bi-linear interpolation). .TP \*(T<\fB\-srcnodata\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-srcnodata\fR\*(T> \fIvalue\fR set no data value(s) for input image .TP \*(T<\fB\-dstnodata\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-dstnodata\fR\*(T> \fIvalue\fR nodata value for output if out of bounds. .SH EXAMPLE We create a 5x5 raster dataset containing all 0 values except for its center (value=1) .PP .nf \*(T< \fBcat\fR \fIinput.txt\fR 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 \*(T> .fi .PP Use \fBpkascii2img\fR(1) to create an raster dataset from \fIinput.txt\fR .PP .nf \*(T< \fBpkascii2img\fR \fB\-i\fR \fIinput.txt\fR \fB\-o\fR \fIoutput.tif\fR \fB\-of\fR \fIGTiff\fR \fB\-a_srs\fR \fIepsg:3035\fR \fB\-dx\fR \fI25\fR \fB\-dy\fR \fI25\fR \fB\-ulx\fR \fI1000000\fR \fB\-uly\fR \fI1000000\fR \*(T> .fi .PP Dump the image content of \fIoutput.tif\fR to screen .PP .nf \*(T< \fBpkdumpimg\fR \fB\-i\fR \fIoutput.tif\fR \*(T> .fi .SH "SEE ALSO" \fBpkascii2img\fR(1)