[pktools] 11/375: support of angles in morphological filter

Bas Couwenberg sebastic at xs4all.nl
Wed Dec 3 21:53:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

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

commit ece91d6ec0562d394f716fca7166f4b163d56aad
Author: Pieter <kempenep at kempenep-Latitude-E6420.(none)>
Date:   Wed Sep 19 21:55:42 2012 +0200

    support of angles in morphological filter
---
 aclocal.m4                 |  14 +-
 configure                  | 440 +++++++++++++++------------------------------
 configure.ac               |   2 +-
 src/algorithms/Filter2d.cc | 118 +++++++++---
 src/algorithms/Filter2d.h  |   2 +-
 src/apps/pkcrop.cc         |  12 +-
 src/apps/pkfilter.cc       | 177 ++++++++++++++----
 src/apps/pksetmask.cc      |   2 +-
 8 files changed, 387 insertions(+), 380 deletions(-)

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 c890d6e..9839556 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.2.
+# Generated by GNU Autoconf 2.68 for pktools 2.2.
 #
 # Report bugs to <kempenep at gmail.com>.
 #
@@ -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 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
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	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+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -1147,7 +1155,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
@@ -1462,7 +1470,7 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 pktools configure 2.2
-generated by GNU Autoconf 2.67
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1508,7 +1516,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_compile
@@ -1546,7 +1554,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1583,7 +1591,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1596,10 +1604,10 @@ fi
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1666,7 +1674,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1675,7 +1683,7 @@ eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -1716,7 +1724,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1730,7 +1738,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1748,7 +1756,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1784,7 +1792,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_cpp
@@ -1826,7 +1834,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_run
@@ -1839,10 +1847,10 @@ fi
 ac_fn_cxx_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1909,7 +1917,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1918,7 +1926,7 @@ eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_cxx_check_header_mongrel
 
@@ -1931,7 +1939,7 @@ ac_fn_cxx_check_type ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -1972,7 +1980,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_cxx_check_type
 cat >config.log <<_ACEOF
@@ -1980,7 +1988,7 @@ 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.2, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2238,7 +2246,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2375,7 +2383,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2462,11 +2470,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2552,7 +2560,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2592,7 +2600,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2645,7 +2653,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2696,7 +2704,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2736,7 +2744,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2850,7 +2858,7 @@ fi
 set dummy gdal-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDAL_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GDAL_CONFIG in
@@ -2891,7 +2899,7 @@ else
 set dummy gdal-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDAL_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GDAL_CONFIG in
@@ -3057,7 +3065,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -3101,7 +3109,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -3265,7 +3273,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C++ compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3308,7 +3316,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3367,7 +3375,7 @@ $as_echo "$ac_try_echo"; } >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run C++ compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3378,7 +3386,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3419,7 +3427,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3429,7 +3437,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3466,7 +3474,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -3614,7 +3622,7 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3742,7 +3750,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -3782,7 +3790,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -3832,195 +3840,7 @@ fi
 
 # check if the source folder is correct
 
-
-
-# Check whether --with-gdal was given.
-if test "${with_gdal+set}" = set; then :
-  withval=$with_gdal; ac_gdal_config_path=$withval
-else
-  gdal_config_system=check
-fi
-
-
-        if test "x$gdal_config_system" = xcheck; then :
-  # Extract the first word of "gdal-config", so it can be a program name with args.
-set dummy gdal-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $GDAL_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_GDAL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-GDAL_CONFIG=$ac_cv_path_GDAL_CONFIG
-if test -n "$GDAL_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_CONFIG" >&5
-$as_echo "$GDAL_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-else
-  # Extract the first word of "gdal-config", so it can be a program name with args.
-set dummy gdal-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $GDAL_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in `dirname $ac_gdal_config_path 2> /dev/null`
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_GDAL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
-  ;;
-esac
-fi
-GDAL_CONFIG=$ac_cv_path_GDAL_CONFIG
-if test -n "$GDAL_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_CONFIG" >&5
-$as_echo "$GDAL_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-fi
-
-    if test ! -x "$GDAL_CONFIG"; then
-        as_fn_error $? "gdal-config does not exist or it is not an exectuable file" "$LINENO" 5
-            GDAL_CONFIG="no"
-            found_gdal="no"
-    fi
-
-    GDAL_VERSION=""
-    GDAL_CFLAGS=""
-    GDAL_LDFLAGS=""
-    GDAL_DEP_LDFLAGS=""
-    GDAL_OGR_ENABLED=""
-
-
-
-    if test "$GDAL_CONFIG" != "no"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDAL library" >&5
-$as_echo_n "checking for GDAL library... " >&6; }
-
-        GDAL_VERSION="`$GDAL_CONFIG --version`"
-        GDAL_CFLAGS="`$GDAL_CONFIG --cflags`"
-        GDAL_LDFLAGS="`$GDAL_CONFIG --libs`"
-        GDAL_DEP_LDFLAGS="`$GDAL_CONFIG --dep-libs`"
-
-
-$as_echo "#define HAVE_GDAL 1" >>confdefs.h
-
-
-        found_gdal="yes"
-    else
-        found_gdal="no"
-    fi
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_gdal" >&5
-$as_echo "$found_gdal" >&6; }
-
-    if test "$found_gdal" = "yes"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OGR support in GDAL library" >&5
-$as_echo_n "checking for OGR support in GDAL library... " >&6; }
-
-        GDAL_OGR_ENABLED="`$GDAL_CONFIG --ogr-enabled`"
-
-$as_echo "#define HAVE_GDAL_OGR 1" >>confdefs.h
-
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_OGR_ENABLED" >&5
-$as_echo "$GDAL_OGR_ENABLED" >&6; }
-    fi
-
-
-    gdal_version_req=1.8.0
-    if test "$found_gdal" = "yes" -a -n "$gdal_version_req"; then
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GDAL version is >= $gdal_version_req" >&5
-$as_echo_n "checking if GDAL version is >= $gdal_version_req... " >&6; }
-
-                        gdal_version_req_major=`expr $gdal_version_req : '\([0-9]*\)'`
-        gdal_version_req_minor=`expr $gdal_version_req : '[0-9]*\.\([0-9]*\)'`
-        gdal_version_req_micro=`expr $gdal_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
-        if test "x$gdal_version_req_micro" = "x"; then
-            gdal_version_req_micro="0"
-        fi
-
-        gdal_version_req_number=`expr $gdal_version_req_major \* 1000000 \
-                                   \+ $gdal_version_req_minor \* 1000 \
-                                   \+ $gdal_version_req_micro`
-
-                        gdal_version_major=`expr $GDAL_VERSION : '\([0-9]*\)'`
-        gdal_version_minor=`expr $GDAL_VERSION : '[0-9]*\.\([0-9]*\)'`
-        gdal_version_micro=`expr $GDAL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
-        if test "x$gdal_version_micro" = "x"; then
-            gdal_version_micro="0"
-        fi
-
-        gdal_version_number=`expr $gdal_version_major \* 1000000 \
-                                   \+ $gdal_version_minor \* 1000 \
-                                   \+ $gdal_version_micro`
-
-        gdal_version_check=`expr $gdal_version_number \>\= $gdal_version_req_number`
-        if test "$gdal_version_check" = "1"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-as_fn_error $? "GDAL $GDAL_VERSION found, but required version is $gdal_version_req" "$LINENO" 5
-        fi
-    fi
-
-
-
-
-
-
+#AX_LIB_GDAL([1.8.0]) dnl uncomment if gdal version 1.8.0 is required
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -4032,7 +3852,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4072,7 +3892,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -4125,7 +3945,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4165,7 +3985,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4224,7 +4044,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4268,7 +4088,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -4323,7 +4143,7 @@ fi
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4352,7 +4172,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4389,7 +4209,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4467,7 +4287,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4566,7 +4386,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4702,7 +4522,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4818,7 +4638,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4830,7 +4650,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4893,7 +4713,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4960,7 +4780,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5090,7 +4910,7 @@ done
 for ac_header in gdal.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "gdal.h" "ac_cv_header_gdal_h" "$ac_includes_default"
-if test "x$ac_cv_header_gdal_h" = x""yes; then :
+if test "x$ac_cv_header_gdal_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GDAL_H 1
 _ACEOF
@@ -5112,13 +4932,14 @@ 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.
 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -5161,7 +4982,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -5242,6 +5063,7 @@ if test -n "$FANN_CFLAGS"; then
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_FANN_CFLAGS=`$PKG_CONFIG --cflags "fann >= 2.1.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -5258,6 +5080,7 @@ if test -n "$FANN_LIBS"; then
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_FANN_LIBS=`$PKG_CONFIG --libs "fann >= 2.1.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -5277,9 +5100,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        FANN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fann >= 2.1.0" 2>&1`
+	        FANN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fann >= 2.1.0" 2>&1`
         else
-	        FANN_PKG_ERRORS=`$PKG_CONFIG --print-errors "fann >= 2.1.0" 2>&1`
+	        FANN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fann >= 2.1.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$FANN_PKG_ERRORS" >&5
@@ -5381,6 +5204,7 @@ if test -n "$NLOPT_CFLAGS"; then
   $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`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -5397,6 +5221,7 @@ if test -n "$NLOPT_LIBS"; then
   $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`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -5416,9 +5241,9 @@ 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`
+	        NLOPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nlopt >= 2.1.0" 2>&1`
         else
-	        NLOPT_PKG_ERRORS=`$PKG_CONFIG --print-errors "nlopt >= 2.1.0" 2>&1`
+	        NLOPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nlopt >= 2.1.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$NLOPT_PKG_ERRORS" >&5
@@ -5477,6 +5302,7 @@ if test -n "$GSL_CFLAGS"; then
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GSL_CFLAGS=`$PKG_CONFIG --cflags "gsl >= 1.14" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -5493,6 +5319,7 @@ if test -n "$GSL_LIBS"; then
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GSL_LIBS=`$PKG_CONFIG --libs "gsl >= 1.14" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -5512,9 +5339,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gsl >= 1.14" 2>&1`
+	        GSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gsl >= 1.14" 2>&1`
         else
-	        GSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "gsl >= 1.14" 2>&1`
+	        GSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gsl >= 1.14" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GSL_PKG_ERRORS" >&5
@@ -5558,7 +5385,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
 if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  if ${ac_cv_prog_CXXCPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CXXCPP needs to be expanded
@@ -5674,7 +5501,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=cpp
@@ -5686,7 +5513,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5799,7 +5626,7 @@ fi
 for ac_header in string
 do :
   ac_fn_cxx_check_header_mongrel "$LINENO" "string" "ac_cv_header_string" "$ac_includes_default"
-if test "x$ac_cv_header_string" = x""yes; then :
+if test "x$ac_cv_header_string" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STRING 1
 _ACEOF
@@ -5811,7 +5638,7 @@ done
 for ac_header in iostream
 do :
   ac_fn_cxx_check_header_mongrel "$LINENO" "iostream" "ac_cv_header_iostream" "$ac_includes_default"
-if test "x$ac_cv_header_iostream" = x""yes; then :
+if test "x$ac_cv_header_iostream" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_IOSTREAM 1
 _ACEOF
@@ -5823,7 +5650,7 @@ done
 
 # Checks for typedefs, structures, and compiler characteristics.
 ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
 
 else
 
@@ -5911,10 +5738,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -5994,7 +5832,7 @@ if test -z "${USE_GSL_TRUE}" && test -z "${USE_GSL_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -6095,6 +5933,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
@@ -6402,7 +6241,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by pktools $as_me 2.2, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6468,7 +6307,7 @@ 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.2
-configured by $0, generated by GNU Autoconf 2.67,
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -6605,7 +6444,7 @@ do
     "src/fileclasses/Makefile") CONFIG_FILES="$CONFIG_FILES src/fileclasses/Makefile" ;;
     "src/apps/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/Makefile" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -6628,9 +6467,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -6638,12 +6478,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6665,7 +6506,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -6693,7 +6534,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -6741,7 +6582,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -6773,7 +6614,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -6807,7 +6648,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6819,8 +6660,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -6921,7 +6762,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -6940,7 +6781,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -6949,7 +6790,7 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -6975,8 +6816,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -7112,21 +6953,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
@@ -7137,20 +6979,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
diff --git a/configure.ac b/configure.ac
index 538c9ce..fa22f13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ AC_PROG_RANLIB
 
 # check if the source folder is correct
 AC_CONFIG_SRCDIR([src/apps/pkinfo.cc])
-AX_LIB_GDAL([1.8.0]) dnl uncomment if gdal version 1.8.0 is required
+#AX_LIB_GDAL([1.8.0]) dnl uncomment if gdal version 1.8.0 is required
 
 AC_CHECK_HEADERS([gdal.h])
 
diff --git a/src/algorithms/Filter2d.cc b/src/algorithms/Filter2d.cc
index 28f6ab5..8efb064 100644
--- a/src/algorithms/Filter2d.cc
+++ b/src/algorithms/Filter2d.cc
@@ -172,7 +172,7 @@ void Filter2d::Filter2d::filter(const ImgReaderGdal& input, ImgWriterGdal& outpu
 	  }
         }
         if(absolute)
-          outBuffer[x]=(normalize)? abs(outBuffer[x])/norm : abs(outBuffer[x]);
+          outBuffer[x]=(normalize&&norm)? abs(outBuffer[x])/norm : abs(outBuffer[x]);
         else if(normalize&&norm!=0)
           outBuffer[x]=outBuffer[x]/norm;
       }
@@ -553,6 +553,10 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output,
           outBuffer[x/down]=hist.min(windowBuffer);
           break;
         }
+        case(ISMIN):{
+          outBuffer[x/down]=(hist.min(windowBuffer)==windowBuffer[dimX*dimY/2])? 1:0;
+          break;
+        }
         case(MINMAX):{
           double min=0;
           double max=0;
@@ -570,6 +574,20 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output,
           outBuffer[x/down]=hist.max(windowBuffer);
           break;
         }
+        case(ISMAX):{
+          outBuffer[x/down]=(hist.max(windowBuffer)==windowBuffer[dimX*dimY/2])? 1:0;
+          break;
+        }
+        case(ORDER):{
+          double lbound=0;
+          double ubound=dimX*dimY;
+          double theMin=hist.min(windowBuffer);
+          double theMax=hist.max(windowBuffer);
+          // outBuffer[x]=hist.median(windowBuffer);
+          double scale=(ubound-lbound)/(theMax-theMin);
+          outBuffer[x/down]=static_cast<short>(scale*(windowBuffer[dimX*dimY/2]-theMin)+lbound);
+          break;
+        }
         case(SUM):{
           // outBuffer[x]=hist.sum(windowBuffer);
           outBuffer[x/down]=hist.sum(windowBuffer);
@@ -583,6 +601,19 @@ void Filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output,
 	    outBuffer[x/down]=m_noValue;
 	    // outBuffer[x]=m_noValue;
           break;
+        case(HETEROG):{
+          for(vector<double>::const_iterator wit=windowBuffer.begin();wit!=windowBuffer.end();++wit){
+            if(wit==windowBuffer.begin()+windowBuffer.size()/2)
+              continue;
+            else if(*wit!=inBuffer[dimY/2][x])
+              outBuffer[x/down]=1;
+            else if(*wit==inBuffer[dimY/2][x]){//todo:wit mag niet central pixel zijn
+              outBuffer[x/down]=m_noValue;
+              break;
+            }
+          }
+          break;
+        }
         case(DENSITY):{
 	  if(windowBuffer.size()){
 	    vector<short>::const_iterator vit=m_class.begin();
@@ -827,10 +858,12 @@ void Filter2d::Filter2d::morphology(const ImgReaderGdal& input, ImgWriterGdal& o
 	}
       }
       for(int x=0;x<input.nrOfCol();++x){
-	outBuffer[x]=0;
+	// outBuffer[x]=0;
         double currentValue=inBuffer[dimY/2][x];
+	outBuffer[x]=currentValue;
 	vector<double> histBuffer;
 	bool currentMasked=false;
+        double rse=0;
 	for(int imask=0;imask<m_mask.size();++imask){
 	  if(currentValue==m_mask[imask]){
 	    currentMasked=true;
@@ -845,17 +878,44 @@ void Filter2d::Filter2d::morphology(const ImgReaderGdal& input, ImgWriterGdal& o
 	    for(int i=-dimX/2;i<(dimX+1)/2;++i){
 	      if(disc&&(i*i+j*j>(dimX/2)*(dimY/2)))
 		continue;
-	      // if(angle>=-180){
-	      // 	double theta;
-	      // 	if(i)
-	      // 	  theta=atan(static_cast<double>(j)/(static_cast<double>(i)));
-	      // 	else if(j>0)
-	      // 	  theta=PI/2.0;
-	      // 	else if(j<0)
-	      // 	  theta=3.0*PI/2.0;
-	      // 	if(j&&(theta<DEG2RAD(angle)||theta>DEG2RAD(angle+PI)))
-	      // 	  continue;
-	      // }
+              bool masked=false;
+	      if(angle>=-180){
+	      	// double theta;
+	      	// if(i>0)
+	      	//   theta=atan(static_cast<double>(j)/(static_cast<double>(i)));
+	      	// else if(i<0)
+	      	//   theta=PI+atan(static_cast<double>(j)/(static_cast<double>(i)));
+	      	// else if(j>0)
+	      	//   theta=PI/2.0;
+	      	// else if(j<0)
+	      	//   theta=3.0*PI/2.0;
+                // rse=sqrt((theta-DEG2RAD(angle))*(theta-DEG2RAD(angle))/theta/theta);
+                // //test
+                if(angle<45||angle>315)
+                  if((j!=0)||(i>0))//RIGHT
+                    continue;
+                if(angle>135&&angle<225)
+                  if(j!=0||i<0)//LEFT
+                    continue;
+                if(angle>45&&angle<135)
+                  if(j<0||i!=0)//UP
+                    continue;
+                if(angle>225&&angle<315)
+                  if(j>0||i!=0)//DOWN
+                    continue;
+                if(angle>270&&angle<360)
+                  if(j>0||i>0)//LOWER RIGHT
+                    continue;
+                if(angle>0&&angle<90)
+                  if(j<0||i>0)//UPPER RIGHT
+                    continue;
+                if(angle>180&&angle<270)
+                  if(j>0||i<0)//LOWER LEFT
+                    continue;
+                if(angle>90&&angle<180)
+                  if(j<0||i<0)//UPPER LEFT
+                    continue;
+	      }
 	      indexI=x+i;
 	      //check if out of bounds
 	      if(indexI<0)
@@ -868,7 +928,6 @@ void Filter2d::Filter2d::morphology(const ImgReaderGdal& input, ImgWriterGdal& o
 		indexJ=dimY/2-j;//indexJ=inBuffer.size()-1-j;
 	      else
 		indexJ=dimY/2+j;
-	      bool masked=false;
 	      for(int imask=0;imask<m_mask.size();++imask){
 		if(inBuffer[indexJ][indexI]==m_mask[imask]){
 		  masked=true;
@@ -889,21 +948,22 @@ void Filter2d::Filter2d::morphology(const ImgReaderGdal& input, ImgWriterGdal& o
 		  histBuffer.push_back(inBuffer[indexJ][indexI]);
 	      }
 	    }
-	  }
-	  assert(histBuffer.size());//should never occur if not masked (?)
-	  switch(method){
-	  case(DILATE):
-	    outBuffer[x]=hist.max(histBuffer);
-	    break;
-	  case(ERODE):
-	    outBuffer[x]=hist.min(histBuffer);
-	    break;
-	  default:
-	    ostringstream ess;
-	    ess << "Error:  morphology method " << method << " not supported, choose " << DILATE << " (dilate) or " << ERODE << " (erode)" << endl;
-	    throw(ess.str());
-	    break;
-	  }
+          }
+	  if(histBuffer.size()){
+            switch(method){
+            case(DILATE):
+              outBuffer[x]=hist.max(histBuffer);
+              break;
+            case(ERODE):
+              outBuffer[x]=hist.min(histBuffer);
+              break;
+            default:
+              ostringstream ess;
+              ess << "Error:  morphology method " << method << " not supported, choose " << DILATE << " (dilate) or " << ERODE << " (erode)" << endl;
+              throw(ess.str());
+              break;
+            }
+          }
 	  if(outBuffer[x]&&m_class.size())
 	    outBuffer[x]=m_class[0];
 	  // else{
diff --git a/src/algorithms/Filter2d.h b/src/algorithms/Filter2d.h
index d431682..23debe5 100644
--- a/src/algorithms/Filter2d.h
+++ b/src/algorithms/Filter2d.h
@@ -33,7 +33,7 @@ using namespace std;
 // using namespace cimg_library;
 namespace Filter2d
 {
-  enum 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, SMOOTH=15, DENSITY=16, MAJORITY=17, MIXED=18, SMOOTHNODATA=19, THRESHOLD=20};
+  enum 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};
   
 class Filter2d
 {
diff --git a/src/apps/pkcrop.cc b/src/apps/pkcrop.cc
index c071c09..65a0475 100644
--- a/src/apps/pkcrop.cc
+++ b/src/apps/pkcrop.cc
@@ -57,10 +57,10 @@ int main(int argc, char *argv[])
   Optionpk<int>  band_opt("b", "band", "band index to crop (-1: crop all bands)", -1);
   Optionpk<double> scale_opt("s", "scale", "output=scale*input+offset", 1);
   Optionpk<double> offset_opt("off", "offset", "output=scale*input+offset", 0);
-  Optionpk<string>  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<string>  oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image", "");
+  Optionpk<string>  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<string>  oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image");
   Optionpk<string>  colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)", "");
-  Optionpk<string> option_opt("co", "co", "options: NAME=VALUE [-co COMPRESS=LZW] [-co INTERLEAVE=BAND]", "INTERLEAVE=BAND");
+  Optionpk<string> option_opt("co", "co", "options: NAME=VALUE [-co COMPRESS=LZW] [-co INTERLEAVE=BAND]");
   Optionpk<short>  flag_opt("f", "flag", "Flag value to put in image if out of bounds.", 0);
   Optionpk<string>  resample_opt("r", "resampling-method", "Resampling method (near: nearest neighbour, bilinear: bi-linear interpolation).", "near");
   Optionpk<string>  description_opt("d", "description", "Set image description", "");
@@ -296,7 +296,7 @@ int main(int argc, char *argv[])
       // else
       //   theInterleave=imgReader.getInterleave();
       string imageType=imgReader.getImageType();
-      if(oformat_opt[0]!="")//default
+      if(oformat_opt.size())//default
         imageType=oformat_opt[0];
       try{
         imgWriter.open(output_opt[0],ncropcol,ncroprow,ncropband,theType,imageType,option_opt);
@@ -338,8 +338,6 @@ int main(int argc, char *argv[])
     else if(lri>=imgReader.nrOfCol())
       endCol=imgReader.nrOfCol()-1;
     int readncol=endCol-startCol+1;
-    //test
-    // vector<double> readBuffer(readncol);
     vector<double> readBuffer(readncol+1);
     int nband=(band_opt[0]<0)?imgReader.nrOfBand():band_opt.size();
     for(int iband=0;iband<nband;++iband){
@@ -376,8 +374,6 @@ int main(int argc, char *argv[])
               imgReader.readData(readBuffer,GDT_Float64,startCol,endCol+1,readRow,readBand,theResample);
             else
               imgReader.readData(readBuffer,GDT_Float64,startCol,endCol,readRow,readBand,theResample);
-            //test
-	    // imgReader.readData(readBuffer,GDT_Float64,startCol,endCol,readRow,readBand,theResample);
 	    for(int ib=0;ib<ncropcol;++ib){
 	      assert(imgWriter.image2geo(ib,irow,x,y));
 	      //lookup corresponding row for irow in this file
diff --git a/src/apps/pkfilter.cc b/src/apps/pkfilter.cc
index 34018d5..4057d6b 100644
--- a/src/apps/pkfilter.cc
+++ b/src/apps/pkfilter.cc
@@ -53,17 +53,20 @@ int main(int argc,char **argv) {
   Optionpk<std::string> input_opt("i","input","input image file","");
   Optionpk<std::string> output_opt("o", "output", "Output image file", "");
   Optionpk<bool> disc_opt("c", "circular", "circular disc kernel for dilation and erosion", false);
-  // Optionpk<double> angle_opt("a", "angle", "angle used for directional filtering in dilation. Default is less than -180 (no directional effect)", -190);
-  Optionpk<int> function_opt("f", "filter", "filter function (0: median, 1: variance, 2: min, 3: max, 4: sum, 5: mean, 6: minmax, 7: dilation, 8: erosion, 9: closing, 10: opening, 11: spatially homogeneous, 12: SobelX edge detection in X, 13: SobelY edge detection in Y, 14: SobelXY (not supported), 15: smooth, 16: density, 17: majority voting (only for classes), 18: forest aggregation (mixed), 19: smooth no data (mask) values), 20: threshold local filtering", 0);
-  Optionpk<int> dimX_opt("dx", "dx", "filter kernel size in x, must be odd (example: 3).", 0);
-  Optionpk<int> 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<string> option_opt("co", "co", "options: NAME=VALUE [-co COMPRESS=LZW] [-co INTERLEAVE=BAND]", "INTERLEAVE=BAND");
+  Optionpk<double> angle_opt("a", "angle", "angle used for directional filtering in dilation.");
+  Optionpk<int> function_opt("f", "filter", "filter function (0: median, 1: variance, 2: min, 3: max, 4: sum, 5: mean, 6: minmax, 7: dilation, 8: erosion, 9: closing, 10: opening, 11: spatially homogeneous (central pixel must be identical to all other pixels within window), 12: SobelX edge detection in X, 13: SobelY edge detection in Y, 14: SobelXY, -14: SobelYX, 15: smooth, 16: density, 17: majority voting (only for classes), 18: forest aggregation (mixed), 19: smooth no data (mask) val [...]
+  Optionpk<int> dimX_opt("dx", "dx", "filter kernel size in x, must be odd", 3);
+  Optionpk<int> dimY_opt("dy", "dy", "filter kernel size in y, must be odd", 3);
+  Optionpk<int> dimZ_opt("dz", "dz", "filter kernel size in z (band or spectral dimension), must be odd (example: 3).. Set dz>0 if 1-D filter must be used in band domain");
   Optionpk<short> class_opt("class", "class", "class value(s) to use for density, erosion, dilation, openening and closing, thresholding");
   Optionpk<double> threshold_opt("t", "threshold", "threshold value(s) to use for threshold filter (one for each class)", 0);
   Optionpk<short> mask_opt("\0", "mask", "mask value(s) ");
-  Optionpk<std::string> tap_opt("tap", "tap", "text file containing taps used for spatial filtering (from ul to lr). Use dimX and dimY to specify tap dimensions in x and y. Leave empty for not using taps", "");
+  Optionpk<std::string> tap_opt("tap", "tap", "text file containing taps used for spatial filtering (from ul to lr). Use dimX and dimY to specify tap dimensions in x and y. Leave empty for not using taps");
   Optionpk<double> tapz_opt("tapz", "tapz", "taps used for spectral filtering");
-  Optionpk<std::string> colorTable_opt("\0", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)", "");
+  Optionpk<std::string>  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<string>  oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image");
+  Optionpk<string>  colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)", "");
+  Optionpk<std::string> option_opt("co", "co", "options: NAME=VALUE [-co COMPRESS=LZW] [-co INTERLEAVE=BAND]");
   Optionpk<short> down_opt("d", "down", "down sampling factor. Use value 1 for no downsampling)", 1);
   Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0);
 
@@ -75,9 +78,11 @@ int main(int argc,char **argv) {
   input_opt.retrieveOption(argc,argv);
   output_opt.retrieveOption(argc,argv);
   disc_opt.retrieveOption(argc,argv);
+  angle_opt.retrieveOption(argc,argv);
   function_opt.retrieveOption(argc,argv);
   dimX_opt.retrieveOption(argc,argv);
   dimY_opt.retrieveOption(argc,argv);
+  dimZ_opt.retrieveOption(argc,argv);
   option_opt.retrieveOption(argc,argv);
   class_opt.retrieveOption(argc,argv);
   threshold_opt.retrieveOption(argc,argv);
@@ -85,6 +90,8 @@ int main(int argc,char **argv) {
   tap_opt.retrieveOption(argc,argv);
   tapz_opt.retrieveOption(argc,argv);
   down_opt.retrieveOption(argc,argv);
+  otype_opt.retrieveOption(argc,argv);
+  oformat_opt.retrieveOption(argc,argv);
   colorTable_opt.retrieveOption(argc,argv);
   verbose_opt.retrieveOption(argc,argv);
 
@@ -106,8 +113,34 @@ int main(int argc,char **argv) {
   ImgWriterGdal output;
   input.open(input_opt[0]);
   // output.open(output_opt[0],input);
+  GDALDataType theType=GDT_Unknown;
+  if(verbose_opt[0])
+    cout << "possible output data types: ";
+  for(int iType = 0; iType < GDT_TypeCount; ++iType){
+    if(verbose_opt[0])
+      cout << " " << GDALGetDataTypeName((GDALDataType)iType);
+    if( GDALGetDataTypeName((GDALDataType)iType) != NULL
+        && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
+                 otype_opt[0].c_str()))
+      theType=(GDALDataType) iType;
+  }
+  if(theType==GDT_Unknown)
+    theType=input.getDataType();
 
-  output.open(output_opt[0],(input.nrOfCol()+down_opt[0]-1)/down_opt[0],(input.nrOfRow()+down_opt[0]-1)/down_opt[0],input.nrOfBand(),input.getDataType(),input.getImageType(),option_opt);
+  if(verbose_opt[0])
+    std::cout << std::endl << "Output pixel type:  " << GDALGetDataTypeName(theType) << endl;
+
+  string imageType=input.getImageType();
+  if(oformat_opt.size())
+    imageType=oformat_opt[0];
+
+  try{
+    output.open(output_opt[0],(input.nrOfCol()+down_opt[0]-1)/down_opt[0],(input.nrOfRow()+down_opt[0]-1)/down_opt[0],input.nrOfBand(),theType,imageType,option_opt);
+  }
+  catch(string errorstring){
+    cout << errorstring << endl;
+    exit(4);
+  }
   if(input.isGeoRef()){
     output.setProjection(input.getProjection());
     double ulx,uly,deltaX,deltaY,rot1,rot2;
@@ -121,13 +154,13 @@ int main(int argc,char **argv) {
   //   output.setProjection(input.getProjection());
   //   output.copyGeoTransform(input);
   // }
-  
+
   Filter2d::Filter2d filter2d;
   Filter filter1d;
   if(verbose_opt[0])
     std::cout<< "class values: ";
   for(int iclass=0;iclass<class_opt.size();++iclass){
-    if(dimY_opt[0]>0)
+    if(!dimZ_opt.size())
       filter2d.pushClass(class_opt[iclass]);
     else
       filter1d.pushClass(class_opt[iclass]);
@@ -145,7 +178,7 @@ int main(int argc,char **argv) {
   }
   if(verbose_opt[0])
     std::cout<< std::endl;
-  if(tap_opt[0]!=""){
+  if(tap_opt.size()){
     ifstream tapfile(tap_opt[0].c_str());
     assert(tapfile);
     Vector2d<double> taps(dimY_opt[0],dimX_opt[0]);
@@ -156,6 +189,7 @@ int main(int argc,char **argv) {
       }
     }
     if(verbose_opt[0]){
+      std::cout << "taps: ";
       for(int j=0;j<dimY_opt[0];++j){
         for(int i=0;i<dimX_opt[0];++i){
           std::cout<< taps[j][i] << " ";
@@ -184,9 +218,15 @@ int main(int argc,char **argv) {
     case(Filter2d::MIN):
       filter2d.doit(input,output,Filter2d::MIN,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
       break;
+    case(Filter2d::ISMIN):
+      filter2d.doit(input,output,Filter2d::ISMIN,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
+      break;
     case(Filter2d::MAX):
       filter2d.doit(input,output,Filter2d::MAX,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
       break;
+    case(Filter2d::ISMAX):
+      filter2d.doit(input,output,Filter2d::ISMAX,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
+      break;
     case(Filter2d::MINMAX):
       filter2d.doit(input,output,Filter2d::MINMAX,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
       break;
@@ -208,21 +248,29 @@ int main(int argc,char **argv) {
       filter2d.doit(input,output,Filter2d::MIXED,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
       break;
     case(Filter2d::DILATE):
-      if(dimY_opt[0]>0)
-        filter2d.morphology(input,output,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0],-190);
-      else{
+      if(dimZ_opt.size()){
         if(verbose_opt[0])
           std::cout<< "1-D filtering: dilate" << std::endl;
-        filter1d.morphology(input,output,Filter::DILATE,dimX_opt[0]);
+        filter1d.morphology(input,output,Filter::DILATE,dimZ_opt[0]);
+      }
+      else{
+        if(angle_opt.size())
+          filter2d.morphology(input,output,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0],angle_opt[0]);
+        else
+          filter2d.morphology(input,output,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0]);
       }
       break;
     case(Filter2d::ERODE):
-      if(dimY_opt[0]>0)
-        filter2d.morphology(input,output,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0],-190);
-      else{
+      if(dimZ_opt[0]>0){
         if(verbose_opt[0])
           std::cout<< "1-D filtering: dilate" << std::endl;
-        filter1d.morphology(input,output,Filter::ERODE,dimX_opt[0]);
+        filter1d.morphology(input,output,Filter::ERODE,dimZ_opt[0]);
+      }
+      else{
+        if(angle_opt.size())
+          filter2d.morphology(input,output,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0],angle_opt[0]);
+        else
+          filter2d.morphology(input,output,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0]);
       }
       break;
     case(Filter2d::CLOSE):{//closing
@@ -231,10 +279,15 @@ int main(int argc,char **argv) {
       ImgWriterGdal tmpout;
       tmpout.open(tmps.str(),input);
       try{
-        if(dimY_opt[0]>0)
-          filter2d.morphology(input,tmpout,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0],-190);
-        else
-          filter1d.morphology(input,tmpout,Filter::DILATE,dimX_opt[0]);
+        if(dimZ_opt.size()){
+          filter1d.morphology(input,tmpout,Filter::DILATE,dimZ_opt[0]);
+        }
+        else{
+          if(angle_opt.size())
+            filter2d.morphology(input,tmpout,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0],angle_opt[0]);
+          else
+            filter2d.morphology(input,tmpout,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0]);
+        }
       }
       catch(std::string errorString){
 	std::cout<< errorString;
@@ -243,10 +296,15 @@ int main(int argc,char **argv) {
       tmpout.close();
       ImgReaderGdal tmpin;
       tmpin.open(tmps.str());
-      if(dimY_opt[0]>0)
-        filter2d.morphology(tmpin,output,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0],-190);
-      else
-        filter1d.morphology(tmpin,output,Filter::ERODE,dimX_opt[0]);
+      if(dimZ_opt.size()){
+        filter1d.morphology(tmpin,output,Filter::ERODE,dimZ_opt[0]);
+      }
+      else{
+        if(angle_opt.size())
+          filter2d.morphology(tmpin,output,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0],angle_opt[0]);
+        else
+          filter2d.morphology(tmpin,output,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0]);
+      }
       tmpin.close();
       if(remove(tmps.str().c_str( )) !=0){
         cerr << "could not remove " << tmps.str() << std::endl;
@@ -258,17 +316,27 @@ int main(int argc,char **argv) {
       tmps << "/tmp/erosion_" << getpid() << ".tif";
       ImgWriterGdal tmpout;
       tmpout.open(tmps.str(),input);
-      if(dimY_opt[0]>0)
-        filter2d.morphology(input,tmpout,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0],-190);
-      else
-        filter1d.morphology(input,tmpout,Filter::ERODE,dimX_opt[0]);
+      if(dimZ_opt.size()){
+        filter1d.morphology(input,tmpout,Filter::ERODE,dimZ_opt[0]);
+      }
+      else{
+        if(angle_opt.size())
+          filter2d.morphology(input,tmpout,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0],angle_opt[0]);
+        else
+          filter2d.morphology(input,tmpout,Filter2d::ERODE,dimX_opt[0],dimY_opt[0],disc_opt[0]);
+      }
       tmpout.close();
       ImgReaderGdal tmpin;
       tmpin.open(tmps.str());
-      if(dimY_opt[0]>0)
-        filter2d.morphology(tmpin,output,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0],-190);
-      else
-        filter1d.morphology(tmpin,output,Filter::DILATE,dimX_opt[0]);
+      if(dimZ_opt.size()){
+        filter1d.morphology(tmpin,output,Filter::DILATE,dimZ_opt[0]);
+      }
+      else{
+        if(angle_opt.size())
+          filter2d.morphology(tmpin,output,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0],angle_opt[0]);
+        else
+          filter2d.morphology(tmpin,output,Filter2d::DILATE,dimX_opt[0],dimY_opt[0],disc_opt[0]);
+      }
       tmpin.close();
       if(remove(tmps.str().c_str( )) !=0){
         cerr << "could not remove " << tmps.str() << std::endl;
@@ -280,6 +348,10 @@ int main(int argc,char **argv) {
       // filter2d.homogeneousSpatial(input,output,dimX_opt[0],disc_opt[0]);
       break;
     }
+    case(Filter2d::HETEROG):{//spatially heterogeneous
+      filter2d.doit(input,output,Filter2d::HETEROG,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
+      break;
+    }
     case(Filter2d::SOBELX):{//Sobel edge detection in X
       Vector2d<double> theTaps(3,3);
       theTaps[0][0]=-1.0;
@@ -310,6 +382,36 @@ int main(int argc,char **argv) {
       filter2d.filter(input,output,true);
       break;
     }
+    case(Filter2d::SOBELXY):{//Sobel edge detection in XY
+      Vector2d<double> theTaps(3,3);
+      theTaps[0][0]=0.0;
+      theTaps[0][1]=1.0;
+      theTaps[0][2]=2.0;
+      theTaps[1][0]=-1.0;
+      theTaps[1][1]=0.0;
+      theTaps[1][2]=1.0;
+      theTaps[2][0]=-2.0;
+      theTaps[2][1]=-1.0;
+      theTaps[2][2]=0.0;
+      filter2d.setTaps(theTaps);
+      filter2d.filter(input,output,true);
+      break;
+    }
+    case(Filter2d::SOBELYX):{//Sobel edge detection in XY
+      Vector2d<double> theTaps(3,3);
+      theTaps[0][0]=2.0;
+      theTaps[0][1]=1.0;
+      theTaps[0][2]=0.0;
+      theTaps[1][0]=1.0;
+      theTaps[1][1]=0.0;
+      theTaps[1][2]=-1.0;
+      theTaps[2][0]=0.0;
+      theTaps[2][1]=-1.0;
+      theTaps[2][2]=-2.0;
+      filter2d.setTaps(theTaps);
+      filter2d.filter(input,output,true);
+      break;
+    }
     case(Filter2d::SMOOTH):{//Smoothing filter
       filter2d.smooth(input,output,dimX_opt[0],dimY_opt[0]);
       break;
@@ -322,6 +424,11 @@ int main(int argc,char **argv) {
       filter2d.doit(input,output,Filter2d::DENSITY,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
       break;
     }
+    case(Filter2d::ORDER):{//order centre pixel with respect to values in window
+      assert(dimX_opt[0]);
+      filter2d.doit(input,output,Filter2d::ORDER,dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
+      break;
+    }
     default:
       cerr << "filter function " << function_opt[0] << " not supported" << std::endl;
       return 1;
diff --git a/src/apps/pksetmask.cc b/src/apps/pksetmask.cc
index 619edd6..356eddb 100644
--- a/src/apps/pksetmask.cc
+++ b/src/apps/pksetmask.cc
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
   Optionpk<string> output_opt("o", "output", "Output mask file", "");
   Optionpk<string>  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<string>  oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image", "");
-  Optionpk<string> option_opt("co", "co", "options: NAME=VALUE [-co COMPRESS=LZW] [-co INTERLEAVE=BAND]", "");
+  Optionpk<string> option_opt("co", "co", "options: NAME=VALUE [-co COMPRESS=LZW] [-co INTERLEAVE=BAND]");
   Optionpk<unsigned short> 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<char> operator_opt("p", "operator", "Operator: < = > !. Use operator for each invalid option", '=');
   Optionpk<int> flag_opt("f", "flag", "Flag value to put in image if not valid (0)", 0);

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



More information about the Pkg-grass-devel mailing list