[pktools] 159/375: hide some options in pkdiff

Bas Couwenberg sebastic at xs4all.nl
Wed Dec 3 21:54:09 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 ce69ad46138e2c34ab690dd0592eff04f1b7ceb9
Author: Pieter Kempeneers <kempenep at gmail.com>
Date:   Wed Dec 18 21:29:00 2013 +0100

    hide some options in pkdiff
---
 src/algorithms/StatFactory.h |  2 +-
 src/apps/pkclassify_nn.cc    |  2 +-
 src/apps/pkclassify_svm.cc   |  2 +-
 src/apps/pkdiff.cc           | 12 ++++++------
 src/apps/pkextract.cc        |  2 +-
 src/apps/pkopt_svm.cc        |  4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/algorithms/StatFactory.h b/src/algorithms/StatFactory.h
index baef30c..0903e77 100644
--- a/src/algorithms/StatFactory.h
+++ b/src/algorithms/StatFactory.h
@@ -671,7 +671,7 @@ template<class T> void StatFactory::interpolateUp(const std::vector<double>& wav
   assert(&(input[0]));
   initSpline(spline,&(wavelengthIn[0]),&(input[0]),nband);
   for(int index=0;index<wavelengthOut.size();++index){
-    if(wavelengthOut[index]<wavelengthIn.back()){
+    if(wavelengthOut[index]<*wavelengthIn.begin()){
       output.push_back(*(input.begin()));
       continue;
     }
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index 419b27a..7c2ec41 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
   Optionpk<string> active_opt("active", "active", "ogr output for active training sample."); 
   Optionpk<unsigned int> nactive_opt("na", "nactive", "number of active training points",1);
   Optionpk<string> classname_opt("c", "class", "list of class names."); 
-  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in classname opt."); 
+  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in class opt)."); 
   Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0);
 
   bool doProcess;//stop process when program was invoked with help option (-h --help)
diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index 8a1e2f1..d505cd1 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
   Optionpk<string> active_opt("active", "active", "ogr output for active training sample."); 
   Optionpk<unsigned int> nactive_opt("na", "nactive", "number of active training points",1);
   Optionpk<string> classname_opt("c", "class", "list of class names."); 
-  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in classname opt."); 
+  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in class opt)."); 
   Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0);
 
   bool doProcess;//stop process when program was invoked with help option (-h --help)
diff --git a/src/apps/pkdiff.cc b/src/apps/pkdiff.cc
index a007699..aa46af2 100644
--- a/src/apps/pkdiff.cc
+++ b/src/apps/pkdiff.cc
@@ -33,17 +33,17 @@ int main(int argc, char *argv[])
   Optionpk<string> mask_opt("m", "mask", "Mask image file. A single mask is supported only, but several mask values can be used. See also msknodata option. (default is empty)");
   Optionpk<int> masknodata_opt("msknodata", "msknodata", "Mask value(s) where image is invalid. Use negative value for valid data (example: use -t -1: if only -1 is valid value)", 0);
   Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
-  Optionpk<short> valueE_opt("\0", "correct", "Value for correct pixels (0)", 0);
-  Optionpk<short> valueO_opt("\0", "omission", "Value for omission errors: input label > reference label (default value is 1)", 1);
-  Optionpk<short> valueC_opt("\0", "commission", "Value for commission errors: input label < reference label (default value is 2)", 2);
+  Optionpk<short> valueE_opt("\0", "correct", "Value for correct pixels (0)", 0,1);
+  Optionpk<short> valueO_opt("\0", "omission", "Value for omission errors: input label > reference label (default value is 1)", 1,1);
+  Optionpk<short> valueC_opt("\0", "commission", "Value for commission errors: input label < reference label (default value is 2)", 2,1);
   Optionpk<short> nodata_opt("nodata", "nodata", "No value flag(s)", 0);
   Optionpk<short> band_opt("b", "band", "Band to extract (0)", 0);
   Optionpk<bool> confusion_opt("cm", "confusion", "create confusion matrix (to std out) (default value is 0)", false);
   Optionpk<string> labelref_opt("lr", "lref", "name of the reference label in case reference is shape file(default is label)", "label");
   Optionpk<string> labelclass_opt("lc", "lclass", "name of the classified label in case output is shape file (default is class)", "class");
-  Optionpk<short> boundary_opt("\0", "boundary", "boundary for selecting the sample (default: 1)", 1);
-  Optionpk<bool> disc_opt("\0", "circular", "use circular disc kernel boundary)", false);
-  Optionpk<bool> homogeneous_opt("\0", "homogeneous", "only take homogeneous regions into account", false);
+  Optionpk<short> boundary_opt("bnd", "boundary", "boundary for selecting the sample (default: 1)", 1,1);
+  Optionpk<bool> disc_opt("\0", "circular", "use circular disc kernel boundary)", false,1);
+  Optionpk<bool> homogeneous_opt("hom", "homogeneous", "only take homogeneous regions into account", false,1);
   Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
   Optionpk<string> classname_opt("c", "class", "list of class names."); 
   Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in classname opt."); 
diff --git a/src/apps/pkextract.cc b/src/apps/pkextract.cc
index 189af23..17c5b76 100644
--- a/src/apps/pkextract.cc
+++ b/src/apps/pkextract.cc
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
   Optionpk<string> ltype_opt("lt", "ltype", "Label type: In16 or String", "Integer");
   Optionpk<string> fieldname_opt("bn", "bname", "Field name of output shape file", "B");
   Optionpk<string> label_opt("cn", "cname", "name of the class label in the output vector file", "label");
-  Optionpk<bool> polygon_opt("l", "line", "create OGRPolygon as geometry instead of OGRPoint. Only if sample option is also of polygon type.", false);
+  Optionpk<bool> polygon_opt("polygon", "polygon", "create OGRPolygon as geometry instead of OGRPoint. Only if sample option is also of polygon type.", false);
   Optionpk<int> band_opt("b", "band", "band index to crop. Use -1 to use all bands)", -1);
   Optionpk<string> rule_opt("r", "rule", "rule how to report image information per feature. point (value at each point or at centroid of the polygon if line is set), centroid, mean (mean value written to centroid of polygon if line is set), proportion, minimum (of polygon), maximum (of polygon), maxvote.", "point");
   Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0);
diff --git a/src/apps/pkopt_svm.cc b/src/apps/pkopt_svm.cc
index cda45d4..d8b6f47 100644
--- a/src/apps/pkopt_svm.cc
+++ b/src/apps/pkopt_svm.cc
@@ -63,8 +63,8 @@ Optionpk<bool> costfunction_opt("cf", "cf", "use Overall Accuracy instead of kap
 // Optionpk<bool> weight_opt("wi", "wi", "set the parameter C of class i to weight*C, for C-SVC",true);
 Optionpk<unsigned short> cv_opt("cv", "cv", "n-fold cross validation mode",2);
 Optionpk<string> classname_opt("c", "class", "list of class names."); 
-Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in classname opt."); 
-Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0);
+Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in class opt)."); 
+Optionpk<short> verbose_opt("v", "verbose", "use 1 to output intermediate results for plotting",0);
 
 double objFunction(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data){
 

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