Man page - pkdiff(1)
Packages contains this manual
- pkfssvm(1)
- pkstatogr(1)
- pkfilterdem(1)
- pkextractimg(1)
- pkkalman(1)
- pksetmask(1)
- pksvm(1)
- pkascii2img(1)
- pkdsm2shadow(1)
- pkascii2ogr(1)
- pkpolygonize(1)
- pkfillnodata(1)
- pkextractogr(1)
- pksieve(1)
- pkdumpogr(1)
- pkstat(1)
- pkannogr(1)
- pkegcs(1)
- pkfilterascii(1)
- pkreclassogr(1)
- pksvmogr(1)
- pkgetmask(1)
- pkdiff(1)
- pkfsann(1)
- pkregann(1)
- pkcreatect(1)
- pkcomposite(1)
- pkstatascii(1)
- pkdumpimg(1)
- pkstatprofile(1)
- pkinfo(1)
- pkcrop(1)
- pkoptsvm(1)
- pkann(1)
- pkreclass(1)
- pkfilter(1)
apt-get install pktools
Manual
pkdiff
NAMESYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE
NAME
pkdiff - program to compare two raster image files
SYNOPSIS
pkdiff -i input -ref reference [ options ] [ advanced options ]
DESCRIPTION
pkdiff compares two datasets. The reference can either be a raster or a vector, but the input must be a raster dataset. In case the reference is a raster dataset, a pixel by pixel comparison is performed. With no further options, the utility reports if the rasters are identical or different. If required, an output raster dataset can be written with a qualitative information per pixel: 0 (input=reference), 1 (input>reference) or 2 (input<reference). If, however, the reference is a vector dataset, it must consist of point features. Polygon features are automatically converted to the centroid points before analyzing.
A typical use of the utility is to assess the accuracy of an input raster land cover map, based on a reference vector dataset. The reference dataset must contain an attribute (label) for each class. A confusion matrix is produced if the option -cm | --confusion is set. Here too, an output dataset can be written, which will be a vector dataset in this case. It contains the reference feature points with the extracted data value of the raster input dataset as a new attribute.
OPTIONS
-i filename , --input filename
Input raster dataset.
-ref filename , --reference filename
Reference (raster or vector) dataset
-ln layer , --ln layer
Layer name(s) in sample. Leave empty to select all (for vector reference datasets only)
-b band , --band band
Input raster band
-cm , --confusion
Create confusion matrix (to stdout)
-lr attribute , --lref attribute
Attribute name of the reference label (for vector reference datasets only)
-c name , --class name
List of class names.
-r value , --reclass value
List of class values (use same order as in classname option).
-nodata value , --nodata value
No data value(s) in input or reference dataset are ignored
-m mask , --mask mask
Use the first band of the specified file as a validity mask. Nodata values can be set with the option --msknodata .
-msknodata value , --msknodata value
Mask value(s) where image is invalid. Use negative value for valid data (example: use -t -1: if only -1 is valid value)
-v level , --verbose level
verbose level
Advanced options
-o
output
,
--output
output
Output dataset (optional)
-f OGRformat , --f OGRformat
OGR format for output vector (for vector reference datasets only)
-of GDALformat , --oformat GDALformat
Output image format (see also gdal_translate (1)). Empty string: inherit from input image
-lc attribute , --lclass attribute
Attribute name of the classified label (for vector reference datasets only)
--commission value
Value for commission errors: input label < reference label
-bnd value , --boundary value
Boundary for selecting the sample (for vector reference datasets only)
-hom , --homogeneous
Only take regions with homogeneous boundary into account (for reference datasets only)
-circ , --circular
Use circular boundary (for vector reference datasets only)
-ct colortable , --ct colortable
Color table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid).
-co NAME=VALUE , --co NAME=VALUE
Creation option for output file. Multiple options can be specified.
EXAMPLE
Check if two raster images are different (reports only if images are different or not)
pkdiff -i input.tif -ref reference.tif
Validate a classification map using points from a reference sample and report confusion matrix
pkdiff -i classificationMap.tif -ref referencePoints.tif -cm