Scroll to navigation

pkinfo(1) pkinfo(1)

NAME

pkinfo - Report basic information from raster datasets

SYNOPSIS


pkinfo
-i 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

Input image file
Shows bounding box
Shows bounding box in GDAL format: xmin ymin xmax ymax
Image center in projected X,Y coordinates
Shows colour table
Number of samples in image
Number of lines in image
Show number of bands in image
Band specific information
Gets resolution in x (in m)
Gets resolution in y (in m)
Shows min and max value of the image
Shows min value of the image
Shows max value of the image
Shows statistics (min,max, mean and stdDev of the image)
Shows projection of the image
Gets geotransform
Shows image filename
Print filename to STDOUT if current image covers the provided coordinates via bounding box, (x y) coordinates or extent of vector file
x pos
y pos
Reads row y (in projected coordinates if geo option is set, otherwise in image coordinates, 0 based)
Gets reference pixel (lower left corner of center of gravity pixel)
Gets driver description
Gets boundary from vector file
Upper left x value bounding box
Upper left y value bounding box
Lower right x value bounding box
Lower right y value bounding box
Returns image description
Shows meta data
Sets no data value(s) for calculations (nodata values in input image)

EXAMPLE

show number of bands in raster image.tif

pkinfo -i image.tif -nb

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

pkinfo -i image.tif -max -b 1

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

pkinfo -i image.tif -x 0 -y 0 -r -b 3 -b 2 -b 1

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

pkinfo -i image.tif -x 3528120 -y 4329681 -geo -r -b 3 -b 2 -b 1

show bounding box (-ulx -uly -lrx -lry) in geo coordinates for image1.tif

pkinfo -i image1.tif -b

show bounding box (-ulx -uly -lrx -lry) in geo coordinates for each image (and union and intersect)

pkinfo -i image1.tif -i image2.tif -i image3.tif -b

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

pkinfo -i image1.tif --mask 0 --mask 255 -ref

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

pkinfo -i image.tif $(pkinfo -i image.tif -c) -geo -r

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

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

SEE ALSO

gdalinfo(1)

06 February 2024