[pktools] 36/375: small changes in pkinfo, see Changelog
Bas Couwenberg
sebastic at xs4all.nl
Wed Dec 3 21:53:56 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 a2ec86121f2ce68f7495dcba402110ae49718192
Author: Pieter Kempeneers <kempenep at gmail.com>
Date: Wed Jan 23 09:14:52 2013 +0100
small changes in pkinfo, see Changelog
---
ChangeLog | 1 +
src/apps/pkinfo.cc | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6e3148c..3c7a046 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@ version 2.4
support of nodata value when calculating histogram and image statistics
options min and max are now set with -min (--min) and -max (--max)
option min and max now per default empty and can be set individually for calculating histogram
+ segmentation fault with option -ct if no color table was defined
- pkfilter
bug solved in update of progress bar
support of standard deviation
diff --git a/src/apps/pkinfo.cc b/src/apps/pkinfo.cc
index 98e06af..da5fab3 100644
--- a/src/apps/pkinfo.cc
+++ b/src/apps/pkinfo.cc
@@ -241,10 +241,14 @@ int main(int argc, char *argv[])
}
if(colorTable_opt[0]){
GDALColorTable* colorTable=imgReader.getColorTable();
- for(int index=0;index<colorTable->GetColorEntryCount();++index){
- GDALColorEntry sEntry=*(colorTable->GetColorEntry(index));
- std::cout << index << " " << sEntry.c1 << " " << sEntry.c2 << " " << sEntry.c3 << " " << sEntry.c4 << std::endl;
+ if(colorTable!=NULL){
+ for(int index=0;index<colorTable->GetColorEntryCount();++index){
+ GDALColorEntry sEntry=*(colorTable->GetColorEntry(index));
+ std::cout << index << " " << sEntry.c1 << " " << sEntry.c2 << " " << sEntry.c3 << " " << sEntry.c4 << std::endl;
+ }
}
+ else
+ std::cout << "--ct none ";
}
if(samples_opt[0])
std::cout << "--samples " << imgReader.nrOfCol() << " ";
--
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