pktools  2.6.7
Processing Kernel for geospatial data

Examples of pkinfo

pkinfo -i image.tif -nb

show number of bands in raster image.tif

pkinfo -i image.tif -max -b 1

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

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

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

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

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

pkinfo -i image1.tif -b

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

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

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

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

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

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

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

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

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