[pktools] 144/375: update Changelog vito
Bas Couwenberg
sebastic at xs4all.nl
Wed Dec 3 21:54:08 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 ac16aca8b60cd1cd1639b4212a256f27ae7a238c
Author: Pieter Kempeneers <kempenep at gmail.com>
Date: Fri Nov 29 10:01:30 2013 +0100
update Changelog vito
---
ChangeLog | 7 +++++--
src/apps/pkstatascii.cc | 24 +++++++++++++++++++-----
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ae3af38..5e62327 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -140,8 +140,6 @@ version 2.4.2
correct for wrong include path for FileReaderLas.h (lasclasses instead of fileclasses)
- pkfillnodata
default maximum distance changed from 3 to 0 (infinity)
- - still todo
- change all projection options to a_srs
- pkclassify_nn.h
support reading ogr files with single feature (one band only: "B" or "Band")
- pkclassify_nn.cc
@@ -155,3 +153,8 @@ version 2.4.2
cross validation parameter can not be 1
- pkfs_svm.cc
cross validation parameter can not be 1
+ - pkstat.cc->pkstatascii.cc
+ renamed to pkstatascii.cc to avoid confusion with raster data (e.g., pkinfo --stat)
+ support of transposed output
+ - still todo
+ change all projection options to a_srs
diff --git a/src/apps/pkstatascii.cc b/src/apps/pkstatascii.cc
index db11a72..b3404d8 100644
--- a/src/apps/pkstatascii.cc
+++ b/src/apps/pkstatascii.cc
@@ -32,6 +32,7 @@ int main(int argc, char *argv[])
Optionpk<char> fs_opt("fs","fs","field separator.",' ');
Optionpk<char> comment_opt("comment","comment","comment character",'#');
Optionpk<bool> output_opt("o","output","output the selected columns",false);
+ Optionpk<bool> transpose_opt("t","transpose","transpose input ascii vector (use in combination with --output)",false);
Optionpk<int> col_opt("c", "column", "column nr, starting from 0", 0);
Optionpk<int> range_opt("r", "range", "rows to start/end reading. Use -r 1 -r 10 to read first 10 rows where first row is header. Use 0 to read all rows with no header.", 0);
Optionpk<bool> size_opt("size","size","sample size",false);
@@ -65,6 +66,7 @@ int main(int argc, char *argv[])
fs_opt.retrieveOption(argc,argv);
comment_opt.retrieveOption(argc,argv);
output_opt.retrieveOption(argc,argv);
+ transpose_opt.retrieveOption(argc,argv);
col_opt.retrieveOption(argc,argv);
range_opt.retrieveOption(argc,argv);
size_opt.retrieveOption(argc,argv);
@@ -262,13 +264,25 @@ int main(int argc, char *argv[])
}
if(output_opt[0]){
- for(int irow=0;irow<dataVector.begin()->size();++irow){
+ if(transpose_opt[0]){
for(int icol=0;icol<col_opt.size();++icol){
- cout << dataVector[icol][irow];
- if(icol<col_opt.size()-1)
- cout << " ";
+ for(int irow=0;irow<dataVector.begin()->size();++irow){
+ cout << dataVector[icol][irow];
+ if(irow<dataVector.begin()->size()-1)
+ cout << " ";
+ }
+ cout << endl;
+ }
+ }
+ else{
+ for(int irow=0;irow<dataVector.begin()->size();++irow){
+ for(int icol=0;icol<col_opt.size();++icol){
+ cout << dataVector[icol][irow];
+ if(icol<col_opt.size()-1)
+ cout << " ";
+ }
+ cout << endl;
}
- cout << endl;
}
}
}
--
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