pkinfo(1)

NAME
pkinfo - Report basic information from raster datasets

SYNOPSIS
\FCpkinfo\F[]
\FC-i\F[] input [options]

DESCRIPTION
pkinfo retrieves basic information about a raster data set (similar to gdalinfo(1)). An important difference with gdalinfo is that pkinfo only reports the information that is requested via the corresponding command line option, whereas gdalinfo 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.

OPTIONS

\FC-i\F[] filename, \FC--input\F[] filename
    Input image file

\FC-bb\F[], \FC--bbox\F[]
    Shows bounding box

\FC-te\F[], \FC--te\F[]
    Shows bounding box in GDAL format: xmin ymin xmax ymax

\FC-c\F[], \FC--center\F[]
    Image center in projected X,Y coordinates

\FC-ct\F[], \FC--colortable\F[]
    Shows colour table

\FC-ns\F[], \FC--nsample\F[]
    Number of samples in image

\FC-nl\F[], \FC--nline\F[]
    Number of lines in image

\FC-nb\F[], \FC--nband\F[]
    Show number of bands in image

\FC-b\F[] band, \FC--band\F[] band
    Band specific information

\FC-dx\F[], \FC--dx\F[]
    Gets resolution in x (in m)

\FC-dy\F[], \FC--dy\F[]
    Gets resolution in y (in m)

\FC-mm\F[], \FC--minmax\F[]
    Shows min and max value of the image

\FC-min\F[], \FC--minimum\F[]
    Shows min value of the image

\FC-max\F[], \FC--maximum\F[]
    Shows max value of the image

\FC-stats\F[], \FC--statistics\F[]
    Shows statistics (min,max, mean and stdDev of the image)

\FC-a_srs\F[], \FC--a_srs\F[]
    Shows projection of the image

\FC-geo\F[], \FC--geo\F[]
    Gets geotransform

\FC-il\F[], \FC--interleave\F[]

\FC-f\F[], \FC--filename\F[]
    Shows image filename

\FC-cover\F[], \FC--cover\F[]
    Print filename to STDOUT if current image covers the provided coordinates via bounding box, (x y) coordinates or extent of vector file

\FC-x\F[] value, \FC--xpos\F[] value
    x pos

\FC-y\F[] value, \FC--ypos\F[] value
    y pos

\FC-r\F[], \FC--read\F[]
    Reads row y (in projected coordinates if geo option is set, otherwise in image coordinates, 0 based)

\FC-ref\F[], \FC--reference\F[]
    Gets reference pixel (lower left corner of center of gravity pixel)

\FC-of\F[], \FC--oformat\F[]
    Gets driver description

\FC-e\F[] filename, \FC--extent\F[] filename
    Gets boundary from vector file

\FC-ulx\F[] ULX, \FC--ulx\F[] ULX
    Upper left x value bounding box

\FC-uly\F[] ULY, \FC--uly\F[] ULY
    Upper left y value bounding box

\FC-lrx\F[] LRX, \FC--lrx\F[] LRX
    Lower right x value bounding box

\FC-lry\F[] LRY, \FC--lry\F[] LRY
    Lower right y value bounding box

\FC-ot\F[], \FC--otype\F[]

\FC-d\F[], \FC--description\F[]
    Returns image description

\FC-meta\F[], \FC--meta\F[]
    Shows meta data

\FC-nodata\F[] value, \FC--nodata\F[] value
    Sets no data value(s) for calculations (nodata values in input image)

EXAMPLE
show number of bands in raster image.tif

\FC
pkinfo -i image.tif -nb
      \F[]

show maximum value of band 1 (starting from 0) of raster image.tif

\FC
pkinfo -i image.tif -max -b 1
      \F[]

read (dump) upper left pixel value for bands 3,2,1

\FC
pkinfo -i image.tif -x 0 -y 0 -r -b 3 -b 2 -b 1
      \F[]

read (dump) pixel value at this geographic location (x,y) for bands 3,2,1

\FC
pkinfo -i image.tif -x 3528120 -y 4329681 -geo -r -b 3 -b 2 -b 1
      \F[]

show bounding box (\FC-ulx\F[] \FC-uly\F[] \FC-lrx\F[] \FC-lry\F[]) in geo coordinates for image1.tif

\FC
pkinfo -i image1.tif -b
      \F[]

show bounding box (\FC-ulx\F[] \FC-uly\F[] \FC-lrx\F[] \FC-lry\F[]) in geo coordinates for each image (and union and intersect)

\FC
pkinfo -i image1.tif -i image2.tif -i image3.tif -b
      \F[]

show the reference pixel (centre of gravity) for image1.tif, treating 0 and 255 as NO VALUE

\FC
pkinfo -i image1.tif --mask 0 --mask 255 -ref
      \F[]

read (dump) pixel value at image centre for band 0

\FC
pkinfo -i image.tif $(pkinfo -i image.tif -c) -geo -r
      \F[]

read (dump) pixel value in band 0 (default) for all images in current directory that cover this geographic location

\FC
pkinfo $(for IMAGE in modis_2010*.tif; do pkinfo -i $IMAGE --cover -x 4215500 -y 2534000; done) -x 4215500 -y 253400
      \F[]

SEE ALSO
gdalinfo(1)