[pktools] 322/375: pkkalman bug: upsample coarse res image if no observation at initial time

Bas Couwenberg sebastic at xs4all.nl
Wed Dec 3 21:54:26 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 5c7bb1f61d24d412edd954fef2da9107bb567d44
Author: Pieter Kempeneers <kempenep at gmail.com>
Date:   Tue Sep 16 01:51:36 2014 -0700

    pkkalman bug: upsample coarse res image if no observation at initial time
---
 ChangeLog            |  8 ++++++++
 src/apps/pkkalman.cc | 22 ++++++++++++++++------
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bde1b8c..bbbe5ae 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -303,8 +303,16 @@ version 2.5.3
 	libLAS 1.8.0 support (ticket #42951)
  - myfann_cpp.h 
 	Fix build failure on ARM due to va_list usage in myfann_cpp.h
+
+
+version 2.5.4
  - pkinfo
 	Support multiple input bands when calculating statistics
+
 Next versions: 
  - todo for API: ImgReaderGdal (ImgWriterGdal) open in update mode (check gdal_edit.py: http://searchcode.com/codesearch/view/18938404)
+ - pkextract
+	support variance rule for polygon features (ticket #43193)
+	support overwrite vector files (ticket #43194)
+	support multiple attributes
 
diff --git a/src/apps/pkkalman.cc b/src/apps/pkkalman.cc
index 0e67496..eff5c4e 100644
--- a/src/apps/pkkalman.cc
+++ b/src/apps/pkkalman.cc
@@ -281,10 +281,15 @@ int main(int argc,char **argv) {
 	try{
 	  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow);
 	  //simple nearest neighbor
-	  stat.nearUp(estReadBuffer,estWriteBuffer);
-	  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
-	  for(int icol=0;icol<ncol;++icol)
+	  //stat.nearUp(estReadBuffer,estWriteBuffer);
+
+	  for(int icol=0;icol<ncol;++icol){
+	    imgWriterEst.image2geo(icol,irow,x,y);
+	    imgReaderModel1.geo2image(x,y,modCol,modRow);
+	    estWriteBuffer[icol]=estReadBuffer[modCol];
 	    uncertWriteBuffer[icol]=uncertModel_opt[0]*stdDev;
+	  }
+	  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
 	  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
 	}
 	catch(string errorString){
@@ -595,10 +600,15 @@ int main(int argc,char **argv) {
 	try{
 	  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow);
 	  //simple nearest neighbor
-	  stat.nearUp(estReadBuffer,estWriteBuffer);
-	  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
-	  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol)
+	  //stat.nearUp(estReadBuffer,estWriteBuffer);
+
+	  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
+	    imgWriterEst.image2geo(icol,irow,x,y);	    
+	    imgReaderModel1.geo2image(x,y,modCol,modRow);
+	    estWriteBuffer[icol]=estReadBuffer[modCol];
 	    uncertWriteBuffer[icol]=uncertModel_opt[0]*stdDev;
+	  }
+	  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
 	  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
 	}
 	catch(string errorString){

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