[pktools] 177/375: setGeoTransform in pklas2img and pkascii2img must have negative dy
Bas Couwenberg
sebastic at xs4all.nl
Wed Dec 3 21:54:11 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 ebcfefd1ef88becfbbd996ffcbf222ab4a576172
Author: Pieter Kempeneers <kempenep at kempenep-OptiPlex-9020.(none)>
Date: Thu Jan 9 11:34:44 2014 +0100
setGeoTransform in pklas2img and pkascii2img must have negative dy
---
doc/mainpage.dox | 6 ++++--
src/apps/pkascii2img.cc | 2 +-
src/apps/pklas2img.cc | 12 +++++++++---
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 7ddb513..c5398ca 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -83,6 +83,8 @@ packages to install before pktools
sudo apt-get install libnlopt-dev
\endcode
+ Note: currently, the repository seems not to include this package anymore and manual installation is required (see also http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation)
+
- Install pktools with with extra configuration option --enable-nlopt:
\code
@@ -108,7 +110,7 @@ packages to install before pktools
Install pktools with extra configuration option --libfann-dev:
\code
- ./configure --libfann-dev
+ ./configure --enable-fann
make
sudo make install
sudo ldconfig
@@ -135,7 +137,7 @@ packages to install before pktools
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main
\endcode
- - then instal extra packages:
+ - then install extra packages:
\code
sudo apt-get install libboost-dev liblas-dev liblas-c-dev liblas1 liblas2 liblas-c2 python-liblas
diff --git a/src/apps/pkascii2img.cc b/src/apps/pkascii2img.cc
index 5d6d0d3..82a10bb 100644
--- a/src/apps/pkascii2img.cc
+++ b/src/apps/pkascii2img.cc
@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
gt[2]=0;
gt[3]=uly_opt[0];
gt[4]=0;
- gt[5]=dy_opt[0];
+ gt[5]=-dy_opt[0];
imgWriter.setGeoTransform(gt);
imgWriter.setProjectionProj4(projection_opt[0]);
}
diff --git a/src/apps/pklas2img.cc b/src/apps/pklas2img.cc
index f7af41a..4591572 100644
--- a/src/apps/pklas2img.cc
+++ b/src/apps/pklas2img.cc
@@ -211,7 +211,7 @@ int main(int argc,char **argv) {
gt[2]=0;
gt[3]=maxULY;
gt[4]=0;
- gt[5]=dy_opt[0];
+ gt[5]=-dy_opt[0];
outputWriter.setGeoTransform(gt);
if(projection_opt.size()){
string projectionString=outputWriter.setProjectionProj4(projection_opt[0]);
@@ -296,10 +296,16 @@ int main(int argc,char **argv) {
int irow=static_cast<int>(drow);
// //test
// irow+=1;
- if(irow<0||irow>=nrow)
+ if(irow<0||irow>=nrow){
+ //test
+ cout << "Error: thePoint.GetX(),thePoint.GetY(),dcol,drow" << thePoint.GetX() << ", " << thePoint.GetY() << ", " << dcol << ", " << drow << endl;
continue;
- if(icol<0||icol>=ncol)
+ }
+ if(icol<0||icol>=ncol){
+ //test
+ cout << "Error: thePoint.GetX(),thePoint.GetY(),dcol,drow" << thePoint.GetX() << ", " << thePoint.GetY() << ", " << dcol << ", " << drow << endl;
continue;
+ }
assert(irow>=0);
assert(irow<nrow);
assert(icol>=0);
--
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