[pktools] 351/375: added descriptions for utilities

Bas Couwenberg sebastic at xs4all.nl
Wed Dec 3 21:54:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch upstream-master
in repository pktools.

commit 67c9950a8e610622cfc06aedbfce4ada5b8683e8
Author: Pieter Kempeneers <kempenep at gmail.com>
Date:   Sun Nov 9 14:13:29 2014 +0100

    added descriptions for utilities
---
 doc/createappsdox.sh              | 39 ++++++++++++++++++---------------------
 doc/description_pkann.dox         |  0
 doc/description_pkascii2img.dox   |  0
 doc/description_pkascii2ogr.dox   |  0
 doc/description_pkcomposite.dox   | 14 ++++++++++++++
 doc/description_pkcreatect.dox    |  0
 doc/description_pkcrop.dox        | 14 ++++++++++++++
 doc/description_pkdiff.dox        | 19 +++++++++++++++++++
 doc/description_pkdsm2shadow.dox  |  0
 doc/description_pkdumpimg.dox     |  0
 doc/description_pkdumpogr.dox     |  0
 doc/description_pkeditogr.dox     |  0
 doc/description_pkegcs.dox        |  0
 doc/description_pkenhance.dox     |  0
 doc/description_pkextract.dox     | 19 +++++++++++++++++++
 doc/description_pkfillnodata.dox  |  0
 doc/description_pkfilter.dox      | 11 +++++++++++
 doc/description_pkfilterascii.dox |  0
 doc/description_pkfilterdem.dox   |  0
 doc/description_pkfsann.dox       |  0
 doc/description_pkfssvm.dox       | 15 +++++++++++++++
 doc/description_pkgetmask.dox     |  0
 doc/description_pkinfo.dox        | 10 ++++++++++
 doc/description_pkkalman.dox      |  0
 doc/description_pklas2img.dox     |  0
 doc/description_pkndvi.dox        |  0
 doc/description_pkoptsvm.dox      | 16 ++++++++++++++++
 doc/description_pkpolygonize.dox  |  0
 doc/description_pkreclass.dox     |  0
 doc/description_pkregann.dox      |  0
 doc/description_pksetmask.dox     |  0
 doc/description_pksieve.dox       |  0
 doc/description_pkstatascii.dox   |  0
 doc/description_pkstatogr.dox     | 11 +++++++++++
 doc/description_pksvm.dox         | 16 ++++++++++++++++
 35 files changed, 163 insertions(+), 21 deletions(-)

diff --git a/doc/createappsdox.sh b/doc/createappsdox.sh
index c497a7e..76044b4 100755
--- a/doc/createappsdox.sh
+++ b/doc/createappsdox.sh
@@ -1,37 +1,34 @@
 #!/bin/bash
 
 echo "create header"
-cat > ../doc/header.dox <<EOF
-\section thetool thetool
-theshortdescription
 
-## SYNOPSIS
-<code>
-thesynopsis
-</code>
+echo "create dox files for applications"
+for file in ../src/apps/pk*.cc;do    
+    THETOOL=$(basename $file .cc)
+    echo ${THETOOL}
+
+    THESHORTDESCRIPTION=$(grep "${THETOOL}.cc: " $file | awk -v FS=':' '{print $2}')
+    THESYNOPSIS="${THETOOL} [OPTIONS]"
+    cat > ../doc/${THETOOL}.dox <<EOF
+\section $THETOOL $THETOOL
+$THESHORTDESCRIPTION
+
+EOF
+
+    #create description if not exists
+    touch ../doc/description_${THETOOL}.dox
 
-## DESCRIPTION ##
-thelongdescription
+    cat ../doc/description_${THETOOL}.dox >> ../doc/${THETOOL}.dox
 
 ## OPTIONS ##
+    cat >> ../doc/${THETOOL}.dox <<EOF
+\section ${THETOOL}_options Options
  - use either \`-short\` or \`--long\` options (both \`--long=value\` and \`--long value\` are supported)
  - short option \`-h\` shows basic options only, long option \`--help\` shows all options
 |short|long|type|default|description|
 |-----|----|----|-------|-----------|
 EOF
 
-echo "create dox files for applications"
-for file in ../src/apps/pk*.cc;do    
-    THETOOL=$(basename $file .cc)
-    echo ${THETOOL}
-    cat ../doc/header.dox > ../doc/${THETOOL}.dox
-    sed -i "s/thetool/$THETOOL/g" ../doc/${THETOOL}.dox
-    THESHORTDESCRIPTION=$(grep "${THETOOL}.cc: " $file | awk -v FS=':' '{print $2}')
-    sed -i "s/theshortdescription/$THESHORTDESCRIPTION/" ../doc/${THETOOL}.dox
-    THESYNOPSIS="${THETOOL} [OPTIONS]"
-    sed -i "s/thesynopsis/$THESYNOPSIS/" ../doc/${THETOOL}.dox
-    THELONGDESCRIPTION="$THESHORTDESCRIPTION more..."
-    sed -i "s/thelongdescription/$THELONGDESCRIPTION/" ../doc/${THETOOL}.dox
     ${THETOOL} --doxygen|sed '$d' >> ../doc/${THETOOL}.dox
     echo >> ../doc/${THETOOL}.dox
     echo "Examples" >> ../doc/${THETOOL}.dox
diff --git a/doc/description_pkann.dox b/doc/description_pkann.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkascii2img.dox b/doc/description_pkascii2img.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkascii2ogr.dox b/doc/description_pkascii2ogr.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkcomposite.dox b/doc/description_pkcomposite.dox
new file mode 100644
index 0000000..8452186
--- /dev/null
+++ b/doc/description_pkcomposite.dox
@@ -0,0 +1,14 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkcomposite -i input [-i input]* -o output 
+
+  Options: [-b band]* [-dx xres] [-dy yres] [-e vector] [-ulx ULX -uly ULY -lrx LRX -lry LRY] [-cr rule] [-cb band] [-srcnodata value] [-bndnodata band] [-min value] [-max value] [-dstnodata value] [-r resampling_method] [-ot {Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 / Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}] [-of format] [-co NAME=VALUE]* [-a_srs epsg:number]
+
+  Advanced options:
+       [-file] [-w weight]* [-c class]* [-ct colortable] [-d description]
+</code>
+
+\section pkcomposite_description Description
+
+The utility pkcomposite can be used to \em{mosaic} and \em{composite} multiple (georeferenced) raster datasets. A mosaic can merge images with different geographical extents into a single larger image. Compositing resolves the overlapping pixels according to some rule (e.g, the median of all overlapping pixels). This utility is complementary to GDAL, which currently does not support a composite step. Input datasets can have different bounding boxes and spatial resolutionsresolution.
diff --git a/doc/description_pkcreatect.dox b/doc/description_pkcreatect.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkcrop.dox b/doc/description_pkcrop.dox
new file mode 100644
index 0000000..fb4e61e
--- /dev/null
+++ b/doc/description_pkcrop.dox
@@ -0,0 +1,14 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkcrop -i input -o output 
+
+  Options: [-of out_format] [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}] [-b band]* [-ulx ULX -uly ULY -lrx LRX -lry LRY] [-dx xres] [-dy yres] [-r resampling_method] [-a_srs epsg:number] [-dstnodata value] 
+
+  Advanced options:
+  	   [-e vector [-m]] [-co NAME=VALUE]* [-x center_x -y center_y] [-nx size_x -ny size_y] [-ns nsample -nl nlines] [-as min -as max] [-s scale]* [-off offset]* [-ct colortable] [-d description] 
+</code>
+
+\section pkcrop_description Description
+
+The utility pkcrop can subset and stack raster images. In the spatial domain it can crop a bounding box from a larger image. The output bounding box is selected by setting the new corner coordinates using the options -ulx -uly -lrx -lry. Alternatively you can set the new image center (-x -y) and size. This can be done either in projected coordinates (using the options -nx -ny) or in image coordinates (using the options -ns -nl). You can also use a vector file to set the new bounding box  [...]
\ No newline at end of file
diff --git a/doc/description_pkdiff.dox b/doc/description_pkdiff.dox
new file mode 100644
index 0000000..cfe49ff
--- /dev/null
+++ b/doc/description_pkdiff.dox
@@ -0,0 +1,19 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkdiff -i input -ref reference 
+
+  Options: [-ln layer] [-b band] [-cm] [-lr attribute] [-c name -r value]* [-nodata value]* [-m mask] [-msknodata value]*
+
+  Advanced options:
+       [-o output] [-f OGR format] [-lc attribute] [-bnd value [-hom] [-circ]] [-ct colortable] [-co NAME=VALUE]* 
+
+</code>
+
+\section pkdiff_description Description
+
+The utility 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.
diff --git a/doc/description_pkdsm2shadow.dox b/doc/description_pkdsm2shadow.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkdumpimg.dox b/doc/description_pkdumpimg.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkdumpogr.dox b/doc/description_pkdumpogr.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkeditogr.dox b/doc/description_pkeditogr.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkegcs.dox b/doc/description_pkegcs.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkenhance.dox b/doc/description_pkenhance.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkextract.dox b/doc/description_pkextract.dox
new file mode 100644
index 0000000..f0e20f7
--- /dev/null
+++ b/doc/description_pkextract.dox
@@ -0,0 +1,19 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkextract -i input [-s sample | -rand number | -grid size] -o output 
+
+  Options: [-ln layer]* [-c class]* [-t threshold]* [-f format] [-ft fieldType] [-lt labelType] [-polygon] [-b band]* [-r rule]
+
+  Advanced options:
+       [-bndnodata band -srcnodata value]* [-tp threshold] [-test testSample] [-bn attribute] [-cn attribute] [-geo value] [-down value] [-bo value [-circ]]
+</code>
+
+\section pkextract_description Description
+
+The utility pkextract extracts pixel values from an input raster dataset, based on the locations you provide via a sample file. Alternatively, a random sample or systematic grid of points can also be extracted. The sample can be a vector file with points or polygons. In the case of polygons, you can either extract the values for all raster pixels that are covered by the polygons, or extract a single value for each polygon such as the centroid, mean, median, etc. As output, a new copy of  [...]
+
+Instead of a vector dataset, the sample can also be a raster dataset with categorical values. The typical use case is a land cover map that overlaps the input raster dataset. The utility then extracts pixels from the input raster for the respective land cover classes. To select a random subset of the sample raster dataset you can set the threshold option -t with a percentage value. 
+
+A typical usage of pkextract is to prepare a training sample for one of the classifiers implemented in pktools.
+
diff --git a/doc/description_pkfillnodata.dox b/doc/description_pkfillnodata.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkfilter.dox b/doc/description_pkfilter.dox
new file mode 100644
index 0000000..f87c97a
--- /dev/null
+++ b/doc/description_pkfilter.dox
@@ -0,0 +1,11 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkilter -i input -o ouptut
+
+  Options: [-f filter] [options]
+
+  Advanced options:
+</code>
+
+This utility implements spatial and spectral filtering for raster data. In the spatial domain (X, Y), the filter typically involves a rectangular convolution kernel (moving window). To avoid image shifting, the size of the window should be odd (3, 5, 7, ...). You can set the window sizes in X and Y directions separately with the options -dx and -dy. A circular kernel (disc) is applied if option -c is set. An overview of the supported filters (option -f|--filter) is given below. You can c [...]
diff --git a/doc/description_pkfilterascii.dox b/doc/description_pkfilterascii.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkfilterdem.dox b/doc/description_pkfilterdem.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkfsann.dox b/doc/description_pkfsann.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkfssvm.dox b/doc/description_pkfssvm.dox
new file mode 100644
index 0000000..bf8f49d
--- /dev/null
+++ b/doc/description_pkfssvm.dox
@@ -0,0 +1,15 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkfssvm -t training
+
+  Options: [-n number]
+
+  Advanced options:
+</code>
+
+\section pkfssvm_description Description
+
+Classification problems dealing with high dimensional input data can be challenging due to the Hughes phenomenon. Hyperspectral data, for instance, can have hundreds of spectral bands and require special attention when being classified. In particular when limited training data are available, the classification of such data can be problematic without reducing the dimension.
+
+The SVM classifier has been shown to be more robust to this type of problem than others. Nevertheless, classification accuracy can often be improved with feature selection methods. The utility pkfssvm implements a number of feature selection techniques, among which a sequential floating forward search (SFFS).
diff --git a/doc/description_pkgetmask.dox b/doc/description_pkgetmask.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkinfo.dox b/doc/description_pkinfo.dox
new file mode 100644
index 0000000..39edba7
--- /dev/null
+++ b/doc/description_pkinfo.dox
@@ -0,0 +1,10 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkinfo -i input [options]
+
+</code>
+
+\section pkinfo_description Description
+
+The utility pkinfo retrieves basic information about a raster data set. 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. Some examples are given in later in this section.
\ No newline at end of file
diff --git a/doc/description_pkkalman.dox b/doc/description_pkkalman.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pklas2img.dox b/doc/description_pklas2img.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkndvi.dox b/doc/description_pkndvi.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkoptsvm.dox b/doc/description_pkoptsvm.dox
new file mode 100644
index 0000000..c45618e
--- /dev/null
+++ b/doc/description_pkoptsvm.dox
@@ -0,0 +1,16 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkoptsvm -t training
+
+  Options: [-cc startvalue -cc endvalue] [-g startvalue -g endvalue] [-stepcc stepsize] [-stepg stepsize]
+
+  Advanced options:
+</code>
+
+\section pkoptsvm_description Description
+
+The support vector machine depends on several parameters. Ideally, these parameters should be optimized for each classification problem. In case of a radial basis kernel function, two important parameters are \em{cost} and \em{gamma}. The utility pkoptsvm can optimize these two parameters, based on an accuracy assessment (the Kappa value). If an input test set (-i) is provided, it is used for the accuracy assessment. If not, the accuracy assessment is based on a cross validation (-cv) of [...]
+
+The optimization routine uses a grid search. The initial and final values of the parameters can be set with -cc startvalue -cc endvalue and -g startvalue -g endvalue for cost and gamma respectively. The search uses a multiplicative step for iterating the parameters (set with the options -stepcc and -stepg). An often used approach is to define a relatively large multiplicative step first (e.g 10) to obtain an initial estimate for both parameters. The estimate can then be optimized by defi [...]
+
diff --git a/doc/description_pkpolygonize.dox b/doc/description_pkpolygonize.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkreclass.dox b/doc/description_pkreclass.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkregann.dox b/doc/description_pkregann.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pksetmask.dox b/doc/description_pksetmask.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pksieve.dox b/doc/description_pksieve.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkstatascii.dox b/doc/description_pkstatascii.dox
new file mode 100644
index 0000000..e69de29
diff --git a/doc/description_pkstatogr.dox b/doc/description_pkstatogr.dox
new file mode 100644
index 0000000..c9e374d
--- /dev/null
+++ b/doc/description_pkstatogr.dox
@@ -0,0 +1,11 @@
+## SYNOPSIS
+
+<code>
+  Usage: pkstatogr -i input 
+
+  Options: [-ln layer]* [-n attribute]* [srcnodata]* [src_min] [src_max] [-s] [-mm] [-min] [-max] [-mean] [-median] [-stdev] [-hist] [-nbin] [-rel] [-kde]
+</code>
+
+\section pkstatogr_description Description
+
+The utility pkstatogr calculates basic statistics on attributes of a vector file. Examples of the basic statistics include: minimum, maximum, median, mean and standard deviation. Histograms (in percentage or absolute values) can also be calculated. The attribute of interest can be selected using the option -n|--fname. Values defined by the -nodata option, or not withing the limits set by the options -src_min and -src_max are ignored for the statistics.
diff --git a/doc/description_pksvm.dox b/doc/description_pksvm.dox
new file mode 100644
index 0000000..9fca90b
--- /dev/null
+++ b/doc/description_pksvm.dox
@@ -0,0 +1,16 @@
+## SYNOPSIS
+
+<code>
+  Usage: pksvm -t training [-i input -o output] [-cv value]
+
+  Options: [-tln layer]* [-c name -r value]* [-of GDALformat|-f OGRformat] [-co NAME=VALUE]* [-ct filename] [-label attribute] [-prior value]* [-g gamma] [-cc cost] [-m filename [-msknodata value]*] [-nodata value]
+
+  Advanced options:
+       [-b band] [-bs band] [-be band] [-balance size]* [-min] [-bag value] [-bs value] [-comb rule] [-cb filename] [-prob filename] [-pim priorimage] [--offset value] [--scale value] [-svmt type] [-kt type] [-kd value]  [-c0 value] [-nu value] [-eloss value] [-cache value] [-etol value] [-shrink]
+</code>
+
+\section pksvm_description Description
+
+The utility pksvm implements a support vector machine (SVM) to solve a supervised classification problem. The implementation is based on the open source C++ library libSVM (http://www.csie.ntu.edu.tw/~cjlin/libsvm). 
+Both raster and vector files are supported as input. The output will contain the classification result, either in raster or vector format, corresponding to the format of the input. A training sample must be provided as an OGR vector dataset that contains the class labels and the features for each training point. The point locations are not considered in the training step. You can use the same training sample for classifying different images, provided the number of bands of the images are [...]
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git



More information about the Pkg-grass-devel mailing list