'\" -*- 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 pkinfo 1 "14 June 2016" "" "" .SH NAME pkinfo \- Report basic information from raster datasets .SH SYNOPSIS 'nh .fi .ad l \fBpkinfo\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \fB-i\fR \fIinput\fR [\fIoptions\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpkinfo\fR retrieves basic information about a raster data set (similar to \fBgdalinfo\fR(1)). An important difference with \fBgdalinfo\fR is that \fBpkinfo\fR only reports the information that is requested via the corresponding command line option, whereas \fBgdalinfo\fR provides all basic information at once. The reported information is in a format that can be used as input for other pktools utilities. This mechanism facilitates command substitution in the bash scripting language. .SH OPTIONS .TP \*(T<\fB\-i\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-input\fR\*(T> \fIfilename\fR Input image file .TP \*(T<\fB\-bb\fR\*(T>, \*(T<\fB\-\-bbox\fR\*(T> Shows bounding box .TP \*(T<\fB\-te\fR\*(T>, \*(T<\fB\-\-te\fR\*(T> Shows bounding box in GDAL format: xmin ymin xmax ymax .TP \*(T<\fB\-c\fR\*(T>, \*(T<\fB\-\-center\fR\*(T> Image center in projected X,Y coordinates .TP \*(T<\fB\-ct\fR\*(T>, \*(T<\fB\-\-colortable\fR\*(T> Shows colour table .TP \*(T<\fB\-ns\fR\*(T>, \*(T<\fB\-\-nsample\fR\*(T> Number of samples in image .TP \*(T<\fB\-nl\fR\*(T>, \*(T<\fB\-\-nline\fR\*(T> Number of lines in image .TP \*(T<\fB\-nb\fR\*(T>, \*(T<\fB\-\-nband\fR\*(T> Show number of bands in image .TP \*(T<\fB\-b\fR\*(T> \fIband\fR, \*(T<\fB\-\-band\fR\*(T> \fIband\fR Band specific information .TP \*(T<\fB\-dx\fR\*(T>, \*(T<\fB\-\-dx\fR\*(T> Gets resolution in x (in m) .TP \*(T<\fB\-dy\fR\*(T>, \*(T<\fB\-\-dy\fR\*(T> Gets resolution in y (in m) .TP \*(T<\fB\-mm\fR\*(T>, \*(T<\fB\-\-minmax\fR\*(T> Shows min and max value of the image .TP \*(T<\fB\-min\fR\*(T>, \*(T<\fB\-\-minimum\fR\*(T> Shows min value of the image .TP \*(T<\fB\-max\fR\*(T>, \*(T<\fB\-\-maximum\fR\*(T> Shows max value of the image .TP \*(T<\fB\-stats\fR\*(T>, \*(T<\fB\-\-statistics\fR\*(T> Shows statistics (min,max, mean and stdDev of the image) .TP \*(T<\fB\-a_srs\fR\*(T>, \*(T<\fB\-\-a_srs\fR\*(T> Shows projection of the image .TP \*(T<\fB\-geo\fR\*(T>, \*(T<\fB\-\-geo\fR\*(T> Gets geotransform .TP \*(T<\fB\-il\fR\*(T>, \*(T<\fB\-\-interleave\fR\*(T> .TP \*(T<\fB\-f\fR\*(T>, \*(T<\fB\-\-filename\fR\*(T> Shows image filename .TP \*(T<\fB\-cover\fR\*(T>, \*(T<\fB\-\-cover\fR\*(T> Print filename to STDOUT if current image covers the provided coordinates via bounding box, (x y) coordinates or extent of vector file .TP \*(T<\fB\-x\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-xpos\fR\*(T> \fIvalue\fR x pos .TP \*(T<\fB\-y\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-ypos\fR\*(T> \fIvalue\fR y pos .TP \*(T<\fB\-r\fR\*(T>, \*(T<\fB\-\-read\fR\*(T> Reads row y (in projected coordinates if geo option is set, otherwise in image coordinates, 0 based) .TP \*(T<\fB\-ref\fR\*(T>, \*(T<\fB\-\-reference\fR\*(T> Gets reference pixel (lower left corner of center of gravity pixel) .TP \*(T<\fB\-of\fR\*(T>, \*(T<\fB\-\-oformat\fR\*(T> Gets driver description .TP \*(T<\fB\-e\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-extent\fR\*(T> \fIfilename\fR Gets boundary from vector file .TP \*(T<\fB\-ulx\fR\*(T> \fIULX\fR, \*(T<\fB\-\-ulx\fR\*(T> \fIULX\fR Upper left x value bounding box .TP \*(T<\fB\-uly\fR\*(T> \fIULY\fR, \*(T<\fB\-\-uly\fR\*(T> \fIULY\fR Upper left y value bounding box .TP \*(T<\fB\-lrx\fR\*(T> \fILRX\fR, \*(T<\fB\-\-lrx\fR\*(T> \fILRX\fR Lower right x value bounding box .TP \*(T<\fB\-lry\fR\*(T> \fILRY\fR, \*(T<\fB\-\-lry\fR\*(T> \fILRY\fR Lower right y value bounding box .TP \*(T<\fB\-ot\fR\*(T>, \*(T<\fB\-\-otype\fR\*(T> .TP \*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-description\fR\*(T> Returns image description .TP \*(T<\fB\-meta\fR\*(T>, \*(T<\fB\-\-meta\fR\*(T> Shows meta data .TP \*(T<\fB\-nodata\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-nodata\fR\*(T> \fIvalue\fR Sets no data value(s) for calculations (nodata values in input image) .SH EXAMPLE show number of bands in raster \fIimage.tif\fR .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage.tif\fR \fB\-nb\fR \*(T> .fi .PP show maximum value of band 1 (starting from 0) of raster \fIimage.tif\fR .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage.tif\fR \fB\-max\fR \fB\-b\fR \fI1\fR \*(T> .fi .PP read (dump) upper left pixel value for bands 3,2,1 .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage.tif\fR \fB\-x\fR \fI0\fR \fB\-y\fR \fI0\fR \fB\-r\fR \fB\-b\fR \fI3\fR \fB\-b\fR \fI2\fR \fB\-b\fR \fI1\fR \*(T> .fi .PP read (dump) pixel value at this geographic location (x,y) for bands 3,2,1 .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage.tif\fR \fB\-x\fR \fI3528120\fR \fB\-y\fR \fI4329681\fR \fB\-geo\fR \fB\-r\fR \fB\-b\fR \fI3\fR \fB\-b\fR \fI2\fR \fB\-b\fR \fI1\fR \*(T> .fi .PP show bounding box (\*(T<\fB\-ulx\fR\*(T> \*(T<\fB\-uly\fR\*(T> \*(T<\fB\-lrx\fR\*(T> \*(T<\fB\-lry\fR\*(T>) in geo coordinates for \fIimage1.tif\fR .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage1.tif\fR \fB\-b\fR \*(T> .fi .PP show bounding box (\*(T<\fB\-ulx\fR\*(T> \*(T<\fB\-uly\fR\*(T> \*(T<\fB\-lrx\fR\*(T> \*(T<\fB\-lry\fR\*(T>) in geo coordinates for each image (and union and intersect) .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage1.tif\fR \fB\-i\fR \fIimage2.tif\fR \fB\-i\fR \fIimage3.tif\fR \fB\-b\fR \*(T> .fi .PP show the reference pixel (centre of gravity) for \fIimage1.tif\fR, treating 0 and 255 as NO VALUE .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage1.tif\fR \fB\-\-mask\fR \fI0\fR \fB\-\-mask\fR \fI255\fR \fB\-ref\fR \*(T> .fi .PP read (dump) pixel value at image centre for band 0 .PP .nf \*(T< \fBpkinfo\fR \fB\-i\fR \fIimage.tif\fR $(\fBpkinfo\fR \fB\-i\fR \fIimage.tif\fR \fB\-c\fR) \fB\-geo\fR \fB\-r\fR \*(T> .fi .PP read (dump) pixel value in band 0 (default) for all images in current directory that cover this geographic location .PP .nf \*(T< \fBpkinfo\fR $(for IMAGE in \fImodis_2010*.tif\fR; do \fBpkinfo\fR \fB\-i\fR \fI$IMAGE\fR \fB\-\-cover\fR \fB\-x\fR \fI4215500\fR \fB\-y\fR \fI2534000\fR; done) \fB\-x\fR \fI4215500\fR \fB\-y\fR \fI253400\fR \*(T> .fi .SH "SEE ALSO" \fBgdalinfo\fR(1)