Reference

pkinfo(1)

Report basic information from raster datasets

NAME

pkinfo - Report basic information from raster datasets

SYNOPSIS

FCpkinfoF[0] FC-iF[0] 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-iF[0] filename, FC--inputF[0] filename

Input image file

FC-bbF[0], FC--bboxF[0]

Shows bounding box

FC-teF[0], FC--teF[0]

Shows bounding box in GDAL format: xmin ymin xmax ymax

FC-cF[0], FC--centerF[0]

Image center in projected X,Y coordinates

FC-ctF[0], FC--colortableF[0]

Shows colour table

FC-nsF[0], FC--nsampleF[0]

Number of samples in image

FC-nlF[0], FC--nlineF[0]

Number of lines in image

FC-nbF[0], FC--nbandF[0]

Show number of bands in image

FC-bF[0] band, FC--bandF[0] band

Band specific information

FC-dxF[0], FC--dxF[0]

Gets resolution in x (in m)

FC-dyF[0], FC--dyF[0]

Gets resolution in y (in m)

FC-mmF[0], FC--minmaxF[0]

Shows min and max value of the image

FC-minF[0], FC--minimumF[0]

Shows min value of the image

FC-maxF[0], FC--maximumF[0]

Shows max value of the image

FC-statsF[0], FC--statisticsF[0]

Shows statistics (min,max, mean and stdDev of the image)

FC-a_srsF[0], FC--a_srsF[0]

Shows projection of the image

FC-geoF[0], FC--geoF[0]

Gets geotransform

FC-ilF[0], FC--interleaveF[0]
FC-fF[0], FC--filenameF[0]

Shows image filename

FC-coverF[0], FC--coverF[0]

Print filename to STDOUT if current image covers the provided coordinates via bounding box, (x y) coordinates or extent of vector file

FC-xF[0] value, FC--xposF[0] value

x pos

FC-yF[0] value, FC--yposF[0] value

y pos

FC-rF[0], FC--readF[0]

Reads row y (in projected coordinates if geo option is set, otherwise in image coordinates, 0 based)

FC-refF[0], FC--referenceF[0]

Gets reference pixel (lower left corner of center of gravity pixel)

FC-ofF[0], FC--oformatF[0]

Gets driver description

FC-eF[0] filename, FC--extentF[0] filename

Gets boundary from vector file

FC-ulxF[0] ULX, FC--ulxF[0] ULX

Upper left x value bounding box

FC-ulyF[0] ULY, FC--ulyF[0] ULY

Upper left y value bounding box

FC-lrxF[0] LRX, FC--lrxF[0] LRX

Lower right x value bounding box

FC-lryF[0] LRY, FC--lryF[0] LRY

Lower right y value bounding box

FC-otF[0], FC--otypeF[0]
FC-dF[0], FC--descriptionF[0]

Returns image description

FC-metaF[0], FC--metaF[0]

Shows meta data

FC-nodataF[0] value, FC--nodataF[0] 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[0]

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

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

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[0]

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[0]

show bounding box (FC-ulxF[0] FC-ulyF[0] FC-lrxF[0] FC-lryF[0]) in geo coordinates for image1.tif

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

show bounding box (FC-ulxF[0] FC-ulyF[0] FC-lrxF[0] FC-lryF[0]) in geo coordinates for each image (and union and intersect)

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

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[0]

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

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

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[0]

SEE ALSO

gdalinfo(1)

History