[qgis] branch master updated (115dcce -> 9e1351d)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch master
in repository qgis.

  from  115dcce   Mark allows-to-typo.patch as Applied-Upstream.
   new  1d1ecb0   Imported Upstream version 2.6.1
   new  080e6fa   Merge tag 'upstream/2.6.1'
   new  df0b611   New upstream release.
   new  9e1351d   Refresh patches.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CMakeLists.txt |  2 +-
 ChangeLog  |208 +
 cmake_templates/Doxyfile.in|  2 +-
 debian/changelog   | 10 +-
 debian/control | 32 +-
 ...2.6.0.install => libqgis-analysis2.6.1.install} |  0
 ...6.0.postinst => libqgis-analysis2.6.1.postinst} |  0
 ...is2.6.0.postrm => libqgis-analysis2.6.1.postrm} |  0
 ...2.6.0.symbols => libqgis-analysis2.6.1.symbols} |  0
 ...core2.6.0.install => libqgis-core2.6.1.install} |  0
 ...re2.6.0.postinst => libqgis-core2.6.1.postinst} |  0
 ...s-core2.6.0.postrm => libqgis-core2.6.1.postrm} |  0
 ...core2.6.0.symbols => libqgis-core2.6.1.symbols} |  0
 install => libqgis-customwidgets2.6.1.install} |  0
 ...s-gui2.6.0.install => libqgis-gui2.6.1.install} |  0
 ...gui2.6.0.postinst => libqgis-gui2.6.1.postinst} |  0
 ...gis-gui2.6.0.postrm => libqgis-gui2.6.1.postrm} |  0
 ...s-gui2.6.0.symbols => libqgis-gui2.6.1.symbols} |  0
 ...nstall => libqgis-networkanalysis2.6.1.install} |  0
 ...tinst => libqgis-networkanalysis2.6.1.postinst} |  0
 postrm => libqgis-networkanalysis2.6.1.postrm} |  0
 ...ymbols => libqgis-networkanalysis2.6.1.symbols} |  0
 ...rass2.6.0.install => libqgisgrass2.6.1.install} |  0
 ...ss2.6.0.postinst => libqgisgrass2.6.1.postinst} |  0
 ...sgrass2.6.0.postrm => libqgisgrass2.6.1.postrm} |  0
 ...rass2.6.0.symbols => libqgisgrass2.6.1.symbols} |  0
 ...hon2.6.0.install => libqgispython2.6.1.install} |  0
 ...n2.6.0.postinst => libqgispython2.6.1.postinst} |  0
 ...ython2.6.0.postrm => libqgispython2.6.1.postrm} |  0
 ...hon2.6.0.symbols => libqgispython2.6.1.symbols} |  0
 debian/patches/allows-to-typo.patch|199 +-
 doc/TRANSLATORS| 75 +-
 doc/api_break.dox  |  4 +
 i18n/CMakeLists.txt|  2 +-
 i18n/qgis_af.ts| 99 +-
 i18n/qgis_ar.ts|101 +-
 i18n/qgis_bg.ts| 99 +-
 i18n/qgis_bn.ts| 99 +-
 i18n/qgis_bs.ts| 98 +-
 i18n/qgis_ca.ts| 96 +-
 i18n/qgis_cs.ts| 94 +-
 i18n/qgis_da.ts| 95 +-
 i18n/qgis_de.ts|430 +-
 i18n/qgis_el.ts| 97 +-
 i18n/qgis_en.ts| 99 +-
 i18n/qgis_es.ts|  77047 +---
 i18n/qgis_et.ts| 99 +-
 i18n/qgis_eu.ts| 93 +-
 i18n/qgis_fa.ts| 98 +-
 i18n/qgis_fi.ts| 114249 +-
 i18n/qgis_fr.ts| 93 +-
 i18n/qgis_gl.ts| 93 +-
 i18n/qgis_he.ts| 99 +-
 i18n/qgis_hi.ts|  25097 ++--
 i18n/qgis_hr.ts|100 +-
 i18n/qgis_hu.ts| 92 +-
 i18n/qgis_id.ts| 92 +-
 i18n/qgis_is.ts| 97 +-
 i18n/qgis_it.ts| 93 +-
 i18n/qgis_ja.ts| 92 +-
 i18n/qgis_ka.ts| 99 +-
 i18n/qgis_km.ts| 93 +-
 i18n/qgis_ko.ts| 92 +-
 i18n/qgis_lo.ts| 99 +-
 i18n/qgis_lt.ts| 96 +-
 i18n/qgis_lv.ts| 94 +-
 i18n/qgis_ml.ts| 99 +-
 i18n/qgis_mn.ts| 99 +-
 i18n/qgis_mr.ts  

[qgis] 02/04: Merge tag 'upstream/2.6.1'

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository qgis.

commit 080e6fab1f7ec6cc55c02936313ed6a1791149f4
Merge: 115dcce 1d1ecb0
Author: Bas Couwenberg 
Date:   Wed Dec 3 13:03:10 2014 +0100

Merge tag 'upstream/2.6.1'

Upstream version 2.6.1

 CMakeLists.txt |  2 +-
 ChangeLog  |208 +
 cmake_templates/Doxyfile.in|  2 +-
 debian/changelog   |  8 +-
 doc/TRANSLATORS| 75 +-
 doc/api_break.dox  |  4 +
 i18n/CMakeLists.txt|  2 +-
 i18n/qgis_af.ts| 99 +-
 i18n/qgis_ar.ts|101 +-
 i18n/qgis_bg.ts| 99 +-
 i18n/qgis_bn.ts| 99 +-
 i18n/qgis_bs.ts| 98 +-
 i18n/qgis_ca.ts| 96 +-
 i18n/qgis_cs.ts| 94 +-
 i18n/qgis_da.ts| 95 +-
 i18n/qgis_de.ts|430 +-
 i18n/qgis_el.ts| 97 +-
 i18n/qgis_en.ts| 99 +-
 i18n/qgis_es.ts|  77047 +---
 i18n/qgis_et.ts| 99 +-
 i18n/qgis_eu.ts| 93 +-
 i18n/qgis_fa.ts| 98 +-
 i18n/qgis_fi.ts| 114249 +-
 i18n/qgis_fr.ts| 93 +-
 i18n/qgis_gl.ts| 93 +-
 i18n/qgis_he.ts| 99 +-
 i18n/qgis_hi.ts|  25097 ++--
 i18n/qgis_hr.ts|100 +-
 i18n/qgis_hu.ts| 92 +-
 i18n/qgis_id.ts| 92 +-
 i18n/qgis_is.ts| 97 +-
 i18n/qgis_it.ts| 93 +-
 i18n/qgis_ja.ts| 92 +-
 i18n/qgis_ka.ts| 99 +-
 i18n/qgis_km.ts| 93 +-
 i18n/qgis_ko.ts| 92 +-
 i18n/qgis_lo.ts| 99 +-
 i18n/qgis_lt.ts| 96 +-
 i18n/qgis_lv.ts| 94 +-
 i18n/qgis_ml.ts| 99 +-
 i18n/qgis_mn.ts| 99 +-
 i18n/qgis_mr.ts| 99 +-
 i18n/qgis_nb.ts|111 +-
 i18n/qgis_nl.ts| 93 +-
 i18n/qgis_pl.ts| 94 +-
 i18n/qgis_pt_BR.ts | 93 +-
 i18n/qgis_pt_PT.ts | 93 +-
 i18n/qgis_ro.ts| 94 +-
 i18n/qgis_ru.ts| 94 +-
 i18n/qgis_sk.ts| 98 +-
 i18n/qgis_sl.ts| 97 +-
 i18n/qgis_sq.ts| 99 +-
 i18n/qgis_sr_Cyrl.ts   |100 +-
 i18n/qgis_sr_Latn.ts   |100 +-
 i18n/qgis_sv.ts| 99 +-
 i18n/qgis_sw.ts| 99 +-
 i18n/qgis_ta.ts| 99 +-
 i18n/qgis_te.ts| 99 +-
 i18n/qgis_th.ts| 98 +-
 i18n/qgis_tl.ts|100 +-
 i18n/qgis_tr.ts| 96 +-
 i18n/qgis_uk.ts|100 +-
 i18n/qgis_vi.ts| 98 +-
 i18n/qgis_xh.ts| 98 +-
 i18n/qgis_zh_CN.ts | 96 +-
 i18n/qgis_zh_TW.ts | 94 +-
 python/CMakeLists.txt  |  1 +
 python/core/composer/qgscomposerhtml.sip   |  4 +-
 python/core/qgsgeometry.sip|  2 +-
 python/core/symbology-ng/qgsfillsymbollayerv2.sip  |  8 +-
 python/ext-libs/owslib/csw.py  |  9 +-
 python/gui/symbology-ng/qgscolorrampcombobox.sip   |  6 +
 python/plugins/MetaSearch/dialo

[qgis] 03/04: New upstream release.

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository qgis.

commit df0b6113763300862c712945dd3f83e7fcda86fa
Author: Bas Couwenberg 
Date:   Wed Dec 3 13:03:51 2014 +0100

New upstream release.
---
 debian/changelog   |  3 +-
 debian/control | 32 +++---
 ...2.6.0.install => libqgis-analysis2.6.1.install} |  0
 ...6.0.postinst => libqgis-analysis2.6.1.postinst} |  0
 ...is2.6.0.postrm => libqgis-analysis2.6.1.postrm} |  0
 ...2.6.0.symbols => libqgis-analysis2.6.1.symbols} |  0
 ...core2.6.0.install => libqgis-core2.6.1.install} |  0
 ...re2.6.0.postinst => libqgis-core2.6.1.postinst} |  0
 ...s-core2.6.0.postrm => libqgis-core2.6.1.postrm} |  0
 ...core2.6.0.symbols => libqgis-core2.6.1.symbols} |  0
 install => libqgis-customwidgets2.6.1.install} |  0
 ...s-gui2.6.0.install => libqgis-gui2.6.1.install} |  0
 ...gui2.6.0.postinst => libqgis-gui2.6.1.postinst} |  0
 ...gis-gui2.6.0.postrm => libqgis-gui2.6.1.postrm} |  0
 ...s-gui2.6.0.symbols => libqgis-gui2.6.1.symbols} |  0
 ...nstall => libqgis-networkanalysis2.6.1.install} |  0
 ...tinst => libqgis-networkanalysis2.6.1.postinst} |  0
 postrm => libqgis-networkanalysis2.6.1.postrm} |  0
 ...ymbols => libqgis-networkanalysis2.6.1.symbols} |  0
 ...rass2.6.0.install => libqgisgrass2.6.1.install} |  0
 ...ss2.6.0.postinst => libqgisgrass2.6.1.postinst} |  0
 ...sgrass2.6.0.postrm => libqgisgrass2.6.1.postrm} |  0
 ...rass2.6.0.symbols => libqgisgrass2.6.1.symbols} |  0
 ...hon2.6.0.install => libqgispython2.6.1.install} |  0
 ...n2.6.0.postinst => libqgispython2.6.1.postinst} |  0
 ...ython2.6.0.postrm => libqgispython2.6.1.postrm} |  0
 ...hon2.6.0.symbols => libqgispython2.6.1.symbols} |  0
 27 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fcbf336..83c310c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,9 +4,10 @@ qgis (2.6.1-1~exp1) UNRELEASED; urgency=medium
   * Release of 2.6.1
 
   [ Bas Couwenberg ]
+  * New upstream release. 
   * Add upstream metadata.
 
- -- Bas Couwenberg   Wed, 03 Dec 2014 13:02:31 +0100
+ -- Bas Couwenberg   Wed, 03 Dec 2014 13:03:31 +0100
 
 qgis (2.6.0-1~exp1) experimental; urgency=medium
 
diff --git a/debian/control b/debian/control
index 9d3d137..151148e 100644
--- a/debian/control
+++ b/debian/control
@@ -84,7 +84,7 @@ Description: QGIS - architecture-independent data
  This package contains architecture-independent supporting data files for use
  with QGIS.
 
-Package: libqgis-core2.6.0
+Package: libqgis-core2.6.1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -95,7 +95,7 @@ Description: QGIS - shared core library
  .
  This package contains the shared core library.
 
-Package: libqgis-gui2.6.0
+Package: libqgis-gui2.6.1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -106,7 +106,7 @@ Description: QGIS - shared gui library
  .
  This package contains the shared gui library.
 
-Package: libqgis-analysis2.6.0
+Package: libqgis-analysis2.6.1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -117,7 +117,7 @@ Description: QGIS - shared analysis library
  .
  This package contains the shared analysis library.
 
-Package: libqgis-networkanalysis2.6.0
+Package: libqgis-networkanalysis2.6.1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -128,7 +128,7 @@ Description: QGIS - shared network analysis library
  .
  This package contains the shared network analysis library.
 
-Package: libqgisgrass2.6.0
+Package: libqgisgrass2.6.1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -139,7 +139,7 @@ Description: QGIS - shared grass library
  .
  This package contains the shared grass library.
 
-Package: libqgispython2.6.0
+Package: libqgispython2.6.1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -150,7 +150,7 @@ Description: QGIS - shared Python library
  .
  This package contains the shared Python library.
 
-Package: libqgis-customwidgets2.6.0
+Package: libqgis-customwidgets2.6.1
 Architecture: any
 Depends: qt4-designer,
  ${shlibs:Depends},
@@ -171,19 +171,19 @@ Depends: grass-dev,
  libgsl0-dev,
  libpq-dev,
  libproj-dev,
- libqgis-core2.6.0 (= ${binary:Version}),
- libqgis-gui2.6.0 (= ${binary:Version}),
- libqgis-analysis2.6.0 (= ${binary:Version}),
- libqgis-networkanalysis2.6.0 (= ${binary:Version}),
- libqgisgrass2.6.0 (= ${binary:Version}),
- libqgispython2.6.0 (= ${binary:Version}),
+ libqgis-core2.6.1 (= ${binary:Version}),
+ libqgis-gui2.6.1 (= ${binary:Version}),
+ libqgis-analysis2.6.1 (= ${binary:Version}),
+ libqgis-networkanalysis2.6.1 (= ${binary:Version}),
+ libqgisgrass2.6.1 (= ${binary:Version}),
+ libqgispython2.6.1 (= ${binary:Version}),
   

[qgis] 04/04: Refresh patches.

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository qgis.

commit 9e1351d9d8d1c9e9f85dd7128121123d9ebf77e6
Author: Bas Couwenberg 
Date:   Wed Dec 3 13:10:47 2014 +0100

Refresh patches.
---
 debian/changelog|   1 +
 debian/patches/allows-to-typo.patch | 199 +---
 2 files changed, 95 insertions(+), 105 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 83c310c..76d99ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ qgis (2.6.1-1~exp1) UNRELEASED; urgency=medium
   [ Bas Couwenberg ]
   * New upstream release. 
   * Add upstream metadata.
+  * Refresh patches.
 
  -- Bas Couwenberg   Wed, 03 Dec 2014 13:03:31 +0100
 
diff --git a/debian/patches/allows-to-typo.patch 
b/debian/patches/allows-to-typo.patch
index 46d0727..2e010b2 100644
--- a/debian/patches/allows-to-typo.patch
+++ b/debian/patches/allows-to-typo.patch
@@ -5,7 +5,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
 
 --- a/ChangeLog
 +++ b/ChangeLog
-@@ -11762,7 +11762,7 @@ Denis Rouzaud 
+@@ -11970,7 +11970,7 @@ Denis Rouzaud 
  
  Salvatore Larosa  2014-04-28
  
@@ -14,7 +14,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Nyall Dawson  2014-04-28
  
-@@ -20222,7 +20222,7 @@ Matthias Kuhn201
+@@ -20430,7 +20430,7 @@ Matthias Kuhn201
  
  AttributeForm: Create a dummy button box for intercepting ok clicks
  when the ok button is hidden and the accept was actually triggered
@@ -23,7 +23,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  logic without changes.
  Fixes #8885
  
-@@ -21247,7 +21247,7 @@ Salvatore Larosa   20
+@@ -21455,7 +21455,7 @@ Salvatore Larosa   20
  
  Salvatore Larosa  2013-11-02
  
@@ -32,7 +32,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Salvatore Larosa  2013-10-24
  
-@@ -21255,7 +21255,7 @@ Salvatore Larosa   20
+@@ -21463,7 +21463,7 @@ Salvatore Larosa   20
  
  Salvatore Larosa  2013-10-24
  
@@ -41,7 +41,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Radim Blazek  2013-11-02
  
-@@ -23138,7 +23138,7 @@ Tim Sutton 2013-09-1
+@@ -23346,7 +23346,7 @@ Tim Sutton 2013-09-1
  
  Salvatore Larosa  2013-09-20
  
@@ -50,7 +50,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  yellow-sky   2013-09-20
  
-@@ -23599,7 +23599,7 @@ Stéphane Brunner  2013-09-14
  
@@ -59,7 +59,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Victor Olaya   2013-09-11
  
-@@ -26124,7 +26124,7 @@ Alexander Bruy  2013-08-06
  
@@ -68,7 +68,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Minoru Akagi  2013-07-18
  
-@@ -29925,7 +29925,7 @@ Juergen E. Fischer 2013-
+@@ -30133,7 +30133,7 @@ Juergen E. Fischer 2013-
  more edit widget fixes:
  - handle editable state in drag&drop forms like in automatically generated
forms
@@ -77,7 +77,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Borys Jurgiel   2013-06-05
  
-@@ -31146,10 +31146,10 @@ Salvatore Larosa 20
+@@ -31354,10 +31354,10 @@ Salvatore Larosa 20
  
  Salvatore Larosa  2013-05-20
  
@@ -90,7 +90,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  - fix for mousePressEvent into console
  
  Juergen E. Fischer2013-05-20
-@@ -31394,7 +31394,7 @@ Radim Blazek   20
+@@ -31602,7 +31602,7 @@ Radim Blazek   20
  
  Salvatore Larosa  2013-05-15
  
@@ -99,7 +99,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  - fixes some translation string
  
  Marco Hugentobler2013-05-15
-@@ -32896,7 +32896,7 @@ D'Hont René-Luc 201
+@@ -33104,7 +33104,7 @@ D'Hont René-Luc 201
  
  olivierdalang   2013-04-24
  
@@ -108,7 +108,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Radim Blazek  2013-04-24
  
-@@ -33034,7 +33034,7 @@ Chris Crook   2013-0
+@@ -33242,7 +33242,7 @@ Chris Crook   2013-0
  
  Salvatore Larosa  2013-04-22
  
@@ -117,7 +117,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  Salvatore Larosa  2013-04-22
  
-@@ -33065,7 +33065,7 @@ Minoru Akagi   2013-0
+@@ -33273,7 +33273,7 @@ Minoru Akagi   2013-0
  
  Salvatore Larosa  2013-04-22
  
@@ -126,7 +126,7 @@ Applied-Upstream: 
https://github.com/qgis/QGIS/commit/98c0771b1a4364889470b05ea1
  
  nyalldawson   2013-04-22
  
-@@ -33138,7 +33138,7 @@ Salvatore Larosa   20
+@@ -33346,7 +33346,7 @@ Salvatore Larosa   20
  Salvatore Larosa  2013-04-17
  
  [pyqgis-console] added a python object browser for editor
@@ -135,7

[qgis] branch upstream updated (c8a6f51 -> 1d1ecb0)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch upstream
in repository qgis.

  from  c8a6f51   Imported Upstream version 2.6.0
   new  1d1ecb0   Imported Upstream version 2.6.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CMakeLists.txt |  2 +-
 ChangeLog  |208 +
 cmake_templates/Doxyfile.in|  2 +-
 debian/changelog   |  6 +-
 doc/TRANSLATORS| 75 +-
 doc/api_break.dox  |  4 +
 i18n/CMakeLists.txt|  2 +-
 i18n/qgis_af.ts| 99 +-
 i18n/qgis_ar.ts|101 +-
 i18n/qgis_bg.ts| 99 +-
 i18n/qgis_bn.ts| 99 +-
 i18n/qgis_bs.ts| 98 +-
 i18n/qgis_ca.ts| 96 +-
 i18n/qgis_cs.ts| 94 +-
 i18n/qgis_da.ts| 95 +-
 i18n/qgis_de.ts|430 +-
 i18n/qgis_el.ts| 97 +-
 i18n/qgis_en.ts| 99 +-
 i18n/qgis_es.ts|  77047 +---
 i18n/qgis_et.ts| 99 +-
 i18n/qgis_eu.ts| 93 +-
 i18n/qgis_fa.ts| 98 +-
 i18n/qgis_fi.ts| 114249 +-
 i18n/qgis_fr.ts| 93 +-
 i18n/qgis_gl.ts| 93 +-
 i18n/qgis_he.ts| 99 +-
 i18n/qgis_hi.ts|  25097 ++--
 i18n/qgis_hr.ts|100 +-
 i18n/qgis_hu.ts| 92 +-
 i18n/qgis_id.ts| 92 +-
 i18n/qgis_is.ts| 97 +-
 i18n/qgis_it.ts| 93 +-
 i18n/qgis_ja.ts| 92 +-
 i18n/qgis_ka.ts| 99 +-
 i18n/qgis_km.ts| 93 +-
 i18n/qgis_ko.ts| 92 +-
 i18n/qgis_lo.ts| 99 +-
 i18n/qgis_lt.ts| 96 +-
 i18n/qgis_lv.ts| 94 +-
 i18n/qgis_ml.ts| 99 +-
 i18n/qgis_mn.ts| 99 +-
 i18n/qgis_mr.ts| 99 +-
 i18n/qgis_nb.ts|111 +-
 i18n/qgis_nl.ts| 93 +-
 i18n/qgis_pl.ts| 94 +-
 i18n/qgis_pt_BR.ts | 93 +-
 i18n/qgis_pt_PT.ts | 93 +-
 i18n/qgis_ro.ts| 94 +-
 i18n/qgis_ru.ts| 94 +-
 i18n/qgis_sk.ts| 98 +-
 i18n/qgis_sl.ts| 97 +-
 i18n/qgis_sq.ts| 99 +-
 i18n/qgis_sr_Cyrl.ts   |100 +-
 i18n/qgis_sr_Latn.ts   |100 +-
 i18n/qgis_sv.ts| 99 +-
 i18n/qgis_sw.ts| 99 +-
 i18n/qgis_ta.ts| 99 +-
 i18n/qgis_te.ts| 99 +-
 i18n/qgis_th.ts| 98 +-
 i18n/qgis_tl.ts|100 +-
 i18n/qgis_tr.ts| 96 +-
 i18n/qgis_uk.ts|100 +-
 i18n/qgis_vi.ts| 98 +-
 i18n/qgis_xh.ts| 98 +-
 i18n/qgis_zh_CN.ts | 96 +-
 i18n/qgis_zh_TW.ts | 94 +-
 python/CMakeLists.txt  |  1 +
 python/core/composer/qgscomposerhtml.sip   |  4 +-
 python/core/qgsgeometry.sip|  2 +-
 python/core/symbology-ng/qgsfillsymbollayerv2.sip  |

[qgis] branch pristine-tar updated (c785403 -> bcdb9d2)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch pristine-tar
in repository qgis.

  from  c785403   pristine-tar data for qgis_2.6.0.orig.tar.bz2
   new  bcdb9d2   pristine-tar data for qgis_2.6.1.orig.tar.bz2

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 qgis_2.6.1.orig.tar.bz2.delta | Bin 0 -> 416013 bytes
 qgis_2.6.1.orig.tar.bz2.id|   1 +
 2 files changed, 1 insertion(+)
 create mode 100644 qgis_2.6.1.orig.tar.bz2.delta
 create mode 100644 qgis_2.6.1.orig.tar.bz2.id

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/qgis.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


[qgis] 01/01: pristine-tar data for qgis_2.6.1.orig.tar.bz2

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch pristine-tar
in repository qgis.

commit bcdb9d2e710b77a9e69259930d2f127aa9a64981
Author: Bas Couwenberg 
Date:   Wed Dec 3 12:50:04 2014 +0100

pristine-tar data for qgis_2.6.1.orig.tar.bz2
---
 qgis_2.6.1.orig.tar.bz2.delta | Bin 0 -> 416013 bytes
 qgis_2.6.1.orig.tar.bz2.id|   1 +
 2 files changed, 1 insertion(+)

diff --git a/qgis_2.6.1.orig.tar.bz2.delta b/qgis_2.6.1.orig.tar.bz2.delta
new file mode 100644
index 000..035a8f1
Binary files /dev/null and b/qgis_2.6.1.orig.tar.bz2.delta differ
diff --git a/qgis_2.6.1.orig.tar.bz2.id b/qgis_2.6.1.orig.tar.bz2.id
new file mode 100644
index 000..4ddd17f
--- /dev/null
+++ b/qgis_2.6.1.orig.tar.bz2.id
@@ -0,0 +1 @@
+0ee8d373ce0edc398a18910419271ebab21e0420

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/qgis.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


[qgis] annotated tag upstream/2.6.1 created (now d5e6425)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to annotated tag upstream/2.6.1
in repository qgis.

at  d5e6425   (tag)
   tagging  1d1ecb08cdc8832c66812979bb8b255291926dc2 (commit)
  replaces  upstream/2.6.0
 tagged by  Bas Couwenberg
on  Wed Dec 3 12:50:05 2014 +0100

- Log -
Upstream version 2.6.1

Bas Couwenberg (1):
  Imported Upstream version 2.6.1

---

No new revisions were added by this update.

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/qgis.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


[pktools] branch master updated (f565262 -> 29603d2)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch master
in repository pktools.

  from  f565262   Remove .gitignore, not included upstream.
   new  06f80f8   Imported Upstream version 2.6.1
   new  bf78eb7   Merge tag 'upstream/2.6.1'
   new  29ebf92   New upstream release.
   new  ed07dd1   Refresh patches.
   new  29603d2   Remove libbase package, library no longer installed.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ChangeLog|  24 +-
 configure|  36 +-
 configure.ac |   6 +-
 debian/changelog |   8 +
 debian/control   |  24 --
 debian/libbase1.install  |   1 -
 debian/libbase1.symbols  |   2 -
 debian/patches/automake-subdir-objects.patch |   4 +-
 ltmain.sh|   4 +-
 m4/libtool.m4|  12 +-
 src/algorithms/Filter.cc |   8 +
 src/algorithms/Filter.h  |  11 +-
 src/algorithms/Filter2d.h|   2 +-
 src/algorithms/StatFactory.h | 336 
 src/algorithms/myfann_cpp.h  |  18 +-
 src/apps/Makefile.am |   4 +-
 src/apps/Makefile.in |  49 +--
 src/apps/pkann.cc| 116 +++---
 src/apps/pkascii2ogr.cc  |   2 -
 src/apps/pkdumpimg.cc|  23 +-
 src/apps/pkegcs.cc   |   2 +-
 src/apps/pkextract.cc| 580 +++
 src/apps/pkfilter.cc |   3 +-
 src/apps/pkfilterascii.cc|   2 +-
 src/apps/pkfilterdem.cc  |   6 +-
 src/apps/pkfsann.cc  |   4 +-
 src/apps/pkfssvm.cc  |   4 +-
 src/apps/pkinfo.cc   |   2 +-
 src/apps/pkkalman.cc |  15 +-
 src/apps/pklas2img.cc|   2 +-
 src/apps/pkoptsvm.cc |   4 +-
 src/apps/pkpolygonize.cc |   2 +-
 src/apps/pkregann.cc |   8 +-
 src/apps/pkstatascii.cc  |   2 +-
 src/apps/pksvm.cc| 128 +++---
 src/base/Makefile.am |   8 +-
 src/base/Makefile.in | 177 +++-
 37 files changed, 912 insertions(+), 727 deletions(-)
 delete mode 100644 debian/libbase1.install
 delete mode 100644 debian/libbase1.symbols

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


[pktools] 04/05: Refresh patches.

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository pktools.

commit ed07dd15ef6e2b8d55905fe7af868495af916598
Author: Bas Couwenberg 
Date:   Wed Dec 3 21:20:30 2014 +0100

Refresh patches.
---
 debian/changelog | 1 +
 debian/patches/automake-subdir-objects.patch | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ce47740..cec1d91 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 pktools (2.6.1-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Refresh patches.
 
  -- Bas Couwenberg   Wed, 03 Dec 2014 21:16:31 +0100
 
diff --git a/debian/patches/automake-subdir-objects.patch 
b/debian/patches/automake-subdir-objects.patch
index c4c9bdf..1a3710d 100644
--- a/debian/patches/automake-subdir-objects.patch
+++ b/debian/patches/automake-subdir-objects.patch
@@ -7,5 +7,5 @@ Author: Bas Couwenberg 
 +AUTOMAKE_OPTIONS = subdir-objects
 +
  AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(GDAL_CFLAGS) 
@AM_CXXFLAGS@
- AM_LDFLAGS = $(GSL_LIBS) $(GDAL_LDFLAGS) 
$(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la 
$(top_builddir)/src/base/libbase.la @AM_LDFLAGS@
- LDADD = $(GSL_LIBS) $(GDAL_LDFLAGS) 
$(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la 
$(top_builddir)/src/base/libbase.la
+ AM_LDFLAGS = $(GSL_LIBS) $(GDAL_LDFLAGS) 
$(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la @AM_LDFLAGS@
+ LDADD = $(GSL_LIBS) $(GDAL_LDFLAGS) 
$(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la

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


[pktools] 05/05: Remove libbase package, library no longer installed.

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository pktools.

commit 29603d29654e12e7badc49f0e0e52e8541ba1f05
Author: Bas Couwenberg 
Date:   Wed Dec 3 21:28:56 2014 +0100

Remove libbase package, library no longer installed.
---
 debian/changelog|  1 +
 debian/control  | 24 
 debian/libbase1.install |  1 -
 debian/libbase1.symbols |  2 --
 4 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index cec1d91..c82f712 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ pktools (2.6.1-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Refresh patches.
+  * Remove libbase package, library no longer installed.
 
  -- Bas Couwenberg   Wed, 03 Dec 2014 21:16:31 +0100
 
diff --git a/debian/control b/debian/control
index 645867d..62d2d00 100644
--- a/debian/control
+++ b/debian/control
@@ -43,7 +43,6 @@ Package: pktools-dev
 Architecture: any
 Section: libdevel
 Depends: libalgorithms1 (= ${binary:Version}),
- libbase1 (= ${binary:Version}),
  libfileclasses1 (= ${binary:Version}),
  libimageclasses1 (= ${binary:Version}),
  liblasclasses1 (= ${binary:Version}),
@@ -91,29 +90,6 @@ Description: GDAL add-on tools to perform useful raster 
processing - libalgorith
  .
  This package contains the libalgorithms shared library.
 
-Package: libbase1
-Architecture: any
-Section: libs
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends},
- ${misc:Depends}
-Breaks: pktools (<< 2.5.4)
-Replaces: pktools (<< 2.5.4)
-Description: GDAL add-on tools to perform useful raster processing - libbase
- Pktools is a collection of programs to perform operations, mostly on 
- raster geolocated  images. It  heavily relies  on the  Geospatial Data 
- Abstraction Library (GDAL) and OGR.  The programs are similar to the 
- GDAL tools (gdalinfo, gdal_translate,  gdal_merge, ...) and some of the 
- functionalities provided in pktools already exist in the GDAL tools. 
- .
- All utilities in pktools use command line options and have a built 
- in help, and include more than thirty binaries to edit, change, crop,
- classify, compare, dump, fill, enhance images and many other 
- common operations useful in the remote sensing field of image 
- analysis.
- .
- This package contains the libbase shared library.
-
 Package: libfileclasses1
 Architecture: any
 Section: libs
diff --git a/debian/libbase1.install b/debian/libbase1.install
deleted file mode 100644
index 95ce68e..000
--- a/debian/libbase1.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libbase.so.*
diff --git a/debian/libbase1.symbols b/debian/libbase1.symbols
deleted file mode 100644
index a964199..000
--- a/debian/libbase1.symbols
+++ /dev/null
@@ -1,2 +0,0 @@
-# SymbolsHelper-Confirmed: 2.5.2 amd64 hppa hurd-i386 i386 kfreebsd-amd64 
kfreebsd-i386 mips mipsel powerpc ppc64 s390x sparc x32
-libbase.so.1 libbase1 #MINVER#

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


[pktools] 01/01: pristine-tar data for pktools_2.6.1.orig.tar.gz

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch pristine-tar
in repository pktools.

commit f4c8ef89be20e8d193b96dda9745f94f15579ef7
Author: Bas Couwenberg 
Date:   Wed Dec 3 21:16:24 2014 +0100

pristine-tar data for pktools_2.6.1.orig.tar.gz
---
 pktools_2.6.1.orig.tar.gz.delta | Bin 0 -> 4607 bytes
 pktools_2.6.1.orig.tar.gz.id|   1 +
 2 files changed, 1 insertion(+)

diff --git a/pktools_2.6.1.orig.tar.gz.delta b/pktools_2.6.1.orig.tar.gz.delta
new file mode 100644
index 000..147be70
Binary files /dev/null and b/pktools_2.6.1.orig.tar.gz.delta differ
diff --git a/pktools_2.6.1.orig.tar.gz.id b/pktools_2.6.1.orig.tar.gz.id
new file mode 100644
index 000..450d994
--- /dev/null
+++ b/pktools_2.6.1.orig.tar.gz.id
@@ -0,0 +1 @@
+5f0b5f90f39657534dcf4ccac597801217e01c92

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


[pktools] 03/05: New upstream release.

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository pktools.

commit 29ebf921c31f434a93cc3b1453f92197e0d8adb5
Author: Bas Couwenberg 
Date:   Wed Dec 3 21:19:20 2014 +0100

New upstream release.
---
 debian/changelog | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7b6dbbe..ce47740 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pktools (2.6.1-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Bas Couwenberg   Wed, 03 Dec 2014 21:16:31 +0100
+
 pktools (2.5.4-1~exp1) experimental; urgency=medium
 
   * New upstream release.

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


[pktools] 01/05: Imported Upstream version 2.6.1

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository pktools.

commit 06f80f84be0fae063797f9f8af733e5cd3f7ac3f
Author: Bas Couwenberg 
Date:   Wed Dec 3 21:16:23 2014 +0100

Imported Upstream version 2.6.1
---
 ChangeLog|  24 +-
 configure|  36 +--
 configure.ac |   6 +-
 ltmain.sh|   4 +-
 m4/libtool.m4|  12 +-
 src/algorithms/Filter.cc |   8 +
 src/algorithms/Filter.h  |  11 +-
 src/algorithms/Filter2d.h|   2 +-
 src/algorithms/StatFactory.h | 336 ++---
 src/algorithms/myfann_cpp.h  |  18 +-
 src/apps/Makefile.am |   4 +-
 src/apps/Makefile.in |  49 ++--
 src/apps/pkann.cc| 116 +
 src/apps/pkascii2ogr.cc  |   2 -
 src/apps/pkdumpimg.cc|  23 +-
 src/apps/pkegcs.cc   |   2 +-
 src/apps/pkextract.cc| 580 +++
 src/apps/pkfilter.cc |   3 +-
 src/apps/pkfilterascii.cc|   2 +-
 src/apps/pkfilterdem.cc  |   6 +-
 src/apps/pkfsann.cc  |   4 +-
 src/apps/pkfssvm.cc  |   4 +-
 src/apps/pkinfo.cc   |   2 +-
 src/apps/pkkalman.cc |  15 +-
 src/apps/pklas2img.cc|   2 +-
 src/apps/pkoptsvm.cc |   4 +-
 src/apps/pkpolygonize.cc |   2 +-
 src/apps/pkregann.cc |   8 +-
 src/apps/pkstatascii.cc  |   2 +-
 src/apps/pksvm.cc| 128 ++
 src/base/Makefile.am |   8 +-
 src/base/Makefile.in | 177 +
 32 files changed, 902 insertions(+), 698 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0e626a5..bdc27ac 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -319,19 +319,23 @@ version 2.5.4
support statistic rules (mean, stdev, median, etc.) for point features 
by taking into account buffer (default= 3 by 3 pixels). If option -polygon is 
set, output ogr features are polygons defining the buffer.
changed names for maximum and minumum rule to max and min respectively
new options -rand and -grid to support simple random sampling and 
systematic grid (do not provide sample vector dataset)
- - pksvm
-   replaced options s|start and e|end with bs|bstart and be|bend
- - pkann
-   replaced options s|start and e|end with bs|bstart and be|bend
- - pkfssvm
-   replaced options s|start and e|end with bs|bstart and be|bend
- - pkfsann
-   replaced options s|start and e|end with bs|bstart and be|bend
- - pkoptsvm
-   replaced options s|start and e|end with bs|bstart and be|bend
  - ImgWriteOgr
overwrite existing ogr datasets per default
 
+version 2.6.1
+ - API
+   Filter.h support nodata values
+ - pkfilter
+   Declare nodata option as double (see ticket #43500)
+   Support nodata values for filtering in spectral/temporal domain (see 
ticket #43713)
+ - pkextract
+   extracting with absolute threshold (negative value) was selecting 1 
extra sample unit
+   debug: removed (redundant?) SetGeometry after SetFrom when readFeature 
was of appropriate geometry type. This caused wrong polygons in output vectro 
dataset
+ - pksvm
+   support for mask in geo coordinates (does not need to be in same 
dimensions as input raster dataset, only in same projection)
+ - pkann
+   support for mask in geo coordinates (does not need to be in same 
dimensions as input raster dataset, only in same projection)
+
 Todo:
  - todo for API
ImgReaderGdal (ImgWriterGdal) open in update mode (check gdal_edit.py: 
http://searchcode.com/codesearch/view/18938404)
diff --git a/configure b/configure
index 133beec..86da08a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pktools 2.5.4.
+# Generated by GNU Autoconf 2.69 for pktools 2.6.1.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pktools'
 PACKAGE_TARNAME='pktools'
-PACKAGE_VERSION='2.5.4'
-PACKAGE_STRING='pktools 2.5.4'
+PACKAGE_VERSION='2.6.1'
+PACKAGE_STRING='pktools 2.6.1'
 PACKAGE_BUGREPORT='kempe...@gmail.com'
 PACKAGE_URL=''
 
@@ -1366,7 +1366,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pktools 2.5.4 to adapt to many kinds of systems.
+\`configure' configures pktools 2.6.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1436,7 +1436,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of pktools 2.5.4:";;
+ short | recursive ) echo "Configuration of pktools 2.6.1:";;
esac
   cat <<\_ACEOF
 
@@ -1562,7 +1562,7 @@ fi
 test -n "$ac_init_help" && exit $ac_s

[pktools] 02/05: Merge tag 'upstream/2.6.1'

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository pktools.

commit bf78eb7a243bf27117013d91e4508ea9fe0b86b8
Merge: f565262 06f80f8
Author: Bas Couwenberg 
Date:   Wed Dec 3 21:16:24 2014 +0100

Merge tag 'upstream/2.6.1'

Upstream version 2.6.1

 ChangeLog|  24 +-
 configure|  36 +--
 configure.ac |   6 +-
 ltmain.sh|   4 +-
 m4/libtool.m4|  12 +-
 src/algorithms/Filter.cc |   8 +
 src/algorithms/Filter.h  |  11 +-
 src/algorithms/Filter2d.h|   2 +-
 src/algorithms/StatFactory.h | 336 ++---
 src/algorithms/myfann_cpp.h  |  18 +-
 src/apps/Makefile.am |   4 +-
 src/apps/Makefile.in |  49 ++--
 src/apps/pkann.cc| 116 +
 src/apps/pkascii2ogr.cc  |   2 -
 src/apps/pkdumpimg.cc|  23 +-
 src/apps/pkegcs.cc   |   2 +-
 src/apps/pkextract.cc| 580 +++
 src/apps/pkfilter.cc |   3 +-
 src/apps/pkfilterascii.cc|   2 +-
 src/apps/pkfilterdem.cc  |   6 +-
 src/apps/pkfsann.cc  |   4 +-
 src/apps/pkfssvm.cc  |   4 +-
 src/apps/pkinfo.cc   |   2 +-
 src/apps/pkkalman.cc |  15 +-
 src/apps/pklas2img.cc|   2 +-
 src/apps/pkoptsvm.cc |   4 +-
 src/apps/pkpolygonize.cc |   2 +-
 src/apps/pkregann.cc |   8 +-
 src/apps/pkstatascii.cc  |   2 +-
 src/apps/pksvm.cc| 128 ++
 src/base/Makefile.am |   8 +-
 src/base/Makefile.in | 177 +
 32 files changed, 902 insertions(+), 698 deletions(-)

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


[pktools] branch pristine-tar updated (2664bb0 -> f4c8ef8)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch pristine-tar
in repository pktools.

  from  2664bb0   pristine-tar data for pktools_2.5.4.orig.tar.gz
   new  f4c8ef8   pristine-tar data for pktools_2.6.1.orig.tar.gz

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pktools_2.6.1.orig.tar.gz.delta | Bin 0 -> 4607 bytes
 pktools_2.6.1.orig.tar.gz.id|   1 +
 2 files changed, 1 insertion(+)
 create mode 100644 pktools_2.6.1.orig.tar.gz.delta
 create mode 100644 pktools_2.6.1.orig.tar.gz.id

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


[pktools] branch upstream updated (7da1b47 -> 06f80f8)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch upstream
in repository pktools.

  from  7da1b47   Imported Upstream version 2.5.4
   new  06f80f8   Imported Upstream version 2.6.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ChangeLog|  24 +-
 configure|  36 +--
 configure.ac |   6 +-
 ltmain.sh|   4 +-
 m4/libtool.m4|  12 +-
 src/algorithms/Filter.cc |   8 +
 src/algorithms/Filter.h  |  11 +-
 src/algorithms/Filter2d.h|   2 +-
 src/algorithms/StatFactory.h | 336 ++---
 src/algorithms/myfann_cpp.h  |  18 +-
 src/apps/Makefile.am |   4 +-
 src/apps/Makefile.in |  49 ++--
 src/apps/pkann.cc| 116 +
 src/apps/pkascii2ogr.cc  |   2 -
 src/apps/pkdumpimg.cc|  23 +-
 src/apps/pkegcs.cc   |   2 +-
 src/apps/pkextract.cc| 580 +++
 src/apps/pkfilter.cc |   3 +-
 src/apps/pkfilterascii.cc|   2 +-
 src/apps/pkfilterdem.cc  |   6 +-
 src/apps/pkfsann.cc  |   4 +-
 src/apps/pkfssvm.cc  |   4 +-
 src/apps/pkinfo.cc   |   2 +-
 src/apps/pkkalman.cc |  15 +-
 src/apps/pklas2img.cc|   2 +-
 src/apps/pkoptsvm.cc |   4 +-
 src/apps/pkpolygonize.cc |   2 +-
 src/apps/pkregann.cc |   8 +-
 src/apps/pkstatascii.cc  |   2 +-
 src/apps/pksvm.cc| 128 ++
 src/base/Makefile.am |   8 +-
 src/base/Makefile.in | 177 +
 32 files changed, 902 insertions(+), 698 deletions(-)

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


[pktools] 04/375: support Optionpk without default value

2014-12-03 Thread Bas Couwenberg
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 70f56cf5d9be154d0c283ab4857f56e770ec7e6e
Author: Pieter Kempeneers 
Date:   Tue Aug 28 15:26:07 2012 +0200

support Optionpk without default value
---
 src/apps/pkfilter.cc |  4 ++--
 src/base/Optionpk.h  | 30 +++---
 2 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/apps/pkfilter.cc b/src/apps/pkfilter.cc
index c4c2122..b78ac57 100644
--- a/src/apps/pkfilter.cc
+++ b/src/apps/pkfilter.cc
@@ -58,9 +58,9 @@ int main(int argc,char **argv) {
   Optionpk dimX_opt("dx", "dx", "filter kernel size in x, must be odd 
(example: 3).", 0);
   Optionpk dimY_opt("dy", "dy", "filter kernel size in y, must be odd 
(example: 3).. Set dy=0 if 1-D filter must be used in band domain", 0);
   Optionpk option_opt("co", "co", "options: NAME=VALUE [-co 
COMPRESS=LZW] [-co INTERLEAVE=BAND]", "INTERLEAVE=BAND");
-  Optionpk class_opt("class", "class", "class value(s) to use for 
density, erosion, dilation, openening and closing, thresholding", 1);
+  Optionpk class_opt("class", "class", "class value(s) to use for 
density, erosion, dilation, openening and closing, thresholding");
   Optionpk threshold_opt("t", "threshold", "threshold value(s) to use 
for threshold filter (one for each class)", 0);
-  Optionpk mask_opt("\0", "mask", "mask value(s) ", -1);
+  Optionpk mask_opt("\0", "mask", "mask value(s) ");
   Optionpk tap_opt("tap", "tap", "text file conttaining taps used 
for filtering (from ul to lr). Use dimX and dimY to specify tap dimensions in x 
and y. Leave empty for not using taps", "");
   Optionpk colorTable_opt("\0", "ct", "color table (file with 5 
columns: id R G B ALFA (0: transparent, 255: solid)", "");
   Optionpk down_opt("d", "down", "down sampling factor. Use value 1 for 
no downsampling)", 1);
diff --git a/src/base/Optionpk.h b/src/base/Optionpk.h
index 48922f9..6547f99 100644
--- a/src/base/Optionpk.h
+++ b/src/base/Optionpk.h
@@ -117,8 +117,10 @@ template class Optionpk : public vector 
 {
 public:
   Optionpk();
+  Optionpk(const string& shortName, const string& longName, const string& 
helpInfo);
   Optionpk(const string& shortName, const string& longName, const string& 
helpInfo,const T& defaultValue);
   ~Optionpk();
+  void setAll(const string& shortName, const string& longName, const string& 
helpInfo);
   void setAll(const string& shortName, const string& longName, const string& 
helpInfo,const T& defaultValue);
   void setHelp(const string& helpInfo){m_help=helpInfo;};
   string usage() const;
@@ -155,6 +157,7 @@ private:
   string m_help;
   bool m_hasArgument;
   T m_defaultValue;
+  bool m_hasDefault;
 };
 
 template ostream& operator<<(ostream& os, const Optionpk& 
theOption)
@@ -167,10 +170,17 @@ template ostream& operator<<(ostream& os, const 
Optionpk& theOptio
 }
 
 template Optionpk::Optionpk() 
+  : m_hasDefault(false)
 {
 }
 
-template Optionpk::Optionpk(const string& shortName, const string& 
longName, const string& helpInfo,const T& defaultValue)
+template Optionpk::Optionpk(const string& shortName, const string& 
longName, const string& helpInfo)
+  : m_hasDefault(false)
+{
+  setAll(shortName,longName,helpInfo);
+}
+
+  template Optionpk::Optionpk(const string& shortName, const 
string& longName, const string& helpInfo,const T& defaultValue)
 {
   setAll(shortName,longName,helpInfo,defaultValue);
 }
@@ -192,7 +202,8 @@ template string Optionpk::usage() const
 helpss << "   " << setiosflags(ios::left) << setw(20) << " ";
   helpss << "   " << m_help;
   // helpss << std::resetiosflags << " (default: " << 
type2string(m_defaultValue) << ")";
-  helpss << " (default: " << type2string(m_defaultValue) << ")";
+  if(m_hasDefault)
+helpss << " (default: " << type2string(m_defaultValue) << ")";
   return helpss.str();
 }
 
@@ -203,9 +214,21 @@ template void Optionpk::setAll(const string& 
shortName, const string
   m_hasArgument=true;
   m_help=helpInfo;
   m_defaultValue=defaultValue;
+  m_hasDefault=true;
+}
+
+template void Optionpk::setAll(const string& shortName, const 
string& longName, const string& helpInfo)
+{
+  m_shortName=shortName;
+  m_longName=longName;
+  m_hasArgument=true;
+  m_help=helpInfo;
 }
+
 template<> void Optionpk::setAll(const string& shortName, const string& 
longName, const string& helpInfo,const bool& defaultValue);
 
+template<> void Optionpk::setAll(const string& shortName, const string& 
longName, const string& helpInfo);
+
 template<> Optionpk::Optionpk(const string& shortName, const string& 
longName, const string& helpInfo,const bool& defaultValue)
 {
   setAll(shortName,longName,helpInfo,defaultValue);
@@ -218,6 +241,7 @@ template<> void Optionpk::setAll(const string& 
shortName, const string& lo
   m_hasArgument=false;
   m_help=helpInfo;
   m_defaultValue=defaultValue;
+  m_hasDefault=true;
 }
 
 template Optionpk::~Optionpk() 
@@ -259,7 +283,7 @@

[pktools] 05/375: support ratio in pkndvi.cc

2014-12-03 Thread Bas Couwenberg
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 620ca4f97d3cbfab83828760a7fe34ba0de4d89a
Author: Pieter Kempeneers 
Date:   Mon Sep 3 16:18:23 2012 +0200

support ratio in pkndvi.cc
---
 src/apps/pkndvi.cc | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/apps/pkndvi.cc b/src/apps/pkndvi.cc
index 709a819..1672607 100644
--- a/src/apps/pkndvi.cc
+++ b/src/apps/pkndvi.cc
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
   Optionpk input_opt("i","input","input image file","");
   Optionpk output_opt("o","output","output image file containing 
ndvi","");
   Optionpk band_opt("b", "band", "Bands to be used for vegetation index 
(see rule option)", 0);
-  Optionpk rule_opt("r", "rule", "Rule for index. [ndvi 
(b1-b0)/(b1+b0)|gvmi (b0+0.1)-(b1+0.02))/((b0+0.1)+(b1+0.02)))|vari 
(b1-b2)/(b1+b2-b0)|diff (b1-b0)|scale.", "ndvi");
+  Optionpk rule_opt("r", "rule", "Rule for index. [ndvi 
(b1-b0)/(b1+b0)|gvmi (b0+0.1)-(b1+0.02))/((b0+0.1)+(b1+0.02)))|vari 
(b1-b2)/(b1+b2-b0)|diff (b1-b0)|scale|ratio.", "ndvi");
   Optionpk invalid_opt("t", "invalid", "Mask value where image is 
invalid.", 0);
   Optionpk flag_opt("f", "flag", "Flag value to put in image if not valid 
(0)", 0);
   Optionpk colorTable_opt("ct", "ct", "color table (file with 5 
columns: id R G B ALFA (0: transparent, 255: solid)", "");
@@ -239,6 +239,10 @@ int main(int argc, char *argv[])
   denom=(lineInput[0][icol]-offset_opt[0])/scale_opt[0];
   nom=1.0;
 }
+else if(rule_opt[0]=="ratio"){
+  denom=(lineInput[0][icol]-offset_opt[0])/scale_opt[0];
+  nom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0];
+}
 else{
   std::cout << "Error: rule " << rule_opt[0] << " not supported" << 
std::endl;
   exit(1);

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


[pktools] 06/375: introduced --enable-las and --enable-fann in configure.ac

2014-12-03 Thread Bas Couwenberg
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 65c92b7e57c0820331c0f68cf494e8b05eee87ec
Author: Pieter Kempeneers 
Date:   Tue Sep 4 13:32:47 2012 +0200

introduced --enable-las and --enable-fann in configure.ac
---
 configure| 53 -
 configure.ac | 35 ++-
 2 files changed, 38 insertions(+), 50 deletions(-)

diff --git a/configure b/configure
index 187ca3a..75879c2 100755
--- a/configure
+++ b/configure
@@ -713,8 +713,8 @@ ac_user_opts='
 enable_option_checking
 with_gdal
 enable_dependency_tracking
-with_fann
-with_las
+enable_fann
+enable_las
 '
   ac_precious_vars='build_alias
 host_alias
@@ -1354,13 +1354,13 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-fann   Enable feature fann
+  --enable-lasEnable feature las
 
 Optional Packages:
   --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
   --without-PACKAGE   do not use PACKAGE (same as --with-PACKAGE=no)
   --with-gdal=[ARG]   Specify full path to gdal-config script
-  --with-fann use fann library @@
-  --with-las  use las library @@
 
 Some influential environment variables:
   CXX C++ compiler command
@@ -5089,16 +5089,9 @@ fi
 done
 
 
-# Checks for packages
-#PKG_CHECK_MODULES(FANN, fann >= 2.1.0, [HAVE_FANN=1], [HAVE_FANN=0])
-#AM_CONDITIONAL([USE_FANN], [test "$HAVE_FANN" -eq 1])
-
-
-# Check whether --with-fann was given.
-if test "${with_fann+set}" = set; then :
-  withval=$with_fann;
-else
-  with_fann=no
+# Check whether --enable-fann was given.
+if test "${enable_fann+set}" = set; then :
+  enableval=$enable_fann;
 fi
 
 
@@ -5107,6 +5100,7 @@ fi
 
 
 
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a 
program name with args.
@@ -5220,7 +5214,7 @@ $as_echo "no" >&6; }
PKG_CONFIG=""
fi
 fi
-if test "x$with_fann" != xno; then :
+if test "x$enable_fann" = "xyes"; then :
 
 
 pkg_failed=no
@@ -5299,6 +5293,8 @@ else
   USE_FANN_FALSE=
 fi
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_FANN=true\"" >&5
+$as_echo "$as_me: WARNING: \"USE_FANN=true\"" >&2;}
 
 else
 
@@ -5310,18 +5306,18 @@ else
   USE_FANN_FALSE=
 fi
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_FANN=false\"" 
>&5
+$as_echo "$as_me: WARNING: \"USE_FANN=false\"" >&2;}
 
 fi
 
-
-# Check whether --with-las was given.
-if test "${with_las+set}" = set; then :
-  withval=$with_las;
-else
-  with_las=no
+# Check whether --enable-las was given.
+if test "${enable_las+set}" = set; then :
+  enableval=$enable_las;
 fi
 
-if test "x$with_las" != xno; then :
+
+if test "x$enable_las" = "xyes"; then :
 
 if true; then
   USE_LAS_TRUE=
@@ -5331,6 +5327,10 @@ else
   USE_LAS_FALSE=
 fi
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_LAS=true\"" >&5
+$as_echo "$as_me: WARNING: \"USE_LAS=true\"" >&2;}
+FILECLASSES_OPT="src/fileclasses"
+
 
 else
 
@@ -5342,13 +5342,8 @@ else
   USE_LAS_FALSE=
 fi
 
-
-fi
-
-if $USE_LAS; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_LAS=true\"" >&5
-$as_echo "$as_me: WARNING: \"USE_LAS=true\"" >&2;}
-   FILECLASSES_OPT="src/fileclasses"
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_LAS=false\"" >&5
+$as_echo "$as_me: WARNING: \"USE_LAS=false\"" >&2;}
 
 fi
 
diff --git a/configure.ac b/configure.ac
index 4c2f774..f44206e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,39 +22,32 @@ AX_LIB_GDAL([1.8.0]) dnl uncomment if gdal version 1.8.0 is 
required
 
 AC_CHECK_HEADERS([gdal.h])
 
-# Checks for packages
-#PKG_CHECK_MODULES(FANN, fann >= 2.1.0, [HAVE_FANN=1], [HAVE_FANN=0])
-#AM_CONDITIONAL([USE_FANN], [test "$HAVE_FANN" -eq 1])
+dnl Default-disabled features
+AC_ARG_ENABLE([fann],
+AS_HELP_STRING([--enable-fann], [Enable feature fann]))
 
-AC_ARG_WITH([fann],
-   [AS_HELP_STRING([--with-fann], [use fann library] @@)],
-   [],
-   [with_fann=no])
-AS_IF([test "x$with_fann" != xno],
-   [
+AS_IF([test "x$enable_fann" = "xyes"], [
PKG_CHECK_MODULES(FANN, fann >= 2.1.0, [HAVE_FANN=1], [HAVE_FANN=0])
AM_CONDITIONAL([USE_FANN], [test "$HAVE_FANN" -eq 1])
+   AC_MSG_WARN("USE_FANN=true")
], [
AM_CONDITIONAL(USE_FANN, false)
+   AC_MSG_WARN("USE_FANN=false")
])
 
-AC_ARG_WITH([las],
-   [AS_HELP_STRING([--with-las], [use las library] @@)],
-   [],
-   [with_las=no])
-AS_IF([test "x$with_las" != xno],
-   [
+AC_ARG_ENABLE([las],
+AS_HELP_STRING([--enable-las], [Enable feature las]))
+
+AS_IF([test "x$

[pktools] 07/375: support spectral filtering in pkfilter using tapz option

2014-12-03 Thread Bas Couwenberg
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 3cc2c2b2893f0f6c02a9b4a4174b024fcce3729f
Author: Pieter Kempeneers 
Date:   Thu Sep 13 11:00:02 2012 +0200

support spectral filtering in pkfilter using tapz option
---
 INSTALL  |  4 ++--
 README   |  1 +
 configure| 20 ++--
 configure.ac |  2 +-
 src/algorithms/Filter.cc | 40 +---
 src/algorithms/Filter.h  |  1 +
 src/apps/pkfilter.cc |  8 +++-
 7 files changed, 55 insertions(+), 21 deletions(-)

diff --git a/INSTALL b/INSTALL
index 58d150a..db6c84a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,8 +12,8 @@ The simplest way to compile this package is:
  configure options (use ./configure --help for help info)
  
 --with-gdal=
-   --with-fann=yes (to include pkclassify_nn when FANN is installed)
-   --with-las=yes (to include pklas2img when LIBLAS is installed)
+   --enable-fann (to include pkclassify_nn when FANN is installed)
+   --enable-las (to include pklas2img when LIBLAS >= 1.6 is installed)
 
   2. Type `make' to compile the package.
 
diff --git a/README b/README
index 4030205..f42dc4f 100644
--- a/README
+++ b/README
@@ -15,3 +15,4 @@ To install the programs in pktools, refer to the file INSTALL
 Change history
 -
 June 25 2012, first public release of the code
+September 04 2012, introduced --enable-fann and --enable-las in configuration
diff --git a/configure b/configure
index 75879c2..8d67c8c 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for pktools 2.1.
+# Generated by GNU Autoconf 2.67 for pktools 2.2.
 #
 # Report bugs to .
 #
@@ -552,8 +552,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pktools'
 PACKAGE_TARNAME='pktools'
-PACKAGE_VERSION='2.1'
-PACKAGE_STRING='pktools 2.1'
+PACKAGE_VERSION='2.2'
+PACKAGE_STRING='pktools 2.2'
 PACKAGE_BUGREPORT='kempe...@gmail.com'
 PACKAGE_URL=''
 
@@ -1278,7 +1278,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pktools 2.1 to adapt to many kinds of systems.
+\`configure' configures pktools 2.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1344,7 +1344,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of pktools 2.1:";;
+ short | recursive ) echo "Configuration of pktools 2.2:";;
esac
   cat <<\_ACEOF
 
@@ -1450,7 +1450,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pktools configure 2.1
+pktools configure 2.2
 generated by GNU Autoconf 2.67
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1968,7 +1968,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pktools $as_me 2.1, which was
+It was created by pktools $as_me 2.2, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
@@ -2783,7 +2783,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pktools'
- VERSION='2.1'
+ VERSION='2.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6278,7 +6278,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pktools $as_me 2.1, which was
+This file was extended by pktools $as_me 2.2, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -6344,7 +6344,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/&/g'`"
 ac_cs_version="\\
-pktools config.status 2.1
+pktools config.status 2.2
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index f44206e..526576c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([pktools], [2.1], [kempe...@gmail.com])
+AC_INIT([pktools], [2.2], [kempe...@gmail.com])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_CONFIG_MACRO_DIR([m4])
 AX_LIB_GDAL()
diff --git a/src/algorithms/Filter.cc b/src/algorithms/Filter.cc
index 46b8814..067ca12 100644
--- a/src/algorithms/Filter.cc
+++ b/src/algorithms/Filter.cc
@@ -54,14 +54,40 @@ void Filter::morphology(const ImgReaderGdal& input, 
ImgWriterGdal& output, int m
 vector pixelOutput(input.nrOfBand());
 for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol());
+  Vector2d lineOutput(i

[pktools] 08/375: support spectral filtering in pkfilter using tapz option

2014-12-03 Thread Bas Couwenberg
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 60d243ab2c29ae73bbfb0f751f640201a513f4e0
Author: Pieter Kempeneers 
Date:   Thu Sep 13 11:01:30 2012 +0200

support spectral filtering in pkfilter using tapz option
---
 README | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README b/README
index f42dc4f..fa0a3bb 100644
--- a/README
+++ b/README
@@ -16,3 +16,4 @@ Change history
 -
 June 25 2012, first public release of the code
 September 04 2012, introduced --enable-fann and --enable-las in configuration
+September 13 2012, support spectral filtering (z-dimension) in pkfilter using 
tapz option
\ No newline at end of file

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


[pktools] branch upstream-master created (now 36cdcc9)

2014-12-03 Thread Bas Couwenberg
This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a change to branch upstream-master
in repository pktools.

at  36cdcc9   Merge branch 'master' of git.sv.gnu.org:/srv/git/pktools 
Merge after edit in myfann_cpp.h in Windows

This branch includes the following new commits:

   new  c0472d6   Initial import
   new  61d71ee   versions automatically extracted from config and support 
for mask values in pkinfo min/max values
   new  24cc89b   support for mask values in pkinfo min/max values
   new  70f56cf   support Optionpk without default value
   new  620ca4f   support ratio in pkndvi.cc
   new  65c92b7   introduced --enable-las and --enable-fann in configure.ac
   new  3cc2c2b   support spectral filtering in pkfilter using tapz option
   new  60d243a   support spectral filtering in pkfilter using tapz option
   new  2faf0b5   support spectral filtering in pkfilter using tapz option
   new  32dfd49   introduced --enable-nlopt in configure.ac and 
pkgetchandlier and pksetchandelier in src/apps
   new  ece91d6   support of angles in morphological filter
   new  d93429d   support of osavi, mcari and tcari in pkndvi
   new  8c9e2c5   increased version to 2.3
   new  8be6f56   findSubstring in Optionpk.h and default interleave from 
input image
   new  21adc69   before changes at home
   new  d01ec13   pkclassify_svm is working
   new  63cc6bc   smv is installed per default (no need to enable in 
configure script), update README, SVM_COPYRIGHT
   new  bd1c222   added pkclassify_svm.cc and pkdsm2shadow.cc
   new  59e07e8   support of nodata in pkinfo when calculating histogram
   new  2e876d2   updates in Changelog
   new  e12d767   added pkascii2ogr, SensorModel.h and pksensormodel
   new  d1421ac   included matrix_vector_operations.h in SensorModel
   new  ca44543   included matrix_vector_operations.h in SensorModel
   new  d079041   VERSION in ImgWriterGdal.cc
   new  29a3ca8   VERSION in ImgWriterGdal.cc
   new  7fa9657   before xmas holidays, see Changelog
   new  094c17f   added feature selection
   new  a73cc3a   cross validation for pkclassify_nn
   new  3531dce   feature selection with automatic detection of optimal 
number of features in pkfs_svm and pkfs_nn
   new  e6a281f   added OptFactory.h and pkopt_svm.cc
   new  9c4dbcc   added OptFactory.h and pkopt_svm.cc
   new  5b7ed50   added pkfs_svm.cc and pkfs_nn.cc
   new  b706d7c   added UA and PA in pkclassify_svm.cc
   new  57c6884   reclass function in pkclassify_nn.cc and pkclassify_svm.cc
   new  f1c59c7   string map in pkclassify_nn.c and pkclassify_svm.cc
   new  a2ec861   small changes in pkinfo, see Changelog
   new  843bdf7   before doxygen
   new  061a710   added doxygen config file
   new  e93a838   see Changelog
   new  b24ea2d   changed help info in OptionPk to Markdown format
   new  e287c40   doxygen help format in Optionpk.h, example for pkinfo.cc, 
other apps to be done
   new  46acc25   support of polygons in ImgReaderOgr::readData and in 
pkclassify_svm
   new  48453a5   converted all apps for new Optionpk.h
   new  b84ea71   error in pkclassify_svm when aggregation_opt is 0
   new  0c227ed   minor changes to pkclassify_svm, removed empty default 
string in pkreclass.cc
   new  2b73cf4   confusion matrix supports bagging for pkclassify_svm.cc, 
balancing and bagsize for each class. Still to be implemented for 
pkclassify_nn.cc
   new  6766a16   pkclassify_nn.cc adapted for balancing and bagging 
similar to pkclassify_svm.cc and added pktestOption.cc
   new  3d2   added mainpage.md as main page for pktools via doxygen
   new  47a770e   doxygen adapted, todo: remove doubles in related pages
   new  75eb743   added doc
   new  599a713   added mainpage.dox and pkeditogr.cc
   new  452fee1   added mainpage.dox, see Changelog
   new  f1ca6a3   explanation how to update repository home page in 
createappsdox.sh
   new  da3164c   before weekend
   new  c4cde92   worked on documentation in petit Paris
   new  3a77ea3   worked on documentation in petit Paris
   new  400f7f3   pkinfo all visible help info
   new  ea38ebf   added active learning functionality in pkclassify_svm.cc
   new  c39706e   set probability svm to true when active learning is 
selected
   new  76cdaaf   removed debug info from pkeditogr
   new  b102157   small change in pkclassify_svm.cc
   new  29f0ca8   removed reclassification from pkclassify_svm.cc, still 
todo for pkclassify_nn.cc
   new  143c64c   introduced FileReaderAscii.h and updated pkstat.cc
   new  46d99ce   renamed Histogram to StatFactory
   new  2bd32b7   spectral filtering
   new  9f33ca7   Filter1d and Filter2d with getFilterType returning enum 
FILTER_TYPE in function of string
   new  0c71

[pktools] 09/375: support spectral filtering in pkfilter using tapz option

2014-12-03 Thread Bas Couwenberg
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 2faf0b55a8c656f88bda7bbd61e4dc0151231a47
Author: Pieter Kempeneers 
Date:   Thu Sep 13 14:12:31 2012 +0200

support spectral filtering in pkfilter using tapz option
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 526576c..8ad32a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([pktools], [2.2], [kempe...@gmail.com])
+AC_INIT([pktools], [2.3], [kempe...@gmail.com])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_CONFIG_MACRO_DIR([m4])
 AX_LIB_GDAL()

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


[pktools] 03/375: support for mask values in pkinfo min/max values

2014-12-03 Thread Bas Couwenberg
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 24cc89baa83c5017228f0ef605eb9b405e8771bf
Author: Pieter Kempeneers 
Date:   Thu Aug 23 18:49:27 2012 +0200

support for mask values in pkinfo min/max values
---
 src/apps/pkinfo.cc|  2 +-
 src/imageclasses/ImgReaderGdal.cc | 71 +--
 2 files changed, 54 insertions(+), 19 deletions(-)

diff --git a/src/apps/pkinfo.cc b/src/apps/pkinfo.cc
index 0e393e9..d3fa74e 100644
--- a/src/apps/pkinfo.cc
+++ b/src/apps/pkinfo.cc
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
 
 if(minmax_opt[0]){
   assert(band_opt[0] lineBuffer(nrOfCol());
+  bool init=false;
   for(int irow=0;irowlineBuffer[icol]){
-y=irow;
-x=icol;
-minValue=lineBuffer[icol];
+  bool 
valid=(find(m_noDataValues.begin(),m_noDataValues.end(),lineBuffer[icol])==m_noDataValues.end());
+  if(valid){
+if(!init){
+  y=irow;
+  x=icol;
+  minValue=lineBuffer[icol];
+  init=true;
+}
+else if(minValue>lineBuffer[icol]){
+  y=irow;
+  x=icol;
+  minValue=lineBuffer[icol];
+}
   }
 }
   }
-  return minValue;
+  if(init)
+return minValue;
+  else
+throw(static_cast("Warning: not initialized"));
 }
 
 double ImgReaderGdal::getMax(int& x, int& y, int band) const{
   double maxValue=0;
   vector lineBuffer(nrOfCol());
+  bool init=false;
   for(int irow=0;irow("Warning: not initialized"));
 }
 
 void ImgReaderGdal::getMinMax(double& minValue, double& maxValue, int band, 
bool exhaustiveSearch) const
@@ -357,15 +379,28 @@ void ImgReaderGdal::getMinMax(double& minValue, double& 
maxValue, int band, bool
   maxValue=adfMinMax[1];
   if(exhaustiveSearch){//force exhaustive search
 vector lineBuffer(nrOfCol());
+bool init=false;
 for(int irow=0;irowlineBuffer[icol])
- minValue=lineBuffer[icol];
-   if(maxValuelineBuffer[icol])
+  minValue=lineBuffer[icol];
+if(maxValue("Warning: not initialized"));
   }
 }
 

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


[pktools] 13/375: increased version to 2.3

2014-12-03 Thread Bas Couwenberg
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 8c9e2c57f8b28f0fba050fbc7d2c373754cf0598
Author: Pieter Kempeneers 
Date:   Wed Oct 3 11:40:15 2012 +0200

increased version to 2.3
---
 aclocal.m4   |  14 ++--
 configure| 268 ++-
 configure.ac |   2 +-
 3 files changed, 126 insertions(+), 158 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 0e0a984..1f01ab1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
`autoreconf'.])])
@@ -47,8 +47,7 @@ To do so, use the procedure documented by the package, 
typically `autoreconf'.])
 # --
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search 
path])
@@ -94,8 +93,7 @@ m4_define([_PKG_CONFIG],
 pkg_cv_[]$1="$$1"
  elif test -n "$PKG_CONFIG"; then
 PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 [pkg_failed=yes])
  else
 pkg_failed=untried
@@ -143,9 +141,9 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
 _PKG_SHORT_ERRORS_SUPPORTED
 if test $_pkg_short_errors_supported = yes; then
-   $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors 
--cflags --libs "$2" 2>&1`
+   $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 
2>&1`
 else 
-   $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs 
"$2" 2>&1`
+   $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
diff --git a/configure b/configure
index 9839556..85a799f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pktools 2.2.
+# Generated by GNU Autoconf 2.67 for pktools 2.3.
 #
 # Report bugs to .
 #
@@ -91,7 +91,6 @@ fi
 IFS=" ""   $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -217,18 +216,11 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
-   # Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
-   case $- in # 
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-   esac
-   exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+   exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 fi
 
 if test x$as_have_required = xno; then :
@@ -560,8 +552,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pktools'
 PACKAGE_TARNAME='pktools'
-PACKAGE_VERSION='2.2'
-PACKAGE_STRING='pktools 2.2'
+PACKAGE_VERSION='2.3'
+PACKAGE_STRING='pktools 2.3'
 PACKAGE_BUGREPORT='kempe...@gmail.com'
 PACKAGE_URL=''
 
@@ -1155,7 +1147,7 @@ Try \`$0 --help' for more information"
 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
   $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-: "${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}"
+: ${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}
 ;;
 
   esac
@@ -1293,7 +1285,7 @@ if test "$ac_init_help" = "long"; then
   # O

[pktools] 17/375: smv is installed per default (no need to enable in configure script), update README, SVM_COPYRIGHT

2014-12-03 Thread Bas Couwenberg
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 63cc6bc37acbef2be3e36ddbc2fa1909affcb753
Author: Pieter Kempeneers 
Date:   Mon Oct 22 10:14:10 2012 +0200

smv is installed per default (no need to enable in configure script), 
update README, SVM_COPYRIGHT
---
 README   |  3 ++-
 configure| 27 
 configure.ac | 12 -
 src/apps/Makefile.am |  9 +++
 src/apps/Makefile.in | 70 +---
 5 files changed, 34 insertions(+), 87 deletions(-)

diff --git a/README b/README
index fa0a3bb..12bcc9c 100644
--- a/README
+++ b/README
@@ -16,4 +16,5 @@ Change history
 -
 June 25 2012, first public release of the code
 September 04 2012, introduced --enable-fann and --enable-las in configuration
-September 13 2012, support spectral filtering (z-dimension) in pkfilter using 
tapz option
\ No newline at end of file
+September 13 2012, support spectral filtering (z-dimension) in pkfilter using 
tapz option
+October 20 2012, support for SVM classifier 
diff --git a/configure b/configure
index 64c9f8d..9c8f787 100755
--- a/configure
+++ b/configure
@@ -612,8 +612,6 @@ NLOPT_CFLAGS
 FILECLASSES_OPT
 USE_LAS_FALSE
 USE_LAS_TRUE
-USE_SVM_FALSE
-USE_SVM_TRUE
 USE_FANN_FALSE
 USE_FANN_TRUE
 FANN_LIBS
@@ -720,7 +718,6 @@ enable_option_checking
 with_gdal
 enable_dependency_tracking
 enable_fann
-enable_svm
 enable_las
 enable_nlopt
 '
@@ -1365,7 +1362,6 @@ Optional Features:
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-fann   Enable feature fann
-  --enable-svmEnable feature svm
   --enable-lasEnable feature las
   --enable-nlopt  Enable feature nlopt
 
@@ -5138,26 +5134,7 @@ $as_echo "$as_me: WARNING: \"USE_FANN=false\"" >&2;}
 
 fi
 
-# Check whether --enable-svm was given.
-if test "${enable_svm+set}" = set; then :
-  enableval=$enable_svm;
-fi
-
-
-if test "x$enable_svm" = "xyes"; then :
 
-if true; then
-  USE_SVM_TRUE=
-  USE_SVM_FALSE='#'
-else
-  USE_SVM_TRUE='#'
-  USE_SVM_FALSE=
-fi
-
-   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_SVM=true\"" >&5
-$as_echo "$as_me: WARNING: \"USE_SVM=true\"" >&2;}
-
-fi
 
 # Check whether --enable-las was given.
 if test "${enable_las+set}" = set; then :
@@ -5810,10 +5787,6 @@ if test -z "${USE_FANN_TRUE}" && test -z 
"${USE_FANN_FALSE}"; then
   as_fn_error $? "conditional \"USE_FANN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_SVM_TRUE}" && test -z "${USE_SVM_FALSE}"; then
-  as_fn_error $? "conditional \"USE_SVM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_LAS_TRUE}" && test -z "${USE_LAS_FALSE}"; then
   as_fn_error $? "conditional \"USE_LAS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index a241c7f..9125099 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,13 +35,13 @@ AS_IF([test "x$enable_fann" = "xyes"], [
AC_MSG_WARN("USE_FANN=false")
])
 
-AC_ARG_ENABLE([svm],
-AS_HELP_STRING([--enable-svm], [Enable feature svm]))
+dnl AC_ARG_ENABLE([svm],
+dnl AS_HELP_STRING([--enable-svm], [Enable feature svm]))
 
-AS_IF([test "x$enable_svm" = "xyes"], [
-   AM_CONDITIONAL(USE_SVM, true)
-   AC_MSG_WARN("USE_SVM=true")
-   ])
+dnl AS_IF([test "x$enable_svm" = "xyes"], [
+dnlAM_CONDITIONAL(USE_SVM, true)
+dnlAC_MSG_WARN("USE_SVM=true")
+dnl])
 
 AC_ARG_ENABLE([las],
 AS_HELP_STRING([--enable-las], [Enable feature las]))
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index acfb841..3734a79 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -6,18 +6,14 @@ LDADD = $(GDAL_LDFLAGS) 
$(top_builddir)/src/algorithms/libalgorithms.a $(top_bui
 ###
 
 # the program to build (the names of the final binaries)
-bin_PROGRAMS = pkinfo pkcrop pkreclass pkgetmask pksetmask pkcreatect 
pkdumpimg pkdumpogr pksieve pkstat pkstatogr pkegcs pkextract pkfillnodata 
pkfilter pkveg2shadow pkmosaic pkndvi pkpolygonize pkascii2img pkdiff
+bin_PROGRAMS = pkinfo pkcrop pkreclass pkgetmask pksetmask pkcreatect 
pkdumpimg pkdumpogr pksieve pkstat pkstatogr pkegcs pkextract pkfillnodata 
pkfilter pkveg2shadow pkmosaic pkndvi pkpolygonize pkascii2img pkdiff 
pkclassify_svm
 if USE_FANN
 bin_PROGRAMS += pkclassify_nn
 pkclassify_nn_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h 
pkclassify_nn.h pkclassify_nn.cc
 pkclassify_nn_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base 
$(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
 pkclassify

[pktools] 18/375: added pkclassify_svm.cc and pkdsm2shadow.cc

2014-12-03 Thread Bas Couwenberg
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 bd1c222b76545fdb5dc310736f1f4fb06b49de68
Author: Pieter Kempeneers 
Date:   Wed Oct 31 18:07:25 2012 +0100

added pkclassify_svm.cc and pkdsm2shadow.cc
---
 README|8 +-
 src/algorithms/SVM_COPYRIGHT  |   31 +
 src/algorithms/svm.cpp| 3114 +
 src/algorithms/svm.h  |  101 ++
 src/apps/Makefile.am  |4 +-
 src/apps/Makefile.in  |   48 +-
 src/apps/pkclassify_svm.cc| 1037 
 src/apps/pkdsm2shadow.cc  |  148 ++
 src/apps/pkextract.cc |4 +-
 src/imageclasses/ImgWriterGdal.cc |2 +
 10 files changed, 4466 insertions(+), 31 deletions(-)

diff --git a/README b/README
index 12bcc9c..aa8b4ca 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ To install the programs in pktools, refer to the file INSTALL
 
 Change history
 -
-June 25 2012, first public release of the code
-September 04 2012, introduced --enable-fann and --enable-las in configuration
-September 13 2012, support spectral filtering (z-dimension) in pkfilter using 
tapz option
-October 20 2012, support for SVM classifier 
+version 1.0 June 25 2012, first public release of the code
+version 2.1 September 04 2012, introduced --enable-fann and --enable-las in 
configuration
+version 2.2 September 13 2012, support spectral filtering (z-dimension) in 
pkfilter using tapz option
+version 2.3 October 20 2012, support for SVM classifier 
diff --git a/src/algorithms/SVM_COPYRIGHT b/src/algorithms/SVM_COPYRIGHT
new file mode 100644
index 000..9280fc0
--- /dev/null
+++ b/src/algorithms/SVM_COPYRIGHT
@@ -0,0 +1,31 @@
+
+Copyright (c) 2000-2012 Chih-Chung Chang and Chih-Jen Lin
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Neither name of copyright holders nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/algorithms/svm.cpp b/src/algorithms/svm.cpp
new file mode 100644
index 000..5e9fd28
--- /dev/null
+++ b/src/algorithms/svm.cpp
@@ -0,0 +1,3114 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+//test
+// #include 
+#include "svm.h"
+int libsvm_version = LIBSVM_VERSION;
+typedef float Qfloat;
+typedef signed char schar;
+#ifndef min
+template  static inline T min(T x,T y) { return (x static inline T max(T x,T y) { return (x>y)?x:y; }
+#endif
+template  static inline void swap(T& x, T& y) { T t=x; x=y; y=t; }
+template  static inline void clone(T*& dst, S* src, int n)
+{
+   dst = new T[n];
+   memcpy((void *)dst,(void *)src,sizeof(T)*n);
+}
+static inline double powi(double base, int times)
+{
+   double tmp = base, ret = 1.0;
+
+   for(int t=times; t>0; t/=2)
+   {
+   if(t%2==1) ret*=tmp;
+   tmp = tmp * tmp;
+   }
+   return ret;
+}
+#define INF HUGE_VAL
+#define TAU 1e-12
+#define Malloc(type,n) (type *)malloc((n)*sizeof(type))
+
+static void print_string_stdout(const char *s)
+{
+   fputs(s,stdout);
+   fflush(stdout);
+}
+static void (*svm_print_string) (const char *) = &print_string_stdout;
+#if 1
+static void info(const char *fmt,...)
+{
+   char buf[BUFSIZ];
+   va_list ap;
+   va_start(ap,fmt);
+   vsprintf(buf,fmt,ap);
+   va_end(ap);
+   (*svm_print_string)(buf);
+}
+#else
+static void info(const char *fmt,...) {}
+#endif
+
+//
+// Kernel Cache
+//
+// l is the number of total data items
+// size is the cache size limit in bytes
+//
+class Cache
+{
+pub

[pktools] 10/375: introduced --enable-nlopt in configure.ac and pkgetchandlier and pksetchandelier in src/apps

2014-12-03 Thread Bas Couwenberg
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 32dfd49e516f74c5b113e862c939f5d155f8156f
Author: Pieter Kempeneers 
Date:   Fri Sep 14 14:32:48 2012 +0200

introduced --enable-nlopt in configure.ac and pkgetchandlier and 
pksetchandelier in src/apps
---
 Makefile.in  |   2 +
 configure| 123 +++
 configure.ac |  15 +-
 src/algorithms/Makefile.in   |   2 +
 src/apps/Makefile.in |   2 +
 src/base/Makefile.in |   2 +
 src/fileclasses/Makefile.in  |   2 +
 src/imageclasses/Makefile.in |   2 +
 8 files changed, 149 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index bcd156b..7146fbd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -148,6 +148,8 @@ LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NLOPT_CFLAGS = @NLOPT_CFLAGS@
+NLOPT_LIBS = @NLOPT_LIBS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/configure b/configure
index 8d67c8c..c890d6e 100755
--- a/configure
+++ b/configure
@@ -605,6 +605,10 @@ USE_GSL_FALSE
 USE_GSL_TRUE
 GSL_LIBS
 GSL_CFLAGS
+USE_NLOPT_FALSE
+USE_NLOPT_TRUE
+NLOPT_LIBS
+NLOPT_CFLAGS
 FILECLASSES_OPT
 USE_LAS_FALSE
 USE_LAS_TRUE
@@ -715,6 +719,7 @@ with_gdal
 enable_dependency_tracking
 enable_fann
 enable_las
+enable_nlopt
 '
   ac_precious_vars='build_alias
 host_alias
@@ -733,6 +738,8 @@ PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
 FANN_CFLAGS
 FANN_LIBS
+NLOPT_CFLAGS
+NLOPT_LIBS
 GSL_CFLAGS
 GSL_LIBS
 CXXCPP'
@@ -1356,6 +1363,7 @@ Optional Features:
   --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-fann   Enable feature fann
   --enable-lasEnable feature las
+  --enable-nlopt  Enable feature nlopt
 
 Optional Packages:
   --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
@@ -1380,6 +1388,9 @@ Some influential environment variables:
   path overriding pkg-config's built-in search path
   FANN_CFLAGS C compiler flags for FANN, overriding pkg-config
   FANN_LIBS   linker flags for FANN, overriding pkg-config
+  NLOPT_CFLAGS
+  C compiler flags for NLOPT, overriding pkg-config
+  NLOPT_LIBS  linker flags for NLOPT, overriding pkg-config
   GSL_CFLAGS  C compiler flags for GSL, overriding pkg-config
   GSL_LIBSlinker flags for GSL, overriding pkg-config
   CXXCPP  C++ preprocessor
@@ -5347,6 +5358,110 @@ $as_echo "$as_me: WARNING: \"USE_LAS=false\"" >&2;}
 
 fi
 
+# Check whether --enable-nlopt was given.
+if test "${enable_nlopt+set}" = set; then :
+  enableval=$enable_nlopt;
+fi
+
+
+if test "x$enable_nlopt" = "xyes"; then :
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NLOPT" >&5
+$as_echo_n "checking for NLOPT... " >&6; }
+
+if test -n "$NLOPT_CFLAGS"; then
+pkg_cv_NLOPT_CFLAGS="$NLOPT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+if test -n "$PKG_CONFIG" && \
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"nlopt >= 2.1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "nlopt >= 2.1.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_NLOPT_CFLAGS=`$PKG_CONFIG --cflags "nlopt >= 2.1.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+pkg_failed=untried
+fi
+if test -n "$NLOPT_LIBS"; then
+pkg_cv_NLOPT_LIBS="$NLOPT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+if test -n "$PKG_CONFIG" && \
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"nlopt >= 2.1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "nlopt >= 2.1.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_NLOPT_LIBS=`$PKG_CONFIG --libs "nlopt >= 2.1.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+_pkg_short_errors_supported=yes
+else
+_pkg_short_errors_supported=no
+fi
+if test $_pkg_short_errors_supported = yes; then
+   NLOPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors 
"nlopt >= 2.1.0" 2>&1`
+else
+   NLOPT_PKG_ERRORS=`$PKG_CONFIG --print-errors "nlopt >= 2.1.0" 
2>&1`
+fi
+   # Put the nasty error message in config.log where it belongs
+   echo "$NLOPT_PKG_ERRORS" >&5
+
+   HAVE_NLOPT=0
+elif test $pkg_failed = untried; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+   HAVE_NLOPT=0
+else
+   NLOPT_CFLAGS=$pkg_cv_NLOPT_CFLAGS
+   NLOPT_LIBS=$pkg_cv_NLOPT_LIBS
+{ $as_echo "$as_me:${a

[pktools] 12/375: support of osavi, mcari and tcari in pkndvi

2014-12-03 Thread Bas Couwenberg
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 d93429d5f742c971a2955e99e7d84e02b2a35723
Author: Pieter Kempeneers 
Date:   Mon Sep 24 09:47:19 2012 +0200

support of osavi, mcari and tcari in pkndvi
---
 src/apps/pkndvi.cc | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/apps/pkndvi.cc b/src/apps/pkndvi.cc
index 1672607..2db94e0 100644
--- a/src/apps/pkndvi.cc
+++ b/src/apps/pkndvi.cc
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
   Optionpk input_opt("i","input","input image file","");
   Optionpk output_opt("o","output","output image file containing 
ndvi","");
   Optionpk band_opt("b", "band", "Bands to be used for vegetation index 
(see rule option)", 0);
-  Optionpk rule_opt("r", "rule", "Rule for index. [ndvi 
(b1-b0)/(b1+b0)|gvmi (b0+0.1)-(b1+0.02))/((b0+0.1)+(b1+0.02)))|vari 
(b1-b2)/(b1+b2-b0)|diff (b1-b0)|scale|ratio.", "ndvi");
+  Optionpk rule_opt("r", "rule", "Rule for index. [ndvi 
(b1-b0)/(b1+b0)|gvmi (b0+0.1)-(b1+0.02))/((b0+0.1)+(b1+0.02)))|vari 
(b1-b2)/(b1+b2-b0)|osavi|mcari|tcari|diff (b1-b0)|scale|ratio.", "ndvi");
   Optionpk invalid_opt("t", "invalid", "Mask value where image is 
invalid.", 0);
   Optionpk flag_opt("f", "flag", "Flag value to put in image if not valid 
(0)", 0);
   Optionpk colorTable_opt("ct", "ct", "color table (file with 5 
columns: id R G B ALFA (0: transparent, 255: solid)", "");
@@ -110,7 +110,7 @@ int main(int argc, char *argv[])
   int reqBand=0;
   if(rule_opt[0]=="scale")
 reqBand=1;
-  else if(rule_opt[0]=="vari")
+  else if(rule_opt[0]=="vari"||rule_opt[0]=="mcari"||rule_opt[0]=="tcari")
 reqBand=3;
   else
 reqBand=2;
@@ -188,7 +188,7 @@ int main(int argc, char *argv[])
 try{
   if(rule_opt[0]=="scale")
 inputReader[0].readData(lineInput[0],GDT_Float64,irow,band_opt[0]);
-  else if(rule_opt[0]=="vari"){
+  else if(rule_opt[0]=="vari"||rule_opt[0]=="tcari"){
 inputReader[0].readData(lineInput[0],GDT_Float64,irow,band_opt[0]);
 inputReader[1].readData(lineInput[1],GDT_Float64,irow,band_opt[1]);
 inputReader[2].readData(lineInput[2],GDT_Float64,irow,band_opt[2]);
@@ -231,6 +231,18 @@ int main(int argc, char *argv[])
   
denom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0]-(lineInput[2][icol]-offset_opt[0])/scale_opt[0];
   
nom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0]+(lineInput[2][icol]-offset_opt[0])/scale_opt[0]-(lineInput[0][icol]-offset_opt[0])/scale_opt[0];
 }
+else if(rule_opt[0]=="osavi"){
+  
denom=(1.0+0.16)*(lineInput[1][icol]-offset_opt[0])/scale_opt[0]-(lineInput[0][icol]-offset_opt[0])/scale_opt[0];
+  
nom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0]+(lineInput[0][icol]-offset_opt[0])/scale_opt[0]+0.16;
+}
+else if(rule_opt[0]=="mcari"){
+  
denom=((lineInput[2][icol]-offset_opt[0])/scale_opt[0]-(lineInput[1][icol]-offset_opt[0])/scale_opt[0]-0.2*((lineInput[2][icol]-offset_opt[0])/scale_opt[0]-(lineInput[0][icol]-offset_opt[0])/scale_opt[0]))*(lineInput[2][icol]-offset_opt[0])/scale_opt[0];
+  nom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0];
+}
+else if(rule_opt[0]=="tcari"){
+  
denom=3*((lineInput[1][icol]-offset_opt[0])/scale_opt[0]*(lineInput[2][icol]-offset_opt[0])/scale_opt[0]-(lineInput[1][icol]-offset_opt[0])/scale_opt[0]-0.2*((lineInput[2][icol]-offset_opt[0])/scale_opt[0]-(lineInput[0][icol]-offset_opt[0])/scale_opt[0])*(lineInput[2][icol]-offset_opt[0])/scale_opt[0]);
+  nom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0];
+}
 else if(rule_opt[0]=="diff"){
   
denom=(lineInput[1][icol]-offset_opt[0])/scale_opt[0]-(lineInput[0][icol]-offset_opt[0])/scale_opt[0];
   nom=1.0;

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


[pktools] 24/375: VERSION in ImgWriterGdal.cc

2014-12-03 Thread Bas Couwenberg
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 d079041b4dd889ad282c58230a525faccf988871
Author: Pieter Kempeneers 
Date:   Fri Dec 7 17:15:55 2012 +0100

VERSION in ImgWriterGdal.cc
---
 src/imageclasses/ImgWriterGdal.cc | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/imageclasses/ImgWriterGdal.cc 
b/src/imageclasses/ImgWriterGdal.cc
index 06e9cb2..3c79d22 100644
--- a/src/imageclasses/ImgWriterGdal.cc
+++ b/src/imageclasses/ImgWriterGdal.cc
@@ -22,6 +22,11 @@ along with pktools.  If not, see 
.
 #include 
 #include "ogr_spatialref.h"
 #include "ImgWriterGdal.h"
+
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 //---
 ImgWriterGdal::ImgWriterGdal(void)
   : m_gds(NULL), m_isGeoRef(false), m_ncol(0), m_nrow(0), m_nband(0)
@@ -127,7 +132,10 @@ void ImgWriterGdal::setCodec(const ImgReaderGdal& imgSrc){
   }
   m_gds->SetMetadata(imgSrc.getMetadata() ); 
   m_gds->SetMetadataItem( "TIFFTAG_DOCUMENTNAME", m_filename.c_str());
-  m_gds->SetMetadataItem( "TIFFTAG_SOFTWARE", "pktools v2.0 by Pieter 
Kempeneers");
+  std::string versionString="pktools ";
+  versionString+=VERSION;
+  versionString+=" by Pieter Kempeneers";
+  m_gds->SetMetadataItem( "TIFFTAG_SOFTWARE", versionString.c_str());
   time_t rawtime;
   time ( &rawtime );
 

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


[pktools] 28/375: cross validation for pkclassify_nn

2014-12-03 Thread Bas Couwenberg
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 a73cc3a791804ba126b42fef1c55b6ef92f3b894
Author: Pieter Kempeneers 
Date:   Fri Jan 4 18:01:07 2013 +0100

cross validation for pkclassify_nn
---
 ChangeLog|   4 +
 src/algorithms/FeatureSelector.h | 516 ---
 src/algorithms/myfann_cpp.h  | 171 -
 src/algorithms/svm.cpp   |  56 +++--
 src/algorithms/svm.h |   1 +
 src/apps/Makefile.am |   6 +-
 src/apps/Makefile.in |  45 +++-
 src/apps/pkclassify_nn.cc| 131 +++---
 src/apps/pkclassify_nn.h |  83 +++
 src/apps/pkclassify_svm.cc   |  69 --
 src/apps/pkfs_svm.cc | 282 +++--
 11 files changed, 686 insertions(+), 678 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6364779..de06614 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,8 +62,12 @@ version 2.4
  - pkclassify_svm
do not output input file if no input data was defined in verbose mode
update of header information
+ - pkclassify_nn
+   support of cross validation
  - pkfs_svm
feature selection tool for svm classification (added)
+ - pkfs_nn
+   feature selection tool for nn classification (added)
  - pkascii2ogr
tool to create simple vector files from coordinates in ASCII file 
(points or polygon)
  - pksensormodel
diff --git a/src/algorithms/FeatureSelector.h b/src/algorithms/FeatureSelector.h
index 503dfac..53cb7d0 100644
--- a/src/algorithms/FeatureSelector.h
+++ b/src/algorithms/FeatureSelector.h
@@ -38,86 +38,19 @@ class FeatureSelector
  public:
   FeatureSelector(){};
   ~FeatureSelector(){};
-  template double forwardUnivariate(Vector2d& v1, Vector2d& v2, 
double (*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures, double prior1=0.5, double 
prior2=0.5, bool verbose=false);
-  template double forwardUnivariate(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures, 
bool verbose=false);
-  template double forwardUnivariate(map > &v, 
map > &y, double (*getCost)(map >&, 
map >&), list& subset, int maxFeatures, bool 
verbose=false);
-template double forward(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures, double prior1=0.5, double 
prior2=0.5, bool verbose=false);
-template double forward(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures, 
bool verbose=false);
-  template double forward(map > &v, map > &y, double (*getCost)(map >&, map >&), list& subset, int maxFeatures, bool verbose=false);
-template double backward(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int minFeatures, 
bool verbose=false);
-template double backward(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int minFeatures, double prior1=0.5, double 
prior2=0.5,bool verbose=false);
-template double backward(map > &v, 
map > &y, double (*getCost)(map >&, 
map >&), list& subset, int minFeatures, bool 
verbose=false);
-template double floating(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures=0, 
bool verbose=false);
-template double floating(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures=0, double prior1=0.5, double 
prior2=0.5,bool verbose=false);
-template double floating(map > &v, 
map > &y, double (*getCost)(map >&, 
map >&), list& subset, int maxFeatures, bool 
verbose=false);
-  template double bruteForce(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures=0, double prior1=0.5, double 
prior2=0.5, bool verbose=false);
+  template double forwardUnivariate(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures, 
short verbose=0);
+  template double forward(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures, 
short verbose=0);
+  template double backward(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int minFeatures, 
short verbose=0);
+  template double floating(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures=0, 
short verbose=0);
+  template double bruteForce(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures=0, 
short verbose=0);
   
   private:
-template double addFeature(vector< Vector2d >& v, double 
(*

[pktools] 16/375: pkclassify_svm is working

2014-12-03 Thread Bas Couwenberg
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 d01ec1366f621bbd0c1ae74bcc08f2b494e27b8f
Author: Pieter Kempeneers 
Date:   Fri Oct 19 16:16:13 2012 +0200

pkclassify_svm is working
---
 src/algorithms/ConfusionMatrix.cc | 1 +
 src/apps/Makefile.am  | 2 +-
 src/apps/Makefile.in  | 7 ++-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/algorithms/ConfusionMatrix.cc 
b/src/algorithms/ConfusionMatrix.cc
index dd1fe49..95ee85b 100644
--- a/src/algorithms/ConfusionMatrix.cc
+++ b/src/algorithms/ConfusionMatrix.cc
@@ -96,6 +96,7 @@ ConfusionMatrix ConfusionMatrix::operator*(double weight)
 }
 
 void ConfusionMatrix::resize(short nclass){
+  m_classes.resize(nclass);
   for(short iclass=0;iclasshttp://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[pktools] 23/375: included matrix_vector_operations.h in SensorModel

2014-12-03 Thread Bas Couwenberg
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 ca44543292ba1593e87055fb4d0f9349e9588363
Author: Pieter Kempeneers 
Date:   Fri Dec 7 16:54:23 2012 +0100

included matrix_vector_operations.h in SensorModel
---
 ChangeLog | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9340d84..5df163c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,3 +58,5 @@ version 2.4
do not output input file if no input data was defined in verbose mode
  - pkascii2ogr
tool to create simple vector files from coordinates in ASCII file 
(points or polygon)
+ - pksensormodel
+   tool to model pushbroom sensor

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


[pktools] 19/375: support of nodata in pkinfo when calculating histogram

2014-12-03 Thread Bas Couwenberg
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 59e07e824a17c04047e259eb7a5c51fe365c06b3
Author: Pieter Kempeneers 
Date:   Fri Nov 30 17:58:24 2012 +0100

support of nodata in pkinfo when calculating histogram
---
 src/algorithms/Histogram.h|  8 +++--
 src/algorithms/Makefile.am|  6 ++--
 src/algorithms/Makefile.in| 25 +++---
 src/apps/Makefile.am  |  9 +-
 src/apps/Makefile.in  | 68 +++
 src/apps/pkcrop.cc|  2 +-
 src/apps/pkegcs.cc|  2 +-
 src/apps/pkinfo.cc| 14 
 src/apps/pkndvi.cc|  2 +-
 src/apps/pkstatogr.cc | 63 
 src/imageclasses/ImgReaderGdal.cc |  4 +--
 src/imageclasses/ImgReaderGdal.h  |  5 +--
 src/imageclasses/ImgWriterOgr.cc  |  1 -
 13 files changed, 149 insertions(+), 60 deletions(-)

diff --git a/src/algorithms/Histogram.h b/src/algorithms/Histogram.h
index 4b37e66..700b3a3 100644
--- a/src/algorithms/Histogram.h
+++ b/src/algorithms/Histogram.h
@@ -260,7 +260,11 @@ template void  Histogram::distribution (const 
vector& input, typenam
   //   minimum=*(min(input,begin,end));
   // if(!maximum)
   //   maximum=*(max(input,begin,end));
-  assert(maximum>minimum);
+  if(maximum<=minimum){
+ostringstream s;
+s<<"Error: could not calculate distribution (min>=max) in " << filename;
+throw(s.str());
+  }
   assert(nbin>1);
   assert(input.size());
   if(output.size()!=nbin){
@@ -279,7 +283,7 @@ template void  Histogram::distribution (const 
vector& input, typenam
 outputfile.open(filename.c_str());
 if(!outputfile){
   ostringstream s;
-  s<<"error opening distribution file , " << filename;
+  s<<"Error opening distribution file , " << filename;
   throw(s.str());
 }
 for(int bin=0;bin noData;
   //   imgReader.getNoDataValues(noData,band_opt[0]);
diff --git a/src/apps/pkinfo.cc b/src/apps/pkinfo.cc
index d3fa74e..a014816 100644
--- a/src/apps/pkinfo.cc
+++ b/src/apps/pkinfo.cc
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
   Optionpk  type_opt("ot", "otype", "Return data type", false);
   Optionpk  description_opt("d", "description", "Return image 
description", false);
   Optionpk  metadata_opt("meta", "meta", "Show meta data ", false);
-  Optionpk maskValue_opt("mask", "mask", "mask value(s) for no data to 
calculate reference pixel in image",0);
+  Optionpk nodata_opt("nodata", "nodata", "set no data value(s) for 
calculations (flags in input image)");
   
   version_opt.retrieveOption(argc,argv);
   license_opt.retrieveOption(argc,argv);
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
   type_opt.retrieveOption(argc,argv);
   description_opt.retrieveOption(argc,argv);
   metadata_opt.retrieveOption(argc,argv);
-  maskValue_opt.retrieveOption(argc,argv);
+  nodata_opt.retrieveOption(argc,argv);
 
   if(help_opt[0]){
 std::cout << "usage: pkinfo -i imagefile [OPTIONS]" << std::endl;
@@ -150,8 +150,8 @@ int main(int argc, char *argv[])
   ImgReaderGdal imgReader;
   for(int ifile=0;ifilemaxValue)
+  if(imgReader.isNoData(lineBuffer[icol]))
+++ninvalid;
+  else if(lineBuffer[icol]>maxValue)
 ++ninvalid;
   else if(lineBuffer[icol] mean_opt("mean","mean","calculate mean value",false);
   Optionpk median_opt("median","median","calculate median value",false);
   Optionpk stdev_opt("stdev","stdev","calculate standard 
deviation",false);
+  Optionpk size_opt("s","size","sample size (number of points)",false);
   Optionpk verbose_opt("v", "verbose", "verbose mode if > 0", 0);
 
   version_opt.retrieveOption(argc,argv);
@@ -64,6 +65,7 @@ int main(int argc, char *argv[])
   mean_opt.retrieveOption(argc,argv);
   median_opt.retrieveOption(argc,argv);
   stdev_opt.retrieveOption(argc,argv);
+  size_opt.retrieveOption(argc,argv);
   verbose_opt.retrieveOption(argc,argv);
 
   if(version_opt[0]||todo_opt[0]){
@@ -72,7 +74,7 @@ int main(int argc, char *argv[])
 exit(0);
   }
   if(license_opt[0]){
-cout << Optionpk::getGPLv3License() << endl;
+std::cout << Optionpk::getGPLv3License() << std::endl;
 exit(0);
   }
   if(help_opt[0]){
@@ -85,7 +87,7 @@ int main(int argc, char *argv[])
 imgReader.open(input_opt[0]);
   }
   catch(string errorstring){
-cerr << errorstring << endl;
+std::cerr << errorstring << std::endl;
   }
 
   ImgReaderOgr inputReader(input_opt[0]);
@@ -95,33 +97,52 @@ int main(int argc, char *argv[])
 
   for(int ifield=0;ifield binData;
 double minimum=0;
 double maximum=0;
 int nbin=(nbin_opt[0]>1)? nbin_opt[0] : 2;
-
hist.distribution(theData,theData.begin(),theData.end(),binData,nbin,minimum,maximum);
-double theMean=0;
-double theVar=0;
-hist.meanVar(theData,theMean,theVar);
 std::cout << " --fnam

[pktools] 21/375: added pkascii2ogr, SensorModel.h and pksensormodel

2014-12-03 Thread Bas Couwenberg
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 e12d767e56be1886fa1f41c7099ca090fa84c5cd
Author: Pieter Kempeneers 
Date:   Fri Dec 7 14:26:23 2012 +0100

added pkascii2ogr, SensorModel.h and pksensormodel
---
 src/algorithms/SensorModel.h | 387 +
 src/apps/pkascii2ogr.cc  | 122 
 src/apps/pksensormodel.cc| 676 +++
 src/apps/pksensormodel.h |  81 ++
 4 files changed, 1266 insertions(+)

diff --git a/src/algorithms/SensorModel.h b/src/algorithms/SensorModel.h
new file mode 100644
index 000..2323452
--- /dev/null
+++ b/src/algorithms/SensorModel.h
@@ -0,0 +1,387 @@
+/**
+SensorModel.h: class for sensor model (calculate position on earth from pos 
and attidude information)
+Copyright (C) 2008-2012 Pieter Kempeneers
+
+This file is part of pktools
+
+pktools is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+pktools is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with pktools.  If not, see .
+***/
+#ifndef _SENSORMODEL_
+#define _SENSORMODEL_
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "ogr_spatialref.h"
+
+#ifndef PI
+#define PI 3.1415926535897932384626433832795
+#endif
+
+// #ifndef DEG2RAD
+// #define DEG2RAD(DEG) (DEG/180.0*PI)
+// #endif
+
+namespace SensorModel
+{
+  enum Type { PUSHBROOM=0, WHISKBROOM=1 , FRAME=2};
+
+  class SensorModel{
+  public:
+SensorModel(void){
+  m_bcpos.resize(3);
+  m_bcatt.resize(3);
+  m_bcpos[0]=0;
+  m_bcpos[1]=0;
+  m_bcpos[2]=0;
+  m_bcatt[0]=0;
+  m_bcatt[1]=0;
+  m_bcatt[2]=0;
+};
+SensorModel(int theModel) : m_model(theModel){
+  m_bcpos.resize(3);
+  m_bcatt.resize(3);
+  m_bcpos[0]=0;
+  m_bcpos[1]=0;
+  m_bcpos[2]=0;
+  m_bcatt[0]=0;
+  m_bcatt[1]=0;
+  m_bcatt[2]=0;
+};
+~SensorModel(){};
+// double deg2rad(double angle) const{return acos(-1)*angle/180.0;};
+static double deg2rad(double angle) {return PI*angle/180.0;};
+static double rad2deg(double angle) {return 180*angle/PI;};
+void setModel(int theModel){m_model=theModel;};
+int getModel() const {return m_model;};
+void setFOV(double fovDEG){m_fov=deg2rad(fovDEG);};
+void setNcol(int ncol){m_ncol=ncol;};
+void setNrow(int nrow){m_nrow=nrow;};
+void setDx(double dx){m_dx=dx;};
+void setDy(double dy){m_dy=dy;};
+void setF(double fc){m_fc=fc;};
+double getF() const {return m_fc;};
+void setPPx(double ppx){m_ppx=ppx;};
+void setPPy(double ppy){m_ppy=ppy;};
+void setBoresightPos(const gsl::vector& bcpos){m_bcpos=bcpos;};
+void setBoresightAtt(const gsl::vector& bcatt){m_bcatt=bcatt;};
+gsl::vector getBoresightPos() const{return m_bcpos;};
+gsl::vector getBoresightAtt() const{return m_bcatt;};
+void setPolynome(const std::vector& polynome) 
{m_polynome=polynome;};
+void setDatum(const std::string& 
theDatum="WGS84"){m_spatialref.SetWellKnownGeogCS(theDatum.c_str());};
+double getZenith(const gsl::vector& att_platform) const{
+  gsl::vector normallevel(3);
+  gsl::vector normalplatform(3);
+  normallevel[0]=0;
+  normallevel[1]=0;
+  normallevel[2]=-1;
+  gsl::matrix rotM(3,3);
+  
rotM=getRz(deg2rad(att_platform[2]))*getRy(deg2rad(att_platform[1]))*getRx(deg2rad(att_platform[0]));
+  normalplatform=rotM*normallevel;
+  return rad2deg(acos(-normalplatform[2]));
+};
+gsl::vector getPos(const gsl::vector& pos_platform, const gsl::vector& 
att_platform, int row, int column, double elevation) const{
+  gsl::vector thePosition(3);
+  gsl::vector pos_ellips(3);
+  gsl::vector ppl_deg=pos_platform;
+  gsl::vector apl_deg=att_platform;
+  ppl_deg+=m_bcpos;
+  apl_deg+=m_bcatt;
+  gsl::vector ppl_rad(3);
+  gsl::vector apl_rad(3);
+  ppl_rad[0]=deg2rad(ppl_deg[0]);
+  ppl_rad[1]=deg2rad(ppl_deg[1]);
+  ppl_rad[2]=ppl_deg[2];//add geoid elevation if necessary...
+  apl_rad[0]=deg2rad(apl_deg[0]);//roll
+  apl_rad[1]=deg2rad(apl_deg[1]);//pitch
+  apl_rad[2]=deg2rad(apl_deg[2]);//yaw
+  gsl::vector pos_ecef=pECEF(ppl_rad,apl_rad,row,column);
+  pos_ellips=ecef2geo(pos_ecef

[pktools] 14/375: findSubstring in Optionpk.h and default interleave from input image

2014-12-03 Thread Bas Couwenberg
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 8be6f568d25123f4ed045002f4cf4b8e1bb6c54a
Author: Pieter Kempeneers 
Date:   Wed Oct 17 13:25:58 2012 +0200

findSubstring in Optionpk.h and default interleave from input image
---
 src/algorithms/Filter2d.cc   | 66 +---
 src/algorithms/Filter2d.h| 52 +++
 src/apps/Makefile.am |  7 +++--
 src/apps/Makefile.in | 35 +++--
 src/apps/pkascii2img.cc  |  2 +-
 src/apps/pkclassify_nn.cc|  8 -
 src/apps/pkcreatect.cc   |  6 
 src/apps/pkcrop.cc   | 18 +--
 src/apps/pkdiff.cc   |  7 -
 src/apps/pkfilter.cc |  5 +++
 src/apps/pkgetmask.cc|  5 +++
 src/apps/pkmosaic.cc | 13 +++-
 src/apps/pkndvi.cc   | 61 -
 src/apps/pkreclass.cc|  7 -
 src/apps/pksetmask.cc|  7 -
 src/apps/pkstatogr.cc|  8 +++--
 src/base/Optionpk.h  | 25 ++-
 src/imageclasses/ImgWriterGdal.h | 20 
 18 files changed, 251 insertions(+), 101 deletions(-)

diff --git a/src/algorithms/Filter2d.cc b/src/algorithms/Filter2d.cc
index 8efb064..6675c8d 100644
--- a/src/algorithms/Filter2d.cc
+++ b/src/algorithms/Filter2d.cc
@@ -25,16 +25,6 @@ along with pktools.  If not, see 
.
 #include "Histogram.h"
 // #include "imageclasses/ImgUtils.h"
 
-#ifndef PI
-#define PI 3.1415926535897932384626433832795
-#endif
-
-#include 
-
-#ifndef DEG2RAD
-#define DEG2RAD(DEG) ((DEG)*((PI)/(180.0)))
-#endif
-
 Filter2d::Filter2d::Filter2d(void)
   : m_noValue(0)
 {
@@ -418,24 +408,16 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
 
 void Filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& 
output, int method, int dimX, int dimY, short down, bool disc)
 {
-  // ImgReaderGdal input;
-  // ImgWriterGdal output;
-  // input.open(inputFilename);
-  // output.open(outputFilename,input);
   assert(dimX);
   assert(dimY);
   Histogram hist;
   for(int iband=0;iband inBuffer(dimY,input.nrOfCol());
-// vector outBuffer(input.nrOfCol());
 vector outBuffer((input.nrOfCol()+down-1)/down);
 //initialize last half of inBuffer
 int indexI=0;
 int indexJ=0;
-// for(int y=0;y windowBuffer;
map occurrence;
@@ -493,24 +473,12 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
  indexI=-indexI;
else if(indexI>=input.nrOfCol())
  indexI=input.nrOfCol()-i;
- // indexI=input.nrOfCol()-indexI;
if(y+j<0)
  indexJ=-j;
else if(y+j>=input.nrOfRow())
  indexJ=dimY/2-j;
else
  indexJ=dimY/2+j;
-   // 
if(method==HOMOG||method==DENSITY||method==MAJORITY||method==MIXED){
-   //   bool masked=false;
-   //   for(int imask=0;imask(scale*(windowBuffer[dimX*dimY/2]-theMin)+lbound);
   break;
 }
 case(SUM):{
-  // outBuffer[x]=hist.sum(windowBuffer);
   outBuffer[x/down]=hist.sum(windowBuffer);
   break;
 }
 case(HOMOG):
  if(occurrence.size()==1)//all values in window must be the same
outBuffer[x/down]=inBuffer[dimY/2][x];
-   // outBuffer[x]=inBuffer[dimY/2][x];
  else//favorize original value in case of ties
outBuffer[x/down]=m_noValue;
-   // outBuffer[x]=m_noValue;
   break;
 case(HETEROG):{
   for(vector::const_iterator 
wit=windowBuffer.begin();wit!=windowBuffer.end();++wit){
@@ -619,11 +576,9 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
vector::const_iterator vit=m_class.begin();
while(vit!=m_class.end())
  outBuffer[x/down]+=100.0*occurrence[*(vit++)]/windowBuffer.size();
- // outBuffer[x]+=100.0*occurrence[*(vit++)]/windowBuffer.size();
  }
  else
outBuffer[x/down]=0;
-   // outBuffer[x]=0;
   break;
}
 case(MAJORITY):{
@@ -640,7 +595,6 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
  }
  else
outBuffer[x/down]=0;
-  // outBuffer[x]=0;
   break;
 }
 case(THRESHOLD):{
@@ -681,32 +635,25 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
   }
  else
outBuffer[x/down]=inBuffer[indexJ][indexI];
-// outBuffer[x]=0;
   break;
 }
 default:
   break;
 }
   }
-  // progress=(1.0+y);
   progress=(1.0+y/down);
   p

[pktools] 29/375: feature selection with automatic detection of optimal number of features in pkfs_svm and pkfs_nn

2014-12-03 Thread Bas Couwenberg
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 3531dce9caf7f952a345fe9bccf28d5dc432182d
Author: Pieter Kempeneers 
Date:   Mon Jan 7 10:31:59 2013 +0100

feature selection with automatic detection of optimal number of features in 
pkfs_svm and pkfs_nn
---
 src/algorithms/FeatureSelector.h |  4 ++--
 src/apps/pkfs_svm.cc | 48 +++-
 2 files changed, 20 insertions(+), 32 deletions(-)

diff --git a/src/algorithms/FeatureSelector.h b/src/algorithms/FeatureSelector.h
index 53cb7d0..6eebf46 100644
--- a/src/algorithms/FeatureSelector.h
+++ b/src/algorithms/FeatureSelector.h
@@ -177,7 +177,7 @@ template double FeatureSelector::floating(vector< 
Vector2d >& v, dou
 else if(verbose){
   for(list::const_iterator lit=subset.begin();lit!=subset.end();++lit)
 cout << *lit << " ";
-  cout << " (" << cost.back() << ")" << endl;
+  cout << " (cost: " << cost.back() << ")" << endl;
 }
 
 while(k>1){
@@ -192,7 +192,7 @@ template double FeatureSelector::floating(vector< 
Vector2d >& v, dou
 else if(verbose){
   for(list::const_iterator 
lit=subset.begin();lit!=subset.end();++lit)
 cout << *lit << " ";
-  cout << " (" << cost.back() << ")" << endl;
+  cout << " (cost: " << cost.back() << ")" << endl;
 }
continue;
   }
diff --git a/src/apps/pkfs_svm.cc b/src/apps/pkfs_svm.cc
index adb0421..e7d799f 100644
--- a/src/apps/pkfs_svm.cc
+++ b/src/apps/pkfs_svm.cc
@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
   Optionpk todo_opt("\0","todo","",false);
   Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all training features (must be set as: B0, B1, 
B2,...) for all classes (class numbers identified by label option). Use 
multiple training files for bootstrap aggregation (alternative to the bag and 
bsize options, where a random subset is taken from a single training file)"); 
   Optionpk label_opt("\0", "label", "identifier for class label in 
training shape file.","label"); 
-  Optionpk maxFeatures_opt("n", "nf", "number of features to 
select (0 to select all)", 0);
+  Optionpk maxFeatures_opt("n", "nf", "number of features to 
select (0 to select optimal number, see also ecost option)", 0);
   Optionpk reclass_opt("\0", "rc", "reclass code (e.g. --rc=12 
--rc=23 to reclass first two classes to 12 and 23 resp.).", 0);
   Optionpk balance_opt("\0", "balance", "balance the input data 
to this number of samples for each class", 0);
   Optionpk minSize_opt("m", "min", "if number of training pixels is less 
then min, do not take this class into account", 0);
@@ -493,11 +493,10 @@ int main(int argc, char *argv[])
   }
 
   int nFeatures=trainingFeatures[0][0].size();
-  int maxFeatures=maxFeatures_opt[0];
-  double previousCost=(maxFeatures_opt[0])? 1 : 0;
-  double currentCost=1;
-  list subset;//set of selected features (levels) for each class 
combination
+  int maxFeatures=(maxFeatures_opt[0])? maxFeatures_opt[0] : 1;
+  double previousCost=-1;
   double cost=0;
+  list subset;//set of selected features (levels) for each class 
combination
   FeatureSelector selector;
   try{
 if(maxFeatures==nFeatures){
@@ -506,11 +505,12 @@ int main(int argc, char *argv[])
 subset.push_back(ifeature);
   cost=getCost(trainingFeatures);
 }
-else if(!maxFeatures_opt[0]){
-  while(currentCost-previousCost>epsilon_cost_opt[0]){
-++maxFeatures;
+else{
+  while(cost-previousCost>epsilon_cost_opt[0]){
+previousCost=cost;
 switch(selMap[selector_opt[0]]){
 case(SFFS):
+  subset.clear();//needed to clear in case of floating and brute force 
search
   
cost=selector.floating(trainingFeatures,&getCost,subset,maxFeatures,verbose_opt[0]);
   break;
 case(SFS):
@@ -520,6 +520,7 @@ int main(int argc, char *argv[])
   
cost=selector.backward(trainingFeatures,&getCost,subset,maxFeatures,verbose_opt[0]);
   break;
 case(BFS):
+  subset.clear();//needed to clear in case of floating and brute force 
search
   
cost=selector.bruteForce(trainingFeatures,&getCost,subset,maxFeatures,verbose_opt[0]);
   break;
 default:
@@ -527,28 +528,15 @@ int main(int argc, char *argv[])
   exit(1);
   break;
 }
-previousCost=currentCost;
-currentCost=cost;
-  }
-}
-else{
-  switch(selMap[selector_opt[0]]){
-  case(SFFS):
-
cost=selector.floating(trainingFeatures,&getCost,subset,maxFeatures,verbose_opt[0]);
-break;
-  case(SFS):
-
cost=selector.forward(trainingFeatures,&getCost,subset,maxFeatures,verbose_opt[0]);
-break;
-  case(SBS):
-
cost=selector.backward(trainingFeatures,&getCost,subset,maxFeatures,verbose_opt[0]);
-  

[pktools] 26/375: before xmas holidays, see Changelog

2014-12-03 Thread Bas Couwenberg
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 7fa96571d550f8ca611d15a968390ea6dacbdd5e
Author: Pieter Kempeneers 
Date:   Fri Dec 21 18:51:25 2012 +0100

before xmas holidays, see Changelog
---
 ChangeLog|   7 ++
 aclocal.m4   |  14 +--
 configure| 254 +--
 src/algorithms/SensorModel.h |  28 -
 src/apps/Makefile.am |   5 +-
 src/apps/Makefile.in |  40 +++---
 src/apps/pkascii2img.cc  |  20 +--
 src/apps/pkascii2ogr.cc  |   6 +-
 src/apps/pkcreatect.cc   |   4 +-
 src/apps/pkinfo.cc   |  15 ++-
 src/apps/pklas2img.cc|  28 +++--
 src/apps/pksensormodel.cc|  40 +++---
 src/imageclasses/ImgWriterOgr.cc | 179 ++-
 src/imageclasses/ImgWriterOgr.h  |   2 +-
 14 files changed, 371 insertions(+), 271 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5df163c..3cfd117 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,9 +44,14 @@ version 2.4
in addition to internal setNoData member variable, also support 
GDALSetNoData
  - ImgWriterGdal.cc
in addition to internal setNoData member variable, also support 
GDALSetNoData
+ - ImgWriterOGR.h
+   renamed ascii2shape to ascii2ogr, support csv file in ascii2ogr
+ - ImgWriterOGR.cc
+   renamed ascii2shape to ascii2ogr, support csv file in ascii2ogr
  - pkinfo
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
  - pkfilter
bug solved in update of progress bar
support of standard deviation
@@ -60,3 +65,5 @@ version 2.4
tool to create simple vector files from coordinates in ASCII file 
(points or polygon)
  - pksensormodel
tool to model pushbroom sensor
+ - pkascii2ogr
+   support csv input file
diff --git a/aclocal.m4 b/aclocal.m4
index 0e0a984..1f01ab1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
`autoreconf'.])])
@@ -47,8 +47,7 @@ To do so, use the procedure documented by the package, 
typically `autoreconf'.])
 # --
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search 
path])
@@ -94,8 +93,7 @@ m4_define([_PKG_CONFIG],
 pkg_cv_[]$1="$$1"
  elif test -n "$PKG_CONFIG"; then
 PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 [pkg_failed=yes])
  else
 pkg_failed=untried
@@ -143,9 +141,9 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
 _PKG_SHORT_ERRORS_SUPPORTED
 if test $_pkg_short_errors_supported = yes; then
-   $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors 
--cflags --libs "$2" 2>&1`
+   $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 
2>&1`
 else 
-   $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs 
"$2" 2>&1`
+   $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
diff --git a/configure b/configure
index 71ee5ee..5ea37c6 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pktools 2.4.
+# Generated by GNU Autoconf 2.67 for pktools 2.4.
 #
 # Report bugs to .
 #
@@ -91,7 +91,6 @@ fi
 IFS=" ""   $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-as_myself=

[pktools] 20/375: updates in Changelog

2014-12-03 Thread Bas Couwenberg
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 2e876d29af02f654b58a4bdf52b6918c2895bbf6
Author: Pieter Kempeneers 
Date:   Thu Dec 6 18:04:49 2012 +0100

updates in Changelog
---
 ChangeLog| 22 ++
 src/algorithms/Filter2d.cc   | 14 +
 src/algorithms/Filter2d.h|  2 +-
 src/algorithms/Histogram.h   | 15 ++
 src/apps/pkclassify_svm.cc   |  3 +-
 src/apps/pkdumpimg.cc| 62 
 src/apps/pkfilter.cc |  5 +++-
 src/apps/pkgetmask.cc|  4 +--
 src/apps/pkinfo.cc   | 17 +++
 src/apps/pkstat.cc   |  8 ++
 src/apps/pkstatogr.cc|  4 +--
 src/imageclasses/ImgReaderGdal.h |  1 +
 src/imageclasses/ImgWriterGdal.h |  1 +
 13 files changed, 116 insertions(+), 42 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 28af616..b9914df 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,3 +29,25 @@ version 2.1
pksieve
pkstat
pkstatogr
+version 2.3
+ - New configure options (--enable instead of --with)
+   --enable-fann (when FANN is installed, needed for pkclassify_nn)
+   --enable-las (when LIBLAS is installed, needed for pklas2img)
+   --enable-nlopt (when NLOPT is installed, needed for pksensormodel and 
pkgetchandelier)
+ - ImgReaderGdal.cc
+   in addition to internal setNoData member variable, also support 
GDALSetNoData
+ - ImgWriterGdal.cc
+   in addition to internal setNoData member variable, also support 
GDALSetNoData
+ - pkinfo
+   support of nodata value when calculating histogram and image statistics
+   options min and max are now set with -min (--min) and -max (--max)
+ - pkfilter
+   bug solved in update of progress bar
+   support of standard deviation
+ - pkgetmask
+   options min and max are now set with -min (--min) and -max (--max)
+ - pkstatogr
+   options min and max are now set with -min (--min) and -max (--max)
+ - pkclassify_svm
+   do not output input file if no input data was defined in verbose mode
+
diff --git a/src/algorithms/Filter2d.cc b/src/algorithms/Filter2d.cc
index 6675c8d..12dd080 100644
--- a/src/algorithms/Filter2d.cc
+++ b/src/algorithms/Filter2d.cc
@@ -411,6 +411,11 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
   assert(dimX);
   assert(dimY);
   Histogram hist;
+  const char* pszMessage;
+  void* pProgressArg=NULL;
+  GDALProgressFunc pfnProgress=GDALTermProgress;
+  double progress=0;
+  pfnProgress(progress,pszMessage,pProgressArg);
   for(int iband=0;iband inBuffer(dimY,input.nrOfCol());
 vector outBuffer((input.nrOfCol()+down-1)/down);
@@ -426,11 +431,6 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
   }
   ++indexJ;
 }
-const char* pszMessage;
-void* pProgressArg=NULL;
-GDALProgressFunc pfnProgress=GDALTermProgress;
-double progress=0;
-pfnProgress(progress,pszMessage,pProgressArg);
 for(int y=0;y double var(const vector& v) const;
   template double moment(const vector& v, int n) const;
   template double cmoment(const vector& v, int n) const;
+  template double skewness(const vector& v) const;
+  template double kurtosis(const vector& v) const;
   template void meanVar(const vector& v, double& m1, double& v1) 
const;
   template void  scale2byte(const vector& input, 
vector& output, unsigned char lbound=0, unsigned char ubound=255) const;
   template void distribution(const vector& input, typename 
vector::const_iterator begin, typename vector::const_iterator end,  
vector& output, int nbin, T &minimum=0.0, T &maximum=0.0, const string 
&filename="");
@@ -216,6 +218,7 @@ template double Histogram::moment(const vector& 
v, int n) const
   return m/v.size();
 }
 
+  //central moment
 template double Histogram::cmoment(const vector& v, int n) const
 {
   assert(v.size());
@@ -228,6 +231,18 @@ template double Histogram::cmoment(const 
vector& v, int n) const
   return m/v.size();
 }
 
+template double Histogram::skewness(const vector& v) const
+{
+  return cmoment(v,3)/pow(var(v),1.5);
+}
+
+template double Histogram::kurtosis(const vector& v) const
+{
+  double m2=cmoment(v,2);
+  double m4=cmoment(v,4);
+  return m4/m2/m2-3.0;
+}
+
 template void Histogram::meanVar(const vector& v, double& m1, 
double& v1) const
 {
   typename vector::const_iterator it;
diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index 25eb555..43508cb 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -154,7 +154,8 @@ int main(int argc, char *argv[])
   }
 
   if(verbose_opt[0]>=1){
-std::cout << "image filename: " << input_opt[0] << std::endl;
+if(input_opt.size())
+  std::cout << "image filename: " << input_opt[0] << std::endl;
 if(mask_opt.size())
   std::cou

[pktools] 32/375: added pkfs_svm.cc and pkfs_nn.cc

2014-12-03 Thread Bas Couwenberg
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 5b7ed503a436590207bdb7364d0068dcebd8c88f
Author: Pieter Kempeneers 
Date:   Wed Jan 16 15:58:27 2013 +0100

added pkfs_svm.cc and pkfs_nn.cc
---
 src/apps/pkfs_nn.cc | 536 
 1 file changed, 536 insertions(+)

diff --git a/src/apps/pkfs_nn.cc b/src/apps/pkfs_nn.cc
new file mode 100644
index 000..f5e99f7
--- /dev/null
+++ b/src/apps/pkfs_nn.cc
@@ -0,0 +1,536 @@
+/**
+pkfs_nn.cc: feature selection for nn classifier
+Copyright (C) 2008-2012 Pieter Kempeneers
+
+This file is part of pktools
+
+pktools is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+pktools is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with pktools.  If not, see .
+***/
+#include 
+#include 
+#include 
+#include 
+#include "floatfann.h"
+#include "imageclasses/ImgReaderGdal.h"
+#include "imageclasses/ImgWriterGdal.h"
+#include "imageclasses/ImgReaderOgr.h"
+#include "imageclasses/ImgWriterOgr.h"
+#include "base/Optionpk.h"
+#include "algorithms/myfann_cpp.h"
+#include "algorithms/ConfusionMatrix.h"
+#include "algorithms/FeatureSelector.h"
+#include "pkclassify_nn.h"
+
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
+#define Malloc(type,n) (type *)malloc((n)*sizeof(type))
+
+//static enum SelectorValue { NA, SFFS, 
SFS, SBS, BFS };
+enum SelectorValue  { NA=0, SFFS=1, SFS=2, SBS=3, BFS=4 };
+
+//global parameters used in cost function getCost
+Optionpk nneuron_opt("\0", "nneuron", "number of neurons in 
hidden layers in neural network (multiple hidden layers are set by defining 
multiple number of neurons: -n 15 -n 1, default is one hidden layer with 5 
neurons)", 5); 
+Optionpk connection_opt("\0", "connection", "connection reate (default: 
1.0 for a fully connected network)", 1.0); 
+Optionpk weights_opt("w", "weights", "weights for neural network. Apply 
to fully connected network only, starting from first input neuron to last 
output neuron, including the bias neurons (last neuron in each but last 
layer)", 0.0); 
+Optionpk learning_opt("l", "learning", "learning rate (default: 0.7)", 
0.7); 
+Optionpk maxit_opt("\0", "maxit", "number of maximum iterations 
(epoch) (default: 500)", 500); 
+// Optionpk weight_opt("wi", "wi", "set the parameter C of class i to 
weight*C, for C-SVC",true);
+Optionpk cv_opt("cv", "cv", "n-fold cross validation mode",2);
+Optionpk verbose_opt("v", "verbose", "set to: 0 (results only), 1 
(confusion matrix), 2 (debug)",0);
+
+double getCost(const vector > &trainingFeatures)
+{
+  vector > tmpFeatures=trainingFeatures;//deep copy is 
guaranteed through constructor?
+  unsigned short nclass=tmpFeatures.size();
+  unsigned int ntraining=0;
+  for(int iclass=0;iclass1){
+cout << "creating artificial neural network with " << nneuron_opt.size() 
<< " hidden layer, having " << endl;
+for(int ilayer=0;ilayer referenceVector;
+  vector outputVector;
+  float rmse=net.cross_validation(tmpFeatures,
+  ntraining,
+  cv_opt[0],
+  maxit_opt[0],
+  0,
+  desired_error,
+  referenceVector,
+  outputVector,
+  verbose_opt[0]);
+  ConfusionMatrix cm(nclass);
+  for(int isample=0;isample reclassMap;
+  vector vreclass;
+  // vector priors;
+  
+  //--- command line options 

+  std::string versionString="version ";
+  versionString+=static_cast(VERSION);
+  versionString+=", Copyright (C) 2008-2012 Pieter Kempeneers.\n\
+   This program comes with ABSOLUTELY NO WARRANTY; for details type use option 
-h.\n\
+   This is free software, and you are welcome to redistribute it\n\
+   under certain conditions; use option --license for details.";
+  Optionpk version_opt("\0","version",versionString,false);
+  Optionpk license_opt("lic","license","show license information",false);
+  Optionpk help_opt("h","help","shows this help info",false);
+  Optionpk todo_opt("\0","todo","",false);
+  Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all traini

[pktools] 22/375: included matrix_vector_operations.h in SensorModel

2014-12-03 Thread Bas Couwenberg
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 d1421ac32912b114ebdf779c534127ed8d1088ab
Author: Pieter Kempeneers 
Date:   Fri Dec 7 16:53:01 2012 +0100

included matrix_vector_operations.h in SensorModel
---
 ChangeLog|  11 +-
 aclocal.m4   |  14 +-
 configure| 458 +++
 configure.ac |   4 +-
 src/algorithms/Makefile.am   |  10 +-
 src/algorithms/Makefile.in   |  20 +-
 src/algorithms/SensorModel.h |  16 +-
 src/apps/Makefile.am |   8 +-
 src/apps/Makefile.in |  56 ++
 src/apps/pkinfo.cc   |   4 +-
 src/fileclasses/Makefile.am  |   6 +-
 src/fileclasses/Makefile.in  |  23 +--
 12 files changed, 428 insertions(+), 202 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b9914df..9340d84 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,8 +29,14 @@ version 2.1
pksieve
pkstat
pkstatogr
+version 2.2
+   bug fixes
 version 2.3
- - New configure options (--enable instead of --with)
+   bug fixes
+version 2.4
+ - configure.ac
+   gdal 1.8 required for pkextract (member function Centroid in 
OGRMultiPolygon)
+   New configure options (--enable instead of --with)
--enable-fann (when FANN is installed, needed for pkclassify_nn)
--enable-las (when LIBLAS is installed, needed for pklas2img)
--enable-nlopt (when NLOPT is installed, needed for pksensormodel and 
pkgetchandelier)
@@ -50,4 +56,5 @@ version 2.3
options min and max are now set with -min (--min) and -max (--max)
  - pkclassify_svm
do not output input file if no input data was defined in verbose mode
-
+ - pkascii2ogr
+   tool to create simple vector files from coordinates in ASCII file 
(points or polygon)
diff --git a/aclocal.m4 b/aclocal.m4
index 1f01ab1..0e0a984 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
`autoreconf'.])])
@@ -47,7 +47,8 @@ To do so, use the procedure documented by the package, 
typically `autoreconf'.])
 # --
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search 
path])
@@ -93,7 +94,8 @@ m4_define([_PKG_CONFIG],
 pkg_cv_[]$1="$$1"
  elif test -n "$PKG_CONFIG"; then
 PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
 [pkg_failed=yes])
  else
 pkg_failed=untried
@@ -141,9 +143,9 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
 _PKG_SHORT_ERRORS_SUPPORTED
 if test $_pkg_short_errors_supported = yes; then
-   $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 
2>&1`
+   $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors 
--cflags --libs "$2" 2>&1`
 else 
-   $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+   $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs 
"$2" 2>&1`
 fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
diff --git a/configure b/configure
index 9c8f787..71ee5ee 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for pktools 2.3.
+# Generated by GNU Autoconf 2.68 for pktools 2.4.
 #
 # Report bugs to .
 #
@@ -91,6 +91,7 @@ fi
 IFS=" ""   $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for s

[pktools] 25/375: VERSION in ImgWriterGdal.cc

2014-12-03 Thread Bas Couwenberg
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 29a3ca89160698a78405c63ddcbade4cd524f59d
Author: Pieter Kempeneers 
Date:   Fri Dec 7 17:29:20 2012 +0100

VERSION in ImgWriterGdal.cc
---
 src/imageclasses/ImgWriterGdal.cc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/imageclasses/ImgWriterGdal.cc 
b/src/imageclasses/ImgWriterGdal.cc
index 3c79d22..1f2bf65 100644
--- a/src/imageclasses/ImgWriterGdal.cc
+++ b/src/imageclasses/ImgWriterGdal.cc
@@ -206,7 +206,10 @@ void ImgWriterGdal::setCodec(const string& imageType)
   // m_gds->SetMetadataItem( "INTERLEAVE", m_interleave.c_str(), 
"IMAGE_STRUCTURE" );
   // m_gds->SetMetadataItem( "COMPRESSION", m_compression.c_str(), 
"IMAGE_STRUCTURE" );
   m_gds->SetMetadataItem( "TIFFTAG_DOCUMENTNAME", m_filename.c_str());
-  m_gds->SetMetadataItem( "TIFFTAG_SOFTWARE", "pktools v2.0 by Pieter 
Kempeneers");
+  std::string versionString="pktools ";
+  versionString+=VERSION;
+  versionString+=" by Pieter Kempeneers";
+  m_gds->SetMetadataItem( "TIFFTAG_SOFTWARE", versionString.c_str());
   time_t rawtime;
   time ( &rawtime );
 

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


[pktools] 34/375: reclass function in pkclassify_nn.cc and pkclassify_svm.cc

2014-12-03 Thread Bas Couwenberg
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 57c68847976133e320169060e5be5663920cb6d7
Author: Pieter Kempeneers 
Date:   Fri Jan 18 09:30:14 2013 +0100

reclass function in pkclassify_nn.cc and pkclassify_svm.cc
---
 src/apps/pkclassify_nn.cc  | 191 +
 src/apps/pkclassify_svm.cc | 160 -
 2 files changed, 157 insertions(+), 194 deletions(-)

diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index 983e2c5..1c56084 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -34,11 +34,57 @@ along with pktools.  If not, see 
.
 #include 
 #endif
 
+void reclass(const vector& result, const vector& vreclass, const 
vector& priors, unsigned short aggregation, vector& 
theResultReclass);
+
+void reclass(const vector& result, const vector& vreclass, const 
vector& priors, unsigned short aggregation, vector& 
theResultReclass){
+  unsigned int nclass=result.size();
+  assert(priors.size()==nclass);
+  assert(theResultReclass.size()>1);//must have size nreclass!
+  unsigned int nreclass=theResultReclass.size();
+  vector pValues(nclass);
+  float normReclass=0;
+  for(int iclass=0;iclass=0);
+assert(pv<=1);
+pv*=priors[iclass];
+pValues[iclass]=pv;
+  }
+  for(int iclass=0;iclassmaxPaggreg){
+   maxPaggreg=pValues[ic];
+   theResultReclass[iclass]=maxPaggreg;
+ }
+   break;
+   }
+  }
+}
+normReclass+=theResultReclass[iclass];
+  }
+  for(int iclass=0;iclass reclassMap;
   vector vreclass;
   vector priors;
+  vector priorsReclass;
   
   //--- command line options 

 
@@ -52,8 +98,8 @@ int main(int argc, char *argv[])
   Optionpk license_opt("lic","license","show license information",false);
   Optionpk help_opt("h","help","shows this help info",false);
   Optionpk todo_opt("\0","todo","",false);
-  Optionpk input_opt("i", "input", "input image",""); 
-  Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all training features (must be set as: B0, B1, 
B2,...) for all classes (class numbers identified by label option). Use 
multiple training files for bootstrap aggregation (alternative to the bag and 
bsize options, where a random subset is taken from a single training 
file)",""); 
+  Optionpk input_opt("i", "input", "input image"); 
+  Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all training features (must be set as: B0, B1, 
B2,...) for all classes (class numbers identified by label option). Use 
multiple training files for bootstrap aggregation (alternative to the bag and 
bsize options, where a random subset is taken from a single training file)"); 
   Optionpk label_opt("\0", "label", "identifier for class label in 
training shape file. (default is label)","label"); 
   Optionpk reclass_opt("\0", "rc", "reclass code (e.g. --rc=12 
--rc=23 to reclass first two classes to 12 and 23 resp.). Default is 0: do not 
reclass", 0);
   Optionpk balance_opt("\0", "balance", "balance the input data 
to this number of samples for each class (default 0: do not balance)", 0);
@@ -63,7 +109,7 @@ int main(int argc, char *argv[])
   Optionpk band_opt("b", "band", "band index (starting from 0, either 
use band option or use start to end)");
   Optionpk offset_opt("\0", "offset", "offset value for each spectral 
band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
   Optionpk scale_opt("\0", "scale", "scale value for each spectral 
band input features: refl=(DN[band]-offset[band])/scale[band] (use 0 if scale 
min and max in each band to -1.0 and 1.0)", 0.0);
-  Optionpk aggreg_opt("a", "aggreg", "how to combine 
aggregated classifiers, see also rc option (0: sum rule, 1: max rule). Default 
is max rule (1)",1); 
+  Optionpk aggreg_opt("a", "aggreg", "how to combine 
aggregated classifiers, see also rc option (1: sum rule, 2: max rule).",1);
   Optionpk priors_opt("p", "prior", "prior probabilities for each 
class (e.g., -p 0.3 -p 0.3 -p 0.2 ), default set to equal priors)", 0.0); 
   Optionpk cv_opt("cv", "cv", "n-fold cross validation 
mode",0);
   Optionpk nneuron_opt("\0", "nneuron", "number of neurons in 
hidden layers in neural network (multiple hidden layers are set by defining 
multiple number of neurons: -n 15 -n 1, default is one hidden layer with 5 
neurons)", 5); 
@@ -74,16 +120,16 @@ int main(int argc, char *argv[])
   Optionpk comb_opt("c", "comb", "how to combine bootstrap 
aggregation classifiers (0: sum rule, 1: product rule, 2: max rule). Also used 
to aggregate classes with rc option. Default is sum rule (0)",0); 
   Optionpk bag_opt("\0", "bag", "Number of bootstrap 
aggregations (default is no bagging: 1)", 1);
   Optionpk bagSize_opt("\0

[pktools] 15/375: before changes at home

2014-12-03 Thread Bas Couwenberg
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 21adc697b17894f000f3ebd062aa46648ccdbe25
Author: Pieter Kempeneers 
Date:   Fri Oct 19 09:30:27 2012 +0200

before changes at home
---
 configure | 29 +++
 configure.ac  |  8 +
 src/apps/Makefile.am  |  5 +++
 src/apps/Makefile.in  | 90 ---
 src/apps/pkclassify_nn.cc | 36 +++
 5 files changed, 140 insertions(+), 28 deletions(-)

diff --git a/configure b/configure
index 85a799f..64c9f8d 100755
--- a/configure
+++ b/configure
@@ -612,6 +612,8 @@ NLOPT_CFLAGS
 FILECLASSES_OPT
 USE_LAS_FALSE
 USE_LAS_TRUE
+USE_SVM_FALSE
+USE_SVM_TRUE
 USE_FANN_FALSE
 USE_FANN_TRUE
 FANN_LIBS
@@ -718,6 +720,7 @@ enable_option_checking
 with_gdal
 enable_dependency_tracking
 enable_fann
+enable_svm
 enable_las
 enable_nlopt
 '
@@ -1362,6 +1365,7 @@ Optional Features:
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-fann   Enable feature fann
+  --enable-svmEnable feature svm
   --enable-lasEnable feature las
   --enable-nlopt  Enable feature nlopt
 
@@ -5134,6 +5138,27 @@ $as_echo "$as_me: WARNING: \"USE_FANN=false\"" >&2;}
 
 fi
 
+# Check whether --enable-svm was given.
+if test "${enable_svm+set}" = set; then :
+  enableval=$enable_svm;
+fi
+
+
+if test "x$enable_svm" = "xyes"; then :
+
+if true; then
+  USE_SVM_TRUE=
+  USE_SVM_FALSE='#'
+else
+  USE_SVM_TRUE='#'
+  USE_SVM_FALSE=
+fi
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_SVM=true\"" >&5
+$as_echo "$as_me: WARNING: \"USE_SVM=true\"" >&2;}
+
+fi
+
 # Check whether --enable-las was given.
 if test "${enable_las+set}" = set; then :
   enableval=$enable_las;
@@ -5785,6 +5810,10 @@ if test -z "${USE_FANN_TRUE}" && test -z 
"${USE_FANN_FALSE}"; then
   as_fn_error $? "conditional \"USE_FANN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_SVM_TRUE}" && test -z "${USE_SVM_FALSE}"; then
+  as_fn_error $? "conditional \"USE_SVM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_LAS_TRUE}" && test -z "${USE_LAS_FALSE}"; then
   as_fn_error $? "conditional \"USE_LAS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 11b981a..a241c7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,14 @@ AS_IF([test "x$enable_fann" = "xyes"], [
AC_MSG_WARN("USE_FANN=false")
])
 
+AC_ARG_ENABLE([svm],
+AS_HELP_STRING([--enable-svm], [Enable feature svm]))
+
+AS_IF([test "x$enable_svm" = "xyes"], [
+   AM_CONDITIONAL(USE_SVM, true)
+   AC_MSG_WARN("USE_SVM=true")
+   ])
+
 AC_ARG_ENABLE([las],
 AS_HELP_STRING([--enable-las], [Enable feature las]))
 
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index 823577b..994c6c6 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -13,6 +13,11 @@ pkclassify_nn_SOURCES = 
$(top_srcdir)/src/algorithms/myfann_cpp.h pkclassify_nn.
 pkclassify_nn_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base 
$(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
 pkclassify_nn_LDADD = $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS)
 endif
+if USE_SVM
+bin_PROGRAMS += pkclassify_svm
+pkclassify_svm_SOURCES = $(top_srcdir)/src/algorithms/svm.h 
$(top_srcdir)/src/algorithms/svm.cpp pkclassify_svm.cc
+pkclassify_svm_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base 
$(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
+endif
 if USE_LAS
 bin_PROGRAMS += pklas2img
 pklas2img_SOURCES = pklas2img.cc
diff --git a/src/apps/Makefile.in b/src/apps/Makefile.in
index 7ae36e3..bbbe416 100644
--- a/src/apps/Makefile.in
+++ b/src/apps/Makefile.in
@@ -39,9 +39,10 @@ bin_PROGRAMS = pkinfo$(EXEEXT) pkcrop$(EXEEXT) 
pkreclass$(EXEEXT) \
pkextract$(EXEEXT) pkfillnodata$(EXEEXT) pkfilter$(EXEEXT) \
pkveg2shadow$(EXEEXT) pkmosaic$(EXEEXT) pkndvi$(EXEEXT) \
pkpolygonize$(EXEEXT) pkascii2img$(EXEEXT) pkdiff$(EXEEXT) \
-   $(am__EXEEXT_1) $(am__EXEEXT_2)
+   $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
 @USE_FANN_TRUE@am__append_1 = pkclassify_nn
-@USE_LAS_TRUE@am__append_2 = pklas2img
+@USE_SVM_TRUE@am__append_2 = pkclassify_svm
+@USE_LAS_TRUE@am__append_3 = pklas2img
 subdir = src/apps
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -54,7 +55,8 @@ CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 @USE_FANN_TRUE@am__EXEEXT_1 = pkclassify_nn$(EXEEXT)
-@USE_LAS_TRUE@am__EXEEXT_2 = pklas2img$(EXEEXT)
+@USE_SVM_TRUE@am__EXEEXT_2 = pkclas

[pktools] 27/375: added feature selection

2014-12-03 Thread Bas Couwenberg
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 094c17f13074e221f93e7c4f4e560952c79e7f82
Author: Pieter Kempeneers 
Date:   Wed Jan 2 18:18:19 2013 +0100

added feature selection
---
 ChangeLog|   3 +
 src/algorithms/FeatureSelector.h | 777 +++
 src/algorithms/Makefile.am   |   4 +-
 src/algorithms/Makefile.in   |  14 +-
 src/apps/Makefile.am |   3 +-
 src/apps/Makefile.in |  27 +-
 src/apps/pkclassify_svm.cc   |   5 +-
 src/apps/pkfs_svm.cc | 549 +++
 8 files changed, 1362 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3cfd117..6364779 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,9 @@ version 2.4
options min and max are now set with -min (--min) and -max (--max)
  - pkclassify_svm
do not output input file if no input data was defined in verbose mode
+   update of header information
+ - pkfs_svm
+   feature selection tool for svm classification (added)
  - pkascii2ogr
tool to create simple vector files from coordinates in ASCII file 
(points or polygon)
  - pksensormodel
diff --git a/src/algorithms/FeatureSelector.h b/src/algorithms/FeatureSelector.h
new file mode 100644
index 000..503dfac
--- /dev/null
+++ b/src/algorithms/FeatureSelector.h
@@ -0,0 +1,777 @@
+/**
+FeatureSelector.h: select features, typical use: feature selection for 
classification
+Copyright (C) 2008-2012 Pieter Kempeneers
+
+This file is part of pktools
+
+pktools is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+pktools is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with pktools.  If not, see .
+***/
+#ifndef _FEATURESELECTOR_H_
+#define _FEATURESELECTOR_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "PosValue.h"
+#include "Vector2d.h"
+#include "gsl/gsl_combination.h"
+
+using namespace std;
+
+class FeatureSelector
+{
+ public:
+  FeatureSelector(){};
+  ~FeatureSelector(){};
+  template double forwardUnivariate(Vector2d& v1, Vector2d& v2, 
double (*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures, double prior1=0.5, double 
prior2=0.5, bool verbose=false);
+  template double forwardUnivariate(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures, 
bool verbose=false);
+  template double forwardUnivariate(map > &v, 
map > &y, double (*getCost)(map >&, 
map >&), list& subset, int maxFeatures, bool 
verbose=false);
+template double forward(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures, double prior1=0.5, double 
prior2=0.5, bool verbose=false);
+template double forward(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures, 
bool verbose=false);
+  template double forward(map > &v, map > &y, double (*getCost)(map >&, map >&), list& subset, int maxFeatures, bool verbose=false);
+template double backward(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int minFeatures, 
bool verbose=false);
+template double backward(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int minFeatures, double prior1=0.5, double 
prior2=0.5,bool verbose=false);
+template double backward(map > &v, 
map > &y, double (*getCost)(map >&, 
map >&), list& subset, int minFeatures, bool 
verbose=false);
+template double floating(vector< Vector2d >& v, double 
(*getCost)(const vector< Vector2d >&), list& subset, int maxFeatures=0, 
bool verbose=false);
+template double floating(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
prior2), list& subset, int maxFeatures=0, double prior1=0.5, double 
prior2=0.5,bool verbose=false);
+template double floating(map > &v, 
map > &y, double (*getCost)(map >&, 
map >&), list& subset, int maxFeatures, bool 
verbose=false);
+  template double bruteForce(Vector2d& v1, Vector2d& v2, double 
(*getCost)(const Vector2d&, const Vector2d&, double prior1, double 
pr

[pktools] 30/375: added OptFactory.h and pkopt_svm.cc

2014-12-03 Thread Bas Couwenberg
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 e6a281f310bf2dab0196022607103b169530687a
Author: Pieter Kempeneers 
Date:   Wed Jan 16 15:55:31 2013 +0100

added OptFactory.h and pkopt_svm.cc
---
 ChangeLog  | 14 +-
 src/algorithms/Makefile.am |  2 +-
 src/algorithms/Makefile.in |  8 
 src/apps/Makefile.am   |  8 +---
 src/apps/Makefile.in   | 32 
 src/apps/pkfs_svm.cc   | 18 ++
 src/apps/pksensormodel.cc  |  5 -
 7 files changed, 53 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index de06614..6e3148c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,8 @@ version 2.4
--enable-fann (when FANN is installed, needed for pkclassify_nn)
--enable-las (when LIBLAS is installed, needed for pklas2img)
--enable-nlopt (when NLOPT is installed, needed for pksensormodel and 
pkgetchandelier)
+ - OptFactory.h (added)
+   factory class for nlopt::opt (selecting algorithm via string)
  - ImgReaderGdal.cc
in addition to internal setNoData member variable, also support 
GDALSetNoData
  - ImgWriterGdal.cc
@@ -64,13 +66,15 @@ version 2.4
update of header information
  - pkclassify_nn
support of cross validation
- - pkfs_svm
-   feature selection tool for svm classification (added)
- - pkfs_nn
-   feature selection tool for nn classification (added)
+ - pkfs_svm (added)
+   feature selection tool for svm classification
+ - pkfs_nn (added)
+   feature selection tool for nn classification
+ - pkopt_svm (added)
+   optimization tool for svm classification (optimize ccost and gamma 
using NLOPT)
  - pkascii2ogr
tool to create simple vector files from coordinates in ASCII file 
(points or polygon)
  - pksensormodel
-   tool to model pushbroom sensor
+   tool to model pushbroom sensor (with optimization of boresight angles 
using NLOPT)
  - pkascii2ogr
support csv input file
diff --git a/src/algorithms/Makefile.am b/src/algorithms/Makefile.am
index 9f0bafa..b00098e 100644
--- a/src/algorithms/Makefile.am
+++ b/src/algorithms/Makefile.am
@@ -19,7 +19,7 @@ libalgorithms_a_HEADERS += myfann_cpp.h
 endif
 
 if USE_NLOPT
-libalgorithms_a_HEADERS += SensorModel.h
+libalgorithms_a_HEADERS += SensorModel.h OptFactory.h
 endif
 
 # the sources to add to the library and to add to the source distribution
diff --git a/src/algorithms/Makefile.in b/src/algorithms/Makefile.in
index a0c6645..bb2bb97 100644
--- a/src/algorithms/Makefile.in
+++ b/src/algorithms/Makefile.in
@@ -34,7 +34,7 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 @USE_FANN_TRUE@am__append_1 = myfann_cpp.h
-@USE_NLOPT_TRUE@am__append_2 = SensorModel.h
+@USE_NLOPT_TRUE@am__append_2 = SensorModel.h OptFactory.h
 subdir = src/algorithms
 DIST_COMMON = $(am__libalgorithms_a_HEADERS_DIST) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -54,8 +54,8 @@ libalgorithms_a_AR = $(AR) $(ARFLAGS)
 libalgorithms_a_LIBADD =
 am__libalgorithms_a_SOURCES_DIST = Egcs.h Filter2d.h Filter.h \
Histogram.h ConfusionMatrix.h svm.h FeatureSelector.h \
-   myfann_cpp.h SensorModel.h Egcs.cc Filter2d.cc Filter.cc \
-   Histogram.cc ConfusionMatrix.cc svm.cpp
+   myfann_cpp.h SensorModel.h OptFactory.h Egcs.cc Filter2d.cc \
+   Filter.cc Histogram.cc ConfusionMatrix.cc svm.cpp
 am__objects_1 =
 am__objects_2 = $(am__objects_1) $(am__objects_1)
 am_libalgorithms_a_OBJECTS = $(am__objects_2) Egcs.$(OBJEXT) \
@@ -79,7 +79,7 @@ SOURCES = $(libalgorithms_a_SOURCES)
 DIST_SOURCES = $(am__libalgorithms_a_SOURCES_DIST)
 am__libalgorithms_a_HEADERS_DIST = Egcs.h Filter2d.h Filter.h \
Histogram.h ConfusionMatrix.h svm.h FeatureSelector.h \
-   myfann_cpp.h SensorModel.h
+   myfann_cpp.h SensorModel.h OptFactory.h
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index aa0421f..5fe6484 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -23,9 +23,11 @@ pklas2img_SOURCES = pklas2img.cc
 pklas2img_LDADD = -L$(top_builddir)/src/fileclasses -lfileClasses -llas 
$(AM_LDFLAGS)
 endif
 if USE_NLOPT
-bin_PROGRAMS += pksensormodel
+bin_PROGRAMS += pksensormodel pkopt_svm
 pksensormodel_SOURCES = $(top_srcdir)/src/algorithms/SensorModel.h 
pksensormodel.h pksensormodel.cc
 pksensormodel_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt -lm -lgslwrap
+pkopt_svm_SOURCES = $(top_srcdir)/src/algorithms/OptFactory.h pkclassify_nn.h 
pkopt_svm.cc
+pkopt_svm_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt
 endif
 # list of sources for the binaries
 pkinfo_SOURCES = pkinfo.cc
@@ -51,8 +53,8 @@ pkmosaic_SOURCES = pkmosaic.cc
 pkndvi_SOURCES = pkndvi.cc
 pkpolygonize_SOURCES = 

[pktools] 35/375: string map in pkclassify_nn.c and pkclassify_svm.cc

2014-12-03 Thread Bas Couwenberg
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 f1c59c74ae910460ee382eb9406f2a2aad0ba353
Author: Pieter Kempeneers 
Date:   Fri Jan 18 17:28:27 2013 +0100

string map in pkclassify_nn.c and pkclassify_svm.cc
---
 src/algorithms/ConfusionMatrix.h |   1 +
 src/algorithms/myfann_cpp.h  |  11 ++-
 src/apps/pkclassify_nn.cc|  96 +
 src/apps/pkclassify_nn.h | 151 +++
 src/apps/pkclassify_svm.cc   | 138 ++-
 src/imageclasses/ImgReaderOgr.h  | 136 +++
 6 files changed, 455 insertions(+), 78 deletions(-)

diff --git a/src/algorithms/ConfusionMatrix.h b/src/algorithms/ConfusionMatrix.h
index 33cf04f..b5481fb 100644
--- a/src/algorithms/ConfusionMatrix.h
+++ b/src/algorithms/ConfusionMatrix.h
@@ -33,6 +33,7 @@ public:
   ConfusionMatrix(const vector& classNames);
   ConfusionMatrix(const ConfusionMatrix& cm);
   ConfusionMatrix& operator=(const ConfusionMatrix& cm);
+  short size() const {return m_results.size();};
   void resize(short nclass);
   void setClassNames(const vector& classNames);
   void pushBackClassName(const string& className);
diff --git a/src/algorithms/myfann_cpp.h b/src/algorithms/myfann_cpp.h
index 6aba87f..4901cfa 100644
--- a/src/algorithms/myfann_cpp.h
+++ b/src/algorithms/myfann_cpp.h
@@ -1535,6 +1535,10 @@ public:
 
trainingFeatures[iclass].push_back(testFeatures[iclass].back());
 testFeatures[iclass].pop_back();
   }
+  if(verbose>1){
+std::cout << "training size " << iclass << ": " << 
trainingFeatures[iclass].size() << std::endl;
+std::cout << "test size " << iclass << ": " << 
testFeatures[iclass].size() << std::endl;
+  }
   assert(trainingFeatures[iclass].size());
 }
 //create test sample
@@ -1552,8 +1556,13 @@ public:
 std::cout << "Error: testclass " << testclass << " has no 
training" << std::endl;
   assert(trainingFeatures[testclass].size());
   ++nsample;
-  
if(static_cast(trainingFeatures[testclass].size())/static_cast(testFeatures[testclass].size())<=cv)
+  
if(static_cast(trainingFeatures[testclass].size())/static_cast(testFeatures[testclass].size())<=(cv-1)){
+if(verbose>1){
+  std::cout << "training size " << testclass << ": " << 
trainingFeatures[testclass].size() << std::endl;
+  std::cout << "test size " << testclass << ": " << 
testFeatures[testclass].size() << std::endl;
+}
 testclass=(testclass+1)%nclass;
+  }
 }
 assert(nsample==ntest);
 //training with left out training set
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index 1c56084..c9f678a 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -100,17 +100,17 @@ int main(int argc, char *argv[])
   Optionpk todo_opt("\0","todo","",false);
   Optionpk input_opt("i", "input", "input image"); 
   Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all training features (must be set as: B0, B1, 
B2,...) for all classes (class numbers identified by label option). Use 
multiple training files for bootstrap aggregation (alternative to the bag and 
bsize options, where a random subset is taken from a single training file)"); 
-  Optionpk label_opt("\0", "label", "identifier for class label in 
training shape file. (default is label)","label"); 
-  Optionpk reclass_opt("\0", "rc", "reclass code (e.g. --rc=12 
--rc=23 to reclass first two classes to 12 and 23 resp.). Default is 0: do not 
reclass", 0);
-  Optionpk balance_opt("\0", "balance", "balance the input data 
to this number of samples for each class (default 0: do not balance)", 0);
-  Optionpk minSize_opt("m", "min", "if number of training pixels is less 
then min, do not take this class into account (default is 0: consider all 
classes", 0);
+  Optionpk label_opt("label", "label", "identifier for class label in 
training shape file.","label"); 
+  Optionpk reclass_opt("rc", "rc", "reclass code (e.g. --rc=12 
--rc=23 to reclass first two classes to 12 and 23 resp.)");
+  Optionpk balance_opt("bal", "balance", "balance the input data 
to this number of samples for each class", 0);
+  Optionpk minSize_opt("m", "min", "if number of training pixels is less 
then min, do not take this class into account (0: consider all classes)", 0);
   Optionpk start_opt("s", "start", "start band sequence number (set to 
0)",0); 
   Optionpk end_opt("e", "end", "end band sequence number (set to 0 for 
all bands)", 0); 
   Optionpk band_opt("b", "band", "band index (starting from 0, either 
use band option or use start to end)");
  

[pktools] 31/375: added OptFactory.h and pkopt_svm.cc

2014-12-03 Thread Bas Couwenberg
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 9c4dbcc97e5a732185d8fd71da9d7e23fbbe6383
Author: Pieter Kempeneers 
Date:   Wed Jan 16 15:56:07 2013 +0100

added OptFactory.h and pkopt_svm.cc
---
 src/algorithms/OptFactory.h | 215 ++
 src/apps/pkopt_svm.cc   | 530 
 2 files changed, 745 insertions(+)

diff --git a/src/algorithms/OptFactory.h b/src/algorithms/OptFactory.h
new file mode 100644
index 000..d13ba23
--- /dev/null
+++ b/src/algorithms/OptFactory.h
@@ -0,0 +1,215 @@
+/**
+OptFactory.h: factory class for nlopt::opt (selecting algorithm via string)
+Copyright (C) 2008-2013 Pieter Kempeneers
+
+This file is part of pktools
+
+pktools is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+pktools is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with pktools.  If not, see .
+***/
+#ifndef _OPTFACTORY_H_
+#define _OPTFACTORY_H_
+
+#include 
+
+class OptFactory
+{
+private:
+  static void initMap(std::map& m_algMap){
+//initialize selMap
+m_algMap["GN_DIRECT"]=nlopt::GN_DIRECT;
+m_algMap["GN_DIRECT_L"]=nlopt::GN_DIRECT_L;
+m_algMap["GN_DIRECT_L_RAND"]=nlopt::GN_DIRECT_L_RAND;
+m_algMap["GN_DIRECT_NOSCAL"]=nlopt::GN_DIRECT_NOSCAL;
+m_algMap["GN_DIRECT_L_NOSCAL"]=nlopt::GN_DIRECT_L_NOSCAL;
+m_algMap["GN_DIRECT_L_RAND_NOSCAL"]=nlopt::GN_DIRECT_L_RAND_NOSCAL;
+m_algMap["GN_ORIG_DIRECT"]=nlopt::GN_ORIG_DIRECT;
+m_algMap["GN_ORIG_DIRECT_L"]=nlopt::GN_ORIG_DIRECT_L;
+m_algMap["GD_STOGO"]=nlopt::GD_STOGO;
+m_algMap["GD_STOGO_RAND"]=nlopt::GD_STOGO_RAND;
+m_algMap["LD_LBFGS_NOCEDAL"]=nlopt::LD_LBFGS_NOCEDAL;
+m_algMap["LD_LBFGS"]=nlopt::LD_LBFGS;
+m_algMap["LN_PRAXIS"]=nlopt::LN_PRAXIS;
+m_algMap["LD_VAR1"]=nlopt::LD_VAR1;
+m_algMap["LD_VAR2"]=nlopt::LD_VAR2;
+m_algMap["LD_TNEWTON"]=nlopt::LD_TNEWTON;
+m_algMap["LD_TNEWTON_RESTART"]=nlopt::LD_TNEWTON_RESTART;
+m_algMap["LD_TNEWTON_PRECOND"]=nlopt::LD_TNEWTON_PRECOND;
+m_algMap["LD_TNEWTON_PRECOND_RESTART"]=nlopt::LD_TNEWTON_PRECOND_RESTART;
+m_algMap["GN_CRS2_LM"]=nlopt::GN_CRS2_LM;
+m_algMap["GN_MLSL"]=nlopt::GN_MLSL;
+m_algMap["GD_MLSL"]=nlopt::GD_MLSL;
+m_algMap["GN_MLSL_LDS"]=nlopt::GN_MLSL_LDS;
+m_algMap["GD_MLSL_LDS"]=nlopt::GD_MLSL_LDS;
+m_algMap["LD_MMA"]=nlopt::LD_MMA;
+m_algMap["LN_COBYLA"]=nlopt::LN_COBYLA;
+m_algMap["LN_NEWUOA"]=nlopt::LN_NEWUOA;
+m_algMap["LN_NEWUOA_BOUND"]=nlopt::LN_NEWUOA_BOUND;
+m_algMap["LN_NELDERMEAD"]=nlopt::LN_NELDERMEAD;
+m_algMap["LN_SBPLX"]=nlopt::LN_SBPLX;
+m_algMap["LN_AUGLAG"]=nlopt::LN_AUGLAG;
+m_algMap["LD_AUGLAG"]=nlopt::LD_AUGLAG;
+m_algMap["LN_AUGLAG_EQ"]=nlopt::LN_AUGLAG_EQ;
+m_algMap["LD_AUGLAG_EQ"]=nlopt::LD_AUGLAG_EQ;
+m_algMap["LN_BOBYQA"]=nlopt::LN_BOBYQA;
+m_algMap["GN_ISRES"]=nlopt::GN_ISRES;
+m_algMap["AUGLAG"]=nlopt::AUGLAG;
+m_algMap["AUGLAG_EQ"]=nlopt::AUGLAG_EQ;
+m_algMap["G_MLSL"]=nlopt::G_MLSL;
+m_algMap["G_MLSL_LDS"]=nlopt::G_MLSL_LDS;
+m_algMap["LD_SLSQP "]=nlopt::LD_SLSQP;
+  }
+public:
+  OptFactory(){
+  };
+  ~OptFactory(){};
+  static nlopt::opt getOptimizer(const std::string& algorithmString, unsigned 
int npar){
+std::map m_algMap;
+initMap(m_algMap);
+switch(m_algMap[algorithmString]){
+case(nlopt::GN_DIRECT):{
+  nlopt::opt theOptimizer(nlopt::GN_DIRECT,npar);
+  return(theOptimizer);
+  break;
+}
+case(nlopt::GN_DIRECT_L):{
+  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L,npar);
+  return(theOptimizer);
+  break;
+}
+case(nlopt::GN_DIRECT_L_RAND):{
+  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L_RAND,npar);
+  return(theOptimizer);
+  break;
+}
+case(nlopt::GN_DIRECT_NOSCAL):{
+  nlopt::opt theOptimizer(nlopt::GN_DIRECT_NOSCAL,npar);
+  return(theOptimizer);
+  break;
+}
+case(nlopt::GN_DIRECT_L_NOSCAL):{
+  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L_NOSCAL,npar);
+  return(theOptimizer);
+  break;
+}
+case(nlopt::GN_DIRECT_L_RAND_NOSCAL):{
+  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L_RAND_NOSCAL,npar);
+  return(theOptimizer);
+  break;
+}
+case(nlopt::GN_ORIG_DIRECT):{
+  nlopt::opt theOptimizer(nlopt::GN_ORIG_DIRECT,npar);
+

[pktools] 36/375: small changes in pkinfo, see Changelog

2014-12-03 Thread Bas Couwenberg
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 
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;indexGetColorEntryCount();++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;indexGetColorEntryCount();++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

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


[pktools] 42/375: support of polygons in ImgReaderOgr::readData and in pkclassify_svm

2014-12-03 Thread Bas Couwenberg
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 46acc25d0932eb00d039ade68b45de5ee7c3f605
Author: Pieter Kempeneers 
Date:   Tue Jan 29 18:03:58 2013 +0100

support of polygons in ImgReaderOgr::readData and in pkclassify_svm
---
 ChangeLog|   3 +
 Makefile.in  |  83 +---
 aclocal.m4   |  82 +---
 configure| 270 +--
 src/algorithms/Makefile.in   |  31 ++---
 src/apps/Makefile.in |  77 ++-
 src/apps/pkclassify_svm.cc   | 120 -
 src/apps/pkdumpogr.cc|   5 +-
 src/apps/pkextract.cc|   8 +-
 src/apps/pkinfo.cc   | 199 -
 src/base/Makefile.in |  31 ++---
 src/base/Optionpk.h  | 164 ++--
 src/fileclasses/Makefile.in  |  31 ++---
 src/imageclasses/ImgReaderOgr.cc |  32 ++---
 src/imageclasses/ImgReaderOgr.h  |  84 +++-
 src/imageclasses/ImgWriterOgr.cc |   2 +-
 src/imageclasses/Makefile.in |  31 ++---
 17 files changed, 564 insertions(+), 689 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e622377..cda89b6 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,8 @@ version 2.4
support filtering of matrix (doit with Vector2d arguments) (to create 
DTM according to P. Bunting)
  - FileReaderLas
support class filters
+ - ImgReaderGdal.h
+   support of polygons in readData
  - ImgReaderGdal.cc
in addition to internal setNoData member variable, also support 
GDALSetNoData
  - ImgWriterGdal.cc
@@ -76,6 +78,7 @@ version 2.4
do not output input file if no input data was defined in verbose mode
update of header information
adding some short options
+   support of polygon ogr input file
  - pkclassify_nn
support of cross validation
adding some short options
diff --git a/Makefile.in b/Makefile.in
index 79e3881..7146fbd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -68,11 +68,9 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) 
$(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  if test -d "$(distdir)"; then \
-find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-  && rm -rf "$(distdir)" \
-  || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
+  { test ! -d "$(distdir)" \
+|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -101,8 +99,6 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -229,7 +225,7 @@ all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh: Makefile
+am--refresh:
@:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
@for dep in $?; do \
@@ -265,8 +261,10 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-   @if test ! -f $@; then rm -f stamp-h1; else :; fi
-   @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+   @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+   else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -486,11 +484,7 @@ dist-gzip: distdir
$(am__remove_distdir)
 
 dist-bzip2: distdir
-   tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
-   $(am__remove_distdir)
-
-dist-lzip: distdir
-   tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
+   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
 
 dist-lzma: distdir
@@ -498,7 +492,7 @@ dist-lzma: distdir
$(am__remove_distdir)
 
 dist-xz: distdir
-   tardir=$(distdir) && $(am__tar) | X

[pktools] 37/375: before doxygen

2014-12-03 Thread Bas Couwenberg
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 843bdf715e37ac5b0e3b4cf87f4c7359957d71c1
Author: Pieter Kempeneers 
Date:   Thu Jan 24 12:31:50 2013 +0100

before doxygen
---
 ChangeLog  | 2 ++
 src/apps/pkclassify_nn.cc  | 2 +-
 src/apps/pkclassify_svm.cc | 2 +-
 src/apps/pkopt_svm.cc  | 7 +--
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3c7a046..93b1c13 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,8 +65,10 @@ version 2.4
  - pkclassify_svm
do not output input file if no input data was defined in verbose mode
update of header information
+   adding some short options
  - pkclassify_nn
support of cross validation
+   adding some short options
  - pkfs_svm (added)
feature selection tool for svm classification
  - pkfs_nn (added)
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index c9f678a..a8574d1 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
   Optionpk  otype_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");
   Optionpk  oformat_opt("of", "oformat", "Output image format (see 
also gdal_translate). Empty string: inherit from input image");
   Optionpk option_opt("co", "co", "options: NAME=VALUE [-co 
COMPRESS=LZW] [-co INTERLEAVE=BAND]");
-  Optionpk colorTable_opt("\0", "ct", "colour table in ascii format 
having 5 columns: id R G B ALFA (0: transparent, 255: solid)"); 
+  Optionpk colorTable_opt("ct", "ct", "colour table in ascii format 
having 5 columns: id R G B ALFA (0: transparent, 255: solid)"); 
   Optionpk prob_opt("\0", "prob", "probability image. Default is no 
probability image"); 
   Optionpk verbose_opt("v", "verbose", "set to: 0 (results only), 1 
(confusion matrix), 2 (debug)",0);
 
diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index 2e36ce1..3c86021 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -137,7 +137,7 @@ int main(int argc, char *argv[])
   Optionpk output_opt("o", "output", "output classification image"); 
   Optionpk  oformat_opt("of", "oformat", "Output image format (see 
also gdal_translate). Empty string: inherit from input image");
   Optionpk option_opt("co", "co", "options: NAME=VALUE [-co 
COMPRESS=LZW] [-co INTERLEAVE=BAND]");
-  Optionpk colorTable_opt("\0", "ct", "colour table in ascii format 
having 5 columns: id R G B ALFA (0: transparent, 255: solid)"); 
+  Optionpk colorTable_opt("ct", "ct", "colour table in ascii format 
having 5 columns: id R G B ALFA (0: transparent, 255: solid)"); 
   Optionpk prob_opt("\0", "prob", "probability image."); 
   Optionpk verbose_opt("v", "verbose", "set to: 0 (results only), 1 
(confusion matrix), 2 (debug)",0);
 
diff --git a/src/apps/pkopt_svm.cc b/src/apps/pkopt_svm.cc
index 517f321..29ff82e 100644
--- a/src/apps/pkopt_svm.cc
+++ b/src/apps/pkopt_svm.cc
@@ -50,6 +50,7 @@ Optionpk cache_opt("cache", "cache", "cache memory size 
in MB",100);
 Optionpk epsilon_tol_opt("etol", "etol", "the tolerance of termination 
criterion",0.001);
 Optionpk shrinking_opt("shrink", "shrink", "whether to use the shrinking 
heuristics",false);
 Optionpk prob_est_opt("pe", "probest", "whether to train a SVC or SVR 
model for probability estimates",false);
+Optionpk costfunction_opt("cf", "cf", "use Overall Accuracy instead of 
kappa",false);
 // Optionpk weight_opt("wi", "wi", "set the parameter C of class i to 
weight*C, for C-SVC",true);
 Optionpk cv_opt("cv", "cv", "n-fold cross validation mode",2);
 Optionpk verbose_opt("v", "verbose", "set to: 0 (results only), 1 
(confusion matrix), 2 (debug)",0);
@@ -142,8 +143,9 @@ double objFunction(const std::vector &x, 
std::vector &grad, void
 std::cout << "oa: " << oa << std::endl;
 std::cout << "kappa: " << kappa << std::endl;
   }
-  if(oa)
-error=1.0/oa;
+  double cost=(costfunction_opt[0])? oa : kappa;
+  if(cost)
+error=1.0/cost;
   return(error);
 }
 
@@ -204,6 +206,7 @@ int main(int argc, char *argv[])
   shrinking_opt.retrieveOption(argc,argv);
   prob_est_opt.retrieveOption(argc,argv);
   cv_opt.retrieveOption(argc,argv);
+  costfunction_opt.retrieveOption(argc,argv);
   maxit_opt.retrieveOption(argc,argv);
   tolerance_opt.retrieveOption(argc,argv);
   algorithm_opt.retrieveOption(argc,argv);

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


[pktools] 33/375: added UA and PA in pkclassify_svm.cc

2014-12-03 Thread Bas Couwenberg
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 b706d7c49c55f8b01da0655f94a3b0d705ee795b
Author: Pieter Kempeneers 
Date:   Fri Jan 18 09:27:35 2013 +0100

added UA and PA in pkclassify_svm.cc
---
 src/apps/pkclassify_svm.cc | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index c52225a..8543b7e 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -522,9 +522,19 @@ int main(int argc, char *argv[])
 
cm.incrementResult(cm.getClass(prob[ibag].y[i]),cm.getClass(target[i]),1);
   assert(cm.nReference());
   std::cout << cm << std::endl;
-  std::cout << "Kappa: " << cm.kappa() << std::endl;
+  double se95_ua=0;
+  double se95_pa=0;
+  double dua=0;
+  double dpa=0;
   double se95_oa=0;
   double doa=0;
+  cout << "class #samples userAcc prodAcc" << endl;
+  for(int iclass=0;iclasshttp://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[pktools] 46/375: confusion matrix supports bagging for pkclassify_svm.cc, balancing and bagsize for each class. Still to be implemented for pkclassify_nn.cc

2014-12-03 Thread Bas Couwenberg
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 2b73cf4a846816f60724b2b0ee3c619773c76333
Author: Pieter Kempeneers 
Date:   Fri Feb 1 18:14:48 2013 +0100

confusion matrix supports bagging for pkclassify_svm.cc, balancing and 
bagsize for each class. Still to be implemented for pkclassify_nn.cc
---
 src/apps/pkascii2img.cc|   1 -
 src/apps/pkascii2ogr.cc|   1 -
 src/apps/pkclassify_nn.cc  |   1 -
 src/apps/pkclassify_svm.cc | 114 -
 src/apps/pkcrop.cc |  24 +-
 src/apps/pkextract.cc  |   2 +-
 src/apps/pklas2img.cc  |   4 +-
 7 files changed, 76 insertions(+), 71 deletions(-)

diff --git a/src/apps/pkascii2img.cc b/src/apps/pkascii2img.cc
index 1b51861..4e3e064 100644
--- a/src/apps/pkascii2img.cc
+++ b/src/apps/pkascii2img.cc
@@ -43,7 +43,6 @@ int main(int argc, char *argv[])
   bool doProcess;//stop process when program was invoked with help option (-h 
--help)
   try{
 doProcess=input_opt.retrieveOption(argc,argv);
-input_opt.retrieveOption(argc,argv);
 output_opt.retrieveOption(argc,argv);
 dataType_opt.retrieveOption(argc,argv);
 imageType_opt.retrieveOption(argc,argv);
diff --git a/src/apps/pkascii2ogr.cc b/src/apps/pkascii2ogr.cc
index 60791ba..7d90515 100644
--- a/src/apps/pkascii2ogr.cc
+++ b/src/apps/pkascii2ogr.cc
@@ -40,7 +40,6 @@ int main(int argc, char *argv[])
   bool doProcess;//stop process when program was invoked with help option (-h 
--help)
   try{
 doProcess=input_opt.retrieveOption(argc,argv);
-input_opt.retrieveOption(argc,argv);
 output_opt.retrieveOption(argc,argv);
 colX_opt.retrieveOption(argc,argv);
 colY_opt.retrieveOption(argc,argv);
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index afcd750..8a2a2bd 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -120,7 +120,6 @@ int main(int argc, char *argv[])
   bool doProcess;//stop process when program was invoked with help option (-h 
--help)
   try{
 doProcess=input_opt.retrieveOption(argc,argv);
-input_opt.retrieveOption(argc,argv);
 training_opt.retrieveOption(argc,argv);
 label_opt.retrieveOption(argc,argv);
 reclass_opt.retrieveOption(argc,argv);
diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index 8cd1029..913f5f3 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
   // Optionpk weight_opt("wi", "wi", "set the parameter C of class i to 
weight*C, for C-SVC",true);
   Optionpk comb_opt("c", "comb", "how to combine bootstrap 
aggregation classifiers (0: sum rule, 1: product rule, 2: max rule). Also used 
to aggregate classes with rc option.",0); 
   Optionpk bag_opt("\0", "bag", "Number of bootstrap 
aggregations", 1);
-  Optionpk bagSize_opt("\0", "bsize", "Percentage of features used from 
available training features for each bootstrap aggregation", 100);
+  Optionpk bagSize_opt("\0", "bsize", "Percentage of features used from 
available training features for each bootstrap aggregation (one size for all 
classes, or a different size for each class respectively", 100);
   Optionpk classBag_opt("\0", "class", "output for each individual 
bootstrap aggregation");
   Optionpk mask_opt("\0", "mask", "mask image (see also mvalue 
option"); 
   Optionpk maskValue_opt("\0", "mvalue", "mask value(s) not to consider 
for classification (use negative values if only these values should be taken 
into account). Values will be taken over in classification image.", 0);
@@ -195,6 +195,7 @@ int main(int argc, char *argv[])
   if(verbose_opt[0]>=1)
 std::cout << "number of bootstrap aggregations: " << nbag << std::endl;
   
+  
   unsigned int totalSamples=0;
   vector vcode;//unique reclass codes (e.g., -rc 1 -rc 1 -rc 2 -rc 2 -> 
vcode[0]=1,vcode[1]=2)
   vector svm(nbag);
@@ -247,6 +248,7 @@ int main(int argc, char *argv[])
 std::sort(band_opt.begin(),band_opt.end());
 
   //--- Training 
---
+  ConfusionMatrix cm;
   vector< vector > offset(nbag);
   vector< vector > scale(nbag);
   map > trainingMap;
@@ -272,6 +274,7 @@ int main(int argc, char *argv[])
 
   // struct svm_node *x_space;
   vector fields;
+
   for(int ibag=0;ibag0){
+while(balance_opt.size()balance_opt[0]){
-while(trainingPixels[iclass].size()>balance_opt[0]){
+  if(trainingPixels[iclass].size()>balance_opt[iclass]){
+while(trainingPixels[iclass].size()>balance_opt[iclass]){
   int index=rand()%trainingPixels[iclass].size();
   
trainingPixels[iclass].erase(trainingPixels[iclass].begin()+index);
 }
   }
   else{
 int oldsize=trainingPixels[iclass].size();
-for(int 
isample=trainingPixels[iclass].size();isample=1

[pktools] 54/375: before weekend

2014-12-03 Thread Bas Couwenberg
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 da3164c0f5b73ff1b89a78ec0420b9ee8858ddcc
Author: Pieter Kempeneers 
Date:   Fri Feb 8 18:01:55 2013 +0100

before weekend
---
 Makefile.in  |  83 +
 aclocal.m4   |  82 +
 configure| 270 +++
 src/algorithms/Makefile.in   |  31 ++---
 src/apps/Makefile.am |   3 +-
 src/apps/Makefile.in | 176 
 src/apps/pkdiff.cc   |   8 +-
 src/apps/pkeditogr.cc|  90 +--
 src/apps/pkextract.cc|   3 +
 src/apps/pksensormodel.cc|   2 +-
 src/base/Makefile.in |  33 ++
 src/fileclasses/Makefile.in  |  31 ++---
 src/imageclasses/Makefile.in |  31 ++---
 13 files changed, 420 insertions(+), 423 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 79e3881..7146fbd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -68,11 +68,9 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) 
$(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  if test -d "$(distdir)"; then \
-find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-  && rm -rf "$(distdir)" \
-  || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
+  { test ! -d "$(distdir)" \
+|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -101,8 +99,6 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -229,7 +225,7 @@ all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh: Makefile
+am--refresh:
@:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
@for dep in $?; do \
@@ -265,8 +261,10 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-   @if test ! -f $@; then rm -f stamp-h1; else :; fi
-   @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+   @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+   else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -486,11 +484,7 @@ dist-gzip: distdir
$(am__remove_distdir)
 
 dist-bzip2: distdir
-   tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
-   $(am__remove_distdir)
-
-dist-lzip: distdir
-   tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
+   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
 
 dist-lzma: distdir
@@ -498,7 +492,7 @@ dist-lzma: distdir
$(am__remove_distdir)
 
 dist-xz: distdir
-   tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c 
>$(distdir).tar.xz
+   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
 
 dist-tarZ: distdir
@@ -529,8 +523,6 @@ distcheck: dist
  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
-   *.tar.lz*) \
- lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -550,7 +542,6 @@ distcheck: dist
  && am__cwd=`pwd` \
  && $(am__cd) $(distdir)/_build \
  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-   $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
  && $(MAKE) $(AM_MAKEFLAGS) \
  && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -579,16 +570,8 @@ distcheck: dist
  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-   @test -n '$(distuninstallcheck_dir)'

[pktools] 38/375: added doxygen config file

2014-12-03 Thread Bas Couwenberg
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 061a71068902d275f2695676de5330ec4acbd4b4
Author: Pieter Kempeneers 
Date:   Thu Jan 24 17:52:10 2013 +0100

added doxygen config file
---
 Doxyfile | 1869 ++
 src/apps/apps.md |   51 ++
 2 files changed, 1920 insertions(+)

diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 000..24934c5
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,1869 @@
+# Doxyfile 1.8.3.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a hash (#) is considered a comment and will be ignored.
+# The format is:
+#   TAG = value [value, ...]
+# For lists items can also be appended using:
+#   TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ").
+
+#---
+# Project related configuration options
+#---
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING  = UTF-8
+
+# The PROJECT_NAME tag is a single word (or sequence of words) that should
+# identify the project. Note that if you do not use Doxywizard you need
+# to put quotes around the project name if it contains spaces.
+
+PROJECT_NAME   = "PKTools"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF  =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO   =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY   =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE= English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC  = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed 
description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF   = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the

[pktools] 51/375: added mainpage.dox and pkeditogr.cc

2014-12-03 Thread Bas Couwenberg
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 599a7130815bd3296ab45411e5016e925a6a352b
Author: Pieter Kempeneers 
Date:   Mon Feb 4 13:26:32 2013 +0100

added mainpage.dox and pkeditogr.cc
---
 Doxyfile  |   2 +-
 doc/createappsdox.sh  |   7 +++
 doc/mainpage.dox  |  31 +
 src/apps/pkeditogr.cc | 121 ++
 4 files changed, 160 insertions(+), 1 deletion(-)

diff --git a/Doxyfile b/Doxyfile
index 66e3662..568d39f 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -668,7 +668,7 @@ WARN_LOGFILE   =
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT  = doc
+INPUT  =
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff --git a/doc/createappsdox.sh b/doc/createappsdox.sh
index a125da9..d1f6985 100755
--- a/doc/createappsdox.sh
+++ b/doc/createappsdox.sh
@@ -4,10 +4,15 @@ cat > ../doc/header.dox <
 thesynopsis
 
 
+## DESCRIPTION ##
+thelongdescription
+
+## OPTIONS ##
  - use either \`-short\` or \`--long\` options (both \`--long=value\` and 
\`--long value\` are supported)
  - short option \`-h\` shows basic options only, long option \`--h\` shows all 
options
 |short|long|type|default|description|
@@ -23,6 +28,8 @@ for file in ../src/apps/pk*.cc;do
 sed -i "s/theshortdescription/$THESHORTDESCRIPTION/" ../doc/${THETOOL}.dox
 THESYNOPSIS="${THETOOL} [OPTIONS]"
 sed -i "s/thesynopsis/$THESYNOPSIS/" ../doc/${THETOOL}.dox
+THELONGDESCRIPTION="$THESHORTDESCRIPTION more..."
+sed -i "s/thelongdescription/$THELONGDESCRIPTION/" ../doc/${THETOOL}.dox
 ${THETOOL} --doxygen|sed '$d' >> ../doc/${THETOOL}.dox
 done
 
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
new file mode 100644
index 000..5d62a90
--- /dev/null
+++ b/doc/mainpage.dox
@@ -0,0 +1,31 @@
+\mainpage
+Introduction
+
+pktools is a collection of programs written by Pieter Kempeneers in C++ to 
perform operations on raster images.
+It heavily relies on the Geospatial Data Abstraction Library (GDAL, 
http://www.gdal.org) and OGR. Some of the programs are similar to the gdal 
tools (gdalinfo, gdal_translate, gdal_merge,...) and many of the 
functionalities provided in pktools already exist. The reason for implementing 
pktools is a combination of personal preference and additional functionality.
+
+All utilities in pktools use command line options and have a built in help
+
+- use the `-h` option to get help
+- pktools ALWAYS use -i for input and -o for output (unlike GDAL utilities 
that commonly use last argument as output and second but last argument as input)
+
+License
+===
+pktools is released under the GNU General Public License version3
+
+See http://www.gnu.org/licenses for more details
+
+Download
+
+You can download the latest release
+- from http://download.savannah.gnu.org/releases/pktools/ (tar ball)
+- or by getting a copy of the Git repository
+
+~~~
+git clone git://git.savannah.nongnu.org/pktools.git
+~~~
+
+How to refer
+
+You are welcome to refer to pktools as: http://pktools.nongnu.org (Pieter 
Kempeneers)
+
diff --git a/src/apps/pkeditogr.cc b/src/apps/pkeditogr.cc
new file mode 100644
index 000..d238267
--- /dev/null
+++ b/src/apps/pkeditogr.cc
@@ -0,0 +1,121 @@
+/**
+pkeditogr.cc: program to edit (rename fields) ogr fil
+Copyright (C) 2008-2013 Pieter Kempeneers
+
+This file is part of pktools
+
+pktools is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+pktools is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with pktools.  If not, see .
+***/
+#include 
+#include 
+#include "base/Optionpk.h"
+#include "imageclasses/ImgReaderOgr.h"
+#include "imageclasses/ImgWriterOgr.h"
+#include "imageclasses/ImgReaderGdal.h"
+#include "imageclasses/ImgWriterGdal.h"
+
+int main(int argc, char *argv[])
+{
+  Optionpk input_opt("i", "input", "Input image");
+  Optionpk output_opt("o", "output", "Output mask file");
+  Optionpk field_opt("f", "field", "output field names (number must 
exactly match input fields)");
+  Optionpk verbose_opt("v", "verbose", "verbose", 0);
+
+  bool doProcess;//stop process when program was invoked w

[pktools] 39/375: see Changelog

2014-12-03 Thread Bas Couwenberg
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 e93a8388d46cc553b26f827aded82d1f9bd89e52
Author: Pieter Kempeneers 
Date:   Fri Jan 25 17:39:34 2013 +0100

see Changelog
---
 ChangeLog|  11 +-
 src/algorithms/Filter2d.cc   |  76 ---
 src/algorithms/Filter2d.h| 281 +--
 src/apps/pkclassify_svm.cc   |   1 +
 src/apps/pkcrop.cc   |   4 +-
 src/apps/pkfilter.cc |  24 ++--
 src/apps/pklas2img.cc|  26 ++--
 src/fileclasses/FileReaderLas.cc |  39 ++
 src/fileclasses/FileReaderLas.h  |  12 ++
 9 files changed, 422 insertions(+), 52 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 93b1c13..f907a49 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,14 +42,20 @@ version 2.4
--enable-nlopt (when NLOPT is installed, needed for pksensormodel and 
pkgetchandelier)
  - OptFactory.h (added)
factory class for nlopt::opt (selecting algorithm via string)
+ - Filter2d
+   support filtering of matrix (doit with Vector2d arguments) (to create 
DTM according to P. Bunting)
+ - FileReaderLas
+   support class filters
  - ImgReaderGdal.cc
in addition to internal setNoData member variable, also support 
GDALSetNoData
  - ImgWriterGdal.cc
in addition to internal setNoData member variable, also support 
GDALSetNoData
  - ImgWriterOGR.h
renamed ascii2shape to ascii2ogr, support csv file in ascii2ogr
- - ImgWriterOGR.cc
+ - ImgWriterOgr.cc
renamed ascii2shape to ascii2ogr, support csv file in ascii2ogr
+ - pkcrop
+   changed default option for color table to empty vector
  - pkinfo
support of nodata value when calculating histogram and image statistics
options min and max are now set with -min (--min) and -max (--max)
@@ -58,6 +64,7 @@ version 2.4
  - pkfilter
bug solved in update of progress bar
support of standard deviation
+   default empty classes
  - pkgetmask
options min and max are now set with -min (--min) and -max (--max)
  - pkstatogr
@@ -81,3 +88,5 @@ version 2.4
tool to model pushbroom sensor (with optimization of boresight angles 
using NLOPT)
  - pkascii2ogr
support csv input file
+ - pklas2img
+   support DTM according to Bunting (slightly adapted version of 
Chang2003, including a median filter after morphological operator)
diff --git a/src/algorithms/Filter2d.cc b/src/algorithms/Filter2d.cc
index 12dd080..e46af52 100644
--- a/src/algorithms/Filter2d.cc
+++ b/src/algorithms/Filter2d.cc
@@ -503,53 +503,85 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output,
 }
 switch(method){
 case(MEDIAN):
-  outBuffer[x/down]=hist.median(windowBuffer);
+  if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else
+outBuffer[x/down]=hist.median(windowBuffer);
   break;
 case(VAR):{
-  outBuffer[x/down]=hist.var(windowBuffer);
+  if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else
+outBuffer[x/down]=hist.var(windowBuffer);
   break;
 }
 case(STDEV):{
-  outBuffer[x/down]=sqrt(hist.var(windowBuffer));
+  if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else
+outBuffer[x/down]=sqrt(hist.var(windowBuffer));
   break;
 }
 case(MEAN):{
-  outBuffer[x/down]=hist.mean(windowBuffer);
+  if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else
+outBuffer[x/down]=hist.mean(windowBuffer);
   break;
 }
 case(MIN):{
-  outBuffer[x/down]=hist.min(windowBuffer);
+  if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else
+   outBuffer[x/down]=hist.min(windowBuffer);
   break;
 }
 case(ISMIN):{
-  
outBuffer[x/down]=(hist.min(windowBuffer)==windowBuffer[dimX*dimY/2])? 1:0;
+   if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else
+
outBuffer[x/down]=(hist.min(windowBuffer)==windowBuffer[dimX*dimY/2])? 1:0;
   break;
 }
 case(MINMAX):{
   double min=0;
   double max=0;
-  
hist.minmax(windowBuffer,windowBuffer.begin(),windowBuffer.end(),min,max);
-  if(min!=max)
-outBuffer[x/down]=0;
-  else
-outBuffer[x/down]=windowBuffer[dimX*dimY/2];//centre pixels
+  if(windowBuffer.empty())
+outBuffer[x/down]=m_noValue;
+  else{
+
hist.minmax(windowBuffer,windowBuffer.begin(),windowBuffer.end(),min,max);
+if(min!=max)
+  outBuffer[x/down]=0;
+else
+  o

[pktools] 53/375: explanation how to update repository home page in createappsdox.sh

2014-12-03 Thread Bas Couwenberg
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 f1ca6a3850a448ca7380718b77e8c11a656fd121
Author: Pieter Kempeneers 
Date:   Mon Feb 4 13:57:49 2013 +0100

explanation how to update repository home page in createappsdox.sh
---
 doc/createappsdox.sh | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/doc/createappsdox.sh b/doc/createappsdox.sh
index d1f6985..f38fa26 100755
--- a/doc/createappsdox.sh
+++ b/doc/createappsdox.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
+echo "create header"
 cat > ../doc/header.dox <> ../doc/${THETOOL}.dox
 done
 
+echo "create general dox file for aps list"
 for file in ../src/apps/pk*.cc;do
 THETOOL=$(basename $file .cc)
 THESHORTDESCRIPTION=$(grep "${THETOOL}.cc: " $file | awk -v FS=':' '{print 
$2}')
 echo "- \\ref ${THETOOL} ${THESHORTDESCRIPTION}"; 
-done > ../doc/apps.dox
\ No newline at end of file
+done > ../doc/apps.dox
+
+echo "Savannah repository for homepage can only be maintained via cvs"
+#mkdir ~/tmp
+#cd ~/tmp
+#cvs -z3 -d:ext:kempe...@cvs.sv.gnu.org:/web/pktools co pktools"
+#cd pktools/html
+#rm *
+#cvs rm *
+#rsync -avz / ~/tmp/pktools/html
+#cvs add *
+#cvs commit -m "update of repository homepage"
+#rm -r ~/tmp/pktools
\ No newline at end of file

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


[pktools] 50/375: added doc

2014-12-03 Thread Bas Couwenberg
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 75eb74353cc2ab1f45223b43e79b49d47a7bb39b
Author: Pieter Kempeneers 
Date:   Mon Feb 4 12:49:07 2013 +0100

added doc
---
 Doxyfile |  2 +-
 doc/createappsdox.sh | 33 +
 src/apps/Makefile.am | 12 
 src/apps/pkascii2ogr.cc  |  2 +-
 src/apps/pkdsm2shadow.cc |  2 +-
 src/apps/pkfilter.cc |  2 +-
 6 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/Doxyfile b/Doxyfile
index 568d39f..66e3662 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -668,7 +668,7 @@ WARN_LOGFILE   =
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT  =
+INPUT  = doc
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff --git a/doc/createappsdox.sh b/doc/createappsdox.sh
new file mode 100755
index 000..a125da9
--- /dev/null
+++ b/doc/createappsdox.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+cat > ../doc/header.dox <
+thesynopsis
+
+
+ - use either \`-short\` or \`--long\` options (both \`--long=value\` and 
\`--long value\` are supported)
+ - short option \`-h\` shows basic options only, long option \`--h\` shows all 
options
+|short|long|type|default|description|
+|-|||---|---|
+EOF
+
+for file in ../src/apps/pk*.cc;do
+THETOOL=$(basename $file .cc)
+echo ${THETOOL}
+cat ../doc/header.dox > ../doc/${THETOOL}.dox
+sed -i "s/thetool/$THETOOL/g" ../doc/${THETOOL}.dox
+THESHORTDESCRIPTION=$(grep "${THETOOL}.cc: " $file | awk -v FS=':' '{print 
$2}')
+sed -i "s/theshortdescription/$THESHORTDESCRIPTION/" ../doc/${THETOOL}.dox
+THESYNOPSIS="${THETOOL} [OPTIONS]"
+sed -i "s/thesynopsis/$THESYNOPSIS/" ../doc/${THETOOL}.dox
+${THETOOL} --doxygen|sed '$d' >> ../doc/${THETOOL}.dox
+done
+
+for file in ../src/apps/pk*.cc;do
+THETOOL=$(basename $file .cc)
+THESHORTDESCRIPTION=$(grep "${THETOOL}.cc: " $file | awk -v FS=':' '{print 
$2}')
+echo "- \\ref ${THETOOL} ${THESHORTDESCRIPTION}"; 
+done > ../doc/apps.dox
\ No newline at end of file
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index 5fe6484..02e224d 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -5,8 +5,12 @@ LDADD = $(GDAL_LDFLAGS) 
$(top_builddir)/src/algorithms/libalgorithms.a $(top_bui
 # THE PROGRAMS TO BUILD
 ###
 
-# the program to build (the names of the final binaries)
-bin_PROGRAMS = pkinfo pkcrop pkreclass pkgetmask pksetmask pkcreatect 
pkdumpimg pkdumpogr pksieve pkstat pkstatogr pkegcs pkextract pkfillnodata 
pkfilter pkdsm2shadow pkmosaic pkndvi pkpolygonize pkascii2img pkdiff 
pkclassify_svm pkfs_svm pkascii2ogr #pkxcorimg pkgeom
+# the program to build and install (the names of the final binaries)
+bin_PROGRAMS = pkinfo pkcrop pkreclass pkgetmask pksetmask pkcreatect 
pkdumpimg pkdumpogr pksieve pkstat pkstatogr pkegcs pkextract pkfillnodata 
pkfilter pkdsm2shadow pkmosaic pkndvi pkpolygonize pkascii2img pkdiff 
pkclassify_svm pkfs_svm pkascii2ogr
+
+# the program to build but not install (the names of the final binaries)
+noinst_PROGRAMS =  pkxcorimg pkgeom
+
 if USE_FANN
 bin_PROGRAMS += pkclassify_nn pkfs_nn
 pkclassify_nn_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h 
pkclassify_nn.h pkclassify_nn.cc
@@ -58,6 +62,6 @@ pkfs_svm_SOURCES = $(top_srcdir)/src/algorithms/svm.h 
$(top_srcdir)/src/algorith
 pkfs_svm_LDADD = $(GSL_LIBS) $(AM_LDFLAGS)
 pkascii2img_SOURCES = pkascii2img.cc
 pkascii2ogr_SOURCES = pkascii2ogr.cc
-#pkxcorimg_SOURCES= pkxcorimg.cc
-#pkgeom_SOURCES = pkgeom.cc
+pkxcorimg_SOURCES= pkxcorimg.cc
+pkgeom_SOURCES = pkgeom.cc
 ###
diff --git a/src/apps/pkascii2ogr.cc b/src/apps/pkascii2ogr.cc
index 7d90515..d7b2e3e 100644
--- a/src/apps/pkascii2ogr.cc
+++ b/src/apps/pkascii2ogr.cc
@@ -1,5 +1,5 @@
 /**
-pkascii2ogr.cc: program to create vector (ogr) points polygon) from text file
+pkascii2ogr.cc: program to create vector points or polygons from text file
 Copyright (C) 2008-2012 Pieter Kempeneers
 
 This file is part of pktools
diff --git a/src/apps/pkdsm2shadow.cc b/src/apps/pkdsm2shadow.cc
index ea1d6f4..958f7e7 100644
--- a/src/apps/pkdsm2shadow.cc
+++ b/src/apps/pkdsm2shadow.cc
@@ -1,5 +1,5 @@
 /**
-pkveg2shadow.cc: program to calculate sun shadow based on digital surface 
model and sun angles)
+pkdsm2shadow.cc: program to calculate sun shadow based on digital surface 
model and sun angles
 Copyright (C) 2008-2012 Pieter Kempeneers
 
 This file is 

[pktools] 45/375: minor changes to pkclassify_svm, removed empty default string in pkreclass.cc

2014-12-03 Thread Bas Couwenberg
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 0c227ed66cafbb0825409ea40815e79505487f5d
Author: Pieter Kempeneers 
Date:   Wed Jan 30 18:26:50 2013 +0100

minor changes to pkclassify_svm, removed empty default string in 
pkreclass.cc
---
 src/apps/pkclassify_svm.cc | 25 +
 src/apps/pkreclass.cc  | 54 +-
 2 files changed, 46 insertions(+), 33 deletions(-)

diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index 96445d1..8cd1029 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
   Optionpk input_opt("i", "input", "input image"); 
   Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all training features (must be set as: B0, B1, 
B2,...) for all classes (class numbers identified by label option). Use 
multiple training files for bootstrap aggregation (alternative to the bag and 
bsize options, where a random subset is taken from a single training file)"); 
   Optionpk label_opt("label", "label", "identifier for class label in 
training shape file.","label"); 
-  Optionpk reclass_opt("rc", "rc", "reclass code (e.g. --rc=12 
--rc=23 to reclass first two classes to 12 and 23 resp.)");
+   Optionpk reclass_opt("rc", "rc", "reclass code (e.g. 
--rc=12 --rc=23 to reclass first two classes to 12 and 23 resp.)");
   Optionpk balance_opt("bal", "balance", "balance the input data 
to this number of samples for each class", 0);
   Optionpk minSize_opt("m", "min", "if number of training pixels is less 
then min, do not take this class into account (0: consider all classes)", 0);
   Optionpk start_opt("s", "start", "start band sequence number (set to 
0)",0); 
@@ -196,7 +196,6 @@ int main(int argc, char *argv[])
 std::cout << "number of bootstrap aggregations: " << nbag << std::endl;
   
   unsigned int totalSamples=0;
-  short nreclass=0;
   vector vcode;//unique reclass codes (e.g., -rc 1 -rc 1 -rc 2 -rc 2 -> 
vcode[0]=1,vcode[1]=2)
   vector svm(nbag);
   vector param(nbag);
@@ -205,6 +204,22 @@ int main(int argc, char *argv[])
   int nband=0;
   int startBand=2;//first two bands represent X and Y pos
 
+  short nreclass=0;
+  // if(reclass_opt.size()){
+  //   //remove duplicates:
+  //   std::sort(reclass.begin(),reclass.end());
+  //   reclass.erase(std::unique(reclass.begin(),reclass.end()),reclass.end());
+  //   nreclass=reclass.size();//number of unique output classes
+  //   if(verbose_opt[0])
+  // std::cout << "number of unique reclass strings: " << nreclass << 
std::endl;
+  //   for(short iclass=0;iclass(reclass[iclass])
+  // if(verbose_opt[0]){
+  //   std::cout << reclass[iclass] << " ";
+  //   std::cout << std::endl;
+  // }
+  //   }
+  // }
   if(reclass_opt.size()){
 vreclass.resize(reclass_opt.size());
 for(short iclass=0;iclass1){//priors from argument list
 priors.resize(priors_opt.size());
 double normPrior=0;
@@ -934,8 +951,8 @@ int main(int argc, char *argv[])
   ImgWriterOgr imgWriterOgr(output_opt[ivalidation],imgReaderOgr,false);
   if(verbose_opt[0])
 std::cout << "creating field class" << std::endl;
-  // imgWriterOgr.createField("class",OFTInteger);
-  imgWriterOgr.createField("class",OFTString);
+  imgWriterOgr.createField("class",OFTInteger);
+  // imgWriterOgr.createField("class",OFTString);
   OGRFeature *poFeature;
   unsigned int ifeature=0;
   unsigned int nFeatures=imgReaderOgr.getFeatureCount();
diff --git a/src/apps/pkreclass.cc b/src/apps/pkreclass.cc
index e976877..1d6faea 100644
--- a/src/apps/pkreclass.cc
+++ b/src/apps/pkreclass.cc
@@ -29,20 +29,20 @@ using namespace std;
 
 int main(int argc, char *argv[])
 {
-  Optionpk  input_opt("i", "input", "Input image", "");
-  Optionpk  mask_opt("m", "mask", "Mask image(s)", "");
-  Optionpk output_opt("o", "output", "Output mask file", "");
+  Optionpk  input_opt("i", "input", "Input image");
+  Optionpk  mask_opt("m", "mask", "Mask image(s)");
+  Optionpk output_opt("o", "output", "Output mask file");
   Optionpk invalid_opt("t", "invalid", "Mask value(s) where 
image is invalid. Use one value for each mask, or multiple values for a single 
mask.", 1);
   Optionpk flag_opt("f", "flag", "Flag value to put in image if not valid 
(0)", 0);
-  Optionpk colorTable_opt("ct", "ct", "color table (file with 5 
columns: id R G B ALFA (0: transparent, 255: solid)", "");
+  Optionpk colorTable_opt("ct", "ct", "color table (file with 5 
columns: id R G B ALFA (0: transparent, 255: solid)");
   Optionpk  band_opt("b", "band", "band index to replace 
(other bands are copied to output)", 0);
   Optionpk type_opt("ot", "otype", "Data type for output image 
({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}).
 Empty string: 

[pktools] 52/375: added mainpage.dox, see Changelog

2014-12-03 Thread Bas Couwenberg
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 452fee18647ab2c2b6c70d8e2aec2fc2b2a68b31
Author: Pieter Kempeneers 
Date:   Mon Feb 4 13:50:29 2013 +0100

added mainpage.dox, see Changelog
---
 ChangeLog| 4 
 doc/mainpage.dox | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index cda89b6..0c280e0 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -96,3 +96,7 @@ version 2.4
support csv input file
  - pklas2img
support DTM according to Bunting (slightly adapted version of 
Chang2003, including a median filter after morphological operator)
+ - Doxyfile
+   support doxygen to document code
+ - doc
+   directory for doxy input files
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 5d62a90..995473b 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -29,3 +29,6 @@ How to refer
 
 You are welcome to refer to pktools as: http://pktools.nongnu.org (Pieter 
Kempeneers)
 
+List of pktools
+===
+\ref available_tools "Available Tools"
\ No newline at end of file

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


[pktools] 44/375: error in pkclassify_svm when aggregation_opt is 0

2014-12-03 Thread Bas Couwenberg
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 b84ea717af1f5b78b47d14403b512fc515772fd6
Author: Pieter Kempeneers 
Date:   Wed Jan 30 15:46:20 2013 +0100

error in pkclassify_svm when aggregation_opt is 0
---
 Doxyfile   |   2 +-
 src/apps/pkclassify_svm.cc | 141 ++---
 src/apps/pkinfo.cc |  13 ++---
 src/base/Makefile.am   |  11 
 src/base/Makefile.in   |  52 -
 src/base/Optionpk.h|  74 ++--
 6 files changed, 205 insertions(+), 88 deletions(-)

diff --git a/Doxyfile b/Doxyfile
index 24934c5..0d95bdc 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -266,7 +266,7 @@ AUTOLINK_SUPPORT   = YES
 # func(std::string) {}). This also makes the inheritance and collaboration
 # diagrams that involve STL classes more complete and accurate.
 
-BUILTIN_STL_SUPPORT= NO
+BUILTIN_STL_SUPPORT= YES
 
 # If you use Microsoft's C++/CLI language, you should set this option to YES to
 # enable parsing support.
diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index db3b615..96445d1 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -31,26 +31,26 @@ along with pktools.  If not, see 
.
 
 #define Malloc(type,n) (type *)malloc((n)*sizeof(type))
 
-void reclass(const vector& result, const vector& vreclass, const 
vector& priors, unsigned short aggregation, vector& 
theResultReclass);
+void reclass(const vector& result, const vector& vreclass, 
const vector& priors, unsigned short aggregation, vector& 
theResultReclass);
 
-void reclass(const vector& result, const vector& vreclass, const 
vector& priors, unsigned short aggregation, vector& 
theResultReclass){
-  unsigned int nclass=result.size();
+void reclass(const vector& result, const vector& vreclass, 
const vector& priors, unsigned short aggregation, vector& 
theResultReclass){
+  short nclass=result.size();
   assert(priors.size()==nclass);
   assert(theResultReclass.size()>1);//must have size nreclass!
-  unsigned int nreclass=theResultReclass.size();
+  short nreclass=theResultReclass.size();
   vector pValues(nclass);
   float normReclass=0;
-  for(int iclass=0;iclass=0);
 assert(pv<=1);
 pv*=priors[iclass];
 pValues[iclass]=pv;
   }
-  for(int iclass=0;iclass& result, const vector& 
vreclass, const ve
 }
 normReclass+=theResultReclass[iclass];
   }
-  for(int iclass=0;iclass& result, const vector& 
vreclass, const ve
 int main(int argc, char *argv[])
 {
   // map reclassMap;
-  vector vreclass;  //vreclass: map nclass->nreclass
-  vector vuniqueclass;
+  vector vreclass;//vreclass: map nclass->nreclass
+  vector vuniqueclass;
   vector priors;
   vector priorsReclass;
   
@@ -196,18 +196,18 @@ int main(int argc, char *argv[])
 std::cout << "number of bootstrap aggregations: " << nbag << std::endl;
   
   unsigned int totalSamples=0;
-  int nreclass=0;
-  vector vcode;//unique class codes in recode string
+  short nreclass=0;
+  vector vcode;//unique reclass codes (e.g., -rc 1 -rc 1 -rc 2 -rc 2 -> 
vcode[0]=1,vcode[1]=2)
   vector svm(nbag);
   vector param(nbag);
 
-  unsigned int nclass=0;
+  short nclass=0;
   int nband=0;
   int startBand=2;//first two bands represent X and Y pos
 
   if(reclass_opt.size()){
 vreclass.resize(reclass_opt.size());
-for(int iclass=0;iclass1){//priors from argument list
 priors.resize(priors_opt.size());
 double normPrior=0;
-for(int iclass=0;iclassbalance_opt[0]){
 while(trainingPixels[iclass].size()>balance_opt[0]){
   int index=rand()%trainingPixels[iclass].size();
@@ -373,7 +373,7 @@ int main(int argc, char *argv[])
 if(scale[ibag][iband]<=0){
   float theMin=trainingPixels[0][0][iband+startBand];
   float theMax=trainingPixels[0][0][iband+startBand];
-  for(int iclass=0;iclasstrainingPixels[iclass][isample][iband+startBand])
 theMin=trainingPixels[iclass][isample][iband+startBand];
@@ -405,37 +405,37 @@ int main(int argc, char *argv[])
   vcode.clear();
   if(verbose_opt[0]>=1){
 std::cout << "before recoding: " << std::endl;
-for(int iclass = 0; iclass < vreclass.size(); iclass++)
+for(short iclass = 0; iclass < vreclass.size(); iclass++)
   std::cout << " " << vreclass[iclass];
 std::cout << std::endl; 
   }
-  vector vord=vreclass;//ordered vector, starting from 0 to nreclass
-  int iclass=0;
-  map mreclass;
-  for(int ic=0;ic vord=vreclass;//ordered vector, starting from 0 to nreclass
+  short iclass=0;
+  map mreclass;
+  for(short ic=0;ic::iterator vit;
+vector::iterator vit;
 
while((vit=find(vreclass.begin(),vreclass.end(),vcode.back()))!=vreclass.end())
   vreclass.erase(vit);
   }
 

[pktools] 61/375: small change in pkclassify_svm.cc

2014-12-03 Thread Bas Couwenberg
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 b10215706bd0527d421944550636ab9bba90bfde
Author: Pieter Kempeneers 
Date:   Thu Feb 14 16:52:31 2013 +0100

small change in pkclassify_svm.cc
---
 src/apps/pkclassify_svm.cc | 58 ++
 1 file changed, 43 insertions(+), 15 deletions(-)

diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index be4a92a..95147c9 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -124,7 +124,8 @@ int main(int argc, char *argv[])
   Optionpk  oformat_opt("of", "oformat", "Output image format (see 
also gdal_translate). Empty string: inherit from input image");
   Optionpk option_opt("co", "co", "options: NAME=VALUE [-co 
COMPRESS=LZW] [-co INTERLEAVE=BAND]");
   Optionpk colorTable_opt("ct", "ct", "colour table in ascii format 
having 5 columns: id R G B ALFA (0: transparent, 255: solid)"); 
-  Optionpk prob_opt("\0", "prob", "probability image."); 
+  Optionpk prob_opt("prob", "prob", "probability image."); 
+  Optionpk entropy_opt("entropy", "entropy", "entropy image (measure 
for uncertainty of classifier output"); 
   Optionpk active_opt("active", "active", "ogr output for active 
training sample."); 
   Optionpk nactive_opt("na", "nactive", "number of active 
training points",1);
   Optionpk verbose_opt("v", "verbose", "set to: 0 (results only), 1 
(confusion matrix), 2 (debug)",0);
@@ -169,6 +170,7 @@ int main(int argc, char *argv[])
 colorTable_opt.retrieveOption(argc,argv);
 option_opt.retrieveOption(argc,argv);
 prob_opt.retrieveOption(argc,argv);
+entropy_opt.retrieveOption(argc,argv);
 active_opt.retrieveOption(argc,argv);
 nactive_opt.retrieveOption(argc,argv);
 verbose_opt.retrieveOption(argc,argv);
@@ -695,6 +697,7 @@ int main(int argc, char *argv[])
 ImgWriterGdal classImageBag;
 ImgWriterGdal classImageOut;
 ImgWriterGdal probImage;
+ImgWriterGdal entropyImage;
 
 string imageType=testImage.getImageType();
 if(oformat_opt.size())//default
@@ -718,6 +721,11 @@ int main(int argc, char *argv[])
 probImage.copyGeoTransform(testImage);
 probImage.setProjection(testImage.getProjection());
   }
+  if(entropy_opt.size()){
+
entropyImage.open(entropy_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt);
+entropyImage.copyGeoTransform(testImage);
+entropyImage.setProjection(testImage.getProjection());
+  }
 }
 catch(string error){
   cerr << error << std::endl;
@@ -731,6 +739,7 @@ int main(int argc, char *argv[])
   Vector2d hpixel(ncol);
   // Vector2d fpixel(ncol);
   Vector2d prOut(nreclass,ncol);//posterior prob for each reclass
+  vector entropy(ncol);
   Vector2d classBag;//classified line for writing to image file
   if(classBag_opt.size())
 classBag.resize(nbag,ncol);
@@ -954,26 +963,40 @@ int main(int argc, char *argv[])
 maxBag2=prOut[iclass][icol];
   normBag+=prOut[iclass][icol];
 }
-   float maxDiff=maxBag1-maxBag2;
-   if(active_opt.size()&&maxDiff){
- if(maxDiff(prv+0.5);
+}
+entropy[icol]/=log(nreclass)/log(2);
+entropy[icol]=static_cast(100*entropy[icol]+0.5);
+   // float maxDiff=maxBag1-maxBag2;
+   // if(active_opt.size()&&maxDiff){
+   //   if(maxDiffactivePoints.back().value){
+   activePoints.back().value=entropy[icol];//replace largest value 
(last)
activePoints.back().posx=icol;
activePoints.back().posy=iline;
-   
std::sort(activePoints.begin(),activePoints.end(),Increase_PosValue());//sort 
in ascending order (smallest first, largest last)
+   
std::sort(activePoints.begin(),activePoints.end(),Decrease_PosValue());//sort 
in descending order (largest first, smallest last)
if(verbose_opt[0])
  std::cout << activePoints.back().posx << " " << 
activePoints.back().posy << " " << activePoints.back().value << std::endl;
  }
}
-//normalize prOut and convert to percentage
-if(prob_opt.size()){
-  for(short iclass=0;iclass(prv+0.5);
-  }
-}
   }//icol
   //--- write output 
--
   if(classBag_opt.size())
@@ -983,6 +1006,9 @@ int main(int argc, char *argv[])
 for(short iclass=0;iclass(iline+1.0)/classImageOut.nrOfRow();
@@ -1014,6 +1040,8 @@ int main(int argc, char *argv[])
 testImage.close();
 if(prob_opt.size())
   probImage.close();
+if(entropy_opt.size())
+  entropyImage.close();
 if(classBag_opt.size())
   classImageBag.close();
 classImageOut.close();

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

__

[pktools] 63/375: introduced FileReaderAscii.h and updated pkstat.cc

2014-12-03 Thread Bas Couwenberg
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 143c64cf01bdea87fdf410ca3cd18645f1ed69a4
Author: Pieter Kempeneers 
Date:   Mon Feb 18 17:27:43 2013 +0100

introduced FileReaderAscii.h and updated pkstat.cc
---
 src/apps/Makefile.am  |   2 +-
 src/apps/pkstat.cc| 103 
 src/fileclasses/FileReaderAscii.h | 192 ++
 src/fileclasses/Makefile.am   |   2 +-
 4 files changed, 211 insertions(+), 88 deletions(-)

diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index 92d0a68..bff0785 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -44,7 +44,7 @@ pkdumpimg_SOURCES = pkdumpimg.cc
 pkdumpogr_SOURCES = pkdumpogr.h pkdumpogr.cc
 pksieve_SOURCES = pksieve.cc
 pkstat_SOURCES = $(top_srcdir)/src/algorithms/Histogram.h pkstat.cc
-pkstat_LDADD = $(GSL_LIBS) $(AM_LDFLAGS)
+pkstat_LDADD = -lfileClasses $(GSL_LIBS) $(AM_LDFLAGS)
 pkstatogr_SOURCES = pkstatogr.cc
 pkegcs_SOURCES = pkegcs.cc
 pkegcs_LDADD = -lgdal $(AM_LDFLAGS) -lgdal
diff --git a/src/apps/pkstat.cc b/src/apps/pkstat.cc
index f6940ff..1467dac 100644
--- a/src/apps/pkstat.cc
+++ b/src/apps/pkstat.cc
@@ -22,6 +22,7 @@ along with pktools.  If not, see 
.
 #include 
 #include 
 #include "base/Optionpk.h"
+#include "fileclasses/FileReaderAscii.h"
 #include "algorithms/Histogram.h"
 
 using namespace std;
@@ -30,8 +31,9 @@ int main(int argc, char *argv[])
 {
   Optionpk input_opt("i","input","name of the input text file","");
   Optionpk fs_opt("fs","fs","field separator.",' ');
+  Optionpk comment_opt("comment","comment","comment character",'#');
   Optionpk output_opt("o","output","output the selected columns",false);
-  Optionpk col_opt("c", "column", "column nr, starting from 0", 0);
+  Optionpk col_opt("c", "column", "column nr, starting from 0", 0);
   Optionpk 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 size_opt("size","size","sample size",false);
   Optionpk mean_opt("m","mean","calculate mean value",false);
@@ -42,8 +44,8 @@ int main(int argc, char *argv[])
   Optionpk stdev_opt("stdev","stdev","calculate standard 
deviation",false);
   Optionpk sum_opt("s","sum","calculate sum of column",false);
   Optionpk minmax_opt("mm","minmax","calculate minimum and maximum 
value",false);
-  Optionpk min_opt("min","min","calculate minimum value",0);
-  Optionpk max_opt("max","max","calculate maximum value",0);
+  Optionpk min_opt("min","min","set minimum value",0);
+  Optionpk max_opt("max","max","set maximum value",0);
   Optionpk histogram_opt("hist","hist","calculate histogram",false);
   Optionpk nbin_opt("bin","bin","number of bins to calculate 
histogram",10);
   Optionpk relative_opt("rel","relative","use percentiles for histogram 
to calculate histogram",false);
@@ -56,6 +58,7 @@ int main(int argc, char *argv[])
   try{
 doProcess=input_opt.retrieveOption(argc,argv);
 fs_opt.retrieveOption(argc,argv);
+comment_opt.retrieveOption(argc,argv);
 output_opt.retrieveOption(argc,argv);
 col_opt.retrieveOption(argc,argv);
 range_opt.retrieveOption(argc,argv);
@@ -89,95 +92,23 @@ int main(int argc, char *argv[])
 
   vector< vector > dataVector(col_opt.size());
   vector< vector > histVector(col_opt.size());
-  ifstream dataFile;
-  if(verbose_opt[0])
-cout << "opening file " << input_opt[0] << endl;
-  dataFile.open(input_opt[0].c_str());
 
-  int nrow=0;
-  bool withinRange=true;
-  
-  if(fs_opt[0]>' '&&fs_opt[0]<='~'){//field separator is a regular character 
(minimum ASCII code is space, maximum ASCII code is tilde)
-  // if(input_opt[0].find(".csv")!=string::npos){
-if(verbose_opt[0])
-  cout << "reading csv file " << input_opt[0] << endl;
-string csvRecord;
-while(getline(dataFile,csvRecord)){//read a line
-  withinRange=true;
-  if(nrow1)
-if(nrow>range_opt[1])
-  withinRange=false;
-  if(withinRange){
-istringstream csvstream(csvRecord);
-string item;
-int ncol=0;
-while(getline(csvstream,item,fs_opt[0])){//read a column
-  if(verbose_opt[0])
-cout << item << " ";
-  for(int icol=0;icol=min_opt[0]&&value<=max_opt[0])||max_opt[0]<=min_opt[0])
-dataVector[icol].push_back(value);
-}
-  }
-  ++ncol;
-}
-if(verbose_opt[0])
-  cout << endl;
-assert(ncol>=col_opt[0]);
-  }
-  ++nrow;
-}
-assert(dataVector.size());
-  }
-  else{//space or tab delimited fields
-string spaceRecord;
-while(!getline(dataFile, spaceRecord).eof()){
-  withinRange=true;
-  if(nrow1)
-if(nrow>range_opt[1])
-  withinRange=false;
-  if(withinRange){
-if(ver

[pktools] 69/375: Merge branch 'master' of git.savannah.nongnu.org:/srv/git/pktools

2014-12-03 Thread Bas Couwenberg
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 a73f54560f68741633d728af26c1927efbe24e97
Merge: 5ada2b8 0c71d6d
Author: Pieter Kempeneers 
Date:   Mon Feb 25 16:20:15 2013 +0100

Merge branch 'master' of git.savannah.nongnu.org:/srv/git/pktools

 Makefile.in  |  83 +++-
 aclocal.m4   |  82 +++-
 configure| 270 ++-
 src/algorithms/ConfusionMatrix.h |   6 +-
 src/algorithms/Makefile.am   |   6 +-
 src/algorithms/Makefile.in   |  98 +++---
 src/apps/Makefile.am |   3 +-
 src/apps/Makefile.in |  81 ++--
 src/apps/pkclassify_svm.cc   |  80 
 src/apps/pkopt_svm.cc| 103 ++-
 src/base/Makefile.in |  33 +++--
 src/fileclasses/Makefile.in  |  31 +++--
 src/imageclasses/Makefile.in |  31 +++--
 13 files changed, 541 insertions(+), 366 deletions(-)

diff --cc src/algorithms/Makefile.in
index a5e3600,063b4bc..88c2c69
--- a/src/algorithms/Makefile.in
+++ b/src/algorithms/Makefile.in
@@@ -34,9 -33,8 +33,8 @@@ POST_INSTALL = 
  NORMAL_UNINSTALL = :
  PRE_UNINSTALL = :
  POST_UNINSTALL = :
- noinst_PROGRAMS = pktestStat$(EXEEXT)
  @USE_FANN_TRUE@am__append_1 = myfann_cpp.h
 -@USE_NLOPT_TRUE@am__append_2 = SensorModel.h OptFactory.h
 +@USE_NLOPT_TRUE@am__append_2 = OptFactory.h
  subdir = src/algorithms
  DIST_COMMON = $(am__libalgorithms_a_HEADERS_DIST) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@@ -84,12 -75,11 +75,11 @@@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLU
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
  LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- SOURCES = $(libalgorithms_a_SOURCES) $(pktestStat_SOURCES)
- DIST_SOURCES = $(am__libalgorithms_a_SOURCES_DIST) \
-   $(pktestStat_SOURCES)
+ SOURCES = $(libalgorithms_a_SOURCES)
+ DIST_SOURCES = $(am__libalgorithms_a_SOURCES_DIST)
  am__libalgorithms_a_HEADERS_DIST = Egcs.h Filter2d.h Filter.h \
StatFactory.h ConfusionMatrix.h svm.h FeatureSelector.h \
 -  myfann_cpp.h SensorModel.h OptFactory.h
 +  myfann_cpp.h OptFactory.h
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
  $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \

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


[pktools] 65/375: spectral filtering

2014-12-03 Thread Bas Couwenberg
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 2bd32b7ef6eb9c4745c5478948703bac0b59c3c8
Author: Pieter Kempeneers 
Date:   Tue Feb 19 18:20:29 2013 +0100

spectral filtering
---
 Makefile.in  |  83 +
 aclocal.m4   |  82 +
 configure| 270 +++
 src/algorithms/Filter.cc |  43 ++-
 src/algorithms/Filter.h  | 120 ++-
 src/algorithms/Filter2d.cc   |  32 ++---
 src/algorithms/Filter2d.h|  47 
 src/algorithms/Makefile.in   |  46 +++-
 src/algorithms/StatFactory.h |  65 +--
 src/apps/Makefile.am |   5 +-
 src/apps/Makefile.in |  88 +++---
 src/apps/pkdsm2shadow.cc |   2 +-
 src/apps/pkfilter.cc | 139 --
 src/apps/pkfs_svm.cc |   1 -
 src/apps/pklas2img.cc|  24 ++--
 src/base/Makefile.in |  33 ++
 src/base/Vector2d.h  |  32 ++---
 src/fileclasses/Makefile.in  |  38 +++---
 src/imageclasses/Makefile.in |  31 ++---
 19 files changed, 639 insertions(+), 542 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 79e3881..7146fbd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -68,11 +68,9 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) 
$(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  if test -d "$(distdir)"; then \
-find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-  && rm -rf "$(distdir)" \
-  || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
+  { test ! -d "$(distdir)" \
+|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -101,8 +99,6 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -229,7 +225,7 @@ all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh: Makefile
+am--refresh:
@:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
@for dep in $?; do \
@@ -265,8 +261,10 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-   @if test ! -f $@; then rm -f stamp-h1; else :; fi
-   @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+   @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+   else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -486,11 +484,7 @@ dist-gzip: distdir
$(am__remove_distdir)
 
 dist-bzip2: distdir
-   tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
-   $(am__remove_distdir)
-
-dist-lzip: distdir
-   tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
+   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
 
 dist-lzma: distdir
@@ -498,7 +492,7 @@ dist-lzma: distdir
$(am__remove_distdir)
 
 dist-xz: distdir
-   tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c 
>$(distdir).tar.xz
+   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
 
 dist-tarZ: distdir
@@ -529,8 +523,6 @@ distcheck: dist
  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
-   *.tar.lz*) \
- lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -550,7 +542,6 @@ distcheck: dist
  && am__cwd=`pwd` \
  && $(am__cd) $(distdir)/_build \
  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-   $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
  && $(MAKE) $(AM_MAKEFLAGS) \
 

[pktools] 73/375: error in classValueMap when class name and value option not provided

2014-12-03 Thread Bas Couwenberg
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 185b48502c8ec91182d8e1d7fa2dbeefae0a88f8
Author: Pieter Kempeneers 
Date:   Mon Mar 18 10:23:46 2013 +0100

error in classValueMap when class name and value option not provided
---
 src/algorithms/Filter.h| 25 +++--
 src/apps/pkclassify_svm.cc |  8 ++--
 src/apps/pkfilter.cc   | 12 
 src/base/Makefile.am   |  2 +-
 src/base/Makefile.in   |  2 +-
 5 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index 75bce71..eaf5e33 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -55,10 +55,10 @@ public:
   void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const 
std::string& method, int dim, short down=1, int offset=0);
   void doit(const ImgReaderGdal& input, ImgWriterGdal& output, short down=1, 
int offset=0);
 
-  template double applySrf(const vector &wavelengthIn, const 
Vector2d& input, const Vector2d& srf, const std::string& 
interpolationType, vector& output, double delta=1.0, bool normalize=false, 
bool verbose=false);
+  template double applySrf(const vector &wavelengthIn, const 
Vector2d& input, const Vector2d& srf, const std::string& 
interpolationType, vector& output, double delta=1.0, bool normalize=false, 
int down=1, bool verbose=false);
   // void applySrf(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector< Vector2d > &srf, const std::string& 
interpolationType, ImgWriterGdal& output, bool verbose=false);
   template void applyFwhm(const vector &wavelengthIn, const 
vector& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, vector& 
output, bool verbose=false);
-  template void applyFwhm(const vector &wavelengthIn, const 
Vector2d& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, Vector2d& output, bool 
verbose=false);
+  template void applyFwhm(const vector &wavelengthIn, const 
Vector2d& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, Vector2d& output, int down=1, 
bool verbose=false);
   // void applyFwhm(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector &wavelengthOut, const vector &fwhm, const 
std::string& interpolationType, ImgWriterGdal& output, bool verbose=false);
 // int fir(double* input, int nbandIn, vector& output, int startBand, 
const string& wavelength, const string& fwhm, bool verbose);
 // int fir(const vector&input, vector& output, int startBand, 
double fwhm, int ntaps, int down, int offset, bool verbose);
@@ -102,12 +102,12 @@ private:
 
 //input[band][sample], output[sample]
 //returns wavelength for which srf is maximum
-  template double Filter::applySrf(const vector 
&wavelengthIn, const Vector2d& input, const Vector2d& srf, const 
std::string& interpolationType, vector& output, double delta, bool 
normalize, bool verbose)
+  template double Filter::applySrf(const vector 
&wavelengthIn, const Vector2d& input, const Vector2d& srf, const 
std::string& interpolationType, vector& output, double delta, bool 
normalize, int down, bool verbose)
 {  
   assert(srf.size()==2);//[0]: wavelength, [1]: response function
   int nband=srf[0].size(); 
   unsigned int nsample=input[0].size();
-  output.resize(nsample);
+  output.resize((nsample+down-1)/down);
   double start=floor(wavelengthIn[0]);
   double end=ceil(wavelengthIn.back());
   if(verbose)
@@ -151,6 +151,8 @@ private:
   assert(splineOut);
 
   for(int isample=0;isample inputValues;
 input.selectCol(isample,inputValues);
 assert(wavelengthIn.size()==inputValues.size());
@@ -164,10 +166,11 @@ private:
 assert(input_fine.size()==srf_fine.size());
 assert(input_fine.size()==wavelength_fine.size());
 
stat.initSpline(splineOut,&(wavelength_fine[0]),&(product[0]),wavelength_fine.size());
+//hiero
 if(normalize)
-  output[isample]=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
+  
output[isample/down]=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
 else
-  output[isample]=gsl_spline_eval_integ(splineOut,start,end,accOut);
+  output[isample/down]=gsl_spline_eval_integ(splineOut,start,end,accOut);
   }
   gsl_spline_free(splineOut);
   gsl_interp_accel_free(accOut);
@@ -229,7 +232,7 @@ template void Filter::applyFwhm(const 
vector &wavelengthIn, con
 
 
   //input[inBand][sample], output[outBand][sample]
-template void Filter::applyFwhm(const vector &wavelengthIn, 
const Vector2d& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, Vector2d& 
output, bool verbose){
+  template void Filter::applyFwhm(const vector &wavelengthIn, 
const Vector2d& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, Vector2d& 

[pktools] 71/375: adapted models/Makefile.am for local libf95.a

2014-12-03 Thread Bas Couwenberg
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 f189b4839d3eaf48a189630e3409a87be110ca28
Author: Pieter Kempeneers 
Date:   Mon Feb 25 16:52:50 2013 +0100

adapted models/Makefile.am for local libf95.a
---
 src/models/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/models/Makefile.am b/src/models/Makefile.am
index 6faa4a5..4b4bedd 100644
--- a/src/models/Makefile.am
+++ b/src/models/Makefile.am
@@ -32,4 +32,4 @@ libmodels_a_SOURCES = $(libmodels_a_HEADERS) Prospect.cc
 
 # list of sources for the binaries
 pktestProspect_SOURCES = pktestProspect.cc
-pktestProspect_LDADD = $(top_builddir)/src/models/libprospect.a 
$(top_builddir)/src/models/libmodels.a $(top_builddir)/src/models/libprospect.a 
/usr/local/src/g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libf95.a
+pktestProspect_LDADD = $(top_builddir)/src/models/libmodels.a 
$(top_builddir)/src/models/libprospect.a libf95.a

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


[pktools] 70/375: added libraries for prospect

2014-12-03 Thread Bas Couwenberg
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 2eb7dfe7ed38a3c1f70fa540d5b5e97f629c14ab
Author: Pieter Kempeneers 
Date:   Mon Feb 25 16:51:33 2013 +0100

added libraries for prospect
---
 Makefile.in  |  83 +
 aclocal.m4   |  82 +
 configure| 270 +++
 src/algorithms/Makefile.in   |  31 ++---
 src/apps/Makefile.in |  79 ++---
 src/base/Makefile.in |  33 ++
 src/fileclasses/Makefile.in  |  31 ++---
 src/imageclasses/Makefile.in |  31 ++---
 src/models/Prospect.cc   |   6 +-
 src/models/Prospect.h|   2 +-
 src/models/libf95.a  | Bin 0 -> 1136532 bytes
 src/models/libprospect.a | Bin 0 -> 134564 bytes
 src/models/pktestProspect.cc |   2 +-
 13 files changed, 265 insertions(+), 385 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 2ea375f..7a4005d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -68,11 +68,9 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) 
$(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  if test -d "$(distdir)"; then \
-find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-  && rm -rf "$(distdir)" \
-  || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
+  { test ! -d "$(distdir)" \
+|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -101,8 +99,6 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -230,7 +226,7 @@ all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh: Makefile
+am--refresh:
@:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
@for dep in $?; do \
@@ -266,8 +262,10 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-   @if test ! -f $@; then rm -f stamp-h1; else :; fi
-   @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+   @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+   else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -487,11 +485,7 @@ dist-gzip: distdir
$(am__remove_distdir)
 
 dist-bzip2: distdir
-   tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
-   $(am__remove_distdir)
-
-dist-lzip: distdir
-   tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
+   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
 
 dist-lzma: distdir
@@ -499,7 +493,7 @@ dist-lzma: distdir
$(am__remove_distdir)
 
 dist-xz: distdir
-   tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c 
>$(distdir).tar.xz
+   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
 
 dist-tarZ: distdir
@@ -530,8 +524,6 @@ distcheck: dist
  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
-   *.tar.lz*) \
- lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -551,7 +543,6 @@ distcheck: dist
  && am__cwd=`pwd` \
  && $(am__cd) $(distdir)/_build \
  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-   $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
  && $(MAKE) $(AM_MAKEFLAGS) \
  && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -580,16 +571,8 @@ distcheck: dist
  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-   @test -n '$(distu

[pktools] 72/375: pkfilter.cc supports fwhm and srf filtering

2014-12-03 Thread Bas Couwenberg
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 fa5dc5671d8d79b9750b81f5325384e5d72ed9f9
Author: Pieter Kempeneers 
Date:   Thu Mar 14 17:26:13 2013 +0100

pkfilter.cc supports fwhm and srf filtering
---
 src/algorithms/Filter.cc |  86 +++---
 src/algorithms/Filter.h  | 212 ---
 src/algorithms/Makefile.am   |   6 +-
 src/algorithms/Makefile.in   |  67 --
 src/algorithms/StatFactory.h |  60 ++--
 src/apps/pkfilter.cc | 110 +++---
 6 files changed, 364 insertions(+), 177 deletions(-)

diff --git a/src/algorithms/Filter.cc b/src/algorithms/Filter.cc
index b99a8df..21009de 100644
--- a/src/algorithms/Filter.cc
+++ b/src/algorithms/Filter.cc
@@ -104,38 +104,56 @@ void filter::Filter::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output, sho
   }
 }
 
-void filter::Filter::applyFwhm(const vector &wavelengthIn, const 
ImgReaderGdal& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, ImgWriterGdal& output, bool 
verbose){
-  Vector2d lineInput(input.nrOfBand(),input.nrOfCol());
-  Vector2d lineOutput(wavelengthOut.size(),input.nrOfCol());
-  const char* pszMessage;
-  void* pProgressArg=NULL;
-  GDALProgressFunc pfnProgress=GDALTermProgress;
-  double progress=0;
-  pfnProgress(progress,pszMessage,pProgressArg);
-  for(int y=0;y pixelInput(input.nrOfBand());
-vector pixelOutput;
-for(int x=0;x(wavelengthIn,pixelInput,wavelengthOut,fwhm, 
interpolationType, pixelOutput, verbose);
-  assert(pixelOutput.size()==wavelengthOut.size());
-  for(int iband=0;iband &wavelengthIn, const 
ImgReaderGdal& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, ImgWriterGdal& output, bool 
verbose){
+//   Vector2d lineInput(input.nrOfBand(),input.nrOfCol());
+//   Vector2d lineOutput(wavelengthOut.size(),input.nrOfCol());
+//   const char* pszMessage;
+//   void* pProgressArg=NULL;
+//   GDALProgressFunc pfnProgress=GDALTermProgress;
+//   double progress=0;
+//   pfnProgress(progress,pszMessage,pProgressArg);
+//   for(int y=0;y(wavelengthIn,lineInput,wavelengthOut,fwhm, 
interpolationType, lineOutput, verbose);
+// for(int iband=0;iband &wavelengthIn, const 
ImgReaderGdal& input, const vector< Vector2d > &srf, const std::string& 
interpolationType, ImgWriterGdal& output, bool verbose){
+//   assert(output.nrOfBand()==srf.size());
+//   double centreWavelength=0;
+//   Vector2d lineInput(input.nrOfBand(),input.nrOfCol());
+//   const char* pszMessage;
+//   void* pProgressArg=NULL;
+//   GDALProgressFunc pfnProgress=GDALTermProgress;
+//   double progress=0;
+//   pfnProgress(progress,pszMessage,pProgressArg);
+//   for(int y=0;y lineOutput(input.nrOfCol());
+//   centreWavelength=applySrf(wavelengthIn,lineInput,srf[isrf], 
interpolationType, lineOutput, verbose);
+//   for(int iband=0;iband void applySrf(const Vector2d& input, const 
Vector2d& srf, Vector2d& output, double delta=1, bool 
normalize=false, double centreWavelength=0, bool verbose=false);
+  template double applySrf(const vector &wavelengthIn, const 
Vector2d& input, const Vector2d& srf, const std::string& 
interpolationType, vector& output, double delta=1.0, bool normalize=false, 
bool verbose=false);
+  // void applySrf(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector< Vector2d > &srf, const std::string& 
interpolationType, ImgWriterGdal& output, bool verbose=false);
   template void applyFwhm(const vector &wavelengthIn, const 
vector& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, vector& 
output, bool verbose=false);
-  void applyFwhm(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector &wavelengthOut, const vector &fwhm, const 
std::string& interpolationType, ImgWriterGdal& output, bool verbose=false);
+  template void applyFwhm(const vector &wavelengthIn, const 
Vector2d& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, Vector2d& output, bool 
verbose=false);
+  // void applyFwhm(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector &wavelengthOut, const vector &fwhm, const 
std::string& interpolationType, ImgWriterGdal& output, bool verbose=false);
 // int fir(double* input, int nbandIn, vector& output, int startBand, 
const string& wavelength, const string& fwhm, bool verbose);
 // int fir(const vector&input, vector& output, int startBand, 
double fwhm, int ntaps, int down, int offset, bool verbose);
 // int fir(double* input, int nbandIn, vector& output, int startBand, 
double fwhm, int ntaps, int down, int offset, bool verbose);
@@ -98,69 +100,88 @@ private:
   vector m_mask;
 };
 
-//   template void Filter::applySrf(const Vector2d& input, const 
Vector2d& srf, Vector2d& output, doubl

[pktools] 64/375: renamed Histogram to StatFactory

2014-12-03 Thread Bas Couwenberg
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 46d99cef2eee782b9154eeed76dcd361b917c4f4
Author: Pieter Kempeneers 
Date:   Tue Feb 19 10:11:04 2013 +0100

renamed Histogram to StatFactory
---
 src/algorithms/Filter.h   |  72 +++
 src/algorithms/Filter2d.cc|  42 ++--
 src/algorithms/Filter2d.h |   2 +-
 src/algorithms/Histogram.cc   |  63 --
 src/algorithms/Makefile.am|   4 +-
 src/algorithms/{Histogram.h => StatFactory.h} | 267 --
 src/apps/pkclassify_nn.cc |   1 -
 src/apps/pkclassify_svm.cc|   1 -
 src/apps/pkdumpogr.cc |   1 -
 src/apps/pkextract.cc |  20 +-
 src/apps/pkfs_nn.cc   |   1 -
 src/apps/pklas2img.cc |  20 +-
 src/apps/pkmosaic.cc  |  12 +-
 src/apps/pkopt_svm.cc |   1 -
 src/apps/pksensormodel.cc |   6 +-
 src/apps/pkstat.cc|  38 ++--
 src/apps/pkstatogr.cc |  10 +-
 17 files changed, 324 insertions(+), 237 deletions(-)

diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index ed7ae58..7973171 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -22,7 +22,7 @@ along with pktools.  If not, see 
.
 
 #include 
 #include 
-#include "Histogram.h"
+#include "StatFactory.h"
 #include "imageclasses/ImgReaderGdal.h"
 #include "imageclasses/ImgWriterGdal.h"
 
@@ -89,8 +89,8 @@ template void Filter::morphology(const vector& 
input, vector& out
   assert(dim);
   output.resize((input.size()-offset+down-1)/down);
   int i=0;
-  Histogram hist;
-  vector histBuffer;
+  statfactory::StatFactory stat;
+  vector statBuffer;
   short binValue=0;
   //start: extend input with mirrored version of itself
   for(i=offset;i void Filter::morphology(const vector& 
input, vector& out
   }
 }
 if(m_class.size())
-  histBuffer.push_back(binValue);
+  statBuffer.push_back(binValue);
 else
-  histBuffer.push_back(input[i]);
+  statBuffer.push_back(input[i]);
 for(int t=1;t<=dim/2;++t){
   binValue=0;
   for(int iclass=0;iclass void Filter::morphology(const 
vector& input, vector& out
 }
   }
   if(m_class.size()){
-histBuffer.push_back(binValue);
-histBuffer.push_back(binValue);
+statBuffer.push_back(binValue);
+statBuffer.push_back(binValue);
   }
   else{
-histBuffer.push_back(input[i+t]);
-histBuffer.push_back(input[i+t]);
+statBuffer.push_back(input[i+t]);
+statBuffer.push_back(input[i+t]);
   }
 }
-assert(histBuffer.size()==dim);
+assert(statBuffer.size()==dim);
 if((i-offset)%down){
-  histBuffer.clear();
+  statBuffer.clear();
   continue;
 }
 switch(method){
 case(DILATE):
-  output[(i-offset+down-1)/down]=hist.max(histBuffer);
+  output[(i-offset+down-1)/down]=stat.max(statBuffer);
   break;
 case(ERODE):
-  output[(i-offset+down-1)/down]=hist.min(histBuffer);
+  output[(i-offset+down-1)/down]=stat.min(statBuffer);
   break;
 default:
   string errorString="method not supported";
@@ -141,13 +141,13 @@ template void Filter::morphology(const 
vector& input, vector& out
 }
 if(verbose){
   cout << "buffer: ";
-  for(int ibuf=0;ibuf" << output[(i-offset+down-1)/down] << endl;
 }
   }
   //main
-  histBuffer.clear();
+  statBuffer.clear();
   for(i=offset+dim/2;i void Filter::morphology(const 
vector& input, vector& out
 }
   }
   if(m_class.size())
-histBuffer.push_back(binValue);
+statBuffer.push_back(binValue);
   else
-histBuffer.push_back(input[i-dim/2+t]);
+statBuffer.push_back(input[i-dim/2+t]);
 }
-assert(histBuffer.size()==dim);
+assert(statBuffer.size()==dim);
 if((i-offset)%down){
-  histBuffer.clear();
+  statBuffer.clear();
   continue;
 }
 switch(method){
 case(DILATE):
-  output[(i-offset+down-1)/down]=hist.max(histBuffer);
+  output[(i-offset+down-1)/down]=stat.max(statBuffer);
   break;
 case(ERODE):
-  output[(i-offset+down-1)/down]=hist.min(histBuffer);
+  output[(i-offset+down-1)/down]=stat.min(statBuffer);
   break;
 default:
   string errorString="method not supported";
@@ -181,11 +181,11 @@ template void Filter::morphology(const 
vector& input, vector& out
 }
 if(verbose){
   cout << "buffer: ";
-  for(int ibuf=0;ibuf" << output[(i-offset+down-1)/down] << endl;
 }
-histBuffer.clear();
+statBuffer.clear();
   }
   //end: extend input with mirrored version of itself
   

[pktools] 68/375: moved SensorModel.h from algorithms to models and introduced Prospect model

2014-12-03 Thread Bas Couwenberg
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 5ada2b80afdfa51537969fc655d74e8b03de9644
Author: Pieter Kempeneers 
Date:   Mon Feb 25 16:19:59 2013 +0100

moved SensorModel.h from algorithms to models and introduced Prospect model
---
 Makefile.am  |   1 +
 Makefile.in  |   1 +
 configure|   3 +-
 configure.ac |   1 +
 src/algorithms/Makefile.am   |   2 +-
 src/algorithms/Makefile.in   |   8 +-
 src/apps/Makefile.am |   4 +-
 src/apps/Makefile.in |  27 +-
 src/models/.deps/Prospect.Po | 127 ++
 src/models/.deps/pktestProspect.Po   | 748 +++
 src/{algorithms => models}/Makefile.am   |  20 +-
 src/models/Prospect.cc   |  31 ++
 src/models/Prospect.h|  58 +++
 src/{algorithms => models}/SensorModel.h |   0
 src/models/dataspec_p5b.mod  |  45 ++
 src/models/pktestProspect.cc |  76 
 16 files changed, 1129 insertions(+), 23 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index daabe2a..790cb37 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,7 @@ ACLOCAL_AMFLAGS = -I m4
 # the subdirectories of the project to go into
 SUBDIRS = src/base \
src/algorithms \
+   src/models \
src/imageclasses \
$(FILECLASSES_OPT) \
src/apps
diff --git a/Makefile.in b/Makefile.in
index 7146fbd..7a4005d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -217,6 +217,7 @@ ACLOCAL_AMFLAGS = -I m4
 # the subdirectories of the project to go into
 SUBDIRS = src/base \
src/algorithms \
+   src/models \
src/imageclasses \
$(FILECLASSES_OPT) \
src/apps
diff --git a/configure b/configure
index 5ea37c6..2161137 100755
--- a/configure
+++ b/configure
@@ -5845,7 +5845,7 @@ fi
 # files to generate via autotools (.am or .in source files)
 ac_config_headers="$ac_config_headers config.h"
 
-ac_config_files="$ac_config_files Makefile src/base/Makefile 
src/algorithms/Makefile src/imageclasses/Makefile src/fileclasses/Makefile 
src/apps/Makefile"
+ac_config_files="$ac_config_files Makefile src/base/Makefile 
src/algorithms/Makefile src/models/Makefile src/imageclasses/Makefile 
src/fileclasses/Makefile src/apps/Makefile"
 
 
 # generate the final Makefile etc.
@@ -6603,6 +6603,7 @@ do
 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 "src/base/Makefile") CONFIG_FILES="$CONFIG_FILES src/base/Makefile" ;;
 "src/algorithms/Makefile") CONFIG_FILES="$CONFIG_FILES 
src/algorithms/Makefile" ;;
+"src/models/Makefile") CONFIG_FILES="$CONFIG_FILES src/models/Makefile" ;;
 "src/imageclasses/Makefile") CONFIG_FILES="$CONFIG_FILES 
src/imageclasses/Makefile" ;;
 "src/fileclasses/Makefile") CONFIG_FILES="$CONFIG_FILES 
src/fileclasses/Makefile" ;;
 "src/apps/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index f5ef3fb..dd1e2e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,7 @@ AC_CONFIG_FILES([
 Makefile
 src/base/Makefile
 src/algorithms/Makefile
+src/models/Makefile
 src/imageclasses/Makefile
 src/fileclasses/Makefile
 src/apps/Makefile
diff --git a/src/algorithms/Makefile.am b/src/algorithms/Makefile.am
index be84cb4..40d4bee 100644
--- a/src/algorithms/Makefile.am
+++ b/src/algorithms/Makefile.am
@@ -27,7 +27,7 @@ libalgorithms_a_HEADERS += myfann_cpp.h
 endif
 
 if USE_NLOPT
-libalgorithms_a_HEADERS += SensorModel.h OptFactory.h
+libalgorithms_a_HEADERS += OptFactory.h
 endif
 
 # the sources to add to the library and to add to the source distribution
diff --git a/src/algorithms/Makefile.in b/src/algorithms/Makefile.in
index a0dda50..a5e3600 100644
--- a/src/algorithms/Makefile.in
+++ b/src/algorithms/Makefile.in
@@ -36,7 +36,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 noinst_PROGRAMS = pktestStat$(EXEEXT)
 @USE_FANN_TRUE@am__append_1 = myfann_cpp.h
-@USE_NLOPT_TRUE@am__append_2 = SensorModel.h OptFactory.h
+@USE_NLOPT_TRUE@am__append_2 = OptFactory.h
 subdir = src/algorithms
 DIST_COMMON = $(am__libalgorithms_a_HEADERS_DIST) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -56,8 +56,8 @@ libalgorithms_a_AR = $(AR) $(ARFLAGS)
 libalgorithms_a_LIBADD =
 am__libalgorithms_a_SOURCES_DIST = Egcs.h Filter2d.h Filter.h \
StatFactory.h ConfusionMatrix.h svm.h FeatureSelector.h \
-   myfann_cpp.h SensorModel.h OptFactory.h Egcs.cc Filter2d.cc \
-   Filter.cc ConfusionMatrix.cc svm.cpp
+   myfann_cpp.h OptFactory.h Egcs.cc Filter2d.cc Filter.cc \
+   ConfusionMatrix.cc svm.cpp
 am__objects_1 =
 am__objects_2 = $(am__objects_1) $(am__objects_1)
 am_libalgorithms_a_OBJECTS = $(am__objects_2) Egcs.$(OBJEXT) \
@@ -89,7 +89,7 @@ DIST_SOURCES = $(am__libalgorithms_a_SOURCES

[pktools] 66/375: Filter1d and Filter2d with getFilterType returning enum FILTER_TYPE in function of string

2014-12-03 Thread Bas Couwenberg
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 9f33ca712fdfd38296dd5877e45b3510bf110260
Author: Pieter Kempeneers 
Date:   Fri Feb 22 17:52:09 2013 +0100

Filter1d and Filter2d with getFilterType returning enum FILTER_TYPE in 
function of string
---
 src/algorithms/Filter.cc  |  10 +-
 src/algorithms/Filter.h   | 241 ++
 src/algorithms/Filter2d.cc|  54 -
 src/algorithms/Filter2d.h |  97 ++-
 src/algorithms/Makefile.am|  12 ++
 src/algorithms/Makefile.in|  55 ++---
 src/algorithms/StatFactory.h  | 216 ++
 src/apps/pkcrop.cc|  84 +
 src/apps/pkdumpimg.cc | 180 ++--
 src/apps/pkfilter.cc  | 171 +++
 src/apps/pkinfo.cc|   8 +-
 src/apps/pklas2img.cc |  16 +--
 src/fileclasses/FileReaderAscii.h | 108 +
 13 files changed, 748 insertions(+), 504 deletions(-)

diff --git a/src/algorithms/Filter.cc b/src/algorithms/Filter.cc
index f292314..b99a8df 100644
--- a/src/algorithms/Filter.cc
+++ b/src/algorithms/Filter.cc
@@ -38,7 +38,7 @@ void filter::Filter::setTaps(const vector &taps)
   assert(m_taps.size()%2);
 }
 
-void filter::Filter::morphology(const ImgReaderGdal& input, ImgWriterGdal& 
output, int method, int dim, short down, int offset)
+void filter::Filter::morphology(const ImgReaderGdal& input, ImgWriterGdal& 
output, const std::string& method, int dim, short down, int offset)
 {
   Vector2d lineInput(input.nrOfBand(),input.nrOfCol());
   Vector2d lineOutput(input.nrOfBand(),input.nrOfCol());
@@ -104,7 +104,7 @@ void filter::Filter::doit(const ImgReaderGdal& input, 
ImgWriterGdal& output, sho
   }
 }
 
-void filter::Filter::applyFwhm(const ImgReaderGdal& input, ImgWriterGdal& 
output, const vector &wavelengthIn, const vector 
&wavelengthOut, const vector &fwhm, bool verbose){
+void filter::Filter::applyFwhm(const vector &wavelengthIn, const 
ImgReaderGdal& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, ImgWriterGdal& output, bool 
verbose){
   Vector2d lineInput(input.nrOfBand(),input.nrOfCol());
   Vector2d lineOutput(wavelengthOut.size(),input.nrOfCol());
   const char* pszMessage;
@@ -118,8 +118,10 @@ void filter::Filter::applyFwhm(const ImgReaderGdal& input, 
ImgWriterGdal& output
 vector pixelInput(input.nrOfBand());
 vector pixelOutput;
 for(int x=0;x(pixelInput,wavelengthIn,pixelOutput,wavelengthOut, 
fwhm, verbose);
+  for(int iband=0;iband(wavelengthIn,pixelInput,wavelengthOut,fwhm, 
interpolationType, pixelOutput, verbose);
+  assert(pixelOutput.size()==wavelengthOut.size());
   for(int iband=0;iband &taps);
   virtual ~Filter(){};
+  FILTER_TYPE getFilterType(const std::string filterType){
+std::map m_filterMap;
+initMap(m_filterMap);
+return m_filterMap[filterType];
+  };
   void setTaps(const vector &taps);
   void pushClass(short theClass=1){m_class.push_back(theClass);};
   void pushMask(short theMask=0){m_mask.push_back(theMask);};
   template void doit(const vector& input, vector& output, int 
down=1, int offset=0);
   template void doit(T* input, int inputSize, vector& output, int 
down=1, int offset=0);
-  template void morphology(const vector& input, vector& output, 
int method, int dim, short down=1, int offset=0, bool verbose=0);
-  void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, int 
method, int dim, short down=1, int offset=0);
+  template void morphology(const vector& input, vector& output, 
const std::string& method, int dim, short down=1, int offset=0, bool verbose=0);
+  void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const 
std::string& method, int dim, short down=1, int offset=0);
   void doit(const ImgReaderGdal& input, ImgWriterGdal& output, short down=1, 
int offset=0);
 
   template void applySrf(const Vector2d& input, const 
Vector2d& srf, Vector2d& output, double delta=1, bool 
normalize=false, double centreWavelength=0, bool verbose=false);
-  template void applyFwhm(const vector& input, const 
vector &wavelengthIn, vector& output, const vector 
&wavelengthOut, const vector &fwhm, bool verbose=false);
-  void applyFwhm(const ImgReaderGdal& input, ImgWriterGdal& output, const 
vector &wavelengthIn, const vector &wavelengthOut, const 
vector &fwhm, bool verbose=false);
+  template void applyFwhm(const vector &wavelengthIn, const 
vector& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, vector& 
output, bool verbose=false);
+  void applyFwhm(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector &wavelengthOut, const vector &fwhm, const 
std::string& interpolationType, ImgWriterGdal& output, bool verbos

[pktools] 83/375: wrong throw case in FileReaderAscii.h

2014-12-03 Thread Bas Couwenberg
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 72cb03719dedb9615a9fe95cceb82db9655ffcc9
Author: Pieter Kempeneers 
Date:   Wed Mar 27 18:15:16 2013 +0100

wrong throw case in FileReaderAscii.h
---
 src/fileclasses/FileReaderAscii.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fileclasses/FileReaderAscii.h 
b/src/fileclasses/FileReaderAscii.h
index c21a270..5dcd430 100644
--- a/src/fileclasses/FileReaderAscii.h
+++ b/src/fileclasses/FileReaderAscii.h
@@ -100,7 +100,7 @@ template unsigned int 
FileReaderAscii::readData(std::vector &dataVec
 }
 if(verbose)
   std::cout << std::endl;
-if(dataVector.size()&&ncol>=col){
+if(dataVector.size()&&ncol<=col){
   std::ostringstream ess;
   ess << "Error: different number of cols found in line " << nrow << " 
(" << ncol << ")" << std::endl;
   throw(ess.str());
@@ -155,7 +155,7 @@ template unsigned int 
FileReaderAscii::readData(std::vector &dataVec
   std::cout << std::endl;
 if(verbose)
   std::cout << "number of columns: " << ncol << std::endl;
-if(dataVector.size()&&ncol>=col){
+if(dataVector.size()&&ncol<=col){
   std::ostringstream ess;
   ess << "Error: different number of cols found in line " << nrow << " 
(" << ncol << ")" << std::endl;
   throw(ess.str());

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


[pktools] 84/375: call by reference in applySrf

2014-12-03 Thread Bas Couwenberg
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 aaceeb07023620ba1c81613e9bb97725976f1331
Author: Pieter Kempeneers 
Date:   Thu Mar 28 15:12:56 2013 +0100

call by reference in applySrf
---
 src/algorithms/Filter.h| 10 ++
 src/fileclasses/FileReaderAscii.cc | 28 
 src/fileclasses/FileReaderAscii.h  |  4 ++--
 3 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index d072c29..02afce4 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -55,11 +55,11 @@ public:
   void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const 
std::string& method, int dim, short down=1, int offset=0);
   void doit(const ImgReaderGdal& input, ImgWriterGdal& output, short down=1, 
int offset=0);
 
-  template double applySrf(const vector &wavelengthIn, const 
vector& input, const Vector2d& srf, const std::string& 
interpolationType, T output, double delta=1.0, bool normalize=false, bool 
verbose=false);
+  template double applySrf(const vector &wavelengthIn, const 
vector& input, const Vector2d& srf, const std::string& 
interpolationType, T& output, double delta=1.0, bool normalize=false, bool 
verbose=false);
   template double applySrf(const vector &wavelengthIn, const 
Vector2d& input, const Vector2d& srf, const std::string& 
interpolationType, vector& output, double delta=1.0, bool normalize=false, 
int down=1, bool verbose=false);
 
   // void applySrf(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector< Vector2d > &srf, const std::string& 
interpolationType, ImgWriterGdal& output, bool verbose=false);
-  template void applyFwhm(const vector &wavelengthIn, const 
vector& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, vector& 
output, bool verbose=false);
+  template void applyFwhm(const vector &wavelengthIn, const 
vector& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, vector& output, bool 
verbose=false);
   template void applyFwhm(const vector &wavelengthIn, const 
Vector2d& input, const vector &wavelengthOut, const vector 
&fwhm, const std::string& interpolationType, Vector2d& output, int down=1, 
bool verbose=false);
   // void applyFwhm(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector &wavelengthOut, const vector &fwhm, const 
std::string& interpolationType, ImgWriterGdal& output, bool verbose=false);
 // int fir(double* input, int nbandIn, vector& output, int startBand, 
const string& wavelength, const string& fwhm, bool verbose);
@@ -104,7 +104,7 @@ private:
 
 //input[band], output
 //returns wavelength for which srf is maximum
-  template double Filter::applySrf(const vector 
&wavelengthIn, const vector& input, const Vector2d& srf, const 
std::string& interpolationType, T output, double delta, bool normalize, bool 
verbose)
+  template double Filter::applySrf(const vector 
&wavelengthIn, const vector& input, const Vector2d& srf, const 
std::string& interpolationType, T& output, double delta, bool normalize, bool 
verbose)
 {  
   assert(srf.size()==2);//[0]: wavelength, [1]: response function
   int nband=srf[0].size(); 
@@ -155,6 +155,8 @@ private:
   vector product(wavelength_fine.size());
   
stat.interpolateUp(wavelengthIn,input,wavelength_fine,interpolationType,input_fine,verbose);
 
+  if(verbose)
+std::cout << "input_fine.size(): " << input_fine.size() << std::endl;
   for(int iband=0;iband void Filter::applyFwhm(const vector &wavelengthIn, 
const vector& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, vector& 
output, bool verbose){
+template void Filter::applyFwhm(const vector &wavelengthIn, 
const vector& input, const vector &wavelengthOut, const 
vector &fwhm, const std::string& interpolationType, vector& output, 
bool verbose){
   double delta=1;//1 nm resolution
   vector stddev(fwhm.size());
   for(int index=0;index' '&&m_fs<='~'){//field separator is a regular character (minimum 
ASCII code is space, maximum ASCII code is tilde)
@@ -67,7 +66,7 @@ unsigned int FileReaderAscii::nrOfCol(bool checkCols){
 while(getline(m_ifstream,csvRecord)){//read a line
   std::istringstream csvstream(csvRecord);
   std::string item;
-  int ncol=0;
+  unsigned int ncol=0;
   bool isComment=false;
   while(getline(csvstream,item,m_fs)){//read a column
 if(verbose)
@@ -87,8 +86,10 @@ unsigned int FileReaderAscii::nrOfCol(bool checkCols){
   break;
   }
   if(verbose)
-std::cout << std::endl;
-  if(checkCols){
+std::cout << std::endl << "number of columns: " << ncol << std::endl;
+  if(!totalCol)
+totalCol=ncol;
+  else if(checkCols){
 if(totalCol!=ncol){
   std::ostringstream ess;

[pktools] 82/375: moved non templated functions to newly created FileReaderAscii.c and added new functionality

2014-12-03 Thread Bas Couwenberg
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 dff34103206566687be8d406871fa68f70f4fce8
Author: Pieter Kempeneers 
Date:   Wed Mar 27 18:07:08 2013 +0100

moved non templated functions to newly created FileReaderAscii.c and added 
new functionality
---
 Makefile.in| 777 -
 aclocal.m4 |  82 ++--
 src/apps/Makefile.am   |   8 +-
 src/fileclasses/FileReaderAscii.cc | 237 +++
 src/fileclasses/FileReaderAscii.h  | 119 +++---
 src/fileclasses/Makefile.am|  18 +-
 src/models/Makefile.am |   4 +-
 7 files changed, 332 insertions(+), 913 deletions(-)

diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 65dbdee..000
--- a/Makefile.in
+++ /dev/null
@@ -1,777 +0,0 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-   $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-   $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-   config.guess config.sub depcomp install-sh ltmain.sh missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_lib_gdal.m4 \
-   $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-   $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-   $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-   $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-   html-recursive info-recursive install-data-recursive \
-   install-dvi-recursive install-exec-recursive \
-   install-html-recursive install-info-recursive \
-   install-pdf-recursive install-ps-recursive install-recursive \
-   installcheck-recursive installdirs-recursive pdf-recursive \
-   ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-   $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-   distdir dist dist-all distcheck
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  if test -d "$(distdir)"; then \
-find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-  && rm -rf "$(distdir)" \
-  || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-if test "$$first" != "."; then \
-  if test "$$first" = ".."; then \
-dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-  else \
-first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-if test "$$first2" = "$$first"; then \
-  dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-else \
-  dir2="../$$dir2"; \
-fi; \
-dir0="$$dir0"/"$$first"; \
-  fi; \
-fi; \
-

[pktools] 87/375: Filter.h: changed boundary for applyFwhm

2014-12-03 Thread Bas Couwenberg
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 d99010f301e4beecb6c6782e936e58c5a18fac5c
Author: Pieter Kempeneers 
Date:   Wed Apr 10 12:01:28 2013 +0200

Filter.h: changed boundary for applyFwhm
---
 src/algorithms/Filter.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index 02afce4..9d2eb9d 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -274,8 +274,8 @@ template void Filter::applyFwhm(const 
vector &wavelengthIn, con
 
stddev[index]=fwhm[index]/2.0/sqrt(2*log(2.0));//http://mathworld.wolfram.com/FullWidthatHalfMaximum.html
   assert(wavelengthOut.size()==fwhm.size());
   assert(wavelengthIn.size()==input.size());
-  assert(wavelengthIn[0]wavelengthOut.back());
+  assert(wavelengthIn[0]<=wavelengthOut[0]);
+  assert(wavelengthIn.back()>=wavelengthOut.back());
   statfactory::StatFactory stat;
   vector input_fine;
   vector wavelength_fine;

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


[pktools] 89/375: FileReaderAscii.h: support scale and offset in readData

2014-12-03 Thread Bas Couwenberg
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 75f3769ae2688f1053adcbac794d2ebd13553b5f
Author: Pieter Kempeneers 
Date:   Thu Apr 18 11:33:30 2013 +0200

FileReaderAscii.h: support scale and offset in readData
---
 src/fileclasses/FileReaderAscii.h | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/fileclasses/FileReaderAscii.h 
b/src/fileclasses/FileReaderAscii.h
index feab76c..11edf02 100644
--- a/src/fileclasses/FileReaderAscii.h
+++ b/src/fileclasses/FileReaderAscii.h
@@ -42,8 +42,8 @@ public:
   void setComment(char comment){m_comment=comment;};
   unsigned int nrOfCol(bool checkCols=false, bool verbose=false);
   unsigned int nrOfRow(bool checkCols=false, bool verbose=false);
-  template unsigned int readData(std::vector > 
&dataVector, const std::vector &cols, bool verbose=false);
-  template unsigned int readData(std::vector &dataVector, int col, 
bool verbose=false);
+  template unsigned int readData(std::vector > 
&dataVector, const std::vector &cols, double scale=1.0, double offset=0.0, 
bool verbose=false);
+  template unsigned int readData(std::vector &dataVector, int col, 
double scale=1.0, double offset=0, bool verbose=false);
   protected:
   std::string m_filename;
   std::ifstream m_ifstream;
@@ -55,7 +55,7 @@ public:
   int m_maxRow;
 };
 
-template unsigned int FileReaderAscii::readData(std::vector 
&dataVector, int col, bool verbose){
+template unsigned int FileReaderAscii::readData(std::vector 
&dataVector, int col, double scale, double offset, bool verbose){
   reset();
   dataVector.clear();
   int nrow=0;
@@ -90,7 +90,7 @@ template unsigned int 
FileReaderAscii::readData(std::vector &dataVec
 isComment=true;
   }
   if(ncol==col){
-T value=string2type(item);
+T value=scale*string2type(item)+offset;
 if((value>=m_min&&value<=m_max)||m_max<=m_min)
   dataVector.push_back(value);
   }
@@ -142,7 +142,8 @@ template unsigned int 
FileReaderAscii::readData(std::vector &dataVec
   std::cout << "comment found, string is " << item << std::endl;
 isComment=true;
   }
-  T value=string2type(item);
+  T value=scale*string2type(item)+offset;
+  // T value=string2type(item);
   if(ncol==col){
 if((value>=m_min&&value<=m_max)||m_max<=m_min)
   dataVector.push_back(value);
@@ -167,7 +168,7 @@ template unsigned int 
FileReaderAscii::readData(std::vector &dataVec
   return dataVector.size();
 }
 
-template unsigned int 
FileReaderAscii::readData(std::vector > &dataVector, const 
std::vector &cols, bool verbose){
+template unsigned int 
FileReaderAscii::readData(std::vector > &dataVector, const 
std::vector &cols, double scale, double offset, bool verbose){
   reset();
   dataVector.clear();
   dataVector.resize(cols.size());
@@ -204,7 +205,8 @@ template unsigned int 
FileReaderAscii::readData(std::vector(item);
+  T value=scale*string2type(item)+offset;
+  // T value=string2type(item);
   if((value>=m_min&&value<=m_max)||m_max<=m_min)
 dataVector[icol].push_back(value);
 }
@@ -254,7 +256,8 @@ template unsigned int 
FileReaderAscii::readData(std::vector(item);
+  T value=scale*string2type(item)+offset;
+  // T value=string2type(item);
   for(int icol=0;icol=m_min&&value<=m_max)||m_max<=m_min)

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


[pktools] 95/375: added examples and faqs for apps

2014-12-03 Thread Bas Couwenberg
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 8f3133045b01ba1ad5185adc518109f748fdab97
Author: Pieter Kempeneers 
Date:   Wed Apr 24 11:10:26 2013 +0200

added examples and faqs for apps
---
 doc/examples_pkcreatect.dox | 22 ++
 doc/examples_pkcrop.dox | 31 +++
 doc/examples_pkdumpogr.dox  | 15 +++
 doc/examples_pkextract.dox  | 37 +
 doc/examples_pkfilter.dox   | 10 ++
 doc/examples_pkgetmask.dox  | 11 +++
 doc/examples_pkmosaic.dox   | 26 ++
 doc/examples_pkndvi.dox |  5 +
 doc/examples_pkreclass.dox  | 18 ++
 doc/examples_pksetmask.dox  | 26 ++
 doc/examples_pksieve.dox|  5 +
 doc/examples_pkstat.dox | 16 
 doc/examples_pkstatogr.dox  | 12 
 doc/faq_pkmosaic.dox| 29 +
 src/apps/pkextract.cc   |  2 +-
 15 files changed, 264 insertions(+), 1 deletion(-)

diff --git a/doc/examples_pkcreatect.dox b/doc/examples_pkcreatect.dox
new file mode 100644
index 000..4206533
--- /dev/null
+++ b/doc/examples_pkcreatect.dox
@@ -0,0 +1,22 @@
+\section examples_pkcreatect Examples of pkcreatect
+\code
+pkcreatect -i image.tif -o image_ct.tif -min 0 -max 50
+\endcode
+attach color table to image with values between 0 and 50
+
+
+\code
+pkcreatect -i image.tif -o image_ct.tif -min 0 -max 100 -l legend.tif -g
+\endcode
+attach grey scale "color" table to image with values between 0 and 100 and 
create a legend image (annotation needs to be drawn manually)
+
+\code
+pkcreatect -i image.tif -o image_ct.tif -ct colourtable.txt
+\endcode
+attach predefined color table to image
+
+\code
+pkcreatect -i image.tif -o image_noct.tif -ct none
+\endcode
+remove color table from image 
+  
diff --git a/doc/examples_pkcrop.dox b/doc/examples_pkcrop.dox
new file mode 100644
index 000..2e94a0f
--- /dev/null
+++ b/doc/examples_pkcrop.dox
@@ -0,0 +1,31 @@
+\section examples_pkcrop Examples of pkcrop
+\code
+pkcrop -i input.tif -ulx 100 -uly 1000 -lrx 600 -lry 100 -o output.tif
+\endcode
+crop image.tif to the given bounding box
+
+\code
+pkcrop -i input.tif -e polygon.shp -o output.tif
+gdal_rasterize -i -burn 0 -l extent extent.shp output.tif
+\endcode
+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
+\endcode
+extract bands 3,2,1 (starting from 0) in that order from multi-band raster 
image input.tif
+
+\code
+pkcrop -i fimage.tif -s 100 -ot Byte -o bimage.tif -ct colortable.txt
+\endcode
+scale raster floating point image fimage.tif with factor 100 and write as 
single byte image with the given colourtable (for auto scaling, see next 
example)
+
+\code
+pkcrop -i fimage.tif -as 0 -as 100 -ot Byte -o bimage.tif -ct colortable.txt
+\endcode
+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
+\endcode
+crop raster image large.tif to the bounding box of raster image small.tif   
diff --git a/doc/examples_pkdumpogr.dox b/doc/examples_pkdumpogr.dox
new file mode 100644
index 000..cf61c3c
--- /dev/null
+++ b/doc/examples_pkdumpogr.dox
@@ -0,0 +1,15 @@
+\section examples_pkdumpogr Examples of pkdumpogr
+\code
+pkdumpogr -i input.shp
+\endcode
+dump entire content of vector file to standard output
+
+\code
+pkdumpogr -i input.shp -o output.txt -n ATTRIBUTE -pos
+\endcode
+dump only ATTRIBUTE of vector file including x and y position and output to 
ASCII file
+
+\code
+pkdumpogr -i input.shp -o output.txt -n ATTRIBUTE1 -n ATTRIBUTE2 -t
+\endcode
+dump the two attributes ATTRIBUTE1 and ATTRIBUTE2 of vector file and transpose 
output 
diff --git a/doc/examples_pkextract.dox b/doc/examples_pkextract.dox
new file mode 100644
index 000..9e3b3b0
--- /dev/null
+++ b/doc/examples_pkextract.dox
@@ -0,0 +1,37 @@
+\section examples_pkextract Examples of pkextract
+\code
+pkextract -i input.tif -s points.shp -o extracted.shp
+\endcode
+extract all bands from input.tif to extracted.shp at pixel locations defined 
in points.shp.
+
+\code
+pkextract -i input.tif -s points.shp -o extracted.shp -m mask.tif -f 255
+\endcode
+extract all bands from input.tif to extracted.shp at pixel locations defined 
in points.shp that have not a value 255 in mask.tif
+
+\code
+pkextract -i input.tif -s locations.shp -o training.shp -c -1
+\endcode
+extract all classes (classes must have value different from 0) in input image 
input.tif to extracted.shp at pixel locations defined in points.shp
+
+\code
+pkextract -i input.tif -s polygons.shp -o extracted.shp -l -b 0
+\endcode
+extract band 0 from input.tif to polygon vector file extracted.s

[pktools] 93/375: pkclassify_nn and pkfs_nn adapted for classvaluemap and independent test set similar to svm

2014-12-03 Thread Bas Couwenberg
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 0e30c6c738b64eca3660c6ae7ef5538f9523bdc8
Author: Pieter Kempeneers 
Date:   Tue Apr 23 16:23:52 2013 +0200

pkclassify_nn and pkfs_nn adapted for classvaluemap and independent test 
set similar to svm
---
 src/algorithms/myfann_cpp.h |   2 +-
 src/apps/Makefile.am|   2 +-
 src/apps/pkclassify_nn.cc   | 608 +++-
 src/apps/pkclassify_nn.h| 158 +---
 src/apps/pkclassify_svm.cc  | 157 +---
 src/apps/pkfs_nn.cc | 314 +--
 src/apps/pkfs_svm.cc|  29 +--
 7 files changed, 522 insertions(+), 748 deletions(-)

diff --git a/src/algorithms/myfann_cpp.h b/src/algorithms/myfann_cpp.h
index 4901cfa..d86958f 100644
--- a/src/algorithms/myfann_cpp.h
+++ b/src/algorithms/myfann_cpp.h
@@ -1585,7 +1585,7 @@ public:
 //search class with maximum posterior probability
 float maxP=-1;
 for(int ic=0;icmaxP){
 maxP=pv;
 maxClass=ic;
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index e54f3bb..73103f0 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -44,7 +44,7 @@ pkcreatect_SOURCES = pkcreatect.cc
 pkdumpimg_SOURCES = pkdumpimg.cc
 pkdumpogr_SOURCES = pkdumpogr.h pkdumpogr.cc
 pksieve_SOURCES = pksieve.cc
-pkstat_SOURCES = $(top_srcdir)/src/algorithms/Histogram.h pkstat.cc
+pkstat_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h pkstat.cc
 pkstat_LDADD = -llas $(GSL_LIBS) $(AM_LDFLAGS)
 pkstatogr_SOURCES = pkstatogr.cc
 pkegcs_SOURCES = pkegcs.cc
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index 70433f5..f59d2a5 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -26,67 +26,19 @@ along with pktools.  If not, see 
.
 #include "imageclasses/ImgReaderOgr.h"
 #include "imageclasses/ImgWriterOgr.h"
 #include "base/Optionpk.h"
+#include "base/PosValue.h"
 #include "algorithms/ConfusionMatrix.h"
 #include "floatfann.h"
 #include "myfann_cpp.h"
 
-void reclass(const vector& result, const vector& vreclass, const 
vector& priors, unsigned short aggregation, vector& 
theResultReclass);
-
-void reclass(const vector& result, const vector& vreclass, const 
vector& priors, unsigned short aggregation, vector& 
theResultReclass){
-  unsigned int nclass=result.size();
-  assert(priors.size()==nclass);
-  assert(theResultReclass.size()>1);//must have size nreclass!
-  unsigned int nreclass=theResultReclass.size();
-  vector pValues(nclass);
-  float normReclass=0;
-  for(int iclass=0;iclass=0);
-assert(pv<=1);
-pv*=priors[iclass];
-pValues[iclass]=pv;
-  }
-  for(int iclass=0;iclassmaxPaggreg){
-   maxPaggreg=pValues[ic];
-   theResultReclass[iclass]=maxPaggreg;
- }
-   break;
-   }
-  }
-}
-normReclass+=theResultReclass[iclass];
-  }
-  for(int iclass=0;iclass reclassMap;
-  vector vreclass;
   vector priors;
-  vector priorsReclass;
   
   //--- command line options 

   Optionpk input_opt("i", "input", "input image"); 
   Optionpk training_opt("t", "training", "training shape file. A 
single shape file contains all training features (must be set as: B0, B1, 
B2,...) for all classes (class numbers identified by label option). Use 
multiple training files for bootstrap aggregation (alternative to the bag and 
bsize options, where a random subset is taken from a single training file)"); 
   Optionpk label_opt("label", "label", "identifier for class label in 
training shape file.","label"); 
-  Optionpk reclass_opt("rc", "rc", "reclass code (e.g. --rc=12 
--rc=23 to reclass first two classes to 12 and 23 resp.)");
   Optionpk balance_opt("bal", "balance", "balance the input data 
to this number of samples for each class", 0);
   Optionpk minSize_opt("min", "min", "if number of training pixels is 
less then min, do not take this class into account (0: consider all classes)", 
0);
   Optionpk start_opt("s", "start", "start band sequence number (set to 
0)",0); 
@@ -96,6 +48,7 @@ int main(int argc, char *argv[])
   Optionpk scale_opt("\0", "scale", "scale value for each spectral 
band input features: refl=(DN[band]-offset[band])/scale[band] (use 0 if scale 
min and max in each band to -1.0 and 1.0)", 0.0);
   Optionpk aggreg_opt("a", "aggreg", "how to combine 
aggregated classifiers, see also rc option (1: sum rule, 2: max rule).",1);
   Optionpk priors_opt("p", "prior", "prior probabilities for each 
class (e.g., -p 0.3 -p 0.3 -p 0.2 )", 0.0); 
+  Optionpk priorimg_opt("pim", "priorimg", "prior probability image 
(multi-band img with band for each class"); 
   Optionpk cv_opt("cv", "cv", "n-fold cross validation 
mode",0);
   Optionpk nneuron_opt("\0", "nneuron", "number of neurons in 
hidde

[pktools] 96/375: corrected pksensormodel.cc: include SensorModel.h in models and not in algorithms

2014-12-03 Thread Bas Couwenberg
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 697d4edfb76e7faaecac3ad6d7ffadface40cbd2
Author: Pieter Kempeneers 
Date:   Thu Apr 25 15:20:50 2013 +0200

corrected pksensormodel.cc: include SensorModel.h in models and not in 
algorithms
---
 doc/mainpage.dox | 1 +
 src/apps/Makefile.am | 3 ++-
 src/apps/pksensormodel.h | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index ef459d4..43607a9 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -59,6 +59,7 @@ Prerequisites (required)
 packages to install before pktool
- libgdal-dev http://trac.osgeo.org/gdal/wiki/BuildingOnUnix (or via 
repository)
- libgsl0-dev http://www.gnu.org/software/gsl/ (or via repository)
+   - gslwrap http://sourceforge.net/projects/gslwrap/ (will be replaced with 
Armadillo eventually...)
 
 Prerequisites (optional)
 
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index 73103f0..b64c749 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -45,7 +45,8 @@ pkdumpimg_SOURCES = pkdumpimg.cc
 pkdumpogr_SOURCES = pkdumpogr.h pkdumpogr.cc
 pksieve_SOURCES = pksieve.cc
 pkstat_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h pkstat.cc
-pkstat_LDADD = -llas $(GSL_LIBS) $(AM_LDFLAGS)
+pkstat_LDADD = $(GSL_LIBS) $(AM_LDFLAGS)
+#pkstat_LDADD = -llas $(GSL_LIBS) $(AM_LDFLAGS)
 pkstatogr_SOURCES = pkstatogr.cc
 pkegcs_SOURCES = pkegcs.cc
 pkegcs_LDADD = -lgdal $(AM_LDFLAGS) -lgdal
diff --git a/src/apps/pksensormodel.h b/src/apps/pksensormodel.h
index a9d7e8c..fd13ecb 100644
--- a/src/apps/pksensormodel.h
+++ b/src/apps/pksensormodel.h
@@ -21,7 +21,7 @@ along with pktools.  If not, see 
.
 #define _PKSENSORMODEL_H_
 #include 
 #include 
-#include "algorithms/SensorModel.h"
+#include "models/SensorModel.h"
 
 double objFunction(const std::vector &x, std::vector &grad, 
void *my_func_data);
 

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


[pktools] 94/375: added Savannah to mainpage.dox

2014-12-03 Thread Bas Couwenberg
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 a202e86d854b1db7a6908c7cbe9825cf56c28bdd
Author: Pieter Kempeneers 
Date:   Wed Apr 24 09:56:01 2013 +0200

added Savannah to mainpage.dox
---
 doc/mainpage.dox | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 7f8728b..ef459d4 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -27,7 +27,7 @@ See http://www.gnu.org/licenses for more details
 
 \section pktools_download Download
 
-You can download the latest release
+You can download the latest release from Savannah 
https://savannah.nongnu.org/projects/pktools
 - from http://download.savannah.gnu.org/releases/pktools/ (tar ball)
 - or by getting a copy of the Git repository
 

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


[pktools] 85/375: adapted mrf in Vector2.cc after personal communication with Guy Thoonen

2014-12-03 Thread Bas Couwenberg
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 2d275ae53e58dc847f3108dced6b270db75779eb
Author: Pieter Kempeneers 
Date:   Wed Apr 3 14:27:27 2013 +0200

adapted mrf in Vector2.cc after personal communication with Guy Thoonen
---
 src/algorithms/Filter2d.cc | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/algorithms/Filter2d.cc b/src/algorithms/Filter2d.cc
index 3ed1033..fd4ceec 100644
--- a/src/algorithms/Filter2d.cc
+++ b/src/algorithms/Filter2d.cc
@@ -789,6 +789,7 @@ void filter2d::Filter2d::mrf(const ImgReaderGdal& input, 
ImgWriterGdal& output,
 }
   }
   if(!masked){
+// if(inBuffer[dimY/2][x]//centre pixel
 for(int iclass=0;iclasshttp://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[pktools] 101/375: Changelog update

2014-12-03 Thread Bas Couwenberg
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 32d361f5bb943a5558e784d1e970b947cfe0a6ad
Author: Pieter Kempeneers 
Date:   Mon May 6 14:05:54 2013 +0200

Changelog update
---
 ChangeLog   | 2 ++
 doc/examples_pkcrop.dox | 2 +-
 doc/mainpage.dox| 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0c280e0..0aa47e8 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,8 @@ version 2.4
bug solved in update of progress bar
support of standard deviation
default empty classes
+   bug solved in down option: spatial resolution was not stored properly
+   directional morphological filtering now supports multiple angles
  - pkgetmask
options min and max are now set with -min (--min) and -max (--max)
  - pkstatogr
diff --git a/doc/examples_pkcrop.dox b/doc/examples_pkcrop.dox
index 2e94a0f..b44a059 100644
--- a/doc/examples_pkcrop.dox
+++ b/doc/examples_pkcrop.dox
@@ -5,7 +5,7 @@ pkcrop -i input.tif -ulx 100 -uly 1000 -lrx 600 -lry 100 -o 
output.tif
 crop image.tif to the given bounding box
 
 \code
-pkcrop -i input.tif -e polygon.shp -o output.tif
+pkcrop -i input.tif -e extent.shp -o output.tif
 gdal_rasterize -i -burn 0 -l extent extent.shp output.tif
 \endcode
 crop image.tif to the envelop of the given polygon and mask all pixels outside 
polygon as 0 (using gdal_rasterize)
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 43607a9..fd6c2ac 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -59,7 +59,7 @@ Prerequisites (required)
 packages to install before pktool
- libgdal-dev http://trac.osgeo.org/gdal/wiki/BuildingOnUnix (or via 
repository)
- libgsl0-dev http://www.gnu.org/software/gsl/ (or via repository)
-   - gslwrap http://sourceforge.net/projects/gslwrap/ (will be replaced with 
Armadillo eventually...)
+   - libarmadillo-dev (http://arma.sourceforge.net/download.html or via 
repository)
 
 Prerequisites (optional)
 

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


[pktools] 99/375: removed dependency of gslwrap: replaced gslwrap with armadillo in SensorModel.h and pksensormodel, replaced gslwrap with stl::vector and Vector2d

2014-12-03 Thread Bas Couwenberg
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 8e25ca92a1e4f2751965103729316bd7ae94ab9a
Author: Pieter Kempeneers 
Date:   Thu Apr 25 17:38:35 2013 +0200

removed dependency of gslwrap: replaced gslwrap with armadillo in 
SensorModel.h and pksensormodel, replaced gslwrap with stl::vector and Vector2d
---
 src/algorithms/Filter.h|  34 ++
 src/algorithms/Makefile.am |   2 +-
 src/apps/Makefile.am   |   5 +-
 src/apps/pksensormodel.cc  | 182 +--
 src/apps/pksensormodel.h   |  25 ++--
 src/models/SensorModel.h   | 298 ++---
 6 files changed, 265 insertions(+), 281 deletions(-)

diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index 9d2eb9d..3da2601 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -22,9 +22,6 @@ along with pktools.  If not, see 
.
 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include "StatFactory.h"
 #include "imageclasses/ImgReaderGdal.h"
 #include "imageclasses/ImgWriterGdal.h"
@@ -120,9 +117,6 @@ private:
   gsl_spline *spline;
   stat.getSpline(interpolationType,nband,spline);
   stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
-  // gsl_interp_accel *acc=gsl_interp_accel_alloc();
-  // gsl_spline *spline=gsl_spline_alloc(gsl_interp_linear,nband);
-  // gsl_spline_init(spline,&(srf[0][0]),&(srf[1][0]),nband);
   if(verbose)
 std::cout << "calculating norm of srf" << std::endl << std::flush;
   double norm=0;
@@ -201,9 +195,6 @@ private:
   gsl_spline *spline;
   stat.getSpline(interpolationType,nband,spline);
   stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
-  // gsl_interp_accel *acc=gsl_interp_accel_alloc();
-  // gsl_spline *spline=gsl_spline_alloc(gsl_interp_linear,nband);
-  // gsl_spline_init(spline,&(srf[0][0]),&(srf[1][0]),nband);
   if(verbose)
 std::cout << "calculating norm of srf" << std::endl << std::flush;
   double norm=0;
@@ -292,22 +283,23 @@ template void Filter::applyFwhm(const 
vector &wavelengthIn, con
 
   int nbandOut=wavelengthOut.size();
   output.resize(nbandOut);
-  gsl::matrix tf(nbandIn,nbandOut);
+  Vector2d tf(nbandIn,nbandOut);
   for(int indexOut=0;indexOut void Filter::applyFwhm(const 
vector &wavelengthIn, con
   int nbandOut=wavelengthOut.size();
   output.resize(nbandOut,(input[0].size()+down-1)/down);
 
-  gsl::matrix tf(nbandIn,nbandOut);
+  Vector2d tf(nbandIn,nbandOut);
   vector norm(nbandOut);
   for(int indexOut=0;indexOut void Filter::applyFwhm(const 
vector &wavelengthIn, con
   
stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose);
   output[indexOut][(isample+down-1)/down]=0;
   for(int indexIn=0;indexIn &x, 
std::vector &grad, void
   assert(grad.empty());
   double error=0;
   DataModel *dm=reinterpret_cast (my_func_data);
-  gsl::vector bc_att(3);
-  bc_att[0]=x[0];
-  bc_att[1]=x[1];
-  bc_att[2]=x[2];
+  arma::vec bc_att(3);
+  bc_att(0)=x[0];
+  bc_att(1)=x[1];
+  bc_att(2)=x[2];
   dm->setBoresightAtt(bc_att);
   for(unsigned int ipoint=0;ipointgetSize();++ipoint){
 double e=dm->getDistGeo(ipoint);
@@ -190,8 +190,8 @@ int main(int argc, char *argv[])
   theModel.setPPy(ppy_opt[0]);
   theModel.setPolynome(polynome_opt);
   theModel.setDatum(datum_opt[0]);
-  // gsl::vector bc_pos(3);
-  gsl::vector bc_att(3);
+  // arma::vec bc_pos(3);
+  arma::vec bc_att(3);
   // while(bcpos_opt.size()<3)
   //   bcpos_opt.push_back(bcpos_opt[0]);
   while(bcatt_opt.size()<3)
@@ -199,16 +199,16 @@ int main(int argc, char *argv[])
   if(bcrad_opt[0]){
 // bc_pos[0]=theModel.rad2deg(bcpos_opt[0]);
 // bc_pos[1]=theModel.rad2deg(bcpos_opt[1]);
-bc_att[0]=theModel.rad2deg(bcatt_opt[0]);
-bc_att[1]=theModel.rad2deg(bcatt_opt[1]);
-bc_att[2]=theModel.rad2deg(bcatt_opt[2]);
+bc_att(0)=theModel.rad2deg(bcatt_opt[0]);
+bc_att(1)=theModel.rad2deg(bcatt_opt[1]);
+bc_att(2)=theModel.rad2deg(bcatt_opt[2]);
   }
   else{
-// bc_pos[0]=bcpos_opt[0];
-// bc_pos[1]=bcpos_opt[1];
-bc_att[0]=bcatt_opt[0];
-bc_att[1]=bcatt_opt[1];
-bc_att[2]=bcatt_opt[2];
+// bc_pos(0)=bcpos_opt(0);
+// bc_pos(1)=bcpos_opt(1);
+bc_att(0)=bcatt_opt[0];
+bc_att(1)=bcatt_opt[1];
+bc_att(2)=bcatt_opt[2];
   }
   // bc_pos[2]=bcpos_opt[2];
   // theModel.setBoresightPos(bc_pos);
@@ -246,9 +246,9 @@ int main(int argc, char *argv[])
 istringstream csvstream(csvRecord);
 string item;
 int icol=0;//first column is id
-gsl::vector thePosGCP(3);
-gsl::vector thePosPlatform(3);
-gsl::vector theAttPlatform(3);
+arma::vec thePosGCP(3);
+arma::vec thePosPlatform(3);
+arma::vec theAttPlatform(3);
 while(getline(csvstream,item,fs_opt[0])){//read a column
   if(verbose_opt[0]>1)
 std:

[pktools] 102/375: some small corrections in Makefiles and defined static member variable in PointData.cc

2014-12-03 Thread Bas Couwenberg
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 c43a0b43a4c4fb9b82620bcbc8263fc473391e6c
Author: Pieter Kempeneers 
Date:   Wed May 8 10:21:09 2013 +0200

some small corrections in Makefiles and defined static member variable in 
PointData.cc
---
 src/algorithms/Makefile.am  |   1 -
 src/apps/Makefile.am|   9 +
 src/apps/pkeditogr.cc   |  27 +--
 src/apps/pkgetchandelier.cc |   6 --
 src/apps/pksetchandelier.cc |   5 -
 src/base/Makefile.am|  12 ++--
 src/base/Optionpk.h |   9 +
 src/base/PointData.cc   |   6 ++
 src/fileclasses/Makefile.am |   2 +-
 src/models/libprospect.a| Bin 119824 -> 0 bytes
 10 files changed, 48 insertions(+), 29 deletions(-)

diff --git a/src/algorithms/Makefile.am b/src/algorithms/Makefile.am
index b3f9028..1fb3917 100644
--- a/src/algorithms/Makefile.am
+++ b/src/algorithms/Makefile.am
@@ -13,7 +13,6 @@ AM_CXXFLAGS = -I$(top_srcdir)/src $(GDAL_CFLAGS) @AM_CXXFLAGS@
 # THE LIBRARIES TO BUILD
 ###
 
-# the library names to build (note we are building static libs only)
 #noinst_LIBRARIES = libalgorithms.a
 lib_LTLIBRARIES = libalgorithms.la
 
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index f80400e..f717c7e 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -1,7 +1,7 @@
 AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(GDAL_CFLAGS) 
@AM_CXXFLAGS@
-AM_LDFLAGS = $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la @AM_LDFLAGS@
+AM_LDFLAGS = $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la 
$(top_builddir)/src/base/libbase.la @AM_LDFLAGS@
 #LDADD = $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/models/libmodels.la 
$(top_builddir)/src/models/libprospect.la 
$(top_builddir)/src/imageclasses/libimageClasses.la
-LDADD = $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/models/libmodels.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la
+LDADD = $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.la 
$(top_builddir)/src/models/libmodels.la 
$(top_builddir)/src/imageclasses/libimageClasses.la 
$(top_builddir)/src/fileclasses/libfileClasses.la 
$(top_builddir)/src/base/libbase.la
 ###
 # THE PROGRAMS TO BUILD
 ###
@@ -29,9 +29,9 @@ pklas2img_LDADD = -llas $(AM_LDFLAGS)
 endif
 if USE_NLOPT
 bin_PROGRAMS += pksensormodel pkopt_svm
-pksensormodel_LDFLAGS = -O1
+#pksensormodel_LDFLAGS = -O1
 pksensormodel_SOURCES = $(top_srcdir)/src/models/SensorModel.h pksensormodel.h 
pksensormodel.cc
-pksensormodel_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt -lm -larmadillo 
#-lgslwrap
+pksensormodel_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt -lm -larmadillo
 pkopt_svm_SOURCES = $(top_srcdir)/src/algorithms/OptFactory.h pkclassify_nn.h 
pkopt_svm.cc
 pkopt_svm_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt
 endif
@@ -66,6 +66,7 @@ pkfs_svm_LDADD = $(GSL_LIBS) $(AM_LDFLAGS)
 pkascii2img_SOURCES = pkascii2img.cc
 pkascii2ogr_SOURCES = pkascii2ogr.cc
 pkeditogr_SOURCES = pkeditogr.cc
+pkeditogr_LDADD = $(AM_LDFLAGS)
 #pkxcorimg_SOURCES= pkxcorimg.cc
 #pkgeom_SOURCES = pkgeom.cc
 ###
diff --git a/src/apps/pkeditogr.cc b/src/apps/pkeditogr.cc
index f764d51..6e8f8a5 100644
--- a/src/apps/pkeditogr.cc
+++ b/src/apps/pkeditogr.cc
@@ -30,7 +30,8 @@ int main(int argc, char *argv[])
   Optionpk input_opt("i", "input", "Input image");
   Optionpk output_opt("o", "output", "Output mask file");
   Optionpk selectField_opt("select", "select", "select field (combined 
with like opt)");
-  Optionpk like_opt("like", "like", "substring(s) to be found in 
select field (if multiple substrings are provided, feature will be selected if 
one of them is found)");
+  Optionpk like_opt("like", "like", "substring(s) to be found in 
select field. If multiple substrings are provided, feature will be selected if 
one of them is found (default) or all of them are found (stringent option is 
set)");
+  Optionpk stringent_opt("st", "stringent", "all substring(s) in like 
option must be found in order to select feature)",false);
   Optionpk field_opt("f", "field", "output field names (number must 
exactly match input fields)");
   Optionpk setfeature_opt("sf", "sf", "id of feature(s) to set 
(start from 0)");
   Optionpk setname_opt("sn", "sn", 

[pktools] 104/375: comment in pkeditogr.cc how to change fields with ogr2ogr using -sql option

2014-12-03 Thread Bas Couwenberg
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 a9cdfaef4b42ac71d9c8e99938ed19568d157bfb
Author: Pieter Kempeneers 
Date:   Wed May 8 18:08:15 2013 +0200

comment in pkeditogr.cc how to change fields with ogr2ogr using -sql option
---
 src/apps/pkeditogr.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/apps/pkeditogr.cc b/src/apps/pkeditogr.cc
index 6e8f8a5..123139a 100644
--- a/src/apps/pkeditogr.cc
+++ b/src/apps/pkeditogr.cc
@@ -33,6 +33,8 @@ int main(int argc, char *argv[])
   Optionpk like_opt("like", "like", "substring(s) to be found in 
select field. If multiple substrings are provided, feature will be selected if 
one of them is found (default) or all of them are found (stringent option is 
set)");
   Optionpk stringent_opt("st", "stringent", "all substring(s) in like 
option must be found in order to select feature)",false);
   Optionpk field_opt("f", "field", "output field names (number must 
exactly match input fields)");
+  //renaming fields can also be done via ogr2ogr using the -sql option:
+  //ogr2ogr outdataset indataset -sql "SELECT src_field1 AS dst_field1, 
src_field2 AS dst_field2 FROM sourcelayer"
   Optionpk setfeature_opt("sf", "sf", "id of feature(s) to set 
(start from 0)");
   Optionpk setname_opt("sn", "sn", "name(s) of field(s) to set");
   Optionpk setvalue_opt("sv", "sv", "value(s) of field(s) to set");

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


[pktools] 110/375: configure.ac with conditional build for lasclasses

2014-12-03 Thread Bas Couwenberg
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 11faf156c320e915409e6ba25be2192ccbe05fa2
Author: Pieter Kempeneers 
Date:   Thu May 16 09:47:14 2013 +0200

configure.ac with conditional build for lasclasses
---
 configure.ac | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9b2b4cb..097286f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,16 +93,17 @@ AC_SUBST([LIBS])
 
 # files to generate via autotools (.am or .in source files)
 AC_CONFIG_HEADERS([config.h])
-AM_CONDITIONAL(USE_LAS, true)AM_COND_IF([USE_LAS],
-   [AC_CONFIG_FILES([src/lasclasses/Makefile])])
-AC_CONFIG_FILES([
-Makefile
-src/base/Makefile
-src/algorithms/Makefile
-src/imageclasses/Makefile
-src/fileclasses/Makefile
-src/apps/Makefile
-])
 
+AM_COND_IF([USE_LAS],
+   [AC_CONFIG_FILES([
+   src/lasclasses/Makefile])])
+AC_CONFIG_FILES([
+   Makefile
+   src/base/Makefile
+   src/algorithms/Makefile
+   src/imageclasses/Makefile
+   src/fileclasses/Makefile
+   src/apps/Makefile
+   ])
 # generate the final Makefile etc.
 AC_OUTPUT

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


[pktools] 118/375: added support for discrete wavelet transform in filters

2014-12-03 Thread Bas Couwenberg
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 f659640027f027ed00dec14753180ed478beb0e5
Author: Pieter Kempeneers 
Date:   Tue Jul 9 10:43:46 2013 +0200

added support for discrete wavelet transform in filters
---
 src/algorithms/Filter.cc  |  43 +---
 src/algorithms/Filter.h   |  25 -
 src/algorithms/Filter2d.cc|  19 +++
 src/algorithms/Filter2d.h | 106 +-
 src/apps/Makefile.am  |   4 +-
 src/apps/pkcrop.cc|   6 +--
 src/apps/pkextract.cc |  50 +-
 src/apps/pkfilter.cc  |  14 +
 src/apps/pkfilterascii.cc |  61 +++---
 src/apps/pkinfo.cc|  70 +
 src/imageclasses/ImgReaderGdal.cc |  39 ++
 src/imageclasses/ImgReaderGdal.h  |   1 +
 src/imageclasses/Makefile.am  |   4 +-
 13 files changed, 325 insertions(+), 117 deletions(-)

diff --git a/src/algorithms/Filter.cc b/src/algorithms/Filter.cc
index fc7cb2d..56d3bf0 100644
--- a/src/algorithms/Filter.cc
+++ b/src/algorithms/Filter.cc
@@ -19,6 +19,7 @@ along with pktools.  If not, see 
.
 ***/
 #include "Filter.h"
 #include 
+#include 
 #include 
 
 filter::Filter::Filter(void)
@@ -38,25 +39,31 @@ void filter::Filter::setTaps(const vector &taps)
   assert(m_taps.size()%2);
 }
 
-// void filter::Filter::dwtForward(std::vector& data, const 
std::string& wavelet_type, int family){
-//   int nsize=data.size();
-//   assert(nsize);
-//   gsl_wavelet *w;
-//   gsl_wavelet_workspace *work;
-//   w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
-//   work=gsl_wavelet_workspace_alloc(nsize);
-//   gsl_wavelet_transform_forward(w,&(data[0]),1,nsize,work);
-// }
+void filter::Filter::dwtForward(std::vector& data, const std::string& 
wavelet_type, int family){
+  //make sure data size if power of 2
+  while(data.size()&(data.size()-1))
+data.push_back(data.back());
+  int nsize=data.size();
+  gsl_wavelet *w;
+  gsl_wavelet_workspace *work;
+  assert(nsize);
+  w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
+  work=gsl_wavelet_workspace_alloc(nsize);
+  gsl_wavelet_transform_forward(w,&(data[0]),1,nsize,work);
+}
 
-// void filter::Filter::dwtInverse(std::vector& data, const 
std::string& wavelet_type, int family){
-//   int nsize=data.size();
-//   assert(nsize);
-//   gsl_wavelet *w;
-//   gsl_wavelet_workspace *work;
-//   w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
-//   work=gsl_wavelet_workspace_alloc(nsize);
-//   gsl_wavelet_transform_inverse(w,&(data[0]),1,nsize,work);
-// }
+void filter::Filter::dwtInverse(std::vector& data, const std::string& 
wavelet_type, int family){
+  //make sure data size if power of 2
+  while(data.size()&(data.size()-1))
+data.push_back(data.back());
+  int nsize=data.size();
+  assert(nsize);
+  gsl_wavelet *w;
+  gsl_wavelet_workspace *work;
+  w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
+  work=gsl_wavelet_workspace_alloc(nsize);
+  gsl_wavelet_transform_inverse(w,&(data[0]),1,nsize,work);
+}
 
 void filter::Filter::morphology(const ImgReaderGdal& input, ImgWriterGdal& 
output, const std::string& method, int dim, short down, int offset)
 {
diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index ef89a01..1b6d30e 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -31,7 +31,7 @@ using namespace std;
 namespace filter
 {
   
-  enum FILTER_TYPE { median=0, var=1 , min=2, max=3, sum=4, mean=5, minmax=6, 
dilate=7, erode=8, close=9, open=10, homog=11, sobelx=12, sobely=13, 
sobelxy=14, sobelyx=-14, smooth=15, density=16, majority=17, mixed=18, 
smoothnodata=19, threshold=20, ismin=21, ismax=22, heterog=23, order=24, 
stdev=25, dwtForward=26, dwtInverse=27};
+  enum FILTER_TYPE { median=0, var=1 , min=2, max=3, sum=4, mean=5, minmax=6, 
dilate=7, erode=8, close=9, open=10, homog=11, sobelx=12, sobely=13, 
sobelxy=14, sobelyx=-14, smooth=15, density=16, majority=17, mixed=18, 
smoothnodata=19, threshold=20, ismin=21, ismax=22, heterog=23, order=24, 
stdev=25, dwtForward=26, dwtInverse=27, dwtQuantize=28};
 
 class Filter
 {
@@ -40,9 +40,12 @@ public:
   Filter(const vector &taps);
   virtual ~Filter(){};
   static const gsl_wavelet_type* getWaveletType(const std::string waveletType){
-std::map m_waveletMap;
-initWaveletMap(m_waveletMap);
-return m_waveletMap[waveletType];
+if(waveletType=="daubechies") return(gsl_wavelet_daubechies);
+if(waveletType=="daubechies_centered") 
return(gsl_wavelet_daubechies_centered);
+if(waveletType=="haar") return(gsl_wavelet_haar);
+if(waveletType=="haar_centered") return(gsl_wavelet_haar_centered);
+if(waveletType=="bspline") return(gsl_wavelet_bs

[pktools] 117/375: added pkfilterascii.cc and pkregression_nn.cc

2014-12-03 Thread Bas Couwenberg
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 e0883887097346b390b293faf1abd86c533a7cf9
Author: Pieter Kempeneers 
Date:   Mon Jun 17 17:45:08 2013 +0200

added pkfilterascii.cc and pkregression_nn.cc
---
 src/algorithms/Filter.cc  |  20 +++
 src/algorithms/Filter.h   |  53 --
 src/algorithms/myfann_cpp.h   | 136 +--
 src/apps/Makefile.am  |  12 +-
 src/apps/pkclassify_nn.cc |   1 -
 src/apps/pkfilter.cc  |   4 +-
 src/apps/pkfilterascii.cc | 233 +
 src/apps/pkfs_nn.cc   |   1 -
 src/apps/pkregression_nn.cc   | 346 ++
 src/base/Vector2d.h   |   8 +
 src/fileclasses/FileReaderAscii.h |  40 +++--
 11 files changed, 806 insertions(+), 48 deletions(-)

diff --git a/src/algorithms/Filter.cc b/src/algorithms/Filter.cc
index 21009de..fc7cb2d 100644
--- a/src/algorithms/Filter.cc
+++ b/src/algorithms/Filter.cc
@@ -38,6 +38,26 @@ void filter::Filter::setTaps(const vector &taps)
   assert(m_taps.size()%2);
 }
 
+// void filter::Filter::dwtForward(std::vector& data, const 
std::string& wavelet_type, int family){
+//   int nsize=data.size();
+//   assert(nsize);
+//   gsl_wavelet *w;
+//   gsl_wavelet_workspace *work;
+//   w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
+//   work=gsl_wavelet_workspace_alloc(nsize);
+//   gsl_wavelet_transform_forward(w,&(data[0]),1,nsize,work);
+// }
+
+// void filter::Filter::dwtInverse(std::vector& data, const 
std::string& wavelet_type, int family){
+//   int nsize=data.size();
+//   assert(nsize);
+//   gsl_wavelet *w;
+//   gsl_wavelet_workspace *work;
+//   w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
+//   work=gsl_wavelet_workspace_alloc(nsize);
+//   gsl_wavelet_transform_inverse(w,&(data[0]),1,nsize,work);
+// }
+
 void filter::Filter::morphology(const ImgReaderGdal& input, ImgWriterGdal& 
output, const std::string& method, int dim, short down, int offset)
 {
   Vector2d lineInput(input.nrOfBand(),input.nrOfCol());
diff --git a/src/algorithms/Filter.h b/src/algorithms/Filter.h
index 3da2601..ef89a01 100644
--- a/src/algorithms/Filter.h
+++ b/src/algorithms/Filter.h
@@ -22,6 +22,7 @@ along with pktools.  If not, see 
.
 
 #include 
 #include 
+#include 
 #include "StatFactory.h"
 #include "imageclasses/ImgReaderGdal.h"
 #include "imageclasses/ImgWriterGdal.h"
@@ -30,7 +31,7 @@ using namespace std;
 namespace filter
 {
   
-  enum FILTER_TYPE { median=0, var=1 , min=2, max=3, sum=4, mean=5, minmax=6, 
dilate=7, erode=8, close=9, open=10, homog=11, sobelx=12, sobely=13, 
sobelxy=14, sobelyx=-14, smooth=15, density=16, majority=17, mixed=18, 
smoothnodata=19, threshold=20, ismin=21, ismax=22, heterog=23, order=24, 
stdev=25};
+  enum FILTER_TYPE { median=0, var=1 , min=2, max=3, sum=4, mean=5, minmax=6, 
dilate=7, erode=8, close=9, open=10, homog=11, sobelx=12, sobely=13, 
sobelxy=14, sobelyx=-14, smooth=15, density=16, majority=17, mixed=18, 
smoothnodata=19, threshold=20, ismin=21, ismax=22, heterog=23, order=24, 
stdev=25, dwtForward=26, dwtInverse=27};
 
 class Filter
 {
@@ -38,9 +39,14 @@ public:
   Filter(void);
   Filter(const vector &taps);
   virtual ~Filter(){};
-  FILTER_TYPE getFilterType(const std::string filterType){
+  static const gsl_wavelet_type* getWaveletType(const std::string waveletType){
+std::map m_waveletMap;
+initWaveletMap(m_waveletMap);
+return m_waveletMap[waveletType];
+  }
+  static FILTER_TYPE getFilterType(const std::string filterType){
 std::map m_filterMap;
-initMap(m_filterMap);
+initFilterMap(m_filterMap);
 return m_filterMap[filterType];
   };
   void setTaps(const vector &taps);
@@ -53,19 +59,28 @@ public:
   void doit(const ImgReaderGdal& input, ImgWriterGdal& output, short down=1, 
int offset=0);
 
   template double applySrf(const vector &wavelengthIn, const 
vector& input, const Vector2d& srf, const std::string& 
interpolationType, T& output, double delta=1.0, bool normalize=false, bool 
verbose=false);
-  template double applySrf(const vector &wavelengthIn, const 
Vector2d& input, const Vector2d& srf, const std::string& 
interpolationType, vector& output, double delta=1.0, bool normalize=false, 
int down=1, bool verbose=false);
+  template double applySrf(const vector &wavelengthIn, const 
Vector2d& input, const Vector2d& srf, const std::string& 
interpolationType, vector& output, double delta=1.0, bool normalize=false, 
int down=1, bool transposeInput=false, bool verbose=false);
 
-  // void applySrf(const vector &wavelengthIn, const ImgReaderGdal& 
input, const vector< Vector2d > &srf, const std::string& 
interpolationType, ImgWriterGdal& output, bool verbose=false);
   template void applyFwhm(const vector &wavelengthIn, const 
vector& input, const vector &wavelengthOut, const vec

[pktools] 119/375: added pkenhance

2014-12-03 Thread Bas Couwenberg
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 4bc0a2428cd8be80cd9bffe2a6afa9a753498fcd
Author: Pieter Kempeneers 
Date:   Wed Jul 10 18:12:03 2013 +0200

added pkenhance
---
 src/apps/pkenhance.cc | 197 ++
 1 file changed, 197 insertions(+)

diff --git a/src/apps/pkenhance.cc b/src/apps/pkenhance.cc
new file mode 100644
index 000..7f904c7
--- /dev/null
+++ b/src/apps/pkenhance.cc
@@ -0,0 +1,197 @@
+/**
+pkenhance.cc: program to enhance raster images: histogram matching
+Copyright (C) 2008-2013 Pieter Kempeneers
+
+This file is part of pktools
+
+pktools is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+pktools is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with pktools.  If not, see .
+***/
+#include 
+#include 
+#include 
+#include "base/Optionpk.h"
+#include "imageclasses/ImgReaderGdal.h"
+#include "imageclasses/ImgWriterGdal.h"
+
+int main(int argc,char **argv) {
+  Optionpk input_opt("i","input","input image file");
+  Optionpk reference_opt("r", "reference", "Reference image file");
+  Optionpk output_opt("o", "output", "Output image file");
+  Optionpk minRef_opt("minref", "minref", "Sets minimum for histogram 
of reference image");
+  Optionpk maxRef_opt("maxref", "maxref", "Sets maximum for histogram 
of reference image");
+  Optionpk minInput_opt("mininput", "mininput", "Sets minimum for 
histogram of input image");
+  Optionpk maxInput_opt("maxinput", "maxinput", "Sets maximum for 
histogram of input image");
+  Optionpk nodata_opt("nodata", "nodata", "Sets no data value(s) for 
calculations (flags in input image)");
+  Optionpk method_opt("m", "method", "enhancement method 
(histmatch)", "histmatch");
+  // Optionpk wavelet_type_opt("wt", "wavelet", "wavelet type: 
daubechies,daubechies_centered, haar, haar_centered, bspline, 
bspline_centered", "daubechies");
+  // Optionpk family_opt("wf", "family", "wavelet family (vanishing 
moment, see also 
http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)", 4);
+  // Optionpk quantize_opt("q", "quantize", "Quantize threshold",0);
+  Optionpk  nbin_opt("nbin", "nbin", "Number of bins used in histogram. 
Use 0 for all input values as integers",0);
+  Optionpk  otype_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","");
+  Optionpk  oformat_opt("of", "oformat", "Output image format (see 
also gdal_translate). Empty string: inherit from input image");
+  Optionpk option_opt("co", "co", "options: NAME=VALUE [-co 
COMPRESS=LZW] [-co INTERLEAVE=BAND]");
+  Optionpk verbose_opt("v", "verbose", "verbose mode if > 0", 0);
+
+  bool doProcess;//stop process when program was invoked with help option (-h 
--help)
+  try{
+doProcess=input_opt.retrieveOption(argc,argv);
+reference_opt.retrieveOption(argc,argv);
+output_opt.retrieveOption(argc,argv);
+minRef_opt.retrieveOption(argc,argv);
+maxRef_opt.retrieveOption(argc,argv);
+minInput_opt.retrieveOption(argc,argv);
+maxInput_opt.retrieveOption(argc,argv);
+nodata_opt.retrieveOption(argc,argv);
+method_opt.retrieveOption(argc,argv);
+nbin_opt.retrieveOption(argc,argv);
+otype_opt.retrieveOption(argc,argv);
+oformat_opt.retrieveOption(argc,argv);
+option_opt.retrieveOption(argc,argv);
+verbose_opt.retrieveOption(argc,argv);
+  }
+  catch(string predefinedString){
+std::cout << predefinedString << std::endl;
+exit(0);
+  }
+  if(!doProcess){
+std::cout << "short option -h shows basic options only, use long option 
--help to show all options" << std::endl;
+exit(0);//help was invoked, stop processing
+  }
+
+  ImgReaderGdal inputImg;
+  ImgReaderGdal referenceImg;
+  ImgWriterGdal outputImg;
+  assert(input_opt.size());
+  inputImg.open(input_opt[0]);
+  for(int inodata=0;inodata histRef(nbinRef);
+  std::vector histInput(nbinInput);
+  double minValueRef=0;
+  double maxValueRef=0;
+  double minValueInput=0;
+  double maxValueInput=0;
+  if(minRef_opt.size())
+minValueRef=minRef_opt[0];
+  if(maxRef_opt.size())
+maxValueRef=maxRef_opt[0];
+  if(minInput_opt.size())
+minValueInput=minInput_opt[

[pktools] 125/375: bug fix in pktools for -min and -max

2014-12-03 Thread Bas Couwenberg
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 1b67952a9e07f9dcf4177be22f33af850f020dcb
Author: Pieter Kempeneers 
Date:   Mon Aug 26 17:58:33 2013 +0200

bug fix in pktools for -min and -max
---
 ChangeLog  | 4 +++-
 configure.ac   | 2 +-
 src/apps/pkinfo.cc | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 07dc87a..9ea47d5 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -116,4 +116,6 @@ version 2.4.1
priors for input vector file
todo: take priors into account for cross validation
ordering of labels before training
-
+version 2.4.2
+ - pkinfo
+   bug fixed with -min and -max
diff --git a/configure.ac b/configure.ac
index b6b157d..125cea2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([pktools], [2.4.1], [kempe...@gmail.com])
+AC_INIT([pktools], [2.4.2], [kempe...@gmail.com])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/src/apps/pkinfo.cc b/src/apps/pkinfo.cc
index cfba529..1ba22c5 100644
--- a/src/apps/pkinfo.cc
+++ b/src/apps/pkinfo.cc
@@ -294,9 +294,9 @@ int main(int argc, char *argv[])
   minValue=0;
   maxValue=0;
   if(min_opt.size())
-minValue=min_opt.size();
+minValue=min_opt[0];
   if(max_opt.size())
-maxValue=max_opt.size();
+maxValue=max_opt[0];
   unsigned long int 
nsample=imgReader.getHistogram(output,minValue,maxValue,nbin,band_opt[0]);
   std::cout.precision(10);
   for(int bin=0;binhttp://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[pktools] 109/375: configure.ac conditional Makefile for las

2014-12-03 Thread Bas Couwenberg
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 555ac68d6dd5607b6b9a5966cf2ee0228da285cd
Author: Pieter Kempeneers 
Date:   Wed May 15 14:09:54 2013 +0200

configure.ac conditional Makefile for las
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 631829f..9b2b4cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,8 @@ AC_SUBST([LIBS])
 
 # files to generate via autotools (.am or .in source files)
 AC_CONFIG_HEADERS([config.h])
+AM_CONDITIONAL(USE_LAS, true)AM_COND_IF([USE_LAS],
+   [AC_CONFIG_FILES([src/lasclasses/Makefile])])
 AC_CONFIG_FILES([
 Makefile
 src/base/Makefile
@@ -101,8 +103,6 @@ src/imageclasses/Makefile
 src/fileclasses/Makefile
 src/apps/Makefile
 ])
-AM_COND_IF([USE_LAS],
-   [AC_CONFIG_FILES([src/lasclasses/Makefile])])
 
 # generate the final Makefile etc.
 AC_OUTPUT

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


[pktools] 106/375: pkeditogr stringent option for selecting features

2014-12-03 Thread Bas Couwenberg
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 b313bfc613aa2be9cc4bd96a5ad6ba2bf30dc601
Author: Pieter Kempeneers 
Date:   Tue May 14 11:36:33 2013 +0200

pkeditogr stringent option for selecting features
---
 src/apps/pkeditogr.cc | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/apps/pkeditogr.cc b/src/apps/pkeditogr.cc
index 123139a..10ef0ce 100644
--- a/src/apps/pkeditogr.cc
+++ b/src/apps/pkeditogr.cc
@@ -30,8 +30,8 @@ int main(int argc, char *argv[])
   Optionpk input_opt("i", "input", "Input image");
   Optionpk output_opt("o", "output", "Output mask file");
   Optionpk selectField_opt("select", "select", "select field (combined 
with like opt)");
-  Optionpk like_opt("like", "like", "substring(s) to be found in 
select field. If multiple substrings are provided, feature will be selected if 
one of them is found (default) or all of them are found (stringent option is 
set)");
-  Optionpk stringent_opt("st", "stringent", "all substring(s) in like 
option must be found in order to select feature)",false);
+  Optionpk like_opt("like", "like", "substring(s) to be found in 
select field. If multiple substrings are provided, feature will be selected if 
one of them is found (stringent option must be false)");
+  Optionpk stringent_opt("st", "stringent", "string in like option must 
exactly match to select feature)",false);
   Optionpk field_opt("f", "field", "output field names (number must 
exactly match input fields)");
   //renaming fields can also be done via ogr2ogr using the -sql option:
   //ogr2ogr outdataset indataset -sql "SELECT src_field1 AS dst_field1, 
src_field2 AS dst_field2 FROM sourcelayer"
@@ -148,24 +148,24 @@ int main(int argc, char *argv[])
 if(like_opt.empty())
   doSelect=true;
 else{
-  doSelect=stringent_opt[0];
   int fieldIndex=poFeature->GetFieldIndex(selectField_opt[0].c_str());
   string fieldValue=poFeature->GetFieldAsString(fieldIndex);
-  for(int ilike=0;ilikehttp://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[pktools] 124/375: priors in classification of vector files

2014-12-03 Thread Bas Couwenberg
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 035120e777ea5efdc42c86cfc354797ba9518b6e
Author: Pieter Kempeneers 
Date:   Fri Jul 26 10:19:27 2013 +0200

priors in classification of vector files
---
 ChangeLog   |  9 +
 doc/examples_pkascii2ogr.dox|  5 +
 doc/examples_pkclassify_svm.dox | 33 +
 doc/examples_pkdiff.dox | 12 
 src/apps/pkclassify_nn.cc   | 24 
 src/apps/pkclassify_svm.cc  | 27 ++-
 6 files changed, 85 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9748a4e..07dc87a 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -108,3 +108,12 @@ version 2.4.1
filter spectra in ASCII file (including wavelet transform)
  - pkfilter
discrete wavelet transform (dwtForward, dwtInverse, dwtQuantize)
+ - pkclassify_svm
+   priors for input vector file
+   todo: take priors into account for cross validation
+   ordering of labels before training
+ - pkclassify_nn
+   priors for input vector file
+   todo: take priors into account for cross validation
+   ordering of labels before training
+
diff --git a/doc/examples_pkascii2ogr.dox b/doc/examples_pkascii2ogr.dox
new file mode 100644
index 000..2c5231f
--- /dev/null
+++ b/doc/examples_pkascii2ogr.dox
@@ -0,0 +1,5 @@
+\section examples_pkascii2ogr Examples of pkascii2ogr
+\code
+pkascii2ogr -i input.txt -o output.shp -x 2 -y 1 -n id -ot Integer -n label 
-ot Integer -p epsg:4326
+\endcode
+create a vector shape file (output.shp) from input ASCII file (input.txt). The 
coordinates x (longitude) and y (latitude) can be found in input.txt as columns 
3 and 2 respectively (columns start counting from 0). The remaining 2 columns 
in input.txt are used as fields (attributes) of type integer: id (column 0) and 
label (column 3). The projection is set to lat lon (epsg:4326). 
diff --git a/doc/examples_pkclassify_svm.dox b/doc/examples_pkclassify_svm.dox
new file mode 100644
index 000..1fc7149
--- /dev/null
+++ b/doc/examples_pkclassify_svm.dox
@@ -0,0 +1,33 @@
+\section examples_pkclassify_svm Examples of pkclassify_svm
+\code
+pkclassify_svm -i input.tif -t training.shp -o output.tif -cv 2 -ct 
colourtable.txt -cc 1000 -g 0.1
+\endcode
+
+Classify input image input.tif with a support vector machine. A training 
sample that is provided as a vector (shp) file. It contains all features (same 
dimensionality as input.tif) in its fields (please check \ref pkextract 
"pkextract" on how to obtain such a file from a "clean" vector file containing 
locations only). A two-fold cross validation (cv) is performed (output on 
screen). The parameters cost and gamma of the support vector machine are set to 
1000 and 0.1 respectively. A colour [...]
+
+\code
+pkclassify_svm -i input.tif -t training.shp -o output.tif -bs 33 -bag 3
+\endcode
+Classification using bootstrap aggregation. The training sample is randomly 
split in three subsamples (33% of the original sample each).
+
+\code
+pkclassify_svm -i input.tif -t training.shp -o output.tif -p 1 -p 1 -p 1 -p 1 
-p 1 -p 1 -p 1 -p 1 -p 1 -p 1 -p 1 -p 0.2 -p 1 -p 1 -p 1
+\endcode
+Classification using prior probabilities for each class. The priors are 
automatically normalized. The order in which the options -p are provide should 
respect the alphanumeric order of the class names (class 10 comes before 2...)
+
+
+
+replace pixel values 1 and 2 with value 0
+
+\code
+pkreclass -i vector.shp -o output.shp -c FROM -r TO -n INFIELD
+\endcode
+replace FROM with TO in field INFIELD (of type string) in vector file 
vector.shp and write to new vector output.shp
+
+for((i=0;i<256;++i));do if(($i<100));then echo "$i 1";else echo "$i 0";fi;done 
> code.txt; pkreclass -i input1.tif -o output.tif –code code.txt; # replace all 
values smaller than 100 with 1, all other values with 0
+
+\code
+pkreclass -i input1.tif -o output.tif $(for((i=0;i<256;++i));do 
if(($i<100));then echo -n " -c $i " " -r 1";else echo " -c $i " " -r 0";fi;done)
+\endcode
+same as previous but without temporary file 
+
diff --git a/doc/examples_pkdiff.dox b/doc/examples_pkdiff.dox
new file mode 100644
index 000..1ff9d06
--- /dev/null
+++ b/doc/examples_pkdiff.dox
@@ -0,0 +1,12 @@
+\section examples_pkdiff Examples of pkdiff
+\code
+pkdiff -i input.tif -r reference.tif
+\endcode
+
+Check if two raster images are different (reports only if images are different 
or not)
+
+\code
+pkdiff -i classificationMap.tif -r referencePoints.shp -cm 
+\endcode
+
+Validate a classification map using points from a reference sample and report 
confusion matrix
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index 4ebec2a..5922502 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -361,6 +361,14 @@ int main(int argc, char *argv[])

[pktools] 123/375: pkfilterascii.cc and added ohloh in Mainpage.dox

2014-12-03 Thread Bas Couwenberg
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 043483306ec4c4152059a1f0968b049ad551a580
Author: Pieter Kempeneers 
Date:   Fri Jul 19 18:14:55 2013 +0200

pkfilterascii.cc and added ohloh in Mainpage.dox
---
 doc/mainpage.dox  |  2 ++
 src/apps/pkfilterascii.cc | 71 +++
 2 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 8d30c5d..ac9a16b 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -19,6 +19,8 @@ All utilities in pktools use command line options and have a 
built in help
 
 Currently the tools only work in a Linux environment
 
+Check the code statistics on http://www.ohloh.net/p/pktools
+
 \section pktools_license License
 
 pktools is written by Pieter Kempeneers and released under the GNU General 
Public License version3
diff --git a/src/apps/pkfilterascii.cc b/src/apps/pkfilterascii.cc
index af3f787..3c393cf 100644
--- a/src/apps/pkfilterascii.cc
+++ b/src/apps/pkfilterascii.cc
@@ -24,6 +24,7 @@ along with pktools.  If not, see 
.
 #include 
 #include 
 #include 
+#include 
 #include "base/Optionpk.h"
 #include "base/Vector2d.h"
 #include "algorithms/Filter.h"
@@ -39,9 +40,9 @@ int main(int argc,char **argv) {
   Optionpk method_opt("f", "filter", "filter function (to be 
implemented: dwtForward, dwtInverse,dwtQuantize)");
   Optionpk wavelet_type_opt("wt", "wavelet", "wavelet type: 
daubechies,daubechies_centered, haar, haar_centered, bspline, 
bspline_centered", "daubechies");
   Optionpk family_opt("wf", "family", "wavelet family (vanishing moment, 
see also 
http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)", 4);
-  Optionpk quantize_opt("q", "quantize", "Quantize threshold",0);
+  Optionpk threshold_opt("qt", "threshold", "Quantize threshold 
value", 0);
   Optionpk 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 tapz_opt("tapz", "tapz", "taps used for spectral 
filtering");
+  Optionpk tapZ_opt("tapz", "tapz", "taps used for spectral 
filtering");
   Optionpk fwhm_opt("fwhm", "fwhm", "list of full width half to apply 
spectral filtering (-fwhm band1 -fwhm band2 ...)");
   Optionpk srf_opt("srf", "srf", "list of ASCII files containing 
spectral response functions (two columns: wavelength response)");
   Optionpk wavelengthIn_opt("win", "wavelengthIn", "column number of 
input ASCII file containing wavelengths");
@@ -58,9 +59,9 @@ int main(int argc,char **argv) {
 method_opt.retrieveOption(argc,argv);
 wavelet_type_opt.retrieveOption(argc,argv);
 family_opt.retrieveOption(argc,argv);
-quantize_opt.retrieveOption(argc,argv);
+threshold_opt.retrieveOption(argc,argv);
 dimZ_opt.retrieveOption(argc,argv);
-tapz_opt.retrieveOption(argc,argv);
+tapZ_opt.retrieveOption(argc,argv);
 fwhm_opt.retrieveOption(argc,argv);
 srf_opt.retrieveOption(argc,argv);
 wavelengthIn_opt.retrieveOption(argc,argv);
@@ -80,8 +81,8 @@ int main(int argc,char **argv) {
 
   Vector2d inputData(inputCols_opt.size());
   Vector2d filteredData(inputCols_opt.size());
-  vector wavelengthIn;
-  vector wavelengthOut;
+  std::vector wavelengthIn;
+  std::vector wavelengthOut;
   assert(input_opt.size());
   FileReaderAscii asciiReader(input_opt[0]);
   if(wavelengthIn_opt.size())
@@ -101,7 +102,7 @@ int main(int argc,char **argv) {
 if(verbose_opt[0])
   std::cout << "spectral filtering to " << fwhm_opt.size() << " bands with 
provided fwhm " << std::endl;
 assert(wavelengthOut_opt.size()==fwhm_opt.size());
-vector fwhmData(wavelengthOut_opt.size());
+std::vector fwhmData(wavelengthOut_opt.size());
 for(int icol=0;icol(wavelengthIn,inputData[icol], 
wavelengthOut_opt,fwhm_opt, interpolationType_opt[0], 
filteredData[icol],verbose_opt[0]);
 if(verbose_opt[0])
@@ -114,7 +115,7 @@ int main(int argc,char **argv) {
 Vector2d srfData(srf_opt.size(),inputCols_opt.size());//transposed 
output
 if(verbose_opt[0])
   std::cout << "spectral filtering to " << srf_opt.size() << " bands with 
provided SRF " << std::endl;
-vector< Vector2d > srf(srf_opt.size());//[0] srf_nr, [1]: 
wavelength, [2]: response
+std::vector< Vector2d > srf(srf_opt.size());//[0] srf_nr, [1]: 
wavelength, [2]: response
 ifstream srfFile;
 for(int isrf=0;isrf abscoeff(filteredData[icol].size());
 for(int iband=0;iband0){//percentual threshold
+  int nsize=abscoeff.size();
+  size_t* p=new size_t[nsize];
+  int nc=threshold_opt[0]/100.0*nsize;
+  gsl_sort_index(p,&(abscoeff[0]),1,nsize);
+  for(int i=0;(i+nc)http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[pktools] 126/375: support scramble and shift in pkfilter clean up of using namespace std in header files

2014-12-03 Thread Bas Couwenberg
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 18957a35c7a95ed71933014d74c1d97dc252cb39
Author: Pieter Kempeneers 
Date:   Wed Aug 28 16:55:42 2013 +0200

support scramble and shift in pkfilter clean up of using namespace std in 
header files
---
 ChangeLog |   3 +
 src/algorithms/ConfusionMatrix.cc |  26 +++
 src/algorithms/ConfusionMatrix.h  |  32 
 src/algorithms/Egcs.cc|  42 +--
 src/algorithms/Egcs.h |  10 +--
 src/algorithms/FeatureSelector.h  |  81 ++--
 src/algorithms/Filter.h   |  79 ++--
 src/algorithms/Filter2d.cc|  29 
 src/algorithms/Filter2d.h | 152 +++---
 src/apps/pkfillnodata.cc  |  27 +++
 src/apps/pkfilter.cc  |  18 -
 src/base/IndexValue.h |   2 -
 src/base/Optionpk.h   |  30 
 src/base/Vector2d.h   |  47 ++--
 src/imageclasses/ImgReaderGdal.cc |  60 +++
 src/imageclasses/ImgReaderGdal.h  |  64 
 src/imageclasses/ImgReaderOgr.cc  |  30 
 src/imageclasses/ImgReaderOgr.h   | 132 -
 18 files changed, 500 insertions(+), 364 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9ea47d5..19ccbe1 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -117,5 +117,8 @@ version 2.4.1
todo: take priors into account for cross validation
ordering of labels before training
 version 2.4.2
+ - clean up of using namespace std in header files
  - pkinfo
bug fixed with -min and -max
+ - pkfilter
+   new methods for scrambling and shifting images
diff --git a/src/algorithms/ConfusionMatrix.cc 
b/src/algorithms/ConfusionMatrix.cc
index a9a04f4..02a4653 100644
--- a/src/algorithms/ConfusionMatrix.cc
+++ b/src/algorithms/ConfusionMatrix.cc
@@ -21,7 +21,7 @@ along with pktools.  If not, see 
.
 #include 
 #include 
 
-bool compareClass(const string& string1, const string& string2){
+bool compareClass(const std::string& string1, const std::string& string2){
   int int1=string2type(string1);
   int int2=string2type(string2);
   return(int1& classNames){
+ConfusionMatrix::ConfusionMatrix(const std::vector& classNames){
   setClassNames(classNames);
 }
 
@@ -107,14 +107,14 @@ ConfusionMatrix ConfusionMatrix::operator*(double weight)
 void ConfusionMatrix::resize(short nclass){
   m_classes.resize(nclass);
   for(short iclass=0;iclass& classNames, bool 
doSort){
+void ConfusionMatrix::setClassNames(const std::vector& 
classNames, bool doSort){
   m_classes=classNames;
   if(doSort)
 sortClassNames();
@@ -122,7 +122,7 @@ void ConfusionMatrix::setClassNames(const vector& 
classNames, bool doSor
 m_results.resize(m_classes.size(),m_classes.size());
 }
 
-void ConfusionMatrix::pushBackClassName(const string& className, bool doSort){
+void ConfusionMatrix::pushBackClassName(const std::string& className, bool 
doSort){
   m_classes.push_back(className);
   if(doSort)
 sortClassNames();
@@ -140,7 +140,7 @@ void ConfusionMatrix::clearResults(){
   m_results.resize(m_classes.size(),m_classes.size());
 }
 
-void ConfusionMatrix::setResult(const string& theRef, const string& theClass, 
double theResult){
+void ConfusionMatrix::setResult(const std::string& theRef, const std::string& 
theClass, double theResult){
   // int 
ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theRef));
   // int 
ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
   // assert(ir>=0);
@@ -152,7 +152,7 @@ void ConfusionMatrix::setResult(const string& theRef, const 
string& theClass, do
   m_results[ir][ic]=theResult;
 }
 
-void ConfusionMatrix::incrementResult(const string& theRef, const string& 
theClass, double theIncrement){
+void ConfusionMatrix::incrementResult(const std::string& theRef, const 
std::string& theClass, double theIncrement){
   int 
ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theRef));
   int 
ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
   assert(ir>=0);
@@ -164,7 +164,7 @@ void ConfusionMatrix::incrementResult(const string& theRef, 
const string& theCla
   m_results[ir][ic]+=theIncrement;
 }
 
-double ConfusionMatrix::nReference(const string& theRef) const{
+double ConfusionMatrix::nReference(const std::string& theRef) const{
   int 
ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theRef));
   return accumulate(m_results[ir].begin(),m_results[ir].end(),0);
 }
@@ -176,7 +176,7 @@ double ConfusionMatrix::nReference() const{
   return nref;
 }
 
-double ConfusionMatrix::nClassified(const string& theClass) const{
+double ConfusionMatrix::nClassified(const std::string& theClass) const{
   int 
ic=distance(m_classes.begin(),find(m_c

[pktools] 111/375: string option for pkmosaic.cc

2014-12-03 Thread Bas Couwenberg
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 3bc4208fc5301b9cd5ed282edd05e966c39368a8
Author: Pieter Kempeneers 
Date:   Fri May 17 15:08:32 2013 +0200

string option for pkmosaic.cc
---
 src/apps/pkextract.cc | 214 +++---
 src/apps/pkmosaic.cc  |  94 +-
 2 files changed, 208 insertions(+), 100 deletions(-)

diff --git a/src/apps/pkextract.cc b/src/apps/pkextract.cc
index 74c5b44..09be56b 100644
--- a/src/apps/pkextract.cc
+++ b/src/apps/pkextract.cc
@@ -33,6 +33,9 @@ along with pktools.  If not, see 
.
 #define PI 3.1415926535897932384626433832795
 #endif
 
+namespace rule{
+  enum RULE_TYPE {point=0, mean=1, proportion=2, custom=3, minimum=4, 
maximum=5, maxvote=6};
+}
 
 int main(int argc, char *argv[])
 {
@@ -40,7 +43,7 @@ int main(int argc, char *argv[])
   Optionpk sample_opt("s", "sample", "Input sample file (shape) or 
class file (e.g. Corine CLC) if class option is set", "");
   Optionpk mask_opt("m", "mask", "Mask image file", "");
   Optionpk invalid_opt("f", "flag", "Mask value where image is invalid. 
If a single mask is used, more flags can be set. If more masks are used, use 
one value for each mask.", 1);
-  Optionpk class_opt("c", "class", "Class(es) to extract from input 
sample image. Use -1 to process every class in sample image, or 0 to extract 
all non-flagged pixels from sample file", 0);
+  Optionpk class_opt("c", "class", "Class(es) to extract from input 
sample image. Use -1 to process every class in sample image, or leave empty to 
extract all non-flagged pixels from sample file");
   Optionpk output_opt("o", "output", "Output sample file (image 
file)", "");
   Optionpk test_opt("test", "test", "Test sample file (use this option 
in combination with threshold<100 to create a training (output) and test set");
   Optionpk keepFeatures_opt("k", "keep", "Keep original features in 
output vector file", false);
@@ -59,7 +62,7 @@ int main(int argc, char *argv[])
   Optionpk label_opt("cn", "cname", "name of the class label in the 
output vector file", "label");
   Optionpk polygon_opt("l", "line", "create OGRPolygon as geometry 
instead of OGRPoint. Only if sample option is also of polygon type.", false);
   Optionpk band_opt("b", "band", "band index to crop. Use -1 to use all 
bands)", -1);
-  Optionpk rule_opt("r", "rule", "rule how to report image information 
per feature. 0: value at each point (or at centroid of the polygon if line is 
not set), 1: mean value (written to centroid of polygon if line is not set), 2: 
proportion classes, 3: custom, 4: minimum of polygon).", 0);
+  Optionpk rule_opt("r", "rule", "rule how to report image information 
per feature. point (value at each point or at centroid of the polygon if line 
is set), mean (mean value written to centroid of polygon if line is set), 
proportion, minimum (of polygon), maximum (of polygon), maxvote.", "point");
   Optionpk verbose_opt("v", "verbose", "verbose mode if > 0", 0);
 
   bool doProcess;//stop process when program was invoked with help option (-h 
--help)
@@ -99,6 +102,14 @@ int main(int argc, char *argv[])
 exit(0);//help was invoked, stop processing
   }
 
+  std::map ruleMap;
+  //initialize ruleMap
+  ruleMap["point"]=rule::point;
+  ruleMap["mean"]=rule::mean;
+  ruleMap["proportion"]=rule::proportion;
+  ruleMap["custom"]=rule::custom;
+  ruleMap["maxvote"]=rule::maxvote;
+
   if(verbose_opt[0])
 std::cout << class_opt << std::endl;
   statfactory::StatFactory stat;
@@ -216,7 +227,7 @@ int main(int argc, char *argv[])
 
   assert(sample_opt[0]!="");
   if((sample_opt[0].find(".tif"))!=std::string::npos){//raster file
-if(!class_opt[0]){
+if(class_opt.empty()){
   std::cout << "Warning: no classes selected, if classes must be 
extracted, set to -1 for all classes using option -c -1" << std::endl;
   ImgReaderGdal classReader;
   ImgWriterOgr ogrWriter;
@@ -753,8 +764,10 @@ int main(int argc, char *argv[])
   sampleReader.getFields(fieldnames);
   assert(fieldnames.size()==ogrWriter.getFieldCount());
   map pointAttributes;
-  switch(rule_opt[0]){
-  case(2):{//proportion for each class
+
+  switch(ruleMap[rule_opt[0]]){
+// switch(rule_opt[0]){
+  case(rule::proportion):{//proportion for each class
 for(int iclass=0;iclassGetLayerDefn());
 }
-else if(rule_opt[0]==1){
+else if(ruleMap[rule_opt[0]]==rule::mean){
  if(writeTest)
writeCentroidFeature = 
OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
  else
@@ -1177,15 +1192,18 @@ int main(int argc, char *argv[])
}
 //previously here
 vector polyValues;
-switch(rule_opt[0]){
-case(0):
-case(1):
+switch(ruleMap[rule

[pktools] 128/375: corrected errors in FileReaderAscii

2014-12-03 Thread Bas Couwenberg
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 5af0025e4c3a1d635390df24894c3b6997446c89
Author: Pieter Kempeneers 
Date:   Mon Sep 9 17:47:22 2013 +0200

corrected errors in FileReaderAscii
---
 ChangeLog  |  4 +++
 src/apps/pkstat.cc | 13 +++--
 src/apps/pkstatogr.cc  | 56 +++---
 src/fileclasses/FileReaderAscii.cc |  2 +-
 src/fileclasses/FileReaderAscii.h  | 12 
 5 files changed, 62 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 19ccbe1..1745593 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -118,7 +118,11 @@ version 2.4.1
ordering of labels before training
 version 2.4.2
  - clean up of using namespace std in header files
+ - FileReaderAscii
+   corrected error for constructor with fieldseparator argument
  - pkinfo
bug fixed with -min and -max
  - pkfilter
new methods for scrambling and shifting images
+ - pkstatogr
+   make histogram more similar to pkstat with support of relative option
diff --git a/src/apps/pkstat.cc b/src/apps/pkstat.cc
index bec8c1a..10caf0d 100644
--- a/src/apps/pkstat.cc
+++ b/src/apps/pkstat.cc
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
   Optionpk min_opt("min","min","set minimum value",0);
   Optionpk max_opt("max","max","set maximum value",0);
   Optionpk histogram_opt("hist","hist","calculate histogram",false);
-  Optionpk nbin_opt("bin","bin","number of bins to calculate 
histogram",10);
+  Optionpk nbin_opt("bin","bin","number of bins to calculate 
histogram",0);
   Optionpk relative_opt("rel","relative","use percentiles for histogram 
to calculate histogram",false);
   Optionpk correlation_opt("cor","correlation","calculate Pearson 
produc-moment correlation coefficient between two columns (defined by -c  
-c ",false);
   Optionpk rmse_opt("e","rmse","calculate root mean square error between 
two columns (defined by -c  -c ",false);
@@ -101,9 +101,17 @@ int main(int argc, char *argv[])
 asciiReader.setMaxRow(range_opt[1]);
   asciiReader.readData(dataVector,col_opt);
   assert(dataVector.size());
+  statfactory::StatFactory stat;
   double minValue=min_opt[0];
   double maxValue=max_opt[0];
-  statfactory::StatFactory stat;
+  if(histogram_opt[0]){
+if(nbin_opt[0]<1){
+  std::cerr << "Warning: number of bins not defined, calculating bins from 
min and max value" << std::endl;
+  if(maxValue<=minValue)
+
stat.minmax(dataVector[0],dataVector[0].begin(),dataVector[0].end(),minValue,maxValue);
+  nbin_opt[0]=maxValue-minValue+1;
+}
+  }
   for(int icol=0;icol input_opt("i", "input", "Input shape file", "");
   Optionpk fieldname_opt("n", "fname", "fields on which to calculate 
statistics", "");
+  Optionpk minmax_opt("mm","minmax","calculate minimum and maximum 
value",false);
+  Optionpk min_opt("min","min","set minimum value",0);
+  Optionpk max_opt("max","max","set maximum value",0);
+  Optionpk histogram_opt("hist","hist","calculate histogram",false);
   Optionpk nbin_opt("nbin", "nbin", "number of bins", 0);
-  Optionpk min_opt("min","min","calculate minimum value",false);
-  Optionpk max_opt("max","max","calculate maximum value",false);
+  Optionpk relative_opt("rel","relative","use percentiles for histogram 
to calculate histogram",false);
   Optionpk mean_opt("mean","mean","calculate mean value",false);
   Optionpk median_opt("median","median","calculate median value",false);
   Optionpk stdev_opt("stdev","stdev","calculate standard 
deviation",false);
@@ -42,9 +45,12 @@ int main(int argc, char *argv[])
   try{
 doProcess=input_opt.retrieveOption(argc,argv);
 fieldname_opt.retrieveOption(argc,argv);
-nbin_opt.retrieveOption(argc,argv);
+minmax_opt.retrieveOption(argc,argv);
 min_opt.retrieveOption(argc,argv);
 max_opt.retrieveOption(argc,argv);
+histogram_opt.retrieveOption(argc,argv);
+nbin_opt.retrieveOption(argc,argv);
+relative_opt.retrieveOption(argc,argv);
 mean_opt.retrieveOption(argc,argv);
 median_opt.retrieveOption(argc,argv);
 stdev_opt.retrieveOption(argc,argv);
@@ -79,12 +85,26 @@ int main(int argc, char *argv[])
 theData.clear();
 
inputReader.readData(theData,OFTReal,fieldname_opt[ifield],0,verbose_opt[0]);
 vector binData;
-double minimum=0;
-double maximum=0;
-int nbin=(nbin_opt[0]>1)? nbin_opt[0] : 2;
+double minValue=min_opt[0];
+double maxValue=max_opt[0];
+if(histogram_opt[0]){
+  if(nbin_opt[0]<1){
+if(maxValue<=minValue)
+  stat.minmax(theData,theData.begin(),theData.end(),minValue,maxValue);
+nbin_opt[0]=maxValue-minValue+1;
+  }
+  assert(nbin_opt[0]);
+  try{
+
stat.distribution(theData,theData.begin(),theData.end(),binData,nbin_opt[0],minValue,maxValue);
+  }
+  catch(string theError){
+std::cerr <

  1   2   3   4   >