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 48067af955da578d00b05f1ce8f5abd77a180905
Author: Pieter Kempeneers <kempe...@gmail.com>
Date:   Mon Jul 15 17:46:35 2013 +0200

    version 2.4.1
---
 ChangeLog                  |  6 ++++++
 configure.ac               |  2 +-
 doc/examples_pkcrop.dox    |  6 +++---
 doc/examples_pksetmask.dox |  2 +-
 src/apps/pkascii2img.cc    | 12 +++++++-----
 src/apps/pkcrop.cc         |  4 ++--
 src/apps/pkfilter.cc       | 10 +++-------
 src/base/Optionpk.h        |  4 +++-
 8 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0aa47e8..9748a4e 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,3 +102,9 @@ version 2.4
        support doxygen to document code
  - doc
        directory for doxy input files
+
+version 2.4.1
+ - pkfilterascii
+       filter spectra in ASCII file (including wavelet transform)
+ - pkfilter
+       discrete wavelet transform (dwtForward, dwtInverse, dwtQuantize)
diff --git a/configure.ac b/configure.ac
index 097286f..b6b157d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([pktools], [2.4], [kempe...@gmail.com])
+AC_INIT([pktools], [2.4.1], [kempe...@gmail.com])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/doc/examples_pkcrop.dox b/doc/examples_pkcrop.dox
index b44a059..44e0cff 100644
--- a/doc/examples_pkcrop.dox
+++ b/doc/examples_pkcrop.dox
@@ -11,7 +11,7 @@ gdal_rasterize -i -burn 0 -l extent extent.shp output.tif
 crop image.tif to the envelop of the given polygon and mask all pixels outside 
polygon as 0 (using gdal_rasterize)
 
 \code
-pkcrop -i input.tif -b 3 -b 2 -b 1
+pkcrop -i input.tif -b 3 -b 2 -b 1 -o output.tif
 \endcode
 extract bands 3,2,1 (starting from 0) in that order from multi-band raster 
image input.tif
 
@@ -26,6 +26,6 @@ pkcrop -i fimage.tif -as 0 -as 100 -ot Byte -o bimage.tif -ct 
colortable.txt
 auto scale raster floating point image fimage.tif to [0:100] and write as 
single byte image with the given colourtable 
 
 \code
-pkcrop -i large.tif $(pkinfo -i small.tif -bb) -o output.tif
+pkcrop -i large.tif $(pkinfo -i small.tif -bb -dx -dy) -o output.tif
 \endcode
-crop raster image large.tif to the bounding box of raster image small.tif   
+crop raster image large.tif to the bounding box of raster image small.tif and 
forcing to the same pixel size 
diff --git a/doc/examples_pksetmask.dox b/doc/examples_pksetmask.dox
index 7bc3848..d12e580 100644
--- a/doc/examples_pksetmask.dox
+++ b/doc/examples_pksetmask.dox
@@ -1,4 +1,4 @@
-\section examples_pkpolygonize Examples of pkpolygonize
+\section examples_pksetmask Examples of pksetmask
 \code
 pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte -t 0 -f 255
 \endcode
diff --git a/src/apps/pkascii2img.cc b/src/apps/pkascii2img.cc
index 4e3e064..d50993b 100644
--- a/src/apps/pkascii2img.cc
+++ b/src/apps/pkascii2img.cc
@@ -29,16 +29,16 @@ int main(int argc, char *argv[])
   Optionpk<std::string> input_opt("i","input","input ASCII file");
   Optionpk<string> output_opt("o", "output", "Output image file");
   Optionpk<string> dataType_opt("ot", "otype", "Data type for output image 
({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}).
 Empty string: inherit type from input image","Byte");
-  Optionpk<string> imageType_opt("of", "oformat", "image type string (default: 
GTiff, see also gdal_translate)", "GTiff");
+  Optionpk<string> imageType_opt("of", "oformat", "image type string (see also 
gdal_translate)", "GTiff");
   Optionpk<string> option_opt("co", "co", "options: NAME=VALUE [-co 
COMPRESS=LZW] [-co INTERLEAVE=BAND]");
   Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box (in 
geocoordinates if georef is true)", 0.0);
   Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box (in 
geocoordinates if georef is true)", 0.0);
-  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter) 
(default is 0.0: keep original resolution)", 0.0);
-  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter) 
(default is 0.0: keep original resolution)", 0.0);
-  Optionpk<string> projection_opt("p", "projection", "projection string 
(default is empty: no projection)");
+  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter)");
+  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter)");
+  Optionpk<string> projection_opt("p", "projection", "projection string");
   Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 
columns: id R G B ALFA (0: transparent, 255: solid)");
   Optionpk<string> description_opt("d", "description", "Set image 
description");
-  Optionpk<bool> verbose_opt("v", "verbose", "verbose (false)", false);
+  Optionpk<bool> verbose_opt("v", "verbose", "verbose", false);
 
   bool doProcess;//stop process when program was invoked with help option (-h 
--help)
   try{
@@ -134,6 +134,8 @@ int main(int argc, char *argv[])
   if(description_opt.size())
     imgWriter.setImageDescription(description_opt[0]);
   if(projection_opt.size()){
+    assert(dx_opt.size());
+    assert(dy_opt.size());
     if(verbose_opt[0])
       cout << output_opt[0] << " is georeferenced." << endl;
     imgWriter.setGeoTransform(ulx_opt[0],uly_opt[0],dx_opt[0],dy_opt[0],0,0);
diff --git a/src/apps/pkcrop.cc b/src/apps/pkcrop.cc
index 6f86cb2..c5cfbee 100644
--- a/src/apps/pkcrop.cc
+++ b/src/apps/pkcrop.cc
@@ -39,8 +39,8 @@ int main(int argc, char *argv[])
   Optionpk<double>  uly_opt("uly", "uly", "Upper left y value bounding box (in 
geocoordinates if georef is true)", 0.0);
   Optionpk<double>  lrx_opt("lrx", "lrx", "Lower right x value bounding box 
(in geocoordinates if georef is true)", 0.0);
   Optionpk<double>  lry_opt("lry", "lry", "Lower right y value bounding box 
(in geocoordinates if georef is true)", 0.0);
-  Optionpk<double>  dx_opt("dx", "dx", "Output resolution in x (in meter) 
(0.0: keep original resolution)");
-  Optionpk<double>  dy_opt("dy", "dy", "Output resolution in y (in meter) 
(0.0: keep original resolution)");
+  Optionpk<double>  dx_opt("dx", "dx", "Output resolution in x (in meter) 
(empty: keep original resolution)");
+  Optionpk<double>  dy_opt("dy", "dy", "Output resolution in y (in meter) 
(empty: keep original resolution)");
   Optionpk<double> cx_opt("x", "x", "x-coordinate of image centre to crop (in 
meter)");
   Optionpk<double> cy_opt("y", "y", "y-coordinate of image centre to crop (in 
meter)");
   Optionpk<double> nx_opt("nx", "nx", "image size in x to crop (in meter)");
diff --git a/src/apps/pkfilter.cc b/src/apps/pkfilter.cc
index 17c46ac..8de6a8f 100644
--- a/src/apps/pkfilter.cc
+++ b/src/apps/pkfilter.cc
@@ -41,15 +41,14 @@ int main(int argc,char **argv) {
   Optionpk<std::string> output_opt("o", "output", "Output image file");
   Optionpk<bool> disc_opt("c", "circular", "circular disc kernel for dilation 
and erosion", false);
   Optionpk<double> angle_opt("a", "angle", "angle used for directional 
filtering in dilation (North=0, East=90, South=180, West=270).");
-  Optionpk<std::string> method_opt("f", "filter", "filter function 
(median,var,min,max,sum,mean,minmax,dilate,erode,close,open,spatially 
homogeneous (central pixel must be identical to all other pixels within 
window),SobelX edge detection in X,SobelY edge detection in 
Y,SobelXY,SobelYX,smooth,density,majority voting (only for classes),forest 
aggregation (mixed),smooth no data (mask) values,threshold local 
filtering,ismin,ismax,heterogeneous (central pixel must be different than all 
other [...]
+  Optionpk<std::string> method_opt("f", "filter", "filter function 
(median,var,min,max,sum,mean,minmax,dilate,erode,close,open,spatially 
homogeneous (central pixel must be identical to all other pixels within 
window),SobelX edge detection in X,SobelY edge detection in 
Y,SobelXY,SobelYX,smooth,density,majority voting (only for classes),forest 
aggregation (mixed),smooth no data (mask) values,threshold local 
filtering,ismin,ismax,heterogeneous (central pixel must be different than all 
other [...]
   Optionpk<int> dimX_opt("dx", "dx", "filter kernel size in x, must be odd", 
3);
   Optionpk<int> dimY_opt("dy", "dy", "filter kernel size in y, must be odd", 
3);
   Optionpk<int> dimZ_opt("dz", "dz", "filter kernel size in z (band or 
spectral dimension), must be odd (example: 3).. Set dz>0 if 1-D filter must be 
used in band domain");
   Optionpk<std::string> wavelet_type_opt("wt", "wavelet", "wavelet type: 
daubechies,daubechies_centered, haar, haar_centered, bspline, 
bspline_centered", "daubechies");
   Optionpk<int> family_opt("wf", "family", "wavelet family (vanishing moment, 
see also 
http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)", 4);
-  Optionpk<double> quantize_opt("q", "quantize", "Quantize threshold (positive 
for percentage value, negative for absolute value)",0);
   Optionpk<short> class_opt("class", "class", "class value(s) to use for 
density, erosion, dilation, openening and closing, thresholding");
-  Optionpk<double> threshold_opt("t", "threshold", "threshold value(s) to use 
for threshold filter (one for each class)", 0);
+  Optionpk<double> threshold_opt("t", "threshold", "threshold value(s) to use 
for threshold filter (one for each class), or quantization for dwtQuantize", 0);
   Optionpk<short> mask_opt("m", "mask", "mask value(s) ");
   Optionpk<std::string> tap_opt("tap", "tap", "text file containing taps used 
for spatial filtering (from ul to lr). Use dimX and dimY to specify tap 
dimensions in x and y. Leave empty for not using taps");
   Optionpk<double> tapz_opt("tapz", "tapz", "taps used for spectral 
filtering");
@@ -79,7 +78,6 @@ int main(int argc,char **argv) {
     option_opt.retrieveOption(argc,argv);
     wavelet_type_opt.retrieveOption(argc,argv);
     family_opt.retrieveOption(argc,argv);
-    quantize_opt.retrieveOption(argc,argv);
     class_opt.retrieveOption(argc,argv);
     threshold_opt.retrieveOption(argc,argv);
     mask_opt.retrieveOption(argc,argv);
@@ -324,8 +322,6 @@ int main(int argc,char **argv) {
     // 
filter1d.applySrf(wavelengthIn_opt,input,srf,interpolationType_opt[0],output,verbose_opt[0]);
   }
   else{
-    if(colorTable_opt.size())
-      output.setColorTable(colorTable_opt[0]);
     switch(filter2d::Filter2d::getFilterType(method_opt[0])){
     case(filter2d::dilate):
       if(dimZ_opt.size()){
@@ -518,7 +514,7 @@ int main(int argc,char **argv) {
     case(filter2d::dwtQuantize):
       if(verbose_opt[0])
        std::cout << "Quantization filtering" << std::endl;
-      filter2d.dwtQuantize(input, output, wavelet_type_opt[0], family_opt[0], 
quantize_opt[0]);
+      filter2d.dwtQuantize(input, output, wavelet_type_opt[0], family_opt[0], 
threshold_opt[0]);
       break;
     case(filter2d::threshold):
       filter2d.setThresholds(threshold_opt);
diff --git a/src/base/Optionpk.h b/src/base/Optionpk.h
index 22329e7..4155218 100644
--- a/src/base/Optionpk.h
+++ b/src/base/Optionpk.h
@@ -29,6 +29,7 @@ along with pktools.  If not, see 
<http://www.gnu.org/licenses/>.
 #include <iomanip>
 #include <sstream>
 #include <typeinfo>
+#include <cxxabi.h>
 #include "ogr_feature.h"
 
 #ifdef HAVE_CONFIG_H
@@ -282,7 +283,8 @@ template<class T> std::string Optionpk<T>::usageDoxygen() 
const
     helpss << setiosflags(ios::left) << setw(20) << longOption << " | ";
   else
     helpss << setiosflags(ios::left) << "                     | ";
-  helpss << setiosflags(ios::left) << setw(4) << typeid(T).name() << " | ";
+  int status;
+  helpss << setiosflags(ios::left) << setw(4) << 
abi::__cxa_demangle(typeid(T).name(),0,0,&status) << " | ";
   if(m_hasDefault)
     helpss <<setiosflags(ios::left) << setw(5) << 
type2string<T>(m_defaultValue) << " |";
   else

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/pktools.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to