[pktools] 158/375: bug for output file in pklas2img

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 c21d18e2fa1f48d0de9dcd62692acb0970948147
Author: Pieter Kempeneers <kempenep at gmail.com>
Date:   Wed Dec 18 11:42:33 2013 +0100

    bug for output file in pklas2img
---
 ChangeLog                    | 2 ++
 doc/mainpage.dox             | 6 +++---
 src/algorithms/StatFactory.h | 2 +-
 src/apps/pklas2img.cc        | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c9b3275..3f3e67d 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -175,6 +175,8 @@ version 2.4.2
 	support of transposed output
 
 version 2.4.3
+ - StatFactory.h
+	corrected bug in interpolateUp (in case x_out < x_in)
  - pkclassify_nn
 	option msknodata and nodata to set nodata value in mask and classified image
  - pkclassify_svm
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 44af058..f14cf72 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -39,12 +39,12 @@ git clone git://git.savannah.nongnu.org/pktools.git
 
 \section pktools_refer How to refer
 
-You are welcome to refer to pktools as: http://pktools.nongnu.org (Pieter Kempeneers)
+Please refer to pktools as: http://pktools.nongnu.org (Pieter Kempeneers)
 
 contact: kempenep at gmail.com
 
 \section pktools_installation Installation
-Download the latest release from http://download.savannah.gnu.org/releases/pktools/ (e.g., pktools-2.4.tar.gz)
+Download the latest release from http://download.savannah.gnu.org/releases/pktools/ (e.g., pktools-2.4.3.tar.gz)
 \code
 tar xzvf pktools-2.4.tar.gz
 cd pktools-2.4
@@ -68,7 +68,7 @@ packages to install before pktools
 
 Prerequisites (optional)
 ------------------------
-if configured with `--enable-nlopt`: required for \ref pkfs_nn, \ref pkfs_svm, \ref pkopt_svm 
+if configured with `--enable-nlopt`: required for \ref pkopt_svm 
    - nlopt http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation 
 
 if configured with `--enable-las`: required for \ref pklas2img
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/pklas2img.cc b/src/apps/pklas2img.cc
index e881f21..6c2b7d2 100644
--- a/src/apps/pklas2img.cc
+++ b/src/apps/pklas2img.cc
@@ -194,7 +194,7 @@ int main(int argc,char **argv) {
   int nrow=ceil(maxULY-minLRY)/dy_opt[0];//number of rows in outputGrid
   //todo: multiple bands
   int nband=(composite_opt[0]=="profile")? nbin_opt[0] : 1;
-  if(output_opt.size()){
+  if(!output_opt.size()){
     cerr << "Error: no output file defined" << endl;
     exit(1);
   }

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