pktools-2.6.6/0000755000113200011300000000000012647712717010221 500000000000000pktools-2.6.6/config.guess0000755000113200011300000013036112201675101012442 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file 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. # # This program 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 this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pktools-2.6.6/Makefile.in0000644000113200011300000007300112645741561012204 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/pktools.pc.in AUTHORS COPYING \ ChangeLog INSTALL NEWS README compile config.guess config.sub \ depcomp install-sh missing ltmain.sh 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 = pktools.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(pktools_libincludedir)" DATA = $(pkgconfig_DATA) HEADERS = $(nodist_pktools_libinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope 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__post_remove_distdir = $(am__remove_distdir) 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; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip 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@ AM_CXXFLAGS = @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_LDFLAGS = @AM_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FANN_CFLAGS = @FANN_CFLAGS@ FANN_LIBS = @FANN_LIBS@ FC = @FC@ FCFLAGS = @FCFLAGS@ FGREP = @FGREP@ GDAL_CFLAGS = @GDAL_CFLAGS@ GDAL_CONFIG = @GDAL_CONFIG@ GDAL_DEP_LDFLAGS = @GDAL_DEP_LDFLAGS@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GDAL_OGR_ENABLED = @GDAL_OGR_ENABLED@ GDAL_VERSION = @GDAL_VERSION@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LASCLASSES_OPT = @LASCLASSES_OPT@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NLOPT_CFLAGS = @NLOPT_CFLAGS@ NLOPT_LIBS = @NLOPT_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKTOOLS_SO_VERSION = @PKTOOLS_SO_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # to include m4 macros into aclocal.m4 ACLOCAL_AMFLAGS = -I m4 # the subdirectories of the project to go into SUBDIRS = src/base \ src/imageclasses \ src/algorithms \ src/fileclasses \ $(LASCLASSES_OPT) \ $(DOX_OPT) \ src/apps pktools_libincludedir = $(libdir)/pktools/include nodist_pktools_libinclude_HEADERS = config.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pktools.pc ######################################################################## # Additional files to be included in tarball # ######################################################################## # Here we need include all files that are not mentioned in other Makefiles EXTRA_DIST = doc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 pktools.pc: $(top_builddir)/config.status $(srcdir)/pktools.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-nodist_pktools_libincludeHEADERS: $(nodist_pktools_libinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_pktools_libinclude_HEADERS)'; test -n "$(pktools_libincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pktools_libincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pktools_libincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pktools_libincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pktools_libincludedir)" || exit $$?; \ done uninstall-nodist_pktools_libincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_pktools_libinclude_HEADERS)'; test -n "$(pktools_libincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pktools_libincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ 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)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pktools_libincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-nodist_pktools_libincludeHEADERS \ install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-nodist_pktools_libincludeHEADERS \ uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-nodist_pktools_libincludeHEADERS \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-nodist_pktools_libincludeHEADERS \ uninstall-pkgconfigDATA #bin_SCRIPTS = pktools-config # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pktools-2.6.6/AUTHORS0000644000113200011300000000004612400110722011160 00000000000000Pieter kempeneers (kempenep@gmail.com)pktools-2.6.6/COPYING0000644000113200011300000010451412400110722011150 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program 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. This program 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 this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . pktools-2.6.6/src/0000755000113200011300000000000012647712720011002 500000000000000pktools-2.6.6/src/algorithms/0000755000113200011300000000000012647712720013153 500000000000000pktools-2.6.6/src/algorithms/OptFactory.h0000644000113200011300000001565512400110722015327 00000000000000/********************************************************************** 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); return(theOptimizer); break; } case(nlopt::GN_ORIG_DIRECT_L):{ nlopt::opt theOptimizer(nlopt::GN_ORIG_DIRECT_L,npar); return(theOptimizer); break; } case(nlopt::LN_PRAXIS):{ nlopt::opt theOptimizer(nlopt::LN_PRAXIS,npar); return(theOptimizer); break; } case(nlopt::GN_CRS2_LM):{ nlopt::opt theOptimizer(nlopt::GN_CRS2_LM,npar); return(theOptimizer); break; } case(nlopt::GN_MLSL):{ nlopt::opt theOptimizer(nlopt::GN_MLSL,npar); return(theOptimizer); break; } case(nlopt::GN_MLSL_LDS):{ nlopt::opt theOptimizer(nlopt::GN_MLSL_LDS,npar); return(theOptimizer); break; } case(nlopt::LN_COBYLA):{ nlopt::opt theOptimizer(nlopt::LN_COBYLA,npar); return(theOptimizer); break; } case(nlopt::LN_NEWUOA):{ nlopt::opt theOptimizer(nlopt::LN_NEWUOA,npar); return(theOptimizer); break; } case(nlopt::LN_NEWUOA_BOUND):{ nlopt::opt theOptimizer(nlopt::LN_NEWUOA_BOUND,npar); return(theOptimizer); break; } case(nlopt::LN_NELDERMEAD):{ nlopt::opt theOptimizer(nlopt::LN_NELDERMEAD,npar); return(theOptimizer); break; } case(nlopt::LN_SBPLX):{ nlopt::opt theOptimizer(nlopt::LN_SBPLX,npar); return(theOptimizer); break; } case(nlopt::LN_AUGLAG):{ nlopt::opt theOptimizer(nlopt::LN_AUGLAG,npar); return(theOptimizer); break; } case(nlopt::LN_AUGLAG_EQ):{ nlopt::opt theOptimizer(nlopt::LN_AUGLAG_EQ,npar); return(theOptimizer); break; } case(nlopt::LN_BOBYQA):{ nlopt::opt theOptimizer(nlopt::LN_BOBYQA,npar); return(theOptimizer); break; } case(nlopt::GN_ISRES):{ nlopt::opt theOptimizer(nlopt::GN_ISRES,npar); return(theOptimizer); break; } case(nlopt::G_MLSL_LDS): case(nlopt::AUGLAG): case(nlopt::AUGLAG_EQ): case(nlopt::G_MLSL): case(nlopt::GD_MLSL): case(nlopt::GD_MLSL_LDS): case(nlopt::GD_STOGO): case(nlopt::GD_STOGO_RAND): case(nlopt::LD_LBFGS_NOCEDAL): case(nlopt::LD_LBFGS): case(nlopt::LD_VAR1): case(nlopt::LD_VAR2): case(nlopt::LD_TNEWTON): case(nlopt::LD_TNEWTON_RESTART): case(nlopt::LD_TNEWTON_PRECOND): case(nlopt::LD_TNEWTON_PRECOND_RESTART): case(nlopt::LD_MMA): case(nlopt::LD_AUGLAG): case(nlopt::LD_AUGLAG_EQ): case(nlopt::LD_SLSQP): default:{ std::string errorString="Error: derivative optimization algorithm "; errorString+= algorithmString; errorString+= " not supported, select derivative-free algorithm ([GL]N_*])"; throw(errorString); break; } } }; }; #endif /* _OPTFACTORY_H_ */ pktools-2.6.6/src/algorithms/ImgRegression.h0000644000113200011300000000442012462456255016024 00000000000000/********************************************************************** ImgRegression.h: class to calculate regression between two raster datasets Copyright (C) 2008-2014 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 _IMGREGRESSION_H_ #define _IMGREGRESSION_H_ #include #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "StatFactory.h" namespace imgregression { class ImgRegression{ public: ImgRegression(void); ~ImgRegression(void); double getRMSE(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const; double getRMSE(const ImgReaderGdal& imgReader, unsigned short b1, unsigned short b2, double& c0, double& c1, short verbose=0) const; double getR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const; double pgetR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose=0) const; double getR2(const ImgReaderGdal& imgReader, unsigned short b1, unsigned short b2, double& c0, double& c1, short verbose=0) const; double pgetR2(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose=0) const; void setThreshold(double theThreshold){m_threshold=theThreshold;}; void setDown(int theDown){m_down=theDown;}; private: int m_down; double m_threshold; }; } #endif //_IMGREGRESSION_H_ pktools-2.6.6/src/algorithms/Makefile.in0000644000113200011300000006371112645741561015153 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ @USE_FANN_TRUE@am__append_1 = myfann_cpp.h @USE_NLOPT_TRUE@am__append_2 = OptFactory.h subdir = src/algorithms DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(am__libalgorithms_la_HEADERS_DIST) 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) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libalgorithms_ladir)" LTLIBRARIES = $(lib_LTLIBRARIES) libalgorithms_la_LIBADD = am__libalgorithms_la_SOURCES_DIST = Egcs.h Filter2d.h Filter.h \ StatFactory.h ConfusionMatrix.h svm.h CostFactory.h \ CostFactorySVM.h FeatureSelector.h myfann_cpp.h OptFactory.h \ Egcs.cc Filter2d.cc Filter.cc ConfusionMatrix.cc svm.cpp \ CostFactorySVM.cc am__objects_1 = am__objects_2 = $(am__objects_1) $(am__objects_1) am_libalgorithms_la_OBJECTS = $(am__objects_2) Egcs.lo Filter2d.lo \ Filter.lo ConfusionMatrix.lo svm.lo CostFactorySVM.lo libalgorithms_la_OBJECTS = $(am_libalgorithms_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libalgorithms_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libalgorithms_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libalgorithms_la_SOURCES) DIST_SOURCES = $(am__libalgorithms_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__libalgorithms_la_HEADERS_DIST = Egcs.h Filter2d.h Filter.h \ StatFactory.h ConfusionMatrix.h svm.h CostFactory.h \ CostFactorySVM.h FeatureSelector.h myfann_cpp.h OptFactory.h HEADERS = $(libalgorithms_la_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_CXXFLAGS = -I$(top_srcdir)/src $(GDAL_CFLAGS) @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_LDFLAGS = $(GSL_LIBS) $(GDAL_LDFLAGS) @AM_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FANN_CFLAGS = @FANN_CFLAGS@ FANN_LIBS = @FANN_LIBS@ FC = @FC@ FCFLAGS = @FCFLAGS@ FGREP = @FGREP@ GDAL_CFLAGS = @GDAL_CFLAGS@ GDAL_CONFIG = @GDAL_CONFIG@ GDAL_DEP_LDFLAGS = @GDAL_DEP_LDFLAGS@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GDAL_OGR_ENABLED = @GDAL_OGR_ENABLED@ GDAL_VERSION = @GDAL_VERSION@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LASCLASSES_OPT = @LASCLASSES_OPT@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NLOPT_CFLAGS = @NLOPT_CFLAGS@ NLOPT_LIBS = @NLOPT_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKTOOLS_SO_VERSION = @PKTOOLS_SO_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ############################################################################### # THE PROGRAMS TO BUILD ############################################################################### # the program to build (the names of the final binaries) #do not want to install pktestoption #noinst_PROGRAMS = pktestStat ############################################################################### # THE LIBRARIES TO BUILD ############################################################################### #noinst_LIBRARIES = libalgorithms.a lib_LTLIBRARIES = libalgorithms.la # where to install the headers on the system libalgorithms_ladir = $(includedir)/pktools/algorithms libalgorithms_la_LDFLAGS = -version-info $(PKTOOLS_SO_VERSION) $(AM_LDFLAGS) # the list of header files that belong to the library (to be installed later) libalgorithms_la_HEADERS = Egcs.h Filter2d.h Filter.h StatFactory.h \ ConfusionMatrix.h svm.h CostFactory.h CostFactorySVM.h \ FeatureSelector.h $(am__append_1) $(am__append_2) # the sources to add to the library and to add to the source distribution libalgorithms_la_SOURCES = $(libalgorithms_la_HEADERS) Egcs.cc Filter2d.cc Filter.cc ConfusionMatrix.cc svm.cpp CostFactorySVM.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/algorithms/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/algorithms/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libalgorithms.la: $(libalgorithms_la_OBJECTS) $(libalgorithms_la_DEPENDENCIES) $(EXTRA_libalgorithms_la_DEPENDENCIES) $(AM_V_CXXLD)$(libalgorithms_la_LINK) -rpath $(libdir) $(libalgorithms_la_OBJECTS) $(libalgorithms_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfusionMatrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CostFactorySVM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Egcs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Filter2d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svm.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libalgorithms_laHEADERS: $(libalgorithms_la_HEADERS) @$(NORMAL_INSTALL) @list='$(libalgorithms_la_HEADERS)'; test -n "$(libalgorithms_ladir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libalgorithms_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libalgorithms_ladir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libalgorithms_ladir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libalgorithms_ladir)" || exit $$?; \ done uninstall-libalgorithms_laHEADERS: @$(NORMAL_UNINSTALL) @list='$(libalgorithms_la_HEADERS)'; test -n "$(libalgorithms_ladir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libalgorithms_ladir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libalgorithms_ladir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-libalgorithms_laHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libalgorithms_laHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES \ install-libalgorithms_laHEADERS install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-libalgorithms_laHEADERS ############################################################################### # list of sources for the binaries #pktestStat_SOURCES = pktestStat.cc #pktestStat_LDADD = $(GSL_LIBS) $(top_builddir)/src/algorithms/libalgorithms.la $(top_builddir)/src/imageclasses/libimageClasses.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pktools-2.6.6/src/algorithms/Filter2d.cc0000644000113200011300000012731112631525772015064 00000000000000/********************************************************************** Filter2d.cc: class for filtering images 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 "Filter2d.h" #include "StatFactory.h" // #include "imageclasses/ImgUtils.h" filter2d::Filter2d::Filter2d(void) { } filter2d::Filter2d::Filter2d(const Vector2d &taps) : m_taps(taps) { } int filter2d::Filter2d::pushNoDataValue(double noDataValue) { if(find(m_noDataValues.begin(),m_noDataValues.end(),noDataValue)==m_noDataValues.end()) m_noDataValues.push_back(noDataValue); return(m_noDataValues.size()); } void filter2d::Filter2d::setTaps(const Vector2d &taps) { m_taps=taps; } void filter2d::Filter2d::smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output, int dim) { smoothNoData(input, output,dim,dim); } void filter2d::Filter2d::smooth(const ImgReaderGdal& input, ImgWriterGdal& output, int dim) { smooth(input, output,dim,dim); } void filter2d::Filter2d::smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY) { m_taps.resize(dimY); for(int j=0;j inBuffer(dimY,input.nrOfCol()); std::vector outBuffer(input.nrOfCol()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ try{ input.readData(inBuffer[indexJ],GDT_Float64,abs(j),iband); } catch(std::string errorstring){ std::cerr << errorstring << "in line " << indexJ << std::endl; } ++indexJ; } for(int y=0;y1) inBuffer.erase(inBuffer.begin()); //read extra line and push back to inBuffer if not out of bounds if(y+dimY/21) inBuffer.push_back(inBuffer.back()); try{ input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2,iband); } catch(std::string errorstring){ std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl; } } else{ int over=y+dimY/2-input.nrOfRow(); int index=(inBuffer.size()-1)-over; assert(index>=0); assert(index=input.nrOfCol()-(dimX-1)/2) indexI=x-abs(i); if(y<(dimY-1)/2) indexJ=(dimY-1)/2+abs(j); else if(y>=input.nrOfRow()-(dimY-1)/2) indexJ=(dimY-1)/2-abs(j); //do not take masked values into account masked=false; for(int imask=0;imask &prior) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); bool usePriors=true; if(prior.empty()){ std::cout << "no prior information" << std::endl; usePriors=false; } else{ std::cout << "using priors "; for(int iclass=0;iclass(prior[iclass]); std::cout << std::endl; } ImgReaderGdal input; ImgWriterGdal output; input.open(inputFilename); output.open(outputFilename,input); int dimX=0;//horizontal!!! int dimY=0;//vertical!!! if(dim){ dimX=dim; dimY=dim; } else{ dimX=m_taps[0].size(); dimY=m_taps.size(); } assert(dimX); assert(dimY); Vector2d inBuffer(dimY,input.nrOfCol()); std::vector outBuffer(input.nrOfCol()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ try{ input.readData(inBuffer[indexJ],GDT_Float64,abs(j)); } catch(std::string errorstring){ std::cerr << errorstring << "in line " << indexJ << std::endl; } ++indexJ; } for(int y=0;y1) inBuffer.erase(inBuffer.begin()); //read extra line and push back to inBuffer if not out of bounds if(y+dimY/21) inBuffer.push_back(inBuffer.back()); try{ input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2); } catch(std::string errorstring){ std::cerr << errorstring << "in line" << y << std::endl; } } else{ int over=y+dimY/2-input.nrOfRow(); int index=(inBuffer.size()-1)-over; assert(index>=0); assert(index occurrence; int centre=dimX*(dimY-1)/2+(dimX-1)/2; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=input.nrOfCol()) indexI=input.nrOfCol()-i; if(y+j<0) indexJ=-j; else if(y+j>=input.nrOfRow()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; // if(x=input.nrOfCol()-dimX/2) // indexI=x-abs(i); // if(y=input.nrOfRow()-dimY/2) // indexJ=dimY/2-abs(j); if(usePriors){ occurrence[inBuffer[indexJ][indexI]]+=prior[inBuffer[indexJ][indexI]-1]; } else ++occurrence[inBuffer[indexJ][indexI]]; } } std::map::const_iterator maxit=occurrence.begin(); for(std::map::const_iterator mit=occurrence.begin();mit!=occurrence.end();++mit){ if(mit->second>maxit->second) maxit=mit; } if(occurrence[inBuffer[(dimY-1)/2][x]]second)// outBuffer[x]=maxit->first; else//favorize original value in case of ties outBuffer[x]=inBuffer[(dimY-1)/2][x]; } //write outBuffer to file try{ output.writeData(outBuffer,GDT_Float64,y); } catch(std::string errorstring){ std::cerr << errorstring << "in line" << y << std::endl; } progress=(1.0+y)/output.nrOfRow(); pfnProgress(progress,pszMessage,pProgressArg); } input.close(); output.close(); } void filter2d::Filter2d::median(const std::string& inputFilename, const std::string& outputFilename,int dim, bool disc) { ImgReaderGdal input; ImgWriterGdal output; input.open(inputFilename); output.open(outputFilename,input); doit(input,output,"median",dim,disc); } void filter2d::Filter2d::var(const std::string& inputFilename, const std::string& outputFilename,int dim, bool disc) { ImgReaderGdal input; ImgWriterGdal output; input.open(inputFilename); output.open(outputFilename,input); doit(input,output,"var",dim,disc); } void filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short down, bool disc) { doit(input,output,method,dim,dim,down,disc); } void filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, short down, bool disc) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); assert(dimX); assert(dimY); statfactory::StatFactory stat; for(int iband=0;iband inBuffer(dimY,input.nrOfCol()); std::vector outBuffer((input.nrOfCol()+down-1)/down); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ try{ input.readData(inBuffer[indexJ],GDT_Float64,abs(j),iband); } catch(std::string errorstring){ std::cerr << errorstring << "in line " << indexJ << std::endl; } ++indexJ; } for(int y=0;y1) inBuffer.erase(inBuffer.begin()); //read extra line and push back to inBuffer if not out of bounds if(y+dimY/21) inBuffer.push_back(inBuffer.back()); try{ input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2,iband); } catch(std::string errorstring){ std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl; } } else{ int over=y+dimY/2-input.nrOfRow(); int index=(inBuffer.size()-1)-over; assert(index>=0); assert(index windowBuffer; std::map occurrence; int centre=dimX*(dimY-1)/2+(dimX-1)/2; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ double d2=i*i+j*j;//square distance if(disc&&(d2>(dimX/2)*(dimY/2))) continue; indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=input.nrOfCol()) indexI=input.nrOfCol()-i; if(y+j<0) indexJ=-j; else if(y+j>=input.nrOfRow()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; bool masked=false; for(int imask=0;imask::const_iterator vit=m_class.begin(); if(!m_class.size()) ++occurrence[inBuffer[indexJ][indexI]]; else{ while(vit!=m_class.end()){ if(inBuffer[indexJ][indexI]==*(vit++)) ++occurrence[inBuffer[indexJ][indexI]]; } } windowBuffer.push_back(inBuffer[indexJ][indexI]); } } } switch(getFilterType(method)){ case(filter2d::nvalid): outBuffer[x/down]=stat.nvalid(windowBuffer); break; case(filter2d::median): if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=stat.median(windowBuffer); break; case(filter2d::var):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=stat.var(windowBuffer); break; } case(filter2d::stdev):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=sqrt(stat.var(windowBuffer)); break; } case(filter2d::mean):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=stat.mean(windowBuffer); break; } case(filter2d::min):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=stat.mymin(windowBuffer); break; } case(filter2d::ismin):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=(stat.mymin(windowBuffer)==windowBuffer[centre])? 1:0; break; } case(filter2d::minmax):{//is the same as homog? double min=0; double max=0; if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else{ stat.minmax(windowBuffer,windowBuffer.begin(),windowBuffer.end(),min,max); if(min!=max) outBuffer[x/down]=0; else outBuffer[x/down]=windowBuffer[centre];//centre pixels } break; } case(filter2d::max):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=stat.mymax(windowBuffer); break; } case(filter2d::ismax):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else outBuffer[x/down]=(stat.mymax(windowBuffer)==windowBuffer[centre])? 1:0; break; } case(filter2d::order):{ if(windowBuffer.empty()) outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; else{ double lbound=0; double ubound=dimX*dimY; double theMin=stat.mymin(windowBuffer); double theMax=stat.mymax(windowBuffer); double scale=(ubound-lbound)/(theMax-theMin); outBuffer[x/down]=static_cast(scale*(windowBuffer[centre]-theMin)+lbound); } break; } case(filter2d::sum):{ outBuffer[x/down]=stat.sum(windowBuffer); break; } case(filter2d::percentile):{ assert(m_threshold.size()); outBuffer[x/down]=stat.percentile(windowBuffer,windowBuffer.begin(),windowBuffer.end(),m_threshold[0]); break; } case(filter2d::proportion):{ if(windowBuffer.size()){ double sum=stat.sum(windowBuffer); if(sum) outBuffer[x/down]=100.0*windowBuffer[centre]/stat.sum(windowBuffer); else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; } else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; } case(filter2d::homog): if(occurrence.size()==1)//all values in window are the same outBuffer[x/down]=inBuffer[(dimY-1)/2][x]; else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; case(filter2d::heterog):{ if(occurrence.size()==windowBuffer.size()) outBuffer[x/down]=inBuffer[(dimY-1)/2][x]; else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; // if(occurrence.size()==1)//all values in window are the same // outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; // else // outBuffer[x/down]=inBuffer[(dimY-1)/2][x]; // break; // for(std::vector::const_iterator wit=windowBuffer.begin();wit!=windowBuffer.end();++wit){ // if(wit==windowBuffer.begin()+windowBuffer.size()/2) // continue; // else if(*wit!=inBuffer[(dimY-1)/2][x]){ // outBuffer[x/down]=1; // break; // } // else if(*wit==inBuffer[(dimY-1)/2][x]){//todo:wit mag niet central pixel zijn // outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; // break; // } // } // break; } case(filter2d::density):{ if(windowBuffer.size()){ std::vector::const_iterator vit=m_class.begin(); while(vit!=m_class.end()) outBuffer[x/down]+=100.0*occurrence[*(vit++)]/windowBuffer.size(); } else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; } case(filter2d::countid):{ if(windowBuffer.size()) outBuffer[x/down]=occurrence.size(); else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; } case(filter2d::mode):{ if(occurrence.size()){ std::map::const_iterator maxit=occurrence.begin(); for(std::map::const_iterator mit=occurrence.begin();mit!=occurrence.end();++mit){ if(mit->second>maxit->second) maxit=mit; } if(occurrence[inBuffer[(dimY-1)/2][x]]second)// outBuffer[x/down]=maxit->first; else//favorize original value in case of ties outBuffer[x/down]=inBuffer[(dimY-1)/2][x]; } else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; } case(filter2d::threshold):{ assert(m_class.size()==m_threshold.size()); if(windowBuffer.size()){ outBuffer[x/down]=inBuffer[(dimY-1)/2][x];//initialize with original value (in case thresholds not met) for(int iclass=0;iclassm_threshold[iclass]) outBuffer[x/down]=m_class[iclass]; } } else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; } case(filter2d::scramble):{//could be done more efficiently window by window with random shuffling entire buffer and assigning entire buffer at once to output image... if(windowBuffer.size()){ int randomIndex=std::rand()%windowBuffer.size(); if(randomIndex>=windowBuffer.size()) outBuffer[x/down]=windowBuffer.back(); else if(randomIndex<0) outBuffer[x/down]=windowBuffer[0]; else outBuffer[x/down]=windowBuffer[randomIndex]; } else outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0; break; } case(filter2d::mixed):{ enum Type { BF=11, CF=12, MF=13, NF=20, W=30 }; double nBF=occurrence[BF]; double nCF=occurrence[CF]; double nMF=occurrence[MF]; double nNF=occurrence[NF]; double nW=occurrence[W]; if(windowBuffer.size()){ if((nBF+nCF+nMF)&&(nBF+nCF+nMF>=nNF+nW)){//forest if(nBF/(nBF+nCF)>=0.75) outBuffer[x/down]=BF; else if(nCF/(nBF+nCF)>=0.75) outBuffer[x/down]=CF; else outBuffer[x/down]=MF; } else{//non-forest if(nW&&(nW>=nNF)) outBuffer[x/down]=W; else outBuffer[x/down]=NF; } } else outBuffer[x/down]=inBuffer[indexJ][indexI]; break; } default:{ std::ostringstream ess; ess << "Error: filter method " << method << " not supported" << std::endl; throw(ess.str()); break; } } } progress=(1.0+y/down); progress+=(output.nrOfRow()*iband); progress/=output.nrOfBand()*output.nrOfRow(); pfnProgress(progress,pszMessage,pProgressArg); //write outBuffer to file try{ output.writeData(outBuffer,GDT_Float64,y/down,iband); } catch(std::string errorstring){ std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl; } } } pfnProgress(1.0,pszMessage,pProgressArg); } void filter2d::Filter2d::mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, double beta, bool eightConnectivity, short down, bool verbose){ assert(m_class.size()>1); Vector2d fullBeta(m_class.size(),m_class.size()); for(int iclass1=0;iclass1 beta, bool eightConnectivity, short down, bool verbose) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); assert(dimX); assert(dimY); Vector2d inBuffer(dimY,input.nrOfCol()); Vector2d outBuffer(m_class.size(),(input.nrOfCol()+down-1)/down); assert(input.nrOfBand()==1); assert(output.nrOfBand()==m_class.size()); assert(m_class.size()>1); assert(beta.size()==m_class.size()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ try{ input.readData(inBuffer[indexJ],GDT_Int16,abs(j)); } catch(std::string errorstring){ std::cerr << errorstring << "in line " << indexJ << std::endl; } ++indexJ; } for(int y=0;y1) inBuffer.erase(inBuffer.begin()); //read extra line and push back to inBuffer if not out of bounds if(y+dimY/21) inBuffer.push_back(inBuffer.back()); try{ input.readData(inBuffer[inBuffer.size()-1],GDT_Int16,y+dimY/2); } catch(std::string errorstring){ std::cerr << errorstring << "in line " << y << std::endl; } } else{ int over=y+dimY/2-input.nrOfRow(); int index=(inBuffer.size()-1)-over; assert(index>=0); assert(index potential(m_class.size()); for(int iclass=0;iclass windowBuffer; int centre=dimX*(dimY-1)/2+(dimX-1)/2; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ if(i!=0&&j!=0&&!eightConnectivity) continue; if(i==0&&j==0) continue; indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=input.nrOfCol()) indexI=input.nrOfCol()-i; if(y+j<0) indexJ=-j; else if(y+j>=input.nrOfRow()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; bool masked=false; for(int imask=0;imask inBuffer(input.nrOfRow(),output.nrOfCol()); Vector2d outBuffer(input.nrOfRow(),output.nrOfCol()); for(int iband=0;iband inBuffer(dimY,input.nrOfCol()); // Vector2d outBuffer(scale*3,(input.nrOfCol()+down-1)/down); // //initialize last half of inBuffer // int indexI=0; // int indexJ=0; // for(int j=-dimY/2;j<(dimY+1)/2;++j){ // try{ // if(verbose) // cout << "reading input line " << abs(j) << std::endl; // input.readData(inBuffer[indexJ],GDT_Float32,abs(j),iband); // ++indexJ; // } // catch(std::string errorstring){ // std::cerr << errorstring << "in band " << iband << ", line " << indexJ << std::endl; // } // } // const char* pszMessage; // void* pProgressArg=NULL; // GDALProgressFunc pfnProgress=GDALTermProgress; // double progress=0; // pfnProgress(progress,pszMessage,pProgressArg); // for(int y=0;y texture_feature(scale,3); // CImg<> texture_in(dimX,dimY); // int r=0;//index for row of texture_in // for(int j=-dimY/2;j<(dimY+1)/2;++j){ // int c=0; // for(int i=-dimX/2;i<(dimX+1)/2;++i){ // indexI=x+i; // //check if out of bounds // if(indexI<0) // indexI=-indexI; // else if(indexI>=input.nrOfCol()) // indexI=input.nrOfCol()-i; // if(y+j<0) // indexJ=-j; // else if(y+j>=input.nrOfRow()) // indexJ=dimY/2-j;//indexJ=inBuffer.size()-1-j; // else // indexJ=dimY/2+j; // assert(indexJ &angle, bool disc) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); assert(dimX); assert(dimY); statfactory::StatFactory stat; for(int iband=0;iband inBuffer(dimY,input.nrOfCol()); std::vector outBuffer(input.nrOfCol()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ try{ input.readData(inBuffer[indexJ],GDT_Float64,abs(j),iband); ++indexJ; } catch(std::string errorstring){ std::cerr << errorstring << "in line " << indexJ << std::endl; } } for(int y=0;y1) inBuffer.erase(inBuffer.begin()); //read extra line and push back to inBuffer if not out of bounds if(y+dimY/21) inBuffer.push_back(inBuffer.back()); try{ input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2,iband); } catch(std::string errorstring){ std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl; } } else{ int over=y+dimY/2-input.nrOfRow(); int index=(inBuffer.size()-1)-over; assert(index>=0); assert(index statBuffer; bool currentMasked=false; int centre=dimX*(dimY-1)/2+(dimX-1)/2; for(int imask=0;imask(dimX/2)*(dimY/2))) continue; if(angle.size()){ double theta; //use polar coordinates in radians if(i>0){ if(j<0) theta=atan(static_cast(-j)/(static_cast(i))); else theta=-atan(static_cast(j)/(static_cast(i))); } else if(i<0){ if(j<0) theta=PI-atan(static_cast(-j)/(static_cast(-i))); else theta=PI+atan(static_cast(j)/(static_cast(-i))); } else if(j<0) theta=PI/2.0; else if(j>0) theta=3.0*PI/2.0; //convert to North (0), East (90), South (180), West (270) in degrees theta=360-(theta/PI*180)+90; if(theta<0) theta+=360; while(theta>360) theta-=360; bool alligned=false; for(int iangle=0;iangle=input.nrOfCol()) indexI=input.nrOfCol()-i; if(y+j<0) indexJ=-j; else if(y+j>=input.nrOfRow()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; //todo: introduce novalue as this: ? // if(inBuffer[indexJ][indexI]==(m_noDataValues.size())? m_noDataValues[0] : 0) // continue; bool masked=false; for(int imask=0;imask inputBuffer; Vector2d outputBuffer; input.readDataBlock(inputBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, 0); shadowDsm(inputBuffer, outputBuffer, sza, saa, pixelSize, shadowFlag); output.writeDataBlock(outputBuffer,GDT_Float32,0,output.nrOfCol()-1,0,output.nrOfRow()-1,0); } void filter2d::Filter2d::dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family){ Vector2d theBuffer; for(int iband=0;iband theBuffer; for(int iband=0;iband theBuffer; for(int iband=0;iband inputBuffer; std::vector< Vector2d > outputBuffer; input.readDataBlock(inputBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, band); if(maxDistance<=0) maxDistance=sqrt(static_cast(input.nrOfCol()*input.nrOfRow())); linearFeature(inputBuffer,outputBuffer,angle,angleStep,maxDistance,eps, l1, a1, l2, a2,verbose); for(int iband=0;iband& input, std::vector< Vector2d >& output, float angle, float angleStep, float maxDistance, float eps, bool l1, bool a1, bool l2, bool a2, bool verbose) { output.clear(); int nband=0;//linear feature if(l1) ++nband; if(a1) ++nband; if(l2) ++nband; if(a2) ++nband; output.resize(nband); for(int iband=0;iband(input.nRows()*input.nCols())); int indexI=0; int indexJ=0; const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); for(int y=0;y=0&&angle!=northAngle) continue; //test if(verbose) std::cout << "northAngle: " << northAngle << std::endl; float currentDistance=0; float theDir=0; for(short side=0;side<=1;side+=1){ theDir=PI/2.0-DEG2RAD(northAngle)+side*PI;//in radians //test if(verbose) std::cout << "theDir in deg: " << RAD2DEG(theDir) << std::endl; if(theDir<0) theDir+=2*PI; //test if(verbose) std::cout << "theDir in deg: " << RAD2DEG(theDir) << std::endl; float nextValue=currentValue; for(float currentRay=1;currentRay=input.size()) break; if(indexI<0||indexI>=input[indexJ].size()) break; nextValue=input[indexJ][indexI]; if(verbose){ std::cout << "x: " << x << std::endl; std::cout << "y: " << y << std::endl; std::cout << "currentValue: " << currentValue << std::endl; std::cout << "theDir in degrees: " << RAD2DEG(theDir) << std::endl; std::cout << "cos(theDir): " << cos(theDir) << std::endl; std::cout << "sin(theDir): " << sin(theDir) << std::endl; std::cout << "currentRay: " << currentRay << std::endl; std::cout << "currentDistance: " << currentDistance << std::endl; std::cout << "indexI: " << indexI << std::endl; std::cout << "indexJ: " << indexJ << std::endl; std::cout << "nextValue: " << nextValue << std::endl; } if(fabs(currentValue-nextValue)<=eps){ ++currentDistance; //test if(verbose) std::cout << "currentDistance: " << currentDistance << ", continue" << std::endl; } else{ if(verbose) std::cout << "currentDistance: " << currentDistance << ", break" << std::endl; break; } } } if(lineDistance1currentDistance){ lineDistance2=currentDistance; lineAngle2=northAngle; } if(verbose){ std::cout << "lineDistance1: " << lineDistance1 << std::endl; std::cout << "lineAngle1: " << lineAngle1 << std::endl; std::cout << "lineDistance2: " << lineDistance2 << std::endl; std::cout << "lineAngle2: " << lineAngle2 << std::endl; } } int iband=0; if(l1) output[iband++][y][x]=lineDistance1; if(a1) output[iband++][y][x]=lineAngle1; if(l2) output[iband++][y][x]=lineDistance2; if(a2) output[iband++][y][x]=lineAngle2; assert(iband==nband); } progress=(1.0+y); progress/=input.nRows(); pfnProgress(progress,pszMessage,pProgressArg); } } pktools-2.6.6/src/algorithms/FeatureSelector.h0000644000113200011300000003310112636302464016334 00000000000000/********************************************************************** 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 "ConfusionMatrix.h" #include "base/IndexValue.h" #include "base/Vector2d.h" #include "gsl/gsl_combination.h" #include "CostFactory.h" class FeatureSelector { public: FeatureSelector(){}; ~FeatureSelector(){}; template double forward(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures=0, short verbose=0); template double backward(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int minFeatures, short verbose=0); template double floating(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures=0, double epsilon=0.001, short verbose=0); template double bruteForce(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures=0, short verbose=0); private: template double addFeature(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, short verbose=0); template double removeFeature(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int& r, short verbose=0); template double forwardUnivariate(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures=0, short verbose=0); }; //sequential forward selection Univariate (N single best features) template double FeatureSelector::forwardUnivariate(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures, short verbose){ int maxLevels=v[0][0].size(); if(!maxFeatures) maxFeatures=maxLevels; int k=subset.size(); if(k>=maxFeatures) return -1; std::vector cost(maxLevels); std::list tmpset=subset;//temporary set of selected features (levels) std::vector< Vector2d > tmp(v.size()); for(int ilevel=0;ilevel0) subset.push_back(cost[ilevel].position); if(verbose) std::cout << "feature " << subset.back() << " has cost: " << cost[ilevel].value << std::endl; ++ilevel; } double maxCost=-1; while(subset.size()){ for(int iclass=0;iclass double FeatureSelector::forward(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures, short verbose){ //Select feature with the best value (get maximal cost for 1 feature) double maxCost=0; int maxLevels=v[0][0].size(); if(!maxFeatures) maxFeatures=maxLevels; while(subset.size()::const_iterator lit=subset.begin();lit!=subset.end();++lit) std::cout << *lit << " "; std::cout << std::endl; // std::cout << "added " << subset.back() << ", " << subset.size() << "/" << maxFeatures << " features selected with cost: " << maxCost << std::endl; } }//while return maxCost; } //sequential backward selection template double FeatureSelector::backward(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int minFeatures, short verbose){ //Select features with least effect on cost when removed (obtain minFeatures eventually) double maxCost=0; int removedFeature; if(subset.empty()){ for(int iFeature=0;iFeatureminFeatures){ maxCost=removeFeature(v,theCostFactory,subset,removedFeature,verbose); if(verbose){ for(std::list::const_iterator lit=subset.begin();lit!=subset.end();++lit) std::cout << *lit << " "; std::cout << std::endl; // std::cout << "removed " << removedFeature << ", " << subset.size() << "/" << minFeatures << " features remain with cost: " << maxCost << std::endl; } }//while return maxCost; } //floating search template double FeatureSelector::floating(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures, double epsilon, short verbose){ std::vector cost; int maxLevels=v[0][0].size(); if(maxFeatures<1) maxFeatures=maxLevels; int k=subset.size(); if(k>=maxFeatures) return -1; while(cost.size()1) std::cout << "added " << subset.back() << ", " << subset.size() << "/" << maxFeatures << " features selected with cost: " << cost.back() << std::endl; else if(verbose){ for(std::list::const_iterator lit=subset.begin();lit!=subset.end();++lit) std::cout << *lit << " "; std::cout << std::endl; } while(k1) std::cout << "added " << subset.back() << ", " << subset.size() << "/" << maxFeatures << " features selected with cost: " << cost.back() << std::endl; else if(verbose){ for(std::list::const_iterator lit=subset.begin();lit!=subset.end();++lit) std::cout << *lit << " "; std::cout << " (cost: " << cost.back() << ")" << std::endl; } while(k>1){ int x_r; double cost_r=removeFeature(v,theCostFactory,subset,x_r,verbose); if(cost_r>cost[k-1]+epsilon){ --k; cost[k]=cost_r; cost.pop_back(); if(verbose>1) std::cout << "removed " << x_r << ", " << subset.size() << "/" << maxFeatures << " features remain with cost: " << cost_r << std::endl; else if(verbose){ for(std::list::const_iterator lit=subset.begin();lit!=subset.end();++lit) std::cout << *lit << " "; std::cout << " (cost: " << cost.back() << ")" << std::endl; } continue; } else if(cost_r>=0){ subset.push_back(x_r); break; } else if(verbose) std::cout << "could not remove any feature" << std::endl; cost.pop_back(); } } return cost.back(); } //brute force search (search for all possible combinations and select best) template double FeatureSelector::bruteForce(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int maxFeatures, short verbose){ int maxLevels=v[0][0].size(); if(maxFeatures<1) maxFeatures=maxLevels; int k=subset.size(); if(k>=maxFeatures) return -1; // gslmm::combination c(v1[0].size(),maxFeatures,false); gsl_combination *c; c=gsl_combination_calloc(v[0][0].size(),maxFeatures); std::list tmpset;//temporary set of selected features (levels) std::vector< Vector2d > tmpv(v.size()); std::list catchset;//restore set in case of catch all the way to last level (no better cost) //initialize maxCost with actual cost for current subset (-1 if empty subset) double maxCost=-1; double cost; if(subset.size()>=maxLevels) return maxCost; gsl_combination_next(c); do{ for(int ifeature=0;ifeaturedata[ifeature]); for(int iclass=0;iclass::iterator lit=subset.begin();lit!=subset.end();++lit){ std::list::iterator lit2=lit;//start searching from next element assert(find(++lit2,subset.end(),*lit)==subset.end()); } return maxCost; } template double FeatureSelector::addFeature(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, short verbose){ //select feature with the best value (get maximal cost for 1 feature) std::list tmpset=subset;//temporary set of selected features (levels) std::vector< Vector2d > tmp(v.size()); std::list catchset;//restore set in case of catch all the way to last level (no better cost) //initialize maxCost with actual cost for current subset (-1 if empty subset) double maxCost=-1; double cost; int maxLevels=v[0][0].size(); if(subset.size()>=maxLevels) return maxCost; for(int ilevel=0;ilevel::iterator lit=subset.begin();lit!=subset.end();++lit){ std::list::iterator lit2=lit;//start searching from next element assert(find(++lit2,subset.end(),*lit)==subset.end()); } return maxCost; } template double FeatureSelector::removeFeature(std::vector< Vector2d >& v, CostFactory& theCostFactory, std::list& subset, int& r, short verbose){ //find the feature that has the least effect on the cost when it is removed from subset std::list tmpset=subset;//temporary set of selected features (levels) std::vector< Vector2d > tmp(v.size()); int nFeatures=subset.size(); std::list catchset;//restore set in case of catch all the way to last level (no better cost) //initialize maxCost with actual cost for current subset (-1 if empty subset) double maxCost=-1; int last; double cost; int maxLevels=v[0][0].size(); if(subset.size()>maxLevels||subset.empty()){ return maxCost; } std::list::const_iterator it; for(int i=0;i::iterator lit=subset.begin();lit!=subset.end();++lit){ std::list::iterator lit2=lit;//start searching from next element assert(find(++lit2,subset.end(),*lit)==subset.end()); } return maxCost; } #endif /* _FEATURESELECTOR_H_ */ pktools-2.6.6/src/algorithms/Filter.cc0000644000113200011300000006451312631531531014630 00000000000000/********************************************************************** Filter.cc: class for filtering 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 "Filter.h" #include #include #include using namespace std; filter::Filter::Filter(void) : m_padding("symmetric") { } filter::Filter::Filter(const vector &taps) : m_padding("symmetric") { setTaps(taps); } void filter::Filter::setTaps(const vector &taps, bool normalize) { m_taps.resize(taps.size()); double norm=0; for(int itap=0;itap vnodata){ m_noDataValues=vnodata; return m_noDataValues.size(); }; void filter::Filter::dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family){ const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); Vector2d lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(input.nrOfBand(),input.nrOfCol()); for(int y=0;y pixelInput(input.nrOfBand()); for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(input.nrOfBand(),input.nrOfCol()); for(int y=0;y pixelInput(input.nrOfBand()); for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(input.nrOfBand(),input.nrOfCol()); for(int y=0;y pixelInput(input.nrOfBand()); for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(input.nrOfBand(),input.nrOfCol()); for(int y=0;y pixelInput(input.nrOfBand()); for(int x=0;x=band) pixelInput[iband]=0; } dwtInverse(pixelInput,wavelet_type,family); for(int iband=0;iband& data, const std::string& wavelet_type, int family){ int origsize=data.size(); //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); data.erase(data.begin()+origsize,data.end()); gsl_wavelet_free (w); gsl_wavelet_workspace_free (work); } //todo: support different padding strategies void filter::Filter::dwtInverse(std::vector& data, const std::string& wavelet_type, int family){ int origsize=data.size(); //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_inverse(w,&(data[0]),1,nsize,work); data.erase(data.begin()+origsize,data.end()); gsl_wavelet_free (w); gsl_wavelet_workspace_free (work); } //todo: support different padding strategies void filter::Filter::dwtCut(std::vector& data, const std::string& wavelet_type, int family, double cut){ int origsize=data.size(); //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); std::vector abscoeff(data.size()); size_t* p=new size_t[data.size()]; for(int index=0;index1)? true:false; Vector2d lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(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 pixelInput(input.nrOfBand()); vector pixelOutput(input.nrOfBand()); for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(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 pixelInput(input.nrOfBand()); vector pixelOutput(input.nrOfBand()); for(int x=0;x0); m_taps.resize(dim); for(int itap=0;itap lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(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 pixelInput(input.nrOfBand()); vector pixelOutput(input.nrOfBand()); for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol()); assert(output.nrOfCol()==input.nrOfCol()); vector lineOutput(output.nrOfCol()); statfactory::StatFactory stat; stat.setNoDataValues(m_noDataValues); const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); for(int y=0;y pixelInput(input.nrOfBand()); for(int x=0;x& methods) { assert(output.nrOfBand()==methods.size()); Vector2d lineInput(input.nrOfBand(),input.nrOfCol()); assert(output.nrOfCol()==input.nrOfCol()); Vector2d lineOutput(methods.size(),output.nrOfCol()); statfactory::StatFactory stat; stat.setNoDataValues(m_noDataValues); const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); for(int y=0;y pixelInput(input.nrOfBand()); for(int x=0;x lineInput(input.nrOfBand(),input.nrOfCol()); Vector2d lineOutput(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 pixelInput(input.nrOfBand()); vector pixelOutput; for(int x=0;x &tapz, int np, int nl, int nr, int ld, int m) { int j, k, imj, ipj, kk, mm; double d, fac, sum; // c.resize(nl+1+nr); vector tmpc(np); if(np < nl + nr + 1 || nl < 0 || nr < 0 || ld > m || nl + nr < m) { cerr << "bad args in savgol" << endl; return; } vector indx(m + 1, 0); vector a((m + 1) * (m + 1), 0.0); vector b(m + 1, 0.0); for(ipj = 0; ipj <= (m << 1); ++ipj) { sum = (ipj ? 0.0 : 1.0); for(k = 1; k <= nr; ++k) sum += (int)pow((double)k, (double)ipj); for(k = 1; k <= nl; ++k) sum += (int)pow((double) - k, (double)ipj); mm = (ipj < 2 * m - ipj ? ipj : 2 * m - ipj); for(imj = -mm; imj <= mm; imj += 2) a[(ipj + imj) / 2 * (m + 1) + (ipj - imj) / 2] = sum; } ludcmp(a, indx, d); for(j = 0; j < m + 1; ++j) b[j] = 0.0; b[ld] = 1.0; lubksb(a, indx, b); // for(kk = 0; kk < np; ++kk) // c[kk] = 0.0; for(k = -nl; k <= nr; ++k) { // for(k = -nl; k < nr; ++k) { sum = b[0]; fac = 1.0; for(mm = 1; mm <= m; ++mm) sum += b[mm] * (fac *= k); // store in wrap=around order kk = (np - k) % np; //re-order c as I need for taps // kk=k+nl; tmpc[kk] = sum; } tapz.resize(nl+1+nr); // for(k=0;k &a, vector &indx, double &d) { const double TINY = 1.0e-20; int i, imax = -1, j, k; double big, dum, sum, temp; int n = indx.size(); vector vv(n, 0.0); d = 1.0; for(i = 0; i < n; ++i) { big = 0.0; for(j = 0; j < n; ++j) if((temp = fabs(a[i * n + j])) > big) big = temp; if(big == 0.0) { cerr << "Singular matrix in routine ludcmp" << endl; return; } vv[i] = 1. / big; } for(j = 0; j < n; ++j) { for(i = 0; i < j; ++i) { sum = a[i * n + j]; for(k = 0; k < i; ++k) sum -= a[i * n + k] * a[k * n + j]; a[i * n + j] = sum; } big = 0.0; for(i = j; i < n; ++i) { sum = a[i * n + j]; for(k = 0; k < j; ++k) sum -= a[i * n + k] * a[k * n + j]; a[i * n + j] = sum; if((dum = vv[i] * fabs(sum)) >= big) { big = dum; imax = i; } } if(j != imax) { for(k = 0; k < n; ++k) { dum = a[imax * n + k]; a[imax * n + k] = a[j * n + k]; a[j * n + k] = dum; } d = -d; vv[imax] = vv[j]; } indx[j] = imax; if(a[j * n + j] == 0.0) a[j * n + j] = TINY; if(j != n - 1) { dum = 1. / a[j * n + j]; for(i = j + 1; i < n; ++i) a[i * n + j] *= dum; } } } void filter::Filter::lubksb(vector &a, vector &indx, vector &b) { int i, ii = 0, ip, j; double sum; int n = indx.size(); for(i = 0; i < n; ++i) { ip = indx[i]; sum = b[ip]; b[ip] = b[i]; if(ii != 0) for(j = ii - 1; j < i; ++j) sum -= a[i * n + j] * b[j]; else if(sum != 0.0) ii = i + 1; b[i] = sum; } for(i = n - 1; i >= 0; --i) { sum = b[i]; for(j = i + 1; j < n; ++j) sum -= a[i * n + j] * b[j]; b[i] = sum / a[i * n + i]; } } double filter::Filter::getCentreWavelength(const std::vector &wavelengthIn, const Vector2d& srf, const std::string& interpolationType, double delta, bool verbose) { assert(srf.size()==2);//[0]: wavelength, [1]: response function int nband=srf[0].size(); double start=floor(wavelengthIn[0]); double end=ceil(wavelengthIn.back()); if(verbose) std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush; statfactory::StatFactory stat; gsl_interp_accel *acc; stat.allocAcc(acc); gsl_spline *spline; stat.getSpline(interpolationType,nband,spline); stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband); if(verbose) std::cout << "calculating norm of srf" << std::endl << std::flush; double norm=0; norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc); if(verbose) std::cout << "norm of srf: " << norm << std::endl << std::flush; gsl_spline_free(spline); gsl_interp_accel_free(acc); std::vector wavelength_fine; for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta) wavelength_fine.push_back(win); if(verbose) std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl; std::vector srf_fine;//spectral response function, interpolated for wavelength_fine stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose); assert(srf_fine.size()==wavelength_fine.size()); gsl_interp_accel *accOut; stat.allocAcc(accOut); gsl_spline *splineOut; stat.getSpline(interpolationType,wavelength_fine.size(),splineOut); assert(splineOut); std::vector wavelengthOut(wavelength_fine.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. ***********************************************************************/ #ifndef _MYFILTER_H_ #define _MYFILTER_H_ #include #include extern "C" { #include #include } #include "StatFactory.h" #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" 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, mode=17, mixed=18, smoothnodata=19, threshold=20, ismin=21, ismax=22, heterog=23, order=24, stdev=25, dwt=26, dwti=27, dwt_cut=28, dwt_cut_from=29, savgolay=30, percentile=31, nvalid=32}; enum PADDING { symmetric=0, replicate=1, circular=2, zero=3}; class Filter { public: Filter(void); Filter(const std::vector &taps); virtual ~Filter(){}; void setPadding(const std::string& padString){ m_padding=padString; }; static const gsl_wavelet_type* getWaveletType(const std::string 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_bspline); if(waveletType=="bspline_centered") return(gsl_wavelet_bspline_centered); } static FILTER_TYPE getFilterType(const std::string filterType){ std::map m_filterMap; initFilterMap(m_filterMap); return m_filterMap[filterType]; }; void setTaps(const std::vector &taps, bool normalize=true); void pushClass(short theClass=1){m_class.push_back(theClass);}; void pushMask(short theMask=0){m_mask.push_back(theMask);}; unsigned int pushNoDataValue(double noDataValue); unsigned int setNoDataValues(std::vector vnodata); void pushThreshold(double theThreshold){m_threshold.push_back(theThreshold);}; void setThresholds(const std::vector& theThresholds){m_threshold=theThresholds;}; template void filter(const std::vector& input, std::vector& output); template void filter(const std::vector& input, std::vector& output, const std::string& method, int dim); template void smooth(const std::vector& input, std::vector& output, short dim); template void smoothNoData(const std::vector& input, const std::string& interpolationType, std::vector& output); template void filter(T* input, int inputSize, std::vector& output); template void smooth(T* input, int inputSize, std::vector& output, short dim); //template void morphology(const std::vector& input, std::vector& output, const std::string& method, int dim, bool verbose=false); void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short verbose=0); void filter(const ImgReaderGdal& input, ImgWriterGdal& output); void stat(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method); void stats(const ImgReaderGdal& input, ImgWriterGdal& output, const std::vector& methods); void filter(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim); void getSavGolayCoefficients(std::vector &c, int np, int nl, int nr, int ld, int m); void ludcmp(std::vector &a, std::vector &indx, double &d); void lubksb(std::vector &a, std::vector &indx, std::vector &b); /* void savgolay(const ImgReaderGdal& input, ImgWriterGdal& output, int np, int nl, int nr, int m); */ void smooth(const ImgReaderGdal& input, ImgWriterGdal& output, short dim); void smoothNoData(const ImgReaderGdal& input, const std::string& interpolationType, ImgWriterGdal& output); double getCentreWavelength(const std::vector &wavelengthIn, const Vector2d& srf, const std::string& interpolationType, double delta=1.0, bool verbose=false); template double applySrf(const std::vector &wavelengthIn, const std::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 std::vector &wavelengthIn, const Vector2d& input, const Vector2d& srf, const std::string& interpolationType, std::vector& output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false); template void applyFwhm(const std::vector &wavelengthIn, const std::vector& input, const std::vector &wavelengthOut, const std::vector &fwhm, const std::string& interpolationType, std::vector& output, bool verbose=false); template void applyFwhm(const std::vector &wavelengthIn, const Vector2d& input, const std::vector &wavelengthOut, const std::vector &fwhm, const std::string& interpolationType, Vector2d& output, int down=1, bool verbose=false); void dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family); void dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family); void dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut); void dwtForward(std::vector& data, const std::string& wavelet_type, int family); void dwtInverse(std::vector& data, const std::string& wavelet_type, int family); void dwtCut(std::vector& data, const std::string& wavelet_type, int family, double cut); void dwtCutFrom(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, int band); private: static void initFilterMap(std::map& m_filterMap){ //initialize Map m_filterMap["dwt"]=filter::dwt; m_filterMap["dwti"]=filter::dwti; m_filterMap["dwt_cut"]=filter::dwt_cut; m_filterMap["dwt_cut_from"]=filter::dwt_cut_from; m_filterMap["stdev"]=filter::stdev; m_filterMap["var"]=filter::var; m_filterMap["min"]=filter::min; m_filterMap["max"]=filter::max; m_filterMap["sum"]=filter::sum; m_filterMap["mean"]=filter::mean; m_filterMap["minmax"]=filter::minmax; m_filterMap["dilate"]=filter::dilate; m_filterMap["erode"]=filter::erode; m_filterMap["close"]=filter::close; m_filterMap["open"]=filter::open; m_filterMap["homog"]=filter::homog; m_filterMap["sobelx"]=filter::sobelx; m_filterMap["sobely"]=filter::sobely; m_filterMap["sobelxy"]=filter::sobelxy; m_filterMap["sobelyx"]=filter::sobelyx; m_filterMap["smooth"]=filter::smooth; m_filterMap["density"]=filter::density; m_filterMap["mode"]=filter::mode; m_filterMap["mixed"]=filter::mixed; m_filterMap["smoothnodata"]=filter::smoothnodata; m_filterMap["threshold"]=filter::threshold; m_filterMap["ismin"]=filter::ismin; m_filterMap["ismax"]=filter::ismax; m_filterMap["heterog"]=filter::heterog; m_filterMap["order"]=filter::order; m_filterMap["nvalid"]=filter::nvalid; m_filterMap["median"]=filter::median; m_filterMap["savgolay"]=filter::savgolay; m_filterMap["percentile"]=filter::percentile; } static PADDING getPadding(const std::string& padString){ std::map padMap; padMap["zero"]=filter::zero; padMap["symmetric"]=filter::symmetric; padMap["replicate"]=filter::replicate; padMap["circular"]=filter::circular; return(padMap[padString]); }; std::vector m_taps; std::vector m_class; std::vector m_mask; std::string m_padding; std::vector m_noDataValues; std::vector m_threshold; }; //input[band], output //returns wavelength for which srf is maximum template double Filter::applySrf(const std::vector &wavelengthIn, const std::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(); double start=floor(wavelengthIn[0]); double end=ceil(wavelengthIn.back()); if(verbose) std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush; statfactory::StatFactory stat; gsl_interp_accel *acc; stat.allocAcc(acc); gsl_spline *spline; stat.getSpline(interpolationType,nband,spline); stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband); if(verbose) std::cout << "calculating norm of srf" << std::endl << std::flush; double norm=0; norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc); if(verbose) std::cout << "norm of srf: " << norm << std::endl << std::flush; gsl_spline_free(spline); gsl_interp_accel_free(acc); //interpolate input and srf to delta std::vector wavelength_fine; for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta) wavelength_fine.push_back(win); if(verbose) std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl; std::vector srf_fine;//spectral response function, interpolated for wavelength_fine stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose); assert(srf_fine.size()==wavelength_fine.size()); gsl_interp_accel *accOut; stat.allocAcc(accOut); gsl_spline *splineOut; stat.getSpline(interpolationType,wavelength_fine.size(),splineOut); assert(splineOut); assert(wavelengthIn.size()==input.size()); std::vector input_fine; std::vector product(wavelength_fine.size()); std::vector wavelengthOut(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 double Filter::applySrf(const std::vector &wavelengthIn, const Vector2d& input, const Vector2d& srf, const std::string& interpolationType, std::vector& output, double delta, bool normalize, int down, bool transposeInput, bool verbose) { assert(srf.size()==2);//[0]: wavelength, [1]: response function int nband=srf[0].size(); unsigned int nsample=(transposeInput)? input.size():input[0].size(); output.resize((nsample+down-1)/down); double start=floor(wavelengthIn[0]); double end=ceil(wavelengthIn.back()); if(verbose) std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush; statfactory::StatFactory stat; gsl_interp_accel *acc; stat.allocAcc(acc); gsl_spline *spline; stat.getSpline(interpolationType,nband,spline); stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband); if(verbose) std::cout << "calculating norm of srf" << std::endl << std::flush; double norm=0; norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc); if(verbose) std::cout << "norm of srf: " << norm << std::endl << std::flush; gsl_spline_free(spline); gsl_interp_accel_free(acc); //interpolate input and srf to delta std::vector wavelength_fine; for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta) wavelength_fine.push_back(win); if(verbose) std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl; std::vector srf_fine;//spectral response function, interpolated for wavelength_fine stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose); assert(srf_fine.size()==wavelength_fine.size()); gsl_interp_accel *accOut; stat.allocAcc(accOut); gsl_spline *splineOut; stat.getSpline(interpolationType,wavelength_fine.size(),splineOut); assert(splineOut); std::vector wavelengthOut; double centreWavelength=0; for(int isample=0;isample inputValues; if(transposeInput) inputValues=input[isample]; else input.selectCol(isample,inputValues); assert(wavelengthIn.size()==inputValues.size()); std::vector input_fine; std::vector product(wavelength_fine.size()); stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose); for(int iband=0;iband0); else centreWavelength=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm; } gsl_spline_free(splineOut); gsl_interp_accel_free(accOut); return(centreWavelength); } template void Filter::applyFwhm(const std::vector &wavelengthIn, const std::vector& input, const std::vector &wavelengthOut, const std::vector &fwhm, const std::string& interpolationType, std::vector& output, bool verbose){ double delta=1;//1 nm resolution std::vector stddev(fwhm.size()); for(int index=0;index=wavelengthOut.back()); statfactory::StatFactory stat; std::vector input_fine; std::vector wavelength_fine; for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta) wavelength_fine.push_back(win); if(verbose){ for(int index=0;index tf(nbandIn,nbandOut); for(int indexOut=0;indexOut void Filter::applyFwhm(const std::vector &wavelengthIn, const Vector2d& input, const std::vector &wavelengthOut, const std::vector &fwhm, const std::string& interpolationType, Vector2d& output, int down, bool verbose){ double delta=1;//1 nm resolution std::vector stddev(fwhm.size()); for(int index=0;index wavelength_fine; for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta) wavelength_fine.push_back(win); assert(wavelengthOut.size()==fwhm.size()); assert(wavelengthIn[0]<=wavelengthOut[0]); assert(wavelengthIn.back()>=wavelengthOut.back()); if(verbose){ for(int index=0;index tf(nbandIn,nbandOut); std::vector norm(nbandOut); for(int indexOut=0;indexOut inputValues; input.selectCol(isample,inputValues); assert(wavelengthIn.size()==inputValues.size()); for(int indexOut=0;indexOut input_fine; stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose); output[indexOut][(isample+down-1)/down]=0; for(int indexIn=0;indexIn void Filter::smooth(const std::vector& input, std::vector& output, short dim) { assert(dim>0); m_taps.resize(dim); for(int itap=0;itap void Filter::smoothNoData(const std::vector& input, const std::string& interpolationType, std::vector& output) { statfactory::StatFactory stat; stat.setNoDataValues(m_noDataValues); std::vector abscis(input.size()); for(int i=0;i void Filter::filter(const std::vector& input, std::vector& output) { assert(input.size()>=m_taps.size()); output.resize(input.size()); int i=0; //start: extend input by padding for(i=0;i=t) output[i]+=m_taps[m_taps.size()/2-t]*input[i-t]; else{ switch(getPadding(m_padding)){ case(replicate): output[i]+=m_taps[m_taps.size()/2-t]*input[0]; break; case(circular): output[i]+=m_taps[m_taps.size()/2-t]*input[input.size()+i-t]; break; case(zero): output[i]+=m_taps[m_taps.size()/2-t]*0; break; case(symmetric): default: output[i]+=m_taps[m_taps.size()/2-t]*input[t-i]; break; } } } } //main for(i=m_taps.size()/2;i void Filter::filter(const std::vector& input, std::vector& output, const std::string& method, int dim) { bool verbose=false; assert(dim); output.resize(input.size()); int i=0; statfactory::StatFactory stat; stat.setNoDataValues(m_noDataValues); std::vector statBuffer; short binValue=0; //start: extend input by padding for(i=0;i=t){ theValue=input[i-t]; } else{ switch(getPadding(m_padding)){ case(replicate): theValue=input[0]; break; case(circular): theValue=input[input.size()+i-t]; break; case(zero): theValue=0; break; case(symmetric): default: theValue=input[t-i]; break; } } for(int iclass=0;iclass void Filter::smooth(T* input, int inputSize, std::vector& output, short dim) { assert(dim>0); m_taps.resize(dim); for(int itap=0;itap void Filter::filter(T* input, int inputSize, std::vector& output) { assert(inputSize>=m_taps.size()); output.resize(inputSize); int i=0; //start: extend input by padding for(i=0;i=t) output[i]+=m_taps[m_taps.size()/2-t]*input[i-t]; else{ switch(getPadding(m_padding)){ case(replicate): output[i]+=m_taps[m_taps.size()/2-t]*input[0]; break; case(circular): output[i]+=m_taps[m_taps.size()/2-t]*input[input.size()+i-t]; break; case(zero): output[i]+=m_taps[m_taps.size()/2-t]*0; break; case(symmetric): default: output[i]+=m_taps[m_taps.size()/2-t]*input[t-i]; break; } } } } //main for(i=m_taps.size()/2;i. ***********************************************************************/ #include "ImgRegression.h" #include using namespace imgregression; ImgRegression::ImgRegression(void) : m_threshold(0), m_down(1) {} ImgRegression::~ImgRegression(void) {} double ImgRegression::getRMSE(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose) const{ c0=0; c1=1; int icol1=0,irow1=0; std::vector rowBuffer1(imgReader1.nrOfCol()); std::vector rowBuffer2(imgReader2.nrOfCol()); std::vector buffer1; std::vector buffer2; srand(time(NULL)); for(irow1=0;irow1(icol2); irow2=static_cast(irow2); if(irow2<0||irow2>=imgReader2.nrOfRow()) continue; imgReader2.readData(rowBuffer2,GDT_Float64,irow2,band2); for(icol1=0;icol10){//percentual value double p=static_cast(rand())/(RAND_MAX); p*=100.0; if(p>m_threshold) continue;//do not select for now, go to next column } imgReader1.image2geo(icol1,irow1,geox,geoy); imgReader2.geo2image(geox,geoy,icol2,irow2); if(icol2<0||icol2>=imgReader2.nrOfCol()) continue; icol2=static_cast(icol2); irow2=static_cast(irow2); //check for nodata double value1=rowBuffer1[icol1]; double value2=rowBuffer2[icol2]; if(imgReader1.isNoData(value1)||imgReader2.isNoData(value2)) continue; buffer1.push_back(value1); buffer2.push_back(value2); if(verbose>1) std::cout << geox << " " << geoy << " " << icol1 << " " << irow1 << " " << icol2 << " " << irow2 << " " << buffer1.back() << " " << buffer2.back() << std::endl; } } double err=0; if(buffer1.size()&&buffer2.size()){ statfactory::StatFactory stat; err=stat.linear_regression_err(buffer1,buffer2,c0,c1); } if(verbose) std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with rmse: " << err << std::endl; return err; } double ImgRegression::getR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose) const{ c0=0; c1=1; int icol1=0,irow1=0; std::vector rowBuffer1(imgReader1.nrOfCol()); std::vector rowBuffer2(imgReader2.nrOfCol()); std::vector buffer1; std::vector buffer2; srand(time(NULL)); for(irow1=0;irow1(icol2); irow2=static_cast(irow2); if(irow2<0||irow2>=imgReader2.nrOfRow()) continue; imgReader2.readData(rowBuffer2,GDT_Float64,irow2,band2); for(icol1=0;icol10){//percentual value double p=static_cast(rand())/(RAND_MAX); p*=100.0; if(p>m_threshold) continue;//do not select for now, go to next column } imgReader1.image2geo(icol1,irow1,geox,geoy); imgReader2.geo2image(geox,geoy,icol2,irow2); if(icol2<0||icol2>=imgReader2.nrOfCol()) continue; icol2=static_cast(icol2); irow2=static_cast(irow2); //check for nodata double value1=rowBuffer1[icol1]; double value2=rowBuffer2[icol2]; if(imgReader1.isNoData(value1)||imgReader2.isNoData(value2)) continue; buffer1.push_back(value1); buffer2.push_back(value2); if(verbose>1) std::cout << geox << " " << geoy << " " << icol1 << " " << irow1 << " " << icol2 << " " << irow2 << " " << buffer1.back() << " " << buffer2.back() << std::endl; } } double r2=0; if(buffer1.size()&&buffer2.size()){ statfactory::StatFactory stat; r2=stat.linear_regression(buffer1,buffer2,c0,c1); } if(verbose) std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r2 << std::endl; return r2; } double ImgRegression::pgetR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose) const{ c0=0; c1=1; int icol1=0,irow1=0; std::vector rowBuffer1(imgReader1.nrOfCol()); std::vector rowBuffer2(imgReader2.nrOfCol()); std::vector buffer1; std::vector buffer2; srand(time(NULL)); for(irow1=0;irow1(icol2); irow2=static_cast(irow2); if(irow2<0||irow2>=imgReader2.nrOfRow()) continue; imgReader2.readData(rowBuffer2,GDT_Float64,irow2,band2); for(icol1=0;icol10){//percentual value double p=static_cast(rand())/(RAND_MAX); p*=100.0; if(p>m_threshold) continue;//do not select for now, go to next column } imgReader1.image2geo(icol1,irow1,geox,geoy); imgReader2.geo2image(geox,geoy,icol2,irow2); if(icol2<0||icol2>=imgReader2.nrOfCol()) continue; icol2=static_cast(icol2); irow2=static_cast(irow2); //check for nodata double value1=rowBuffer1[icol1]; double value2=rowBuffer2[icol2]; if(imgReader1.isNoData(value1)||imgReader2.isNoData(value2)) continue; buffer1.push_back(value1); buffer2.push_back(value2); if(verbose>1) std::cout << geox << " " << geoy << " " << icol1 << " " << irow1 << " " << icol2 << " " << irow2 << " " << buffer1.back() << " " << buffer2.back() << std::endl; } } double r=0; if(buffer1.size()&&buffer2.size()){ statfactory::StatFactory stat; r=stat.correlation(buffer1,buffer2); // r=stat.gsl_correlation(buffer1,buffer2); double m1=0; double v1=0; double m2=0; double v2=0; stat.meanVar(buffer1,m1,v1); stat.meanVar(buffer2,m2,v2); if(v1>0){ if(r>=0) c1=v2/v1; else c1=-v2/v1; } c0=m2-c1*m1; } if(verbose) std::cout << "orthogonal regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r*r << std::endl; return r*r; } double ImgRegression::getRMSE(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose) const{ c0=0; c1=1; int icol=0,irow=0; std::vector rowBuffer1(imgReader.nrOfCol()); std::vector rowBuffer2(imgReader.nrOfCol()); std::vector buffer1; std::vector buffer2; srand(time(NULL)); assert(band1>=0); assert(band1=0); assert(band20){//percentual value double p=static_cast(rand())/(RAND_MAX); p*=100.0; if(p>m_threshold) continue;//do not select for now, go to next column } //check for nodata double value1=rowBuffer1[icol]; double value2=rowBuffer2[icol]; if(imgReader.isNoData(value1)||imgReader.isNoData(value2)) continue; buffer1.push_back(value1); buffer2.push_back(value2); if(verbose>1) std::cout << icol << " " << irow << " " << buffer1.back() << " " << buffer2.back() << std::endl; } } double err=0; if(buffer1.size()&&buffer2.size()){ statfactory::StatFactory stat; err=stat.linear_regression_err(buffer1,buffer2,c0,c1); } if(verbose) std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with rmse: " << err << std::endl; return err; } double ImgRegression::getR2(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose) const{ c0=0; c1=1; int icol=0,irow=0; std::vector rowBuffer1(imgReader.nrOfCol()); std::vector rowBuffer2(imgReader.nrOfCol()); std::vector buffer1; std::vector buffer2; srand(time(NULL)); assert(band1>=0); assert(band1=0); assert(band20){//percentual value double p=static_cast(rand())/(RAND_MAX); p*=100.0; if(p>m_threshold) continue;//do not select for now, go to next column } //check for nodata double value1=rowBuffer1[icol]; double value2=rowBuffer2[icol]; if(imgReader.isNoData(value1)||imgReader.isNoData(value2)) continue; buffer1.push_back(value1); buffer2.push_back(value2); if(verbose>1) std::cout << icol << " " << irow << " " << buffer1.back() << " " << buffer2.back() << std::endl; } } double r2=0; if(buffer1.size()&&buffer2.size()){ statfactory::StatFactory stat; r2=stat.linear_regression(buffer1,buffer2,c0,c1); } if(verbose) std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r2 << std::endl; return r2; } double ImgRegression::pgetR2(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose) const{ c0=0; c1=1; int icol=0,irow=0; std::vector rowBuffer1(imgReader.nrOfCol()); std::vector rowBuffer2(imgReader.nrOfCol()); std::vector buffer1; std::vector buffer2; srand(time(NULL)); assert(band1>=0); assert(band1=0); assert(band20){//percentual value double p=static_cast(rand())/(RAND_MAX); p*=100.0; if(p>m_threshold) continue;//do not select for now, go to next column } //check for nodata double value1=rowBuffer1[icol]; double value2=rowBuffer2[icol]; if(imgReader.isNoData(value1)||imgReader.isNoData(value2)) continue; buffer1.push_back(value1); buffer2.push_back(value2); if(verbose>1) std::cout << icol << " " << irow << " " << buffer1.back() << " " << buffer2.back() << std::endl; } } double r=0; if(buffer1.size()&&buffer2.size()){ statfactory::StatFactory stat; r=stat.correlation(buffer1,buffer2); // r=stat.gsl_correlation(buffer1,buffer2); double m1=0; double v1=0; double m2=0; double v2=0; stat.meanVar(buffer1,m1,v1); stat.meanVar(buffer2,m2,v2); if(v1>0){ if(r>=0) c1=v2/v1; else c1=-v2/v1; } c0=m2-c1*m1; } if(verbose) std::cout << "orthogonal regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r*r << std::endl; return r*r; } pktools-2.6.6/src/algorithms/myfann_cpp.h0000644000113200011300000043116512437344533015410 00000000000000#ifndef FANN_CPP_H_INCLUDED #define FANN_CPP_H_INCLUDED /* * * Fast Artificial Neural Network (fann) C++ Wrapper * Copyright (C) 2004-2006 created by freegoldbar (at) yahoo dot com * * This wrapper is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This wrapper 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * Title: FANN Wrapper for C++ * * Overview: * * The Fann Wrapper for C++ provides two classes: * and . To use the wrapper include * doublefann.h, floatfann.h or fixedfann.h before the * fann_cpp.h header file. To get started see xor_sample.cpp * in the examples directory. The license is LGPL. Copyright (C) * 2004-2006 created by . * * Note: Notes and differences from C API * * - The Fann Wrapper for C++ is a minimal wrapper without use of * templates or exception handling for efficient use in any environment. * Benefits include stricter type checking, simpler memory * management and possibly code completion in program editor. * - Method names are the same as the function names in the C * API except the fann_ prefix has been removed. Enums in the * namespace are similarly defined without the FANN_ prefix. * - The arguments to the methods are the same as the C API * except that the struct fann *ann/struct fann_train_data *data * arguments are encapsulated so they are not present in the * method signatures or are translated into class references. * - The various create methods return a boolean set to true to * indicate that the neural network was created, false otherwise. * The same goes for the read_train_from_file method. * - The neural network and training data is automatically cleaned * up in the destructors and create/read methods. * - To make the destructors virtual define USE_VIRTUAL_DESTRUCTOR * before including the header file. * - Additional methods are available on the training_data class to * give access to the underlying training data. They are get_input, * get_output and set_train_data. Finally fann_duplicate_train_data * has been replaced by a copy constructor. * * Note: Changes * * Version 2.1.0: * - General update to fann C library 2.1.0 with support for new functionality * - Due to changes in the C API the C++ API is not fully backward compatible: * The create methods have changed names and parameters. * The training callback function has different parameters and a set_callback. * Some methods have updated names. * Get activation function and steepness is available for neurons, not layers. * - Extensions are now part of fann so there is no fann_extensions.h * * Version 1.2.0: * - Changed char pointers to const std::string references * - Added const_casts where the C API required it * - Initialized enums from the C enums instead of numeric constants * - Added a method set_train_data that copies and allocates training * - data in a way that is compatible with the way the C API deallocates * - the data thus making it possible to change training data. * - The get_rprop_increase_factor method did not return its value * * Version 1.0.0: * - Initial version * */ #include #include #include #include #include #include "base/Vector2d.h" /* Namespace: FANN The FANN namespace groups the C++ wrapper definitions */ namespace FANN { /* Enum: error_function_enum Error function used during training. ERRORFUNC_LINEAR - Standard linear error function. ERRORFUNC_TANH - Tanh error function, usually better but can require a lower learning rate. This error function agressively targets outputs that differ much from the desired, while not targetting outputs that only differ a little that much. This activation function is not recommended for cascade training and incremental training. See also: , */ enum error_function_enum { ERRORFUNC_LINEAR = FANN_ERRORFUNC_LINEAR, ERRORFUNC_TANH }; /* Enum: stop_function_enum Stop criteria used during training. STOPFUNC_MSE - Stop criteria is Mean Square Error (MSE) value. STOPFUNC_BIT - Stop criteria is number of bits that fail. The number of bits; means the number of output neurons which differ more than the bit fail limit (see , ). The bits are counted in all of the training data, so this number can be higher than the number of training data. See also: , */ enum stop_function_enum { STOPFUNC_MSE = FANN_STOPFUNC_MSE, STOPFUNC_BIT }; /* Enum: training_algorithm_enum The Training algorithms used when training on with functions like or . The incremental training looks alters the weights after each time it is presented an input pattern, while batch only alters the weights once after it has been presented to all the patterns. TRAIN_INCREMENTAL - Standard backpropagation algorithm, where the weights are updated after each training pattern. This means that the weights are updated many times during a single epoch. For this reason some problems, will train very fast with this algorithm, while other more advanced problems will not train very well. TRAIN_BATCH - Standard backpropagation algorithm, where the weights are updated after calculating the mean square error for the whole training set. This means that the weights are only updated once during a epoch. For this reason some problems, will train slower with this algorithm. But since the mean square error is calculated more correctly than in incremental training, some problems will reach a better solutions with this algorithm. TRAIN_RPROP - A more advanced batch training algorithm which achieves good results for many problems. The RPROP training algorithm is adaptive, and does therefore not use the learning_rate. Some other parameters can however be set to change the way the RPROP algorithm works, but it is only recommended for users with insight in how the RPROP training algorithm works. The RPROP training algorithm is described by [Riedmiller and Braun, 1993], but the actual learning algorithm used here is the iRPROP- training algorithm which is described by [Igel and Husken, 2000] which is an variety of the standard RPROP training algorithm. TRAIN_QUICKPROP - A more advanced batch training algorithm which achieves good results for many problems. The quickprop training algorithm uses the learning_rate parameter along with other more advanced parameters, but it is only recommended to change these advanced parameters, for users with insight in how the quickprop training algorithm works. The quickprop training algorithm is described by [Fahlman, 1988]. See also: , */ enum training_algorithm_enum { TRAIN_INCREMENTAL = FANN_TRAIN_INCREMENTAL, TRAIN_BATCH, TRAIN_RPROP, TRAIN_QUICKPROP }; /* Enum: activation_function_enum The activation functions used for the neurons during training. The activation functions can either be defined for a group of neurons by and or it can be defined for a single neuron by . The steepness of an activation function is defined in the same way by , and . The functions are described with functions where: * x is the input to the activation function, * y is the output, * s is the steepness and * d is the derivation. FANN_LINEAR - Linear activation function. * span: -inf < y < inf * y = x*s, d = 1*s * Can NOT be used in fixed point. FANN_THRESHOLD - Threshold activation function. * x < 0 -> y = 0, x >= 0 -> y = 1 * Can NOT be used during training. FANN_THRESHOLD_SYMMETRIC - Threshold activation function. * x < 0 -> y = 0, x >= 0 -> y = 1 * Can NOT be used during training. FANN_SIGMOID - Sigmoid activation function. * One of the most used activation functions. * span: 0 < y < 1 * y = 1/(1 + exp(-2*s*x)) * d = 2*s*y*(1 - y) FANN_SIGMOID_STEPWISE - Stepwise linear approximation to sigmoid. * Faster than sigmoid but a bit less precise. FANN_SIGMOID_SYMMETRIC - Symmetric sigmoid activation function, aka. tanh. * One of the most used activation functions. * span: -1 < y < 1 * y = tanh(s*x) = 2/(1 + exp(-2*s*x)) - 1 * d = s*(1-(y*y)) FANN_SIGMOID_SYMMETRIC - Stepwise linear approximation to symmetric sigmoid. * Faster than symmetric sigmoid but a bit less precise. FANN_GAUSSIAN - Gaussian activation function. * 0 when x = -inf, 1 when x = 0 and 0 when x = inf * span: 0 < y < 1 * y = exp(-x*s*x*s) * d = -2*x*s*y*s FANN_GAUSSIAN_SYMMETRIC - Symmetric gaussian activation function. * -1 when x = -inf, 1 when x = 0 and 0 when x = inf * span: -1 < y < 1 * y = exp(-x*s*x*s)*2-1 * d = -2*x*s*(y+1)*s FANN_ELLIOT - Fast (sigmoid like) activation function defined by David Elliott * span: 0 < y < 1 * y = ((x*s) / 2) / (1 + |x*s|) + 0.5 * d = s*1/(2*(1+|x*s|)*(1+|x*s|)) FANN_ELLIOT_SYMMETRIC - Fast (symmetric sigmoid like) activation function defined by David Elliott * span: -1 < y < 1 * y = (x*s) / (1 + |x*s|) * d = s*1/((1+|x*s|)*(1+|x*s|)) FANN_LINEAR_PIECE - Bounded linear activation function. * span: 0 < y < 1 * y = x*s, d = 1*s FANN_LINEAR_PIECE_SYMMETRIC - Bounded Linear activation function. * span: -1 < y < 1 * y = x*s, d = 1*s FANN_SIN_SYMMETRIC - Periodical sinus activation function. * span: -1 <= y <= 1 * y = sin(x*s) * d = s*cos(x*s) FANN_COS_SYMMETRIC - Periodical cosinus activation function. * span: -1 <= y <= 1 * y = cos(x*s) * d = s*-sin(x*s) See also: , */ enum activation_function_enum { LINEAR = FANN_LINEAR, THRESHOLD, THRESHOLD_SYMMETRIC, SIGMOID, SIGMOID_STEPWISE, SIGMOID_SYMMETRIC, SIGMOID_SYMMETRIC_STEPWISE, GAUSSIAN, GAUSSIAN_SYMMETRIC, GAUSSIAN_STEPWISE, ELLIOT, ELLIOT_SYMMETRIC, LINEAR_PIECE, LINEAR_PIECE_SYMMETRIC, SIN_SYMMETRIC, COS_SYMMETRIC }; /* Enum: network_type_enum Definition of network types used by LAYER - Each layer only has connections to the next layer SHORTCUT - Each layer has connections to all following layers See Also: , This enumeration appears in FANN >= 2.1.0 */ enum network_type_enum { LAYER = FANN_NETTYPE_LAYER, SHORTCUT }; /* Type: connection Describes a connection between two neurons and its weight from_neuron - Unique number used to identify source neuron to_neuron - Unique number used to identify destination neuron weight - The numerical value of the weight See Also: , This structure appears in FANN >= 2.1.0 */ typedef struct fann_connection connection; /* Forward declaration of class neural_net and training_data */ class neural_net; class training_data; /* Type: callback_type This callback function can be called during training when using , or . >typedef int (*callback_type) (neural_net &net, training_data &train, > unsigned int max_epochs, unsigned int epochs_between_reports, > float desired_error, unsigned int epochs, void *user_data); The callback can be set by using and is very usefull for doing custom things during training. It is recommended to use this function when implementing custom training procedures, or when visualizing the training in a GUI etc. The parameters which the callback function takes is the parameters given to the , plus an epochs parameter which tells how many epochs the training have taken so far. The callback function should return an integer, if the callback function returns -1, the training will terminate. Example of a callback function that prints information to cout: >int print_callback(FANN::neural_net &net, FANN::training_data &train, > unsigned int max_epochs, unsigned int epochs_between_reports, > float desired_error, unsigned int epochs, void *user_data) >{ > cout << "Epochs " << setw(8) << epochs << ". " > << "Current Error: " << left << net.get_MSE() << right << endl; > return 0; >} See also: , */ typedef int (*callback_type) (neural_net &net, training_data &train, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, unsigned int epochs, void *user_data); /*************************************************************************/ /* Class: training_data Encapsulation of a training data set and associated C API functions. */ class training_data { public: /* Constructor: training_data Default constructor creates an empty neural net. Use , or to initialize. */ training_data() : train_data(NULL) { } /* Constructor: training_data Copy constructor constructs a copy of the training data. Corresponds to the C API function. */ training_data(const training_data &data) { destroy_train(); if (data.train_data != NULL) { train_data = fann_duplicate_train_data(data.train_data); } } /* Destructor: ~training_data Provides automatic cleanup of data. Define USE_VIRTUAL_DESTRUCTOR if you need the destructor to be virtual. See also: */ #ifdef USE_VIRTUAL_DESTRUCTOR virtual #endif ~training_data() { destroy_train(); } /* Method: destroy Destructs the training data. Called automatically by the destructor. See also: <~training_data> */ void destroy_train() { if (train_data != NULL) { fann_destroy_train(train_data); train_data = NULL; } } /* Method: read_train_from_file Reads a file that stores training data. The file must be formatted like: >num_train_data num_input num_output >inputdata seperated by space >outputdata seperated by space > >. >. >. > >inputdata seperated by space >outputdata seperated by space See also: , , This function appears in FANN >= 1.0.0 */ bool read_train_from_file(const std::string &filename) { destroy_train(); train_data = fann_read_train_from_file(filename.c_str()); return (train_data != NULL); } /* Method: save_train Save the training structure to a file, with the format as specified in Return: The function returns true on success and false on failure. See also: , , This function appears in FANN >= 1.0.0. */ bool save_train(const std::string &filename) { if (train_data == NULL) { return false; } if (fann_save_train(train_data, filename.c_str()) == -1) { return false; } return true; } /* Method: save_train_to_fixed Saves the training structure to a fixed point data file. This function is very usefull for testing the quality of a fixed point network. Return: The function returns true on success and false on failure. See also: , This function appears in FANN >= 1.0.0. */ bool save_train_to_fixed(const std::string &filename, unsigned int decimal_point) { if (train_data == NULL) { return false; } if (fann_save_train_to_fixed(train_data, filename.c_str(), decimal_point) == -1) { return false; } return true; } /* Method: shuffle_train_data Shuffles training data, randomizing the order. This is recommended for incremental training, while it have no influence during batch training. This function appears in FANN >= 1.1.0. */ void shuffle_train_data() { if (train_data != NULL) { fann_shuffle_train_data(train_data); } } /* Method: merge_train_data Merges the data into the data contained in the . This function appears in FANN >= 1.1.0. */ void merge_train_data(const training_data &data) { fann_train_data *new_data = fann_merge_train_data(train_data, data.train_data); if (new_data != NULL) { destroy_train(); train_data = new_data; } } /* Method: length_train_data Returns the number of training patterns in the . See also: , , This function appears in FANN >= 2.0.0. */ unsigned int length_train_data() { if (train_data == NULL) { return 0; } else { return fann_length_train_data(train_data); } } /* Method: num_input_train_data Returns the number of inputs in each of the training patterns in the . See also: , , This function appears in FANN >= 2.0.0. */ unsigned int num_input_train_data() { if (train_data == NULL) { return 0; } else { return fann_num_input_train_data(train_data); } } /* Method: num_output_train_data Returns the number of outputs in each of the training patterns in the . See also: , , This function appears in FANN >= 2.0.0. */ unsigned int num_output_train_data() { if (train_data == NULL) { return 0; } else { return fann_num_output_train_data(train_data); } } /* Grant access to the encapsulated data since many situations and applications creates the data from sources other than files or uses the training data for testing and related functions */ /* Method: get_input Returns: A pointer to the array of input training data See also: , */ fann_type **get_input() { if (train_data == NULL) { return NULL; } else { return train_data->input; } } /* Method: get_output Returns: A pointer to the array of output training data See also: , */ fann_type **get_output() { if (train_data == NULL) { return NULL; } else { return train_data->output; } } /* Method: set_train_data Set the training data to the input and output data provided. A copy of the data is made so there are no restrictions on the allocation of the input/output data and the caller is responsible for the deallocation of the data pointed to by input and output. Parameters: num_data - The number of training data num_input - The number of inputs per training data num_output - The number of outputs per training data input - The set of inputs (a pointer to an array of pointers to arrays of floating point data) output - The set of desired outputs (a pointer to an array of pointers to arrays of floating point data) See also: , */ void set_train_data(unsigned int num_data, unsigned int num_input, fann_type **input, unsigned int num_output, fann_type **output) { // Uses the allocation method used in fann struct fann_train_data *data = (struct fann_train_data *)malloc(sizeof(struct fann_train_data)); data->input = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->output = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->num_data = num_data; data->num_input = num_input; data->num_output = num_output; fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type)); fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type)); for (unsigned int i = 0; i < num_data; ++i) { data->input[i] = data_input; data_input += num_input; for (unsigned int j = 0; j < num_input; ++j) { data->input[i][j] = input[i][j]; } data->output[i] = data_output; data_output += num_output; for (unsigned int j = 0; j < num_output; ++j) { data->output[i][j] = output[i][j]; } } set_train_data(data); } void set_train_data(const std::vector< std::vector >& input, const std::vector< std::vector >& output) { unsigned int num_data=input.size(); assert(num_data); assert(input.size()==output.size()); unsigned int num_input=input[0].size(); unsigned int num_output=output[0].size(); // Uses the allocation method used in fann struct fann_train_data *data = (struct fann_train_data *)malloc(sizeof(struct fann_train_data)); data->input = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->output = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->num_data = num_data; data->num_input = num_input; data->num_output = num_output; fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type)); fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type)); for (unsigned int i = 0; i < num_data; ++i) { data->input[i] = data_input; data_input += num_input; for (unsigned int j = 0; j < num_input; ++j) { data->input[i][j] = input[i][j]; } data->output[i] = data_output; data_output += num_output; for (unsigned int j = 0; j < num_output; ++j) { data->output[i][j] = output[i][j]; } } set_train_data(data); } void set_train_data(const std::vector< std::vector< std::vector > >& input, unsigned int num_data) { assert(num_data); assert(input.size()); unsigned int num_class=input.size(); assert(input[0].size()); unsigned int num_input=input[0][0].size(); unsigned int num_output=num_class; //test // unsigned int num_output=1; // Uses the allocation method used in fann struct fann_train_data *data = (struct fann_train_data *)malloc(sizeof(struct fann_train_data)); data->input = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->output = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->num_data = num_data; data->num_input = num_input; data->num_output = num_output; fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type)); fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type)); unsigned int isample=0; for(int iclass=0;iclassinput[isample] = data_input; data_input += num_input; for(int iband=0;ibandinput[isample][iband] = input[iclass][csample][iband]; } data->output[isample] = data_output; data_output += num_output; for(int ic=0;icoutput[isample][ic]=2.0/(num_class-1)*(iclass-(num_class-1)/2.0); if(ic==iclass) data->output[isample][ic] = 1; else data->output[isample][ic] = -1; } ++isample; } } set_train_data(data); } void set_train_data(const std::vector< Vector2d >& input, unsigned int num_data) { assert(num_data); assert(input.size()); unsigned int num_class=input.size(); assert(input[0].size()); unsigned int num_input=input[0][0].size(); unsigned int num_output=num_class; //test // unsigned int num_output=1; // Uses the allocation method used in fann struct fann_train_data *data = (struct fann_train_data *)malloc(sizeof(struct fann_train_data)); data->input = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->output = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->num_data = num_data; data->num_input = num_input; data->num_output = num_output; fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type)); fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type)); unsigned int isample=0; for(int iclass=0;iclassinput[isample] = data_input; data_input += num_input; for(int iband=0;ibandinput[isample][iband] = input[iclass][csample][iband]; } data->output[isample] = data_output; data_output += num_output; for(int ic=0;icoutput[isample][ic]=2.0/(num_class-1)*(iclass-(num_class-1)/2.0); if(ic==iclass) data->output[isample][ic] = 1; else data->output[isample][ic] = -1; } ++isample; } } set_train_data(data); } private: /* Set the training data to the struct fann_training_data pointer. The struct has to be allocated with malloc to be compatible with fann_destroy. */ void set_train_data(struct fann_train_data *data) { destroy_train(); train_data = data; } public: /*********************************************************************/ /* Method: create_train_from_callback Creates the training data struct from a user supplied function. As the training data are numerable (data 1, data 2...), the user must write a function that receives the number of the training data set (input,output) and returns the set. Parameters: num_data - The number of training data num_input - The number of inputs per training data num_output - The number of outputs per training data user_function - The user suplied function Parameters for the user function: num - The number of the training data set num_input - The number of inputs per training data num_output - The number of outputs per training data input - The set of inputs output - The set of desired outputs See also: , , This function appears in FANN >= 2.1.0 */ void create_train_from_callback(unsigned int num_data, unsigned int num_input, unsigned int num_output, void (FANN_API *user_function)( unsigned int, unsigned int, unsigned int, fann_type * , fann_type * )) { destroy_train(); train_data = fann_create_train_from_callback(num_data, num_input, num_output, user_function); } /* Method: scale_input_train_data Scales the inputs in the training data to the specified range. See also: , , This function appears in FANN >= 2.0.0. */ void scale_input_train_data(fann_type new_min, fann_type new_max) { if (train_data != NULL) { fann_scale_input_train_data(train_data, new_min, new_max); } } /* Method: scale_output_train_data Scales the outputs in the training data to the specified range. See also: , , This function appears in FANN >= 2.0.0. */ void scale_output_train_data(fann_type new_min, fann_type new_max) { if (train_data != NULL) { fann_scale_output_train_data(train_data, new_min, new_max); } } /* Method: scale_train_data Scales the inputs and outputs in the training data to the specified range. See also: , , This function appears in FANN >= 2.0.0. */ void scale_train_data(fann_type new_min, fann_type new_max) { if (train_data != NULL) { fann_scale_train_data(train_data, new_min, new_max); } } /* Method: subset_train_data Changes the training data to a subset, starting at position *pos* and *length* elements forward. Use the copy constructor to work on a new copy of the training data. >FANN::training_data full_data_set; >full_data_set.read_train_from_file("somefile.train"); >FANN::training_data *small_data_set = new FANN::training_data(full_data_set); >small_data_set->subset_train_data(0, 2); // Only use first two >// Use small_data_set ... >delete small_data_set; See also: This function appears in FANN >= 2.0.0. */ void subset_train_data(unsigned int pos, unsigned int length) { if (train_data != NULL) { struct fann_train_data *temp = fann_subset_train_data(train_data, pos, length); destroy_train(); train_data = temp; } } /*********************************************************************/ protected: /* The neural_net class has direct access to the training data */ friend class neural_net; /* Pointer to the encapsulated training data */ struct fann_train_data* train_data; }; /*************************************************************************/ /* Class: neural_net Encapsulation of a neural network and associated C API functions. */ class neural_net { public: /* Constructor: neural_net Default constructor creates an empty neural net. Use one of the create functions to create the neural network. See also: , , , , , */ neural_net() : ann(NULL) { } /* Destructor: ~neural_net Provides automatic cleanup of data. Define USE_VIRTUAL_DESTRUCTOR if you need the destructor to be virtual. See also: */ #ifdef USE_VIRTUAL_DESTRUCTOR virtual #endif ~neural_net() { destroy(); } /* Method: destroy Destructs the entire network. Called automatically by the destructor. See also: <~neural_net> */ void destroy() { if (ann != NULL) { user_context *user_data = static_cast(fann_get_user_data(ann)); if (user_data != NULL) delete user_data; fann_destroy(ann); ann = NULL; } } /* Method: create_standard Creates a standard fully connected backpropagation neural network. There will be a bias neuron in each layer (except the output layer), and this bias neuron will be connected to all neurons in the next layer. When running the network, the bias nodes always emits 1. Parameters: num_layers - The total number of layers including the input and the output layer. ... - Integer values determining the number of neurons in each layer starting with the input layer and ending with the output layer. Returns: Boolean true if the network was created, false otherwise. Example: >const unsigned int num_layers = 3; >const unsigned int num_input = 2; >const unsigned int num_hidden = 3; >const unsigned int num_output = 1; > >FANN::neural_net net; >net.create_standard(num_layers, num_input, num_hidden, num_output); See also: , , , This function appears in FANN >= 2.0.0. */ bool create_standard(unsigned int num_layers, ...) { va_list layers; std::vector arr(num_layers);//pk //unsigned int arr[num_layers]; va_start(layers, num_layers); /* bool status = create_standard_array(num_layers, */ /* reinterpret_cast(layers)); */ for (unsigned int ii = 0; ii < num_layers; ii++) arr[ii] = va_arg(layers, unsigned int); bool status = create_standard_array(num_layers, &(arr[0]));//pk //bool status = create_standard_array(num_layers, arr); va_end(layers); return status; } /* Method: create_standard_array Just like , but with an array of layer sizes instead of individual parameters. See also: , , , This function appears in FANN >= 2.0.0. */ bool create_standard_array(unsigned int num_layers, const unsigned int * layers) { destroy(); ann = fann_create_standard_array(num_layers, layers); return (ann != NULL); } /* Method: create_sparse Creates a standard backpropagation neural network, which is not fully connected. Parameters: connection_rate - The connection rate controls how many connections there will be in the network. If the connection rate is set to 1, the network will be fully connected, but if it is set to 0.5 only half of the connections will be set. A connection rate of 1 will yield the same result as num_layers - The total number of layers including the input and the output layer. ... - Integer values determining the number of neurons in each layer starting with the input layer and ending with the output layer. Returns: Boolean true if the network was created, false otherwise. See also: , , , This function appears in FANN >= 2.0.0. */ bool create_sparse(float connection_rate, unsigned int num_layers, ...) { va_list layers; std::vector arr(num_layers);//pk //unsigned int arr[num_layers]; va_start(layers, num_layers); /* bool status = create_sparse_array(connection_rate, num_layers, */ /* reinterpret_cast(layers)); */ for (unsigned int ii = 0; ii < num_layers; ii++) arr[ii] = va_arg(layers, unsigned int); bool status = create_sparse_array(connection_rate, num_layers, &(arr[0]));//pk //bool status = create_sparse_array(connection_rate, num_layers, arr); va_end(layers); return status; } /* Method: create_sparse_array Just like , but with an array of layer sizes instead of individual parameters. See for a description of the parameters. See also: , , , This function appears in FANN >= 2.0.0. */ bool create_sparse_array(float connection_rate, unsigned int num_layers, const unsigned int * layers) { destroy(); ann = fann_create_sparse_array(connection_rate, num_layers, layers); return (ann != NULL); } /* Method: create_shortcut Creates a standard backpropagation neural network, which is not fully connected and which also has shortcut connections. Shortcut connections are connections that skip layers. A fully connected network with shortcut connections, is a network where all neurons are connected to all neurons in later layers. Including direct connections from the input layer to the output layer. See for a description of the parameters. See also: , , , This function appears in FANN >= 2.0.0. */ bool create_shortcut(unsigned int num_layers, ...) { va_list layers; std::vector arr(num_layers);//pk //unsigned int arr[num_layers]; va_start(layers, num_layers); /* bool status = create_shortcut_array(num_layers, */ /* reinterpret_cast(layers)); */ for (unsigned int ii = 0; ii < num_layers; ii++) arr[ii] = va_arg(layers, unsigned int); bool status = create_shortcut_array(num_layers, &(arr[0]));// //bool status = create_shortcut_array(num_layers, arr); va_end(layers); return status; } /* Method: create_shortcut_array Just like , but with an array of layer sizes instead of individual parameters. See for a description of the parameters. See also: , , , This function appears in FANN >= 2.0.0. */ bool create_shortcut_array(unsigned int num_layers, const unsigned int * layers) { destroy(); ann = fann_create_shortcut_array(num_layers, layers); return (ann != NULL); } /* Method: run Will run input through the neural network, returning an array of outputs, the number of which being equal to the number of neurons in the output layer. See also: , This function appears in FANN >= 1.0.0. */ fann_type* run(fann_type *input) { if (ann == NULL) { return NULL; } // for(int iband=0;iband run(std::vector input) { std::vector vresult; if (ann == NULL) { return vresult; } vresult.resize(get_num_output()); fann_type* result; result=fann_run(ann,&(input[0])); for(int iout=0;iout, This function appears in FANN >= 1.0.0. */ void randomize_weights(fann_type min_weight, fann_type max_weight) { if (ann != NULL) { fann_randomize_weights(ann, min_weight, max_weight); } } /* Method: init_weights Initialize the weights using Widrow + Nguyen's algorithm. This function behaves similarly to fann_randomize_weights. It will use the algorithm developed by Derrick Nguyen and Bernard Widrow to set the weights in such a way as to speed up training. This technique is not always successful, and in some cases can be less efficient than a purely random initialization. The algorithm requires access to the range of the input data (ie, largest and smallest input), and therefore accepts a second argument, data, which is the training data that will be used to train the network. See also: , , This function appears in FANN >= 1.1.0. */ void init_weights(const training_data &data) { if ((ann != NULL) && (data.train_data != NULL)) { fann_init_weights(ann, data.train_data); } } /* Method: print_connections Will print the connections of the ann in a compact matrix, for easy viewing of the internals of the ann. The output from fann_print_connections on a small (2 2 1) network trained on the xor problem >Layer / Neuron 012345 >L 1 / N 3 BBa... >L 1 / N 4 BBA... >L 1 / N 5 ...... >L 2 / N 6 ...BBA >L 2 / N 7 ...... This network have five real neurons and two bias neurons. This gives a total of seven neurons named from 0 to 6. The connections between these neurons can be seen in the matrix. "." is a place where there is no connection, while a character tells how strong the connection is on a scale from a-z. The two real neurons in the hidden layer (neuron 3 and 4 in layer 1) has connection from the three neurons in the previous layer as is visible in the first two lines. The output neuron (6) has connections form the three neurons in the hidden layer 3 - 5 as is visible in the fourth line. To simplify the matrix output neurons is not visible as neurons that connections can come from, and input and bias neurons are not visible as neurons that connections can go to. This function appears in FANN >= 1.2.0. */ void print_connections() { if (ann != NULL) { fann_print_connections(ann); } } /* Method: create_from_file Constructs a backpropagation neural network from a configuration file, which have been saved by . See also: , , This function appears in FANN >= 1.0.0. */ bool create_from_file(const std::string &configuration_file) { destroy(); ann = fann_create_from_file(configuration_file.c_str()); return (ann != NULL); } /* Method: save Save the entire network to a configuration file. The configuration file contains all information about the neural network and enables to create an exact copy of the neural network and all of the parameters associated with the neural network. These two parameters (, ) are *NOT* saved to the file because they cannot safely be ported to a different location. Also temporary parameters generated during training like is not saved. Return: The function returns 0 on success and -1 on failure. See also: , , This function appears in FANN >= 1.0.0. */ bool save(const std::string &configuration_file) { if (ann == NULL) { return false; } if (fann_save(ann, configuration_file.c_str()) == -1) { return false; } return true; } /* Method: save_to_fixed Saves the entire network to a configuration file. But it is saved in fixed point format no matter which format it is currently in. This is usefull for training a network in floating points, and then later executing it in fixed point. The function returns the bit position of the fix point, which can be used to find out how accurate the fixed point network will be. A high value indicates high precision, and a low value indicates low precision. A negative value indicates very low precision, and a very strong possibility for overflow. (the actual fix point will be set to 0, since a negative fix point does not make sence). Generally, a fix point lower than 6 is bad, and should be avoided. The best way to avoid this, is to have less connections to each neuron, or just less neurons in each layer. The fixed point use of this network is only intended for use on machines that have no floating point processor, like an iPAQ. On normal computers the floating point version is actually faster. See also: , , This function appears in FANN >= 1.0.0. */ int save_to_fixed(const std::string &configuration_file) { int fixpoint = 0; if (ann != NULL) { fixpoint = fann_save_to_fixed(ann, configuration_file.c_str()); } return fixpoint; } #ifndef FIXEDFANN /* Method: train Train one iteration with a set of inputs, and a set of desired outputs. This training is always incremental training (see ), since only one pattern is presented. Parameters: ann - The neural network structure input - an array of inputs. This array must be exactly long. desired_output - an array of desired outputs. This array must be exactly long. See also: , , This function appears in FANN >= 1.0.0. */ void train(fann_type *input, fann_type *desired_output) { if (ann != NULL) { fann_train(ann, input, desired_output); } } /* Method: train_epoch Train one epoch with a set of training data. Train one epoch with the training data stored in data. One epoch is where all of the training data is considered exactly once. This function returns the MSE error as it is calculated either before or during the actual training. This is not the actual MSE after the training epoch, but since calculating this will require to go through the entire training set once more, it is more than adequate to use this value during training. The training algorithm used by this function is chosen by the function. See also: , , This function appears in FANN >= 1.2.0. */ float train_epoch(const training_data &data) { float mse = 0.0f; if ((ann != NULL) && (data.train_data != NULL)) { mse = fann_train_epoch(ann, data.train_data); } return mse; } /* Method: train_on_data Trains on an entire dataset, for a period of time. This training uses the training algorithm chosen by , and the parameters set for these training algorithms. Parameters: ann - The neural network data - The data, which should be used during training max_epochs - The maximum number of epochs the training should continue epochs_between_reports - The number of epochs between printing a status report to stdout. A value of zero means no reports should be printed. desired_error - The desired or , depending on which stop function is chosen by . Instead of printing out reports every epochs_between_reports, a callback function can be called (see ). See also: , , This function appears in FANN >= 1.0.0. */ void train_on_data(const training_data &data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) { if ((ann != NULL) && (data.train_data != NULL)) { fann_train_on_data(ann, data.train_data, max_epochs, epochs_between_reports, desired_error); } } void train_on_data(const std::vector< std::vector >& input, const std::vector< std::vector >& output, bool initWeights, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) { if ((ann != NULL)) { training_data data; data.set_train_data(input,output); if(data.train_data != NULL){ if(initWeights) init_weights(data); fann_train_on_data(ann, data.train_data, max_epochs, epochs_between_reports, desired_error); } } } void train_on_data(const std::vector< Vector2d >& input, unsigned int num_data, bool initWeights, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) { if ((ann != NULL)) { training_data data; data.set_train_data(input,num_data); if(data.train_data != NULL){ if(initWeights) init_weights(data); fann_train_on_data(ann, data.train_data, max_epochs, epochs_between_reports, desired_error); } } } //cross validation for classification float cross_validation(std::vector< Vector2d >& trainingFeatures, unsigned int ntraining, unsigned short cv, unsigned int max_epochs, float desired_error, std::vector& referenceVector, std::vector& outputVector, short verbose=0) { referenceVector.clear(); outputVector.clear(); assert(cv > testFeatures(nclass); int testclass=0;//class to leave out int testsample=0;//sample to leave out int nrun=(cv>1)? cv : ntraining; if(nrun>ntraining) nrun=ntraining; for(int irun=0;irun1) std::cout << "run " << irun << std::endl; //reset training sample from last run if(verbose>1) std::cout << "reset training sample from last run" << std::endl; for(int iclass=0;iclass1){ 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 if(verbose>1) std::cout << "create test sample" << std::endl; unsigned int nsample=0; int ntest=(cv>1)? ntraining/cv : 1; //n-fold cross validation or leave-one-out while(nsample=trainingFeatures[testclass].size()){ // index=0; // } testFeatures[testclass].push_back(trainingFeatures[testclass][0]); trainingFeatures[testclass].erase(trainingFeatures[testclass].begin()); if(!trainingFeatures[testclass].size()) 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-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 if(verbose>1) std::cout << std::endl << "Set training data" << std::endl; bool initWeights=true; unsigned int epochs_between_reports=0; train_on_data(trainingFeatures,ntraining-ntest,initWeights, max_epochs, epochs_between_reports, desired_error); //cross validation with testFeatures if(verbose>1) std::cout << std::endl << "Cross validation" << std::endl; std::vector result(nclass); int maxClass=-1; for(int iclass=0;iclassmaxP){ maxP=pv; maxClass=ic; } } assert(maxP>=0); referenceVector.push_back(iclass); outputVector.push_back(maxClass); } } // rmse+=test_data(testFeatures,ntest); // if(verbose>1) // std::cout << std::endl << "rmse: " << rmse << std::endl; } // rmse/=nrun; //reset from very last run for(int iclass=0;iclass >& input, std::vector< std::vector >& output, unsigned short cv, unsigned int max_epochs, float desired_error, std::vector< std::vector >& referenceVector, std::vector< std::vector >& outputVector, short verbose=0) { assert(input.size()); assert(output.size()==input.size()); unsigned int ntraining=input.size(); unsigned int noutput=output[0].size(); referenceVector.clear(); outputVector.clear(); assert(cv > testInput; std::vector< std::vector > testOutput; int testsample=0;//sample to leave out int nrun=(cv>1)? cv : ntraining; if(nrun>ntraining) nrun=ntraining; for(int irun=0;irun1) std::cout << "run " << irun << std::endl; //reset training sample from last run if(verbose>1) std::cout << "reset training sample from last run" << std::endl; while(testInput.size()){ input.push_back(testInput.back()); testInput.pop_back(); } while(testOutput.size()){ output.push_back(testOutput.back()); testOutput.pop_back(); } assert(testInput.size()==testOutput.size()); if(verbose>1){ std::cout << "training size: " << input.size() << std::endl; std::cout << "test size: " << testInput.size() << std::endl; } assert(input.size()); //create test sample if(verbose>1) std::cout << "create test sample" << std::endl; unsigned int nsample=0; int ntest=(cv>1)? ntraining/cv : 1; //n-fold cross validation or leave-one-out while(nsample1) std::cout << std::endl << "Set training data" << std::endl; bool initWeights=true; unsigned int epochs_between_reports=0; train_on_data(input,output,initWeights, max_epochs, epochs_between_reports, desired_error); //cross validation with testFeatures if(verbose>1) std::cout << std::endl << "Cross validation" << std::endl; std::vector result(noutput); for(int isample=0;isample, but reads the training data directly from a file. See also: , This function appears in FANN >= 1.0.0. */ void train_on_file(const std::string &filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) { if (ann != NULL) { fann_train_on_file(ann, filename.c_str(), max_epochs, epochs_between_reports, desired_error); } } #endif /* NOT FIXEDFANN */ /* Method: test Test with a set of inputs, and a set of desired outputs. This operation updates the mean square error, but does not change the network in any way. See also: , , This function appears in FANN >= 1.0.0. */ fann_type * test(fann_type *input, fann_type *desired_output) { fann_type * output = NULL; if (ann != NULL) { output = fann_test(ann, input, desired_output); } return output; } /* Method: test_data Test a set of training data and calculates the MSE for the training data. This function updates the MSE and the bit fail values. See also: , , , This function appears in FANN >= 1.2.0. */ float test_data(const training_data &data) { float mse = 0.0f; if ((ann != NULL) && (data.train_data != NULL)) { mse = fann_test_data(ann, data.train_data); } return mse; } float test_data(const std::vector< Vector2d >& input, unsigned int num_data) { assert(num_data); assert(input.size()); unsigned int num_class=input.size(); assert(input[0].size()); unsigned int num_input=input[0][0].size(); unsigned int num_output=num_class; struct fann_train_data *data = (struct fann_train_data *)malloc(sizeof(struct fann_train_data)); data->input = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->output = (fann_type **)calloc(num_data, sizeof(fann_type *)); data->num_data = num_data; data->num_input = num_input; data->num_output = num_output; fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type)); fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type)); unsigned int isample=0; for(int iclass=0;iclassinput[isample] = data_input; data_input += num_input; for(int iband=0;ibandinput[isample][iband] = input[iclass][csample][iband]; } data->output[isample] = data_output; data_output += num_output; for(int ic=0;icoutput[isample][ic]=2.0/(num_class-1)*(iclass-(num_class-1)/2.0); if(ic==iclass) data->output[isample][ic] = 1; else data->output[isample][ic] = -1; } ++isample; } } FANN::training_data trainingData; trainingData.train_data = data; return test_data(trainingData); } /* Method: get_MSE Reads the mean square error from the network. Reads the mean square error from the network. This value is calculated during training or testing, and can therefore sometimes be a bit off if the weights have been changed since the last calculation of the value. See also: , This function appears in FANN >= 1.1.0. */ float get_MSE() { float mse = 0.0f; if (ann != NULL) { mse = fann_get_MSE(ann); } return mse; } /* Method: reset_MSE Resets the mean square error from the network. This function also resets the number of bits that fail. See also: , , This function appears in FANN >= 1.1.0 */ void reset_MSE() { if (ann != NULL) { fann_reset_MSE(ann); } } /* Method: set_callback Sets the callback function for use during training. The user_data is passed to the callback. It can point to arbitrary data that the callback might require and can be NULL if it is not used. See for more information about the callback function. The default callback function simply prints out some status information. This function appears in FANN >= 2.0.0. */ void set_callback(callback_type callback, void *user_data) { if (ann != NULL) { // Allocated data is also deleted in the destroy method called by the destructor user_context *user_instance = static_cast(fann_get_user_data(ann)); if (user_instance != NULL) delete user_instance; user_instance = new user_context(); user_instance->user_callback = callback; user_instance->user_data = user_data; user_instance->net = this; fann_set_user_data(ann, user_instance); if (callback != NULL) fann_set_callback(ann, &FANN::neural_net::internal_callback); else fann_set_callback(ann, NULL); } } /* Method: print_parameters Prints all of the parameters and options of the neural network See also: This function appears in FANN >= 1.2.0. */ void print_parameters() { if (ann != NULL) { fann_print_parameters(ann); } } /* Method: get_training_algorithm Return the training algorithm as described by . This training algorithm is used by and associated functions. Note that this algorithm is also used during , although only FANN::TRAIN_RPROP and FANN::TRAIN_QUICKPROP is allowed during cascade training. The default training algorithm is FANN::TRAIN_RPROP. See also: , , This function appears in FANN >= 1.0.0. */ training_algorithm_enum get_training_algorithm() { fann_train_enum training_algorithm = FANN_TRAIN_INCREMENTAL; if (ann != NULL) { training_algorithm = fann_get_training_algorithm(ann); } return static_cast(training_algorithm); } /* Method: set_training_algorithm Set the training algorithm. More info available in This function appears in FANN >= 1.0.0. */ void set_training_algorithm(training_algorithm_enum training_algorithm) { if (ann != NULL) { fann_set_training_algorithm(ann, static_cast(training_algorithm)); } } /* Method: get_learning_rate Return the learning rate. The learning rate is used to determine how aggressive training should be for some of the training algorithms (FANN::TRAIN_INCREMENTAL, FANN::TRAIN_BATCH, FANN::TRAIN_QUICKPROP). Do however note that it is not used in FANN::TRAIN_RPROP. The default learning rate is 0.7. See also: , , This function appears in FANN >= 1.0.0. */ float get_learning_rate() { float learning_rate = 0.0f; if (ann != NULL) { learning_rate = fann_get_learning_rate(ann); } return learning_rate; } /* Method: set_learning_rate Set the learning rate. More info available in This function appears in FANN >= 1.0.0. */ void set_learning_rate(float learning_rate) { if (ann != NULL) { fann_set_learning_rate(ann, learning_rate); } } /*************************************************************************************************************/ /* Method: get_activation_function Get the activation function for neuron number *neuron* in layer number *layer*, counting the input layer as layer 0. It is not possible to get activation functions for the neurons in the input layer. Information about the individual activation functions is available at . Returns: The activation function for the neuron or -1 if the neuron is not defined in the neural network. See also: , , , , , This function appears in FANN >= 2.1.0 */ activation_function_enum get_activation_function(int layer, int neuron) { unsigned int activation_function = 0; if (ann != NULL) { activation_function = fann_get_activation_function(ann, layer, neuron); } return static_cast(activation_function); } /* Method: set_activation_function Set the activation function for neuron number *neuron* in layer number *layer*, counting the input layer as layer 0. It is not possible to set activation functions for the neurons in the input layer. When choosing an activation function it is important to note that the activation functions have different range. FANN::SIGMOID is e.g. in the 0 - 1 range while FANN::SIGMOID_SYMMETRIC is in the -1 - 1 range and FANN::LINEAR is unbound. Information about the individual activation functions is available at . The default activation function is FANN::SIGMOID_STEPWISE. See also: , , , , , This function appears in FANN >= 2.0.0. */ void set_activation_function(activation_function_enum activation_function, int layer, int neuron) { if (ann != NULL) { fann_set_activation_function(ann, static_cast(activation_function), layer, neuron); } } /* Method: set_activation_function_layer Set the activation function for all the neurons in the layer number *layer*, counting the input layer as layer 0. It is not possible to set activation functions for the neurons in the input layer. See also: , , , , This function appears in FANN >= 2.0.0. */ void set_activation_function_layer(activation_function_enum activation_function, int layer) { if (ann != NULL) { fann_set_activation_function_layer(ann, static_cast(activation_function), layer); } } /* Method: set_activation_function_hidden Set the activation function for all of the hidden layers. See also: , , , , This function appears in FANN >= 1.0.0. */ void set_activation_function_hidden(activation_function_enum activation_function) { if (ann != NULL) { fann_set_activation_function_hidden(ann, static_cast(activation_function)); } } /* Method: set_activation_function_output Set the activation function for the output layer. See also: , , , , This function appears in FANN >= 1.0.0. */ void set_activation_function_output(activation_function_enum activation_function) { if (ann != NULL) { fann_set_activation_function_output(ann, static_cast(activation_function)); } } /* Method: get_activation_steepness Get the activation steepness for neuron number *neuron* in layer number *layer*, counting the input layer as layer 0. It is not possible to get activation steepness for the neurons in the input layer. The steepness of an activation function says something about how fast the activation function goes from the minimum to the maximum. A high value for the activation function will also give a more agressive training. When training neural networks where the output values should be at the extremes (usually 0 and 1, depending on the activation function), a steep activation function can be used (e.g. 1.0). The default activation steepness is 0.5. Returns: The activation steepness for the neuron or -1 if the neuron is not defined in the neural network. See also: , , , , , This function appears in FANN >= 2.1.0 */ fann_type get_activation_steepness(int layer, int neuron) { fann_type activation_steepness = 0; if (ann != NULL) { activation_steepness = fann_get_activation_steepness(ann, layer, neuron); } return activation_steepness; } /* Method: set_activation_steepness Set the activation steepness for neuron number *neuron* in layer number *layer*, counting the input layer as layer 0. It is not possible to set activation steepness for the neurons in the input layer. The steepness of an activation function says something about how fast the activation function goes from the minimum to the maximum. A high value for the activation function will also give a more agressive training. When training neural networks where the output values should be at the extremes (usually 0 and 1, depending on the activation function), a steep activation function can be used (e.g. 1.0). The default activation steepness is 0.5. See also: , , , , , This function appears in FANN >= 2.0.0. */ void set_activation_steepness(fann_type steepness, int layer, int neuron) { if (ann != NULL) { fann_set_activation_steepness(ann, steepness, layer, neuron); } } /* Method: set_activation_steepness_layer Set the activation steepness all of the neurons in layer number *layer*, counting the input layer as layer 0. It is not possible to set activation steepness for the neurons in the input layer. See also: , , , , This function appears in FANN >= 2.0.0. */ void set_activation_steepness_layer(fann_type steepness, int layer) { if (ann != NULL) { fann_set_activation_steepness_layer(ann, steepness, layer); } } /* Method: set_activation_steepness_hidden Set the steepness of the activation steepness in all of the hidden layers. See also: , , , , This function appears in FANN >= 1.2.0. */ void set_activation_steepness_hidden(fann_type steepness) { if (ann != NULL) { fann_set_activation_steepness_hidden(ann, steepness); } } /* Method: set_activation_steepness_output Set the steepness of the activation steepness in the output layer. See also: , , , , This function appears in FANN >= 1.2.0. */ void set_activation_steepness_output(fann_type steepness) { if (ann != NULL) { fann_set_activation_steepness_output(ann, steepness); } } /*************************************************************************************************************/ /* Method: get_train_error_function Returns the error function used during training. The error functions is described further in The default error function is FANN::ERRORFUNC_TANH See also: , This function appears in FANN >= 1.2.0. */ error_function_enum get_train_error_function() { fann_errorfunc_enum train_error_function = FANN_ERRORFUNC_LINEAR; if (ann != NULL) { train_error_function = fann_get_train_error_function(ann); } return static_cast(train_error_function); } /* Method: set_train_error_function Set the error function used during training. The error functions is described further in See also: , This function appears in FANN >= 1.2.0. */ void set_train_error_function(error_function_enum train_error_function) { if (ann != NULL) { fann_set_train_error_function(ann, static_cast(train_error_function)); } } /* Method: get_quickprop_decay The decay is a small negative valued number which is the factor that the weights should become smaller in each iteration during quickprop training. This is used to make sure that the weights do not become too high during training. The default decay is -0.0001. See also: , This function appears in FANN >= 1.2.0. */ float get_quickprop_decay() { float quickprop_decay = 0.0f; if (ann != NULL) { quickprop_decay = fann_get_quickprop_decay(ann); } return quickprop_decay; } /* Method: set_quickprop_decay Sets the quickprop decay factor. See also: , This function appears in FANN >= 1.2.0. */ void set_quickprop_decay(float quickprop_decay) { if (ann != NULL) { fann_set_quickprop_decay(ann, quickprop_decay); } } /* Method: get_quickprop_mu The mu factor is used to increase and decrease the step-size during quickprop training. The mu factor should always be above 1, since it would otherwise decrease the step-size when it was suppose to increase it. The default mu factor is 1.75. See also: , This function appears in FANN >= 1.2.0. */ float get_quickprop_mu() { float quickprop_mu = 0.0f; if (ann != NULL) { quickprop_mu = fann_get_quickprop_mu(ann); } return quickprop_mu; } /* Method: set_quickprop_mu Sets the quickprop mu factor. See also: , This function appears in FANN >= 1.2.0. */ void set_quickprop_mu(float quickprop_mu) { if (ann != NULL) { fann_set_quickprop_mu(ann, quickprop_mu); } } /* Method: get_rprop_increase_factor The increase factor is a value larger than 1, which is used to increase the step-size during RPROP training. The default increase factor is 1.2. See also: , This function appears in FANN >= 1.2.0. */ float get_rprop_increase_factor() { float factor = 0.0f; if (ann != NULL) { factor = fann_get_rprop_increase_factor(ann); } return factor; } /* Method: set_rprop_increase_factor The increase factor used during RPROP training. See also: , This function appears in FANN >= 1.2.0. */ void set_rprop_increase_factor(float rprop_increase_factor) { if (ann != NULL) { fann_set_rprop_increase_factor(ann, rprop_increase_factor); } } /* Method: get_rprop_decrease_factor The decrease factor is a value smaller than 1, which is used to decrease the step-size during RPROP training. The default decrease factor is 0.5. See also: , This function appears in FANN >= 1.2.0. */ float get_rprop_decrease_factor() { float factor = 0.0f; if (ann != NULL) { factor = fann_get_rprop_decrease_factor(ann); } return factor; } /* Method: set_rprop_decrease_factor The decrease factor is a value smaller than 1, which is used to decrease the step-size during RPROP training. See also: , This function appears in FANN >= 1.2.0. */ void set_rprop_decrease_factor(float rprop_decrease_factor) { if (ann != NULL) { fann_set_rprop_decrease_factor(ann, rprop_decrease_factor); } } /* Method: get_rprop_delta_min The minimum step-size is a small positive number determining how small the minimum step-size may be. The default value delta min is 0.0. See also: , This function appears in FANN >= 1.2.0. */ float get_rprop_delta_min() { float delta = 0.0f; if (ann != NULL) { delta = fann_get_rprop_delta_min(ann); } return delta; } /* Method: set_rprop_delta_min The minimum step-size is a small positive number determining how small the minimum step-size may be. See also: , This function appears in FANN >= 1.2.0. */ void set_rprop_delta_min(float rprop_delta_min) { if (ann != NULL) { fann_set_rprop_delta_min(ann, rprop_delta_min); } } /* Method: get_rprop_delta_max The maximum step-size is a positive number determining how large the maximum step-size may be. The default delta max is 50.0. See also: , , This function appears in FANN >= 1.2.0. */ float get_rprop_delta_max() { float delta = 0.0f; if (ann != NULL) { delta = fann_get_rprop_delta_max(ann); } return delta; } /* Method: set_rprop_delta_max The maximum step-size is a positive number determining how large the maximum step-size may be. See also: , , This function appears in FANN >= 1.2.0. */ void set_rprop_delta_max(float rprop_delta_max) { if (ann != NULL) { fann_set_rprop_delta_max(ann, rprop_delta_max); } } /* Method: get_num_input Get the number of input neurons. This function appears in FANN >= 1.0.0. */ unsigned int get_num_input() { unsigned int num_input = 0; if (ann != NULL) { num_input = fann_get_num_input(ann); } return num_input; } /* Method: get_num_output Get the number of output neurons. This function appears in FANN >= 1.0.0. */ unsigned int get_num_output() { unsigned int num_output = 0; if (ann != NULL) { num_output = fann_get_num_output(ann); } return num_output; } /* Method: get_total_neurons Get the total number of neurons in the entire network. This number does also include the bias neurons, so a 2-4-2 network has 2+4+2 +2(bias) = 10 neurons. This function appears in FANN >= 1.0.0. */ unsigned int get_total_neurons() { if (ann == NULL) { return 0; } return fann_get_total_neurons(ann); } /* Method: get_total_connections Get the total number of connections in the entire network. This function appears in FANN >= 1.0.0. */ unsigned int get_total_connections() { if (ann == NULL) { return 0; } return fann_get_total_connections(ann); } #ifdef FIXEDFANN /* Method: get_decimal_point Returns the position of the decimal point in the ann. This function is only available when the ANN is in fixed point mode. The decimal point is described in greater detail in the tutorial . See also: , , , , This function appears in FANN >= 1.0.0. */ unsigned int get_decimal_point() { if (ann == NULL) { return 0; } return fann_get_decimal_point(ann); } /* Method: get_multiplier Returns the multiplier that fix point data is multiplied with. This function is only available when the ANN is in fixed point mode. The multiplier is the used to convert between floating point and fixed point notation. A floating point number is multiplied with the multiplier in order to get the fixed point number and visa versa. The multiplier is described in greater detail in the tutorial . See also: , , , , This function appears in FANN >= 1.0.0. */ unsigned int get_multiplier() { if (ann == NULL) { return 0; } return fann_get_multiplier(ann); } #endif /* FIXEDFANN */ /*********************************************************************/ /* Method: get_network_type Get the type of neural network it was created as. Returns: The neural network type from enum See Also: This function appears in FANN >= 2.1.0 */ network_type_enum get_network_type() { fann_nettype_enum network_type = FANN_NETTYPE_LAYER; if (ann != NULL) { network_type = fann_get_network_type(ann); } return static_cast(network_type); } /* Method: get_connection_rate Get the connection rate used when the network was created Returns: The connection rate See also: This function appears in FANN >= 2.1.0 */ float get_connection_rate() { if (ann == NULL) { return 0; } return fann_get_connection_rate(ann); } /* Method: get_num_layers Get the number of layers in the network Returns: The number of layers in the neural network See also: This function appears in FANN >= 2.1.0 */ unsigned int get_num_layers() { if (ann == NULL) { return 0; } return fann_get_num_layers(ann); } /* Method: get_layer_array Get the number of neurons in each layer in the network. Bias is not included so the layers match the create methods. The layers array must be preallocated to at least sizeof(unsigned int) * get_num_layers() long. See also: This function appears in FANN >= 2.1.0 */ void get_layer_array(unsigned int *layers) { if (ann != NULL) { fann_get_layer_array(ann, layers); } } void get_layer_array(std::vector vlayers) { vlayers.clear(); if (ann != NULL){ vlayers.resize(get_num_layers()); unsigned int* layers=(unsigned int *)calloc(get_num_layers(),sizeof(unsigned int)); fann_get_layer_array(ann, layers); for(int ilayer=0;ilayer This function appears in FANN >= 2.1.0 */ void get_bias_array(unsigned int *bias) { if (ann != NULL) { fann_get_bias_array(ann, bias); } } /* Method: get_connection_array Get the connections in the network. The connections array must be preallocated to at least sizeof(struct fann_connection) * get_total_connections() long. See also: This function appears in FANN >= 2.1.0 */ void get_connection_array(connection *connections) { if (ann != NULL) { fann_get_connection_array(ann, connections); } } void get_connection_array(std::vector& convector) { convector.clear(); if (ann != NULL) { convector.resize(get_total_connections()); connection* connections=(connection*)calloc(get_total_connections(),sizeof(connection)); fann_get_connection_array(ann, connections); for(int icon=0;icon This function appears in FANN >= 2.1.0 */ void set_weight_array(connection *connections, unsigned int num_connections) { if (ann != NULL) { fann_set_weight_array(ann, connections, num_connections); } } void set_weight_array(std::vector convector) { if (ann != NULL) { unsigned int num_connections=convector.size(); connection* connections=(connection*)calloc(num_connections,sizeof(connection)); connections=&(convector[0]); fann_set_weight_array(ann, connections, num_connections); } } /* Method: set_weight Set a connection in the network. Only the weights can be changed. The connection/weight is ignored if it does not already exist in the network. See also: This function appears in FANN >= 2.1.0 */ void set_weight(unsigned int from_neuron, unsigned int to_neuron, fann_type weight) { if (ann != NULL) { fann_set_weight(ann, from_neuron, to_neuron, weight); } } /*********************************************************************/ /* Method: get_learning_momentum Get the learning momentum. The learning momentum can be used to speed up FANN::TRAIN_INCREMENTAL training. A too high momentum will however not benefit training. Setting momentum to 0 will be the same as not using the momentum parameter. The recommended value of this parameter is between 0.0 and 1.0. The default momentum is 0. See also: , This function appears in FANN >= 2.0.0. */ float get_learning_momentum() { float learning_momentum = 0.0f; if (ann != NULL) { learning_momentum = fann_get_learning_momentum(ann); } return learning_momentum; } /* Method: set_learning_momentum Set the learning momentum. More info available in This function appears in FANN >= 2.0.0. */ void set_learning_momentum(float learning_momentum) { if (ann != NULL) { fann_set_learning_momentum(ann, learning_momentum); } } /* Method: get_train_stop_function Returns the the stop function used during training. The stop function is described further in The default stop function is FANN::STOPFUNC_MSE See also: , This function appears in FANN >= 2.0.0. */ stop_function_enum get_train_stop_function() { enum fann_stopfunc_enum stopfunc = FANN_STOPFUNC_MSE; if (ann != NULL) { stopfunc = fann_get_train_stop_function(ann); } return static_cast(stopfunc); } /* Method: set_train_stop_function Set the stop function used during training. The stop function is described further in See also: This function appears in FANN >= 2.0.0. */ void set_train_stop_function(stop_function_enum train_stop_function) { if (ann != NULL) { fann_set_train_stop_function(ann, static_cast(train_stop_function)); } } /* Method: get_bit_fail_limit Returns the bit fail limit used during training. The bit fail limit is used during training when the is set to FANN_STOPFUNC_BIT. The limit is the maximum accepted difference between the desired output and the actual output during training. Each output that diverges more than this limit is counted as an error bit. This difference is divided by two when dealing with symmetric activation functions, so that symmetric and not symmetric activation functions can use the same limit. The default bit fail limit is 0.35. See also: This function appears in FANN >= 2.0.0. */ fann_type get_bit_fail_limit() { fann_type bit_fail_limit = 0.0f; if (ann != NULL) { bit_fail_limit = fann_get_bit_fail_limit(ann); } return bit_fail_limit; } /* Method: set_bit_fail_limit Set the bit fail limit used during training. See also: This function appears in FANN >= 2.0.0. */ void set_bit_fail_limit(fann_type bit_fail_limit) { if (ann != NULL) { fann_set_bit_fail_limit(ann, bit_fail_limit); } } /* Method: get_bit_fail The number of fail bits; means the number of output neurons which differ more than the bit fail limit (see , ). The bits are counted in all of the training data, so this number can be higher than the number of training data. This value is reset by and updated by all the same functions which also updates the MSE value (e.g. , ) See also: , This function appears in FANN >= 2.0.0 */ unsigned int get_bit_fail() { unsigned int bit_fail = 0; if (ann != NULL) { bit_fail = fann_get_bit_fail(ann); } return bit_fail; } /*********************************************************************/ /* Method: cascadetrain_on_data Trains on an entire dataset, for a period of time using the Cascade2 training algorithm. This algorithm adds neurons to the neural network while training, which means that it needs to start with an ANN without any hidden layers. The neural network should also use shortcut connections, so should be used to create the ANN like this: >net.create_shortcut(2, train_data.num_input_train_data(), train_data.num_output_train_data()); This training uses the parameters set using the set_cascade_..., but it also uses another training algorithm as it's internal training algorithm. This algorithm can be set to either FANN::TRAIN_RPROP or FANN::TRAIN_QUICKPROP by , and the parameters set for these training algorithms will also affect the cascade training. Parameters: data - The data, which should be used during training max_neuron - The maximum number of neurons to be added to neural network neurons_between_reports - The number of neurons between printing a status report to stdout. A value of zero means no reports should be printed. desired_error - The desired or , depending on which stop function is chosen by . Instead of printing out reports every neurons_between_reports, a callback function can be called (see ). See also: , , This function appears in FANN >= 2.0.0. */ void cascadetrain_on_data(const training_data &data, unsigned int max_neurons, unsigned int neurons_between_reports, float desired_error) { if ((ann != NULL) && (data.train_data != NULL)) { fann_cascadetrain_on_data(ann, data.train_data, max_neurons, neurons_between_reports, desired_error); } } /* Method: cascadetrain_on_file Does the same as , but reads the training data directly from a file. See also: , This function appears in FANN >= 2.0.0. */ void cascadetrain_on_file(const std::string &filename, unsigned int max_neurons, unsigned int neurons_between_reports, float desired_error) { if (ann != NULL) { fann_cascadetrain_on_file(ann, filename.c_str(), max_neurons, neurons_between_reports, desired_error); } } /* Method: get_cascade_output_change_fraction The cascade output change fraction is a number between 0 and 1 determining how large a fraction the value should change within during training of the output connections, in order for the training not to stagnate. If the training stagnates, the training of the output connections will be ended and new candidates will be prepared. This means: If the MSE does not change by a fraction of during a period of , the training of the output connections is stopped because the training has stagnated. If the cascade output change fraction is low, the output connections will be trained more and if the fraction is high they will be trained less. The default cascade output change fraction is 0.01, which is equalent to a 1% change in MSE. See also: , , , This function appears in FANN >= 2.0.0. */ float get_cascade_output_change_fraction() { float change_fraction = 0.0f; if (ann != NULL) { change_fraction = fann_get_cascade_output_change_fraction(ann); } return change_fraction; } /* Method: set_cascade_output_change_fraction Sets the cascade output change fraction. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_output_change_fraction(float cascade_output_change_fraction) { if (ann != NULL) { fann_set_cascade_output_change_fraction(ann, cascade_output_change_fraction); } } /* Method: get_cascade_output_stagnation_epochs The number of cascade output stagnation epochs determines the number of epochs training is allowed to continue without changing the MSE by a fraction of . See more info about this parameter in . The default number of cascade output stagnation epochs is 12. See also: , , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_output_stagnation_epochs() { unsigned int stagnation_epochs = 0; if (ann != NULL) { stagnation_epochs = fann_get_cascade_output_stagnation_epochs(ann); } return stagnation_epochs; } /* Method: set_cascade_output_stagnation_epochs Sets the number of cascade output stagnation epochs. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_output_stagnation_epochs(unsigned int cascade_output_stagnation_epochs) { if (ann != NULL) { fann_set_cascade_output_stagnation_epochs(ann, cascade_output_stagnation_epochs); } } /* Method: get_cascade_candidate_change_fraction The cascade candidate change fraction is a number between 0 and 1 determining how large a fraction the value should change within during training of the candidate neurons, in order for the training not to stagnate. If the training stagnates, the training of the candidate neurons will be ended and the best candidate will be selected. This means: If the MSE does not change by a fraction of during a period of , the training of the candidate neurons is stopped because the training has stagnated. If the cascade candidate change fraction is low, the candidate neurons will be trained more and if the fraction is high they will be trained less. The default cascade candidate change fraction is 0.01, which is equalent to a 1% change in MSE. See also: , , , This function appears in FANN >= 2.0.0. */ float get_cascade_candidate_change_fraction() { float change_fraction = 0.0f; if (ann != NULL) { change_fraction = fann_get_cascade_candidate_change_fraction(ann); } return change_fraction; } /* Method: set_cascade_candidate_change_fraction Sets the cascade candidate change fraction. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_candidate_change_fraction(float cascade_candidate_change_fraction) { if (ann != NULL) { fann_set_cascade_candidate_change_fraction(ann, cascade_candidate_change_fraction); } } /* Method: get_cascade_candidate_stagnation_epochs The number of cascade candidate stagnation epochs determines the number of epochs training is allowed to continue without changing the MSE by a fraction of . See more info about this parameter in . The default number of cascade candidate stagnation epochs is 12. See also: , , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_candidate_stagnation_epochs() { unsigned int stagnation_epochs = 0; if (ann != NULL) { stagnation_epochs = fann_get_cascade_candidate_stagnation_epochs(ann); } return stagnation_epochs; } /* Method: set_cascade_candidate_stagnation_epochs Sets the number of cascade candidate stagnation epochs. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_candidate_stagnation_epochs(unsigned int cascade_candidate_stagnation_epochs) { if (ann != NULL) { fann_set_cascade_candidate_stagnation_epochs(ann, cascade_candidate_stagnation_epochs); } } /* Method: get_cascade_weight_multiplier The weight multiplier is a parameter which is used to multiply the weights from the candidate neuron before adding the neuron to the neural network. This parameter is usually between 0 and 1, and is used to make the training a bit less aggressive. The default weight multiplier is 0.4 See also: , This function appears in FANN >= 2.0.0. */ fann_type get_cascade_weight_multiplier() { fann_type weight_multiplier = 0; if (ann != NULL) { weight_multiplier = fann_get_cascade_weight_multiplier(ann); } return weight_multiplier; } /* Method: set_cascade_weight_multiplier Sets the weight multiplier. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_weight_multiplier(fann_type cascade_weight_multiplier) { if (ann != NULL) { fann_set_cascade_weight_multiplier(ann, cascade_weight_multiplier); } } /* Method: get_cascade_candidate_limit The candidate limit is a limit for how much the candidate neuron may be trained. The limit is a limit on the proportion between the MSE and candidate score. Set this to a lower value to avoid overfitting and to a higher if overfitting is not a problem. The default candidate limit is 1000.0 See also: , This function appears in FANN >= 2.0.0. */ fann_type get_cascade_candidate_limit() { fann_type candidate_limit = 0; if (ann != NULL) { candidate_limit = fann_get_cascade_candidate_limit(ann); } return candidate_limit; } /* Method: set_cascade_candidate_limit Sets the candidate limit. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_candidate_limit(fann_type cascade_candidate_limit) { if (ann != NULL) { fann_set_cascade_candidate_limit(ann, cascade_candidate_limit); } } /* Method: get_cascade_max_out_epochs The maximum out epochs determines the maximum number of epochs the output connections may be trained after adding a new candidate neuron. The default max out epochs is 150 See also: , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_max_out_epochs() { unsigned int max_out_epochs = 0; if (ann != NULL) { max_out_epochs = fann_get_cascade_max_out_epochs(ann); } return max_out_epochs; } /* Method: set_cascade_max_out_epochs Sets the maximum out epochs. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_max_out_epochs(unsigned int cascade_max_out_epochs) { if (ann != NULL) { fann_set_cascade_max_out_epochs(ann, cascade_max_out_epochs); } } /* Method: get_cascade_max_cand_epochs The maximum candidate epochs determines the maximum number of epochs the input connections to the candidates may be trained before adding a new candidate neuron. The default max candidate epochs is 150 See also: , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_max_cand_epochs() { unsigned int max_cand_epochs = 0; if (ann != NULL) { max_cand_epochs = fann_get_cascade_max_cand_epochs(ann); } return max_cand_epochs; } /* Method: set_cascade_max_cand_epochs Sets the max candidate epochs. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_max_cand_epochs(unsigned int cascade_max_cand_epochs) { if (ann != NULL) { fann_set_cascade_max_cand_epochs(ann, cascade_max_cand_epochs); } } /* Method: get_cascade_num_candidates The number of candidates used during training (calculated by multiplying , and ). The actual candidates is defined by the and arrays. These arrays define the activation functions and activation steepnesses used for the candidate neurons. If there are 2 activation functions in the activation function array and 3 steepnesses in the steepness array, then there will be 2x3=6 different candidates which will be trained. These 6 different candidates can be copied into several candidate groups, where the only difference between these groups is the initial weights. If the number of groups is set to 2, then the number of candidate neurons will be 2x3x2=12. The number of candidate groups is defined by . The default number of candidates is 6x4x2 = 48 See also: , , , , , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_num_candidates() { unsigned int num_candidates = 0; if (ann != NULL) { num_candidates = fann_get_cascade_num_candidates(ann); } return num_candidates; } /* Method: get_cascade_activation_functions_count The number of activation functions in the array. The default number of activation functions is 6. See also: , , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_activation_functions_count() { unsigned int activation_functions_count = 0; if (ann != NULL) { activation_functions_count = fann_get_cascade_activation_functions_count(ann); } return activation_functions_count; } /* Method: get_cascade_activation_functions The cascade activation functions array is an array of the different activation functions used by the candidates. See for a description of which candidate neurons will be generated by this array. See also: , , This function appears in FANN >= 2.0.0. */ activation_function_enum * get_cascade_activation_functions() { enum fann_activationfunc_enum *activation_functions = NULL; if (ann != NULL) { activation_functions = fann_get_cascade_activation_functions(ann); } return reinterpret_cast(activation_functions); } /* Method: set_cascade_activation_functions Sets the array of cascade candidate activation functions. The array must be just as long as defined by the count. See for a description of which candidate neurons will be generated by this array. See also: , , This function appears in FANN >= 2.0.0. */ void set_cascade_activation_functions(activation_function_enum *cascade_activation_functions, unsigned int cascade_activation_functions_count) { if (ann != NULL) { fann_set_cascade_activation_functions(ann, reinterpret_cast(cascade_activation_functions), cascade_activation_functions_count); } } /* Method: get_cascade_activation_steepnesses_count The number of activation steepnesses in the array. The default number of activation steepnesses is 4. See also: , , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_activation_steepnesses_count() { unsigned int activation_steepness_count = 0; if (ann != NULL) { activation_steepness_count = fann_get_cascade_activation_steepnesses_count(ann); } return activation_steepness_count; } /* Method: get_cascade_activation_steepnesses The cascade activation steepnesses array is an array of the different activation functions used by the candidates. See for a description of which candidate neurons will be generated by this array. The default activation steepnesses is {0.25, 0.50, 0.75, 1.00} See also: , , This function appears in FANN >= 2.0.0. */ fann_type *get_cascade_activation_steepnesses() { fann_type *activation_steepnesses = NULL; if (ann != NULL) { activation_steepnesses = fann_get_cascade_activation_steepnesses(ann); } return activation_steepnesses; } /* Method: set_cascade_activation_steepnesses Sets the array of cascade candidate activation steepnesses. The array must be just as long as defined by the count. See for a description of which candidate neurons will be generated by this array. See also: , , This function appears in FANN >= 2.0.0. */ void set_cascade_activation_steepnesses(fann_type *cascade_activation_steepnesses, unsigned int cascade_activation_steepnesses_count) { if (ann != NULL) { fann_set_cascade_activation_steepnesses(ann, cascade_activation_steepnesses, cascade_activation_steepnesses_count); } } /* Method: get_cascade_num_candidate_groups The number of candidate groups is the number of groups of identical candidates which will be used during training. This number can be used to have more candidates without having to define new parameters for the candidates. See for a description of which candidate neurons will be generated by this parameter. The default number of candidate groups is 2 See also: , This function appears in FANN >= 2.0.0. */ unsigned int get_cascade_num_candidate_groups() { unsigned int num_candidate_groups = 0; if (ann != NULL) { num_candidate_groups = fann_get_cascade_num_candidate_groups(ann); } return num_candidate_groups; } /* Method: set_cascade_num_candidate_groups Sets the number of candidate groups. See also: , This function appears in FANN >= 2.0.0. */ void set_cascade_num_candidate_groups(unsigned int cascade_num_candidate_groups) { if (ann != NULL) { fann_set_cascade_num_candidate_groups(ann, cascade_num_candidate_groups); } } /*********************************************************************/ #ifndef FIXEDFANN /* Method: scale_train Scale input and output data based on previously calculated parameters. See also: , This function appears in FANN >= 2.1.0. */ void scale_train(training_data &data) { if (ann != NULL) { fann_scale_train(ann, data.train_data); } } /* Method: descale_train Descale input and output data based on previously calculated parameters. See also: , This function appears in FANN >= 2.1.0. */ void descale_train(training_data &data) { if (ann != NULL) { fann_descale_train(ann, data.train_data); } } /* Method: set_input_scaling_params Calculate scaling parameters for future use based on training data. See also: , This function appears in FANN >= 2.1.0. */ bool set_input_scaling_params(const training_data &data, float new_input_min, float new_input_max) { bool status = false; if (ann != NULL) { status = (fann_set_input_scaling_params(ann, data.train_data, new_input_min, new_input_max) != -1); } return status; } /* Method: set_output_scaling_params Calculate scaling parameters for future use based on training data. See also: , This function appears in FANN >= 2.1.0. */ bool set_output_scaling_params(const training_data &data, float new_output_min, float new_output_max) { bool status = false; if (ann != NULL) { status = (fann_set_output_scaling_params(ann, data.train_data, new_output_min, new_output_max) != -1); } return status; } /* Method: set_scaling_params Calculate scaling parameters for future use based on training data. See also: , This function appears in FANN >= 2.1.0. */ bool set_scaling_params(const training_data &data, float new_input_min, float new_input_max, float new_output_min, float new_output_max) { bool status = false; if (ann != NULL) { status = (fann_set_scaling_params(ann, data.train_data, new_input_min, new_input_max, new_output_min, new_output_max) != -1); } return status; } /* Method: clear_scaling_params Clears scaling parameters. See also: , This function appears in FANN >= 2.1.0. */ bool clear_scaling_params() { bool status = false; if (ann != NULL) { status = (fann_clear_scaling_params(ann) != -1); } return status; } /* Method: scale_input Scale data in input vector before feed it to ann based on previously calculated parameters. See also: , , This function appears in FANN >= 2.1.0. */ void scale_input(fann_type *input_vector) { if (ann != NULL) { fann_scale_input(ann, input_vector ); } } /* Method: scale_output Scale data in output vector before feed it to ann based on previously calculated parameters. See also: , , This function appears in FANN >= 2.1.0. */ void scale_output(fann_type *output_vector) { if (ann != NULL) { fann_scale_output(ann, output_vector ); } } /* Method: descale_input Scale data in input vector after get it from ann based on previously calculated parameters. See also: , , This function appears in FANN >= 2.1.0. */ void descale_input(fann_type *input_vector) { if (ann != NULL) { fann_descale_input(ann, input_vector ); } } /* Method: descale_output Scale data in output vector after get it from ann based on previously calculated parameters. See also: , , This function appears in FANN >= 2.1.0. */ void descale_output(fann_type *output_vector) { if (ann != NULL) { fann_descale_output(ann, output_vector ); } } #endif /* FIXEDFANN */ /*********************************************************************/ /* Method: set_error_log Change where errors are logged to. If log_file is NULL, no errors will be printed. If neural_net is empty i.e. ann is NULL, the default log will be set. The default log is the log used when creating a neural_net. This default log will also be the default for all new structs that are created. The default behavior is to log them to stderr. See also: , This function appears in FANN >= 1.1.0. */ void set_error_log(FILE *log_file) { fann_set_error_log(reinterpret_cast(ann), log_file); } /* Method: get_errno Returns the last error number. See also: , , This function appears in FANN >= 1.1.0. */ unsigned int get_errno() { return fann_get_errno(reinterpret_cast(ann)); } /* Method: reset_errno Resets the last error number. This function appears in FANN >= 1.1.0. */ void reset_errno() { fann_reset_errno(reinterpret_cast(ann)); } /* Method: reset_errstr Resets the last error string. This function appears in FANN >= 1.1.0. */ void reset_errstr() { fann_reset_errstr(reinterpret_cast(ann)); } /* Method: get_errstr Returns the last errstr. This function calls and This function appears in FANN >= 1.1.0. */ std::string get_errstr() { return std::string(fann_get_errstr(reinterpret_cast(ann))); } /* Method: print_error Prints the last error to stderr. This function appears in FANN >= 1.1.0. */ void print_error() { fann_print_error(reinterpret_cast(ann)); } /*********************************************************************/ private: // Structure used by set_callback to hold information about a user callback typedef struct user_context_type { callback_type user_callback; // Pointer to user callback function void *user_data; // Arbitrary data pointer passed to the callback neural_net *net; // This pointer for the neural network } user_context; // Internal callback used to convert from pointers to class references static int FANN_API internal_callback(struct fann *ann, struct fann_train_data *train, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, unsigned int epochs) { user_context *user_data = static_cast(fann_get_user_data(ann)); if (user_data != NULL) { FANN::training_data data; data.train_data = train; int result = (*user_data->user_callback)(*user_data->net, data, max_epochs, epochs_between_reports, desired_error, epochs, user_data); data.train_data = NULL; // Prevent automatic cleanup return result; } else { return -1; // This should not occur except if out of memory } } protected: // Pointer the encapsulated fann neural net structure struct fann *ann; }; /*************************************************************************/ }; #endif /* FANN_CPP_H_INCLUDED */ pktools-2.6.6/src/algorithms/CostFactorySVM.h0000644000113200011300000000353512401564521016070 00000000000000/********************************************************************** CostFactorySVM.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 _COSTFACTORYSVM_H_ #define _COSTFACTORYSVM_H_ #include #include #include #include "base/Vector2d.h" #include "CostFactory.h" namespace svm{ enum SVM_TYPE {C_SVC=0, nu_SVC=1,one_class=2, epsilon_SVR=3, nu_SVR=4}; enum KERNEL_TYPE {linear=0,polynomial=1,radial=2,sigmoid=3}; } class CostFactorySVM : public CostFactory { public: CostFactorySVM(); CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose); ~CostFactorySVM(); double getCost(const std::vector > &trainingFeatures); private: std::string m_svm_type; std::string m_kernel_type; unsigned short m_kernel_degree; float m_gamma; float m_coef0; float m_ccost; float m_nu; float m_epsilon_loss; int m_cache; float m_epsilon_tol; bool m_shrinking; bool m_prob_est; }; #endif pktools-2.6.6/src/algorithms/CostFactorySVM.cc0000644000113200011300000001527412401571066016233 00000000000000/********************************************************************** CostFactorySVM.cc: select features, typical use: feature selection for classification Copyright (C) 2008-2014 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 "CostFactorySVM.h" #include "svm.h" #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) CostFactorySVM::CostFactorySVM() : CostFactory(2,0), m_svm_type("C_SVC"), m_kernel_type("radial"), m_kernel_degree(3), m_gamma(1.0), m_coef0(0), m_ccost(1000), m_nu(0.5), m_epsilon_loss(100), m_cache(100), m_epsilon_tol(0.001), m_shrinking(false), m_prob_est(true){ } CostFactorySVM::~CostFactorySVM(){ } CostFactorySVM::CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose) : CostFactory(cv,verbose), m_svm_type(svm_type), m_kernel_type(kernel_type), m_kernel_degree(kernel_degree), m_gamma(gamma), m_coef0(coef0), m_ccost(ccost), m_nu(nu), m_epsilon_loss(epsilon_loss), m_cache(cache), m_epsilon_tol(epsilon_tol), m_shrinking(shrinking), m_prob_est(prob_est){}; double CostFactorySVM::getCost(const std::vector > &trainingFeatures){ std::map svmMap; svmMap["C_SVC"]=svm::C_SVC; svmMap["nu_SVC"]=svm::nu_SVC; svmMap["one_class"]=svm::one_class; svmMap["epsilon_SVR"]=svm::epsilon_SVR; svmMap["nu_SVR"]=svm::nu_SVR; std::map kernelMap; kernelMap["linear"]=svm::linear; kernelMap["polynomial"]=svm::polynomial; kernelMap["radial"]=svm::radial; kernelMap["sigmoid;"]=svm::sigmoid; unsigned short nclass=trainingFeatures.size(); unsigned int ntraining=0; unsigned int ntest=0; for(int iclass=0;iclass0)? m_gamma : 1.0/nFeatures; param.coef0 = m_coef0; param.nu = m_nu; param.cache_size = m_cache; param.C = m_ccost; param.eps = m_epsilon_tol; param.p = m_epsilon_loss; param.shrinking = (m_shrinking)? 1 : 0; param.probability = (m_prob_est)? 1 : 0; param.nr_weight = 0;//not used: I use priors and balancing param.weight_label = NULL; param.weight = NULL; param.verbose=(m_verbose>1)? true:false; struct svm_model* svm; struct svm_problem prob; struct svm_node* x_space; prob.l=ntraining; prob.y = Malloc(double,prob.l); prob.x = Malloc(struct svm_node *,prob.l); x_space = Malloc(struct svm_node,(nFeatures+1)*ntraining); unsigned long int spaceIndex=0; int lIndex=0; for(int iclass=0;iclass2) std::cout << "checking parameters" << std::endl; svm_check_parameter(&prob,¶m); if(m_verbose>2) std::cout << "parameters ok, training" << std::endl; svm=svm_train(&prob,¶m); if(m_verbose>2) std::cout << "SVM is now trained" << std::endl; m_cm.clearResults(); if(m_cv>1){ double *target = Malloc(double,prob.l); svm_cross_validation(&prob,¶m,m_cv,target); assert(param.svm_type != EPSILON_SVR&¶m.svm_type != NU_SVR);//only for regression for(int i=0;i(m_classValueMap[refClassName]),type2string(m_classValueMap[className]),1.0); else m_cm.incrementResult(m_cm.getClass(prob.y[i]),m_cm.getClass(target[i]),1.0); } free(target); } else{ struct svm_node *x_test; std::vector result(nclass); x_test = Malloc(struct svm_node,(nFeatures+1)); for(int iclass=0;iclass(predict_label)]; if(m_classValueMap.size()) m_cm.incrementResult(type2string(m_classValueMap[refClassName]),type2string(m_classValueMap[className]),1.0); else m_cm.incrementResult(refClassName,className,1.0); } } free(x_test); } if(m_verbose>1) std::cout << m_cm << std::endl; assert(m_cm.nReference()); // if(m_verbose) // std::cout << m_cm << std::endl; // std::cout << "Kappa: " << m_cm.kappa() << std::endl; // double se95_oa=0; // double doa=0; // doa=m_cm.oa_pct(&se95_oa); // std::cout << "Overall Accuracy: " << doa << " (" << se95_oa << ")" << std::endl; // *NOTE* Because svm_model contains pointers to svm_problem, you can // not free the memory used by svm_problem if you are still using the // svm_model produced by svm_train(). // however, we will re-train the svm later on after the feature selection free(prob.y); free(prob.x); free(x_space); svm_free_and_destroy_model(&(svm)); return(m_cm.kappa()); } pktools-2.6.6/src/algorithms/svm.cpp0000644000113200011300000017522012400110722014370 00000000000000#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 { public: Cache(int l,long int size); ~Cache(); // request data [0,len) // return some position p where [p,len) need to be filled // (p >= len if nothing needs to be filled) int get_data(const int index, Qfloat **data, int len); void swap_index(int i, int j); private: int l; long int size; struct head_t { head_t *prev, *next; // a circular list Qfloat *data; int len; // data[0,len) is cached in this entry }; head_t *head; head_t lru_head; void lru_delete(head_t *h); void lru_insert(head_t *h); }; Cache::Cache(int l_,long int size_):l(l_),size(size_) { head = (head_t *)calloc(l,sizeof(head_t)); // initialized to 0 size /= sizeof(Qfloat); size -= l * sizeof(head_t) / sizeof(Qfloat); size = max(size, 2 * (long int) l); // cache must be large enough for two columns lru_head.next = lru_head.prev = &lru_head; } Cache::~Cache() { for(head_t *h = lru_head.next; h != &lru_head; h=h->next) free(h->data); free(head); } void Cache::lru_delete(head_t *h) { // delete from current location h->prev->next = h->next; h->next->prev = h->prev; } void Cache::lru_insert(head_t *h) { // insert to last position h->next = &lru_head; h->prev = lru_head.prev; h->prev->next = h; h->next->prev = h; } int Cache::get_data(const int index, Qfloat **data, int len) { head_t *h = &head[index]; if(h->len) lru_delete(h); int more = len - h->len; if(more > 0) { // free old space while(size < more) { head_t *old = lru_head.next; lru_delete(old); free(old->data); size += old->len; old->data = 0; old->len = 0; } // allocate new space h->data = (Qfloat *)realloc(h->data,sizeof(Qfloat)*len); size -= more; swap(h->len,len); } lru_insert(h); *data = h->data; return len; } void Cache::swap_index(int i, int j) { if(i==j) return; if(head[i].len) lru_delete(&head[i]); if(head[j].len) lru_delete(&head[j]); swap(head[i].data,head[j].data); swap(head[i].len,head[j].len); if(head[i].len) lru_insert(&head[i]); if(head[j].len) lru_insert(&head[j]); if(i>j) swap(i,j); for(head_t *h = lru_head.next; h!=&lru_head; h=h->next) { if(h->len > i) { if(h->len > j) swap(h->data[i],h->data[j]); else { // give up lru_delete(h); free(h->data); size += h->len; h->data = 0; h->len = 0; } } } } // // Kernel evaluation // // the static method k_function is for doing single kernel evaluation // the constructor of Kernel prepares to calculate the l*l kernel matrix // the member function get_Q is for getting one column from the Q Matrix // class QMatrix { public: virtual Qfloat *get_Q(int column, int len) const = 0; virtual double *get_QD() const = 0; virtual void swap_index(int i, int j) const = 0; virtual ~QMatrix() {} }; class Kernel: public QMatrix { public: Kernel(int l, svm_node * const * x, const svm_parameter& param); virtual ~Kernel(); static double k_function(const svm_node *x, const svm_node *y, const svm_parameter& param); virtual Qfloat *get_Q(int column, int len) const = 0; virtual double *get_QD() const = 0; virtual void swap_index(int i, int j) const // no so const... { swap(x[i],x[j]); if(x_square) swap(x_square[i],x_square[j]); } protected: double (Kernel::*kernel_function)(int i, int j) const; private: const svm_node **x; double *x_square; // svm_parameter const int kernel_type; const int degree; const double gamma; const double coef0; static double dot(const svm_node *px, const svm_node *py); double kernel_linear(int i, int j) const { return dot(x[i],x[j]); } double kernel_poly(int i, int j) const { return powi(gamma*dot(x[i],x[j])+coef0,degree); } double kernel_rbf(int i, int j) const { return exp(-gamma*(x_square[i]+x_square[j]-2*dot(x[i],x[j]))); } double kernel_sigmoid(int i, int j) const { return tanh(gamma*dot(x[i],x[j])+coef0); } double kernel_precomputed(int i, int j) const { return x[i][(int)(x[j][0].value)].value; } }; Kernel::Kernel(int l, svm_node * const * x_, const svm_parameter& param) :kernel_type(param.kernel_type), degree(param.degree), gamma(param.gamma), coef0(param.coef0) { switch(kernel_type) { case LINEAR: kernel_function = &Kernel::kernel_linear; break; case POLY: kernel_function = &Kernel::kernel_poly; break; case RBF: kernel_function = &Kernel::kernel_rbf; break; case SIGMOID: kernel_function = &Kernel::kernel_sigmoid; break; case PRECOMPUTED: kernel_function = &Kernel::kernel_precomputed; break; } clone(x,x_,l); if(kernel_type == RBF) { x_square = new double[l]; for(int i=0;iindex != -1 && py->index != -1) { if(px->index == py->index) { sum += px->value * py->value; ++px; ++py; } else { if(px->index > py->index) ++py; else ++px; } } return sum; } double Kernel::k_function(const svm_node *x, const svm_node *y, const svm_parameter& param) { switch(param.kernel_type) { case LINEAR: return dot(x,y); case POLY: return powi(param.gamma*dot(x,y)+param.coef0,param.degree); case RBF: { double sum = 0; while(x->index != -1 && y->index !=-1) { if(x->index == y->index) { double d = x->value - y->value; sum += d*d; ++x; ++y; } else { if(x->index > y->index) { sum += y->value * y->value; ++y; } else { sum += x->value * x->value; ++x; } } } while(x->index != -1) { sum += x->value * x->value; ++x; } while(y->index != -1) { sum += y->value * y->value; ++y; } return exp(-param.gamma*sum); } case SIGMOID: return tanh(param.gamma*dot(x,y)+param.coef0); case PRECOMPUTED: //x: test (validation), y: SV return x[(int)(y->value)].value; default: return 0; // Unreachable } } // An SMO algorithm in Fan et al., JMLR 6(2005), p. 1889--1918 // Solves: // // min 0.5(\alpha^T Q \alpha) + p^T \alpha // // y^T \alpha = \delta // y_i = +1 or -1 // 0 <= alpha_i <= Cp for y_i = 1 // 0 <= alpha_i <= Cn for y_i = -1 // // Given: // // Q, p, y, Cp, Cn, and an initial feasible point \alpha // l is the size of vectors and matrices // eps is the stopping tolerance // // solution will be put in \alpha, objective value will be put in obj // class Solver { public: Solver() {}; virtual ~Solver() {}; struct SolutionInfo { double obj; double rho; double upper_bound_p; double upper_bound_n; double r; // for Solver_NU }; void Solve(int l, const QMatrix& Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo* si, int shrinking, bool verbose=false); protected: int active_size; schar *y; double *G; // gradient of objective function enum { LOWER_BOUND, UPPER_BOUND, FREE }; char *alpha_status; // LOWER_BOUND, UPPER_BOUND, FREE double *alpha; const QMatrix *Q; const double *QD; double eps; double Cp,Cn; double *p; int *active_set; double *G_bar; // gradient, if we treat free variables as 0 int l; bool unshrink; // XXX double get_C(int i) { return (y[i] > 0)? Cp : Cn; } void update_alpha_status(int i) { if(alpha[i] >= get_C(i)) alpha_status[i] = UPPER_BOUND; else if(alpha[i] <= 0) alpha_status[i] = LOWER_BOUND; else alpha_status[i] = FREE; } bool is_upper_bound(int i) { return alpha_status[i] == UPPER_BOUND; } bool is_lower_bound(int i) { return alpha_status[i] == LOWER_BOUND; } bool is_free(int i) { return alpha_status[i] == FREE; } void swap_index(int i, int j); void reconstruct_gradient(); virtual int select_working_set(int &i, int &j); virtual double calculate_rho(); virtual void do_shrinking(); private: bool be_shrunk(int i, double Gmax1, double Gmax2); }; void Solver::swap_index(int i, int j) { Q->swap_index(i,j); swap(y[i],y[j]); swap(G[i],G[j]); swap(alpha_status[i],alpha_status[j]); swap(alpha[i],alpha[j]); swap(p[i],p[j]); swap(active_set[i],active_set[j]); swap(G_bar[i],G_bar[j]); } void Solver::reconstruct_gradient() { // reconstruct inactive elements of G from G_bar and free variables if(active_size == l) return; int i,j; int nr_free = 0; for(j=active_size;j 2*active_size*(l-active_size)) { for(i=active_size;iget_Q(i,active_size); for(j=0;jget_Q(i,l); double alpha_i = alpha[i]; for(j=active_size;jl = l; this->Q = &Q; QD=Q.get_QD(); clone(p, p_,l); clone(y, y_,l); clone(alpha,alpha_,l); this->Cp = Cp; this->Cn = Cn; this->eps = eps; unshrink = false; // initialize alpha_status { alpha_status = new char[l]; for(int i=0;iINT_MAX/100 ? INT_MAX : 100*l); int counter = min(l,1000)+1; while(iter < max_iter) { // show progress and do shrinking if(--counter == 0) { counter = min(l,1000); if(shrinking) do_shrinking(); if(verbose)//pk info("."); } int i,j; if(select_working_set(i,j)!=0) { // reconstruct the whole gradient reconstruct_gradient(); // reset active set size and check active_size = l; if(verbose)//pk info("*"); if(select_working_set(i,j)!=0) break; else counter = 1; // do shrinking next iteration } ++iter; // update alpha[i] and alpha[j], handle bounds carefully const Qfloat *Q_i = Q.get_Q(i,active_size); const Qfloat *Q_j = Q.get_Q(j,active_size); double C_i = get_C(i); double C_j = get_C(j); double old_alpha_i = alpha[i]; double old_alpha_j = alpha[j]; if(y[i]!=y[j]) { double quad_coef = QD[i]+QD[j]+2*Q_i[j]; if (quad_coef <= 0) quad_coef = TAU; double delta = (-G[i]-G[j])/quad_coef; double diff = alpha[i] - alpha[j]; alpha[i] += delta; alpha[j] += delta; if(diff > 0) { if(alpha[j] < 0) { alpha[j] = 0; alpha[i] = diff; } } else { if(alpha[i] < 0) { alpha[i] = 0; alpha[j] = -diff; } } if(diff > C_i - C_j) { if(alpha[i] > C_i) { alpha[i] = C_i; alpha[j] = C_i - diff; } } else { if(alpha[j] > C_j) { alpha[j] = C_j; alpha[i] = C_j + diff; } } } else { double quad_coef = QD[i]+QD[j]-2*Q_i[j]; if (quad_coef <= 0) quad_coef = TAU; double delta = (G[i]-G[j])/quad_coef; double sum = alpha[i] + alpha[j]; alpha[i] -= delta; alpha[j] += delta; if(sum > C_i) { if(alpha[i] > C_i) { alpha[i] = C_i; alpha[j] = sum - C_i; } } else { if(alpha[j] < 0) { alpha[j] = 0; alpha[i] = sum; } } if(sum > C_j) { if(alpha[j] > C_j) { alpha[j] = C_j; alpha[i] = sum - C_j; } } else { if(alpha[i] < 0) { alpha[i] = 0; alpha[j] = sum; } } } // update G double delta_alpha_i = alpha[i] - old_alpha_i; double delta_alpha_j = alpha[j] - old_alpha_j; for(int k=0;k= max_iter) { if(active_size < l) { // reconstruct the whole gradient to calculate objective value reconstruct_gradient(); active_size = l; if(verbose)//pk info("*"); } info("\nWARNING: reaching max number of iterations"); } // calculate rho si->rho = calculate_rho(); // calculate objective value { double v = 0; int i; for(i=0;iobj = v/2; } // put back the solution { for(int i=0;iupper_bound_p = Cp; si->upper_bound_n = Cn; if(verbose)//pk info("\noptimization finished, #iter = %d\n",iter); delete[] p; delete[] y; delete[] alpha; delete[] alpha_status; delete[] active_set; delete[] G; delete[] G_bar; } // return 1 if already optimal, return 0 otherwise int Solver::select_working_set(int &out_i, int &out_j) { // return i,j such that // i: maximizes -y_i * grad(f)_i, i in I_up(\alpha) // j: minimizes the decrease of obj value // (if quadratic coefficeint <= 0, replace it with tau) // -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha) double Gmax = -INF; double Gmax2 = -INF; int Gmax_idx = -1; int Gmin_idx = -1; double obj_diff_min = INF; for(int t=0;t= Gmax) { Gmax = -G[t]; Gmax_idx = t; } } else { if(!is_lower_bound(t)) if(G[t] >= Gmax) { Gmax = G[t]; Gmax_idx = t; } } int i = Gmax_idx; const Qfloat *Q_i = NULL; if(i != -1) // NULL Q_i not accessed: Gmax=-INF if i=-1 Q_i = Q->get_Q(i,active_size); for(int j=0;j= Gmax2) Gmax2 = G[j]; if (grad_diff > 0) { double obj_diff; double quad_coef = QD[i]+QD[j]-2.0*y[i]*Q_i[j]; if (quad_coef > 0) obj_diff = -(grad_diff*grad_diff)/quad_coef; else obj_diff = -(grad_diff*grad_diff)/TAU; if (obj_diff <= obj_diff_min) { Gmin_idx=j; obj_diff_min = obj_diff; } } } } else { if (!is_upper_bound(j)) { double grad_diff= Gmax-G[j]; if (-G[j] >= Gmax2) Gmax2 = -G[j]; if (grad_diff > 0) { double obj_diff; double quad_coef = QD[i]+QD[j]+2.0*y[i]*Q_i[j]; if (quad_coef > 0) obj_diff = -(grad_diff*grad_diff)/quad_coef; else obj_diff = -(grad_diff*grad_diff)/TAU; if (obj_diff <= obj_diff_min) { Gmin_idx=j; obj_diff_min = obj_diff; } } } } } if(Gmax+Gmax2 < eps) return 1; out_i = Gmax_idx; out_j = Gmin_idx; return 0; } bool Solver::be_shrunk(int i, double Gmax1, double Gmax2) { if(is_upper_bound(i)) { if(y[i]==+1) return(-G[i] > Gmax1); else return(-G[i] > Gmax2); } else if(is_lower_bound(i)) { if(y[i]==+1) return(G[i] > Gmax2); else return(G[i] > Gmax1); } else return(false); } void Solver::do_shrinking() { int i; double Gmax1 = -INF; // max { -y_i * grad(f)_i | i in I_up(\alpha) } double Gmax2 = -INF; // max { y_i * grad(f)_i | i in I_low(\alpha) } // find maximal violating pair first for(i=0;i= Gmax1) Gmax1 = -G[i]; } if(!is_lower_bound(i)) { if(G[i] >= Gmax2) Gmax2 = G[i]; } } else { if(!is_upper_bound(i)) { if(-G[i] >= Gmax2) Gmax2 = -G[i]; } if(!is_lower_bound(i)) { if(G[i] >= Gmax1) Gmax1 = G[i]; } } } if(unshrink == false && Gmax1 + Gmax2 <= eps*10) { unshrink = true; reconstruct_gradient(); active_size = l; info("*"); } for(i=0;i i) { if (!be_shrunk(active_size, Gmax1, Gmax2)) { swap_index(i,active_size); break; } active_size--; } } } double Solver::calculate_rho() { double r; int nr_free = 0; double ub = INF, lb = -INF, sum_free = 0; for(int i=0;i0) r = sum_free/nr_free; else r = (ub+lb)/2; return r; } // // Solver for nu-svm classification and regression // // additional constraint: e^T \alpha = constant // class Solver_NU : public Solver { public: Solver_NU() {} void Solve(int l, const QMatrix& Q, const double *p, const schar *y, double *alpha, double Cp, double Cn, double eps, SolutionInfo* si, int shrinking, bool verbose=false) { this->si = si; Solver::Solve(l,Q,p,y,alpha,Cp,Cn,eps,si,shrinking,verbose); } private: SolutionInfo *si; int select_working_set(int &i, int &j); double calculate_rho(); bool be_shrunk(int i, double Gmax1, double Gmax2, double Gmax3, double Gmax4); void do_shrinking(); }; // return 1 if already optimal, return 0 otherwise int Solver_NU::select_working_set(int &out_i, int &out_j) { // return i,j such that y_i = y_j and // i: maximizes -y_i * grad(f)_i, i in I_up(\alpha) // j: minimizes the decrease of obj value // (if quadratic coefficeint <= 0, replace it with tau) // -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha) double Gmaxp = -INF; double Gmaxp2 = -INF; int Gmaxp_idx = -1; double Gmaxn = -INF; double Gmaxn2 = -INF; int Gmaxn_idx = -1; int Gmin_idx = -1; double obj_diff_min = INF; for(int t=0;t= Gmaxp) { Gmaxp = -G[t]; Gmaxp_idx = t; } } else { if(!is_lower_bound(t)) if(G[t] >= Gmaxn) { Gmaxn = G[t]; Gmaxn_idx = t; } } int ip = Gmaxp_idx; int in = Gmaxn_idx; const Qfloat *Q_ip = NULL; const Qfloat *Q_in = NULL; if(ip != -1) // NULL Q_ip not accessed: Gmaxp=-INF if ip=-1 Q_ip = Q->get_Q(ip,active_size); if(in != -1) Q_in = Q->get_Q(in,active_size); for(int j=0;j= Gmaxp2) Gmaxp2 = G[j]; if (grad_diff > 0) { double obj_diff; double quad_coef = QD[ip]+QD[j]-2*Q_ip[j]; if (quad_coef > 0) obj_diff = -(grad_diff*grad_diff)/quad_coef; else obj_diff = -(grad_diff*grad_diff)/TAU; if (obj_diff <= obj_diff_min) { Gmin_idx=j; obj_diff_min = obj_diff; } } } } else { if (!is_upper_bound(j)) { double grad_diff=Gmaxn-G[j]; if (-G[j] >= Gmaxn2) Gmaxn2 = -G[j]; if (grad_diff > 0) { double obj_diff; double quad_coef = QD[in]+QD[j]-2*Q_in[j]; if (quad_coef > 0) obj_diff = -(grad_diff*grad_diff)/quad_coef; else obj_diff = -(grad_diff*grad_diff)/TAU; if (obj_diff <= obj_diff_min) { Gmin_idx=j; obj_diff_min = obj_diff; } } } } } if(max(Gmaxp+Gmaxp2,Gmaxn+Gmaxn2) < eps) return 1; if (y[Gmin_idx] == +1) out_i = Gmaxp_idx; else out_i = Gmaxn_idx; out_j = Gmin_idx; return 0; } bool Solver_NU::be_shrunk(int i, double Gmax1, double Gmax2, double Gmax3, double Gmax4) { if(is_upper_bound(i)) { if(y[i]==+1) return(-G[i] > Gmax1); else return(-G[i] > Gmax4); } else if(is_lower_bound(i)) { if(y[i]==+1) return(G[i] > Gmax2); else return(G[i] > Gmax3); } else return(false); } void Solver_NU::do_shrinking() { double Gmax1 = -INF; // max { -y_i * grad(f)_i | y_i = +1, i in I_up(\alpha) } double Gmax2 = -INF; // max { y_i * grad(f)_i | y_i = +1, i in I_low(\alpha) } double Gmax3 = -INF; // max { -y_i * grad(f)_i | y_i = -1, i in I_up(\alpha) } double Gmax4 = -INF; // max { y_i * grad(f)_i | y_i = -1, i in I_low(\alpha) } // find maximal violating pair first int i; for(i=0;i Gmax1) Gmax1 = -G[i]; } else if(-G[i] > Gmax4) Gmax4 = -G[i]; } if(!is_lower_bound(i)) { if(y[i]==+1) { if(G[i] > Gmax2) Gmax2 = G[i]; } else if(G[i] > Gmax3) Gmax3 = G[i]; } } if(unshrink == false && max(Gmax1+Gmax2,Gmax3+Gmax4) <= eps*10) { unshrink = true; reconstruct_gradient(); active_size = l; } for(i=0;i i) { if (!be_shrunk(active_size, Gmax1, Gmax2, Gmax3, Gmax4)) { swap_index(i,active_size); break; } active_size--; } } } double Solver_NU::calculate_rho() { int nr_free1 = 0,nr_free2 = 0; double ub1 = INF, ub2 = INF; double lb1 = -INF, lb2 = -INF; double sum_free1 = 0, sum_free2 = 0; for(int i=0;i 0) r1 = sum_free1/nr_free1; else r1 = (ub1+lb1)/2; if(nr_free2 > 0) r2 = sum_free2/nr_free2; else r2 = (ub2+lb2)/2; si->r = (r1+r2)/2; return (r1-r2)/2; } // // Q matrices for various formulations // class SVC_Q: public Kernel { public: SVC_Q(const svm_problem& prob, const svm_parameter& param, const schar *y_) :Kernel(prob.l, prob.x, param) { clone(y,y_,prob.l); cache = new Cache(prob.l,(long int)(param.cache_size*(1<<20))); QD = new double[prob.l]; for(int i=0;i*kernel_function)(i,i); } Qfloat *get_Q(int i, int len) const { Qfloat *data; int start, j; if((start = cache->get_data(i,&data,len)) < len) { for(j=start;j*kernel_function)(i,j)); } return data; } double *get_QD() const { return QD; } void swap_index(int i, int j) const { cache->swap_index(i,j); Kernel::swap_index(i,j); swap(y[i],y[j]); swap(QD[i],QD[j]); } ~SVC_Q() { delete[] y; delete cache; delete[] QD; } private: schar *y; Cache *cache; double *QD; }; class ONE_CLASS_Q: public Kernel { public: ONE_CLASS_Q(const svm_problem& prob, const svm_parameter& param) :Kernel(prob.l, prob.x, param) { cache = new Cache(prob.l,(long int)(param.cache_size*(1<<20))); QD = new double[prob.l]; for(int i=0;i*kernel_function)(i,i); } Qfloat *get_Q(int i, int len) const { Qfloat *data; int start, j; if((start = cache->get_data(i,&data,len)) < len) { for(j=start;j*kernel_function)(i,j); } return data; } double *get_QD() const { return QD; } void swap_index(int i, int j) const { cache->swap_index(i,j); Kernel::swap_index(i,j); swap(QD[i],QD[j]); } ~ONE_CLASS_Q() { delete cache; delete[] QD; } private: Cache *cache; double *QD; }; class SVR_Q: public Kernel { public: SVR_Q(const svm_problem& prob, const svm_parameter& param) :Kernel(prob.l, prob.x, param) { l = prob.l; cache = new Cache(l,(long int)(param.cache_size*(1<<20))); QD = new double[2*l]; sign = new schar[2*l]; index = new int[2*l]; for(int k=0;k*kernel_function)(k,k); QD[k+l] = QD[k]; } buffer[0] = new Qfloat[2*l]; buffer[1] = new Qfloat[2*l]; next_buffer = 0; } void swap_index(int i, int j) const { swap(sign[i],sign[j]); swap(index[i],index[j]); swap(QD[i],QD[j]); } Qfloat *get_Q(int i, int len) const { Qfloat *data; int j, real_i = index[i]; if(cache->get_data(real_i,&data,l) < l) { for(j=0;j*kernel_function)(real_i,j); } // reorder and copy Qfloat *buf = buffer[next_buffer]; next_buffer = 1 - next_buffer; schar si = sign[i]; for(j=0;jl; double *minus_ones = new double[l]; schar *y = new schar[l]; int i; for(i=0;iy[i] > 0) y[i] = +1; else y[i] = -1; } Solver s; s.Solve(l, SVC_Q(*prob,*param,y), minus_ones, y, alpha, Cp, Cn, param->eps, si, param->shrinking, param->verbose); double sum_alpha=0; for(i=0;iverbose)//pk info("nu = %f\n", sum_alpha/(Cp*prob->l)); for(i=0;il; double nu = param->nu; schar *y = new schar[l]; for(i=0;iy[i]>0) y[i] = +1; else y[i] = -1; double sum_pos = nu*l/2; double sum_neg = nu*l/2; for(i=0;ieps, si, param->shrinking, param->verbose); double r = si->r; if(param->verbose)//pk info("C = %f\n",1/r); for(i=0;irho /= r; si->obj /= (r*r); si->upper_bound_p = 1/r; si->upper_bound_n = 1/r; delete[] y; delete[] zeros; } static void solve_one_class( const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo* si) { int l = prob->l; double *zeros = new double[l]; schar *ones = new schar[l]; int i; int n = (int)(param->nu*prob->l); // # of alpha's at upper bound for(i=0;il) alpha[n] = param->nu * prob->l - n; for(i=n+1;ieps, si, param->shrinking, param->verbose ); delete[] zeros; delete[] ones; } static void solve_epsilon_svr( const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo* si) { int l = prob->l; double *alpha2 = new double[2*l]; double *linear_term = new double[2*l]; schar *y = new schar[2*l]; int i; for(i=0;ip - prob->y[i]; y[i] = 1; alpha2[i+l] = 0; linear_term[i+l] = param->p + prob->y[i]; y[i+l] = -1; } Solver s; s.Solve(2*l, SVR_Q(*prob,*param), linear_term, y, alpha2, param->C, param->C, param->eps, si, param->shrinking, param->verbose); double sum_alpha = 0; for(i=0;iverbose)//pk info("nu = %f\n",sum_alpha/(param->C*l)); delete[] alpha2; delete[] linear_term; delete[] y; } static void solve_nu_svr( const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo* si) { int l = prob->l; double C = param->C; double *alpha2 = new double[2*l]; double *linear_term = new double[2*l]; schar *y = new schar[2*l]; int i; double sum = C * param->nu * l / 2; for(i=0;iy[i]; y[i] = 1; linear_term[i+l] = prob->y[i]; y[i+l] = -1; } Solver_NU s; s.Solve(2*l, SVR_Q(*prob,*param), linear_term, y, alpha2, C, C, param->eps, si, param->shrinking, param->verbose); if(param->verbose)//pk info("epsilon = %f\n",-si->r); for(i=0;il); Solver::SolutionInfo si; switch(param->svm_type) { case C_SVC: solve_c_svc(prob,param,alpha,&si,Cp,Cn); break; case NU_SVC: solve_nu_svc(prob,param,alpha,&si); break; case ONE_CLASS: solve_one_class(prob,param,alpha,&si); break; case EPSILON_SVR: solve_epsilon_svr(prob,param,alpha,&si); break; case NU_SVR: solve_nu_svr(prob,param,alpha,&si); break; } if(param->verbose)//pk info("obj = %f, rho = %f\n",si.obj,si.rho); // output SVs int nSV = 0; int nBSV = 0; for(int i=0;il;i++) { if(fabs(alpha[i]) > 0) { ++nSV; if(prob->y[i] > 0) { if(fabs(alpha[i]) >= si.upper_bound_p) ++nBSV; } else { if(fabs(alpha[i]) >= si.upper_bound_n) ++nBSV; } } } if(param->verbose)//pk info("nSV = %d, nBSV = %d\n",nSV,nBSV); decision_function f; f.alpha = alpha; f.rho = si.rho; return f; } // Platt's binary SVM Probablistic Output: an improvement from Lin et al. static void sigmoid_train( int l, const double *dec_values, const double *labels, double& A, double& B) { double prior1=0, prior0 = 0; int i; for (i=0;i 0) prior1+=1; else prior0+=1; int max_iter=100; // Maximal number of iterations double min_step=1e-10; // Minimal step taken in line search double sigma=1e-12; // For numerically strict PD of Hessian double eps=1e-5; double hiTarget=(prior1+1.0)/(prior1+2.0); double loTarget=1/(prior0+2.0); double *t=Malloc(double,l); double fApB,p,q,h11,h22,h21,g1,g2,det,dA,dB,gd,stepsize; double newA,newB,newf,d1,d2; int iter; // Initial Point and Initial Fun Value A=0.0; B=log((prior0+1.0)/(prior1+1.0)); double fval = 0.0; for (i=0;i0) t[i]=hiTarget; else t[i]=loTarget; fApB = dec_values[i]*A+B; if (fApB>=0) fval += t[i]*fApB + log(1+exp(-fApB)); else fval += (t[i] - 1)*fApB +log(1+exp(fApB)); } for (iter=0;iter= 0) { p=exp(-fApB)/(1.0+exp(-fApB)); q=1.0/(1.0+exp(-fApB)); } else { p=1.0/(1.0+exp(fApB)); q=exp(fApB)/(1.0+exp(fApB)); } d2=p*q; h11+=dec_values[i]*dec_values[i]*d2; h22+=d2; h21+=dec_values[i]*d2; d1=t[i]-p; g1+=dec_values[i]*d1; g2+=d1; } // Stopping Criteria if (fabs(g1)= min_step) { newA = A + stepsize * dA; newB = B + stepsize * dB; // New function value newf = 0.0; for (i=0;i= 0) newf += t[i]*fApB + log(1+exp(-fApB)); else newf += (t[i] - 1)*fApB +log(1+exp(fApB)); } // Check sufficient decrease if (newf=max_iter) info("Reaching maximal iterations in two-class probability estimates\n"); free(t); } static double sigmoid_predict(double decision_value, double A, double B) { double fApB = decision_value*A+B; // 1-p used later; avoid catastrophic cancellation if (fApB >= 0) return exp(-fApB)/(1.0+exp(-fApB)); else return 1.0/(1+exp(fApB)) ; } // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng static void multiclass_probability(int k, double **r, double *p) { int t,j; int iter = 0, max_iter=max(100,k); double **Q=Malloc(double *,k); double *Qp=Malloc(double,k); double pQp, eps=0.005/k; for (t=0;tmax_error) max_error=error; } if (max_error=max_iter) info("Exceeds max_iter in multiclass_prob\n"); for(t=0;tl); double *dec_values = Malloc(double,prob->l); // random shuffle for(i=0;il;i++) perm[i]=i; for(i=0;il;i++) { int j = i+rand()%(prob->l-i); swap(perm[i],perm[j]); } for(i=0;il/nr_fold; int end = (i+1)*prob->l/nr_fold; int j,k; struct svm_problem subprob; subprob.l = prob->l-(end-begin); subprob.x = Malloc(struct svm_node*,subprob.l); subprob.y = Malloc(double,subprob.l); k=0; for(j=0;jx[perm[j]]; subprob.y[k] = prob->y[perm[j]]; ++k; } for(j=end;jl;j++) { subprob.x[k] = prob->x[perm[j]]; subprob.y[k] = prob->y[perm[j]]; ++k; } int p_count=0,n_count=0; for(j=0;j0) p_count++; else n_count++; if(p_count==0 && n_count==0) for(j=begin;j 0 && n_count == 0) for(j=begin;j 0) for(j=begin;jx[perm[j]],&(dec_values[perm[j]])); // ensure +1 -1 order; reason not using CV subroutine dec_values[perm[j]] *= submodel->label[0]; } svm_free_and_destroy_model(&submodel); svm_destroy_param(&subparam); } free(subprob.x); free(subprob.y); } sigmoid_train(prob->l,dec_values,prob->y,probA,probB); free(dec_values); free(perm); } // Return parameter of a Laplace distribution static double svm_svr_probability( const svm_problem *prob, const svm_parameter *param) { int i; int nr_fold = 5; double *ymv = Malloc(double,prob->l); double mae = 0; svm_parameter newparam = *param; newparam.probability = 0; svm_cross_validation(prob,&newparam,nr_fold,ymv); for(i=0;il;i++) { ymv[i]=prob->y[i]-ymv[i]; mae += fabs(ymv[i]); } mae /= prob->l; double std=sqrt(2*mae*mae); int count=0; mae=0; for(i=0;il;i++) if (fabs(ymv[i]) > 5*std) count=count+1; else mae+=fabs(ymv[i]); mae /= (prob->l-count); info("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma= %g\n",mae); free(ymv); return mae; } // label: label name, start: begin of each class, count: #data of classes, perm: indices to the original data // perm, length l, must be allocated before calling this subroutine static void svm_group_classes(const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm) { int l = prob->l; int max_nr_class = 16; int nr_class = 0; int *label = Malloc(int,max_nr_class); int *count = Malloc(int,max_nr_class); int *data_label = Malloc(int,l); int i; for(i=0;iy[i]; int j; for(j=0;jparam = *param; model->free_sv = 0; // XXX if(param->svm_type == ONE_CLASS || param->svm_type == EPSILON_SVR || param->svm_type == NU_SVR) { // regression or one-class-svm model->nr_class = 2; model->label = NULL; model->nSV = NULL; model->probA = NULL; model->probB = NULL; model->sv_coef = Malloc(double *,1); if(param->probability && (param->svm_type == EPSILON_SVR || param->svm_type == NU_SVR)) { model->probA = Malloc(double,1); model->probA[0] = svm_svr_probability(prob,param); } decision_function f = svm_train_one(prob,param,0,0); model->rho = Malloc(double,1); model->rho[0] = f.rho; int nSV = 0; int i; for(i=0;il;i++) if(fabs(f.alpha[i]) > 0) ++nSV; model->l = nSV; model->SV = Malloc(svm_node *,nSV); model->sv_coef[0] = Malloc(double,nSV); int j = 0; for(i=0;il;i++) if(fabs(f.alpha[i]) > 0) { model->SV[j] = prob->x[i]; model->sv_coef[0][j] = f.alpha[i]; ++j; } free(f.alpha); } else { // classification int l = prob->l; int nr_class; int *label = NULL; int *start = NULL; int *count = NULL; int *perm = Malloc(int,l); // group training data of the same class svm_group_classes(prob,&nr_class,&label,&start,&count,perm); if(nr_class == 1) info("WARNING: training data in only one class. See README for details.\n"); svm_node **x = Malloc(svm_node *,l); int i; for(i=0;ix[perm[i]]; // calculate weighted C double *weighted_C = Malloc(double, nr_class); for(i=0;iC; for(i=0;inr_weight;i++) { int j; for(j=0;jweight_label[i] == label[j]) break; if(j == nr_class) fprintf(stderr,"WARNING: class label %d specified in weight is not found\n", param->weight_label[i]); else weighted_C[j] *= param->weight[i]; } // train k*(k-1)/2 models bool *nonzero = Malloc(bool,l); for(i=0;iprobability) { probA=Malloc(double,nr_class*(nr_class-1)/2); probB=Malloc(double,nr_class*(nr_class-1)/2); } int p = 0; for(i=0;iprobability) svm_binary_svc_probability(&sub_prob,param,weighted_C[i],weighted_C[j],probA[p],probB[p]); f[p] = svm_train_one(&sub_prob,param,weighted_C[i],weighted_C[j]); for(k=0;k 0) nonzero[si+k] = true; for(k=0;k 0) nonzero[sj+k] = true; free(sub_prob.x); free(sub_prob.y); ++p; } // build output model->nr_class = nr_class; model->label = Malloc(int,nr_class); for(i=0;ilabel[i] = label[i]; model->rho = Malloc(double,nr_class*(nr_class-1)/2); for(i=0;irho[i] = f[i].rho; if(param->probability) { model->probA = Malloc(double,nr_class*(nr_class-1)/2); model->probB = Malloc(double,nr_class*(nr_class-1)/2); for(i=0;iprobA[i] = probA[i]; model->probB[i] = probB[i]; } } else { model->probA=NULL; model->probB=NULL; } int total_sv = 0; int *nz_count = Malloc(int,nr_class); model->nSV = Malloc(int,nr_class); for(i=0;inSV[i] = nSV; nz_count[i] = nSV; } if(param->verbose)//pk info("Total nSV = %d\n",total_sv); model->l = total_sv; model->SV = Malloc(svm_node *,total_sv); p = 0; for(i=0;iSV[p++] = x[i]; int *nz_start = Malloc(int,nr_class); nz_start[0] = 0; for(i=1;isv_coef = Malloc(double *,nr_class-1); for(i=0;isv_coef[i] = Malloc(double,total_sv); p = 0; for(i=0;isv_coef[j-1][q++] = f[p].alpha[k]; q = nz_start[j]; for(k=0;ksv_coef[i][q++] = f[p].alpha[ci+k]; ++p; } free(label); free(probA); free(probB); free(count); free(perm); free(start); free(x); free(weighted_C); free(nonzero); for(i=0;il; int *perm = Malloc(int,l); int nr_class; // stratified cv may not give leave-one-out rate // Each class to l folds -> some folds may have zero elements if((param->svm_type == C_SVC || param->svm_type == NU_SVC) && nr_fold < l) { int *start = NULL; int *label = NULL; int *count = NULL; svm_group_classes(prob,&nr_class,&label,&start,&count,perm); // random shuffle and then data grouped by fold using the array perm int *fold_count = Malloc(int,nr_fold); int c; int *index = Malloc(int,l); for(i=0;ix[perm[j]]; subprob.y[k] = prob->y[perm[j]]; ++k; } for(j=end;jx[perm[j]]; subprob.y[k] = prob->y[perm[j]]; ++k; } struct svm_model *submodel = svm_train(&subprob,param); if(param->probability && (param->svm_type == C_SVC || param->svm_type == NU_SVC)) { double *prob_estimates=Malloc(double,svm_get_nr_class(submodel)); for(j=begin;jx[perm[j]],prob_estimates); free(prob_estimates); } else for(j=begin;jx[perm[j]]); svm_free_and_destroy_model(&submodel); free(subprob.x); free(subprob.y); } free(fold_start); free(perm); } int svm_get_svm_type(const svm_model *model) { return model->param.svm_type; } int svm_get_nr_class(const svm_model *model) { return model->nr_class; } void svm_get_labels(const svm_model *model, int* label) { if (model->label != NULL) for(int i=0;inr_class;i++) label[i] = model->label[i]; } double svm_get_svr_probability(const svm_model *model) { if ((model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) && model->probA!=NULL) return model->probA[0]; else { fprintf(stderr,"Model doesn't contain information for SVR probability inference\n"); return 0; } } double svm_predict_values(const svm_model *model, const svm_node *x, double* dec_values) { int i; if(model->param.svm_type == ONE_CLASS || model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) { double *sv_coef = model->sv_coef[0]; double sum = 0; for(i=0;il;i++) sum += sv_coef[i] * Kernel::k_function(x,model->SV[i],model->param); sum -= model->rho[0]; *dec_values = sum; if(model->param.svm_type == ONE_CLASS) return (sum>0)?1:-1; else return sum; } else { int nr_class = model->nr_class; int l = model->l; double *kvalue = Malloc(double,l); for(i=0;iSV[i],model->param); int *start = Malloc(int,nr_class); start[0] = 0; for(i=1;inSV[i-1]; int *vote = Malloc(int,nr_class); for(i=0;inSV[i]; int cj = model->nSV[j]; int k; double *coef1 = model->sv_coef[j-1]; double *coef2 = model->sv_coef[i]; for(k=0;krho[p]; dec_values[p] = sum; if(dec_values[p] > 0) ++vote[i]; else ++vote[j]; p++; } int vote_max_idx = 0; for(i=1;i vote[vote_max_idx]) vote_max_idx = i; free(kvalue); free(start); free(vote); return model->label[vote_max_idx]; } } double svm_predict(const svm_model *model, const svm_node *x) { int nr_class = model->nr_class; double *dec_values; if(model->param.svm_type == ONE_CLASS || model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) dec_values = Malloc(double, 1); else dec_values = Malloc(double, nr_class*(nr_class-1)/2); double pred_result = svm_predict_values(model, x, dec_values); free(dec_values); return pred_result; } double svm_predict_probability( const svm_model *model, const svm_node *x, double *prob_estimates) { if ((model->param.svm_type == C_SVC || model->param.svm_type == NU_SVC) && model->probA!=NULL && model->probB!=NULL) { int i; int nr_class = model->nr_class; double *dec_values = Malloc(double, nr_class*(nr_class-1)/2); svm_predict_values(model, x, dec_values); double min_prob=1e-7; double **pairwise_prob=Malloc(double *,nr_class); for(i=0;iprobA[k],model->probB[k]),min_prob),1-min_prob); pairwise_prob[j][i]=1-pairwise_prob[i][j]; k++; } multiclass_probability(nr_class,pairwise_prob,prob_estimates); int prob_max_idx = 0; for(i=1;i prob_estimates[prob_max_idx]) prob_max_idx = i; for(i=0;ilabel[prob_max_idx]; } else return svm_predict(model, x); } static const char *svm_type_table[] = { "c_svc","nu_svc","one_class","epsilon_svr","nu_svr",NULL }; static const char *kernel_type_table[]= { "linear","polynomial","rbf","sigmoid","precomputed",NULL }; int svm_save_model(const char *model_file_name, const svm_model *model) { FILE *fp = fopen(model_file_name,"w"); if(fp==NULL) return -1; char *old_locale = strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); const svm_parameter& param = model->param; fprintf(fp,"svm_type %s\n", svm_type_table[param.svm_type]); fprintf(fp,"kernel_type %s\n", kernel_type_table[param.kernel_type]); if(param.kernel_type == POLY) fprintf(fp,"degree %d\n", param.degree); if(param.kernel_type == POLY || param.kernel_type == RBF || param.kernel_type == SIGMOID) fprintf(fp,"gamma %g\n", param.gamma); if(param.kernel_type == POLY || param.kernel_type == SIGMOID) fprintf(fp,"coef0 %g\n", param.coef0); int nr_class = model->nr_class; int l = model->l; fprintf(fp, "nr_class %d\n", nr_class); fprintf(fp, "total_sv %d\n",l); { fprintf(fp, "rho"); for(int i=0;irho[i]); fprintf(fp, "\n"); } if(model->label) { fprintf(fp, "label"); for(int i=0;ilabel[i]); fprintf(fp, "\n"); } if(model->probA) // regression has probA only { fprintf(fp, "probA"); for(int i=0;iprobA[i]); fprintf(fp, "\n"); } if(model->probB) { fprintf(fp, "probB"); for(int i=0;iprobB[i]); fprintf(fp, "\n"); } if(model->nSV) { fprintf(fp, "nr_sv"); for(int i=0;inSV[i]); fprintf(fp, "\n"); } fprintf(fp, "SV\n"); const double * const *sv_coef = model->sv_coef; const svm_node * const *SV = model->SV; for(int i=0;ivalue)); else while(p->index != -1) { fprintf(fp,"%d:%.8g ",p->index,p->value); p++; } fprintf(fp, "\n"); } setlocale(LC_ALL, old_locale); free(old_locale); if (ferror(fp) != 0 || fclose(fp) != 0) return -1; else return 0; } static char *line = NULL; static int max_line_len; static char* readline(FILE *input) { int len; if(fgets(line,max_line_len,input) == NULL) return NULL; while(strrchr(line,'\n') == NULL) { max_line_len *= 2; line = (char *) realloc(line,max_line_len); len = (int) strlen(line); if(fgets(line+len,max_line_len-len,input) == NULL) break; } return line; } svm_model *svm_load_model(const char *model_file_name) { FILE *fp = fopen(model_file_name,"rb"); if(fp==NULL) return NULL; char *old_locale = strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); // read parameters svm_model *model = Malloc(svm_model,1); svm_parameter& param = model->param; model->rho = NULL; model->probA = NULL; model->probB = NULL; model->label = NULL; model->nSV = NULL; char cmd[81]; while(1) { fscanf(fp,"%80s",cmd); if(strcmp(cmd,"svm_type")==0) { fscanf(fp,"%80s",cmd); int i; for(i=0;svm_type_table[i];i++) { if(strcmp(svm_type_table[i],cmd)==0) { param.svm_type=i; break; } } if(svm_type_table[i] == NULL) { fprintf(stderr,"unknown svm type.\n"); setlocale(LC_ALL, old_locale); free(old_locale); free(model->rho); free(model->label); free(model->nSV); free(model); return NULL; } } else if(strcmp(cmd,"kernel_type")==0) { fscanf(fp,"%80s",cmd); int i; for(i=0;kernel_type_table[i];i++) { if(strcmp(kernel_type_table[i],cmd)==0) { param.kernel_type=i; break; } } if(kernel_type_table[i] == NULL) { fprintf(stderr,"unknown kernel function.\n"); setlocale(LC_ALL, old_locale); free(old_locale); free(model->rho); free(model->label); free(model->nSV); free(model); return NULL; } } else if(strcmp(cmd,"degree")==0) fscanf(fp,"%d",¶m.degree); else if(strcmp(cmd,"gamma")==0) fscanf(fp,"%lf",¶m.gamma); else if(strcmp(cmd,"coef0")==0) fscanf(fp,"%lf",¶m.coef0); else if(strcmp(cmd,"nr_class")==0) fscanf(fp,"%d",&model->nr_class); else if(strcmp(cmd,"total_sv")==0) fscanf(fp,"%d",&model->l); else if(strcmp(cmd,"rho")==0) { int n = model->nr_class * (model->nr_class-1)/2; model->rho = Malloc(double,n); for(int i=0;irho[i]); } else if(strcmp(cmd,"label")==0) { int n = model->nr_class; model->label = Malloc(int,n); for(int i=0;ilabel[i]); } else if(strcmp(cmd,"probA")==0) { int n = model->nr_class * (model->nr_class-1)/2; model->probA = Malloc(double,n); for(int i=0;iprobA[i]); } else if(strcmp(cmd,"probB")==0) { int n = model->nr_class * (model->nr_class-1)/2; model->probB = Malloc(double,n); for(int i=0;iprobB[i]); } else if(strcmp(cmd,"nr_sv")==0) { int n = model->nr_class; model->nSV = Malloc(int,n); for(int i=0;inSV[i]); } else if(strcmp(cmd,"SV")==0) { while(1) { int c = getc(fp); if(c==EOF || c=='\n') break; } break; } else { fprintf(stderr,"unknown text in model file: [%s]\n",cmd); setlocale(LC_ALL, old_locale); free(old_locale); free(model->rho); free(model->label); free(model->nSV); free(model); return NULL; } } // read sv_coef and SV int elements = 0; long pos = ftell(fp); max_line_len = 1024; line = Malloc(char,max_line_len); char *p,*endptr,*idx,*val; while(readline(fp)!=NULL) { p = strtok(line,":"); while(1) { p = strtok(NULL,":"); if(p == NULL) break; ++elements; } } elements += model->l; fseek(fp,pos,SEEK_SET); int m = model->nr_class - 1; int l = model->l; model->sv_coef = Malloc(double *,m); int i; for(i=0;isv_coef[i] = Malloc(double,l); model->SV = Malloc(svm_node*,l); svm_node *x_space = NULL; if(l>0) x_space = Malloc(svm_node,elements); int j=0; for(i=0;iSV[i] = &x_space[j]; p = strtok(line, " \t"); model->sv_coef[0][i] = strtod(p,&endptr); for(int k=1;ksv_coef[k][i] = strtod(p,&endptr); } while(1) { idx = strtok(NULL, ":"); val = strtok(NULL, " \t"); if(val == NULL) break; x_space[j].index = (int) strtol(idx,&endptr,10); x_space[j].value = strtod(val,&endptr); ++j; } x_space[j++].index = -1; } free(line); setlocale(LC_ALL, old_locale); free(old_locale); if (ferror(fp) != 0 || fclose(fp) != 0) return NULL; model->free_sv = 1; // XXX return model; } void svm_free_model_content(svm_model* model_ptr) { if(model_ptr->free_sv && model_ptr->l > 0 && model_ptr->SV != NULL) free((void *)(model_ptr->SV[0])); if(model_ptr->sv_coef) { for(int i=0;inr_class-1;i++) free(model_ptr->sv_coef[i]); } free(model_ptr->SV); model_ptr->SV = NULL; free(model_ptr->sv_coef); model_ptr->sv_coef = NULL; free(model_ptr->rho); model_ptr->rho = NULL; free(model_ptr->label); model_ptr->label= NULL; free(model_ptr->probA); model_ptr->probA = NULL; free(model_ptr->probB); model_ptr->probB= NULL; free(model_ptr->nSV); model_ptr->nSV = NULL; } void svm_free_and_destroy_model(svm_model** model_ptr_ptr) { if(model_ptr_ptr != NULL && *model_ptr_ptr != NULL) { svm_free_model_content(*model_ptr_ptr); free(*model_ptr_ptr); *model_ptr_ptr = NULL; } } void svm_destroy_param(svm_parameter* param) { free(param->weight_label); free(param->weight); } const char *svm_check_parameter(const svm_problem *prob, const svm_parameter *param) { // svm_type int svm_type = param->svm_type; if(svm_type != C_SVC && svm_type != NU_SVC && svm_type != ONE_CLASS && svm_type != EPSILON_SVR && svm_type != NU_SVR) return "unknown svm type"; // kernel_type, degree int kernel_type = param->kernel_type; if(kernel_type != LINEAR && kernel_type != POLY && kernel_type != RBF && kernel_type != SIGMOID && kernel_type != PRECOMPUTED) return "unknown kernel type"; if(param->gamma < 0) return "gamma < 0"; if(param->degree < 0) return "degree of polynomial kernel < 0"; // cache_size,eps,C,nu,p,shrinking if(param->cache_size <= 0) return "cache_size <= 0"; if(param->eps <= 0) return "eps <= 0"; if(svm_type == C_SVC || svm_type == EPSILON_SVR || svm_type == NU_SVR) if(param->C <= 0) return "C <= 0"; if(svm_type == NU_SVC || svm_type == ONE_CLASS || svm_type == NU_SVR) if(param->nu <= 0 || param->nu > 1) return "nu <= 0 or nu > 1"; if(svm_type == EPSILON_SVR) if(param->p < 0) return "p < 0"; if(param->shrinking != 0 && param->shrinking != 1) return "shrinking != 0 and shrinking != 1"; if(param->probability != 0 && param->probability != 1) return "probability != 0 and probability != 1"; if(param->probability == 1 && svm_type == ONE_CLASS) return "one-class SVM probability output not supported yet"; // check whether nu-svc is feasible if(svm_type == NU_SVC) { int l = prob->l; int max_nr_class = 16; int nr_class = 0; int *label = Malloc(int,max_nr_class); int *count = Malloc(int,max_nr_class); int i; for(i=0;iy[i]; int j; for(j=0;jnu*(n1+n2)/2 > min(n1,n2)) { free(label); free(count); return "specified nu is infeasible"; } } } free(label); free(count); } return NULL; } int svm_check_probability_model(const svm_model *model) { return ((model->param.svm_type == C_SVC || model->param.svm_type == NU_SVC) && model->probA!=NULL && model->probB!=NULL) || ((model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) && model->probA!=NULL); } void svm_set_print_string_function(void (*print_func)(const char *)) { if(print_func == NULL) svm_print_string = &print_string_stdout; else svm_print_string = print_func; } pktools-2.6.6/src/algorithms/Filter2d.h0000644000113200011300000013773312631526311014725 00000000000000/********************************************************************** Filter2d.h: class for filtering images 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 _MYFILTER2D_H_ #define _MYFILTER2D_H_ #ifndef PI #define PI 3.1415926535897932384626433832795 #endif #ifndef DEG2RAD #define DEG2RAD(DEG) (DEG/180.0*PI) #endif #ifndef RAD2DEG #define RAD2DEG(RAD) (RAD/PI*180) #endif #ifdef WIN32 #include #define getpid _getpid #endif #include #include #include #include #include #include extern "C" { #include #include #include #include #include } #include "base/Vector2d.h" #include "Filter.h" #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "algorithms/StatFactory.h" namespace filter2d { enum FILTER_TYPE { median=100, var=101 , min=102, max=103, sum=104, mean=105, minmax=106, dilate=107, erode=108, close=109, open=110, homog=111, sobelx=112, sobely=113, sobelxy=114, sobelyx=115, smooth=116, density=117, mode=118, mixed=119, threshold=120, ismin=121, ismax=122, heterog=123, order=124, stdev=125, mrf=126, dwt=127, dwti=128, dwt_cut=129, scramble=130, shift=131, linearfeature=132, smoothnodata=133, countid=134, dwt_cut_from=135, savgolay=136, percentile=137, proportion=138, nvalid=139}; enum RESAMPLE { NEAR = 0, BILINEAR = 1, BICUBIC = 2 };//bicubic not supported yet... class Filter2d { public: Filter2d(void); Filter2d(const Vector2d &taps); virtual ~Filter2d(){}; static FILTER_TYPE getFilterType(const std::string filterType){ std::map m_filterMap; initMap(m_filterMap); return m_filterMap[filterType]; }; static const RESAMPLE getResampleType(const std::string resampleType){ if(resampleType=="near") return(NEAR); else if(resampleType=="bilinear") return(BILINEAR); else{ std::string errorString="resampling type not supported: "; errorString+=resampleType; errorString+=" use near or bilinear"; throw(errorString); } }; void setTaps(const Vector2d &taps); /* void setNoValue(double noValue=0){m_noValue=noValue;}; */ void pushClass(short theClass=1){m_class.push_back(theClass);}; int pushNoDataValue(double noDataValue=0);//{m_mask.push_back(theMask);}; void pushThreshold(double theThreshold){m_threshold.push_back(theThreshold);}; void setThresholds(const std::vector& theThresholds){m_threshold=theThresholds;}; void setClasses(const std::vector& theClasses){m_class=theClasses;}; void filter(const ImgReaderGdal& input, ImgWriterGdal& output, bool absolute=false, bool normalize=false, bool noData=false); void smooth(const ImgReaderGdal& input, ImgWriterGdal& output,int dim); void smooth(const ImgReaderGdal& input, ImgWriterGdal& output,int dimX, int dimY); void smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output,int dim); void smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output,int dimX, int dimY); template void filter(const Vector2d& inputVector, Vector2d& outputVector); template void smooth(const Vector2d& inputVector, Vector2d& outputVector,int dim); template void smooth(const Vector2d& inputVector, Vector2d& outputVector,int dimX, int dimY); void dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family); void dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family); void dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut, bool verbose=false); template void dwtForward(Vector2d& data, const std::string& wavelet_type, int family); template void dwtInverse(Vector2d& data, const std::string& wavelet_type, int family); template void dwtCut(Vector2d& data, const std::string& wavelet_type, int family, double cut); void majorVoting(const std::string& inputFilename, const std::string& outputFilename,int dim=0,const std::vector &prior=std::vector()); /* void homogeneousSpatial(const std::string& inputFilename, const std::string& outputFilename, int dim, bool disc=false, int noValue=0); */ void doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short down=1, bool disc=false); void doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, short down=1, bool disc=false); void mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, double beta, bool eightConnectivity=true, short down=1, bool verbose=false); void mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, Vector2d beta, bool eightConnectivity=true, short down=1, bool verbose=false); template void doit(const Vector2d& inputVector, Vector2d& outputVector, const std::string& method, int dimX, int dimY, short down=1, bool disc=false); void median(const std::string& inputFilename, const std::string& outputFilename, int dim, bool disc=false); void var(const std::string& inputFilename, const std::string& outputFilename, int dim, bool disc=false); void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, const std::vector &angle, bool disc=false); template unsigned long int morphology(const Vector2d& input, Vector2d& output, const std::string& method, int dimX, int dimY, bool disc=false, double hThreshold=0); template unsigned long int dsm2dtm_nwse(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim=3); template unsigned long int dsm2dtm_nesw(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim=3); template unsigned long int dsm2dtm_senw(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim=3); template unsigned long int dsm2dtm_swne(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim=3); template void shadowDsm(const Vector2d& input, Vector2d& output, double sza, double saa, double pixelSize, short shadowFlag=1); void shadowDsm(const ImgReaderGdal& input, ImgWriterGdal& output, double sza, double saa, double pixelSize, short shadowFlag=1); void dwt_texture(const std::string& inputFilename, const std::string& outputFilename,int dim, int scale, int down=1, int iband=0, bool verbose=false); void shift(const ImgReaderGdal& input, ImgWriterGdal& output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=BILINEAR, bool verbose=false); template void shift(const Vector2d& input, Vector2d& output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=NEAR, bool verbose=false); void linearFeature(const Vector2d& input, std::vector< Vector2d >& output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, bool verbose=false); void linearFeature(const ImgReaderGdal& input, ImgWriterGdal& output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, int band=0, bool verbose=false); private: static void initMap(std::map& m_filterMap){ //initialize selMap m_filterMap["median"]=filter2d::median; m_filterMap["nvalid"]=filter2d::nvalid; m_filterMap["var"]=filter2d::var; m_filterMap["min"]=filter2d::min; m_filterMap["max"]=filter2d::max; m_filterMap["sum"]=filter2d::sum; m_filterMap["mean"]=filter2d::mean; m_filterMap["minmax"]=filter2d::minmax; m_filterMap["dilate"]=filter2d::dilate; m_filterMap["erode"]=filter2d::erode; m_filterMap["close"]=filter2d::close; m_filterMap["open"]=filter2d::open; m_filterMap["homog"]=filter2d::homog; m_filterMap["sobelx"]=filter2d::sobelx; m_filterMap["sobely"]=filter2d::sobely; m_filterMap["sobelxy"]=filter2d::sobelxy; m_filterMap["sobelyx"]=filter2d::sobelyx; m_filterMap["smooth"]=filter2d::smooth; m_filterMap["density"]=filter2d::density; m_filterMap["mode"]=filter2d::mode; m_filterMap["mixed"]=filter2d::mixed; m_filterMap["smoothnodata"]=filter2d::smoothnodata; m_filterMap["threshold"]=filter2d::threshold; m_filterMap["ismin"]=filter2d::ismin; m_filterMap["ismax"]=filter2d::ismax; m_filterMap["heterog"]=filter2d::heterog; m_filterMap["order"]=filter2d::order; m_filterMap["stdev"]=filter2d::stdev; m_filterMap["mrf"]=filter2d::mrf; m_filterMap["dwt"]=filter2d::dwt; m_filterMap["dwti"]=filter2d::dwti; m_filterMap["dwt_cut"]=filter2d::dwt_cut; m_filterMap["dwt_cut_from"]=filter2d::dwt_cut_from; m_filterMap["scramble"]=filter2d::scramble; m_filterMap["shift"]=filter2d::shift; m_filterMap["linearfeature"]=filter2d::linearfeature; m_filterMap["countid"]=filter2d::countid; m_filterMap["savgolay"]=filter2d::savgolay; m_filterMap["percentile"]=filter2d::percentile; m_filterMap["proportion"]=filter2d::proportion; } Vector2d m_taps; /* double m_noValue; */ std::vector m_class; /* std::vector m_mask; */ std::vector m_noDataValues; std::vector m_threshold; }; template void Filter2d::smooth(const Vector2d& inputVector, Vector2d& outputVector,int dim) { smooth(inputVector,outputVector,dim,dim); } template void Filter2d::smooth(const Vector2d& inputVector, Vector2d& outputVector,int dimX, int dimY) { m_taps.resize(dimY); for(int j=0;j void Filter2d::filter(const Vector2d& inputVector, Vector2d& outputVector) { outputVector.resize(inputVector.size()); int dimX=m_taps[0].size();//horizontal!!! int dimY=m_taps.size();//vertical!!! Vector2d inBuffer(dimY); std::vector outBuffer(inputVector[0].size()); //initialize last half of inBuffer int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ inBuffer[indexJ]=inputVector[abs(j)]; ++indexJ; } for(int y=0;y=0); assert(index=inputVector.nCols()-(dimX-1)/2) indexI=x-abs(i); if(y<(dimY-1)/2) indexJ=(dimY-1)/2+abs(j); else if(y>=inputVector.nRows()-(dimY-1)/2) indexJ=(dimY-1)/2-abs(j); outBuffer[x]+=(m_taps[(dimY-1)/2+j][(dimX-1)/2+i]*inBuffer[indexJ][indexI]); } } } //copy outBuffer to outputVector outputVector[y]=outBuffer; } } template void Filter2d::doit(const Vector2d& inputVector, Vector2d& outputVector, const std::string& method, int dimX, int dimY, short down, bool disc) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); double noDataValue=0; if(m_noDataValues.size()) noDataValue=m_noDataValues[0]; assert(dimX); assert(dimY); statfactory::StatFactory stat; outputVector.resize((inputVector.size()+down-1)/down); Vector2d inBuffer(dimY); std::vector outBuffer((inputVector[0].size()+down-1)/down); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ inBuffer[indexJ]=inputVector[abs(j)]; ++indexJ; } for(int y=0;y=0); assert(index windowBuffer; std::map occurrence; int centre=dimX*(dimY-1)/2+(dimX-1)/2; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=inputVector[0].size()) indexI=inputVector[0].size()-i; if(y+j<0) indexJ=-j; else if(y+j>=inputVector.size()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; bool masked=false; for(int imask=0;imask::const_iterator vit=m_class.begin(); //todo: test if this works (only add occurrence if within defined classes)! if(!m_class.size()) ++occurrence[inBuffer[indexJ][indexI]]; else{ while(vit!=m_class.end()){ if(inBuffer[indexJ][indexI]==*(vit++)) ++occurrence[inBuffer[indexJ][indexI]]; } } windowBuffer.push_back(inBuffer[indexJ][indexI]); } } } switch(getFilterType(method)){ case(filter2d::nvalid): outBuffer[x/down]=stat.nvalid(windowBuffer); break; case(filter2d::median): if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=stat.median(windowBuffer); break; case(filter2d::var):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=stat.var(windowBuffer); break; } case(filter2d::stdev):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=sqrt(stat.var(windowBuffer)); break; } case(filter2d::mean):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=stat.mean(windowBuffer); break; } case(filter2d::min):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=stat.mymin(windowBuffer); break; } case(filter2d::ismin):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=(stat.mymin(windowBuffer)==windowBuffer[centre])? 1:0; break; } case(filter2d::minmax):{ double min=0; double max=0; if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else{ stat.minmax(windowBuffer,windowBuffer.begin(),windowBuffer.end(),min,max); if(min!=max) outBuffer[x/down]=0; else outBuffer[x/down]=windowBuffer[centre];//centre pixels } break; } case(filter2d::max):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=stat.mymax(windowBuffer); break; } case(filter2d::ismax):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else outBuffer[x/down]=(stat.mymax(windowBuffer)==windowBuffer[centre])? 1:0; break; } case(filter2d::order):{ if(windowBuffer.empty()) outBuffer[x/down]=noDataValue; else{ double lbound=0; double ubound=dimX*dimY; double theMin=stat.mymin(windowBuffer); double theMax=stat.mymax(windowBuffer); double scale=(ubound-lbound)/(theMax-theMin); outBuffer[x/down]=static_cast(scale*(windowBuffer[centre]-theMin)+lbound); } break; } case(filter2d::sum):{ outBuffer[x/down]=stat.sum(windowBuffer); break; } case(filter2d::percentile):{ assert(m_threshold.size()); outBuffer[x/down]=stat.percentile(windowBuffer,windowBuffer.begin(),windowBuffer.end(),m_threshold[0]); break; } case(filter2d::proportion):{ assert(m_threshold.size()); double sum=stat.sum(windowBuffer); if(sum) outBuffer[x/down]=windowBuffer[centre]/sum; else outBuffer[x/down]=noDataValue; break; } case(filter2d::homog): if(occurrence.size()==1)//all values in window must be the same outBuffer[x/down]=inBuffer[(dimY-1)/2][x]; else//favorize original value in case of ties outBuffer[x/down]=noDataValue; break; case(filter2d::heterog):{ for(std::vector::const_iterator wit=windowBuffer.begin();wit!=windowBuffer.end();++wit){ if(wit==windowBuffer.begin()+windowBuffer.size()/2) continue; else if(*wit!=inBuffer[(dimY-1)/2][x]) outBuffer[x/down]=1; else if(*wit==inBuffer[(dimY-1)/2][x]){//todo:wit mag niet central pixel zijn outBuffer[x/down]=noDataValue; break; } } break; } case(filter2d::density):{ if(windowBuffer.size()){ std::vector::const_iterator vit=m_class.begin(); while(vit!=m_class.end()) outBuffer[x/down]+=100.0*occurrence[*(vit++)]/windowBuffer.size(); } else outBuffer[x/down]=noDataValue; break; } case(filter2d::countid):{ if(windowBuffer.size()) outBuffer[x/down]=occurrence.size(); else outBuffer[x/down]=noDataValue; break; } case(filter2d::mode):{ if(occurrence.size()){ std::map::const_iterator maxit=occurrence.begin(); for(std::map::const_iterator mit=occurrence.begin();mit!=occurrence.end();++mit){ if(mit->second>maxit->second) maxit=mit; } if(occurrence[inBuffer[(dimY-1)/2][x]]second)// outBuffer[x/down]=maxit->first; else//favorize original value in case of ties outBuffer[x/down]=inBuffer[(dimY-1)/2][x]; } else outBuffer[x/down]=noDataValue; break; } case(filter2d::threshold):{ assert(m_class.size()==m_threshold.size()); if(windowBuffer.size()){ outBuffer[x/down]=inBuffer[(dimY-1)/2][x];//initialize with original value (in case thresholds not met) for(int iclass=0;iclassm_threshold[iclass]) outBuffer[x/down]=m_class[iclass]; } } else outBuffer[x/down]=noDataValue; break; } case(filter2d::scramble):{//could be done more efficiently window by window with random shuffling entire buffer and assigning entire buffer at once to output image... if(windowBuffer.size()){ int randomIndex=std::rand()%windowBuffer.size(); if(randomIndex>=windowBuffer.size()) outBuffer[x/down]=windowBuffer.back(); else if(randomIndex<0) outBuffer[x/down]=windowBuffer[0]; else outBuffer[x/down]=windowBuffer[randomIndex]; } else outBuffer[x/down]=noDataValue; break; } case(filter2d::mixed):{ enum MixType { BF=11, CF=12, MF=13, NF=20, W=30 }; double nBF=occurrence[BF]; double nCF=occurrence[CF]; double nMF=occurrence[MF]; double nNF=occurrence[NF]; double nW=occurrence[W]; if(windowBuffer.size()){ if((nBF+nCF+nMF)&&(nBF+nCF+nMF>=nNF+nW)){//forest if(nBF/(nBF+nCF)>=0.75) outBuffer[x/down]=BF; else if(nCF/(nBF+nCF)>=0.75) outBuffer[x/down]=CF; else outBuffer[x/down]=MF; } else{//non-forest if(nW&&(nW>=nNF)) outBuffer[x/down]=W; else outBuffer[x/down]=NF; } } else outBuffer[x/down]=inBuffer[indexJ][indexI]; break; } default: break; } } progress=(1.0+y/down); progress+=(outputVector.size()); progress/=outputVector.size(); pfnProgress(progress,pszMessage,pProgressArg); //copy outBuffer to outputVector outputVector[y/down]=outBuffer; } } // class Compare_mapValue{ // public: // int operator() (const map::value_type& v1, const map::value_type& v2) const{ // return (v1.second)>(v2.second); // } // }; template void Filter2d::shift(const Vector2d& input, Vector2d& output, double offsetX, double offsetY, double randomSigma, RESAMPLE resample, bool verbose){ output.resize(input.nRows(),input.nCols()); const gsl_rng_type *rangenType; gsl_rng *rangen; gsl_rng_env_setup(); rangenType=gsl_rng_default; rangen=gsl_rng_alloc(rangenType); long seed=time(NULL)*getpid(); gsl_rng_set(rangen,seed); const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); for(int j=0;j0){ randomX=gsl_ran_gaussian(rangen,randomSigma); randomY=gsl_ran_gaussian(rangen,randomSigma); } double readCol=i+offsetX+randomX; double readRow=j+offsetY+randomY; if(readRow<0) readRow=0; if(readRow>input.nRows()-1) readRow=input.nRows()-1; if(readCol<0) readCol=0; if(readCol>input.nCols()-1) readCol=input.nCols()-1; switch(resample){ case(BILINEAR):{ double lowerRow=readRow-0.5; double upperRow=readRow+0.5; lowerRow=static_cast(lowerRow); upperRow=static_cast(upperRow); double lowerCol=readCol-0.5; double upperCol=readCol+0.5; lowerCol=static_cast(lowerCol); upperCol=static_cast(upperCol); assert(lowerRow>=0); assert(lowerRow=0); assert(lowerCol=0); assert(upperRow=0); if(upperCol>=input.nCols()){ std::cout << "upperCol: " << upperCol << std::endl; std::cout << "readCol: " << readCol << std::endl; std::cout << "readCol+0.5: " << readCol+0.5 << std::endl; std::cout << "static_cast(readCol+0.5): " << static_cast(readCol+0.5) << std::endl; } assert(upperCol(readRow)][static_cast(readCol)]; break; } assert(j>=0); assert(j=0); assert(i unsigned long int Filter2d::morphology(const Vector2d& input, Vector2d& output, const std::string& method, int dimX, int dimY, bool disc, double hThreshold) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); double noDataValue=0; if(m_noDataValues.size()) noDataValue=m_noDataValues[0]; unsigned long int nchange=0; assert(dimX); assert(dimY); statfactory::StatFactory stat; Vector2d inBuffer(dimY,input.nCols()); output.clear(); output.resize(input.nRows(),input.nCols()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=0;i=0); assert(index statBuffer; bool currentMasked=false; for(int imask=0;imask(dimX/2)*(dimY/2))) continue; indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=input.nCols()) indexI=input.nCols()-i; if(y+j<0) indexJ=-j; else if(y+j>=input.nRows()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; if(inBuffer[indexJ][indexI]==noDataValue) continue; bool masked=false; for(int imask=0;imaskstat.mymin(statBuffer)+hThreshold){ output[y][x]=stat.mymin(statBuffer); ++nchange; } break; default: std::ostringstream ess; ess << "Error: morphology method " << method << " not supported, choose " << filter2d::dilate << " (dilate) or " << filter2d::erode << " (erode)" << std::endl; throw(ess.str()); break; } if(output[y][x]&&m_class.size()) output[y][x]=m_class[0]; // else{ // assert(m_noDataValues.size()); // output[x]=m_noDataValues[0]; // } } else output[y][x]=noDataValue; } } progress=(1.0+y); progress/=output.nRows(); pfnProgress(progress,pszMessage,pProgressArg); } return nchange; } template unsigned long int Filter2d::dsm2dtm_nwse(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); Vector2d tmpDSM(inputDSM); double noDataValue=0; if(m_noDataValues.size()) noDataValue=m_noDataValues[0]; unsigned long int nchange=0; int dimX=dim; int dimY=dim; assert(dimX); assert(dimY); statfactory::StatFactory stat; Vector2d inBuffer(dimY,inputDSM.nCols()); if(outputMask.size()!=inputDSM.nRows()) outputMask.resize(inputDSM.nRows()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=0;i=0); assert(index neighbors; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=tmpDSM.nCols()) indexI=tmpDSM.nCols()-i; if(y+j<0) indexJ=-j; else if(y+j>=tmpDSM.nRows()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; double difference=(centerValue-inBuffer[indexJ][indexI]); if(i||j)//skip centerValue neighbors.push_back(inBuffer[indexJ][indexI]); if(difference>hThreshold) ++nmasked; } } if(nmasked<=nlimit){ ++nchange; //reset pixel in outputMask outputMask[y][x]=0; } else{ //reset pixel height in tmpDSM sort(neighbors.begin(),neighbors.end()); assert(neighbors.size()>1); inBuffer[(dimY-1)/2][x]=neighbors[1]; /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */ } } progress=(1.0+y); progress/=outputMask.nRows(); pfnProgress(progress,pszMessage,pProgressArg); } return nchange; } template unsigned long int Filter2d::dsm2dtm_nesw(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); Vector2d tmpDSM(inputDSM); double noDataValue=0; if(m_noDataValues.size()) noDataValue=m_noDataValues[0]; unsigned long int nchange=0; int dimX=dim; int dimY=dim; assert(dimX); assert(dimY); statfactory::StatFactory stat; Vector2d inBuffer(dimY,inputDSM.nCols()); if(outputMask.size()!=inputDSM.nRows()) outputMask.resize(inputDSM.nRows()); int indexI=0; int indexJ=0; //initialize last half of inBuffer for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=0;i=0); assert(index=0;--x){ double centerValue=inBuffer[(dimY-1)/2][x]; short nmasked=0; std::vector neighbors; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=tmpDSM.nCols()) indexI=tmpDSM.nCols()-i; if(y+j<0) indexJ=-j; else if(y+j>=tmpDSM.nRows()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; double difference=(centerValue-inBuffer[indexJ][indexI]); if(i||j)//skip centerValue neighbors.push_back(inBuffer[indexJ][indexI]); if(difference>hThreshold) ++nmasked; } } if(nmasked<=nlimit){ ++nchange; //reset pixel in outputMask outputMask[y][x]=0; } else{ //reset pixel height in tmpDSM sort(neighbors.begin(),neighbors.end()); assert(neighbors.size()>1); inBuffer[(dimY-1)/2][x]=neighbors[1]; /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */ } } progress=(1.0+y); progress/=outputMask.nRows(); pfnProgress(progress,pszMessage,pProgressArg); } return nchange; } template unsigned long int Filter2d::dsm2dtm_senw(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); Vector2d tmpDSM(inputDSM); double noDataValue=0; if(m_noDataValues.size()) noDataValue=m_noDataValues[0]; unsigned long int nchange=0; int dimX=dim; int dimY=dim; assert(dimX); assert(dimY); statfactory::StatFactory stat; Vector2d inBuffer(dimY,inputDSM.nCols()); if(outputMask.size()!=inputDSM.nRows()) outputMask.resize(inputDSM.nRows()); int indexI=0; int indexJ=inputDSM.nRows()-1; //initialize first half of inBuffer for(int j=inputDSM.nRows()-dimY/2;j=0;--y){ if(y0){ //allocate buffer inBuffer.insert(inBuffer.begin(),inBuffer.back()); for(int i=0;i=0;--x){ double centerValue=inBuffer[(dimY-1)/2][x]; short nmasked=0; std::vector neighbors; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=tmpDSM.nCols()) indexI=tmpDSM.nCols()-i; if(y+j<0) indexJ=-j; else if(y+j>=tmpDSM.nRows()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; double difference=(centerValue-inBuffer[indexJ][indexI]); if(i||j)//skip centerValue neighbors.push_back(inBuffer[indexJ][indexI]); if(difference>hThreshold) ++nmasked; } } if(nmasked<=nlimit){ ++nchange; //reset pixel in outputMask outputMask[y][x]=0; } else{ //reset pixel height in tmpDSM sort(neighbors.begin(),neighbors.end()); assert(neighbors.size()>1); inBuffer[(dimY-1)/2][x]=neighbors[1]; /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */ } } progress=(1.0+y); progress/=outputMask.nRows(); pfnProgress(progress,pszMessage,pProgressArg); } return nchange; } template unsigned long int Filter2d::dsm2dtm_swne(const Vector2d& inputDSM, Vector2d& outputMask, double hThreshold, int nlimit, int dim) { const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); Vector2d tmpDSM(inputDSM); double noDataValue=0; if(m_noDataValues.size()) noDataValue=m_noDataValues[0]; unsigned long int nchange=0; int dimX=dim; int dimY=dim; assert(dimX); assert(dimY); statfactory::StatFactory stat; Vector2d inBuffer(dimY,inputDSM.nCols()); if(outputMask.size()!=inputDSM.nRows()) outputMask.resize(inputDSM.nRows()); int indexI=0; int indexJ=0; //initialize first half of inBuffer for(int j=inputDSM.nRows()-dimY/2;j=0;--y){ if(y0){ //allocate buffer inBuffer.insert(inBuffer.begin(),inBuffer.back()); for(int i=0;i neighbors; for(int j=-(dimY-1)/2;j<=dimY/2;++j){ for(int i=-(dimX-1)/2;i<=dimX/2;++i){ indexI=x+i; //check if out of bounds if(indexI<0) indexI=-indexI; else if(indexI>=tmpDSM.nCols()) indexI=tmpDSM.nCols()-i; if(y+j<0) indexJ=-j; else if(y+j>=tmpDSM.nRows()) indexJ=(dimY>2) ? (dimY-1)/2-j : 0; else indexJ=(dimY-1)/2+j; double difference=(centerValue-inBuffer[indexJ][indexI]); if(i||j)//skip centerValue neighbors.push_back(inBuffer[indexJ][indexI]); if(difference>hThreshold) ++nmasked; } } if(nmasked<=nlimit){ ++nchange; //reset pixel in outputMask outputMask[y][x]=0; } else{ //reset pixel height in tmpDSM sort(neighbors.begin(),neighbors.end()); assert(neighbors.size()>1); inBuffer[(dimY-1)/2][x]=neighbors[1]; /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */ } } progress=(1.0+y); progress/=outputMask.nRows(); pfnProgress(progress,pszMessage,pProgressArg); } return nchange; } template void Filter2d::shadowDsm(const Vector2d& input, Vector2d& output, double sza, double saa, double pixelSize, short shadowFlag) { unsigned int ncols=input.nCols(); output.clear(); output.resize(input.nRows(),ncols); //do we need to initialize output? // for(int y=0;y(sqrt((currentValue*tan(DEG2RAD(sza))/pixelSize)*(currentValue*tan(DEG2RAD(sza))/pixelSize)));//in pixels double theDir=DEG2RAD(saa)+PI/2.0; if(theDir<0) theDir+=2*PI; for(int d=0;d=input.size()) continue; if(indexI<0||indexI>=input[indexJ].size()) continue; if(input[indexJ][indexI] void Filter2d::dwtForward(Vector2d& theBuffer, const std::string& wavelet_type, int family){ const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); int nRow=theBuffer.size(); assert(nRow); int nCol=theBuffer[0].size(); assert(nCol); //make sure data size if power of 2 while(theBuffer.size()&(theBuffer.size()-1)) theBuffer.push_back(theBuffer.back()); for(int irow=0;irow vdata(theBuffer.size()*theBuffer[0].size()); double* data=&(vdata[0]); for(int irow=0;irow void Filter2d::dwtInverse(Vector2d& theBuffer, const std::string& wavelet_type, int family){ const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); int nRow=theBuffer.size(); assert(nRow); int nCol=theBuffer[0].size(); assert(nCol); //make sure data size if power of 2 while(theBuffer.size()&(theBuffer.size()-1)) theBuffer.push_back(theBuffer.back()); for(int irow=0;irow vdata(theBuffer.size()*theBuffer[0].size()); double* data=&(vdata[0]); //double data[theBuffer.size()*theBuffer[0].size()]; for(int irow=0;irow void Filter2d::dwtCut(Vector2d& theBuffer, const std::string& wavelet_type, int family, double cut){ const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); int nRow=theBuffer.size(); assert(nRow); int nCol=theBuffer[0].size(); assert(nCol); //make sure data size if power of 2 while(theBuffer.size()&(theBuffer.size()-1)) theBuffer.push_back(theBuffer.back()); for(int irow=0;irow. ***********************************************************************/ #include "ConfusionMatrix.h" #include #include using namespace confusionmatrix; bool compareClass(const std::string& string1, const std::string& string2){ int int1=string2type(string1); int int2=string2type(string2); return(int1& classNames){ setClassNames(classNames); } //copy constructor ConfusionMatrix::ConfusionMatrix(const ConfusionMatrix& cm){ setClassNames(cm.m_classes); setResults(cm.m_results); } //assignment operator ConfusionMatrix& ConfusionMatrix::operator=(const ConfusionMatrix& cm){ //check for self-assignment by comparing the address of the implicit object and parameter if(this==&cm) return *this; else{ setClassNames(cm.m_classes); setResults(cm.m_results); } return *this; } ConfusionMatrix& ConfusionMatrix::operator+=(const ConfusionMatrix &cm) { if(cm.m_classes.size()!=this->m_classes.size()){ std::cerr << "error0: "<< cm.m_classes.size() << "!=" << this->m_classes.size() << std::endl; exit(0); } if(cm.m_results.size()!=this->m_results.size()){ std::cerr << "error1: "<< cm.m_results.size() << "!=" << this->m_results.size() << std::endl; exit(1); } for(int irow=0;irowm_results[irow].size()){ std::cerr << "error2: " << cm.m_results[irow].size() << "!=" << this->m_results[irow].size() << std::endl; exit(2); } for(int icol=0;icolm_results[irow][icol]+=cm.m_results[irow][icol]; } return *this; } ConfusionMatrix& ConfusionMatrix::operator*=(double weight) { for(int irow=0;irow& classNames, bool doSort){ m_classes=classNames; if(doSort) sortClassNames(); if(m_results.size()!=m_classes.size()) m_results.resize(m_classes.size(),m_classes.size()); } void ConfusionMatrix::pushBackClassName(const std::string& className, bool doSort){ m_classes.push_back(className); if(doSort) sortClassNames(); if(m_results.size()!=m_classes.size()) m_results.resize(m_classes.size(),m_classes.size()); } void ConfusionMatrix::setResults(const Vector2d& theResults){ m_results=theResults; } void ConfusionMatrix::clearResults(){ m_results.clear(); m_results.resize(m_classes.size(),m_classes.size()); } 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); // assert(ir=0); // assert(ic=0); if(ir>=m_results.size()) std::cerr << "Error: " << theRef << " not found in class ConfusionMatrix when incrementing for class " << theClass << std::endl; assert(ir=0); assert(ic=0); assert(ir0)? static_cast(m_results[ir][ir])/producer : 0; double dqa=1.0-dpa; if(se95!=NULL) *se95=(dpa<1&&dpa>0)? sqrt(dpa*dqa/(producer-1)) : 0; return dpa; } int ConfusionMatrix::pa_pct(const std::string& theClass, double* se95) const{ double dpa=pa(theClass,se95); if(se95!=NULL) *se95=static_cast(static_cast(0.5+1000*(*se95)))/10.0; return static_cast(0.5+100.0*dpa); } double ConfusionMatrix::ua(const std::string& theClass, double* se95) const{ assert(m_results.size()); assert(m_results.size()==m_classes.size()); double user=0; // int ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass)); int ic=getClassIndex(theClass); assert(ic>=0); assert(ic0)? static_cast(m_results[ic][ic])/user : 0; double dva=1.0-dva; if(se95!=NULL) *se95=(dua<1&&dua>0)? sqrt(dua*dva/(user-1)) : 0; return dua; } int ConfusionMatrix::ua_pct(const std::string& theClass,double* se95) const{ double dua=ua(theClass,se95); if(se95!=NULL) *se95=static_cast(static_cast(0.5+1000*(*se95)))/10.0; return static_cast(0.5+100.0*dua); } double ConfusionMatrix::oa(double* se95) const{ double ntotal=m_results.sum(); double pChance=0; double pCorrect=0; for(int iclass=0;iclass(m_results[iclass][iclass])/ntotal; double qCorrect=1-pCorrect; if(se95!=NULL) *se95=(pCorrect<1&&pCorrect>0)? sqrt(pCorrect*qCorrect/(ntotal-1)) : 0; if(ntotal>0) return(pCorrect); else return(0); } int ConfusionMatrix::oa_pct(double* se95) const{ double doa=oa(se95); if(se95!=NULL) *se95=static_cast(static_cast(0.5+1000*(*se95)))/10.0; return static_cast(0.5+100.0*doa); } double ConfusionMatrix::kappa() const{ double ntotal=m_results.sum(); double pChance=0; double pCorrect=0; for(int iclass=0;iclass(m_results[iclass][iclass])/ntotal; } if(pChance<1) return((pCorrect-pChance)/(1-pChance)); else return(0); } pktools-2.6.6/src/algorithms/StatFactory.h0000644000113200011300000014553212631570442015515 00000000000000/********************************************************************** StatFactory.h: class for statistical operations on vectors 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 _STATFACTORY_H_ #define _STATFACTORY_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace statfactory { class StatFactory{ public: enum INTERPOLATION_TYPE {undefined=0,linear=1,polynomial=2,cspline=3,cspline_periodic=4,akima=5,akima_periodic=6}; //todo: expand with other distributions as in http://www.gnu.org/software/gsl/manual/gsl-ref_toc.html#TOC320 enum DISTRIBUTION_TYPE {uniform=1,gaussian=2}; StatFactory(void){}; virtual ~StatFactory(void){}; INTERPOLATION_TYPE getInterpolationType(const std::string interpolationType){ std::map m_interpMap; initMap(m_interpMap); return m_interpMap[interpolationType]; }; DISTRIBUTION_TYPE getDistributionType(const std::string distributionType){ std::map m_distMap; initDist(m_distMap); return m_distMap[distributionType]; }; static void allocAcc(gsl_interp_accel *&acc){ acc = gsl_interp_accel_alloc (); }; static void getSpline(const std::string type, int size, gsl_spline *& spline){ std::map m_interpMap; initMap(m_interpMap); switch(m_interpMap[type]){ case(polynomial): spline=gsl_spline_alloc(gsl_interp_polynomial,size); break; case(cspline): spline=gsl_spline_alloc(gsl_interp_cspline,size); break; case(cspline_periodic): spline=gsl_spline_alloc(gsl_interp_cspline_periodic,size); break; case(akima): spline=gsl_spline_alloc(gsl_interp_akima,size); break; case(akima_periodic): spline=gsl_spline_alloc(gsl_interp_akima_periodic,size); break; case(linear): default: spline=gsl_spline_alloc(gsl_interp_linear,size); break; } assert(spline); }; static int initSpline(gsl_spline *spline, const double *x, const double *y, int size){ return gsl_spline_init (spline, x, y, size); }; static double evalSpline(gsl_spline *spline, double x, gsl_interp_accel *acc){ return gsl_spline_eval (spline, x, acc); }; static gsl_rng* getRandomGenerator(unsigned long int theSeed){ const gsl_rng_type * T; gsl_rng * r; // select random number generator r = gsl_rng_alloc (gsl_rng_mt19937); gsl_rng_set(r,theSeed); return r; } void getNodataValues(std::vector& nodatav) const{nodatav=m_noDataValues;}; bool isNoData(double value) const{ if(m_noDataValues.empty()) return false; else return find(m_noDataValues.begin(),m_noDataValues.end(),value)!=m_noDataValues.end(); }; unsigned int pushNodDataValue(double noDataValue){ if(find(m_noDataValues.begin(),m_noDataValues.end(),noDataValue)==m_noDataValues.end()) m_noDataValues.push_back(noDataValue); return m_noDataValues.size(); }; unsigned int setNoDataValues(std::vector vnodata){ m_noDataValues=vnodata; return m_noDataValues.size(); }; double getRandomValue(const gsl_rng* r, const std::string type, double a=0, double b=1) const{ std::map m_distMap; initDist(m_distMap); double randValue=0; switch(m_distMap[type]){ case(uniform): randValue = a+gsl_rng_uniform(r); break; case(gaussian): default: randValue = a+gsl_ran_gaussian(r, b); break; } return randValue; }; template T mymin(const typename std::vector& v) const; template T mymax(const typename std::vector& v) const; template T mymin(const typename std::vector& v, T minConstraint) const; template T mymax(const typename std::vector& v, T maxConstraint) const; // template typename std::vector::const_iterator mymax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const; template typename std::vector::const_iterator mymin(const typename std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const; template typename std::vector::iterator mymin(const typename std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end) const; template typename std::vector::const_iterator mymin(const typename std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, T minConstraint) const; template typename std::vector::iterator mymin(const typename std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end, T minConstraint) const; template typename std::vector::const_iterator mymax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const; template typename std::vector::iterator mymax(const std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end) const; template typename std::vector::const_iterator mymax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, T maxConstraint) const; template typename std::vector::iterator mymax(const std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end, T maxConstraint) const; template typename std::vector::const_iterator absmin(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const; template typename std::vector::const_iterator absmax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const; template void minmax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, T& theMin, T& theMax) const; template T sum(const std::vector& v) const; template double mean(const std::vector& v) const; template void eraseNoData(std::vector& v) const; template unsigned int nvalid(const std::vector& v) const; template T median(const std::vector& v) const; template double var(const std::vector& v) const; template double moment(const std::vector& v, int n) const; template double cmoment(const std::vector& v, int n) const; template double skewness(const std::vector& v) const; template double kurtosis(const std::vector& v) const; template void meanVar(const std::vector& v, double& m1, double& v1) const; template void scale2byte(const std::vector& input, std::vector& output, unsigned char lbound=0, unsigned char ubound=255) const; template void distribution(const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, std::vector& output, int nbin, T &minimum, T &maximum, double sigma=0, const std::string &filename="") const; template void distribution(const std::vector& input, std::vector& output, int nbin, double sigma=0, const std::string &filename="") const{distribution(input,input.begin(),input.end(),output,nbin,0,0,sigma,filename);}; template void distribution2d(const std::vector& inputX, const std::vector& inputY, std::vector< std::vector >& output, int nbin, T& minX, T& maxX, T& minY, T& maxY, double sigma=0, const std::string& filename="") const; template void cumulative (const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, std::vector& output, int nbin, T &minimum, T &maximum) const; template void percentiles (const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, std::vector& output, int nbin, T &minimum, T &maximum, const std::string &filename="") const; template T percentile(const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, double percent, T minimum=0, T maximum=0) const; template void signature(const std::vector& input, double& k, double& alpha, double& beta, double e) const; void signature(double m1, double m2, double& k, double& alpha, double& beta, double e) const; template void normalize(const std::vector& input, std::vector& output) const; template void normalize_pct(std::vector& input) const; template double rmse(const std::vector& x, const std::vector& y) const; template double nrmse(const std::vector& x, const std::vector& y) const; template double cvrmse(const std::vector& x, const std::vector& y) const; template double correlation(const std::vector& x, const std::vector& y, int delay=0) const; // template double gsl_correlation(const std::vector& x, const std::vector& y) const; template double gsl_covariance(const std::vector& x, const std::vector& y) const; template double cross_correlation(const std::vector& x, const std::vector& y, int maxdelay, std::vector& z) const; template double linear_regression(const std::vector& x, const std::vector& y, double &c0, double &c1) const; template double linear_regression_err(const std::vector& x, const std::vector& y, double &c0, double &c1) const; template void interpolateNoData(const std::vector& wavelengthIn, const std::vector& input, const std::string& type, std::vector& output, bool verbose=false) const; template void interpolateUp(const std::vector& wavelengthIn, const std::vector& input, const std::vector& wavelengthOut, const std::string& type, std::vector& output, bool verbose=false) const; template void interpolateUp(const std::vector& wavelengthIn, const std::vector< std::vector >& input, const std::vector& wavelengthOut, const std::string& type, std::vector< std::vector >& output, bool verbose=false) const; // template void interpolateUp(const std::vector< std::vector >& input, std::vector< std::vector >& output, double start, double end, double step, const gsl_interp_type* type); // template void interpolateUp(const std::vector< std::vector >& input, const std::vector& wavelengthIn, std::vector< std::vector >& output, std::vector& wavelengthOut, double start, double end, double step, const gsl_interp_type* type); template void interpolateUp(const std::vector& input, std::vector& output, int nbin) const; template void nearUp(const std::vector& input, std::vector& output) const; template void interpolateUp(double* input, int dim, std::vector& output, int nbin); template void interpolateDown(const std::vector& input, std::vector& output, int nbin) const; template void interpolateDown(double* input, int dim, std::vector& output, int nbin); private: static void initMap(std::map& m_interpMap){ //initialize selMap m_interpMap["linear"]=linear; m_interpMap["polynomial"]=polynomial; m_interpMap["cspline"]=cspline; m_interpMap["cspline_periodic"]=cspline_periodic; m_interpMap["akima"]=akima; m_interpMap["akima_periodic"]=akima_periodic; } static void initDist(std::map& m_distMap){ //initialize distMap m_distMap["gaussian"]=gaussian; m_distMap["uniform"]=uniform; } std::vector m_noDataValues; }; template inline typename std::vector::const_iterator StatFactory::mymin(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const { bool isValid=false; typename std::vector::const_iterator tmpIt; for(typename std::vector::const_iterator it = begin; it!=end; ++it){ if(!isNoData(*it)){ if(isValid){ if(*tmpIt>*it) tmpIt=it; } else{ tmpIt=it; isValid=true; } } } if(isValid) return tmpIt; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline typename std::vector::iterator StatFactory::mymin(const std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end) const { bool isValid=false; typename std::vector::iterator tmpIt; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(!isNoData(*it)){ if(isValid){ if(*tmpIt>*it) tmpIt=it; } else{ tmpIt=it; isValid=true; } } } if(isValid) return tmpIt; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline typename std::vector::const_iterator StatFactory::mymin(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, T minConstraint) const { bool isValid=false; typename std::vector::const_iterator tmpIt; T minValue=minConstraint; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if((minConstraint<=*it)&&(*it inline typename std::vector::iterator StatFactory::mymin(const std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end, T minConstraint) const { bool isValid=false; typename std::vector::iterator tmpIt; T minValue=minConstraint; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if((minConstraint<=*it)&&(*it inline typename std::vector::const_iterator StatFactory::mymax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const { bool isValid=false; typename std::vector::const_iterator tmpIt; for (typename std::vector::iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if(*tmpIt<*it) tmpIt=it; } else{ tmpIt=it; isValid=true; } } if(isValid) return tmpIt; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline typename std::vector::iterator StatFactory::mymax(const std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end) const { bool isValid=false; typename std::vector::iterator tmpIt; for (typename std::vector::iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if(*tmpIt<*it) tmpIt=it; } else{ tmpIt=it; isValid=true; } } if(isValid) return tmpIt; else return end; } template inline typename std::vector::const_iterator StatFactory::mymax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, T maxConstraint) const { bool isValid=false; typename std::vector::const_iterator tmpIt; T maxValue=maxConstraint; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if((maxConstraint>=*it)&&(*it>maxValue)){ tmpIt=it; maxValue=*it; } } else{ if(*it>maxConstraint) continue; tmpIt=it; maxValue=*it; isValid=true; } } if(isValid) return tmpIt; else return end; } template inline typename std::vector::iterator StatFactory::mymax(const std::vector& v, typename std::vector::iterator begin, typename std::vector::iterator end, T maxConstraint) const { bool isValid=false; typename std::vector::iterator tmpIt=v.end(); T maxValue=maxConstraint; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if((maxConstraint>=*it)&&(*it>maxValue)){ tmpIt=it; maxValue=*it; } } else{ if(*it>maxValue) continue; tmpIt=it; maxValue=*it; isValid=true; } } if(isValid) return tmpIt; else return end; } template inline T StatFactory::mymin(const std::vector& v) const { bool isValid=false; if(v.empty()){ std::string errorString="Error: vector is empty"; throw(errorString); } T minValue; for (typename std::vector::const_iterator it = v.begin(); it!=v.end(); ++it){ if(isNoData(*it)) continue; if(isValid){ if(minValue>*it) minValue=*it; } else{ minValue=*it; isValid=true; } } if(isValid) return minValue; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline T StatFactory::mymin(const std::vector& v, T minConstraint) const { bool isValid=false; T minValue=minConstraint; for (typename std::vector::const_iterator it = v.begin(); it!=v.end(); ++it){ if(isNoData(*it)) continue; if(isValid){ if((minConstraint<=*it)&&(*it inline T StatFactory::mymax(const std::vector& v) const { bool isValid=false; if(v.empty()){ std::string errorString="Error: vector is empty"; throw(errorString); } T maxValue; for (typename std::vector::const_iterator it = v.begin(); it!=v.end(); ++it){ if(isNoData(*it)) continue; if(isValid){ if(maxValue<*it) maxValue=*it; } else{ maxValue=*it; isValid=true; } } if(isValid) return maxValue; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline T StatFactory::mymax(const std::vector& v, T maxConstraint) const { bool isValid=false; T maxValue=maxConstraint; for (typename std::vector::const_iterator it = v.begin(); it!=v.end(); ++it){ if(isNoData(*it)) continue; if(isValid){ if((*it<=maxConstraint)&&(*it>maxValue)) maxValue=*it; } else{ if(*it>maxValue) continue; maxValue=*it; isValid=true; } } if(isValid) return maxValue; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline typename std::vector::const_iterator StatFactory::absmax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const { bool isValid=false; typename std::vector::const_iterator tmpIt; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if(abs(*tmpIt) inline typename std::vector::const_iterator StatFactory::absmin(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end) const { bool isValid=false; typename std::vector::const_iterator tmpIt; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if(abs(*tmpIt)>abs(*it)) tmpIt=it; } else{ tmpIt=it; isValid=true; } } if(isValid) return tmpIt; else return end; } template inline void StatFactory::minmax(const std::vector& v, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, T& theMin, T& theMax) const { bool isConstraint=(theMax>theMin); double minConstraint=theMin; double maxConstraint=theMax; bool isValid=false; for (typename std::vector::const_iterator it = begin; it!=end; ++it){ if(isNoData(*it)) continue; if(isValid){ if(isConstraint){ if(*itmaxConstraint) continue; } if(*ittheMax) theMax=*it; } else{ if(isConstraint){ if(*itmaxConstraint) continue; } theMin=*it; theMax=*it; isValid=true; } } if(!isValid){ if(m_noDataValues.size()){ theMin=m_noDataValues[0]; theMax=m_noDataValues[0]; } else{ std::string errorString="Error: no valid data found"; throw(errorString); } } } template inline T StatFactory::sum(const std::vector& v) const { bool isValid=false; typename std::vector::const_iterator it; T tmpSum=0; for (it = v.begin(); it!= v.end(); ++it){ if(isNoData(*it)) continue; isValid=true; tmpSum+=*it; } if(isValid) return tmpSum; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline double StatFactory::mean(const std::vector& v) const { typename std::vector::const_iterator it; T tmpSum=0; unsigned int validSize=0; for (it = v.begin(); it!= v.end(); ++it){ if(isNoData(*it)) continue; ++validSize; tmpSum+=*it; } if(validSize) return static_cast(tmpSum)/validSize; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template inline void StatFactory::eraseNoData(std::vector& v) const { if(m_noDataValues.size()){ typename std::vector::iterator it=v.begin(); while(it!=v.end()){ if(isNoData(*it)) v.erase(it); else ++it; } } } template unsigned int StatFactory::nvalid(const std::vector& v) const{ std::vector tmpV=v; eraseNoData(tmpV); return(tmpV.size()); } template T StatFactory::median(const std::vector& v) const { std::vector tmpV=v; eraseNoData(tmpV); if(tmpV.size()){ sort(tmpV.begin(),tmpV.end()); if(tmpV.size()%2) return tmpV[tmpV.size()/2]; else return 0.5*(tmpV[tmpV.size()/2-1]+tmpV[tmpV.size()/2]); } else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template double StatFactory::var(const std::vector& v) const { typename std::vector::const_iterator it; unsigned int validSize=0; double m1=0; double m2=0; for (it = v.begin(); it!= v.end(); ++it){ if(isNoData(*it)) continue; m1+=*it; m2+=(*it)*(*it); ++validSize; } if(validSize){ m2/=validSize; m1/=validSize; return m2-m1*m1; } else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template double StatFactory::moment(const std::vector& v, int n) const { unsigned int validSize=0; typename std::vector::const_iterator it; double m=0; // double m1=mean(v); for(it = v.begin(); it!= v.end(); ++it){ if(isNoData(*it)) continue; m+=pow((*it),n); ++validSize; } if(validSize) return m/validSize; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } //central moment template double StatFactory::cmoment(const std::vector& v, int n) const { unsigned int validSize=0; typename std::vector::const_iterator it; double m=0; double m1=mean(v); for(it = v.begin(); it!= v.end(); ++it){ if(isNoData(*it)) continue; m+=pow((*it-m1),n); ++validSize; } if(validSize) return m/validSize; else if(m_noDataValues.size()) return m_noDataValues[0]; else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template double StatFactory::skewness(const std::vector& v) const { //todo: what if nodata value? return cmoment(v,3)/pow(var(v),1.5); } template double StatFactory::kurtosis(const std::vector& v) const { //todo: what if nodata value? double m2=cmoment(v,2); double m4=cmoment(v,4); return m4/m2/m2-3.0; } template void StatFactory::meanVar(const std::vector& v, double& m1, double& v1) const { typename std::vector::const_iterator it; unsigned int validSize=0; m1=0; v1=0; double m2=0; for (it = v.begin(); it!= v.end(); ++it){ if(isNoData(*it)) continue; m1+=*it; m2+=(*it)*(*it); ++validSize; } if(validSize){ m2/=validSize; m1/=validSize; v1=m2-m1*m1; } else if(m_noDataValues.size()){ m1=m_noDataValues[0]; v1=m_noDataValues[0]; } else{ std::string errorString="Error: no valid data found"; throw(errorString); } } template void StatFactory::scale2byte(const std::vector& input, std::vector& output, unsigned char lbound, unsigned char ubound) const { output.resize(input.size()); T1 minimum=mymin(input); T1 maximum=mymax(input); if(minimum>=maximum){ std::string errorString="Error: no valid data found"; throw(errorString); } double scale=(ubound-lbound)/(maximum-minimum); //todo: what if nodata value? for (int i=0;i void StatFactory::distribution(const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, std::vector& output, int nbin, T &minimum, T &maximum, double sigma, const std::string &filename) const { double minValue=0; double maxValue=0; minmax(input,begin,end,minimum,maximum); if(minimumminValue) minValue=minimum; if(minimum=max)"; throw(s.str()); } if(!nbin){ std::string errorString="Error: nbin not defined"; throw(errorString); } if(!input.size()){ std::string errorString="Error: no valid data found"; throw(errorString); } if(output.size()!=nbin){ output.resize(nbin); for(int i=0;i::const_iterator it; for(it=begin;it!=end;++it){ if(*itmaximum) continue; if(isNoData(*it)) continue; isValid=true; if(sigma>0){ // minimum-=2*sigma; // maximum+=2*sigma; //create kde for Gaussian basis function //todo: speed up by calculating first and last bin with non-zero contriubtion... //todo: calculate real surface below pdf by using gsl_cdf_gaussian_P(x-mean+binsize,sigma)-gsl_cdf_gaussian_P(x-mean,sigma) for(int ibin=0;ibin(maximum-minimum)*(ibin+0.5)/nbin; double thePdf=gsl_ran_gaussian_pdf(*it-icenter, sigma); output[ibin]+=thePdf; } } else{ int theBin=0; if(*it==maximum) theBin=nbin-1; else if(*it>minimum && *it(static_cast((nbin-1)*(*it)-minimum)/(maximum-minimum)); ++output[theBin]; // if(*it==maximum) // ++output[nbin-1]; // else if(*it>=minimum && *it(static_cast((*it)-minimum)/(maximum-minimum)*nbin)]; } } if(!isValid){ std::string errorString="Error: no valid data found"; throw(errorString); } else if(!filename.empty()){ std::ofstream outputfile; outputfile.open(filename.c_str()); if(!outputfile){ std::ostringstream s; s<<"Error opening distribution file , " << filename; throw(s.str()); } for(int ibin=0;ibin(maximum-minimum)*(ibin+0.5)/nbin << " " << static_cast(output[ibin])/input.size() << std::endl; outputfile.close(); } } template void StatFactory::distribution2d(const std::vector& inputX, const std::vector& inputY, std::vector< std::vector >& output, int nbin, T& minX, T& maxX, T& minY, T& maxY, double sigma, const std::string& filename) const { if(inputX.empty()){ std::ostringstream s; s<<"Error: inputX is empty"; throw(s.str()); } if(inputX.size()!=inputY.size()){ std::ostringstream s; s<<"Error: inputX is empty"; throw(s.str()); } unsigned long int npoint=inputX.size(); if(maxX<=minX) minmax(inputX,inputX.begin(),inputX.end(),minX,maxX); if(maxX<=minX){ std::ostringstream s; s<<"Error: could not calculate distribution (minX>=maxX)"; throw(s.str()); } if(maxY<=minY) minmax(inputY,inputY.begin(),inputY.end(),minY,maxY); if(maxY<=minY){ std::ostringstream s; s<<"Error: could not calculate distribution (minY>=maxY)"; throw(s.str()); } if(nbin<=1){ std::ostringstream s; s<<"Error: nbin must be larger than 1"; throw(s.str()); } output.resize(nbin); for(int i=0;i(static_cast(inputX[ipoint]-minX)/(maxX-minX)*nbin); if(inputY[ipoint]==maxY) binY=nbin-1; else binY=static_cast(static_cast(inputY[ipoint]-minY)/(maxY-minY)*nbin); if(binX<0){ std::ostringstream s; s<<"Error: binX is smaller than 0"; throw(s.str()); } if(output.size()<=binX){ std::ostringstream s; s<<"Error: output size must be larger than binX"; throw(s.str()); } if(binY<0){ std::ostringstream s; s<<"Error: binY is smaller than 0"; throw(s.str()); } if(output.size()<=binY){ std::ostringstream s; s<<"Error: output size must be larger than binY"; throw(s.str()); } if(sigma>0){ // minX-=2*sigma; // maxX+=2*sigma; // minY-=2*sigma; // maxY+=2*sigma; //create kde for Gaussian basis function //todo: speed up by calculating first and last bin with non-zero contriubtion... for(int ibinX=0;ibinX(maxX-minX)*ibinX/nbin; double pdfX=gsl_ran_gaussian_pdf(inputX[ipoint]-centerX, sigma); for(int ibinY=0;ibinY(maxY-minY)*ibinY/nbin; double pdfY=gsl_ran_gaussian_pdf(inputY[ipoint]-centerY, sigma); output[ibinX][binY]+=pdfX*pdfY; } } } else ++output[binX][binY]; } if(!filename.empty()){ std::ofstream outputfile; outputfile.open(filename.c_str()); if(!outputfile){ std::ostringstream s; s<<"Error opening distribution file , " << filename; throw(s.str()); } for(int binX=0;binX(maxX-minX)*(binX+0.5)/nbin; double binValueY=0; if(nbin==maxY-minY+1) binValueY=minY+binY; else binValueY=minY+static_cast(maxY-minY)*(binY+0.5)/nbin; double value=0; value=static_cast(output[binX][binY])/npoint; outputfile << binValueX << " " << binValueY << " " << value << std::endl; /* double value=static_cast(output[binX][binY])/npoint; */ /* outputfile << (maxX-minX)*bin/(nbin-1)+minX << " " << (maxY-minY)*bin/(nbin-1)+minY << " " << value << std::endl; */ } } outputfile.close(); } } //todo: what with nodata values? template void StatFactory::percentiles (const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, std::vector& output, int nbin, T &minimum, T &maximum, const std::string &filename) const { if(maximum<=minimum) minmax(input,begin,end,minimum,maximum); if(maximum<=minimum){ std::ostringstream s; s<<"Error: maximum must be at least minimum"; throw(s.str()); } if(nbin<=1){ std::ostringstream s; s<<"Error: nbin must be larger than 1"; throw(s.str()); } if(input.empty()){ std::ostringstream s; s<<"Error: input is empty"; throw(s.str()); } output.resize(nbin); std::vector inputSort; inputSort.assign(begin,end); typename std::vector::iterator vit=inputSort.begin(); while(vit!=inputSort.end()){ if(*vitmaximum) inputSort.erase(vit); else ++vit; } eraseNoData(inputSort); std::sort(inputSort.begin(),inputSort.end()); vit=inputSort.begin(); std::vector inputBin; for(int ibin=0;ibin(output[ibin])/input.size() << std::endl; outputfile.close(); } } //todo: what with nodata values? template T StatFactory::percentile(const std::vector& input, typename std::vector::const_iterator begin, typename std::vector::const_iterator end, double percent, T minimum, T maximum) const { if(input.empty()){ std::ostringstream s; s<<"Error: input is empty"; throw(s.str()); } std::vector inputSort; inputSort.assign(begin,end); typename std::vector::iterator vit=inputSort.begin(); while(vit!=inputSort.end()){ if(maximum>minimum){ if(*vitmaximum) inputSort.erase(vit); } else ++vit; } eraseNoData(inputSort); std::sort(inputSort.begin(),inputSort.end()); return gsl_stats_quantile_from_sorted_data(&(inputSort[0]),1,inputSort.size(),percent/100.0); } template void StatFactory::signature(const std::vector& input, double&k, double& alpha, double& beta, double e) const { double m1=moment(input,1); double m2=moment(input,2); signature(m1,m2,k,alpha,beta,e); } //todo: what with nodata values? template void StatFactory::normalize(const std::vector& input, std::vector& output) const{ double total=sum(input); if(total){ output.resize(input.size()); for(int index=0;index void StatFactory::normalize_pct(std::vector& input) const{ double total=sum(input); if(total){ typename std::vector::iterator it; for(it=input.begin();it!=input.end();++it) *it=100.0*(*it)/total; } } template double StatFactory::rmse(const std::vector& x, const std::vector& y) const{ if(x.size()!=y.size()){ std::ostringstream s; s<<"Error: x and y not equal in size"; throw(s.str()); } if(x.empty()){ std::ostringstream s; s<<"Error: x is empty"; throw(s.str()); } double mse=0; for(int isample=0;isample double StatFactory::nrmse(const std::vector& x, const std::vector& y) const{ if(x.size()!=y.size()){ std::ostringstream s; s<<"Error: x and y not equal in size"; throw(s.str()); } if(x.empty()){ std::ostringstream s; s<<"Error: x is empty"; throw(s.str()); } std::vector tmpX=x; eraseNoData(tmpX); std::vector tmpY=y; eraseNoData(tmpY); double maxY=mymax(y); double minY=mymin(y); double rangeY=maxY-minY; double mse=0; for(int isample=0;isample double StatFactory::cvrmse(const std::vector& x, const std::vector& y) const{ if(x.size()!=y.size()){ std::ostringstream s; s<<"Error: x and y not equal in size"; throw(s.str()); } if(x.empty()){ std::ostringstream s; s<<"Error: x is empty"; throw(s.str()); } std::vector tmpX=x; eraseNoData(tmpX); std::vector tmpY=y; eraseNoData(tmpY); double maxY=mymax(tmpY); double minY=mymin(tmpY); double rangeY=maxY-minY; double mse=0; for(int isample=0;isample double StatFactory::gsl_correlation(const std::vector& x, const std::vector& y) const{ // return(gsl_stats_correlation(&(x[0]),1,&(y[0]),1,x.size())); // } template double StatFactory::gsl_covariance(const std::vector& x, const std::vector& y) const{ return(gsl_stats_covariance(&(x[0]),1,&(y[0]),1,x.size())); } template double StatFactory::correlation(const std::vector& x, const std::vector& y, int delay) const{ double meanX=0; double meanY=0; double varX=0; double varY=0; double sXY=0; meanVar(x,meanX,varX); meanVar(y,meanY,varY); double denom = sqrt(varX*varY); bool isValid=false; if(denom){ //Calculate the correlation series sXY = 0; for (int i=0;i= y.size()) continue; else if(isNoData(x[i])||isNoData(y[j])) continue; else{ isValid=true; if(i<0){ std::ostringstream s; s<<"Error: i must be positive"; throw(s.str()); } if(i>=x.size()){ std::ostringstream s; s<<"Error: i must be smaller than x.size()"; throw(s.str()); } if(j<0){ std::ostringstream s; s<<"Error: j must be positive"; throw(s.str()); } if(j>=y.size()){ std::ostringstream s; s<<"Error: j must be smaller than y.size()"; throw(s.str()); } sXY += (x[i] - meanX) * (y[j] - meanY); } } if(isValid){ double minSize=(x.size() double StatFactory::cross_correlation(const std::vector& x, const std::vector& y, int maxdelay, std::vector& z) const{ z.clear(); double sumCorrelation=0; for (int delay=-maxdelay;delay double StatFactory::linear_regression(const std::vector& x, const std::vector& y, double &c0, double &c1) const{ if(x.size()!=y.size()){ std::ostringstream s; s<<"Error: x and y not equal in size"; throw(s.str()); } if(x.empty()){ std::ostringstream s; s<<"Error: x is empty"; throw(s.str()); } double cov00; double cov01; double cov11; double sumsq; gsl_fit_linear(&(x[0]),1,&(y[0]),1,x.size(),&c0,&c1,&cov00,&cov01,&cov11,&sumsq); return (1-sumsq/var(y)/(y.size()-1)); } //todo: nodata? template double StatFactory::linear_regression_err(const std::vector& x, const std::vector& y, double &c0, double &c1) const{ if(x.size()!=y.size()){ std::ostringstream s; s<<"Error: x and y not equal in size"; throw(s.str()); } if(x.empty()){ std::ostringstream s; s<<"Error: x is empty"; throw(s.str()); } double cov00; double cov01; double cov11; double sumsq; gsl_fit_linear(&(x[0]),1,&(y[0]),1,x.size(),&c0,&c1,&cov00,&cov01,&cov11,&sumsq); return sqrt((sumsq)/(y.size())); } //alternatively: use GNU scientific library: // gsl_stats_correlation (const double data1[], const size_t stride1, const double data2[], const size_t stride2, const size_t n) template void StatFactory::interpolateNoData(const std::vector& wavelengthIn, const std::vector& input, const std::string& type, std::vector& output, bool verbose) const{ if(wavelengthIn.empty()){ std::ostringstream s; s<<"Error: wavelengthIn is empty"; throw(s.str()); } std::vector wavelengthOut=wavelengthIn; std::vector validIn=input; if(input.size()!=wavelengthIn.size()){ std::ostringstream s; s<<"Error: x and y not equal in size"; throw(s.str()); } int nband=wavelengthIn.size(); output.clear(); //remove nodata from input and corresponding wavelengthIn if(m_noDataValues.size()){ typename std::vector::iterator itValue=validIn.begin(); typename std::vector::iterator itWavelength=wavelengthOut.begin(); while(itValue!=validIn.end()&&itWavelength!=wavelengthOut.end()){ if(isNoData(*itValue)){ validIn.erase(itValue); wavelengthOut.erase(itWavelength); } else{ ++itValue; ++itWavelength; } } if(validIn.size()>1){ try{ interpolateUp(wavelengthOut, validIn, wavelengthIn, type, output, verbose); } catch(...){ output=input; } } else//we can not interpolate if no valid data output=input; } else//no nodata values to interpolate output=input; } template void StatFactory::interpolateUp(const std::vector& wavelengthIn, const std::vector& input, const std::vector& wavelengthOut, const std::string& type, std::vector& output, bool verbose) const{ if(wavelengthIn.empty()){ std::ostringstream s; s<<"Error: wavelengthIn is empty"; throw(s.str()); } if(input.size()!=wavelengthIn.size()){ std::ostringstream s; s<<"Error: input and wavelengthIn not equal in size"; throw(s.str()); } if(wavelengthOut.empty()){ std::ostringstream s; s<<"Error: wavelengthOut is empty"; throw(s.str()); } int nband=wavelengthIn.size(); output.clear(); gsl_interp_accel *acc; allocAcc(acc); gsl_spline *spline; getSpline(type,nband,spline); assert(spline); assert(&(wavelengthIn[0])); assert(&(input[0])); int status=initSpline(spline,&(wavelengthIn[0]),&(input[0]),nband); if(status){ std::string errorString="Could not initialize spline"; throw(errorString); } for(int index=0;indexwavelengthIn.back()){ output.push_back(input.back()); continue; } double dout=evalSpline(spline,wavelengthOut[index],acc); output.push_back(dout); } gsl_spline_free(spline); gsl_interp_accel_free(acc); } // template void StatFactory::interpolateUp(const std::vector& wavelengthIn, const std::vector< std::vector >& input, const std::vector& wavelengthOut, const std::string& type, std::vector< std::vector >& output, bool verbose){ // assert(wavelengthIn.size()); // assert(wavelengthOut.size()); // int nsample=input.size(); // int nband=wavelengthIn.size(); // output.clear(); // output.resize(nsample); // gsl_interp_accel *acc; // allocAcc(acc); // gsl_spline *spline; // getSpline(type,nband,spline); // for(int isample=0;isamplewavelengthIn.back()) // output[isample].push_back(input.back()); // } // else{ // double dout=evalSpline(spline,wavelengthOut[index],acc); // output[isample].push_back(dout); // } // } // } // gsl_spline_free(spline); // gsl_interp_accel_free(acc); // } //todo: nodata? template void StatFactory::interpolateUp(const std::vector& input, std::vector& output, int nbin) const { if(input.empty()){ std::ostringstream s; s<<"Error: input is empty"; throw(s.str()); } if(!nbin){ std::ostringstream s; s<<"Error: nbin must be larger than 0"; throw(s.str()); } output.clear(); int dim=input.size(); for(int i=0;i(nbin); for(int x=0;x void StatFactory::nearUp(const std::vector& input, std::vector& output) const { if(input.empty()){ std::ostringstream s; s<<"Error: input is empty"; throw(s.str()); } if(output.size()=output.size()){ std::ostringstream s; s<<"Error: indexOutput must be smaller than output.size()"; throw(s.str()); } output[indexOutput]=input[iin]; } } } //todo: nodata? template void StatFactory::interpolateUp(double* input, int dim, std::vector& output, int nbin) { if(!nbin){ std::ostringstream s; s<<"Error: nbin must be larger than 0"; throw(s.str()); } output.clear(); for(int i=0;i(nbin); for(int x=0;x void StatFactory::interpolateDown(const std::vector& input, std::vector& output, int nbin) const { if(input.empty()){ std::ostringstream s; s<<"Error: input is empty"; throw(s.str()); } if(!nbin){ std::ostringstream s; s<<"Error: nbin must be larger than 0"; throw(s.str()); } output.clear(); int dim=input.size(); int x=0; output.push_back(input[0]); for(int i=1;i void StatFactory::interpolateDown(double* input, int dim, std::vector& output, int nbin) { if(!nbin){ std::ostringstream s; s<<"Error: nbin must be larger than 0"; throw(s.str()); } output.clear(); int x=0; output.push_back(input[0]); for(int i=1;i=e||y-f>=e){ // if(f. ***********************************************************************/ #ifndef _COSTFACTORY_H_ #define _COSTFACTORY_H_ #include #include #include #include "ConfusionMatrix.h" #include "base/Vector2d.h" class CostFactory{ public: CostFactory(void){}; CostFactory(unsigned short cv, short verbose) : m_cv(cv), m_verbose(verbose){}; virtual ~CostFactory(void){}; void setCv(unsigned short cv){m_cv=cv;}; void setClassValueMap(const std::string& classname, short classvalue){ m_classValueMap[classname]=classvalue;}; std::map getClassValueMap(){return m_classValueMap;}; std::vector getNameVector(){return m_nameVector;}; void setNameVector(std::vector& nameVector){m_nameVector=nameVector;}; int getClassIndex(std::string classname) const {return m_cm.getClassIndex(classname);}; //pushBackClassName is for confusion matrix void pushBackClassName(std::string classname){m_cm.pushBackClassName(classname,true);};//doSort=true //pushBackName is for nameVector in CostFactory void pushBackName(std::string classname){m_nameVector.push_back(classname);}; void setNcTraining(const std::vector nctraining){m_nctraining=nctraining;}; void setNcTest(const std::vector nctest){m_nctest=nctest;}; //getCost needs to be implemented case by case (e.g., SVM, ANN) virtual double getCost(const std::vector > &trainingFeatures)=0; protected: confusionmatrix::ConfusionMatrix m_cm; std::map m_classValueMap; std::vector m_nameVector; std::vector m_nctraining; std::vector m_nctest; unsigned short m_cv; /* std::string m_classname; */ short m_classvalue; short m_verbose; }; #endif pktools-2.6.6/src/algorithms/Egcs.h0000644000113200011300000000403312400110722014102 00000000000000/********************************************************************** Egcs.h: Conversions from and to european grid coding system 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 #ifndef _EGCS_H_ #define _EGCS_H_ class Egcs { public: Egcs(); Egcs(unsigned short level); /* Egcs(unsigned short level); */ ~Egcs(); unsigned short cell2level(const std::string& cellCode) const; std::string geo2cell(double x, double y) const; double getSize() const {return getBaseSize()*pow(2.0,(m_level-19)%3);}; void setLevel(unsigned short level){m_level=level;}; unsigned short getLevel() const{return m_level;}; unsigned short res2level(double resolution) const; double getResolution() const; void force2grid(double& ulx, double& uly, double& lrx, double &lry) const; void cell2bb(const std::string& cellCode, int &ulx, int &uly, int &lrx, int &lry) const; void cell2mid(const std::string& cellCode, double& midX, double& midY) const; private: int getBaseSize() const {return pow(10.0,(m_level+1)/3);}; unsigned short m_level; // level square scheme example // 19 1000km xy 32 // 18 500km xy-q 32-A // 17 250km xy-qq 32-AB // 16 100km xxyy 3320 // 5 25m xxxxxyyyyy-qq 3346720658-DC // 1 1m xxxxxxxyyyyyyy 33467652065889 }; #endif // _EGCS_H_ pktools-2.6.6/src/algorithms/ConfusionMatrix.h0000644000113200011300000001507712535335004016376 00000000000000/********************************************************************** ConfusionMatrix.h: class for (classification accuracy) confusion matrix 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 _CONFUSIONMATRIX_H_ #define _CONFUSIONMATRIX_H_ #include #include #include "base/Vector2d.h" #include "base/Optionpk.h" namespace confusionmatrix { enum CM_FORMAT { ASCII = 0, LATEX = 1, HTML = 2 }; class ConfusionMatrix{ public: ConfusionMatrix(); ConfusionMatrix(short nclass); ConfusionMatrix(const std::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 std::vector& classNames, bool doSort=false); void pushBackClassName(const std::string& className, bool doSort=false); void setResults(const Vector2d& theResults); void setResult(const std::string& theRef, const std::string& theClass, double theResult); void incrementResult(const std::string& theRef, const std::string& theClass, double theIncrement); void clearResults(); double nReference(const std::string& theRef) const; double nReference() const; double nClassified(const std::string& theRef) const; int nClasses() const {return m_classes.size();}; std::string getClass(int iclass) const {assert(iclass>=0);assert(iclass=m_classes.size()) index=-1; return index; // int index=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),className)); // assert(index>=0); // if(index getClassNames() const {return m_classes;}; ~ConfusionMatrix(); double pa(const std::string& theClass, double* se95=NULL) const; double ua(const std::string& theClass, double* se95=NULL) const; double oa(double* se95=NULL) const; int pa_pct(const std::string& theClass, double* se95=NULL) const; int ua_pct(const std::string& theClass, double* se95=NULL) const; int oa_pct(double* se95=NULL) const; double kappa() const; ConfusionMatrix& operator*=(double weight); ConfusionMatrix operator*(double weight); ConfusionMatrix& operator+=(const ConfusionMatrix &cm); ConfusionMatrix operator+(const ConfusionMatrix &cm){ return ConfusionMatrix(*this)+=cm; } void sortClassNames(); void reportSE95(bool doReport) {m_se95=doReport;}; void setFormat(const CM_FORMAT& theFormat) {m_format=theFormat;}; void setFormat(const std::string theFormat) {m_format=getFormat(theFormat);}; CM_FORMAT getFormat() const {return m_format;}; static const CM_FORMAT getFormat(const std::string theFormat){ if(theFormat=="ascii") return(ASCII); else if(theFormat=="latex") return(LATEX); else{ std::string errorString="Format not supported: "; errorString+=theFormat; errorString+=" use ascii or latex"; throw(errorString); } }; friend std::ostream& operator<<(std::ostream& os, const ConfusionMatrix &cm){ std::ostringstream streamLine; /* streamosclass << iclass; */ /* m_classes[iclass]=osclass.str(); */ std::string fieldSeparator=" "; std::string lineSeparator=""; std::string mathMode=""; switch(cm.getFormat()){ case(LATEX): fieldSeparator=" & "; lineSeparator="\\\\"; mathMode="$"; break; case(ASCII): default: fieldSeparator="\t"; lineSeparator=""; mathMode=""; break; } double se95_ua=0; double se95_pa=0; double se95_oa=0; double dua=0; double dpa=0; double doa=0; doa = cm.oa(&se95_oa); if(cm.getFormat()==LATEX){ os << "\\documentclass{article}" << std::endl; os << "\\begin{document}" << std::endl; } os << "Kappa = " << mathMode << cm.kappa() << mathMode ; os << ", Overall Acc. = " << mathMode << 100.0*cm.oa() << mathMode ; if(cm.m_se95) os << " (" << mathMode << se95_oa << mathMode << ")"; os << std::endl; os << std::endl; if(cm.getFormat()==LATEX){ os << "\\begin{tabular}{@{}l"; for(int iclass=0;iclass m_classes; Vector2d m_results; CM_FORMAT m_format; bool m_se95; }; } #endif /* _CONFUSIONMATRIX_H_ */ pktools-2.6.6/src/algorithms/svm.h0000644000113200011300000000611512400110722014031 00000000000000#ifndef _LIBSVM_H #define _LIBSVM_H #define LIBSVM_VERSION 312 #ifdef __cplusplus extern "C" { #endif extern int libsvm_version; struct svm_node { int index; double value; }; struct svm_problem { int l; double *y; struct svm_node **x; }; enum { C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR }; /* svm_type */ enum { LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED }; /* kernel_type */ struct svm_parameter { int svm_type; int kernel_type; int degree; /* for poly */ double gamma; /* for poly/rbf/sigmoid */ double coef0; /* for poly/sigmoid */ /* these are for training only */ double cache_size; /* in MB */ double eps; /* stopping criteria */ double C; /* for C_SVC, EPSILON_SVR and NU_SVR */ int nr_weight; /* for C_SVC */ int *weight_label; /* for C_SVC */ double* weight; /* for C_SVC */ double nu; /* for NU_SVC, ONE_CLASS, and NU_SVR */ double p; /* for EPSILON_SVR */ int shrinking; /* use the shrinking heuristics */ int probability; /* do probability estimates */ bool verbose;//pk }; // // svm_model // struct svm_model { struct svm_parameter param; /* parameter */ int nr_class; /* number of classes, = 2 in regression/one class svm */ int l; /* total #SV */ struct svm_node **SV; /* SVs (SV[l]) */ double **sv_coef; /* coefficients for SVs in decision functions (sv_coef[k-1][l]) */ double *rho; /* constants in decision functions (rho[k*(k-1)/2]) */ double *probA; /* pariwise probability information */ double *probB; /* for classification only */ int *label; /* label of each class (label[k]) */ int *nSV; /* number of SVs for each class (nSV[k]) */ /* nSV[0] + nSV[1] + ... + nSV[k-1] = l */ /* XXX */ int free_sv; /* 1 if svm_model is created by svm_load_model*/ /* 0 if svm_model is created by svm_train */ }; struct svm_model *svm_train(const struct svm_problem *prob, const struct svm_parameter *param); void svm_cross_validation(const struct svm_problem *prob, const struct svm_parameter *param, int nr_fold, double *target); int svm_save_model(const char *model_file_name, const struct svm_model *model); struct svm_model *svm_load_model(const char *model_file_name); int svm_get_svm_type(const struct svm_model *model); int svm_get_nr_class(const struct svm_model *model); void svm_get_labels(const struct svm_model *model, int *label); double svm_get_svr_probability(const struct svm_model *model); double svm_predict_values(const struct svm_model *model, const struct svm_node *x, double* dec_values); double svm_predict(const struct svm_model *model, const struct svm_node *x); double svm_predict_probability(const struct svm_model *model, const struct svm_node *x, double* prob_estimates); void svm_free_model_content(struct svm_model *model_ptr); void svm_free_and_destroy_model(struct svm_model **model_ptr_ptr); void svm_destroy_param(struct svm_parameter *param); const char *svm_check_parameter(const struct svm_problem *prob, const struct svm_parameter *param); int svm_check_probability_model(const struct svm_model *model); void svm_set_print_string_function(void (*print_func)(const char *)); #ifdef __cplusplus } #endif #endif /* _LIBSVM_H */ pktools-2.6.6/src/algorithms/Egcs.cc0000644000113200011300000001266212400110722014247 00000000000000/********************************************************************** Egcs.cc: Conversions from and to european grid coding system 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 "Egcs.h" #include #include #include #include Egcs::Egcs(){ } // Egcs::Egcs(unsigned short level) // : m_level(level){ // } Egcs::Egcs(unsigned short level) { m_level=level; } unsigned short Egcs::cell2level(const std::string& cellCode) const{ size_t pos=cellCode.find("-"); std::string TILE=cellCode.substr(0,pos); unsigned short level=0; int base_level=19-(TILE.size()/2-1)*3; int quad_level=0; if(pos!=std::string::npos) quad_level=cellCode.size()-pos-1; if(quad_level>1) level=base_level-2; else if(quad_level>0) level=base_level-1; else level=base_level; return level; } Egcs::~Egcs(){ } unsigned short Egcs::res2level(double resolution) const{ double base=pow(10,log(resolution*4.0)/log(10.0)); double diff=base/(2*resolution); return 0.5+(log(base)/log(10.0)*3+1-diff); } double Egcs::getResolution() const{ unsigned short exponent=(m_level+1)/3; double base=pow(10.0,exponent); if((m_level)%3==2) return(base/4); else if((m_level)%3==0) return(base/2); else return(base); } void Egcs::force2grid(double& ulx, double& uly, double& lrx, double &lry) const{ double dx=getResolution(); double dy=dx; //ulx ulx=floor(ulx); ulx-=static_cast(ulx)%(static_cast(dx)); //uly uly=ceil(uly); if(static_cast(uly)%static_cast(dy)) uly+=dy; uly-=static_cast(uly)%(static_cast(dy)); //lrx lrx=ceil(lrx); if(static_cast(lrx)%static_cast(dx)) lrx+=dx; lrx-=static_cast(lrx)%(static_cast(dx)); //lry lry=floor(lry); lry-=static_cast(lry)%(static_cast(dy)); } void Egcs::cell2bb(const std::string& cellCode, int &ulx, int &uly, int &lrx, int &lry) const{ size_t pos=cellCode.find("-"); std::string TILE=cellCode.substr(0,pos); std::string TILEX=TILE.substr(0,TILE.size()/2); std::string TILEY=TILE.substr(TILE.size()/2); std::string QUAD; char QUAD1,QUAD2; std::istringstream stilex(TILEX); std::istringstream stiley(TILEY); int llx,lly; stilex >> llx; stiley >> lly; llx*=getBaseSize(); lly*=getBaseSize(); switch((19-m_level)%3){ case(0)://there should be no QUAD assert(pos==std::string::npos); break; case(2)://there is a QUAD2 assert(pos+1!=std::string::npos); QUAD=cellCode.substr(pos+1); QUAD2=QUAD.substr(1,1).c_str()[0]; switch(QUAD2){ case('A'): break; case('C'): lly+=getBaseSize()/4; break; case('D'): lly+=getBaseSize()/4; case('B'): llx+=getBaseSize()/4; break; } case(1)://QUAD1: deliberate fall through from case(2)! if(!QUAD.size()){ assert(pos+1!=std::string::npos); QUAD=cellCode.substr(pos+1); } QUAD1=QUAD.substr(0,1).c_str()[0]; switch(QUAD1){ case('A'): break; case('C'): lly+=getBaseSize()/2; break; case('D'): lly+=getBaseSize()/2; case('B'): llx+=getBaseSize()/2; break; } break; } ulx=llx; uly=static_cast(lly+getSize()); lrx=static_cast(llx+getSize()); lry=lly; } void Egcs::cell2mid(const std::string& cellCode, double& midX, double& midY) const{ int ulx,uly,lrx,lry; cell2bb(cellCode,ulx,uly,lrx,lry); midX=(ulx+lrx)/2.0; midY=(lry+uly)/2.0; } std::string Egcs::geo2cell(double geoX, double geoY) const{ int ndgts=7-(m_level+1)/3; double xcel=static_cast(geoX)/getBaseSize(); double ycel=static_cast(geoY)/getBaseSize(); std::ostringstream osx; std::ostringstream osy, osxy; // osx << setprecision(ndgts) << xcel; // osy << setprecision(ndgts) << ycel; // osx << setprecision(0) << fixed << geoX; // osy << setprecision(0) << fixed << geoY; osx << std::fixed << geoX; osy << std::fixed << geoY; std::string quad1=""; std::string quad2=""; switch((19-m_level)%3){ case(2): if(static_cast(geoX)%(getBaseSize()/2)>=getBaseSize()/2.0){ if(static_cast(geoY)%(getBaseSize()/2)>=getBaseSize()/2.0) quad2="D"; else quad2="B"; } else if(static_cast(geoY)%getBaseSize()>=getBaseSize()/4.0) quad2="C"; else quad2="A"; case(1)://deliberate fall through! if(static_cast(geoX)%getBaseSize()>=getBaseSize()/2.0){ if(static_cast(geoY)%getBaseSize()>=getBaseSize()/2.0) quad1="-D"; else quad1="-B"; } else if(static_cast(geoY)%getBaseSize()>=getBaseSize()/2.0) quad1="-C"; else quad1="-A"; break; default: break; } osxy << osx.str().substr(0,ndgts) << osy.str().substr(0,ndgts) << quad1 << quad2; return osxy.str(); } pktools-2.6.6/src/apps/0000755000113200011300000000000012647712720011745 500000000000000pktools-2.6.6/src/apps/pkkalman.cc0000644000113200011300000023621412647712664014011 00000000000000/********************************************************************** pkkalman.cc: produce kalman filtered raster time series Copyright (C) 2008-2014 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 "base/Vector2d.h" #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "imageclasses/ImgUpdaterGdal.h" #include "algorithms/StatFactory.h" /******************************************************************************/ /*! \page pkkalman pkkalman produce kalman filtered raster time series ## SYNOPSIS Usage: pkkalman -mod modelinput.tif -obs obsinput.tif [-direction [forward|backward|smooth]]* -ofw output_fc.tif -obw output_bw.tif -ofb output_fb.tif Options[-tmod time]* [-tobs time]* [-modnodata value]* [-obsnodata value]* [-modmask mask.tif] [-obsmask mask.tif] [-msknodata value]* [-mskband] [-u_ofw uncert_fw.tif] [-u_obw uncert_bw.tif] [-u_ofb uncert_fb.tif] Advanced options (see table) \section pkkalman_description Description The utilty pkkalman will complement a time series of observations (option -obs) at fine spatial resolution. A data assimilation technique based on a Kalman filter is hereby used. The data at fine spatial resolution are assimilated with coarse spatial resolution time series at a finer temporal resolution, referred to as a model (option -mod). The time series for both observation and model can either be provided as multi-band raster datasets or as multiple single band datasets. Missing data in the observations are predicted by the algorithm. The model must cover at least the spatial coverage of the observation. The missing data must be provided either as nodata values in the input (using option -obsnodata) or as an external mask (using option -obsmask). The time sequence for the model and observation should be provided via the options -tmod and -tobs. Tuning parameters for the algorithm are process noise (option -q) and the weights for uncertainty of valid observations (-uo) and the model (-um). \section pkcrop_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | dir | direction | std::string | forward |direction to run model (forward\|backward\|smooth) | | mod | model | std::string | |coarse spatial resolution input datasets(s) used as model. Use either multi-band input (-model multiband_model.tif) or multiple single-band inputs (-mod model1 -mod model2 etc.) | | modmask| modmask | std::string | |model mask datasets(s). Must have same dimension as model input. Use either multi-band input or multiple single-band inputs| | obs | observation | std::string | |fine spatial resolution input dataset(s) used as observation. Use either multi-band input (-obs multiband_obs.tif) or multiple single-band inputs (-obs obs1 -obs obs2 etc.) | | obsmask| obsmask | std::string | |observation mask dataset(s). Must have same dimension as observation input (use multi-band input or multiple single-band inputs | | tmod | tmodel | int | |time sequence of model input. Sequence must have exact same length as model input. Leave empty to have default sequence 0,1,2,etc. | | tobs | tobservation | int | |time sequence of observation input. Sequence must have exact same length as observation input | | a_srs | a_srs | std::string | |Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid | | ofw | outputfw | std::string | |Output raster dataset for forward model | | u_ofw | u_outputfw | std::string | |Uncertainty output raster dataset for forward model | | obw | outputbw | std::string | |Output raster dataset for backward model | | u_obw | u_outputbw | std::string | |Uncertainty output raster dataset for backward model | | ofb | outputfb | std::string | |Output raster dataset for smooth model | | u_ofb | u_outputfb | std::string | |Uncertainty output raster dataset for smooth model | | modnodata | modnodata | double | 0 |invalid value for model input | | obsnodata | obsnodata | double | 0 |invalid value for observation input | | msknodata | msknodata | float | 0 |Mask value not to consider | mskband | mskband | short | 0 |Mask band to read (0 indexed) | | obsmin | obsmin | double | |Minimum value for observation data | | obsmax | obsmax | double | |Maximum value for observation data | | eps | eps | double | 1e-05 |epsilon for non zero division | | um | uncertmodel | double | 1 |Uncertainty of the model | | uo | uncertobs | double | 1 |Uncertainty of valid observations | | unodata | uncertnodata | double | 100 |Uncertainty in case of no-data values in observation | | q | q | double | 1 |Process noise: expresses instability (variance) of proportions of fine res pixels within a moderate resolution pixel | | down | down | int | |Downsampling factor for reading model data to calculate regression (default is ratio between coarse (model) and fine (obs) resolution raster datasets)| | ot | otype | std::string | |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate).| | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | v | verbose | short | 0 |verbose mode when positive | Examples ======== Some examples how to use pkcrop can be found \ref examples_pkkalman "here" **/ using namespace std; /*------------------ Main procedure ----------------*/ int main(int argc,char **argv) { Optionpk direction_opt("dir","direction","direction to run model (forward|backward|smooth)","forward"); Optionpk model_opt("mod","model","coarse spatial resolution input datasets(s) used as model. Use either multi-band input (-model multiband_model.tif) or multiple single-band inputs (-mod model1 -mod model2 etc.)"); Optionpk modelmask_opt("modmask","modmask","model mask datasets(s). Must have same dimension as model input. Use either multi-band input or multiple single-band inputs"); Optionpk observation_opt("obs","observation","fine spatial resolution input dataset(s) used as observation. Use either multi-band input (-obs multiband_obs.tif) or multiple single-band inputs (-obs obs1 -obs obs2 etc.)"); Optionpk observationmask_opt("obsmask","obsmask","observation mask dataset(s). Must have same dimension as observation input (use multi-band input or multiple single-band inputs"); Optionpk tmodel_opt("tmod","tmodel","time sequence of model input. Sequence must have exact same length as model input. Leave empty to have default sequence 0,1,2,etc."); Optionpk tobservation_opt("tobs","tobservation","time sequence of observation input. Sequence must have exact same length as observation input)"); Optionpk projection_opt("a_srs", "a_srs", "Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid"); Optionpk outputfw_opt("ofw", "outputfw", "Output raster dataset for forward model"); Optionpk uncertfw_opt("u_ofw", "u_outputfw", "Uncertainty output raster dataset for forward model"); Optionpk outputbw_opt("obw", "outputbw", "Output raster dataset for backward model"); Optionpk uncertbw_opt("u_obw", "u_outputbw", "Uncertainty output raster dataset for backward model"); Optionpk outputfb_opt("ofb", "outputfb", "Output raster dataset for smooth model"); Optionpk uncertfb_opt("u_ofb", "u_outputfb", "Uncertainty output raster dataset for smooth model"); Optionpk gain_opt("gain", "gain", "Output raster dataset for gain"); Optionpk modnodata_opt("modnodata", "modnodata", "invalid value for model input", 0); Optionpk obsnodata_opt("obsnodata", "obsnodata", "invalid value for observation input", 0); Optionpk obsmin_opt("obsmin", "obsmin", "Minimum value for observation data"); Optionpk obsmax_opt("obsmax", "obsmax", "Maximum value for observation data"); Optionpk msknodata_opt("msknodata", "msknodata", "Mask value not to consider", 0); Optionpk mskband_opt("mskband", "mskband", "Mask band to read (0 indexed)", 0); Optionpk eps_opt("eps", "eps", "epsilon for non zero division", 0.00001); Optionpk uncertModel_opt("um", "uncertmodel", "Uncertainty of model",1); Optionpk uncertObs_opt("uo", "uncertobs", "Uncertainty of valid observations",1); Optionpk processNoise_opt("q", "q", "Process noise: expresses instability (variance) of proportions of fine res pixels within a moderate resolution pixel",1); Optionpk uncertNodata_opt("unodata", "uncertnodata", "Uncertainty in case of no-data values in observation", 100); Optionpk down_opt("down", "down", "Downsampling factor for reading model data to calculate regression"); 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).","GTiff",2); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk verbose_opt("v", "verbose", "verbose mode when positive", 0); observationmask_opt.setHide(1); modelmask_opt.setHide(1); tmodel_opt.setHide(1); tobservation_opt.setHide(1); projection_opt.setHide(1); uncertfw_opt.setHide(1); uncertbw_opt.setHide(1); uncertfb_opt.setHide(1); obsmin_opt.setHide(1); obsmax_opt.setHide(1); msknodata_opt.setHide(1); mskband_opt.setHide(1); eps_opt.setHide(1); uncertNodata_opt.setHide(1); down_opt.setHide(1); otype_opt.setHide(1); oformat_opt.setHide(1); option_opt.setHide(1); verbose_opt.setHide(1); gain_opt.setHide(2); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=direction_opt.retrieveOption(argc,argv); model_opt.retrieveOption(argc,argv); modelmask_opt.retrieveOption(argc,argv); observation_opt.retrieveOption(argc,argv); observationmask_opt.retrieveOption(argc,argv); tmodel_opt.retrieveOption(argc,argv); tobservation_opt.retrieveOption(argc,argv); projection_opt.retrieveOption(argc,argv); outputfw_opt.retrieveOption(argc,argv); uncertfw_opt.retrieveOption(argc,argv); outputbw_opt.retrieveOption(argc,argv); uncertbw_opt.retrieveOption(argc,argv); outputfb_opt.retrieveOption(argc,argv); uncertfb_opt.retrieveOption(argc,argv); gain_opt.retrieveOption(argc,argv); modnodata_opt.retrieveOption(argc,argv); obsnodata_opt.retrieveOption(argc,argv); obsmin_opt.retrieveOption(argc,argv); obsmax_opt.retrieveOption(argc,argv); msknodata_opt.retrieveOption(argc,argv); mskband_opt.retrieveOption(argc,argv); eps_opt.retrieveOption(argc,argv); uncertModel_opt.retrieveOption(argc,argv); uncertObs_opt.retrieveOption(argc,argv); processNoise_opt.retrieveOption(argc,argv); uncertNodata_opt.retrieveOption(argc,argv); down_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::cerr << "short option -h shows basic options only, use long option --help to show all options" << std::endl; exit(0);//help was invoked, stop processing } try{ ostringstream errorStream; if(model_opt.size()<1){ errorStream << "Error: no model dataset selected, use option -mod" << endl; throw(errorStream.str()); } if(observation_opt.size()<1){ errorStream << "Error: no observation dataset selected, use option -obs" << endl; throw(errorStream.str()); } if(find(direction_opt.begin(),direction_opt.end(),"forward")!=direction_opt.end()){ if(outputfw_opt.empty()){ errorStream << "Error: output forward datasets is not provided, use option -ofw" << endl; throw(errorStream.str()); } if(uncertfw_opt.empty()){ ostringstream uncertStream; uncertStream << outputfw_opt[0] << "_uncert"; uncertfw_opt.push_back(uncertStream.str()); } } if(find(direction_opt.begin(),direction_opt.end(),"backward")!=direction_opt.end()){ if(outputbw_opt.empty()){ errorStream << "Error: output backward datasets is not provided, use option -obw" << endl; throw(errorStream.str()); } if(uncertbw_opt.empty()){ ostringstream uncertStream; uncertStream << outputbw_opt[0] << "_uncert"; uncertbw_opt.push_back(uncertStream.str()); } } // if(model_opt.size()1)? observation_opt.size() : imgReaderObs.nrOfBand(); unsigned int nmodel=(model_opt.size()>1)? model_opt.size() : imgReaderModel1.nrOfBand(); if(verbose_opt[0]){ cout << "number of observations: " << nobs << endl; cout << "number of models: " << nmodel << endl; } int ncol=imgReaderObs.nrOfCol(); int nrow=imgReaderObs.nrOfRow(); if(projection_opt.empty()) projection_opt.push_back(imgReaderObs.getProjection()); double geotransform[6]; imgReaderObs.getGeoTransform(geotransform); 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=imgReaderObs.getDataType(); string imageType;//=imgReaderObs.getImageType(); if(oformat_opt.size())//default imageType=oformat_opt[0]; if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){ string theInterleave="INTERLEAVE="; theInterleave+=imgReaderObs.getInterleave(); option_opt.push_back(theInterleave); } if(down_opt.empty()){ double resModel=imgReaderModel1.getDeltaX(); double resObs=imgReaderObs.getDeltaX(); int down=static_cast(ceil(resModel/resObs)); if(!(down%2)) down+=1; down_opt.push_back(down); } int obsindex=0; const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; double errObs=uncertNodata_opt[0];//start with high initial value in case we do not have first observation at time 0 while(tmodel_opt.size() relobsindex; for(int tindex=0;tindex::iterator modit; modit=upper_bound(tmodel_opt.begin(),tmodel_opt.end(),tobservation_opt[tindex]); int relpos=modit-tmodel_opt.begin()-1; assert(relpos>=0);//todo: for now, we assume model is available at time before first measurement relobsindex.push_back(relpos); if(verbose_opt[0]){ cout << "observation " << tindex << ": " << "relative position in model time series is " << relpos << ", date of observation is (tobservation_opt[tindex]): " << tobservation_opt[tindex] << ", relobsindex.back(): " << relobsindex.back(); if(observation_opt.size()>tindex) cout << ", filename observation: " << observation_opt[tindex]; else cout << ", observation band index: " << tindex; if(model_opt.size()>relpos) cout << ", filename of corresponding model: " << model_opt[relpos] << endl; else cout << ", band index of corresponding model: " << relpos; } } int ndigit=log(1.0*tmodel_opt.back())/log(10.0)+1; double geox=0; double geoy=0; if(model_opt.size()==nmodel) imgReaderModel1.close(); if(modelmask_opt.size()==nmodel) imgReaderModel1Mask.close(); if(observation_opt.size()==nobs) imgReaderObs.close(); if(observationmask_opt.size()==nobs) imgReaderObsMask.close(); try{ if(find(direction_opt.begin(),direction_opt.end(),"forward")!=direction_opt.end()){ ///////////////////////////// forward model ///////////////////////// cout << "Running forward model" << endl; obsindex=0; if(verbose_opt[0]) cout << "Opening image " << outputfw_opt[0] << " for writing " << endl << flush; // imgWriterEst.open(theOutput,ncol,nrow,2,theType,imageType,option_opt); ImgWriterGdal imgWriterEst; ImgWriterGdal imgWriterUncert; imgWriterEst.open(outputfw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); imgWriterEst.setProjectionProj4(projection_opt[0]); imgWriterEst.setGeoTransform(geotransform); imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]); imgWriterUncert.open(uncertfw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); imgWriterUncert.setProjectionProj4(projection_opt[0]); imgWriterUncert.setGeoTransform(geotransform); try{ //test if(gain_opt.size()){ imgWriterGain.open(gain_opt[0],ncol,nrow,nmodel,GDT_Float64,imageType,option_opt); imgWriterGain.setProjectionProj4(projection_opt[0]); imgWriterGain.setGeoTransform(geotransform); imgWriterGain.GDALSetNoDataValue(obsnodata_opt[0]); } if(verbose_opt[0]){ cout << "processing time " << tmodel_opt[0] << endl; if(obsindexrelobsindex[obsindex]); cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl; } else cout << "There is no next observation" << endl; } if(model_opt.size()==nmodel){ imgReaderModel1.open(model_opt[0]); imgReaderModel1.setNoData(modnodata_opt); } if(modelmask_opt.size()==nmodel){ imgReaderModel1Mask.open(modelmask_opt[0]); imgReaderModel1Mask.setNoData(msknodata_opt); } } catch(string errorString){ cerr << errorString << endl; } catch(...){ cerr << "Error opening file " << model_opt[0] << endl; } double modRow=0; double modCol=0; double lowerCol=0; double upperCol=0; RESAMPLE theResample=BILINEAR; if(relobsindex[0]>0){//initialize output_opt[0] as model[0] //write first model as output if(verbose_opt[0]) cout << "write first model as output" << endl; for(int jrow=0;jrow estReadBuffer; vector lineModelMask; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); //test vector gainWriteBuffer(ncol); try{ for(int irow=jrow;irow=imgReaderModel1.nrOfRow()){ cerr << "Error: geo coordinates (" << geox << "," << geoy << ") not covered in model image " << imgReaderModel1.getFileName() << endl; assert(modRow>=0&&modRow(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol]; // double modValue=estReadBuffer[modCol]; if(imgReaderModel1.isNoData(modValue)){ estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test gainWriteBuffer[icol]=obsnodata_opt[0]; continue; } estWriteBuffer[icol]=modValue; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; } uncertWriteBuffer[icol]=uncertModel_opt[0]; //test gainWriteBuffer[icol]=0; } } imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0); imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,0); //test if(gain_opt.size()) imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0); } } catch(string errorString){ cerr << errorString << endl; } catch(...){ cerr << "Error writing file " << imgWriterEst.getFileName() << endl; } } } else{//we have a measurement if(verbose_opt[0]) cout << "we have a measurement at initial time" << endl; if(observation_opt.size()==nobs){ imgReaderObs.open(observation_opt[0]); imgReaderObs.setNoData(obsnodata_opt); } if(observationmask_opt.size()==nobs){ imgReaderObsMask.open(observationmask_opt[0]); imgReaderObsMask.setNoData(msknodata_opt); } imgReaderObs.getGeoTransform(geotransform); vector< vector > obsLineVector(down_opt[0]); vector obsLineBuffer; vector obsMaskLineBuffer; vector modelMaskLineBuffer; vector obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel vector estReadBuffer; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); vector uncertObsLineBuffer; //test vector gainWriteBuffer(ncol); if(verbose_opt[0]) cout << "initialize obsLineVector" << endl; assert(down_opt[0]%2);//window size must be odd int readObsBand=(observation_opt.size()==nobs)? 0:0; int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:0; int readModelBand=(model_opt.size()==nmodel)? 0:0; int readModelMaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:0; for(int iline=-down_opt[0]/2;iline=0&&modRow=0&&modRow(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol]; // double modValue=estReadBuffer[modCol]; double errMod=uncertModel_opt[0];//*stdDev*stdDev; modelIsNoData=modelIsNoData||imgReaderModel1.isNoData(modValue); bool obsIsNoData=false; if(observationmask_opt.size()) obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]); obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]); if(modelIsNoData){//model is nodata: retain observation if(obsIsNoData){//both model and observation nodata estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test gainWriteBuffer[icol]=obsnodata_opt[0]; } else{ estWriteBuffer[icol]=obsLineBuffer[icol]; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; } uncertWriteBuffer[icol]=uncertObs_opt[0]; } } else{//model is valid: calculate estimate from model estWriteBuffer[icol]=modValue; uncertWriteBuffer[icol]=errMod;//in case observation is not valid //test gainWriteBuffer[icol]=0; } //measurement update if(!obsIsNoData){ // estWriteBuffer[icol]=estReadBuffer[icol]*modValue1/modValue2 double kalmanGain=1; int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0; int maxCol=(icol+down_opt[0]/2down_opt[0]/2) ? irow-down_opt[0]/2 : 0; int maxRow=(irow+down_opt[0]/2eps_opt[0]) kalmanGain=errorCovariance/(errorCovariance+errObs); else kalmanGain=1; estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]); if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } } if(kalmanGain>=1) kalmanGain=1; //test gainWriteBuffer[icol]=kalmanGain; } } } imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0); imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,0); //test if(gain_opt.size()) imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0); } } if(observation_opt.size()==nobs) imgReaderObs.close(); if(observationmask_opt.size()==nobs) imgReaderObsMask.close(); ++obsindex; } if(model_opt.size()==nmodel) imgReaderModel1.close(); if(modelmask_opt.size()==nmodel) imgReaderModel1Mask.close(); imgWriterEst.close(); imgWriterUncert.close(); ImgUpdaterGdal imgUpdaterEst; ImgUpdaterGdal imgUpdaterUncert; for(int modindex=1;modindex > obsLineVector(down_opt[0]); vector obsLineBuffer; vector obsMaskLineBuffer; vector model1MaskLineBuffer; vector model2MaskLineBuffer; vector obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel vector model1LineBuffer; vector model2LineBuffer; vector model1buffer;//buffer for model 1 to calculate time regression based on window vector model2buffer;//buffer for model 2 to calculate time regression based on window vector uncertObsLineBuffer; vector< vector > estLineVector(down_opt[0]); vector estLineBuffer; vector estWindowBuffer;//buffer for estimate to calculate average corresponding to model pixel vector uncertReadBuffer; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); //test vector gainWriteBuffer(ncol); int readObsBand=(observation_opt.size()==nobs)? 0:obsindex; int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:obsindex; int readModel1Band=(model_opt.size()==nmodel)? 0:modindex-1; int readModel2Band=(model_opt.size()==nmodel)? 0:modindex; int readModel1MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex-1; int readModel2MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex; //initialize obsLineVector if update if(update){ if(verbose_opt[0]) cout << "initialize obsLineVector" << endl; assert(down_opt[0]%2);//window size must be odd for(int iline=-down_opt[0]/2;iline=0&&modRow=0&&modRowdown_opt[0]/2) ? icol-down_opt[0]/2 : 0; int maxCol=(icol+down_opt[0]/2down_opt[0]/2) ? irow-down_opt[0]/2 : 0; int maxRow=(irow+down_opt[0]/2(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue1=(modCol-0.5-lowerCol)*model1LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model1LineBuffer[lowerCol]; model1IsNoData=model1IsNoData||imgReaderModel1.isNoData(modValue1); if(model_opt.size()==nmodel) imgReaderModel2.geo2image(geox,geoy,modCol,modRow); else imgReaderModel1.geo2image(geox,geoy,modCol,modRow); bool model2IsNoData=false; if(modelmask_opt.size()) model2IsNoData=imgReaderModel1Mask.isNoData(model2MaskLineBuffer[modCol]); lowerCol=modCol-0.5; lowerCol=static_cast(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue2=(modCol-0.5-lowerCol)*model2LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model2LineBuffer[lowerCol]; model2IsNoData=model2IsNoData||imgReaderModel1.isNoData(modValue2); bool obsIsNoData=false; if(observationmask_opt.size()) obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]); obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]); if(imgUpdaterEst.isNoData(estValue)){ //we have not found any valid data yet, better here to take the current model value if valid if(model2IsNoData){//if both estimate and model are no-data, set obs to nodata estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test gainWriteBuffer[icol]=0; } else{ estWriteBuffer[icol]=modValue2; uncertWriteBuffer[icol]=uncertModel_opt[0];//*stdDev*stdDev; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } //test gainWriteBuffer[icol]=0; } } else{//previous estimate is valid double estMeanValue=0; double estVarValue=0; statobs.meanVar(estWindowBuffer,estMeanValue,estVarValue); double nvalid=0; //time update double processNoiseVariance=processNoise_opt[0]*estVarValue; //estimate stability of weight distribution from model (low resolution) data in a window mod1 -> mod2 and assume distribution holds at fine spatial resolution. if(model1IsNoData||model2IsNoData){ estWriteBuffer[icol]=estValue; // uncertWriteBuffer[icol]=uncertReadBuffer[icol]+processNoiseVariance; //todo: check following line if makes sense uncertWriteBuffer[icol]=uncertReadBuffer[icol]+uncertObs_opt[0]; } else{//model is good double modRatio=modValue2/modValue1;//transition matrix A in Kalman equations estWriteBuffer[icol]=estValue*modRatio; uncertWriteBuffer[icol]=uncertReadBuffer[icol]*modRatio*modRatio+processNoiseVariance; } if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } } //measurement update if(update&&!obsIsNoData){ double kalmanGain=1; if(!model2IsNoData){//model is valid statfactory::StatFactory statobs; statobs.setNoDataValues(obsnodata_opt); double obsMeanValue=0; double obsVarValue=0; double difference=0; statobs.meanVar(obsWindowBuffer,obsMeanValue,obsVarValue); difference=obsMeanValue-modValue2; // errObs=uncertObs_opt[0]*sqrt(difference*difference); errObs=uncertObs_opt[0]*difference*difference;//uncertainty of the observation (R in Kalman equations) if(errObseps_opt[0]) kalmanGain=errorCovariance/(errorCovariance+errObs); else kalmanGain=1; estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]); uncertWriteBuffer[icol]*=(1-kalmanGain); if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } } if(kalmanGain>=1) kalmanGain=1; //test gainWriteBuffer[icol]=kalmanGain; } } } //test if(gain_opt.size()) imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,modindex); imgUpdaterEst.writeData(estWriteBuffer,GDT_Float64,irow,modindex); imgUpdaterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,modindex); progress=static_cast((irow+1.0)/imgUpdaterEst.nrOfRow()); pfnProgress(progress,pszMessage,pProgressArg); } } //must close writers to ensure flush imgUpdaterEst.close(); imgUpdaterUncert.close(); // imgWriterEst.close(); // imgReaderEst.close(); if(update){ if(observation_opt.size()==nobs) imgReaderObs.close(); if(observationmask_opt.size()==nobs) imgReaderObsMask.close(); ++obsindex; } if(model_opt.size()==nmodel){ imgReaderModel1.close(); imgReaderModel2.close(); } if(modelmask_opt.size()==nmodel){ imgReaderModel1Mask.close(); imgReaderModel2Mask.close(); } } //test if(gain_opt.size()) imgWriterGain.close(); } } catch(string errorString){ cerr << errorString << endl; exit(1); } catch(...){ cerr << "Error in forward direction " << endl; exit(2); } try{ if(find(direction_opt.begin(),direction_opt.end(),"backward")!=direction_opt.end()){ ///////////////////////////// backward model ///////////////////////// cout << "Running backward model" << endl; obsindex=relobsindex.size()-1; if(verbose_opt[0]) cout << "Opening image " << outputbw_opt[0] << " for writing " << endl; // imgWriterEst.open(theOutput,ncol,nrow,2,theType,imageType,option_opt); ImgWriterGdal imgWriterEst; ImgWriterGdal imgWriterUncert; imgWriterEst.open(outputbw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); imgWriterEst.setProjectionProj4(projection_opt[0]); imgWriterEst.setGeoTransform(geotransform); imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]); imgWriterUncert.open(uncertbw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); imgWriterUncert.setProjectionProj4(projection_opt[0]); imgWriterUncert.setGeoTransform(geotransform); try{ // //test // if(gain_opt.size()){ // imgWriterGain.open(gain_opt[0],ncol,nrow,nmodel,GDT_Float64,imageType,option_opt); // imgWriterGain.setProjectionProj4(projection_opt[0]); // imgWriterGain.setGeoTransform(geotransform); // imgWriterGain.GDALSetNoDataValue(obsnodata_opt[0]); // } if(verbose_opt[0]){ cout << "processing time " << tmodel_opt.back() << endl; if(obsindexrelobsindex[obsindex]); cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl; } else cout << "There is no next observation" << endl; } if(model_opt.size()==nmodel){ imgReaderModel1.open(model_opt.back()); imgReaderModel1.setNoData(modnodata_opt); } if(modelmask_opt.size()==nmodel){ imgReaderModel1Mask.open(modelmask_opt[0]); imgReaderModel1Mask.setNoData(msknodata_opt); } } catch(string errorString){ cerr << errorString << endl; } catch(...){ cerr << "Error opening file " << model_opt[0] << endl; } double modRow=0; double modCol=0; double lowerCol=0; double upperCol=0; RESAMPLE theResample=BILINEAR; if(relobsindex.back() estReadBuffer; vector lineModelMask; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); // //test // vector gainWriteBuffer(ncol); try{ for(int irow=jrow;irow=imgReaderModel1.nrOfRow()){ cerr << "Error: geo coordinates (" << geox << "," << geoy << ") not covered in model image " << imgReaderModel1.getFileName() << endl; assert(modRow>=0&&modRowmodCol){ if(imgReaderModel1Mask.isNoData(lineModelMask[modCol])){ estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test // gainWriteBuffer[icol]=obsnodata_opt[0]; continue; } } lowerCol=modCol-0.5; lowerCol=static_cast(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol]; // double modValue=estReadBuffer[modCol]; if(imgReaderModel1.isNoData(modValue)){ estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test // gainWriteBuffer[icol]=obsnodata_opt[0]; continue; } estWriteBuffer[icol]=modValue; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; } uncertWriteBuffer[icol]=uncertModel_opt[0];//*stdDev*stdDev; //test // gainWriteBuffer[icol]=0; } } imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,nmodel-1); imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,nmodel-1); // //test // if(gain_opt.size()) // imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0); } } catch(string errorString){ cerr << errorString << endl; } catch(...){ cerr << "Error writing file " << imgWriterEst.getFileName() << endl; } } } else{//we have a measurement at end time if(verbose_opt[0]) cout << "we have a measurement at end time" << endl; if(observation_opt.size()==nobs){ imgReaderObs.open(observation_opt.back()); imgReaderObs.setNoData(obsnodata_opt); } if(observationmask_opt.size()==nobs){ imgReaderObsMask.open(observationmask_opt.back()); imgReaderObsMask.setNoData(msknodata_opt); } imgReaderObs.getGeoTransform(geotransform); vector< vector > obsLineVector(down_opt[0]); vector obsLineBuffer; vector obsMaskLineBuffer; vector modelMaskLineBuffer; vector obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel vector estReadBuffer; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); vector uncertObsLineBuffer; // //test // vector gainWriteBuffer(ncol); if(verbose_opt[0]) cout << "initialize obsLineVector" << endl; assert(down_opt[0]%2);//window size must be odd int readObsBand=(observation_opt.size()==nobs)? 0:nobs-1; int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:nobs-1; int readModelBand=(model_opt.size()==nmodel)? 0:nmodel-1; int readModelMaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:nmodel-1; for(int iline=-down_opt[0]/2;iline=0&&modRow=0&&modRow(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol]; // double modValue=estReadBuffer[modCol]; double errMod=uncertModel_opt[0];//*stdDev*stdDev; modelIsNoData=modelIsNoData||imgReaderModel1.isNoData(modValue); bool obsIsNoData=false; if(observationmask_opt.size()) obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]); obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]); if(modelIsNoData){//model is nodata: retain observation if(obsIsNoData){//both model and observation nodata estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test // gainWriteBuffer[icol]=obsnodata_opt[0]; } else{ estWriteBuffer[icol]=obsLineBuffer[icol]; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; } uncertWriteBuffer[icol]=uncertObs_opt[0]; } } else{//model is valid: calculate estimate from model estWriteBuffer[icol]=modValue; uncertWriteBuffer[icol]=errMod;//in case observation is not valid //test // gainWriteBuffer[icol]=0; } //measurement update if(!obsIsNoData){ // estWriteBuffer[icol]=estReadBuffer[icol]*modValue1/modValue2 double kalmanGain=1; int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0; int maxCol=(icol+down_opt[0]/2down_opt[0]/2) ? irow-down_opt[0]/2 : 0; int maxRow=(irow+down_opt[0]/2eps_opt[0]) kalmanGain=errorCovariance/(errorCovariance+errObs); else kalmanGain=1; estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]); if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } } if(kalmanGain>=1) kalmanGain=1; //test // gainWriteBuffer[icol]=kalmanGain; } } } imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,nmodel-1); imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,nmodel-1); // //test // if(gain_opt.size()) // imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0); } } if(observation_opt.size()==nobs) imgReaderObs.close(); if(observationmask_opt.size()==nobs) imgReaderObsMask.close(); --obsindex; } if(model_opt.size()==nmodel) imgReaderModel1.close(); if(modelmask_opt.size()==nmodel) imgReaderModel1Mask.close(); imgWriterEst.close(); imgWriterUncert.close(); ImgUpdaterGdal imgUpdaterEst; ImgUpdaterGdal imgUpdaterUncert; for(int modindex=nmodel-2;modindex>=0;--modindex){ imgUpdaterEst.open(outputbw_opt[0]); imgUpdaterEst.setNoData(obsnodata_opt); imgUpdaterUncert.open(uncertbw_opt[0]); if(verbose_opt[0]){ cout << "processing time " << tmodel_opt[modindex] << endl; if(obsindex > obsLineVector(down_opt[0]); vector obsLineBuffer; vector obsMaskLineBuffer; vector model1MaskLineBuffer; vector model2MaskLineBuffer; vector obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel vector model1LineBuffer; vector model2LineBuffer; vector model1buffer;//buffer for model 1 to calculate time regression based on window vector model2buffer;//buffer for model 2 to calculate time regression based on window vector uncertObsLineBuffer; vector< vector > estLineVector(down_opt[0]); vector estLineBuffer; vector estWindowBuffer;//buffer for estimate to calculate average corresponding to model pixel vector uncertReadBuffer; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); //test // vector gainWriteBuffer(ncol); int readObsBand=(observation_opt.size()==nobs)? 0:obsindex; int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:obsindex; int readModel1Band=(model_opt.size()==nmodel)? 0:modindex+1; int readModel2Band=(model_opt.size()==nmodel)? 0:modindex; int readModel1MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex+1; int readModel2MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex; //initialize obsLineVector if(update){ if(verbose_opt[0]) cout << "initialize obsLineVector" << endl; assert(down_opt[0]%2);//window size must be odd for(int iline=-down_opt[0]/2;iline=0&&modRow=0&&modRowdown_opt[0]/2) ? icol-down_opt[0]/2 : 0; int maxCol=(icol+down_opt[0]/2down_opt[0]/2) ? irow-down_opt[0]/2 : 0; int maxRow=(irow+down_opt[0]/2(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue1=(modCol-0.5-lowerCol)*model1LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model1LineBuffer[lowerCol]; model1IsNoData=model1IsNoData||imgReaderModel1.isNoData(modValue1); if(model_opt.size()==nmodel) imgReaderModel2.geo2image(geox,geoy,modCol,modRow); else imgReaderModel1.geo2image(geox,geoy,modCol,modRow); bool model2IsNoData=false; if(modelmask_opt.size()) model2IsNoData=imgReaderModel1Mask.isNoData(model2MaskLineBuffer[modCol]); lowerCol=modCol-0.5; lowerCol=static_cast(lowerCol); upperCol=modCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReaderModel1.nrOfCol()) upperCol=imgReaderModel1.nrOfCol()-1; double modValue2=(modCol-0.5-lowerCol)*model2LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model2LineBuffer[lowerCol]; model2IsNoData=model2IsNoData||imgReaderModel1.isNoData(modValue2); bool obsIsNoData=false; if(observationmask_opt.size()) obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]); obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]); if(imgUpdaterEst.isNoData(estValue)){ //we have not found any valid data yet, better here to take the current model value if valid if(model2IsNoData){//if both estimate and model are no-data, set obs to nodata estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; //test // gainWriteBuffer[icol]=0; } else{ estWriteBuffer[icol]=modValue2; uncertWriteBuffer[icol]=uncertModel_opt[0];//*stdDev*stdDev; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } //test // gainWriteBuffer[icol]=0; } } else{//previous estimate is valid double estMeanValue=0; double estVarValue=0; statobs.meanVar(estWindowBuffer,estMeanValue,estVarValue); double nvalid=0; //time update double processNoiseVariance=processNoise_opt[0]*estVarValue; //estimate stability of weight distribution from model (low resolution) data in a window mod1 -> mod2 and assume distribution holds at fine spatial resolution. if(model1IsNoData||model2IsNoData){ estWriteBuffer[icol]=estValue; // uncertWriteBuffer[icol]=uncertReadBuffer[icol]+processNoiseVariance; //todo: check following line if makes sense uncertWriteBuffer[icol]=uncertReadBuffer[icol]+uncertObs_opt[0]; } else{//model is good double modRatio=modValue2/modValue1;//transition matrix A in Kalman equations estWriteBuffer[icol]=estValue*modRatio; uncertWriteBuffer[icol]=uncertReadBuffer[icol]*modRatio*modRatio+processNoiseVariance; } if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } } //measurement update if(update&&!imgReaderObs.isNoData(obsLineBuffer[icol])){ double kalmanGain=1; if(!imgReaderModel1.isNoData(modValue2)){//model is valid statfactory::StatFactory statobs; statobs.setNoDataValues(obsnodata_opt); double obsMeanValue=0; double obsVarValue=0; double difference=0; statobs.meanVar(obsWindowBuffer,obsMeanValue,obsVarValue); difference=obsMeanValue-modValue2; // errObs=uncertObs_opt[0]*sqrt(difference*difference); errObs=uncertObs_opt[0]*difference*difference;//uncertainty of the observation (R in Kalman equations) if(errObseps_opt[0]) kalmanGain=errorCovariance/(errorCovariance+errObs); else kalmanGain=1; estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]); uncertWriteBuffer[icol]*=(1-kalmanGain); if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } } if(kalmanGain>=1) kalmanGain=1; //test // gainWriteBuffer[icol]=kalmanGain; } } } // //test // if(gain_opt.size()) // imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,modindex); imgUpdaterEst.writeData(estWriteBuffer,GDT_Float64,irow,modindex); imgUpdaterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,modindex); progress=static_cast((irow+1.0)/imgUpdaterEst.nrOfRow()); pfnProgress(progress,pszMessage,pProgressArg); } } //must close writers to ensure flush imgUpdaterEst.close(); imgUpdaterUncert.close(); // imgWriterEst.close(); // imgReaderEst.close(); if(update){ if(observation_opt.size()==nobs) imgReaderObs.close(); if(observationmask_opt.size()==nobs) imgReaderObsMask.close(); --obsindex; } if(model_opt.size()==nmodel){ imgReaderModel1.close(); imgReaderModel2.close(); } if(modelmask_opt.size()==nmodel){ imgReaderModel1Mask.close(); imgReaderModel2Mask.close(); } } // //test // if(gain_opt.size()) // imgWriterGain.close(); } } catch(string errorString){ cerr << errorString << endl; exit(1); } catch(...){ cerr << "Error in backward direction " << endl; exit(2); } if(find(direction_opt.begin(),direction_opt.end(),"smooth")!=direction_opt.end()){ ///////////////////////////// smooth model ///////////////////////// cout << "Running smooth model" << endl; obsindex=0; ImgReaderGdal imgReaderForward(outputfw_opt[0]); ImgReaderGdal imgReaderBackward(outputbw_opt[0]); ImgReaderGdal imgReaderForwardUncert(uncertfw_opt[0]); ImgReaderGdal imgReaderBackwardUncert(uncertbw_opt[0]); imgReaderForward.setNoData(obsnodata_opt); imgReaderBackward.setNoData(obsnodata_opt); assert(imgReaderForward.nrOfBand()==nmodel); assert(imgReaderForwardUncert.nrOfBand()==nmodel); assert(imgReaderBackward.nrOfBand()==nmodel); assert(imgReaderBackwardUncert.nrOfBand()==nmodel); ImgWriterGdal imgWriterEst; imgWriterEst.setNoData(obsnodata_opt); ImgWriterGdal imgWriterUncert; imgWriterEst.open(outputfb_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); imgWriterEst.setProjectionProj4(projection_opt[0]); imgWriterEst.setGeoTransform(geotransform); imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]); imgWriterUncert.open(uncertfb_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); imgWriterUncert.setProjectionProj4(projection_opt[0]); imgWriterUncert.setGeoTransform(geotransform); for(int modindex=0;modindex estForwardBuffer; vector estBackwardBuffer; vector uncertObsLineBuffer; vector uncertForwardBuffer; vector uncertBackwardBuffer; vector uncertReadBuffer; vector estWriteBuffer(ncol); vector uncertWriteBuffer(ncol); // vector lineMask; bool update=false; if(obsindexicol) // uncertObs=uncertObsLineBuffer[icol]; // } double noemer=(C+D); //todo: consistently check for division by zero... if(imgReaderForward.isNoData(A)&&imgReaderBackward.isNoData(B)){ estWriteBuffer[icol]=obsnodata_opt[0]; uncertWriteBuffer[icol]=uncertNodata_opt[0]; } else if(imgReaderForward.isNoData(A)){ estWriteBuffer[icol]=B; uncertWriteBuffer[icol]=uncertBackwardBuffer[icol]; } else if(imgReaderForward.isNoData(B)){ estWriteBuffer[icol]=A; uncertWriteBuffer[icol]=uncertForwardBuffer[icol]; } else{ if(noemer0 estWriteBuffer[icol]=0.5*(A+B); uncertWriteBuffer[icol]=eps_opt[0]; } else{ estWriteBuffer[icol]=(A*D+B*C)/noemer; uncertWriteBuffer[icol]=C*D/noemer; if(obsmin_opt.size()){ if(estWriteBuffer[icol]obsmax_opt[0]) estWriteBuffer[icol]=obsmax_opt[0]; if(uncertWriteBuffer[icol]>obsmax_opt[0]) uncertWriteBuffer[icol]=obsmax_opt[0]; } // double P=0; // if(C>eps_opt[0]) // P+=1.0/C; // if(D>eps_opt[0]) // P+=1.0/D; // if(P>eps_opt[0]) // P=1.0/P; // else // P=0; // uncertWriteBuffer[icol]=P; } } } imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,modindex); imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,modindex); progress=static_cast((irow+1.0)/imgWriterEst.nrOfRow()); pfnProgress(progress,pszMessage,pProgressArg); } if(update){ if(observation_opt.size()==nobs) imgReaderObs.close(); ++obsindex; } } imgReaderForward.close(); imgReaderBackward.close(); imgWriterEst.close(); imgWriterUncert.close(); } if(observation_opt.size(). ***********************************************************************/ #include #include #include #include "base/Optionpk.h" #include "imageclasses/ImgWriterOgr.h" /******************************************************************************/ /*! \page pkascii2ogr pkascii2ogr program to create vector points or polygons from text file ## SYNOPSIS Usage: pkascii2ogr -i input.txt -o output Options: [-f OGRformat] [-x col] [-y col] [--line] [-n fieldname -ot type]* [-fs separator] \section pkascii2ogr_description Description Poor man's utility to create a vector dataset (points or single polygon) from an ASCII textfile. A better alternative is to use virtual vector datasets. Specify the position of the vertices (x and y) in the columns defined by the options (-x -y), starting from 0. The default is to use the first (-dx 0) and second (-dx 1) columns for x and y respectvely. Specify the names and types of the remaining columns in your input file via the option pairs -n and -ot respectively. The default field separator is space. \section pkascii2ogr_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |Input ASCII file | | o | output | std::string | |Output file | | f | f | std::string | ESRI Shapefile |Output sample file format | | x | x | short | 0 |column number of x (0) | | y | y | short | 1 |column number of y (1) | | l | line | bool | false |create OGRPolygon as geometry instead of points. Fields are taken from first point and polygon is automatically closed (no need to repeat first point at last line). (false: use OGRPoint) | | n | name | std::string | |Field names for the columns in the input ascii file | | ot | ot | std::string | Real |Field type (Real, Integer, String) for each of the fields as defined by name | | a_srs | a_srs | std::string | epsg:4326 |Override the projection for the output file, use epsg: or Wkt string | | fs | fs | char | |field separator. | Usage: pkascii2ogr -i input.txt -o output Examples ======== Some examples how to use pkascii2ogr can be found \ref examples_pkascii2ogr "here" **/ using namespace std; int main(int argc, char *argv[]) { Optionpk input_opt("i","input","Input ASCII file"); Optionpk output_opt("o", "output", "Output file"); Optionpk ogrformat_opt("f", "f", "Output sample file format","ESRI Shapefile"); Optionpk colX_opt("x", "x", "column number of x (0)", 0); Optionpk colY_opt("y", "y", "column number of y (1)", 1); Optionpk polygon_opt("l", "line", "create OGRPolygon as geometry instead of points. Fields are taken from first point and polygon is automatically closed (no need to repeat first point at last line). (false: use OGRPoint)", false); Optionpk fname_opt("n", "name", "Field names for the columns in the input ascii file"); Optionpk ftype_opt("ot", "ot", "Field type (Real, Integer, String) for each of the fields as defined by name","Real"); Optionpk projection_opt("a_srs", "a_srs", "Override the projection for the output file, use epsg: or Wkt string", "epsg:4326"); Optionpk fs_opt("fs","fs","field separator.",' '); Optionpk verbose_opt("v", "verbose", "verbose (0)", 0,2); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); ogrformat_opt.retrieveOption(argc,argv); colX_opt.retrieveOption(argc,argv); colY_opt.retrieveOption(argc,argv); polygon_opt.retrieveOption(argc,argv); fname_opt.retrieveOption(argc,argv); ftype_opt.retrieveOption(argc,argv); projection_opt.retrieveOption(argc,argv); fs_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkascii2ogr -i input.txt -o output" << endl; cout << endl; 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 } if(input_opt.empty()){ std::cerr << "No input file provided (use option -i). Use --help for help information"; exit(0); } if(output_opt.empty()){ std::cerr << "No output file provided (use option -o). Use --help for help information"; exit(0); } string theProjection; theProjection=projection_opt[0]; int ogr_typecount=11;//hard coded for now! while(ftype_opt.size() fname(fname_opt.size()); vector ftype(ftype_opt.size()); if(verbose_opt[0]) cout << "field types can be: "; for(int ifield=0;ifield&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ bin_PROGRAMS = pkinfo$(EXEEXT) pkcrop$(EXEEXT) pkdiff$(EXEEXT) \ pkgetmask$(EXEEXT) pksetmask$(EXEEXT) pkcreatect$(EXEEXT) \ pkdumpimg$(EXEEXT) pkdumpogr$(EXEEXT) pksieve$(EXEEXT) \ pkstat$(EXEEXT) pkstatascii$(EXEEXT) pkstatogr$(EXEEXT) \ pkstatprofile$(EXEEXT) pkegcs$(EXEEXT) pkextract$(EXEEXT) \ pkfillnodata$(EXEEXT) pkfilter$(EXEEXT) pkfilterdem$(EXEEXT) \ pkfilterascii$(EXEEXT) pkdsm2shadow$(EXEEXT) \ pkcomposite$(EXEEXT) pkpolygonize$(EXEEXT) \ pkascii2img$(EXEEXT) pksvm$(EXEEXT) pkfssvm$(EXEEXT) \ pkascii2ogr$(EXEEXT) pkreclass$(EXEEXT) pkkalman$(EXEEXT) \ $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) # the program to build but not install (the names of the final binaries) #noinst_PROGRAMS = pkkalman @USE_FANN_TRUE@am__append_1 = pkann pkfsann pkregann @USE_LAS_TRUE@am__append_2 = pklas2img @USE_NLOPT_TRUE@am__append_3 = pkoptsvm subdir = src/apps DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp 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) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @USE_FANN_TRUE@am__EXEEXT_1 = pkann$(EXEEXT) pkfsann$(EXEEXT) \ @USE_FANN_TRUE@ pkregann$(EXEEXT) @USE_LAS_TRUE@am__EXEEXT_2 = pklas2img$(EXEEXT) @USE_NLOPT_TRUE@am__EXEEXT_3 = pkoptsvm$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__pkann_SOURCES_DIST = $(top_srcdir)/src/algorithms/myfann_cpp.h \ pkann.cc @USE_FANN_TRUE@am_pkann_OBJECTS = pkann-pkann.$(OBJEXT) pkann_OBJECTS = $(am_pkann_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la @USE_FANN_TRUE@pkann_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @USE_FANN_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = pkann_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(pkann_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_pkascii2img_OBJECTS = pkascii2img.$(OBJEXT) pkascii2img_OBJECTS = $(am_pkascii2img_OBJECTS) pkascii2img_LDADD = $(LDADD) pkascii2img_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkascii2ogr_OBJECTS = pkascii2ogr.$(OBJEXT) pkascii2ogr_OBJECTS = $(am_pkascii2ogr_OBJECTS) pkascii2ogr_LDADD = $(LDADD) pkascii2ogr_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkcomposite_OBJECTS = pkcomposite.$(OBJEXT) pkcomposite_OBJECTS = $(am_pkcomposite_OBJECTS) pkcomposite_LDADD = $(LDADD) pkcomposite_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkcreatect_OBJECTS = pkcreatect.$(OBJEXT) pkcreatect_OBJECTS = $(am_pkcreatect_OBJECTS) pkcreatect_LDADD = $(LDADD) pkcreatect_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkcrop_OBJECTS = pkcrop.$(OBJEXT) pkcrop_OBJECTS = $(am_pkcrop_OBJECTS) pkcrop_DEPENDENCIES = am_pkdiff_OBJECTS = pkdiff.$(OBJEXT) pkdiff_OBJECTS = $(am_pkdiff_OBJECTS) pkdiff_DEPENDENCIES = am_pkdsm2shadow_OBJECTS = pkdsm2shadow.$(OBJEXT) pkdsm2shadow_OBJECTS = $(am_pkdsm2shadow_OBJECTS) pkdsm2shadow_DEPENDENCIES = am_pkdumpimg_OBJECTS = pkdumpimg.$(OBJEXT) pkdumpimg_OBJECTS = $(am_pkdumpimg_OBJECTS) pkdumpimg_LDADD = $(LDADD) pkdumpimg_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkdumpogr_OBJECTS = pkdumpogr.$(OBJEXT) pkdumpogr_OBJECTS = $(am_pkdumpogr_OBJECTS) pkdumpogr_LDADD = $(LDADD) pkdumpogr_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkegcs_OBJECTS = pkegcs.$(OBJEXT) pkegcs_OBJECTS = $(am_pkegcs_OBJECTS) pkegcs_DEPENDENCIES = $(am__DEPENDENCIES_2) am_pkextract_OBJECTS = pkextract.$(OBJEXT) pkextract_OBJECTS = $(am_pkextract_OBJECTS) pkextract_DEPENDENCIES = $(am__DEPENDENCIES_2) am_pkfillnodata_OBJECTS = pkfillnodata.$(OBJEXT) pkfillnodata_OBJECTS = $(am_pkfillnodata_OBJECTS) pkfillnodata_LDADD = $(LDADD) pkfillnodata_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkfilter_OBJECTS = pkfilter.$(OBJEXT) pkfilter_OBJECTS = $(am_pkfilter_OBJECTS) pkfilter_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_pkfilterascii_OBJECTS = pkfilterascii.$(OBJEXT) pkfilterascii_OBJECTS = $(am_pkfilterascii_OBJECTS) pkfilterascii_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) am_pkfilterdem_OBJECTS = pkfilterdem.$(OBJEXT) pkfilterdem_OBJECTS = $(am_pkfilterdem_OBJECTS) pkfilterdem_DEPENDENCIES = am__pkfsann_SOURCES_DIST = $(top_srcdir)/src/algorithms/myfann_cpp.h \ $(top_srcdir)/src/algorithms/CostFactory.h pkfsann.h \ pkfsann.cc @USE_FANN_TRUE@am_pkfsann_OBJECTS = pkfsann-pkfsann.$(OBJEXT) pkfsann_OBJECTS = $(am_pkfsann_OBJECTS) @USE_FANN_TRUE@pkfsann_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @USE_FANN_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @USE_FANN_TRUE@ $(am__DEPENDENCIES_2) pkfsann_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(pkfsann_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_pkfssvm_OBJECTS = svm.$(OBJEXT) pkfssvm.$(OBJEXT) pkfssvm_OBJECTS = $(am_pkfssvm_OBJECTS) pkfssvm_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_pkgetmask_OBJECTS = pkgetmask.$(OBJEXT) pkgetmask_OBJECTS = $(am_pkgetmask_OBJECTS) pkgetmask_LDADD = $(LDADD) pkgetmask_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkinfo_OBJECTS = pkinfo.$(OBJEXT) pkinfo_OBJECTS = $(am_pkinfo_OBJECTS) pkinfo_DEPENDENCIES = $(am__DEPENDENCIES_2) am_pkkalman_OBJECTS = pkkalman.$(OBJEXT) ImgRegression.$(OBJEXT) pkkalman_OBJECTS = $(am_pkkalman_OBJECTS) pkkalman_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am__pklas2img_SOURCES_DIST = pklas2img.cc @USE_LAS_TRUE@am_pklas2img_OBJECTS = pklas2img.$(OBJEXT) pklas2img_OBJECTS = $(am_pklas2img_OBJECTS) @USE_LAS_TRUE@pklas2img_DEPENDENCIES = \ @USE_LAS_TRUE@ $(top_srcdir)/src/lasclasses/liblasClasses.la \ @USE_LAS_TRUE@ $(am__DEPENDENCIES_2) am__pkoptsvm_SOURCES_DIST = $(top_srcdir)/src/algorithms/OptFactory.h \ $(top_srcdir)/src/algorithms/CostFactorySVM.h pkoptsvm.cc @USE_NLOPT_TRUE@am_pkoptsvm_OBJECTS = pkoptsvm.$(OBJEXT) pkoptsvm_OBJECTS = $(am_pkoptsvm_OBJECTS) @USE_NLOPT_TRUE@pkoptsvm_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @USE_NLOPT_TRUE@ $(am__DEPENDENCIES_2) am_pkpolygonize_OBJECTS = pkpolygonize.$(OBJEXT) pkpolygonize_OBJECTS = $(am_pkpolygonize_OBJECTS) pkpolygonize_LDADD = $(LDADD) pkpolygonize_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkreclass_OBJECTS = pkreclass.$(OBJEXT) pkreclass_OBJECTS = $(am_pkreclass_OBJECTS) pkreclass_LDADD = $(LDADD) pkreclass_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am__pkregann_SOURCES_DIST = $(top_srcdir)/src/algorithms/myfann_cpp.h \ pkregann.cc @USE_FANN_TRUE@am_pkregann_OBJECTS = pkregann-pkregann.$(OBJEXT) pkregann_OBJECTS = $(am_pkregann_OBJECTS) @USE_FANN_TRUE@pkregann_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @USE_FANN_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @USE_FANN_TRUE@ $(am__DEPENDENCIES_2) pkregann_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(pkregann_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_pksetmask_OBJECTS = pksetmask.$(OBJEXT) pksetmask_OBJECTS = $(am_pksetmask_OBJECTS) pksetmask_LDADD = $(LDADD) pksetmask_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pksieve_OBJECTS = pksieve.$(OBJEXT) pksieve_OBJECTS = $(am_pksieve_OBJECTS) pksieve_LDADD = $(LDADD) pksieve_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/src/algorithms/libalgorithms.la \ $(top_builddir)/src/imageclasses/libimageClasses.la \ $(top_builddir)/src/fileclasses/libfileClasses.la am_pkstat_OBJECTS = ImgRegression.$(OBJEXT) pkstat.$(OBJEXT) pkstat_OBJECTS = $(am_pkstat_OBJECTS) pkstat_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_pkstatascii_OBJECTS = pkstatascii.$(OBJEXT) pkstatascii_OBJECTS = $(am_pkstatascii_OBJECTS) pkstatascii_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_pkstatogr_OBJECTS = pkstatogr.$(OBJEXT) pkstatogr_OBJECTS = $(am_pkstatogr_OBJECTS) pkstatogr_DEPENDENCIES = am_pkstatprofile_OBJECTS = pkstatprofile.$(OBJEXT) pkstatprofile_OBJECTS = $(am_pkstatprofile_OBJECTS) pkstatprofile_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) am_pksvm_OBJECTS = svm.$(OBJEXT) pksvm.$(OBJEXT) pksvm_OBJECTS = $(am_pksvm_OBJECTS) pksvm_DEPENDENCIES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(pkann_SOURCES) $(pkascii2img_SOURCES) \ $(pkascii2ogr_SOURCES) $(pkcomposite_SOURCES) \ $(pkcreatect_SOURCES) $(pkcrop_SOURCES) $(pkdiff_SOURCES) \ $(pkdsm2shadow_SOURCES) $(pkdumpimg_SOURCES) \ $(pkdumpogr_SOURCES) $(pkegcs_SOURCES) $(pkextract_SOURCES) \ $(pkfillnodata_SOURCES) $(pkfilter_SOURCES) \ $(pkfilterascii_SOURCES) $(pkfilterdem_SOURCES) \ $(pkfsann_SOURCES) $(pkfssvm_SOURCES) $(pkgetmask_SOURCES) \ $(pkinfo_SOURCES) $(pkkalman_SOURCES) $(pklas2img_SOURCES) \ $(pkoptsvm_SOURCES) $(pkpolygonize_SOURCES) \ $(pkreclass_SOURCES) $(pkregann_SOURCES) $(pksetmask_SOURCES) \ $(pksieve_SOURCES) $(pkstat_SOURCES) $(pkstatascii_SOURCES) \ $(pkstatogr_SOURCES) $(pkstatprofile_SOURCES) $(pksvm_SOURCES) DIST_SOURCES = $(am__pkann_SOURCES_DIST) $(pkascii2img_SOURCES) \ $(pkascii2ogr_SOURCES) $(pkcomposite_SOURCES) \ $(pkcreatect_SOURCES) $(pkcrop_SOURCES) $(pkdiff_SOURCES) \ $(pkdsm2shadow_SOURCES) $(pkdumpimg_SOURCES) \ $(pkdumpogr_SOURCES) $(pkegcs_SOURCES) $(pkextract_SOURCES) \ $(pkfillnodata_SOURCES) $(pkfilter_SOURCES) \ $(pkfilterascii_SOURCES) $(pkfilterdem_SOURCES) \ $(am__pkfsann_SOURCES_DIST) $(pkfssvm_SOURCES) \ $(pkgetmask_SOURCES) $(pkinfo_SOURCES) $(pkkalman_SOURCES) \ $(am__pklas2img_SOURCES_DIST) $(am__pkoptsvm_SOURCES_DIST) \ $(pkpolygonize_SOURCES) $(pkreclass_SOURCES) \ $(am__pkregann_SOURCES_DIST) $(pksetmask_SOURCES) \ $(pksieve_SOURCES) $(pkstat_SOURCES) $(pkstatascii_SOURCES) \ $(pkstatogr_SOURCES) $(pkstatprofile_SOURCES) $(pksvm_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(GDAL_CFLAGS) @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 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@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FANN_CFLAGS = @FANN_CFLAGS@ FANN_LIBS = @FANN_LIBS@ FC = @FC@ FCFLAGS = @FCFLAGS@ FGREP = @FGREP@ GDAL_CFLAGS = @GDAL_CFLAGS@ GDAL_CONFIG = @GDAL_CONFIG@ GDAL_DEP_LDFLAGS = @GDAL_DEP_LDFLAGS@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GDAL_OGR_ENABLED = @GDAL_OGR_ENABLED@ GDAL_VERSION = @GDAL_VERSION@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LASCLASSES_OPT = @LASCLASSES_OPT@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NLOPT_CFLAGS = @NLOPT_CFLAGS@ NLOPT_LIBS = @NLOPT_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKTOOLS_SO_VERSION = @PKTOOLS_SO_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LDADD = $(GSL_LIBS) $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.la $(top_builddir)/src/imageclasses/libimageClasses.la $(top_builddir)/src/fileclasses/libfileClasses.la @USE_FANN_TRUE@pkann_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h pkann.cc @USE_FANN_TRUE@pkann_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS) @USE_FANN_TRUE@pkann_LDADD = $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS) -lgsl @USE_FANN_TRUE@pkfsann_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h $(top_srcdir)/src/algorithms/CostFactory.h pkfsann.h pkfsann.cc @USE_FANN_TRUE@pkfsann_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS) @USE_FANN_TRUE@pkfsann_LDADD = $(GSL_LIBS) $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS) -lalgorithms -lgsl @USE_FANN_TRUE@pkregann_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h pkregann.cc @USE_FANN_TRUE@pkregann_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS) @USE_FANN_TRUE@pkregann_LDADD = $(GSL_LIBS) $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS) @USE_LAS_TRUE@pklas2img_SOURCES = pklas2img.cc @USE_LAS_TRUE@pklas2img_LDADD = -lgsl $(top_srcdir)/src/lasclasses/liblasClasses.la -llas $(AM_LDFLAGS) @USE_NLOPT_TRUE@pkoptsvm_SOURCES = $(top_srcdir)/src/algorithms/OptFactory.h $(top_srcdir)/src/algorithms/CostFactorySVM.h pkoptsvm.cc @USE_NLOPT_TRUE@pkoptsvm_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt -lgsl # list of sources for the binaries pkinfo_SOURCES = pkinfo.cc pkinfo_LDADD = $(AM_LDFLAGS) -lgsl pkcrop_SOURCES = pkcrop.cc pkcrop_LDADD = -lgsl pkdiff_SOURCES = pkdiff.cc pkdiff_LDADD = -lgsl pkgetmask_SOURCES = pkgetmask.cc pksetmask_SOURCES = pksetmask.cc pkcreatect_SOURCES = pkcreatect.cc pkdumpimg_SOURCES = pkdumpimg.cc pkdumpogr_SOURCES = pkdumpogr.h pkdumpogr.cc pksieve_SOURCES = pksieve.cc pkstat_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h $(top_srcdir)/src/algorithms/ImgRegression.h $(top_srcdir)/src/algorithms/ImgRegression.cc pkstat.cc pkstat_LDADD = -lgsl -lgslcblas $(GSL_LIBS) $(AM_LDFLAGS) pkstatprofile_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h pkstatprofile.cc pkstatprofile_LDADD = -lgsl -lgslcblas $(GSL_LIBS) $(AM_LDFLAGS) pkstatascii_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h pkstatascii.cc pkstatascii_LDADD = -lgsl -lgslcblas $(GSL_LIBS) $(AM_LDFLAGS) pkstatogr_SOURCES = pkstatogr.cc pkstatogr_LDADD = -lgsl pkegcs_SOURCES = pkegcs.cc pkegcs_LDADD = $(AM_LDFLAGS) -lgsl -lgdal pkextract_SOURCES = pkextract.cc pkextract_LDADD = $(AM_LDFLAGS) -lgsl -lgdal pkfillnodata_SOURCES = pkfillnodata.cc pkfilter_SOURCES = pkfilter.cc pkfilter_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgsl -lgdal pkkalman_SOURCES = pkkalman.cc $(top_srcdir)/src/algorithms/ImgRegression.h $(top_srcdir)/src/algorithms/ImgRegression.cc pkkalman_LDADD = -lalgorithms -lgsl $(GSL_LIBS) $(AM_LDFLAGS) -lalgorithms pkfilterdem_SOURCES = pkfilterdem.cc pkfilterdem_LDADD = -lgsl pkfilterascii_SOURCES = pkfilterascii.cc pkfilterascii_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgsl -lgdal pkdsm2shadow_SOURCES = pkdsm2shadow.cc pkdsm2shadow_LDADD = -lgsl pkcomposite_SOURCES = pkcomposite.cc pkpolygonize_SOURCES = pkpolygonize.cc pksvm_SOURCES = $(top_srcdir)/src/algorithms/svm.h $(top_srcdir)/src/algorithms/svm.cpp pksvm.cc pksvm_LDADD = -lgsl pkfssvm_SOURCES = $(top_srcdir)/src/algorithms/svm.h $(top_srcdir)/src/algorithms/FeatureSelector.h $(top_srcdir)/src/algorithms/CostFactorySVM.h $(top_srcdir)/src/algorithms/svm.cpp pkfssvm.cc pkfssvm_LDADD = -lgsl $(GSL_LIBS) $(AM_LDFLAGS) -lalgorithms pkascii2img_SOURCES = pkascii2img.cc pkascii2ogr_SOURCES = pkascii2ogr.cc pkreclass_SOURCES = pkreclass.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/apps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/apps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list pkann$(EXEEXT): $(pkann_OBJECTS) $(pkann_DEPENDENCIES) $(EXTRA_pkann_DEPENDENCIES) @rm -f pkann$(EXEEXT) $(AM_V_CXXLD)$(pkann_LINK) $(pkann_OBJECTS) $(pkann_LDADD) $(LIBS) pkascii2img$(EXEEXT): $(pkascii2img_OBJECTS) $(pkascii2img_DEPENDENCIES) $(EXTRA_pkascii2img_DEPENDENCIES) @rm -f pkascii2img$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkascii2img_OBJECTS) $(pkascii2img_LDADD) $(LIBS) pkascii2ogr$(EXEEXT): $(pkascii2ogr_OBJECTS) $(pkascii2ogr_DEPENDENCIES) $(EXTRA_pkascii2ogr_DEPENDENCIES) @rm -f pkascii2ogr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkascii2ogr_OBJECTS) $(pkascii2ogr_LDADD) $(LIBS) pkcomposite$(EXEEXT): $(pkcomposite_OBJECTS) $(pkcomposite_DEPENDENCIES) $(EXTRA_pkcomposite_DEPENDENCIES) @rm -f pkcomposite$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkcomposite_OBJECTS) $(pkcomposite_LDADD) $(LIBS) pkcreatect$(EXEEXT): $(pkcreatect_OBJECTS) $(pkcreatect_DEPENDENCIES) $(EXTRA_pkcreatect_DEPENDENCIES) @rm -f pkcreatect$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkcreatect_OBJECTS) $(pkcreatect_LDADD) $(LIBS) pkcrop$(EXEEXT): $(pkcrop_OBJECTS) $(pkcrop_DEPENDENCIES) $(EXTRA_pkcrop_DEPENDENCIES) @rm -f pkcrop$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkcrop_OBJECTS) $(pkcrop_LDADD) $(LIBS) pkdiff$(EXEEXT): $(pkdiff_OBJECTS) $(pkdiff_DEPENDENCIES) $(EXTRA_pkdiff_DEPENDENCIES) @rm -f pkdiff$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkdiff_OBJECTS) $(pkdiff_LDADD) $(LIBS) pkdsm2shadow$(EXEEXT): $(pkdsm2shadow_OBJECTS) $(pkdsm2shadow_DEPENDENCIES) $(EXTRA_pkdsm2shadow_DEPENDENCIES) @rm -f pkdsm2shadow$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkdsm2shadow_OBJECTS) $(pkdsm2shadow_LDADD) $(LIBS) pkdumpimg$(EXEEXT): $(pkdumpimg_OBJECTS) $(pkdumpimg_DEPENDENCIES) $(EXTRA_pkdumpimg_DEPENDENCIES) @rm -f pkdumpimg$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkdumpimg_OBJECTS) $(pkdumpimg_LDADD) $(LIBS) pkdumpogr$(EXEEXT): $(pkdumpogr_OBJECTS) $(pkdumpogr_DEPENDENCIES) $(EXTRA_pkdumpogr_DEPENDENCIES) @rm -f pkdumpogr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkdumpogr_OBJECTS) $(pkdumpogr_LDADD) $(LIBS) pkegcs$(EXEEXT): $(pkegcs_OBJECTS) $(pkegcs_DEPENDENCIES) $(EXTRA_pkegcs_DEPENDENCIES) @rm -f pkegcs$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkegcs_OBJECTS) $(pkegcs_LDADD) $(LIBS) pkextract$(EXEEXT): $(pkextract_OBJECTS) $(pkextract_DEPENDENCIES) $(EXTRA_pkextract_DEPENDENCIES) @rm -f pkextract$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkextract_OBJECTS) $(pkextract_LDADD) $(LIBS) pkfillnodata$(EXEEXT): $(pkfillnodata_OBJECTS) $(pkfillnodata_DEPENDENCIES) $(EXTRA_pkfillnodata_DEPENDENCIES) @rm -f pkfillnodata$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkfillnodata_OBJECTS) $(pkfillnodata_LDADD) $(LIBS) pkfilter$(EXEEXT): $(pkfilter_OBJECTS) $(pkfilter_DEPENDENCIES) $(EXTRA_pkfilter_DEPENDENCIES) @rm -f pkfilter$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkfilter_OBJECTS) $(pkfilter_LDADD) $(LIBS) pkfilterascii$(EXEEXT): $(pkfilterascii_OBJECTS) $(pkfilterascii_DEPENDENCIES) $(EXTRA_pkfilterascii_DEPENDENCIES) @rm -f pkfilterascii$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkfilterascii_OBJECTS) $(pkfilterascii_LDADD) $(LIBS) pkfilterdem$(EXEEXT): $(pkfilterdem_OBJECTS) $(pkfilterdem_DEPENDENCIES) $(EXTRA_pkfilterdem_DEPENDENCIES) @rm -f pkfilterdem$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkfilterdem_OBJECTS) $(pkfilterdem_LDADD) $(LIBS) pkfsann$(EXEEXT): $(pkfsann_OBJECTS) $(pkfsann_DEPENDENCIES) $(EXTRA_pkfsann_DEPENDENCIES) @rm -f pkfsann$(EXEEXT) $(AM_V_CXXLD)$(pkfsann_LINK) $(pkfsann_OBJECTS) $(pkfsann_LDADD) $(LIBS) pkfssvm$(EXEEXT): $(pkfssvm_OBJECTS) $(pkfssvm_DEPENDENCIES) $(EXTRA_pkfssvm_DEPENDENCIES) @rm -f pkfssvm$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkfssvm_OBJECTS) $(pkfssvm_LDADD) $(LIBS) pkgetmask$(EXEEXT): $(pkgetmask_OBJECTS) $(pkgetmask_DEPENDENCIES) $(EXTRA_pkgetmask_DEPENDENCIES) @rm -f pkgetmask$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkgetmask_OBJECTS) $(pkgetmask_LDADD) $(LIBS) pkinfo$(EXEEXT): $(pkinfo_OBJECTS) $(pkinfo_DEPENDENCIES) $(EXTRA_pkinfo_DEPENDENCIES) @rm -f pkinfo$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkinfo_OBJECTS) $(pkinfo_LDADD) $(LIBS) pkkalman$(EXEEXT): $(pkkalman_OBJECTS) $(pkkalman_DEPENDENCIES) $(EXTRA_pkkalman_DEPENDENCIES) @rm -f pkkalman$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkkalman_OBJECTS) $(pkkalman_LDADD) $(LIBS) pklas2img$(EXEEXT): $(pklas2img_OBJECTS) $(pklas2img_DEPENDENCIES) $(EXTRA_pklas2img_DEPENDENCIES) @rm -f pklas2img$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pklas2img_OBJECTS) $(pklas2img_LDADD) $(LIBS) pkoptsvm$(EXEEXT): $(pkoptsvm_OBJECTS) $(pkoptsvm_DEPENDENCIES) $(EXTRA_pkoptsvm_DEPENDENCIES) @rm -f pkoptsvm$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkoptsvm_OBJECTS) $(pkoptsvm_LDADD) $(LIBS) pkpolygonize$(EXEEXT): $(pkpolygonize_OBJECTS) $(pkpolygonize_DEPENDENCIES) $(EXTRA_pkpolygonize_DEPENDENCIES) @rm -f pkpolygonize$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkpolygonize_OBJECTS) $(pkpolygonize_LDADD) $(LIBS) pkreclass$(EXEEXT): $(pkreclass_OBJECTS) $(pkreclass_DEPENDENCIES) $(EXTRA_pkreclass_DEPENDENCIES) @rm -f pkreclass$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkreclass_OBJECTS) $(pkreclass_LDADD) $(LIBS) pkregann$(EXEEXT): $(pkregann_OBJECTS) $(pkregann_DEPENDENCIES) $(EXTRA_pkregann_DEPENDENCIES) @rm -f pkregann$(EXEEXT) $(AM_V_CXXLD)$(pkregann_LINK) $(pkregann_OBJECTS) $(pkregann_LDADD) $(LIBS) pksetmask$(EXEEXT): $(pksetmask_OBJECTS) $(pksetmask_DEPENDENCIES) $(EXTRA_pksetmask_DEPENDENCIES) @rm -f pksetmask$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pksetmask_OBJECTS) $(pksetmask_LDADD) $(LIBS) pksieve$(EXEEXT): $(pksieve_OBJECTS) $(pksieve_DEPENDENCIES) $(EXTRA_pksieve_DEPENDENCIES) @rm -f pksieve$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pksieve_OBJECTS) $(pksieve_LDADD) $(LIBS) pkstat$(EXEEXT): $(pkstat_OBJECTS) $(pkstat_DEPENDENCIES) $(EXTRA_pkstat_DEPENDENCIES) @rm -f pkstat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkstat_OBJECTS) $(pkstat_LDADD) $(LIBS) pkstatascii$(EXEEXT): $(pkstatascii_OBJECTS) $(pkstatascii_DEPENDENCIES) $(EXTRA_pkstatascii_DEPENDENCIES) @rm -f pkstatascii$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkstatascii_OBJECTS) $(pkstatascii_LDADD) $(LIBS) pkstatogr$(EXEEXT): $(pkstatogr_OBJECTS) $(pkstatogr_DEPENDENCIES) $(EXTRA_pkstatogr_DEPENDENCIES) @rm -f pkstatogr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkstatogr_OBJECTS) $(pkstatogr_LDADD) $(LIBS) pkstatprofile$(EXEEXT): $(pkstatprofile_OBJECTS) $(pkstatprofile_DEPENDENCIES) $(EXTRA_pkstatprofile_DEPENDENCIES) @rm -f pkstatprofile$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pkstatprofile_OBJECTS) $(pkstatprofile_LDADD) $(LIBS) pksvm$(EXEEXT): $(pksvm_OBJECTS) $(pksvm_DEPENDENCIES) $(EXTRA_pksvm_DEPENDENCIES) @rm -f pksvm$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pksvm_OBJECTS) $(pksvm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImgRegression.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkann-pkann.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkascii2img.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkascii2ogr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkcomposite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkcreatect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkcrop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkdiff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkdsm2shadow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkdumpimg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkdumpogr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkegcs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkextract.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkfillnodata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkfilter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkfilterascii.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkfilterdem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkfsann-pkfsann.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkfssvm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgetmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkkalman.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pklas2img.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkoptsvm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkpolygonize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkreclass.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkregann-pkregann.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pksetmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pksieve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkstatascii.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkstatogr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkstatprofile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pksvm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svm.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< pkann-pkann.o: pkann.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkann_CXXFLAGS) $(CXXFLAGS) -MT pkann-pkann.o -MD -MP -MF $(DEPDIR)/pkann-pkann.Tpo -c -o pkann-pkann.o `test -f 'pkann.cc' || echo '$(srcdir)/'`pkann.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pkann-pkann.Tpo $(DEPDIR)/pkann-pkann.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pkann.cc' object='pkann-pkann.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkann_CXXFLAGS) $(CXXFLAGS) -c -o pkann-pkann.o `test -f 'pkann.cc' || echo '$(srcdir)/'`pkann.cc pkann-pkann.obj: pkann.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkann_CXXFLAGS) $(CXXFLAGS) -MT pkann-pkann.obj -MD -MP -MF $(DEPDIR)/pkann-pkann.Tpo -c -o pkann-pkann.obj `if test -f 'pkann.cc'; then $(CYGPATH_W) 'pkann.cc'; else $(CYGPATH_W) '$(srcdir)/pkann.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pkann-pkann.Tpo $(DEPDIR)/pkann-pkann.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pkann.cc' object='pkann-pkann.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkann_CXXFLAGS) $(CXXFLAGS) -c -o pkann-pkann.obj `if test -f 'pkann.cc'; then $(CYGPATH_W) 'pkann.cc'; else $(CYGPATH_W) '$(srcdir)/pkann.cc'; fi` pkfsann-pkfsann.o: pkfsann.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkfsann_CXXFLAGS) $(CXXFLAGS) -MT pkfsann-pkfsann.o -MD -MP -MF $(DEPDIR)/pkfsann-pkfsann.Tpo -c -o pkfsann-pkfsann.o `test -f 'pkfsann.cc' || echo '$(srcdir)/'`pkfsann.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pkfsann-pkfsann.Tpo $(DEPDIR)/pkfsann-pkfsann.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pkfsann.cc' object='pkfsann-pkfsann.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkfsann_CXXFLAGS) $(CXXFLAGS) -c -o pkfsann-pkfsann.o `test -f 'pkfsann.cc' || echo '$(srcdir)/'`pkfsann.cc pkfsann-pkfsann.obj: pkfsann.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkfsann_CXXFLAGS) $(CXXFLAGS) -MT pkfsann-pkfsann.obj -MD -MP -MF $(DEPDIR)/pkfsann-pkfsann.Tpo -c -o pkfsann-pkfsann.obj `if test -f 'pkfsann.cc'; then $(CYGPATH_W) 'pkfsann.cc'; else $(CYGPATH_W) '$(srcdir)/pkfsann.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pkfsann-pkfsann.Tpo $(DEPDIR)/pkfsann-pkfsann.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pkfsann.cc' object='pkfsann-pkfsann.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkfsann_CXXFLAGS) $(CXXFLAGS) -c -o pkfsann-pkfsann.obj `if test -f 'pkfsann.cc'; then $(CYGPATH_W) 'pkfsann.cc'; else $(CYGPATH_W) '$(srcdir)/pkfsann.cc'; fi` svm.o: $(top_srcdir)/src/algorithms/svm.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT svm.o -MD -MP -MF $(DEPDIR)/svm.Tpo -c -o svm.o `test -f '$(top_srcdir)/src/algorithms/svm.cpp' || echo '$(srcdir)/'`$(top_srcdir)/src/algorithms/svm.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/svm.Tpo $(DEPDIR)/svm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/src/algorithms/svm.cpp' object='svm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o svm.o `test -f '$(top_srcdir)/src/algorithms/svm.cpp' || echo '$(srcdir)/'`$(top_srcdir)/src/algorithms/svm.cpp svm.obj: $(top_srcdir)/src/algorithms/svm.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT svm.obj -MD -MP -MF $(DEPDIR)/svm.Tpo -c -o svm.obj `if test -f '$(top_srcdir)/src/algorithms/svm.cpp'; then $(CYGPATH_W) '$(top_srcdir)/src/algorithms/svm.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/algorithms/svm.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/svm.Tpo $(DEPDIR)/svm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/src/algorithms/svm.cpp' object='svm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o svm.obj `if test -f '$(top_srcdir)/src/algorithms/svm.cpp'; then $(CYGPATH_W) '$(top_srcdir)/src/algorithms/svm.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/algorithms/svm.cpp'; fi` ImgRegression.o: $(top_srcdir)/src/algorithms/ImgRegression.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ImgRegression.o -MD -MP -MF $(DEPDIR)/ImgRegression.Tpo -c -o ImgRegression.o `test -f '$(top_srcdir)/src/algorithms/ImgRegression.cc' || echo '$(srcdir)/'`$(top_srcdir)/src/algorithms/ImgRegression.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ImgRegression.Tpo $(DEPDIR)/ImgRegression.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/src/algorithms/ImgRegression.cc' object='ImgRegression.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ImgRegression.o `test -f '$(top_srcdir)/src/algorithms/ImgRegression.cc' || echo '$(srcdir)/'`$(top_srcdir)/src/algorithms/ImgRegression.cc ImgRegression.obj: $(top_srcdir)/src/algorithms/ImgRegression.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ImgRegression.obj -MD -MP -MF $(DEPDIR)/ImgRegression.Tpo -c -o ImgRegression.obj `if test -f '$(top_srcdir)/src/algorithms/ImgRegression.cc'; then $(CYGPATH_W) '$(top_srcdir)/src/algorithms/ImgRegression.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/algorithms/ImgRegression.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ImgRegression.Tpo $(DEPDIR)/ImgRegression.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/src/algorithms/ImgRegression.cc' object='ImgRegression.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ImgRegression.obj `if test -f '$(top_srcdir)/src/algorithms/ImgRegression.cc'; then $(CYGPATH_W) '$(top_srcdir)/src/algorithms/ImgRegression.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/algorithms/ImgRegression.cc'; fi` pkregann-pkregann.o: pkregann.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkregann_CXXFLAGS) $(CXXFLAGS) -MT pkregann-pkregann.o -MD -MP -MF $(DEPDIR)/pkregann-pkregann.Tpo -c -o pkregann-pkregann.o `test -f 'pkregann.cc' || echo '$(srcdir)/'`pkregann.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pkregann-pkregann.Tpo $(DEPDIR)/pkregann-pkregann.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pkregann.cc' object='pkregann-pkregann.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkregann_CXXFLAGS) $(CXXFLAGS) -c -o pkregann-pkregann.o `test -f 'pkregann.cc' || echo '$(srcdir)/'`pkregann.cc pkregann-pkregann.obj: pkregann.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkregann_CXXFLAGS) $(CXXFLAGS) -MT pkregann-pkregann.obj -MD -MP -MF $(DEPDIR)/pkregann-pkregann.Tpo -c -o pkregann-pkregann.obj `if test -f 'pkregann.cc'; then $(CYGPATH_W) 'pkregann.cc'; else $(CYGPATH_W) '$(srcdir)/pkregann.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pkregann-pkregann.Tpo $(DEPDIR)/pkregann-pkregann.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pkregann.cc' object='pkregann-pkregann.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkregann_CXXFLAGS) $(CXXFLAGS) -c -o pkregann-pkregann.obj `if test -f 'pkregann.cc'; then $(CYGPATH_W) 'pkregann.cc'; else $(CYGPATH_W) '$(srcdir)/pkregann.cc'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS ############################################################################### # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pktools-2.6.6/src/apps/pkegcs.cc0000644000113200011300000001373212535562036013455 00000000000000/********************************************************************** pkegcs.cc: Utility for raster files in European Grid Coordinate System Copyright (C) 2008-2014 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 "base/Optionpk.h" #include "imageclasses/ImgReaderGdal.h" #include "algorithms/Egcs.h" /******************************************************************************/ /*! \page pkegcs pkegcs Utility for raster files in European Grid Coordinate System ## SYNOPSIS \section pkegcs_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | image | std::string | |input image to analyse | | b | band | unsigned short | 0 |Band specific information | | c2b | cell2bb | std::string | |convert cell code to geo coordinates of boundingbox (e.g. 32-AB) | | c2m | cell2mid | std::string | |convert cell code to centre in geo coordinates (e.g. 32-AB) | | g2c | geo2cell | bool | false |get cell code for coordinates in x_opt and y_opt given the resolution in dx_opt | | ref | ref | bool | false |get reference pixel (lower left corner of centre of gravity pixel) | | m | mask | double | 0 |mask value(s) for no data to calculate reference pixel in image | | dx | dx | int | 250 |resolution | | x | x | double | 0 |x coordinate in epsg:3035 | | y | y | double | 0 |y coordinate in epsg:3035 | **/ using namespace std; int main(int argc, char *argv[]) { Optionpk image_opt("i","image","input image to analyse",""); Optionpk band_opt("b", "band", "Band specific information", 0); Optionpk cell2bb_opt("c2b","cell2bb","convert cell code to geo coordinates of boundingbox (e.g. 32-AB)",""); Optionpk cell2mid_opt("c2m","cell2mid","convert cell code to centre in geo coordinates (e.g. 32-AB)",""); Optionpk refpixel_opt("ref", "ref", "get reference pixel (lower left corner of centre of gravity pixel)", false); Optionpk maskValue_opt("m", "mask", "mask value(s) for no data to calculate reference pixel in image",0); Optionpk dx_opt("dx","dx","resolution",250); Optionpk geo2cell_opt("g2c", "geo2cell", "get cell code for coordinates in x_opt and y_opt given the resolution in dx_opt", false); Optionpk x_opt("x","x","x coordinate in epsg:3035",0); Optionpk y_opt("y","y","y coordinate in epsg:3035",0); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=image_opt.retrieveOption(argc,argv); band_opt.retrieveOption(argc,argv); cell2bb_opt.retrieveOption(argc,argv); cell2mid_opt.retrieveOption(argc,argv); geo2cell_opt.retrieveOption(argc,argv); refpixel_opt.retrieveOption(argc,argv); maskValue_opt.retrieveOption(argc,argv); dx_opt.retrieveOption(argc,argv); x_opt.retrieveOption(argc,argv); y_opt.retrieveOption(argc,argv); } catch(std::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 } Egcs egcs; if(cell2bb_opt[0]!=""){ int theULX, theULY, theLRX, theLRY; egcs.setLevel(egcs.cell2level(cell2bb_opt[0])); egcs.cell2bb(cell2bb_opt[0],theULX,theULY,theLRX,theLRY); std::cout << std::setprecision(12) << "--ulx=" << theULX << " --uly=" << theULY << " --lrx=" << theLRX << " --lry=" << theLRY << std::endl; } if(cell2mid_opt[0]!=""){ double midX, midY; egcs.setLevel(egcs.cell2level(cell2mid_opt[0])); egcs.cell2mid(cell2mid_opt[0],midX,midY); std::cout << std::setprecision(12) << "-x=" << midX << " -y=" << midY << std::endl; } if(geo2cell_opt[0]){ egcs.setLevel(egcs.res2level(dx_opt[0])); std::cout << egcs.geo2cell(x_opt[0],y_opt[0]) << std::endl; } if(image_opt[0]!=""){ ImgReaderGdal imgReader; imgReader.open(image_opt[0]); if(refpixel_opt[0]){ assert(band_opt[0] noData; // imgReader.getNoDataValues(noData,band_opt[0]); // std::cout << "number of no data values: " << noData.size() << std::endl; // } double refX,refY; //get centre of reference (centre of gravity) pixel in image imgReader.getRefPix(refX,refY,band_opt[0]); std::cout << std::setprecision(12) << "--x " << refX << " --y " << refY << std::endl; egcs.setLevel(egcs.res2level(imgReader.getDeltaX())); // unsigned short theLevel=egcs.getLevel(imgReader.getDeltaX()); // egcs.setLevel(theLevel); std::cout << "cell code at level " << egcs.getLevel() << " (resolution is " << egcs.getResolution() << "): " << egcs.geo2cell(refX,refY) << std::endl; } } } pktools-2.6.6/src/apps/pkdsm2shadow.cc0000644000113200011300000001721212634226615014604 00000000000000/********************************************************************** pkdsm2shadow.cc: program to calculate sun shadow based on digital surface model and sun angles Copyright (C) 2008-2014 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 #include #include #include "base/Optionpk.h" #include "base/Vector2d.h" #include "algorithms/Filter2d.h" #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" /******************************************************************************/ /*! \page pkdsm2shadow pkdsm2shadow program to calculate sun shadow based on digital surface model and sun angles ## SYNOPSIS Usage: pkdsm2shadow -i input.txt -o output [-sza angle] [-saa angle] Options: [-f value] [-ot type] [-of GDALformat] [-ct filename] [-co option]* Advanced options: [--scale value] [--offset value] \section pkdsm2shadow_description Description Utility to create a binary shadow mask from a digital surface model, based on Sun zenith (-sza) and azimuth angles (-saa). \section pkdsm2shadow_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |input image file | | o | output | std::string | |Output image file | | sza | sza | double | |Sun zenith angle. | | saa | saa | double | |Sun azimuth angle (N=0 E=90 S=180 W=270). | | f | flag | int | 0 |Flag to put in image if pixel shadow | | s | scale | double | |scale used for input dsm: height=scale*input+offset | | off | offset | double | |offset used for input dsm: height=scale*input+offset | | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | ot | otype | std::string | |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate).| | ct | ct | std::string | |color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid) | Usage: pkdsm2shadow -i input.txt -o output [-sza angle] [-saa angle] Examples ======== Some examples how to use pkdsm2shadow can be found \ref examples_pkdsm2shadow "here" **/ using namespace std; /*------------------ Main procedure ----------------*/ int main(int argc,char **argv) { Optionpk input_opt("i","input","input image file"); Optionpk output_opt("o", "output", "Output image file"); Optionpk sza_opt("sza", "sza", "Sun zenith angle."); Optionpk saa_opt("saa", "saa", "Sun azimuth angle (N=0 E=90 S=180 W=270)."); Optionpk flag_opt("f", "flag", "Flag to put in image if pixel shadow", 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).","GTiff"); Optionpk colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk scale_opt("s", "scale", "scale used for input dsm: height=scale*input+offset"); Optionpk offset_opt("off", "offset", "offset used for input dsm: height=scale*input+offset"); Optionpk verbose_opt("v", "verbose", "verbose mode if > 0", 0,2); scale_opt.setHide(1); offset_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); sza_opt.retrieveOption(argc,argv); saa_opt.retrieveOption(argc,argv); flag_opt.retrieveOption(argc,argv); scale_opt.retrieveOption(argc,argv); offset_opt.retrieveOption(argc,argv); option_opt.retrieveOption(argc,argv); otype_opt.retrieveOption(argc,argv); oformat_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkdsm2shadow -i input.txt -o output [-sza angle] [-saa angle]" << endl; cout << endl; 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 input; ImgWriterGdal output; assert(input_opt.size()); assert(output_opt.size()); input.open(input_opt[0]); if(scale_opt.size()) input.setScale(scale_opt[0]); if(offset_opt.size()) input.setOffset(offset_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(); 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]; if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){ string theInterleave="INTERLEAVE="; theInterleave+=input.getInterleave(); option_opt.push_back(theInterleave); } try{ output.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),theType,imageType,option_opt); } catch(string errorstring){ cout << errorstring << endl; exit(4); } output.setProjection(input.getProjection()); double gt[6]; input.getGeoTransform(gt); output.setGeoTransform(gt); if(input.getColorTable()!=NULL) output.setColorTable(input.getColorTable()); filter2d::Filter2d filter2d; if(verbose_opt[0]) std::cout<< "class values: "; if(colorTable_opt.size()) output.setColorTable(colorTable_opt[0]); filter2d.shadowDsm(input,output,sza_opt[0],saa_opt[0],input.getDeltaX(),flag_opt[0]); input.close(); output.close(); return 0; } pktools-2.6.6/src/apps/pkstatascii.cc0000644000113200011300000005421312535563047014522 00000000000000/********************************************************************** pkstatascii.cc: program to calculate basic statistics from text file Copyright (C) 2008-2014 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 "base/Optionpk.h" #include "fileclasses/FileReaderAscii.h" #include "algorithms/StatFactory.h" /******************************************************************************/ /*! \page pkstatascii pkstatascii program to calculate basic statistics from text file ## SYNOPSIS Usage: pkstatascii -i input [-c column]* Options: [-size] [-rnd number [-dist function] [-rnda value -rndb value]] [-mean] [-median] [-var] [-skew] [-stdev] [-sum] [-mm] [-min] [-max] [-hist [-nbin value] [-rel] [-kde]] [-hist2d [-nbin value] [-rel] [-kde]] [-cor] [-rmse] [-reg] [-regerr] Advanced options: [-srcmin value] [-srcmax value] [-fs separator] [-r startrow [-r endrow]] [-o [-t]] [--comment character] \section pkstatascii_description Description The utility pkstatascii calculates basic statistics of a data series in a text file.\section pkstatascii_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |name of the input text file | | c | column | int | 0 |column nr, starting from 0 | | size | size | bool | false |sample size | | rnd | rnd | unsigned int | 0 |generate random numbers | | dist | dist | std::string | gaussian |distribution for generating random numbers, see http://www.gn/software/gsl/manual/gsl-ref_toc.html#TOC320 (only uniform and Gaussian supported yet) | | rnda | rnda | double | 0 |first parameter for random distribution (mean value in case of Gaussian) | | rndb | rndb | double | 1 |second parameter for random distribution (standard deviation in case of Gaussian) | | mean | mean | bool | false |calculate median | | median | median | bool | false |calculate median | | var | var | bool | false |calculate variance | | stdev | stdev | bool | false |calculate standard deviation | | skew | skewness | bool | false |calculate skewness | | kurt | kurtosis | bool | false |calculate kurtosis | | sum | sum | bool | false |calculate sum of column | | mm | minmax | bool | false |calculate minimum and maximum value | | min | min | bool | false |calculate minimum value | | max | max | bool | false |calculate maximum value | | hist | hist | bool | false |calculate histogram | | nbin | nbin | short | |number of bins to calculate histogram | | rel | relative | bool | false |use percentiles for histogram to calculate histogram | | kde | kde | bool | false |Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb | | hist2d | hist2d | bool | false |calculate 2-dimensional histogram based on two columns | | cor | correlation | bool | false |calculate Pearson produc-moment correlation coefficient between two columns (defined by -c -c | | rmse | rmse | bool | false |calculate root mean square error between two columns (defined by -c -c | | reg | regression | bool | false |calculate linear regression between two columns and get correlation coefficient (defined by -c -c | | regerr | regerr | bool | false |calculate linear regression between two columns and get root mean square error (defined by -c -c | | src_min | src_min | double | |start reading source from this minimum value | | src_max | src_max | double | |stop reading source from this maximum value | | fs | fs | char | |field separator. | | r | range | int | 0 |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. | | o | output | bool | false |output the selected columns | | t | transpose | bool | false |transpose input ascii vector (use in combination with --output) | | comment | comment | char | # |comment character | Usage: pkstatascii -i input [-c column]* **/ using namespace std; 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 transpose_opt("t","transpose","transpose input ascii vector (use in combination with --output)",false); 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 rand_opt("rnd", "rnd", "generate random numbers", 0); Optionpk randdist_opt("dist", "dist", "distribution for generating random numbers, see http://www.gn/software/gsl/manual/gsl-ref_toc.html#TOC320 (only uniform and Gaussian supported yet)", "gaussian"); Optionpk randa_opt("rnda", "rnda", "first parameter for random distribution (mean value in case of Gaussian)", 0); Optionpk randb_opt("rndb", "rndb", "second parameter for random distribution (standard deviation in case of Gaussian)", 1); Optionpk mean_opt("mean","mean","calculate median",false); Optionpk median_opt("median","median","calculate median",false); Optionpk var_opt("var","var","calculate variance",false); Optionpk skewness_opt("skew","skewness","calculate skewness",false); Optionpk kurtosis_opt("kurt","kurtosis","calculate kurtosis",false); Optionpk stdev_opt("stdev","stdev","calculate standard deviation",false); Optionpk sum_opt("sum","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",false); Optionpk max_opt("max","max","calculate maximum value",false); Optionpk src_min_opt("src_min","src_min","start reading source from this minimum value"); Optionpk src_max_opt("src_max","src_max","stop reading source from this maximum value"); Optionpk histogram_opt("hist","hist","calculate histogram",false); Optionpk histogram2d_opt("hist2d","hist2d","calculate 2-dimensional histogram based on two columns",false); Optionpk nbin_opt("nbin","nbin","number of bins to calculate histogram"); Optionpk relative_opt("rel","relative","use percentiles for histogram to calculate histogram",false); Optionpk kde_opt("kde","kde","Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb",false); Optionpk correlation_opt("cor","correlation","calculate Pearson produc-moment correlation coefficient between two columns (defined by -c -c ",false); Optionpk rmse_opt("rmse","rmse","calculate root mean square error between two columns (defined by -c -c ",false); Optionpk reg_opt("reg","regression","calculate linear regression between two columns and get correlation coefficient (defined by -c -c ",false); Optionpk regerr_opt("regerr","regerr","calculate linear regression between two columns and get root mean square error (defined by -c -c ",false); Optionpk verbose_opt("v", "verbose", "verbose mode when positive", 0,2); src_min_opt.setHide(1); src_max_opt.setHide(1); fs_opt.setHide(1); range_opt.setHide(1); output_opt.setHide(1); transpose_opt.setHide(1); comment_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ //mandatory options doProcess=input_opt.retrieveOption(argc,argv); col_opt.retrieveOption(argc,argv); //optional options size_opt.retrieveOption(argc,argv); rand_opt.retrieveOption(argc,argv); randdist_opt.retrieveOption(argc,argv); randa_opt.retrieveOption(argc,argv); randb_opt.retrieveOption(argc,argv); mean_opt.retrieveOption(argc,argv); median_opt.retrieveOption(argc,argv); var_opt.retrieveOption(argc,argv); stdev_opt.retrieveOption(argc,argv); skewness_opt.retrieveOption(argc,argv); kurtosis_opt.retrieveOption(argc,argv); sum_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); kde_opt.retrieveOption(argc,argv); histogram2d_opt.retrieveOption(argc,argv); correlation_opt.retrieveOption(argc,argv); rmse_opt.retrieveOption(argc,argv); reg_opt.retrieveOption(argc,argv); regerr_opt.retrieveOption(argc,argv); //advanced options src_min_opt.retrieveOption(argc,argv); src_max_opt.retrieveOption(argc,argv); fs_opt.retrieveOption(argc,argv); range_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); transpose_opt.retrieveOption(argc,argv); comment_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkstatascii -i input [-c column]*" << endl; cout << endl; 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 } if(src_min_opt.size()){ while(src_min_opt.size()0){ gsl_rng* r=stat.getRandomGenerator(time(NULL)); //todo: init random number generator using time... if(verbose_opt[0]) std::cout << "generating " << rand_opt[0] << " random numbers: " << std::endl; for(unsigned int i=0;i > dataVector(col_opt.size()); vector< vector > statVector(col_opt.size()); if(!input_opt.size()) exit(0); FileReaderAscii asciiReader(input_opt[0]); asciiReader.setFieldSeparator(fs_opt[0]); asciiReader.setComment(comment_opt[0]); asciiReader.setMinRow(range_opt[0]); if(range_opt.size()>1) asciiReader.setMaxRow(range_opt[1]); asciiReader.readData(dataVector,col_opt); assert(dataVector.size()); double minValue=0; double maxValue=0; unsigned int nbin=0; if(nbin_opt.size()) nbin=nbin_opt[0]; if(histogram_opt[0]){ stat.minmax(dataVector[0],dataVector[0].begin(),dataVector[0].end(),minValue,maxValue); if(src_min_opt.size()) minValue=src_min_opt[0]; if(src_max_opt.size()) maxValue=src_max_opt[0]; if(nbin<1){ std::cerr << "Warning: number of bins not defined, calculating bins from min and max value" << std::endl; nbin=maxValue-minValue+1; } } double minX=0; double minY=0; double maxX=0; double maxY=0; if(histogram2d_opt[0]){ assert(col_opt.size()==2); if(nbin<1){ std::cerr << "Warning: number of bins not defined, calculating bins from min and max value" << std::endl; stat.minmax(dataVector[0],dataVector[0].begin(),dataVector[0].end(),minX,maxX); stat.minmax(dataVector[1],dataVector[1].begin(),dataVector[1].end(),minY,maxY); if(src_min_opt.size()) minX=src_min_opt[0]; if(src_min_opt.size()>1) minY=src_min_opt[1]; if(src_max_opt.size()) maxX=src_max_opt[0]; if(src_max_opt.size()>1) maxY=src_max_opt[1]; minValue=(minXmaxY)? maxX:maxY; if(verbose_opt[0]) std::cout << "min and max values: " << minValue << ", " << maxValue << std::endl; nbin=maxValue-minValue+1; } } for(int icol=0;icol0) // sigma=kde_opt[0]; // else sigma=1.06*sqrt(stat.var(dataVector[icol]))*pow(dataVector[icol].size(),-0.2); } assert(nbin); if(verbose_opt[0]){ if(sigma>0) std::cout << "calculating kernel density estimate with sigma " << sigma << " for col " << icol << std::endl; else std::cout << "calculating histogram for col " << icol << std::endl; } //test // cout << "debug0" << endl; // cout << "dataVector.size(): " << dataVector.size() << endl; // cout << "statVector.size(): " << statVector.size() << endl; // double theMinValue=0; // double theMaxValue=0; // stat.minmax(dataVector[icol],dataVector[icol].begin(),dataVector[icol].end(),theMinValue,theMaxValue); // if(minValuetheMinValue) // theMinValue=minValue; // if(minValue=max)"; // throw(s.str()); // } // assert(nbin); // assert(dataVector[icol].size()); // if(statVector[icol].size()!=nbin){ // statVector[icol].resize(nbin); // for(int i=0;i::const_iterator it; // for(it=dataVector[icol].begin();it!=dataVector[icol].end();++it){ // if(*itmaxValue) // continue; // if(stat.isNoData(*it)) // continue; // int theBin=0; // if(*it==maxValue) // theBin=nbin-1; // else if(*it>minValue && *it(static_cast((nbin-1)*(*it)-minValue)/(maxValue-minValue)); // assert(theBin=minValue && *it(static_cast((*it)-minValue)/(maxValue-minValue)*nbin)]; // } // exit(0); //end test stat.distribution(dataVector[icol],dataVector[icol].begin(),dataVector[icol].end(),statVector[icol],nbin,minValue,maxValue,sigma); if(verbose_opt[0]) std::cout << "min and max values: " << minValue << ", " << maxValue << std::endl; } } if(correlation_opt[0]){ assert(dataVector.size()==2); cout << "correlation between columns " << col_opt[0] << " and " << col_opt[1] << ": " << stat.correlation(dataVector[0],dataVector[1]) << endl; } if(rmse_opt[0]){ assert(dataVector.size()==2); cout << "root mean square error between columns " << col_opt[0] << " and " << col_opt[1] << ": " << stat.rmse(dataVector[0],dataVector[1]) << endl; } if(reg_opt[0]){ assert(dataVector.size()==2); double c0=0; double c1=0; double r2=stat.linear_regression(dataVector[0],dataVector[1],c0,c1); cout << "linear regression between columns: " << col_opt[0] << " and " << col_opt[1] << ": " << c0 << "+" << c1 << " * x " << " with R^2 (square correlation coefficient): " << r2 << endl; } if(regerr_opt[0]){ assert(dataVector.size()==2); double c0=0; double c1=0; double err=stat.linear_regression_err(dataVector[0],dataVector[1],c0,c1); if(verbose_opt[0]) cout << "linear regression between columns: " << col_opt[0] << " and " << col_opt[1] << ": " << c0 << "+" << c1 << " * x " << " with rmse: " << err << endl; else cout << c0 << " " << c1 << " " << err << endl; } if(histogram_opt[0]){ for(int irow=0;irowsize();++irow){ double binValue=0; if(nbin==maxValue-minValue+1) binValue=minValue+irow; else binValue=minValue+static_cast(maxValue-minValue)*(irow+0.5)/nbin; std::cout << binValue << " "; // std::cout << minValue+static_cast(maxValue-minValue)*(irow+0.5)/nbin << " "; for(int icol=0;icol(statVector[icol][irow])/static_cast(dataVector[icol].size()); else std::cout << statVector[icol][irow]; if(icol0) // sigma=kde_opt[0]; // else sigma=1.06*sqrt(sqrt(stat.var(dataVector[0]))*sqrt(stat.var(dataVector[1])))*pow(dataVector[0].size(),-0.2); } assert(nbin); if(verbose_opt[0]){ if(sigma>0) std::cout << "calculating 2d kernel density estimate with sigma " << sigma << " for cols " << col_opt[0] << " and " << col_opt[1] << std::endl; else std::cout << "calculating 2d histogram for cols " << col_opt[0] << " and " << col_opt[1] << std::endl; std::cout << "nbin: " << nbin << std::endl; } std::vector< std::vector > histVector; stat.distribution2d(dataVector[0],dataVector[1],histVector,nbin,minX,maxX,minY,maxY,sigma); for(int binX=0;binX(maxX-minX)*(binX+0.5)/nbin; double binValueY=0; if(nbin==maxY-minY+1) binValueY=minY+binY; else binValueY=minY+static_cast(maxY-minY)*(binY+0.5)/nbin; double value=0; value=static_cast(histVector[binX][binY])/dataVector[0].size(); std::cout << binValueX << " " << binValueY << " " << value << std::endl; // std::cout << minX+static_cast(maxX-minX)*(binX+0.5)/nbin << " " << minY+static_cast(maxY-minY)*(binY+0.5)/nbin << " " << value << std::endl; } } } if(output_opt[0]){ if(transpose_opt[0]){ for(int icol=0;icolsize();++irow){ cout << dataVector[icol][irow]; if(irowsize()-1) cout << " "; } cout << endl; } } else{ for(int irow=0;irowsize();++irow){ for(int icol=0;icol. ***********************************************************************/ #include #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "base/Optionpk.h" /******************************************************************************/ /*! \page pksetmask pksetmask program to apply mask image (set invalid values) to raster image ## SYNOPSIS Usage: pksetmask -i input -m mask [-m mask]* -o output Options: [-mskband value]* [-msknodata value -nodata value]* Advanced options: [--operator '<'|'='|'<'] [-ot type] [-of format] [-co option]* [-ct table] \section pksetmask_description Description The utility pksetmask sets a mask provided with option -m to an input raster dataset. The default operator is '='. Values in the input raster data where the mask has a nodata value (set with the option -msknodata) will then be set to nodata (set with -nodata). Other operators are less than (--operator '<') and larger than (--operator '>').\section pksetmask_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |Input image | | m | mask | std::string | |Mask image(s) | | msknodata | msknodata | int | 1 |Mask value(s) where image has nodata. Use one value for each mask, or multiple values for a single mask. | | mskband | mskband | short | 0 |Mask band to read (0 indexed). Provide band for each mask. | | o | output | std::string | |Output mask file | | nodata | nodata | int | 0 |nodata value to put in image if not valid | | p | operator | char | = |Operator: < = > !. Use operator for each msknodata option | | ot | otype | std::string | |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate)| | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | ct | ct | std::string | |color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid) | Usage: pksetmask -i input -m mask [-m mask]* [-msknodata value -nodata value]* -o output Examples ======== Some examples how to use pksetmask can be found \ref examples_pksetmask "here" FAQ ======== Frequently asked questions on pksetmask can be found \ref faq_pksetmask "here" **/ using namespace std; int main(int argc, char *argv[]) { //command line options Optionpk input_opt("i", "input", "Input image"); Optionpk mask_opt("m", "mask", "Mask image(s)"); Optionpk output_opt("o", "output", "Output mask file"); 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)","GTiff"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk msknodata_opt("msknodata", "msknodata", "Mask value(s) where image has nodata. Use one value for each mask, or multiple values for a single mask.", 1); Optionpk mskband_opt("mskband", "mskband", "Mask band to read (0 indexed). Provide band for each mask.", 0); Optionpk operator_opt("p", "operator", "Operator: < = > !. Use operator for each msknodata option", '='); Optionpk nodata_opt("nodata", "nodata", "nodata value to put in image if not valid", 0); Optionpk colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)"); Optionpk verbose_opt("v", "verbose", "verbose", 0,2); otype_opt.setHide(1); oformat_opt.setHide(1); option_opt.setHide(1); colorTable_opt.setHide(1); mskband_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); mask_opt.retrieveOption(argc,argv); msknodata_opt.retrieveOption(argc,argv); mskband_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); nodata_opt.retrieveOption(argc,argv); operator_opt.retrieveOption(argc,argv); otype_opt.retrieveOption(argc,argv); oformat_opt.retrieveOption(argc,argv); option_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pksetmask -i input -m mask [-m mask]* [-msknodata value -nodata value]* -o output" << endl; cout << endl; 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 } if(verbose_opt[0]) cout << "number of mask images: " << mask_opt.size() << endl; //duplicate band used for mask if not explicitly provided while(mskband_opt.size() maskReader(mask_opt.size()); for(int imask=0;imask" << nodata_opt[iv] << endl; } } Vector2d lineInput(inputReader.nrOfBand(),inputReader.nrOfCol()); Vector2d lineOutput(outputWriter.nrOfBand(),outputWriter.nrOfCol()); assert(lineOutput.size()==lineInput.size()); assert(inputReader.nrOfCol()==outputWriter.nrOfCol()); // Vector2d lineMask(mask_opt.size()); Vector2d lineMask(mask_opt.size()); for(int imask=0;imask oldRowMask(mask_opt.size()); for(int imask=0;imask1){//multiple masks for(int imask=0;imask(colMask); rowMask=static_cast(rowMask); bool masked=false; if(rowMask>=0&&rowMask=0&&colMask(rowMask)!=static_cast(oldRowMask[imask])){ assert(rowMask>=0&&rowMask(rowMask)); maskReader[imask].readData(lineMask[imask],GDT_Float64,static_cast(rowMask),mskband_opt[imask]); } catch(string errorstring){ cerr << errorstring << endl; exit(1); } oldRowMask[imask]=rowMask; } } else continue;//no coverage in this mask int ivalue=0; if(mask_opt.size()==msknodata_opt.size())//one invalid value for each mask ivalue=msknodata_opt[imask]; else//use same invalid value for each mask ivalue=msknodata_opt[0]; char op=(operator_opt.size()==mask_opt.size())?operator_opt[imask]:operator_opt[0]; switch(op){ case('='): default: if(lineMask[imask][colMask]==ivalue) masked=true; break; case('<'): if(lineMask[imask][colMask]'): if(lineMask[imask][colMask]>ivalue) masked=true; break; case('!'): if(lineMask[imask][colMask]!=ivalue) masked=true; break; } if(masked){ if(verbose_opt[0]>1) cout << "image masked at (col=" << icol << ",row=" << irow <<") with mask " << mask_opt[imask] << " and value " << ivalue << endl; for(int iband=0;iband(colMask); rowMask=static_cast(rowMask); bool masked=false; if(rowMask>=0&&rowMask=0&&colMask(rowMask)!=static_cast(oldRowMask[0])){ assert(rowMask>=0&&rowMask(rowMask)); maskReader[0].readData(lineMask[0],GDT_Float64,static_cast(rowMask),mskband_opt[0]); } catch(string errorstring){ cerr << errorstring << endl; exit(1); } oldRowMask[0]=rowMask; } for(int ivalue=0;ivalue'): if(lineMask[0][colMask]>msknodata_opt[ivalue]) masked=true; break; case('!'): if(lineMask[0][colMask]!=msknodata_opt[ivalue]) masked=true; break; } if(masked){ for(int iband=0;iband(irow+1.0)/outputWriter.nrOfRow(); pfnProgress(progress,pszMessage,pProgressArg); } inputReader.close(); for(int imask=0;imask. ***********************************************************************/ #include #include #include "base/Optionpk.h" #include #include "imageclasses/ImgWriterGdal.h" /******************************************************************************/ /*! \page pkascii2img pkascii2img program to create raster image based on ascii file ## SYNOPSIS Usage: pkascii2img -i input.txt -o output Options: [-ot type] [-of GDALformat] [-co NAME=VALUE]* [-dx value] [-dy value] [-ulx value] [-uly value] [-ct filename] [-a_srs EPSG:number] [-d description] \section pkascii2img_description Description The utility pkascii2img creates a raster dataset from an ASCII textfile. The textfile is in matrix format (rows and columns). The dimensions in x and y are defined by the number of columns and rows respectively. The georeferencing can be defined by providing the options for cell size (-dx -dy), upper left position (-ulx -uly) and the projection (-a_srs). Some dataset formats can also store a description (-d) and a color table (-ct). \section pkascii2img_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |input ASCII file | | o | output | std::string | |Output image file | | ot | otype | std::string | Byte |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |image type string (see also gdal_translate) | | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | ulx | ulx | double | 0 |Upper left x value bounding box (in geocoordinates if georef is true) | | uly | uly | double | 0 |Upper left y value bounding box (in geocoordinates if georef is true) | | dx | dx | double | |Output resolution in x (in meter) | | dy | dy | double | |Output resolution in y (in meter) | | ct | ct | std::string | |color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid) | | a_srs | a_srs | std::string | |Override the projection for the output file | | d | description | std::string | |Set image description | Usage: pkascii2img -i input.txt -o output Examples ======== Some examples how to use pkascii2img can be found \ref examples_pkascii2img "here" **/ using namespace std; int main(int argc, char *argv[]) { Optionpk input_opt("i","input","input ASCII file"); Optionpk output_opt("o", "output", "Output image file"); Optionpk dataType_opt("ot", "otype", "Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image","Byte"); Optionpk imageType_opt("of", "oformat", "image type string (see also gdal_translate)", "GTiff"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk ulx_opt("ulx", "ulx", "Upper left x value bounding box (in geocoordinates if georef is true)", 0.0); Optionpk uly_opt("uly", "uly", "Upper left y value bounding box (in geocoordinates if georef is true)", 0.0); Optionpk dx_opt("dx", "dx", "Output resolution in x (in meter)"); Optionpk dy_opt("dy", "dy", "Output resolution in y (in meter)"); Optionpk projection_opt("a_srs", "a_srs", "Override the projection for the output file"); Optionpk colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)"); Optionpk description_opt("d", "description", "Set image description"); Optionpk verbose_opt("v", "verbose", "verbose", false,2); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); dataType_opt.retrieveOption(argc,argv); imageType_opt.retrieveOption(argc,argv); option_opt.retrieveOption(argc,argv); ulx_opt.retrieveOption(argc,argv); uly_opt.retrieveOption(argc,argv); dx_opt.retrieveOption(argc,argv); dy_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); projection_opt.retrieveOption(argc,argv); description_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkascii2img -i input.txt -o output" << endl; cout << endl; 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 } assert(input_opt.size()); assert(output_opt.size()); ImgWriterGdal imgWriter; ifstream ifile(input_opt[0].c_str(),ios::in); //get number of lines string line; int nrow=0; int ncol=0; int irow=0; string interleave="BAND"; vector< vector > data; vector row; double value; try{ while(getline(ifile,line)){ row.clear(); //read data from ascii file istringstream ist(line); while(ist>>value) row.push_back(value); if(!ncol){ ncol=row.size(); data.push_back(row); } else data.push_back(row); if(verbose_opt[0]){ for(int icol=0;icol. ***********************************************************************/ #include #include #include #include "base/Optionpk.h" #include "base/Vector2d.h" #include "algorithms/Filter2d.h" #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" /******************************************************************************/ /*! \page pkfilterdem pkfilterdem Filter digital elevation model raster datasets ## SYNOPSIS Usage: pkfilterdem -i input.txt -o output Options: [-f filter] [-dim maxsize] Advanced options: [-ot type] [-of format] [-ct colortable] [-nodata value] [-circ] [-st threshold] [-ht threshold] [-minchange value] \section pkfilterdem_description Description The utility pkfilterdem can be used to filter digital elevation models. It is typically used after the utility \ref pklas2img "pklas2img" to create a digital terrain model. The default filter operation is the progressive morphological filter. \section pkfilterdem_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |input image file | | o | output | std::string | |Output image file | | f | filter | std::string | |post processing filter: vito, etew_min, promorph (progressive morphological filter),open,close). | | dim | dim | double | 17 |maximum filter kernel size | | circ | circular | bool | false |circular disc kernel for dilation and erosion | | st | st | double | 0 |slope threshold used for morphological filtering. Use a low values to remove more height objects in flat terrains | | ht | ht | double | 0.2 |initial height threshold for progressive morphological filtering. Use low values to remove more height objects. Optionally, a maximum height threshold can be set via a second argument (e.g., -ht 0.2 -ht 2.5 sets an initial threshold at 0.2 m and caps the threshold at 2.5 m). | | minchange | minchange | short | 0 |Stop iterations when no more pixels are changed than this threshold. | | ot | otype | std::string | |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate).| | ct | ct | std::string | |color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table | | nodata | nodata | short | |nodata value | Usage: pkfilterdem -i input.txt -o output **/ using namespace std; /*------------------ Main procedure ----------------*/ int main(int argc,char **argv) { Optionpk input_opt("i","input","input image file"); Optionpk output_opt("o", "output", "Output image file"); // Optionpk tmpdir_opt("tmp", "tmp", "Temporary directory","/tmp",2); Optionpk disc_opt("circ", "circular", "circular disc kernel for dilation and erosion", false); Optionpk postFilter_opt("f", "filter", "post processing filter: vito, etew_min, promorph (progressive morphological filter),open,close)."); Optionpk dim_opt("dim", "dim", "maximum filter kernel size", 17); Optionpk maxSlope_opt("st", "st", "slope threshold used for morphological filtering. Use a low values to remove more height objects in flat terrains", 0.0); Optionpk hThreshold_opt("ht", "ht", "initial height threshold for progressive morphological filtering. Use low values to remove more height objects. Optionally, a maximum height threshold can be set via a second argument (e.g., -ht 0.2 -ht 2.5 sets an initial threshold at 0.2 m and caps the threshold at 2.5 m).", 0.2); Optionpk minChange_opt("minchange", "minchange", "Stop iterations when no more pixels are changed than this threshold.", 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).","GTiff"); Optionpk colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk nodata_opt("nodata", "nodata", "nodata value"); Optionpk verbose_opt("v", "verbose", "verbose mode if > 0", 0,2); disc_opt.setHide(1); maxSlope_opt.setHide(1); hThreshold_opt.setHide(1); minChange_opt.setHide(1); otype_opt.setHide(1); oformat_opt.setHide(1); colorTable_opt.setHide(1); nodata_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); // tmpdir_opt.retrieveOption(argc,argv); postFilter_opt.retrieveOption(argc,argv); dim_opt.retrieveOption(argc,argv); disc_opt.retrieveOption(argc,argv); maxSlope_opt.retrieveOption(argc,argv); hThreshold_opt.retrieveOption(argc,argv); minChange_opt.retrieveOption(argc,argv); otype_opt.retrieveOption(argc,argv); oformat_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); nodata_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkfilterdem -i input.txt -o output" << endl; cout << endl; 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 input; ImgWriterGdal outputWriter; if(input_opt.empty()){ cerr << "Error: no input file selected, use option -i" << endl; exit(1); } if(output_opt.empty()){ cerr << "Error: no outputWriter file selected, use option -o" << endl; exit(1); } if(postFilter_opt.empty()){ cerr << "Error: no filter selected, use option -f" << endl; exit(1); } input.open(input_opt[0]); 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(); 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]; if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){ string theInterleave="INTERLEAVE="; theInterleave+=input.getInterleave(); option_opt.push_back(theInterleave); } if(verbose_opt[0]) cout << "opening output file " << output_opt[0] << endl; outputWriter.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),1,theType,imageType,option_opt); //set projection outputWriter.setProjection(input.getProjection()); outputWriter.copyGeoTransform(input); if(colorTable_opt.size()) outputWriter.setColorTable(colorTable_opt[0]); //set nodata value if(nodata_opt.size()){ for(int iband=0;iband inputData(input.nrOfRow(),input.nrOfCol()); Vector2d outputData(outputWriter.nrOfRow(),outputWriter.nrOfCol()); Vector2d tmpData(outputWriter.nrOfRow(),outputWriter.nrOfCol()); input.readDataBlock(inputData,GDT_Float64,0,inputData.nCols()-1,0,inputData.nRows()-1); //apply post filter std::cout << "Applying post processing filter: " << postFilter_opt[0] << std::endl; // const char* pszMessage; // void* pProgressArg=NULL; // GDALProgressFunc pfnProgress=GDALTermProgress; // double progress=0; // pfnProgress(progress,pszMessage,pProgressArg); //make sure dim_opt contains initial [0] and maximum [1] kernel sizes in this order if(dim_opt.size()<2) dim_opt.insert(dim_opt.begin(),3); if(dim_opt[0]>dim_opt[1]){ dim_opt.insert(dim_opt.begin(),dim_opt[1]); dim_opt.erase(dim_opt.begin()+2); } filter2d::Filter2d theFilter; if(nodata_opt.size()){ for(int inodata=0;inodata nlimit(4); nlimit[0]=2; nlimit[1]=3; nlimit[2]=4; nlimit[2]=2; //init finalMask for(int irow=0;irow adapt template with T1,T2 in Filter2d Vector2d tmpMask(input.nrOfRow(),input.nrOfCol()); for(int irow=0;irow tmpDSM(inputData); // int dimX=dim_opt[0]; // int dimY=dim_opt[0]; // assert(dimX); // assert(dimY); // statfactory::StatFactory stat; // Vector2d inBuffer(dimY,inputData.nCols()); // if(tmpData.size()!=inputData.nRows()) // tmpData.resize(inputData.nRows()); // int indexI=0; // int indexJ=inputData.nRows()-1; // // int indexJ=0; // //initialize last half of inBuffer // for(int j=-(dimY-1)/2;j<=dimY/2;++j){ // for(int i=0;i=0;--y){ // if(y){//inBuffer already initialized for y=0 // //erase first line from inBuffer // inBuffer.erase(inBuffer.end()-1); // // inBuffer.erase(inBuffer.begin()); // //read extra line and push back to inBuffer if not out of bounds // if(y+dimY/2=0); // assert(index=0;--x){ // double centerValue=inBuffer[(dimY-1)/2][x]; // //test // cout << "pixel (" << x << "," << y << "): " << centerValue << endl; // short nmasked=0; // std::vector neighbors; // for(int j=-(dimY-1)/2;j<=dimY/2;++j){ // for(int i=-(dimX-1)/2;i<=dimX/2;++i){ // indexI=x+i; // //check if out of bounds // if(indexI<0) // indexI=-indexI; // else if(indexI>=tmpDSM.nCols()) // indexI=tmpDSM.nCols()-i; // if(y+j<0) // indexJ=-j; // else if(y+j>=tmpDSM.nRows()) // indexJ=(dimY>2) ? (dimY-1)/2-j : 0; // else // indexJ=(dimY-1)/2+j; // double difference=(centerValue-inBuffer[indexJ][indexI]); // //test // cout << "centerValue-inBuffer[" << indexJ << "][" << indexI << "]=" << centerValue << " - " << inBuffer[indexJ][indexI] << " = " << difference << endl; // if(i||j)//skip centerValue // neighbors.push_back(inBuffer[indexJ][indexI]); // if(difference>hThreshold_opt[iheight]) // ++nmasked; // } // } // //test // cout << "pixel " << x << ", " << y << ": nmasked is " << nmasked << endl; // if(nmasked<=nlimit[iheight]){ // ++nchange; // //reset pixel in outputMask // tmpData[y][x]=0; // //test // cout << "pixel " << x << ", " << y << " is ground" << endl; // } // else{ // //reset pixel height in tmpDSM // sort(neighbors.begin(),neighbors.end()); // assert(neighbors.size()>1); // inBuffer[(dimY-1)/2][x]=neighbors[1]; // //test // cout << "pixel " << x << ", " << y << " is surface, reset DSM to " << neighbors[1] << endl; // /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */ // } // } // } //to here theFilter.dsm2dtm_nwse(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]); if(verbose_opt[0]) cout << "filtering NESW" << endl; theFilter.dsm2dtm_nesw(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]); if(verbose_opt[0]) cout << "filtering SENW" << endl; theFilter.dsm2dtm_senw(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]); if(verbose_opt[0]) cout << "filtering SWNE" << endl; theFilter.dsm2dtm_swne(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]); } outputData=tmpData; //todo: interpolate //outputData.setMask(tmpData,1,0); } else if(postFilter_opt[0]=="etew_min"){ //Elevation Threshold with Expand Window (ETEW) Filter (p.73 from Airborne LIDAR Data Processing and Analysis Tools ALDPAT 1.0) //first iteration is performed assuming only minima are selected using options -fir all -comp min //increase cells and thresholds until no points from the previous iteration are discarded. int dim=dim_opt[0]; // theFilter.setNoValue(0); int iteration=1; while(nchange>minChange_opt[0]&&dim<=dim_opt[1]){ double hThreshold=maxSlope_opt[0]*dim; nchange=theFilter.morphology(inputData,outputData,"erode",dim,dim,disc_opt[0],hThreshold); inputData=outputData; dim+=2;//change from theory: originally double cellCize std::cout << "iteration " << iteration << ": " << nchange << " pixels changed" << std::endl; ++iteration; } } else if(postFilter_opt[0]=="promorph"){ //Progressive morphological filter tgrs2003_zhang vol41 pp 872-882 //first iteration is performed assuming only minima are selected using options -fir all -comp min //increase cells and thresholds until no points from the previous iteration are discarded. int dim=dim_opt[0]; double hThreshold=hThreshold_opt[0]; int iteration=1; while(nchange>minChange_opt[0]&&dim<=dim_opt[1]){ std::cout << "iteration " << iteration << " with window size " << dim << " and dh_max: " << hThreshold << std::endl; try{ nchange=theFilter.morphology(inputData,outputData,"erode",dim,dim,disc_opt[0],hThreshold); theFilter.morphology(outputData,inputData,"dilate",dim,dim,disc_opt[0],hThreshold); theFilter.doit(inputData,outputData,"median",dim,dim,1,disc_opt[0]); inputData=outputData; } catch(std::string errorString){ cout << errorString << endl; exit(1); } int newdim=(dim==1)? 3: 2*(dim-1)+1; hThreshold=hThreshold_opt[0]+maxSlope_opt[0]*(newdim-dim)*input.getDeltaX(); dim=newdim; if(hThreshold_opt.size()>1){ if(hThreshold>hThreshold_opt[1]){ hThreshold=hThreshold_opt[1]; } } std::cout << "iteration " << iteration << ": " << nchange << " pixels changed" << std::endl; ++iteration; } } else if(postFilter_opt[0]=="open"){ try{ theFilter.morphology(inputData,tmpData,"erode",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]); theFilter.morphology(tmpData,outputData,"dilate",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]); outputData=inputData; } catch(std::string errorString){ cout << errorString << endl; exit(1); } } else if(postFilter_opt[0]=="close"){ try{ theFilter.morphology(inputData,tmpData,"dilate",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]); theFilter.morphology(tmpData,outputData,"erode",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]); } catch(std::string errorString){ cout << errorString << endl; exit(1); } } //write outputData to outputWriter outputWriter.writeDataBlock(outputData,GDT_Float64,0,outputData.nCols()-1,0,outputData.nRows()-1); // progress=1; // pfnProgress(progress,pszMessage,pProgressArg); input.close(); outputWriter.close(); return 0; } pktools-2.6.6/src/apps/pkdumpogr.cc0000644000113200011300000002243612536514373014214 00000000000000/********************************************************************** pkdumpogr.cc: dump ogr file to text file or standard output Copyright (C) 2008-2014 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 "base/Optionpk.h" #include "imageclasses/ImgReaderOgr.h" #include "pkdumpogr.h" /******************************************************************************/ /*! \page pkdumpogr pkdumpogr dump ogr file to text file or standard output ## SYNOPSIS Usage: pkdumpogr -i input [-o output] Options: [-ln layername] [-n attribute]* [-pos] [-transpose] Advanced options: \section pkdumpogr_description Description The utility pkdumpogr dumps the content of a vector dataset to (standard) output (screen or filename). The default is to dump all the attributes. Individual attributes can be selected with the option -n. The X and Y positions can be printed with the option -pos. Use the option -transpose to transpose the output (only in combination with the option -n attribute). \section pkdumpogr_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |Input shape file | | ln | lname | std::string | |Layer name(s) in sample (leave empty to select all) | | o | output | std::string | |Output ASCII file | | n | name | std::string | ALL |names of the attributes to select. Each attribute is stored in a separate band. Default is ALL: write all attributes | | pos | pos | bool | false |include position (x and y) | | t | transpose | bool | false |transpose output (does not work for -n ALL | | fs | fs | char | |field separator. | Usage: pkdumpogr -i input. [-o output] Examples ======== Some examples how to use pkdumpogr can be found \ref examples_pkdumpogr "here" **/ using namespace std; int main(int argc, char *argv[]) { Optionpk input_opt("i", "input", "Input shape file"); Optionpk layer_opt("ln", "lname", "Layer name(s) in sample (leave empty to select all)"); Optionpk output_opt("o", "output", "Output ASCII file"); Optionpk attribute_opt("n", "name", "names of the attributes to select. Each attribute is stored in a separate band. Default is ALL: write all attributes", "ALL"); Optionpk pos_opt("pos","pos","include position (x and y)",false); Optionpk transpose_opt("t","transpose","transpose output (does not work for -n ALL ",false); Optionpk fs_opt("fs","fs","field separator.",' '); Optionpk verbose_opt("v", "verbose", "verbose (Default: 0)", 0,2); fs_opt.setHide(1); verbose_opt.setHide(2); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); layer_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); attribute_opt.retrieveOption(argc,argv); pos_opt.retrieveOption(argc,argv); transpose_opt.retrieveOption(argc,argv); fs_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkdumpogr -i input [-o output]" << endl; cout << endl; 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 } if(input_opt.empty()){ std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl; exit(0); } ImgReaderOgr inputReader; try{ inputReader.open(input_opt[0]); } catch(string errorstring){ cerr << errorstring << endl; } ofstream outputFile; if(output_opt.size()) outputFile.open(output_opt[0].c_str(),ios::out); inputReader.setFieldSeparator(fs_opt[0]); //support multiple layers int nlayerRead=inputReader.getDataSource()->GetLayerCount(); if(verbose_opt[0]) cout << "number of layers: " << nlayerRead << endl; for(int ilayer=0;ilayerGetName(); if(layer_opt.size()) if(find(layer_opt.begin(),layer_opt.end(),currentLayername)==layer_opt.end()) continue; if(verbose_opt[0]) cout << "processing layer " << currentLayername << endl; // if(layer_opt.size()) // cout << " --lname " << currentLayername << endl; if(attribute_opt[0]=="ALL"){ attribute_opt.clear(); OGRFeatureDefn *poFDefn = readLayer->GetLayerDefn(); for(int iField=0;iFieldGetFieldCount();++iField){ OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField); std::string fieldname=poFieldDefn->GetNameRef(); attribute_opt.push_back(fieldname); } } // if(attribute_opt[0]!="ALL"){ vector xvector; vector yvector; if(inputReader.getGeometryType()==wkbPoint) inputReader.readXY(xvector,yvector); Vector2d theData(attribute_opt.size()); for(int ifield=0;ifield. ***********************************************************************/ #include #include #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "base/Optionpk.h" /******************************************************************************/ /*! \page pkgetmask pkgetmask program to create mask image based on values in input raster image ## SYNOPSIS Usage: pkgetmask -i input -o output Options: [-min value]* [-max value]* [-data value]* [-nodata value]* Advanced options: [-b band]* [--operator AND|OR] [-ot type] [-of format] [-co option]* [-ct table] \section pkgetmask_description Description The utility pkgetmask creates a mask raster dataset from an input raster dataset. Values smaller than the minimum value (-min) or larger than the maximum value (-max) will result in a -nodata value in the mask.\section pkgetmask_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |Input image file | | o | output | std::string | |Output mask file | | min | min | double | |Values smaller than min threshold(s) are masked as invalid. Use one threshold for each band | | max | max | double | |Values greater than max threshold(s) are masked as invalid. Use one threshold for each band | | data | data | unsigned short | 1 |value(s) for valid pixels: between min and max | | nodata | nodata | unsigned short | 0 |value(s) for invalid pixels: not between min and max | | b | band | short | 0 |band(s) used for mask | | p | operator | std::string | OR |Operator: [AND,OR]. | | ot | otype | std::string | Byte |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate).| | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | ct | ct | std::string | |color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid) | Usage: pkgetmask -i input -o output Examples ======== Some examples how to use pkgetmask can be found \ref examples_pkgetmask "here" **/ using namespace std; int main(int argc,char **argv) { Optionpk input_opt("i", "input", "Input image file"); Optionpk band_opt("b", "band", "band(s) used for mask", 0); Optionpk min_opt("min", "min", "Values smaller than min threshold(s) are masked as invalid. Use one threshold for each band"); Optionpk max_opt("max", "max", "Values greater than max threshold(s) are masked as invalid. Use one threshold for each band"); Optionpk operator_opt("p", "operator", "Operator: [AND,OR].", "OR"); Optionpk data_opt("data", "data", "value(s) for valid pixels: between min and max", 1); Optionpk nodata_opt("nodata", "nodata", "value(s) for invalid pixels: not between min and max", 0); Optionpk output_opt("o", "output", "Output mask file"); 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", "Byte"); Optionpk oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)"); Optionpk verbose_opt("v", "verbose", "verbose", 0,2); band_opt.setHide(1); operator_opt.setHide(1); otype_opt.setHide(1); oformat_opt.setHide(1); option_opt.setHide(1); colorTable_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); min_opt.retrieveOption(argc,argv); max_opt.retrieveOption(argc,argv); data_opt.retrieveOption(argc,argv); nodata_opt.retrieveOption(argc,argv); band_opt.retrieveOption(argc,argv); operator_opt.retrieveOption(argc,argv); otype_opt.retrieveOption(argc,argv); oformat_opt.retrieveOption(argc,argv); option_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkgetmask -i input -o output" << endl; cout << endl; 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 } const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; pfnProgress(progress,pszMessage,pProgressArg); 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(verbose_opt[0]){ cout << endl; if(theType==GDT_Unknown) cout << "Unknown output pixel type: " << otype_opt[0] << endl; else cout << "Output pixel type: " << GDALGetDataTypeName(theType) << endl; } assert(input_opt.size()); ImgReaderGdal imgReader(input_opt[0]); assert(band_opt.size()>=0); assert(band_opt.size()<=imgReader.nrOfBand()); if(min_opt.size()&&max_opt.size()){ if(min_opt.size()!=max_opt.size()) cerr << "Error: number of min and max options must correspond if both min and max options are provide" << endl; assert(min_opt.size()==max_opt.size()); } if(min_opt.size()){ while(band_opt.size()>min_opt.size()) min_opt.push_back(min_opt[0]); while(min_opt.size()>data_opt.size()) data_opt.push_back(data_opt[0]); } if(max_opt.size()){ while(band_opt.size()>max_opt.size()) max_opt.push_back(max_opt[0]); while(max_opt.size()>data_opt.size()) data_opt.push_back(data_opt[0]); } // assert(min_opt.size()==max_opt.size()); // if(verbose_opt[0]){ // cout << "min,max values: "; // for(int imin=0;imin > lineBuffer(band_opt.size()); for(int iband=0;iband writeBuffer(imgWriter.nrOfCol()); for(int irow=0;irow=min_opt[ivalid]&&lineBuffer[theBand][icol]<=max_opt[ivalid]){ validValue=data_opt[ivalid]; validBand=true; } valid=(operator_opt[0]=="OR")?valid||validBand : valid&&validBand; } } else if(min_opt.size()){ for(int ivalid=0;ivalid=min_opt[ivalid]){ validValue=data_opt[ivalid]; validBand=true; } valid=(operator_opt[0]=="OR")?valid||validBand : valid&&validBand; } } else if(max_opt.size()){ for(int ivalid=0;ivalid. ***********************************************************************/ #include #include #include #include #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "imageclasses/ImgReaderOgr.h" #include "base/Vector2d.h" #include "base/Optionpk.h" #include "algorithms/StatFactory.h" /******************************************************************************/ /*! \page pkcomposite pkcomposite program to mosaic and composite geo-referenced images ## SYNOPSIS Usage: pkcomposite -i input [-i input]* -o output Options: [-b band]* [-dx xres] [-dy yres] [-e vector] [-ulx ULX -uly ULY -lrx LRX -lry LRY] [-cr rule] [-cb band] [-srcnodata value] [-bndnodata band] [-min value] [-max value] [-dstnodata value] [-r resampling_method] [-ot {Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 / Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}] [-of format] [-co NAME=VALUE]* [-a_srs epsg:number] Advanced options: [-file] [-w weight]* [-c class]* [-ct colortable] [-d description] [-align] \section pkcomposite_description Description The utility pkcomposite can be used to \em mosaic and \em composite multiple (georeferenced) raster datasets. A mosaic can merge images with different geographical extents into a single larger image. Compositing resolves the overlapping pixels according to some rule (e.g, the median of all overlapping pixels). This utility is complementary to GDAL, which currently does not support a composite step. Input datasets can have different bounding boxes and spatial resolutionsresolution. \anchor pkcomposite_rules composite rule | composite output ------------- | ------------- overwrite | Overwrite overlapping pixels: the latter input image on the command line overrules the previous image maxndvi | Create a maximum NDVI (normalized difference vegetation index) composite from multi-band input images. Use option -cb to set the indexes of the red and near infrared bands respectively (e.g., -cb 0 -cb 1) maxband | Select the pixel with a maximum value in the band specified by option -cb minband | Select the pixel with a minimum value in the band specified by option -cb mean | Calculate the mean (average) of overlapping pixels stdev | Calculate the standard deviation of overlapping pixels median | Calculate the median of overlapping pixels mode | Select the mode of overlapping pixels (maximum voting): use for Byte images only sum | Calculate the arithmetic sum of overlapping pixels maxallbands | For each individual band, assign the maximum value found in all overlapping pixels. Unlike maxband, output band values cannot be attributed to a single (date) pixel in the input time series minallbands | For each individual band, assign the minimum value found in all overlapping pixels. Unlike minband, output band values cannot be attributed to a single (date) pixel in the input time series Example: Calculate the maximum NDVI composite of two multispectral input images (e.g., red is band 0 and near infrared is band 1) \code pkcomposite -i input1.tif -i input2.tif -o output.tif -cr maxndvi -cb 0 -cb 1 \endcode Example: Calculate the minimum nadir composite of two input images, where the forth band (b=3) contains the view zenith angle \code pkcomposite -i input1.tif -i input2.tif -o minzenith.tif -cr minband -cb 3 \endcode Example: Calculate the minimum of two input images in all bands \code pkcomposite -i input1.tif -i input2.tif -o minimum.tif -cr minallbands \endcode \section pkcomposite_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |Input image file(s). If input contains multiple images, a multi-band output is created | | o | output | std::string | |Output image file | | b | band | int | |band index(es) to crop (leave empty if all bands must be retained) | | dx | dx | double | |Output resolution in x (in meter) (empty: keep original resolution) | | dy | dy | double | |Output resolution in y (in meter) (empty: keep original resolution) | | e | extent | std::string | |get boundary from extent from polygons in vector file | | cut | crop_to_cutline | bool | false |Crop the extent of the target dataset to the extent of the cutline | | m | mask | std::string | |Use the first band of the specified file as a validity mask (0 is nodata) | | msknodata | msknodata | float | 0 |Mask value not to consider for composite | mskband | mskband | short | 0 |Mask band to read (0 indexed). Provide band for each mask. | | ulx | ulx | double | 0 |Upper left x value bounding box | | uly | uly | double | 0 |Upper left y value bounding box | | lrx | lrx | double | 0 |Lower right x value bounding box | | lry | lry | double | 0 |Lower right y value bounding box | | cr | crule | std::string | overwrite |Composite rule (overwrite, maxndvi, maxband, minband, mean, mode (only for byte images), median, sum, maxallbands, minallbands, stdev | | cb | cband | int | 0 |band index used for the composite rule (e.g., for ndvi, use --cband=0 --cband=1 with 0 and 1 indices for red and nir band respectively | | srcnodata | srcnodata | double | |invalid value(s) for input raster dataset | | bndnodata | bndnodata | int | 0 |Band(s) in input image to check if pixel is valid (used for srcnodata, min and max options) | | min | min | double | |flag values smaller or equal to this value as invalid. | | max | max | double | |flag values larger or equal to this value as invalid. | | dstnodata | dstnodata | double | 0 |nodata value to put in output raster dataset if not valid or out of bounds. | | r | resampling-method | std::string | near |Resampling method (near: nearest neighbor, bilinear: bi-linear interpolation). | | ot | otype | std::string | |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate).| | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | a_srs | a_srs | std::string | |Override the spatial reference for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid | | file | file | short | 0 |write number of observations (1) or sequence nr of selected file (2) for each pixels as additional layer in composite | | w | weight | short | 1 |Weights (type: short) for the composite, use one weight for each input file in same order as input files are provided). Use value 1 for equal weights. | | c | class | short | 0 |classes for multi-band output image: each band represents the number of observations for one specific class. Use value 0 for no multi-band output image. | | ct | ct | std::string | |color table file with 5 columns: id R G B ALFA (0: transparent, 255: solid) | | align | align | bool | |Align output bounding box to first input image | | d | description | std::string | |Set image description | Examples ======== Some examples how to use pkcomposite can be found \ref examples_pkcomposite "here" FAQ === Frequently asked questions on pkcomposite can be found \ref faq_pkcomposite "here **/ namespace crule{ enum CRULE_TYPE {overwrite=0, maxndvi=1, maxband=2, minband=3, validband=4, mean=5, mode=6, median=7,sum=8,minallbands=9,maxallbands=10,stdev=11}; } using namespace std; int main(int argc, char *argv[]) { Optionpk input_opt("i", "input", "Input image file(s). If input contains multiple images, a multi-band output is created"); Optionpk output_opt("o", "output", "Output image file"); Optionpk band_opt("b", "band", "band index(es) to crop (leave empty if all bands must be retained)"); Optionpk dx_opt("dx", "dx", "Output resolution in x (in meter) (empty: keep original resolution)"); Optionpk dy_opt("dy", "dy", "Output resolution in y (in meter) (empty: keep original resolution)"); Optionpk extent_opt("e", "extent", "get boundary from extent from polygons in vector file"); Optionpk cut_opt("cut", "crop_to_cutline", "Crop the extent of the target dataset to the extent of the cutline.",false); Optionpk mask_opt("m", "mask", "Use the first band of the specified file as a validity mask (0 is nodata)."); Optionpk msknodata_opt("msknodata", "msknodata", "Mask value not to consider for composite.", 0); Optionpk mskband_opt("mskband", "mskband", "Mask band to read (0 indexed). Provide band for each mask.", 0); Optionpk ulx_opt("ulx", "ulx", "Upper left x value bounding box", 0.0); Optionpk uly_opt("uly", "uly", "Upper left y value bounding box", 0.0); Optionpk lrx_opt("lrx", "lrx", "Lower right x value bounding box", 0.0); Optionpk lry_opt("lry", "lry", "Lower right y value bounding box", 0.0); Optionpk crule_opt("cr", "crule", "Composite rule (overwrite, maxndvi, maxband, minband, mean, mode (only for byte images), median, sum, maxallbands, minallbands, stdev", "overwrite"); Optionpk ruleBand_opt("cb", "cband", "band index used for the composite rule (e.g., for ndvi, use --cband=0 --cband=1 with 0 and 1 indices for red and nir band respectively", 0); Optionpk srcnodata_opt("srcnodata", "srcnodata", "invalid value(s) for input raster dataset"); Optionpk bndnodata_opt("bndnodata", "bndnodata", "Band(s) in input image to check if pixel is valid (used for srcnodata, min and max options)", 0); Optionpk minValue_opt("min", "min", "flag values smaller or equal to this value as invalid."); Optionpk maxValue_opt("max", "max", "flag values larger or equal to this value as invalid."); Optionpk dstnodata_opt("dstnodata", "dstnodata", "nodata value to put in output raster dataset if not valid or out of bounds.", 0); Optionpk resample_opt("r", "resampling-method", "Resampling method (near: nearest neighbor, bilinear: bi-linear interpolation).", "near"); 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).","GTiff"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk projection_opt("a_srs", "a_srs", "Override the spatial reference for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid"); Optionpk file_opt("file", "file", "write number of observations (1) or sequence nr of selected file (2) for each pixels as additional layer in composite", 0); Optionpk weight_opt("w", "weight", "Weights (type: short) for the composite, use one weight for each input file in same order as input files are provided). Use value 1 for equal weights.", 1); Optionpk class_opt("c", "class", "classes for multi-band output image: each band represents the number of observations for one specific class. Use value 0 for no multi-band output image.", 0); Optionpk colorTable_opt("ct", "ct", "color table file with 5 columns: id R G B ALFA (0: transparent, 255: solid)"); Optionpk description_opt("d", "description", "Set image description"); Optionpk align_opt("align", "align", "Align output bounding box to input image",false); Optionpk verbose_opt("v", "verbose", "verbose", 0,2); extent_opt.setHide(1); cut_opt.setHide(1); mask_opt.setHide(1); msknodata_opt.setHide(1); mskband_opt.setHide(1); option_opt.setHide(1); file_opt.setHide(1); weight_opt.setHide(1); class_opt.setHide(1); colorTable_opt.setHide(1); description_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); band_opt.retrieveOption(argc,argv); dx_opt.retrieveOption(argc,argv); dy_opt.retrieveOption(argc,argv); extent_opt.retrieveOption(argc,argv); cut_opt.retrieveOption(argc,argv); mask_opt.retrieveOption(argc,argv); msknodata_opt.retrieveOption(argc,argv); mskband_opt.retrieveOption(argc,argv); ulx_opt.retrieveOption(argc,argv); uly_opt.retrieveOption(argc,argv); lrx_opt.retrieveOption(argc,argv); lry_opt.retrieveOption(argc,argv); crule_opt.retrieveOption(argc,argv); ruleBand_opt.retrieveOption(argc,argv); srcnodata_opt.retrieveOption(argc,argv); bndnodata_opt.retrieveOption(argc,argv); minValue_opt.retrieveOption(argc,argv); maxValue_opt.retrieveOption(argc,argv); dstnodata_opt.retrieveOption(argc,argv); resample_opt.retrieveOption(argc,argv); otype_opt.retrieveOption(argc,argv); oformat_opt.retrieveOption(argc,argv); option_opt.retrieveOption(argc,argv); projection_opt.retrieveOption(argc,argv); file_opt.retrieveOption(argc,argv); weight_opt.retrieveOption(argc,argv); class_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); description_opt.retrieveOption(argc,argv); align_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkcomposite -i input [-i input]* -o output" << endl; cout << endl; 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 } std::map cruleMap; // //initialize cruleMap // enum CRULE_TYPE {overwrite=0, maxndvi=1, maxband=2, minband=3, validband=4, mean=5, mode=6, median=7,sum=8}; cruleMap["overwrite"]=crule::overwrite; cruleMap["maxndvi"]=crule::maxndvi; cruleMap["maxband"]=crule::maxband; cruleMap["minband"]=crule::minband; cruleMap["validband"]=crule::validband; cruleMap["mean"]=crule::mean; cruleMap["mode"]=crule::mode; cruleMap["median"]=crule::median; cruleMap["sum"]=crule::sum; cruleMap["maxallbands"]=crule::maxallbands; cruleMap["minallbands"]=crule::minallbands; cruleMap["stdev"]=crule::stdev; if(srcnodata_opt.size()){ while(srcnodata_opt.size() bands; //get bounding box double maxLRX=0; double maxULY=0; double minULX=0; double minLRY=0; double magic_x=1,magic_y=1;//magic pixel for GDAL map info 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(verbose_opt[0]){ cout << endl; if(theType==GDT_Unknown) cout << "Unknown output pixel type: " << otype_opt[0] << endl; else cout << "Output pixel type: " << GDALGetDataTypeName(theType) << endl; } double dx=0; double dy=0; //get bounding box from extentReader if defined ImgReaderOgr extentReader; if(extent_opt.size()){ double e_ulx; double e_uly; double e_lrx; double e_lry; for(int iextent=0;iextentuly_opt[0]) uly_opt[0]=e_uly; if(e_lrx>lrx_opt[0]) lrx_opt[0]=e_lrx; if(e_lryClone()); if(projection_opt.empty()) theProjection=imgReader[ifile].getProjection(); if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){ string theInterleave="INTERLEAVE="; theInterleave+=imgReader[ifile].getInterleave(); option_opt.push_back(theInterleave); } if((ulx_opt[0]||uly_opt[0]||lrx_opt[0]||lry_opt[0])&&(!imgReader[ifile].covers(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))){ if(verbose_opt[0]) cout << input_opt[ifile] << " not within bounding box, skipping..." << endl; // imgReader.close(); continue; } double theULX, theULY, theLRX, theLRY; imgReader[ifile].getBoundingBox(theULX,theULY,theLRX,theLRY); if(theLRY>theULY){ cerr << "Error: " << input_opt[ifile] << " is not georeferenced, only referenced images are supported for pkcomposite " << endl; exit(1); } if(verbose_opt[0]) cout << "Bounding Box (ULX ULY LRX LRY): " << fixed << setprecision(6) << theULX << " " << theULY << " " << theLRX << " " << theLRY << endl; if(!init){ if(verbose_opt[0]){ switch(cruleMap[crule_opt[0]]){ default: case(crule::overwrite): cout << "Composite rule: overwrite" << endl; break; case(crule::maxndvi): cout << "Composite rule: max ndvi" << endl; break; case(crule::maxband): cout << "Composite rule: max band" << endl; break; case(crule::minband): cout << "Composite rule: min band" << endl; break; case(crule::validband): cout << "Composite rule: valid band" << endl; break; case(crule::mean): cout << "Composite rule: mean value" << endl; break; case(crule::mode): cout << "Composite rule: max voting (only for byte images)" << endl; break; case(crule::median): cout << "Composite rule: median" << endl; break; case(crule::stdev): cout << "Composite rule: stdev" << endl; break; case(crule::sum): cout << "Composite rule: sum" << endl; break; case(crule::minallbands): cout << "Composite rule: minallbands" << endl; break; case(crule::maxallbands): cout << "Composite rule: maxallbands" << endl; break; } } if(band_opt.size()){ nband=band_opt.size(); bands.resize(band_opt.size()); for(int iband=0;iband=0&&bndnodata_opt[iband]maxLRX)?theLRX:maxLRX; maxULY=(theULY>maxULY)?theULY:maxULY; minULX=(theULX(minULX)%(static_cast(dx)); maxULY=ceil(maxULY); if(static_cast(maxULY)%static_cast(dy)) maxULY+=dy; maxULY-=static_cast(maxULY)%(static_cast(dy)); maxLRX=ceil(maxLRX); if(static_cast(maxLRX)%static_cast(dx)) maxLRX+=dx; maxLRX-=static_cast(maxLRX)%(static_cast(dx)); minLRY=floor(minLRY); minLRY-=static_cast(minLRY)%(static_cast(dy)); } else if(align_opt[0]){ if(minULX>imgReader[0].getUlx()) minULX-=fmod(minULX-imgReader[0].getUlx(),dx); else if(minULXimgReader[0].getLrx()) maxLRX-=fmod(maxLRX-imgReader[0].getLrx(),dx)+dx; if(minLRY>imgReader[0].getLry()) minLRY-=fmod(minLRY-imgReader[0].getLry(),dy); else if(minLRYimgReader[0].getUly()) maxULY-=fmod(maxULY-imgReader[0].getUly(),dy)+dy; } if(verbose_opt[0]) cout << "bounding box composite image (ULX ULY LRX LRY): " << fixed << setprecision(6) << minULX << " " << maxULY << " " << maxLRX << " " << minLRY << endl; //initialize image if(verbose_opt[0]) cout << "initializing composite image..." << endl; // double dcol=(maxLRX-minULX+dx-1)/dx; // double drow=(maxULY-minLRY+dy-1)/dy; // int ncol=static_cast(dcol); // int nrow=static_cast(drow); int ncol=ceil((maxLRX-minULX)/dx); int nrow=ceil((maxULY-minLRY)/dy); if(verbose_opt[0]) cout << "composite image dim (nrow x ncol): " << nrow << " x " << ncol << endl; ImgWriterGdal imgWriter; while(weight_opt.size() burnValues(1,1);//burn value is 1 (single band) maskWriter.rasterizeOgr(extentReader,burnValues); maskWriter.close(); } catch(string error){ cerr << error << std::endl; exit(2); } catch(...){ cerr << "error caught" << std::endl; exit(1); } //todo: support multiple masks mask_opt.clear(); mask_opt.push_back("/vsimem/mask.tif"); } ImgReaderGdal maskReader; if(mask_opt.size()){ try{ if(verbose_opt[0]>=1) std::cout << "opening mask image file " << mask_opt[0] << std::endl; maskReader.open(mask_opt[0]); if(mskband_opt[0]>=maskReader.nrOfBand()){ string errorString="Error: illegal mask band"; throw(errorString); } } catch(string error){ cerr << error << std::endl; exit(2); } catch(...){ cerr << "error caught" << std::endl; exit(1); } } //create composite image if(verbose_opt[0]) cout << "creating composite image" << endl; Vector2d writeBuffer(nband,imgWriter.nrOfCol()); vector fileBuffer(ncol);//holds the number of used files Vector2d maxBuffer;//buffer used for maximum voting // Vector2d readBuffer(nband); vector > readBuffer(input_opt.size()); for(int ifile=0;ifile lineMask; Vector2d< vector > storeBuffer; vector writeValid(ncol); //convert irow to geo double x=0; double y=0; imgWriter.image2geo(0,irow,x,y); if(cruleMap[crule_opt[0]]==crule::mean || cruleMap[crule_opt[0]]==crule::median || cruleMap[crule_opt[0]]==crule::sum || cruleMap[crule_opt[0]]==crule::minallbands || cruleMap[crule_opt[0]]==crule::maxallbands || cruleMap[crule_opt[0]]==crule::stdev) storeBuffer.resize(nband,ncol); for(int icol=0;icol=nband); if(!imgReader[ifile].covers(minULX,maxULY,maxLRX,minLRY)){ // imgReader.close(); continue; } double uli,ulj,lri,lrj; imgReader[ifile].geo2image(minULX+(magic_x-1.0)*imgReader[ifile].getDeltaX(),maxULY-(magic_y-1.0)*imgReader[ifile].getDeltaY(),uli,ulj); imgReader[ifile].geo2image(maxLRX+(magic_x-2.0)*imgReader[ifile].getDeltaX(),minLRY-(magic_y-2.0)*imgReader[ifile].getDeltaY(),lri,lrj); uli=floor(uli); ulj=floor(ulj); lri=floor(lri); lrj=floor(lrj); double startCol=uli; double endCol=lri; if(uli<0) startCol=0; else if(uli>=imgReader[ifile].nrOfCol()) startCol=imgReader[ifile].nrOfCol()-1; if(lri<0) endCol=0; else if(lri>=imgReader[ifile].nrOfCol()) endCol=imgReader[ifile].nrOfCol()-1; int readncol=endCol-startCol+1; //lookup corresponding row for irow in this file imgReader[ifile].geo2image(x,y,readCol,readRow); if(readRow<0||readRow>=imgReader[ifile].nrOfRow()){ // imgReader.close(); continue; } // for(int iband=0;ibandiband)? band_opt[iband] : iband; // readBuffer[iband].resize(readncol); try{ imgReader[ifile].readData(readBuffer[ifile][iband],GDT_Float64,startCol,endCol,readRow,readBand,theResample); } catch(string error){ cerr << "error reading image " << input_opt[ifile] << ": " << endl; throw; } } for(int ib=0;ib(colMask); rowMask=static_cast(rowMask); if(rowMask>=0&&rowMask=0&&colMask(rowMask)!=static_cast(oldRowMask)){ assert(rowMask>=0&&rowMask(rowMask),mskband_opt[0]); } catch(string errorstring){ cerr << errorstring << endl; exit(1); } catch(...){ cerr << "error caught" << std::endl; exit(3); } oldRowMask=rowMask; } if(lineMask[colMask]==msknodata_opt[0]) valid=false; } } if(!valid) continue; //lookup corresponding row for irow in this file imgReader[ifile].geo2image(x,y,readCol,readRow); if(readCol<0||readCol>=imgReader[ifile].nrOfCol()) continue; double val_current=0; double val_new=0; bool readValid=true; switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(int vband=0;vbandvband){ if(val_new<=minValue_opt[vband]){ readValid=false; break; } } if(maxValue_opt.size()>vband){ if(val_new>=maxValue_opt[vband]){ readValid=false; break; } } if(srcnodata_opt.size()>vband){ if(val_new==srcnodata_opt[vband]){ readValid=false; break; } } } break; default: readCol=static_cast(readCol); for(int vband=0;vbandvband){ if(val_new<=minValue_opt[vband]){ readValid=false; break; } } if(maxValue_opt.size()>vband){ if(val_new>=maxValue_opt[vband]){ readValid=false; break; } } if(srcnodata_opt.size()>vband){ if(val_new==srcnodata_opt[vband]){ readValid=false; break; } } } break; } if(readValid){ if(file_opt[0]==1) ++fileBuffer[ib]; if(writeValid[ib]){ int iband=0; switch(cruleMap[crule_opt[0]]){ case(crule::maxndvi):{//max ndvi double red_current=writeBuffer[ruleBand_opt[0]][ib]; double nir_current=writeBuffer[ruleBand_opt[1]][ib]; double ndvi_current=0; if(red_current+nir_current>0&&red_current>=0&&nir_current>=0) ndvi_current=(nir_current-red_current)/(nir_current+red_current); double ndvi_new=0; double red_new=0; double nir_new=0; switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; red_new=(readCol-0.5-lowerCol)*readBuffer[ifile][ruleBand_opt[0]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][ruleBand_opt[0]][lowerCol-startCol]; nir_new=(readCol-0.5-lowerCol)*readBuffer[ifile][ruleBand_opt[1]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][ruleBand_opt[1]][lowerCol-startCol]; if(red_new+nir_new>0&&red_new>=0&&nir_new>=0) ndvi_new=(nir_new-red_new)/(nir_new+red_new); if(ndvi_new>=ndvi_current){ for(iband=0;iband1) fileBuffer[ib]=ifile; } break; default: readCol=static_cast(readCol); red_new=readBuffer[ifile][ruleBand_opt[0]][readCol-startCol]; nir_new=readBuffer[ifile][ruleBand_opt[1]][readCol-startCol]; if(red_new+nir_new>0&&red_new>=0&&nir_new>=0) ndvi_new=(nir_new-red_new)/(nir_new+red_new); if(ndvi_new>=ndvi_current){ for(iband=0;iband1) fileBuffer[ib]=ifile; } break; } break; } case(crule::maxband): case(crule::minband): case(crule::validband)://max,min,valid band val_current=writeBuffer[ruleBand_opt[0]][ib]; switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][ruleBand_opt[0]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][ruleBand_opt[0]][lowerCol-startCol]; val_new*=weight_opt[ifile]; if((cruleMap[crule_opt[0]]==crule::maxband&&val_new>val_current)||(cruleMap[crule_opt[0]]==crule::minband&&val_newminValue_opt[0]&&val_new1) fileBuffer[ib]=ifile; } break; default: readCol=static_cast(readCol); val_new=readBuffer[ifile][ruleBand_opt[0]][readCol-startCol]; val_new*=weight_opt[ifile]; if((cruleMap[crule_opt[0]]==crule::maxband&&val_new>val_current)||(cruleMap[crule_opt[0]]==crule::minband&&val_newminValue_opt[0]&&val_new1) fileBuffer[ib]=ifile; } break; } break; case(crule::mode)://max voting (only for Byte images) switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(iband=0;iband(readCol); for(iband=0;iband(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(iband=0;iband(readCol); for(iband=0;iband0); // assert(weight_opt[ifile]>=0); // assert(storeBuffer[iband][ib].back()>=0); } break; } if(file_opt[0]>1) fileBuffer[ib]=ifile; break; case(crule::overwrite): default: switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(iband=0;iband(readCol); for(iband=0;iband1) fileBuffer[ib]=ifile; break; } } else{ writeValid[ib]=true;//readValid was true int iband=0; switch(cruleMap[crule_opt[0]]){ case(crule::mean): case(crule::median): case(crule::sum): case(crule::minallbands): case(crule::maxallbands): case(crule::stdev): switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(iband=0;iband(readCol); for(iband=0;iband1) fileBuffer[ib]=ifile; break; case(crule::mode): switch(theResample){ case(BILINEAR): lowerCol=readCol-0.5; lowerCol=static_cast(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(iband=0;iband(readCol); for(iband=0;iband(lowerCol); upperCol=readCol+0.5; upperCol=static_cast(upperCol); if(lowerCol<0) lowerCol=0; if(upperCol>=imgReader[ifile].nrOfCol()) upperCol=imgReader[ifile].nrOfCol()-1; for(iband=0;iband(readCol); for(iband=0;iband1) fileBuffer[ib]=ifile; break; } } } } // imgReader.close(); } if(cruleMap[crule_opt[0]]==crule::mode){ vector classBuffer(imgWriter.nrOfCol()); if(class_opt.size()>1){ for(int iclass=0;iclass::iterator maxit=maxBuffer[icol].begin(); maxit=stat.mymax(maxBuffer[icol],maxBuffer[icol].begin(),maxBuffer[icol].end()); writeBuffer[0][icol]=distance(maxBuffer[icol].begin(),maxit); if(file_opt[0]>1) fileBuffer[icol]=*(maxit); } try{ imgWriter.writeData(writeBuffer[0],GDT_Float64,irow,0); if(file_opt[0]) imgWriter.writeData(fileBuffer,GDT_Int16,irow,1); } catch(string error){ cerr << "error writing image file " << output_opt[0] << ": " << error << endl; throw; } } } else{ for(int iband=0;iband(irow+1.0)/imgWriter.nrOfRow(); pfnProgress(progress,pszMessage,pProgressArg); } if(extent_opt.size()&&cut_opt.size()){ extentReader.close(); } for(int ifile=0;ifile. ***********************************************************************/ #include #include #include #include #include #include #include "base/Optionpk.h" #include "algorithms/ConfusionMatrix.h" #include "algorithms/FeatureSelector.h" #include "algorithms/OptFactory.h" #include "algorithms/CostFactorySVM.h" #include "algorithms/svm.h" #include "imageclasses/ImgReaderOgr.h" #ifdef HAVE_CONFIG_H #include #endif /******************************************************************************/ /*! \page pkoptsvm pkoptsvm program to optimize parameters for support vector machine classifier pksvm ## SYNOPSIS Usage: pkoptsvm -t training Options: [-cc startvalue -cc endvalue] [-g startvalue -g endvalue] [-stepcc stepsize] [-stepg stepsize] Advanced options: \section pkoptsvm_description Description The support vector machine depends on several parameters. Ideally, these parameters should be optimized for each classification problem. In case of a radial basis kernel function, two important parameters are \em{cost} and \em{gamma}. The utility pkoptsvm can optimize these two parameters, based on an accuracy assessment (the Kappa value). If an input test set (-i) is provided, it is used for the accuracy assessment. If not, the accuracy assessment is based on a cross validation (-cv) of the training sample. The optimization routine uses a grid search. The initial and final values of the parameters can be set with -cc startvalue -cc endvalue and -g startvalue -g endvalue for cost and gamma respectively. The search uses a multiplicative step for iterating the parameters (set with the options -stepcc and -stepg). An often used approach is to define a relatively large multiplicative step first (e.g 10) to obtain an initial estimate for both parameters. The estimate can then be optimized by defining a smaller step (>1) with constrained start and end values for the parameters cost and gamma. \section pkoptsvm_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | t | training | std::string | |training vector file. A single vector file contains all training features (must be set as: b0, b1, b2,...) for all classes (class numbers identified by label option). | | cc | ccost | float | 1 |min and max boundaries the parameter C of C-SVC, epsilon-SVR, and nu-SVR (optional: initial value) | | g | gamma | float | 0 |min max boundaries for gamma in kernel function (optional: initial value) | | stepcc | stepcc | double | 2 |multiplicative step for ccost in GRID search | | stepg | stepg | double | 2 |multiplicative step for gamma in GRID search | | i | input | std::string | |input test vector file | | tln | tln | std::string | |training layer name(s) | | label | label | std::string | label |identifier for class label in training vector file. | | bal | balance | unsigned int | 0 |balance the input data to this number of samples for each class | | random | random | bool | true |in case of balance, randomize input data | | min | min | int | 0 |if number of training pixels is less then min, do not take this class into account | | b | band | unsigned short | |band index (starting from 0, either use band option or use start to end) | | sband | startband | unsigned short | |Start band sequence number | | eband | endband | unsigned short | |End band sequence number | | offset | offset | double | 0 |offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band] | | scale | scale | double | 0 |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) | | svmt | svmtype | std::string | C_SVC |type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR) | | kt | kerneltype | std::string | radial |type of kernel function (linear,polynomial,radial,sigmoid) | | kd | kd | unsigned short | 3 |degree in kernel function | | c0 | coef0 | float | 0 |coef0 in kernel function | | nu | nu | float | 0.5 |the parameter nu of nu-SVC, one-class SVM, and nu-SVR | | eloss | eloss | float | 0.1 |the epsilon in loss function of epsilon-SVR | | cache | cache | int | 100 |cache memory size in MB | | etol | etol | float | 0.001 |the tolerance of termination criterion | | shrink | shrink | bool | false |whether to use the shrinking heuristics | | pe | probest | bool | true |whether to train a SVC or SVR model for probability estimates | | cv | cv | unsigned short | 2 |n-fold cross validation mode | | cf | cf | bool | false |use Overall Accuracy instead of kappa | | maxit | maxit | unsigned int | 500 |maximum number of iterations | | tol | tolerance | double | 0.0001 |relative tolerance for stopping criterion | | c | class | std::string | |list of class names. | | r | reclass | short | |list of class values (use same order as in class opt). | Usage: pkoptsvm -t training **/ using namespace std; #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) //declare objective function double objFunction(const std::vector &x, std::vector &grad, void *my_func_data); //global parameters used in objective function map classValueMap; vector nameVector; vector nctraining; vector nctest; Optionpk svm_type_opt("svmt", "svmtype", "type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)","C_SVC"); Optionpk kernel_type_opt("kt", "kerneltype", "type of kernel function (linear,polynomial,radial,sigmoid) ","radial"); Optionpk kernel_degree_opt("kd", "kd", "degree in kernel function",3); Optionpk coef0_opt("c0", "coef0", "coef0 in kernel function",0); Optionpk nu_opt("nu", "nu", "the parameter nu of nu-SVC, one-class SVM, and nu-SVR",0.5); Optionpk epsilon_loss_opt("eloss", "eloss", "the epsilon in loss function of epsilon-SVR",0.1); 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",true,2); 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 classname_opt("c", "class", "list of class names."); Optionpk classvalue_opt("r", "reclass", "list of class values (use same order as in class opt)."); Optionpk verbose_opt("v", "verbose", "use 1 to output intermediate results for plotting",0,2); double objFunction(const std::vector &x, std::vector &grad, void *my_func_data){ assert(grad.empty()); vector > *tf=reinterpret_cast >*> (my_func_data); float ccost=x[0]; float gamma=x[1]; double error=1.0/epsilon_tol_opt[0]; double kappa=1.0; double oa=1.0; CostFactorySVM costfactory(svm_type_opt[0], kernel_type_opt[0], kernel_degree_opt[0], gamma, coef0_opt[0], ccost, nu_opt[0], epsilon_loss_opt[0], cache_opt[0], epsilon_tol_opt[0], shrinking_opt[0], prob_est_opt[0], cv_opt[0], verbose_opt[0]); assert(tf->size()); // if(nctest>0) // costfactory.setCv(0); costfactory.setCv(cv_opt[0]); if(classname_opt.size()){ assert(classname_opt.size()==classvalue_opt.size()); for(int iclass=0;iclass nameVector=costfactory.getNameVector(); for(int iname=0;iname((costfactory.getClassValueMap())[nameVector[iname]]))<0) costfactory.pushBackClassName(type2string((costfactory.getClassValueMap())[nameVector[iname]])); } costfactory.setNcTraining(nctraining); costfactory.setNcTest(nctest); kappa=costfactory.getCost(*tf); return(kappa); } int main(int argc, char *argv[]) { map reclassMap; vector vreclass; Optionpk training_opt("t", "training", "training vector file. A single vector file contains all training features (must be set as: b0, b1, b2,...) for all classes (class numbers identified by label option)."); Optionpk ccost_opt("cc", "ccost", "min and max boundaries the parameter C of C-SVC, epsilon-SVR, and nu-SVR (optional: initial value)",1); Optionpk gamma_opt("g", "gamma", "min max boundaries for gamma in kernel function (optional: initial value)",0); Optionpk stepcc_opt("stepcc","stepcc","multiplicative step for ccost in GRID search",2); Optionpk stepg_opt("stepg","stepg","multiplicative step for gamma in GRID search",2); Optionpk input_opt("i", "input", "input test vector file"); Optionpk tlayer_opt("tln", "tln", "training layer name(s)"); Optionpk label_opt("label", "label", "identifier for class label in training vector file.","label"); // 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("bal", "balance", "balance the input data to this number of samples for each class", 0); Optionpk random_opt("random","random", "in case of balance, randomize input data", true); Optionpk minSize_opt("min", "min", "if number of training pixels is less then min, do not take this class into account", 0); Optionpk band_opt("b", "band", "band index (starting from 0, either use band option or use start to end)"); Optionpk bstart_opt("sband", "startband", "Start band sequence number"); Optionpk bend_opt("eband", "endband", "End band sequence number"); Optionpk offset_opt("offset", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0); Optionpk scale_opt("scale", "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 maxit_opt("maxit","maxit","maximum number of iterations",500); //Optionpk algorithm_opt("a", "algorithm", "GRID, or any optimization algorithm from http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms","GRID"); Optionpk tolerance_opt("tol","tolerance","relative tolerance for stopping criterion",0.0001); input_opt.setHide(1); tlayer_opt.setHide(1); label_opt.setHide(1); balance_opt.setHide(1); random_opt.setHide(1); minSize_opt.setHide(1); band_opt.setHide(1); bstart_opt.setHide(1); bend_opt.setHide(1); offset_opt.setHide(1); scale_opt.setHide(1); svm_type_opt.setHide(1); kernel_type_opt.setHide(1); kernel_degree_opt.setHide(1); coef0_opt.setHide(1); nu_opt.setHide(1); epsilon_loss_opt.setHide(1); cache_opt.setHide(1); epsilon_tol_opt.setHide(1); shrinking_opt.setHide(1); prob_est_opt.setHide(1); cv_opt.setHide(1); costfunction_opt.setHide(1); maxit_opt.setHide(1); tolerance_opt.setHide(1); // algorithm_opt.setHide(1); classname_opt.setHide(1); classvalue_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=training_opt.retrieveOption(argc,argv); ccost_opt.retrieveOption(argc,argv); gamma_opt.retrieveOption(argc,argv); stepcc_opt.retrieveOption(argc,argv); stepg_opt.retrieveOption(argc,argv); input_opt.retrieveOption(argc,argv); tlayer_opt.retrieveOption(argc,argv); label_opt.retrieveOption(argc,argv); balance_opt.retrieveOption(argc,argv); random_opt.retrieveOption(argc,argv); minSize_opt.retrieveOption(argc,argv); band_opt.retrieveOption(argc,argv); bstart_opt.retrieveOption(argc,argv); bend_opt.retrieveOption(argc,argv); offset_opt.retrieveOption(argc,argv); scale_opt.retrieveOption(argc,argv); svm_type_opt.retrieveOption(argc,argv); kernel_type_opt.retrieveOption(argc,argv); kernel_degree_opt.retrieveOption(argc,argv); coef0_opt.retrieveOption(argc,argv); nu_opt.retrieveOption(argc,argv); epsilon_loss_opt.retrieveOption(argc,argv); cache_opt.retrieveOption(argc,argv); epsilon_tol_opt.retrieveOption(argc,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); classname_opt.retrieveOption(argc,argv); classvalue_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkoptsvm -t training" << endl; cout << endl; 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 } assert(training_opt.size()); if(input_opt.size()) cv_opt[0]=0; if(verbose_opt[0]>=1){ if(input_opt.size()) std::cout << "input filename: " << input_opt[0] << std::endl; std::cout << "training vector file: " << std::endl; for(int ifile=0;ifile offset; vector scale; vector< Vector2d > trainingPixels;//[class][sample][band] vector< Vector2d > testPixels;//[class][sample][band] // if(priors_opt.size()>1){//priors from argument list // priors.resize(priors_opt.size()); // double normPrior=0; // for(int iclass=0;iclass classValueMap;//global variable for now (due to getCost) if(classname_opt.size()){ assert(classname_opt.size()==classvalue_opt.size()); for(int iclass=0;iclass fields; //organize training data trainingPixels.clear(); testPixels.clear(); map > trainingMap; map > testMap; if(verbose_opt[0]>=1) std::cout << "reading training file " << training_opt[0] << std::endl; try{ ImgReaderOgr trainingReader(training_opt[0]); if(band_opt.size()){ totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]); if(input_opt.size()){ ImgReaderOgr inputReader(input_opt[0]); totalTestSamples=inputReader.readDataImageOgr(testMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]); inputReader.close(); } } else{ totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]); if(input_opt.size()){ ImgReaderOgr inputReader(input_opt[0]); totalTestSamples=inputReader.readDataImageOgr(testMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]); inputReader.close(); } trainingReader.close(); } if(trainingMap.size()<2){ // map >::iterator mapit=trainingMap.begin(); // while(mapit!=trainingMap.end()) // cerr << mapit->first << " -> " << classValueMap[mapit->first] << std::endl; string errorstring="Error: could not read at least two classes from training input file"; throw(errorstring); } if(input_opt.size()&&testMap.size()<2){ string errorstring="Error: could not read at least two classes from test input file"; throw(errorstring); } } catch(string error){ cerr << error << std::endl; exit(1); } catch(...){ cerr << "error caught" << std::endl; exit(1); } //todo delete class 0 ? // if(verbose_opt[0]>=1) // std::cout << "erasing class 0 from training set (" << trainingMap[0].size() << " from " << totalSamples << ") samples" << std::endl; // totalSamples-=trainingMap[0].size(); // trainingMap.erase(0); if(verbose_opt[0]>1) std::cout << "training pixels: " << std::endl; map >::iterator mapit; mapit=trainingMap.begin(); while(mapit!=trainingMap.end()){ if(classValueMap.size()){ //check if name in training is covered by classname_opt (values can not be 0) if(classValueMap[mapit->first]>0){ if(verbose_opt[0]) std::cout << mapit->first << " -> " << classValueMap[mapit->first] << std::endl; } else{ std::cerr << "Error: names in classname option are not complete, please check names in training vector and make sure classvalue is > 0" << std::endl; exit(1); } } //delete small classes if((mapit->second).size()first); trainingPixels.push_back(mapit->second); if(verbose_opt[0]>1) std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl; // trainingPixels.push_back(mapit->second); ?? // ++iclass; ++mapit; } nclass=trainingPixels.size(); if(classname_opt.size()) assert(nclass==classname_opt.size()); nband=trainingPixels[0][0].size()-2;//X and Y//trainingPixels[0][0].size(); mapit=testMap.begin(); while(mapit!=testMap.end()){ if(classValueMap.size()){ //check if name in test is covered by classname_opt (values can not be 0) if(classValueMap[mapit->first]>0){ ;//ok, no need to print to std::cout } else{ std::cerr << "Error: names in classname option are not complete, please check names in test vector and make sure classvalue is > 0" << std::endl; exit(1); } } //no need to delete small classes for test sample testPixels.push_back(mapit->second); if(verbose_opt[0]>1) std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl; ++mapit; } if(input_opt.size()){ assert(nclass==testPixels.size()); assert(nband=testPixels[0][0].size()-2);//X and Y//testPixels[0][0].size(); assert(!cv_opt[0]); } //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp //balance training data if(balance_opt[0]>0){ if(random_opt[0]) srand(time(NULL)); totalSamples=0; for(int iclass=0;iclassbalance_opt[0]){ while(trainingPixels[iclass].size()>balance_opt[0]){ 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();isample1) assert(offset_opt.size()==nband); if(scale_opt.size()>1) assert(scale_opt.size()==nband); for(int iband=0;iband1) std::cout << "scaling for band" << iband << std::endl; offset[iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband]; scale[iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband]; //search for min and maximum if(scale[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]; if(theMax1){ std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl; std::cout << "Using offset, scale: " << offset[iband] << ", " << scale[iband] << std::endl; std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[iband])/scale[iband] << "," << (theMax-offset[iband])/scale[iband] << "]" << std::endl; } } } // if(priors_opt.size()==1){//default: equal priors for each class // priors.resize(nclass); // for(int iclass=0;iclass=1){ std::cout << "number of bands: " << nband << std::endl; std::cout << "number of classes: " << nclass << std::endl; // std::cout << "priors:"; // for(int iclass=0;iclass > trainingFeatures(nclass); for(int iclass=0;iclass=1) std::cout << "calculating features for class " << iclass << std::endl; nctraining[iclass]=trainingPixels[iclass].size(); if(verbose_opt[0]>=1) std::cout << "nctraining[" << iclass << "]: " << nctraining[iclass] << std::endl; if(testPixels.size()>iclass){ nctest[iclass]=testPixels[iclass].size(); if(verbose_opt[0]>=1){ std::cout << "nctest[" << iclass << "]: " << nctest[iclass] << std::endl; } } else nctest[iclass]=0; // trainingFeatures[iclass].resize(nctraining[iclass]); trainingFeatures[iclass].resize(nctraining[iclass]+nctest[iclass]); for(int isample=0;isampleisample); assert(trainingPixels[iclass][isample].size()>iband+startBand); assert(offset.size()>iband); assert(scale.size()>iband); float value=trainingPixels[iclass][isample][iband+startBand]; trainingFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]); } } // assert(trainingFeatures[iclass].size()==nctraining[iclass]); for(int isample=0;isampleisample); assert(testPixels[iclass][isample].size()>iband+startBand); assert(offset.size()>iband); assert(scale.size()>iband); float value=testPixels[iclass][isample][iband+startBand]; // testFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]); trainingFeatures[iclass][nctraining[iclass]+isample].push_back((value-offset[iband])/scale[iband]); } } assert(trainingFeatures[iclass].size()==nctraining[iclass]+nctest[iclass]); } assert(ccost_opt.size()>1);//must have boundaries at least (initial value is optional) if(ccost_opt.size()<3)//create initial value ccost_opt.push_back(sqrt(ccost_opt[0]*ccost_opt[1])); assert(gamma_opt.size()>1);//must have boundaries at least (initial value is optional) if(gamma_opt.size()<3)//create initial value gamma_opt.push_back(sqrt(gamma_opt[0]*gamma_opt[1]));//will be translated to 1.0/nFeatures assert(ccost_opt.size()==3);//min, init, max assert(gamma_opt.size()==3);//min, init, max assert(gamma_opt[0] x(2); // if(algorithm_opt[0]=="GRID"){ if (1){ // double minError=1000; // double minCost=0; // double minGamma=0; double maxKappa=0; double maxCost=0; double maxGamma=0; const char* pszMessage; void* pProgressArg=NULL; GDALProgressFunc pfnProgress=GDALTermProgress; double progress=0; if(!verbose_opt[0]) pfnProgress(progress,pszMessage,pProgressArg); double ncost=log(ccost_opt[1])/log(stepcc_opt[0])-log(ccost_opt[0])/log(stepcc_opt[0]); double ngamma=log(gamma_opt[1])/log(stepg_opt[0])-log(gamma_opt[0])/log(stepg_opt[0]); for(double ccost=ccost_opt[0];ccost<=ccost_opt[1];ccost*=stepcc_opt[0]){ for(double gamma=gamma_opt[0];gamma<=gamma_opt[1];gamma*=stepg_opt[0]){ x[0]=ccost; x[1]=gamma; std::vector theGrad; double kappa=0; kappa=objFunction(x,theGrad,&trainingFeatures); if(kappa>maxKappa){ maxKappa=kappa; maxCost=ccost; maxGamma=gamma; } if(verbose_opt[0]) std::cout << ccost << " " << gamma << " " << kappa<< std::endl; progress+=1.0/ncost/ngamma; if(!verbose_opt[0]) pfnProgress(progress,pszMessage,pProgressArg); } } progress=1.0; if(!verbose_opt[0]) pfnProgress(progress,pszMessage,pProgressArg); x[0]=maxCost; x[1]=maxGamma; } //else{ // nlopt::opt optimizer=OptFactory::getOptimizer(algorithm_opt[0],2); // if(verbose_opt[0]>1) // std::cout << "optimization algorithm: " << optimizer.get_algorithm_name() << "..." << std::endl; // std::vector lb(2); // std::vector init(2); // std::vector ub(2); // lb[0]=ccost_opt[0]; // lb[1]=(gamma_opt[0]>0)? gamma_opt[0] : 1.0/trainingFeatures[0][0].size(); // init[0]=ccost_opt[2]; // init[1]=(gamma_opt[2]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size(); // ub[0]=ccost_opt[1]; // ub[1]=(gamma_opt[1]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size(); // // optimizer.set_min_objective(objFunction, &trainingFeatures); // optimizer.set_max_objective(objFunction, &trainingFeatures); // optimizer.set_lower_bounds(lb); // optimizer.set_upper_bounds(ub); // if(verbose_opt[0]>1) // std::cout << "set stopping criteria" << std::endl; // //set stopping criteria // if(maxit_opt[0]) // optimizer.set_maxeval(maxit_opt[0]); // else // optimizer.set_xtol_rel(tolerance_opt[0]); // double minf=0; // x=init; // try{ // optimizer.optimize(x, minf); // } // catch(string error){ // cerr << error << std::endl; // exit(1); // } // catch (exception& e){ // cout << e.what() << endl; // } // catch(...){ // cerr << "error caught" << std::endl; // exit(1); // } // double ccost=x[0]; // double gamma=x[1]; // if(verbose_opt[0]) // std::cout << "optimized with " << optimizer.get_algorithm_name() << "..." << std::endl; //} std::cout << " --ccost " << x[0]; std::cout << " --gamma " << x[1]; std::cout << std::endl; } pktools-2.6.6/src/apps/Makefile.am0000644000113200011300000001165212646211212013713 00000000000000AM_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 @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 ############################################################################### # THE PROGRAMS TO BUILD ############################################################################### # the program to build and install (the names of the final binaries) #bin_PROGRAMS = pkinfo pkcrop pkdiff pkgetmask pksetmask pkcreatect pkdumpimg pkdumpogr pksieve pkstat pkstatascii pkstatogr pkstatprofile pkegcs pkextract pkfillnodata pkfilter pkfilterdem pkfilterascii pkdsm2shadow pkcomposite pkpolygonize pkascii2img pksvm pkfssvm pkascii2ogr pkreclass bin_PROGRAMS = pkinfo pkcrop pkdiff pkgetmask pksetmask pkcreatect pkdumpimg pkdumpogr pksieve pkstat pkstatascii pkstatogr pkstatprofile pkegcs pkextract pkfillnodata pkfilter pkfilterdem pkfilterascii pkdsm2shadow pkcomposite pkpolygonize pkascii2img pksvm pkfssvm pkascii2ogr pkreclass pkkalman # the program to build but not install (the names of the final binaries) #noinst_PROGRAMS = pkkalman if USE_FANN bin_PROGRAMS += pkann pkfsann pkregann pkann_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h pkann.cc pkann_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS) pkann_LDADD = $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS) -lgsl pkfsann_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h $(top_srcdir)/src/algorithms/CostFactory.h pkfsann.h pkfsann.cc pkfsann_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS) pkfsann_LDADD = $(GSL_LIBS) $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS) -lalgorithms -lgsl pkregann_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h pkregann.cc pkregann_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS) pkregann_LDADD = $(GSL_LIBS) $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS) endif if USE_LAS bin_PROGRAMS += pklas2img pklas2img_SOURCES = pklas2img.cc pklas2img_LDADD = -lgsl $(top_srcdir)/src/lasclasses/liblasClasses.la -llas $(AM_LDFLAGS) endif if USE_NLOPT bin_PROGRAMS += pkoptsvm pkoptsvm_SOURCES = $(top_srcdir)/src/algorithms/OptFactory.h $(top_srcdir)/src/algorithms/CostFactorySVM.h pkoptsvm.cc pkoptsvm_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lnlopt -lgsl endif # list of sources for the binaries pkinfo_SOURCES = pkinfo.cc pkinfo_LDADD = $(AM_LDFLAGS) -lgsl pkcrop_SOURCES = pkcrop.cc pkcrop_LDADD = -lgsl pkdiff_SOURCES = pkdiff.cc pkdiff_LDADD = -lgsl pkgetmask_SOURCES = pkgetmask.cc pksetmask_SOURCES = pksetmask.cc pkcreatect_SOURCES = pkcreatect.cc pkdumpimg_SOURCES = pkdumpimg.cc pkdumpogr_SOURCES = pkdumpogr.h pkdumpogr.cc pksieve_SOURCES = pksieve.cc pkstat_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h $(top_srcdir)/src/algorithms/ImgRegression.h $(top_srcdir)/src/algorithms/ImgRegression.cc pkstat.cc pkstat_LDADD = -lgsl -lgslcblas $(GSL_LIBS) $(AM_LDFLAGS) pkstatprofile_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h pkstatprofile.cc pkstatprofile_LDADD = -lgsl -lgslcblas $(GSL_LIBS) $(AM_LDFLAGS) pkstatascii_SOURCES = $(top_srcdir)/src/algorithms/StatFactory.h pkstatascii.cc pkstatascii_LDADD = -lgsl -lgslcblas $(GSL_LIBS) $(AM_LDFLAGS) pkstatogr_SOURCES = pkstatogr.cc pkstatogr_LDADD = -lgsl pkegcs_SOURCES = pkegcs.cc pkegcs_LDADD = $(AM_LDFLAGS) -lgsl -lgdal pkextract_SOURCES = pkextract.cc pkextract_LDADD = $(AM_LDFLAGS) -lgsl -lgdal pkfillnodata_SOURCES = pkfillnodata.cc pkfilter_SOURCES = pkfilter.cc pkfilter_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgsl -lgdal pkkalman_SOURCES = pkkalman.cc $(top_srcdir)/src/algorithms/ImgRegression.h $(top_srcdir)/src/algorithms/ImgRegression.cc pkkalman_LDADD = -lalgorithms -lgsl $(GSL_LIBS) $(AM_LDFLAGS) -lalgorithms pkfilterdem_SOURCES = pkfilterdem.cc pkfilterdem_LDADD = -lgsl pkfilterascii_SOURCES = pkfilterascii.cc pkfilterascii_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgsl -lgdal pkdsm2shadow_SOURCES = pkdsm2shadow.cc pkdsm2shadow_LDADD = -lgsl pkcomposite_SOURCES = pkcomposite.cc pkpolygonize_SOURCES = pkpolygonize.cc pksvm_SOURCES = $(top_srcdir)/src/algorithms/svm.h $(top_srcdir)/src/algorithms/svm.cpp pksvm.cc pksvm_LDADD = -lgsl pkfssvm_SOURCES = $(top_srcdir)/src/algorithms/svm.h $(top_srcdir)/src/algorithms/FeatureSelector.h $(top_srcdir)/src/algorithms/CostFactorySVM.h $(top_srcdir)/src/algorithms/svm.cpp pkfssvm.cc pkfssvm_LDADD = -lgsl $(GSL_LIBS) $(AM_LDFLAGS) -lalgorithms pkascii2img_SOURCES = pkascii2img.cc pkascii2ogr_SOURCES = pkascii2ogr.cc pkreclass_SOURCES = pkreclass.cc ############################################################################### pktools-2.6.6/src/apps/pkcreatect.cc0000644000113200011300000002260612634226557014333 00000000000000/********************************************************************** pkcreatect.cc: program to create and import colour table to GTiff image Copyright (C) 2008-2014 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 "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "base/Optionpk.h" /******************************************************************************/ /*! \page pkcreatect pkcreatect program to create and import colour table to GTiff image ## SYNOPSIS Usage: pkcreatect -i input.txt -o output [-ct colortable | -min value -max value] Options: [--grey] [-of GDALformat] [-co option]* [-d description] Advanced options: [--legend filename [--dim cols --dim rows]] \section pkascii2ogr_description Description Utility to include a color table to a raster dataset. You can either define an existing color table (ASCII text file) with the option -ct or define a minimum (-min) and maximum (-max) value. \section pkcreatect_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |Input image file | | o | output | std::string | |Output image file | | l | legend | std::string | |Create legend as png file | | dim | dim | short | 100 |number of columns and rows in legend. | | min | min | double | 0 |minimum value | | max | max | double | 100 |maximum value | | g | grey | bool | false |grey scale | | ct | ct | std::string | |color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid) | | d | description | std::string | |Set image description | | of | oformat | std::string | GTiff |Output image format (see also gdal_translate).| | co | co | std::string | |Creation option for output file. Multiple options can be specified. | Usage: pkcreatect -i input.txt -o output [-ct colortable | -min value -max value] Examples ======== Some examples how to use pkcreatect can be found \ref examples_pkcreatect "here" **/ using namespace std; int main(int argc,char **argv) { short red=-1; short green=-1; short blue=-1; Optionpk input_opt("i", "input", "Input image file"); Optionpk output_opt("o", "output", "Output image file"); Optionpk legend_opt("l", "legend", "Create legend as png file"); Optionpk dim_opt("dim", "dim", "number of columns and rows in legend.", 100); Optionpk min_opt("min", "min", "minimum value", 0); Optionpk max_opt("max", "max", "maximum value", 100); Optionpk grey_opt("g", "grey", "grey scale", false); Optionpk colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)"); Optionpk oformat_opt("of", "oformat", "Output image format (see also gdal_translate).", "GTiff"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); Optionpk description_opt("d", "description", "Set image description"); Optionpk verbose_opt("v", "verbose", "verbose", false,2); legend_opt.setHide(1); dim_opt.setHide(1); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); legend_opt.retrieveOption(argc,argv); dim_opt.retrieveOption(argc,argv); min_opt.retrieveOption(argc,argv); max_opt.retrieveOption(argc,argv); grey_opt.retrieveOption(argc,argv); colorTable_opt.retrieveOption(argc,argv); description_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){ cout << endl; cout << "Usage: pkcreatect -i input.txt -o output [-ct colortable | -min value -max value]" << endl; cout << endl; 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 } GDALColorTable colorTable; GDALColorEntry sEntry; if(colorTable_opt.empty()){ sEntry.c4=255; for(int i=min_opt[0];i<=max_opt[0];++i){ if(grey_opt[0]){ sEntry.c1=255*(i-min_opt[0])/(max_opt[0]-min_opt[0]); sEntry.c2=255*(i-min_opt[0])/(max_opt[0]-min_opt[0]); sEntry.c3=255*(i-min_opt[0])/(max_opt[0]-min_opt[0]); } else{//hot to cold colour ramp sEntry.c1=255; sEntry.c2=255; sEntry.c3=255; double delta=max_opt[0]-min_opt[0]; if(i<(min_opt[0]+0.25*delta)){ sEntry.c1=0; sEntry.c2=255*4*(i-min_opt[0])/delta; } else if(i<(min_opt[0]+0.5*delta)){ sEntry.c1=0; sEntry.c3=255*(1+4*(min_opt[0]+0.25*delta-i)/delta); } else if(i<(min_opt[0]+0.75*delta)){ sEntry.c1=255*4*(i-min_opt[0]-0.5*delta)/delta; sEntry.c3=0; } else{ sEntry.c2=255*(1+4*(min_opt[0]+0.75*delta-i)/delta); sEntry.c3=0; } } colorTable.SetColorEntry(i,&sEntry); if(output_opt.empty()) cout << i << " " << sEntry.c1 << " " << sEntry.c2 << " " << sEntry.c3 << " " << sEntry.c4 << endl; } } ImgWriterGdal legendWriter; short ncol=dim_opt[0]; short nrow; if(legend_opt.size()){ if(dim_opt.size()>1) nrow=dim_opt[1]; else{ nrow=max_opt[0]-min_opt[0]+1; ncol=dim_opt[0]; } vector pngOption; // pngOption.push_back("-co worldfile=no"); pngOption.push_back(""); legendWriter.open(legend_opt[0],ncol,nrow,1,GDT_Byte,oformat_opt[0],option_opt); if(colorTable_opt.size()){ if(colorTable_opt[0]!="none") legendWriter.setColorTable(colorTable_opt[0]); } else legendWriter.setColorTable(&colorTable); if(legend_opt.size()){ for(int irow=0;irow buffer(legendWriter.nrOfCol()); for(int icol=0;icol(max_opt[0]-min_opt[0]+1)/legendWriter.nrOfRow(); legendWriter.writeData(buffer,GDT_Byte,legendWriter.nrOfRow()-1-irow); } } } // const char* pszMessage; // void* pProgressArg=NULL; // GDALProgressFunc pfnProgress=GDALTermProgress; // double progress=0; // pfnProgress(progress,pszMessage,pProgressArg); if(input_opt.size()&&output_opt.size()){ ImgReaderGdal imgReader(input_opt[0]); ImgWriterGdal imgWriter; if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){ string theInterleave="INTERLEAVE="; theInterleave+=imgReader.getInterleave(); option_opt.push_back(theInterleave); } imgWriter.open(output_opt[0],imgReader.nrOfCol(),imgReader.nrOfRow(),1,GDT_Byte,oformat_opt[0],option_opt); imgWriter.copyGeoTransform(imgReader); if(colorTable_opt.size()){ if(colorTable_opt[0]!="none") imgWriter.setColorTable(colorTable_opt[0]); } else imgWriter.setColorTable(&colorTable); if(description_opt.size()) imgWriter.setImageDescription(description_opt[0]); switch(imgReader.getDataType()){ case(GDT_Byte):{ vector buffer; for(int irow=0;irow buffer; cout << "Warning: copying short to unsigned short without conversion, use gdal_translate -scale if needed..." << endl; for(int irow=0;irow buffer; for(int irow=0;irow. ***********************************************************************/ #include #include #include #include #include "imageclasses/ImgReaderGdal.h" #include "imageclasses/ImgWriterGdal.h" #include "imageclasses/ImgReaderOgr.h" #include "imageclasses/ImgWriterOgr.h" #include "base/Optionpk.h" #include "base/PosValue.h" #include "algorithms/ConfusionMatrix.h" #include "floatfann.h" #include "algorithms/myfann_cpp.h" /******************************************************************************/ /*! \page pkann pkann classify raster image using Artificial Neural Network ## SYNOPSIS Usage: pkann -t training [-i input -o output] [-cv value] Options: [-tln layer]* [-c name -r value]* [-of GDALformat|-f OGRformat] [-co NAME=VALUE]* [-ct filename] [-label attribute] [-prior value]* [-nn number]* [-m filename [-msknodata value]*] [-nodata value] Advanced options: [-b band] [-sband band -eband band]* [-bal size]* [-min] [-bag value] [-bs value] [-comb rule] [-cb filename] [-prob filename] [-pim priorimage] [--offset value] [--scale value] [--connection 0|1] [-w weights]* [--learning rate] [--maxit number] \section pkann_description Description The utility pkann implements an artificial neural network (ANN) to solve a supervised classification problem. The implementation is based on the open source C++ library fann). Both raster and vector files are supported as input. The output will contain the classification result, either in raster or vector format, corresponding to the format of the input. A training sample must be provided as an OGR vector dataset that contains the class labels and the features for each training point. The point locations are not considered in the training step. You can use the same training sample for classifying different images, provided the number of bands of the images are identical. Use the utility \ref pkextract "pkextract" to create a suitable training sample, based on a sample of points or polygons. For raster output maps you can attach a color table using the option -ct. \section pkann_options Options - use either `-short` or `--long` options (both `--long=value` and `--long value` are supported) - short option `-h` shows basic options only, long option `--help` shows all options |short|long|type|default|description| |-----|----|----|-------|-----------| | i | input | std::string | |input image | | t | training | std::string | |training vector file. A single vector 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) | | tln | tln | std::string | |training layer name(s) | | label | label | std::string | label |identifier for class label in training vector file. | | bal | balance | unsigned int | 0 |balance the input data to this number of samples for each class | | min | min | int | 0 |if number of training pixels is less then min, do not take this class into account (0: consider all classes) | | b | band | short | |band index (starting from 0, either use band option or use start to end) | | sband | startband | unsigned short | |Start band sequence number | | eband | endband | unsigned short | |End band sequence number | | | offset | double | 0 |offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band] | | scale | scale | double | 0 |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) | | a | aggreg | unsigned short | 1 |how to combine aggregated classifiers, see also rc option (1: sum rule, 2: max rule). | | prior | prior | double | 0 |prior probabilities for each class (e.g., -p 0.3 -p 0.3 -p 0.2 ) | | pim | priorimg | std::string | |prior probability image (multi-band img with band for each class | | cv | cv | unsigned short | 0 |n-fold cross validation mode | | cmf | cmf | std::string | ascii |Format for confusion matrix (ascii or latex) | | nn | nneuron | unsigned int | 5 |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) | | | connection | float | 1 |connection reate (default: 1.0 for a fully connected network) | | w | weights | float | 0 |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) | | l | learning | float | 0.7 |learning rate (default: 0.7) | | | maxit | unsigned int | 500 |number of maximum iterations (epoch) (default: 500) | | comb | comb | unsigned short | 0 |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) | | bag | bag | unsigned short | 1 |Number of bootstrap aggregations (default is no bagging: 1) | | bs | bsize | int | 100 |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 | | cb | classbag | std::string | |output for each individual bootstrap aggregation (default is blank) | | m | mask | std::string | |Only classify within specified mask (vector or raster). For raster mask, set nodata values with the option msknodata. | | msknodata | msknodata | short | 0 |mask value(s) not to consider for classification. Values will be taken over in classification image. Default is 0 | | nodata | nodata | unsigned short | 0 |nodata value to put where image is masked as nodata | | o | output | std::string | |output classification image | | ot | otype | std::string | |Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image | | of | oformat | std::string | |Output image format (see also gdal_translate). Empty string: inherit from input image | | ct | ct | std::string | |colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid) | | co | co | std::string | |Creation option for output file. Multiple options can be specified. | | | prob | std::string | |probability image. Default is no probability image | | f | f | std::string | SQLite |Output ogr format for active training sample | | na | nactive | unsigned int | 1 |number of active training points | | c | class | std::string | |list of class names. | | r | reclass | short | |list of class values (use same order as in class opt). | Usage: pkann -t training [-i input -o output] [-cv value] Examples ======== Some examples how to use pkann can be found \ref examples_pkann "here" **/ using namespace std; int main(int argc, char *argv[]) { vector priors; //--------------------------- command line options ------------------------------------ Optionpk input_opt("i", "input", "input image"); Optionpk training_opt("t", "training", "training vector file. A single vector 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 tlayer_opt("tln", "tln", "training layer name(s)"); Optionpk label_opt("label", "label", "identifier for class label in training vector file.","label"); Optionpk balance_opt("bal", "balance", "balance the input data to this number of samples for each class", 0); Optionpk random_opt("random", "random", "in case of balance, randomize input data", true,2); 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 band_opt("b", "band", "band index (starting from 0, either use band option or use start to end)"); Optionpk bstart_opt("sband", "startband", "Start band sequence number"); Optionpk bend_opt("eband", "endband", "End band sequence number"); Optionpk offset_opt("offset", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0); Optionpk scale_opt("scale", "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("prior", "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","",2); Optionpk cv_opt("cv", "cv", "n-fold cross validation mode",0); Optionpk cmformat_opt("cmf","cmf","Format for confusion matrix (ascii or latex)","ascii"); Optionpk nneuron_opt("nn", "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 learning_opt("l", "learning", "learning rate (default: 0.7)", 0.7); 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 maxit_opt("\0", "maxit", "number of maximum iterations (epoch) (default: 500)", 500); Optionpk comb_opt("comb", "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("bag", "bag", "Number of bootstrap aggregations (default is no bagging: 1)", 1); Optionpk bagSize_opt("bs", "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("cb", "classbag", "output for each individual bootstrap aggregation (default is blank)"); Optionpk mask_opt("m", "mask", "Only classify within specified mask (vector or raster). For raster mask, set nodata values with the option msknodata."); Optionpk msknodata_opt("msknodata", "msknodata", "mask value(s) not to consider for classification. Values will be taken over in classification image. Default is 0", 0); Optionpk nodata_opt("nodata", "nodata", "nodata value to put where image is masked as nodata", 0); Optionpk output_opt("o", "output", "output classification image"); 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).","GTiff"); Optionpk option_opt("co", "co", "Creation option for output file. Multiple options can be specified."); 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 entropy_opt("entropy", "entropy", "entropy image (measure for uncertainty of classifier output","",2); Optionpk active_opt("active", "active", "ogr output for active training sample.","",2); Optionpk ogrformat_opt("f", "f", "Output ogr format for active training sample","SQLite"); Optionpk nactive_opt("na", "nactive", "number of active training points",1); Optionpk classname_opt("c", "class", "list of class names."); Optionpk classvalue_opt("r", "reclass", "list of class values (use same order as in class opt)."); Optionpk verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0,2); option_opt.setHide(1); oformat_opt.setHide(1); band_opt.setHide(1); bstart_opt.setHide(1); bend_opt.setHide(1); balance_opt.setHide(1); minSize_opt.setHide(1); bag_opt.setHide(1); bagSize_opt.setHide(1); comb_opt.setHide(1); classBag_opt.setHide(1); minSize_opt.setHide(1); prob_opt.setHide(1); priorimg_opt.setHide(1); minSize_opt.setHide(1); offset_opt.setHide(1); scale_opt.setHide(1); connection_opt.setHide(1); weights_opt.setHide(1); maxit_opt.setHide(1); learning_opt.setHide(1); verbose_opt.setHide(2); bool doProcess;//stop process when program was invoked with help option (-h --help) try{ doProcess=input_opt.retrieveOption(argc,argv); training_opt.retrieveOption(argc,argv); tlayer_opt.retrieveOption(argc,argv); label_opt.retrieveOption(argc,argv); balance_opt.retrieveOption(argc,argv); random_opt.retrieveOption(argc,argv); minSize_opt.retrieveOption(argc,argv); band_opt.retrieveOption(argc,argv); bstart_opt.retrieveOption(argc,argv); bend_opt.retrieveOption(argc,argv); offset_opt.retrieveOption(argc,argv); scale_opt.retrieveOption(argc,argv); aggreg_opt.retrieveOption(argc,argv); priors_opt.retrieveOption(argc,argv); priorimg_opt.retrieveOption(argc,argv); cv_opt.retrieveOption(argc,argv); cmformat_opt.retrieveOption(argc,argv); nneuron_opt.retrieveOption(argc,argv); connection_opt.retrieveOption(argc,argv); weights_opt.retrieveOption(argc,argv); learning_opt.retrieveOption(argc,argv); maxit_opt.retrieveOption(argc,argv); comb_opt.retrieveOption(argc,argv); bag_opt.retrieveOption(argc,argv); bagSize_opt.retrieveOption(argc,argv); classBag_opt.retrieveOption(argc,argv); mask_opt.retrieveOption(argc,argv); msknodata_opt.retrieveOption(argc,argv); nodata_opt.retrieveOption(argc,argv); output_opt.retrieveOption(argc,argv); otype_opt.retrieveOption(argc,argv); oformat_opt.retrieveOption(argc,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); ogrformat_opt.retrieveOption(argc,argv); nactive_opt.retrieveOption(argc,argv); classname_opt.retrieveOption(argc,argv); classvalue_opt.retrieveOption(argc,argv); verbose_opt.retrieveOption(argc,argv); } catch(string predefinedString){ std::cout << predefinedString << std::endl; exit(0); } if(!doProcess){ cout << endl; cout << "Usage: pkann -t training [-i input -o output] [-cv value]" << endl; cout << endl; cout << "short option -h shows basic options only, use long option --help to show all options" << endl; exit(0);//help was invoked, stop processing } if(entropy_opt[0]=="") entropy_opt.clear(); if(active_opt[0]=="") active_opt.clear(); if(priorimg_opt[0]=="") priorimg_opt.clear(); if(verbose_opt[0]>=1){ if(input_opt.size()) cout << "image filename: " << input_opt[0] << endl; if(mask_opt.size()) cout << "mask filename: " << mask_opt[0] << endl; if(training_opt.size()){ cout << "training vector file: " << endl; for(int ifile=0;ifile1)?training_opt.size():bag_opt[0]; if(verbose_opt[0]>=1) cout << "number of bootstrap aggregations: " << nbag << endl; ImgReaderOgr extentReader; OGRLayer *readLayer; double ulx=0; double uly=0; double lrx=0; double lry=0; bool maskIsVector=false; if(mask_opt.size()){ try{ extentReader.open(mask_opt[0]); maskIsVector=true; readLayer = extentReader.getDataSource()->GetLayer(0); if(!(extentReader.getExtent(ulx,uly,lrx,lry))){ cerr << "Error: could not get extent from " << mask_opt[0] << endl; exit(1); } } catch(string errorString){ maskIsVector=false; } } ImgWriterOgr activeWriter; if(active_opt.size()){ ImgReaderOgr trainingReader(training_opt[0]); activeWriter.open(active_opt[0],ogrformat_opt[0]); activeWriter.createLayer(active_opt[0],trainingReader.getProjection(),wkbPoint,NULL); activeWriter.copyFields(trainingReader); } vector activePoints(nactive_opt[0]); for(int iactive=0;iactive net(nbag);//the neural network unsigned int nclass=0; int nband=0; int startBand=2;//first two bands represent X and Y pos if(priors_opt.size()>1){//priors from argument list priors.resize(priors_opt.size()); double normPrior=0; for(int iclass=0;iclass classValueMap; vector nameVector; if(classname_opt.size()){ assert(classname_opt.size()==classvalue_opt.size()); for(int iclass=0;iclass > offset(nbag); vector< vector > scale(nbag); map > trainingMap; vector< Vector2d > trainingPixels;//[class][sample][band] vector fields; for(int ibag=0;ibag=1) cout << "reading imageVector file " << training_opt[0] << endl; try{ ImgReaderOgr trainingReaderBag(training_opt[ibag]); if(band_opt.size()) totalSamples=trainingReaderBag.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt); else totalSamples=trainingReaderBag.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt); if(trainingMap.size()<2){ string errorstring="Error: could not read at least two classes from training file, did you provide class labels in training sample (see option label)?"; throw(errorstring); } trainingReaderBag.close(); } catch(string error){ cerr << error << std::endl; exit(1); } catch(...){ cerr << "error caught" << std::endl; exit(1); } //delete class 0 ? // if(verbose_opt[0]>=1) // std::cout << "erasing class 0 from training set (" << trainingMap[0].size() << " from " << totalSamples << ") samples" << std::endl; // totalSamples-=trainingMap[0].size(); // trainingMap.erase(0); //convert map to vector if(verbose_opt[0]>1) std::cout << "training pixels: " << std::endl; map >::iterator mapit=trainingMap.begin(); while(mapit!=trainingMap.end()){ //delete small classes if((mapit->second).size()second); if(verbose_opt[0]>1) std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl; ++mapit; } if(!ibag){ nclass=trainingPixels.size(); if(classname_opt.size()) assert(nclass==classname_opt.size()); nband=(training_opt.size())?trainingPixels[0][0].size()-2:trainingPixels[0][0].size();//X and Y } else{ assert(nclass==trainingPixels.size()); assert(nband==(training_opt.size())?trainingPixels[0][0].size()-2:trainingPixels[0][0].size()); } //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp //balance training data if(balance_opt[0]>0){ while(balance_opt.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();isample1) assert(offset_opt.size()==nband); if(scale_opt.size()>1) assert(scale_opt.size()==nband); for(int iband=0;iband=1) cout << "scaling for band" << iband << endl; offset[ibag][iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband]; scale[ibag][iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband]; //search for min and maximum 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]; if(theMax=1){ std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl; std::cout << "Using offset, scale: " << offset[ibag][iband] << ", " << scale[ibag][iband] << std::endl; std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[ibag][iband])/scale[ibag][iband] << "," << (theMax-offset[ibag][iband])/scale[ibag][iband] << "]" << std::endl; } } } } else{//use same offset and scale offset[ibag].resize(nband); scale[ibag].resize(nband); for(int iband=0;iband=1){ std::cout << "number of bands: " << nband << std::endl; std::cout << "number of classes: " << nclass << std::endl; std::cout << "priors:"; if(priorimg_opt.empty()){ for(int iclass=0;iclass >::iterator mapit=trainingMap.begin(); bool doSort=true; while(mapit!=trainingMap.end()){ nameVector.push_back(mapit->first); if(classValueMap.size()){ //check if name in training is covered by classname_opt (values can not be 0) if(classValueMap[mapit->first]>0){ if(cm.getClassIndex(type2string(classValueMap[mapit->first]))<0) cm.pushBackClassName(type2string(classValueMap[mapit->first]),doSort); } else{ std::cerr << "Error: names in classname option are not complete, please check names in training vector and make sure classvalue is > 0" << std::endl; exit(1); } } else cm.pushBackClassName(mapit->first,doSort); ++mapit; } if(classname_opt.empty()){ //std::cerr << "Warning: no class name and value pair provided for all " << nclass << " classes, using string2type instead!" << std::endl; for(int iclass=0;iclass " << string2type(cm.getClass(iclass)) << std::endl; classValueMap[cm.getClass(iclass)]=string2type(cm.getClass(iclass)); } } if(priors_opt.size()==nameVector.size()){ std::cerr << "Warning: please check if priors are provided in correct order!!!" << std::endl; for(int iclass=0;iclass > trainingFeatures(nclass); for(int iclass=0;iclass=1) cout << "calculating features for class " << iclass << endl; if(random_opt[0]) srand(time(NULL)); nctraining=(bagSize_opt[iclass]<100)? trainingPixels[iclass].size()/100.0*bagSize_opt[iclass] : trainingPixels[iclass].size();//bagSize_opt[iclass] given in % of training size if(nctraining<=0) nctraining=1; assert(nctraining<=trainingPixels[iclass].size()); int index=0; if(bagSize_opt[iclass]<100) random_shuffle(trainingPixels[iclass].begin(),trainingPixels[iclass].end()); trainingFeatures[iclass].resize(nctraining); for(int isample=0;isample=1){ cout << "number of features: " << nFeatures << endl; cout << "creating artificial neural network with " << nneuron_opt.size() << " hidden layer, having " << endl; for(int ilayer=0;ilayer # EOF # #create description if not exists # if [ ! -f ../doc/description_${THETOOL}.dox ];then # touch ../doc/description_${THETOOL}.dox # fi # cat ../doc/description_${THETOOL}.dox >> ../doc/${THETOOL}.dox # ## OPTIONS ## # cat >> ../doc/${THETOOL}.dox <> ../doc/${THETOOL}.dox # echo >> ../doc/${THETOOL}.dox # if [ -f examples_${THETOOL}.dox ];then # echo "Examples" >> ../doc/${THETOOL}.dox # echo "========" >> ../doc/${THETOOL}.dox # echo "Some examples how to use ${THETOOL} can be found \\ref examples_${THETOOL} \"here\"" >> ../doc/${THETOOL}.dox # fi # if [ -f faq_${THETOOL}.dox ];then # echo "FAQ" >> ../doc/${THETOOL}.dox # echo "========" >> ../doc/${THETOOL}.dox # echo "Frequently asked questions on ${THETOOL} can be found \\ref faq_${THETOOL} \"here\"" >> ../doc/${THETOOL}.dox # fi # done echo "create general dox file for aps list" echo "\section available_tools Available tools" > ../doc/apps.dox for file in ${SRCDIR}/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 #remove depricated utilities and those not ready to publish" echo "Savannah repository for homepage can only be maintained via cvs" #mkdir ~/tmp #cd ~/tmp #cvs -z3 -d:ext:kempenep@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 echo "ftp to downloads" #sftp kempenep@download.savannah.gnu.org:/releases/pktools pktools-2.6.6/doc/footer.html0000644000113200011300000000215412400110722013043 00000000000000 pktools-2.6.6/doc/examples_pkcrop.dox0000644000113200011300000000234012431401630014571 00000000000000\section examples_pkcrop Examples of pkcrop Crop the input image to the given bounding box \code pkcrop -i input.tif -ulx 100 -uly 1000 -lrx 600 -lry 100 -o output.tif \endcode Crop the input image to the envelop of the given polygon and mask all pixels outside polygon as 0 (using gdal_rasterize) \code pkcrop -i input.tif -e extent.shp -o output.tif gdal_rasterize -i -burn 0 -l extent extent.shp output.tif \endcode Extract bands 3,2,1 (starting from 0) in that order from multi-band raster image input.tif \code pkcrop -i input.tif -b 3 -b 2 -b 1 -o output.tif \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 -s 100 -ot Byte -o bimage.tif -ct colortable.txt \endcode Automatically scale raster floating point image fimage.tif to [0:100] and write the output as a single byte image with the given colourtable \code pkcrop -i fimage.tif -as 0 -as 100 -ot Byte -o bimage.tif -ct colortable.txt \endcode Crop raster image large.tif to the bounding box of raster image small.tif and use the same pixel size. \code pkcrop -i large.tif $(pkinfo -i small.tif -bb -dx -dy) -o output.tif \endcode pktools-2.6.6/doc/html/0000755000113200011300000000000012647637663011740 500000000000000pktools-2.6.6/doc/html/dir_e28b2035b152bb51229fe7a0fca4e376.html0000644000113200011300000001063512647637663017752 00000000000000 pktools: /home/kempenep/pktools/src/apps/not_used Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
not_used Directory Reference
Directory dependency graph for not_used:
/home/kempenep/pktools/src/apps/not_used

Files

file  pkeditogr.cc [code]
 
file  pkenhance.cc [code]
 
file  pkndvi.cc [code]
 
pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask__inherit__graph.md50000644000113200011300000000004012616110566024401 0000000000000055dc897a815a6313e823df16f9c9b716pktools-2.6.6/doc/html/pkoptsvm_8cc_source.html0000644000113200011300000031042012647637662016545 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkoptsvm.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkoptsvm.cc
1 /**********************************************************************
2 pkoptsvm.cc: program to optimize parameters for support vector machine classifier pksvm
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <sstream>
22 #include <fstream>
23 #include <vector>
24 #include <math.h>
25 #include <nlopt.hpp>
26 #include "base/Optionpk.h"
27 #include "algorithms/ConfusionMatrix.h"
28 #include "algorithms/FeatureSelector.h"
29 #include "algorithms/OptFactory.h"
30 #include "algorithms/CostFactorySVM.h"
31 #include "algorithms/svm.h"
32 #include "imageclasses/ImgReaderOgr.h"
33 
34 #ifdef HAVE_CONFIG_H
35 #include <config.h>
36 #endif
37 
38 /******************************************************************************/
103 using namespace std;
104 
105 #define Malloc(type,n) (type *)malloc((n)*sizeof(type))
106  //declare objective function
107 double objFunction(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data);
108 
109 //global parameters used in objective function
110 map<string,short> classValueMap;
111 vector<std::string> nameVector;
112 vector<unsigned int> nctraining;
113 vector<unsigned int> nctest;
114 Optionpk<std::string> svm_type_opt("svmt", "svmtype", "type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)","C_SVC");
115 Optionpk<std::string> kernel_type_opt("kt", "kerneltype", "type of kernel function (linear,polynomial,radial,sigmoid) ","radial");
116 Optionpk<unsigned short> kernel_degree_opt("kd", "kd", "degree in kernel function",3);
117 Optionpk<float> coef0_opt("c0", "coef0", "coef0 in kernel function",0);
118 Optionpk<float> nu_opt("nu", "nu", "the parameter nu of nu-SVC, one-class SVM, and nu-SVR",0.5);
119 Optionpk<float> epsilon_loss_opt("eloss", "eloss", "the epsilon in loss function of epsilon-SVR",0.1);
120 Optionpk<int> cache_opt("cache", "cache", "cache memory size in MB",100);
121 Optionpk<float> epsilon_tol_opt("etol", "etol", "the tolerance of termination criterion",0.001);
122 Optionpk<bool> shrinking_opt("shrink", "shrink", "whether to use the shrinking heuristics",false);
123 Optionpk<bool> prob_est_opt("pe", "probest", "whether to train a SVC or SVR model for probability estimates",true,2);
124 Optionpk<bool> costfunction_opt("cf", "cf", "use Overall Accuracy instead of kappa",false);
125 // Optionpk<bool> weight_opt("wi", "wi", "set the parameter C of class i to weight*C, for C-SVC",true);
126 Optionpk<unsigned short> cv_opt("cv", "cv", "n-fold cross validation mode",2);
127 Optionpk<string> classname_opt("c", "class", "list of class names.");
128 Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in class opt).");
129 Optionpk<short> verbose_opt("v", "verbose", "use 1 to output intermediate results for plotting",0,2);
130 
131 double objFunction(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data){
132 
133  assert(grad.empty());
134  vector<Vector2d<float> > *tf=reinterpret_cast<vector<Vector2d<float> >*> (my_func_data);
135  float ccost=x[0];
136  float gamma=x[1];
137  double error=1.0/epsilon_tol_opt[0];
138  double kappa=1.0;
139  double oa=1.0;
140 
141  CostFactorySVM costfactory(svm_type_opt[0], kernel_type_opt[0], kernel_degree_opt[0], gamma, coef0_opt[0], ccost, nu_opt[0], epsilon_loss_opt[0], cache_opt[0], epsilon_tol_opt[0], shrinking_opt[0], prob_est_opt[0], cv_opt[0], verbose_opt[0]);
142 
143  assert(tf->size());
144  // if(nctest>0)
145  // costfactory.setCv(0);
146 
147  costfactory.setCv(cv_opt[0]);
148 
149  if(classname_opt.size()){
150  assert(classname_opt.size()==classvalue_opt.size());
151  for(int iclass=0;iclass<classname_opt.size();++iclass)
152  costfactory.setClassValueMap(classname_opt[iclass],classvalue_opt[iclass]);
153  }
154  //set names in confusion matrix using nameVector
155  costfactory.setNameVector(nameVector);
156  // vector<string> nameVector=costfactory.getNameVector();
157  for(int iname=0;iname<nameVector.size();++iname){
158  if(costfactory.getClassValueMap().empty()){
159  costfactory.pushBackClassName(nameVector[iname]);
160  // cm.pushBackClassName(nameVector[iname]);
161  }
162  else if(costfactory.getClassIndex(type2string<short>((costfactory.getClassValueMap())[nameVector[iname]]))<0)
163  costfactory.pushBackClassName(type2string<short>((costfactory.getClassValueMap())[nameVector[iname]]));
164  }
165 
166  costfactory.setNcTraining(nctraining);
167  costfactory.setNcTest(nctest);
168 
169  kappa=costfactory.getCost(*tf);
170  return(kappa);
171 }
172 
173 int main(int argc, char *argv[])
174 {
175  map<short,int> reclassMap;
176  vector<int> vreclass;
177  Optionpk<string> training_opt("t", "training", "training vector file. A single vector file contains all training features (must be set as: b0, b1, b2,...) for all classes (class numbers identified by label option).");
178  Optionpk<float> ccost_opt("cc", "ccost", "min and max boundaries the parameter C of C-SVC, epsilon-SVR, and nu-SVR (optional: initial value)",1);
179  Optionpk<float> gamma_opt("g", "gamma", "min max boundaries for gamma in kernel function (optional: initial value)",0);
180  Optionpk<double> stepcc_opt("stepcc","stepcc","multiplicative step for ccost in GRID search",2);
181  Optionpk<double> stepg_opt("stepg","stepg","multiplicative step for gamma in GRID search",2);
182  Optionpk<string> input_opt("i", "input", "input test vector file");
183  Optionpk<string> tlayer_opt("tln", "tln", "training layer name(s)");
184  Optionpk<string> label_opt("label", "label", "identifier for class label in training vector file.","label");
185  // Optionpk<unsigned short> reclass_opt("\0", "rc", "reclass code (e.g. --rc=12 --rc=23 to reclass first two classes to 12 and 23 resp.).", 0);
186  Optionpk<unsigned int> balance_opt("bal", "balance", "balance the input data to this number of samples for each class", 0);
187  Optionpk<bool> random_opt("random","random", "in case of balance, randomize input data", true);
188  Optionpk<int> minSize_opt("min", "min", "if number of training pixels is less then min, do not take this class into account", 0);
189  Optionpk<unsigned short> band_opt("b", "band", "band index (starting from 0, either use band option or use start to end)");
190  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
191  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
192  Optionpk<double> offset_opt("offset", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
193  Optionpk<double> scale_opt("scale", "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);
194  Optionpk<unsigned int> maxit_opt("maxit","maxit","maximum number of iterations",500);
195 //Optionpk<string> algorithm_opt("a", "algorithm", "GRID, or any optimization algorithm from http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms","GRID");
196  Optionpk<double> tolerance_opt("tol","tolerance","relative tolerance for stopping criterion",0.0001);
197 
198  input_opt.setHide(1);
199  tlayer_opt.setHide(1);
200  label_opt.setHide(1);
201  balance_opt.setHide(1);
202  random_opt.setHide(1);
203  minSize_opt.setHide(1);
204  band_opt.setHide(1);
205  bstart_opt.setHide(1);
206  bend_opt.setHide(1);
207  offset_opt.setHide(1);
208  scale_opt.setHide(1);
209  svm_type_opt.setHide(1);
210  kernel_type_opt.setHide(1);
211  kernel_degree_opt.setHide(1);
212  coef0_opt.setHide(1);
213  nu_opt.setHide(1);
214  epsilon_loss_opt.setHide(1);
215  cache_opt.setHide(1);
216  epsilon_tol_opt.setHide(1);
217  shrinking_opt.setHide(1);
218  prob_est_opt.setHide(1);
219  cv_opt.setHide(1);
220  costfunction_opt.setHide(1);
221  maxit_opt.setHide(1);
222  tolerance_opt.setHide(1);
223 // algorithm_opt.setHide(1);
224  classname_opt.setHide(1);
225  classvalue_opt.setHide(1);
226 
227  bool doProcess;//stop process when program was invoked with help option (-h --help)
228  try{
229  doProcess=training_opt.retrieveOption(argc,argv);
230  ccost_opt.retrieveOption(argc,argv);
231  gamma_opt.retrieveOption(argc,argv);
232  stepcc_opt.retrieveOption(argc,argv);
233  stepg_opt.retrieveOption(argc,argv);
234  input_opt.retrieveOption(argc,argv);
235  tlayer_opt.retrieveOption(argc,argv);
236  label_opt.retrieveOption(argc,argv);
237  balance_opt.retrieveOption(argc,argv);
238  random_opt.retrieveOption(argc,argv);
239  minSize_opt.retrieveOption(argc,argv);
240  band_opt.retrieveOption(argc,argv);
241  bstart_opt.retrieveOption(argc,argv);
242  bend_opt.retrieveOption(argc,argv);
243  offset_opt.retrieveOption(argc,argv);
244  scale_opt.retrieveOption(argc,argv);
245  svm_type_opt.retrieveOption(argc,argv);
246  kernel_type_opt.retrieveOption(argc,argv);
247  kernel_degree_opt.retrieveOption(argc,argv);
248  coef0_opt.retrieveOption(argc,argv);
249  nu_opt.retrieveOption(argc,argv);
250  epsilon_loss_opt.retrieveOption(argc,argv);
251  cache_opt.retrieveOption(argc,argv);
252  epsilon_tol_opt.retrieveOption(argc,argv);
253  shrinking_opt.retrieveOption(argc,argv);
254  prob_est_opt.retrieveOption(argc,argv);
255  cv_opt.retrieveOption(argc,argv);
256  costfunction_opt.retrieveOption(argc,argv);
257  maxit_opt.retrieveOption(argc,argv);
258  tolerance_opt.retrieveOption(argc,argv);
259 // algorithm_opt.retrieveOption(argc,argv);
260  classname_opt.retrieveOption(argc,argv);
261  classvalue_opt.retrieveOption(argc,argv);
262  verbose_opt.retrieveOption(argc,argv);
263  }
264  catch(string predefinedString){
265  std::cout << predefinedString << std::endl;
266  exit(0);
267  }
268  if(!doProcess){
269  cout << endl;
270  cout << "Usage: pkoptsvm -t training" << endl;
271  cout << endl;
272  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
273  exit(0);//help was invoked, stop processing
274  }
275 
276  assert(training_opt.size());
277  if(input_opt.size())
278  cv_opt[0]=0;
279 
280  if(verbose_opt[0]>=1){
281  if(input_opt.size())
282  std::cout << "input filename: " << input_opt[0] << std::endl;
283  std::cout << "training vector file: " << std::endl;
284  for(int ifile=0;ifile<training_opt.size();++ifile)
285  std::cout << training_opt[ifile] << std::endl;
286  std::cout << "verbose: " << verbose_opt[0] << std::endl;
287  }
288 
289  unsigned int totalSamples=0;
290  unsigned int totalTestSamples=0;
291 
292  unsigned short nclass=0;
293  int nband=0;
294  int startBand=2;//first two bands represent X and Y pos
295 
296  vector<double> offset;
297  vector<double> scale;
298  vector< Vector2d<float> > trainingPixels;//[class][sample][band]
299  vector< Vector2d<float> > testPixels;//[class][sample][band]
300 
301  // if(priors_opt.size()>1){//priors from argument list
302  // priors.resize(priors_opt.size());
303  // double normPrior=0;
304  // for(int iclass=0;iclass<priors_opt.size();++iclass){
305  // priors[iclass]=priors_opt[iclass];
306  // normPrior+=priors[iclass];
307  // }
308  // //normalize
309  // for(int iclass=0;iclass<priors_opt.size();++iclass)
310  // priors[iclass]/=normPrior;
311  // }
312 
313  //convert start and end band options to vector of band indexes
314  try{
315  if(bstart_opt.size()){
316  if(bend_opt.size()!=bstart_opt.size()){
317  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
318  throw(errorstring);
319  }
320  band_opt.clear();
321  for(int ipair=0;ipair<bstart_opt.size();++ipair){
322  if(bend_opt[ipair]<=bstart_opt[ipair]){
323  string errorstring="Error: index for end band must be smaller then start band";
324  throw(errorstring);
325  }
326  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
327  band_opt.push_back(iband);
328  }
329  }
330  }
331  catch(string error){
332  cerr << error << std::endl;
333  exit(1);
334  }
335  //sort bands
336  if(band_opt.size())
337  std::sort(band_opt.begin(),band_opt.end());
338 
339  // map<string,short> classValueMap;//global variable for now (due to getCost)
340  if(classname_opt.size()){
341  assert(classname_opt.size()==classvalue_opt.size());
342  for(int iclass=0;iclass<classname_opt.size();++iclass)
343  classValueMap[classname_opt[iclass]]=classvalue_opt[iclass];
344  }
345 
346  //----------------------------------- Training -------------------------------
347  struct svm_problem prob;
348  vector<string> fields;
349  //organize training data
350  trainingPixels.clear();
351  testPixels.clear();
352  map<string,Vector2d<float> > trainingMap;
353  map<string,Vector2d<float> > testMap;
354  if(verbose_opt[0]>=1)
355  std::cout << "reading training file " << training_opt[0] << std::endl;
356  try{
357  ImgReaderOgr trainingReader(training_opt[0]);
358  if(band_opt.size()){
359  totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
360  if(input_opt.size()){
361  ImgReaderOgr inputReader(input_opt[0]);
362  totalTestSamples=inputReader.readDataImageOgr(testMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
363  inputReader.close();
364  }
365  }
366  else{
367  totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
368  if(input_opt.size()){
369  ImgReaderOgr inputReader(input_opt[0]);
370  totalTestSamples=inputReader.readDataImageOgr(testMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
371  inputReader.close();
372  }
373  trainingReader.close();
374  }
375  if(trainingMap.size()<2){
376  // map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
377  // while(mapit!=trainingMap.end())
378  // cerr << mapit->first << " -> " << classValueMap[mapit->first] << std::endl;
379  string errorstring="Error: could not read at least two classes from training input file";
380  throw(errorstring);
381  }
382  if(input_opt.size()&&testMap.size()<2){
383  string errorstring="Error: could not read at least two classes from test input file";
384  throw(errorstring);
385  }
386  }
387  catch(string error){
388  cerr << error << std::endl;
389  exit(1);
390  }
391  catch(...){
392  cerr << "error caught" << std::endl;
393  exit(1);
394  }
395  //todo delete class 0 ?
396  // if(verbose_opt[0]>=1)
397  // std::cout << "erasing class 0 from training set (" << trainingMap[0].size() << " from " << totalSamples << ") samples" << std::endl;
398  // totalSamples-=trainingMap[0].size();
399  // trainingMap.erase(0);
400 
401  if(verbose_opt[0]>1)
402  std::cout << "training pixels: " << std::endl;
403  map<string,Vector2d<float> >::iterator mapit;
404  mapit=trainingMap.begin();
405  while(mapit!=trainingMap.end()){
406  if(classValueMap.size()){
407  //check if name in training is covered by classname_opt (values can not be 0)
408  if(classValueMap[mapit->first]>0){
409  if(verbose_opt[0])
410  std::cout << mapit->first << " -> " << classValueMap[mapit->first] << std::endl;
411  }
412  else{
413  std::cerr << "Error: names in classname option are not complete, please check names in training vector and make sure classvalue is > 0" << std::endl;
414  exit(1);
415  }
416  }
417  //delete small classes
418  if((mapit->second).size()<minSize_opt[0]){
419  trainingMap.erase(mapit);
420  continue;
421  }
422  nameVector.push_back(mapit->first);
423  trainingPixels.push_back(mapit->second);
424  if(verbose_opt[0]>1)
425  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
426  // trainingPixels.push_back(mapit->second); ??
427  // ++iclass;
428  ++mapit;
429  }
430  nclass=trainingPixels.size();
431  if(classname_opt.size())
432  assert(nclass==classname_opt.size());
433  nband=trainingPixels[0][0].size()-2;//X and Y//trainingPixels[0][0].size();
434 
435  mapit=testMap.begin();
436  while(mapit!=testMap.end()){
437  if(classValueMap.size()){
438  //check if name in test is covered by classname_opt (values can not be 0)
439  if(classValueMap[mapit->first]>0){
440  ;//ok, no need to print to std::cout
441  }
442  else{
443  std::cerr << "Error: names in classname option are not complete, please check names in test vector and make sure classvalue is > 0" << std::endl;
444  exit(1);
445  }
446  }
447  //no need to delete small classes for test sample
448  testPixels.push_back(mapit->second);
449  if(verbose_opt[0]>1)
450  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
451  ++mapit;
452  }
453  if(input_opt.size()){
454  assert(nclass==testPixels.size());
455  assert(nband=testPixels[0][0].size()-2);//X and Y//testPixels[0][0].size();
456  assert(!cv_opt[0]);
457  }
458 
459  //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp
460  //balance training data
461  if(balance_opt[0]>0){
462  if(random_opt[0])
463  srand(time(NULL));
464  totalSamples=0;
465  for(int iclass=0;iclass<nclass;++iclass){
466  if(trainingPixels[iclass].size()>balance_opt[0]){
467  while(trainingPixels[iclass].size()>balance_opt[0]){
468  int index=rand()%trainingPixels[iclass].size();
469  trainingPixels[iclass].erase(trainingPixels[iclass].begin()+index);
470  }
471  }
472  else{
473  int oldsize=trainingPixels[iclass].size();
474  for(int isample=trainingPixels[iclass].size();isample<balance_opt[0];++isample){
475  int index = rand()%oldsize;
476  trainingPixels[iclass].push_back(trainingPixels[iclass][index]);
477  }
478  }
479  totalSamples+=trainingPixels[iclass].size();
480  }
481  assert(totalSamples==nclass*balance_opt[0]);
482  }
483 
484  //no need to balance test sample
485  //set scale and offset
486  offset.resize(nband);
487  scale.resize(nband);
488  if(offset_opt.size()>1)
489  assert(offset_opt.size()==nband);
490  if(scale_opt.size()>1)
491  assert(scale_opt.size()==nband);
492  for(int iband=0;iband<nband;++iband){
493  if(verbose_opt[0]>1)
494  std::cout << "scaling for band" << iband << std::endl;
495  offset[iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband];
496  scale[iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband];
497  //search for min and maximum
498  if(scale[iband]<=0){
499  float theMin=trainingPixels[0][0][iband+startBand];
500  float theMax=trainingPixels[0][0][iband+startBand];
501  for(int iclass=0;iclass<nclass;++iclass){
502  for(int isample=0;isample<trainingPixels[iclass].size();++isample){
503  if(theMin>trainingPixels[iclass][isample][iband+startBand])
504  theMin=trainingPixels[iclass][isample][iband+startBand];
505  if(theMax<trainingPixels[iclass][isample][iband+startBand])
506  theMax=trainingPixels[iclass][isample][iband+startBand];
507  }
508  }
509  offset[iband]=theMin+(theMax-theMin)/2.0;
510  scale[iband]=(theMax-theMin)/2.0;
511  if(verbose_opt[0]>1){
512  std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl;
513  std::cout << "Using offset, scale: " << offset[iband] << ", " << scale[iband] << std::endl;
514  std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[iband])/scale[iband] << "," << (theMax-offset[iband])/scale[iband] << "]" << std::endl;
515  }
516  }
517  }
518 
519  // if(priors_opt.size()==1){//default: equal priors for each class
520  // priors.resize(nclass);
521  // for(int iclass=0;iclass<nclass;++iclass)
522  // priors[iclass]=1.0/nclass;
523  // }
524  // assert(priors_opt.size()==1||priors_opt.size()==nclass);
525 
526  if(verbose_opt[0]>=1){
527  std::cout << "number of bands: " << nband << std::endl;
528  std::cout << "number of classes: " << nclass << std::endl;
529  // std::cout << "priors:";
530  // for(int iclass=0;iclass<nclass;++iclass)
531  // std::cout << " " << priors[iclass];
532  // std::cout << std::endl;
533  }
534 
535  //Calculate features of training (and test) set
536  nctraining.resize(nclass);
537  nctest.resize(nclass);
538  vector< Vector2d<float> > trainingFeatures(nclass);
539  for(int iclass=0;iclass<nclass;++iclass){
540  if(verbose_opt[0]>=1)
541  std::cout << "calculating features for class " << iclass << std::endl;
542  nctraining[iclass]=trainingPixels[iclass].size();
543  if(verbose_opt[0]>=1)
544  std::cout << "nctraining[" << iclass << "]: " << nctraining[iclass] << std::endl;
545  if(testPixels.size()>iclass){
546  nctest[iclass]=testPixels[iclass].size();
547  if(verbose_opt[0]>=1){
548  std::cout << "nctest[" << iclass << "]: " << nctest[iclass] << std::endl;
549  }
550  }
551  else
552  nctest[iclass]=0;
553  // trainingFeatures[iclass].resize(nctraining[iclass]);
554  trainingFeatures[iclass].resize(nctraining[iclass]+nctest[iclass]);
555  for(int isample=0;isample<nctraining[iclass];++isample){
556  //scale pixel values according to scale and offset!!!
557  for(int iband=0;iband<nband;++iband){
558  assert(trainingPixels[iclass].size()>isample);
559  assert(trainingPixels[iclass][isample].size()>iband+startBand);
560  assert(offset.size()>iband);
561  assert(scale.size()>iband);
562  float value=trainingPixels[iclass][isample][iband+startBand];
563  trainingFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]);
564  }
565  }
566  // assert(trainingFeatures[iclass].size()==nctraining[iclass]);
567  for(int isample=0;isample<nctest[iclass];++isample){
568  //scale pixel values according to scale and offset!!!
569  for(int iband=0;iband<nband;++iband){
570  assert(testPixels[iclass].size()>isample);
571  assert(testPixels[iclass][isample].size()>iband+startBand);
572  assert(offset.size()>iband);
573  assert(scale.size()>iband);
574  float value=testPixels[iclass][isample][iband+startBand];
575  // testFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]);
576  trainingFeatures[iclass][nctraining[iclass]+isample].push_back((value-offset[iband])/scale[iband]);
577  }
578  }
579  assert(trainingFeatures[iclass].size()==nctraining[iclass]+nctest[iclass]);
580  }
581 
582  assert(ccost_opt.size()>1);//must have boundaries at least (initial value is optional)
583  if(ccost_opt.size()<3)//create initial value
584  ccost_opt.push_back(sqrt(ccost_opt[0]*ccost_opt[1]));
585  assert(gamma_opt.size()>1);//must have boundaries at least (initial value is optional)
586  if(gamma_opt.size()<3)//create initial value
587  gamma_opt.push_back(sqrt(gamma_opt[0]*gamma_opt[1]));//will be translated to 1.0/nFeatures
588  assert(ccost_opt.size()==3);//min, init, max
589  assert(gamma_opt.size()==3);//min, init, max
590  assert(gamma_opt[0]<gamma_opt[1]);
591  assert(gamma_opt[0]<gamma_opt[2]);
592  assert(gamma_opt[2]<gamma_opt[1]);
593  assert(ccost_opt[0]<ccost_opt[1]);
594  assert(ccost_opt[0]<ccost_opt[2]);
595  assert(ccost_opt[2]<ccost_opt[1]);
596 
597  std::vector<double> x(2);
598 // if(algorithm_opt[0]=="GRID"){
599  if (1){
600  // double minError=1000;
601  // double minCost=0;
602  // double minGamma=0;
603  double maxKappa=0;
604  double maxCost=0;
605  double maxGamma=0;
606  const char* pszMessage;
607  void* pProgressArg=NULL;
608  GDALProgressFunc pfnProgress=GDALTermProgress;
609  double progress=0;
610  if(!verbose_opt[0])
611  pfnProgress(progress,pszMessage,pProgressArg);
612  double ncost=log(ccost_opt[1])/log(stepcc_opt[0])-log(ccost_opt[0])/log(stepcc_opt[0]);
613  double ngamma=log(gamma_opt[1])/log(stepg_opt[0])-log(gamma_opt[0])/log(stepg_opt[0]);
614  for(double ccost=ccost_opt[0];ccost<=ccost_opt[1];ccost*=stepcc_opt[0]){
615  for(double gamma=gamma_opt[0];gamma<=gamma_opt[1];gamma*=stepg_opt[0]){
616  x[0]=ccost;
617  x[1]=gamma;
618  std::vector<double> theGrad;
619  double kappa=0;
620  kappa=objFunction(x,theGrad,&trainingFeatures);
621  if(kappa>maxKappa){
622  maxKappa=kappa;
623  maxCost=ccost;
624  maxGamma=gamma;
625  }
626  if(verbose_opt[0])
627  std::cout << ccost << " " << gamma << " " << kappa<< std::endl;
628  progress+=1.0/ncost/ngamma;
629  if(!verbose_opt[0])
630  pfnProgress(progress,pszMessage,pProgressArg);
631  }
632  }
633  progress=1.0;
634  if(!verbose_opt[0])
635  pfnProgress(progress,pszMessage,pProgressArg);
636  x[0]=maxCost;
637  x[1]=maxGamma;
638  }
639  //else{
640  // nlopt::opt optimizer=OptFactory::getOptimizer(algorithm_opt[0],2);
641  // if(verbose_opt[0]>1)
642  // std::cout << "optimization algorithm: " << optimizer.get_algorithm_name() << "..." << std::endl;
643  // std::vector<double> lb(2);
644  // std::vector<double> init(2);
645  // std::vector<double> ub(2);
646 
647  // lb[0]=ccost_opt[0];
648  // lb[1]=(gamma_opt[0]>0)? gamma_opt[0] : 1.0/trainingFeatures[0][0].size();
649  // init[0]=ccost_opt[2];
650  // init[1]=(gamma_opt[2]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size();
651  // ub[0]=ccost_opt[1];
652  // ub[1]=(gamma_opt[1]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size();
653  // // optimizer.set_min_objective(objFunction, &trainingFeatures);
654  // optimizer.set_max_objective(objFunction, &trainingFeatures);
655  // optimizer.set_lower_bounds(lb);
656  // optimizer.set_upper_bounds(ub);
657  // if(verbose_opt[0]>1)
658  // std::cout << "set stopping criteria" << std::endl;
659  // //set stopping criteria
660  // if(maxit_opt[0])
661  // optimizer.set_maxeval(maxit_opt[0]);
662  // else
663  // optimizer.set_xtol_rel(tolerance_opt[0]);
664  // double minf=0;
665  // x=init;
666  // try{
667  // optimizer.optimize(x, minf);
668  // }
669  // catch(string error){
670  // cerr << error << std::endl;
671  // exit(1);
672  // }
673  // catch (exception& e){
674  // cout << e.what() << endl;
675  // }
676  // catch(...){
677  // cerr << "error caught" << std::endl;
678  // exit(1);
679  // }
680 
681  // double ccost=x[0];
682  // double gamma=x[1];
683  // if(verbose_opt[0])
684  // std::cout << "optimized with " << optimizer.get_algorithm_name() << "..." << std::endl;
685  //}
686  std::cout << " --ccost " << x[0];
687  std::cout << " --gamma " << x[1];
688  std::cout << std::endl;
689 }
pktools-2.6.6/doc/html/classKernel.html0000644000113200011300000001756212647637662015026 00000000000000 pktools: Kernel Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for Kernel:
Collaboration diagram for Kernel:

Public Member Functions

 Kernel (int l, svm_node *const *x, const svm_parameter &param)
 
virtual Qfloat * get_Q (int column, int len) const =0
 
virtual double * get_QD () const =0
 
virtual void swap_index (int i, int j) const
 

Static Public Member Functions

static double k_function (const svm_node *x, const svm_node *y, const svm_parameter &param)
 

Protected Attributes

double(Kernel::* kernel_function )(int i, int j) const
 

Detailed Description

Definition at line 204 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/inherit_graph_1.png0000644000113200011300000000170512616110567015415 00000000000000‰PNG  IHDRH%nå8”bKGDÿÿÿ ½§“zIDATX…í—OH:[Çñp12ýQ($ŠÛd`Q»Vm¢EéÐH”E‹¡…Td- „¢vnŠL7Õ&WEA„A…LQNM†Ù$óÛç3é÷{ãïýzŠŸÕ¹çž{ù~¹œ;w‚ @.RðÝþ+òƲœ5öGÊx}}}qqñ[¤dÂÀÀ€ÙlNÎ(RnE‚ öööššš~¯°Œ¯­­%'SO >ýÏ!âs2g{,o,ÛÈûÄÍÍMww·^¯W©T&“ÉçóÉØD¡P\\\ÈÖð2=>>FAVWWºººH’ÜÚÚúµâ2!Íuÿ3Ð4ÝÒÒ²¼¼, ÃÝÝËåjmmýuÚ2Bæ‰y½Þ¡¡¡ä MÓ+++bì÷ûÅóÔétSSSðññAÓtyyyiiiOOÏÓÓ“´p{{»²²EÑÉÉI1Ãó pktools: /home/kempenep/pktools/src/apps/pksvm.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksvm.cc
1 /**********************************************************************
2 pksvm.cc: classify raster image using Support Vector Machine
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <stdlib.h>
21 #include <vector>
22 #include <map>
23 #include <algorithm>
24 #include "imageclasses/ImgReaderGdal.h"
25 #include "imageclasses/ImgWriterGdal.h"
26 #include "imageclasses/ImgReaderOgr.h"
27 #include "imageclasses/ImgWriterOgr.h"
28 #include "base/Optionpk.h"
29 #include "base/PosValue.h"
30 #include "algorithms/ConfusionMatrix.h"
31 #include "algorithms/svm.h"
32 
33 #ifdef HAVE_CONFIG_H
34 #include <config.h>
35 #endif
36 /******************************************************************************/
118 namespace svm{
119  enum SVM_TYPE {C_SVC=0, nu_SVC=1,one_class=2, epsilon_SVR=3, nu_SVR=4};
120  enum KERNEL_TYPE {linear=0,polynomial=1,radial=2,sigmoid=3};
121 }
122 
123 #define Malloc(type,n) (type *)malloc((n)*sizeof(type))
124 
125 using namespace std;
126 
127 int main(int argc, char *argv[])
128 {
129  vector<double> priors;
130 
131  //--------------------------- command line options ------------------------------------
132  Optionpk<string> input_opt("i", "input", "input image");
133  Optionpk<string> training_opt("t", "training", "Training vector file. A single vector 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)");
134  Optionpk<string> tlayer_opt("tln", "tln", "Training layer name(s)");
135  Optionpk<string> label_opt("label", "label", "Attribute name for class label in training vector file.","label");
136  Optionpk<unsigned int> balance_opt("bal", "balance", "Balance the input data to this number of samples for each class", 0);
137  Optionpk<bool> random_opt("random", "random", "Randomize training data for balancing and bagging", true, 2);
138  Optionpk<int> 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);
139  Optionpk<unsigned short> band_opt("b", "band", "Band index (starting from 0, either use band option or use start to end)");
140  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
141  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
142  Optionpk<double> offset_opt("offset", "offset", "Offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
143  Optionpk<double> scale_opt("scale", "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);
144  Optionpk<double> priors_opt("prior", "prior", "Prior probabilities for each class (e.g., -p 0.3 -p 0.3 -p 0.2 ). Used for input only (ignored for cross validation)", 0.0);
145  Optionpk<string> priorimg_opt("pim", "priorimg", "Prior probability image (multi-band img with band for each class","",2);
146  Optionpk<unsigned short> cv_opt("cv", "cv", "N-fold cross validation mode",0);
147  Optionpk<string> cmformat_opt("cmf","cmf","Format for confusion matrix (ascii or latex)","ascii");
148  Optionpk<std::string> svm_type_opt("svmt", "svmtype", "Type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)","C_SVC");
149  Optionpk<std::string> kernel_type_opt("kt", "kerneltype", "Type of kernel function (linear,polynomial,radial,sigmoid) ","radial");
150  Optionpk<unsigned short> kernel_degree_opt("kd", "kd", "Degree in kernel function",3);
151  Optionpk<float> gamma_opt("g", "gamma", "Gamma in kernel function",1.0);
152  Optionpk<float> coef0_opt("c0", "coef0", "Coef0 in kernel function",0);
153  Optionpk<float> ccost_opt("cc", "ccost", "The parameter C of C_SVC, epsilon_SVR, and nu_SVR",1000);
154  Optionpk<float> nu_opt("nu", "nu", "The parameter nu of nu_SVC, one_class SVM, and nu_SVR",0.5);
155  Optionpk<float> epsilon_loss_opt("eloss", "eloss", "The epsilon in loss function of epsilon_SVR",0.1);
156  Optionpk<int> cache_opt("cache", "cache", "Cache memory size in MB",100);
157  Optionpk<float> epsilon_tol_opt("etol", "etol", "The tolerance of termination criterion",0.001);
158  Optionpk<bool> shrinking_opt("shrink", "shrink", "Whether to use the shrinking heuristics",false);
159  Optionpk<bool> prob_est_opt("pe", "probest", "Whether to train a SVC or SVR model for probability estimates",true,2);
160  // Optionpk<bool> weight_opt("wi", "wi", "Set the parameter C of class i to weight*C, for C_SVC",true);
161  Optionpk<unsigned short> comb_opt("comb", "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);
162  Optionpk<unsigned short> bag_opt("bag", "bag", "Number of bootstrap aggregations", 1);
163  Optionpk<int> bagSize_opt("bagsize", "bagsize", "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);
164  Optionpk<string> classBag_opt("cb", "classbag", "Output for each individual bootstrap aggregation");
165  Optionpk<string> mask_opt("m", "mask", "Only classify within specified mask (vector or raster). For raster mask, set nodata values with the option msknodata.");
166  Optionpk<short> msknodata_opt("msknodata", "msknodata", "Mask value(s) not to consider for classification. Values will be taken over in classification image.", 0);
167  Optionpk<unsigned short> nodata_opt("nodata", "nodata", "Nodata value to put where image is masked as nodata", 0);
168  Optionpk<string> output_opt("o", "output", "Output classification image");
169  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
170  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
171  Optionpk<string> colorTable_opt("ct", "ct", "Color table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)");
172  Optionpk<string> prob_opt("prob", "prob", "Probability image.");
173  Optionpk<string> entropy_opt("entropy", "entropy", "Entropy image (measure for uncertainty of classifier output","",2);
174  Optionpk<string> active_opt("active", "active", "Ogr output for active training sample.","",2);
175  Optionpk<string> ogrformat_opt("f", "f", "Output ogr format for active training sample","SQLite");
176  Optionpk<unsigned int> nactive_opt("na", "nactive", "Number of active training points",1);
177  Optionpk<string> classname_opt("c", "class", "List of class names.");
178  Optionpk<short> classvalue_opt("r", "reclass", "List of class values (use same order as in class opt).");
179  Optionpk<short> verbose_opt("v", "verbose", "Verbose level",0,2);
180 
181  oformat_opt.setHide(1);
182  option_opt.setHide(1);
183  band_opt.setHide(1);
184  bstart_opt.setHide(1);
185  bend_opt.setHide(1);
186  balance_opt.setHide(1);
187  minSize_opt.setHide(1);
188  bag_opt.setHide(1);
189  bagSize_opt.setHide(1);
190  comb_opt.setHide(1);
191  classBag_opt.setHide(1);
192  prob_opt.setHide(1);
193  priorimg_opt.setHide(1);
194  offset_opt.setHide(1);
195  scale_opt.setHide(1);
196  svm_type_opt.setHide(1);
197  kernel_type_opt.setHide(1);
198  kernel_degree_opt.setHide(1);
199  coef0_opt.setHide(1);
200  nu_opt.setHide(1);
201  epsilon_loss_opt.setHide(1);
202  cache_opt.setHide(1);
203  epsilon_tol_opt.setHide(1);
204  shrinking_opt.setHide(1);
205  prob_est_opt.setHide(1);
206  entropy_opt.setHide(1);
207  active_opt.setHide(1);
208  nactive_opt.setHide(1);
209  random_opt.setHide(1);
210 
211  verbose_opt.setHide(2);
212 
213  bool doProcess;//stop process when program was invoked with help option (-h --help)
214  try{
215  doProcess=training_opt.retrieveOption(argc,argv);
216  input_opt.retrieveOption(argc,argv);
217  output_opt.retrieveOption(argc,argv);
218  cv_opt.retrieveOption(argc,argv);
219  cmformat_opt.retrieveOption(argc,argv);
220  tlayer_opt.retrieveOption(argc,argv);
221  classname_opt.retrieveOption(argc,argv);
222  classvalue_opt.retrieveOption(argc,argv);
223  oformat_opt.retrieveOption(argc,argv);
224  ogrformat_opt.retrieveOption(argc,argv);
225  option_opt.retrieveOption(argc,argv);
226  colorTable_opt.retrieveOption(argc,argv);
227  label_opt.retrieveOption(argc,argv);
228  priors_opt.retrieveOption(argc,argv);
229  gamma_opt.retrieveOption(argc,argv);
230  ccost_opt.retrieveOption(argc,argv);
231  mask_opt.retrieveOption(argc,argv);
232  msknodata_opt.retrieveOption(argc,argv);
233  nodata_opt.retrieveOption(argc,argv);
234  // Advanced options
235  band_opt.retrieveOption(argc,argv);
236  bstart_opt.retrieveOption(argc,argv);
237  bend_opt.retrieveOption(argc,argv);
238  balance_opt.retrieveOption(argc,argv);
239  minSize_opt.retrieveOption(argc,argv);
240  bag_opt.retrieveOption(argc,argv);
241  bagSize_opt.retrieveOption(argc,argv);
242  comb_opt.retrieveOption(argc,argv);
243  classBag_opt.retrieveOption(argc,argv);
244  prob_opt.retrieveOption(argc,argv);
245  priorimg_opt.retrieveOption(argc,argv);
246  offset_opt.retrieveOption(argc,argv);
247  scale_opt.retrieveOption(argc,argv);
248  svm_type_opt.retrieveOption(argc,argv);
249  kernel_type_opt.retrieveOption(argc,argv);
250  kernel_degree_opt.retrieveOption(argc,argv);
251  coef0_opt.retrieveOption(argc,argv);
252  nu_opt.retrieveOption(argc,argv);
253  epsilon_loss_opt.retrieveOption(argc,argv);
254  cache_opt.retrieveOption(argc,argv);
255  epsilon_tol_opt.retrieveOption(argc,argv);
256  shrinking_opt.retrieveOption(argc,argv);
257  prob_est_opt.retrieveOption(argc,argv);
258  entropy_opt.retrieveOption(argc,argv);
259  active_opt.retrieveOption(argc,argv);
260  nactive_opt.retrieveOption(argc,argv);
261  verbose_opt.retrieveOption(argc,argv);
262  random_opt.retrieveOption(argc,argv);
263  }
264  catch(string predefinedString){
265  std::cout << predefinedString << std::endl;
266  exit(0);
267  }
268  if(!doProcess){
269  cout << endl;
270  cout << "Usage: pksvm -t training [-i input -o output] [-cv value]" << endl;
271  cout << endl;
272  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
273  exit(0);//help was invoked, stop processing
274  }
275 
276  if(entropy_opt[0]=="")
277  entropy_opt.clear();
278  if(active_opt[0]=="")
279  active_opt.clear();
280  if(priorimg_opt[0]=="")
281  priorimg_opt.clear();
282 
283 
284  std::map<std::string, svm::SVM_TYPE> svmMap;
285 
286  svmMap["C_SVC"]=svm::C_SVC;
287  svmMap["nu_SVC"]=svm::nu_SVC;
288  svmMap["one_class"]=svm::one_class;
289  svmMap["epsilon_SVR"]=svm::epsilon_SVR;
290  svmMap["nu_SVR"]=svm::nu_SVR;
291 
292  std::map<std::string, svm::KERNEL_TYPE> kernelMap;
293 
294  kernelMap["linear"]=svm::linear;
295  kernelMap["polynomial"]=svm::polynomial;
296  kernelMap["radial"]=svm::radial;
297  kernelMap["sigmoid;"]=svm::sigmoid;
298 
299  assert(training_opt.size());
300 
301  if(verbose_opt[0]>=1){
302  if(input_opt.size())
303  std::cout << "input filename: " << input_opt[0] << std::endl;
304  if(mask_opt.size())
305  std::cout << "mask filename: " << mask_opt[0] << std::endl;
306  std::cout << "training vector file: " << std::endl;
307  for(int ifile=0;ifile<training_opt.size();++ifile)
308  std::cout << training_opt[ifile] << std::endl;
309  std::cout << "verbose: " << verbose_opt[0] << std::endl;
310  }
311  unsigned short nbag=(training_opt.size()>1)?training_opt.size():bag_opt[0];
312  if(verbose_opt[0]>=1)
313  std::cout << "number of bootstrap aggregations: " << nbag << std::endl;
314 
315  ImgReaderOgr extentReader;
316  OGRLayer *readLayer;
317 
318  double ulx=0;
319  double uly=0;
320  double lrx=0;
321  double lry=0;
322 
323  bool maskIsVector=false;
324  if(mask_opt.size()){
325  try{
326  extentReader.open(mask_opt[0]);
327  maskIsVector=true;
328  readLayer = extentReader.getDataSource()->GetLayer(0);
329  if(!(extentReader.getExtent(ulx,uly,lrx,lry))){
330  cerr << "Error: could not get extent from " << mask_opt[0] << endl;
331  exit(1);
332  }
333  }
334  catch(string errorString){
335  maskIsVector=false;
336  }
337  }
338 
339  ImgWriterOgr activeWriter;
340  if(active_opt.size()){
341  prob_est_opt[0]=true;
342  ImgReaderOgr trainingReader(training_opt[0]);
343  activeWriter.open(active_opt[0],ogrformat_opt[0]);
344  activeWriter.createLayer(active_opt[0],trainingReader.getProjection(),wkbPoint,NULL);
345  activeWriter.copyFields(trainingReader);
346  }
347  vector<PosValue> activePoints(nactive_opt[0]);
348  for(int iactive=0;iactive<activePoints.size();++iactive){
349  activePoints[iactive].value=1.0;
350  activePoints[iactive].posx=0.0;
351  activePoints[iactive].posy=0.0;
352  }
353 
354  unsigned int totalSamples=0;
355  unsigned int nactive=0;
356  vector<struct svm_model*> svm(nbag);
357  vector<struct svm_parameter> param(nbag);
358 
359  short nclass=0;
360  int nband=0;
361  int startBand=2;//first two bands represent X and Y pos
362 
363  //normalize priors from command line
364  if(priors_opt.size()>1){//priors from argument list
365  priors.resize(priors_opt.size());
366  double normPrior=0;
367  for(short iclass=0;iclass<priors_opt.size();++iclass){
368  priors[iclass]=priors_opt[iclass];
369  normPrior+=priors[iclass];
370  }
371  //normalize
372  for(short iclass=0;iclass<priors_opt.size();++iclass)
373  priors[iclass]/=normPrior;
374  }
375 
376  //convert start and end band options to vector of band indexes
377  try{
378  if(bstart_opt.size()){
379  if(bend_opt.size()!=bstart_opt.size()){
380  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
381  throw(errorstring);
382  }
383  band_opt.clear();
384  for(int ipair=0;ipair<bstart_opt.size();++ipair){
385  if(bend_opt[ipair]<=bstart_opt[ipair]){
386  string errorstring="Error: index for end band must be smaller then start band";
387  throw(errorstring);
388  }
389  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
390  band_opt.push_back(iband);
391  }
392  }
393  }
394  catch(string error){
395  cerr << error << std::endl;
396  exit(1);
397  }
398  //sort bands
399  if(band_opt.size())
400  std::sort(band_opt.begin(),band_opt.end());
401 
402  map<string,short> classValueMap;
403  vector<std::string> nameVector;
404  if(classname_opt.size()){
405  assert(classname_opt.size()==classvalue_opt.size());
406  for(int iclass=0;iclass<classname_opt.size();++iclass)
407  classValueMap[classname_opt[iclass]]=classvalue_opt[iclass];
408  }
409 
410  //----------------------------------- Training -------------------------------
412  vector< vector<double> > offset(nbag);
413  vector< vector<double> > scale(nbag);
414  map<string,Vector2d<float> > trainingMap;
415  vector< Vector2d<float> > trainingPixels;//[class][sample][band]
416  vector<string> fields;
417 
418  vector<struct svm_problem> prob(nbag);
419  vector<struct svm_node *> x_space(nbag);
420 
421  for(int ibag=0;ibag<nbag;++ibag){
422  //organize training data
423  if(ibag<training_opt.size()){//if bag contains new training pixels
424  trainingMap.clear();
425  trainingPixels.clear();
426  if(verbose_opt[0]>=1)
427  std::cout << "reading imageVector file " << training_opt[0] << std::endl;
428  try{
429  ImgReaderOgr trainingReaderBag(training_opt[ibag]);
430  if(band_opt.size())
431  //todo: when tlayer_opt is provided, readDataImageOgr does not read any layer
432  totalSamples=trainingReaderBag.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
433  else
434  totalSamples=trainingReaderBag.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
435  if(trainingMap.size()<2){
436  string errorstring="Error: could not read at least two classes from training file, did you provide class labels in training sample (see option label)?";
437  throw(errorstring);
438  }
439  trainingReaderBag.close();
440  }
441  catch(string error){
442  cerr << error << std::endl;
443  exit(1);
444  }
445  catch(std::exception& e){
446  std::cerr << "Error: ";
447  std::cerr << e.what() << std::endl;
448  std::cerr << CPLGetLastErrorMsg() << std::endl;
449  exit(1);
450  }
451  catch(...){
452  cerr << "error caught" << std::endl;
453  exit(1);
454  }
455 
456  //convert map to vector
457  // short iclass=0;
458  if(verbose_opt[0]>1)
459  std::cout << "training pixels: " << std::endl;
460  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
461  while(mapit!=trainingMap.end()){
462  //delete small classes
463  if((mapit->second).size()<minSize_opt[0]){
464  trainingMap.erase(mapit);
465  continue;
466  }
467  trainingPixels.push_back(mapit->second);
468  if(verbose_opt[0]>1)
469  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
470  ++mapit;
471  }
472  if(!ibag){
473  nclass=trainingPixels.size();
474  if(classname_opt.size())
475  assert(nclass==classname_opt.size());
476  nband=trainingPixels[0][0].size()-2;//X and Y//trainingPixels[0][0].size();
477  }
478  else{
479  assert(nclass==trainingPixels.size());
480  assert(nband==trainingPixels[0][0].size()-2);
481  }
482 
483  //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp
484  //balance training data
485  if(balance_opt[0]>0){
486  while(balance_opt.size()<nclass)
487  balance_opt.push_back(balance_opt.back());
488  if(random_opt[0])
489  srand(time(NULL));
490  totalSamples=0;
491  for(short iclass=0;iclass<nclass;++iclass){
492  if(trainingPixels[iclass].size()>balance_opt[iclass]){
493  while(trainingPixels[iclass].size()>balance_opt[iclass]){
494  int index=rand()%trainingPixels[iclass].size();
495  trainingPixels[iclass].erase(trainingPixels[iclass].begin()+index);
496  }
497  }
498  else{
499  int oldsize=trainingPixels[iclass].size();
500  for(int isample=trainingPixels[iclass].size();isample<balance_opt[iclass];++isample){
501  int index = rand()%oldsize;
502  trainingPixels[iclass].push_back(trainingPixels[iclass][index]);
503  }
504  }
505  totalSamples+=trainingPixels[iclass].size();
506  }
507  }
508 
509  //set scale and offset
510  offset[ibag].resize(nband);
511  scale[ibag].resize(nband);
512  if(offset_opt.size()>1)
513  assert(offset_opt.size()==nband);
514  if(scale_opt.size()>1)
515  assert(scale_opt.size()==nband);
516  for(int iband=0;iband<nband;++iband){
517  if(verbose_opt[0]>=1)
518  std::cout << "scaling for band" << iband << std::endl;
519  offset[ibag][iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband];
520  scale[ibag][iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband];
521  //search for min and maximum
522  if(scale[ibag][iband]<=0){
523  float theMin=trainingPixels[0][0][iband+startBand];
524  float theMax=trainingPixels[0][0][iband+startBand];
525  for(short iclass=0;iclass<nclass;++iclass){
526  for(int isample=0;isample<trainingPixels[iclass].size();++isample){
527  if(theMin>trainingPixels[iclass][isample][iband+startBand])
528  theMin=trainingPixels[iclass][isample][iband+startBand];
529  if(theMax<trainingPixels[iclass][isample][iband+startBand])
530  theMax=trainingPixels[iclass][isample][iband+startBand];
531  }
532  }
533  offset[ibag][iband]=theMin+(theMax-theMin)/2.0;
534  scale[ibag][iband]=(theMax-theMin)/2.0;
535  if(verbose_opt[0]>=1){
536  std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl;
537  std::cout << "Using offset, scale: " << offset[ibag][iband] << ", " << scale[ibag][iband] << std::endl;
538  std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[ibag][iband])/scale[ibag][iband] << "," << (theMax-offset[ibag][iband])/scale[ibag][iband] << "]" << std::endl;
539  }
540  }
541  }
542  }
543  else{//use same offset and scale
544  offset[ibag].resize(nband);
545  scale[ibag].resize(nband);
546  for(int iband=0;iband<nband;++iband){
547  offset[ibag][iband]=offset[0][iband];
548  scale[ibag][iband]=scale[0][iband];
549  }
550  }
551 
552  if(!ibag){
553  if(priors_opt.size()==1){//default: equal priors for each class
554  priors.resize(nclass);
555  for(short iclass=0;iclass<nclass;++iclass)
556  priors[iclass]=1.0/nclass;
557  }
558  assert(priors_opt.size()==1||priors_opt.size()==nclass);
559 
560  //set bagsize for each class if not done already via command line
561  while(bagSize_opt.size()<nclass)
562  bagSize_opt.push_back(bagSize_opt.back());
563 
564  if(verbose_opt[0]>=1){
565  std::cout << "number of bands: " << nband << std::endl;
566  std::cout << "number of classes: " << nclass << std::endl;
567  if(priorimg_opt.empty()){
568  std::cout << "priors:";
569  for(short iclass=0;iclass<nclass;++iclass)
570  std::cout << " " << priors[iclass];
571  std::cout << std::endl;
572  }
573  }
574  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
575  bool doSort=true;
576  try{
577  while(mapit!=trainingMap.end()){
578  nameVector.push_back(mapit->first);
579  if(classValueMap.size()){
580  //check if name in training is covered by classname_opt (values can not be 0)
581  if(classValueMap[mapit->first]>0){
582  if(cm.getClassIndex(type2string<short>(classValueMap[mapit->first]))<0){
583  cm.pushBackClassName(type2string<short>(classValueMap[mapit->first]),doSort);
584  }
585  }
586  else{
587  std::cerr << "Error: names in classname option are not complete, please check names in training vector and make sure classvalue is > 0" << std::endl;
588  exit(1);
589  }
590  }
591  else
592  cm.pushBackClassName(mapit->first,doSort);
593  ++mapit;
594  }
595  }
596  catch(BadConversion conversionString){
597  std::cerr << "Error: did you provide class pairs names (-c) and integer values (-r) for each class in training vector?" << std::endl;
598  exit(1);
599  }
600  if(classname_opt.empty()){
601  //std::cerr << "Warning: no class name and value pair provided for all " << nclass << " classes, using string2type<int> instead!" << std::endl;
602  for(int iclass=0;iclass<nclass;++iclass){
603  if(verbose_opt[0])
604  std::cout << iclass << " " << cm.getClass(iclass) << " -> " << string2type<short>(cm.getClass(iclass)) << std::endl;
605  classValueMap[cm.getClass(iclass)]=string2type<short>(cm.getClass(iclass));
606  }
607  }
608 
609  // if(priors_opt.size()==nameVector.size()){
610  // std::cerr << "Warning: please check if priors are provided in correct order!!!" << std::endl;
611  // for(int iclass=0;iclass<nameVector.size();++iclass)
612  // std::cerr << nameVector[iclass] << " " << priors_opt[iclass] << std::endl;
613  // }
614  }//if(!ibag)
615 
616  //Calculate features of training set
617  vector< Vector2d<float> > trainingFeatures(nclass);
618  for(short iclass=0;iclass<nclass;++iclass){
619  int nctraining=0;
620  if(verbose_opt[0]>=1)
621  std::cout << "calculating features for class " << iclass << std::endl;
622  if(random_opt[0])
623  srand(time(NULL));
624  nctraining=(bagSize_opt[iclass]<100)? trainingPixels[iclass].size()/100.0*bagSize_opt[iclass] : trainingPixels[iclass].size();//bagSize_opt[iclass] given in % of training size
625  if(nctraining<=0)
626  nctraining=1;
627  assert(nctraining<=trainingPixels[iclass].size());
628  int index=0;
629  if(bagSize_opt[iclass]<100)
630  random_shuffle(trainingPixels[iclass].begin(),trainingPixels[iclass].end());
631  if(verbose_opt[0]>1)
632  std::cout << "nctraining (class " << iclass << "): " << nctraining << std::endl;
633  trainingFeatures[iclass].resize(nctraining);
634  for(int isample=0;isample<nctraining;++isample){
635  //scale pixel values according to scale and offset!!!
636  for(int iband=0;iband<nband;++iband){
637  float value=trainingPixels[iclass][isample][iband+startBand];
638  trainingFeatures[iclass][isample].push_back((value-offset[ibag][iband])/scale[ibag][iband]);
639  }
640  }
641  assert(trainingFeatures[iclass].size()==nctraining);
642  }
643 
644  unsigned int nFeatures=trainingFeatures[0][0].size();
645  if(verbose_opt[0]>=1)
646  std::cout << "number of features: " << nFeatures << std::endl;
647  unsigned int ntraining=0;
648  for(short iclass=0;iclass<nclass;++iclass)
649  ntraining+=trainingFeatures[iclass].size();
650  if(verbose_opt[0]>=1)
651  std::cout << "training size over all classes: " << ntraining << std::endl;
652 
653  prob[ibag].l=ntraining;
654  prob[ibag].y = Malloc(double,prob[ibag].l);
655  prob[ibag].x = Malloc(struct svm_node *,prob[ibag].l);
656  x_space[ibag] = Malloc(struct svm_node,(nFeatures+1)*ntraining);
657  unsigned long int spaceIndex=0;
658  int lIndex=0;
659  for(short iclass=0;iclass<nclass;++iclass){
660  for(int isample=0;isample<trainingFeatures[iclass].size();++isample){
661  prob[ibag].x[lIndex]=&(x_space[ibag][spaceIndex]);
662  for(int ifeature=0;ifeature<nFeatures;++ifeature){
663  x_space[ibag][spaceIndex].index=ifeature+1;
664  x_space[ibag][spaceIndex].value=trainingFeatures[iclass][isample][ifeature];
665  ++spaceIndex;
666  }
667  x_space[ibag][spaceIndex++].index=-1;
668  prob[ibag].y[lIndex]=iclass;
669  ++lIndex;
670  }
671  }
672  assert(lIndex==prob[ibag].l);
673 
674  //set SVM parameters through command line options
675  param[ibag].svm_type = svmMap[svm_type_opt[0]];
676  param[ibag].kernel_type = kernelMap[kernel_type_opt[0]];
677  param[ibag].degree = kernel_degree_opt[0];
678  param[ibag].gamma = (gamma_opt[0]>0)? gamma_opt[0] : 1.0/nFeatures;
679  param[ibag].coef0 = coef0_opt[0];
680  param[ibag].nu = nu_opt[0];
681  param[ibag].cache_size = cache_opt[0];
682  param[ibag].C = ccost_opt[0];
683  param[ibag].eps = epsilon_tol_opt[0];
684  param[ibag].p = epsilon_loss_opt[0];
685  param[ibag].shrinking = (shrinking_opt[0])? 1 : 0;
686  param[ibag].probability = (prob_est_opt[0])? 1 : 0;
687  param[ibag].nr_weight = 0;//not used: I use priors and balancing
688  param[ibag].weight_label = NULL;
689  param[ibag].weight = NULL;
690  param[ibag].verbose=(verbose_opt[0]>1)? true:false;
691 
692  if(verbose_opt[0]>1)
693  std::cout << "checking parameters" << std::endl;
694  svm_check_parameter(&prob[ibag],&param[ibag]);
695  if(verbose_opt[0])
696  std::cout << "parameters ok, training" << std::endl;
697  svm[ibag]=svm_train(&prob[ibag],&param[ibag]);
698  if(verbose_opt[0]>1)
699  std::cout << "SVM is now trained" << std::endl;
700  if(cv_opt[0]>1){
701  if(verbose_opt[0]>1)
702  std::cout << "Cross validating" << std::endl;
703  double *target = Malloc(double,prob[ibag].l);
704  svm_cross_validation(&prob[ibag],&param[ibag],cv_opt[0],target);
705  assert(param[ibag].svm_type != EPSILON_SVR&&param[ibag].svm_type != NU_SVR);//only for regression
706 
707  for(int i=0;i<prob[ibag].l;i++){
708  string refClassName=nameVector[prob[ibag].y[i]];
709  string className=nameVector[target[i]];
710  if(classValueMap.size())
711  cm.incrementResult(type2string<short>(classValueMap[refClassName]),type2string<short>(classValueMap[className]),1.0/nbag);
712  else
713  cm.incrementResult(cm.getClass(prob[ibag].y[i]),cm.getClass(target[i]),1.0/nbag);
714  }
715  free(target);
716  }
717  // *NOTE* Because svm_model contains pointers to svm_problem, you can
718  // not free the memory used by svm_problem if you are still using the
719  // svm_model produced by svm_train().
720  }//for ibag
721  if(cv_opt[0]>1){
722  assert(cm.nReference());
723  cm.setFormat(cmformat_opt[0]);
724  cm.reportSE95(false);
725  std::cout << cm << std::endl;
726  // cout << "class #samples userAcc prodAcc" << endl;
727  // double se95_ua=0;
728  // double se95_pa=0;
729  // double se95_oa=0;
730  // double dua=0;
731  // double dpa=0;
732  // double doa=0;
733  // for(short iclass=0;iclass<cm.nClasses();++iclass){
734  // dua=cm.ua(cm.getClass(iclass),&se95_ua);
735  // dpa=cm.pa(cm.getClass(iclass),&se95_pa);
736  // cout << cm.getClass(iclass) << " " << cm.nReference(cm.getClass(iclass)) << " " << dua << " (" << se95_ua << ")" << " " << dpa << " (" << se95_pa << ")" << endl;
737  // }
738  // std::cout << "Kappa: " << cm.kappa() << std::endl;
739  // doa=cm.oa(&se95_oa);
740  // std::cout << "Overall Accuracy: " << 100*doa << " (" << 100*se95_oa << ")" << std::endl;
741  }
742 
743  //--------------------------------- end of training -----------------------------------
744  if(input_opt.empty())
745  exit(0);
746 
747  const char* pszMessage;
748  void* pProgressArg=NULL;
749  GDALProgressFunc pfnProgress=GDALTermProgress;
750  float progress=0;
751  if(!verbose_opt[0])
752  pfnProgress(progress,pszMessage,pProgressArg);
753  //-------------------------------- open image file ------------------------------------
754  bool inputIsRaster=false;
755  ImgReaderOgr imgReaderOgr;
756  try{
757  imgReaderOgr.open(input_opt[0]);
758  imgReaderOgr.close();
759  }
760  catch(string errorString){
761  inputIsRaster=true;
762  }
763  if(inputIsRaster){
764  ImgReaderGdal testImage;
765  try{
766  if(verbose_opt[0]>=1)
767  std::cout << "opening image " << input_opt[0] << std::endl;
768  testImage.open(input_opt[0]);
769  }
770  catch(string error){
771  cerr << error << std::endl;
772  exit(2);
773  }
774  ImgReaderGdal priorReader;
775  if(priorimg_opt.size()){
776  try{
777  if(verbose_opt[0]>=1)
778  std::cout << "opening prior image " << priorimg_opt[0] << std::endl;
779  priorReader.open(priorimg_opt[0]);
780  assert(priorReader.nrOfCol()==testImage.nrOfCol());
781  assert(priorReader.nrOfRow()==testImage.nrOfRow());
782  }
783  catch(string error){
784  cerr << error << std::endl;
785  exit(2);
786  }
787  catch(...){
788  cerr << "error caught" << std::endl;
789  exit(1);
790  }
791  }
792 
793  int nrow=testImage.nrOfRow();
794  int ncol=testImage.nrOfCol();
795  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
796  string theInterleave="INTERLEAVE=";
797  theInterleave+=testImage.getInterleave();
798  option_opt.push_back(theInterleave);
799  }
800  vector<char> classOut(ncol);//classified line for writing to image file
801 
802  // assert(nband==testImage.nrOfBand());
803  ImgWriterGdal classImageBag;
804  ImgWriterGdal classImageOut;
805  ImgWriterGdal probImage;
806  ImgWriterGdal entropyImage;
807 
808  string imageType=testImage.getImageType();
809  if(oformat_opt.size())//default
810  imageType=oformat_opt[0];
811  try{
812  assert(output_opt.size());
813  if(verbose_opt[0]>=1)
814  std::cout << "opening class image for writing output " << output_opt[0] << std::endl;
815  if(classBag_opt.size()){
816  classImageBag.open(classBag_opt[0],ncol,nrow,nbag,GDT_Byte,imageType,option_opt);
817  classImageBag.GDALSetNoDataValue(nodata_opt[0]);
818  classImageBag.copyGeoTransform(testImage);
819  classImageBag.setProjection(testImage.getProjection());
820  }
821  classImageOut.open(output_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt);
822  classImageOut.GDALSetNoDataValue(nodata_opt[0]);
823  classImageOut.copyGeoTransform(testImage);
824  classImageOut.setProjection(testImage.getProjection());
825  if(colorTable_opt.size())
826  classImageOut.setColorTable(colorTable_opt[0],0);
827  if(prob_opt.size()){
828  probImage.open(prob_opt[0],ncol,nrow,nclass,GDT_Byte,imageType,option_opt);
829  probImage.GDALSetNoDataValue(nodata_opt[0]);
830  probImage.copyGeoTransform(testImage);
831  probImage.setProjection(testImage.getProjection());
832  }
833  if(entropy_opt.size()){
834  entropyImage.open(entropy_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt);
835  entropyImage.GDALSetNoDataValue(nodata_opt[0]);
836  entropyImage.copyGeoTransform(testImage);
837  entropyImage.setProjection(testImage.getProjection());
838  }
839  }
840  catch(string error){
841  cerr << error << std::endl;
842  }
843 
844  ImgWriterGdal maskWriter;
845 
846  if(maskIsVector){
847  try{
848  maskWriter.open("/vsimem/mask.tif",ncol,nrow,1,GDT_Float32,imageType,option_opt);
849  maskWriter.GDALSetNoDataValue(nodata_opt[0]);
850  maskWriter.copyGeoTransform(testImage);
851  maskWriter.setProjection(testImage.getProjection());
852  vector<double> burnValues(1,1);//burn value is 1 (single band)
853  maskWriter.rasterizeOgr(extentReader,burnValues);
854  extentReader.close();
855  maskWriter.close();
856  }
857  catch(string error){
858  cerr << error << std::endl;
859  exit(2);
860  }
861  catch(...){
862  cerr << "error caught" << std::endl;
863  exit(1);
864  }
865  mask_opt.clear();
866  mask_opt.push_back("/vsimem/mask.tif");
867  }
868  ImgReaderGdal maskReader;
869  if(mask_opt.size()){
870  try{
871  if(verbose_opt[0]>=1)
872  std::cout << "opening mask image file " << mask_opt[0] << std::endl;
873  maskReader.open(mask_opt[0]);
874  }
875  catch(string error){
876  cerr << error << std::endl;
877  exit(2);
878  }
879  catch(...){
880  cerr << "error caught" << std::endl;
881  exit(1);
882  }
883  }
884 
885  for(int iline=0;iline<nrow;++iline){
886  vector<float> buffer(ncol);
887  vector<short> lineMask;
888  Vector2d<float> linePrior;
889  if(priorimg_opt.size())
890  linePrior.resize(nclass,ncol);//prior prob for each class
891  Vector2d<float> hpixel(ncol);
892  Vector2d<float> probOut(nclass,ncol);//posterior prob for each (internal) class
893  vector<float> entropy(ncol);
894  Vector2d<char> classBag;//classified line for writing to image file
895  if(classBag_opt.size())
896  classBag.resize(nbag,ncol);
897  try{
898  if(band_opt.size()){
899  for(int iband=0;iband<band_opt.size();++iband){
900  if(verbose_opt[0]==2)
901  std::cout << "reading band " << band_opt[iband] << std::endl;
902  assert(band_opt[iband]>=0);
903  assert(band_opt[iband]<testImage.nrOfBand());
904  testImage.readData(buffer,GDT_Float32,iline,band_opt[iband]);
905  for(int icol=0;icol<ncol;++icol)
906  hpixel[icol].push_back(buffer[icol]);
907  }
908  }
909  else{
910  for(int iband=0;iband<nband;++iband){
911  if(verbose_opt[0]==2)
912  std::cout << "reading band " << iband << std::endl;
913  assert(iband>=0);
914  assert(iband<testImage.nrOfBand());
915  testImage.readData(buffer,GDT_Float32,iline,iband);
916  for(int icol=0;icol<ncol;++icol)
917  hpixel[icol].push_back(buffer[icol]);
918  }
919  }
920  }
921  catch(string theError){
922  cerr << "Error reading " << input_opt[0] << ": " << theError << std::endl;
923  exit(3);
924  }
925  catch(...){
926  cerr << "error caught" << std::endl;
927  exit(3);
928  }
929  assert(nband==hpixel[0].size());
930  if(verbose_opt[0]>1)
931  std::cout << "used bands: " << nband << std::endl;
932  //read prior
933  if(priorimg_opt.size()){
934  try{
935  for(short iclass=0;iclass<nclass;++iclass){
936  if(verbose_opt.size()>1)
937  std::cout << "Reading " << priorimg_opt[0] << " band " << iclass << " line " << iline << std::endl;
938  priorReader.readData(linePrior[iclass],GDT_Float32,iline,iclass);
939  }
940  }
941  catch(string theError){
942  std::cerr << "Error reading " << priorimg_opt[0] << ": " << theError << std::endl;
943  exit(3);
944  }
945  catch(...){
946  cerr << "error caught" << std::endl;
947  exit(3);
948  }
949  }
950  double oldRowMask=-1;//keep track of row mask to optimize number of line readings
951  //process per pixel
952  for(int icol=0;icol<ncol;++icol){
953  assert(hpixel[icol].size()==nband);
954  bool doClassify=true;
955  bool masked=false;
956  double geox=0;
957  double geoy=0;
958  if(maskIsVector){
959  doClassify=false;
960  testImage.image2geo(icol,iline,geox,geoy);
961  //check enveloppe first
962  if(uly>=geoy&&lry<=geoy&&ulx<=geox&&lrx>=geox){
963  doClassify=true;
964  }
965  }
966  if(mask_opt.size()){
967  //read mask
968  double colMask=0;
969  double rowMask=0;
970 
971  testImage.image2geo(icol,iline,geox,geoy);
972  maskReader.geo2image(geox,geoy,colMask,rowMask);
973  colMask=static_cast<int>(colMask);
974  rowMask=static_cast<int>(rowMask);
975  if(rowMask>=0&&rowMask<maskReader.nrOfRow()&&colMask>=0&&colMask<maskReader.nrOfCol()){
976  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask)){
977  assert(rowMask>=0&&rowMask<maskReader.nrOfRow());
978  try{
979  // maskReader.readData(lineMask[imask],GDT_Int32,static_cast<int>(rowMask));
980  maskReader.readData(lineMask,GDT_Int16,static_cast<int>(rowMask));
981  }
982  catch(string errorstring){
983  cerr << errorstring << endl;
984  exit(1);
985  }
986  catch(...){
987  cerr << "error caught" << std::endl;
988  exit(3);
989  }
990  oldRowMask=rowMask;
991  }
992  short theMask=0;
993  for(short ivalue=0;ivalue<msknodata_opt.size();++ivalue){
994  // if(msknodata_opt[ivalue]>=0){//values set in msknodata_opt are invalid
995  if(lineMask[colMask]==msknodata_opt[ivalue]){
996  theMask=lineMask[colMask];
997  masked=true;
998  break;
999  }
1000  // }
1001  // else{//only values set in msknodata_opt are valid
1002  // if(lineMask[colMask]!=-msknodata_opt[ivalue]){
1003  // theMask=lineMask[colMask];
1004  // masked=true;
1005  // }
1006  // else{
1007  // masked=false;
1008  // break;
1009  // }
1010  // }
1011  }
1012  if(masked){
1013  if(classBag_opt.size())
1014  for(int ibag=0;ibag<nbag;++ibag)
1015  classBag[ibag][icol]=theMask;
1016  classOut[icol]=theMask;
1017  continue;
1018  }
1019  }
1020  bool valid=false;
1021  for(int iband=0;iband<hpixel[icol].size();++iband){
1022  if(hpixel[icol][iband]){
1023  valid=true;
1024  break;
1025  }
1026  }
1027  if(!valid)
1028  doClassify=false;
1029  }
1030  for(short iclass=0;iclass<nclass;++iclass)
1031  probOut[iclass][icol]=0;
1032  if(!doClassify){
1033  if(classBag_opt.size())
1034  for(int ibag=0;ibag<nbag;++ibag)
1035  classBag[ibag][icol]=nodata_opt[0];
1036  classOut[icol]=nodata_opt[0];
1037  continue;//next column
1038  }
1039  if(verbose_opt[0]>1)
1040  std::cout << "begin classification " << std::endl;
1041  //----------------------------------- classification -------------------
1042  for(int ibag=0;ibag<nbag;++ibag){
1043  vector<double> result(nclass);
1044  struct svm_node *x;
1045  x = (struct svm_node *) malloc((nband+1)*sizeof(struct svm_node));
1046  for(int iband=0;iband<nband;++iband){
1047  x[iband].index=iband+1;
1048  x[iband].value=(hpixel[icol][iband]-offset[ibag][iband])/scale[ibag][iband];
1049  }
1050  x[nband].index=-1;//to end svm feature vector
1051  double predict_label=0;
1052  vector<float> prValues(nclass);
1053  float maxP=0;
1054  if(!prob_est_opt[0]){
1055  predict_label = svm_predict(svm[ibag],x);
1056  for(short iclass=0;iclass<nclass;++iclass){
1057  if(iclass==static_cast<short>(predict_label))
1058  result[iclass]=1;
1059  else
1060  result[iclass]=0;
1061  }
1062  }
1063  else{
1064  assert(svm_check_probability_model(svm[ibag]));
1065  predict_label = svm_predict_probability(svm[ibag],x,&(result[0]));
1066  }
1067  //calculate posterior prob of bag
1068  if(classBag_opt.size()){
1069  //search for max prob within bag
1070  maxP=0;
1071  classBag[ibag][icol]=0;
1072  }
1073  double normPrior=0;
1074  if(priorimg_opt.size()){
1075  for(short iclass=0;iclass<nclass;++iclass)
1076  normPrior+=linePrior[iclass][icol];
1077  }
1078  for(short iclass=0;iclass<nclass;++iclass){
1079  if(priorimg_opt.size())
1080  priors[iclass]=linePrior[iclass][icol]/normPrior;//todo: check if correct for all cases... (automatic classValueMap and manual input for names and values)
1081  switch(comb_opt[0]){
1082  default:
1083  case(0)://sum rule
1084  probOut[iclass][icol]+=result[iclass]*priors[iclass];//add probabilities for each bag
1085  break;
1086  case(1)://product rule
1087  probOut[iclass][icol]*=pow(static_cast<float>(priors[iclass]),static_cast<float>(1.0-nbag)/nbag)*result[iclass];//multiply probabilities for each bag
1088  break;
1089  case(2)://max rule
1090  if(priors[iclass]*result[iclass]>probOut[iclass][icol])
1091  probOut[iclass][icol]=priors[iclass]*result[iclass];
1092  break;
1093  }
1094  if(classBag_opt.size()){
1095  //search for max prob within bag
1096  // if(prValues[iclass]>maxP){
1097  // maxP=prValues[iclass];
1098  // classBag[ibag][icol]=iclass;
1099  // }
1100  if(result[iclass]>maxP){
1101  maxP=result[iclass];
1102  classBag[ibag][icol]=iclass;
1103  }
1104  }
1105  }
1106  free(x);
1107  }//ibag
1108 
1109  //search for max class prob
1110  float maxBag1=0;//max probability
1111  float maxBag2=0;//second max probability
1112  float normBag=0;
1113  for(short iclass=0;iclass<nclass;++iclass){
1114  if(probOut[iclass][icol]>maxBag1){
1115  maxBag1=probOut[iclass][icol];
1116  classOut[icol]=classValueMap[nameVector[iclass]];
1117  }
1118  else if(probOut[iclass][icol]>maxBag2)
1119  maxBag2=probOut[iclass][icol];
1120  normBag+=probOut[iclass][icol];
1121  }
1122  //normalize probOut and convert to percentage
1123  entropy[icol]=0;
1124  for(short iclass=0;iclass<nclass;++iclass){
1125  float prv=probOut[iclass][icol];
1126  prv/=normBag;
1127  entropy[icol]-=prv*log(prv)/log(2.0);
1128  prv*=100.0;
1129 
1130  probOut[iclass][icol]=static_cast<short>(prv+0.5);
1131  // assert(classValueMap[nameVector[iclass]]<probOut.size());
1132  // assert(classValueMap[nameVector[iclass]]>=0);
1133  // probOut[classValueMap[nameVector[iclass]]][icol]=static_cast<short>(prv+0.5);
1134  }
1135  entropy[icol]/=log(static_cast<double>(nclass))/log(2.0);
1136  entropy[icol]=static_cast<short>(100*entropy[icol]+0.5);
1137  if(active_opt.size()){
1138  if(entropy[icol]>activePoints.back().value){
1139  activePoints.back().value=entropy[icol];//replace largest value (last)
1140  activePoints.back().posx=icol;
1141  activePoints.back().posy=iline;
1142  std::sort(activePoints.begin(),activePoints.end(),Decrease_PosValue());//sort in descending order (largest first, smallest last)
1143  if(verbose_opt[0])
1144  std::cout << activePoints.back().posx << " " << activePoints.back().posy << " " << activePoints.back().value << std::endl;
1145  }
1146  }
1147  }//icol
1148  //----------------------------------- write output ------------------------------------------
1149  if(classBag_opt.size())
1150  for(int ibag=0;ibag<nbag;++ibag)
1151  classImageBag.writeData(classBag[ibag],GDT_Byte,iline,ibag);
1152  if(prob_opt.size()){
1153  for(short iclass=0;iclass<nclass;++iclass)
1154  probImage.writeData(probOut[iclass],GDT_Float32,iline,iclass);
1155  }
1156  if(entropy_opt.size()){
1157  entropyImage.writeData(entropy,GDT_Float32,iline);
1158  }
1159  classImageOut.writeData(classOut,GDT_Byte,iline);
1160  if(!verbose_opt[0]){
1161  progress=static_cast<float>(iline+1.0)/classImageOut.nrOfRow();
1162  pfnProgress(progress,pszMessage,pProgressArg);
1163  }
1164  }
1165  //write active learning points
1166  if(active_opt.size()){
1167  for(int iactive=0;iactive<activePoints.size();++iactive){
1168  std::map<string,double> pointMap;
1169  for(int iband=0;iband<testImage.nrOfBand();++iband){
1170  double value;
1171  testImage.readData(value,GDT_Float64,static_cast<int>(activePoints[iactive].posx),static_cast<int>(activePoints[iactive].posy),iband);
1172  ostringstream fs;
1173  fs << "B" << iband;
1174  pointMap[fs.str()]=value;
1175  }
1176  pointMap[label_opt[0]]=0;
1177  double x, y;
1178  testImage.image2geo(activePoints[iactive].posx,activePoints[iactive].posy,x,y);
1179  std::string fieldname="id";//number of the point
1180  activeWriter.addPoint(x,y,pointMap,fieldname,++nactive);
1181  }
1182  }
1183 
1184  testImage.close();
1185  if(mask_opt.size())
1186  maskReader.close();
1187  if(priorimg_opt.size())
1188  priorReader.close();
1189  if(prob_opt.size())
1190  probImage.close();
1191  if(entropy_opt.size())
1192  entropyImage.close();
1193  if(classBag_opt.size())
1194  classImageBag.close();
1195  classImageOut.close();
1196  }
1197  else{//classify vector file
1198  cm.clearResults();
1199  //notice that fields have already been set by readDataImageOgr (taking into account appropriate bands)
1200  for(int ivalidation=0;ivalidation<input_opt.size();++ivalidation){
1201  if(output_opt.size())
1202  assert(output_opt.size()==input_opt.size());
1203  if(verbose_opt[0])
1204  std::cout << "opening img reader " << input_opt[ivalidation] << std::endl;
1205  imgReaderOgr.open(input_opt[ivalidation]);
1206  ImgWriterOgr imgWriterOgr;
1207 
1208  if(output_opt.size()){
1209  if(verbose_opt[0])
1210  std::cout << "opening img writer and copying fields from img reader" << output_opt[ivalidation] << std::endl;
1211  imgWriterOgr.open(output_opt[ivalidation],imgReaderOgr);
1212  }
1213  if(verbose_opt[0])
1214  cout << "number of layers in input ogr file: " << imgReaderOgr.getLayerCount() << endl;
1215  for(int ilayer=0;ilayer<imgReaderOgr.getLayerCount();++ilayer){
1216  if(verbose_opt[0])
1217  cout << "processing input layer " << ilayer << endl;
1218  if(output_opt.size()){
1219  if(verbose_opt[0])
1220  std::cout << "creating field class" << std::endl;
1221  if(classValueMap.size())
1222  imgWriterOgr.createField("class",OFTInteger,ilayer);
1223  else
1224  imgWriterOgr.createField("class",OFTString,ilayer);
1225  }
1226  unsigned int nFeatures=imgReaderOgr.getFeatureCount(ilayer);
1227  unsigned int ifeature=0;
1228  progress=0;
1229  pfnProgress(progress,pszMessage,pProgressArg);
1230  OGRFeature *poFeature;
1231  while( (poFeature = imgReaderOgr.getLayer(ilayer)->GetNextFeature()) != NULL ){
1232  if(verbose_opt[0]>1)
1233  std::cout << "feature " << ifeature << std::endl;
1234  if( poFeature == NULL ){
1235  cout << "Warning: could not read feature " << ifeature << " in layer " << imgReaderOgr.getLayerName(ilayer) << endl;
1236  continue;
1237  }
1238  OGRFeature *poDstFeature = NULL;
1239  if(output_opt.size()){
1240  poDstFeature=imgWriterOgr.createFeature(ilayer);
1241  if( poDstFeature->SetFrom( poFeature, TRUE ) != OGRERR_NONE ){
1242  CPLError( CE_Failure, CPLE_AppDefined,
1243  "Unable to translate feature %d from layer %s.\n",
1244  poFeature->GetFID(), imgWriterOgr.getLayerName(ilayer).c_str() );
1245  OGRFeature::DestroyFeature( poFeature );
1246  OGRFeature::DestroyFeature( poDstFeature );
1247  }
1248  }
1249  vector<float> validationPixel;
1250  vector<float> validationFeature;
1251 
1252  imgReaderOgr.readData(validationPixel,OFTReal,fields,poFeature,ilayer);
1253  assert(validationPixel.size()==nband);
1254  vector<float> probOut(nclass);//posterior prob for each class
1255  for(short iclass=0;iclass<nclass;++iclass)
1256  probOut[iclass]=0;
1257  for(int ibag=0;ibag<nbag;++ibag){
1258  for(int iband=0;iband<nband;++iband){
1259  validationFeature.push_back((validationPixel[iband]-offset[ibag][iband])/scale[ibag][iband]);
1260  if(verbose_opt[0]==2)
1261  std::cout << " " << validationFeature.back();
1262  }
1263  if(verbose_opt[0]==2)
1264  std::cout << std::endl;
1265  vector<double> result(nclass);
1266  struct svm_node *x;
1267  x = (struct svm_node *) malloc((validationFeature.size()+1)*sizeof(struct svm_node));
1268  for(int i=0;i<validationFeature.size();++i){
1269  x[i].index=i+1;
1270  x[i].value=validationFeature[i];
1271  }
1272 
1273  x[validationFeature.size()].index=-1;//to end svm feature vector
1274  double predict_label=0;
1275  if(!prob_est_opt[0]){
1276  predict_label = svm_predict(svm[ibag],x);
1277  for(short iclass=0;iclass<nclass;++iclass){
1278  if(iclass==static_cast<short>(predict_label))
1279  result[iclass]=1;
1280  else
1281  result[iclass]=0;
1282  }
1283  }
1284  else{
1285  assert(svm_check_probability_model(svm[ibag]));
1286  predict_label = svm_predict_probability(svm[ibag],x,&(result[0]));
1287  }
1288  if(verbose_opt[0]>1){
1289  std::cout << "predict_label: " << predict_label << std::endl;
1290  for(int iclass=0;iclass<result.size();++iclass)
1291  std::cout << result[iclass] << " ";
1292  std::cout << std::endl;
1293  }
1294 
1295  //calculate posterior prob of bag
1296  for(short iclass=0;iclass<nclass;++iclass){
1297  switch(comb_opt[0]){
1298  default:
1299  case(0)://sum rule
1300  probOut[iclass]+=result[iclass]*priors[iclass];//add probabilities for each bag
1301  break;
1302  case(1)://product rule
1303  probOut[iclass]*=pow(static_cast<float>(priors[iclass]),static_cast<float>(1.0-nbag)/nbag)*result[iclass];//multiply probabilities for each bag
1304  break;
1305  case(2)://max rule
1306  if(priors[iclass]*result[iclass]>probOut[iclass])
1307  probOut[iclass]=priors[iclass]*result[iclass];
1308  break;
1309  }
1310  }
1311  free(x);
1312  }//for ibag
1313 
1314  //search for max class prob
1315  float maxBag=0;
1316  float normBag=0;
1317  string classOut="Unclassified";
1318  for(short iclass=0;iclass<nclass;++iclass){
1319  if(verbose_opt[0]>1)
1320  std::cout << probOut[iclass] << " ";
1321  if(probOut[iclass]>maxBag){
1322  maxBag=probOut[iclass];
1323  classOut=nameVector[iclass];
1324  }
1325  }
1326  //look for class name
1327  if(verbose_opt[0]>1){
1328  if(classValueMap.size())
1329  std::cout << "->" << classValueMap[classOut] << std::endl;
1330  else
1331  std::cout << "->" << classOut << std::endl;
1332  }
1333  if(output_opt.size()){
1334  if(classValueMap.size())
1335  poDstFeature->SetField("class",classValueMap[classOut]);
1336  else
1337  poDstFeature->SetField("class",classOut.c_str());
1338  poDstFeature->SetFID( poFeature->GetFID() );
1339  }
1340  int labelIndex=poFeature->GetFieldIndex(label_opt[0].c_str());
1341  if(labelIndex>=0){
1342  string classRef=poFeature->GetFieldAsString(labelIndex);
1343  if(classRef!="0"){
1344  if(classValueMap.size())
1345  cm.incrementResult(type2string<short>(classValueMap[classRef]),type2string<short>(classValueMap[classOut]),1);
1346  else
1347  cm.incrementResult(classRef,classOut,1);
1348  }
1349  }
1350  CPLErrorReset();
1351  if(output_opt.size()){
1352  if(imgWriterOgr.createFeature(poDstFeature,ilayer) != OGRERR_NONE){
1353  CPLError( CE_Failure, CPLE_AppDefined,
1354  "Unable to translate feature %d from layer %s.\n",
1355  poFeature->GetFID(), imgWriterOgr.getLayerName(ilayer).c_str() );
1356  OGRFeature::DestroyFeature( poDstFeature );
1357  OGRFeature::DestroyFeature( poDstFeature );
1358  }
1359  }
1360  ++ifeature;
1361  if(!verbose_opt[0]){
1362  progress=static_cast<float>(ifeature+1.0)/nFeatures;
1363  pfnProgress(progress,pszMessage,pProgressArg);
1364  }
1365  OGRFeature::DestroyFeature( poFeature );
1366  OGRFeature::DestroyFeature( poDstFeature );
1367  }//get next feature
1368  }//next layer
1369  imgReaderOgr.close();
1370  if(output_opt.size())
1371  imgWriterOgr.close();
1372  }
1373  if(cm.nReference()){
1374  std::cout << cm << std::endl;
1375  cout << "class #samples userAcc prodAcc" << endl;
1376  double se95_ua=0;
1377  double se95_pa=0;
1378  double se95_oa=0;
1379  double dua=0;
1380  double dpa=0;
1381  double doa=0;
1382  for(short iclass=0;iclass<cm.nClasses();++iclass){
1383  dua=cm.ua_pct(cm.getClass(iclass),&se95_ua);
1384  dpa=cm.pa_pct(cm.getClass(iclass),&se95_pa);
1385  cout << cm.getClass(iclass) << " " << cm.nReference(cm.getClass(iclass)) << " " << dua << " (" << se95_ua << ")" << " " << dpa << " (" << se95_pa << ")" << endl;
1386  }
1387  std::cout << "Kappa: " << cm.kappa() << std::endl;
1388  doa=cm.oa(&se95_oa);
1389  std::cout << "Overall Accuracy: " << 100*doa << " (" << 100*se95_oa << ")" << std::endl;
1390  }
1391  }
1392  try{
1393  if(active_opt.size())
1394  activeWriter.close();
1395  }
1396  catch(string errorString){
1397  std::cerr << "Error: errorString" << std::endl;
1398  }
1399 
1400  for(int ibag=0;ibag<nbag;++ibag){
1401  // svm_destroy_param[ibag](&param[ibag]);
1402  svm_destroy_param(&param[ibag]);
1403  free(prob[ibag].y);
1404  free(prob[ibag].x);
1405  free(x_space[ibag]);
1406  svm_free_and_destroy_model(&(svm[ibag]));
1407  }
1408  return 0;
1409 }
throw this class when syntax error in command line option
Definition: Optionpk.h:45
Definition: svm.h:12
pktools-2.6.6/doc/html/dir_0f63d6441a2c250919e1e8723011eb2f_dep.map0000644000113200011300000000465112616110567020155 00000000000000 pktools-2.6.6/doc/html/inherit_graph_4.md50000644000113200011300000000004012616110567015310 0000000000000079a90069eeaf1cadc0f69227c89357cbpktools-2.6.6/doc/html/classimgregression_1_1ImgRegression.html0000644000113200011300000002015212647637662021606 00000000000000 pktools: imgregression::ImgRegression Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
imgregression::ImgRegression Class Reference

Public Member Functions

double getRMSE (const ImgReaderGdal &imgReader1, const ImgReaderGdal &imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const
 
double getRMSE (const ImgReaderGdal &imgReader, unsigned short b1, unsigned short b2, double &c0, double &c1, short verbose=0) const
 
double getR2 (const ImgReaderGdal &imgReader1, const ImgReaderGdal &imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const
 
double pgetR2 (const ImgReaderGdal &imgReader1, const ImgReaderGdal &imgReader2, double &c0, double &c1, unsigned short band1, unsigned short band2, short verbose=0) const
 
double getR2 (const ImgReaderGdal &imgReader, unsigned short b1, unsigned short b2, double &c0, double &c1, short verbose=0) const
 
double pgetR2 (const ImgReaderGdal &imgReader, unsigned short band1, unsigned short band2, double &c0, double &c1, short verbose=0) const
 
void setThreshold (double theThreshold)
 
void setDown (int theDown)
 

Detailed Description

Definition at line 30 of file ImgRegression.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop__coll__graph.md50000644000113200011300000000004012616110566022460 0000000000000096897278b3ac460a3a4a246c00581d44pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem__coll__graph.png0000644000113200011300000000740312616110567026666 00000000000000‰PNG  IHDRíp}×`EbKGDÿÿÿ ½§“¸IDATxœíÝTÓÕÿðû†ñã 0=LäW0‘:x<û#ƒ)hêÈ£$ƒÔ ÀL9‘¡™ð”@ep*•M­±”ðGð`*‰ !‰‚`‚É„‰lÀö~ÿx>ïïc2Ýš»½xÞï»{ïûu·çÙ.cC‚¢(€…³2wäàr p98`™»Ã(•ÊŽŽ’$Í]æÜÝÝgÍšeî* `a9–Ëå–u[¹\ÞßßoYw²…å˜6þ|s—€³?þøÃÜ% öÇc€È1Àäààß’ã›7oñONõñÇ‘m¬&NÄÍ›7{Z<ü[r¬SWW‡Ã1ÅÌE{yyI$cÍ9cÆŒíÛ·#S–m¹þÕ9&Ir``À3_½zµ­­­   ¹¹¹½½Ý(sr8úÙÝte[. sL¿þ–——ûûû»¸¸lݺutt”¹•¢¨mÛ¶ß»wïÅ_D¹ººÒ7 nذÃáxzznÛ¶M©TNÖȨ¨¨xþùçííí}}}Åb1Ó^\\0ñ)™¢(¡Pèää´dÉ’“'OÒ†‰×¢×R]]íååuôèQº›VÙ¡ÊÊJ.—;sæÌ¬¬,º… ˆÂÂÂyóæÍš5+;;[,ûøø°ÙìÝ»wíŽ~ªP¥¯¯¯¶¶VŸŽŽ„Pxxx{{{}}=—ËÍÈÈ I’dBÌôd ‚¥K—vvv¶´´eddèldF ÛÙÙ …ÂÞÞÞ‚‚‹5<>>"‘ˆ¢¨>úhþüùš…Q•ŸŸïááñóÏ?K¥Òªª*.—K·Ov­ÈÈÈšššææfº›VÙ¡×^{M.——––"„è¥!„Ö­['—Ë>ŒZ»v­\.‰DL=Z[[[[[ {`Ì Û·´´Ð§‰„ËåÒiii¡7nhö¤ÇÆÆ¬­­™Ç¯¬¬ŒËåêldFÉd2›}ûöÝ¿Ÿ$ɨÕjŠ¢êëëY,—ÆÆF„ÐÕ«W5/ôý÷ß3!„ô\‹^ 3|bŽÏž=KQ”Z­FuttÐMMMôº´ŽézXbŽ1ÜWÐæÌ™Cܽ{—>nhh ÍÌ̜ؿ¯¯O­Vûùùѧ\.÷îÝ»:™!3gά­­­¯¯÷ôô 9w•B¨¸¸X¥Rq8‚ .\ˆÒÚZtvv1§“À,AÿbÝÝÝBôÕŽŽŽ!­c,a›cúI !ÔÞÞN?Ì¡ŠŠ ¡PX\\\[[«ÕöìÙÖÖÖ]]]ôigg§‡‡‡ÎFfˆB¡ Iòرc2™,>>~ÅŠ2™L­VK$’œœœÿ“šš*‘H(ïy{{k~†¡­­m²èãGæÏXo)Z.lsœ’’róæÍ†††;wÆÆÆÒÓ¦Mó÷÷ß±cGrr2óÛðð0BÈÆÆ&::zëÖ­·nÝjmmݵk—@ ÐÙÈ\‚ ˆðððÒÒR¹\>66fccãààpîܹþþ~@0ýbbb:::èÝ-móæÍiii•••555Aè¿ÖDtÙà¿Ì½±1ÌÔ÷LJöööæp8[¶lQ(š{J…B1wîÜôôôñññ—^ziúôét»L&‹‹‹svvvss{ï½÷ …ÎFÍ©$‰ŸŸŸ­­m@@@yy9EQIIIááášõ$éçç·}ûvf Z­ÎÍÍõóóc³Ùååå³fÍz䵘c­²‘Æ–iì'6jOÆ÷ÇØæø)ç1UTT4773§%%%ÁÁÁf¬G‹%æÛ}ÅÓ¬¥¥%66¶©©idd¤¾¾~÷îÝ æ.ʲYäçèõsrrJJJ2wú¤¥¥ŒŒðù|©TêëëûÖ[o=å?ýÊ¢þKÿµk×BCCÍ]Îè÷R,ëK7°¯8€@Ž Çù~EOO¹KÀ™R©´··7w†±°ÛÙÙa¬O¦ÿH’:x°1*ÊßÃÃÑܵ`ÆŒæ.Á0–c6›bî* P_ßyáÂOþþ¾A¨¹kÁìMëøñFú_• þ& AŽMhlLUVv!444RWwÃÜåà rlBgÏ^EY[[••5š»œAŽM¨´´ÑÚÚ !¤R‘gδ(cæ®[cSyøpô?ÿiU©Ôôé訪ªêšyKÂäØT4CŒ²²"JK/›±¼AŽM¥´ô²æ×æT*²¶öº\®0cIƒ›„Lö°®®]­þÛ{mE>Ýb®’ð96‰“'ŸØHQÔ±c°µ0 ȱI””4Lü‚IRõõ}}Cf) ocãëéll¼M’:¾hcmmUQ¡ã© ûœEsssbN‡‡GíímX¬ÿ>eüëÿôIXØ÷L-‘»û{Báú•+ƒÍ]Î`_p98€@Ž Çc€È1Àäàr p98€@Ž Çc€È1Àäàr p98€@Ž Çc€È1Àäàr p98€@Ž Çc€È1Àäàr °@iðöö6w9²³ó²²r0w¸±µµýõ×_™èþíÿ¹}ûöš5kÍUS´gÏžîînæTûÿ¹ ýG+Àp{öìÑ<…ý1Àäàr p980UŽ»»»y<ž¹†›ºŠ¢öîÝ©ÙÁ(5qáSœÜB×¢ÅT9ž>}úºuëŒ;gooïªU«Œ;çãøå—_¾ùæ¤k¥OOSÇZL•c6›˜˜hÜ9I’”ËåÆóñŒŽŽ"„\\\®•>=uNk1,ÇE?~|ýúõË–-Û¼yó•+Wx<EQ?ýôÓ† –/_žššzñâE§ùšráÂ…øøøðð𘘘ÊÊJ­9éžçÏŸ‹‹‹ŠŠúúë¯ÇÇÇ5¯˜———044ôÎ;ï „^ýuú¦áááìììU«V­Y³&//olll²F†)*™øê©U§J¥ …QQQQQQB¡P¥RÑCššš¢££ÿý÷ââ⸸¸eË–½ûî»mmm“Bñx¼3gά_¿žÏçUVV®[·nùòå………¯e* Ëñ©S§¾ýöÛ„„±Xüæ›ofee!„NŸ>-‹7oÞ\TT$8 9D©Tfddðù|z…Ÿ}ö™R©œ8ó‰'²²²233ûí·¢¢"º‘¢(‘HÔÔÔ”““Ãf³<ˆ*++£oýòË/¥R©P(üôÓO~øá‡ÉM]‰­[KJJz{{E"Ñ_|ÑÔÔtäȺýÇܱcGKK‹D"ILL‹ÅqqqB¡Pÿ¨ÆÆÆ¼¼¼ÄÄÄüüü‹/lÚ´I,ë|ÖÄi-ú–ãÒÒÒäääÅ‹;;;/Z´(!!i|á…ØlöÂ… 7nܨ9d||œ¢(…BakkQQQagg7qæM›6yzzΛ7/!!¡ªªŠnÙ¨èèh‡ððp„PLLŒƒƒCDDBèÁƒx¯E?íßKë×ÛÛËår™S___„POOÓøì³ÏjqttÌÍÍ-))9räÈܹscbb-Z4qfOOOúÀËËK*•ÒÇ7nÜþî»ïvìØ¡Õÿþýû$Iº»»Ó§R©Tg£©+y¤¿þúkõêÕÌé´iÓ˜ùBR©tâ]ªg”ƒƒBˆÅbië„ÓZô3l‡Ãéììôóó£OÿüóO„ÐìÙ³oݺÅ}ûömÍ!£££$Ifdd¨Tªêêê;wž8qÂÑÑQkæ»wïÒ3ܹsÇÙÙ™nÌÌÌ”J¥ñññ¯¾úê‚ 4ûÏœ9ÓÊʪ··—þŒ^OO‡ÃÑÙhêJ‰Ífçææzxx „†‡‡e2ÝN?f®®®ïR=£ ‚ÓZô3l_™——wþüy™LvéÒ¥C‡!„ø|¾H$º|ù²\.¿råÊÑ£G ‚`†ñÁÔÕÕ=|øp||œÅbѯæ§Nzøð!ÓmÿþýÝÝÝׯ_?|øð+¯¼B7ÚÛÛ?óÌ3111999ÌOl …!Äb±x<ÞW_}ÕÛÛ{ëÖ­‚‚‚°°0¦«D?ºN„ÐâÅ‹óóóûúúºººÒÒÒNœ8¡ÙmåÊ•šw)óSŽþQ“Ái-1ìù8::Z­V8p`ppÞë|òÉ'|>_­Vçææ ÍŸ??99ùóÏ?g†ØÚÚ~øá‡"‘¨¿¿ßÝÝ===ÝÖÖ!´oß¾àà`æ%&,,ìý÷ßW*•K—.šû˜˜˜êêꢢ¢¸¸¸çž{nõêÕ§OŸF¥¤¤ìß¿?99ÙÆÆfÉ’%@g#3•+a2¡“«««fñññû÷ïûí· ‚xùå—“’’îÝ»Çtæóùãããyyy~~~»wï¦ß"˜8j*Nk1AQÔÿŸDzzúÔ?·ÙÝÝ›™™éâ⼚ÔÕÕ‰Åâüü|ƒ&©­­5¤l“xz*yr8­E''‘HÖ®]KŸá÷ ]]]{÷îíèè½víZaaáòåËŸ|Z¦î1<ÔôÆo(•Ê]»v º¹¹EFF®X±bêçM›fPÓyz*yr8­e*žh_€¹_€ÙAŽ Çc€í÷+ÄbñÉ“'ÍR ío9NMM½s玹J`êæÌ™£ù1¯¿½ï€…‚ý1Àäàr p98ø?’:ÃpïEIEND®B`‚pktools-2.6.6/doc/html/classIncrease__PosValue-members.html0000644000113200011300000000650012647637662020732 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Increase_PosValue Member List

This is the complete list of members for Increase_PosValue, including all inherited members.

operator()(const PosValue &pv1, const PosValue &pv2) const (defined in Increase_PosValue)Increase_PosValueinline
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm__inherit__graph.md50000644000113200011300000000004012616110566024751 000000000000002ccee9e3c7ca2e8bb6385bb7d490defdpktools-2.6.6/doc/html/classLastReturnFilter__coll__graph.md50000644000113200011300000000004012616110566021230 00000000000000d39673c5d5bfa1f1515c3e94849bbd8epktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask-members.html0000644000113200011300000002150012647637662023102 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkgetmask.pkgetmask Member List
pktools-2.6.6/doc/html/classImgWriterOgr__coll__graph.png0000644000113200011300000001320212616110567020444 00000000000000‰PNG  IHDR‘Ý4 cbKGDÿÿÿ ½§“7IDATxœí}PGúÇŸáe(v#ˆ‚°" '‹\sIN1Wž±‚Ñpš˜#x^ÕÕO½£©3uHÕÝyKˆ%h¤‚ "(ãT$€ˆ¼Dv% ° Ë»°»3¿?ÆÌ Ëò¾o½öç¯î™î§Ÿ™ïNwO÷l7AQ`ÂÆÜ`f Ö =°fè5C¬zر#*•Ê\®<ã888¬Zµj:)Çh¦R©|||¸\®q¼ÂLÈàà`GGÇ4ÛéÄ]]]y<ž¡]ÂLÁŒÞ’q{†X3ôÀš¡Ö =Œ«™D"!bvgçh|îÛþ¬1€f---žžžs·3SÜÜÜ80w;ùo(ûÇš‘$Ù××7w;3ÅÓÓóرcs·3‘ÿ†²opf¬Y~~þŠ+üýý333€~{_°`hµÚäääÀÀ@——_~ùÎ;t.v=£Sçdeeðx¼Ý»w@AAAxx¸“““——sׯ—ËØÑh4‡^¼x1Ç{ï½÷fí?móÆ‹/ÎÈÈ`ü$"+++88ØÃÃã“O>Š¢D"QHHˆ««ëÚµk ôV¤½½½ôEŠEiiiww751 …bÞ¼y"‘¨««ëäÉ“vvv …B,3vRRRø|~nn®T*½|ù²··7}j`` ==NÄéŒk×®mnn®¨¨”ËågÇŽ_ý5ôôôL^nrròòåËëêêîß¿ÿâ‹/îß¿ÖþÓáõë×—””ÔÖÖ2Ç`Ë–-2™,==úúúÒÓÓ.\XXXØÛÛ[\\,tnfeeåöíÛy<žT*ä–Òtww—––N™ì©3ìÈ”šõ÷÷ÛÛÛúé§2™Œ$É¡¡!­V˾æÀÀÀŒŒ &ýéÓ§u®„ ±®®ŽŽž?~É’%###MMM …B«Õ~÷Ýw ‹'/wÙ²e¹¹¹´‘ÆÆF&< ÿÙ.±}OGGGi—BCC³²²ËgÏž¥+•Ê3gμð áááiiiCCC“ÜO†i6³ºÑÝݽ´´´¢¢ÂÇÇgõêÕååå66c,´·· …B&ºbÅŠ)m.]º”uuuq8œæææ¨¨¨ˆˆˆŒŒŒé”ÛÖÖÆ Þ´iÓ¬ýg<®3ìííéèÇCCC™³!!!pýúu__ß7nüýﯮ®Þµk—³³ó”w`¦ÌL3¥RI’dvvv\\ÜÆûûûÙ üüüîÝ»ÇD¦´Iÿœ ¹¹Ù××W©TÆÄÄ$&&ÖÔÔœ8qb:åz{{·¶¶ÒáÚÚÚ?þxÖþÓ0°ÑQ×××—}uMMMÀãñBBBnݺuóæÍɛչ03Í‚X·nÝÅ‹årùè訽½½““}J¡P@BBBbbb^^ÞãÇ ?üðCúìààà—_~9> ûöí“H$ßÿýŸþô§÷ßdddtt”Ãá(•ÊÇÀÐÐÐ$åÀ»ï¾ûç?ÿ¹¾¾¾¾¾þ÷¿ÿ}[[Û¬ýŸ>{öìIJJ***êëë+))9räAaaa¥¥¥¹¹¹< ܹsguuõŒÌN vE9e{FQÔùóç8NPPP^^EQjµú•W^qvv¦(J£Ñ$'' ‚ùóç¿ôÒKtãÛ &ðÍ7ßøùùñùü}ûöŒŒP•’’âáá±hÑ¢'NÄÆÆòù|½å2vT*Õþýû½½½¹\nll¬L&›µÿzý¤( Äb1;¬ÕjSSS¸\nTTT^^Çc$“ÉRRRZ[[§h ŒÚÁ0äçç×ÖÖ2Ñœœ¡P8>™V«U«ÕSZ3bÃPWW·mÛ¶šššááኊŠC‡íܹs|2;;ÝIÊ9b`s–ÃDC…”¾ÁMJJŽŽŽîííõ÷÷ß±cG||¼A,O‰Õjf(m&ÂÎÎîèÑ£G5j)zA¯n$B"‘˜Û s‚žf¬zX®f“ŒÖ ww÷¿ýíoô‘ñSìúÿüç?L^£ ´›vÇߢÞÏ&­€×_].—_¼xž?11±¥¥ÅLW¦+y§žh´ÊÊÊ(ŠÒjµ ‹õNèL°éìì<|ø°ÏƯ]»¦ÕjMvQa%ïÔ“ŒÖÓCìÌ ­Þ©š‰Fè9ÒÒÒòî»ïþõ¯ noo7ÒUËÕl’Ñz÷e½S4zGèiº»»:::V®\éèèhH׌åj6ýÑz½S%&I²¨¨hÓ¦M«V­¢(êæÍ›çÎ3Ë7H³‡]QZT{6Ñh=Œb§ôM°GåÙäää¬Zµ*++‹žC°fÔžkŒ§¬¬,$$„Ïç›ëdÔjõ$¦¹èééill\³fÍt[nÝh$,P°™òÌif`ÍÐk†X3ôÀš¡Ö =°fè1æ{‚ ÍåÍ\ÈÎn ÞzKÏ 0Lÿÿ‰cÆAÔjµq\2.##šÕ«Sˆòòÿ³··5·;³ÁÞÞÞÍÍm:)ÇB’Tvö÷æòÇ ­Ù£G}÷ H’ª­}ÔÞ®çÒÖÚš]ºTkg§çììl.]ºkzLÚš]¸ð½ZMŽ?®Ñh/\°ÚêaÍÄân‰¤@Ï)Š>Ûcz¯LÂÿó¤(ê¿0of?þø–,yúu)AŒþ¶&¬çÂâãO@ZÚvs;bt®ŸY°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z~Ý•JÕßo†5p J¥¦/ÚÃÃÃÁÁÁdÅ~Ý‚ÆÆÆžë\˜c"ø|~HHˆÉŠ3üsFQÇ[¾|¹Á-[& &^¯·gè5C¬z`ÍÐ Í$Éô·æ0™)saAšµ´´pÏቬ¹¹¹8pÀP¥˜ ÒŒ$ɾ¾>c[óôôy…B1oÞ<‘HÔÕÕuòäI;;;…BÁÞ<%%…ÏççææJ¥ÒË—/{{{Ó§ÒÓÓé4LxJktxýúõ%%%µµµÌqزe‹L&KOO€¾¾¾ôôô… ööö ‚)oÑt®×°˜G³þþ~{{ûO?ýT&“‘$944¤ÕjÙw9000##ƒIúôéIîÝ”Öèp]]¦½ûúèè(ˆÅâÐÐЬ¬,ÆòÙ³g-P3óÔîî¥>>>«W¯.//·±ãI{{»P(d¢+V¬˜‹5š  =ÛÙÑO0³ÑøÃ‡CCÿ·—)G§y4S*•$Ifgg÷÷÷ÇÅÅmܸQg*ÀÏÏïÞ½{L´¡¡a.Öhô®¯¯/»¬¦¦¦i^‘)1fA¬[·îâÅ‹r¹|ttÔÞÞÞÉɉ>¥P( !!!111//ïñãÇ………~ø!}vppðË/¿Ô OimúìÙ³'))©¨¨¨¯¯¯¤¤äÈ‘#¸ò?Ο?Àáp‚‚‚òòò(ŠR«Õ¯¼òг³3EQ&99Y ÌŸ?ÿ¥—^ª¨¨ ]ßJMÇÚD¹@,³ÃZ­6555 €ËåFEEåååñx<ƒ\¯1›f–I~~~mm-ÍÉÉ …“gyVú K]]ݶmÛjjj†‡‡+**:´sçNs;¥ Â{"ƒ¤¤¤áááèèèÞÞ^ÿ;vÄÇÇ›Û)] ÿmÝïz¦æ©Á´×‹ëFôÀš¡Ö =°fè5CÃ÷õ ‚èéé)++3¸åÉ‘•r€÷5£&.ø|¾)‹3|__©TÎt”oîZêjŒXÞÛÆÖÔ#„ÎÎÎŽŽŽ&+ÎðÏ™£££)/€¦ý¦\=LÀh‹Ã¢_¸š¸tc%홸 ßÆll qÕnqÌ` š©‡ÉÖ2©RCµ–Ê4J=;éZÖ Ù£òA­æi«¬ÕPÊÍë±±ÍÄWúøéS* ÄW öÁe‚¼fªAMÇí!Š|úœQ$Õ~kH5¨1¯WFyÍZKˆ±ÛŠ@µ–˜Ë€¼fâ‚~rì&Eu÷ÑÖì¿Ýêî{ jl?‘"¡»Vñßµ™œ2:hkÖR,#lõ|EØ-Å238dÐÖL\ÐGjõŒ½‘ZJ\`µ½G„5“wŒôI”ú‡K)è+å#¦öÉ$ ü z˜ô82ši†µ`çdKG ¬u@ÄðãúæâÆàµãKÌíˆÑA¸n|fÁš¡Ö =°fè5C¬z ü~¦ÃÂ]Ì킉°ž÷³g\7¢Ö =°fè5EQÛ¶msvvÖÚL–¶õô ‚T*ÍÊÊjkk ^÷Ç ‘H–.]ªsOô4#ÖS7vÞê¼3Ä>BÄ©S§‚ƒƒy<Þ±cÇ233—,YÂår:4‘‘ñ«Ñé$P«Õ‰‰‰Ï=÷ŸÏOLLT«Õ o}:(((wrròòòbVœÒ%½öu1åÂFåzRËõ¤öˆ•Ëåôr=111r¹<-- žP(áááÓwi"ûl¬§=3 žžžÌ3*“Éè…¸`ÜútJ¥2&&&11±¦¦æÄ‰s·Ïk63Þ|óÍ?þñmmmuuuQQQÿüç?õ&åp8J¥òðáÃ044¤7å,ìcÍfÆÑ£G]\\ÂÃÃ×®]vüøq½ÉÜÜÜ>ûì³­[·ùùùÅÆÆFEEʾõ¼Ÿ=;ß]YOÏŸY? !Zþ yv5CÜA¬z`ÍÐk†X3ô°ÍÆÏŸY+ÖóNýCîx6Þ¬­ç9{vÀš¡Ö =°fè5C¬zXO_ÿYèåÓà¹ôÀu#z`ÍÐk†X3ôÀš¡Ö =¬G3<†xþ c¹Ìf$''‡þk¢Eá;mœ»ævD—øøø-[¶Ðàl4‹‰‰)++{vv ž kÖ¬¹pá‚mβ=[¾|9ý·*Ìä|ôÑG·‰Û3ôÀš¡Ö =°fèaDÍ"##;;;gýóÏ?ß½{7=wî\dd¤T*¥£===‘‘‘wïŽéÙwvvFFFή8•J%‰âââ~ýë_'$$deeiµÚY;oT,÷9 …‰ddäéž/ÕÕÕATUUÑÑÆÆF;;»vggçØØXèêêzã7¦_Öððp||ü?üÿÅ_lݺµ¸¸xÿþý$i‰»—X®faaa¦¹¹FFFèµØšÏ›7…ËåîÚµ H’”ËåÓ/ëÌ™3nnn)))/¼ð‚Ï«¯¾*‰?~|õêUÃ]Á0‘f‘‘‘W¯^ݾ}{ttôÙ³g‹ŠŠbcc7lØpêÔ) (êÒ¥Kï¿ÿþ† öîÝ{ûöíÈÈHwww__߆†¨¯¯çóù¯¿þzMM ]e544„……ÁOõaMMÍÛo¿]XXH׿ûÝïàÍ7ߤK×h4"‘hÓ¦M›6m‰D†ëþýûÅÅÅï½÷{]‡wÞy§¸¸X¯o:ÙMsL÷œUWWÿë_ÿÚµkWzzúíÛ·Ož<¹{÷îÌÌL¹\~åÊ•ÌÌÌ={öœ={vëÖ­ÌB&B¡Ö¬ªªjåʕ˖-#âÁƒjµº¹¹™ÖŒæÂ… \ºt)¥—¾ÉÍÍ¥£999]]]iiiŸ}öYMMÍW_}ÅÎåååÕßß/t=šÈ·ñ…š ÓiööÛo;99­[·~ó›ß899ÑËœ ]¼x1!!áùçŸçr¹¿ýíoé,aaaõõõEUWWGDDØÚÚ®\¹²ªªJ,“$É<ÛµkWxx¸ƒƒƒÞ¢¯^½ú‡?üÏçûûûÇÇÇWVVN'A$INäÛ”Ù‡éæbœœœÀÎÎN' R©tÉ’ÿ­ÅâççGÂÂÂø€ ˆ_þò—ñññOžŸ@GÿýïgffÒëÄš9úöÑGñx<ÃΟYDÝØÒÒòñÇÓKÂ666ž:ujÆ ævê)è›EÔï¼óŽJ¥úË_þ200àååµ~ýú7šÛ©§X o¡™­­m\\\\\œ¹уúfu#fF`ÍÐk†X3ô˜eD*•Ö«D*•òx<îÖ,öîÝk`'¬š}ûöÍâ&Oþ
pktools-2.6.6/doc/html/dir_0d45166ba6790a432639a127a727f02c_dep.map0000644000113200011300000000054512616110567020077 00000000000000 pktools-2.6.6/doc/html/dir_457de909e3893805a4d2d0b8c0742bd8_dep.png0000644000113200011300000000410112616110567020263 00000000000000‰PNG  IHDRèeÈå8)bKGDÿÿÿ ½§“öIDATxœíÝL“wÇñïÃR0EA®;*RàFF  !À4çm¦\c$(µõÍY0ñ ·#ˆ•U5'àùƒcèN–ðã<·ÕÂ.ü¸ÙÀ?Ì"w0#ÆË6àh‘1dd­PÚJ+åþ¨A¦ˆ ·30пv­ ^Ç~]µ÷¸]¸0¯Õ«×äää/n <<ÀU{w"„K‡uë”ʲåÏc·Ûõú\µw'rÓp¯\¹xäȳÙLimm‹‹óóóãñxeeO^Ä–––˜˜.—+._¾ìø¤Íf“ËåAAAëׯ—Ëå6›ÍeËX’ýûwu<žšš õ¿~ý_sXk4-[·Æðxܸ8Juy©ž™œœHyýõŸ“Ÿ~Ì>žžž~ÿý¿ÄÇÿ’Ïÿ™H´åË/ÿýÌÈññ‡ÙÙÃ⢂ß{ïØÔÔ£Wñ"¼”›†[SS£ÑhZ[[ÛÚÚN:e4Åbñ¦M›úúúΜ9£P(ÆÆÆL&“D"ÉÎÎÖét………™™™&“‰rþüy­VÛÝÝÝÞÞÞÑÑQTTäêÕ°#§·´4:®[ÜÑñ¹¯¯ßÛoÿfv«Ùl’É$‡e÷ôèŽ+|çL³Ù4ï<ó޼~½“òÍ7^´÷êêʪª3Jeywwo^^Ryü™Çÿá»ï¾mkûZ}­£ãóŠŠr'¬™=7 ·¢¢""""!!¡¤¤D¥RùøøôôôTVVòx<>ŸO·Z­v»}rr’ËåÊd2ƒÁàëëK©­­­ªªâóùÑÑÑåååÆÕ«aG$JÑë¸s§›ÒØøqzúï¼¼žþŸVǪM¦Iî¾}2­ÖÀåúÎ;ÏâGÎUSó·“'Oïܹ;(ˆ'î(**»Õf³}úé'¥¥ݸQðÆÑ ÅŸÔê,o¹Kä¦áFDD8DFFŽŒŒp8œÞÞ^‘H´yóæºº:Ç&ÿ7ntvvoÛ¶íæÍ›„NÇãñ†aF(jµZW­bi|}ývìHmjj0›MM˾}²¹[׬ñon¾ÑÕÕ¼sç¶[·ž¬úy‹I™½0ýððPttìì磢bæžž s|(„»´e.“›†Û××çxÐÛÛb±X¤R©\.¿}ûöÅ‹›,‹ÝnW«Õz½>+++%%E¯×Búúúffffff Cgg§Ë–±Tbqzssõkͱ±›ÃÂ"ænzôÈb·ÛëêÔúýû³ÒÓS ý¼“,räãÇ !³Wذaã½{=³[¿þú¿syzzêt޵Úÿ½öÚ/–±Ð¥sÓpóòòúûû»ººNœ8qðàÁ©©)«ÕÊáp,‹R©$„F†a’““'&&¬V«···ŸŸ!$--M¡P Þ½{W$]¸pÁÕ«aí­·’>4”•)322ŸÙÄ0LZZrKK£Ñ8a³Y½¼ž¬úy Œ4™& !«W¯!„¨T7'ª«+›d²ß+•òÏ>kúþûííšÒÒý†àíí½{÷Þwßýãà ö«¯î•”J$Î]û"9ÿ‚ N‘••% ÍfóŽ=ÊápΞ=›‘‘±jÕ*…B‘žž.‰FGGëëëóó󇆆J¥âr¹„ââ✜œ¸¸8±X\^îšß–ƒÃᤦJ>JM}öF4>>Ü>¨?y2xx($DPS£òñáÎ;ɼ#7lؘ˜¸52’74d\·.   ¸°0ïܹ?Ÿkmý'!äСl›ÍZTtìÁƒ‘¨¨˜?üH(Lœ;íéÓU EÎöíñÞÞœ´´ßææ*^Ñ‹°0ÖwݱZÉ7/Y»–Q©TR)ë{Q¸9†ajjT»v­´u¹ ™LÊáVwÝqÓS€…¹é©°ò¢7èõ,~œÒá®+8ÐÁ©P á•.P á•.P á•.P á•.P á•.P á•.P á•.P ᕜ®§§çÞ½{™‡âé‰7Ý»'1šš:ÆÆF;§;ðððLNÞáꣀ§œî›oþʹÌ ç¸@%„ TB¸@%„ TB¸@%„ TB¸@%ÖÿŽ;88P__ý*~²""¬žÂ.\>Ÿ¯V«ïÜ9ÌêY/µ}û¯Ygw}\7s\ Â*!\ Â*!\ Â*!\ Â*!\ Â*!\ Â*!\ Â*ýFÙú>3IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract__coll__graph.md50000644000113200011300000000004012616110566023676 00000000000000a6cee43ad8ab79b55c7d052fe8a940e4pktools-2.6.6/doc/html/dir_0d45166ba6790a432639a127a727f02c.html0000644000113200011300000000735212616145623017442 00000000000000 pktools: /home/kempenep/pktools/vis_studio/base Directory Reference
pktools  2.6.4
Processing Kernel for geospatial data
base Directory Reference
Directory dependency graph for base:
/home/kempenep/pktools/vis_studio/base

Files

file  Optionpk.cc [code]
 
pktools-2.6.6/doc/html/ImgReaderOgr_8h_source.html0000644000113200011300000044656012647637662017052 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgReaderOgr.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgReaderOgr.h
1 /**********************************************************************
2 ImgReaderOgr.h: class to read vector files using OGR API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGREADEROGR_H_
21 #define _IMGREADEROGR_H_
22 
23 #include <assert.h>
24 #include <fstream>
25 #include <string>
26 #include <sstream>
27 #include <map>
28 #include <vector>
29 #include <iostream>
30 #include "ogrsf_frmts.h"
31 #include "base/Vector2d.h"
32 #include "ImgReaderGdal.h"
33 
34 //--------------------------------------------------------------------------
36 {
37 public:
38  ImgReaderOgr(void);
39  ImgReaderOgr(const std::string& filename);
40  ~ImgReaderOgr(void);
41  void open(const std::string& filename);
42  void close(void);
43  // int readData(Vector2d<double>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, int layer=0, bool pos=false);//default layer 0 and no pos information in data
44  template <typename T> int readXY(std::vector<T>& xVector, std::vector<T>& yVector, int layer=0, bool verbose=false);
45  template <typename T> int readY(std::vector<T>& yVector, int layer=0, bool verbose=false);
46  template <typename T> int readData(std::vector<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, OGRFeature *poFeature, int layer=0, bool pos=false, bool verbose=false);
47  template <typename T> int readData(std::vector<T>& data, const OGRFieldType& fieldType, const std::string& theField, int layer=0, bool verbose=false);
48  template <typename T> int readData(Vector2d<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, int layer=0, bool pos=false, bool verbose=false);//default layer 0 and no pos information in data
49  template <typename T> int readData(std::map<int,Vector2d<T> >& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& label, int layer=0, bool pos=false, bool verbose=false);//default layer 0 and no pos information in data
50  template <typename T> int readData(std::map<std::string,Vector2d<T> >& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& label, int layer=0, bool pos=false, bool verbose=false);//default layer 0 and no pos information in data
51  unsigned int readDataImageOgr(std::map<std::string,Vector2d<float> > &mapPixels, //[classNr][pixelNr][bandNr],
52  std::vector<std::string>& fields,
53  const std::vector<unsigned short>& bands,
54  const std::string& label,
55  const std::vector<std::string>& layers,
56  int verbose=false);
57 
58  unsigned int readDataImageOgr(std::map<std::string,Vector2d<float> > &mapPixels, //[classNr][pixelNr][bandNr],
59  std::vector<std::string>& fields,
60  double start,
61  double end,
62  const std::string& label,
63  const std::vector<std::string>& layers,
64  int verbose=false);
65 
66  // void shape2ascii(std::ostream& theOstream, const std::string& pointname, int layer=0, bool verbose=false);
67  unsigned long int getFeatureCount(int layer=0) const;
68  int getFieldCount(int layer=0) const;
69  OGRLayer* getLayer(int layer=0){return m_datasource->GetLayer(layer);};
70  std::string getProjection(int layer=0) const;
71  OGRwkbGeometryType getGeometryType(int layer=0) const;
72  std::string getLayerName(int layer=0){return m_datasource->GetLayer(layer)->GetLayerDefn()->GetName();};
73  // int getLayer(int layer=0) const;
74  int getFields(std::vector<std::string>& fields, int layer=0) const;
75  int getFields(std::vector<OGRFieldDefn*>& fields, int layer=0) const;
76 #if GDAL_VERSION_MAJOR < 2
77  OGRDataSource* getDataSource(void) {return m_datasource;};
78  OGRSFDriver* getDriver(void) const {return m_datasource->GetDriver();};
79 #else
80  GDALDataset* getDataSource(void) {return m_datasource;};
81  GDALDriver* getDriver(void) const {return m_datasource->GetDriver();};
82 #endif
83  int getLayerCount(void) const {return m_datasource->GetLayerCount();};
84 // OGRLayer *executeSql(const std::string& output,const std::string& sqlStatement, OGRGeometry* spatialFilter=NULL);
85  template<typename T> int readSql(Vector2d<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& sqlStatement, OGRGeometry* spatialFilter=NULL, int layer=0, bool pos=false, bool verbose=false);
86  template<typename T> int readSql(std::map<int,Vector2d<T> >& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& label, const std::string& sqlStatement, OGRGeometry* spatialFilter, int layer=0, bool pos=false, bool verbose=false);
87  bool getExtent(double& ulx, double& uly, double& lrx, double& lry, int layer);
88  bool getExtent(double& ulx, double& uly, double& lrx, double& lry);
89 
90  void setFieldSeparator(const char fs){ m_fs=fs;};
91  char getFieldSeparator() const { return m_fs;};
92  friend std::ostream& operator<<(std::ostream& theOstream, ImgReaderOgr& theImageReader);
93 
94 protected:
95  void setCodec(void);
96 
97  std::string m_filename;
98 #if GDAL_VERSION_MAJOR < 2
99  OGRDataSource *m_datasource;
100 #else
101  GDALDataset *m_datasource;
102 #endif
103  char m_fs;
104 };
105 
106 //read data from all features in a map, organized by classes
107 template <typename T> int ImgReaderOgr::readData(std::map<int,Vector2d<T> >& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& label, int layer, bool pos, bool verbose)
108 {
109  assert(m_datasource->GetLayerCount()>layer);
110  OGRLayer *poLayer;
111  if(verbose)
112  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
113  poLayer = m_datasource->GetLayer(layer);
114  if(poLayer!=NULL){
115  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
116  if(fields.empty()){
117  fields.resize(poFDefn->GetFieldCount());
118  if(verbose)
119  std::cout << "resized fields to " << fields.size() << std::endl;
120  }
121  //start reading features from the layer
122  OGRFeature *poFeature;
123  if(verbose)
124  std::cout << "reset reading" << std::endl;
125  poLayer->ResetReading();
126  unsigned long int ifeature=0;
127  int posOffset=(pos)?2:0;
128  if(verbose)
129  std::cout << "going through features" << std::endl << std::flush;
130  int theClass=0;
131  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
132  std::vector<T> theFeature;//(fields.size()+posOffset);//x,y+selectedfields
133  if(verbose)
134  std::cout << "reading feature " << ifeature << std::endl << std::flush;
135  OGRGeometry *poGeometry;
136  poGeometry = poFeature->GetGeometryRef();
137  if(verbose){
138  if(poGeometry == NULL)
139  std::cerr << "no geometry defined" << std::endl << std::flush;
140  else if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
141  std::cerr << "Warning: poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl << std::flush;
142  }
143  assert(poGeometry != NULL );
144  // && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
145  if(pos){
146  if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint){
147  OGRPoint *poPoint;
148  poPoint = (OGRPoint *) poGeometry;
149  theFeature.push_back(poPoint->getX());
150  theFeature.push_back(poPoint->getY());
151  }
152  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon){
153  OGRPoint thePoint;
154  OGRPolygon * poPolygon = (OGRPolygon *) poGeometry;
155  poPolygon->Centroid(&thePoint);
156  theFeature.push_back(thePoint.getX());
157  theFeature.push_back(thePoint.getY());
158  }
159  else{
160  //Centroid for non polygon geometry not supported until OGR 1.8.0, comment out if version < 1.8.0 is installed...";
161  OGRPoint thePoint;
162  poGeometry->Centroid(&thePoint);
163  theFeature.push_back(thePoint.getX());
164  theFeature.push_back(thePoint.getY());
165  }
166  }
167  // OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
168  std::string featurename;
169  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
170  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
171  std::string fieldname=poFieldDefn->GetNameRef();
172  if(fieldname==label)
173  theClass=poFeature->GetFieldAsInteger(iField);
174  else{
175  switch(fieldType){
176  case(OFTReal):
177  if(fields.size()<poFDefn->GetFieldCount()){
178  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
179  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
180  }
181  else{
182  fields[iField]=fieldname;
183  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
184  }
185  break;
186  case(OFTInteger):
187  if(fields.size()<poFDefn->GetFieldCount()){
188  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
189  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
190  }
191  else{
192  fields[iField]=fieldname;
193  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
194  }
195  break;
196  default:
197  {
198  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
199  throw(errorstring);
200  }
201  break;
202  }
203  }
204  }
205  data[theClass].push_back(theFeature);
206  ++ifeature;
207  ++ifeature;
208  }
209  if(verbose)
210  std::cout << "number of features read: " << ifeature << std::endl << std::flush;
211  typename std::map<int,Vector2d<T> >::const_iterator mit=data.begin();
212  int nband=0;
213  if(verbose)
214  std::cout << "read classes: " << std::flush;
215  while(mit!=data.end()){
216  if(verbose)
217  std::cout << mit->first << " " << std::flush;
218  if(!nband)
219  nband=fields.size();
220  if(pos)
221  assert((mit->second)[0].size()==nband+2);
222  else
223  assert((mit->second)[0].size()==nband);
224  ++mit;
225  }
226  if(verbose)
227  std::cout << std::endl << std::flush;
228  return(nband);
229  }
230  else{
231  std::ostringstream ess;
232  ess << "no layer in " << m_filename;
233  throw(ess.str());
234  }
235 }
236 
237 //read data from all features in a map, organized by class names
238 template <typename T> int ImgReaderOgr::readData(std::map<std::string,Vector2d<T> >& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& label, int layer, bool pos, bool verbose)
239 {
240  assert(m_datasource->GetLayerCount()>layer);
241  OGRLayer *poLayer;
242  if(verbose)
243  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
244  poLayer = m_datasource->GetLayer(layer);
245  if(poLayer!=NULL){
246  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
247  assert(poFDefn!=NULL);
248 
249  if(fields.empty()){
250  fields.resize(poFDefn->GetFieldCount());
251  if(verbose)
252  std::cout << "resized fields to " << fields.size() << std::endl;
253  }
254 
255  //start reading features from the layer
256  OGRFeature *poFeature;
257  if(verbose)
258  std::cout << "reset reading" << std::endl;
259  poLayer->ResetReading();
260  unsigned long int ifeature=0;
261  int posOffset=(pos)?2:0;
262  if(verbose)
263  std::cout << "going through features to fill in string map" << std::endl << std::flush;
264  std::string theClass;
265  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
266  std::vector<T> theFeature;//(fields.size()+posOffset);//x,y+selectedfields
267  if(verbose)
268  std::cout << "reading feature " << ifeature << std::endl << std::flush;
269  OGRGeometry *poGeometry;
270  poGeometry = poFeature->GetGeometryRef();
271  if(verbose){
272  if(poGeometry == NULL)
273  std::cerr << "no geometry defined" << std::endl << std::flush;
274  else if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
275  std::cerr << "Warning: poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl << std::flush;
276  }
277  assert(poGeometry != NULL );
278  // && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
279  if(pos){
280  if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint){
281  OGRPoint *poPoint;
282  poPoint = (OGRPoint *) poGeometry;
283  theFeature.push_back(poPoint->getX());
284  theFeature.push_back(poPoint->getY());
285  }
286  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon){
287  OGRPoint thePoint;
288  poGeometry->Centroid(&thePoint);
289  theFeature.push_back(thePoint.getX());
290  theFeature.push_back(thePoint.getY());
291  }
292  else{
293  //Centroid for non polygon geometry not supported until OGR 1.8.0, comment out if version < 1.8.0 is installed...";
294  OGRPoint thePoint;
295  poGeometry->Centroid(&thePoint);
296  theFeature.push_back(thePoint.getX());
297  theFeature.push_back(thePoint.getY());
298  }
299  }
300  // OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();//got LayerDefn already...
301  std::string featurename;
302  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
303  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
304  std::string fieldname=poFieldDefn->GetNameRef();
305  if(fieldname==label){
306  theClass=poFeature->GetFieldAsString(iField);
307  if(verbose)
308  std::cout << "read feature for " << theClass << std::endl;
309  }
310  else{
311  switch(fieldType){
312  case(OFTReal):
313  if(fields.size()<poFDefn->GetFieldCount()){
314  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
315  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
316  }
317  else{
318  fields[iField]=fieldname;
319  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
320  }
321  break;
322  case(OFTInteger):
323  if(fields.size()<poFDefn->GetFieldCount()){
324  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
325  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
326  }
327  else{
328  fields[iField]=fieldname;
329  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
330  }
331  break;
332  default:
333  {
334  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
335  throw(errorstring);
336  }
337  break;
338  }
339  }
340  assert(poFDefn!=NULL);
341  }
342  data[theClass].push_back(theFeature);
343  ++ifeature;
344  }
345  if(verbose)
346  std::cout << "number of features read: " << ifeature << std::endl << std::flush;
347  typename std::map<std::string,Vector2d<T> >::const_iterator mit=data.begin();
348  int nband=0;
349  if(verbose)
350  std::cout << "read classes: " << std::flush;
351  while(mit!=data.end()){
352  if(verbose)
353  std::cout << mit->first << " " << std::flush;
354  if(!nband)
355  nband=fields.size();
356  if(pos)
357  assert((mit->second)[0].size()==nband+2);
358  else
359  assert((mit->second)[0].size()==nband);
360  ++mit;
361  }
362  if(verbose)
363  std::cout << std::endl << std::flush;
364  return(nband);
365  }
366  else{
367  std::ostringstream ess;
368  ess << "no layer in " << m_filename;
369  throw(ess.str());
370  }
371 }
372 
373 //read x positions
374 template <typename T> int ImgReaderOgr::readXY(std::vector<T>& xVector, std::vector<T>& yVector, int layer, bool verbose){
375  assert(m_datasource->GetLayerCount()>layer);
376  OGRLayer *poLayer;
377  if(verbose)
378  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
379  poLayer = m_datasource->GetLayer(layer);
380  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
381  //start reading features from the layer
382  OGRFeature *poFeature;
383  if(verbose)
384  std::cout << "reset reading" << std::endl;
385  poLayer->ResetReading();
386  unsigned long int ifeature=0;
387  if(verbose)
388  std::cout << "going through features" << std::endl << std::flush;
389  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
390  if(verbose)
391  std::cout << "reading feature " << ifeature << std::endl << std::flush;
392  OGRGeometry *poGeometry;
393  poGeometry = poFeature->GetGeometryRef();
394  if(verbose){
395  if(poGeometry == NULL)
396  std::cerr << "no geometry defined" << std::endl << std::flush;
397  else// if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
398  std::cout << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl;
399  }
400  // assert(poGeometry != NULL
401  // && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
402  OGRPoint *poPoint = (OGRPoint *) poGeometry;
403  xVector.push_back(poPoint->getX());
404  yVector.push_back(poPoint->getY());
405  ++ifeature;
406  }
407  assert(xVector.size()==yVector.size());
408  if(xVector.size()){
409  return xVector.size();
410  }
411  else{
412  std::ostringstream ess;
413  ess << "no layer in " << m_filename;
414  throw(ess.str());
415  }
416 }
417 
418 //read data from a single feature
419 template <typename T> int ImgReaderOgr::readData(std::vector<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, OGRFeature *poFeature, int layer, bool pos, bool verbose)
420 {
421  assert(m_datasource->GetLayerCount()>layer);
422  OGRLayer *poLayer;
423  if(verbose)
424  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
425  poLayer = m_datasource->GetLayer(layer);
426  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
427  if(fields.empty()){
428  fields.resize(poFDefn->GetFieldCount());
429  if(verbose)
430  std::cout << "resized fields to " << fields.size() << std::endl;
431  }
432  OGRGeometry *poGeometry;
433  poGeometry = poFeature->GetGeometryRef();
434  if(verbose){
435  if(poGeometry == NULL)
436  std::cerr << "no geometry defined" << std::endl << std::flush;
437  else if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
438  std::cerr << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl << std::flush;
439  }
440  assert(poGeometry != NULL);
441  // && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
442  OGRPoint *poPoint = (OGRPoint *) poGeometry;
443  if(pos){
444  if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint){
445  OGRPoint *poPoint;
446  poPoint = (OGRPoint *) poGeometry;
447  data.push_back(poPoint->getX());
448  data.push_back(poPoint->getY());
449  }
450  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon){
451  OGRPoint thePoint;
452  poGeometry->Centroid(&thePoint);
453  data.push_back(thePoint.getX());
454  data.push_back(thePoint.getY());
455  }
456  else{
457  //Centroid for non polygon geometry not supported until OGR 1.8.0, comment out if version < 1.8.0 is installed...";
458  OGRPoint thePoint;
459  poGeometry->Centroid(&thePoint);
460  data.push_back(thePoint.getX());
461  data.push_back(thePoint.getY());
462  }
463 
464  }
465  std::string featurename;
466  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
467  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
468  std::string fieldname=poFieldDefn->GetNameRef();
469  switch(fieldType){
470  case(OFTReal):
471  if(fields.size()<poFDefn->GetFieldCount()){
472  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
473  data.push_back(poFeature->GetFieldAsDouble(iField));
474  }
475  else{
476  fields[iField]=fieldname;
477  data.push_back(poFeature->GetFieldAsDouble(iField));
478  }
479  break;
480  case(OFTInteger):
481  if(fields.size()<poFDefn->GetFieldCount()){
482  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
483  data.push_back(poFeature->GetFieldAsDouble(iField));
484  }
485  else{
486  fields[iField]=fieldname;
487  data.push_back(poFeature->GetFieldAsDouble(iField));
488  }
489  break;
490  default:
491  {
492  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
493  throw(errorstring);
494  }
495  break;
496  }
497  }
498  // assert(data.size()==ifeature);
499  if(data.size()){
500  if(pos)
501  assert(data.size()==fields.size()+2);
502  else
503  assert(data.size()==fields.size());
504  return fields.size();
505  }
506  else{
507  std::ostringstream ess;
508  ess << "no layer in " << m_filename;
509  throw(ess.str());
510  }
511 }
512 
513 //read one field from all features
514 template <typename T> inline int ImgReaderOgr::readData(std::vector<T>& data, const OGRFieldType& fieldType, const std::string& theField, int layer, bool verbose)
515 {
516  assert(m_datasource->GetLayerCount()>layer);
517  OGRLayer *poLayer;
518  if(verbose)
519  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
520  poLayer = m_datasource->GetLayer(layer);
521  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
522  int nfield=(theField!="")? poFDefn->GetFieldCount() : 1;
523  if(theField==""){
524  //read first field available
525  if(verbose)
526  std::cout << "read first field from total of " << nfield << std::endl;
527  }
528 
529  //start reading features from the layer
530  OGRFeature *poFeature;
531  if(verbose)
532  std::cout << "reset reading" << std::endl;
533  poLayer->ResetReading();
534  unsigned long int ifeature=0;
535  if(verbose)
536  std::cout << "going through features" << std::endl << std::flush;
537  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
538  // std::vector<T> theFeature;//(fields.size()+posOffset);//x,y+selectedfields
539  T theFeature;
540  if(verbose)
541  std::cout << "reading feature " << ifeature << std::endl << std::flush;
542  OGRGeometry *poGeometry;
543  poGeometry = poFeature->GetGeometryRef();
544  if(verbose){
545  if(poGeometry == NULL)
546  std::cerr << "no geometry defined" << std::endl << std::flush;
547  else// if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
548  std::cout << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl;
549  }
550  // assert(poGeometry != NULL
551  // && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
552  OGRPoint *poPoint = (OGRPoint *) poGeometry;
553 
554  for(int iField=0;iField<nfield;++iField){
555  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
556  std::string fieldname=poFieldDefn->GetNameRef();
557  if(fieldname!=theField)
558  continue;
559  switch(fieldType){
560  case(OFTInteger):
561  case(OFTReal):
562  theFeature=poFeature->GetFieldAsDouble(iField);
563  break;
564  default:
565  {
566  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
567  throw(errorstring);
568  }
569  break;
570  }
571  }
572  data.push_back(theFeature);
573  if(verbose)
574  std::cout << "feature is: " << theFeature << std::endl;
575  ++ifeature;
576  }
577  if(data.size()){
578  return data.size();
579  }
580  else{
581  std::ostringstream ess;
582  ess << "no layer in " << m_filename;
583  throw(ess.str());
584  }
585 }
586 
587 //specialization for string: read one field from all features
588 template <> inline int ImgReaderOgr::readData(std::vector<std::string>& data, const OGRFieldType& fieldType, const std::string& theField, int layer, bool verbose)
589 {
590  assert(m_datasource->GetLayerCount()>layer);
591  OGRLayer *poLayer;
592  if(verbose)
593  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
594  poLayer = m_datasource->GetLayer(layer);
595  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
596  int nfield=(theField!="")? poFDefn->GetFieldCount() : 1;
597  if(theField==""){
598  //read first field available
599  if(verbose)
600  std::cout << "read first field from total of " << nfield << std::endl;
601  }
602 
603  //start reading features from the layer
604  OGRFeature *poFeature;
605  if(verbose)
606  std::cout << "reset reading" << std::endl;
607  poLayer->ResetReading();
608  unsigned long int ifeature=0;
609  if(verbose)
610  std::cout << "going through features" << std::endl << std::flush;
611  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
612  std::string theFeature;
613  if(verbose)
614  std::cout << "reading feature " << ifeature << std::endl << std::flush;
615  OGRGeometry *poGeometry;
616  poGeometry = poFeature->GetGeometryRef();
617  if(verbose){
618  if(poGeometry == NULL)
619  std::cerr << "no geometry defined" << std::endl << std::flush;
620  else// if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
621  std::cout << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl;
622  }
623  // assert(poGeometry != NULL
624  // && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
625  OGRPoint *poPoint = (OGRPoint *) poGeometry;
626 
627  for(int iField=0;iField<nfield;++iField){
628  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
629  std::string fieldname=poFieldDefn->GetNameRef();
630  if(fieldname!=theField)
631  continue;
632  switch(fieldType){
633  case(OFTInteger):
634  case(OFTReal):
635  case(OFTString):
636  theFeature=poFeature->GetFieldAsString(iField);
637  break;
638  default:
639  {
640  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
641  throw(errorstring);
642  }
643  break;
644  }
645  }
646  data.push_back(theFeature);
647  if(verbose)
648  std::cout << "feature is: " << theFeature << std::endl;
649  ++ifeature;
650  }
651  if(data.size()){
652  return data.size();
653  }
654  else{
655  std::ostringstream ess;
656  ess << "no layer in " << m_filename;
657  throw(ess.str());
658  }
659 }
660 
661 //read data from all features
662 template <typename T> int ImgReaderOgr::readData(Vector2d<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, int layer, bool pos, bool verbose)
663 {
664  assert(m_datasource->GetLayerCount()>layer);
665  OGRLayer *poLayer;
666  if(verbose)
667  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
668  poLayer = m_datasource->GetLayer(layer);
669  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
670  if(fields.empty()){
671  fields.resize(poFDefn->GetFieldCount());
672  if(verbose)
673  std::cout << "resized fields to " << fields.size() << std::endl;
674  }
675  //start reading features from the layer
676  OGRFeature *poFeature;
677  if(verbose)
678  std::cout << "reset reading" << std::endl;
679  poLayer->ResetReading();
680  unsigned long int ifeature=0;
681  int posOffset=(pos)?2:0;
682  if(verbose)
683  std::cout << "going through features" << std::endl << std::flush;
684  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
685  std::vector<T> theFeature;//(fields.size()+posOffset);//x,y+selectedfields
686  if(verbose)
687  std::cout << "reading feature " << ifeature << std::endl << std::flush;
688  OGRGeometry *poGeometry;
689  poGeometry = poFeature->GetGeometryRef();
690  if(verbose){
691  if(poGeometry == NULL)
692  std::cerr << "no geometry defined" << std::endl << std::flush;
693  else if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
694  std::cerr << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl << std::flush;
695  }
696  assert(poGeometry != NULL
697  && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
698  OGRPoint *poPoint = (OGRPoint *) poGeometry;
699  if(pos){
700  theFeature.push_back(poPoint->getX());
701  theFeature.push_back(poPoint->getY());
702  }
703  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
704  std::string featurename;
705  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
706  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
707  std::string fieldname=poFieldDefn->GetNameRef();
708  switch(fieldType){
709  case(OFTReal):
710  if(fields.size()<poFDefn->GetFieldCount()){
711  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
712  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
713  }
714  else{
715  fields[iField]=fieldname;
716  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
717  }
718  break;
719  case(OFTInteger):
720  if(fields.size()<poFDefn->GetFieldCount()){
721  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
722  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
723  }
724  else{
725  fields[iField]=fieldname;
726  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
727  }
728  break;
729  default:
730  {
731  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
732  throw(errorstring);
733  }
734  break;
735  }
736  }
737  data.push_back(theFeature);
738  ++ifeature;
739  }
740 // assert(data.size()==ifeature);
741  if(data.size()){
742  if(pos)
743  assert(data[0].size()==fields.size()+2);
744  else
745  assert(data[0].size()==fields.size());
746  return fields.size();
747  }
748  else{
749  std::ostringstream ess;
750  ess << "no layer in " << m_filename;
751  throw(ess.str());
752  }
753 }
754 
755 template<typename T> int ImgReaderOgr::readSql(std::map<int, Vector2d<T> >& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& label, const std::string& sqlStatement, OGRGeometry* spatialFilter, int layer, bool pos, bool verbose)
756 {
757  assert(m_datasource->GetLayerCount()>layer);
758  OGRLayer *poLayer;
759  poLayer = m_datasource->ExecuteSQL(sqlStatement.c_str(), spatialFilter,NULL );
760  if(poLayer!=NULL){
761  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
762  if(fields.empty()){
763  fields.resize(poFDefn->GetFieldCount());
764  if(verbose)
765  std::cout << "resized fields to " << fields.size() << std::endl;
766  }
767  //start reading features from the layer
768  OGRFeature *poFeature;
769  if(verbose)
770  std::cout << "reset reading" << std::endl;
771  poLayer->ResetReading();
772  unsigned long int ifeature=0;
773  int posOffset=(pos)?2:0;
774  if(verbose)
775  std::cout << "going through features" << std::endl << std::flush;
776  int theClass=0;
777  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
778  std::vector<T> theFeature;//(fields.size()+posOffset);//x,y+selectedfields
779  if(verbose)
780  std::cout << "reading feature " << ifeature << std::endl << std::flush;
781  OGRGeometry *poGeometry;
782  poGeometry = poFeature->GetGeometryRef();
783  if(verbose){
784  if(poGeometry == NULL)
785  std::cerr << "no geometry defined" << std::endl << std::flush;
786  else if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
787  std::cerr << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl << std::flush;
788  }
789  assert(poGeometry != NULL
790  && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
791  OGRPoint *poPoint = (OGRPoint *) poGeometry;
792  if(pos){
793  theFeature.push_back(poPoint->getX());
794  theFeature.push_back(poPoint->getY());
795  }
796  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
797  std::string featurename;
798  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
799  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
800  std::string fieldname=poFieldDefn->GetNameRef();
801  if(fieldname==label)
802  theClass=poFeature->GetFieldAsInteger(iField);
803  else{
804  switch(fieldType){
805  case(OFTReal):
806  if(fields.size()<poFDefn->GetFieldCount()){
807  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
808  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
809  }
810  else{
811  fields[iField]=fieldname;
812  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
813  }
814  break;
815  case(OFTInteger):
816  if(fields.size()<poFDefn->GetFieldCount()){
817  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
818  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
819  }
820  else{
821  fields[iField]=fieldname;
822  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
823  }
824  break;
825  default:
826  {
827  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
828  throw(errorstring);
829  }
830  break;
831  }
832  }
833  }
834  data[theClass].push_back(theFeature);
835  ++ifeature;
836  }
837  if(verbose)
838  std::cout << "number of features read: " << ifeature << std::endl << std::flush;
839  typename std::map<int,Vector2d<T> >::const_iterator mit=data.begin();
840  int nband=0;
841  if(verbose)
842  std::cout << "read classes: " << std::flush;
843  while(mit!=data.end()){
844  if(verbose)
845  std::cout << mit->first << " " << std::flush;
846  if(!nband)
847  nband=fields.size();
848  if(pos)
849  assert((mit->second)[0].size()==nband+2);
850  else
851  assert((mit->second)[0].size()==nband);
852  ++mit;
853  }
854  if(verbose)
855  std::cout << std::endl << std::flush;
856  return(nband);
857  }
858  else{
859  std::ostringstream ess;
860  ess << "no layer in " << m_filename;
861  throw(ess.str());
862  }
863 }
864 
865 template<typename T> int ImgReaderOgr::readSql(Vector2d<T>& data, const OGRFieldType& fieldType, std::vector<std::string>& fields, const std::string& sqlStatement, OGRGeometry* spatialFilter, int layer, bool pos, bool verbose)
866 {
867  assert(m_datasource->GetLayerCount()>layer);
868  OGRLayer *poLayer;
869  poLayer = m_datasource->ExecuteSQL(sqlStatement.c_str(), spatialFilter,NULL );
870  if(poLayer!=NULL){
871  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
872  if(fields.empty()){
873  fields.resize(poFDefn->GetFieldCount());
874  if(verbose)
875  std::cout << "resized fields to " << fields.size() << std::endl;
876  }
877  //start reading features from the layer
878  OGRFeature *poFeature;
879  if(verbose)
880  std::cout << "reset reading" << std::endl;
881  poLayer->ResetReading();
882  unsigned long int ifeature=0;
883  int posOffset=(pos)?2:0;
884  if(verbose)
885  std::cout << "going through features" << std::endl << std::flush;
886  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
887  std::vector<T> theFeature;//(fields.size()+posOffset);//x,y+selectedfields
888  if(verbose)
889  std::cout << "reading feature " << ifeature << std::endl << std::flush;
890  OGRGeometry *poGeometry;
891  poGeometry = poFeature->GetGeometryRef();
892  if(verbose){
893  if(poGeometry == NULL)
894  std::cerr << "no geometry defined" << std::endl << std::flush;
895  else if(wkbFlatten(poGeometry->getGeometryType()) != wkbPoint)
896  std::cerr << "poGeometry type: " << wkbFlatten(poGeometry->getGeometryType()) << std::endl << std::flush;
897  }
898  assert(poGeometry != NULL
899  && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
900  OGRPoint *poPoint = (OGRPoint *) poGeometry;
901  if(pos){
902  theFeature.push_back(poPoint->getX());
903  theFeature.push_back(poPoint->getY());
904  }
905  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
906  std::string featurename;
907  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
908  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
909  std::string fieldname=poFieldDefn->GetNameRef();
910  switch(fieldType){
911  case(OFTReal):
912  if(fields.size()<poFDefn->GetFieldCount()){
913  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
914  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
915  }
916  else{
917  fields[iField]=fieldname;
918  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
919  }
920  break;
921  case(OFTInteger):
922  if(fields.size()<poFDefn->GetFieldCount()){
923  if(find(fields.begin(),fields.end(),fieldname)!=fields.end())
924  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
925  }
926  else{
927  fields[iField]=fieldname;
928  theFeature.push_back(poFeature->GetFieldAsDouble(iField));
929  }
930  break;
931  default:
932  {
933  std::string errorstring="field type not supported in ImgReaderOgr::ReadData";
934  throw(errorstring);
935  }
936  break;
937  }
938  }
939  data.push_back(theFeature);
940  ++ifeature;
941  }
942  m_datasource->ReleaseResultSet( poLayer );
943  // assert(data.size()==ifeature);
944  if(data.size()){
945  if(pos)
946  assert(data[0].size()==fields.size()+2);
947  else
948  assert(data[0].size()==fields.size());
949  return fields.size();
950  }
951  else
952  return(0);
953  }
954  else{
955  std::ostringstream ess;
956  ess << "no layer in " << m_filename;
957  throw(ess.str());
958  }
959 }
960 
961 #endif // _IMGREADEROGR_H_
pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral__coll__graph.md50000644000113200011300000000004012616110566027414 000000000000002a8400e38d6b76c1310fa9719dbc19a3pktools-2.6.6/doc/html/classIncrease__PosValue.html0000644000113200011300000001005612647637662017303 00000000000000 pktools: Increase_PosValue Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Increase_PosValue Class Reference

Public Member Functions

int operator() (const PosValue &pv1, const PosValue &pv2) const
 

Detailed Description

Definition at line 40 of file PosValue.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_19.md50000644000113200011300000000004012616110567015376 00000000000000ebf49c77976eace6726b30bc888c949apktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm__coll__graph.png0000644000113200011300000000675312616110567024361 00000000000000‰PNG  IHDR½pÄÃæ bKGDÿÿÿ ½§“  IDATxœíÝ{LSgð§´Ð•J(:.ÃQ* °…Ä—]‚F¸Œ‰[™8‰àŒÛd¨Ù¦Â² Øf ›£rqXÅ ØÉõ‡‚3ã¨V(—hÏyÿ8ï{VJQ8oiëËïó‡9çÇyžç×öKO KÃq°DfÆn<“ 7€ È  r¨`f¥RÙÓÓƒa˜a–[±ìíímmm °r#—Ë=zd˜›´bÉåò‘‘‘ÿ«Ü<<< ¹ÜJóçŸl-x}¨€Ü* 7€ È  ÂÔssïÞ=fÈ©¾øâ –ššª¯N£ÑîÝ»GyZã2õÜèÔ××Çáp–cfÇ‹ŠŠœœœ„B¡¾æ\»ví‰'Ðr¶mxÏdn0 {ôèÑrÌÜÑÑqçμ¼¼¶¶¶îîn½ÌÉápˆg¯åkÛðL(7Äóyyy¹››Ûºuë>øàƒééiò«8Ž'$$xyy=|øðå—_F=÷ÜsÄ—FGG£££9Ž££cBB‚R©\¨H‰D/½ô‹Åâr¹€¬ùøøøùù¹»»ÏÊÁq<33sóæÍVVVÛ·o¿rå qš¿q[ª««œœ ˆÃ´ÚFUVVòx?77nÜÀq\­V#„zzzˆbKK q»´¶‰žÀ¹1¡óaãÆÄ†»»{?±ÝØØ¸mÛ¶äääùÇ«Õjb—Çãõ÷÷ë,’C¬­­Åb±D"qttôññùí·ßÌÌÌBEEE*•ŠÃáÐh´-[¶ „´NU½½½žžžäîæÍ›j€¼ O¾±ööö!buÒš5kBæææZÛ&ÅärC|S"„º»»‰»!$‰233‹ŠŠÄb±Öñëׯ§Óé}}}Änoo¯ƒƒƒÎ"9D¡P`V\\,“É8"“ÉÔjµP(LKKÿ¯øøx¡Pˆk\G»aÃÍßݹsg¡ˆí§>Þúúƒæimñç)>ŸßÓÓsëÖ­7ž>}Zó¹=11ÑÕÕU¡PÅññq¢áëëÛ×××ÑÑáááqúôiEr*…BÁb±JJJ¤Rivv6‹ÅR(b±˜N§“ý455!„ZZZÈgÏžutt¼~ýúÇ«««ÝÜÜh4Ú“×Âç§È¶‘Æ©iœ§æµ¶²¢_ßäæænذÃá9r„Œq€B¡puuMLLœ}íµ×V¯^MÔe2YTT”ÝÑ£G …΢æTB¡ÐÅÅÅÂÂÂÝݽ¼¼ÇñØØXÍ~0 sqq9qâ9P­V§§§»¸¸°Ù쀀€òòr[[Û§®Enkµ ¹yºÅçÆ íP$‰ÚÚÚÈÝ’’///#ö£eE¿.6eííí{÷îmii™šš’H$§NЉ‰1vSÆaÐë¶žÌÊÊ*66ÖØ]<Éñãǧ¦¦BCC¥R)—Ë}ï½÷L¼áåCà òww###Û¶m3ÀZ+ñ^Ï0UÂy P¹T@n@…AßO r¹•F©T²X,ìe Ü0™L¦¯+¡ Ãð šwîtspXcì^–`íÚµ†YÈ@¹a³Ù>>>†YK/$’Þ††ËnnÜÈÈmÆîÅÁëÝ.]j&þU©àoÚu€Üè03£*+kEMÕÕu»S¹ÑáÆ»SSÓ!:ݬ¬¬ÙØí˜"È¥¥ÍtºBH¥Â®]kW(fŒÝ‘ÉÜh›œœ¾~ý¶J¥&v§§UUUÆmÉAn´i†!dfF+-m2b?¦ r£­´´Ió²_• ‹ïÊå #¶d‚ 7sÈd“uuÝjõœ÷Þ8ŽWT´«%Ó¹™ãÊ•Í/â8^\ §ª9 7s””4ο Ãp‰¤wxxÌ(-™&ÈÍ?G››`˜Ž ét3‘HÇSÑŠ¹ù‡HÔ¶ÐE³*•º´~øº.Ý覦fìì¬È݉‰iËœÁøÏ·Ö³û§•ËÁ@×¥?‹ìíffî{ë-/c7bŠà<¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r(ÑüúßÿÝÂÂÂØ™ &ÓÉÌÌÒØ]˜ŠcÇŽiFeÎÿï700033“˜˜h¬æ€i*..þ믿4+:þ_Høtx ¥¶¶V«¯o@äP¹T,cnø|¾±†›f'Ïhó-cnV¯^®ß9‡††vìØ¡ß9˘6›}ðàAýΉa˜\.×‚%çÇñK—.íÛ·/((èðáí­­|>ÇñË—/GGGÇÇÇß¼y“Ïçk>»6448pÀßß?""¢²²RkNâÈúúú¨¨¨;wž={vvvVsÅŒŒŒ˜˜˜±±±÷ß!ôöÛo_š˜˜HMMݱcÇ®]»222fff*’ôՉΩNž}½§ZrnJKKãââ^ýu›­[·ÆÄÄEooo6›½eË–ýû÷k™Åq\¡PXXXˆD"&“9æC‡9::nÚ´)&&¦ªªŠ(fgg …ÂÄÄD+++­ãU*UMMÍ‘#Gììì¸\îþýû«ªªt—£S½òÊ+r¹¼«« !T]]@§Ó‰áaaa–––þþþ¡ˆˆKKË€€„Ðøø¸ 6ðTKÎÍÐÐÇ#w¹\.BhppÐÙÙ™,¾ð šCÖ¬Y“žžÞÙÙ¹k×®>ú¨½½¦ë܉ '''©TJlwuuyyyýøãóüø1†aöööÄ®ƒƒƒT*ÕY\ŽNtNÅd2_}õÕÚÚZ¥RÙÐÐ@<0KKK„ƒÁÐÚÖÉè <Õ’sÃápz{{É]â×]ëׯ¿ÿ>Y|ðàæééi Ã’’’D"QPPЧŸ~ª3ãýýýÄÆßÿmccCl'''ÇÇÇ×ÔÔ´¶¶jommmff644Dìr8Ååèd¡©ˆ3E}}½««+ùð/•Ñxª%ç&000##£¾¾^&“ݺu+;;!š••ÕÔÔ$—Ë[[[ 4¿i4Ú±cÇêêê&''ggg qv¸zõêää$yعsçîÞ½›››ûÆoE‹õüóÏGDD¤¥¥‘¯p BˆÁ`ðùüï¿ÿ~hhèþýûyyy~~~:‹ËÑÉBSy{{OLL-þ^5zKµägª°°0µZ}þüùÑÑQ.—ûå—_†††ªÕêôôô±±1¸¸¸o¿ý–baañÉ'ŸdeeŒŒØÛÛ'&&Wùœ9sÆËËkÕªUÄa~~~ü1ñâ.22RóüQ]]]XXõâ‹/¾óÎ;¡?üðܹsqqqæææÛ·oŒŒÔY$§Òc'ÑÑÑ:§b0>>>ÕÕÕ>>>‹¿WÞÀRÍùœÄ‹/†……‰ÅâÅØ»worròºuë\\\ˆb]]@ ÈÉÉYÒ$KZw™½£7 ÓçŸnkk{ñâE²¢ŸŸûõõõ}õÕW===ÓÓÓùùùÁÁÁz™˜&ý|žïž={”JåÉ“'GGGíììCBB?|ÕªUK:~ù½£7°Hÿëy ¬Ëuž+ äP¹T@n:ÞO%$$¾`Êúúú4쎴r³uëÖ={ö¨ÕjÃvL—Ëݽ{·feÎûp ^ß* 7€ È  r¨ø7l¡ý†©ɵIEND®B`‚pktools-2.6.6/doc/html/dir_53adf0b982dc8545998aae3f283a5a58_dep.map0000644000113200011300000000070512616110567020427 00000000000000 pktools-2.6.6/doc/html/FeatureSelector_8h_source.html0000644000113200011300000017136012647637661017627 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/FeatureSelector.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
FeatureSelector.h
1 /**********************************************************************
2 FeatureSelector.h: select features, typical use: feature selection for classification
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _FEATURESELECTOR_H_
21 #define _FEATURESELECTOR_H_
22 
23 #include <math.h>
24 #include <vector>
25 #include <list>
26 #include <algorithm>
27 #include <iostream>
28 #include <iomanip>
29 #include "ConfusionMatrix.h"
30 #include "base/IndexValue.h"
31 #include "base/Vector2d.h"
32 #include "gsl/gsl_combination.h"
33 #include "CostFactory.h"
34 
36 {
37  public:
38  FeatureSelector(){};
39  ~FeatureSelector(){};
40  template<class T> double forward(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures=0, short verbose=0);
41  template<class T> double backward(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int minFeatures, short verbose=0);
42  template<class T> double floating(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures=0, double epsilon=0.001, short verbose=0);
43  template<class T> double bruteForce(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures=0, short verbose=0);
44 
45  private:
46  template<class T> double addFeature(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, short verbose=0);
47  template<class T> double removeFeature(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int& r, short verbose=0);
48  template<class T> double forwardUnivariate(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures=0, short verbose=0);
49 };
50 
51 //sequential forward selection Univariate (N single best features)
52 template<class T> double FeatureSelector::forwardUnivariate(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures, short verbose){
53  int maxLevels=v[0][0].size();
54  if(!maxFeatures)
55  maxFeatures=maxLevels;
56  int k=subset.size();
57  if(k>=maxFeatures)
58  return -1;
59  std::vector<IndexValue> cost(maxLevels);
60  std::list<int> tmpset=subset;//temporary set of selected features (levels)
61  std::vector< Vector2d<T> > tmp(v.size());
62  for(int ilevel=0;ilevel<maxLevels;++ilevel){
63  if(find(tmpset.begin(),tmpset.end(),ilevel)==tmpset.end()){
64  tmpset.push_back(ilevel);
65  for(int iclass=0;iclass<v.size();++iclass){
66 // tmp[iclass].resize(v[iclass].size());
67  v[iclass].selectCols(tmpset,tmp[iclass]);
68  }
69  try{
70  IndexValue pv;
71  pv.position=ilevel;
72  pv.value=theCostFactory.getCost(tmp);
73  cost[ilevel]=pv;
74  }
75  catch(...){
76  IndexValue pv;
77  pv.position=ilevel;
78  pv.value=-1;
79  cost[ilevel]=pv;
80  }
81  tmpset.pop_back();
82  }
83  }
84  sort(cost.begin(),cost.end(),Compare_IndexValue());//decreasing order
85  int ilevel=0;
86  while((subset.size()<maxFeatures)&&(ilevel<maxLevels)){
87  if(cost[ilevel].value>0)
88  subset.push_back(cost[ilevel].position);
89  if(verbose)
90  std::cout << "feature " << subset.back() << " has cost: " << cost[ilevel].value << std::endl;
91  ++ilevel;
92  }
93  double maxCost=-1;
94  while(subset.size()){
95  for(int iclass=0;iclass<v.size();++iclass){
96 // tmp[iclass].resize(v[iclass].size());
97  v[iclass].selectCols(subset,tmp[iclass]);
98  }
99  try{
100  maxCost=theCostFactory.getCost(tmp);
101  }
102  catch(...){
103  subset.pop_back();
104  continue;
105  }
106  return maxCost;
107  }
108 }
109 
110 //sequential forward selection Multivariate (Combination of N best features)
111 template<class T> double FeatureSelector::forward(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures, short verbose){
112  //Select feature with the best value (get maximal cost for 1 feature)
113  double maxCost=0;
114  int maxLevels=v[0][0].size();
115  if(!maxFeatures)
116  maxFeatures=maxLevels;
117  while(subset.size()<maxFeatures){
118  maxCost=addFeature(v,theCostFactory,subset,verbose);
119  if(verbose){
120  for(std::list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
121  std::cout << *lit << " ";
122  std::cout << std::endl;
123  // std::cout << "added " << subset.back() << ", " << subset.size() << "/" << maxFeatures << " features selected with cost: " << maxCost << std::endl;
124  }
125  }//while
126  return maxCost;
127 }
128 
129 //sequential backward selection
130 template<class T> double FeatureSelector::backward(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int minFeatures, short verbose){
131  //Select features with least effect on cost when removed (obtain minFeatures eventually)
132  double maxCost=0;
133  int removedFeature;
134  if(subset.empty()){
135  for(int iFeature=0;iFeature<v[0][0].size();++iFeature)
136  subset.push_back(iFeature);
137  }
138  if(subset.size()==minFeatures)
139  maxCost=theCostFactory.getCost(v);
140  while(subset.size()>minFeatures){
141  maxCost=removeFeature(v,theCostFactory,subset,removedFeature,verbose);
142  if(verbose){
143  for(std::list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
144  std::cout << *lit << " ";
145  std::cout << std::endl;
146  // std::cout << "removed " << removedFeature << ", " << subset.size() << "/" << minFeatures << " features remain with cost: " << maxCost << std::endl;
147  }
148  }//while
149  return maxCost;
150 }
151 
152 //floating search
153 template<class T> double FeatureSelector::floating(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures, double epsilon, short verbose){
154  std::vector<T> cost;
155  int maxLevels=v[0][0].size();
156  if(maxFeatures<1)
157  maxFeatures=maxLevels;
158  int k=subset.size();
159  if(k>=maxFeatures)
160  return -1;
161  while(cost.size()<subset.size())
162  cost.push_back(1);//init original features as cost 1
163  cost.push_back(addFeature(v,theCostFactory,subset,verbose));
164  ++k;
165  if(verbose>1)
166  std::cout << "added " << subset.back() << ", " << subset.size() << "/" << maxFeatures << " features selected with cost: " << cost.back() << std::endl;
167  else if(verbose){
168  for(std::list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
169  std::cout << *lit << " ";
170  std::cout << std::endl;
171  }
172  while(k<maxFeatures){
173  cost.push_back(addFeature(v,theCostFactory,subset,verbose));
174  ++k;
175  if(verbose>1)
176  std::cout << "added " << subset.back() << ", " << subset.size() << "/" << maxFeatures << " features selected with cost: " << cost.back() << std::endl;
177  else if(verbose){
178  for(std::list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
179  std::cout << *lit << " ";
180  std::cout << " (cost: " << cost.back() << ")" << std::endl;
181  }
182 
183  while(k>1){
184  int x_r;
185  double cost_r=removeFeature(v,theCostFactory,subset,x_r,verbose);
186  if(cost_r>cost[k-1]+epsilon){
187  --k;
188  cost[k]=cost_r;
189  cost.pop_back();
190  if(verbose>1)
191  std::cout << "removed " << x_r << ", " << subset.size() << "/" << maxFeatures << " features remain with cost: " << cost_r << std::endl;
192  else if(verbose){
193  for(std::list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
194  std::cout << *lit << " ";
195  std::cout << " (cost: " << cost.back() << ")" << std::endl;
196  }
197  continue;
198  }
199  else if(cost_r>=0){
200  subset.push_back(x_r);
201  break;
202  }
203  else if(verbose)
204  std::cout << "could not remove any feature" << std::endl;
205  cost.pop_back();
206  }
207  }
208  return cost.back();
209 }
210 
211 //brute force search (search for all possible combinations and select best)
212 template<class T> double FeatureSelector::bruteForce(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int maxFeatures, short verbose){
213  int maxLevels=v[0][0].size();
214  if(maxFeatures<1)
215  maxFeatures=maxLevels;
216  int k=subset.size();
217  if(k>=maxFeatures)
218  return -1;
219 // gslmm::combination c(v1[0].size(),maxFeatures,false);
220  gsl_combination *c;
221  c=gsl_combination_calloc(v[0][0].size(),maxFeatures);
222 
223  std::list<int> tmpset;//temporary set of selected features (levels)
224  std::vector< Vector2d<T> > tmpv(v.size());
225  std::list<int> catchset;//restore set in case of catch all the way to last level (no better cost)
226  //initialize maxCost with actual cost for current subset (-1 if empty subset)
227  double maxCost=-1;
228  double cost;
229  if(subset.size()>=maxLevels)
230  return maxCost;
231  gsl_combination_next(c);
232  do{
233  for(int ifeature=0;ifeature<maxFeatures;++ifeature)
234  tmpset.push_back(c->data[ifeature]);
235  for(int iclass=0;iclass<v.size();++iclass)
236  v[iclass].selectCols(tmpset,tmpv[iclass]);
237  try{
238  cost=theCostFactory.getCost(tmpv);
239  }
240  catch(...){ //singular matrix encountered
241  catchset=tmpset;//this tmpset resulted in failure of getCost
242  if(verbose){
243  std::cout << "Could not get cost from set: " << std::endl;
244  gsl_combination_fprintf(stdout,c," %u");
245  printf("\n");
246  }
247  tmpset.clear();
248  continue;
249  }
250  if(maxCost<cost){ //set with better cost is found
251  maxCost=cost;
252  subset=tmpset;
253  }
254  tmpset.clear();
255  }while(gsl_combination_next(c)==GSL_SUCCESS);
256  gsl_combination_free(c);
257 // }while(c.next());
258  if(maxCost<0) //no level added to better maxCost than current subset (catchset)
259  subset=catchset;
260  //test: assert list contains no duplicate elements
261  for(std::list<int>::iterator lit=subset.begin();lit!=subset.end();++lit){
262  std::list<int>::iterator lit2=lit;//start searching from next element
263  assert(find(++lit2,subset.end(),*lit)==subset.end());
264  }
265  return maxCost;
266 }
267 
268 template<class T> double FeatureSelector::addFeature(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, short verbose){
269  //select feature with the best value (get maximal cost for 1 feature)
270  std::list<int> tmpset=subset;//temporary set of selected features (levels)
271  std::vector< Vector2d<T> > tmp(v.size());
272  std::list<int> catchset;//restore set in case of catch all the way to last level (no better cost)
273  //initialize maxCost with actual cost for current subset (-1 if empty subset)
274  double maxCost=-1;
275  double cost;
276  int maxLevels=v[0][0].size();
277  if(subset.size()>=maxLevels)
278  return maxCost;
279  for(int ilevel=0;ilevel<maxLevels;++ilevel){
280  if(find(tmpset.begin(),tmpset.end(),ilevel)!=tmpset.end())
281  continue;
282  tmpset.push_back(ilevel);
283  for(int iclass=0;iclass<v.size();++iclass){
284 // tmp[iclass].resize(v[iclass].size());
285  v[iclass].selectCols(tmpset,tmp[iclass]);
286  }
287  try{
288  cost=theCostFactory.getCost(tmp);
289  }
290  catch(...){
291  catchset=tmpset;//this tmpset resulted in singular matrix
292  if(verbose)
293  std::cout << "Could not add feature " << tmpset.back() << std::endl;
294  tmpset.pop_back();
295  continue;
296  }
297  if(maxCost<cost){ //level with better cost is found
298  maxCost=cost;
299  subset=tmpset;
300  }
301  tmpset.pop_back();
302  }
303  if(maxCost<0) //no level added to better maxCost than current subset (catchset)
304  subset=catchset;
305  //test: assert list contains no duplicate elements
306  for(std::list<int>::iterator lit=subset.begin();lit!=subset.end();++lit){
307  std::list<int>::iterator lit2=lit;//start searching from next element
308  assert(find(++lit2,subset.end(),*lit)==subset.end());
309  }
310  return maxCost;
311 }
312 
313 template<class T> double FeatureSelector::removeFeature(std::vector< Vector2d<T> >& v, CostFactory& theCostFactory, std::list<int>& subset, int& r, short verbose){
314  //find the feature that has the least effect on the cost when it is removed from subset
315  std::list<int> tmpset=subset;//temporary set of selected features (levels)
316  std::vector< Vector2d<T> > tmp(v.size());
317  int nFeatures=subset.size();
318  std::list<int> catchset;//restore set in case of catch all the way to last level (no better cost)
319  //initialize maxCost with actual cost for current subset (-1 if empty subset)
320  double maxCost=-1;
321  int last;
322  double cost;
323  int maxLevels=v[0][0].size();
324  if(subset.size()>maxLevels||subset.empty()){
325  return maxCost;
326  }
327  std::list<int>::const_iterator it;
328  for(int i=0;i<nFeatures;++i){
329  last=tmpset.back();
330  tmpset.pop_back();
331  for(int iclass=0;iclass<v.size();++iclass){
332 // tmp[iclass].resize(v[iclass].size());
333  v[iclass].selectCols(tmpset,tmp[iclass]);
334  }
335  try{
336  cost=theCostFactory.getCost(tmp);
337  }
338  catch(...){
339  catchset=tmpset;//this tmpset resulted in singular matrix
340  if(verbose)
341  std::cout << "Could not remove feature " << last << std::endl;
342  tmpset.push_front(last);
343  continue;
344  }
345  if(maxCost<cost){ //level with better cost is found
346  maxCost=cost;
347  subset=tmpset;
348  r=last;
349  }
350  tmpset.push_front(last);
351  }
352  if(maxCost<0){//all levels removed were caught
353  subset=catchset;
354  }
355  //test: assert list contains no duplicate elements
356  for(std::list<int>::iterator lit=subset.begin();lit!=subset.end();++lit){
357  std::list<int>::iterator lit2=lit;//start searching from next element
358  assert(find(++lit2,subset.end(),*lit)==subset.end());
359  }
360  return maxCost;
361 }
362 
363 #endif /* _FEATURESELECTOR_H_ */
pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random-members.html0000644000113200011300000002276512647637662026354 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkextract_random.pkextract_random Member List

This is the complete list of members for qgis.pkextract_random.pkextract_random, including all inherited members.

BNDNODATA (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
BUFFER (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
cliName (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_random
defineCharacteristics (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_random
EXTRA (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
FORMAT (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
group (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_random
INPUT (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
name (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_random
OUTPUT (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
POLYGON (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
processAlgorithm (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_random
RANDOM (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
RULE (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
RULE_OPTIONS (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
SRCNODATA (defined in qgis.pkextract_random.pkextract_random)qgis.pkextract_random.pkextract_randomstatic
pktools-2.6.6/doc/html/inherit_graph_24.map0000644000113200011300000000027012647437044015475 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract-members.html0000644000113200011300000002304012647637662025215 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkextract.pkextract Member List

This is the complete list of members for qgis.pktools.pkextract.pkextract, including all inherited members.

BNDNODATA (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
BUFFER (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
cliName (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextract
defineCharacteristics (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextract
EXTRA (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
FORMAT (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
group (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextract
INPUT (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
ITERATE (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
name (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextract
OUTPUT (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
POLYGON (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
processAlgorithm (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextract
RULE (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
RULE_OPTIONS (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
SAMPLE (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
SRCNODATA (defined in qgis.pktools.pkextract.pkextract)qgis.pktools.pkextract.pkextractstatic
pktools-2.6.6/doc/html/md_apps.html0000644000113200011300000001425212647637662014174 00000000000000 pktools: apps
pktools  2.6.6
Processing Kernel for geospatial data
apps

Available tools

  • pkann classify raster image using Artificial Neural Network
  • pkascii2img program to create raster image based on ascii file
  • pkascii2ogr program to create vector points or polygons from text file
  • pkcomposite program to mosaic and composite geo-referenced images
  • pkcreatect program to create and import colour table to GTiff image
  • pkcrop perform raster data operations on image such as crop, extract and stack bands
  • pkdiff program to compare two raster image files
  • pkdsm2shadow program to calculate sun shadow based on digital surface model and sun angles
  • pkdumpimg program to dump image content to ascii or std out
  • pkdumpogr dump ogr file to text file or standard output
  • pkegcs Utility for raster files in European Grid Coordinate System
  • pkextract extract pixel values from raster image from a (vector or raster) sample
  • pkfillnodata program to fill holes in raster image
  • pkfilterascii program to filter data in an ASCII file
  • pkfilter program to filter raster images
  • pkfilterdem Filter digital elevation model raster datasets
  • pkfsann feature selection for artificial neural network classifier pkann
  • pkfssvm feature selection for support vector machine classifier pksvm
  • pkgetmask program to create mask image based on values in input raster image
  • pkinfo Report basic information from raster datasets (similar to gdalinfo)
  • pkkalman produce kalman filtered raster time series
  • pklas2img Rasterize LAS/LAZ point clouds with filtering/compositing options
  • pkoptsvm program to optimize parameters for support vector machine classifier pksvm
  • pkpolygonize program to make vector file from raster image
  • pkreclass program to replace pixel values in raster image
  • pkregann regression with artificial neural network (multi-layer perceptron)
  • pksetmask program to apply mask image (set invalid values) to raster image
  • pksieve program to sieve filter raster image
  • pkstatascii program to calculate basic statistics from text file
  • pkstat program to calculate basic statistics from raster dataset
  • pkstatogr program to calculate basic statistics from vector file
  • pkstatprofile program to calculate statistics in temporal or spectral profile
  • pksvm classify raster image using Support Vector Machine
pktools-2.6.6/doc/html/dir_89a0bd85ecec8fbb2c320310670be290_dep.png0000644000113200011300000000360412616110567020463 00000000000000‰PNG  IHDR‹ß1ðbKGDÿÿÿ ½§“9IDATxœíÝLÓwÇñWKG+÷‡^w§©ÞpY' &01äÆ÷‡ž#p‚5xruKPÉtA9ðŠrQNÈgeîþ¸Ì¥þˆ[ñ˂ۻ©A N‘±ÖÒ1³ÜŠ´bkÊýq[//ð>Z¿máõø³Ÿï÷óý¤y&ý¾?Tcccc šØiu¸W@у±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰i‚ÙùÌ™38räH¨ÖB‘N§ƒÅbA||ü¤ç*–S§NáÆn¤¦¦3 )àüùPXX¾X 55 o¾y4Øiè1kiÑ=ÏYHŒ±c!1ÆBbŒ…Ä ‰1›–±´µµ"++‰‰,_ž‚s笧Ó£QÏ>û22’qùòßQ_¿ÉXºtJK‹1<|7Ì«Ÿi‹ÇãÁ¶mE(,ÜŒO?½†­[KQVVÇئ±Ñ‚ÚÚø|ùhmµáw¬8yÒ‡£‡×…qõá5íbñù¼ðûýp»ÝÐjµÈÏ_‡®.t:]`›²23ÒÓ‰ææ³xýõ ,\˜„„„DÔÔXšº,Œ«¯iËÌ™³pò¤ ]]xþùÅ((ÈFGÇE¨Õÿù*ŒÆ€ž~ÚøüÙg°re¶âkŽÓ.–ÑÑQøý~:t W¯Úa2­Ç+¯àΡÀ6Í€Ù³ øúëþÀçÝÝ×a±ðghÚP©Tذa5Z[›12r^¯3fÄ=²mnîZÔÕU£··½½=0›wá›o\aXudú¿ÎÑF«ÕâÀÔÔ˜qûöâãçãàÁ&hµÚG¶-.ÞŽû÷Ýxùå É1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1Sôܪªß᫯n*yÈ)­  /¾økÅŽ§h,'N¼¥KÓ1oÞSJvJê踈––sS7زe^ziÒ Ó÷ŠŠLðù¼Š“ç,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰El,v{ôzUÔÎ?El,y ‰EM,~x™™)˜;7‹P_¿?0ÖÚÚŒŒŒ%0tHIyVë_>Äþýo 99 üÅÅ¿ÅÝ»wB6ÿDc>Ÿ••;±pá$$ÌFeåNø|¾ ÷‹TQËÈÈ=l؇%KRÑÙù%öî­Åž=åøî»Âãq£¨h 6oÞŠk×n¡´ô÷()ÙÇ·Þª‡ÍvVë_a³}Œ¾¾^ÔÕý!dó7 ‚ÓéÀ… Wðþûmho¿€}û*'Ü/REE,±±Z´·_CMÍAÌ™cÜ0<|^﯄V«ÃºuEp8† ÓÍÀ‰¨¨Ø‹¤¤d$&þËQ,[ö‹Í?Þ¼ûîQ8póæ=…¤¤d˜Í5hkkp¿H%±Ä¢¯¯ùù«ð Ïá½÷ŽÆfÍú1l¶ÑÑq ‹ÿ ÙÙ™¸x±jµ.—3ð:HHHDvvnÈæo úûoaÑ"ôzôzrsWÀétL¸_¤ŠìÕ}otô>6n4¡¤d'>ùä*jkÿטßïDZc§a·býúM((ÈÁÐÐ †¹èï¿Øöúõ®ÿù34ÙùÇ€'Ÿü ®\ùƒƒcƒÃ1„>º4á~‘**byðà¼^/bcc1:zûö½àßç*• «W¯DsóYÜ»7 ŸÏ æ ÄÅÅaíÚBTWïFOÏ ôôÜÀ®]Ûàr9C6ÿxc“³{ö”Ãårâ‹/>G~þ*46Z&Ü/REÅ+dfΜ…êê:¼úêo÷#ìØQ޼¼¬Y³ 7o~‹††ã0›Ë00àÂüùÏ ©É ­V‡íÛËáv»‘—÷+xì”ÓÝ}iiéŠSÑX6mÚ‚Û·”<䔕––ެ¬Go˜{œ¥¢¢ZÉÃQˆñœ…Ä ‰1c,$ÆXHŒ±c!1ÆBbAýQ.&&-- ¥EªõÐc¤Ñ÷7Ø žÏb·ÛÑÙÙÔH111ÈÊÊ‚N7é*šVø0’c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1 €Óá^E…KÿÔq+kj:µIEND®B`‚pktools-2.6.6/doc/html/classImgUpdaterGdal__inherit__graph.md50000644000113200011300000000004012647437043021327 00000000000000e80808390a870cde7c6e4ea4da955ab3pktools-2.6.6/doc/html/pktools_2ProcessingPktoolsPlugin_8py_source.html0000644000113200011300000002672712647637661023446 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/ProcessingPktoolsPlugin.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
ProcessingPktoolsPlugin.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  ProcessingPktoolsPlugin.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os, sys
27 import inspect
28 
29 from qgis.core import *
30 
31 from processing.core.Processing import Processing
32 from pktools.pktoolsAlgorithmProvider import pktoolsAlgorithmProvider
33 
34 cmd_folder = os.path.split(inspect.getfile(inspect.currentframe()))[0]
35 
36 if cmd_folder not in sys.path:
37  sys.path.insert(0, cmd_folder)
38 
39 
41  def __init__(self):
42  self.provider = pktoolsAlgorithmProvider()
43 
44  def initGui(self):
45  Processing.addProvider(self.provider)
46 
47  def unload(self):
48  Processing.removeProvider(self.provider)
pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite__coll__graph.md50000644000113200011300000000004012616110566024556 00000000000000425d972d11444a735f88cea7a9295e8apktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop-members.html0000644000113200011300000002213612647637662024004 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkcrop.pkcrop Member List
pktools-2.6.6/doc/html/inherit_graph_4.png0000644000113200011300000000440712616110570015414 00000000000000‰PNG  IHDRÀ3ÁÚ°bKGDÿÿÿ ½§“¼IDATxœíœkH“ïÇ¿k9sh¿™¢nº0ÔZ”e„$ø"}QyZf‚A" 4|‘t€Ä¤ ²°ƒJ"–MSñð&²Ä é¦kiä!%³“n5WêL¯ÿ‹þ>¿æ¶4§æo»?°÷}ÝÏý\÷s=_wÝÏsM eÑßv€Áø›00l&†M³xr‡^¯Ç­[·0<<ü7üa0æ„%K– 66ÀÐ@“(//'ìÃ>V÷)//Ÿ|»“Ñ7À?ìáÚàñxܽý+lÀ°i˜6 æa`Ø4 RD„={öÀÑÑÑ¢y:::ÀãñfÉ«¹e¶}íëëÃîÝ»áíí GGG¢²²Òây­-6 R}}}¸qãZ[[-šG$!--m–¼²Œ®®.¸ººšµÏ¦¯ذa„B! ž>}ŠØØXÈårܹsÇ¢¹­.6“Ÿ‹* 2Ñ=¯´··ÿuf›ù\Ó(&&ƨ?55•BCC-šû¿¤P(Œû'wü©FGGéøñã$•JÉÕÕ•âããI£ÑpvFC äââBžžž”’’BCCCœSÅÅÅ$“ÉÈÙÙ™²²²ˆˆÈÅÅ…»»;_ôÉíêêjò÷÷'{{{Z±b™7_&l$“ÉÈÕÕ•233©¨¨ˆ¼½½iéÒ¥”žžÎ­©©¡€€rpp ÊÌÌüíšêêêH*•Òõë×9_«ªªH"‘Z­&"¢›7o’ŸŸétºi]jll4ŠÕàà õôôXUl¦Ëœ àìÙ³´fÍR*•ôâÅ Ú´i¥¦¦rö¸¸8Úºu+uvv’R©¤µk×ÒÉ“'9§"##I£ÑP^^ )/ê¯mNGööötåÊzÿþ=ÐâÅ‹I§Ó7_&lr¹œ´Z-åç犎Ž&­VKW¯^%ÔßßOZ­–%&&Roo/úôé“Ù5DDDÐýû÷©¹¹ÙÀ¾wï^JHH >»»;=yò„³}ùò…òòòL¶5 àÄó;¬!6ÓeΰjÕ*ª¨¨àÚ­­­\[¯×ŸÏ'•JÅÙ+**È××—sª¾¾ž €ÚÛÛÿè"«Õj²³³£sçΑF£¡ññq¤±±1ƒq3õeÂÖÔÔd`›Ünoo§‘‘jkk#NGcccÔÐÐ0åš”J¥É5j4òòò¢uëÖq7ÂtP«ÕÀà[ØÖ›ébNo‚{zzàççǵW¯^;w>~üˆ±±1øøøpv___ôöörm‰D°³³›ö9é—2 gggÔ××ãñãÇðòòBHH>|ˆE‹ —f©/NNN¶Émxýú5ÂÃñqãFN¹™Lf²_$aÿþýxùò%’““§œgggg¸»»›Ü¤>{ö øþý»UÅÆ,€D"Aww7×nnnFFFÀÝÝ|>]]]œ½³³žžžÿ:°hú.LÔr¼{÷ŽëÂøø8ÊÊÊ V«±oß>lÛ¶ jµÚàØÙöÅCCCˆŽŽÆÑ£GÑÔÔ„ÜÜÜ)1зoßâÒ¥K EJJÊù±}ûvdggÕscttB¡Ðæbc‹gDZcÇ R© R©pðàAôôôøܘ˜>|oÞ¼J¥Bzz:âââþè"‘PTT­V‹œœÎÆãñ†òòrhµZèõzØÙÙA(Ì1[¾üŽ‘‘èõz áĉ€ÁÁAnŒN§›ržññq$&&âСC())A]]jjj8ûׯ_‘ŸŸo¶‘‘††ÄÇÇ£±±J¥§NBNN÷ÇÉÖbc–É9џ‡)55•$ ýóÏ?$—Ë òOµZMñññäââBb±˜Ž9b°»ÿ5—ƒ™<“ˆèôéÓ$‰ÈÇLJªªª ì …‚|||H L&£ªª*"2ÎOgâËT¶ÉíóçÏÓ²eËH*•Rnn.Éårrss£ÑÑQ &GGG“¾ýÚ¾xñ"­_¿žôz=UVV’X,æ6¶SåáDDÝÝÝI‰„œœœ(((ˆª«« ÆXCl¦ Ììxÿ7r”––"&&†•C3¬ …Bèèhƒþù&˜Á˜/˜6 æa`Ø4L3„ÇãÁÏÏÏ䈈ðxþŒ´´48;;ãòåËHJJâž 1f+‡fجšÁ0æa`Ø4L ›† €aÓ00l&†Mc¶îÚµkóéƒñW0€§§'ø|>’’’þ†? ÆœÀçó þÕâFo‚ [‚í6 æa`Ø4‹”M9ŠÁ°Rþ¯íÿä²ÇIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract__inherit__graph.png0000644000113200011300000000715512616110567024525 00000000000000‰PNG  IHDR­pãmgåbKGDÿÿÿ ½§“"IDATxœíiPSWÇŸ@„L¢ÃªP(!, íÐa,N¤P\*¨ÃÀZA‘:ØBÙZËÒi Žƒ0‹±B™° hÕÁXZ‘R ¼`]XB;‚Pİ$@’û~8}豈 o.”óûàœóäœçüïÍŸsî'¹4‚ ³âÑ¢ZfI€}€À>À °0tõ¦“ÉdJ¥R½i1ÓX¿~½±±±ªÙ‰äÉ“'ꕈ™†D"XÒ>@8::j"-ñûï¿«='¾>À``Øì b©ø ««‹F£-fª/¿ü’F£;vL]ž×F£uuuýßi‡¥âƒY‰DFFFšÈLdz´´,--UWÎ5kÖ$$$€&ekŽ%í¥RùäÉMdnoo¿{÷nAAAkkkGG‡Zr¡ÙEs²5>@ógMM½½½‰‰É‘#G&&&ÈW ‚ˆuvv~üøñ›o¾ fffè¥ááá}ûöYXXÄÆÆÊd²çIø|þk¯½Æ`0X,VQQçñxnnnžžž3§‚ rrr6nÜh``ðÎ;ï\¸pMø3ÇBÇRWWgiiyöìYÔlšl¸rå ›Í^»vmzz:ŠÐh´3gÎlذÁØØøØ±cEEEÖÖÖL&3))Im'zAjE, ‚¹Ûtvv€——WGGGcc#›ÍNMMEA¥RIš€lIv öððèîînkksrrJMM5HöÕÕÕÍÉÉéïï/(( Ó飣£A(•Jkkk.—KÄÑ£GU…‘——gnnþã?^½z•Íf£øóÆòññ¹víZkk+j6M6lß¾]"‘TVV:4 ’H$ùùùàïï/‘H¸\.Ù`nß¾}ûöí…½1óA™ÚÚÚPµ´´”Íf£`||<Ü¿_µ%*ONNjkk“Ç_UUÅf³g ’½†††V­Z•‘‘ñôéS¥R922¢P(‚hll¤Óéèt777@{{»êpNNNßÿ=)¸¤¤æ  Ù}¦®_¿N„B¡€ÎÎN …踦•Qƒ9Є(»>°µµE‡ÞÞ^Tþí·ß¶lÙ’––6³½X,V(666¨Êf³{{{g ’]Ö®]+-,,ÜÜÜ~þùg---àñxr¹ÜÈȈF£¹¸¸À´¥¡»»ÛÉɉ¬nܸñyÈC˜û`ׯ_ht}}}XµjÕ´2%PæôGè4ŸÏÏÉÉáñx`Z{SSSmmm‘H„ªÝÝÝæææ³É.R©T©T–—— ………íØ±chhH¡P”––fffŽü˜˜˜ÒÒRBež•••êgøwïÞ}žTž÷ýS×-±Qïôòâë‚»»{gggSS“­­mrr²ê\š’’bgg'•JQpddÅ9އ‡‡H$joowttLNNž5H¦’J¥ £¢¢bpp077—Á`H¥R@ ­­-‹I=·nÝ¡PHvÔDZ B&“1 õæT³tuui4šºvv,J%qêT³ŸŸ½¹¹>ÕZÀš5kÔ›PÍ>`2™nnnêÍ©Q»~°·go¡Z •¬ôëƒóç›Ñ¿rùŠþNæŠöÁ䤼ªªž=¯¯¿Oµ*YÑ>¸~ýÞøøhkkUU5S-‡JV´*+›µµµ@.W^ºÔ&•NR­ˆ2V®ÆÆ&._¾-—+PubB~õêj%QÈÊõª @K‹VYy‹B=Ô²r}PYyKuÛ \®îI$R %QÈ õÁÐÐX}}‡Bñ·{E‚ .^l£Jµ¬P\¸ðŸ™A‚ ÊËWèÒ°B}PQñÛÌ 8J%ÑØØ-?£Dµ¬D<|8ÜÜü§R9ËF,mm->–©â_ÏJôŸßú¼Íxr¹¢²r%~ DÁ>UÊŸ\·Î€¬ŽŽN0«èô¿þ$–þW4š÷©.GÖ¯ÎÉyÿ½÷œ©B%+q]ÀÌû€}€A``°0ì ö}€À>À °0ØöûƒÀ>À``Øì û€}€A``°0ì ö}€À>À °0ØöûƒÀ>À``ØìÌ_¨>Ôó—_~ÑÑÑ¡ZÑb£«k©¥õÕ*›¸¸8Õ·þo¿Ô××799™’’B•8ÌâP^^þǨFfù,üÎ=?ýôÓ´¾>À``Øì Bƒ>èëësww§ªû"³¼ÔÎDƒ>ÐÓÓ Ò\þ¹éïïß¹s'µs¬˜Aƒ>`2™Ô\þ¹Q*•‰„Ú ‹9Ö?̰`qþüù÷ßëÖ­‡niiqww'â‡~Ø·oß¶mÛbbbnÞ¼éîî®:U644„……yyyq8œ+W®LˉZÞ¸q#44ÔÏÏïäÉ“SSSª#ž>}:<<üÙ³g —ËsrrüüüüüürrräryCCÞ={FFF ®®.44T&“}øá‡°k×.2¿P( hoo¿yóæ¼½½wïÞ]RR …¢°°0 À××7==}ttT3,_µ/È‚}P[[{îܹðð𢢢½{÷¦§§ÀÅ‹‹ŠŠ>\RRœ­ÚE&“¥¦¦úúúòx¼ÐÐÐãÇËd²™™«««ÓÓÓÓÒÒ~ýõWtÀ@—Ë …™™™L&***úûû¹\î‰'„Baaaá[o½åââ’ýôéÓììì£G2ŒS§N@UU™¿¬¬,11ÑÜÜ<99ÙÖÖ¶¸¸8222//oxx¸¢¢¢¾¾>===++ëÁƒÅÅÅ03ÃòU;/ öAeeå¡C‡6oÞlhhèêêN7mÚÄd2]\\>øàÕ.SSSAH¥Rooo>Ÿ¯««;3sdd¤……ņ ÂÃï^½Š‚¹¹¹¥¥¥)))ýRþ¥K—>úè#‹ÑÔÔQQQB¡066vçγ*?xðà믿n``PPPpäÈCCC«­­Ý¿?‹Å²¶¶NHHpttœ÷<,/µó²àç/ô÷÷³Ùl²Êb±àáÇÖÖÖdð•W^Qí¢¯¯Ÿ••UQQQXXhggÇáp\]]gf¶°°@KKËÁÁAT¾ÿ¾³³sqqqbb"ŠýôS.—»gÏžòòò””´Ë!##cxx˜læééùÉ'Ÿ$&&¾ñÆÁÁÁªƒr8@—caaa/½ôÒ¢££mll"""ª««‡‡‡ƒ‚‚ôõõ£££333GFFÌÌÌ^}õUÕ9¡§§ùÕW_íÝ»×ÌÌÌÃÃ#>>>88xÓ¦MqqqQQQ¦¦¦è ¦eX^jÊßžËSVV ^¼___HHHZZš‰‰‰ Ö××ååå-(ɂƥå¥vV¾øâ ccã²²22¢žÏ‘D"Ñ×_ÝÙÙ911qçÎ3gÎlÛ¶M-™1‹ƒzž×(“É>ÿüóáááuëÖùøøìرãÅ»¯^½zAí©ey©}Aþ麀YŽhj]À,w°0Øö`Öû…ØØØÅ×YLD"‘§§§jäo>puu T(‹« ³Ø°X,Õ~Î7_`Øì ûð_ºN«(ÑHÛJIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_20.md50000644000113200011300000000004012616110567015366 00000000000000afdf8baeea1a9b1f09cb0eadd9de847fpktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img__coll__graph.map0000644000113200011300000000011312616110567023540 00000000000000 pktools-2.6.6/doc/html/open.png0000644000113200011300000000017312647637661013326 00000000000000‰PNG  IHDR à‘BIDATxíÝÁ €0 Ð׬ՙ\Àº€39—b!©9{|ðI>$#Àß´ý8/¨ÄØzƒ/Ï>2À[ÎgiU,/¬~¼Ï\ Ä9Ù¸IEND®B`‚pktools-2.6.6/doc/html/pktools_2pksvm_8py_source.html0000644000113200011300000007612112647637661017730 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pksvm.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksvm.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pksvm.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterVector
31 from processing.core.parameters import ParameterRaster
32 from processing.core.outputs import OutputRaster
33 from processing.core.parameters import ParameterSelection
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterBoolean
37 from processing.core.parameters import ParameterExtent
38 
39 class pksvm(pktoolsAlgorithm):
40 
41  INPUT = "INPUT"
42  TRAINING = "TRAINING"
43  ITERATE = "ITERATE"
44  LABEL = "LABEL"
45 # CV = "CV"
46  GAMMA = "GAMMA"
47  COST = "COST"
48  OUTPUT = "OUTPUT"
49  MASK = "MASK"
50  MSKNODATA = "MSKNODATA"
51 # NODATA = "NODATA"
52 
53 # SVM_TYPE_OPTIONS = ["C_SVC", "nu_SVC,one_class", "epsilon_SVR", "nu_SVR"]
54 # KERNEL_TYPE_OPTIONS = ["linear", "polynomial", "radial", "sigmoid"]
55  EXTRA = 'EXTRA'
56 
57  def cliName(self):
58  return "pksvm"
59 
60  def defineCharacteristics(self):
61  self.name = "Support vector machine"
62  self.group = "[pktools] supervised classification"
63  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
64  self.addParameter(ParameterVector(self.TRAINING, 'Training vector file.'))
65  self.addParameter(ParameterBoolean(self.ITERATE, "Iterate over all layers",True))
66  self.addParameter(ParameterString(self.LABEL, "Attribute name for class label in training vector file","label"))
67  self.addParameter(ParameterNumber(self.GAMMA, "Gamma in kernel function",0,100,1.0))
68  self.addParameter(ParameterNumber(self.COST, "The parameter C of C_SVC",0,100000,1000.0))
69  self.addParameter(ParameterRaster(self.MASK, "Mask raster dataset",optional=True))
70  self.addParameter(ParameterString(self.MSKNODATA, "Mask value(s) not to consider for classification (e.g., 0;255)","0"))
71  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
72  self.addParameter(ParameterString(self.EXTRA,
73  'Additional parameters', '-of GTiff', optional=True))
74 
75 # self.addParameter(ParameterSelection(self.KERNEL_TYPE,"Type of kernel function (linear,polynomial,radial,sigmoid)",self.KERNEL_TYPE_OPTIONS, 2))
76 # self.addParameter(ParameterSelection(self.SVM_TYPE,"Type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)",self.SVM_TYPE_OPTIONS, 0))
77 
78  def processAlgorithm(self, progress):
79  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
80  commands = [cliPath]
81 
82  input=self.getParameterValue(self.INPUT)
83  if input != "":
84  commands.append('-i')
85  commands.append('"' + input + '"')
86 
87  commands.append('-t')
88  training=self.getParameterValue(self.TRAINING)
89 
90  if(str(training).find('|')>0):
91  if self.getParameterValue(self.ITERATE):
92  trainingname=str(training)
93  commands.append(trainingname[:trainingname.find('|')])
94  else:
95  trainingname=str(training).replace("|layername"," -ln")
96  commands.append(trainingname)
97  else:
98  commands.append(training)
99 
100  commands.append('-label')
101  commands.append(str(self.getParameterValue(self.LABEL)))
102  # if self.getParameterValue(self.CV):
103  # commands.append("-cv 2")
104  commands.append('-g')
105  commands.append(str(self.getParameterValue(self.GAMMA)))
106  commands.append('-cc')
107  commands.append(str(self.getParameterValue(self.COST)))
108 
109  mask = str(self.getParameterValue(self.MASK))
110  if mask != "None":
111  commands.append('-m')
112  commands.append(mask)
113  msknodata=str(self.getParameterValue(self.MSKNODATA))
114  msknodataValues = msknodata.split(';')
115  for msknodataValue in msknodataValues:
116  commands.append('-msknodata')
117  commands.append(msknodataValue)
118 
119  extra = str(self.getParameterValue(self.EXTRA))
120  if len(extra) > 0:
121  commands.append(extra)
122 
123  output=self.getOutputValue(self.OUTPUT)
124  if output != "":
125  commands.append('-o')
126  commands.append('"' + output + '"')
127 
128  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classImgWriterGdal__inherit__graph.png0000644000113200011300000001537512647437044021320 00000000000000‰PNG  IHDR}»H1‘ŒbKGDÿÿÿ ½§“²IDATxœí{TgšÆŸnšºÃ­‰¨\ÑÈxŒQ'Cœq1Ž¢J4‰WÐ8ÊÆ3pÌLtôDv52êfQGâ^vPº'•0" H‹‚‚6 M_ßýƒíŠ-W›††®úSªêûÞzªŸú.uýxDDà`|K à|8ÓYg: áLg!‚îVTWWcýúõhooL=f"..¿ýío»\×­éùùùÈÉÉATTÔ€ ãòòò••õü¦ÈÊÊ2»(Ž%::ºÇõ\›ÎB8ÓYg: áLg!f5Ç㡼¼Üœ!™¸OOööö˜9s& ;-S(++Ãüùóáìì OOODFF¢¨¨¨Ç<åååàñxýNc æ¤óÍ7¨¯¯G}}=Š‹‹€Å‹£¿÷‹*++áææfrþ{÷îá•W^··7._¾ŒÜÜ\øøø`öìÙ¸sçN¿´ ½ž² ÜÝÝáéé ðôôÄÇ 466B"‘˜W¯×ãÑ£G&çOJJ¬Y³ššÊ”ÊÐÐPÈårìÚµ ÇŽ39ö@1 %ÇãáÈ‘#˜8q"ÜÝݱsçN¤§§cܸq‹Åزe €ˆ’’‚   ˆD"¼öÚkÈÉÉé±j³µµ…P(„X,f–åää 44ðòòÂÎ;™uçÎÔ)S`gg___¤§§^~ùe`(Ðh4HHH€‡‡$  Ñh˜êöÒ¥KðññÁõë×qéÒ%lܸ±“ÖäädlÚ´  Óé°{÷nŒ?NNN˜9s&¾ýöÛ>é¨233©‡Õ]€d2™Ñ|LL Éår:tè èèh’Ë唚šJèáÇ”––FÞÞÞtþüyjll¤‹/’¿¿?³}TXXH---ÔÒÒBµµµôÞ{ïÑŠ+˜mÉår …´råJª©©¡ŒŒ @ ¤P(hĈ”’’Bõõõtøða¤P(H&“uÚÏ]»vÑ¢E‹¨ººšŠ‹‹iêÔ©´yóf&í¼yóèòåËôèÑ#âóùtÿþ}&¯A£a""Ú³gI$:sæ ÕÕÕÑ_|A£F"=êîJ[_ˆŠŠ¢¨¨¨î}ên…¹L—J¥DD¤V«»œ—Éd4yòdúüóÏb?~ÜÈôg'GGGºsç“^¥RQii)) ÒéttõêU&~SSÙÚÚRrr2577“^¯§––Òét]þ°T__ÏÌ_¼x‘BBB˜´ÅÅÅDDT[[Ks»ÒJD4~üx:zô¨Ñ6Ž;FzÔ=P¦xGÎÉÉ @GuÜÕ<TTT`òäÉFù‚‚‚Œæe2¨ã Ekk+âââ°råJf½P(DYY"""†£G2ëœqåÊäççãÅ_Ä«¯¾Š¯¿þ|~×»_UU///æláW¿úî޽ˬ ÐÑ$ØÙÙA&“1ë ›šš˜e÷îÝCHHˆÑ6¦L™Ò«îbHôÞÇŒƒ’’£e¥¥¥Ý¦wppÀòåËQRRÂôÞ•J%¢££‘©TŠýû÷3é•J%ôz=Nž<‰¦¦&¬Zµ ,02æiÜÜÜŒ²ææfäçç3ë ,ŸÏÇœ9spðàÁN1233™ÿÇŽÛéΰ¿=é(†Dï}ýúõHLL„««+ÂÂÂPTT„mÛ¶õØ‘‰DhiiB¡€““T*Ôj5„B!”J%¶oßhiiÇÃܹs‘‘‘W_}jµ¶¶¶ppp`ŒW(ptt,\¸|ð’““ñäÉÄÆÆbÚ´iˆï¤#)) 3g΄H$ÂÒ¥K¡×둳gÏ2ÇÚµk‘±XŒéÓ§£°°[·n€ujE³Ó]½o®6½/ó:ŽöîÝK~~~$‹)""‚²³³ÉÝݽË|DD:ŽD"ݽ{—Y¶gÏrqq¡Ñ£GÓþýû)&&†$ ³?~~~$ )00²³³‰ˆH£ÑЬY³ÈÑÑ‘‰#—ËiÅŠäììL®®®K­­­Ý¶±R©”æÌ™C"‘ˆ)>>ž ‘V«¥Ý»w“¿¿?9’f̘AùùùL¬ît‹Žœ©œ;wŽ –:uŠBBBeûÖ†Å;r}¡¸¸Ë–-ƒT*E[[òóó±eˬ^½ÚÒÒ¬’!Ѧ'&&¢­­ ‘‘‘hll„¯¯/V®\‰¸¸8KK³J†„é;vìÀŽ;,-… ‰êcpáLg!œé,„3…ôÚ‘ëê#ÇЦ²²¾¾¾Ý®ïÖtoooØØØXéi/¼ðoP(n@«íúúûpç¿øE·ëxDì{?=?¿ ~Š+f#)i¡¥å :¬lÓÿç ˜¿Z­ÞÂjÖ™®VkqæÌw€'OÚpíÚV4ø°ÎôÿýßïÑÖ¦ØØðqæL… >¬3ýô騨tì¶V«Gnn1”Jµ…U .¬2½µU…üã6´Z³L¥ÒââÅ¡ù|ú@Á*ÓŸ5ø|NŸ¾e!E–U¦Ÿ>}«Ó#XZ­W®|¹\i!UƒkLojjŵkeÐé:Ÿ¢¾ü²Øª,kLÏÉéþ…B"ÂÉ“ì©âYcú©S7»}ÙQ¯'äçWàÁƒ'ƒ¬Ê2°ÂôººÇ((øz}÷Wœmlø8w®ç׋­V˜~î\!z»Ã Õêpú4;.Ô ‰gäš¶65¼¼DFË ììl!ütÜÀûÿCVÞe€Q£ÞGJÊ»xãÞ[¬¨Þ9ŒáLg!œé,„3…p¦³Ît™ÎB8ÓYg: áLg!œé,„3…p¦³Ît™ÎB8ÓYg: áLg!œé,„3…p¦³Ît™ÎB8ÓYg: áLg!œé,„3…p¦³Ît™ÎB8ÓYg:ém4¿ëׯ“P(ìr8ëá<áC|¾ƒÅu˜{JHHèu„Æ^¿9S[[ µZ?ýéO½%å°0'OžDUUU¯éúü¡¡ž†‡à\½zµOé¸6…p¦³Ît™ÎBÄôððpÔÖÖš5æ¾}û°nÝ:£eûÛߎºº:fYCCÂÃÃñÝwßuŠQ[[‹ððp³iª©©ÁæÍ›±`Á,\¸~ø!***zÌÓ æÖù,椇„„ ¼¼*•ŠYVPP‡[·~úl÷;w Ô)†££#bbbõõõøÍo~c²ž††¬_¿îîîØ³gvíÚlܸ?þø£Éqƒaczpp0´Z-ÊÊÊ*• ÅÅňˆˆèdúĉ1bĈN1Äb1bccz½r¹Üd=x饗°iÓ& 6lÀìÙ³qüøq“ãƒbzxx8rssñî»ï"22ÇÇ… ƒùóçãÈ‘#:>¶öìY,_¾óçÏǦM›——‡ððp8;;c̘1())ܾ}‰¿þõ¯!•J¡ÓuŒÍRRR‚àà`?U“R©‹/Æùóç™jó½÷Þ,\øÓŒZ­)))xóÍ7ñæ›o"%%Z­¶Sœýë_J¥X´hQ§áAÖ­[‡èèhÖ‰'ðöÛoãõ×_Çï~÷;”––2ióòò°fÍDDD`Ñ¢Eƒv° ZI/((À‹´´4äååáðáÃX·nÒÓÓ!—Ëñå—_"==ëׯÇñãDZtéR|öÙgLŒÆô[·naêÔ©˜0ax<~øáh4”••1¦ÈÊÊÂæÍ›À,Û¿?àÌ™3̲S§N¡¾¾©©©øóŸÿ ©TŠ¿üå/âŒ;uuu;v,³N©TB©TB(bÔ¨Q€Ó§O#33±±±HOOÇÛo¿””@[[¶nÝŠ€€ddd`ݺuHKKÃãÇÍô‹wÏ ™¾xñb888`îܹ€·Þz ˆˆˆ´´´àôéÓX»v-¦M›±XŒ°°0¬X±‚‰ŒÛ·oƒˆPPP€°°0ØØØ`êÔ©¸uëd2ôz=&Mšd´íØØX„††ÂÎήG¹¹¹ˆ‡D"¯¯/âââpãÆNqÔj5ˆÈ(Þ믿n4ÀÙ³g±víZÌž=®®®˜>}:Ó¼…B>|7n„««+$  µµÕÔŸ¸Ï Ú÷Þ:6(t9uuu7nœQ¾§KSpp0?~Œ~ø L›6 .\€½½=&L˜{{{£>>>}Òxÿþ},Z´ÈhÙÈ‘#;ÅqqqP(DMM S{\¹r@ÇÁûÆoáïïoÏ0ĵ@ @MM ’““¡T*j¡fH}äßÃÃwïÞ5ûûéž°‹‹ FôôtøùùA$êøpXXöíÛ{{ûNU;`|`õ„X,ÆÞ½{áíí P(hjúi¨mC‡©S§"''ï¿ÿ¾Q ƒùàéé‰ŠŠ øùù1Ë 7DT*¶mÛ†mÛ¶aÆŒÐh4ÈÍÍí“Îþ2¤zï‘‘‘HMMÅ­[· —ËñÝwßáèÑ£F¥|óÍ7 c–yyyÁËË 7nÜ@HÈó}´_©üi<¶Ù³g#-- <@ee%ñ÷¿ÿ½Ë|«W¯Æ… ššŠÊÊJ”——ãØ±cÈÉÉaŽ7ÞxÀ?ÿùO455áÆL§U£Ñ@«ÕB @­V3}‡¶¶¶çÒo CÎôèèhìÝ»o½õNœ8µk×B,3i ¦>m:üìg?ÇÃäÉ“û´-OOO¼ôÒKFÕùªU«ààà€5kÖàý÷߇ŸŸâââºÌïçç‡O>ùeeeذa>úè#´´´à“O>Á˜1c˜ýY²d 8€¥K—â¯ý+¶lÙ ãšÁºuë°cǼóÎ;ðôôÄœ9s˜˜Ø÷ÌDzÎ#++ ‹/6ª¶м¼K–,aîWôznÞô„^^}¿s¥Vóqó¦'&Mz„^PõžaáëëËÜËï‘^ߦü÷E^^ÿN±±GŸ+ßٳߑ—׿Ók¯}Lz½~€ÔY«lÓÛÚÔØ¿ÿ   ê¹ò×€ÏçáûïëqåÊ÷ ÎòX¥é‡_ƒB¡ÔÕ=ÆÃ‡Š>ç½y³z=Ïç!)éÈ G·:Ó >ýô´ZC„‡¢¢ê>åÕéô(.®aþ/-½‹KH©å°:Óùmmjf^(´AaaßL—É ½]ÃÌóùÀþçVWÚ­Êô––v|öÙ%ètzf™F£ës»^Tt66?ý$z=¡¬ì>.\°®ÒnU¦?[ʎǪ¥Ò¾•ôÂÂêN4óx<ìÜi]¥ÝjLï(å—J¹¹\‰êêG½ÆøöÛ»Oõ:0”öüã¶Ù´Z«1ýðákFíñÓðù¼^Ûõöv d²û]®ãñøØ¹óK«)íVaº\®Ä§Ÿ^îTJ ØØôÞ™+)©ë²–:ÞT‘Éîãüyë(íVaúáÃ_C¥Òv»^£ÑâæÍªcþÀ¦Ûõ<ÿñ9Ðë‡iö¦·¶ª’r¥×{%%µÝ–d £×Sõ­×**ðÕWÿ'?ìMü¸ ..ŽF§Z<¶¶6FË:ÚìÝÆ¹yó.sPò Æ1]\ÑÜ<ðÏ¥4Cê9SðövF^Þ¡×îß‚êêGøè£shmmGp°ÊËP]ýMM­xòDÙmœÖV5FŽ´Ã‹/¾?? 4¾úª±ðñqÅèÑ.1bØÿ\úðÜûpäÝwá…ð_ÿõ–É1.\¸åË£ªj7„Bë0ÛÀ°¯Þ»B©ÔÀÞÞ¶_1ììlÿ?–º—”Ã+5] {{a¿bò+•]Ÿûg¬Òô¶6sšÎ•ôaR©fªgS14\I&˜£MçJú0Ãm:בft˜ÎUïÝa•¦ëõÔãuô¾`Èo ×ÚŸÅ*M·±áC£éßsú†üO_е¬oØÚÚt{›µ¯òÛÚö¯ÆŠX¥éK:gú°ÀÖ–­¶ûÛ¨}ÁŸ+éÃÀ|Õ;WÒ‡ ¶¶æ«Þ¹’>Lè(éæ©Þ¹Þû0ë½÷ŒUš.Úôø d_0ä·¶(+5],¶GKK÷Fõ…'OÚ˜XÖ†Uš.Ùãñãþš®ŸÏƒ£cÏ߈ŽX­éryÿMwr²ŸÏë=ñ0Ã*M‹í!—·÷+†\®´Êª°RÓÝÜœÐØhúHLÐØØ77G3)ZX¥é‰ôÏôäpww2“¢¡…Ušîá!B{»†é›BCƒ"3ª:X¥éI‡Y÷ï›^Ú;J:gú°ÁӳìúzÓÆ8#"Ô×?†——¸÷Äë4ÝÙy$ÄbܽûФü -hkScìX73+X¥é0nœ[Ÿ>9ÒUU gú0cìX7Ƽ祪ê!ììl¹ê}¸1nœ*+MÊ[YÙˆ1c\;}iÊZ°ZÓ'MòFEEZ[ŸÿKηo×`Ò$ïP54°jÓõzBiiÝsç-)©EPШP540ºY\UU… .XJ‹Y!"ŒÁÇÑ£§ •ö½mnoס©Iªª"€ €€fÜxÆß{_²d‰a«˜x<¡‰ùÄãÙX\¿¹&@Ðý÷Þu:¢¢¢@DV1éõ*ói ×k-®ßSff&´Z㧈¬¶MçèÎt™ÎB8ÓYH¿Mçñx(/7ÿ©Mwqû³½òòòA¹ÊVVV†ùóçÃÙÙžžžˆŒŒDQQQ¿µ™K?WÒŸ¡²²nn¦ßh¹wï^yåx{{ãòåËÈÍÍ…fÏž;wî˜Q©éXß“üýD¯×ãÑ#ÓîÎ@RRfÍš…ÔÔT¦T†††B.—c×®]8v옹¤šŒÙK:ÇÑ#G0qâD¸»»cçÎHOOǸqã ‹±eËWÌRRR‘H„×^{ 999ÏU}ª»ììlL˜0‰7n„J¥‚N§ÃîÝ»1~üx899aæÌ™øöÛo™¼999 …ƒƒ¼¼¼°sçNÀË/¿ ðôôdÒj4$$$ÀÃÉ Ðh4Ìö/]º\¿~—.]ÂÆ;íGrr26mÚ&k3O_©‰ŠŠ¢¨¨(zL&3š‰‰!¹\N‡"Mr¹œRSS =|øÒÒÒÈÛۛΟ?OtñâEò÷÷'ƒ¤gãvµ=™LFhîܹTVVFùùùäïïOÛ¶m£={öD"¡3gÎP]]}ñÅ4jÔ(@r¹œ„B!­\¹’jjj(##ƒPCCóivíÚE‹-¢êêj*..¦©S§ÒæÍ›™´óæÍ£Ë—/Ó£GˆÏçÓýû÷™¼---F™U[odffvÊ3 ¦K¥R""R«Õ]ÎËd2š=‘YµõFW¦H›îäÔñè°­­m—óPQQÉ“'å 2š§g>Pýì¼€€æÿÀÀ@ÔÔÔ€Çã!$$Ä(Ý”)SB¡eeeX³f  BCC{ÜŸªª*xyy-‹º‰ £I°³³ƒL&cb4777ÃÅÅ@GgÏ\ÚLÁb½÷1cÆ ¤Äx”„ÒÒRæŸN§f¥¥¥=z´Ñr™LÆü_VV†Q£FaìØ±N“ ÛS*•ˆŽŽFBB¤R)öïßߣV777Èd2æzvss3òóó™õ†ƒ™ÏçcΜ98xð`§™™™ÌÿæÔf 뽯_¿‰‰‰puuEXXŠŠŠ°mÛ6¦´|ùrlذûöíäI“PYY‰„„¼óÎ;1b„Q¬øøx}: ±uëV€J¥‚Z­†P(„R©ÄöíÛ---L­¤P(àèØñ†ËÂ… ñÁ 99Ož pktools: pkcomposite
pktools  2.6.6
Processing Kernel for geospatial data
pkcomposite

program to mosaic and composite geo-referenced images

SYNOPSIS

Usage: pkcomposite -i input [-i input]* -o output

Options: [-b band]* [-dx xres] [-dy yres] [-e vector] [-ulx ULX -uly ULY -lrx LRX -lry LRY] [-cr rule] [-cb band] [-srcnodata value] [-bndnodata band] [-min value] [-max value] [-dstnodata value] [-r resampling_method] [-ot {Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 / Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}] [-of format] [-co NAME=VALUE]* [-a_srs epsg:number]

Advanced options: [-file] [-w weight]* [-c class]* [-ct colortable] [-d description] [-align]

Description

The utility pkcomposite can be used to mosaic and composite multiple (georeferenced) raster datasets. A mosaic can merge images with different geographical extents into a single larger image. Compositing resolves the overlapping pixels according to some rule (e.g, the median of all overlapping pixels). This utility is complementary to GDAL, which currently does not support a composite step. Input datasets can have different bounding boxes and spatial resolutionsresolution.

composite rule composite output
overwrite Overwrite overlapping pixels: the latter input image on the command line overrules the previous image
maxndvi Create a maximum NDVI (normalized difference vegetation index) composite from multi-band input images. Use option -cb to set the indexes of the red and near infrared bands respectively (e.g., -cb 0 -cb 1)
maxband Select the pixel with a maximum value in the band specified by option -cb
minband Select the pixel with a minimum value in the band specified by option -cb
mean Calculate the mean (average) of overlapping pixels
stdev Calculate the standard deviation of overlapping pixels
median Calculate the median of overlapping pixels
mode Select the mode of overlapping pixels (maximum voting): use for Byte images only
sum Calculate the arithmetic sum of overlapping pixels
maxallbands For each individual band, assign the maximum value found in all overlapping pixels. Unlike maxband, output band values cannot be attributed to a single (date) pixel in the input time series
minallbands For each individual band, assign the minimum value found in all overlapping pixels. Unlike minband, output band values cannot be attributed to a single (date) pixel in the input time series

Example: Calculate the maximum NDVI composite of two multispectral input images (e.g., red is band 0 and near infrared is band 1)

pkcomposite -i input1.tif -i input2.tif -o output.tif -cr maxndvi -cb 0 -cb 1

Example: Calculate the minimum nadir composite of two input images, where the forth band (b=3) contains the view zenith angle

pkcomposite -i input1.tif -i input2.tif -o minzenith.tif -cr minband -cb 3

Example: Calculate the minimum of two input images in all bands

pkcomposite -i input1.tif -i input2.tif -o minimum.tif -cr minallbands

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
shortlongtypedefaultdescription
i input std::string Input image file(s). If input contains multiple images, a multi-band output is created
o output std::string Output image file
b band int band index(es) to crop (leave empty if all bands must be retained)
dx dx double Output resolution in x (in meter) (empty: keep original resolution)
dy dy double Output resolution in y (in meter) (empty: keep original resolution)
e extent std::string get boundary from extent from polygons in vector file
cut crop_to_cutline bool false Crop the extent of the target dataset to the extent of the cutline
m mask std::string Use the first band of the specified file as a validity mask (0 is nodata)
msknodata msknodata float 0 Mask value not to consider for composite
mskband mskband short 0 Mask band to read (0 indexed). Provide band for each mask.
ulx ulx double 0 Upper left x value bounding box
uly uly double 0 Upper left y value bounding box
lrx lrx double 0 Lower right x value bounding box
lry lry double 0 Lower right y value bounding box
cr crule std::string overwrite Composite rule (overwrite, maxndvi, maxband, minband, mean, mode (only for byte images), median, sum, maxallbands, minallbands, stdev
cb cband int 0 band index used for the composite rule (e.g., for ndvi, use –cband=0 –cband=1 with 0 and 1 indices for red and nir band respectively
srcnodata srcnodata double invalid value(s) for input raster dataset
bndnodata bndnodata int 0 Band(s) in input image to check if pixel is valid (used for srcnodata, min and max options)
min min double flag values smaller or equal to this value as invalid.
max max double flag values larger or equal to this value as invalid.
dstnodata dstnodata double 0 nodata value to put in output raster dataset if not valid or out of bounds.
r resampling-method std::string near Resampling method (near: nearest neighbor, bilinear: bi-linear interpolation).
ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
of oformat std::string GTiff Output image format (see also gdal_translate).
co co std::string Creation option for output file. Multiple options can be specified.
a_srs a_srs std::string Override the spatial reference for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid
file file short 0 write number of observations (1) or sequence nr of selected file (2) for each pixels as additional layer in composite
w weight short 1 Weights (type: short) for the composite, use one weight for each input file in same order as input files are provided). Use value 1 for equal weights.
c class short 0 classes for multi-band output image: each band represents the number of observations for one specific class. Use value 0 for no multi-band output image.
ct ct std::string color table file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
align align bool Align output bounding box to first input image
d description std::string Set image description

Examples

Some examples how to use pkcomposite can be found here

FAQ

Frequently asked questions on pkcomposite can be found here

pktools-2.6.6/doc/html/files.html0000644000113200011300000022464612647637663013666 00000000000000 pktools: File List
pktools  2.6.6
Processing Kernel for geospatial data
File List
Here is a list of all documented files with brief descriptions:
[detail level 1234]
o-qgis
|o+pktools
|o*__init__.py
|o*pkcomposite.py
|o*pkcrop.py
|o*pkdiff_accuracy.py
|o*pkextract.py
|o*pkextract_grid.py
|o*pkextract_random.py
|o*pkfilter_spatial.py
|o*pkfilter_spectral.py
|o*pkfilterdem.py
|o*pkgetmask.py
|o*pklas2img.py
|o*pkreclass.py
|o*pksetmask.py
|o*pksvm.py
|o*pktoolsAlgorithm.py
|o*pktoolsAlgorithmProvider.py
|o*pktoolsUtils.py
|\*ProcessingPktoolsPlugin.py
o-qt
|o+build-pkcomposite_gui-gcc-Debug
|o+build-pkcomposite_gui-gcc-Release
|o+build-pkcrop_gui-gcc-Debug
|o+build-pkcrop_gui-gcc-Release
|o+build-pkdiff_gui-gcc-Debug
|o+build-pkdiff_gui-gcc-Release
|o+build-pkextract_gui-gcc-Debug
|o+build-pkextract_gui-gcc-Release
|o+build-pksvm_gui-gcc-Debug
|o+build-pksvm_gui-gcc-Release
|o+pkcomposite_gui
|o+pkcrop_gui
|o+pkdiff_gui
|o+pkextract_gui
|\+pksvm_gui
o-src
|o+algorithms
|o+apps
|o+base
|o+fileclasses
|o+imageclasses
|\+lasclasses
\*config.h
pktools-2.6.6/doc/html/inherit_graph_37.md50000644000113200011300000000004012647437044015404 00000000000000e7cc1a9ac7cc7303dcdad4850aa27124pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__inherit__graph.png0000644000113200011300000001072512616110567027414 00000000000000‰PNG  IHDRË€¥dœbKGDÿÿÿ ½§“ŠIDATxœíÝyPgðo(E)‡\Ò hìxcµ"È«RGZ¯Zµ2ˆZµÅ‚öPqê­•±ˆ¨c¥RÁÑÚz†Ä׫¶‚V­R¨`ƒ ÉïýÃ7û¸¼‰Èï3³3Ý}²ûü²›/ûlx,""0ƞ爉¡+`¬£à°0&‡…1‘8,Œ‰djèô%77?6t¬'''ØÙÙº ½è4a)..†¥¥%ºvíjèRØ) ”••qXÚ#ØÛÛº ö_üñ‡¡KÐ+~faL$ c"qX‰Ã˜HF–[·n! ÖÖÖppp@`` ²³³õÚÇ×_ ‰D‚ 6hlÏË˃D"Ñk_Ï;¦D"A^^ž^û4&F–¢¢"¼õÖ[pvv†L&Ù3gàêꊑ#Gâúõëz郈pøða¸ºº"))I/ÇlIÏž=±lÙ2@AAlmm_xŸÆ¤S}uÜk׮ň#'ü4®^½Š7n %%cÇŽÅ­[·Ð¯_?Û[[[á¦R©ðÏ?ÿ¼°¾Œ‘ÑÞYÒÒÒ°xñb­aË–-[!¬×ÕÕ!22½zõ‚½½="##QWW¨ªªÂìÙ³akk |öÙg¨­­ö=|ø0ÞyçøùùÁÓÓ³Ù» a÷îÝðòò‚¥¥%ÆŒƒ“'O µ5×zØ•––WWW8p@Øç7Þ888hô•’’X[[cýúõÂv‰D‚ýû÷£ÿþ°³³Ã† €>}úÀÊÊ +V¬øOuçA„\.§{÷î‰zmmm-™˜˜Ðßÿ-l«®®ÖXÔ6nÜH“'O¦;wîPNN 2„–/_NDD!!!äëëKùùù”““C  èèh""R©TÔ§OŠ‹‹#"¢/¿ü’¼½½…ãæææ’úôÇÇÇ“³³3={–ÊËË)55•<<<„öæúQcüøñ$“ÉèÊ•+Â> ¯€Þ}÷]R(tôèQ@÷ïßÚ‚‚‚H¡PÐÞ½{ M›6 ÅÅÅi¼V¬k׮ѵk×ZµO;–l”a)..&¡ ±¨yzzRii©°žššJƒ ¢§OŸ’T*Õø0;vŒ<<<ˆˆèÒ¥Kdjj*|À222]½z•ˆ4?Ì  C‡iÔ˜˜˜HZìG}Œœœ­c6–sçΑR©$”››+´effÑÓ§O›\W¿V¬Î£|fqpp€¹¹9rss1xð`φBPYY‰—_~Yxmaa!5ö·²²Â½{÷ T*áîî.l÷ððÀÝ»w<‚Õ××k=d'%%aÀ€Ûòóóµ¶yyyÀsûOOOÑïÝÉÉ `b¢=ïÑ£ÀÌ̬Éucg”Ï,&&&ðõõÅž={´Ú?WØÚÚ"77D"Bee%.]º„^½zA*•¢  @xm~~>œ¡T*‘””„­[·¢ººZX"""””$Sí•W^ÑšGuãÆ h±µÖ|˜õýuµQ1ìMZ3 #"ºrå uëÖ¢¢¢(;;›²²²(::š† BfffÂë/^LS¦L¡ÂÂBÊÎΦáÇÓÇLDDÁÁÁäëëKtõêUòöö¦•+W’\.'©TªUOzzº0¼i8LÚ¾};¹¸¸Ð/¿üB÷ïß§´´4zíµ×H"‘´ØOã¡VSðÆC͆C)4†5×ÖÔºmf´a!"ÊÌÌ$___²´´$OOOZ²d =|ø(¼F¡PМ9sÈÚÚšlll(,,Œ=zDDD4sæL²±±!GGGúôÓO©¦¦†æÍ›GþþþZý©T*rww§eË–i|°•J%ÅÄÄ»»;YYYѸqãè§Ÿ~";;»ûi),uuu4bÄêÞ½»ÐÎaÑI²„¨süß]Î;//¯9EÿäÉ“èÝ»7(l;zô(Ö¬Yƒ¬¬,V¦õÐÒÛÛÛÀ•èÿß]Úƒœœ̘1™™™xüø1.]º„+V 44ÔÐ¥±ŒòÛ°ö&** ?F`` ÊËËáææ†>úóæÍ3ti¬†±†‡aŒ) c"qX‰Ã˜HêÛ°ªª*Ô×׺ ÊÊ¢W¯†.Egµµµ0777tzÓiÂÒµkW”””º ýûßw°6vîüºwïbèrtÖ³gOC— 7&,o¾ù¦¡KЋ˜˜m¨«Sáþýnx÷Ý· ]k€ŸYÚ‘{÷ =ý/H$À±cé†.‡5ÂaiGŽË„‰‰D@FÆ_(*ª0tI¬K;räÈïP*U©Ô?ÿÜq'QvF–v"?¿ 7o– ëõõ*$'ÿnÀŠXc–vâøñL˜™5¼„ÜÜ{øóÏ¿ VÓÄai'þ uu*m¦¦RüôÅÚ K;]„ââJ­íõõJ$'ÿ¦õoö™apXÚãÇ3aj*m²­¤¤ YYwÚ¸"Ö‹)•*9’Žúze“í¦¦R?žÙÆU±¦pX ìòåTTƯ¿òŸŠ04‹>¥RSS)LM¥J¥JM„uuΞ½fàJY§™HÙQmÚ4 ••…õìì":t›6MÓxÝ A®m]k„Ãb`5Ö--_¡C1cFç˜EÝ™ð0Œ1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘´þò—L&C^ÿ±OC¹vMسg+1nþþþxõÕW57R#¦¦¦€-‰I¥V¯ÃØ—   ÆÑHÖº³Ô××cÕªU=ztã&ÆŒÂêÕ«Q__¯µŸY‰Ã˜HÆDâ°0&’AÂR\\ ŸvL}ôqðàAøøø 11Qçc=ÏóŽéããƒââb½ö©K=¥5ƒ„¥{÷î j³þJKK1iÒ¤6ëOˆ “É`oo¹\þÂûkx^ õžÅjïõ5Å a±²²BXXX›õ§R© P(Ú¬?µÛ·oãÎ;ˆŠŠB^^îÞ½ûBûkx^ õžÅjïõ5E§°~üñGÌš5 &LÀÂ… ‘••~þùgÌž=ˆˆˆÀÅ‹…¡@Ã[篿þйsçÂßßÁÁÁHIIi²?õ~.\ÀÌ™3ñÞ{ïaûöí¨««Óª+66¡¡¡xðà,Xxÿý÷…×<|ø6lÀ¤I“0uêTÄÆÆâéÓ§ÏmkèyuËd2 8C‡…««+d2Y³ç±¹sÕR=êó‘™™‰éÓ§ãìÙ³Â>M½gHOOGHH&NœˆC‡ Û}||pæÌÌš5 HLLDJJ ‚‚‚€ýû÷wŠk¢ ­_J¶Æ©S§pðàADDDÀËË yyyX¿~=àôéÓHHH@TTúõ뇼¼<ÄÄÄh£¶¶ÑÑÑX´hÞ~ûm\¾|›6m¨Q£`nnÞd¿ÇÇúõëQ]]µk×ÂÒÒ~~~ž]”¸¸8dffbëÖ­°´´Ä®]»0cÆ ;vL8ƶmÛPQQÝ»w£¦¦kÖ¬……fÍšÕl›º1u«‡`ÁÁÁ€Q£FA.—ãÃ?Ôz?Ï;WÏ«'99Ë—/‡¥¥¥°OSï._¾Œøøxddd`åÊ•˜8q¢°_FFbccqîÜ9lÞ¼£Gƾ}û “ÉðÍ7ß`Ê”)}t´k¢+î,GExx8FŽ  >¡¡¡mÆ ƒ••†Š9sæh£®®D„šštéÒãÆÃ‰'еk×fû?>\\\†"55UhÛ³g’’’°jÕªf/l}}=d2-ZGGG¸¹¹aΜ9HMMm±­5uß¼yeee5j€ga),,ÄíÛ·›=M+1õ„……aðàÁ¢>Ó§O‡……FŒ¨®®Öjó÷÷ÃÂÂãÆÓzmcášèJ§°”––ÂÃÃCc››› ¤¤}úôÑhÓš˜ Gˆ‰‰Áõë×1uêT|òÉ'ÈÉÉD"i¶_á¿]]]Q^^.¬ÿùçŸ4h¾ÿþûf÷¯¬¬„J¥‚“““°ÍÙÙååå-¶µ¦n™L¥R‰I“&ÁÇÇGx–hêA¿¥s%¦WW×fßkc666Ðäùµ°°˜šš6¹Þ’ŽpMt¥SXlmm‘ŸŸ¯±­°°ЫW/­Ÿ¢ýõ—Ö1ž-,S§N…\.i«¥s%¦1f5}}pkï×Dt Ëøñã‹ . ¢¢¿ýö›0µ<00qqqHOO‡B¡@VV8 u±$ "##qþüyH¨Ñ˜@"‘è4E¿¸¸3fÌÀºuë`oowww¡íüùóHHH@||¼NÇn‹_𵥋/êý\µ•ÎxMV¯^ ;;;$''7Ü|ä…ýR²  k×®Enn.ž c¬£kóac ‡¥•Œyʽ±ã°´O¹7n–Và)÷ÆÃÒ Æ0åž5Ã"’zæëë àSžr¿páB$&&"$$;wîÚ·mÛ†òòrìÞ½7nÄï¿ÿŽ~øAhWO¹ïÛ·¯°m×®]Ðì”û¨¨(ìÝ»Wãr†øøx\¼xûöíÃüùó‘ÀwªVâ°ˆdlSî™¶öKÉΦá”û†är¹ÖôúÎ0åžiã;‹Æ8åžiã°ˆÐÙ§Ü3q8,"ˆ™rßP`` ¦M›†˜˜ãðáÇ••€gÓÍmmmŽÈÈH 6L˜ŠÞœ†Sî™aðܰ #O¹g<7¬Mñ”ûΉ¿y:ò”{Ö<Ë •J1wî\Ì;×Ð¥0=âac"qX‰Ã˜HÆDjò?##>lëZkJJJ`gg§ÝÐø}»¸¸üoó‹¡—¥K—6ŽF²Ö¥¨¨¨ñ&Æø™…1Ñ8,Œ‰ÄaaL$ c"qXé?«ú¢x×{(mIEND®B`‚pktools-2.6.6/doc/html/dir_f92e37ed5759424bff98155847b1034b_dep.png0000644000113200011300000000634312616110567020230 00000000000000‰PNG  IHDRøÂdkbKGDÿÿÿ ½§“ ˜IDATxœíÝyPTGð/Ë‘ (†Ë(žPšŠ9*ÉZ®µ)Œ×ªDcŒà…uŒ‚˜ˆÆòãEÂ*˜¯%âÍâŠ÷D$`ÀQíBï[™u†tfÒ~?US5ï½~ýë×ò…×Ôø0B‘”þdìѳÀIŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Ä,Zrò·ß~‹õë×?­±Ñ&L˜€!C†4û|³–üðœ8ñ/ôìÔìQýΞ=×^{)))Íî£E?Á gÏ ¬\¹¹¥ÝÑÂÃǶ¸®Á‰$Æ€IŒ'’N$1œHb øs(?ÿzõò6ö0ÈðçPmm-îÝS{d ¸¤jkk‘˜¸ýúõF@€;† é‡ôôP(0hP?@ïÞ~F%=k-þ  ™¦””¯±jU 55;wJàç÷2¢¢>ÃÔ©ãñÒK ìƒÞ½ýqéR¾±‡JÏ.) K„…ÍDXØL;¼<ÀÜÜÉÉ©Æ×àDcÀ‰$Æ€?G:tðBN?¢úlŸž_ …”ÊÅ«gЀ'&& 0°Ú·w7dY"“PPÄÄyŸ|2 ï½bè²DF·kW BC‡´&×àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘ÄL6à*Õu88˜µè¼ÆúhNæŽË”™Â598˜i½\][¡ÿWqéÒy½Î7…k0E&ðæ²·o)S>5ö0þPLeÎÒÒ~BVV!²² qòäE(>  !„±‡ö‡eð'º88˜5kÎëS×õê:¦/KKKXYYÁÎÎ^³ïáǘ7o&üü\àëëŒyófâáÇuÎÕÕ.-mÞx£ÜܬáïïŠåËÿÿÍmÿþ½èÛ·+\]_D^HNþºÉµM‰É<)ivìØíÛ÷áØ±CX²da³úIHXU«â¡T~ŽŒŒkˆˆˆ†R©óœ×`ûö}ضm/úAë A¥2ÇÆ®]‡áèØëÖ-Çž=ß!9ùŸØ³ç(®_¿†¥Kcµú\½z)Ö¬ÙŠ®]{ 22 ¿ür ‡ý;vü€#GÒ°|ùçzÕ¯Ï7ßlD|| -úçΩ0}úlDGOkÆlé×§®ëÕg.žTQQŽòò2”——¡¨èÄÆÎApð¼ð š6k×~‰¼¼\9’]»ãĉ#ˆ‹›W§¯†Ú•••bôèÁèÚµ'ÎœÉÆÂ…ñX°`JJŠQQQޱcƒ1nÜ$\¸p3fÌAxx(**Ê›TÛ¤ˆ 99j½^ĦMÉB­¾22²qòäE;M›’E‡žšcO¶Õõ^¡ð«WoѪ±fÍV­~«íåå­96yr¤ NŸþYÓÆÛÛO$&îÔl§§_Õl?ÙçíÛ„¹¹¹øé§Ëšö‰‰;µjÔW_לuêÔE$$$iíÛ°á€ÞsÖ”>u]¯®cõ½ÔyÙØüY¤§_Õjçãã/²² 5ÛßPt¯s µ+*ª§NeŠ[·ÊDIIØ·ï˜f~T*µ°´´ Æ‹ÜÜ»âÎZ‘Ÿ_*JJjtö©Ï×óïÿ†ôÎË€EpppK"*L~ ®PøhÞûøø£¨¨°N}~ SP€€îZû:wîªyÿø-jFFv½µ ni¶Ï;¾}ßIJe‹°zõ@~~žÖ9¾¾àëÛI«¦? ¸ø6jjjàé©ÐóòòÖª¡«~}rssЩS­}~~/×ÛVל=>/¾ØªÁ>u]ocsñx µúcÉÈȆ——7 ²²‹ÍCXX(ø·¦íÍ›7àïïª5žÇoákgee…ëׯaÊ”ñ(//C×®=4Ç[·nƒ={ŽbíÚ刋S¢[·ž˜6mÞyç¯MªmJLþ=''û±÷×àîÞA³ýèÑ#@aaA£ýxxtÄåË´öee]ѼW«…æÕPmWW7Íö¶m{±lÙ:ìܹ'N¸ººáæÍš6—.¯s[jii prr¹¹9nÜPiŽåææÀÍ­½^õëãîÞAëšàÚµL­m}æìñ¹ÐÕ§®ëml.ê›ïǵjeáÃÇ +ëŠÖ7#GǶÈÈÈÖœ››{¦×9¿¡vUU• AxøLüøãYÄǯќSUU‰ÚÚZlÙ²*•#G~ˆaÃÞÅÝ»ê&Õ6%&ð9s" R]ǹs§±pál >öö­Éɉ(-ý +ígìØ¡TÎDjênüúkÞßèúiÖ¬)ZµCBFjŽY[ÛÀÛÛS§FaúôQ]]…¡CG!&&™™—‘™y‘‘aÈÏÏ«·oKKK¼ÿþPDEMF^^.23/kÖœúԯϸq“ TFâèÑP«ïàøñ#X¼x>ÌÌÌš5gõ©ëz›2 ±µµCYY)ÊËË4ûÞ}w,˜…üü<\¹rC†ôÇW_­®snCíª««ñàÁXYY¡ªªqqJ@YY)ÌÌÌ0hP?ìÝûJKÃÇ`aa kkë&Õ6)¦¾߸q»ððè(œœœÅ¤I¢¨¨Z¨ÕBDGÇ{ûÖÂÓS!’’v7º/.~$,X"¼¼¼…µµ zE<˜®s ¾bÅWÂݽƒptl+>ú(\VÖYëV …ÂW|ú©RV‰°°¢];7agg/&rsï6¸ÎU©ÔbèÐQÂÁÁQ¸¸¸Š‰§iÕ¨¯¾®9+)©±±_ OO…°³³o¿Ý_$%ímÛ:é=gMéS×õê:ÖÐ<##»Nm[[;qþ|®fßÍ›¿‰#ÆŠÖ­ÛG1zôG¢  ¼Î54ÔN­"6v™hÓÆA´oï.âã׈Áƒ‡ ''gÍ:ÙÓS!¬¬¬„¿HJÚ­WŸ¦º7ú,`‚òòX¹r³^í lÚ”lòÙD¥ºŽÀ@ŸoMµ~ZÚ>´oïŽ.]ºiöíÝûâãcpìØ¹fåYôù¼úý/›ää¨õj>66VHIIivM“¿E'ý]¹r&ŒÄ… gQYYŒŒtÄÆÎŨQãLªO2“ÿ-º1ØÚÚa̘ &Y¿±Ï[GDDcäÈ÷PRRŒŽ½0rdh‹®eòäHTVV<Õ>Épðz899cÙ²u&Y_ŸÛöè蘧6 DGÇ<Õ>Épx‹N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’˜Áøƒ­[7º,‘Ñß6xMƒüÃ?ÑëæD2²±ñÂ+¯¼fК øìÙ|ì‘!q N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’X‹>èbnnŽÔÔÝHMuxZã!¢Ç|ðÁ-:¿E\¥RáÌ™3-5¬W¯^ðòòjöù- 8™6®Á‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHbv{Dôlü¦êt߻ɊIEND®B`‚pktools-2.6.6/doc/html/ftv2blank.png0000644000113200011300000000012612647637661014254 00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚pktools-2.6.6/doc/html/dir_e28b2035b152bb51229fe7a0fca4e376_dep.map0000644000113200011300000000055012616110567020367 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random__inherit__graph.map0000644000113200011300000000014712616110567027706 00000000000000 pktools-2.6.6/doc/html/build-pksvm__gui-gcc-Debug_2ui__mainwindow_8h_source.html0000644000113200011300000032007512647637661024722 00000000000000 pktools: /home/kempenep/pktools/qt/build-pksvm_gui-gcc-Debug/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QComboBox>
17 #include <QtGui/QCommandLinkButton>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QHBoxLayout>
20 #include <QtGui/QHeaderView>
21 #include <QtGui/QLabel>
22 #include <QtGui/QLineEdit>
23 #include <QtGui/QMainWindow>
24 #include <QtGui/QMenu>
25 #include <QtGui/QMenuBar>
26 #include <QtGui/QPlainTextEdit>
27 #include <QtGui/QPushButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStatusBar>
30 #include <QtGui/QTabWidget>
31 #include <QtGui/QTableView>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput;
43  QAction *actionTraining;
44  QAction *actionMask;
45  QAction *actionOutput;
46  QAction *actionColor_table;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab;
51  QVBoxLayout *verticalLayout_3;
52  QGridLayout *gridLayout;
53  QLabel *label_2;
54  QToolButton *toolButton_training;
55  QLabel *label_4;
56  QSpacerItem *horizontalSpacer_4;
57  QLineEdit *training;
58  QLineEdit *nclass;
59  QLabel *label_20;
60  QLineEdit *label;
61  QSpacerItem *horizontalSpacer_3;
62  QLabel *label_21;
63  QLineEdit *tln;
64  QSpacerItem *horizontalSpacer_2;
65  QCommandLinkButton *commandLinkButtonPrepareTable;
66  QVBoxLayout *verticalLayout_2;
67  QLabel *label_17;
68  QTableView *tableView_labels;
69  QWidget *tab_2;
70  QVBoxLayout *verticalLayout_4;
71  QGridLayout *gridLayout_2;
72  QLineEdit *nodata;
73  QLabel *label_14;
74  QToolButton *toolButton_input;
75  QLabel *label_16;
76  QLabel *label_13;
77  QToolButton *toolButton_mask;
78  QLabel *label_15;
79  QLineEdit *mask;
80  QLineEdit *msknodata;
81  QSpacerItem *horizontalSpacer_15;
82  QLineEdit *output;
83  QToolButton *toolButton_output;
84  QLineEdit *input;
85  QLabel *label_3;
86  QLabel *label_22;
87  QLineEdit *ct;
88  QToolButton *toolButton_ct;
89  QSpacerItem *verticalSpacer;
90  QWidget *tab_3;
91  QVBoxLayout *verticalLayout_5;
92  QGridLayout *gridLayout_3;
93  QLineEdit *cv;
94  QLineEdit *ccost;
95  QLabel *label_5;
96  QLabel *label_10;
97  QLabel *label_11;
98  QLabel *label_6;
99  QComboBox *svmtype;
100  QLineEdit *gamma;
101  QLabel *label_7;
102  QLineEdit *coef0;
103  QLabel *label_9;
104  QLineEdit *nu;
105  QLineEdit *kd;
106  QLabel *label_12;
107  QSpacerItem *verticalSpacer_3;
108  QComboBox *kerneltype;
109  QLabel *label_8;
110  QSpacerItem *horizontalSpacer_5;
111  QSpacerItem *verticalSpacer_2;
112  QWidget *tab_4;
113  QVBoxLayout *verticalLayout_6;
114  QLabel *label_18;
115  QLineEdit *commandLineEdit;
116  QLabel *label_19;
117  QPlainTextEdit *consoleEdit;
118  QHBoxLayout *horizontalLayout;
119  QPushButton *pushButton_run;
120  QSpacerItem *horizontalSpacer;
121  QPushButton *pushButton_restore;
122  QMenuBar *menuBar;
123  QMenu *menuFile;
124  QToolBar *mainToolBar;
125  QStatusBar *statusBar;
126 
127  void setupUi(QMainWindow *MainWindow)
128  {
129  if (MainWindow->objectName().isEmpty())
130  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
131  MainWindow->resize(628, 614);
132  actionInput = new QAction(MainWindow);
133  actionInput->setObjectName(QString::fromUtf8("actionInput"));
134  actionTraining = new QAction(MainWindow);
135  actionTraining->setObjectName(QString::fromUtf8("actionTraining"));
136  actionMask = new QAction(MainWindow);
137  actionMask->setObjectName(QString::fromUtf8("actionMask"));
138  actionOutput = new QAction(MainWindow);
139  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
140  actionColor_table = new QAction(MainWindow);
141  actionColor_table->setObjectName(QString::fromUtf8("actionColor_table"));
142  centralWidget = new QWidget(MainWindow);
143  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
144  verticalLayout = new QVBoxLayout(centralWidget);
145  verticalLayout->setSpacing(6);
146  verticalLayout->setContentsMargins(11, 11, 11, 11);
147  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
148  tabWidget = new QTabWidget(centralWidget);
149  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
150  tab = new QWidget();
151  tab->setObjectName(QString::fromUtf8("tab"));
152  verticalLayout_3 = new QVBoxLayout(tab);
153  verticalLayout_3->setSpacing(6);
154  verticalLayout_3->setContentsMargins(11, 11, 11, 11);
155  verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
156  gridLayout = new QGridLayout();
157  gridLayout->setSpacing(6);
158  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
159  label_2 = new QLabel(tab);
160  label_2->setObjectName(QString::fromUtf8("label_2"));
161 
162  gridLayout->addWidget(label_2, 2, 0, 1, 1);
163 
164  toolButton_training = new QToolButton(tab);
165  toolButton_training->setObjectName(QString::fromUtf8("toolButton_training"));
166 
167  gridLayout->addWidget(toolButton_training, 0, 2, 1, 1);
168 
169  label_4 = new QLabel(tab);
170  label_4->setObjectName(QString::fromUtf8("label_4"));
171 
172  gridLayout->addWidget(label_4, 0, 0, 1, 1);
173 
174  horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
175 
176  gridLayout->addItem(horizontalSpacer_4, 3, 2, 1, 1);
177 
178  training = new QLineEdit(tab);
179  training->setObjectName(QString::fromUtf8("training"));
180 
181  gridLayout->addWidget(training, 0, 1, 1, 1);
182 
183  nclass = new QLineEdit(tab);
184  nclass->setObjectName(QString::fromUtf8("nclass"));
185 
186  gridLayout->addWidget(nclass, 3, 1, 1, 1);
187 
188  label_20 = new QLabel(tab);
189  label_20->setObjectName(QString::fromUtf8("label_20"));
190 
191  gridLayout->addWidget(label_20, 3, 0, 1, 1);
192 
193  label = new QLineEdit(tab);
194  label->setObjectName(QString::fromUtf8("label"));
195 
196  gridLayout->addWidget(label, 2, 1, 1, 1);
197 
198  horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
199 
200  gridLayout->addItem(horizontalSpacer_3, 2, 2, 1, 1);
201 
202  label_21 = new QLabel(tab);
203  label_21->setObjectName(QString::fromUtf8("label_21"));
204 
205  gridLayout->addWidget(label_21, 1, 0, 1, 1);
206 
207  tln = new QLineEdit(tab);
208  tln->setObjectName(QString::fromUtf8("tln"));
209 
210  gridLayout->addWidget(tln, 1, 1, 1, 1);
211 
212  horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
213 
214  gridLayout->addItem(horizontalSpacer_2, 1, 2, 1, 1);
215 
216 
217  verticalLayout_3->addLayout(gridLayout);
218 
219  commandLinkButtonPrepareTable = new QCommandLinkButton(tab);
220  commandLinkButtonPrepareTable->setObjectName(QString::fromUtf8("commandLinkButtonPrepareTable"));
221 
222  verticalLayout_3->addWidget(commandLinkButtonPrepareTable);
223 
224  verticalLayout_2 = new QVBoxLayout();
225  verticalLayout_2->setSpacing(6);
226  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
227  label_17 = new QLabel(tab);
228  label_17->setObjectName(QString::fromUtf8("label_17"));
229 
230  verticalLayout_2->addWidget(label_17);
231 
232  tableView_labels = new QTableView(tab);
233  tableView_labels->setObjectName(QString::fromUtf8("tableView_labels"));
234 
235  verticalLayout_2->addWidget(tableView_labels);
236 
237 
238  verticalLayout_3->addLayout(verticalLayout_2);
239 
240  tabWidget->addTab(tab, QString());
241  tab_2 = new QWidget();
242  tab_2->setObjectName(QString::fromUtf8("tab_2"));
243  verticalLayout_4 = new QVBoxLayout(tab_2);
244  verticalLayout_4->setSpacing(6);
245  verticalLayout_4->setContentsMargins(11, 11, 11, 11);
246  verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
247  gridLayout_2 = new QGridLayout();
248  gridLayout_2->setSpacing(6);
249  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
250  nodata = new QLineEdit(tab_2);
251  nodata->setObjectName(QString::fromUtf8("nodata"));
252 
253  gridLayout_2->addWidget(nodata, 2, 5, 1, 1);
254 
255  label_14 = new QLabel(tab_2);
256  label_14->setObjectName(QString::fromUtf8("label_14"));
257 
258  gridLayout_2->addWidget(label_14, 1, 4, 1, 1);
259 
260  toolButton_input = new QToolButton(tab_2);
261  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
262 
263  gridLayout_2->addWidget(toolButton_input, 0, 2, 1, 1);
264 
265  label_16 = new QLabel(tab_2);
266  label_16->setObjectName(QString::fromUtf8("label_16"));
267 
268  gridLayout_2->addWidget(label_16, 2, 4, 1, 1);
269 
270  label_13 = new QLabel(tab_2);
271  label_13->setObjectName(QString::fromUtf8("label_13"));
272 
273  gridLayout_2->addWidget(label_13, 1, 0, 1, 1);
274 
275  toolButton_mask = new QToolButton(tab_2);
276  toolButton_mask->setObjectName(QString::fromUtf8("toolButton_mask"));
277 
278  gridLayout_2->addWidget(toolButton_mask, 1, 2, 1, 1);
279 
280  label_15 = new QLabel(tab_2);
281  label_15->setObjectName(QString::fromUtf8("label_15"));
282 
283  gridLayout_2->addWidget(label_15, 2, 0, 1, 1);
284 
285  mask = new QLineEdit(tab_2);
286  mask->setObjectName(QString::fromUtf8("mask"));
287 
288  gridLayout_2->addWidget(mask, 1, 1, 1, 1);
289 
290  msknodata = new QLineEdit(tab_2);
291  msknodata->setObjectName(QString::fromUtf8("msknodata"));
292 
293  gridLayout_2->addWidget(msknodata, 1, 5, 1, 1);
294 
295  horizontalSpacer_15 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
296 
297  gridLayout_2->addItem(horizontalSpacer_15, 1, 3, 1, 1);
298 
299  output = new QLineEdit(tab_2);
300  output->setObjectName(QString::fromUtf8("output"));
301 
302  gridLayout_2->addWidget(output, 2, 1, 1, 1);
303 
304  toolButton_output = new QToolButton(tab_2);
305  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
306 
307  gridLayout_2->addWidget(toolButton_output, 2, 2, 1, 1);
308 
309  input = new QLineEdit(tab_2);
310  input->setObjectName(QString::fromUtf8("input"));
311 
312  gridLayout_2->addWidget(input, 0, 1, 1, 1);
313 
314  label_3 = new QLabel(tab_2);
315  label_3->setObjectName(QString::fromUtf8("label_3"));
316 
317  gridLayout_2->addWidget(label_3, 0, 0, 1, 1);
318 
319  label_22 = new QLabel(tab_2);
320  label_22->setObjectName(QString::fromUtf8("label_22"));
321 
322  gridLayout_2->addWidget(label_22, 3, 0, 1, 1);
323 
324  ct = new QLineEdit(tab_2);
325  ct->setObjectName(QString::fromUtf8("ct"));
326 
327  gridLayout_2->addWidget(ct, 3, 1, 1, 1);
328 
329  toolButton_ct = new QToolButton(tab_2);
330  toolButton_ct->setObjectName(QString::fromUtf8("toolButton_ct"));
331 
332  gridLayout_2->addWidget(toolButton_ct, 3, 2, 1, 1);
333 
334 
335  verticalLayout_4->addLayout(gridLayout_2);
336 
337  verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
338 
339  verticalLayout_4->addItem(verticalSpacer);
340 
341  tabWidget->addTab(tab_2, QString());
342  tab_3 = new QWidget();
343  tab_3->setObjectName(QString::fromUtf8("tab_3"));
344  verticalLayout_5 = new QVBoxLayout(tab_3);
345  verticalLayout_5->setSpacing(6);
346  verticalLayout_5->setContentsMargins(11, 11, 11, 11);
347  verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
348  gridLayout_3 = new QGridLayout();
349  gridLayout_3->setSpacing(6);
350  gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
351  cv = new QLineEdit(tab_3);
352  cv->setObjectName(QString::fromUtf8("cv"));
353 
354  gridLayout_3->addWidget(cv, 3, 1, 1, 1);
355 
356  ccost = new QLineEdit(tab_3);
357  ccost->setObjectName(QString::fromUtf8("ccost"));
358 
359  gridLayout_3->addWidget(ccost, 2, 4, 1, 1);
360 
361  label_5 = new QLabel(tab_3);
362  label_5->setObjectName(QString::fromUtf8("label_5"));
363 
364  gridLayout_3->addWidget(label_5, 3, 0, 1, 1);
365 
366  label_10 = new QLabel(tab_3);
367  label_10->setObjectName(QString::fromUtf8("label_10"));
368 
369  gridLayout_3->addWidget(label_10, 2, 3, 1, 1);
370 
371  label_11 = new QLabel(tab_3);
372  label_11->setObjectName(QString::fromUtf8("label_11"));
373 
374  gridLayout_3->addWidget(label_11, 0, 3, 1, 1);
375 
376  label_6 = new QLabel(tab_3);
377  label_6->setObjectName(QString::fromUtf8("label_6"));
378 
379  gridLayout_3->addWidget(label_6, 0, 0, 1, 1);
380 
381  svmtype = new QComboBox(tab_3);
382  svmtype->setObjectName(QString::fromUtf8("svmtype"));
383 
384  gridLayout_3->addWidget(svmtype, 0, 1, 1, 1);
385 
386  gamma = new QLineEdit(tab_3);
387  gamma->setObjectName(QString::fromUtf8("gamma"));
388 
389  gridLayout_3->addWidget(gamma, 2, 1, 1, 1);
390 
391  label_7 = new QLabel(tab_3);
392  label_7->setObjectName(QString::fromUtf8("label_7"));
393 
394  gridLayout_3->addWidget(label_7, 1, 0, 1, 1);
395 
396  coef0 = new QLineEdit(tab_3);
397  coef0->setObjectName(QString::fromUtf8("coef0"));
398 
399  gridLayout_3->addWidget(coef0, 0, 4, 1, 1);
400 
401  label_9 = new QLabel(tab_3);
402  label_9->setObjectName(QString::fromUtf8("label_9"));
403 
404  gridLayout_3->addWidget(label_9, 2, 0, 1, 1);
405 
406  nu = new QLineEdit(tab_3);
407  nu->setObjectName(QString::fromUtf8("nu"));
408 
409  gridLayout_3->addWidget(nu, 0, 7, 1, 1);
410 
411  kd = new QLineEdit(tab_3);
412  kd->setObjectName(QString::fromUtf8("kd"));
413 
414  gridLayout_3->addWidget(kd, 1, 4, 1, 1);
415 
416  label_12 = new QLabel(tab_3);
417  label_12->setObjectName(QString::fromUtf8("label_12"));
418 
419  gridLayout_3->addWidget(label_12, 0, 6, 1, 1);
420 
421  verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
422 
423  gridLayout_3->addItem(verticalSpacer_3, 0, 2, 1, 1);
424 
425  kerneltype = new QComboBox(tab_3);
426  kerneltype->setObjectName(QString::fromUtf8("kerneltype"));
427 
428  gridLayout_3->addWidget(kerneltype, 1, 1, 1, 1);
429 
430  label_8 = new QLabel(tab_3);
431  label_8->setObjectName(QString::fromUtf8("label_8"));
432 
433  gridLayout_3->addWidget(label_8, 1, 3, 1, 1);
434 
435  horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
436 
437  gridLayout_3->addItem(horizontalSpacer_5, 0, 5, 1, 1);
438 
439 
440  verticalLayout_5->addLayout(gridLayout_3);
441 
442  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
443 
444  verticalLayout_5->addItem(verticalSpacer_2);
445 
446  tabWidget->addTab(tab_3, QString());
447  tab_4 = new QWidget();
448  tab_4->setObjectName(QString::fromUtf8("tab_4"));
449  verticalLayout_6 = new QVBoxLayout(tab_4);
450  verticalLayout_6->setSpacing(6);
451  verticalLayout_6->setContentsMargins(11, 11, 11, 11);
452  verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6"));
453  label_18 = new QLabel(tab_4);
454  label_18->setObjectName(QString::fromUtf8("label_18"));
455 
456  verticalLayout_6->addWidget(label_18);
457 
458  commandLineEdit = new QLineEdit(tab_4);
459  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
460 
461  verticalLayout_6->addWidget(commandLineEdit);
462 
463  label_19 = new QLabel(tab_4);
464  label_19->setObjectName(QString::fromUtf8("label_19"));
465 
466  verticalLayout_6->addWidget(label_19);
467 
468  consoleEdit = new QPlainTextEdit(tab_4);
469  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
470 
471  verticalLayout_6->addWidget(consoleEdit);
472 
473  tabWidget->addTab(tab_4, QString());
474 
475  verticalLayout->addWidget(tabWidget);
476 
477  horizontalLayout = new QHBoxLayout();
478  horizontalLayout->setSpacing(6);
479  horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
480  pushButton_run = new QPushButton(centralWidget);
481  pushButton_run->setObjectName(QString::fromUtf8("pushButton_run"));
482 
483  horizontalLayout->addWidget(pushButton_run);
484 
485  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
486 
487  horizontalLayout->addItem(horizontalSpacer);
488 
489  pushButton_restore = new QPushButton(centralWidget);
490  pushButton_restore->setObjectName(QString::fromUtf8("pushButton_restore"));
491 
492  horizontalLayout->addWidget(pushButton_restore);
493 
494 
495  verticalLayout->addLayout(horizontalLayout);
496 
497  MainWindow->setCentralWidget(centralWidget);
498  menuBar = new QMenuBar(MainWindow);
499  menuBar->setObjectName(QString::fromUtf8("menuBar"));
500  menuBar->setGeometry(QRect(0, 0, 628, 25));
501  menuFile = new QMenu(menuBar);
502  menuFile->setObjectName(QString::fromUtf8("menuFile"));
503  MainWindow->setMenuBar(menuBar);
504  mainToolBar = new QToolBar(MainWindow);
505  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
506  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
507  statusBar = new QStatusBar(MainWindow);
508  statusBar->setObjectName(QString::fromUtf8("statusBar"));
509  MainWindow->setStatusBar(statusBar);
510  QWidget::setTabOrder(tabWidget, training);
511  QWidget::setTabOrder(training, toolButton_training);
512  QWidget::setTabOrder(toolButton_training, tln);
513  QWidget::setTabOrder(tln, label);
514  QWidget::setTabOrder(label, nclass);
515  QWidget::setTabOrder(nclass, input);
516  QWidget::setTabOrder(input, toolButton_input);
517  QWidget::setTabOrder(toolButton_input, mask);
518  QWidget::setTabOrder(mask, toolButton_mask);
519  QWidget::setTabOrder(toolButton_mask, msknodata);
520  QWidget::setTabOrder(msknodata, output);
521  QWidget::setTabOrder(output, toolButton_output);
522  QWidget::setTabOrder(toolButton_output, nodata);
523  QWidget::setTabOrder(nodata, ct);
524  QWidget::setTabOrder(ct, toolButton_ct);
525  QWidget::setTabOrder(toolButton_ct, svmtype);
526  QWidget::setTabOrder(svmtype, coef0);
527  QWidget::setTabOrder(coef0, nu);
528  QWidget::setTabOrder(nu, kerneltype);
529  QWidget::setTabOrder(kerneltype, kd);
530  QWidget::setTabOrder(kd, gamma);
531  QWidget::setTabOrder(gamma, ccost);
532  QWidget::setTabOrder(ccost, cv);
533  QWidget::setTabOrder(cv, commandLineEdit);
534  QWidget::setTabOrder(commandLineEdit, consoleEdit);
535  QWidget::setTabOrder(consoleEdit, tableView_labels);
536  QWidget::setTabOrder(tableView_labels, commandLinkButtonPrepareTable);
537  QWidget::setTabOrder(commandLinkButtonPrepareTable, pushButton_run);
538  QWidget::setTabOrder(pushButton_run, pushButton_restore);
539 
540  menuBar->addAction(menuFile->menuAction());
541  menuFile->addAction(actionInput);
542  menuFile->addAction(actionTraining);
543  menuFile->addAction(actionMask);
544  menuFile->addAction(actionOutput);
545  menuFile->addAction(actionColor_table);
546 
547  retranslateUi(MainWindow);
548 
549  tabWidget->setCurrentIndex(0);
550 
551 
552  QMetaObject::connectSlotsByName(MainWindow);
553  } // setupUi
554 
555  void retranslateUi(QMainWindow *MainWindow)
556  {
557  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pksvm_gui", 0, QApplication::UnicodeUTF8));
558  actionInput->setText(QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
559  actionInput->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
560  actionTraining->setText(QApplication::translate("MainWindow", "Training", 0, QApplication::UnicodeUTF8));
561  actionTraining->setShortcut(QApplication::translate("MainWindow", "Alt+T", 0, QApplication::UnicodeUTF8));
562  actionMask->setText(QApplication::translate("MainWindow", "Mask", 0, QApplication::UnicodeUTF8));
563  actionMask->setShortcut(QApplication::translate("MainWindow", "Alt+M", 0, QApplication::UnicodeUTF8));
564  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
565  actionOutput->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
566  actionColor_table->setText(QApplication::translate("MainWindow", "Color table", 0, QApplication::UnicodeUTF8));
567  actionColor_table->setShortcut(QApplication::translate("MainWindow", "Alt+C", 0, QApplication::UnicodeUTF8));
568 #ifndef QT_NO_TOOLTIP
569  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Attribute name of the class label in the training vector file (default is label)</p></body></html>", 0, QApplication::UnicodeUTF8));
570 #endif // QT_NO_TOOLTIP
571  label_2->setText(QApplication::translate("MainWindow", "attribute name for class label", 0, QApplication::UnicodeUTF8));
572  toolButton_training->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
573 #ifndef QT_NO_TOOLTIP
574  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>OGR supported vector file. Features must contain labels and band information. You can use pkextract to prepare training vector files</p></body></html>", 0, QApplication::UnicodeUTF8));
575 #endif // QT_NO_TOOLTIP
576  label_4->setText(QApplication::translate("MainWindow", "Training vectorfile", 0, QApplication::UnicodeUTF8));
577 #ifndef QT_NO_TOOLTIP
578  label_20->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Provide number of classes in training file here to prepare class name-value pairs (push button prepare table). This is mandatory if labels in training vector are provided as text (instead of Integer values). The table also provide priors and balance classes in training sample.</p></body></html>", 0, QApplication::UnicodeUTF8));
579 #endif // QT_NO_TOOLTIP
580  label_20->setText(QApplication::translate("MainWindow", "number of classes to prepare table", 0, QApplication::UnicodeUTF8));
581 #ifndef QT_NO_TOOLTIP
582  label_21->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Name of the training layer (optional). If not provided, all layers will be read per default.</p></body></html>", 0, QApplication::UnicodeUTF8));
583 #endif // QT_NO_TOOLTIP
584  label_21->setText(QApplication::translate("MainWindow", "Training layername (optional)", 0, QApplication::UnicodeUTF8));
585  commandLinkButtonPrepareTable->setText(QApplication::translate("MainWindow", "prepare table", 0, QApplication::UnicodeUTF8));
586  label_17->setText(QApplication::translate("MainWindow", "class name-value pairs", 0, QApplication::UnicodeUTF8));
587  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Training", 0, QApplication::UnicodeUTF8));
588  label_14->setText(QApplication::translate("MainWindow", "msknodata", 0, QApplication::UnicodeUTF8));
589  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
590  label_16->setText(QApplication::translate("MainWindow", "nodata", 0, QApplication::UnicodeUTF8));
591 #ifndef QT_NO_TOOLTIP
592  label_13->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Dimensions of mask image must correspond to input image. Pixels in mask with values=masknodata are not classified and get nodata value.</p></body></html>", 0, QApplication::UnicodeUTF8));
593 #endif // QT_NO_TOOLTIP
594  label_13->setText(QApplication::translate("MainWindow", "Mask image", 0, QApplication::UnicodeUTF8));
595  toolButton_mask->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
596 #ifndef QT_NO_TOOLTIP
597  label_15->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output image (classified map). Can be OGR vector or GDAL raster, depending on input data.</p></body></html>", 0, QApplication::UnicodeUTF8));
598 #endif // QT_NO_TOOLTIP
599  label_15->setText(QApplication::translate("MainWindow", "Output data", 0, QApplication::UnicodeUTF8));
600  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
601 #ifndef QT_NO_TOOLTIP
602  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input image. Both OGR vectors and GDAL rasters are supported. Number of bands must match those in training sample.</p></body></html>", 0, QApplication::UnicodeUTF8));
603 #endif // QT_NO_TOOLTIP
604  label_3->setText(QApplication::translate("MainWindow", "Input data", 0, QApplication::UnicodeUTF8));
605 #ifndef QT_NO_TOOLTIP
606  label_22->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Color table must be provided as ASCII text file with five (space delimited) columns:</p><p>value red green blue alpha<br/></p></body></html>", 0, QApplication::UnicodeUTF8));
607 #endif // QT_NO_TOOLTIP
608  label_22->setText(QApplication::translate("MainWindow", "color table", 0, QApplication::UnicodeUTF8));
609  toolButton_ct->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
610  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Input/Output", 0, QApplication::UnicodeUTF8));
611 #ifndef QT_NO_TOOLTIP
612  label_5->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Leave empty to skip cross validation. Enter 2 for a two-fold cross validation</p></body></html>", 0, QApplication::UnicodeUTF8));
613 #endif // QT_NO_TOOLTIP
614  label_5->setText(QApplication::translate("MainWindow", "n-fold cross validation", 0, QApplication::UnicodeUTF8));
615 #ifndef QT_NO_TOOLTIP
616  label_10->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>the parameter C of C_SVC, epsilon_SVR, and nu_SVR (default is 1)</p></body></html>", 0, QApplication::UnicodeUTF8));
617 #endif // QT_NO_TOOLTIP
618  label_10->setText(QApplication::translate("MainWindow", "CCost", 0, QApplication::UnicodeUTF8));
619 #ifndef QT_NO_TOOLTIP
620  label_11->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Coef0 in the kernel function (default is 0)</p></body></html>", 0, QApplication::UnicodeUTF8));
621 #endif // QT_NO_TOOLTIP
622  label_11->setText(QApplication::translate("MainWindow", "Coef 0", 0, QApplication::UnicodeUTF8));
623 #ifndef QT_NO_TOOLTIP
624  label_6->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Type of the support vector machine</p></body></html>", 0, QApplication::UnicodeUTF8));
625 #endif // QT_NO_TOOLTIP
626  label_6->setText(QApplication::translate("MainWindow", "SVM type", 0, QApplication::UnicodeUTF8));
627 #ifndef QT_NO_TOOLTIP
628  label_7->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>type of kernel function (default is radial)</p></body></html>", 0, QApplication::UnicodeUTF8));
629 #endif // QT_NO_TOOLTIP
630  label_7->setText(QApplication::translate("MainWindow", "Kernel type", 0, QApplication::UnicodeUTF8));
631 #ifndef QT_NO_TOOLTIP
632  label_9->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>gamma in kernel function (default is 0)</p></body></html>", 0, QApplication::UnicodeUTF8));
633 #endif // QT_NO_TOOLTIP
634  label_9->setText(QApplication::translate("MainWindow", "Gamma", 0, QApplication::UnicodeUTF8));
635 #ifndef QT_NO_TOOLTIP
636  label_12->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>the parameter nu of nu_SVC, one_class SVM, and nu_SVR (default is 0.5)</p></body></html>", 0, QApplication::UnicodeUTF8));
637 #endif // QT_NO_TOOLTIP
638  label_12->setText(QApplication::translate("MainWindow", "nu", 0, QApplication::UnicodeUTF8));
639 #ifndef QT_NO_TOOLTIP
640  label_8->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>degree in kernel function (default is 3)</p></body></html>", 0, QApplication::UnicodeUTF8));
641 #endif // QT_NO_TOOLTIP
642  label_8->setText(QApplication::translate("MainWindow", "Kernel degree", 0, QApplication::UnicodeUTF8));
643  tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Classifier", 0, QApplication::UnicodeUTF8));
644  label_18->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
645  label_19->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
646  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
647 #ifndef QT_NO_TOOLTIP
648  pushButton_run->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Classify with current settings (check Console for output)</p></body></html>", 0, QApplication::UnicodeUTF8));
649 #endif // QT_NO_TOOLTIP
650  pushButton_run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
651 #ifndef QT_NO_TOOLTIP
652  pushButton_restore->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>reset all parameters to default</p></body></html>", 0, QApplication::UnicodeUTF8));
653 #endif // QT_NO_TOOLTIP
654  pushButton_restore->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
655  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
656  } // retranslateUi
657 
658 };
659 
660 namespace Ui {
661  class MainWindow: public Ui_MainWindow {};
662 } // namespace Ui
663 
664 QT_END_NAMESPACE
665 
666 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/inherit_graph_13.md50000644000113200011300000000004012616110567015370 00000000000000d7659eac38b836d9fe385459622c758dpktools-2.6.6/doc/html/build-pkcomposite__gui-gcc-Debug_2ui__mainwindow_8h_source.html0000644000113200011300000033021212647637661026111 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Debug/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QGroupBox>
20 #include <QtGui/QHBoxLayout>
21 #include <QtGui/QHeaderView>
22 #include <QtGui/QLabel>
23 #include <QtGui/QLineEdit>
24 #include <QtGui/QListWidget>
25 #include <QtGui/QMainWindow>
26 #include <QtGui/QMenu>
27 #include <QtGui/QMenuBar>
28 #include <QtGui/QPlainTextEdit>
29 #include <QtGui/QSpacerItem>
30 #include <QtGui/QStatusBar>
31 #include <QtGui/QTabWidget>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
40 {
41 public:
42  QAction *actionInput_image;
43  QAction *actionOutput_image;
44  QAction *actionQuit;
45  QAction *actionSelection_Info_file;
46  QAction *actionExtent;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab;
51  QVBoxLayout *verticalLayout_2;
52  QGridLayout *gridLayout_2;
53  QSpacerItem *horizontalSpacer_3;
54  QListWidget *listWidget_input;
55  QLabel *label;
56  QToolButton *toolButton_input;
57  QLineEdit *lry;
58  QLineEdit *uly;
59  QLabel *label_2;
60  QSpacerItem *horizontalSpacer_2;
61  QLineEdit *lrx;
62  QLineEdit *ulx;
63  QLabel *label_4;
64  QLineEdit *extent;
65  QToolButton *toolButton_extent;
66  QWidget *tab_2;
67  QGridLayout *gridLayout_4;
68  QSpacerItem *verticalSpacer_3;
69  QComboBox *resample;
70  QLabel *label_18;
71  QLabel *label_17;
72  QComboBox *crule;
73  QLabel *label_19;
74  QLineEdit *cband;
75  QGroupBox *groupBox;
76  QGridLayout *gridLayout_3;
77  QLabel *label_21;
78  QLineEdit *srcnodata;
79  QLabel *label_23;
80  QLabel *label_22;
81  QLineEdit *min;
82  QLineEdit *max;
83  QLabel *label_20;
84  QLineEdit *bndnodata;
85  QSpacerItem *horizontalSpacer_4;
86  QSpacerItem *horizontalSpacer_5;
87  QWidget *tab_3;
88  QVBoxLayout *verticalLayout_3;
89  QGridLayout *gridLayout;
90  QSpacerItem *horizontalSpacer_6;
91  QLabel *label_7;
92  QLabel *label_14;
93  QLineEdit *file;
94  QLabel *label_10;
95  QComboBox *oformat;
96  QComboBox *interleaved;
97  QLabel *label_9;
98  QLineEdit *dx;
99  QLabel *label_8;
100  QLabel *label_13;
101  QToolButton *toolButton_ct;
102  QComboBox *compressed;
103  QLabel *label_12;
104  QLineEdit *ct;
105  QLineEdit *output;
106  QToolButton *toolButton_output;
107  QLabel *label_6;
108  QLineEdit *a_srs;
109  QLabel *label_15;
110  QLineEdit *dy;
111  QLabel *label_5;
112  QCheckBox *tiled;
113  QComboBox *otype;
114  QLabel *label_11;
115  QLineEdit *dstnodata;
116  QToolButton *toolButton_file;
117  QLabel *label_3;
118  QWidget *tab_4;
119  QVBoxLayout *verticalLayout_5;
120  QVBoxLayout *verticalLayout_4;
121  QLabel *label_24;
122  QLineEdit *commandLineEdit;
123  QLabel *label_25;
124  QPlainTextEdit *consoleEdit;
125  QSpacerItem *verticalSpacer_2;
126  QHBoxLayout *horizontalLayout_2;
127  QToolButton *toolButton_Run;
128  QSpacerItem *horizontalSpacer;
129  QToolButton *toolButton_defaults;
130  QMenuBar *menuBar;
131  QMenu *menuFile;
132  QToolBar *mainToolBar;
133  QStatusBar *statusBar;
134 
135  void setupUi(QMainWindow *MainWindow)
136  {
137  if (MainWindow->objectName().isEmpty())
138  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
139  MainWindow->resize(798, 859);
140  actionInput_image = new QAction(MainWindow);
141  actionInput_image->setObjectName(QString::fromUtf8("actionInput_image"));
142  actionOutput_image = new QAction(MainWindow);
143  actionOutput_image->setObjectName(QString::fromUtf8("actionOutput_image"));
144  actionQuit = new QAction(MainWindow);
145  actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
146  actionSelection_Info_file = new QAction(MainWindow);
147  actionSelection_Info_file->setObjectName(QString::fromUtf8("actionSelection_Info_file"));
148  actionExtent = new QAction(MainWindow);
149  actionExtent->setObjectName(QString::fromUtf8("actionExtent"));
150  centralWidget = new QWidget(MainWindow);
151  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
152  verticalLayout = new QVBoxLayout(centralWidget);
153  verticalLayout->setSpacing(6);
154  verticalLayout->setContentsMargins(11, 11, 11, 11);
155  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
156  tabWidget = new QTabWidget(centralWidget);
157  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
158  tab = new QWidget();
159  tab->setObjectName(QString::fromUtf8("tab"));
160  verticalLayout_2 = new QVBoxLayout(tab);
161  verticalLayout_2->setSpacing(6);
162  verticalLayout_2->setContentsMargins(11, 11, 11, 11);
163  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
164  gridLayout_2 = new QGridLayout();
165  gridLayout_2->setSpacing(6);
166  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
167  horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
168 
169  gridLayout_2->addItem(horizontalSpacer_3, 1, 3, 1, 1);
170 
171  listWidget_input = new QListWidget(tab);
172  listWidget_input->setObjectName(QString::fromUtf8("listWidget_input"));
173 
174  gridLayout_2->addWidget(listWidget_input, 0, 2, 1, 1);
175 
176  label = new QLabel(tab);
177  label->setObjectName(QString::fromUtf8("label"));
178 
179  gridLayout_2->addWidget(label, 0, 0, 1, 1);
180 
181  toolButton_input = new QToolButton(tab);
182  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
183 
184  gridLayout_2->addWidget(toolButton_input, 0, 1, 1, 1);
185 
186  lry = new QLineEdit(tab);
187  lry->setObjectName(QString::fromUtf8("lry"));
188 
189  gridLayout_2->addWidget(lry, 3, 2, 1, 1);
190 
191  uly = new QLineEdit(tab);
192  uly->setObjectName(QString::fromUtf8("uly"));
193 
194  gridLayout_2->addWidget(uly, 1, 2, 1, 1);
195 
196  label_2 = new QLabel(tab);
197  label_2->setObjectName(QString::fromUtf8("label_2"));
198 
199  gridLayout_2->addWidget(label_2, 1, 0, 1, 1);
200 
201  horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
202 
203  gridLayout_2->addItem(horizontalSpacer_2, 1, 1, 1, 1);
204 
205  lrx = new QLineEdit(tab);
206  lrx->setObjectName(QString::fromUtf8("lrx"));
207 
208  gridLayout_2->addWidget(lrx, 2, 3, 1, 1);
209 
210  ulx = new QLineEdit(tab);
211  ulx->setObjectName(QString::fromUtf8("ulx"));
212 
213  gridLayout_2->addWidget(ulx, 2, 1, 1, 1);
214 
215  label_4 = new QLabel(tab);
216  label_4->setObjectName(QString::fromUtf8("label_4"));
217 
218  gridLayout_2->addWidget(label_4, 4, 0, 1, 1);
219 
220  extent = new QLineEdit(tab);
221  extent->setObjectName(QString::fromUtf8("extent"));
222 
223  gridLayout_2->addWidget(extent, 4, 1, 1, 1);
224 
225  toolButton_extent = new QToolButton(tab);
226  toolButton_extent->setObjectName(QString::fromUtf8("toolButton_extent"));
227 
228  gridLayout_2->addWidget(toolButton_extent, 4, 2, 1, 1);
229 
230 
231  verticalLayout_2->addLayout(gridLayout_2);
232 
233  tabWidget->addTab(tab, QString());
234  tab_2 = new QWidget();
235  tab_2->setObjectName(QString::fromUtf8("tab_2"));
236  gridLayout_4 = new QGridLayout(tab_2);
237  gridLayout_4->setSpacing(6);
238  gridLayout_4->setContentsMargins(11, 11, 11, 11);
239  gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
240  verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
241 
242  gridLayout_4->addItem(verticalSpacer_3, 2, 0, 1, 1);
243 
244  resample = new QComboBox(tab_2);
245  resample->setObjectName(QString::fromUtf8("resample"));
246 
247  gridLayout_4->addWidget(resample, 0, 1, 1, 1);
248 
249  label_18 = new QLabel(tab_2);
250  label_18->setObjectName(QString::fromUtf8("label_18"));
251 
252  gridLayout_4->addWidget(label_18, 1, 0, 1, 1);
253 
254  label_17 = new QLabel(tab_2);
255  label_17->setObjectName(QString::fromUtf8("label_17"));
256 
257  gridLayout_4->addWidget(label_17, 0, 0, 1, 1);
258 
259  crule = new QComboBox(tab_2);
260  crule->setObjectName(QString::fromUtf8("crule"));
261 
262  gridLayout_4->addWidget(crule, 1, 1, 1, 1);
263 
264  label_19 = new QLabel(tab_2);
265  label_19->setObjectName(QString::fromUtf8("label_19"));
266 
267  gridLayout_4->addWidget(label_19, 1, 3, 1, 1);
268 
269  cband = new QLineEdit(tab_2);
270  cband->setObjectName(QString::fromUtf8("cband"));
271 
272  gridLayout_4->addWidget(cband, 1, 4, 1, 1);
273 
274  groupBox = new QGroupBox(tab_2);
275  groupBox->setObjectName(QString::fromUtf8("groupBox"));
276  gridLayout_3 = new QGridLayout(groupBox);
277  gridLayout_3->setSpacing(6);
278  gridLayout_3->setContentsMargins(11, 11, 11, 11);
279  gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
280  label_21 = new QLabel(groupBox);
281  label_21->setObjectName(QString::fromUtf8("label_21"));
282 
283  gridLayout_3->addWidget(label_21, 1, 0, 1, 1);
284 
285  srcnodata = new QLineEdit(groupBox);
286  srcnodata->setObjectName(QString::fromUtf8("srcnodata"));
287 
288  gridLayout_3->addWidget(srcnodata, 1, 1, 1, 2);
289 
290  label_23 = new QLabel(groupBox);
291  label_23->setObjectName(QString::fromUtf8("label_23"));
292 
293  gridLayout_3->addWidget(label_23, 3, 0, 1, 1);
294 
295  label_22 = new QLabel(groupBox);
296  label_22->setObjectName(QString::fromUtf8("label_22"));
297 
298  gridLayout_3->addWidget(label_22, 2, 0, 1, 1);
299 
300  min = new QLineEdit(groupBox);
301  min->setObjectName(QString::fromUtf8("min"));
302 
303  gridLayout_3->addWidget(min, 2, 1, 1, 2);
304 
305  max = new QLineEdit(groupBox);
306  max->setObjectName(QString::fromUtf8("max"));
307 
308  gridLayout_3->addWidget(max, 3, 1, 1, 1);
309 
310  label_20 = new QLabel(groupBox);
311  label_20->setObjectName(QString::fromUtf8("label_20"));
312 
313  gridLayout_3->addWidget(label_20, 0, 0, 1, 1);
314 
315  bndnodata = new QLineEdit(groupBox);
316  bndnodata->setObjectName(QString::fromUtf8("bndnodata"));
317 
318  gridLayout_3->addWidget(bndnodata, 0, 1, 1, 1);
319 
320 
321  gridLayout_4->addWidget(groupBox, 3, 0, 1, 4);
322 
323  horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
324 
325  gridLayout_4->addItem(horizontalSpacer_4, 1, 5, 1, 1);
326 
327  horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
328 
329  gridLayout_4->addItem(horizontalSpacer_5, 1, 2, 1, 1);
330 
331  tabWidget->addTab(tab_2, QString());
332  tab_3 = new QWidget();
333  tab_3->setObjectName(QString::fromUtf8("tab_3"));
334  verticalLayout_3 = new QVBoxLayout(tab_3);
335  verticalLayout_3->setSpacing(6);
336  verticalLayout_3->setContentsMargins(11, 11, 11, 11);
337  verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
338  gridLayout = new QGridLayout();
339  gridLayout->setSpacing(6);
340  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
341  horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
342 
343  gridLayout->addItem(horizontalSpacer_6, 7, 3, 1, 1);
344 
345  label_7 = new QLabel(tab_3);
346  label_7->setObjectName(QString::fromUtf8("label_7"));
347 
348  gridLayout->addWidget(label_7, 4, 0, 1, 1);
349 
350  label_14 = new QLabel(tab_3);
351  label_14->setObjectName(QString::fromUtf8("label_14"));
352 
353  gridLayout->addWidget(label_14, 8, 0, 1, 1);
354 
355  file = new QLineEdit(tab_3);
356  file->setObjectName(QString::fromUtf8("file"));
357 
358  gridLayout->addWidget(file, 9, 1, 1, 1);
359 
360  label_10 = new QLabel(tab_3);
361  label_10->setObjectName(QString::fromUtf8("label_10"));
362 
363  gridLayout->addWidget(label_10, 6, 2, 1, 1);
364 
365  oformat = new QComboBox(tab_3);
366  oformat->setObjectName(QString::fromUtf8("oformat"));
367 
368  gridLayout->addWidget(oformat, 4, 1, 1, 1);
369 
370  interleaved = new QComboBox(tab_3);
371  interleaved->setObjectName(QString::fromUtf8("interleaved"));
372 
373  gridLayout->addWidget(interleaved, 7, 1, 1, 1);
374 
375  label_9 = new QLabel(tab_3);
376  label_9->setObjectName(QString::fromUtf8("label_9"));
377 
378  gridLayout->addWidget(label_9, 6, 0, 1, 1);
379 
380  dx = new QLineEdit(tab_3);
381  dx->setObjectName(QString::fromUtf8("dx"));
382 
383  gridLayout->addWidget(dx, 6, 1, 1, 1);
384 
385  label_8 = new QLabel(tab_3);
386  label_8->setObjectName(QString::fromUtf8("label_8"));
387 
388  gridLayout->addWidget(label_8, 5, 0, 1, 1);
389 
390  label_13 = new QLabel(tab_3);
391  label_13->setObjectName(QString::fromUtf8("label_13"));
392 
393  gridLayout->addWidget(label_13, 7, 4, 1, 1);
394 
395  toolButton_ct = new QToolButton(tab_3);
396  toolButton_ct->setObjectName(QString::fromUtf8("toolButton_ct"));
397 
398  gridLayout->addWidget(toolButton_ct, 5, 2, 1, 1);
399 
400  compressed = new QComboBox(tab_3);
401  compressed->setObjectName(QString::fromUtf8("compressed"));
402 
403  gridLayout->addWidget(compressed, 7, 5, 1, 1);
404 
405  label_12 = new QLabel(tab_3);
406  label_12->setObjectName(QString::fromUtf8("label_12"));
407 
408  gridLayout->addWidget(label_12, 7, 0, 1, 1);
409 
410  ct = new QLineEdit(tab_3);
411  ct->setObjectName(QString::fromUtf8("ct"));
412 
413  gridLayout->addWidget(ct, 5, 1, 1, 1);
414 
415  output = new QLineEdit(tab_3);
416  output->setObjectName(QString::fromUtf8("output"));
417 
418  gridLayout->addWidget(output, 1, 1, 1, 1);
419 
420  toolButton_output = new QToolButton(tab_3);
421  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
422 
423  gridLayout->addWidget(toolButton_output, 1, 2, 1, 1);
424 
425  label_6 = new QLabel(tab_3);
426  label_6->setObjectName(QString::fromUtf8("label_6"));
427 
428  gridLayout->addWidget(label_6, 3, 0, 1, 1);
429 
430  a_srs = new QLineEdit(tab_3);
431  a_srs->setObjectName(QString::fromUtf8("a_srs"));
432 
433  gridLayout->addWidget(a_srs, 2, 1, 1, 1);
434 
435  label_15 = new QLabel(tab_3);
436  label_15->setObjectName(QString::fromUtf8("label_15"));
437 
438  gridLayout->addWidget(label_15, 9, 0, 1, 1);
439 
440  dy = new QLineEdit(tab_3);
441  dy->setObjectName(QString::fromUtf8("dy"));
442 
443  gridLayout->addWidget(dy, 6, 4, 1, 1);
444 
445  label_5 = new QLabel(tab_3);
446  label_5->setObjectName(QString::fromUtf8("label_5"));
447 
448  gridLayout->addWidget(label_5, 2, 0, 1, 1);
449 
450  tiled = new QCheckBox(tab_3);
451  tiled->setObjectName(QString::fromUtf8("tiled"));
452 
453  gridLayout->addWidget(tiled, 7, 2, 1, 1);
454 
455  otype = new QComboBox(tab_3);
456  otype->setObjectName(QString::fromUtf8("otype"));
457 
458  gridLayout->addWidget(otype, 3, 1, 1, 1);
459 
460  label_11 = new QLabel(tab_3);
461  label_11->setObjectName(QString::fromUtf8("label_11"));
462 
463  gridLayout->addWidget(label_11, 6, 5, 1, 1);
464 
465  dstnodata = new QLineEdit(tab_3);
466  dstnodata->setObjectName(QString::fromUtf8("dstnodata"));
467 
468  gridLayout->addWidget(dstnodata, 8, 1, 1, 1);
469 
470  toolButton_file = new QToolButton(tab_3);
471  toolButton_file->setObjectName(QString::fromUtf8("toolButton_file"));
472 
473  gridLayout->addWidget(toolButton_file, 9, 2, 1, 1);
474 
475  label_3 = new QLabel(tab_3);
476  label_3->setObjectName(QString::fromUtf8("label_3"));
477 
478  gridLayout->addWidget(label_3, 1, 0, 1, 1);
479 
480 
481  verticalLayout_3->addLayout(gridLayout);
482 
483  tabWidget->addTab(tab_3, QString());
484  tab_4 = new QWidget();
485  tab_4->setObjectName(QString::fromUtf8("tab_4"));
486  verticalLayout_5 = new QVBoxLayout(tab_4);
487  verticalLayout_5->setSpacing(6);
488  verticalLayout_5->setContentsMargins(11, 11, 11, 11);
489  verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
490  verticalLayout_4 = new QVBoxLayout();
491  verticalLayout_4->setSpacing(6);
492  verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
493  label_24 = new QLabel(tab_4);
494  label_24->setObjectName(QString::fromUtf8("label_24"));
495 
496  verticalLayout_4->addWidget(label_24);
497 
498  commandLineEdit = new QLineEdit(tab_4);
499  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
500 
501  verticalLayout_4->addWidget(commandLineEdit);
502 
503  label_25 = new QLabel(tab_4);
504  label_25->setObjectName(QString::fromUtf8("label_25"));
505 
506  verticalLayout_4->addWidget(label_25);
507 
508  consoleEdit = new QPlainTextEdit(tab_4);
509  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
510 
511  verticalLayout_4->addWidget(consoleEdit);
512 
513 
514  verticalLayout_5->addLayout(verticalLayout_4);
515 
516  tabWidget->addTab(tab_4, QString());
517 
518  verticalLayout->addWidget(tabWidget);
519 
520  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
521 
522  verticalLayout->addItem(verticalSpacer_2);
523 
524  horizontalLayout_2 = new QHBoxLayout();
525  horizontalLayout_2->setSpacing(6);
526  horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
527  toolButton_Run = new QToolButton(centralWidget);
528  toolButton_Run->setObjectName(QString::fromUtf8("toolButton_Run"));
529 
530  horizontalLayout_2->addWidget(toolButton_Run);
531 
532  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
533 
534  horizontalLayout_2->addItem(horizontalSpacer);
535 
536  toolButton_defaults = new QToolButton(centralWidget);
537  toolButton_defaults->setObjectName(QString::fromUtf8("toolButton_defaults"));
538 
539  horizontalLayout_2->addWidget(toolButton_defaults);
540 
541 
542  verticalLayout->addLayout(horizontalLayout_2);
543 
544  MainWindow->setCentralWidget(centralWidget);
545  menuBar = new QMenuBar(MainWindow);
546  menuBar->setObjectName(QString::fromUtf8("menuBar"));
547  menuBar->setGeometry(QRect(0, 0, 798, 25));
548  menuFile = new QMenu(menuBar);
549  menuFile->setObjectName(QString::fromUtf8("menuFile"));
550  MainWindow->setMenuBar(menuBar);
551  mainToolBar = new QToolBar(MainWindow);
552  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
553  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
554  statusBar = new QStatusBar(MainWindow);
555  statusBar->setObjectName(QString::fromUtf8("statusBar"));
556  MainWindow->setStatusBar(statusBar);
557  QWidget::setTabOrder(toolButton_input, uly);
558  QWidget::setTabOrder(uly, ulx);
559  QWidget::setTabOrder(ulx, lrx);
560  QWidget::setTabOrder(lrx, lry);
561  QWidget::setTabOrder(lry, extent);
562  QWidget::setTabOrder(extent, toolButton_extent);
563  QWidget::setTabOrder(toolButton_extent, resample);
564  QWidget::setTabOrder(resample, crule);
565  QWidget::setTabOrder(crule, cband);
566  QWidget::setTabOrder(cband, bndnodata);
567  QWidget::setTabOrder(bndnodata, srcnodata);
568  QWidget::setTabOrder(srcnodata, min);
569  QWidget::setTabOrder(min, max);
570  QWidget::setTabOrder(max, output);
571  QWidget::setTabOrder(output, toolButton_output);
572  QWidget::setTabOrder(toolButton_output, a_srs);
573  QWidget::setTabOrder(a_srs, otype);
574  QWidget::setTabOrder(otype, oformat);
575  QWidget::setTabOrder(oformat, ct);
576  QWidget::setTabOrder(ct, toolButton_ct);
577  QWidget::setTabOrder(toolButton_ct, dx);
578  QWidget::setTabOrder(dx, dy);
579  QWidget::setTabOrder(dy, interleaved);
580  QWidget::setTabOrder(interleaved, tiled);
581  QWidget::setTabOrder(tiled, compressed);
582  QWidget::setTabOrder(compressed, dstnodata);
583  QWidget::setTabOrder(dstnodata, file);
584  QWidget::setTabOrder(file, toolButton_file);
585  QWidget::setTabOrder(toolButton_file, toolButton_Run);
586  QWidget::setTabOrder(toolButton_Run, toolButton_defaults);
587  QWidget::setTabOrder(toolButton_defaults, commandLineEdit);
588  QWidget::setTabOrder(commandLineEdit, consoleEdit);
589  QWidget::setTabOrder(consoleEdit, listWidget_input);
590  QWidget::setTabOrder(listWidget_input, tabWidget);
591 
592  menuBar->addAction(menuFile->menuAction());
593  menuFile->addAction(actionInput_image);
594  menuFile->addAction(actionExtent);
595  menuFile->addAction(actionOutput_image);
596  menuFile->addAction(actionSelection_Info_file);
597  menuFile->addAction(actionQuit);
598 
599  retranslateUi(MainWindow);
600 
601  tabWidget->setCurrentIndex(3);
602 
603 
604  QMetaObject::connectSlotsByName(MainWindow);
605  } // setupUi
606 
607  void retranslateUi(QMainWindow *MainWindow)
608  {
609  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkcomposite_gui", 0, QApplication::UnicodeUTF8));
610  actionInput_image->setText(QApplication::translate("MainWindow", "Input image(s)", 0, QApplication::UnicodeUTF8));
611  actionInput_image->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
612  actionOutput_image->setText(QApplication::translate("MainWindow", "Output image", 0, QApplication::UnicodeUTF8));
613  actionOutput_image->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
614  actionQuit->setText(QApplication::translate("MainWindow", "Quit", 0, QApplication::UnicodeUTF8));
615  actionQuit->setShortcut(QApplication::translate("MainWindow", "Alt+Q", 0, QApplication::UnicodeUTF8));
616  actionSelection_Info_file->setText(QApplication::translate("MainWindow", "Selection Info file", 0, QApplication::UnicodeUTF8));
617  actionSelection_Info_file->setShortcut(QApplication::translate("MainWindow", "Alt+F", 0, QApplication::UnicodeUTF8));
618  actionExtent->setText(QApplication::translate("MainWindow", "Extent", 0, QApplication::UnicodeUTF8));
619  actionExtent->setShortcut(QApplication::translate("MainWindow", "Alt+E", 0, QApplication::UnicodeUTF8));
620 #ifndef QT_NO_TOOLTIP
621  label->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input raster images</p></body></html>", 0, QApplication::UnicodeUTF8));
622 #endif // QT_NO_TOOLTIP
623  label->setText(QApplication::translate("MainWindow", "Input images", 0, QApplication::UnicodeUTF8));
624  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
625 #ifndef QT_NO_TOOLTIP
626  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Provide geographical extent to crop in coordinate reference system of input data</p></body></html>", 0, QApplication::UnicodeUTF8));
627 #endif // QT_NO_TOOLTIP
628  label_2->setText(QApplication::translate("MainWindow", "Geographical extent", 0, QApplication::UnicodeUTF8));
629 #ifndef QT_NO_TOOLTIP
630  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Use an external OGR vector file to define the geographical extent to crop. Coordinate reference systems of input and vector must be identical</p></body></html>", 0, QApplication::UnicodeUTF8));
631 #endif // QT_NO_TOOLTIP
632  label_4->setText(QApplication::translate("MainWindow", "Extent via vector:", 0, QApplication::UnicodeUTF8));
633  toolButton_extent->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
634  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
635 #ifndef QT_NO_TOOLTIP
636  label_18->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Composite rule for mosaic. Default is overwrite</p></body></html>", 0, QApplication::UnicodeUTF8));
637 #endif // QT_NO_TOOLTIP
638  label_18->setText(QApplication::translate("MainWindow", "Composit rule", 0, QApplication::UnicodeUTF8));
639  label_17->setText(QApplication::translate("MainWindow", "Resample method", 0, QApplication::UnicodeUTF8));
640  label_19->setText(QApplication::translate("MainWindow", "Band used for composit rule", 0, QApplication::UnicodeUTF8));
641  groupBox->setTitle(QApplication::translate("MainWindow", "nodata values in input", 0, QApplication::UnicodeUTF8));
642 #ifndef QT_NO_TOOLTIP
643  label_21->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>invalid value for input image</p></body></html>", 0, QApplication::UnicodeUTF8));
644 #endif // QT_NO_TOOLTIP
645  label_21->setText(QApplication::translate("MainWindow", "nodata value", 0, QApplication::UnicodeUTF8));
646 #ifndef QT_NO_TOOLTIP
647  label_23->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>flag values larger or equal to this value as invalid</p></body></html>", 0, QApplication::UnicodeUTF8));
648 #endif // QT_NO_TOOLTIP
649  label_23->setText(QApplication::translate("MainWindow", "max value", 0, QApplication::UnicodeUTF8));
650 #ifndef QT_NO_TOOLTIP
651  label_22->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>flag values smaller or equal to this value as invalid</p></body></html>", 0, QApplication::UnicodeUTF8));
652 #endif // QT_NO_TOOLTIP
653  label_22->setText(QApplication::translate("MainWindow", "min value", 0, QApplication::UnicodeUTF8));
654 #ifndef QT_NO_TOOLTIP
655  label_20->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Band in input image to check if pixel is valid (used for srcnodata, min and max options)</p></body></html>", 0, QApplication::UnicodeUTF8));
656 #endif // QT_NO_TOOLTIP
657  label_20->setText(QApplication::translate("MainWindow", "band", 0, QApplication::UnicodeUTF8));
658  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Composit", 0, QApplication::UnicodeUTF8));
659  label_7->setText(QApplication::translate("MainWindow", "Output image format", 0, QApplication::UnicodeUTF8));
660 #ifndef QT_NO_TOOLTIP
661  label_14->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Nodata value to put in image if out of bounds or if no valid pixel value is found in input images</p></body></html>", 0, QApplication::UnicodeUTF8));
662 #endif // QT_NO_TOOLTIP
663  label_14->setText(QApplication::translate("MainWindow", "Output nodata value", 0, QApplication::UnicodeUTF8));
664  label_10->setText(QApplication::translate("MainWindow", "dx", 0, QApplication::UnicodeUTF8));
665 #ifndef QT_NO_TOOLTIP
666  label_9->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output resolution in x and y distance measure (e.g., meter). Leave empty to read from input data</p></body></html>", 0, QApplication::UnicodeUTF8));
667 #endif // QT_NO_TOOLTIP
668  label_9->setText(QApplication::translate("MainWindow", "Output resolution", 0, QApplication::UnicodeUTF8));
669 #ifndef QT_NO_TOOLTIP
670  label_8->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Color table must be provided as ASCII text file with five (space delimited) columns:</p><p>value red green blue alpha</p></body></html>", 0, QApplication::UnicodeUTF8));
671 #endif // QT_NO_TOOLTIP
672  label_8->setText(QApplication::translate("MainWindow", "Color table (ASCII)", 0, QApplication::UnicodeUTF8));
673  label_13->setText(QApplication::translate("MainWindow", "compressed", 0, QApplication::UnicodeUTF8));
674  toolButton_ct->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
675  label_12->setText(QApplication::translate("MainWindow", "Interleaved", 0, QApplication::UnicodeUTF8));
676  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
677  label_6->setText(QApplication::translate("MainWindow", "Output data type", 0, QApplication::UnicodeUTF8));
678 #ifndef QT_NO_TOOLTIP
679  label_15->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Create extra raster file containing information on the selected input file for each pixel</p></body></html>", 0, QApplication::UnicodeUTF8));
680 #endif // QT_NO_TOOLTIP
681  label_15->setText(QApplication::translate("MainWindow", "Ouput info on selected pixels", 0, QApplication::UnicodeUTF8));
682 #ifndef QT_NO_TOOLTIP
683  label_5->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Assign projection (e.g., epsg:3035). Notice this will not re-project the image. Use gdalwarp instead.</p></body></html>", 0, QApplication::UnicodeUTF8));
684 #endif // QT_NO_TOOLTIP
685  label_5->setText(QApplication::translate("MainWindow", "Assign projection (EPSG:code)", 0, QApplication::UnicodeUTF8));
686  tiled->setText(QApplication::translate("MainWindow", "Tiled", 0, QApplication::UnicodeUTF8));
687  label_11->setText(QApplication::translate("MainWindow", "dy", 0, QApplication::UnicodeUTF8));
688  toolButton_file->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
689  label_3->setText(QApplication::translate("MainWindow", "Output image", 0, QApplication::UnicodeUTF8));
690  tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
691  label_24->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
692  label_25->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
693  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
694  toolButton_Run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
695  toolButton_defaults->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
696  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
697  } // retranslateUi
698 
699 };
700 
701 namespace Ui {
702  class MainWindow: public Ui_MainWindow {};
703 } // namespace Ui
704 
705 QT_END_NAMESPACE
706 
707 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/classes.html0000644000113200011300000004652712647637663014221 00000000000000 pktools: Class Index
pktools  2.6.6
Processing Kernel for geospatial data
Class Index
B | C | D | E | F | I | K | L | M | N | O | P | Q | S | T | U | V
  B  
Filter (filter)   OptFactory   
  n  
pklas2img (qgis.pktools.pklas2img)   
Filter2d (filter2d)   Optionpk   pklas2img (qgis.pklas2img)   
BadConversion   
  I  
  P  
neural_net (FANN)   pkreclass (qgis.pkreclass)   
  C  
  p  
pkreclass (qgis.pktools.pkreclass)   
ImgRasterGdal   PosValue   pksetmask (qgis.pktools.pksetmask)   
Cache   ImgReaderGdal   ProcessingPktoolsPlugin (qgis.pktools.ProcessingPktoolsPlugin)   pkcomposite (qgis.pkcomposite)   pksetmask (qgis.pksetmask)   
Compare_IndexValue   ImgReaderOgr   ProcessingPktoolsPlugin (qgis.ProcessingPktoolsPlugin)   pkcomposite (qgis.pktools.pkcomposite)   pksvm (qgis.pktools.pksvm)   
Compare_PosValue   ImgRegression (imgregression)   
  Q  
pkcrop (qgis.pkcrop)   pksvm (qgis.pksvm)   
ConfusionMatrix (confusionmatrix)   ImgUpdaterGdal   pkcrop (qgis.pktools.pkcrop)   pktoolsAlgorithm (qgis.pktools.pktoolsAlgorithm)   
CostFactory   ImgWriterGdal   QMatrix   pkdiff_accuracy (qgis.pkdiff_accuracy)   pktoolsAlgorithm (qgis.pktoolsAlgorithm)   
CostFactoryANN   ImgWriterOgr   
  S  
pkdiff_accuracy (qgis.pktools.pkdiff_accuracy)   pktoolsAlgorithmProvider (qgis.pktools.pktoolsAlgorithmProvider)   
CostFactorySVM   Increase_IndexValue   pkextract (qgis.pkextract)   pktoolsAlgorithmProvider (qgis.pktoolsAlgorithmProvider)   
  D  
Increase_PosValue   Solver::SolutionInfo   pkextract (qgis.pktools.pkextract)   pktoolsUtils (qgis.pktoolsUtils)   
IndexValue   Solver   pkextract_grid (qgis.pktools.pkextract_grid)   pktoolsUtils (qgis.pktools.pktoolsUtils)   
DataModel   
  K  
Solver_NU   pkextract_grid (qgis.pkextract_grid)   
  s  
Decrease_IndexValue   StatFactory (statfactory)   pkextract_random (qgis.pkextract_random)   
Decrease_PosValue   Kernel   SVC_Q   pkextract_random (qgis.pktools.pkextract_random)   svm_model   
  E  
  L  
SVR_Q   pkfilter_spatial (qgis.pkfilter_spatial)   svm_node   
  U  
pkfilter_spatial (qgis.pktools.pkfilter_spatial)   svm_parameter   
Egcs   LastReturnFilter   pkfilter_spectral (qgis.pkfilter_spectral)   svm_problem   
  F  
  M  
Ui_MainWindow   pkfilter_spectral (qgis.pktools.pkfilter_spectral)   
  t  
  V  
pkfilterdem (qgis.pktools.pkfilterdem)   
FeatureSelector   MainWindow (Ui)   pkfilterdem (qgis.pkfilterdem)   training_data (FANN)   
FileReaderAscii   MainWindow   Vector2d   pkgetmask (qgis.pkgetmask)   
FileReaderLas   
  O  
  d  
pkgetmask (qgis.pktools.pkgetmask)   
ONE_CLASS_Q   decision_function   
B | C | D | E | F | I | K | L | M | N | O | P | Q | S | T | U | V
pktools-2.6.6/doc/html/md_examples_pkfilter.html0000644000113200011300000002276212647637662016754 00000000000000 pktools: examples_pkfilter
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkfilter

Examples of pkfilter

Filtering in spatial domain

Filter input.tif with morphological dilation filter. Use a circular kernel (instead of rectangular) of size 3x3.

pkfilter -i input.tif -o filter.tif -dx 3 -dy 3 -f dilate -circ

Similar to previous example, but consider only values of 255 for filtering operation. Typical usage: dilate cloud values in input image that are flagged as 255

pkfilter -i input.tif -o filter.tif -dx 3 -dy 3 -class 255 -f dilate -circ

Filtering in spectral/temporal domain

Applications with moving window

Calculate the median value for each pixel, calculated on a moving window of width 3 (-dz 3) over all input bands. The output raster dataset will contain as many bands as the input raster dataset.

pkfilter -i input.tif -o filter_stdev.tif -dz 3 -f median

Applications of statistical functions in spectral domain

Calculate the standard deviation for each pixel, calculated on all input bands. The output raster dataset will contain a single band only, no moving window is used (-dz 1).

pkfilter -i input.tif -o filter_stdev.tif -dz 1 -f stdev

"Smooth" (interpolate) nodata in spectral/temporal domain (-dz 1), using a linear interpolation. The following interpolation types are supported: akima (default), linear, polynomial, cspline, cspline_periodic, akima_periodic (please check gsl page for more information on the interpolation types).

pkfilter -i input.tif -o smoothed.tif -dz 1 -f smoothnodata -interp linear

Filter with spectral response functions

The following two examples show how to use pkfilter for spectral filtering a high dimensional input (hyperspectral image) to a lower dimensional output (multi-spectral image). Notice that the input wavelenghts must be provided as -win value1 -win value2 -win value3 ... To save typing, we assume the input wavelengths are listed in a text file wavelengths.txt (single column ASCII file with all wavelenghts listed in nanometer).

cat wavelengths.txt | while read W;do echo " -win $W";done

In the first example, the hyperspectral image is filtered with a spectral response function. For each spectral response function provided, a separate output band is created. The spectral response function(s) must be listed in two column ASCII file(s) with the wavelengths and response listed in the first and second column respectively. The response functions can but must not be normalized (this is taken care of by the filter utility).

In this example, the input is a hyperspectral image with N>>1 spectral wavelengths (bands). The output is a multispectral image with 3 bands, where a spectral response function is provided for each output band.

pkfilter -i hyperspectral.tif -o multispectral.tif -srf srf1.txt -srf srf2.txt -srf srf3.txt $(cat wavelengths.txt | while read W;do echo " -win $W";done)

The next example is similar to the previous. Instead of providing a spectral response function for each output band, you can also provide the center wavelengths and full width half max values. Here, a three band (red, green, blue) output image is produced.

pkfilter -i hyperspectral.tif -o multispectral.tif -wout 650 -wout 510 -wout 475 -fwhm 50 -fwhm 50 -fwhm 50 $(cat wavelengths.txt | while read W;do echo " -win $W";done)

Applying the Savitzky-Golay filter to reconstruct a time-series data set

The following example reconstructs a time-series data set based on the Savitzky–Golay filter, as suggested by J. Chen 2004.

Input is a multi-band (Byte) raster dataset containing a noisy time series, e.g., a normalized difference vegetation index (NDVI) with cloud contaminated (low) NDVI values. Output is the reconstructed time-series data set, which approaches the upper NDVI enveloppe. Please refer to J. Chen 2004 for more details.

Preparation

Create a long-term change trend fitting (lta.tif) using the Savitzky-Golay filter. Choose the number of lefward (past) and rightward (future) data points (e.g., 7). The order of smoothing polynomial in the Savitzky-Golay filter is set to 2.

pkfilter -i input.tif -o lta.tif -f savgolay -nl 7 -nr 7 -m 2 -pad replicate

Initialization

Decrease the number of lefward (past) and rightward (future) data points to 4. The order of smoothing polynomial in the Savitzky-Golay filter is set to 6. Valid data are from 0 to 250 (nodata is set to 250).

pkcomposite -i lta.tif -i input.tif -o iter1.tif -cr maxallbands -max 250 -dstnodata 250
pkfilter -i iter1.tif -o savgolay1.tif -f savgolay -nl 4 -nr 4 -m 6 -pad replicate

Iterative process (repeat, e.g., 5-10 times)

pkcomposite -i input.tif -i savgolay1.tif -o iter2.tif -cr maxallbands -max 250 -dstnodata
pkfilter -i iter2.tif -o savgolay2.tif -f savgolay -nl 4 -nr 4 -m 6 -pad replicate
pkcomposite -i input.tif -i savgolay2.tif -o iter3.tif -cr maxallbands -max 250 -dstnodata
pkfilter -i iter3.tif -o savgolay3.tif -f savgolay -nl 4 -nr 4 -m 6 -pad replicate
etc.

Output savgolay<n>.tif is the reconstructed time-series data set.

pktools-2.6.6/doc/html/inherit_graph_6.png0000644000113200011300000000232212616110567015416 00000000000000‰PNG  IHDR`%2o{°bKGDÿÿÿ ½§“‡IDAThíšKH2]ÆÏ|~Y˜á[–—²ˆ4)ˆP¡Õ¢m&bTtƒ "jF®jQ‹ܨQTºjS!a´¨¤0Ò.„v5³4oó.ßÒw>,*>æ·òüçážóxæ0Á0 p"óÏwøéàa€„ÿ†...º»»=Ïw¹ùvââ⦦¦222ÐÊFN'‰¾ÜØOA«ÕJ$’ˆ!h4š/´ô³€ èM?ƒ0ÀÂ< ¢  !33³©©éæææƒ> ÊÎÎ~óbX[[ AÕjý/¬Vëû#ó&Qî ­­­««+›Í677çt:Ãáˆ$>==MNNÆìy~~¾¿¿677£³÷‰DPJJ ƒÁHKK«¬¬\ZZÊÊÊR(‘ÄÁ`ðîî³guuµV«E‡+++ÑÙûD>á ‚ ¨««K¯×#CNÇçóI$“É F$‚H$Òh4è]¶°°P__^u8ÍÍÍÉÉÉ,«¿¿ßãñ¹\ÎårJKK···¥Ïç“J¥t:F£I¥RŸÏ÷¡åÁ!¨Õê7•°,Kheggçׯ_0 ;N"‘ØÚÚj³ÙT*àúúÚb± mà žGGG cww†a‡ÃA"‘nooѹÄbqUUÕÉɉÉdÊËËžœœ¤Ñh‹‹‹———z½>55™e||\(^\\˜L&@000jsijµúÊçôúúj6›].W ØØØ@”¡þ ОÝÝÝ2™ †a•JUSSƒÖ½^/@888@š,..r8.—;??zP*•È,999WWWHqmmÇã}$ 0¯Q`±XØl6€H$···»\.>Ÿÿ^ùwH$jkk}sÙíö@ €Làp86› ‚ ‡jòóó‘çççL&­S(”­íã;( –—— Á0üòò»¼¼ Ýn7x·ƒÂ О~¿ŸN§onnÆÇÇÛíö7;èðði²´´Äf³sss•J%j¹aaf±X¨½‡‡³Ùü ;èææ†L&«ÕªP(ÎÎÎVWW¯¯¯^¯—H$ºÝî‘‘ÀÓÓSBBÀår‘Éä°´-@ …………4 ­ÇÄÄ444ôôôÌÎÎ>??ŠÅb*•*•J)JQQÑÞÞÞÐÐ"®««“Éd½½½Ñ-€hwJzzºX,Fþm„ÉÉɤ¤¤ôôôéé鯯FæóùÊÊÊÈdr$Aè®\__LMM¡s!õûû{‰DB¥R™Lf__ŸÛíöûýr¹œÃáÄÇÇ—””FļÓéliiILL¤R©ÏÏÏ_}Hÿyþ.†x@àa€„x@„y’ž™™ùz?—Ї"ƒÁ@ ¾ÛÑwB  Ch&ŒôWð3< ð€0ÀÂà7¶i¹ Òy#IEND®B`‚pktools-2.6.6/doc/html/classImgReaderGdal__coll__graph.png0000644000113200011300000003441512647437044020531 00000000000000‰PNG  IHDRY--#„[bKGDÿÿÿ ½§“ IDATxœíÝi\×Úð3ÙØwö5 €¸€×ªUëvkQK‹q_Ð^­¶V©Öï{ñçbµZŠb‹bݪh­–ÚŠì¶l‚ì [d™y?Lon„$²†„çÿi29sæ™™äÉœ™s&A0èѨ0 @. ¹@‚\@r€Ä‘––ÖÖÖFU(ƒœ®®î¸q㨎 ^¯ä‚¶¶6{{{ª¢´š››ËËË©Ž jŒ¯Ùl6%¡ fÐËP®‚\ A. ¹@êÛ\PXXˆaXÏÞíeå½××õ0 ¨![ZZö¾žî255ýì³Ïz_²øÕU?A ¹ÇñúúúÞ×Ó]–––û÷ïï}=ÊâWWýh„nç‚«W¯Ž1BWW×ÕÕ566!Dö–³¶¶FI¥Òˆˆˆ!C†M˜0á·ß~#—’?ßîpîÇårÙlö‡~ØÚÚŠJIIñññÑ××·±±‘};¯WVD" sttd³ÙK—.mjjêqüdwîÜqtt<}ú´,N Ãâââ<==ÍÍÍ<ˆ"âøñã^^^ÆÆÆÓ¦MKIIQØ ¨««#7 €Ž“ššZSSC('tttŽ?^UUÃ`0AAA¬ž¨¨(‡“””TYYyíÚ5[[[ò­¦¦¦èèh²Œlš\pÚ´iùùùiiinnnÛ¶mãñx,kåÊ•åååçÎCÕÖÖª^oDDİaò²²²³³ÇŽ»eË–ÇONÏœ9óîÝ»²ù¡ùóç766FGG#„êë룣£íììnܸQWWwûöm77·;óñãÇË–-c³Ù•••*v)©¦¦&55õµÅè;ÝË L&322²±±Çq>Ÿ/•Jå¿KC† 9}ú´¬ü™3g:|Cä‘ fee‘/ããã]\\ÚÛÛŸ={&¤Réýû÷Bª×;tèФ¤$²’¼¼<Ùtâ—I~>Bˆü®ŠD"2$oo︸8YÍçÏŸ' …³gϾñÆ>>>'Nœàóù*ö§ ä@¹îµÌÌÌRSSÓÒÒìíí'OžüàÁí•ÊÊÊF%{9bĈ×ÖéîîNNxxxTUU±X¬üü|??¿Ñ£GŸ>}º+ë---•Uâéé9gΜÇ/‹¤óLò‡Éd’/‹ŠŠ¼½½eïzyy!„~úé'''§;wî|ýõ×Ož< 144|í` è^. …8Ž_¼x±¡¡aÕªUþþþ òœ333e/sss_['ùó‹ÊÏÏwrr …[·nMOO?vìXWÖkkk[RRBNgddìÝ»·Çñ“d_xy²†“““üÖ={ö !Äf³½¼¼=zôðáCÕ—-hº— 0 ›1cFbb"ljDL&S__Ÿ|K  „Ö­[·uëÖäääêêê7nìÞ½›|·¹¹ù»ï¾ë<úôÓO ÿý÷Ï?ÿ|ùòåííí"‘ˆÅb …°°0„ŸÏW±^„Ð’%KvìØ‘“““““³aÆÒÒÒÇßuëׯ ½uëV}}ýÝ»w÷ìÙƒaØÈ‘#SSS“’’þúë¯!C†¬^½úÉ“'ݪÊÈ7^{½€ ˆøøx.—Ëb±<<<’““ ‚‹Å'N444$B"‘DDD¸¹¹Œ?>--\Eç6¹lâÂ… ÎÎÎçÓO?moo'"**ÊÜÜÜÁÁáØ±cAAAGázeõ´µµmÙ²ÅÖÖÖÄÄ$((¨±±±Çñ+Œ“ „PAAü´T*=|ø0—Ë511ñóóKNNf³Ùò+jllŒŠŠâr¹%%%¯i¨Áõ0`„ÜhÙ{÷îyyyq8œþOI'%%ÅÁÁaäÈ‘äËÄÄÄððð§OŸv(†ã8Žã FDZáÔÖÖæååM™2¥/B +`T8´QYaÇoݺ5gΜqãÆñðáÃï¿ÿž’g·0  Ü~‡Û·ooiiyçwZZZfÍšE>eP!SSÓC‡lß¾=((ÈÏÏïáÇ _¾|922ò£>Šg±X}>fÐS‹Å*TqŠ€r·ÐG`"` t¹ äB $È„ H A.^éwˆaX^^^^^UÑôÆÅ‹ÏÂ,P0I#({X+ýã•~‡MMMb±˜Âhz¬½]2yòa„°>a2éT‡ÓL&ÓÔÔ”ê(ÀàõÊyæ~oÞÌik“ Dä伜1Ãûõ ^¥%× ÓhF»xñªc@#iC.àñÚ~ú)O*Å¥RüÖ­¯êˆÐ<Ú nÞÌÆñ¿¯zà8qëVµñ ‰´!\ºô‡ì (A—.A3€nÓø\PWÇô¨@þ¼àáÃüº:¥Ï5(¤ñ¹ %%³Ãy î]Ë¢*4”Æç‚‹Çq\~Ž/þNU<h(ÍÎ/^Ôgf–½š Ž/ÊÊ( ¤Ù¹àÊ• CÁ&0´+Wžö<h.ÍÎ ¿‹Åxçù‰4!š tƒç‚‚‚šÂ„ˆÎoùnmÿG€†¸ÿðZA¼ù¦›¬gÁóç/B..ÿë †½2ì  šö|aÖ®=ƒ:qbÕ ‘4¸P#È„ H A. ‚\ A. ¹@‚\@r€¹€ä r!ÈäB $È„ H A. ‚\ A. ¹@‚\@r€¹€ä r!ÈäB $È„ H !ÄP{mmm j¯öµôô0„Peeeÿ¯ÚÜÜ\WW·ÿ×Ûp¯­­Åqœê@@·õòsˆ¡ÆhByyyµµµê­s€ãp8^^^TG¡uuu¹¹¹TGz¢—ŸCõŸÁf³‡ ¦öš¦ÜÜ\µçS ‘Û2eʪÝÓûÏ!\/ ¹@‚\@r€¤¹ °°ðVè"ÞçÝ ^ayØ([ZZöum¦¦¦Ÿ}ö™ºÖdÔ{øþzµÏÊ8Ž×××÷um–––û÷ïW×Z€ŒzßÀ_¯ö¡,\½zuĈººº®®®±±±¡qãÆ!„¬­­BR©4""bÈ!FFF&Løí·ßÈ¥äϵä§U×F–¼s玣£ãéÓ§eKaçééinn~ðàA„AÇ÷òò266ž6mZJJÊÀ?µ£„_@@ÀæÍ›É™ííífff×®]C‰Åâ­[·ZYYq8œ­[·ŠÅb‰DæèèÈf³—.]ÚÔÔÔa½¡¦¦¦åË—[ZZÚÛÛoÙ²¥­­MþèÿòË/6¤®®®µµU~޲à•ÕÜyÓBqqq\.—Íføá‡êï¼]ªãé?„ºåäääää¨.#tttŽ?^UUÃ`0AAA,ž¨¨(‡“””TYYyíÚ5[[[ò­¦¦¦èèh²Œlúµµ‘Ó3gμ{÷nFF†l>BhþüùÑÑÑ¡úúúèèh;;»7nÔÕÕݾ}ÛÍÍíµ»¨+Û«AjjjRSSU—Qïá»pá‚££#ŽãA$''ÛÚÚŠÅb‚ 80oÞ¼/^deeùúúnÛ¶-""bذaYYYÙÙÙcǎݲe ñ߃+‹-88xúôéEEEYYYÞÞÞ{öì‘?ú@VòñãÇË–-c³Ù•••ò[§,xe5“KɦɉiÓ¦åçç§¥¥¹¹¹mÛ¶M¾dçí’_ûíÛ·ÉQ\\Ü㦆Ï!5¹ ¡¡ÉdFFF666â8Îçó¥R©üþ2dÈéÓ§eåÏœ9£â;ùÚÚÈ鬬,âÕBˆüÜ‹D"„PAA··w\\œ¬æóçÏC.èL½‡¯¥¥ÅÀÀàñãÇA|ðÁÛ·o'ç{xxTUU‘Ó·oß5jÔСC“’’È9yyyä´üzE"N—ޤ¤$777ù£O„P(<{öìo¼áããsâÄ >Ÿß!…Á«¨™œÓ!ÈVïââ"_²óvu ¢¢",,ÌÞÞÞßßÿæÍ›R©TÙ®“§©¹€ ˆ_~ùeþüù“&MúñljWªžž^FF†¬ðÓ§OU'U×FN‹D"¢S.øë¯¿dÓzzz™™™²jåO"z¹½š¢+¹€P÷á[´hQhh¨@ 000ÈÏÏ'gvfcbb¢««›ÝaYùõ–••!„„B!ù2++KWWWþè“¿ºË–-ûí·ßÈ3‘ί¢frN~~¾|.•ÌÌÌìP²óv) C$%$$Lœ8qÈ!/^¼P±÷H½ÿRs½@(â8~ñâņ††U«VùûûwÚèì윙™){©z´Ìkk#1™ÌÎ3i´Wö€“““üºž={ÖÅ-TÔ{øBAAA—.]ºråÊèÑ£ÝÝÝÉ™–––äÇ´±±1--ÍÖÖ¶¤¤„|7##cï޽걲²¢ÓéÅÅÅäË¢¢";;;rš<úl6ÛËËëÑ£G>$/7t¦0x5K$„PEE…|%ä—!”ŸŸïää$ÿVçíRFMMMnnnyy¹¯¯¯žžžÂ2jÖ›D¢PWò“P(ÔÕÕ½téR]]Ý·ß~«««+ ÉÝGž³}ùå—ç‡~¨ªªº~ýº««+RÞà|mm Ïåˆÿž ÈOýõ×ööö7oÞ|ùòå;w†ŠaXï·Wƒtå¼@½‡ ò’¡»»»üÉùÆçÏŸ_RR’™™9vìØ 6„……1";;;;;{„ kÖ¬!þ{@e§ú‹-š>}zqqqvvö°aÃvïÞÝá‚AÙÙÙk×®µ´´\µjÕüÑaë”߹溺:„PLLLssóœ9sÜyÁÛo¿]PPðøñcww÷}ûöÉÇÐy»ä×.•JoÞ¼`gg·{÷Š.8 n#ÄÇÇs¹\‹åáᑜœL„X,ž8q¢¡¡!A‰$""ÂÍÍÍÀÀ`üøñdî$”«U×Öõ\ •J>ÌårMLLüüü’““Ùl¶Z¶WSt± ÞÃGDHHˆ¡¡¡üµ=·bÅ 333 ‹–––¶¶¶-[¶ØÚÚš˜˜566vX/A K–,±°°°±±ùä“OdIªó&466FEEq¹Ü’’ùùÊ‚ï\3Aááᦦ¦\.799Y~/\¸àììÌáp>ýôÓöövù:o—üÚ/]º4nܸ¸¸¸ööö×y½ÿªÿùä9•†ŽYNIIqpp9r$ù2111<<œl1*£ÑÛÛYmmm^^Þೌã8Žã †úï÷ŒX,Vؘ}­ÞP_£ ++kñâÅééé­­­iii»víZ½z5ÕA>D£ÑN"@J®jõ´‚ÐÐÐÖÖÖ€€€ºº:WWו+W®]»–ê è ^Á`0ÂÃÃÃÃé€þmB $È„ H õÅ} ÃjkkïÝ»§öš»¢í]XD7›*êÏ•r8œþ\]Ÿ"á÷øðáBL\O×ÓÄ/i¢—˜¨–&®§é»I­ ÕeŸÑ›²,g·3-4zù9T.pqqa³Ùj¯¶‹þLç•¥4» ·³›¬ßo+544ì·uõ5 ‹.ö]kk”¶TJZª$­•R^™ˆÿB"¬•J„8BaˆFÃp!‚Àh˜×{›aý2º¦×jZÛÊ3ëZóX^+L¸†M“ždÓËÏ¡úû Së×Èòœïk™ú´—¼ ¬XT‡£µ²ãjÓ¢ÊB4:†ÑTB ÎŸ# a›îÌõ3ëÿ{g¦eJZq C–žúSþÏÙÔEKþ)óµ´ízH ¥ÑTDÜ}NàZ•æûñÆdk—R±¢D€BhÒNG J!snFcb „—Ÿ=þºB*$mËí|)N \B¼Ìk}z²šêp´–™«®û,s:Sù)4†&‡9 °èÇ ÔÃ埦¸˜@IÅÙ±5‰äÕæ´PWŸÓº\Ð,!£œH?Q]›­ý‡*>!Ö*þ™ýÍ-Cü5/ „ìÇ3õÿ÷½À¥ˆ_!º²ü¯{_ü}5DKi[.ñ¥²i #~ú칸Uª¢<è1=s¦…».ÑéÔCcÖÛû€²ëǽDc`ÎSLå· —ò“ëæçUþΧ0¶>¥u¹@ð¿o>.E—âG‘寣­Jî6]œŸ'¨w¼öŒa£VXZiMQ\êáòO3\Úñ.%„/E×>,xþB+`´-t8H¸”ÈO®/¾ÝHU<ÚGÄ—¦î,¹Zl?Î(ðò09–²ŸPŒ†F,áŒYoKm„½g7ΈÁRp)— D ?/¿L;\Ñù]M§}¹ c:Ç0ìçÿ”¶Ôôkï#mUþ+ïÒ¼Ê?ø³Žº½µÛIǘ>r™5yf@£an~æo|dGuŒjÀС9¼eJ£+H4fê¤3l!'=ºÊm–™ž¹~¢´jl¯¬ýçÿ+µù‡‘ÛÆìaúõ //þóýÓC9à ¨ h‰O˜—çô–É„mTÇ¢~Z• :K zÆö6˜´Ã‘ê@4 ~û²ÂØAÇsž%Õ¡ 8×îï)wÁÃŒ«£°»N«®t6Äߢøf£¤ n'vCÚå9ß×êšjUûQ]Üfš›»ë=þJ ¯Cky.p›m.ã%wÿ£.èìÉñªÜïë¦pq™nJu,FCÿøÐ†ÆÀȱŒÚDËÛ¡Û[‹E|)ÜDèŠ?/¿|°÷ŤÏ=æBë`ÐÑòó„ÐÙUOø‚*èƒüU邇ûË|ר@"œ´?8L4»ÉžeH§:WÞ~ûÓb×·ÍF‡ØP  †ö·@W´¾§GWûØž¡§ý?@!È„CÐ èu~’†‚\@8ñ½Ná T¢ Ô‰ ˆÅ‹“_SXXHþƒ€l09ÎÎÎK—.­«ëÕà¿#GŽØÙÙárOe&ÂÉÉé믿VX^]G£aCõJRµ¤'ÛàÊí<éo_Tô݃++++ãââòòòB¦¦¦Ÿ}öY­H-(ŠÿèÑ£ªªªòòòS§Nñx<__ߦ&¥ß¨ââbKKU],XP]]ýèÑ#Ùœôôô²²²ùóç«3hEœ&™V¤ñµãYéƒ+`Ê¿ZÿäDUÕ/ BŽŽŽ!KKËýû÷÷ÑŠz¯­QrÁ?·.·•’µ³Ùlkkk;;»©S§^¾|ÙÕÕõðáÃÊ ã8^__¯¢6++«éÓ§'$$Èæ$%%½õÖ[66}ÞWÂa¢±D„W¥kÃÒW.`ÑGh“{¡®¹´íµ…1 ;yò¤§§'›ÍÞ¿ll¬‹‹‹‰‰É®]»”-2nÜ8„µµ5Rr"*‹·nÝjeeÅáp¶nÝ*‹ÉÅÅÅyzzš››ùä¡PH¼:ÎÁÁ!88¸¦¦FVOç ‹Å'N444TV@¶ì?þˆúî»ïäë\^þˆ„‡‡›ššr¹ÜäädÕ‡)>>žËå²X,äädeûAsÁ8EBƒ­@™ÁxA-”uh×úó¬A»áZÚ„  /ãduÆéjª£©õ¥øÏË/©Ž¢W ü‘­Î“cU¿}QàT tScQÛƒðmMªé9¸^ð?\?3†>íÎgÅâVé„mŽäIÐeFv,„¿B¤¹ÿ7Ÿ÷W8½eòv$· ¥áÞî­yv•¼ºÜÖꧪ£ÐB†Ö,Œ†ñ+Û©¤ç tä0ÁøŸ.Ïï4Ýß]*i׆gTÈË8Uw©W ј‡É¯Ðà¿ä\ €Ã“™G¸åi¼Ç_UP‹šµ5I4÷$v€3²ciôy|,³më¡}ÿ¶„K¾Ø'Œìtà¼@;Ù²tŒµ- Big!ÐKp^4 Aÿûˆí?Œ4:ÏB.\Á½Ò>b=ÊÐz”!A@ݶIDATÕQô|.º§¥Vœw©Ns;#8Âÿv¾¹ {ªÒù¿F”ߨT(lPúˆáÌáMcSEÏ>Æ&u[]nËíÏE|éØí‡¾g¿²@;@.è I;žyº&ãT5ÛKÒ'3.üÒ¹ çj³[~þÏ ~yû„mCÞ³ :zrA¯àb"ãLµ¡Íh#ªc W  6…7ôÌvc©¤' jSøc£ææ¸§ØWšž·µó4øÉ è:˜D¤©c[!ô•GË.¼›û䛪vž”êXþ‡À‰ÂU<„f £Ñ0×ÔF7䂾òÏH×áK9¹ µüsžœ¨ñDFÀhØÃeåi<ªÑNâ8÷䂾Â2 û®¶ùàª÷ð`NÎ÷µß¿›óû‘ÊÐ[ÑÈ–Å/‡ó‚>Ñ4øb<䂾Å2¤û†Ø]óµÒ:ÿJýo_Rÿp37½ú!ÕQh'Œ¦Áçp¡?° è#—Yy±Å-Ô_X2wÓˇǜõ L“¯@.è?t΢þDÌÜM¯¥F$âKYFZ÷¤ª¹¾m&nÕÔ nÞ d"‘èÂ… mmm]*-¥aiöĈÙ/# ‹AÌy†8-ý±:u˜1c†³³3ÕQPŒ ˆ%K–üðÃ@~Z+j—˜˜ØõC`£ëºûÖ_×n0„éÓ5¬ÇtPPÕ‡”zååå¡ÒÒÒÓ]WTTdaa¡ì]h#ô ‰D‚ºùw£_£M}Žf $÷ç ' BŽŽŽ¦»ÇñúúzeïRß|@»avòäIOOO6›½ÿþØØX“]»v©Xª©©iùòå–––ööö[¶likk7nBÈÚÚ!$?ºzõêˆ#tuu]]]cccÉ™b±xëÖ­VVVgëÖ­b±¸ÃRõò¼(ûV],X°`Áª£è9„PPPÇûî»ïB<ïĉ¡—/_*[*88xúôéEEEYYYÞÞÞ{öì)((}¨ä§ŽŽÎñãÇ«ªªbbb yAáÀóæÍ{ñâEVV–¯¯ï¶mÛä—R§Z·ü riA.HOO'B$u˜.((P¸ˆH$¢Óé999äˤ¤$777e¹ ¡¡ÉdFFF666â8Îçó¥R)AUUUd™Û·o5Ju.€6}ÎÈÈ!Äd2;L+SSS#•J¹\.ùÒÍͼX¨™™YjjjZZš½½ýäÉ“ræ•+W†®££ãââröìY‚ ,,,BVVVd‘H´eˇÃf³·lÙ"‰ÈOÞO?ýäààðàÁ77·;wîÈoH]]]FFA‰äàÁƒîî†o¾ùæ¹sçÈ8;G¢•¹àÔÄŒg—먎¢‡ ô‰žåwž¢££íììnܸQWWwûöm777Y.ÈÈÈàóù|>¿¢¢â_ÿú׊+È y<‹ÅZ¹reyy9ù¬­­Uxÿ©Ã×RÙ½¨™3gÞ½{·¾¾žF£UWÿýëÇ—CDTT‡ÃIJJª¬¬¼víš­­-BHa$Ú— $íÒo}Ÿ”Ük¢:‚\Ð'z– TÜyòööŽ‹‹“-xþüy¤¨_£¡¡a^^Y¦½½ýÙ³g@*•Þ¿Ÿ¬Gáý§_Ke÷¢²²²‚¨¨¨@‘ßü1dÈÓ§O˪:sæ BHa$Ú— Õ¢o}ŸTgºµ”²«}¤ pípQq穨¨ÈÛÛ[VÒËËK6-Ë&---k×®]¹r%9ŸÅbåççûùù=úôéÓäLe÷Ÿä)»åáá²¶¶ÖÕÕ%¿ÉHî7ù²¬¬lÔ¨Q²ªFŒ¡,íÓÖ$Féšu¯_¿²ofßĨ äÍàää”››+{ùìÙ³Îeôõõ—/_ž››K~’„Ba``àÖ­[ÓÓÓ;F–QvÿIž²{Qdb¢ÑhÓ§OÿöÛoå!σBÎÎÎò÷ɘF¢}„„^7sÁÀ¡©q6ëׯ µ°°=ztffæž={Þœ766æóùÀÈȨ½½]$±X,¡Pøïÿ!ÄçóÉûOçΛ‘Ѓ>?*¤¤¤888Œ9’|™˜˜þôéSuÕ?"„¨D3ôø¼®h†¬¬¬Å‹§§§·¶¶¦¥¥íÚµkõêÕT^¯g–;A–H$aaaŽŽŽl6{éÒ¥MMMdÉ””}}}›ýû÷w¨§ó°eU±ª÷üÔ>NQ,ïØ±ÃÁÁAWW×ËË+""B,«±þL£Û¨û–ö‰ˆˆ6lXVVVvvöرc·lÙB(éB"ßFèÜUDU¨jßx@À˜eµÒô\ÐÝË û€ :4))‰,——GN¿¶ãFç®"*B…6}«»–ö)--uww' xzzΙ3u¡ãF·†-C.``QØÄÖÖ¶¤¤„,‘‘±wï^Ô…ŽÝ¶ ¹5àWˆ~, ÔðT{…c—,Y²cÇŽœœœœœœ 6”––¢W;n„……!„ø|¾|Uʆ-+¹5¨ÏoͯUËáèêêž9sæ³Ï>³³³‹ŠŠŠ×ÕÕݾ}ûŒ3Þyç‰':::È}‚N§#„´é^FFi4=¡ð™HTPç¸>ø Ÿ×Ø]‚‘¡5‹ê(zrAŸ˜={vbb¢Tª©­×Ù?”¤¦Vêë36fËùÇ?,­­õûmí£Gî·uõLsI»±ƒNw—RökAÉ%´@—ío¾^_/ Ä`Ð$|èPë  q¾޶2êø÷sÝýÍ}WÛPHÏA.]uófΊ1²—†Ñé4‰Dêím8fîÜÑææ†G!©?5!cÚ>ךQKÏA.ݰtiô½{J$¸üL:#Î>eÊÐ Æøù g2׿¹7 >›ïiî¦Gu,=¹tCiiý[oí‹_a±"‘Äßä‰Ëû7.Š ÄÏj`¡–{ŠTÑàÐAÿsr²Ø¼ù:]ñÇF$’`öþû¾ýåôÌ™^lNrè®õë§»º²¦ ÃBCgΚ5¢ÿ£½¹tƒA‹Œ\ˆã›–t:ýÝwGnÜøOJ¢½¹tÛ˜1.oÈ_ d0hzzL.—CaT — €ž {O__‡ì*C§Ó t?úèŸGÞY¼ø[OHut ' €ž05Õß±ã]²×AÇ/ýè£é—.­ÏÉ©˜9ópAA Õ‚nƒ\zhÑ¢qÇÛ!„vî|oòä¡¡1c\nÜØll¬ûî»_ܺ•Cu€ {è{öì¡: ‘0 7ÎÍÅ…2Y6ÓÈHwÁ‚1ÅÅu\×Ña¼ñ†+…öû{J[kÅìaßçÆ&žss㸹u¼^¨£ÃøòËEC‡ZïÛw-'§"*ê==ÍÀ§Ú‹Ÿ›-†hpwCh#õÃ0lýúégÏ®IMýóý÷¿*/o¤:¢¾ÒR#nk–˜C.@…iÓ<¯_ÿ¤½]2sfÔ¯¿QNŸh(lE2w‡\€J..ì””Gv :þý÷ª¼©¡j³ZMutM´¡­ ¹ô-##ݘ˜kÖLÞ²%!44AÙ¸& U“Ý®ñW I @Ÿ£Ói;v¼{ìØ’ÄÄ'Ç^¾P‘z8ªËmáxC. ;ÞßçÊ•þþ_<{VEu8jÐü¢M$jÁÝD<¿ô«††–Ó™™e_|4{öHªÃé-A•HŸÃ¤Ñµá!· @‹¥Û·_úþûßþõ¯i۷ϦѴዤ jœ;÷뎉S¦x9²ØÈH—êpä@Nj׬9miixòä*'' ªÃìàÚ! Ìo¸Þ¸±™ÉdÌœõË/ùT‡3ØA.T²±1MJÚ0q¢û¢E'޽Cu8ƒ´õ‚8vìî¾}×|##êê2©Žh0‚\Š;wòÖ¯uw·Ž‰Y9Àÿ‹I*ÂU"'­ºä m0PLŸîõã›››[ýü=}ú‚êpT©ÎhI˜›×R#¢:u‚\WWöÕ«›†µž3çë„„ß©G©ê§#[–•V=—rXLLôÏ Y³fòÇŸßµë²TŠ¿~™~Wù˜oûÆ€nÅôä0àÈÆ2ÅÅýºdItss+Õ½¢'©Éjqœ`Bu j¹ P¾W®l*(¨™9óp~~5ÕáüOÅc>FC¶cá¼€þâím—’ò±……Á»ï~qóæ@y°rù¯<Îp–¶ý—4ä0 YY'&nð÷÷Y¹òä¡C7¨¿N òG<ûñƇѴáÙL@»±XŒC‡úø8îØ‘XPP{ø0•V–´áMœÞÒ¶‹ú òÛoÅkÖœ²²29uj•½½Õáhh#1v¬ëÕ«ã8îçwèÑ£BªÃÑ6 €&qr²¸reÓøñn|ðÍÉ“¨G«@hÙX¦E‹ÆíÝ;OþßßAA.šê§Ÿò6lˆõð°Ž^ÎfkÛÝþþ¹h°¢¢ÚåËcZ[E§N­1Âêp4\/ŒËå\½ºÉÍ3wî‘””LªÃÑlðŸë@³éê2çÎÝÒ" û¡­M¹ù¯A ÚZë–}—â¾éˆD]]Ý£G:::ö¾*x®è'iii)))S¦L¡díåææ˜Tªm¿|)))K–,\4OXXÕ!h•{÷î©«*-¿è"È„ H A.ÍÔ©S+**zYƒÌ;ï¼³aÆÂÂÞ>4¹¢¢bêÔ©],\^^¾mÛ6ÿ¹sçîܹ³¨¨¨»uvkuê¹h¡#GŽ$&&&&&ÆÄÄØÛÛÿûßÿî·~4µµµëׯg³ÙQQQ°²²Ú¸qciiÏ{=ö¸§´©©©¹¹9BÈÜÜ|ݺusæÌinn65íÁEçÎ>|øæÍ›ÉÇ+¹»»·´´œ?~ûöíý°öÞ€\®©S§†††^¸p¡¹¹900ÐÒÒòÔ©S<oÞ¼y+W®$âêÕ«IIIuuuC‡]°`Á矞ššÚ¡:Î`0 È—‰ä»ï¾»yó&BèwÞY½z5ƒÁøõ×_Ož=}ú´ÂF000hmm%›î¡I“&EGG×ÔÔ‡††þðÃb±X"‘0 ‘HtêÔ)„Pkkë{ï½÷Í7ß<|ø°¡¡áñãÇ'OžT¶x‡Õ­^½úÖ­['Nœ(...,,yl6[__ŸÇã‘MŒU«V9rdÍš5†½õÖ[k×®ÕÑÑùðÃÃÃÃõôô-Z4}úôÐÐÐÄÄD±XüÍ7ßÔ××s¹Ü]»výë_ÿR¸8y@†Ëå~õÕWÇ¿r劥¥å˜1c¾úê« 6w®ÓÐаóÚ9Ò/»ðð,ÐO.\Øùž_ýúë¯GvÊýóÏ?ÇÆÆFGG««~0uêÔøøøÀÀÀÞWm ©Š‹‹÷îÝ[PPÐÞÞž——wòäÉÙ³gS”ƒ6ÐT|ðA[[ÛÎ;›ššlllfΜéïïOuP rÐTt:}ÕªU«V­¢:-mB $È„ Hpíô«””ªCŠA.ýÄÎÎŽN§:tˆê@´ N'Gôô; × $È„ H !ôÿý÷Éjv»\kIEND®B`‚pktools-2.6.6/doc/html/structsvm__node.html0000644000113200011300000001030512647637662015762 00000000000000 pktools: svm_node Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
svm_node Struct Reference

Public Attributes

int index
 
double value
 

Detailed Description

Definition at line 12 of file svm.h.


The documentation for this struct was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.h
pktools-2.6.6/doc/html/classUi__MainWindow-members.html0000644000113200011300000014651112647637662020103 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Ui_MainWindow Member List

This is the complete list of members for Ui_MainWindow, including all inherited members.

a_srs (defined in Ui_MainWindow)Ui_MainWindow
actionColor_table (defined in Ui_MainWindow)Ui_MainWindow
actionExtent (defined in Ui_MainWindow)Ui_MainWindow
actionInput (defined in Ui_MainWindow)Ui_MainWindow
actionInput_image (defined in Ui_MainWindow)Ui_MainWindow
actionMask (defined in Ui_MainWindow)Ui_MainWindow
actionOutput (defined in Ui_MainWindow)Ui_MainWindow
actionOutput_image (defined in Ui_MainWindow)Ui_MainWindow
actionQuit (defined in Ui_MainWindow)Ui_MainWindow
actionReference (defined in Ui_MainWindow)Ui_MainWindow
actionSample (defined in Ui_MainWindow)Ui_MainWindow
actionSelection_Info_file (defined in Ui_MainWindow)Ui_MainWindow
actionTraining (defined in Ui_MainWindow)Ui_MainWindow
as_from (defined in Ui_MainWindow)Ui_MainWindow
as_to (defined in Ui_MainWindow)Ui_MainWindow
autoscale (defined in Ui_MainWindow)Ui_MainWindow
bname (defined in Ui_MainWindow)Ui_MainWindow
bndnodata (defined in Ui_MainWindow)Ui_MainWindow
buttonGroup (defined in Ui_MainWindow)Ui_MainWindow
cband (defined in Ui_MainWindow)Ui_MainWindow
ccost (defined in Ui_MainWindow)Ui_MainWindow
centralWidget (defined in Ui_MainWindow)Ui_MainWindow
cname (defined in Ui_MainWindow)Ui_MainWindow
coef0 (defined in Ui_MainWindow)Ui_MainWindow
commandLineEdit (defined in Ui_MainWindow)Ui_MainWindow
commandLinkButtonPrepareTable (defined in Ui_MainWindow)Ui_MainWindow
commandLinkButtonPrepareTable (defined in Ui_MainWindow)Ui_MainWindow
compressed (defined in Ui_MainWindow)Ui_MainWindow
confusion (defined in Ui_MainWindow)Ui_MainWindow
consoleEdit (defined in Ui_MainWindow)Ui_MainWindow
crule (defined in Ui_MainWindow)Ui_MainWindow
ct (defined in Ui_MainWindow)Ui_MainWindow
cv (defined in Ui_MainWindow)Ui_MainWindow
dstnodata (defined in Ui_MainWindow)Ui_MainWindow
dx (defined in Ui_MainWindow)Ui_MainWindow
dy (defined in Ui_MainWindow)Ui_MainWindow
extent (defined in Ui_MainWindow)Ui_MainWindow
f (defined in Ui_MainWindow)Ui_MainWindow
file (defined in Ui_MainWindow)Ui_MainWindow
gamma (defined in Ui_MainWindow)Ui_MainWindow
gridLayout (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_2 (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_3 (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_4 (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_5 (defined in Ui_MainWindow)Ui_MainWindow
groupBox (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_2 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_3 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_4 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_5 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_6 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_10 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_11 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_15 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_2 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_3 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_4 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_5 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_6 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_7 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_8 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_9 (defined in Ui_MainWindow)Ui_MainWindow
input (defined in Ui_MainWindow)Ui_MainWindow
interleaved (defined in Ui_MainWindow)Ui_MainWindow
kd (defined in Ui_MainWindow)Ui_MainWindow
kerneltype (defined in Ui_MainWindow)Ui_MainWindow
label (defined in Ui_MainWindow)Ui_MainWindow
label (defined in Ui_MainWindow)Ui_MainWindow
label_10 (defined in Ui_MainWindow)Ui_MainWindow
label_11 (defined in Ui_MainWindow)Ui_MainWindow
label_12 (defined in Ui_MainWindow)Ui_MainWindow
label_13 (defined in Ui_MainWindow)Ui_MainWindow
label_14 (defined in Ui_MainWindow)Ui_MainWindow
label_15 (defined in Ui_MainWindow)Ui_MainWindow
label_16 (defined in Ui_MainWindow)Ui_MainWindow
label_17 (defined in Ui_MainWindow)Ui_MainWindow
label_18 (defined in Ui_MainWindow)Ui_MainWindow
label_19 (defined in Ui_MainWindow)Ui_MainWindow
label_2 (defined in Ui_MainWindow)Ui_MainWindow
label_20 (defined in Ui_MainWindow)Ui_MainWindow
label_21 (defined in Ui_MainWindow)Ui_MainWindow
label_22 (defined in Ui_MainWindow)Ui_MainWindow
label_23 (defined in Ui_MainWindow)Ui_MainWindow
label_24 (defined in Ui_MainWindow)Ui_MainWindow
label_25 (defined in Ui_MainWindow)Ui_MainWindow
label_3 (defined in Ui_MainWindow)Ui_MainWindow
label_4 (defined in Ui_MainWindow)Ui_MainWindow
label_5 (defined in Ui_MainWindow)Ui_MainWindow
label_6 (defined in Ui_MainWindow)Ui_MainWindow
label_7 (defined in Ui_MainWindow)Ui_MainWindow
label_8 (defined in Ui_MainWindow)Ui_MainWindow
label_9 (defined in Ui_MainWindow)Ui_MainWindow
label_reference (defined in Ui_MainWindow)Ui_MainWindow
layoutWidget (defined in Ui_MainWindow)Ui_MainWindow
lclass (defined in Ui_MainWindow)Ui_MainWindow
listWidget_band (defined in Ui_MainWindow)Ui_MainWindow
listWidget_input (defined in Ui_MainWindow)Ui_MainWindow
lref (defined in Ui_MainWindow)Ui_MainWindow
lrx (defined in Ui_MainWindow)Ui_MainWindow
lry (defined in Ui_MainWindow)Ui_MainWindow
mainToolBar (defined in Ui_MainWindow)Ui_MainWindow
manual (defined in Ui_MainWindow)Ui_MainWindow
mask (defined in Ui_MainWindow)Ui_MainWindow
max (defined in Ui_MainWindow)Ui_MainWindow
menuBar (defined in Ui_MainWindow)Ui_MainWindow
menuFile (defined in Ui_MainWindow)Ui_MainWindow
min (defined in Ui_MainWindow)Ui_MainWindow
msknodata (defined in Ui_MainWindow)Ui_MainWindow
nclass (defined in Ui_MainWindow)Ui_MainWindow
nodata (defined in Ui_MainWindow)Ui_MainWindow
noscale (defined in Ui_MainWindow)Ui_MainWindow
nu (defined in Ui_MainWindow)Ui_MainWindow
offset (defined in Ui_MainWindow)Ui_MainWindow
oformat (defined in Ui_MainWindow)Ui_MainWindow
otype (defined in Ui_MainWindow)Ui_MainWindow
output (defined in Ui_MainWindow)Ui_MainWindow
polygon (defined in Ui_MainWindow)Ui_MainWindow
pushButton_restore (defined in Ui_MainWindow)Ui_MainWindow
pushButton_run (defined in Ui_MainWindow)Ui_MainWindow
reference (defined in Ui_MainWindow)Ui_MainWindow
resample (defined in Ui_MainWindow)Ui_MainWindow
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
rule (defined in Ui_MainWindow)Ui_MainWindow
sample (defined in Ui_MainWindow)Ui_MainWindow
scale (defined in Ui_MainWindow)Ui_MainWindow
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
srcnodata (defined in Ui_MainWindow)Ui_MainWindow
statusBar (defined in Ui_MainWindow)Ui_MainWindow
svmtype (defined in Ui_MainWindow)Ui_MainWindow
tab (defined in Ui_MainWindow)Ui_MainWindow
tab_2 (defined in Ui_MainWindow)Ui_MainWindow
tab_3 (defined in Ui_MainWindow)Ui_MainWindow
tab_4 (defined in Ui_MainWindow)Ui_MainWindow
tableView_labels (defined in Ui_MainWindow)Ui_MainWindow
tabWidget (defined in Ui_MainWindow)Ui_MainWindow
threshold (defined in Ui_MainWindow)Ui_MainWindow
tiled (defined in Ui_MainWindow)Ui_MainWindow
tln (defined in Ui_MainWindow)Ui_MainWindow
toolButton (defined in Ui_MainWindow)Ui_MainWindow
toolButton_createTable (defined in Ui_MainWindow)Ui_MainWindow
toolButton_ct (defined in Ui_MainWindow)Ui_MainWindow
toolButton_defaults (defined in Ui_MainWindow)Ui_MainWindow
toolButton_extent (defined in Ui_MainWindow)Ui_MainWindow
toolButton_file (defined in Ui_MainWindow)Ui_MainWindow
toolButton_input (defined in Ui_MainWindow)Ui_MainWindow
toolButton_mask (defined in Ui_MainWindow)Ui_MainWindow
toolButton_output (defined in Ui_MainWindow)Ui_MainWindow
toolButton_reference (defined in Ui_MainWindow)Ui_MainWindow
toolButton_Run (defined in Ui_MainWindow)Ui_MainWindow
toolButton_sample (defined in Ui_MainWindow)Ui_MainWindow
toolButton_training (defined in Ui_MainWindow)Ui_MainWindow
training (defined in Ui_MainWindow)Ui_MainWindow
ulx (defined in Ui_MainWindow)Ui_MainWindow
uly (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_2 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_3 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_4 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_5 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_6 (defined in Ui_MainWindow)Ui_MainWindow
verticalSpacer (defined in Ui_MainWindow)Ui_MainWindow
verticalSpacer_2 (defined in Ui_MainWindow)Ui_MainWindow
verticalSpacer_3 (defined in Ui_MainWindow)Ui_MainWindow
widget (defined in Ui_MainWindow)Ui_MainWindow
pktools-2.6.6/doc/html/inherit_graph_25.png0000644000113200011300000000343612647437044015514 00000000000000‰PNG  IHDRå%2C¹õbKGDÿÿÿ ½§“ÓIDATxœíœ[LYÇO j·Ö±¥¸hªD"x‰‰&ú°|àE[Œ11J"˜4A’݆4Û…ø€M½Ä؃JeƒH¼`[5Æ7ˆ\"%@ˆd"(mi™éeÆLÆ™RÚ±´r~áaÎéœs¾ùf¾'ðB¡€@8?Ù@ 1ý áЯ.ý áé´6Š¢N§3)¡DŸÏ/(( …Éä;ÓÓÓZ­Öçó%;uHuuµZ­&›t¿ÎÍÍ---I$’ÄF(Š*ŠÔñk___OOF£Iv ë »Ýn6›#ù ‘HŠŠŠUÌ<þ<Ù!„Ál6';„õFEE­Ö¯.ý áЯ.ý á,ýÊ Çøø8Ç,¦gRêÇ«£Ê¾aÆC‡ Äeæ(cÒc‚ýýõõë×3?"•Jëêê¨çLLLdeeýtlX\ôµ·¿ÑëÿÁñ@Rˆ/L%Iý NŸ>aëR¼‘ô¤‡yŸ%[¶lÉÎΦu655Q›Á`ðË—/¬—`χ?{6ÒÙÙo±Œâx€PMÍoJ¥4‘1¬L%Iý³³³F£B¡@QT.—G9œIOz<ëWæáàÁƒò q×ét …B.—ët:lj!‹eÛ¶m¯^½b½´×‹utü{îÜß……úK—Z,–QÀ­’===%%%"‘H©T’‰ïîî... …yyy÷îÝ %iA6mÚD4™:S‡SÓD{š“‰àñx­­­;wîÌÌÌ4âOpÒÙûÕãñ¸)øý~æ9}}}€ÙÙY¢yãÆÉÉÉþþ~‹ÅbµZëëë‰þk×®µ´´”””ăßìí®©i-.þ«¶¶íåË1ƒ!®Ô.—ëÔ©S¥¥¥‡Ãd2éõzE=F£ÑjµSSSƒ¡²²ÒãñДýN§Á`8{ölFFñSgæð°PñðáC»Ýn4ëêêæççi‹&-é¡ ­sžîîn‡ÃALÈ< P©T333Äqooïž={ˆÉiǪ«[­ÖÇûuºöÂB½RY»}ûJeíJ?Nçªþ$íííL%™0¯nyyyttÔív/^'ÌÏÏ “É´°° ].W  )I_,ŒŒŸ®¤3Ñö˜™›Í …0 #Ã^£¤G@£Ñh4jûúÕápìØ±ƒÚ³ê—ß©©)¥RI6Éç—J¥Šié§O'[ZÞ“M ó[N²wocL“³A~e5 »xñ¢Ûí&ï42™Ìf³Ý¼y³¡¡¡´´T¯×Ÿ8q‚9–Ôii©¾¾¾²²Òn·­¤3𠩉ÈÉÉ‚°‹’$,éìýÊ‚¬¬,›ÍF\ðׯ_ÉGM”U9p A$~ü8 é‘ýÚÔ¤–É~as4Øíö«WÙ|Ãðz½f³¹¼¼|yyùÎ;Dg0ìèèÀ0¬­­­¼¼|nn.Â$"‘èüùóÍÍÍ¡Pˆ(%WÒ™ŠßïOOOÿô鵓š>?>ßmâ•t‚DøÕív‹ÅbÀÉ“'õz½Édúöí[UUÕþýû/_¾ÌbB™L¨Õ–66ª?|˜íéhk{ãt.iaËÖcÇŠÖúý€×; z£9EQB ¡Pˆa‚ ^¯·±±àr¹x<ÞñãÇïß¿äÈ ÃH$"*HRI‰Äår¹Ýî7‚•u&†K¥RÀÝ»wÕjõ­[·â!@âžôïÐ*†èëWf¡É¬`p?|ø°X,&NX\\¼pá‚L&Û¼ysUU•Çãa–eÑÔ¯6›íóçÏÔžwï¦ †Î¢¢?•ÊÚÜÜßS¶~eŠýúõÌÌÌÜÜÜÛ·oŸ9sF.—æçç#¢R©ºººB %iB‰D299I4™:Ó†_¹rE*•æççwuupE'u~@©_×"é`Ö¯<šŽÃÃÀÔßO¸k×.æ»F ó[­£ü÷äÉßàóù~àíÛ†µ¾¿šÍæÈ¯ë!ì öR7j&´~]k$½¬lwYÙn·{ùñã÷o¦ÅâTÙÖ ùyÖ•_IÄâ µzŸZ½/Ù@â ÜŸáЯ.ý áЯ.ý áaÞø|¾Ôÿ—)Hsss²CXoLLLäååQ{è~ …(Šº\®F3<Ü;— lݺ5--­ºº:Ù¬CŽ=JmÒÿ¾¤2°~…p èW—€~…p èW—ø:~æl^eVIIEND®B`‚pktools-2.6.6/doc/html/ftv2link.png0000644000113200011300000000135212647637661014124 00000000000000‰PNG  IHDRÚ}\ˆ±IDATxíMOS[…Ÿžsúa?-XZ(PD4‚ AWbu`b 77wäHFÆCËÔÂÿà/`vo„ˆAPòq‹P @ ­ûÝè980 îà¤+»§Ýy×^ïZï9SW¹\83g‰3'°Nâçl¹¸_b¯p ïåûÆVÜÖ¡€Ÿ×"¬Ö†X€d]Ðà3“ÉÃÄÌ™xŸ ßMàœ[<çSPkvc—hÈ'…™˜^Åm™hØ7 `Û™¦ èÀåráq›‘œ¾!daeKŸþÆÕ˜:Ì*³_דâèi?I–eP*B7Ÿ¿åô!¹Ýgr6Ër6oKbëþãðôrI”ËTˆüªŒ¨xóö=›ù¢&‰(e+ßóÄkýÇ`ëÁÜb.“¸ÐW×w0¥°jÑzN™¬|©WEãµ¢a¯6[öX†AkÓù*/œ¨‰€ÉY­ ÿV’§–u²jÂ>1W *½·°PGŽzÿ¨/Eg{ ŸÇâaoŠÁVú:è¿™¤1$ôR§W,–ªà¨@ŠË56¾ÀÔÜ-¾,mê¸Î/æè¹– òr5¥T*S(Vf8ö9u’ Õ£w›ùóa=Í<{Ò¡UŒ÷r¯+ÉådDÏF$è°…£é¿`zþ»ÎúöN‘µÜ®0Q3£~_^Ëóâ¯N=ˆvpTà±LžT}ˆîkq†Òm<¼ÎÓ?Zh¿X£ï_þÝ¥[)ƒ `gêÃa_Ô*äÔ2`'=õ´Fÿ2EâÁPú ÷»›l=8‹Wv°%THqÉ¿<"¤ïG¾ÆxH{#ÆÖ«aÔJÕÞ‡—m‹„ çñKsÿàñVŠØ¡°·MâÒ^ TÁ– Ý›r¥ß½ømüÿ_™?ªWİ÷#uIEND®B`‚pktools-2.6.6/doc/html/structIndexValue-members.html0000644000113200011300000000664112647637662017515 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
IndexValue Member List

This is the complete list of members for IndexValue, including all inherited members.

position (defined in IndexValue)IndexValue
value (defined in IndexValue)IndexValue
pktools-2.6.6/doc/html/classKernel__inherit__graph.png0000644000113200011300000001774412616110567020033 00000000000000‰PNG  IHDR7»'Ù%bKGDÿÿÿ ½§“™IDATxœíÝyTçúðo@W TD-qA«¢·ŠÀ­¸×º÷+¶.XwE媭½VÚºÔ êµêÏJ! -RÅ¥(.uG¨µ"(­ˆ¸ Š˜äùýá55, aÂð|Ιs 3yçÉ›™ï™-3""0Ƙ¸(¤BWÀc†ÀáÆ%7Ƙ(q¸1ÆDI.tLnܸiÓ¦¡  @èRŒFëÖ­±nÝ:¡Ë¨±$|¶”éCdd$FŒooo¡K1 7oÞÄ©S§À«—`¼åÆô*22RèŒÂ˰gÂácnŒ1QâpcŒ‰‡cL”8Üc¢ÄáÆ•ŸŸ¸¸¸ÀÒÒ®®®X±b”J¥f‰DGGÇÏ<öë׉W¯^­TW¯^…D"©T̸p¸1Áäææ¢sçÎ8}ú4‚‚‚˜˜ˆ€€ìر½{÷†J¥ÒL{ýúu$''k½?''GÕi^éééhÔ¨Q©ã­¬¬°`Á‚Š}f”8ܘ`–-[†Æ#>>ýúõÃÛo¿¡C‡âÌ™3øóÏ?±yófÍ´½zõ‚B¡ÐzLL ÜÝÝuš—Z­Æýû÷KߨQ#Uìƒ0£ÄáÆ³cÇ,Y²2™LëõÚµkÃßßßÿ½æ5oooDFFjíšFEEáÃ?Ôzoll,:vì ØÚÚj«[·nï†þòË/°··ÇÖ­[5»¥111°³³CNN <<o¿ý6òóóõÜÌ ˆ1=ˆˆˆ ò,N999€îÞ½[âø“'ORƒ ˆˆ¥¤¤ ]¸pˆˆ>|HtïÞ=@iiiôøñc255¥?þ˜þúë/Ú±c ììlJKKÓªïåÿýúõ£øøxJJJÒ?nÜ8òññ¡¬¬,²¶¶¦Ó§O´?˜ÞEò/˜ J;ˆODJÿÞ±Éd6l"##Ñ¡CÄÆÆ¢{÷îhذ¡f333$''£iÓ¦077GÓ¦M=*uþ_~ù%ÚµkWì„ÄÚµkÑ®];ôîÝŸ|ò \]]+ó1™x·” ÂÊÊ 666HJJ*q|RRœœœ´^óöö†B¡•¸KjjjŠÔÔTôíÛ:uÂÖ­[ˬ£è<^­oòäɸté>ùäÝ>3*nL0cÆŒÁ矮uVtÔ¨QGPPF¥5}=››‹ãÇãàÁƒRf &&&%¾~óæMlذ½zõ‚ŸŸ_>‡Ì’%K••///ìß¿©©©hÑ¢F‚‚Lœ8Qkú—»¦¾¾¾puuE“&M´Æ?{ö ………055ÅÓ§O±téR/.9y)//¯ÌºÔj5>þøc̘1ááá8tèöìÙ£‡O̪‡Lݺuqþüy¼óÎ;˜7o\\\ÀÀ@´nÝãÆ+öžáÇãòåËÅvI»’«V­Â˜1càääŒ5 }ûö…ƒƒzôè[[Û2ë ÁÝ»w±`ÁÔ¯_ß~û-|}}5gOYõÀ÷sczñò?úZœ ‘˜˜¨¹„£ºÑw°rã§_1ãdjjZmƒ7Ƙ(q¸1ÆD‰Ã1&JnŒ1QâpcŒ‰‡cL”ø‡óL¯6nÜ(t FáüùóB—Pãq¸1½°³³ƒL&ƒ¯¯¯ uÈå `i銇ã­ìíí….¡FãÝR¦Ý»w‡R© :ÌŸ¿ ææN8uêšàµdddýµÔhnL4”J5vï>ؽ›w k:7& )xüø) ::ÏŸ«Êx37&»v%jžÇðäÉ39’"pELHnLž<)ÄÞ½ÉP*_l­ÉdDGó®iMÆáÆDáСKZ»¡J¥qq‘ŸÿLÀª˜8ܘ(DECÑgÍ(•*8pI˜‚˜à8ÜXµ÷ðá>œ•ªè!%ˆŽ>'HMLxn¬ÚÛ·ï·_W«ÕHH¸‚œ~˜rMÄáÆª=…âÔêÒoç›\…Õ0cÁáÆªµ¬¬G8}:½Ôg¼xÆéÙ*®Š7V­íÙ“™¬ôÅX­&œ;—Û·VaUÌp¸±j-:ú¼æÚ¶Ò{öð®iMÃwaÕšT ØÚÖÓü¯TªQPð––fZÓñõn5?·”‰JLL¦LÙ†ÌÌ5B—„ÅÏ-eŒ‰‡cL”8Üc¢ÄáÆ%7Ƙ(q¸1ÆD‰Ã1&JnŒ1QâpcŒ‰‡cL”8Üc¢ÄáÆ%7Ƙ(q¸1ÆD‰Ã1&JnŒ1QâpcŒ‰‡cL”8Üc¢ÄáÆ%7Ƙ(q¸1ÆD‰Ã1&JnŒ1QâpcŒ‰‡cL”8Üc¢ÄáÆ%7Ƙ(q¸1ÆD‰Ã1&JnŒ1QâpcŒ‰‡3H$’*† éŽvUù|ÍÌÌpâÄ ¡»œ½B.tL¼®_¿gggx{{ ]ŠÁ}öÙg¸uë–Ðe°Wp¸1ƒjÒ¤ <<<„.Ãà>ûì3¡K`Eðn)cL”8Üc¢ÄáÆ%7Ƙ(q¸1£âééYì¬ã¶mÛðÁ ==½Jj¸uë<==«d^Ìpøl)3jˆŠŠÂêÕ«Ñ¢E ¡ËaÕ‡3Z?ýô¶oߎU«VÁÑÑQèrX5û¥Ì(íß¿aaa ‚“““Ö8¥R‰ÐÐP 2C† Ahh(”J¥fw211#FŒÀÅ‹áéé‰C‡ÁÇǃ Â?üPf;L8ܘÑ9räV®\‰zõêá­·Þ*6>** ·oßFXXV­Z…ÄÄD|÷Ýwšñ‘‘‘Ðlí?~ÁÁÁðõõEXXrssuj‡UonÌèDDD`íÚµ¨U«Š߷ofÍš…&Mš E‹ðõõÅ™3g4ã'OžŒŽ;¢V­Z€ÁƒÃÒÒ}úô<~üX§vXõÆÇܘÑYºt)œ€iÓ¦ÁÍÍ :uÒŒÏÊʰaôÞS»vmÍßöööZã5j˵÷²ÚaÕ‡3:666€V­ZaÔ¨Qøê«¯°eËMðÔ«WkÖ¬ //<м¿hˆI$’çSV;¬zãÝRfÔÆ‡Úµk#88Xóš››6mÚ„;wî ==þþþøñÇËݶ¾ÚaƉÃ5àÀ8}ú4`„ °°°À¤I“0gδlÙ¾¾¾ån[_í0ã$!"º&NÇÇÝ»w±téR¡K18OOODDD`øðáB—Â^Pð–cL”8Üc¢ÄáÆ%7Ƙ(q¸1ÆD‰Ã1&JnŒ1QâŸ_1ƒJNNƼyóJO$Ca¡%TªZ°°ÈPùË.‰dHTå~_aa]€©éãJ×À„ÇáÆ ¦è؉€§OåÈË3ÃãÇ&xôÈ r2ÁÉÉryåÂíþ}s¤¦Ö‡«ëmÈdåk+5µ²³Íab¢‚µõS4jô––Ïuz¯££#ºvíZ‘’™ð/˜ÁCJjµ ÅÙ µåâÒ&ô„‰IéŸA­&Í–¥¥Y…æÃ ‹ÃéÝ_|™¬ä­1‰D¢9`m]Woóüé§ É¤^ÌW­’“oâæÍŠÝY7  ?š4©©´ô­J¹\ŠÎðùçC*4fXnL¯îßÏ×_î…M=H¥%/^_=:9èu¾ ÅY¨TÚÇÈär)~úéB…Ú377Å×_€Z]ò±C©T+«Úؼù£×ná1áp¸1½Ù½;ï½÷ŽIÁ¬Y^pphø¿­©d2)Æ{#F¸êu¾©©YHI¹¢ç0”J"#+¶k N8°C áõbkÎǧ{¹OX°ªÃáÆ*íòåÛøàƒu˜5ë{x{»âÔ©Å9²+V­©Ùò11‘¡sg,[¦ÿ]¸˜˜¤·žˆ€«Wï %åv…Û^¾|(ÌÌLðê9‰èׯ=Ö¬ÙE‹¢ðüyù Á ÃUX^Þ3,^¼}ú¬„ZMˆ‹óC`à@XX˜ºvm]VV õÑû.!"âL©cj*¯ð®)4n\K– ÂË­5™LŠýë]lÚ4QQÓðóÏ¿aÀ€5>¶Ç ‡ÃUˆBqnn+°{÷y¬Z5113áìüF±é–- W×æØºu¢^O ¼ôÛoáÖ­œRÇ*¡PœÕ麻ҌÝ íÛ¿¸h·m[;,[6Э[KÄÅÍ…‰‰ ýú­Æ±c©žÓ?7V.7nÜǸq›0{v8¼¼œqüø"x{w)õZ5këzøñÇ™èØÑ¾Äñ•õã‰01yýå$™™‘˜x£ÂóJ%X½zºvm-[>†©éßó³µµÂîÝ3лw[Œ†àà_*<¦_ü ¦“ÂB%Ö¯?„ààx4kÖAAÞèÚµ…Ðe¡C‡¥¸w/÷µ×Õª0eŠ;–,ùÀ µìØqÑèß¿=V­©Ù=g‚àŸ_±²=z F#;û1,èŸîFsùChèÜ¿Ÿ§ùÿæÍ8yò†×þÑ|ŽpwoeðzΞý“'oEƒ–زåc4kÖÐàód%âpc¥»{7ÿþ÷.ìÙ“„]°lÙØØÔº¬×ЉI”)Û™¹F°îÜy„‰¿Ãµkwò/xx8 VK Æ¿-eÅ©TjlÞ|nn+”tÛ¶MÄÆã>ØŒ…µu=DGOÇÀ.3f#–/-õb`f8|³J¦åÂ…P %å6fÎì…©Sÿ ss>vT^¦¦r|õÕptéÒ (šš…õëÇ¢nÝZB—Vcð–äæÀß?ï¿ÿ êÕ³Àáà àç×—ƒ­’¼½»àÇgà?2Ñ¿ÿj¤¦f ]RÁáÆ PœEÏž+wkÖŒBDľG™µoßqqsak[~ƒ½{º¤í»z5ÞÞÁ˜3'vÀ±c _{Í«¸† -þ ||z`Ò¤­|® ð1·èÙ3%V®ŒÃÆGàìüöîƒöí› ]–èÉåRDëÖ¶˜??—/g"8x,êÕ³º4Qâ-·æðáxz~‰íÛO`ñâAسg6[:´~úi&ÒÒî _¿5¸|¹â?ìg¥ãp«!23ÂÇg3ÆŒ CçÎ8z4'ö„\΋€Ú¶µC\Ü\4mÚƒ­ELL’Ð%‰/Ù"§R©ü zö\ôô»ˆŒœŠuëÆÀÚš¯YZýúµ±s§/Æï)S¶Áß?’oŸ¤G|ÌMÄΟÏ@@€iiw0cÆ{˜6í=Ôªe"tYì2Ù‹ãpmÛÚÁÏï\»–ÐP¾ ¦ð–›åääcæÌï1hÐZ4jd‰#G^\³ÆÁf¼>ø #öì™…Ì̇èÛw5’’*~ö‡›ˆгððø W:ááSààÐHèÒ˜Z·~ûöÍE«V62d=~øá´Ð%Uk¼[*W®daáÂ(œ=û'Æïùóû¢n]s¡Ëbådeeÿû¿Iøæ›˜7/‰‰X¾|˜ÑÜ…¥:áp«æòóŸ!(h/¶o?víÞľ}sѶ­Ðe±Jɤðóë‹öí›bÆŒHM½ƒ°0ƒÜÉXÌx·´;tè¼÷Þ×P(Î`ùòaˆ‰™ÅÁ&"^^mðóÏs““¾}Wãüù ¡KªV8ܪ¡¿þÊÏføøl†«ks=ºcÇþãµfÕSË–MðóÏsðÎ;ö6lvì8)tIÕï–V#ÏŸ«°nÝA„„Æ›oÖ‡B1ï¾û–Ðe1³´4ÃæÍ!$$ œ9“ޝ¾Îg¿ËÀáVMœ=û'¢žžyóúbòd>È\ƒH$L›öZµ²Åôé;påÊ:ü÷¿ãÍ7ë ]šÑâÝR#wÿ~fÎüƒ¯‡­m=>¼Ó¦½ÇÁVCõêåŒ}ûæ °P‰¾}Wáøñ4¡K2ZnFJ­&lÞ|=z¬ÀɓװuëìØ1™¯YchÞ¼1bcgãÝwßÂèÑ¡ü8ÁRðn©º|ù6.ŒBbâuøúzbΜÞü˜8¦¥vm3„…ù $$AA{ñÇ™X¹rß9ù¼åfDòòžañâÝèÓg%T*5ââü8ƒ•èåq¸íÛ'!>>ƒ­Ã÷….Ëhp¸ …â,ÜÜV`÷îóXµj$bbfÂÙù ¡ËbÕ€§§ö훵Z~ýÖ !áŠÐ%7ݸq>>›1{v8¼¼œqüø"¾Õ7+7‡FØ»w.zõrÆØ±ü jú#‰ù˜›@ •X¿þ‚ƒãѬYCìÚ5]»¶º,V™™É±víhtéÒÑ8{ö:Ö¯ƒ:ujæãyËMG^§çW =‚E‹âÀylLoÆŽý"">Á… èß ÒÒî]’ 8ܪн{yðõ݆‘#CѦÍ8vl!&NìÉ׬1½ëÖ­%ââæ¢nÝZ8ðÄÅ]º¤*ÇáVT*õÿ®Yû.d`Û¶‰Ø¸q~øá/Ô©#Ç€6hÑ¢¶Ð%ãèèOOOƒµýúu8pÀ`íëâ÷ß#*ê>ý´µ uÔªU #GŽ„©©aCèc==u긃aÃìЦMõ½…y)˵T„\.'<”sJͨvíN$‘ȯ¥´A.—ýºõjäÈ‘‚Fc¢££ Ö×úZOML ÞO•JY®#‹í–*•JDDD€ˆx(Ç R /ïÔj¥àµ”4DDD@©TýºõJ¥RÁÛÛ[ðÏj ÃËuÉPôµžf ÞW†Z®ù˜cL”8Üc¢ÄáÆ%7Ƙ(é%Üòóó1þ|¸¸¸ N:èÒ¥ ¾øâ ­}‰Ds°ùUW¯^ÕºL"‘”:è*33£G†ƒƒ,--Ñ¥KìÞ½[k‰DRæ©ôÏ?ÿ‰AAAÅÆåååaÞ¼yhÞ¼9ÌÍÍáè舥K—¢   \Ó”%??þþþpqq¥¥%\]]±bÅ ƒŸ¨*eõц `ggµZûZ,"B³fͰ~ýzÍkº|ïek뫟‹®“æææèÞ½;’’’ÊUO•ô3€"""о\ªÇ“““¹»»Ó¾}ûèÊ•+MÎÎÎäááAJ¥RÓ. ×zZZ½Zúõ×_éöíÛÅ]Ü»wš4iB&L S§NÑ¥K—håÊ•dffFqqqZóIKK+µµZMÎÎÎdooO:t(6~üøñäééIçÏŸ§ììlJHH š>}z¹¦y—}Û³gOÚ»w¯VßzzzjúVTÂ×­WÞÞÞäíí]®÷”ÕGYYY$•J騱cZï;wîI$ÊÌÌ$"Ý¿÷×Ñg—w=*¯ò¶¯¯~.º~¦¦¦’½ýöÛ¤V«uª¥Š–ëÈJ‡Û¼yóÈÍÍ­XAyyyäàà@›6mÒ´ëëëK 4Ð ª’Âíu¡S–iӦш#J¬³W¯^:Ï'99™$ Ò©Ž*\®‹ÿBAŸ¤R)T*•ÖkŽŽŽ ¬Y³póæÍßסCÔ©S§ØPúßÉŠÊþPýÌ™3¸yó&† :t(.]º„ßÿ]3MïÞ½‘‘‘„„¸¹¹aÛ¶mhÙ²%vîÜY®iÊRÚg!"H¥Õÿd·.}dee…þýû#22°k×.xxxÀÚÚ€þ¾÷×µQÝû[ýüÒ«ë§¶oߎùóç—«ž*éç¢q=î–~ûí·Ô§OM»/·”T*¹»»SïÞ½)55U¯»¥ÖÖÖtâĉb¯Ÿ9s†:wîLùùùeÎgöìÙ%þ†íßÿþ7½86®µù®V«iñâÅdgg§ó4e±±±¡C‡•8.$$„zôè¡S;DƹåVž>ŠŒŒ$kkkR*•Ô©S'ÍVõKº~ﯣÏþ.ïzT^åi_Ÿý\t½ÉÏÏ'???êÖ­›ÎµWÑr]ùcn~~~¯=8¸fÍM»¯vJzz:Õ®]›æÍ›§×p›4i :´Ø™›™3g’‹‹K™óQ*•dkkK«W¯ÖÚ%ž;w.9::’Z­¦ÜÜ\’H$tá­÷?~\³®Ë4eñóó#www­¾9r$íܹ“ìíí)88X§vˆŒ3ÜÊÓGùùùdiiIÛ¶m#¹\NÙÙÙZãuýÞ_GŸýmLá¦Ï~.i½¹xñ"Õ©SGç³¥U´\W>Ü=zD­ZµÒ\ ’ššJ»ví¢6mÚP÷îÝ5Kê”o¿ý–$‰^/ÉÎΦ† Ò˜1cèĉ”œœLŸ~ú) ØØØ2çsøða’ÉdÅÎüœ;wŽPbb"‘æôwll,]»vNœ8Aݺu£Ù³gkÞ£Ë4ºô­§§'ÅÅÅÑ•+WhÑ¢E€š4iBÏž=Ó©"ã 7¢òõÑØ±c©~ýúÔ»wïbãtýÞ_GŸýmLáF¤¿~.i=ÎÈÈ ôøñcj©¢åºòáFôb+ÍÏÏÚ¶mKÔ¦MúÏþCOž<Ñj·h§¨Õjòòò*n¥ ºº~ý:}øá‡ôÆoP:uÈÕÕ•bbbŠ}Î’__ß¿TµZM-[¶¤ Ñ‹-¼O?ý”Ú·oOæææäàà@ , §OŸjÞ£Ë4eyµokÕªE-[¶¤ÀÀ@rww/ñÒ‡Òk¸•§öîÝKhóæÍ%¶¥Ë÷^}õ·±…›¾ú¹¤õX¥RQݺuéÏ?ÿÔ¹ž*X®õn¬ê={öŒNž<©óôÆnÕEyûÛØÂ­ºÐãrmس¥ÌpLMMÑ­[7¡Ë¨1¸¿«†>û¹Ú=Ú¯¬ÓýTä·«ÆLLŸ¥:àþ®ÆÒÏÕ.ÜÄ´Šé³TÜßUÃXú™wKc¢ÄáÆ%7Ƙ(q¸1ÆD‰Ã1&NE¯|“ÉŒ÷¡ÂœÏÜ÷›oî{j‡DC«û‰Ò+ ‘ƒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰ù¸óËGÅž={<µz€üüüPSSƒàààaáV,GŽAss bb î C^pâÄ1¤¥¥) ÄÄPUuÀÝaè³ÙtnÁsc,$ÆXHŒ±c!1ÆrÝ݈ SzªÂXîa``½½=J/CUÆt,¨­}‰‰ñˆŽž†—^JDCÃ9„†ê°|y" >>BáUª‡ÛåF²#GÞBuu9,– Ì›g@KËgÈÍݨ¯ÿ‹Åá£þ¡ð*ÕcL¿³¼ùæ˜LÛ‘˜¸“&MÆ‚Ï!/¯Pée©Ö˜Ž¥»»‘‘Ñ.Û""f+´õÓ±Lžˆ¶¶f—m—/·)´õÓç,))«°sgÆŸ€¹sãÐÚÚ„²2³Ë>·o߸q)´BuÓ±¬_Ÿ…;wúa±àÆëˆˆˆ‚ÉdFvözLŒ¸¸ÄÇÏBSS·ÒKU…1‹/²²^AVÖ+Îm]]v€Vë«Õ¦ÔÒTiLŸ³Ðÿ‡±cùéÓCÐÞÎËüƒa,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰yíc•f³ íí¼aËÓV®\ƒ%K~镹¼Kmí^ÄÅ% (hš·¦õΟÿ+l¶wG_,‘‘ƒeˌޜrT[³Æˆï¾ûÖkóñœ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!±‹Ý~:FéexÔHù›F\,£Ñĉ`Ó¦-J/cHŒEôz•*½Œ!©2–ïß–m¶c0"0sæ$˜LÑ××粟ÃáÀ¶myxúéy¸qã:úûûQZZ„èè`„‡`Æ_ãæÍ^—1Ïœ9…èè`44ü7oö"3s5ÂÂü1{öTlÛ–‡¾¾oÄóÿÃáÀ»‘…àà xá…E8yòt:Í5w?)‡!Uiò¾}»pøð ôöö ==>ªGJÊ*ÿû‡)*ÚŒ³gOá½÷NA§Ó£ººï¿ÿ¬Ö?A£Ñ`ãÆu¨¨(Áޝ:Ǭ©©À®]ñÄ?CNN:¾üò_øðÿáöí[X¿þWxøáñÎ9›Ë–¢{®÷С}(/· ªjæÎEsó'Îÿ’f4På;Ë÷Š‹ËŽØØx– ®îó9³Ù„êêrìßo…N§ÔÖþ[·#**‘‘sPSsO>ùs—1·oÿ=žzj!|}ŠúúÃØ¹óu̘‚¨¨häçïp™ã~óf÷î×a6—aÑ¢ç¡×ûã™gžE~þ¾"ÊRu,¡¡áΟÃÃgáêÕ:76žÇüù PYù;ç¶îî.—ß™93K—&»Œ> píÚ¿qçÎ<þx¨ó¹0—9î7ÿ`::Ú9Çe[DDÔ û:ŽûŽ¥FªŽ¥½ýò]?_”)ÎÇo¿}••»Q_çÎL™ˆÏ?ïtîÓÔô **J\ÆôõõL†V«Eg§Ýù\GG;ƒDófÚ´éhk»è²íÒ¥V—Çýýý€/¾¸zß±ÔHÕ±äço‚Ý~çQ\¼Fcªó¹qãBXX²³Mxùåߢ¯ï¬X‘‹¥­­ÍhmmÆæÍYèîîtl___$'¯€É´]]hmmFII¡ó|e¨ù³n]&ŠŠ6ãôéÐÓsgÏþ¥¥Û¡Ñh0qâ#«µ_}õìÝû¼BÞ¥êXRRV!9ùYIX¼øÈÉÉÿÑ>ÙÙ&Àk¯•";; &âÅŸÇ’%ó1uj0Ìæ²{Ž_VVÇ ÄâÅ,_žˆ… ]æÌ·µk3™™‹¼¼ ÄÄ„¢ªêU˜ÍeÐëý¡×û£ À‚ÂÂ\,Xƒ•+WïEQÆáÆÁÓh4âÖ­oQUu`È}CCuØ¿ß*º#Ñn¿‚¸¸pôô(s\îü'Ož@PÐ4Ì™3×¹íøñwP^nÁ™3ž^¦óŽDéëoµZa4ûŽÐ:U¿³Œ4/~†ôôT|úéßñõ×·ññÇ ()Ù†´´uJ/Í#Tyeüø X½:]•óuñ,7·©©Ëpýú5̘‚ÔÔß(ú·x’*c ˜„ÊÊݪœ_rh*(°xzIªÀÉ1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…ļúá§òr |ÛSŽj--M0¼6Ÿ×bY»6cDÞ+£fC’’’‡ÞÑC¼ËÖ­£ó£†c ÏYHŒ±c!1ÆBbŒ…Ä ‰1c,$æÖE9­V ›íl6§ÖC{×`Ýú~»ÝŽ .¸µò­V‹¤¤$øùù wˆ:·b¡1…_æCrŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$æ NéEЈÐð_‡pZ™™Ù°óIEND®B`‚pktools-2.6.6/doc/html/pkextract__gui_2main_8cpp_source.html0000644000113200011300000001066412647637661021163 00000000000000 pktools: /home/kempenep/pktools/qt/pkextract_gui/main.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
main.cpp
1 #include "mainwindow.h"
2 #include <QApplication>
3 
4 int main(int argc, char *argv[])
5 {
6  QApplication a(argc, argv);
7  MainWindow w;
8  w.show();
9 
10  return a.exec();
11 }
pktools-2.6.6/doc/html/dir_0f38b5d14ac73b43e2a48a75f9e70be8_dep.png0000644000113200011300000000560512616110567020505 00000000000000‰PNG  IHDRíãEÇbKGDÿÿÿ ½§“ :IDATxœíÝ{P”åð/™:6‚g¹Èý&)É!=sÊñÔÆé2™ ÎI-íŽrÈD‰DÝ4HK¼ ŠLTŠ£D™x¡PÑAª¡#N "‹H´^€4G‰Ÿó—ïavv÷Y¿Ÿ™Ù÷öüžç™÷;û>«B€ˆ¤ñKw€ˆú†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É 1åâÏ?ÿ›7o¨¾Ý™™ÙïëíLù{Ú¸¸8”•}‹ÈÈè~w€è^¢Õ6£²²¦ü»IŸ´uë¶™Ú Ñ=áÀ=¨¬|Ù¤6¸¦%’ CK$†–H2 -‘dZ"É0´6®©éy$ÈÒÝ ÄÐÚ¸[·náÊ•6KwƒCknݺ…ÜÜ-ˆ‰‹ðpoL™ƒòò2ª0yr `ìØP ÷’ŠÉ¿\A–÷ÙgŸ`ýú ¤¥­BDD4~üñ$’’â»wÄãGáûïO[¸—4PøIk¶oߌ””÷ó4ÜÜÜ1aÂß1þ"Kw‹ CkššÎ!,,\g_hè( õ†CkÜÝ=Q[[¥³¯®®ÖB½¡ÁÆ5­ ˆ†åËÕ6ÌcÆD¡¦æ>úh©Î97n\ÇСX¨‡4ZðÚk èêêDZZ*Z[[úRR–bîÜ×0b„¢¢ÆaìØ‘8uªÉÒ]¥ÀÐÚ€!C° ”}€½ýäçYªk4¸¦%’ CK$†ÖFùú ¾ž¿¾h‹Z"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2fýº™¥KSP_Ï/Í&Ûrß}÷céÒ•ðôa–zf mnn6¢¢ÆÁËËÛœe‰Uaa&Mšj›¡€Ù³ßƤIqæ.K4hT*;³Öãš–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ŒÕ†V£9Û¯¿Sì~¡6úS£¿ý²fÖ0&•ÊNç5fŒâã_DKËe£®·†1˜‹Õ†¶¿œœ†ã­·Þ±t7¤b-sV\üjkµ¨®þ ë×oõk¿b„H\½zÅÒ]³*6Zgg¨Õ+,Ý ©XËœ9;»ÂÍíAxxxá±Çþ†O>ù~~ظq¥»fU¬>´yˆŒ Dp°+’’âÑÞ~ã®G!c‰»ºº°nÝJDG‡ÀÛ{&Nü+Nœø¾Çš·Û(**Dtt(BBÜ’’ˆŽŽó„X¼x>Æ@kk :;;±b…áá>vE|ü‹Ê§Äí6KKKîƒòòopõêÌ™3AA.5j/žŽŽßŒ®'!¶mÛ„qã‚#ž}öqï‡Jeׯ93Ô¦¾ñê;f,;;;Ìšõ&< ì»yó&–,Y€ÐPw„„¸aÉ’¸yó¦r¼¯÷‹¾ñY+«m^^ ¾Æ®]ûQZz+W¾ß¯v²³3±~}ÔêQQqII©P«“õ^³uëìÚµ;wîÃáÃ_aíÚÿ ! V'ãØ±ìÙSgglÚ´{÷~üüØ»÷(Ξ=ƒU«ÒuÚÌÊZ… vàá‡ÿŒääüüóO8|øß((ø GŽcíڪߓO?ÝŠŒŒ4|ðÁTVj0oÞB¤¦¾ÝÙ2®M}ã5f.ŒŒ††ze{ãÆ5hllÀ‘#س§eeG°|ùåx_ï—Á˜³A'L+ž|òYQ_ßfÔ €ÈÉÉmmÂà«¢¢Nß|sRÙ—““/|}ý•cwž«ï}``ˆÈÊÚ®ScÆ:íª¤KLLÄñã§•s‚‚BEnîne»¼üGeûÎ6/^ü]ØÛۋᆱRÎÏÍÝ­S£§úúæ,,l´ÈÎÎÓÙ·eË¿£ç¬/m꯾c=½n÷ñÎý%%Ç…“Ópe;8x¤¨­Õ*Û_~yH„‡Gôû~Ñ7>cîÓÛ}ÏÌÌ1*™™9ÂÄØ ³c_+GâÂí]ç! ¶ÓÜÜ„ðð}£F=¬¼ïþ8TQQ×cíææŸ”íÊÊãxôÑ X½údem455ê\†0šÁÁ#—/_DWWüý•cA:5ôÕïICC=ÂÂFëì }¨ÇsõÍY÷¹¸ÿþ?öÚ¦¾ñš‹î5ÚÚzï‹FS§3GçÏŸÃÈ‘:ç8::)ïûz¿ôeά…Õ?×××u{ÞÞ¾Êvgg'@«m6ØŽªª~ÐÙW[[­¼okÊ«·ÚžÊöÎû°zõ&ìÞ½ eeGž8þœrΩSÿ½ë‘ÐÁÁàêê{{{œ;§QŽ54ÔÃÓÓ˨ú=ñööÕœ9S£³mÌœuŸ }mꯡ¹èi¾ï$„@NÎFÄÄ<¥ìsvvAEErmCÃ/8t¨\9Þ×ûŘ9³6VÚE‹’ ÑœEeåq¼ÿþB¼ðÂL89 äççâÚµ_‘i°Y³Þ„Z½EE…¸téJJ¾ÖY õäÝwßÒ©7]96tè Åܹ)˜7ïMttü†©Sg --55U¨©©Brršš{lÛÁÁÏ=7))‰hll@MMÒÓ!6všQõ{òê«s V'ãèуhkkűcG°bÅ{°³³ëלjSßxû2·µ¶^Æ¥K Õ6ãÛoK1cÆshllÀìÙó”sžyf2–-{MM¨®>‰)S&âã³”ã}½_ôÏjYûšvëÖ]ÂÇÇO¸ºº‰9s’Ä… ¢­MˆÔÔ4áä4\øûм¼BƒkÚË—;Ųe+E@@:ôýqèP¹Þ5mfæÇÂÛÛW8;»ˆ×_ÿ§ÐjÛïZiµí"00D¼óŽZhµ¿‰„„ùâÁ=…££“xþùˆ††_z]7j4mbêÔB¥rîî">þm=Õ×7g--]"=}ð÷ŽŽNâ‰'&м¼Báââjôœõ¥M}ãÕw¬·ua÷———·ˆ&NŸ¾¨sÞùó¿ŠiÓf‰áÃÿ$T*gñÒK¯‹ææëý¾_ Í™5®ií„1 Â^ÄÅÅáúõß±nÝ6£Î T!''ßêÿ‡æ,¢¢‚õ>ºYcýââýðòòÆèÑc”}ûö}ŒŒ4”–Vö«/ƒÑ¦5ˆñ©TvÈÌÌÁSOM2xî{˜ø²Q?‡éÕ?“ñª«Oâ7¦ã‡þƒöö¨¨(Gzúb̘ñªUµiMdŸÕÿô؆ sÄÌ™oXe}Cÿ蟔”ŠéÓ'¡¥å2üü0}úË&%11íí7´Mk"ãøøxLd">‘^ -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$³sEFFvìØbî²D6ì¡}å•ÙF}G1‘Lž~z2""1[=³†váÂ4s–#²I\ÓI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$cÒ/WØÛÛ£¨¨EEªê‘ͳ··7éz“þ.Fƒ'N˜Ô¢{»»;ÆßïëM -™×´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$™! ,Ý "2ÞÿȰì =¾£IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask__coll__graph.map0000644000113200011300000000011312616110567023762 00000000000000 pktools-2.6.6/doc/html/inherit_graph_7.md50000644000113200011300000000004012616110567015313 000000000000005ee11c9862bcc37a09f033d717df12dbpktools-2.6.6/doc/html/classVector2d__inherit__graph.map0000644000113200011300000000022012616110567020251 00000000000000 pktools-2.6.6/doc/html/pktools_2pkfilterdem_8py_source.html0000644000113200011300000006404512647637661021100 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkfilterdem.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilterdem.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkfilterdem.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.parameters import ParameterFile
32 from processing.core.outputs import OutputRaster
33 from processing.core.parameters import ParameterSelection
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterBoolean
37 from processing.core.parameters import ParameterExtent
38 
39 class pkfilterdem(pktoolsAlgorithm):
40 
41  INPUT = "INPUT"
42  OUTPUT = "OUTPUT"
43  DIM = "DIM"
44  RTYPE = 'RTYPE'
45  TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
46  FILTER_OPTIONS = ["promorph"]
47  FILTER = "FILTER"
48  EXTRA = 'EXTRA'
49 
50  def cliName(self):
51  return "pkfilterdem"
52 
53  def defineCharacteristics(self):
54  self.name = "Create DTM from DEM raster dataset)"
55  self.group = "[pktools] LiDAR"
56 
57  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
58  self.addParameter(ParameterSelection(self.FILTER,"filter",self.FILTER_OPTIONS, 0))
59  self.addParameter(ParameterNumber(self.DIM, "maximum filter kernel size",3,None,17))
60 
61  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
62  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type', self.TYPE, 0))
63  self.addParameter(ParameterString(self.EXTRA,
64  'Additional parameters', '-of GTiff', optional=True))
65 
66  def processAlgorithm(self, progress):
67  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
68  commands = [cliPath]
69 
70  input=self.getParameterValue(self.INPUT)
71  if input != "":
72  commands.append('-i')
73  commands.append('"' + input + '"')
74 
75  filter=self.FILTER_OPTIONS[self.getParameterValue(self.FILTER)]
76  if filter != "none":
77  commands.append("-f")
78  commands.append(filter)
79  if self.getParameterValue(self.DIM) != 0:
80  commands.append("-dim")
81  commands.append(str(self.getParameterValue(self.DIM)))
82 
83  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
84  commands.append('-ot')
85  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
86  output=self.getOutputValue(self.OUTPUT)
87  if output != "":
88  commands.append("-o")
89  commands.append('"' + output + '"')
90 
91  extra = str(self.getParameterValue(self.EXTRA))
92  if len(extra) > 0:
93  commands.append(extra)
94 
95  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/inherits.html0000644000113200011300000005505512647637663014405 00000000000000 pktools: Class Hierarchy
pktools  2.6.6
Processing Kernel for geospatial data
Class Hierarchy
pktools-2.6.6/doc/html/pkcomposite__gui_2main_8cc_source.html0000644000113200011300000001665712647637661021326 00000000000000 pktools: /home/kempenep/pktools/qt/pkcomposite_gui/main.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
main.cc
1 /**********************************************************************
2 main.cc
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #include "mainwindow.h"
22 #include <QApplication>
23 
24 int main(int argc, char *argv[])
25 {
26  QApplication a(argc, argv);
27  MainWindow w;
28  w.show();
29 
30  return a.exec();
31 }
pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random__coll__graph.md50000644000113200011300000000004012616110566027074 00000000000000e5c6a34fa04564968b7ad2a2a06e5c99pktools-2.6.6/doc/html/dir_2676862852e3d558e3597542a81ecc63.html0000644000113200011300000001065712647637663017444 00000000000000 pktools: /home/kempenep/pktools/qt/pkextract_gui Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
pkextract_gui Directory Reference
Directory dependency graph for pkextract_gui:
/home/kempenep/pktools/qt/pkextract_gui

Files

file  main.cpp [code]
 
file  mainwindow.cpp [code]
 
file  mainwindow.h [code]
 
pktools-2.6.6/doc/html/classOptionpk-members.html0000644000113200011300000002525412647637662017036 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Optionpk< T > Member List

This is the complete list of members for Optionpk< T >, including all inherited members.

findSubstring(const T &argument) const Optionpk< T >inline
findSubstring(const std::string &argument) const (defined in Optionpk< T >)Optionpk< T >inline
getDefaultValue() const (defined in Optionpk< T >)Optionpk< T >inline
getGPLv3License()Optionpk< T >inlinestatic
getHelp() const Optionpk< T >inline
getLongName() const Optionpk< T >inline
getShortName() const Optionpk< T >inline
operator<<(std::ostream &os, const Optionpk< T1 > &theOption)Optionpk< T >friend
Optionpk()Optionpk< T >inline
Optionpk(const std::string &shortName, const std::string &longName, const std::string &helpInfo)Optionpk< T >inline
Optionpk(const std::string &shortName, const std::string &longName, const std::string &helpInfo, const T &defaultValue, short hide=0)Optionpk< T >inline
Optionpk(const std::string &shortName, const std::string &longName, const std::string &helpInfo) (defined in Optionpk< T >)Optionpk< T >inline
Optionpk(const std::string &shortName, const std::string &longName, const std::string &helpInfo, const bool &defaultValue, short hide) (defined in Optionpk< T >)Optionpk< T >inline
retrieveOption(int argc, char **argv)Optionpk< T >inline
setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo)Optionpk< T >inline
setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo, const T &defaultValue, short hide)Optionpk< T >inline
setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo) (defined in Optionpk< T >)Optionpk< T >inline
setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo, const bool &defaultValue, short hide) (defined in Optionpk< T >)Optionpk< T >inline
setDefault(const T &defaultValue)Optionpk< T >
setHelp(const std::string &helpInfo)Optionpk< T >inline
setHide(short hide)Optionpk< T >inline
setLongName(const std::string &longName)Optionpk< T >
setShortName(const std::string &shortName)Optionpk< T >
~Optionpk()Optionpk< T >inline
pktools-2.6.6/doc/html/ImgRasterGdal_8cc_source.html0000644000113200011300000014575112647637662017364 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgRasterGdal.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgRasterGdal.cc
1 /**********************************************************************
2 ImgRasterGdal.cc: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include "ImgRasterGdal.h"
22 
23 ImgRasterGdal::ImgRasterGdal(void)
24  : m_gds(NULL), m_ncol(0), m_nrow(0), m_nband(0)
25 {}
26 
27 //--------------------------------------------------------------------------
28 void ImgRasterGdal::close(void)
29 {
30  GDALClose(m_gds);
31 }
32 
33 std::string ImgRasterGdal::getProjection(void) const
34 {
35  std::string theProjection=m_gds->GetProjectionRef();
36  // size_t startpos,endpos;
37  // while((startpos=theProjection.find(",AUTHORITY"))!=std::string::npos){
38  // endpos=theProjection.find("]",startpos+1,1)+1;
39  // theProjection.erase(startpos,endpos-startpos);
40  // }
41  return theProjection;
42 }
43 
44 std::string ImgRasterGdal::getProjectionRef(void) const
45 {
46  std::string theProjection;
47  if(m_gds->GetProjectionRef())
48  return(m_gds->GetProjectionRef());
49  else
50  return "";
51 }
52 
53 GDALDataType ImgRasterGdal::getDataType(int band) const
54 {
55  assert(band<m_nband+1);
56  return (m_gds->GetRasterBand(band+1))->GetRasterDataType();
57 }
58 
59 GDALRasterBand* ImgRasterGdal::getRasterBand(int band)
60 {
61  assert(band<m_nband+1);
62  return (m_gds->GetRasterBand(band+1));
63 }
64 
65 GDALColorTable* ImgRasterGdal::getColorTable(int band) const
66 {
67  assert(band<m_nband+1);
68  return (m_gds->GetRasterBand(band+1))->GetColorTable();
69 }
70 
71 std::string ImgRasterGdal::getDriverDescription() const
72 {
73  return m_gds->GetDriver()->GetDescription();
74 }
75 
76 void ImgRasterGdal::getGeoTransform(double* gt) const{
77  m_gds->GetGeoTransform(gt);
78 }
79 
80 // void ImgRasterGdal::getGeoTransform(double& ulx, double& uly, double& deltaX, double& deltaY, double& rot1, double& rot2) const
81 // {
82 // double adfGeoTransform[6];// { 444720, 30, 0, 3751320, 0, -30 };
83 // m_gds->GetGeoTransform(adfGeoTransform);
84 // ulx=adfGeoTransform[0];
85 // deltaX=adfGeoTransform[1];
86 // rot1=adfGeoTransform[2];
87 // uly=adfGeoTransform[3];
88 // rot2=adfGeoTransform[4];
89 // deltaY=-adfGeoTransform[5];//convention of GDAL!
90 // }
91 
92 std::string ImgRasterGdal::getGeoTransform() const
93 {
94  double gt[6];// { 444720, 30, 0, 3751320, 0, -30 };
95  m_gds->GetGeoTransform(gt);
96  std::ostringstream s;
97  s << "[" << gt[0] << "," << gt[1] << "," << gt[2] << "," << gt[3] << "," << gt[4] << "," << gt[5] << "]";
98  return(s.str());
99  // if(!isGeoRef())
100  // return("");
101  // else{
102  // double adfGeoTransform[6];// { 444720, 30, 0, 3751320, 0, -30 };
103  // m_gds->GetGeoTransform(adfGeoTransform);
104  // double ulx=adfGeoTransform[0];
105  // double deltaX=adfGeoTransform[1];
106  // double rot1=adfGeoTransform[2];
107  // double uly=adfGeoTransform[3];
108  // double rot2=adfGeoTransform[4];
109  // double deltaY=-adfGeoTransform[5];//convention of GDAL!
110  // std::ostringstream s;
111  // s << "[" << ulx << "," << deltaX << "," << rot1 << "," << uly << "," << rot2 << "," << -deltaY << "]";
112  // return(s.str());
113  // }
114 }
115 
116 char** ImgRasterGdal::getMetadata()
117 {
118  if(m_gds->GetMetadata()!=NULL)
119  return(m_gds->GetMetadata());
120  else
121  return (char**)"";
122 }
123 
124 char** ImgRasterGdal::getMetadata() const
125 {
126  if(m_gds->GetMetadata()!=NULL)
127  return(m_gds->GetMetadata());
128  else
129  return (char**)"";
130 }
131 
132 void ImgRasterGdal::getMetadata(std::list<std::string>& metadata) const
133 {
134  char** cmetadata=m_gds->GetMetadata();
135  while(*cmetadata!=NULL){
136  metadata.push_back(*(cmetadata));
137  ++cmetadata;
138  }
139 }
140 
141 std::string ImgRasterGdal::getDescription() const
142 {
143  if(m_gds->GetDriver()->GetDescription()!=NULL)
144  return m_gds->GetDriver()->GetDescription();
145  else
146  return "";
147 }
148 
149 std::string ImgRasterGdal::getMetadataItem() const
150 {
151  if(m_gds->GetDriver()->GetMetadataItem( GDAL_DMD_LONGNAME )!=NULL)
152  return m_gds->GetDriver()->GetMetadataItem( GDAL_DMD_LONGNAME );
153  else
154  return "";
155 }
156 std::string ImgRasterGdal::getImageDescription() const
157 {
158  if(m_gds->GetDriver()->GetMetadataItem("TIFFTAG_IMAGEDESCRIPTION")!=NULL)
159  return m_gds->GetDriver()->GetMetadataItem("TIFFTAG_IMAGEDESCRIPTION");
160  else
161  return "";
162 }
163 
164 std::string ImgRasterGdal::getInterleave() const
165 {
166  if(m_gds->GetMetadataItem( "INTERLEAVE", "IMAGE_STRUCTURE"))
167  return m_gds->GetMetadataItem( "INTERLEAVE", "IMAGE_STRUCTURE");
168  else
169  return("BAND");
170 }
171 
172 std::string ImgRasterGdal::getCompression() const
173 {
174  if(m_gds->GetMetadataItem( "COMPRESSION", "IMAGE_STRUCTURE"))
175  return m_gds->GetMetadataItem( "COMPRESSION", "IMAGE_STRUCTURE");
176  else
177  return("NONE");
178 }
179 
180 bool ImgRasterGdal::getBoundingBox(double& ulx, double& uly, double& lrx, double& lry) const
181 {
182  double gt[6];// { 444720, 30, 0, 3751320, 0, -30 };
183  m_gds->GetGeoTransform(gt);
184 
185  //assuming
186  //adfGeotransform[0]: ULX (upper left X coordinate)
187  //adfGeotransform[1]: $cos(\alpha)\cdot\textrm{Xres}$
188  //adfGeotransform[2]: $-sin(\alpha)\cdot\textrm{Xres}$
189  //adfGeotransform[3]: ULY (upper left Y coordinate)
190  //adfGeotransform[4]: $-sin(\alpha)\cdot\textrm{Yres}$
191  //adfGeotransform[5]: $-cos(\alpha)\cdot\textrm{Yres}$
192  ulx=gt[0];
193  uly=gt[3];
194  lrx=gt[0]+nrOfCol()*gt[1]+nrOfRow()*gt[2];
195  lry=gt[3]+nrOfCol()*gt[4]+nrOfRow()*gt[5];
196  if(isGeoRef()){
197  // ulx=m_ulx;
198  // uly=m_uly;
199  // lrx=ulx+nrOfCol()*m_delta_x;
200  // lry=uly-nrOfRow()*m_delta_y;
201  return true;
202  }
203  else{
204  // ulx=0;
205  // uly=nrOfRow()-1;
206  // lrx=nrOfCol()-1;
207  // lry=0;
208  return false;
209  }
210 }
211 
212 bool ImgRasterGdal::getCenterPos(double& x, double& y) const
213 {
214  double gt[6];// { 444720, 30, 0, 3751320, 0, -30 };
215  m_gds->GetGeoTransform(gt);
216 
217  //assuming
218  //adfGeotransform[0]: ULX (upper left X coordinate)
219  //adfGeotransform[1]: $cos(\alpha)\cdot\textrm{Xres}$
220  //adfGeotransform[2]: $-sin(\alpha)\cdot\textrm{Xres}$
221  //adfGeotransform[3]: ULY (upper left Y coordinate)
222  //adfGeotransform[4]: $-sin(\alpha)\cdot\textrm{Yres}$
223  //adfGeotransform[5]: $-cos(\alpha)\cdot\textrm{Yres}$
224  x=gt[0]+(nrOfCol()/2.0)*gt[1]+(nrOfRow()/2.0)*gt[2];
225  y=gt[3]+(nrOfCol()/2.0)*gt[4]+(nrOfRow()/2.0)*gt[5];
226  if(isGeoRef()){
227  // x=m_ulx+(nrOfCol()/2.0)*m_delta_x;
228  // y=m_uly-(nrOfRow()/2.0)*m_delta_y;
229  return true;
230  }
231  else{
232  // x=nrOfCol()/2.0;
233  // y=nrOfRow()/2.0;
234  return false;
235  }
236 }
237 
238 //i and j represent fraction of pixels, return true if image is georeferenced
239 bool ImgRasterGdal::geo2image(double x, double y, double& i, double& j) const
240 {
241  //double values are returned, caller is responsible for interpolation step
242  double gt[6];// { 444720, 30, 0, 3751320, 0, -30 };
243  m_gds->GetGeoTransform(gt);
244  //assuming
245  //adfGeotransform[0]: ULX (upper left X coordinate)
246  //adfGeotransform[1]: $cos(\alpha)\cdot\textrm{Xres}$
247  //adfGeotransform[2]: $-sin(\alpha)\cdot\textrm{Xres}$
248  //adfGeotransform[3]: ULY (upper left Y coordinate)
249  //adfGeotransform[4]: $-sin(\alpha)\cdot\textrm{Yres}$
250  //adfGeotransform[5]: $-cos(\alpha)\cdot\textrm{Yres}$
251 
252  double denom=(gt[1]-gt[2]*gt[4]/gt[5]);
253  double eps=0.00001;
254  if(fabs(denom)>eps){
255  i=(x-gt[0]-gt[2]/gt[5]*(y-gt[3]))/denom;
256  j=(y-gt[3]-gt[4]*(x-gt[0]-gt[2]/gt[5]*(y-gt[3]))/denom)/gt[5];
257  }
258  if(isGeoRef()){
259  // double ulx=m_ulx;
260  // double uly=m_uly;
261  // i=(x-ulx)/m_delta_x;
262  // j=(uly-y)/m_delta_y;
263  return true;
264  }
265  else{
266  // i=x;
267  // j=nrOfRow()-y;
268  return false;
269  }
270 }
271 
272 //x and y represent center of pixel, return true if image is georeferenced
273 bool ImgRasterGdal::image2geo(double i, double j, double& x, double& y) const
274 {
275  double gt[6];// { 444720, 30, 0, 3751320, 0, -30 };
276  m_gds->GetGeoTransform(gt);
277 
278  //assuming
279  //adfGeotransform[0]: ULX (upper left X coordinate)
280  //adfGeotransform[1]: $cos(\alpha)\cdot\textrm{Xres}$
281  //adfGeotransform[2]: $-sin(\alpha)\cdot\textrm{Xres}$
282  //adfGeotransform[3]: ULY (upper left Y coordinate)
283  //adfGeotransform[4]: $-sin(\alpha)\cdot\textrm{Yres}$
284  //adfGeotransform[5]: $-cos(\alpha)\cdot\textrm{Yres}$
285 
286  x=gt[0]+(0.5+i)*gt[1]+(0.5+j)*gt[2];
287  y=gt[3]+(0.5+i)*gt[4]+(0.5+j)*gt[5];
288  if(isGeoRef()){
289  // x=m_ulx+(0.5+i)*m_delta_x;
290  // y=m_uly-(0.5+j)*m_delta_y;
291  return true;
292  }
293  else{
294  // x=0.5+i;
295  // y=nrOfRow()-(0.5+j);
296  return false;
297  }
298 }
299 
300 bool ImgRasterGdal::covers(double x, double y) const
301 {
302  double theULX, theULY, theLRX, theLRY;
303  getBoundingBox(theULX,theULY,theLRX,theLRY);
304  return((x > theULX)&&
305  (x < theLRX)&&
306  (y < theULY)&&
307  (y >theLRY));
308 }
309 
310 bool ImgRasterGdal::covers(double ulx, double uly, double lrx, double lry) const
311 {
312  double theULX, theULY, theLRX, theLRY;
313  getBoundingBox(theULX,theULY,theLRX,theLRY);
314  return((ulx < theLRX)&&(lrx > theULX)&&(lry < theULY)&&(uly > theLRY));
315 }
316 
317 int ImgRasterGdal::getNoDataValues(std::vector<double>& noDataValues) const
318 {
319  if(m_noDataValues.size()){
320  noDataValues=m_noDataValues;
321  return m_noDataValues.size();
322  }
323  else
324  return 0;
325 }
326 
327 int ImgRasterGdal::pushNoDataValue(double noDataValue)
328 {
329  if(find(m_noDataValues.begin(),m_noDataValues.end(),noDataValue)==m_noDataValues.end())
330  m_noDataValues.push_back(noDataValue);
331  return(m_noDataValues.size());
332 }
333 
334 // bool ImgRasterGdal::setNoDataValue(double noDataValue,int band)
335 // {
336 // GDALRasterBand *poBand;
337 // poBand = m_gds->GetRasterBand(band+1);
338 // if(poBand->SetNoDataValue(noDataValue)!=CE_None)
339 // return false;
340 // else
341 // return true;
342 // }
pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem-members.html0000644000113200011300000001727512647637662023760 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkfilterdem.pkfilterdem Member List
pktools-2.6.6/doc/html/pkndvi_8cc_source.html0000644000113200011300000016252512647637661016167 00000000000000 pktools: /home/kempenep/pktools/src/apps/not_used/pkndvi.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkndvi.cc
1 /**********************************************************************
2 pkndvi.cc: program to calculate vegetation index image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19  ***********************************************************************/
20 #include <assert.h>
21 #include <vector>
22 #include "imageclasses/ImgReaderGdal.h"
23 #include "imageclasses/ImgWriterGdal.h"
24 #include "base/Optionpk.h"
25 
26 using namespace std;
27 
28 int main(int argc, char *argv[])
29 {
30  //command line options
31  Optionpk<string> input_opt("i","input","input image file");
32  Optionpk<string> output_opt("o","output","output image file containing ndvi");
33  Optionpk<short> band_opt("b", "band", "Bands to be used for vegetation index (see rule option)", 0);
34  Optionpk<string> rule_opt("r", "rule", "Rule for index. ndvi (b1-b0)/(b1+b0), ndvi2 (b1-b0)/(b2+b3), 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");
35  Optionpk<double> invalid_opt("t", "invalid", "Mask value where image is invalid.", 0);
36  Optionpk<int> nodata_opt("nodata", "nodata", "Flag value to put in image if not valid (0)", 0);
37  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
38  Optionpk<string> description_opt("d", "description", "Set image description");
39  Optionpk<double> min_opt("min", "min", "minimum value for ndvi after scaling (set all values smaller than min to min)", 0);
40  Optionpk<double> max_opt("max", "max", "maximum value for ndvi after scaling (limit all values to max)");
41  Optionpk<double> eps_opt("e", "eps", "epsilon, contraint division by zero", 0);
42  Optionpk<double> src_scale_opt("src_s", "src_scale", "scale used for input, scale[1] is used for output: DN=scale[1]*ndvi+offset[1]", 1);
43  Optionpk<double> dst_scale_opt("dst_s", "src_scale", "scale used for output: DN=dst_s*ndvi+dst_offset", 1);
44  Optionpk<double> src_offset_opt("src_o", "src_offset", "offset used for input", 0);
45  Optionpk<double> dst_offset_opt("dst_o", "dst_offset", "offset is used for output: DN=dst_s*ndvi+dst_offset", 0);
46  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", "Byte");
47  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image", "GTiff");
48  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
49  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0);
50 
51  bool doProcess;//stop process when program was invoked with help option (-h --help)
52  try{
53  doProcess=input_opt.retrieveOption(argc,argv);
54  output_opt.retrieveOption(argc,argv);
55  band_opt.retrieveOption(argc,argv);
56  rule_opt.retrieveOption(argc,argv);
57  invalid_opt.retrieveOption(argc,argv);
58  nodata_opt.retrieveOption(argc,argv);
59  colorTable_opt.retrieveOption(argc,argv);
60  description_opt.retrieveOption(argc,argv);
61  min_opt.retrieveOption(argc,argv);
62  max_opt.retrieveOption(argc,argv);
63  eps_opt.retrieveOption(argc,argv);
64  src_scale_opt.retrieveOption(argc,argv);
65  src_offset_opt.retrieveOption(argc,argv);
66  dst_scale_opt.retrieveOption(argc,argv);
67  dst_offset_opt.retrieveOption(argc,argv);
68  otype_opt.retrieveOption(argc,argv);
69  oformat_opt.retrieveOption(argc,argv);
70  option_opt.retrieveOption(argc,argv);
71  verbose_opt.retrieveOption(argc,argv);
72  }
73  catch(string predefinedString){
74  std::cout << predefinedString << std::endl;
75  exit(0);
76  }
77  if(!doProcess){
78  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
79  exit(0);//help was invoked, stop processing
80  }
81 
82  if(input_opt.empty()){
83  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
84  exit(0);
85  }
86  if(output_opt.empty()){
87  std::cerr << "No output file provided (use option -o). Use --help for help information" << std::endl;
88  exit(0);
89  }
90 
91  int reqBand=0;
92  if(rule_opt[0]=="scale")
93  reqBand=1;
94  else if(rule_opt[0]=="vari"||rule_opt[0]=="mcari"||rule_opt[0]=="tcari")
95  reqBand=3;
96  else if(rule_opt[0]=="ndvi2")
97  reqBand=4;
98  else
99  reqBand=2;
100  while(band_opt.size()<reqBand)//bands can be explicitly provided by user or
101  band_opt.push_back(band_opt[0]);//default is to use band 0 for each input
102  if(verbose_opt[0])
103  std::cout << band_opt;
104 
105  //todo: a bit stupid to duplicate input reader, but it works
106  while(input_opt.size()<reqBand)
107  input_opt.push_back(input_opt[0]);
108  if(verbose_opt[0])
109  std::cout << input_opt;
110 
111  vector<ImgReaderGdal> inputReader(reqBand);
112  for(int ifile=0;ifile<reqBand;++ifile){
113  inputReader[ifile].open(input_opt[ifile]);
114  assert(inputReader[ifile].nrOfBand()>band_opt[ifile]);
115  }
116 
117  if(verbose_opt[0]){
118  cout << "opening output image file " << output_opt[0] << endl;
119  cout << "data type: " << otype_opt[0] << endl;
120  }
121  //create output image with user defined data type
122  GDALDataType theType=GDT_Unknown;
123  if(verbose_opt[0])
124  cout << "possible output data types: ";
125  for(int iType = 0; iType < GDT_TypeCount; ++iType){
126  if(verbose_opt[0])
127  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
128  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
129  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
130  otype_opt[0].c_str()))
131  theType=(GDALDataType) iType;
132  }
133  if(theType==GDT_Unknown)
134  theType=inputReader[0].getDataType();
135  if(verbose_opt[0])
136  cout << endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
137 
138  ImgWriterGdal outputWriter;
139  if(verbose_opt[0])
140  cout << "opening output image file " << output_opt[0] << endl;
141 
142  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
143  string theInterleave="INTERLEAVE=";
144  theInterleave+=inputReader[0].getInterleave();
145  option_opt.push_back(theInterleave);
146  }
147  outputWriter.open(output_opt[0],inputReader[0].nrOfCol(),inputReader[0].nrOfRow(),1,theType,oformat_opt[0],option_opt);
148  outputWriter.GDALSetNoDataValue(nodata_opt[0]);
149 
150  if(description_opt.size())
151  outputWriter.setImageDescription(description_opt[0]);
152  //if input image is georeferenced, copy projection info to output image
153 
154  outputWriter.setProjection(inputReader[0].getProjection());
155  double ulx,uly,lrx,lry;
156  inputReader[0].getBoundingBox(ulx,uly,lrx,lry);
157  outputWriter.copyGeoTransform(inputReader[0]);
158 
159  if(colorTable_opt.size()){
160  if(colorTable_opt[0]!="none")
161  outputWriter.setColorTable(colorTable_opt[0]);
162  }
163  else if (inputReader[0].getColorTable()!=NULL)//copy colorTable from first input image
164  outputWriter.setColorTable(inputReader[0].getColorTable());
165 
166  Vector2d<double> lineInput(reqBand,inputReader[0].nrOfCol());
167  vector<double> lineOutput(outputWriter.nrOfCol());
168 
169  int irow=0;
170  int icol=0;
171  const char* pszMessage;
172  void* pProgressArg=NULL;
173  GDALProgressFunc pfnProgress=GDALTermProgress;
174  float progress=0;
175  pfnProgress(progress,pszMessage,pProgressArg);
176  for(irow=0;irow<inputReader[0].nrOfRow();++irow){
177  //read line in lineInput buffer
178  try{
179  if(rule_opt[0]=="scale")
180  inputReader[0].readData(lineInput[0],GDT_Float64,irow,band_opt[0]);
181  else if(rule_opt[0]=="vari"||rule_opt[0]=="tcari"){
182  inputReader[0].readData(lineInput[0],GDT_Float64,irow,band_opt[0]);
183  inputReader[1].readData(lineInput[1],GDT_Float64,irow,band_opt[1]);
184  inputReader[2].readData(lineInput[2],GDT_Float64,irow,band_opt[2]);
185  }
186  else if(rule_opt[0]=="ndvi2"){
187  inputReader[0].readData(lineInput[0],GDT_Float64,irow,band_opt[0]);
188  inputReader[1].readData(lineInput[1],GDT_Float64,irow,band_opt[1]);
189  inputReader[2].readData(lineInput[2],GDT_Float64,irow,band_opt[2]);
190  inputReader[3].readData(lineInput[3],GDT_Float64,irow,band_opt[3]);
191  }
192  else{
193  inputReader[0].readData(lineInput[0],GDT_Float64,irow,band_opt[0]);
194  inputReader[1].readData(lineInput[1],GDT_Float64,irow,band_opt[1]);
195  }
196  }
197  catch(string errorstring){
198  cerr << errorstring << endl;
199  exit(1);
200  }
201  assert(invalid_opt.size()==nodata_opt.size());
202  for(icol=0;icol<inputReader[0].nrOfCol();++icol){
203  double ndvi=min_opt[0];
204  double flagValue=nodata_opt[0];
205  bool valid=true;
206  for(int iflag=0;valid&&iflag<invalid_opt.size();++iflag){
207  for(int iband=0;iband<lineInput.size();++iband){
208  if(lineInput[iband][icol]==invalid_opt[iflag]){
209  flagValue=nodata_opt[iflag];
210  valid=false;
211  break;
212  }
213  }
214  }
215  double denom;
216  double nom;
217  if(valid){
218  if(rule_opt[0]=="ndvi"){
219  //Example of indices addressed by ndvi:
220  //structural indices
221  //NDVI (Rouse1974): b0=b_680, b1=b_800
222  //Chlorophyll indices:
223  //Normalized Phaeophytinization index (NPQI Barnes1992): b0=R_435, b1=R_415
224  //Photochemical Reflectance index (PRI1 Gamon1992): b0=R_567, b1=R_528
225  //Photochemical Reflectance index (PRI2 Gamon1992): b0=R_570, b1=R_531
226  //Normalized Phaeophytinization index (NPQI Barnes1992): b0=R_435, b1=R_415
227  //Normalized Pigment Chlorophyll index (NPCI Penuelas1994): b0=R_430, b1=R_680
228  //Structure Intensive Pigment index (SIPI Penuelas 1995): b0=R_450, b1=R_800
229  //Lichtenthaler index 1 (Lic1 Lichtenthaler1996): b0=R_680, b2=R_800
230  denom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
231  nom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]+(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
232  }
233  else if(rule_opt[0]=="ndvi2"){//normalized difference with different wavelengths used in denom and nom
234  //Example of indices addressed by ndvi2
235  //Structure Intensive Pigment index (SIPI Penuelas 1995): b0=R_450, b1=R_800, b2=R_650, b=R_800
236  //Vogelmann index 2 (Vog2 Vogelmann1993): b0=R_747, b1=R_735, b2=R_715, b3=R_726
237  //Vogelmann index 3 (Vog3 Vogelmann1993): b0=R_747, b1=R_734, b2=R_715, b3=R_720
238  denom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
239  nom=(lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]+(lineInput[3][icol]-src_offset_opt[0])/src_scale_opt[0];
240  }
241  else if(rule_opt[0]=="gvmi"){
242  denom=((lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0]+0.1)-((lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]+0.02);
243  nom=((lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0]+0.1)+((lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]+0.02);
244  }
245  else if(rule_opt[0]=="vari"){
246  denom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0];
247  nom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]+(lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
248  }
249  else if(rule_opt[0]=="osavi"){//structural index (Rondeaux1996): //b0=R_670, b1=R_800
250  denom=(1.0+0.16)*(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
251  nom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]+(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0]+0.16;
252  }
253  else if(rule_opt[0]=="mcari"){//chlorophyll index (Daughtry2000): b0=R_550, b1=R_670, b2=R_700
254  denom=((lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-0.2*((lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0]))*(lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0];
255  nom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0];
256  }
257  else if(rule_opt[0]=="tcari"){//chlorophyll index (Haboudane2002): b0=R_550, b1=R_670, B2=R_700
258  denom=3*((lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]*(lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-0.2*((lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0])*(lineInput[2][icol]-src_offset_opt[0])/src_scale_opt[0]);
259  nom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0];
260  }
261  else if(rule_opt[0]=="diff"){
262  denom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0]-(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
263  nom=1.0;
264  }
265  else if(rule_opt[0]=="scale"){
266  denom=(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
267  nom=1.0;
268  }
269  else if(rule_opt[0]=="ratio"){
270  //Examples of indices addressed by ratio:
271  //structural indices:
272  //Simple Ratio Index (SR Jordan1969, Rouse1974): b0=R_NIR/R_RED
273  //chlorophyll indices:
274  //Greenness Index: b0=R_554, b1=R_677;
275  //Zarco-Tejada&Miller (Zarco2001): b0=R_750,b1=R_710
276  //Simple Red Pigment Index (SRPI Penuelas1995): b0=R_430, b1=R_680
277  //Carter index 1 (Ctr1 Carter1994): b0=R_695, b1=R_420
278  //Carter index 2 (Ctr2 Carter1994): b0=R_695, b1=R_760
279  //Lichtenthaler index 2 (Lic2 Lichtenthaler1996): b0=R_440, b2=R_690
280  //Vogelmann index 1 (Vog1 Vogelmann1993): b0=R_740, b1=R_720
281  //Gitelson and Merzlyak 1 (GM1 Gitelson1997): b0=R_750 b1=R_550
282  //Gitelson and Merzlyak (GM2 Gitelson1997) b0=R_750 b1=R_700
283  denom=(lineInput[0][icol]-src_offset_opt[0])/src_scale_opt[0];
284  nom=(lineInput[1][icol]-src_offset_opt[0])/src_scale_opt[0];
285  }
286  else{
287  std::cout << "Error: rule " << rule_opt[0] << " not supported" << std::endl;
288  exit(1);
289  }
290  if(nom>eps_opt[0]||nom<-eps_opt[0])
291  ndvi=denom/nom;
292  switch(theType){
293  case(GDT_Byte):
294  case(GDT_Int16):
295  case(GDT_UInt16):
296  case(GDT_UInt32):
297  case(GDT_Int32):
298  lineOutput[icol]=static_cast<int>(0.5+ndvi*dst_scale_opt[0]+dst_offset_opt[0]);
299  break;
300  default:
301  lineOutput[icol]=ndvi*dst_scale_opt[0]+dst_offset_opt[0];
302  break;
303  }
304  if(lineOutput[icol]<min_opt[0])
305  lineOutput[icol]=min_opt[0];
306  else if(max_opt.size()){
307  if(lineOutput[icol]>max_opt[0])
308  lineOutput[icol]=max_opt[0];
309  }
310  }
311  else
312  lineOutput[icol]=flagValue;
313  }
314  //write buffer lineOutput to output file
315  try{
316  outputWriter.writeData(lineOutput,GDT_Float64,irow);
317  }
318  catch(string errorstring){
319  cerr << errorstring << endl;
320  exit(1);
321  }
322  //progress bar
323  progress=static_cast<float>(irow+1.0)/outputWriter.nrOfRow();
324  pfnProgress(progress,pszMessage,pProgressArg);
325  }
326  for(int ifile=0;ifile<inputReader.size();++ifile)
327  inputReader[ifile].close();
328  outputWriter.close();
329 }
pktools-2.6.6/doc/html/FileReaderLas_8h_source.html0000644000113200011300000003714212647637662017175 00000000000000 pktools: /home/kempenep/pktools/src/lasclasses/FileReaderLas.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
FileReaderLas.h
1 /**********************************************************************
2 FileReaderLas.h: class to read LAS files using liblas API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGREADERLAS_H_
21 #define _IMGREADERLAS_H_
22 
23 #include <string>
24 #include <vector>
25 #include "liblas/liblas.hpp"
26 
27 //--------------------------------------------------------------------------
28 class LastReturnFilter: public liblas::FilterI
29 {
30 public:
32  bool filter(const liblas::Point& point);
33 
34 private:
35  LastReturnFilter(LastReturnFilter const& other);
36  LastReturnFilter& operator=(LastReturnFilter const& rhs);
37 };
38 
40 {
41 public:
42  FileReaderLas(void);
43  FileReaderLas(const std::string& filename);
44  ~FileReaderLas(void);
45  void open(const std::string& filename);
46  void close(void);
47  liblas::Header const& getHeader() const;
48  bool isCompressed() const;
49  unsigned long int getPointCount() const;
50  void las2ascii(const std::string& filename, bool verbose=false) const;
51  template<typename T> liblas::Bounds<T> getExtent() const {return getHeader().GetExtent();};
52  void getExtent(double& ulx, double& uly, double& lrx, double& lry) const;
53  double getMinZ() const;
54  double getMaxZ() const;
55  void resetReader(){m_reader->Reset();};
56  void setFilter(std::vector<liblas::FilterPtr> const& filters);
57  bool const& readNextPoint(liblas::Point& thePoint){bool returnValue=m_reader->ReadNextPoint();thePoint=m_reader->GetPoint();return(returnValue);};
58  liblas::Point const& readPointAt(std::size_t n){m_reader->ReadPointAt(n);return m_reader->GetPoint();};
59  // void addBoundsFilter(double ulx, double uly, double lrx, double lry);
60  void addReturnsFilter(std::vector<unsigned short> const& returns);
61  void addClassFilter(std::vector<unsigned short> const& classes);
62  void setFilters(const std::vector<liblas::FilterPtr>& filters){m_filters=filters;setFilters();};
63  void setFilters(){m_reader->SetFilters(m_filters);};
64 protected:
65  void setCodec(const std::string& filename);
66  std::string m_filename;
67  std::ifstream *m_ifstream;
68  liblas::Reader* m_reader;
69  std::vector<liblas::FilterPtr> m_filters;
70 };
71 
72 #endif // _IMGREADERLAS_H_
pktools-2.6.6/doc/html/pkdiff_8cc_source.html0000644000113200011300000044003312647637661016130 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkdiff.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdiff.cc
1 /**********************************************************************
2 pkdiff.cc: program to compare two raster image files
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include "imageclasses/ImgReaderGdal.h"
22 #include "imageclasses/ImgWriterGdal.h"
23 #include "imageclasses/ImgReaderOgr.h"
24 #include "imageclasses/ImgWriterOgr.h"
25 #include "base/Optionpk.h"
26 #include "algorithms/ConfusionMatrix.h"
27 
28 /******************************************************************************/
93 using namespace std;
94 
95 int main(int argc, char *argv[])
96 {
97  Optionpk<string> input_opt("i", "input", "Input raster dataset.");
98  Optionpk<string> reference_opt("ref", "reference", "Reference (raster or vector) dataset");
99  Optionpk<string> layer_opt("ln", "ln", "Layer name(s) in sample. Leave empty to select all (for vector reference datasets only)");
100  Optionpk<string> mask_opt("m", "mask", "Use the first band of the specified file as a validity mask. Nodata values can be set with the option msknodata.");
101  Optionpk<double> msknodata_opt("msknodata", "msknodata", "Mask value(s) where image is invalid. Use negative value for valid data (example: use -t -1: if only -1 is valid value)", 0);
102  Optionpk<double> nodata_opt("nodata", "nodata", "No data value(s) in input or reference dataset are ignored");
103  Optionpk<short> band_opt("b", "band", "Input (reference) raster band. Optionally, you can define different bands for input and reference bands respectively: -b 1 -b 0.", 0);
104  Optionpk<bool> rmse_opt("rmse", "rmse", "Report root mean squared error", false);
105  Optionpk<bool> regression_opt("reg", "reg", "Report linear regression (Input = c0+c1*Reference)", false);
106  Optionpk<bool> confusion_opt("cm", "confusion", "Create confusion matrix (to std out)", false);
107  Optionpk<string> cmformat_opt("cmf","cmf","Format for confusion matrix (ascii or latex)","ascii");
108  Optionpk<string> cmoutput_opt("cmo","cmo","Output file for confusion matrix");
109  Optionpk<bool> se95_opt("se95","se95","Report standard error for 95 confidence interval",false);
110  Optionpk<string> labelref_opt("lr", "lref", "Attribute name of the reference label (for vector reference datasets only)", "label");
111  Optionpk<string> classname_opt("c", "class", "List of class names.");
112  Optionpk<short> classvalue_opt("r", "reclass", "List of class values (use same order as in classname option).");
113  Optionpk<string> output_opt("o", "output", "Output dataset (optional)");
114  Optionpk<string> ogrformat_opt("f", "f", "OGR format for output vector (for vector reference datasets only)","SQLite");
115  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
116  Optionpk<string> labelclass_opt("lc", "lclass", "Attribute name of the classified label (for vector reference datasets only)", "class");
117  Optionpk<short> boundary_opt("bnd", "boundary", "Boundary for selecting the sample (for vector reference datasets only)", 1,1);
118  Optionpk<bool> homogeneous_opt("hom", "homogeneous", "Only take regions with homogeneous boundary into account (for reference datasets only)", false,1);
119  Optionpk<bool> disc_opt("circ", "circular", "Use circular boundary (for vector reference datasets only)", false,1);
120  Optionpk<string> colorTable_opt("ct", "ct", "Color table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid).");
121  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
122  Optionpk<short> valueE_opt("\0", "correct", "Value for correct pixels", 0,2);
123  Optionpk<short> valueO_opt("\0", "omission", "Value for omission errors: input label > reference label", 1,2);
124  Optionpk<short> valueC_opt("\0", "commission", "Value for commission errors: input label < reference label", 2,1);
125  Optionpk<short> verbose_opt("v", "verbose", "Verbose level", 0,2);
126 
127  output_opt.setHide(1);
128  ogrformat_opt.setHide(1);
129  oformat_opt.setHide(1);
130  labelclass_opt.setHide(1);
131  boundary_opt.setHide(1);
132  homogeneous_opt.setHide(1);
133  disc_opt.setHide(1);
134  colorTable_opt.setHide(1);
135  option_opt.setHide(1);
136 
137  bool doProcess;//stop process when program was invoked with help option (-h --help)
138  try{
139  doProcess=input_opt.retrieveOption(argc,argv);
140  reference_opt.retrieveOption(argc,argv);
141  layer_opt.retrieveOption(argc,argv);
142  band_opt.retrieveOption(argc,argv);
143  rmse_opt.retrieveOption(argc,argv);
144  regression_opt.retrieveOption(argc,argv);
145  confusion_opt.retrieveOption(argc,argv);
146  labelref_opt.retrieveOption(argc,argv);
147  classname_opt.retrieveOption(argc,argv);
148  classvalue_opt.retrieveOption(argc,argv);
149  nodata_opt.retrieveOption(argc,argv);
150  mask_opt.retrieveOption(argc,argv);
151  msknodata_opt.retrieveOption(argc,argv);
152  output_opt.retrieveOption(argc,argv);
153  ogrformat_opt.retrieveOption(argc,argv);
154  labelclass_opt.retrieveOption(argc,argv);
155  cmformat_opt.retrieveOption(argc,argv);
156  cmoutput_opt.retrieveOption(argc,argv);
157  se95_opt.retrieveOption(argc,argv);
158  boundary_opt.retrieveOption(argc,argv);
159  homogeneous_opt.retrieveOption(argc,argv);
160  disc_opt.retrieveOption(argc,argv);
161  colorTable_opt.retrieveOption(argc,argv);
162  option_opt.retrieveOption(argc,argv);
163  // class_opt.retrieveOption(argc,argv);
164  valueE_opt.retrieveOption(argc,argv);
165  valueO_opt.retrieveOption(argc,argv);
166  valueC_opt.retrieveOption(argc,argv);
167  verbose_opt.retrieveOption(argc,argv);
168  }
169  catch(string predefinedString){
170  std::cout << predefinedString << std::endl;
171  exit(0);
172  }
173  if(!doProcess){
174  cout << endl;
175  cout << "Usage: pkdiff -i input -ref reference" << endl;
176  cout << endl;
177  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
178  exit(0);//help was invoked, stop processing
179  }
180 
181  ImgReaderGdal inputReader;
182  ImgReaderGdal maskReader;
183 
184  if(verbose_opt[0]){
185  cout << "flag(s) set to";
186  for(int iflag=0;iflag<nodata_opt.size();++iflag)
187  cout << " " << nodata_opt[iflag];
188  cout << endl;
189  }
190 
191  if(input_opt.empty()){
192  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
193  exit(0);
194  }
195  if(reference_opt.empty()){
196  std::cerr << "No reference file provided (use option -ref). Use --help for help information" << std::endl;
197  exit(0);
198  }
199 
200  //band_opt[0] is for input
201  //band_opt[1] is for reference
202  if(band_opt.size()<2)
203  band_opt.push_back(band_opt[0]);
204 
205  if(mask_opt.size())
206  while(mask_opt.size()<input_opt.size())
207  mask_opt.push_back(mask_opt[0]);
208  vector<short> inputRange;
209  vector<short> referenceRange;
211  int nclass=0;
212  map<string,short> classValueMap;
213  vector<std::string> nameVector(255);//the inverse of the classValueMap
214  vector<string> classNames;
215 
216  unsigned int ntotalValidation=0;
217  unsigned int nflagged=0;
218  Vector2d<int> resultClass;
219  vector<float> user;
220  vector<float> producer;
221  vector<unsigned int> nvalidation;
222 
223  if(confusion_opt[0]){
224  // if(class_opt.size()>1)
225  // inputRange=class_opt;
226  // if(classvalue_opt.size()>1)
227  // inputRange=classvalue_opt;
228  // else{
229  try{
230  if(verbose_opt[0])
231  cout << "opening input image file " << input_opt[0] << endl;
232  inputReader.open(input_opt[0]);//,imagicX_opt[0],imagicY_opt[0]);
233  }
234  catch(string error){
235  cerr << error << endl;
236  exit(1);
237  }
238  inputReader.getRange(inputRange,band_opt[0]);
239  inputReader.close();
240  // }
241 
242  for(int iflag=0;iflag<nodata_opt.size();++iflag){
243  vector<short>::iterator fit;
244  fit=find(inputRange.begin(),inputRange.end(),static_cast<short>(nodata_opt[iflag]));
245  if(fit!=inputRange.end())
246  inputRange.erase(fit);
247  }
248  nclass=inputRange.size();
249  if(verbose_opt[0]){
250  cout << "nclass (inputRange.size()): " << nclass << endl;
251  cout << "input range: " << endl;
252  }
253  if(classname_opt.size()){
254  assert(classname_opt.size()==classvalue_opt.size());
255  for(int iclass=0;iclass<classname_opt.size();++iclass){
256  classValueMap[classname_opt[iclass]]=classvalue_opt[iclass];
257  assert(classvalue_opt[iclass]<nameVector.size());
258  nameVector[classvalue_opt[iclass]]=classname_opt[iclass];
259  }
260  }
261  // nclass=classValueMap.size();
262  for(int rc=0;rc<inputRange.size();++rc){
263  classNames.push_back(type2string(inputRange[rc]));
264  if(verbose_opt[0])
265  cout << inputRange[rc] << endl;
266  }
267  cm.setClassNames(classNames);
268  if(verbose_opt[0]){
269  cout << "class names: " << endl;
270  for(int iclass=0;iclass<cm.nClasses();++iclass)
271  cout << iclass << " " << cm.getClass(iclass) << endl;
272  }
273  resultClass.resize(nclass,nclass);
274  user.resize(nclass);
275  producer.resize(nclass);
276  nvalidation.resize(nclass);
277  //initialize
278  for(int rc=0;rc<nclass;++rc){
279  for(int ic=0;ic<nclass;++ic)
280  resultClass[rc][ic]=0;
281  nvalidation[rc]=0;
282  }
283  }
284 
285  bool isDifferent=false;
286  bool refIsRaster=false;
287 
288  ImgReaderOgr referenceReaderOgr;
289  try{
290  referenceReaderOgr.open(reference_opt[0]);
291  referenceReaderOgr.close();
292  }
293  catch(string errorString){
294  refIsRaster=true;
295  }
296  const char* pszMessage;
297  void* pProgressArg=NULL;
298  GDALProgressFunc pfnProgress=GDALTermProgress;
299  float progress=0;
300  // if(reference_opt[0].find(".shp")!=string::npos){
301  if(!refIsRaster){
302  for(int iinput=0;iinput<input_opt.size();++iinput){
303  if(verbose_opt[0])
304  cout << "Processing input " << input_opt[iinput] << endl;
305  if(output_opt.size())
306  assert(reference_opt.size()==output_opt.size());
307  for(int iref=0;iref<reference_opt.size();++iref){
308  cout << "reference " << reference_opt[iref] << endl;
309  // assert(reference_opt[iref].find(".shp")!=string::npos);
310  try{
311  inputReader.open(input_opt[iinput]);//,imagicX_opt[0],imagicY_opt[0]);
312  if(mask_opt.size()){
313  maskReader.open(mask_opt[iinput]);
314  assert(inputReader.nrOfCol()==maskReader.nrOfCol());
315  assert(inputReader.nrOfRow()==maskReader.nrOfRow());
316  }
317  referenceReaderOgr.open(reference_opt[iref]);
318  }
319  catch(string error){
320  cerr << error << endl;
321  exit(1);
322  }
323  if(confusion_opt[0])
324  referenceRange=inputRange;
325 
326  ImgWriterOgr ogrWriter;
327  if(output_opt.size()){
328  try{
329  ogrWriter.open(output_opt[iref],ogrformat_opt[0]);
330  }
331  catch(string error){
332  cerr << error << endl;
333  exit(1);
334  }
335  }
336  int nlayer=referenceReaderOgr.getDataSource()->GetLayerCount();
337  for(int ilayer=0;ilayer<nlayer;++ilayer){
338  progress=0;
339  OGRLayer *readLayer=referenceReaderOgr.getLayer(ilayer);
340  // readLayer = referenceReaderOgr.getDataSource()->GetLayer(ilayer);
341  string currentLayername=readLayer->GetName();
342  if(layer_opt.size())
343  if(find(layer_opt.begin(),layer_opt.end(),currentLayername)==layer_opt.end())
344  continue;
345  if(!verbose_opt[0])
346  pfnProgress(progress,pszMessage,pProgressArg);
347  else
348  cout << "processing layer " << readLayer->GetName() << endl;
349 
350  readLayer->ResetReading();
351  OGRLayer *writeLayer;
352  if(output_opt.size()){
353  if(verbose_opt[0])
354  cout << "creating output vector file " << output_opt[0] << endl;
355  // assert(output_opt[0].find(".shp")!=string::npos);
356  char **papszOptions=NULL;
357  if(verbose_opt[0])
358  cout << "creating layer: " << readLayer->GetName() << endl;
359  // if(ogrWriter.createLayer(layername, referenceReaderOgr.getProjection(ilayer), referenceReaderOgr.getGeometryType(ilayer), papszOptions)==NULL)
360  writeLayer=ogrWriter.createLayer(readLayer->GetName(), referenceReaderOgr.getProjection(ilayer), wkbPoint, papszOptions);
361  assert(writeLayer);
362  if(verbose_opt[0]){
363  cout << "created layer" << endl;
364  cout << "copy fields from " << reference_opt[iref] << endl;
365  }
366  ogrWriter.copyFields(referenceReaderOgr,ilayer,ilayer);
367  //create extra field for classified label
368  short theDim=boundary_opt[0];
369  for(int windowJ=-theDim/2;windowJ<(theDim+1)/2;++windowJ){
370  for(int windowI=-theDim/2;windowI<(theDim+1)/2;++windowI){
371  if(disc_opt[0]&&(windowI*windowI+windowJ*windowJ>(theDim/2)*(theDim/2)))
372  continue;
373  ostringstream fs;
374  if(theDim>1)
375  fs << labelclass_opt[0] << "_" << windowJ << "_" << windowI;
376  else
377  fs << labelclass_opt[0];
378  if(verbose_opt[0])
379  cout << "creating field " << fs.str() << endl;
380  ogrWriter.createField(fs.str(),OFTInteger,ilayer);
381  }
382  }
383  }
384  OGRFeature *readFeature;
385  OGRFeature *writeFeature;
386  int isample=0;
387  unsigned int nfeatureInLayer=readLayer->GetFeatureCount();
388  unsigned int ifeature=0;
389  while( (readFeature = readLayer->GetNextFeature()) != NULL ){
390  if(verbose_opt[0])
391  cout << "sample " << ++isample << endl;
392  //get x and y from readFeature
393  double x,y;
394  OGRGeometry *poGeometry;
395  OGRPoint centroidPoint;
396  OGRPoint *poPoint;
397  poGeometry = readFeature->GetGeometryRef();
398  // assert( poGeometry != NULL && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint );
399  if(poGeometry==NULL)
400  continue;
401  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbMultiPolygon){
402  OGRMultiPolygon readPolygon = *((OGRMultiPolygon *) poGeometry);
403  readPolygon = *((OGRMultiPolygon *) poGeometry);
404  readPolygon.Centroid(&centroidPoint);
405  poPoint=&centroidPoint;
406  }
407  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon){
408  OGRPolygon readPolygon=*((OGRPolygon *) poGeometry);
409  readPolygon.Centroid(&centroidPoint);
410  poPoint=&centroidPoint;
411  }
412  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint )
413  poPoint = (OGRPoint *) poGeometry;
414  else{
415  std::cerr << "Warning: skipping feature (not of type point or polygon)" << std::endl;
416  continue;
417  }
418  x=poPoint->getX();
419  y=poPoint->getY();
420  double inputValue;
421  vector<double> inputValues;
422  bool isHomogeneous=true;
423  short maskValue;
424  short outputValue;
425  //read referenceValue from feature
426  unsigned short referenceValue;
427  string referenceClassName;
428  if(classValueMap.size()){
429  referenceClassName=readFeature->GetFieldAsString(readFeature->GetFieldIndex(labelref_opt[0].c_str()));
430  referenceValue=classValueMap[referenceClassName];
431  }
432  else
433  referenceValue=readFeature->GetFieldAsInteger(readFeature->GetFieldIndex(labelref_opt[0].c_str()));
434  if(verbose_opt[0])
435  cout << "reference value: " << referenceValue << endl;
436 
437  bool pixelFlagged=false;
438  bool maskFlagged=false;
439  for(int iflag=0;iflag<nodata_opt.size();++iflag){
440  if(referenceValue==nodata_opt[iflag])
441  pixelFlagged=true;
442  }
443  if(pixelFlagged)
444  continue;
445  double i_centre,j_centre;
446  //input reader is georeferenced!
447  inputReader.geo2image(x,y,i_centre,j_centre);
448  // else{
449  // i_centre=x;
450  // j_centre=y;
451  // }
452  //nearest neighbour
453  j_centre=static_cast<int>(j_centre);
454  i_centre=static_cast<int>(i_centre);
455  //check if j_centre is out of bounds
456  if(static_cast<int>(j_centre)<0||static_cast<int>(j_centre)>=inputReader.nrOfRow())
457  continue;
458  //check if i_centre is out of bounds
459  if(static_cast<int>(i_centre)<0||static_cast<int>(i_centre)>=inputReader.nrOfCol())
460  continue;
461 
462  if(output_opt.size()){
463  writeFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
464  assert(readFeature);
465  int nfield=readFeature->GetFieldCount();
466  writeFeature->SetGeometry(poPoint);
467  if(verbose_opt[0])
468  cout << "copying fields from " << reference_opt[0] << endl;
469  assert(readFeature);
470  assert(writeFeature);
471  vector<int> panMap(nfield);
472  vector<int>::iterator panit=panMap.begin();
473  for(int ifield=0;ifield<nfield;++ifield)
474  panMap[ifield]=ifield;
475  writeFeature->SetFieldsFrom(readFeature,&(panMap[0]));
476  // if(writeFeature->SetFrom(readFeature)!= OGRERR_NONE)
477  // cerr << "writing feature failed" << endl;
478  // if(verbose_opt[0])
479  // cout << "feature written" << endl;
480  }
481  bool windowAllFlagged=true;
482  bool windowHasFlag=false;
483  short theDim=boundary_opt[0];
484  for(int windowJ=-theDim/2;windowJ<(theDim+1)/2;++windowJ){
485  for(int windowI=-theDim/2;windowI<(theDim+1)/2;++windowI){
486  if(disc_opt[0]&&(windowI*windowI+windowJ*windowJ>(theDim/2)*(theDim/2)))
487  continue;
488  int j=j_centre+windowJ;
489  //check if j is out of bounds
490  if(static_cast<int>(j)<0||static_cast<int>(j)>=inputReader.nrOfRow())
491  continue;
492  int i=i_centre+windowI;
493  //check if i is out of bounds
494  if(static_cast<int>(i)<0||static_cast<int>(i)>=inputReader.nrOfCol())
495  continue;
496  if(verbose_opt[0])
497  cout << setprecision(12) << "reading image value at x,y " << x << "," << y << " (" << i << "," << j << "), ";
498  inputReader.readData(inputValue,GDT_Float64,i,j,band_opt[0]);
499  inputValues.push_back(inputValue);
500  if(inputValues.back()!=*(inputValues.begin()))
501  isHomogeneous=false;
502  if(verbose_opt[0])
503  cout << "input value: " << inputValue << endl;
504  pixelFlagged=false;
505  for(int iflag=0;iflag<nodata_opt.size();++iflag){
506  if(inputValue==nodata_opt[iflag]){
507  pixelFlagged=true;
508  break;
509  }
510  }
511  maskFlagged=false;//(msknodata_opt[ivalue]>=0)?false:true;
512  if(mask_opt.size()){
513  maskReader.readData(maskValue,GDT_Float64,i,j,0);
514  for(int ivalue=0;ivalue<msknodata_opt.size();++ivalue){
515  if(msknodata_opt[ivalue]>=0){//values set in msknodata_opt are invalid
516  if(maskValue==msknodata_opt[ivalue]){
517  maskFlagged=true;
518  break;
519  }
520  }
521  else{//only values set in msknodata_opt are valid
522  if(maskValue!=-msknodata_opt[ivalue])
523  maskFlagged=true;
524  else{
525  maskFlagged=false;
526  break;
527  }
528  }
529  }
530  }
531  pixelFlagged=pixelFlagged||maskFlagged;
532  if(pixelFlagged)
533  windowHasFlag=true;
534  else
535  windowAllFlagged=false;//at least one good pixel in neighborhood
536  }
537  }
538  //at this point we know the values for the entire window
539 
540  if(homogeneous_opt[0]){//only centre pixel
541  int j=j_centre;
542  int i=i_centre;
543  //flag if not all pixels are homogeneous or if at least one pixel flagged
544 
545  if(!windowHasFlag&&isHomogeneous){
546  if(output_opt.size())
547  writeFeature->SetField(labelclass_opt[0].c_str(),static_cast<int>(inputValue));
548  if(confusion_opt[0]){
549  ++ntotalValidation;
550  if(classValueMap.size()){
551  assert(inputValue<nameVector.size());
552  string className=nameVector[static_cast<unsigned short>(inputValue)];
553  cm.incrementResult(type2string<short>(classValueMap[referenceClassName]),type2string<short>(classValueMap[className]),1);
554  }
555  else{
556  int rc=distance(referenceRange.begin(),find(referenceRange.begin(),referenceRange.end(),static_cast<unsigned short>(referenceValue)));
557  int ic=distance(inputRange.begin(),find(inputRange.begin(),inputRange.end(),static_cast<unsigned short>(inputValue)));
558  assert(rc<nclass);
559  assert(ic<nclass);
560  ++nvalidation[rc];
561  ++resultClass[rc][ic];
562  if(verbose_opt[0]>1)
563  cout << "increment: " << rc << " " << referenceRange[rc] << " " << ic << " " << inputRange[ic] << endl;
564  cm.incrementResult(cm.getClass(rc),cm.getClass(ic),1);
565  }
566  }
567  if(inputValue==referenceValue){//correct
568  outputValue=valueE_opt[0];
569  if(nodata_opt.size()){
570  if(valueE_opt[0]==nodata_opt[0])
571  outputValue=inputValue;
572  }
573  }
574  else if(inputValue>referenceValue)//1=forest,2=non-forest
575  outputValue=valueO_opt[0];//omission error
576  else
577  outputValue=valueC_opt[0];//commission error
578  }
579  }
580  else{
581  for(int windowJ=-theDim/2;windowJ<(theDim+1)/2;++windowJ){
582  for(int windowI=-theDim/2;windowI<(theDim+1)/2;++windowI){
583  if(disc_opt[0]&&(windowI*windowI+windowJ*windowJ>(theDim/2)*(theDim/2)))
584  continue;
585  int j=j_centre+windowJ;
586  //check if j is out of bounds
587  if(static_cast<int>(j)<0||static_cast<int>(j)>=inputReader.nrOfRow())
588  continue;
589  int i=i_centre+windowI;
590  //check if i is out of bounds
591  if(static_cast<int>(i)<0||static_cast<int>(i)>=inputReader.nrOfCol())
592  continue;
593  if(!windowAllFlagged){
594  ostringstream fs;
595  if(theDim>1)
596  fs << labelclass_opt[0] << "_" << windowJ << "_" << windowI;
597  else
598  fs << labelclass_opt[0];
599  if(output_opt.size())
600  writeFeature->SetField(fs.str().c_str(),inputValue);
601  if(!windowJ&&!windowI){//centre pixel
602  if(confusion_opt[0]){
603  ++ntotalValidation;
604  if(classValueMap.size()){
605  assert(inputValue<nameVector.size());
606  string className=nameVector[static_cast<unsigned short>(inputValue)];
607  cm.incrementResult(type2string<short>(classValueMap[referenceClassName]),type2string<short>(classValueMap[className]),1);
608  }
609  else{
610  int rc=distance(referenceRange.begin(),find(referenceRange.begin(),referenceRange.end(),static_cast<unsigned short>(referenceValue)));
611  int ic=distance(inputRange.begin(),find(inputRange.begin(),inputRange.end(),static_cast<unsigned short>(inputValue)));
612  if(rc>=nclass)
613  continue;
614  if(ic>=nclass)
615  continue;
616  // assert(rc<nclass);
617  // assert(ic<nclass);
618  ++nvalidation[rc];
619  ++resultClass[rc][ic];
620  if(verbose_opt[0]>1)
621  cout << "increment: " << rc << " " << referenceRange[rc] << " " << ic << " " << inputRange[ic] << endl;
622  cm.incrementResult(cm.getClass(rc),cm.getClass(ic),1);
623  }
624  }
625  if(inputValue==referenceValue){//correct
626  outputValue=valueE_opt[0];
627  if(nodata_opt.size()){
628  if(valueE_opt[0]==nodata_opt[0])
629  outputValue=inputValue;
630  }
631  }
632  else if(inputValue>referenceValue)//1=forest,2=non-forest
633  outputValue=valueO_opt[0];//omission error
634  else
635  outputValue=valueC_opt[0];//commission error
636  }
637  }
638  }
639  }
640  }
641  if(output_opt.size()){
642  if(!windowAllFlagged){
643  if(verbose_opt[0])
644  cout << "creating feature" << endl;
645  if(writeLayer->CreateFeature( writeFeature ) != OGRERR_NONE ){
646  string errorString="Failed to create feature in OGR vector file";
647  throw(errorString);
648  }
649  }
650  OGRFeature::DestroyFeature( writeFeature );
651  }
652  ++ifeature;
653  progress=static_cast<float>(ifeature+1)/nfeatureInLayer;
654  pfnProgress(progress,pszMessage,pProgressArg);
655  }//next feature
656  }//next layer
657  if(output_opt.size())
658  ogrWriter.close();
659  referenceReaderOgr.close();
660  inputReader.close();
661  if(mask_opt.size())
662  maskReader.close();
663  }//next reference
664  }//next input
665  pfnProgress(1.0,pszMessage,pProgressArg);
666  }//reference is OGR vector
667  else{//reference is GDAL raster
668  ImgWriterGdal gdalWriter;
669  try{
670  inputReader.open(input_opt[0]);
671  if(mask_opt.size())
672  maskReader.open(mask_opt[0]);
673  if(output_opt.size()){
674  if(verbose_opt[0])
675  cout << "opening output image " << output_opt[0] << endl;
676  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
677  string theInterleave="INTERLEAVE=";
678  theInterleave+=inputReader.getInterleave();
679  option_opt.push_back(theInterleave);
680  }
681  gdalWriter.open(output_opt[0],inputReader.nrOfCol(),inputReader.nrOfRow(),1,inputReader.getDataType(),oformat_opt[0],option_opt);
682  if(nodata_opt.size())
683  gdalWriter.GDALSetNoDataValue(nodata_opt[0]);
684  gdalWriter.copyGeoTransform(inputReader);
685  if(colorTable_opt.size())
686  gdalWriter.setColorTable(colorTable_opt[0]);
687  else if(inputReader.getColorTable()!=NULL){
688  if(verbose_opt[0])
689  cout << "set colortable from input image" << endl;
690  gdalWriter.setColorTable(inputReader.getColorTable());
691  }
692  }
693  else if(verbose_opt[0])
694  cout << "no output image defined" << endl;
695 
696  }
697  catch(string error){
698  cout << error << endl;
699  exit(2);
700  }
701  //todo: support different data types!
702  vector<double> lineInput(inputReader.nrOfCol());
703  vector<double> lineMask(maskReader.nrOfCol());
704  vector<double> lineOutput;
705  vector<double> bufferInput;//for regression
706  vector<double> bufferReference;//for regression
707  if(output_opt.size())
708  lineOutput.resize(inputReader.nrOfCol());
709 
710  int irow=0;
711  int icol=0;
712  double oldreferencerow=-1;
713  double oldmaskrow=-1;
714  ImgReaderGdal referenceReaderGdal;
715  try{
716  referenceReaderGdal.open(reference_opt[0]);//,rmagicX_opt[0],rmagicY_opt[0]);
717  }
718  catch(string error){
719  cerr << error << endl;
720  exit(1);
721  }
722  if(inputReader.isGeoRef()){
723  assert(referenceReaderGdal.isGeoRef());
724  if(inputReader.getProjection()!=referenceReaderGdal.getProjection())
725  cerr << "Warning: projection of input image and reference image are different" << endl;
726  }
727  vector<double> lineReference(referenceReaderGdal.nrOfCol());
728  if(confusion_opt[0]){
729  referenceReaderGdal.getRange(referenceRange,band_opt[1]);
730  for(int iflag=0;iflag<nodata_opt.size();++iflag){
731  vector<short>::iterator fit;
732  fit=find(referenceRange.begin(),referenceRange.end(),static_cast<unsigned short>(nodata_opt[iflag]));
733  if(fit!=referenceRange.end())
734  referenceRange.erase(fit);
735  }
736  if(verbose_opt[0]){
737  cout << "reference range: " << endl;
738  for(int rc=0;rc<referenceRange.size();++rc)
739  cout << referenceRange[rc] << endl;
740  }
741  if(referenceRange.size()!=inputRange.size()){
742  if(confusion_opt[0]||output_opt.size()){
743  cout << "reference range is not equal to input range!" << endl;
744  cout << "Kappa: " << 0 << endl;
745  cout << "total weighted: " << 0 << endl;
746  }
747  else
748  cout << "reference range is not equal to input range!" << endl;
749  cout << input_opt[0] << " and " << reference_opt[0] << " are different" << endl;
750  exit(1);
751  }
752  }
753  double rmse=0;
754  // for(irow=0;irow<inputReader.nrOfRow()&&!isDifferent;++irow){
755  for(irow=0;irow<inputReader.nrOfRow();++irow){
756  //read line in lineInput, lineReference and lineMask
757  inputReader.readData(lineInput,GDT_Float64,irow,band_opt[0]);
758  double x,y;//geo coordinates
759  double ireference,jreference;//image coordinates in reference image
760  double imask,jmask;//image coordinates in mask image
761  for(icol=0;icol<inputReader.nrOfCol();++icol){
762  //find col in reference
763  inputReader.image2geo(icol,irow,x,y);
764  referenceReaderGdal.geo2image(x,y,ireference,jreference);
765  if(ireference<0||ireference>=referenceReaderGdal.nrOfCol()){
766  if(rmse_opt[0]||regression_opt[0])
767  continue;
768  else{
769  cerr << ireference << " out of reference range!" << endl;
770  cerr << x << " " << y << " " << icol << " " << irow << endl;
771  cerr << x << " " << y << " " << ireference << " " << jreference << endl;
772  exit(1);
773  }
774  }
775  if(jreference!=oldreferencerow){
776  if(jreference<0||jreference>=referenceReaderGdal.nrOfRow()){
777  if(rmse_opt[0]||regression_opt[0])
778  continue;
779  else{
780  cerr << jreference << " out of reference range!" << endl;
781  cerr << x << " " << y << " " << icol << " " << irow << endl;
782  cerr << x << " " << y << " " << ireference << " " << jreference << endl;
783  exit(1);
784  }
785  }
786  else{
787  referenceReaderGdal.readData(lineReference,GDT_Float64,static_cast<int>(jreference),band_opt[1]);
788  oldreferencerow=jreference;
789  }
790  }
791  bool flagged=false;
792  for(int iflag=0;iflag<nodata_opt.size();++iflag){
793  if((lineInput[icol]==nodata_opt[iflag])||(lineReference[ireference]==nodata_opt[iflag])){
794  if(output_opt.size())
795  lineOutput[icol]=nodata_opt[iflag];
796  flagged=true;
797  break;
798  }
799  }
800  if(mask_opt.size()){
801  maskReader.geo2image(x,y,imask,jmask);
802  if(jmask>=0&&jmask<maskReader.nrOfRow()){
803  if(jmask!=oldmaskrow)
804  maskReader.readData(lineMask,GDT_Float64,jmask);
805  for(int ivalue=0;ivalue<msknodata_opt.size();++ivalue){
806  if(lineMask[icol]==msknodata_opt[ivalue]){
807  flagged=true;
808  break;
809  }
810  }
811  }
812  }
813  if(!flagged){
814  if(rmse_opt[0]){//divide by image size to prevent overflow. At the end we need to take care about flagged pixels by normalizing...
815  rmse+=static_cast<double>(lineInput[icol]-lineReference[ireference])*(lineInput[icol]-lineReference[ireference])/inputReader.nrOfCol()/inputReader.nrOfRow();
816  }
817  else if(regression_opt[0]){
818  bufferInput.push_back(lineInput[icol]);
819  bufferReference.push_back(lineReference[ireference]);
820  }
821 
822  if(confusion_opt[0]){
823  ++ntotalValidation;
824  int rc=distance(referenceRange.begin(),find(referenceRange.begin(),referenceRange.end(),lineReference[ireference]));
825  int ic=distance(inputRange.begin(),find(inputRange.begin(),inputRange.end(),lineInput[icol]));
826  assert(rc<nclass);
827  assert(ic<nclass);
828  ++nvalidation[rc];
829  ++resultClass[rc][ic];
830  if(verbose_opt[0]>1)
831  cout << "increment: " << rc << " " << referenceRange[rc] << " " << ic << " " << inputRange[ic] << endl;
832  cm.incrementResult(cm.getClass(rc),cm.getClass(ic),1);
833  }
834  if(lineInput[icol]==lineReference[ireference]){//correct
835  if(output_opt.size()){
836  lineOutput[icol]=valueE_opt[0];
837  if(nodata_opt.size()){
838  if(valueE_opt[0]==nodata_opt[0])
839  lineOutput[icol]=lineInput[icol];
840  }
841  }
842  }
843  else{//error
844  if(output_opt.empty()&&!confusion_opt[0]&&!rmse_opt[0]&&!regression_opt[0]){
845  isDifferent=true;
846  break;
847  }
848  if(output_opt.size()){
849  if(lineInput[icol]>lineReference[ireference])
850  lineOutput[icol]=valueO_opt[0];//omission error
851  else
852  lineOutput[icol]=valueC_opt[0];//commission error
853  }
854  }
855  }
856  else{
857  ++nflagged;
858  if(output_opt.size()){
859  if(nodata_opt.size())
860  lineOutput[icol]=nodata_opt[0];
861  else //should never occur?
862  lineOutput[icol]=0;
863  }
864  }
865  }
866  if(output_opt.size()){
867  try{
868  gdalWriter.writeData(lineOutput,GDT_Float64,irow);
869  }
870  catch(string errorstring){
871  cerr << "lineOutput.size(): " << lineOutput.size() << endl;
872  cerr << "gdalWriter.nrOfCol(): " << gdalWriter.nrOfCol() << endl;
873  cerr << errorstring << endl;
874  exit(1);
875  }
876  }
877  else if(isDifferent&&!confusion_opt[0]&&!rmse_opt[0]&&!regression_opt[0]){//we can break off here, files are different...
878  if(!verbose_opt[0])
879  pfnProgress(1.0,pszMessage,pProgressArg);
880  break;
881  }
882  progress=static_cast<float>(irow+1.0)/inputReader.nrOfRow();
883  if(!verbose_opt[0])
884  pfnProgress(progress,pszMessage,pProgressArg);
885  }
886  if(output_opt.size())
887  gdalWriter.close();
888  else if(!confusion_opt[0]){
889  if(rmse_opt[0]){
890  double normalization=1.0*inputReader.nrOfCol()*inputReader.nrOfRow()/(inputReader.nrOfCol()*inputReader.nrOfRow()-nflagged);
891  if(verbose_opt[0]){
892  cout << "normalization: " << normalization << endl;
893  cout << "rmse before sqrt and normalization: " << rmse << endl;
894  }
895  cout << "--rmse " << sqrt(rmse/normalization) << endl;
896  }
897  else if(regression_opt[0]){
898  double err=0;
899  double c0=0;
900  double c1=1;
902  if(bufferInput.size()&&bufferReference.size()){
903  err=stat.linear_regression_err(bufferInput,bufferReference,c0,c1);
904  }
905  if(verbose_opt[0]){
906  cout << "bufferInput.size(): " << bufferInput.size() << endl;
907  cout << "bufferReference.size(): " << bufferReference.size() << endl;
908  double theMin=0;
909  double theMax=0;
910  stat.minmax(bufferInput,bufferInput.begin(),bufferInput.end(),theMin,theMax);
911  cout << "min, max input: " << theMin << ", " << theMax << endl;
912  theMin=0;
913  theMax=0;
914  stat.minmax(bufferReference,bufferReference.begin(),bufferReference.end(),theMin,theMax);
915  cout << "min, max reference: " << theMin << ", " << theMax << endl;
916  }
917  cout << "--c0 " << c0 << "--c1 " << c1 << " --rmse: " << err << endl;
918 
919  }
920  else if(isDifferent)
921  cout << input_opt[0] << " and " << reference_opt[0] << " are different" << endl;
922  else
923  cout << input_opt[0] << " and " << reference_opt[0] << " are identical" << endl;
924  }
925  referenceReaderGdal.close();
926  inputReader.close();
927  if(mask_opt.size())
928  maskReader.close();
929  }//raster dataset
930 
931  if(confusion_opt[0]){
932  cm.setFormat(cmformat_opt[0]);
933  cm.reportSE95(se95_opt[0]);
934  ofstream outputFile;
935  if(cmoutput_opt.size()){
936  outputFile.open(cmoutput_opt[0].c_str(),ios::out);
937  outputFile << cm << endl;
938  }
939  else
940  cout << cm << endl;
941  // cout << "class #samples userAcc prodAcc" << endl;
942  // double se95_ua=0;
943  // double se95_pa=0;
944  // double se95_oa=0;
945  // double dua=0;
946  // double dpa=0;
947  // double doa=0;
948  // for(int iclass=0;iclass<cm.nClasses();++iclass){
949  // dua=cm.ua_pct(classNames[iclass],&se95_ua);
950  // dpa=cm.pa_pct(classNames[iclass],&se95_pa);
951  // cout << cm.getClass(iclass) << " " << cm.nReference(cm.getClass(iclass)) << " " << dua << " (" << se95_ua << ")" << " " << dpa << " (" << se95_pa << ")" << endl;
952  // }
953  // doa=cm.oa(&se95_oa);
954  // cout << "Kappa: " << cm.kappa() << endl;
955  // cout << "Overall Accuracy: " << 100*doa << " (" << 100*se95_oa << ")" << endl;
956  }
957 }
pktools-2.6.6/doc/html/ImgRegression_8cc_source.html0000644000113200011300000017644612647637661017460 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/ImgRegression.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgRegression.cc
1 /**********************************************************************
2 ImgRegression.cc: class to calculate regression between two raster datasets
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "ImgRegression.h"
21 #include <iostream>
22 
23 using namespace imgregression;
24 
25 ImgRegression::ImgRegression(void)
26 : m_threshold(0), m_down(1)
27 {}
28 
29 ImgRegression::~ImgRegression(void)
30 {}
31 
32 double ImgRegression::getRMSE(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose) const{
33  c0=0;
34  c1=1;
35  int icol1=0,irow1=0;
36  std::vector<double> rowBuffer1(imgReader1.nrOfCol());
37  std::vector<double> rowBuffer2(imgReader2.nrOfCol());
38  std::vector<double> buffer1;
39  std::vector<double> buffer2;
40 
41  srand(time(NULL));
42  for(irow1=0;irow1<imgReader1.nrOfRow();++irow1){
43  if(irow1%m_down)
44  continue;
45  icol1=0;
46  double icol2=0,irow2=0;
47  double geox=0,geoy=0;
48  imgReader1.readData(rowBuffer1,GDT_Float64,irow1,band1);
49  imgReader1.image2geo(icol1,irow1,geox,geoy);
50  imgReader2.geo2image(geox,geoy,icol2,irow2);
51  icol2=static_cast<int>(icol2);
52  irow2=static_cast<int>(irow2);
53  if(irow2<0||irow2>=imgReader2.nrOfRow())
54  continue;
55  imgReader2.readData(rowBuffer2,GDT_Float64,irow2,band2);
56  for(icol1=0;icol1<imgReader1.nrOfCol();++icol1){
57  if(icol1%m_down)
58  continue;
59  if(m_threshold>0){//percentual value
60  double p=static_cast<double>(rand())/(RAND_MAX);
61  p*=100.0;
62  if(p>m_threshold)
63  continue;//do not select for now, go to next column
64  }
65  imgReader1.image2geo(icol1,irow1,geox,geoy);
66  imgReader2.geo2image(geox,geoy,icol2,irow2);
67  if(icol2<0||icol2>=imgReader2.nrOfCol())
68  continue;
69  icol2=static_cast<int>(icol2);
70  irow2=static_cast<int>(irow2);
71  //check for nodata
72  double value1=rowBuffer1[icol1];
73  double value2=rowBuffer2[icol2];
74  if(imgReader1.isNoData(value1)||imgReader2.isNoData(value2))
75  continue;
76 
77  buffer1.push_back(value1);
78  buffer2.push_back(value2);
79  if(verbose>1)
80  std::cout << geox << " " << geoy << " " << icol1 << " " << irow1 << " " << icol2 << " " << irow2 << " " << buffer1.back() << " " << buffer2.back() << std::endl;
81  }
82  }
83  double err=0;
84  if(buffer1.size()&&buffer2.size()){
86  err=stat.linear_regression_err(buffer1,buffer2,c0,c1);
87  }
88  if(verbose)
89  std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with rmse: " << err << std::endl;
90  return err;
91 }
92 
93 double ImgRegression::getR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose) const{
94  c0=0;
95  c1=1;
96  int icol1=0,irow1=0;
97  std::vector<double> rowBuffer1(imgReader1.nrOfCol());
98  std::vector<double> rowBuffer2(imgReader2.nrOfCol());
99  std::vector<double> buffer1;
100  std::vector<double> buffer2;
101 
102  srand(time(NULL));
103  for(irow1=0;irow1<imgReader1.nrOfRow();++irow1){
104  if(irow1%m_down)
105  continue;
106  icol1=0;
107  double icol2=0,irow2=0;
108  double geox=0,geoy=0;
109  imgReader1.readData(rowBuffer1,GDT_Float64,irow1,band1);
110  imgReader1.image2geo(icol1,irow1,geox,geoy);
111  imgReader2.geo2image(geox,geoy,icol2,irow2);
112  icol2=static_cast<int>(icol2);
113  irow2=static_cast<int>(irow2);
114  if(irow2<0||irow2>=imgReader2.nrOfRow())
115  continue;
116  imgReader2.readData(rowBuffer2,GDT_Float64,irow2,band2);
117  for(icol1=0;icol1<imgReader1.nrOfCol();++icol1){
118  if(icol1%m_down)
119  continue;
120  if(m_threshold>0){//percentual value
121  double p=static_cast<double>(rand())/(RAND_MAX);
122  p*=100.0;
123  if(p>m_threshold)
124  continue;//do not select for now, go to next column
125  }
126  imgReader1.image2geo(icol1,irow1,geox,geoy);
127  imgReader2.geo2image(geox,geoy,icol2,irow2);
128  if(icol2<0||icol2>=imgReader2.nrOfCol())
129  continue;
130  icol2=static_cast<int>(icol2);
131  irow2=static_cast<int>(irow2);
132  //check for nodata
133  double value1=rowBuffer1[icol1];
134  double value2=rowBuffer2[icol2];
135  if(imgReader1.isNoData(value1)||imgReader2.isNoData(value2))
136  continue;
137 
138  buffer1.push_back(value1);
139  buffer2.push_back(value2);
140  if(verbose>1)
141  std::cout << geox << " " << geoy << " " << icol1 << " " << irow1 << " " << icol2 << " " << irow2 << " " << buffer1.back() << " " << buffer2.back() << std::endl;
142  }
143  }
144  double r2=0;
145  if(buffer1.size()&&buffer2.size()){
147  r2=stat.linear_regression(buffer1,buffer2,c0,c1);
148  }
149  if(verbose)
150  std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r2 << std::endl;
151  return r2;
152 }
153 
154 double ImgRegression::pgetR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose) const{
155  c0=0;
156  c1=1;
157  int icol1=0,irow1=0;
158  std::vector<double> rowBuffer1(imgReader1.nrOfCol());
159  std::vector<double> rowBuffer2(imgReader2.nrOfCol());
160  std::vector<double> buffer1;
161  std::vector<double> buffer2;
162 
163  srand(time(NULL));
164  for(irow1=0;irow1<imgReader1.nrOfRow();++irow1){
165  if(irow1%m_down)
166  continue;
167  icol1=0;
168  double icol2=0,irow2=0;
169  double geox=0,geoy=0;
170  imgReader1.readData(rowBuffer1,GDT_Float64,irow1,band1);
171  imgReader1.image2geo(icol1,irow1,geox,geoy);
172  imgReader2.geo2image(geox,geoy,icol2,irow2);
173  icol2=static_cast<int>(icol2);
174  irow2=static_cast<int>(irow2);
175  if(irow2<0||irow2>=imgReader2.nrOfRow())
176  continue;
177  imgReader2.readData(rowBuffer2,GDT_Float64,irow2,band2);
178  for(icol1=0;icol1<imgReader1.nrOfCol();++icol1){
179  if(icol1%m_down)
180  continue;
181  if(m_threshold>0){//percentual value
182  double p=static_cast<double>(rand())/(RAND_MAX);
183  p*=100.0;
184  if(p>m_threshold)
185  continue;//do not select for now, go to next column
186  }
187  imgReader1.image2geo(icol1,irow1,geox,geoy);
188  imgReader2.geo2image(geox,geoy,icol2,irow2);
189  if(icol2<0||icol2>=imgReader2.nrOfCol())
190  continue;
191  icol2=static_cast<int>(icol2);
192  irow2=static_cast<int>(irow2);
193  //check for nodata
194  double value1=rowBuffer1[icol1];
195  double value2=rowBuffer2[icol2];
196  if(imgReader1.isNoData(value1)||imgReader2.isNoData(value2))
197  continue;
198 
199  buffer1.push_back(value1);
200  buffer2.push_back(value2);
201  if(verbose>1)
202  std::cout << geox << " " << geoy << " " << icol1 << " " << irow1 << " " << icol2 << " " << irow2 << " " << buffer1.back() << " " << buffer2.back() << std::endl;
203  }
204  }
205  double r=0;
206  if(buffer1.size()&&buffer2.size()){
208  r=stat.correlation(buffer1,buffer2);
209  // r=stat.gsl_correlation(buffer1,buffer2);
210  double m1=0;
211  double v1=0;
212  double m2=0;
213  double v2=0;
214  stat.meanVar(buffer1,m1,v1);
215  stat.meanVar(buffer2,m2,v2);
216  if(v1>0){
217  if(r>=0)
218  c1=v2/v1;
219  else
220  c1=-v2/v1;
221  }
222  c0=m2-c1*m1;
223  }
224  if(verbose)
225  std::cout << "orthogonal regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r*r << std::endl;
226  return r*r;
227 }
228 
229 double ImgRegression::getRMSE(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose) const{
230  c0=0;
231  c1=1;
232  int icol=0,irow=0;
233  std::vector<double> rowBuffer1(imgReader.nrOfCol());
234  std::vector<double> rowBuffer2(imgReader.nrOfCol());
235  std::vector<double> buffer1;
236  std::vector<double> buffer2;
237 
238  srand(time(NULL));
239  assert(band1>=0);
240  assert(band1<imgReader.nrOfBand());
241  assert(band2>=0);
242  assert(band2<imgReader.nrOfBand());
243  for(irow=0;irow<imgReader.nrOfRow();++irow){
244  if(irow%m_down)
245  continue;
246  icol=0;
247  imgReader.readData(rowBuffer1,GDT_Float64,irow,band1);
248  imgReader.readData(rowBuffer2,GDT_Float64,irow,band2);
249  for(icol=0;icol<imgReader.nrOfCol();++icol){
250  if(icol%m_down)
251  continue;
252  if(m_threshold>0){//percentual value
253  double p=static_cast<double>(rand())/(RAND_MAX);
254  p*=100.0;
255  if(p>m_threshold)
256  continue;//do not select for now, go to next column
257  }
258  //check for nodata
259  double value1=rowBuffer1[icol];
260  double value2=rowBuffer2[icol];
261  if(imgReader.isNoData(value1)||imgReader.isNoData(value2))
262  continue;
263 
264  buffer1.push_back(value1);
265  buffer2.push_back(value2);
266  if(verbose>1)
267  std::cout << icol << " " << irow << " " << buffer1.back() << " " << buffer2.back() << std::endl;
268  }
269  }
270  double err=0;
271  if(buffer1.size()&&buffer2.size()){
273  err=stat.linear_regression_err(buffer1,buffer2,c0,c1);
274  }
275  if(verbose)
276  std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with rmse: " << err << std::endl;
277  return err;
278 }
279 
280 double ImgRegression::getR2(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose) const{
281  c0=0;
282  c1=1;
283  int icol=0,irow=0;
284  std::vector<double> rowBuffer1(imgReader.nrOfCol());
285  std::vector<double> rowBuffer2(imgReader.nrOfCol());
286  std::vector<double> buffer1;
287  std::vector<double> buffer2;
288 
289  srand(time(NULL));
290  assert(band1>=0);
291  assert(band1<imgReader.nrOfBand());
292  assert(band2>=0);
293  assert(band2<imgReader.nrOfBand());
294  for(irow=0;irow<imgReader.nrOfRow();++irow){
295  if(irow%m_down)
296  continue;
297  icol=0;
298  imgReader.readData(rowBuffer1,GDT_Float64,irow,band1);
299  imgReader.readData(rowBuffer2,GDT_Float64,irow,band2);
300  for(icol=0;icol<imgReader.nrOfCol();++icol){
301  if(icol%m_down)
302  continue;
303  if(m_threshold>0){//percentual value
304  double p=static_cast<double>(rand())/(RAND_MAX);
305  p*=100.0;
306  if(p>m_threshold)
307  continue;//do not select for now, go to next column
308  }
309  //check for nodata
310  double value1=rowBuffer1[icol];
311  double value2=rowBuffer2[icol];
312  if(imgReader.isNoData(value1)||imgReader.isNoData(value2))
313  continue;
314 
315  buffer1.push_back(value1);
316  buffer2.push_back(value2);
317  if(verbose>1)
318  std::cout << icol << " " << irow << " " << buffer1.back() << " " << buffer2.back() << std::endl;
319  }
320  }
321  double r2=0;
322  if(buffer1.size()&&buffer2.size()){
324  r2=stat.linear_regression(buffer1,buffer2,c0,c1);
325  }
326  if(verbose)
327  std::cout << "linear regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r2 << std::endl;
328  return r2;
329 }
330 
331 double ImgRegression::pgetR2(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose) const{
332  c0=0;
333  c1=1;
334  int icol=0,irow=0;
335  std::vector<double> rowBuffer1(imgReader.nrOfCol());
336  std::vector<double> rowBuffer2(imgReader.nrOfCol());
337  std::vector<double> buffer1;
338  std::vector<double> buffer2;
339 
340  srand(time(NULL));
341  assert(band1>=0);
342  assert(band1<imgReader.nrOfBand());
343  assert(band2>=0);
344  assert(band2<imgReader.nrOfBand());
345  for(irow=0;irow<imgReader.nrOfRow();++irow){
346  if(irow%m_down)
347  continue;
348  icol=0;
349  imgReader.readData(rowBuffer1,GDT_Float64,irow,band1);
350  imgReader.readData(rowBuffer2,GDT_Float64,irow,band2);
351  for(icol=0;icol<imgReader.nrOfCol();++icol){
352  if(icol%m_down)
353  continue;
354  if(m_threshold>0){//percentual value
355  double p=static_cast<double>(rand())/(RAND_MAX);
356  p*=100.0;
357  if(p>m_threshold)
358  continue;//do not select for now, go to next column
359  }
360  //check for nodata
361  double value1=rowBuffer1[icol];
362  double value2=rowBuffer2[icol];
363  if(imgReader.isNoData(value1)||imgReader.isNoData(value2))
364  continue;
365 
366  buffer1.push_back(value1);
367  buffer2.push_back(value2);
368  if(verbose>1)
369  std::cout << icol << " " << irow << " " << buffer1.back() << " " << buffer2.back() << std::endl;
370  }
371  }
372  double r=0;
373  if(buffer1.size()&&buffer2.size()){
375  r=stat.correlation(buffer1,buffer2);
376  // r=stat.gsl_correlation(buffer1,buffer2);
377  double m1=0;
378  double v1=0;
379  double m2=0;
380  double v2=0;
381  stat.meanVar(buffer1,m1,v1);
382  stat.meanVar(buffer2,m2,v2);
383  if(v1>0){
384  if(r>=0)
385  c1=v2/v1;
386  else
387  c1=-v2/v1;
388  }
389  c0=m2-c1*m1;
390  }
391  if(verbose)
392  std::cout << "orthogonal regression based on " << buffer1.size() << " points: " << c0 << "+" << c1 << " * x " << " with r^2: " << r*r << std::endl;
393  return r*r;
394 }
pktools-2.6.6/doc/html/Filter_8h_source.html0000644000113200011300000040762112647637661015762 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Filter.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
Filter.h
1 /**********************************************************************
2 Filter.h: class for filtering
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _MYFILTER_H_
21 #define _MYFILTER_H_
22 
23 #include <vector>
24 #include <iostream>
25 extern "C" {
26 #include <gsl/gsl_sort.h>
27 #include <gsl/gsl_wavelet.h>
28 }
29 #include "StatFactory.h"
30 #include "imageclasses/ImgReaderGdal.h"
31 #include "imageclasses/ImgWriterGdal.h"
32 
33 namespace filter
34 {
35 
36  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, mode=17, mixed=18, smoothnodata=19, threshold=20, ismin=21, ismax=22, heterog=23, order=24, stdev=25, dwt=26, dwti=27, dwt_cut=28, dwt_cut_from=29, savgolay=30, percentile=31, nvalid=32};
37 
38  enum PADDING { symmetric=0, replicate=1, circular=2, zero=3};
39 
40 class Filter
41 {
42 public:
43  Filter(void);
44  Filter(const std::vector<double> &taps);
45  virtual ~Filter(){};
46 
47  void setPadding(const std::string& padString){
48  m_padding=padString;
49  };
50 
51  static const gsl_wavelet_type* getWaveletType(const std::string waveletType){
52  if(waveletType=="daubechies") return(gsl_wavelet_daubechies);
53  if(waveletType=="daubechies_centered") return(gsl_wavelet_daubechies_centered);
54  if(waveletType=="haar") return(gsl_wavelet_haar);
55  if(waveletType=="haar_centered") return(gsl_wavelet_haar_centered);
56  if(waveletType=="bspline") return(gsl_wavelet_bspline);
57  if(waveletType=="bspline_centered") return(gsl_wavelet_bspline_centered);
58  }
59  static FILTER_TYPE getFilterType(const std::string filterType){
60  std::map<std::string, FILTER_TYPE> m_filterMap;
61  initFilterMap(m_filterMap);
62  return m_filterMap[filterType];
63  };
64 
65  void setTaps(const std::vector<double> &taps, bool normalize=true);
66  void pushClass(short theClass=1){m_class.push_back(theClass);};
67  void pushMask(short theMask=0){m_mask.push_back(theMask);};
68  unsigned int pushNoDataValue(double noDataValue);
69  unsigned int setNoDataValues(std::vector<double> vnodata);
70  void pushThreshold(double theThreshold){m_threshold.push_back(theThreshold);};
71  void setThresholds(const std::vector<double>& theThresholds){m_threshold=theThresholds;};
72  template<class T> void filter(const std::vector<T>& input, std::vector<T>& output);
73  template<class T> void filter(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim);
74  template<class T> void smooth(const std::vector<T>& input, std::vector<T>& output, short dim);
75  template<class T> void smoothNoData(const std::vector<T>& input, const std::string& interpolationType, std::vector<T>& output);
76  template<class T> void filter(T* input, int inputSize, std::vector<T>& output);
77  template<class T> void smooth(T* input, int inputSize, std::vector<T>& output, short dim);
78  //template<class T> void morphology(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim, bool verbose=false);
79  void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short verbose=0);
80  void filter(const ImgReaderGdal& input, ImgWriterGdal& output);
81  void stat(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method);
82  void stats(const ImgReaderGdal& input, ImgWriterGdal& output, const std::vector<std::string >& methods);
83  void filter(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim);
84  void getSavGolayCoefficients(std::vector<double> &c, int np, int nl, int nr, int ld, int m);
85  void ludcmp(std::vector<double> &a, std::vector<int> &indx, double &d);
86  void lubksb(std::vector<double> &a, std::vector<int> &indx, std::vector<double> &b);
87  /* void savgolay(const ImgReaderGdal& input, ImgWriterGdal& output, int np, int nl, int nr, int m); */
88  void smooth(const ImgReaderGdal& input, ImgWriterGdal& output, short dim);
89  void smoothNoData(const ImgReaderGdal& input, const std::string& interpolationType, ImgWriterGdal& output);
90  double getCentreWavelength(const std::vector<double> &wavelengthIn, const Vector2d<double>& srf, const std::string& interpolationType, double delta=1.0, bool verbose=false);
91  template<class T> double applySrf(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, T& output, double delta=1.0, bool normalize=false, bool verbose=false);
92  template<class T> double applySrf(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, std::vector<T>& output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false);
93 
94  template<class T> void applyFwhm(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, std::vector<T>& output, bool verbose=false);
95  template<class T> void applyFwhm(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, Vector2d<T>& output, int down=1, bool verbose=false);
96  void dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family);
97  void dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family);
98  void dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut);
99  void dwtForward(std::vector<double>& data, const std::string& wavelet_type, int family);
100  void dwtInverse(std::vector<double>& data, const std::string& wavelet_type, int family);
101  void dwtCut(std::vector<double>& data, const std::string& wavelet_type, int family, double cut);
102  void dwtCutFrom(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, int band);
103 
104 private:
105 
106  static void initFilterMap(std::map<std::string, FILTER_TYPE>& m_filterMap){
107  //initialize Map
108  m_filterMap["dwt"]=filter::dwt;
109  m_filterMap["dwti"]=filter::dwti;
110  m_filterMap["dwt_cut"]=filter::dwt_cut;
111  m_filterMap["dwt_cut_from"]=filter::dwt_cut_from;
112  m_filterMap["stdev"]=filter::stdev;
113  m_filterMap["var"]=filter::var;
114  m_filterMap["min"]=filter::min;
115  m_filterMap["max"]=filter::max;
116  m_filterMap["sum"]=filter::sum;
117  m_filterMap["mean"]=filter::mean;
118  m_filterMap["minmax"]=filter::minmax;
119  m_filterMap["dilate"]=filter::dilate;
120  m_filterMap["erode"]=filter::erode;
121  m_filterMap["close"]=filter::close;
122  m_filterMap["open"]=filter::open;
123  m_filterMap["homog"]=filter::homog;
124  m_filterMap["sobelx"]=filter::sobelx;
125  m_filterMap["sobely"]=filter::sobely;
126  m_filterMap["sobelxy"]=filter::sobelxy;
127  m_filterMap["sobelyx"]=filter::sobelyx;
128  m_filterMap["smooth"]=filter::smooth;
129  m_filterMap["density"]=filter::density;
130  m_filterMap["mode"]=filter::mode;
131  m_filterMap["mixed"]=filter::mixed;
132  m_filterMap["smoothnodata"]=filter::smoothnodata;
133  m_filterMap["threshold"]=filter::threshold;
134  m_filterMap["ismin"]=filter::ismin;
135  m_filterMap["ismax"]=filter::ismax;
136  m_filterMap["heterog"]=filter::heterog;
137  m_filterMap["order"]=filter::order;
138  m_filterMap["nvalid"]=filter::nvalid;
139  m_filterMap["median"]=filter::median;
140  m_filterMap["savgolay"]=filter::savgolay;
141  m_filterMap["percentile"]=filter::percentile;
142  }
143 
144 
145  static PADDING getPadding(const std::string& padString){
146  std::map<std::string, PADDING> padMap;
147  padMap["zero"]=filter::zero;
148  padMap["symmetric"]=filter::symmetric;
149  padMap["replicate"]=filter::replicate;
150  padMap["circular"]=filter::circular;
151  return(padMap[padString]);
152  };
153 
154  std::vector<double> m_taps;
155  std::vector<short> m_class;
156  std::vector<short> m_mask;
157  std::string m_padding;
158  std::vector<double> m_noDataValues;
159  std::vector<double> m_threshold;
160 };
161 
162 
163 //input[band], output
164 //returns wavelength for which srf is maximum
165  template<class T> double Filter::applySrf(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, T& output, double delta, bool normalize, bool verbose)
166 {
167  assert(srf.size()==2);//[0]: wavelength, [1]: response function
168  int nband=srf[0].size();
169  double start=floor(wavelengthIn[0]);
170  double end=ceil(wavelengthIn.back());
171  if(verbose)
172  std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush;
173 
175 
176  gsl_interp_accel *acc;
177  stat.allocAcc(acc);
178  gsl_spline *spline;
179  stat.getSpline(interpolationType,nband,spline);
180  stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
181  if(verbose)
182  std::cout << "calculating norm of srf" << std::endl << std::flush;
183  double norm=0;
184  norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc);
185  if(verbose)
186  std::cout << "norm of srf: " << norm << std::endl << std::flush;
187  gsl_spline_free(spline);
188  gsl_interp_accel_free(acc);
189  //interpolate input and srf to delta
190 
191  std::vector<double> wavelength_fine;
192  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
193  wavelength_fine.push_back(win);
194 
195  if(verbose)
196  std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl;
197  std::vector<double> srf_fine;//spectral response function, interpolated for wavelength_fine
198 
199  stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose);
200  assert(srf_fine.size()==wavelength_fine.size());
201 
202  gsl_interp_accel *accOut;
203  stat.allocAcc(accOut);
204  gsl_spline *splineOut;
205  stat.getSpline(interpolationType,wavelength_fine.size(),splineOut);
206  assert(splineOut);
207 
208  assert(wavelengthIn.size()==input.size());
209  std::vector<double> input_fine;
210  std::vector<double> product(wavelength_fine.size());
211  std::vector<double> wavelengthOut(wavelength_fine.size());
212  stat.interpolateUp(wavelengthIn,input,wavelength_fine,interpolationType,input_fine,verbose);
213 
214  if(verbose)
215  std::cout << "input_fine.size(): " << input_fine.size() << std::endl;
216  for(int iband=0;iband<input_fine.size();++iband){
217  product[iband]=input_fine[iband]*srf_fine[iband];
218  wavelengthOut[iband]=wavelength_fine[iband]*srf_fine[iband];
219  }
220 
221  assert(input_fine.size()==srf_fine.size());
222  assert(input_fine.size()==wavelength_fine.size());
223  stat.initSpline(splineOut,&(wavelength_fine[0]),&(product[0]),wavelength_fine.size());
224  if(normalize)
225  output=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
226  else
227  output=gsl_spline_eval_integ(splineOut,start,end,accOut);
228 
229  stat.initSpline(splineOut,&(wavelength_fine[0]),&(wavelengthOut[0]),wavelength_fine.size());
230  double centreWavelength=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
231 
232  gsl_spline_free(splineOut);
233  gsl_interp_accel_free(accOut);
234 
235  return(centreWavelength);
236 }
237 
238 //input[band][sample], output[sample] (if !transposeInput)
239 //returns wavelength for which srf is maximum
240  template<class T> double Filter::applySrf(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, std::vector<T>& output, double delta, bool normalize, int down, bool transposeInput, bool verbose)
241 {
242  assert(srf.size()==2);//[0]: wavelength, [1]: response function
243  int nband=srf[0].size();
244  unsigned int nsample=(transposeInput)? input.size():input[0].size();
245  output.resize((nsample+down-1)/down);
246  double start=floor(wavelengthIn[0]);
247  double end=ceil(wavelengthIn.back());
248  if(verbose)
249  std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush;
250 
252 
253  gsl_interp_accel *acc;
254  stat.allocAcc(acc);
255  gsl_spline *spline;
256  stat.getSpline(interpolationType,nband,spline);
257  stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
258  if(verbose)
259  std::cout << "calculating norm of srf" << std::endl << std::flush;
260  double norm=0;
261  norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc);
262  if(verbose)
263  std::cout << "norm of srf: " << norm << std::endl << std::flush;
264  gsl_spline_free(spline);
265  gsl_interp_accel_free(acc);
266  //interpolate input and srf to delta
267 
268  std::vector<double> wavelength_fine;
269  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
270  wavelength_fine.push_back(win);
271 
272  if(verbose)
273  std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl;
274  std::vector<double> srf_fine;//spectral response function, interpolated for wavelength_fine
275 
276  stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose);
277  assert(srf_fine.size()==wavelength_fine.size());
278 
279  gsl_interp_accel *accOut;
280  stat.allocAcc(accOut);
281  gsl_spline *splineOut;
282  stat.getSpline(interpolationType,wavelength_fine.size(),splineOut);
283  assert(splineOut);
284 
285  std::vector<double> wavelengthOut;
286  double centreWavelength=0;
287  for(int isample=0;isample<nsample;++isample){
288  if((isample+1+down/2)%down)
289  continue;
290  std::vector<T> inputValues;
291  if(transposeInput)
292  inputValues=input[isample];
293  else
294  input.selectCol(isample,inputValues);
295  assert(wavelengthIn.size()==inputValues.size());
296  std::vector<double> input_fine;
297  std::vector<double> product(wavelength_fine.size());
298  stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose);
299 
300  for(int iband=0;iband<input_fine.size();++iband){
301  product[iband]=input_fine[iband]*srf_fine[iband];
302  if(wavelengthOut.size()<input_fine.size())
303  wavelengthOut.push_back(wavelength_fine[iband]*srf_fine[iband]);
304  }
305 
306  assert(input_fine.size()==srf_fine.size());
307  assert(input_fine.size()==wavelength_fine.size());
308  stat.initSpline(splineOut,&(wavelength_fine[0]),&(product[0]),wavelength_fine.size());
309  if(normalize)
310  output[isample/down]=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
311  else
312  output[isample/down]=gsl_spline_eval_integ(splineOut,start,end,accOut);
313 
314  stat.initSpline(splineOut,&(wavelength_fine[0]),&(wavelengthOut[0]),wavelength_fine.size());
315  if(centreWavelength>0);
316  else
317  centreWavelength=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
318  }
319  gsl_spline_free(splineOut);
320  gsl_interp_accel_free(accOut);
321 
322  return(centreWavelength);
323 }
324 
325 template<class T> void Filter::applyFwhm(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, std::vector<T>& output, bool verbose){
326  double delta=1;//1 nm resolution
327  std::vector<double> stddev(fwhm.size());
328  for(int index=0;index<fwhm.size();++index)
329  stddev[index]=fwhm[index]/2.0/sqrt(2*log(2.0));//http://mathworld.wolfram.com/FullWidthatHalfMaximum.html
330  assert(wavelengthOut.size()==fwhm.size());
331  assert(wavelengthIn.size()==input.size());
332  assert(wavelengthIn[0]<=wavelengthOut[0]);
333  assert(wavelengthIn.back()>=wavelengthOut.back());
335  std::vector<double> input_fine;
336  std::vector<double> wavelength_fine;
337  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
338  wavelength_fine.push_back(win);
339  if(verbose){
340  for(int index=0;index<wavelength_fine.size();++index)
341  std::cout << " " << wavelength_fine[index];
342  std::cout << std::endl;
343  std::cout << "interpolate input wavelength to " << delta << " nm resolution (size=" << wavelength_fine.size() << ")" << std::endl;
344  }
345  stat.interpolateUp(wavelengthIn,input,wavelength_fine,interpolationType,input_fine,verbose);
346  int nbandIn=wavelength_fine.size();
347 
348  int nbandOut=wavelengthOut.size();
349  output.resize(nbandOut);
350  Vector2d<double> tf(nbandIn,nbandOut);
351  for(int indexOut=0;indexOut<nbandOut;++indexOut){
352  double norm=0;
353  for(int indexIn=0;indexIn<nbandIn;++indexIn){
354  // tf(indexIn,indexOut)=
355  tf[indexIn][indexOut]=
356  exp((wavelengthOut[indexOut]-wavelength_fine[indexIn])
357  *(wavelength_fine[indexIn]-wavelengthOut[indexOut])
358  /2.0/stddev[indexOut]
359  /stddev[indexOut]);
360  tf[indexIn][indexOut]/=sqrt(2.0*M_PI);
361  tf[indexIn][indexOut]/=stddev[indexOut];
362  norm+=tf[indexIn][indexOut];
363  }
364  output[indexOut]=0;
365  for(int indexIn=0;indexIn<nbandIn;++indexIn)
366  output[indexOut]+=input_fine[indexIn]*tf[indexIn][indexOut]/norm;
367  }
368 }
369 
370 
371  //input[inBand][sample], output[outBand][sample]
372  template<class T> void Filter::applyFwhm(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, Vector2d<T>& output, int down, bool verbose){
373  double delta=1;//1 nm resolution
374  std::vector<double> stddev(fwhm.size());
375  for(int index=0;index<fwhm.size();++index)
376  stddev[index]=fwhm[index]/2.0/sqrt(2*log(2.0));//http://mathworld.wolfram.com/FullWidthatHalfMaximum.html
378  std::vector<double> wavelength_fine;
379  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
380  wavelength_fine.push_back(win);
381  assert(wavelengthOut.size()==fwhm.size());
382  assert(wavelengthIn[0]<=wavelengthOut[0]);
383  assert(wavelengthIn.back()>=wavelengthOut.back());
384  if(verbose){
385  for(int index=0;index<wavelength_fine.size();++index)
386  std::cout << " " << wavelength_fine[index];
387  std::cout << std::endl;
388  std::cout << "interpolate input wavelength to " << delta << " nm resolution (size=" << wavelength_fine.size() << ")" << std::endl;
389  }
390  int nbandIn=wavelength_fine.size();
391  int nbandOut=wavelengthOut.size();
392  output.resize(nbandOut,(input[0].size()+down-1)/down);
393 
394  Vector2d<double> tf(nbandIn,nbandOut);
395  std::vector<double> norm(nbandOut);
396  for(int indexOut=0;indexOut<nbandOut;++indexOut){
397  norm[indexOut]=0;
398  for(int indexIn=0;indexIn<nbandIn;++indexIn){
399  tf[indexIn][indexOut]=
400  exp((wavelengthOut[indexOut]-wavelength_fine[indexIn])
401  *(wavelength_fine[indexIn]-wavelengthOut[indexOut])
402  /2.0/stddev[indexOut]
403  /stddev[indexOut]);
404  tf[indexIn][indexOut]/=sqrt(2.0*M_PI);
405  tf[indexIn][indexOut]/=stddev[indexOut];
406  norm[indexOut]+=tf[indexIn][indexOut];
407  }
408  }
409 
410  for(int isample=0;isample<input[0].size();++isample){
411  if((isample+1+down/2)%down)
412  continue;
413  std::vector<T> inputValues;
414  input.selectCol(isample,inputValues);
415  assert(wavelengthIn.size()==inputValues.size());
416  for(int indexOut=0;indexOut<nbandOut;++indexOut){
417  std::vector<double> input_fine;
418  stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose);
419  output[indexOut][(isample+down-1)/down]=0;
420  for(int indexIn=0;indexIn<nbandIn;++indexIn){
421  output[indexOut][(isample+down-1)/down]+=input_fine[indexIn]*tf[indexIn][indexOut]/norm[indexOut];
422  }
423  }
424  }
425 }
426 
427  template<class T> void Filter::smooth(const std::vector<T>& input, std::vector<T>& output, short dim)
428 {
429  assert(dim>0);
430  m_taps.resize(dim);
431  for(int itap=0;itap<dim;++itap)
432  m_taps[itap]=1.0/dim;
433  filter(input,output);
434  }
435 
436  template<class T> void Filter::smoothNoData(const std::vector<T>& input, const std::string& interpolationType, std::vector<T>& output)
437 {
439  stat.setNoDataValues(m_noDataValues);
440  std::vector<double> abscis(input.size());
441  for(int i=0;i<abscis.size();++i)
442  abscis[i]=i;
443  stat.interpolateNoData(abscis,input,interpolationType,output);
444  }
445 
446 template<class T> void Filter::filter(const std::vector<T>& input, std::vector<T>& output)
447 {
448  assert(input.size()>=m_taps.size());
449  output.resize(input.size());
450  int i=0;
451  //start: extend input by padding
452  for(i=0;i<m_taps.size()/2;++i){
453  //todo:introduce nodata?
454  output[i]=m_taps[m_taps.size()/2]*input[i];
455  for(int t=1;t<=m_taps.size()/2;++t){
456  output[i]+=m_taps[m_taps.size()/2+t]*input[i+t];
457  if(i>=t)
458  output[i]+=m_taps[m_taps.size()/2-t]*input[i-t];
459  else{
460  switch(getPadding(m_padding)){
461  case(replicate):
462  output[i]+=m_taps[m_taps.size()/2-t]*input[0];
463  break;
464  case(circular):
465  output[i]+=m_taps[m_taps.size()/2-t]*input[input.size()+i-t];
466  break;
467  case(zero):
468  output[i]+=m_taps[m_taps.size()/2-t]*0;
469  break;
470  case(symmetric):
471  default:
472  output[i]+=m_taps[m_taps.size()/2-t]*input[t-i];
473  break;
474  }
475  }
476  }
477  }
478  //main
479  for(i=m_taps.size()/2;i<input.size()-m_taps.size()/2;++i){
480  //todo:introduce nodata
481  T leaveOut=(*(m_taps.begin()))*input[i-m_taps.size()/2];
482  T include=(m_taps.back())*input[i+m_taps.size()/2];
483  output[i]=0;
484  for(int t=0;t<m_taps.size();++t)
485  output[i]+=input[i-m_taps.size()/2+t]*m_taps[t];
486  }
487  //end: extend input by padding
488  for(i=input.size()-m_taps.size()/2;i<input.size();++i){
489  //todo:introduce nodata?
490  output[i]=m_taps[m_taps.size()/2]*input[i];
491  //todo:introduce nodata?
492  for(int t=1;t<=m_taps.size()/2;++t){
493  output[i]+=m_taps[m_taps.size()/2-t]*input[i-t];
494  if(i+t<input.size())
495  output[i]+=m_taps[m_taps.size()/2+t]*input[i+t];
496  else{
497  switch(getPadding(m_padding)){
498  case(replicate):
499  output[i]+=m_taps[m_taps.size()/2+t]*input.back();
500  break;
501  case(circular):
502  output[i]+=m_taps[m_taps.size()/2+t]*input[t-1];
503  break;
504  case(zero):
505  output[i]+=m_taps[m_taps.size()/2+t]*0;
506  break;
507  case(symmetric):
508  default:
509  output[i]+=m_taps[m_taps.size()/2+t]*input[i-t];
510  break;
511  }
512  }
513  //output[i]+=(m_taps[m_taps.size()/2+t]+m_taps[m_taps.size()/2-t])*input[i-t];
514  }
515  }
516 }
517 
518 //todo: filling statBuffer can be optimized (no need to clear and fill entire buffer, just push back new value...)
519  template<class T> void Filter::filter(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim)
520 {
521  bool verbose=false;
522  assert(dim);
523  output.resize(input.size());
524  int i=0;
526  stat.setNoDataValues(m_noDataValues);
527  std::vector<T> statBuffer;
528  short binValue=0;
529  //start: extend input by padding
530  for(i=0;i<dim/2;++i){
531  binValue=0;
532  for(int iclass=0;iclass<m_class.size();++iclass){
533  if(input[i]==m_class[iclass]){
534  binValue=m_class[0];
535  break;
536  }
537  }
538  if(m_class.size())
539  statBuffer.push_back(binValue);
540  else
541  statBuffer.push_back(input[i]);
542 
543  for(int t=1;t<=dim/2;++t){
544  T theValue=input[i+t];
545  for(int iclass=0;iclass<m_class.size();++iclass){
546  if(theValue==m_class[iclass]){
547  binValue=m_class[0];
548  break;
549  }
550  }
551  if(m_class.size())
552  statBuffer.push_back(binValue);
553  else
554  statBuffer.push_back(theValue);
555 
556  if(i>=t){
557  theValue=input[i-t];
558  }
559  else{
560  switch(getPadding(m_padding)){
561  case(replicate):
562  theValue=input[0];
563  break;
564  case(circular):
565  theValue=input[input.size()+i-t];
566  break;
567  case(zero):
568  theValue=0;
569  break;
570  case(symmetric):
571  default:
572  theValue=input[t-i];
573  break;
574  }
575  }
576  for(int iclass=0;iclass<m_class.size();++iclass){
577  if(theValue==m_class[iclass]){
578  binValue=m_class[0];
579  break;
580  }
581  }
582  if(m_class.size())
583  statBuffer.push_back(binValue);
584  else
585  statBuffer.push_back(theValue);
586  }
587 
588  switch(getFilterType(method)){
589  case(filter::nvalid):
590  output[i]=stat.nvalid(statBuffer);
591  break;
592  case(filter::median):
593  output[i]=stat.median(statBuffer);
594  break;
595  case(filter::min):
596  case(filter::erode):
597  output[i]=stat.mymin(statBuffer);
598  break;
599  case(filter::max):
600  case(filter::dilate):
601  output[i]=stat.mymax(statBuffer);
602  break;
603  case(filter::sum):
604  output[i]=sqrt(stat.sum(statBuffer));
605  break;
606  case(filter::var):
607  output[i]=stat.var(statBuffer);
608  break;
609  case(filter::stdev):
610  output[i]=sqrt(stat.var(statBuffer));
611  break;
612  case(filter::mean):
613  output[i]=stat.mean(statBuffer);
614  break;
615  case(filter::percentile):
616  assert(m_threshold.size());
617  output[i]=stat.percentile(statBuffer,statBuffer.begin(),statBuffer.end(),m_threshold[0]);
618  break;
619  default:{
620  std::ostringstream ess;
621  ess << "method " << method << " (" << getFilterType(method) << ") not supported";
622  throw(ess.str());
623  break;
624  }
625  }
626  }
627  //main
628  statBuffer.clear();
629  for(i=dim/2;i<input.size()-dim/2;++i){
630  binValue=0;
631  for(int t=0;t<dim;++t){
632  for(int iclass=0;iclass<m_class.size();++iclass){
633  if(input[i-dim/2+t]==m_class[iclass]){
634  binValue=m_class[0];
635  break;
636  }
637  }
638  if(m_class.size())
639  statBuffer.push_back(binValue);
640  else
641  statBuffer.push_back(input[i-dim/2+t]);
642  }
643  switch(getFilterType(method)){
644  case(filter::nvalid):
645  output[i]=stat.nvalid(statBuffer);
646  break;
647  case(filter::median):
648  output[i]=stat.median(statBuffer);
649  break;
650  case(filter::min):
651  case(filter::erode):
652  output[i]=stat.mymin(statBuffer);
653  break;
654  case(filter::max):
655  case(filter::dilate):
656  output[i]=stat.mymax(statBuffer);
657  break;
658  case(filter::sum):
659  output[i]=sqrt(stat.sum(statBuffer));
660  break;
661  case(filter::var):
662  output[i]=stat.var(statBuffer);
663  break;
664  case(filter::mean):
665  output[i]=stat.mean(statBuffer);
666  break;
667  case(filter::percentile):
668  assert(m_threshold.size());
669  output[i]=stat.percentile(statBuffer,statBuffer.begin(),statBuffer.end(),m_threshold[0]);
670  break;
671  default:
672  std::string errorString="method not supported";
673  throw(errorString);
674  break;
675  }
676  statBuffer.clear();
677  }
678  //end: extend input by padding
679  for(i=input.size()-dim/2;i<input.size();++i){
680  binValue=0;
681  for(int iclass=0;iclass<m_class.size();++iclass){
682  if(input[i]==m_class[iclass]){
683  binValue=m_class[0];
684  break;
685  }
686  }
687  if(m_class.size())
688  statBuffer.push_back(binValue);
689  else
690  statBuffer.push_back(input[i]);
691 
692  for(int t=1;t<=dim/2;++t){
693  T theValue=input[i-t];
694  for(int iclass=0;iclass<m_class.size();++iclass){
695  if(theValue==m_class[iclass]){
696  binValue=m_class[0];
697  break;
698  }
699  }
700  if(m_class.size())
701  statBuffer.push_back(binValue);
702  else
703  statBuffer.push_back(theValue);
704  if(i+t<input.size())
705  theValue=input[i+t];
706  else{
707  switch(getPadding(m_padding)){
708  case(replicate):
709  theValue=input.back();
710  break;
711  case(circular):
712  theValue=input[t-1];
713  break;
714  case(zero):
715  theValue=0;
716  break;
717  case(symmetric):
718  default:
719  theValue=input[i-t];
720  break;
721  }
722  }
723  for(int iclass=0;iclass<m_class.size();++iclass){
724  if(theValue==m_class[iclass]){
725  binValue=m_class[0];
726  break;
727  }
728  }
729  if(m_class.size())
730  statBuffer.push_back(binValue);
731  else
732  statBuffer.push_back(theValue);
733  }
734  switch(getFilterType(method)){
735  case(filter::nvalid):
736  output[i]=stat.nvalid(statBuffer);
737  break;
738  case(filter::median):
739  output[i]=stat.median(statBuffer);
740  break;
741  case(filter::min):
742  case(filter::erode):
743  output[i]=stat.mymin(statBuffer);
744  break;
745  case(filter::max):
746  case(filter::dilate):
747  output[i]=stat.mymax(statBuffer);
748  break;
749  case(filter::sum):
750  output[i]=sqrt(stat.sum(statBuffer));
751  break;
752  case(filter::var):
753  output[i]=stat.var(statBuffer);
754  break;
755  case(filter::mean):
756  output[i]=stat.mean(statBuffer);
757  break;
758  case(filter::percentile):
759  assert(m_threshold.size());
760  output[i]=stat.percentile(statBuffer,statBuffer.begin(),statBuffer.end(),m_threshold[0]);
761  break;
762  default:
763  std::string errorString="method not supported";
764  throw(errorString);
765  break;
766  }
767  }
768  }
769 
770  template<class T> void Filter::smooth(T* input, int inputSize, std::vector<T>& output, short dim)
771 {
772  assert(dim>0);
773  m_taps.resize(dim);
774  for(int itap=0;itap<dim;++itap)
775  m_taps[itap]=1.0/dim;
776  filter(input,output);
777  }
778 
779 template<class T> void Filter::filter(T* input, int inputSize, std::vector<T>& output)
780 {
781  assert(inputSize>=m_taps.size());
782  output.resize(inputSize);
783  int i=0;
784 
785  //start: extend input by padding
786  for(i=0;i<m_taps.size()/2;++i){
787  //todo:introduce nodata
788  output[i]=m_taps[m_taps.size()/2]*input[i];
789 
790  for(int t=1;t<=m_taps.size()/2;++t){
791  output[i]+=m_taps[m_taps.size()/2+t]*input[i+t];
792  if(i>=t)
793  output[i]+=m_taps[m_taps.size()/2-t]*input[i-t];
794  else{
795  switch(getPadding(m_padding)){
796  case(replicate):
797  output[i]+=m_taps[m_taps.size()/2-t]*input[0];
798  break;
799  case(circular):
800  output[i]+=m_taps[m_taps.size()/2-t]*input[input.size()+i-t];
801  break;
802  case(zero):
803  output[i]+=m_taps[m_taps.size()/2-t]*0;
804  break;
805  case(symmetric):
806  default:
807  output[i]+=m_taps[m_taps.size()/2-t]*input[t-i];
808  break;
809  }
810  }
811  }
812  }
813  //main
814  for(i=m_taps.size()/2;i<input.size()-m_taps.size()/2;++i){
815  //todo:introduce nodata
816  T leaveOut=(*(m_taps.begin()))*input[i-m_taps.size()/2];
817  T include=(m_taps.back())*input[i+m_taps.size()/2];
818  output[i]=0;
819  for(int t=0;t<m_taps.size();++t)
820  output[i]+=input[i-m_taps.size()/2+t]*m_taps[t];
821  }
822  //end: extend input by padding
823  for(i=input.size()-m_taps.size()/2;i<input.size();++i){
824  //todo:introduce nodata
825  output[i]=m_taps[m_taps.size()/2]*input[i];
826  //todo:introduce nodata
827  for(int t=1;t<=m_taps.size()/2;++t){
828  output[i]+=m_taps[m_taps.size()/2-t]*input[i-t];
829  if(i+t<input.size())
830  output[i]+=m_taps[m_taps.size()/2+t]*input[i+t];
831  else{
832  switch(getPadding(m_padding)){
833  case(replicate):
834  output[i]+=m_taps[m_taps.size()/2+t]*input.back();
835  break;
836  case(circular):
837  output[i]+=m_taps[m_taps.size()/2+t]*input[t-1];
838  break;
839  case(zero):
840  output[i]+=m_taps[m_taps.size()/2+t]*0;
841  break;
842  case(symmetric):
843  default:
844  output[i]+=m_taps[m_taps.size()/2+t]*input[i-t];
845  break;
846  }
847  }
848  }
849  }
850 }
851 
852 }
853 
854 #endif /* _MYFILTER_H_ */
pktools-2.6.6/doc/html/inherit_graph_26.map0000644000113200011300000000027212647437044015501 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask.html0000644000113200011300000002665312647637662023544 00000000000000 pktools: qgis.pktools.pkgetmask.pkgetmask Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkgetmask.pkgetmask Class Reference
Inheritance diagram for qgis.pktools.pkgetmask.pkgetmask:
Collaboration diagram for qgis.pktools.pkgetmask.pkgetmask:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string BAND = "BAND"
 
string MIN = "MIN"
 
string MAX = "MAX"
 
list OPERATOR_OPTIONS = ["OR", "AND"]
 
string OPERATOR = "OPERATOR"
 
string DATA = "DATA"
 
string NODATA = "NODATA"
 
string OUTPUT = "OUTPUT"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkgetmask.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_11.map0000644000113200011300000000030712616110570015456 00000000000000 pktools-2.6.6/doc/html/dir_b7cc22b4453454f1e686d9a2e78d988d_dep.png0000644000113200011300000000421512616110567020365 00000000000000‰PNG  IHDR}ÂHÍ.bKGDÿÿÿ ½§“BIDATxœíÝPÔuÇñ× Ì® KÊ/AcAD…‘99²ÓÃÄ ØØ›$ŽÙËÐ qOz{» …ÜÒËùèsæÌ…Zýœ¥—!(òÑœœ‘••géeÊj¢ëõzTV¾†ÈÈU ôD\\$._®‡B!‡Á`À‰o`ýú0,[æ…¤¤'ðÁ…B!Ÿðô~áB¢¢Âáïï†5k‚ñÎ;U<«™aögo¿ý&JK‹Ÿÿ"‚‚BqãÆ?±cÇ3?ŽGii #0p9nܸ†ÜÜŽÑßß´´dìÙS€uë¢pñâydgoÅúõaoo/ô)Í«y¤WT…F³‘‘ј?ßkÖü™™»;F‹ˆˆ_ÁÉÉ«W?†íÛs&cddz½}}}J¥ˆ‹KÄÕ«­ÉdBŸÎŒ²šè_|Ñÿ@“m~~€Ï?oÅâÅþ&c>>~Ž1w®#Nœ8‡«W°zu¢ÑÐp ³fYͧ €EwqqGsó5“m·n5<<<·Ç´´|:ჃƒÐëõ(-­À'Ÿè Tªšš€ÞÞž™[¸XÍ5=>> ypp˜ƒåËCÐÔô/8 ¨T¿Caaå \ަ¦k8t¨‰Ää‰O=‹ââW±jÕ/0<<[[[Ìžm=×sÀŠ¢§¦¦atôäçïBW×møù-…F£Ezz*TªŒŽþ€={2ÑÓÓ…ààPdgk‘“cúý¹T*ÅÁƒexá…½èì쀗×B”””C*•Zè¬f†ÕD·µµCZÚóHK{Þ¸­½]¸xñ<ÂÂ~‰äägŒcuu5puuÃÂ…Þhié6nß°!6Ä·p °škúTš›¯##Cë×ÿ46~Œ—^Ú¥ò·–^šEXÍ#}*jõ6 @­V¡»û6<=!.N…ÄÄÍ–^šEXuôñOÝ»‘±ËÂ+z0xzg¦8:A ŽNG'ˆ£ÄÑ âèqt‚8:A ŽNG'ˆ£ÄÑ ìõt­Vƒ––›BM':R© ZíA¸»/˜ñ¹‹^Yù*BBÂàáá)Ô”¢röl5bbž´®è°eËvÄÄ(…œR4ärÉÝï4MøšNG'ˆ£ÄÑ âèqt‚8:A ŽNG'ˆ£ÄÑ âèqt‚8:A¢®Ó}6ã¯E 1‡D}*mm:øøº€3g.@.wÆ{ï]FHˆ/nÞüÊxŒ¬¬4|ýõWxÿý¿£¿¿©©‰xøadgçÝqllèïïCrr< !*ê œ?_‹­[ŸÆÆ±°·HðÏÉýÅ#}̾}EP(|±rå*ìÞ½ÕÕÇcZ­¥¥E(/¯‚\î<éþ###8}ú$ aÑ"o,]ˆœœ? ºúø”cã ý{ðï!•ʘ˜ŒÖÖÈd³gôܧ“¨¢+¾ÆÛ¾¾KÐÑñ¥ñãÆÆ„‡¯Aqñï¸ÿ7ßü£££xôQ…q›··::¾œrlŽ{MÈ)Ù$‹ž’²BM':Ñѱ Z)È\‚Eß¹3_¨©Ø]ð5 ŽNG'ˆ£ÄÑ âèqt‚8:AfýpÆÆÆµµgQ[+Ÿ®õ°{`cccÖþƒÁ`¸ûÝ&§ÓépåʳÀ~>DDDÜ÷þfEgâÄ×t‚8:A ŽNG'ˆ£ÄÑ âèqt‚8:A ŽNG'È@µ¥Á„õ_âσLÝ‹ù¤IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_31.md50000644000113200011300000000004012647437044015376 000000000000003c9304ebe9fdad1e7a503db1c533d0b6pktools-2.6.6/doc/html/dir_41d189c72498e24f979b227eb8e138b1_dep.map0000644000113200011300000000070312616110567020213 00000000000000 pktools-2.6.6/doc/html/dir_5f1e10fd305b434def78aaf73fd56d60.html0000644000113200011300000001043212647637663020123 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Debug Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkdiff_gui-gcc-Debug Directory Reference
Directory dependency graph for build-pkdiff_gui-gcc-Debug:
/home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Debug

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/classCostFactorySVM__inherit__graph.png0000644000113200011300000000733412616110567021433 00000000000000‰PNG  IHDR…p¿ç$ÁbKGDÿÿÿ ½§“‘IDATxœí}PGÇ—$$†–È;ˆ´S)&…Q*–×€CѱÖòþRjy±±vlm°µÖêHA„¢k4°Z*å%È‹¢<ò"j)¯òN …òvÏÛ'OLP!QsÁûüÁìíÝþî›ýÞîÞ]È®‚ 5à4-ã!0?ÐæºÀü@ÕŠõõõ}üñÇàéªY4ÄÇÇ©PPE?.]º¬ZñÅM}}=“É|®~@˜L¦:Å+!!!*—ÅÆtù.0?Ðæºxæ~ FDD¼òÊ+úúú...EEEjÔ™‹§" <[?ÆÇÇõôô Æ7ÂÂÂÂÃÃËÊʤ««ËØØX>§®®nèaÔ‰†*Ôºß}"©©©t:=77n¾þúëÃÃÃGŽyûí·çD*•ŽË瘘˜˜››«&I9º@T‚Á`̧¬¹¹y]]|—Ëííí…鉉‰­[·YYYíÞ½›Ïç#RRRB¥RI$Ò«¯¾úã?"bdd033ƒ¥Êç*--urr"“ÉæææDD$¥¤¤X[[GEEMLL(GSÖÐÑÑ(//·¶¶vvvŽŽŽ–)'“ÉMMMOüÔÁÁÁÁÁÁO±rPê‡ÃÀ«R¡PˆÇãÛÚÚà&‹Å²³³ãp8ºººGŽ™˜˜J¥\.W"‘(û¡@iiéìììÝ»wy<žD"©®®†mèµ×^c±X°T{{;LËG›S< ¥¥A±XlnnþÇ ²qãÆC‡ͧrÔñãŽç ÅÌ̬½½]>³±±ÑÅÅefffddD"‘¬X±æÛÙÙõ÷÷S(”ÊÊʆ††eË–yyyÕÔÔàps(Tè¯6mÚD$ÿüóOÿÕ«WŸ>}ÖÛÛkooÓï½÷žBœ95ÀôÊ•+x<> €Åbýý÷ßååå‘‘‘O¥fó½¿Ú¼yówß}'QˆD"===333<ßÕÕó;;;­¬¬ø|¾T*-,,äp8111ï¼óldO„Ï燄„$%%5558qfZZZöôôÀôíÛ·ÓÓÓJÍ©¦uuua"88¸¨¨ˆÉdº»»/[¶L…JXª5«yŽç£££FFF‘‘‘µµµÍÍÍiii€K—.Á½¾¾¾]]]­­­ŽŽŽ)))|>É’%.\ËÉÉY²d‰l€år¹°˜k<Ÿ˜˜ÐÑѹråÊôôtrr2 ©©)55•F£µ¶¶¶¶¶º¹¹ÅÆÆ"ÿë¯dÑ”5(tb±ØÔÔÔÌÌ,??ž•ƒÒñÒÓÓdiii``ðæ›o–””Èvq8œ¨¨(### ‹O?ýÞ_1Œ+V‰Ä•+W#"‰ÜÝÝõõõÿUüˆû«£G.]ºÔÚÚúĉááᦦ¦ 11ÑÒÒòå—_‡#™B4e ~ ’@&“§¦¦æY9êø¡ƒ¨ôÿ%L&344Tµ²ZÇ_|ÑÓÓsîܹyß·«öeij}ÔvÁààà?üpþüùçsFì}âã¸~ýúš5k¢££½½½ŸÏ±öñ8¼¼¼æyƒ÷´ÀÚºÀü@˜èó]¨5žçää<-‹‰®®.[[[ «öyíÚ5<ÿT?…:èúK5-ãÿìÞ½û¹>Ÿ£Š††Î€€ÌmÛ<ÒÓ4­E]ÃøQTt þ‹¥šÖ¢.Zï‡P(f±þ˜œœa³ïkZŽºh½UU÷fffx<ŽÅº¥i9ê¢õ~\¼x ÇÄbé•+-|¾PÓŠÔB»ý˜žž-+k‹%psvV|õjûã‹ íöCÞ §sñâM êQíöãâÅ›òÿ,*K++ïMMñ5(IM´ØgšÍþS"yèAË—[4%I}´ØK—š•3),Ôâ.K‹ý¸p¡Qùå‚TŠ44tŽŒLjD’úh«ƒƒÿܺÕ+•Îñ²Ç•–ÎÑt´mõ£´ôö£^¼‰Å’‹µõÁP[¿?Ÿ™ZX¼$Ûäñf—,Ñ%þ½¼´÷:‹áý.ÀÒòÓìì­›7;iZˆºhkµXÁü@˜èó]`~  Ìtù.0?ÐæºÀü@˜èó]`~  Ìtù.0?ÐæºÀü@˜èó]`~  Ìtù.0?ÐæºÀü@˜èó]`~  Ìtù.0?ÐæÊP˜eŒH$jZ‘*HËq8=M«P…¤¤$y úýàÀÀ€P(LMMÕ”¸ÂÂBÙ 9~ÏùÜæbÆ€KÇȃèó]`~  Ìt¡âü ãããYYYmmm“““666‘‘‘êè ÓéÊ™•••êÄ\(|>ÿôéÓl6›Ãᘘ˜øúúFFF‰Ä¢¢¢sçÎÊæÚB$,,,444 €N§[YY={V~&®={öܸq£  @¶ Õ|X ÀUY,–,ˆ@ àË!‘HfffRRRìíí vìØqêÔ©þùçÂ… l6ûàÁƒÇŽ{ðà\U!š²˜Ïd2?û쳘˜˜ÚÚZ‰D¨­­µ°°€] \¾0((())‰Á`ŒŒŒÈ´yxxLMMµµµúúúŸßÙÙ ˜žžnjjrss[hÅB<~À«àQKŽ‹ÅâŠŠŠ¼¼<8lÛ¶íäÉ“‚ðù|"‘èïïïííM"‘”Ënß¾]~óÀ...yyy¦¦¦$ ú===ýë¯¿ÆÆÆÂöìÙÓ××7 ëׯÄÅÅÙÚÚJ¥RÐÒÒâìì\^^îçç?Κ5k Æýû÷ËÊÊrrröîÝëëë Ð××wuu­¬¬¤Ñh555NNN EvFçééYUUeggW__O¥R_zé%  n ¥··W>óÞ½{ ³³³pÝYKKK˜oee566f``pìØ±öööààà]»vµ´´ÌigAAA¥ëÖ­#ýýýÉÉÉqqq¿ýöø //ïý÷ßÏÎΖ…•uYl6ÛÇÇGᤲ.KÎ ¨6~¸¹¹1 ù‰³®^½*‹I$…BÁáp²âggg¥RiZZZiiéÆ÷îÝËårçs¢ÙÙÙ´´´°°°œœœ]»vÁL##£ááa˜þ믿`%Ïœ`š@ø·?ðöö®©©©ªª¢R©&&&Aöïß/[;UGGÇÅÅöiuëÖ ‚òòòÎÎNwww…“R©Ô™™™ÖÖÖ›7o*ï?ªøÓÜÜ|àÀ;wîtuu9s†ÅbÁÞ†@ ÐéôŒŒŒ¡¡¡îîî¼¼¼õë×ëèè$%%±Ùìééi‘HD dýŸÿ¸¹rE"‘X,&B¡0??033ãçç—››ÛÝÝÝÝÝ}üøqù^F›SƒBd&‘HΜ9ãççsÈd²ŸŸß¾}û†††îܹ“••;+‰DrwwÏÌÌtvv644T¬GÎÓÓóèÑ£Ê{ç*φ††999YYY©©©|>ùòåééé®®®pï'Ÿ|’™™™ ««ëãã©>ÿüó“'OŽŽŽZZZ¦¦¦‰Dsss*•xùòåGH__ÇŽû÷ï'“Ép¡Ùääd&“)’’’««k||<@!š²Y—ÕWVV&?,'''Ÿ={öÔ©S …N§øá‡ò¥|}}¯^½:ç£+€N§+¯"½ 𝮂úœŸŠ5Ennîððð—_~©A ûöí311‘_YõE|% ‡††®\¹²iÓ&MkQäEôãîÝ»ñññ6lPù)úÙ¡­ó½ªÃo¼QRR¢isó"¶4ƒù.0?Ðæº˜c
pktools-2.6.6/doc/html/inherit_graph_34.map0000644000113200011300000000044712647437044015504 00000000000000 pktools-2.6.6/doc/html/dir_ab1bbd5a6b4bd6507847335527b029bb.html0000644000113200011300000001070112647637663017745 00000000000000 pktools: /home/kempenep/pktools/qt/pkcomposite_gui Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
pkcomposite_gui Directory Reference
Directory dependency graph for pkcomposite_gui:
/home/kempenep/pktools/qt/pkcomposite_gui

Files

file  main.cc [code]
 
file  mainwindow.cc [code]
 
file  mainwindow.h [code]
 
pktools-2.6.6/doc/html/classimgregression_1_1ImgRegression-members.html0000644000113200011300000001653012647637662023243 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
imgregression::ImgRegression Member List

This is the complete list of members for imgregression::ImgRegression, including all inherited members.

getR2(const ImgReaderGdal &imgReader1, const ImgReaderGdal &imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const (defined in imgregression::ImgRegression)imgregression::ImgRegression
getR2(const ImgReaderGdal &imgReader, unsigned short b1, unsigned short b2, double &c0, double &c1, short verbose=0) const (defined in imgregression::ImgRegression)imgregression::ImgRegression
getRMSE(const ImgReaderGdal &imgReader1, const ImgReaderGdal &imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const (defined in imgregression::ImgRegression)imgregression::ImgRegression
getRMSE(const ImgReaderGdal &imgReader, unsigned short b1, unsigned short b2, double &c0, double &c1, short verbose=0) const (defined in imgregression::ImgRegression)imgregression::ImgRegression
ImgRegression(void) (defined in imgregression::ImgRegression)imgregression::ImgRegression
pgetR2(const ImgReaderGdal &imgReader1, const ImgReaderGdal &imgReader2, double &c0, double &c1, unsigned short band1, unsigned short band2, short verbose=0) const (defined in imgregression::ImgRegression)imgregression::ImgRegression
pgetR2(const ImgReaderGdal &imgReader, unsigned short band1, unsigned short band2, double &c0, double &c1, short verbose=0) const (defined in imgregression::ImgRegression)imgregression::ImgRegression
setDown(int theDown) (defined in imgregression::ImgRegression)imgregression::ImgRegressioninline
setThreshold(double theThreshold) (defined in imgregression::ImgRegression)imgregression::ImgRegressioninline
~ImgRegression(void) (defined in imgregression::ImgRegression)imgregression::ImgRegression
pktools-2.6.6/doc/html/classONE__CLASS__Q.html0000644000113200011300000002170612647637662015725 00000000000000 pktools: ONE_CLASS_Q Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
ONE_CLASS_Q Class Reference
Inheritance diagram for ONE_CLASS_Q:
Collaboration diagram for ONE_CLASS_Q:

Public Member Functions

 ONE_CLASS_Q (const svm_problem &prob, const svm_parameter &param)
 
Qfloat * get_Q (int i, int len) const
 
double * get_QD () const
 
void swap_index (int i, int j) const
 
- Public Member Functions inherited from Kernel
 Kernel (int l, svm_node *const *x, const svm_parameter &param)
 

Additional Inherited Members

- Static Public Member Functions inherited from Kernel
static double k_function (const svm_node *x, const svm_node *y, const svm_parameter &param)
 
- Protected Attributes inherited from Kernel
double(Kernel::* kernel_function )(int i, int j) const
 

Detailed Description

Definition at line 1323 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/dir_ed1df9621940d6aa1183c365ad1750d2_dep.png0000644000113200011300000000641612616110567020330 00000000000000‰PNG  IHDRøÂdkbKGDÿÿÿ ½§“ ÃIDATxœíÝ{PÔÕð/ tAÑa4ÅHe´ÉÚäuM¾èªd𠦢¦¢®"(7É5ó‘(®‚ŒDÅ÷½aâû©€ˆ\(qµä!*œûG×_®Àî º»¿Ÿ™Ùßù×ïì~áwœu±B‘”ž3õˆèéaÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb– i¼eˬZµêIÍ…ˆ1vìXÖ»½ECþ?xpp0þ7ºtñ¯÷ˆ¨v'NÃk¯½Š¤¤¤z÷Ñ ßàÐ¥‹?–-[ßÐnˆèáá£Ü÷àDcÀ‰$Æ€IŒ'’N$1üTPp]»¶3õ4ÈðgPuu5nÝÒ˜zd ¸¤ª««¿}út‡¯¯û #ã0T*G Ôн»‰gIO[ƒ?èBæ))é,_‡èèÏàçç Î "b`Û¶ÝèÝ»ŽýÙij¤§¿Á%µaÃ*LŸ>}úô‡‹K ¼ùæÛ˜2e–©§EFÆ€Kª à :tðÕ*óñéh¢Ù©0à’jÑ¢²³Ïi•]º”m¢Ù©p.©  áX¸P ;;{¼ôR7deŧŸÎÓªS^^[ÍŒ—Ô„¡ªê>¢£#qãF ||^Äôéó0qâxá…6èÖ­ºwo³g L=UzŠpIYZZ!,l*¦*eùù¹€F,‘˜˜jª©‘qN$1œHb ø3ÄÝÝ99üˆê³„'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$fÔ¯lš7o:rrøeûôìR©| VÇm<£<>~5ºuëÖ­ÝŒ9,‘Y(,,@|üjy}4 {X"“Û¾= ¡¡ƒ:&÷àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘ÄÌ6๹—áèhÑ vúú¨Ïõ—93‡krt´Ðz¸º6Fß¾¯âìÙSµ7‡k0GfðúrphŠ?þÄÔÓøK1—5KKû²³‹]„#GÎ@¥òBhè`!L=µ¿,££ËÓæäÔܨ_‰#sY3''g¸¸´¸¸´ÄܹŸÂǧJJ®ÃÙÙÅijûk2ûßà›7' K¼¼œ1å5nÇ ¹-¯ªªÂ²e‹àïï 77;ôíû*Ž?Zë˜úHMÝx{»`úô ¨¬¬Ôª'„ÀìÙSðúë~¸q£°kW zöì W׿áå—=‘˜ø $d "#'+m+++ááÑ »wà[Ô„„uèÞ½¼¼œ±dI,¿ŸŸÜݰ`Ál½k%„Àúõ+ѣNjhÓÆôFZÚN8:ZÔkÍôõyÿþ}ÄÆªáëÛ^^Î7îøí·[ óœ¡¬¬¬`mm {{¥ìÞ½{˜3g*||ZÀÛÛsæLŽ{÷j´ÕU/-m'Þxãe´jeƒöí]±dÉŸ?ÜêzýglsböOHX‡Í›waÓ¦8xp/-š_¯~V¯^ŠåËã Vÿ™™ µzšÎ6k×®À¦M;±qc öîýAë „€Z= ‡¥cûöt895GyyF ÂèÑãqúôL™2 áá¡(//C@ÀP¤¤lUn7÷íKCãÆ6èÝûïJŸìEzúOP«c5ii;qäÈDE-B\\44š:çûí·k >ÇÉ“¹˜ y??x08/ýú AAA ‰¨0ûßà*•—òÜË«=Š‹‹jÔ1äa àëë§UÖ±cgåùÃÿ‚[ר……×”ã“'¡gÏ7±xñ¥¬iÓfHNÞcÇ2бã èßÿ üøãa<÷ÜshÜØýú ÀŽ[P^^†]»R0lØ(­ù4ibà[ÓÚŽõÉËËA‡´Ê||^¬µ®®5{x-tõYP¯µFÞÞпÿ»zÏ=:Æ™™— Ñh4……e9r,ÂÂBµÆ¾zõ Ú·wUÚ¾ûîÛÈÏÏ«q uÕ³¶¶ÆåËØ½zuÅÆ”6º^¿ÇÛœ˜}Àsr.=ôü"ÜÜÜ•ãû÷ õöÓ¦M[œ;wZ«,;û¼òüÁK£ùóÿèØ®®­”ãS°xñJlÛ¶ ‡ïܹSêêjlذ¹¹„„¼¡CßÁÍ›@@ÀP$'oÁ?$Ãϯ«Vž77w­k€‹³´Ž Y³‡×BWŸ®®­põê¥üìÙSÊm¸®sŽQ›Æm0lØHdgŸ×úaääÔ\ëA^ÞMìÙ“Q£}]õîÜ©@hh0ÂçâÀˆ‹[¡´Ñ÷ú:¶91û€ÏšÜÜË8yòæÏŸ‰aÃFÂÁ¡) 11·oÿŽÕ«—êígÔ¨¡VOEjêüúk1ÒÓwéÝ?͘ñ±ÖØÁÁ!Ê9[´k烉§còäQYy4¨RR¶âöíßqïÞ]XZZÁÆÆЫWܺu±±j Z×°õ6zôx¨ÕÓ°ÿnh47pèÐ>ÄÆÎ………E½ÖL_Ÿƒ¿‡èèHdeCVÖ9L›†‚‚|ÐyÎPvvö(-½²²R¥ìw!*j òqþüöÅW_}Q£m]õ*++q÷î]X[[ãÎ ,\¨”–ÞÖûú:¶Y1÷=øÚµ›D›6m…³³‹?>BW FˆÈÈháàÐTxx¨DB½{ðë×¨EÂÓ³°±±þþ¯ˆ={2tîÁ—.ýJ¸¹¹ '§æb̘pQTTQc¯WTT!T*oñÉ'jeŸåá¡ÖÖÖÂË«½HHØ¡Õ÷ˆc„­mqíZi=èÃ{l}ǵ=JJªDLÌçÂÃC%ìíÄ[oõ ;DóæÎ¯ÙãôYTtG„…M-[¶öö" `¨ÈË»ùÿu©û\]{ðG¯¯¤¤JØÙÙ‹S§ò”²«WÇM›6ŽŽNbĈ1¢°°¬Æ5ÔUO£"&f±hÖÌQ´ní&ââVˆ€€¡ÂÙÙEïë§«Os݃[C6°uFYÙ],[¶Þ ú*•#Ö­K4û¿l’›{ݺyÕyûh®ÒÒv¢uk7têô’R–’²qqÑ8xð¤Ùôù¬zð—Mrr4Õ[[k$%%Õ{L³¿E'Ã?cdžàô騨(Gffbbfã½÷F›UŸd<Ò}’íI°³³ÇÈ‘cM=Zéû¼uDD$BB¢¤ä:Ú¶õDHHhƒ®e„i¨¨(¢}’ñ0àµpvvÁâÅ+M=Z²mˆŒŒ~bãYZZ"22ú‰öIÆÃ[t"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1œHb 8‘ÄŒþ…qqÑøúë5Æ–Èä®_ÿÅèc5àï¿ÿ‘AßaN$#[[O¼òÊkFÓ¨Ÿ9“_ûCdL܃IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Ö º4jÔ©©;šêø¤æCD2dHƒÚ7èïƒçææâøñã šÕ­k×®ðôô¬wûœˆÌ÷àDcÀ‰$Æ€IŒ'’N$1œHb 8‘Äp"‰1àDcÀ‰$Æ€IŒ'’N$1K›M= "z:þêfm¥{IEND®B`‚pktools-2.6.6/doc/html/classLastReturnFilter__inherit__graph.map0000644000113200011300000000007312616110567022040 00000000000000 pktools-2.6.6/doc/html/Vector2d_8cc_source.html0000644000113200011300000000554512647637662016363 00000000000000 pktools: /home/kempenep/pktools/src/base/Vector2d.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
Vector2d.cc
pktools-2.6.6/doc/html/classKernel__inherit__graph.md50000644000113200011300000000004012616110566017710 000000000000005c77420dc3aa316a280c681b4dcea066pktools-2.6.6/doc/html/pkextract_8cc_source.html0000644000113200011300000135200412647637661016673 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkextract.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract.cc
1 /**********************************************************************
2 pkextract.cc: extract pixel values from raster image from a (vector or raster) sample
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <math.h>
22 #include <stdlib.h>
23 #include <sstream>
24 #include <string>
25 #include <algorithm>
26 #include <ctime>
27 #include <vector>
28 #include "imageclasses/ImgReaderGdal.h"
29 #include "imageclasses/ImgWriterOgr.h"
30 #include "base/Optionpk.h"
31 #include "algorithms/StatFactory.h"
32 
33 #ifndef PI
34 #define PI 3.1415926535897932384626433832795
35 #endif
36 
37 /******************************************************************************/
122 namespace rule{
123  enum RULE_TYPE {point=0, mean=1, proportion=2, custom=3, min=4, max=5, mode=6, centroid=7, sum=8, median=9, stdev=10, percentile=11, count=12};
124 }
125 
126 using namespace std;
127 
128 int main(int argc, char *argv[])
129 {
130  Optionpk<string> image_opt("i", "input", "Raster input dataset containing band information");
131  Optionpk<string> sample_opt("s", "sample", "OGR vector dataset with features to be extracted from input data. Output will contain features with input band information included. Sample image can also be GDAL raster dataset.");
132  Optionpk<string> layer_opt("ln", "ln", "Layer name(s) in sample (leave empty to select all)");
133  Optionpk<unsigned int> random_opt("rand", "random", "Create simple random sample of points. Provide number of points to generate");
134  Optionpk<double> grid_opt("grid", "grid", "Create systematic grid of points. Provide cell grid size (in projected units, e.g,. m)");
135  Optionpk<string> output_opt("o", "output", "Output sample dataset");
136  Optionpk<int> class_opt("c", "class", "Class(es) to extract from input sample image. Leave empty to extract all valid data pixels from sample dataset. Make sure to set classes if rule is set to mode, proportion or count");
137  Optionpk<float> threshold_opt("t", "threshold", "Probability threshold for selecting samples (randomly). Provide probability in percentage (>0) or absolute (<0). Use a single threshold for vector sample datasets. If using raster land cover maps as a sample dataset, you can provide a threshold value for each class (e.g. -t 80 -t 60). Use value 100 to select all pixels for selected class(es)", 100);
138  Optionpk<double> percentile_opt("perc","perc","Percentile value used for rule percentile",95);
139  Optionpk<string> ogrformat_opt("f", "f", "Output sample dataset format","SQLite");
140  Optionpk<string> ftype_opt("ft", "ftype", "Field type (only Real or Integer)", "Real");
141  Optionpk<string> ltype_opt("lt", "ltype", "Label type: In16 or String", "Integer");
142  Optionpk<bool> polygon_opt("polygon", "polygon", "Create OGRPolygon as geometry instead of OGRPoint.", false);
143  Optionpk<int> band_opt("b", "band", "Band index(es) to extract (0 based). Leave empty to use all bands");
144  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
145  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
146  Optionpk<string> rule_opt("r", "rule", "Rule how to report image information per feature (only for vector sample). point (value at each point or at centroid if polygon), centroid, mean, stdev, median, proportion, count, min, max, mode, sum, percentile.", "centroid");
147  Optionpk<double> srcnodata_opt("srcnodata", "srcnodata", "Invalid value(s) for input image");
148  Optionpk<int> bndnodata_opt("bndnodata", "bndnodata", "Band(s) in input image to check if pixel is valid (used for srcnodata)", 0);
149  Optionpk<float> polythreshold_opt("tp", "thresholdPolygon", "(absolute) threshold for selecting samples in each polygon");
150  Optionpk<string> test_opt("test", "test", "Test sample dataset (use this option in combination with threshold<100 to create a training (output) and test set");
151  Optionpk<string> fieldname_opt("bn", "bname", "For single band input data, this extra attribute name will correspond to the raster values. For multi-band input data, multiple attributes with this prefix will be added (e.g. b0, b1, b2, etc.)", "b");
152  Optionpk<string> label_opt("cn", "cname", "Name of the class label in the output vector dataset", "label");
153  Optionpk<short> geo_opt("geo", "geo", "Use geo coordinates (set to 0 to use image coordinates)", 1);
154  Optionpk<short> down_opt("down", "down", "Down sampling factor (for raster sample datasets only). Can be used to create grid points", 1);
155  Optionpk<short> buffer_opt("buf", "buffer", "Buffer for calculating statistics for point features ");
156  Optionpk<bool> disc_opt("circ", "circular", "Use a circular disc kernel buffer (for vector point sample datasets only, use in combination with buffer option)", false);
157  Optionpk<short> verbose_opt("v", "verbose", "Verbose mode if > 0", 0,2);
158 
159  bstart_opt.setHide(1);
160  bend_opt.setHide(1);
161  bndnodata_opt.setHide(1);
162  srcnodata_opt.setHide(1);
163  polythreshold_opt.setHide(1);
164  percentile_opt.setHide(1);
165  test_opt.setHide(1);
166  fieldname_opt.setHide(1);
167  label_opt.setHide(1);
168  geo_opt.setHide(1);
169  down_opt.setHide(1);
170  buffer_opt.setHide(1);
171  disc_opt.setHide(1);
172 
173  bool doProcess;//stop process when program was invoked with help option (-h --help)
174  try{
175  doProcess=image_opt.retrieveOption(argc,argv);
176  sample_opt.retrieveOption(argc,argv);
177  layer_opt.retrieveOption(argc,argv);
178  random_opt.retrieveOption(argc,argv);
179  grid_opt.retrieveOption(argc,argv);
180  output_opt.retrieveOption(argc,argv);
181  class_opt.retrieveOption(argc,argv);
182  threshold_opt.retrieveOption(argc,argv);
183  percentile_opt.retrieveOption(argc,argv);
184  ogrformat_opt.retrieveOption(argc,argv);
185  ftype_opt.retrieveOption(argc,argv);
186  ltype_opt.retrieveOption(argc,argv);
187  polygon_opt.retrieveOption(argc,argv);
188  band_opt.retrieveOption(argc,argv);
189  bstart_opt.retrieveOption(argc,argv);
190  bend_opt.retrieveOption(argc,argv);
191  rule_opt.retrieveOption(argc,argv);
192  bndnodata_opt.retrieveOption(argc,argv);
193  srcnodata_opt.retrieveOption(argc,argv);
194  polythreshold_opt.retrieveOption(argc,argv);
195  test_opt.retrieveOption(argc,argv);
196  fieldname_opt.retrieveOption(argc,argv);
197  label_opt.retrieveOption(argc,argv);
198  geo_opt.retrieveOption(argc,argv);
199  down_opt.retrieveOption(argc,argv);
200  buffer_opt.retrieveOption(argc,argv);
201  disc_opt.retrieveOption(argc,argv);
202  // rbox_opt.retrieveOption(argc,argv);
203  // cbox_opt.retrieveOption(argc,argv);
204  verbose_opt.retrieveOption(argc,argv);
205  }
206  catch(string predefinedString){
207  std::cout << predefinedString << std::endl;
208  exit(0);
209  }
210  if(!doProcess){
211  cout << endl;
212  cout << "Usage: pkextract -i input [-s sample | -rand number | -grid size] -o output" << endl;
213  cout << endl;
214  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
215  exit(0);//help was invoked, stop processing
216  }
217 
218  std::map<std::string, rule::RULE_TYPE> ruleMap;
219  //initialize ruleMap
220  ruleMap["point"]=rule::point;
221  ruleMap["centroid"]=rule::centroid;
222  ruleMap["mean"]=rule::mean;
223  ruleMap["stdev"]=rule::stdev;
224  ruleMap["median"]=rule::median;
225  ruleMap["proportion"]=rule::proportion;
226  ruleMap["count"]=rule::count;
227  ruleMap["min"]=rule::min;
228  ruleMap["max"]=rule::max;
229  ruleMap["custom"]=rule::custom;
230  ruleMap["mode"]=rule::mode;
231  ruleMap["sum"]=rule::sum;
232  ruleMap["percentile"]=rule::percentile;
233 
234  if(srcnodata_opt.size()){
235  while(srcnodata_opt.size()<bndnodata_opt.size())
236  srcnodata_opt.push_back(srcnodata_opt[0]);
237  while(bndnodata_opt.size()<srcnodata_opt.size())
238  bndnodata_opt.push_back(bndnodata_opt[0]);
239  }
240 
241  if(verbose_opt[0])
242  std::cout << class_opt << std::endl;
244  stat.setNoDataValues(srcnodata_opt);
245  Vector2d<unsigned int> posdata;
246  unsigned long int nsample=0;
247  unsigned long int ntotalvalid=0;
248  unsigned long int ntotalinvalid=0;
249  vector<unsigned long int> nvalid(class_opt.size());
250  vector<unsigned long int> ninvalid(class_opt.size());
251  for(int it=0;it<nvalid.size();++it){
252  nvalid[it]=0;
253  ninvalid[it]=0;
254  }
255 
256  ImgReaderGdal imgReader;
257  if(image_opt.empty()){
258  std::cerr << "No image dataset provided (use option -i). Use --help for help information";
259  exit(0);
260  }
261  if(output_opt.empty()){
262  std::cerr << "No output dataset provided (use option -o). Use --help for help information";
263  exit(0);
264  }
265  try{
266  imgReader.open(image_opt[0]);
267  }
268  catch(std::string errorstring){
269  std::cout << errorstring << std::endl;
270  exit(0);
271  }
272 
273  //convert start and end band options to vector of band indexes
274  try{
275  if(bstart_opt.size()){
276  if(bend_opt.size()!=bstart_opt.size()){
277  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
278  throw(errorstring);
279  }
280  band_opt.clear();
281  for(int ipair=0;ipair<bstart_opt.size();++ipair){
282  if(bend_opt[ipair]<=bstart_opt[ipair]){
283  string errorstring="Error: index for end band must be smaller then start band";
284  throw(errorstring);
285  }
286  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
287  band_opt.push_back(iband);
288  }
289  }
290  }
291  catch(string error){
292  cerr << error << std::endl;
293  exit(1);
294  }
295 
296  int nband=(band_opt.size()) ? band_opt.size() : imgReader.nrOfBand();
297 
298  if(fieldname_opt.size()<nband){
299  std::string bandString=fieldname_opt[0];
300  fieldname_opt.clear();
301  fieldname_opt.resize(nband);
302  for(int iband=0;iband<nband;++iband){
303  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
304  ostringstream fs;
305  fs << bandString << theBand;
306  fieldname_opt[iband]=fs.str();
307  }
308  }
309 
310  if(verbose_opt[0])
311  std::cout << fieldname_opt << std::endl;
312 
313  if(verbose_opt[0]>1)
314  std::cout << "Number of bands in input image: " << imgReader.nrOfBand() << std::endl;
315 
316  OGRFieldType fieldType;
317  OGRFieldType labelType;
318  int ogr_typecount=11;//hard coded for now!
319  if(verbose_opt[0]>1)
320  std::cout << "field and label types can be: ";
321  for(int iType = 0; iType < ogr_typecount; ++iType){
322  if(verbose_opt[0]>1)
323  std::cout << " " << OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType);
324  if( OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType) != NULL
325  && EQUAL(OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType),
326  ftype_opt[0].c_str()))
327  fieldType=(OGRFieldType) iType;
328  if( OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType) != NULL
329  && EQUAL(OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType),
330  ltype_opt[0].c_str()))
331  labelType=(OGRFieldType) iType;
332  }
333  switch( fieldType ){
334  case OFTInteger:
335  case OFTReal:
336  case OFTRealList:
337  case OFTString:
338  if(verbose_opt[0]>1)
339  std::cout << std::endl << "field type is: " << OGRFieldDefn::GetFieldTypeName(fieldType) << std::endl;
340  break;
341  default:
342  cerr << "field type " << OGRFieldDefn::GetFieldTypeName(fieldType) << " not supported" << std::endl;
343  exit(0);
344  break;
345  }
346  switch( labelType ){
347  case OFTInteger:
348  case OFTReal:
349  case OFTRealList:
350  case OFTString:
351  if(verbose_opt[0]>1)
352  std::cout << std::endl << "label type is: " << OGRFieldDefn::GetFieldTypeName(labelType) << std::endl;
353  break;
354  default:
355  cerr << "label type " << OGRFieldDefn::GetFieldTypeName(labelType) << " not supported" << std::endl;
356  exit(0);
357  break;
358  }
359 
360  const char* pszMessage;
361  void* pProgressArg=NULL;
362  GDALProgressFunc pfnProgress=GDALTermProgress;
363  double progress=0;
364  srand(time(NULL));
365 
366  bool sampleIsRaster=false;
367  bool sampleIsVirtual=false;
368 
369  ImgReaderOgr sampleReaderOgr;
370  ImgWriterOgr sampleWriterOgr;
371 
372  if(sample_opt.size()){
373  try{
374  sampleReaderOgr.open(sample_opt[0]);
375  }
376  catch(string errorString){
377  sampleIsRaster=true;
378  }
379  }
380  else{
381  try{
382  sampleWriterOgr.open("/vsimem/virtual",ogrformat_opt[0]);
383  }
384  catch(string errorString){
385  cerr << errorString << endl;
386  }
387  char **papszOptions=NULL;
388  sampleWriterOgr.createLayer("points", imgReader.getProjection(), wkbPoint, papszOptions);
389  sampleIsVirtual=true;
390 
391  // string fieldName="label";
392  // string fieldValue="class";
393  // sampleWriterOgr.createField(fieldName,OFTString);
394  if(random_opt.size()){
395  //create simple random sampling within boundary
396  OGRPoint pt;
397  double ulx,uly,lrx,lry;
398  imgReader.getBoundingBox(ulx,uly,lrx,lry);
399  for(unsigned int ipoint=1;ipoint<=random_opt[0];++ipoint){
400  OGRFeature *pointFeature;
401  pointFeature=sampleWriterOgr.createFeature();
402  // pointFeature->SetField(fieldName.c_str(),fieldValue.c_str());
403  double theX=ulx+static_cast<double>(rand())/(RAND_MAX)*(lrx-ulx);
404  double theY=uly-static_cast<double>(rand())/(RAND_MAX)*(uly-lry);
405  pt.setX(theX);
406  pt.setY(theY);
407  pointFeature->SetGeometry( &pt );
408  if(sampleWriterOgr.createFeature(pointFeature) != OGRERR_NONE ){
409  cerr << "Failed to create feature in shapefile" << endl;
410  exit( 1 );
411  }
412  OGRFeature::DestroyFeature(pointFeature);
413  }
414  }
415  else if(grid_opt.size()){
416  //create systematic grid of points
417  OGRPoint pt;
418  double ulx,uly,lrx,lry;
419  imgReader.getBoundingBox(ulx,uly,lrx,lry);
420  unsigned int ipoint=0;
421  for(double theY=uly-grid_opt[0]/2;theY>lry;theY-=grid_opt[0]){
422  for(double theX=ulx+grid_opt[0]/2;theX<lrx;theX+=grid_opt[0]){
423  if(verbose_opt[0]>1)
424  cout << "position: " << theX << " " << theY << endl;
425  OGRFeature *pointFeature;
426  pointFeature=sampleWriterOgr.createFeature();
427  // pointFeature->SetField(fieldName.c_str(),fieldValue.c_str());
428  pt.setX(theX);
429  pt.setY(theY);
430  pointFeature->SetGeometry( &pt );
431  if(sampleWriterOgr.createFeature(pointFeature) != OGRERR_NONE ){
432  cerr << "Failed to create feature in shapefile" << endl;
433  exit( 1 );
434  }
435  OGRFeature::DestroyFeature(pointFeature);
436  }
437  }
438  }
439  else{
440  std::cerr << "No sample dataset provided (use option -s). Use --help for help information";
441  exit(0);
442  }
443  try{
444  sampleWriterOgr.close();
445  sampleReaderOgr.open("/vsimem/virtual");
446  }
447  catch(string errorString){
448  cerr << errorString << endl;
449  }
450  }
451 
452  if(sampleIsRaster){
453  if(class_opt.empty()){
454  // std::cout << "Warning: no classes selected, if a classes must be extracted, set to -1 for all classes using option -c -1" << std::endl;
455  ImgReaderGdal classReader;
456  ImgWriterOgr ogrWriter;
457  assert(sample_opt.size());
458  classReader.open(sample_opt[0]);
459  // vector<int> classBuffer(classReader.nrOfCol());
460  vector<double> classBuffer(classReader.nrOfCol());
461  Vector2d<double> imgBuffer(nband);//[band][col]
462  vector<double> sample(2+nband);//x,y,band values
463  Vector2d<double> writeBuffer;
464  // vector<int> writeBufferClass;
465  vector<double> writeBufferClass;
466  vector<int> selectedClass;
467  Vector2d<double> selectedBuffer;
468  double oldimgrow=-1;
469  int irow=0;
470  int icol=0;
471  if(verbose_opt[0]>1)
472  std::cout << "extracting sample from image..." << std::endl;
473  progress=0;
474  pfnProgress(progress,pszMessage,pProgressArg);
475  for(irow=0;irow<classReader.nrOfRow();++irow){
476  if(irow%down_opt[0])
477  continue;
478  // classReader.readData(classBuffer,GDT_Int32,irow);
479  classReader.readData(classBuffer,GDT_Float64,irow);
480  double x,y;//geo coordinates
481  double iimg,jimg;//image coordinates in img image
482  for(icol=0;icol<classReader.nrOfCol();++icol){
483  if(icol%down_opt[0])
484  continue;
485  // int theClass=0;
486  double theClass=classBuffer[icol];
487  // int processClass=-1;
488  int processClass=0;
489  // if(class_opt[0]<0){//process every class except 0
490  // if(classBuffer[icol]){
491  // processClass=0;
492  // theClass=classBuffer[icol];
493  // }
494  // }
495  // else{
496  // for(int iclass=0;iclass<class_opt.size();++iclass){
497  // if(classBuffer[icol]==class_opt[iclass]){
498  // processClass=iclass;
499  // theClass=class_opt[iclass];
500  // }
501  // }
502  // }
503  // if(processClass>=0){
504  bool valid=true;
505  if(valid){
506  if(geo_opt[0]){
507  classReader.image2geo(icol,irow,x,y);
508  sample[0]=x;
509  sample[1]=y;
510  if(verbose_opt[0]>1){
511  std::cout.precision(12);
512  std::cout << theClass << " " << x << " " << y << std::endl;
513  }
514  //find col in img
515  imgReader.geo2image(x,y,iimg,jimg);
516  //nearest neighbour
517  jimg=static_cast<int>(jimg);
518  iimg=static_cast<int>(iimg);
519  if(static_cast<int>(iimg)<0||static_cast<int>(iimg)>=imgReader.nrOfCol())
520  continue;
521  }
522  else{
523  iimg=icol;
524  jimg=irow;
525  sample[0]=iimg;
526  sample[1]=jimg;
527  }
528  if(static_cast<int>(jimg)<0||static_cast<int>(jimg)>=imgReader.nrOfRow())
529  continue;
530 
531  bool valid=true;
532 
533  if(static_cast<int>(jimg)!=static_cast<int>(oldimgrow)){
534  assert(imgBuffer.size()==nband);
535  for(int iband=0;iband<nband;++iband){
536  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
537  imgReader.readData(imgBuffer[iband],GDT_Float64,static_cast<int>(jimg),theBand);
538  assert(imgBuffer[iband].size()==imgReader.nrOfCol());
539  if(srcnodata_opt.size()){
540  vector<int>::const_iterator bndit=bndnodata_opt.begin();
541  vector<double>::const_iterator srcit=srcnodata_opt.begin();
542  while(bndit!=bndnodata_opt.end()&&srcit!=srcnodata_opt.end()){
543  if((*bndit==theBand)&&(*srcit==imgBuffer[iband][static_cast<int>(iimg)])){
544  valid=false;
545  break;
546  }
547  else{
548  ++bndit;
549  ++srcit;
550  }
551  }
552  }
553  }
554  oldimgrow=jimg;
555  }
556 
557  if(valid){
558  for(int iband=0;iband<imgBuffer.size();++iband){
559  if(imgBuffer[iband].size()!=imgReader.nrOfCol()){
560  std::cout << "Error in band " << iband << ": " << imgBuffer[iband].size() << "!=" << imgReader.nrOfCol() << std::endl;
561  assert(imgBuffer[iband].size()==imgReader.nrOfCol());
562  }
563  sample[iband+2]=imgBuffer[iband][static_cast<int>(iimg)];
564  }
565  float theThreshold=(threshold_opt.size()>1)?threshold_opt[processClass]:threshold_opt[0];
566  if(theThreshold>0){//percentual value
567  double p=static_cast<double>(rand())/(RAND_MAX);
568  p*=100.0;
569  if(p>theThreshold)
570  continue;//do not select for now, go to next column
571  }
572  else if(nvalid.size()>processClass){//absolute value
573  if(nvalid[processClass]>=-theThreshold)
574  continue;//do not select any more pixels for this class, go to next column to search for other classes
575  }
576  writeBuffer.push_back(sample);
577  writeBufferClass.push_back(theClass);
578  ++ntotalvalid;
579  if(nvalid.size()>processClass)
580  ++(nvalid[processClass]);
581  }
582  else{
583  ++ntotalinvalid;
584  if(ninvalid.size()>processClass)
585  ++(ninvalid[processClass]);
586  }
587  }//processClass
588  }//icol
589  progress=static_cast<float>(irow+1.0)/classReader.nrOfRow();
590  pfnProgress(progress,pszMessage,pProgressArg);
591  }//irow
592  progress=100;
593  pfnProgress(progress,pszMessage,pProgressArg);
594  if(writeBuffer.size()>0){
595  assert(ntotalvalid==writeBuffer.size());
596  if(verbose_opt[0]>0)
597  std::cout << "creating image sample writer " << output_opt[0] << " with " << writeBuffer.size() << " samples (" << ntotalinvalid << " invalid)" << std::endl;
598  ogrWriter.open(output_opt[0],ogrformat_opt[0]);
599  char **papszOptions=NULL;
600  ostringstream slayer;
601  slayer << "training data";
602  std::string layername=slayer.str();
603  ogrWriter.createLayer(layername, imgReader.getProjection(), wkbPoint, papszOptions);
604  std::string fieldname="fid";//number of the point
605  ogrWriter.createField(fieldname,OFTInteger);
606  map<std::string,double> pointAttributes;
607  ogrWriter.createField(label_opt[0],labelType);
608  for(int iband=0;iband<nband;++iband){
609  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
610  ogrWriter.createField(fieldname_opt[iband],fieldType);
611  }
612  std::cout << "writing sample to " << output_opt[0] << "..." << std::endl;
613  progress=0;
614  pfnProgress(progress,pszMessage,pProgressArg);
615  for(int isample=0;isample<writeBuffer.size();++isample){
616  if(verbose_opt[0]>1)
617  std::cout << "writing sample " << isample << std::endl;
618  pointAttributes[label_opt[0]]=writeBufferClass[isample];
619  for(int iband=0;iband<writeBuffer[0].size()-2;++iband){
620  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
621  // ostringstream fs;
622  // if(nband==1)
623  // fs << fieldname_opt[0];
624  // else
625  // fs << fieldname_opt[0] << theBand;
626  // pointAttributes[fs.str()]=writeBuffer[isample][iband+2];
627  pointAttributes[fieldname_opt[iband]]=writeBuffer[isample][iband+2];
628  }
629  if(verbose_opt[0]>1)
630  std::cout << "all bands written" << std::endl;
631  ogrWriter.addPoint(writeBuffer[isample][0],writeBuffer[isample][1],pointAttributes,fieldname,isample);
632  progress=static_cast<float>(isample+1.0)/writeBuffer.size();
633  pfnProgress(progress,pszMessage,pProgressArg);
634  }
635  ogrWriter.close();
636  }
637  else{
638  std::cout << "No data found for any class " << std::endl;
639  }
640  classReader.close();
641  nsample=writeBuffer.size();
642  if(verbose_opt[0])
643  std::cout << "total number of samples written: " << nsample << std::endl;
644  }
645  else{//class_opt.size()!=0
646  assert(class_opt[0]);
647  // if(class_opt[0]){
648  assert(threshold_opt.size()==1||threshold_opt.size()==class_opt.size());
649  ImgReaderGdal classReader;
650  ImgWriterOgr ogrWriter;
651  if(verbose_opt[0]>1){
652  std::cout << "reading position from sample dataset " << std::endl;
653  std::cout << "class thresholds: " << std::endl;
654  for(int iclass=0;iclass<class_opt.size();++iclass){
655  if(threshold_opt.size()>1)
656  std::cout << class_opt[iclass] << ": " << threshold_opt[iclass] << std::endl;
657  else
658  std::cout << class_opt[iclass] << ": " << threshold_opt[0] << std::endl;
659  }
660  }
661  classReader.open(sample_opt[0]);
662  vector<int> classBuffer(classReader.nrOfCol());
663  // vector<double> classBuffer(classReader.nrOfCol());
664  Vector2d<double> imgBuffer(nband);//[band][col]
665  vector<double> sample(2+nband);//x,y,band values
666  Vector2d<double> writeBuffer;
667  vector<int> writeBufferClass;
668  // vector<double> writeBufferClass;
669  vector<int> selectedClass;
670  Vector2d<double> selectedBuffer;
671  double oldimgrow=-1;
672  int irow=0;
673  int icol=0;
674  if(verbose_opt[0]>1)
675  std::cout << "extracting sample from image..." << std::endl;
676  progress=0;
677  pfnProgress(progress,pszMessage,pProgressArg);
678  for(irow=0;irow<classReader.nrOfRow();++irow){
679  if(irow%down_opt[0])
680  continue;
681  classReader.readData(classBuffer,GDT_Int32,irow);
682  // classReader.readData(classBuffer,GDT_Float64,irow);
683  double x,y;//geo coordinates
684  double iimg,jimg;//image coordinates in img image
685  for(icol=0;icol<classReader.nrOfCol();++icol){
686  if(icol%down_opt[0])
687  continue;
688  int theClass=0;
689  // double theClass=0;
690  int processClass=-1;
691  if(class_opt.empty()){//process every class
692  if(classBuffer[icol]){
693  processClass=0;
694  theClass=classBuffer[icol];
695  }
696  }
697  else{
698  for(int iclass=0;iclass<class_opt.size();++iclass){
699  if(classBuffer[icol]==class_opt[iclass]){
700  processClass=iclass;
701  theClass=class_opt[iclass];
702  }
703  }
704  }
705  if(processClass>=0){
706  // if(classBuffer[icol]==class_opt[0]){
707  if(geo_opt[0]){
708  classReader.image2geo(icol,irow,x,y);
709  sample[0]=x;
710  sample[1]=y;
711  if(verbose_opt[0]>1){
712  std::cout.precision(12);
713  std::cout << theClass << " " << x << " " << y << std::endl;
714  }
715  //find col in img
716  imgReader.geo2image(x,y,iimg,jimg);
717  //nearest neighbour
718  jimg=static_cast<int>(jimg);
719  iimg=static_cast<int>(iimg);
720  if(static_cast<int>(iimg)<0||static_cast<int>(iimg)>=imgReader.nrOfCol())
721  continue;
722  }
723  else{
724  iimg=icol;
725  jimg=irow;
726  sample[0]=iimg;
727  sample[1]=jimg;
728  }
729  if(static_cast<int>(jimg)<0||static_cast<int>(jimg)>=imgReader.nrOfRow())
730  continue;
731 
732  bool valid=true;
733 
734  if(static_cast<int>(jimg)!=static_cast<int>(oldimgrow)){
735  assert(imgBuffer.size()==nband);
736  for(int iband=0;iband<nband;++iband){
737  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
738  imgReader.readData(imgBuffer[iband],GDT_Float64,static_cast<int>(jimg),theBand);
739  assert(imgBuffer[iband].size()==imgReader.nrOfCol());
740 
741  if(srcnodata_opt.size()){
742  vector<int>::const_iterator bndit=bndnodata_opt.begin();
743  vector<double>::const_iterator srcit=srcnodata_opt.begin();
744  while(bndit!=bndnodata_opt.end()&&srcit!=srcnodata_opt.end()){
745  if((*bndit==theBand)&&(*srcit==imgBuffer[iband][static_cast<int>(iimg)])){
746  valid=false;
747  break;
748  }
749  else{
750  ++bndit;
751  ++srcit;
752  }
753  }
754  }
755  }
756  oldimgrow=jimg;
757  }
758  if(valid){
759  for(int iband=0;iband<imgBuffer.size();++iband){
760  if(imgBuffer[iband].size()!=imgReader.nrOfCol()){
761  std::cout << "Error in band " << iband << ": " << imgBuffer[iband].size() << "!=" << imgReader.nrOfCol() << std::endl;
762  assert(imgBuffer[iband].size()==imgReader.nrOfCol());
763  }
764  sample[iband+2]=imgBuffer[iband][static_cast<int>(iimg)];
765  }
766  float theThreshold=(threshold_opt.size()>1)?threshold_opt[processClass]:threshold_opt[0];
767  if(theThreshold>0){//percentual value
768  double p=static_cast<double>(rand())/(RAND_MAX);
769  p*=100.0;
770  if(p>theThreshold)
771  continue;//do not select for now, go to next column
772  }
773  else if(nvalid.size()>processClass){//absolute value
774  if(nvalid[processClass]>=-theThreshold)
775  continue;//do not select any more pixels for this class, go to next column to search for other classes
776  }
777  writeBuffer.push_back(sample);
778  // writeBufferClass.push_back(class_opt[processClass]);
779  writeBufferClass.push_back(theClass);
780  ++ntotalvalid;
781  if(nvalid.size()>processClass)
782  ++(nvalid[processClass]);
783  }
784  else{
785  ++ntotalinvalid;
786  if(ninvalid.size()>processClass)
787  ++(ninvalid[processClass]);
788  }
789  }//processClass
790  }//icol
791  progress=static_cast<float>(irow+1.0)/classReader.nrOfRow();
792  pfnProgress(progress,pszMessage,pProgressArg);
793  }//irow
794  if(writeBuffer.size()>0){
795  assert(ntotalvalid==writeBuffer.size());
796  if(verbose_opt[0]>0)
797  std::cout << "creating image sample writer " << output_opt[0] << " with " << writeBuffer.size() << " samples (" << ntotalinvalid << " invalid)" << std::endl;
798  ogrWriter.open(output_opt[0],ogrformat_opt[0]);
799  char **papszOptions=NULL;
800  ostringstream slayer;
801  slayer << "training data";
802  std::string layername=slayer.str();
803  ogrWriter.createLayer(layername, imgReader.getProjection(), wkbPoint, papszOptions);
804  std::string fieldname="fid";//number of the point
805  ogrWriter.createField(fieldname,OFTInteger);
806  map<std::string,double> pointAttributes;
807  // ogrWriter.createField(label_opt[0],OFTInteger);
808  ogrWriter.createField(label_opt[0],labelType);
809  for(int iband=0;iband<nband;++iband){
810  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
811  // ostringstream fs;
812  // if(nband==1)
813  // fs << fieldname_opt[0];
814  // else
815  // fs << fieldname_opt[0] << theBand;
816  // ogrWriter.createField(fs.str(),fieldType);
817  ogrWriter.createField(fieldname_opt[iband],fieldType);
818  }
819  pfnProgress(progress,pszMessage,pProgressArg);
820  std::cout << "writing sample to " << output_opt[0] << "..." << std::endl;
821  progress=0;
822  pfnProgress(progress,pszMessage,pProgressArg);
823  for(int isample=0;isample<writeBuffer.size();++isample){
824  pointAttributes[label_opt[0]]=writeBufferClass[isample];
825  for(int iband=0;iband<writeBuffer[0].size()-2;++iband){
826  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
827  // ostringstream fs;
828  // if(nband==1)
829  // fs << fieldname_opt[0];
830  // else
831  // fs << fieldname_opt[0] << theBand;
832  // pointAttributes[fs.str()]=writeBuffer[isample][iband+2];
833  pointAttributes[fieldname_opt[iband]]=writeBuffer[isample][iband+2];
834  }
835  ogrWriter.addPoint(writeBuffer[isample][0],writeBuffer[isample][1],pointAttributes,fieldname,isample);
836  progress=static_cast<float>(isample+1.0)/writeBuffer.size();
837  pfnProgress(progress,pszMessage,pProgressArg);
838  }
839  ogrWriter.close();
840  }
841  else{
842  std::cout << "No data found for any class " << std::endl;
843  }
844  classReader.close();
845  nsample=writeBuffer.size();
846  if(verbose_opt[0]){
847  std::cout << "total number of samples written: " << nsample << std::endl;
848  if(nvalid.size()==class_opt.size()){
849  for(int iclass=0;iclass<class_opt.size();++iclass)
850  std::cout << "class " << class_opt[iclass] << " has " << nvalid[iclass] << " samples" << std::endl;
851  }
852  }
853  }
854  }
855  else{//vector dataset
856  if(verbose_opt[0]>1)
857  std::cout << "creating image sample writer " << output_opt[0] << std::endl;
858  ImgWriterOgr ogrWriter;
859  ImgWriterOgr ogrTestWriter;
860  try{
861  ogrWriter.open(output_opt[0],ogrformat_opt[0]);
862  if(test_opt.size()){
863  if(verbose_opt[0]>1)
864  std::cout << "creating image test writer " << test_opt[0] << std::endl;
865  ogrTestWriter.open(test_opt[0],ogrformat_opt[0]);
866  }
867 
868  //if class_opt not set, get number of classes from input image for these rules
869  switch(ruleMap[rule_opt[0]]){
870  case(rule::proportion):
871  case(rule::count):
872  case(rule::custom):
873  case(rule::mode):{
874  if(class_opt.empty()){
875  int theBand=0;
876  double minValue=0;
877  double maxValue=0;
878  if(band_opt.size())
879  theBand=band_opt[0];
880  imgReader.getMinMax(minValue,maxValue,theBand);
881  int nclass=maxValue-minValue+1;
882  if(nclass<0&&nclass<256){
883  string errorString="Could not automatically define classes, please set class option";
884  throw(errorString);
885  }
886  for(int iclass=minValue;iclass<=maxValue;++iclass)
887  class_opt.push_back(iclass);
888  }
889  break;
890  }
891  }
892  }
893  catch(string errorString){
894  cerr << errorString << endl;
895  exit(1);
896  }
897 
898  //support multiple layers
899  int nlayerRead=sampleReaderOgr.getDataSource()->GetLayerCount();
900  int ilayerWrite=0;
901  unsigned long int ntotalvalid=0;
902 
903  if(verbose_opt[0])
904  std::cout << "number of layers: " << nlayerRead << endl;
905 
906  for(int ilayer=0;ilayer<nlayerRead;++ilayer){
907  OGRLayer *readLayer=sampleReaderOgr.getLayer(ilayer);
908  string currentLayername=readLayer->GetName();
909  int layerIndex=ilayer;
910  if(layer_opt.size()){
911  vector<string>::const_iterator it=find(layer_opt.begin(),layer_opt.end(),currentLayername);
912  if(it==layer_opt.end())
913  continue;
914  else
915  layerIndex=it-layer_opt.begin();
916  }
917  float theThreshold=(threshold_opt.size()==layer_opt.size())? threshold_opt[layerIndex]: threshold_opt[0];
918  cout << "processing layer " << currentLayername << endl;
919 
920  readLayer->ResetReading();
921  OGRLayer *writeLayer;
922  OGRLayer *writeTestLayer;
923 
924  if(polygon_opt[0]){
925  if(verbose_opt[0])
926  std::cout << "create polygons" << std::endl;
927  char **papszOptions=NULL;
928  writeLayer=ogrWriter.createLayer(readLayer->GetName(), imgReader.getProjection(), wkbPolygon, papszOptions);
929  if(test_opt.size())
930  writeTestLayer=ogrTestWriter.createLayer(readLayer->GetName(), imgReader.getProjection(), wkbPolygon, papszOptions);
931  }
932  else{
933  if(verbose_opt[0])
934  std::cout << "create points in layer " << readLayer->GetName() << std::endl;
935  char **papszOptions=NULL;
936 
937  writeLayer=ogrWriter.createLayer(readLayer->GetName(), imgReader.getProjection(), wkbPoint, papszOptions);
938  if(test_opt.size()){
939  char **papszOptions=NULL;
940  writeTestLayer=ogrTestWriter.createLayer(readLayer->GetName(), imgReader.getProjection(), wkbPoint, papszOptions);
941  }
942  }
943  if(verbose_opt[0])
944  std::cout << "copy fields from layer " << ilayer << std::flush << std::endl;
945  ogrWriter.copyFields(sampleReaderOgr,ilayer,ilayerWrite);
946 
947  if(test_opt.size()){
948  if(verbose_opt[0])
949  std::cout << "copy fields test writer" << std::flush << std::endl;
950  ogrTestWriter.copyFields(sampleReaderOgr,ilayer,ilayerWrite);
951  }
952  // vector<std::string> fieldnames;
953  // if(verbose_opt[0])
954  // std::cout << "get fields" << std::flush << std::endl;
955  // sampleReaderOgr.getFields(fieldnames);
956  // assert(fieldnames.size()==ogrWriter.getFieldCount(ilayerWrite));
957  // map<std::string,double> pointAttributes;
958 
959  if(class_opt.size()){
960  switch(ruleMap[rule_opt[0]]){
961  case(rule::proportion)://proportion for each class
962  case(rule::count):{//count for each class
963  for(int iclass=0;iclass<class_opt.size();++iclass){
964  ostringstream cs;
965  cs << class_opt[iclass];
966  ogrWriter.createField(cs.str(),fieldType,ilayerWrite);
967  }
968  break;
969  }
970  case(rule::custom):
971  case(rule::mode):
972  ogrWriter.createField(label_opt[0],fieldType,ilayerWrite);
973  if(test_opt.size())
974  ogrTestWriter.createField(label_opt[0],fieldType,ilayerWrite);
975  break;
976  }
977  }
978  else{
979  for(int iband=0;iband<nband;++iband){
980  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
981  ostringstream fs;
982  fs << fieldname_opt[iband];
983  if(verbose_opt[0]>1)
984  std::cout << "creating field " << fs.str() << std::endl;
985 
986  ogrWriter.createField(fs.str(),fieldType,ilayerWrite);
987  if(test_opt.size())
988  ogrTestWriter.createField(fs.str(),fieldType,ilayerWrite);
989  }
990  }
991  OGRFeature *readFeature;
992  unsigned long int ifeature=0;
993  unsigned long int nfeatureLayer=sampleReaderOgr.getFeatureCount(ilayer);
994  unsigned long int ntotalvalidLayer=0;
995  progress=0;
996  pfnProgress(progress,pszMessage,pProgressArg);
997  while( (readFeature = readLayer->GetNextFeature()) != NULL ){
998  bool validFeature=false;
999  bool writeTest=false;//write this feature to test_opt[0] instead of output_opt
1000  if(verbose_opt[0]>0)
1001  std::cout << "reading feature " << readFeature->GetFID() << std::endl;
1002  if(theThreshold>0){//percentual value
1003  // if(!test_opt.size()&&ntotalvalid>threshold_opt[0]/100.0*nfeature)
1004  // break;
1005  double p=static_cast<double>(rand())/(RAND_MAX);
1006  p*=100.0;
1007  if(p>theThreshold){
1008  if(test_opt.size())
1009  writeTest=true;
1010  else
1011  continue;//do not select for now, go to next feature
1012  }
1013  }
1014  else{//absolute value
1015  if(threshold_opt.size()==layer_opt.size()){
1016  if(ntotalvalidLayer>=-theThreshold){
1017  if(test_opt.size())
1018  writeTest=true;
1019  else
1020  continue;//do not select any more pixels, go to next column feature
1021  }
1022  }
1023  else{
1024  if(ntotalvalid>=-theThreshold){
1025  if(test_opt.size())
1026  writeTest=true;
1027  else
1028  continue;//do not select any more pixels, go to next column feature
1029  }
1030  }
1031  }
1032  if(verbose_opt[0]>0)
1033  std::cout << "processing feature " << readFeature->GetFID() << std::endl;
1034  //get x and y from readFeature
1035  double x,y;
1036  OGRGeometry *poGeometry;
1037  poGeometry = readFeature->GetGeometryRef();
1038  assert(poGeometry!=NULL);
1039  try{
1040  if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint ){
1041 
1042  if(!buffer_opt.size()){
1043  switch(ruleMap[rule_opt[0]]){
1044  case(rule::point):
1045  case(rule::centroid):
1046  buffer_opt.push_back(1);//default
1047  break;
1048  default:
1049  buffer_opt.push_back(3);//default
1050  }
1051  }
1052 
1053  if(verbose_opt[0]>1)
1054  std::cout << "boundary: " << buffer_opt[0] << std::endl;
1055 
1056  OGRPolygon writePolygon;
1057  OGRLinearRing writeRing;
1058  OGRPoint writeCentroidPoint;
1059  OGRFeature *writePolygonFeature;
1060  OGRFeature *writeCentroidFeature;
1061 
1062  OGRPoint *poPoint = (OGRPoint *) poGeometry;
1063  writeCentroidPoint=*poPoint;
1064 
1065  x=poPoint->getX();
1066  y=poPoint->getY();
1067 
1068  double i_centre,j_centre;
1069  if(geo_opt[0])
1070  imgReader.geo2image(x,y,i_centre,j_centre);
1071  else{
1072  i_centre=x;
1073  j_centre=y;
1074  }
1075  //nearest neighbour
1076  j_centre=static_cast<int>(j_centre);
1077  i_centre=static_cast<int>(i_centre);
1078 
1079  double uli=i_centre-buffer_opt[0]/2;
1080  double ulj=j_centre-buffer_opt[0]/2;
1081  double lri=i_centre+buffer_opt[0]/2;
1082  double lrj=j_centre+buffer_opt[0]/2;
1083 
1084  //nearest neighbour
1085  ulj=static_cast<int>(ulj);
1086  uli=static_cast<int>(uli);
1087  lrj=static_cast<int>(lrj);
1088  lri=static_cast<int>(lri);
1089 
1090  // if((polygon_opt[0]&&ruleMap[rule_opt[0]]==rule::point)||(ruleMap[rule_opt[0]]==rule::centroid)){
1091  // uli=i_centre;
1092  // ulj=j_centre;
1093  // lri=i_centre;
1094  // lrj=j_centre;
1095  // }
1096 
1097  //check if j is out of bounds
1098  if(static_cast<int>(ulj)<0||static_cast<int>(ulj)>=imgReader.nrOfRow())
1099  continue;
1100  //check if j is out of bounds
1101  if(static_cast<int>(uli)<0||static_cast<int>(lri)>=imgReader.nrOfCol())
1102  continue;
1103 
1104  OGRPoint ulPoint,urPoint,llPoint,lrPoint;
1105  double ulx,uly;
1106  double urx,ury;
1107 
1108  if(polygon_opt[0]){
1109  if(disc_opt[0]){
1110  double gt[6];// { 444720, 30, 0, 3751320, 0, -30 };
1111  double radius=buffer_opt[0]/2.0*sqrt(imgReader.getDeltaX()*imgReader.getDeltaY());
1112  unsigned short nstep = 25;
1113  for(int i=0;i<nstep;++i){
1114  OGRPoint aPoint;
1115  aPoint.setX(x+imgReader.getDeltaX()/2.0+radius*cos(2*PI*i/nstep));
1116  aPoint.setY(y-imgReader.getDeltaY()/2.0+radius*sin(2*PI*i/nstep));
1117  writeRing.addPoint(&aPoint);
1118  }
1119  writePolygon.addRing(&writeRing);
1120  writePolygon.closeRings();
1121  }
1122  else{
1123  double llx,lly;
1124  double lrx,lry;
1125  imgReader.image2geo(uli,ulj,ulx,uly);
1126  imgReader.image2geo(lri,lrj,lrx,lry);
1127  ulPoint.setX(ulx-imgReader.getDeltaX()/2.0);
1128  ulPoint.setY(uly+imgReader.getDeltaY()/2.0);
1129  lrPoint.setX(lrx+imgReader.getDeltaX()/2.0);
1130  lrPoint.setY(lry-imgReader.getDeltaY()/2.0);
1131  urPoint.setX(lrx+imgReader.getDeltaX()/2.0);
1132  urPoint.setY(uly+imgReader.getDeltaY()/2.0);
1133  llPoint.setX(ulx-imgReader.getDeltaX()/2.0);
1134  llPoint.setY(lry-imgReader.getDeltaY()/2.0);
1135 
1136  writeRing.addPoint(&ulPoint);
1137  writeRing.addPoint(&urPoint);
1138  writeRing.addPoint(&lrPoint);
1139  writeRing.addPoint(&llPoint);
1140  writePolygon.addRing(&writeRing);
1141  writePolygon.closeRings();
1142  }
1143  }
1144 
1145  if((polygon_opt[0]&&ruleMap[rule_opt[0]]==rule::point)||(ruleMap[rule_opt[0]]==rule::centroid)){
1146  uli=i_centre;
1147  ulj=j_centre;
1148  lri=i_centre;
1149  lrj=j_centre;
1150  }
1151 
1152  int nPointWindow=0;//similar to nPointPolygon for polygons
1153  if(polygon_opt[0]){
1154  if(writeTest)
1155  writePolygonFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
1156  else
1157  writePolygonFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
1158  }
1159  else if(ruleMap[rule_opt[0]]!=rule::point){
1160  if(writeTest)
1161  writeCentroidFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
1162  else
1163  writeCentroidFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
1164  }
1165  Vector2d<double> windowValues;
1166  vector<double> windowClassValues;
1167 
1168  if(class_opt.size()){
1169  windowClassValues.resize(class_opt.size());
1170  //initialize
1171  for(int iclass=0;iclass<class_opt.size();++iclass)
1172  windowClassValues[iclass]=0;
1173  }
1174  else
1175  windowValues.resize(nband);
1176  vector< Vector2d<double> > readValues(nband);
1177  for(int iband=0;iband<nband;++iband){
1178  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
1179  imgReader.readDataBlock(readValues[iband],GDT_Float64,uli,lri,ulj,lrj,theBand);
1180  }
1181 
1182  OGRPoint thePoint;
1183  for(int j=ulj;j<=lrj;++j){
1184  for(int i=uli;i<=lri;++i){
1185  //check if within raster image
1186  if(i<0||i>=imgReader.nrOfCol())
1187  continue;
1188  if(j<0||j>=imgReader.nrOfRow())
1189  continue;
1190  //no need to check if point is on surface
1191  double theX=0;
1192  double theY=0;
1193  imgReader.image2geo(i,j,theX,theY);
1194  thePoint.setX(theX);
1195  thePoint.setY(theY);
1196 
1197  if(disc_opt[0]&&buffer_opt[0]>1){
1198  double radius=buffer_opt[0]/2.0*sqrt(imgReader.getDeltaX()*imgReader.getDeltaY());
1199  if((theX-x)*(theX-x)+(theY-y)*(theY-y)>radius*radius)
1200  continue;
1201  }
1202  bool valid=true;
1203 
1204  if(srcnodata_opt.size()){
1205  for(int vband=0;vband<bndnodata_opt.size();++vband){
1206  double value=((readValues[bndnodata_opt[vband]])[j-ulj])[i-uli];
1207  if(value==srcnodata_opt[vband]){
1208  valid=false;
1209  break;
1210  }
1211  }
1212  }
1213 
1214  if(!valid)
1215  continue;
1216  else
1217  validFeature=true;
1218 
1219  // writeRing.addPoint(&thePoint);//already done
1220 
1221  ++nPointWindow;
1222  OGRFeature *writePointFeature;
1223  if(!polygon_opt[0]){
1224  //create feature
1225  if(ruleMap[rule_opt[0]]==rule::point){//do not create in case of mean, stdev, median, sum or centroid (only create point at centroid)
1226  if(writeTest)
1227  writePointFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
1228  else
1229  writePointFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
1230  if(verbose_opt[0]>1)
1231  std::cout << "copying fields from polygons " << std::endl;
1232  //Geometry of readFeature and writePointFeature are both wkbPoint
1233  //attributes AND geometry are copied with SetFrom
1234  //test
1235  // writePointFeature->SetGeometry(&thePoint);
1236  if(writePointFeature->SetFrom(readFeature)!= OGRERR_NONE)
1237  cerr << "writing feature failed" << std::endl;
1238 
1239  assert(wkbFlatten(writePointFeature->GetGeometryRef()->getGeometryType()) == wkbPoint);
1240  // OGRGeometry *updateGeometry;
1241  // updateGeometry = writePointFeature->GetGeometryRef();
1242  // OGRPoint *poPoint = (OGRPoint *) updateGeometry;
1243  if(verbose_opt[0]>1)
1244  std::cout << "write feature has " << writePointFeature->GetFieldCount() << " fields" << std::endl;
1245  }
1246  }
1247  if(class_opt.size()){
1248  short value=((readValues[0])[j-ulj])[i-uli];
1249  for(int iclass=0;iclass<class_opt.size();++iclass){
1250  if(value==class_opt[iclass])
1251  windowClassValues[iclass]+=1;
1252  }
1253  }
1254  else{
1255  for(int iband=0;iband<nband;++iband){
1256  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
1257  assert(j-ulj>=0);
1258  assert(j-ulj<readValues[iband].size());
1259  assert(i-uli>=0);
1260  assert(i-uli<((readValues[iband])[j-ulj]).size());
1261  double value=((readValues[iband])[j-ulj])[i-uli];
1262  // imgReader.readData(value,GDT_Float64,i,j,theBand);
1263  if(verbose_opt[0]>1)
1264  std::cout << ": " << value << std::endl;
1265  if(polygon_opt[0]||ruleMap[rule_opt[0]]!=rule::point){
1266  windowValues[iband].push_back(value);
1267  }
1268  else{
1269  try{
1270  if(verbose_opt[0]>1)
1271  std::cout << "set field " << fieldname_opt[iband] << " to " << value << std::endl;
1272  switch( fieldType ){
1273  case OFTInteger:
1274  case OFTReal:
1275  writePointFeature->SetField(fieldname_opt[iband].c_str(),value);
1276  break;
1277  case OFTString:
1278  writePointFeature->SetField(fieldname_opt[iband].c_str(),type2string<double>(value).c_str());
1279  break;
1280  default://not supported
1281  std::string errorString="field type not supported";
1282  throw(errorString);
1283  break;
1284  }
1285  }
1286  catch(std::string e){
1287  std::cout << e << std::endl;
1288  exit(1);
1289  }
1290  }//else
1291  }//iband
1292  }//else (class_opt.size())
1293  if(!polygon_opt[0]){
1294  if(ruleMap[rule_opt[0]]==rule::point){//do not create in case of mean or median value (only at centroid)
1295  //write feature
1296  if(verbose_opt[0]>1)
1297  std::cout << "creating point feature" << std::endl;
1298  if(writeTest){
1299  if(writeTestLayer->CreateFeature( writePointFeature ) != OGRERR_NONE ){
1300  std::string errorString="Failed to create feature in test ogr vector dataset";
1301  throw(errorString);
1302  }
1303  }
1304  else{
1305  if(writeLayer->CreateFeature( writePointFeature ) != OGRERR_NONE ){
1306  std::string errorString="Failed to create feature in ogr vector dataset";
1307  throw(errorString);
1308  }
1309  }
1310  //destroy feature
1311  OGRFeature::DestroyFeature( writePointFeature );
1312  ++ntotalvalid;
1313  ++ntotalvalidLayer;
1314  }
1315  }
1316  }
1317  }
1318  if(polygon_opt[0]||ruleMap[rule_opt[0]]!=rule::point){
1319  //do not create if no points found within polygon
1320  if(!nPointWindow){
1321  if(verbose_opt[0])
1322  cout << "no points found in window, continuing" << endl;
1323  continue;
1324  }
1325  //add ring to polygon
1326  if(polygon_opt[0]){
1327  // writePolygon.addRing(&writeRing);//already done
1328  // writePolygon.closeRings();//already done
1329  //write geometry of writePolygon
1330  //test
1331  // writePolygonFeature->SetGeometry(&writePolygon);
1332  if(writePolygonFeature->SetFrom(readFeature)!= OGRERR_NONE)
1333  cerr << "writing feature failed" << std::endl;
1334  //test
1335  writePolygonFeature->SetGeometry(&writePolygon);
1336  assert(wkbFlatten(writePolygonFeature->GetGeometryRef()->getGeometryType()) == wkbPolygon);
1337 
1338  if(verbose_opt[0]>1)
1339  std::cout << "copying new fields write polygon " << std::endl;
1340  if(verbose_opt[0]>1)
1341  std::cout << "write feature has " << writePolygonFeature->GetFieldCount() << " fields" << std::endl;
1342  //write polygon feature
1343  }
1344  else{//write value of polygon to centroid point
1345  //create feature
1346  if(verbose_opt[0]>1)
1347  std::cout << "copying fields from polygons " << std::endl;
1348  //test
1349  //Geometry of readFeature and writeCentroidFeature are both wkbPoint
1350  //attributes AND geometry are copied with SetFrom
1351  // writeCentroidFeature->SetGeometry(&writeCentroidPoint);
1352  if(writeCentroidFeature->SetFrom(readFeature)!= OGRERR_NONE)
1353  cerr << "writing feature failed" << std::endl;
1354  assert(wkbFlatten(writeCentroidFeature->GetGeometryRef()->getGeometryType()) == wkbPoint);
1355  //test
1356  // OGRGeometry *updateGeometry;
1357  // updateGeometry = writeCentroidFeature->GetGeometryRef();
1358  // assert(wkbFlatten(updateGeometry->getGeometryType()) == wkbPoint );
1359  if(verbose_opt[0]>1)
1360  std::cout << "write feature has " << writeCentroidFeature->GetFieldCount() << " fields" << std::endl;
1361  }
1362  if(class_opt.empty()){
1363  if(ruleMap[rule_opt[0]]==rule::point){//value at centroid of polygon
1364  if(verbose_opt[0])
1365  std::cout << "number of points in window: " << nPointWindow << std::endl;
1366  for(int index=0;index<windowValues.size();++index){
1367  //test
1368  if(windowValues[index].size()!=1){
1369  cerr << "Error: windowValues[index].size()=" << windowValues[index].size() << endl;
1370  assert(windowValues[index].size()==1);
1371  }
1372  double theValue=windowValues[index].back();
1373 
1374  if(verbose_opt[0])
1375  std::cout << "number of points in window: " << nPointWindow << std::endl;
1376  int theBand=(band_opt.size()) ? band_opt[index] : index;
1377 
1378  try{
1379  if(verbose_opt[0]>1)
1380  std::cout << "set field " << fieldname_opt[index] << " to " << theValue << std::endl;
1381  switch( fieldType ){
1382  case OFTInteger:
1383  case OFTReal:
1384  if(polygon_opt[0])
1385  writePolygonFeature->SetField(fieldname_opt[index].c_str(),theValue);
1386  else
1387  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),theValue);
1388  break;
1389  case OFTString:
1390  if(polygon_opt[0])
1391  writePolygonFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1392  else
1393  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1394  break;
1395  default://not supported
1396  std::string errorString="field type not supported";
1397  throw(errorString);
1398  break;
1399  }
1400  }
1401  catch(std::string e){
1402  std::cout << e << std::endl;
1403  exit(1);
1404  }
1405  }
1406  }
1407  else{//ruleMap[rule_opt[0]] is not rule::point
1408  double theValue=0;
1409  for(int index=0;index<windowValues.size();++index){
1410  try{
1411  if(ruleMap[rule_opt[0]]==rule::mean)
1412  theValue=stat.mean(windowValues[index]);
1413  else if(ruleMap[rule_opt[0]]==rule::stdev)
1414  theValue=sqrt(stat.var(windowValues[index]));
1415  else if(ruleMap[rule_opt[0]]==rule::median)
1416  theValue=stat.median(windowValues[index]);
1417  else if(ruleMap[rule_opt[0]]==rule::percentile)
1418  theValue=stat.percentile(windowValues[index],windowValues[index].begin(),windowValues[index].end(),percentile_opt[0]);
1419  else if(ruleMap[rule_opt[0]]==rule::sum)
1420  theValue=stat.sum(windowValues[index]);
1421  else if(ruleMap[rule_opt[0]]==rule::max)
1422  theValue=stat.mymax(windowValues[index]);
1423  else if(ruleMap[rule_opt[0]]==rule::min)
1424  theValue=stat.mymin(windowValues[index]);
1425  else if(ruleMap[rule_opt[0]]==rule::centroid){
1426  if(verbose_opt[0])
1427  std::cout << "number of points in polygon: " << nPointWindow << std::endl;
1428  assert(nPointWindow<=1);
1429  assert(nPointWindow==windowValues[index].size());
1430  theValue=windowValues[index].back();
1431  }
1432  else{
1433  std::string errorString="rule not supported";
1434  throw(errorString);
1435  }
1436  if(verbose_opt[0]>1)
1437  std::cout << "set field " << fieldname_opt[index] << " to " << theValue << std::endl;
1438  switch( fieldType ){
1439  case OFTInteger:
1440  case OFTReal:
1441  if(polygon_opt[0])
1442  writePolygonFeature->SetField(fieldname_opt[index].c_str(),theValue);
1443  else
1444  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),theValue);
1445  break;
1446  case OFTString:
1447  if(polygon_opt[0])
1448  writePolygonFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1449  else
1450  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1451  break;
1452  default://not supported
1453  std::string errorString="field type not supported";
1454  throw(errorString);
1455  break;
1456  }
1457  }
1458  catch(std::string e){
1459  std::cout << e << std::endl;
1460  exit(1);
1461  }
1462  }
1463  }
1464  }
1465  else{//class_opt is set
1466  if(ruleMap[rule_opt[0]]==rule::proportion||ruleMap[rule_opt[0]]==rule::count){
1467  if(verbose_opt[0])
1468  std::cout << "number of points in polygon: " << nPointWindow << std::endl;
1469  if(ruleMap[rule_opt[0]]==rule::proportion)
1470  stat.normalize_pct(windowClassValues);
1471  for(int index=0;index<windowClassValues.size();++index){
1472  double theValue=windowClassValues[index];
1473  ostringstream fs;
1474  fs << class_opt[index];
1475  if(polygon_opt[0])
1476  writePolygonFeature->SetField(fs.str().c_str(),static_cast<int>(theValue));
1477  else
1478  writeCentroidFeature->SetField(fs.str().c_str(),static_cast<int>(theValue));
1479  }
1480  }
1481  else if(ruleMap[rule_opt[0]]==rule::custom){
1482  assert(polygon_opt[0]);//not implemented for points
1483  if(verbose_opt[0])
1484  std::cout << "number of points in polygon: " << nPointWindow << std::endl;
1485  stat.normalize_pct(windowClassValues);
1486  assert(windowClassValues.size()==2);//11:broadleaved, 12:coniferous
1487  if(windowClassValues[0]>=75)//broadleaved
1488  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(11));
1489  else if(windowClassValues[1]>=75)//coniferous
1490  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(12));
1491  else if(windowClassValues[0]>25&&windowClassValues[1]>25)//mixed
1492  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(13));
1493  else{
1494  if(verbose_opt[0]){
1495  std::cout << "No valid value in windowClassValues..." << std::endl;
1496  for(int index=0;index<windowClassValues.size();++index){
1497  double theValue=windowClassValues[index];
1498  std::cout << theValue << " ";
1499  }
1500  std::cout << std::endl;
1501  }
1502  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(20));
1503  }
1504  }
1505  else if(ruleMap[rule_opt[0]]==rule::mode){
1506  //maximum votes in polygon
1507  if(verbose_opt[0])
1508  std::cout << "number of points in window: " << nPointWindow << std::endl;
1509  //search for class with maximum votes
1510  int maxClass=stat.mymin(class_opt);
1511  vector<double>::iterator maxit;
1512  maxit=stat.mymax(windowClassValues,windowClassValues.begin(),windowClassValues.end());
1513  int maxIndex=distance(windowClassValues.begin(),maxit);
1514  maxClass=class_opt[maxIndex];
1515  if(verbose_opt[0]>0)
1516  std::cout << "maxClass: " << maxClass << std::endl;
1517  if(polygon_opt[0])
1518  writePolygonFeature->SetField(label_opt[0].c_str(),maxClass);
1519  else
1520  writeCentroidFeature->SetField(label_opt[0].c_str(),maxClass);
1521  }
1522  }
1523  if(polygon_opt[0]){
1524  if(verbose_opt[0]>1)
1525  std::cout << "creating polygon feature" << std::endl;
1526  if(writeTest){
1527  if(writeTestLayer->CreateFeature( writePolygonFeature ) != OGRERR_NONE ){
1528  std::string errorString="Failed to create polygon feature in ogr vector dataset";
1529  throw(errorString);
1530  }
1531  }
1532  else{
1533  if(writeLayer->CreateFeature( writePolygonFeature ) != OGRERR_NONE ){
1534  std::string errorString="Failed to create polygon feature in ogr vector dataset";
1535  throw(errorString);
1536  }
1537  }
1538  OGRFeature::DestroyFeature( writePolygonFeature );
1539  ++ntotalvalid;
1540  ++ntotalvalidLayer;
1541  }
1542  else{
1543  if(verbose_opt[0]>1)
1544  std::cout << "creating point feature in centroid" << std::endl;
1545  if(writeTest){
1546  if(writeTestLayer->CreateFeature( writeCentroidFeature ) != OGRERR_NONE ){
1547  std::string errorString="Failed to create point feature in ogr vector dataset";
1548  throw(errorString);
1549  }
1550  }
1551  else{
1552  //test
1553  assert(validFeature);
1554  if(writeLayer->CreateFeature( writeCentroidFeature ) != OGRERR_NONE ){
1555  std::string errorString="Failed to create point feature in ogr vector dataset";
1556  throw(errorString);
1557  }
1558  }
1559  OGRFeature::DestroyFeature( writeCentroidFeature );
1560  ++ntotalvalid;
1561  ++ntotalvalidLayer;
1562  }
1563  }
1564  }//if wkbPoint
1565  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon){
1566 
1567  OGRPolygon readPolygon = *((OGRPolygon *) poGeometry);
1568  OGRPolygon writePolygon;
1569  OGRLinearRing writeRing;
1570  OGRPoint writeCentroidPoint;
1571  OGRFeature *writePolygonFeature;
1572  OGRFeature *writeCentroidFeature;
1573 
1574  readPolygon.closeRings();
1575 
1576  if(verbose_opt[0]>1)
1577  std::cout << "get point on polygon" << std::endl;
1578  if(ruleMap[rule_opt[0]]==rule::centroid)
1579  readPolygon.Centroid(&writeCentroidPoint);
1580  else if(readPolygon.PointOnSurface(&writeCentroidPoint)!=OGRERR_NONE){
1581  // cerr << "function PointOnSurface failed, trying centroid instead" << endl;
1582  readPolygon.Centroid(&writeCentroidPoint);
1583  }
1584  double ulx,uly,lrx,lry;
1585  double uli,ulj,lri,lrj;
1586  if((polygon_opt[0]&&ruleMap[rule_opt[0]]==rule::point)||(ruleMap[rule_opt[0]]==rule::centroid)){
1587  ulx=writeCentroidPoint.getX();
1588  uly=writeCentroidPoint.getY();
1589  lrx=ulx;
1590  lry=uly;
1591  }
1592  else{
1593  //get envelope
1594  if(verbose_opt[0])
1595  std::cout << "reading envelope for polygon " << ifeature << std::endl;
1596  OGREnvelope* psEnvelope=new OGREnvelope();
1597  readPolygon.getEnvelope(psEnvelope);
1598  ulx=psEnvelope->MinX;
1599  uly=psEnvelope->MaxY;
1600  lrx=psEnvelope->MaxX;
1601  lry=psEnvelope->MinY;
1602  delete psEnvelope;
1603  }
1604  if(geo_opt[0]){
1605  imgReader.geo2image(ulx,uly,uli,ulj);
1606  imgReader.geo2image(lrx,lry,lri,lrj);
1607  }
1608  else{
1609  uli=ulx;
1610  ulj=uly;
1611  lri=lrx;
1612  lrj=lry;
1613  }
1614  //nearest neighbour
1615  ulj=static_cast<int>(ulj);
1616  uli=static_cast<int>(uli);
1617  lrj=static_cast<int>(lrj);
1618  lri=static_cast<int>(lri);
1619  //iterate through all pixels
1620  if(verbose_opt[0]>1)
1621  std::cout << "bounding box for polygon feature " << ifeature << ": " << uli << " " << ulj << " " << lri << " " << lrj << std::endl;
1622 
1623  if(uli<0)
1624  uli=0;
1625  if(lri<0)
1626  lri=0;
1627  if(uli>=imgReader.nrOfCol())
1628  uli=imgReader.nrOfCol()-1;
1629  if(lri>=imgReader.nrOfCol())
1630  lri=imgReader.nrOfCol()-1;
1631  if(ulj<0)
1632  ulj=0;
1633  if(lrj<0)
1634  lrj=0;
1635  if(ulj>=imgReader.nrOfRow())
1636  ulj=imgReader.nrOfRow()-1;
1637  if(lrj>=imgReader.nrOfRow())
1638  lrj=imgReader.nrOfRow()-1;
1639  // if(uli<0||lri>=imgReader.nrOfCol()||ulj<0||lrj>=imgReader.nrOfRow())
1640  // continue;
1641 
1642  int nPointPolygon=0;
1643 
1644  if(polygon_opt[0]){
1645  if(writeTest)
1646  writePolygonFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
1647  else
1648  writePolygonFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
1649  }
1650  else if(ruleMap[rule_opt[0]]!=rule::point){
1651  if(writeTest)
1652  writeCentroidFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
1653  else
1654  writeCentroidFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
1655  }
1656  // vector<double> polyValues;
1657  Vector2d<double> polyValues;
1658  vector<double> polyClassValues;
1659 
1660  if(class_opt.size()){
1661 
1662  polyClassValues.resize(class_opt.size());
1663  //initialize
1664  for(int iclass=0;iclass<class_opt.size();++iclass)
1665  polyClassValues[iclass]=0;
1666  }
1667  else
1668  polyValues.resize(nband);
1669  vector< Vector2d<double> > readValues(nband);
1670  for(int iband=0;iband<nband;++iband){
1671  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
1672  imgReader.readDataBlock(readValues[iband],GDT_Float64,uli,lri,ulj,lrj,theBand);
1673  }
1674 
1675  OGRPoint thePoint;
1676  for(int j=ulj;j<=lrj;++j){
1677  for(int i=uli;i<=lri;++i){
1678  //check if within raster image
1679  if(i<0||i>=imgReader.nrOfCol())
1680  continue;
1681  if(j<0||j>=imgReader.nrOfRow())
1682  continue;
1683  //check if point is on surface
1684  double theX=0;
1685  double theY=0;
1686  imgReader.image2geo(i,j,theX,theY);
1687  thePoint.setX(theX);
1688  thePoint.setY(theY);
1689  if(ruleMap[rule_opt[0]]!=rule::centroid&&!readPolygon.Contains(&thePoint))
1690  continue;
1691 
1692  bool valid=true;
1693 
1694  if(srcnodata_opt.size()){
1695  for(int vband=0;vband<bndnodata_opt.size();++vband){
1696  double value=((readValues[bndnodata_opt[vband]])[j-ulj])[i-uli];
1697  if(value==srcnodata_opt[vband]){
1698  valid=false;
1699  break;
1700  }
1701  }
1702  }
1703 
1704  if(!valid)
1705  continue;
1706  else
1707  validFeature=true;
1708 
1709  writeRing.addPoint(&thePoint);//todo: check if I need to add all interior points to ring or do I need to check if point is on ring first?
1710  // if(writeRing.isPointOnRingBoundary(&thePoint))
1711  // writeRing.addPoint(&thePoint);
1712  if(verbose_opt[0]>1)
1713  std::cout << "point is on surface:" << thePoint.getX() << "," << thePoint.getY() << std::endl;
1714  ++nPointPolygon;
1715 
1716  if(polythreshold_opt.size())
1717  if(nPointPolygon>polythreshold_opt[0])
1718  continue;
1719  // throw(nPointPolygon);
1720  OGRFeature *writePointFeature;
1721  if(!polygon_opt[0]){
1722  //create feature
1723  if(ruleMap[rule_opt[0]]==rule::point){//do not create in case of mean, stdev, median, sum or centroid (only create point at centroid)
1724  if(writeTest)
1725  writePointFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
1726  else
1727  writePointFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
1728  if(verbose_opt[0]>1)
1729  std::cout << "copying fields from polygons " << std::endl;
1730  if(writePointFeature->SetFrom(readFeature)!= OGRERR_NONE)
1731  cerr << "writing feature failed" << std::endl;
1732  if(verbose_opt[0]>1)
1733  std::cout << "set geometry as point " << std::endl;
1734  //test
1735  writePointFeature->SetGeometry(&thePoint);
1736  assert(wkbFlatten(writePointFeature->GetGeometryRef()->getGeometryType()) == wkbPoint);
1737  // OGRGeometry *updateGeometry;
1738  // updateGeometry = writePointFeature->GetGeometryRef();
1739  // OGRPoint *poPoint = (OGRPoint *) updateGeometry;
1740  if(verbose_opt[0]>1)
1741  std::cout << "write feature has " << writePointFeature->GetFieldCount() << " fields" << std::endl;
1742  }
1743  }
1744  if(class_opt.size()){
1745  short value=((readValues[0])[j-ulj])[i-uli];
1746  for(int iclass=0;iclass<class_opt.size();++iclass){
1747  if(value==class_opt[iclass])
1748  polyClassValues[iclass]+=1;
1749  }
1750  }
1751  else{
1752  for(int iband=0;iband<nband;++iband){
1753  double value=((readValues[iband])[j-ulj])[i-uli];
1754  if(verbose_opt[0]>1)
1755  std::cout << ": " << value << std::endl;
1756  if(polygon_opt[0]||ruleMap[rule_opt[0]]!=rule::point)
1757  polyValues[iband].push_back(value);
1758  else{
1759  if(verbose_opt[0]>1)
1760  std::cout << "set field " << fieldname_opt[iband] << " to " << value << std::endl;
1761  switch( fieldType ){
1762  case OFTInteger:
1763  case OFTReal:
1764  writePointFeature->SetField(fieldname_opt[iband].c_str(),value);
1765  break;
1766  case OFTString:
1767  writePointFeature->SetField(fieldname_opt[iband].c_str(),type2string<double>(value).c_str());
1768  break;
1769  default://not supported
1770  assert(0);
1771  break;
1772  }
1773  }//else
1774  }//iband
1775  }//else (class_opt.size())
1776  if(!polygon_opt[0]){
1777  if(ruleMap[rule_opt[0]]==rule::point){//do not create in case of mean or median value (only at centroid)
1778  //write feature
1779  if(verbose_opt[0]>1)
1780  std::cout << "creating point feature" << std::endl;
1781  if(writeTest){
1782  if(writeTestLayer->CreateFeature( writePointFeature ) != OGRERR_NONE ){
1783  std::string errorString="Failed to create feature in test ogr vector dataset";
1784  throw(errorString);
1785  }
1786  }
1787  else{
1788  if(writeLayer->CreateFeature( writePointFeature ) != OGRERR_NONE ){
1789  std::string errorString="Failed to create feature in ogr vector dataset";
1790  throw(errorString);
1791  }
1792  }
1793  //destroy feature
1794  OGRFeature::DestroyFeature( writePointFeature );
1795  ++ntotalvalid;
1796  ++ntotalvalidLayer;
1797  }
1798  }
1799  }
1800  }
1801  if(polygon_opt[0]||ruleMap[rule_opt[0]]!=rule::point){
1802  //do not create if no points found within polygon
1803  if(!nPointPolygon){
1804  if(verbose_opt[0])
1805  cout << "no points found in polygon, continuing" << endl;
1806  continue;
1807  }
1808  //add ring to polygon
1809  if(polygon_opt[0]){
1810  writePolygon.addRing(&writeRing);
1811  writePolygon.closeRings();
1812  //write geometry of writePolygon
1813  //test
1814  //writePolygonFeature and readFeature are both of type wkbPolygon
1815  // writePolygonFeature->SetGeometry(&writePolygon);
1816  if(writePolygonFeature->SetFrom(readFeature)!= OGRERR_NONE)
1817  cerr << "writing feature failed" << std::endl;
1818  if(verbose_opt[0]>1)
1819  std::cout << "copying new fields write polygon " << std::endl;
1820  if(verbose_opt[0]>1)
1821  std::cout << "write feature has " << writePolygonFeature->GetFieldCount() << " fields" << std::endl;
1822  //write polygon feature
1823  }
1824  else{//write value of polygon to centroid point
1825  //create feature
1826  if(verbose_opt[0]>1)
1827  std::cout << "copying fields from polygons " << std::endl;
1828  if(writeCentroidFeature->SetFrom(readFeature)!= OGRERR_NONE)
1829  cerr << "writing feature failed" << std::endl;
1830  writeCentroidFeature->SetGeometry(&writeCentroidPoint);
1831  assert(wkbFlatten(writeCentroidFeature->GetGeometryRef()->getGeometryType()) == wkbPoint );
1832  if(verbose_opt[0]>1)
1833  std::cout << "write feature has " << writeCentroidFeature->GetFieldCount() << " fields" << std::endl;
1834  }
1835  if(class_opt.empty()){
1836  if(ruleMap[rule_opt[0]]==rule::point){//value at centroid of polygon
1837  if(verbose_opt[0])
1838  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
1839  for(int index=0;index<polyValues.size();++index){
1840  assert(polyValues[index].size()==1);
1841  double theValue=polyValues[index].back();
1842 
1843  if(verbose_opt[0])
1844  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
1845  int theBand=(band_opt.size()) ? band_opt[index] : index;
1846  try{
1847  if(verbose_opt[0]>1)
1848  std::cout << "set field " << fieldname_opt[index] << " to " << theValue << std::endl;
1849  switch( fieldType ){
1850  case OFTInteger:
1851  case OFTReal:
1852  if(polygon_opt[0])
1853  writePolygonFeature->SetField(fieldname_opt[index].c_str(),theValue);
1854  else
1855  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),theValue);
1856  break;
1857  case OFTString:
1858  if(polygon_opt[0])
1859  writePolygonFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1860  else
1861  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1862  break;
1863  default://not supported
1864  std::string errorString="field type not supported";
1865  throw(errorString);
1866  break;
1867  }
1868  }
1869  catch(std::string e){
1870  std::cout << e << std::endl;
1871  exit(1);
1872  }
1873  }
1874  }
1875  else{//ruleMap[rule_opt[0]] is not rule::point
1876  double theValue=0;
1877  for(int index=0;index<polyValues.size();++index){
1878  try{
1879  if(ruleMap[rule_opt[0]]==rule::mean)
1880  theValue=stat.mean(polyValues[index]);
1881  else if(ruleMap[rule_opt[0]]==rule::stdev)
1882  theValue=sqrt(stat.var(polyValues[index]));
1883  else if(ruleMap[rule_opt[0]]==rule::median)
1884  theValue=stat.median(polyValues[index]);
1885  else if(ruleMap[rule_opt[0]]==rule::percentile)
1886  theValue=stat.percentile(polyValues[index],polyValues[index].begin(),polyValues[index].end(),percentile_opt[0]);
1887  else if(ruleMap[rule_opt[0]]==rule::sum)
1888  theValue=stat.sum(polyValues[index]);
1889  else if(ruleMap[rule_opt[0]]==rule::max)
1890  theValue=stat.mymax(polyValues[index]);
1891  else if(ruleMap[rule_opt[0]]==rule::min)
1892  theValue=stat.mymin(polyValues[index]);
1893  else if(ruleMap[rule_opt[0]]==rule::centroid){
1894  if(verbose_opt[0])
1895  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
1896  assert(nPointPolygon<=1);
1897  assert(nPointPolygon==polyValues[index].size());
1898  theValue=polyValues[index].back();
1899  }
1900  else{
1901  std::string errorString="rule not supported";
1902  throw(errorString);
1903  }
1904  if(verbose_opt[0]>1)
1905  std::cout << "set field " << fieldname_opt[index] << " to " << theValue << std::endl;
1906  switch( fieldType ){
1907  case OFTInteger:
1908  case OFTReal:
1909  if(polygon_opt[0])
1910  writePolygonFeature->SetField(fieldname_opt[index].c_str(),theValue);
1911  else
1912  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),theValue);
1913  break;
1914  case OFTString:
1915  if(polygon_opt[0])
1916  writePolygonFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1917  else
1918  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
1919  break;
1920  default:
1921  std::string errorString="field type not supported";
1922  throw(errorString);
1923  break;
1924  }
1925  }
1926  catch(std::string e){
1927  std::cout << e << std::endl;
1928  exit(1);
1929  }
1930  }
1931  }
1932  }
1933  else{//class_opt is set
1934  if(ruleMap[rule_opt[0]]==rule::proportion||ruleMap[rule_opt[0]]==rule::count){
1935  if(verbose_opt[0])
1936  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
1937  if(ruleMap[rule_opt[0]]==rule::proportion)
1938  stat.normalize_pct(polyClassValues);
1939  for(int index=0;index<polyClassValues.size();++index){
1940  double theValue=polyClassValues[index];
1941  ostringstream fs;
1942  fs << class_opt[index];
1943  if(polygon_opt[0])
1944  writePolygonFeature->SetField(fs.str().c_str(),static_cast<int>(theValue));
1945  else
1946  writeCentroidFeature->SetField(fs.str().c_str(),static_cast<int>(theValue));
1947  }
1948  }
1949  else if(ruleMap[rule_opt[0]]==rule::custom){
1950  assert(polygon_opt[0]);//not implemented for points
1951  if(verbose_opt[0])
1952  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
1953  stat.normalize_pct(polyClassValues);
1954  assert(polyClassValues.size()==2);//11:broadleaved, 12:coniferous
1955  if(polyClassValues[0]>=75)//broadleaved
1956  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(11));
1957  else if(polyClassValues[1]>=75)//coniferous
1958  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(12));
1959  else if(polyClassValues[0]>25&&polyClassValues[1]>25)//mixed
1960  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(13));
1961  else{
1962  if(verbose_opt[0]){
1963  std::cout << "No valid value in polyClassValues..." << std::endl;
1964  for(int index=0;index<polyClassValues.size();++index){
1965  double theValue=polyClassValues[index];
1966  std::cout << theValue << " ";
1967  }
1968  std::cout << std::endl;
1969  }
1970  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(20));
1971  }
1972  }
1973  else if(ruleMap[rule_opt[0]]==rule::mode){
1974  //maximum votes in polygon
1975  if(verbose_opt[0])
1976  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
1977  //search for class with maximum votes
1978  int maxClass=stat.mymin(class_opt);
1979  vector<double>::iterator maxit;
1980  maxit=stat.mymax(polyClassValues,polyClassValues.begin(),polyClassValues.end());
1981  int maxIndex=distance(polyClassValues.begin(),maxit);
1982  maxClass=class_opt[maxIndex];
1983  if(verbose_opt[0]>0)
1984  std::cout << "maxClass: " << maxClass << std::endl;
1985  if(polygon_opt[0])
1986  writePolygonFeature->SetField(label_opt[0].c_str(),maxClass);
1987  else
1988  writeCentroidFeature->SetField(label_opt[0].c_str(),maxClass);
1989  }
1990  }
1991  if(polygon_opt[0]){
1992  if(verbose_opt[0]>1)
1993  std::cout << "creating polygon feature" << std::endl;
1994  if(writeTest){
1995  if(writeTestLayer->CreateFeature( writePolygonFeature ) != OGRERR_NONE ){
1996  std::string errorString="Failed to create polygon feature in ogr vector dataset";
1997  throw(errorString);
1998  }
1999  }
2000  else{
2001  if(writeLayer->CreateFeature( writePolygonFeature ) != OGRERR_NONE ){
2002  std::string errorString="Failed to create polygon feature in ogr vector dataset";
2003  throw(errorString);
2004  }
2005  }
2006  OGRFeature::DestroyFeature( writePolygonFeature );
2007  ++ntotalvalid;
2008  ++ntotalvalidLayer;
2009  }
2010  else{
2011  if(verbose_opt[0]>1)
2012  std::cout << "creating point feature in centroid" << std::endl;
2013  if(writeTest){
2014  if(writeTestLayer->CreateFeature( writeCentroidFeature ) != OGRERR_NONE ){
2015  std::string errorString="Failed to create point feature in ogr vector dataset";
2016  throw(errorString);
2017  }
2018  }
2019  else{
2020  //test
2021  assert(validFeature);
2022  if(writeLayer->CreateFeature( writeCentroidFeature ) != OGRERR_NONE ){
2023  std::string errorString="Failed to create point feature in ogr vector dataset";
2024  throw(errorString);
2025  }
2026  }
2027  OGRFeature::DestroyFeature( writeCentroidFeature );
2028  ++ntotalvalid;
2029  ++ntotalvalidLayer;
2030  }
2031  }
2032  }
2033  else if(wkbFlatten(poGeometry->getGeometryType()) == wkbMultiPolygon){//todo: try to use virtual OGRGeometry instead of OGRMultiPolygon and OGRPolygon
2034  OGRMultiPolygon readPolygon = *((OGRMultiPolygon *) poGeometry);
2035  OGRPolygon writePolygon;
2036  OGRLinearRing writeRing;
2037  OGRPoint writeCentroidPoint;
2038  OGRFeature *writePolygonFeature;
2039  OGRFeature *writeCentroidFeature;
2040 
2041  readPolygon.closeRings();
2042 
2043  if(verbose_opt[0]>1)
2044  std::cout << "get centroid point from polygon" << std::endl;
2045  readPolygon.Centroid(&writeCentroidPoint);
2046 
2047  double ulx,uly,lrx,lry;
2048  double uli,ulj,lri,lrj;
2049  if((polygon_opt[0]&&ruleMap[rule_opt[0]]==rule::point)||(ruleMap[rule_opt[0]]==rule::centroid)){
2050  ulx=writeCentroidPoint.getX();
2051  uly=writeCentroidPoint.getY();
2052  lrx=ulx;
2053  lry=uly;
2054  }
2055  else{
2056  //get envelope
2057  if(verbose_opt[0])
2058  std::cout << "reading envelope for polygon " << ifeature << std::endl;
2059  OGREnvelope* psEnvelope=new OGREnvelope();
2060  readPolygon.getEnvelope(psEnvelope);
2061  ulx=psEnvelope->MinX;
2062  uly=psEnvelope->MaxY;
2063  lrx=psEnvelope->MaxX;
2064  lry=psEnvelope->MinY;
2065  delete psEnvelope;
2066  }
2067  // if(geo_opt[0]){
2068  imgReader.geo2image(ulx,uly,uli,ulj);
2069  imgReader.geo2image(lrx,lry,lri,lrj);
2070  // }
2071  // else{
2072  // uli=ulx;
2073  // ulj=uly;
2074  // lri=lrx;
2075  // lrj=lry;
2076  // }
2077  //nearest neighbour
2078  ulj=static_cast<int>(ulj);
2079  uli=static_cast<int>(uli);
2080  lrj=static_cast<int>(lrj);
2081  lri=static_cast<int>(lri);
2082  //iterate through all pixels
2083  if(verbose_opt[0]>1)
2084  std::cout << "bounding box for multipologon feature " << ifeature << ": " << uli << " " << ulj << " " << lri << " " << lrj << std::endl;
2085 
2086  if(uli<0)
2087  uli=0;
2088  if(lri<0)
2089  lri=0;
2090  if(uli>=imgReader.nrOfCol())
2091  uli=imgReader.nrOfCol()-1;
2092  if(lri>=imgReader.nrOfCol())
2093  lri=imgReader.nrOfCol()-1;
2094  if(ulj<0)
2095  ulj=0;
2096  if(lrj<0)
2097  lrj=0;
2098  if(ulj>=imgReader.nrOfRow())
2099  ulj=imgReader.nrOfRow()-1;
2100  if(lrj>=imgReader.nrOfRow())
2101  lrj=imgReader.nrOfRow()-1;
2102  // if(uli<0||lri>=imgReader.nrOfCol()||ulj<0||lrj>=imgReader.nrOfRow())
2103  // continue;
2104 
2105  int nPointPolygon=0;
2106  if(polygon_opt[0]){
2107  if(writeTest)
2108  writePolygonFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
2109  else
2110  writePolygonFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
2111  }
2112  else if(ruleMap[rule_opt[0]]!=rule::point){
2113  if(writeTest)
2114  writeCentroidFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
2115  else
2116  writeCentroidFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
2117  }
2118  // vector<double> polyValues;
2119  Vector2d<double> polyValues;
2120  vector<double> polyClassValues;
2121 
2122  if(class_opt.size()){
2123  polyClassValues.resize(class_opt.size());
2124  //initialize
2125  for(int iclass=0;iclass<class_opt.size();++iclass)
2126  polyClassValues[iclass]=0;
2127  }
2128  else
2129  polyValues.resize(nband);
2130  vector< Vector2d<double> > readValues(nband);
2131  for(int iband=0;iband<nband;++iband){
2132  int theBand=(band_opt.size()) ? band_opt[iband] : iband;
2133  imgReader.readDataBlock(readValues[iband],GDT_Float64,uli,lri,ulj,lrj,theBand);
2134  }
2135 
2136  OGRPoint thePoint;
2137  for(int j=ulj;j<=lrj;++j){
2138  for(int i=uli;i<=lri;++i){
2139  //check if within raster image
2140  if(i<0||i>=imgReader.nrOfCol())
2141  continue;
2142  if(j<0||j>=imgReader.nrOfRow())
2143  continue;
2144  //check if point is on surface
2145  double theX=0;
2146  double theY=0;
2147  imgReader.image2geo(i,j,theX,theY);
2148  thePoint.setX(theX);
2149  thePoint.setY(theY);
2150 
2151  if(ruleMap[rule_opt[0]]!=rule::centroid&&!readPolygon.Contains(&thePoint))
2152  continue;
2153 
2154  bool valid=true;
2155 
2156  if(srcnodata_opt.size()){
2157  for(int vband=0;vband<bndnodata_opt.size();++vband){
2158  double value=((readValues[bndnodata_opt[vband]])[j-ulj])[i-uli];
2159  if(value==srcnodata_opt[vband]){
2160  valid=false;
2161  break;
2162  }
2163  }
2164  }
2165 
2166  if(!valid)
2167  continue;
2168  else
2169  validFeature=true;
2170 
2171  writeRing.addPoint(&thePoint);
2172  // if(writeRing.isPointOnRingBoundary(&thePoint))
2173  // writeRing.addPoint(&thePoint);
2174  if(verbose_opt[0]>1)
2175  std::cout << "point is on surface:" << thePoint.getX() << "," << thePoint.getY() << std::endl;
2176  ++nPointPolygon;
2177 
2178  if(polythreshold_opt.size())
2179  if(nPointPolygon>polythreshold_opt[0])
2180  continue;
2181  // throw(nPointPolygon);
2182  OGRFeature *writePointFeature;
2183  if(!polygon_opt[0]){
2184  //create feature
2185  if(ruleMap[rule_opt[0]]==rule::point){//do not create in case of mean, stdev, median or sum (only create point at centroid)
2186  if(writeTest)
2187  writePointFeature = OGRFeature::CreateFeature(writeTestLayer->GetLayerDefn());
2188  else
2189  writePointFeature = OGRFeature::CreateFeature(writeLayer->GetLayerDefn());
2190  if(verbose_opt[0]>1)
2191  std::cout << "copying fields from polygons " << std::endl;
2192  if(writePointFeature->SetFrom(readFeature)!= OGRERR_NONE)
2193  cerr << "writing feature failed" << std::endl;
2194  if(verbose_opt[0]>1)
2195  std::cout << "set geometry as point " << std::endl;
2196  //test
2197  writePointFeature->SetGeometry(&thePoint);
2198  assert(wkbFlatten(writePointFeature->GetGeometryRef()->getGeometryType()) == wkbPoint);
2199  // OGRGeometry *updateGeometry;
2200  // updateGeometry = writePointFeature->GetGeometryRef();
2201  // OGRPoint *poPoint = (OGRPoint *) updateGeometry;
2202  if(verbose_opt[0]>1)
2203  std::cout << "write feature has " << writePointFeature->GetFieldCount() << " fields" << std::endl;
2204  }
2205  }
2206  if(class_opt.size()){
2207  short value=((readValues[0])[j-ulj])[i-uli];
2208  for(int iclass=0;iclass<class_opt.size();++iclass){
2209  if(value==class_opt[iclass])
2210  polyClassValues[iclass]+=1;
2211  }
2212  }
2213  else{
2214  for(int iband=0;iband<nband;++iband){
2215  double value=((readValues[iband])[j-ulj])[i-uli];
2216  if(verbose_opt[0]>1)
2217  std::cout << ": " << value << std::endl;
2218  if(polygon_opt[0]||ruleMap[rule_opt[0]]!=rule::point)
2219  polyValues[iband].push_back(value);
2220  else{
2221  if(verbose_opt[0]>1)
2222  std::cout << "set field " << fieldname_opt[iband] << " to " << value << std::endl;
2223  switch( fieldType ){
2224  case OFTInteger:
2225  case OFTReal:
2226  writePointFeature->SetField(fieldname_opt[iband].c_str(),value);
2227  break;
2228  case OFTString:
2229  writePointFeature->SetField(fieldname_opt[iband].c_str(),type2string<double>(value).c_str());
2230  break;
2231  default://not supported
2232  assert(0);
2233  break;
2234  }
2235  }//else
2236  }//iband
2237  }//else (class_opt.size())
2238  if(!polygon_opt[0]){
2239  if(ruleMap[rule_opt[0]]==rule::point){//do not create in case of mean, stdev or median value (only at centroid)
2240  //write feature
2241  if(verbose_opt[0]>1)
2242  std::cout << "creating point feature" << std::endl;
2243  if(writeTest){
2244  if(writeTestLayer->CreateFeature( writePointFeature ) != OGRERR_NONE ){
2245  std::string errorString="Failed to create feature in ogr vector dataset";
2246  throw(errorString);
2247  }
2248  }
2249  else{
2250  if(writeLayer->CreateFeature( writePointFeature ) != OGRERR_NONE ){
2251  std::string errorString="Failed to create feature in ogr vector dataset";
2252  throw(errorString);
2253  }
2254  }
2255  //destroy feature
2256  OGRFeature::DestroyFeature( writePointFeature );
2257  }
2258  }
2259  // ++isample;
2260  ++ntotalvalid;
2261  ++ntotalvalidLayer;
2262  }
2263  }
2264  if(!validFeature)
2265  continue;
2266  if(polygon_opt[0]||ruleMap[rule_opt[0]]!=rule::point){
2267  //do not create if no points found within polygon
2268  if(!nPointPolygon)
2269  continue;
2270  //add ring to polygon
2271  if(polygon_opt[0]){
2272  writePolygon.addRing(&writeRing);
2273  writePolygon.closeRings();
2274  //write geometry of writePolygon
2275  //test
2276  //writePolygon and readFeature are from geometry type wkbMultiPolygon
2277  // writePolygonFeature->SetGeometry(&writePolygon);
2278  if(writePolygonFeature->SetFrom(readFeature)!= OGRERR_NONE)
2279  cerr << "writing feature failed" << std::endl;
2280  assert(writePolygonFeature->GetGeometryRef()->getGeometryType()==wkbMultiPolygon);
2281  if(verbose_opt[0]>1)
2282  std::cout << "copying new fields write polygon " << std::endl;
2283  if(verbose_opt[0]>1)
2284  std::cout << "write feature has " << writePolygonFeature->GetFieldCount() << " fields" << std::endl;
2285  //write polygon feature
2286  }
2287  else{//write band information of polygon to centroid point
2288  //create feature
2289  if(verbose_opt[0]>1)
2290  std::cout << "copying fields from polygons " << std::endl;
2291  if(writeCentroidFeature->SetFrom(readFeature)!= OGRERR_NONE)
2292  cerr << "writing feature failed" << std::endl;
2293  writeCentroidFeature->SetGeometry(&writeCentroidPoint);
2294  assert(wkbFlatten(writeCentroidFeature->GetGeometryRef()->getGeometryType()) == wkbPoint);
2295  if(verbose_opt[0]>1)
2296  std::cout << "write feature has " << writeCentroidFeature->GetFieldCount() << " fields" << std::endl;
2297  }
2298  if(class_opt.empty()){
2299  if(ruleMap[rule_opt[0]]==rule::point){//value at centroid of polygon
2300  if(verbose_opt[0])
2301  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
2302  for(int index=0;index<polyValues.size();++index){
2303  //test
2304  assert(polyValues[index].size()==1);
2305  double theValue=polyValues[index].back();
2306  if(verbose_opt[0])
2307  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
2308  int theBand=(band_opt.size()) ? band_opt[index] : index;
2309  try{
2310  if(verbose_opt[0]>1)
2311  std::cout << "set field " << fieldname_opt[index] << " to " << theValue << std::endl;
2312  switch( fieldType ){
2313  case OFTInteger:
2314  case OFTReal:
2315  if(polygon_opt[0])
2316  writePolygonFeature->SetField(fieldname_opt[index].c_str(),theValue);
2317  else
2318  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),theValue);
2319  break;
2320  case OFTString:
2321  if(polygon_opt[0])
2322  writePolygonFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
2323  else
2324  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
2325  break;
2326  default://not supported
2327  std::string errorString="field type not supported";
2328  throw(errorString);
2329  break;
2330  }
2331  }
2332  catch(std::string e){
2333  std::cout << e << std::endl;
2334  exit(1);
2335  }
2336  }
2337  }
2338  else{//ruleMap[rule_opt[0]] is not rule::point
2339  double theValue=0;
2340  for(int index=0;index<polyValues.size();++index){
2341  try{
2342  if(ruleMap[rule_opt[0]]==rule::mean)
2343  theValue=stat.mean(polyValues[index]);
2344  else if(ruleMap[rule_opt[0]]==rule::stdev)
2345  theValue=sqrt(stat.var(polyValues[index]));
2346  else if(ruleMap[rule_opt[0]]==rule::median)
2347  theValue=stat.median(polyValues[index]);
2348  else if(ruleMap[rule_opt[0]]==rule::percentile)
2349  theValue=stat.percentile(polyValues[index],polyValues[index].begin(),polyValues[index].end(),percentile_opt[0]);
2350  else if(ruleMap[rule_opt[0]]==rule::sum)
2351  theValue=stat.sum(polyValues[index]);
2352  else if(ruleMap[rule_opt[0]]==rule::max)
2353  theValue=stat.mymax(polyValues[index]);
2354  else if(ruleMap[rule_opt[0]]==rule::min)
2355  theValue=stat.mymin(polyValues[index]);
2356  else if(ruleMap[rule_opt[0]]==rule::centroid){
2357  if(verbose_opt[0])
2358  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
2359  assert(nPointPolygon<=1);
2360  assert(nPointPolygon==polyValues[index].size());
2361  theValue=polyValues[index].back();
2362  }
2363  else{
2364  std::string errorString="rule not supported";
2365  throw(errorString);
2366  }
2367  if(verbose_opt[0]>1)
2368  std::cout << "set field " << fieldname_opt[index] << " to " << theValue << std::endl;
2369  switch( fieldType ){
2370  case OFTInteger:
2371  case OFTReal:
2372  if(polygon_opt[0])
2373  writePolygonFeature->SetField(fieldname_opt[index].c_str(),theValue);
2374  else
2375  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),theValue);
2376  break;
2377  case OFTString:
2378  if(polygon_opt[0])
2379  writePolygonFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
2380  else
2381  writeCentroidFeature->SetField(fieldname_opt[index].c_str(),type2string<double>(theValue).c_str());
2382  break;
2383  default://not supported
2384  std::string errorString="field type not supported";
2385  throw(errorString);
2386  break;
2387  }
2388  }
2389  catch(std::string e){
2390  std::cout << e << std::endl;
2391  exit(1);
2392  }
2393  }
2394  }
2395  }
2396  else{//class_opt is set
2397  if(ruleMap[rule_opt[0]]==rule::proportion||ruleMap[rule_opt[0]]==rule::count){
2398  if(verbose_opt[0])
2399  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
2400  if(ruleMap[rule_opt[0]]==rule::proportion)
2401  stat.normalize_pct(polyClassValues);
2402  for(int index=0;index<polyClassValues.size();++index){
2403  double theValue=polyClassValues[index];
2404  ostringstream fs;
2405  fs << class_opt[index];
2406  if(polygon_opt[0])
2407  writePolygonFeature->SetField(fs.str().c_str(),static_cast<int>(theValue));
2408  else
2409  writeCentroidFeature->SetField(fs.str().c_str(),static_cast<int>(theValue));
2410  }
2411  }
2412  else if(ruleMap[rule_opt[0]]==rule::custom){
2413  assert(polygon_opt[0]);//not implemented for points
2414  if(verbose_opt[0])
2415  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
2416  stat.normalize_pct(polyClassValues);
2417  assert(polyClassValues.size()==2);//11:broadleaved, 12:coniferous
2418  if(polyClassValues[0]>=75)//broadleaved
2419  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(11));
2420  else if(polyClassValues[1]>=75)//coniferous
2421  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(12));
2422  else if(polyClassValues[0]>25&&polyClassValues[1]>25)//mixed
2423  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(13));
2424  else{
2425  if(verbose_opt[0]){
2426  std::cout << "No valid value in polyClassValues..." << std::endl;
2427  for(int index=0;index<polyClassValues.size();++index){
2428  double theValue=polyClassValues[index];
2429  std::cout << theValue << " ";
2430  }
2431  std::cout << std::endl;
2432  }
2433  writePolygonFeature->SetField(label_opt[0].c_str(),static_cast<int>(20));
2434  }
2435  }
2436  else if(ruleMap[rule_opt[0]]==rule::mode){
2437  //maximum votes in polygon
2438  if(verbose_opt[0])
2439  std::cout << "number of points in polygon: " << nPointPolygon << std::endl;
2440  //search for class with maximum votes
2441  int maxClass=stat.mymin(class_opt);
2442  vector<double>::iterator maxit;
2443  maxit=stat.mymax(polyClassValues,polyClassValues.begin(),polyClassValues.end());
2444  int maxIndex=distance(polyClassValues.begin(),maxit);
2445  maxClass=class_opt[maxIndex];
2446  if(verbose_opt[0]>0)
2447  std::cout << "maxClass: " << maxClass << std::endl;
2448  if(polygon_opt[0])
2449  writePolygonFeature->SetField(label_opt[0].c_str(),maxClass);
2450  else
2451  writeCentroidFeature->SetField(label_opt[0].c_str(),maxClass);
2452  }
2453  }
2454 
2455  if(polygon_opt[0]){
2456  if(verbose_opt[0]>1)
2457  std::cout << "creating polygon feature" << std::endl;
2458  if(writeTest){
2459  if(writeTestLayer->CreateFeature( writePolygonFeature ) != OGRERR_NONE ){
2460  std::string errorString="Failed to create polygon feature in ogr vector dataset";
2461  throw(errorString);
2462  }
2463  }
2464  else{
2465  if(writeLayer->CreateFeature( writePolygonFeature ) != OGRERR_NONE ){
2466  std::string errorString="Failed to create polygon feature in ogr vector dataset";
2467  throw(errorString);
2468  }
2469  }
2470  OGRFeature::DestroyFeature( writePolygonFeature );
2471  ++ntotalvalid;
2472  ++ntotalvalidLayer;
2473  }
2474  else{
2475  if(verbose_opt[0]>1)
2476  std::cout << "creating point feature in centroid" << std::endl;
2477  if(writeTest){
2478  if(writeTestLayer->CreateFeature( writeCentroidFeature ) != OGRERR_NONE ){
2479  std::string errorString="Failed to create point feature in ogr vector dataset";
2480  throw(errorString);
2481  }
2482  }
2483  else{
2484  //test
2485  assert(validFeature);
2486  if(writeLayer->CreateFeature( writeCentroidFeature ) != OGRERR_NONE ){
2487  std::string errorString="Failed to create point feature in ogr vector dataset";
2488  throw(errorString);
2489  }
2490  }
2491  OGRFeature::DestroyFeature( writeCentroidFeature );
2492  ++ntotalvalid;
2493  ++ntotalvalidLayer;
2494  }
2495  }
2496  }
2497  else{
2498  std::string test;
2499  test=poGeometry->getGeometryName();
2500  ostringstream oss;
2501  oss << "geometry " << test << " not supported";
2502  throw(oss.str());
2503  }
2504  ++ifeature;
2505  if(theThreshold>0){
2506  if(threshold_opt.size()==layer_opt.size())
2507  progress=(100.0/theThreshold)*static_cast<float>(ntotalvalidLayer)/nfeatureLayer;
2508  else
2509  progress=static_cast<float>(ntotalvalidLayer)/nfeatureLayer;
2510  }
2511  else
2512  progress=static_cast<float>(ifeature+1)/(-theThreshold);
2513  pfnProgress(progress,pszMessage,pProgressArg);
2514  }
2515  catch(std::string e){
2516  std::cout << e << std::endl;
2517  continue;
2518  }
2519  catch(int npoint){
2520  if(verbose_opt[0])
2521  std::cout << "number of points read in polygon: " << npoint << std::endl;
2522  continue;
2523  }
2524  }//end of getNextFeature
2525  // if(rbox_opt[0]>0||cbox_opt[0]>0)
2526  // boxWriter.close();
2527  progress=1.0;
2528  pfnProgress(progress,pszMessage,pProgressArg);
2529  ++ilayerWrite;
2530  }//for ilayer
2531  sampleReaderOgr.close();
2532  ogrWriter.close();
2533  if(test_opt.size())
2534  ogrTestWriter.close();
2535  }//else (vector)
2536  progress=1.0;
2537  pfnProgress(progress,pszMessage,pProgressArg);
2538  imgReader.close();
2539 }
2540 
pktools-2.6.6/doc/html/md_description_pkstat.html0000644000113200011300000000465412647637662017147 00000000000000 pktools: description_pkstat
pktools  2.6.6
Processing Kernel for geospatial data
description_pkstat
pktools-2.6.6/doc/html/dir_41d189c72498e24f979b227eb8e138b1_dep.md50000644000113200011300000000004012616110567020115 0000000000000009fb1730371733387642ca424f55bac5pktools-2.6.6/doc/html/classImgUpdaterGdal__coll__graph.md50000644000113200011300000000004012647437043020616 00000000000000c1ebade9b892249e50230e039cf1bb54pktools-2.6.6/doc/html/pkann.html0000644000113200011300000002531312647637662013660 00000000000000 pktools: pkann
pktools  2.6.6
Processing Kernel for geospatial data
pkann

classify raster image using Artificial Neural Network

SYNOPSIS

Usage: pkann -t training [-i input -o output] [-cv value]

Options: [-tln layer]* [-c name -r value]* [-of GDALformat|-f OGRformat] [-co NAME=VALUE]* [-ct filename] [-label attribute] [-prior value]* [-nn number]* [-m filename [-msknodata value]*] [-nodata value]

Advanced options: [-b band] [-sband band -eband band]* [-bal size]* [-min] [-bag value] [-bs value] [-comb rule] [-cb filename] [-prob filename] [-pim priorimage] [–offset value] [–scale value] [–connection 0|1] [-w weights]* [–learning rate] [–maxit number]

Description

The utility pkann implements an artificial neural network (ANN) to solve a supervised classification problem. The implementation is based on the open source C++ library fann). Both raster and vector files are supported as input. The output will contain the classification result, either in raster or vector format, corresponding to the format of the input. A training sample must be provided as an OGR vector dataset that contains the class labels and the features for each training point. The point locations are not considered in the training step. You can use the same training sample for classifying different images, provided the number of bands of the images are identical. Use the utility pkextract to create a suitable training sample, based on a sample of points or polygons. For raster output maps you can attach a color table using the option -ct.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image
    t training std::string training vector file. A single vector 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)
    tln tln std::string training layer name(s)
    label label std::string label identifier for class label in training vector file.
    bal balance unsigned int 0 balance the input data to this number of samples for each class
    min min int 0 if number of training pixels is less then min, do not take this class into account (0: consider all classes)
    b band short band index (starting from 0, either use band option or use start to end)
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    offset double 0 offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]
    scale scale double 0 scale value for each spectral band input features: refl=(DN[band]-offset[band])/scaleband
    a aggreg unsigned short 1 how to combine aggregated classifiers, see also rc option (1: sum rule, 2: max rule).
    prior prior double 0 prior probabilities for each class (e.g., -p 0.3 -p 0.3 -p 0.2 )
    pim priorimg std::string prior probability image (multi-band img with band for each class
    cv cv unsigned short 0 n-fold cross validation mode
    cmf cmf std::string ascii Format for confusion matrix (ascii or latex)
    nn nneuron unsigned int 5 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)
    connection float 1 connection reate (default: 1.0 for a fully connected network)
    w weights float 0 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)
    l learning float 0.7 learning rate (default: 0.7)
    maxit unsigned int 500 number of maximum iterations (epoch) (default: 500)
    comb comb unsigned short 0 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)
    bag bag unsigned short 1 Number of bootstrap aggregations (default is no bagging: 1)
    bs bsize int 100 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
    cb classbag std::string output for each individual bootstrap aggregation (default is blank)
    m mask std::string Only classify within specified mask (vector or raster). For raster mask, set nodata values with the option msknodata.
    msknodata msknodata short 0 mask value(s) not to consider for classification. Values will be taken over in classification image. Default is 0
    nodata nodata unsigned short 0 nodata value to put where image is masked as nodata
    o output std::string output classification image
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string Output image format (see also gdal_translate). Empty string: inherit from input image
    ct ct std::string colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)
    co co std::string Creation option for output file. Multiple options can be specified.
    prob std::string probability image. Default is no probability image
    f f std::string SQLite Output ogr format for active training sample
    na nactive unsigned int 1 number of active training points
    c class std::string list of class names.
    r reclass short list of class values (use same order as in class opt).
    Usage: pkann -t training [-i input -o output] [-cv value]

Examples

Some examples how to use pkann can be found here

pktools-2.6.6/doc/html/dir_457de909e3893805a4d2d0b8c0742bd8.html0000644000113200011300000001014312616145623017617 00000000000000 pktools: /home/kempenep/pktools/vis_studio Directory Reference
pktools  2.6.4
Processing Kernel for geospatial data
vis_studio Directory Reference
Directory dependency graph for vis_studio:
/home/kempenep/pktools/vis_studio

Directories

directory  base
 

Files

file  config.h [code]
 
pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid__coll__graph.map0000644000113200011300000000013712616110567026306 00000000000000 pktools-2.6.6/doc/html/build-pkcomposite__gui-gcc-Release_2moc__mainwindow_8cpp_source.html0000644000113200011300000005436012647637661027146 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Release/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkcomposite_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  13, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  42, 11, 11, 11, 0x08,
35  75, 11, 11, 11, 0x08,
36  108, 11, 11, 11, 0x08,
37  142, 11, 11, 11, 0x08,
38  168, 11, 11, 11, 0x08,
39  199, 11, 11, 11, 0x08,
40  227, 11, 11, 11, 0x08,
41  268, 11, 11, 11, 0x08,
42  297, 11, 11, 11, 0x08,
43  324, 11, 11, 11, 0x08,
44  355, 11, 11, 11, 0x08,
45  383, 11, 11, 11, 0x08,
46 
47  0 // eod
48 };
49 
50 static const char qt_meta_stringdata_MainWindow[] = {
51  "MainWindow\0\0on_toolButton_input_clicked()\0"
52  "on_toolButton_defaults_clicked()\0"
53  "on_actionInput_image_triggered()\0"
54  "on_actionOutput_image_triggered()\0"
55  "on_actionQuit_triggered()\0"
56  "on_toolButton_output_clicked()\0"
57  "on_toolButton_Run_clicked()\0"
58  "on_actionSelection_Info_file_triggered()\0"
59  "on_toolButton_file_clicked()\0"
60  "on_toolButton_ct_clicked()\0"
61  "on_toolButton_extent_clicked()\0"
62  "on_actionExtent_triggered()\0"
63  "deleteItemInput()\0"
64 };
65 
66 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
67 {
68  if (_c == QMetaObject::InvokeMetaMethod) {
69  Q_ASSERT(staticMetaObject.cast(_o));
70  MainWindow *_t = static_cast<MainWindow *>(_o);
71  switch (_id) {
72  case 0: _t->on_toolButton_input_clicked(); break;
73  case 1: _t->on_toolButton_defaults_clicked(); break;
74  case 2: _t->on_actionInput_image_triggered(); break;
75  case 3: _t->on_actionOutput_image_triggered(); break;
76  case 4: _t->on_actionQuit_triggered(); break;
77  case 5: _t->on_toolButton_output_clicked(); break;
78  case 6: _t->on_toolButton_Run_clicked(); break;
79  case 7: _t->on_actionSelection_Info_file_triggered(); break;
80  case 8: _t->on_toolButton_file_clicked(); break;
81  case 9: _t->on_toolButton_ct_clicked(); break;
82  case 10: _t->on_toolButton_extent_clicked(); break;
83  case 11: _t->on_actionExtent_triggered(); break;
84  case 12: _t->deleteItemInput(); break;
85  default: ;
86  }
87  }
88  Q_UNUSED(_a);
89 }
90 
91 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
92  0, qt_static_metacall
93 };
94 
95 const QMetaObject MainWindow::staticMetaObject = {
96  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
97  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
98 };
99 
100 #ifdef Q_NO_DATA_RELOCATION
101 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
102 #endif //Q_NO_DATA_RELOCATION
103 
104 const QMetaObject *MainWindow::metaObject() const
105 {
106  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
107 }
108 
109 void *MainWindow::qt_metacast(const char *_clname)
110 {
111  if (!_clname) return 0;
112  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
113  return static_cast<void*>(const_cast< MainWindow*>(this));
114  return QMainWindow::qt_metacast(_clname);
115 }
116 
117 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
118 {
119  _id = QMainWindow::qt_metacall(_c, _id, _a);
120  if (_id < 0)
121  return _id;
122  if (_c == QMetaObject::InvokeMetaMethod) {
123  if (_id < 13)
124  qt_static_metacall(this, _c, _id, _a);
125  _id -= 13;
126  }
127  return _id;
128 }
129 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/classFileReaderLas-members.html0000644000113200011300000002500012647637662017662 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
FileReaderLas Member List

This is the complete list of members for FileReaderLas, including all inherited members.

addClassFilter(std::vector< unsigned short > const &classes) (defined in FileReaderLas)FileReaderLas
addReturnsFilter(std::vector< unsigned short > const &returns) (defined in FileReaderLas)FileReaderLas
close(void) (defined in FileReaderLas)FileReaderLas
FileReaderLas(void) (defined in FileReaderLas)FileReaderLas
FileReaderLas(const std::string &filename) (defined in FileReaderLas)FileReaderLas
getExtent() const (defined in FileReaderLas)FileReaderLasinline
getExtent(double &ulx, double &uly, double &lrx, double &lry) const (defined in FileReaderLas)FileReaderLas
getHeader() const (defined in FileReaderLas)FileReaderLas
getMaxZ() const (defined in FileReaderLas)FileReaderLas
getMinZ() const (defined in FileReaderLas)FileReaderLas
getPointCount() const (defined in FileReaderLas)FileReaderLas
isCompressed() const (defined in FileReaderLas)FileReaderLas
las2ascii(const std::string &filename, bool verbose=false) const (defined in FileReaderLas)FileReaderLas
m_filename (defined in FileReaderLas)FileReaderLasprotected
m_filters (defined in FileReaderLas)FileReaderLasprotected
m_ifstream (defined in FileReaderLas)FileReaderLasprotected
m_reader (defined in FileReaderLas)FileReaderLasprotected
open(const std::string &filename) (defined in FileReaderLas)FileReaderLas
readNextPoint(liblas::Point &thePoint) (defined in FileReaderLas)FileReaderLasinline
readPointAt(std::size_t n) (defined in FileReaderLas)FileReaderLasinline
resetReader() (defined in FileReaderLas)FileReaderLasinline
setCodec(const std::string &filename) (defined in FileReaderLas)FileReaderLasprotected
setFilter(std::vector< liblas::FilterPtr > const &filters) (defined in FileReaderLas)FileReaderLas
setFilters(const std::vector< liblas::FilterPtr > &filters) (defined in FileReaderLas)FileReaderLasinline
setFilters() (defined in FileReaderLas)FileReaderLasinline
~FileReaderLas(void) (defined in FileReaderLas)FileReaderLas
pktools-2.6.6/doc/html/pkascii2ogr.html0000644000113200011300000001252312647637662014765 00000000000000 pktools: pkascii2ogr
pktools  2.6.6
Processing Kernel for geospatial data
pkascii2ogr

program to create vector points or polygons from text file

SYNOPSIS

Usage: pkascii2ogr -i input.txt -o output

Options: [-f OGRformat] [-x col] [-y col] [–line] [-n fieldname -ot type]* [-fs separator]

Description

Poor man's utility to create a vector dataset (points or single polygon) from an ASCII textfile. A better alternative is to use virtual vector datasets. Specify the position of the vertices (x and y) in the columns defined by the options (-x -y), starting from 0. The default is to use the first (-dx 0) and second (-dx 1) columns for x and y respectvely. Specify the names and types of the remaining columns in your input file via the option pairs -n and -ot respectively. The default field separator is space.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input ASCII file
    o output std::string Output file
    f f std::string ESRI Shapefile Output sample file format
    x x short 0 column number of x (0)
    y y short 1 column number of y (1)
    l line bool false create OGRPolygon as geometry instead of points. Fields are taken from first point and polygon is automatically closed (no need to repeat first point at last line). (false: use OGRPoint)
    n name std::string Field names for the columns in the input ascii file
    ot ot std::string Real Field type (Real, Integer, String) for each of the fields as defined by name
    a_srs a_srs std::string epsg:4326 Override the projection for the output file, use epsg: or Wkt string
    fs fs char field separator.
    Usage: pkascii2ogr -i input.txt -o output

Examples

Some examples how to use pkascii2ogr can be found here

pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass__inherit__graph.map0000644000113200011300000000011312616110567024445 00000000000000 pktools-2.6.6/doc/html/graph_legend.md50000644000113200011300000000004012616110567014661 00000000000000387ff8eb65306fa251338d3c9bd7bfffpktools-2.6.6/doc/html/Filter_8cc_source.html0000644000113200011300000034560412647637661016122 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Filter.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
Filter.cc
1 /**********************************************************************
2 Filter.cc: class for filtering
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "Filter.h"
21 #include <assert.h>
22 #include <math.h>
23 #include <iostream>
24 
25 using namespace std;
26 
27 filter::Filter::Filter(void)
28  : m_padding("symmetric")
29 {
30 }
31 
32 
33 filter::Filter::Filter(const vector<double> &taps)
34  : m_padding("symmetric")
35 {
36  setTaps(taps);
37 }
38 
39 void filter::Filter::setTaps(const vector<double> &taps, bool normalize)
40 {
41  m_taps.resize(taps.size());
42  double norm=0;
43  for(int itap=0;itap<taps.size();++itap)
44  norm+=taps[itap];
45  if(norm){
46  for(int itap=0;itap<taps.size();++itap)
47  m_taps[itap]=taps[itap]/norm;
48  }
49  else
50  m_taps=taps;
51  assert(m_taps.size()%2);
52 }
53 
54 unsigned int filter::Filter::pushNoDataValue(double noDataValue){
55  if(find(m_noDataValues.begin(),m_noDataValues.end(),noDataValue)==m_noDataValues.end())
56  m_noDataValues.push_back(noDataValue);
57  return m_noDataValues.size();
58 };
59 
60 unsigned int filter::Filter::setNoDataValues(std::vector<double> vnodata){
61  m_noDataValues=vnodata;
62  return m_noDataValues.size();
63 };
64 
65 void filter::Filter::dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family){
66  const char* pszMessage;
67  void* pProgressArg=NULL;
68  GDALProgressFunc pfnProgress=GDALTermProgress;
69  double progress=0;
70  pfnProgress(progress,pszMessage,pProgressArg);
71  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
72  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
73  for(int y=0;y<input.nrOfRow();++y){
74  for(int iband=0;iband<input.nrOfBand();++iband)
75  input.readData(lineInput[iband],GDT_Float64,y,iband);
76  vector<double> pixelInput(input.nrOfBand());
77  for(int x=0;x<input.nrOfCol();++x){
78  pixelInput=lineInput.selectCol(x);
79  dwtForward(pixelInput,wavelet_type,family);
80  for(int iband=0;iband<input.nrOfBand();++iband)
81  lineOutput[iband][x]=pixelInput[iband];
82  }
83  for(int iband=0;iband<input.nrOfBand();++iband){
84  try{
85  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
86  }
87  catch(string errorstring){
88  cerr << errorstring << "in band " << iband << ", line " << y << endl;
89  }
90  }
91  progress=(1.0+y)/output.nrOfRow();
92  pfnProgress(progress,pszMessage,pProgressArg);
93  }
94 }
95 
96 void filter::Filter::dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family){
97  const char* pszMessage;
98  void* pProgressArg=NULL;
99  GDALProgressFunc pfnProgress=GDALTermProgress;
100  double progress=0;
101  pfnProgress(progress,pszMessage,pProgressArg);
102  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
103  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
104  for(int y=0;y<input.nrOfRow();++y){
105  for(int iband=0;iband<input.nrOfBand();++iband)
106  input.readData(lineInput[iband],GDT_Float64,y,iband);
107  vector<double> pixelInput(input.nrOfBand());
108  for(int x=0;x<input.nrOfCol();++x){
109  pixelInput=lineInput.selectCol(x);
110  dwtInverse(pixelInput,wavelet_type,family);
111  for(int iband=0;iband<input.nrOfBand();++iband)
112  lineOutput[iband][x]=pixelInput[iband];
113  }
114  for(int iband=0;iband<input.nrOfBand();++iband){
115  try{
116  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
117  }
118  catch(string errorstring){
119  cerr << errorstring << "in band " << iband << ", line " << y << endl;
120  }
121  }
122  progress=(1.0+y)/output.nrOfRow();
123  pfnProgress(progress,pszMessage,pProgressArg);
124  }
125 }
126 
127 void filter::Filter::dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut){
128  const char* pszMessage;
129  void* pProgressArg=NULL;
130  GDALProgressFunc pfnProgress=GDALTermProgress;
131  double progress=0;
132  pfnProgress(progress,pszMessage,pProgressArg);
133  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
134  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
135  for(int y=0;y<input.nrOfRow();++y){
136  for(int iband=0;iband<input.nrOfBand();++iband)
137  input.readData(lineInput[iband],GDT_Float64,y,iband);
138  vector<double> pixelInput(input.nrOfBand());
139  for(int x=0;x<input.nrOfCol();++x){
140  pixelInput=lineInput.selectCol(x);
141  dwtCut(pixelInput,wavelet_type,family,cut);
142  for(int iband=0;iband<input.nrOfBand();++iband)
143  lineOutput[iband][x]=pixelInput[iband];
144  }
145  for(int iband=0;iband<input.nrOfBand();++iband){
146  try{
147  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
148  }
149  catch(string errorstring){
150  cerr << errorstring << "in band " << iband << ", line " << y << endl;
151  }
152  }
153  progress=(1.0+y)/output.nrOfRow();
154  pfnProgress(progress,pszMessage,pProgressArg);
155  }
156 }
157 
158 void filter::Filter::dwtCutFrom(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, int band){
159  const char* pszMessage;
160  void* pProgressArg=NULL;
161  GDALProgressFunc pfnProgress=GDALTermProgress;
162  double progress=0;
163  pfnProgress(progress,pszMessage,pProgressArg);
164  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
165  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
166  for(int y=0;y<input.nrOfRow();++y){
167  for(int iband=0;iband<input.nrOfBand();++iband)
168  input.readData(lineInput[iband],GDT_Float64,y,iband);
169  vector<double> pixelInput(input.nrOfBand());
170  for(int x=0;x<input.nrOfCol();++x){
171  pixelInput=lineInput.selectCol(x);
172  dwtForward(pixelInput,wavelet_type,family);
173  for(int iband=0;iband<input.nrOfBand();++iband){
174  if(iband>=band)
175  pixelInput[iband]=0;
176  }
177  dwtInverse(pixelInput,wavelet_type,family);
178  for(int iband=0;iband<input.nrOfBand();++iband)
179  lineOutput[iband][x]=pixelInput[iband];
180  }
181  for(int iband=0;iband<input.nrOfBand();++iband){
182  try{
183  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
184  }
185  catch(string errorstring){
186  cerr << errorstring << "in band " << iband << ", line " << y << endl;
187  }
188  }
189  progress=(1.0+y)/output.nrOfRow();
190  pfnProgress(progress,pszMessage,pProgressArg);
191  }
192 }
193 
194 //todo: support different padding strategies
195 void filter::Filter::dwtForward(std::vector<double>& data, const std::string& wavelet_type, int family){
196  int origsize=data.size();
197  //make sure data size if power of 2
198  while(data.size()&(data.size()-1))
199  data.push_back(data.back());
200 
201  int nsize=data.size();
202  gsl_wavelet *w;
203  gsl_wavelet_workspace *work;
204  assert(nsize);
205  w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
206  work=gsl_wavelet_workspace_alloc(nsize);
207  gsl_wavelet_transform_forward(w,&(data[0]),1,nsize,work);
208  data.erase(data.begin()+origsize,data.end());
209  gsl_wavelet_free (w);
210  gsl_wavelet_workspace_free (work);
211 }
212 
213 //todo: support different padding strategies
214 void filter::Filter::dwtInverse(std::vector<double>& data, const std::string& wavelet_type, int family){
215  int origsize=data.size();
216  //make sure data size if power of 2
217  while(data.size()&(data.size()-1))
218  data.push_back(data.back());
219  int nsize=data.size();
220  gsl_wavelet *w;
221  gsl_wavelet_workspace *work;
222  assert(nsize);
223  w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
224  work=gsl_wavelet_workspace_alloc(nsize);
225  gsl_wavelet_transform_inverse(w,&(data[0]),1,nsize,work);
226  data.erase(data.begin()+origsize,data.end());
227  gsl_wavelet_free (w);
228  gsl_wavelet_workspace_free (work);
229 }
230 
231 //todo: support different padding strategies
232 void filter::Filter::dwtCut(std::vector<double>& data, const std::string& wavelet_type, int family, double cut){
233  int origsize=data.size();
234  //make sure data size if power of 2
235  while(data.size()&(data.size()-1))
236  data.push_back(data.back());
237  int nsize=data.size();
238  gsl_wavelet *w;
239  gsl_wavelet_workspace *work;
240  assert(nsize);
241  w=gsl_wavelet_alloc(getWaveletType(wavelet_type),family);
242  work=gsl_wavelet_workspace_alloc(nsize);
243  gsl_wavelet_transform_forward(w,&(data[0]),1,nsize,work);
244  std::vector<double> abscoeff(data.size());
245  size_t* p=new size_t[data.size()];
246  for(int index=0;index<data.size();++index){
247  abscoeff[index]=fabs(data[index]);
248  }
249  int nc=(100-cut)/100.0*nsize;
250  gsl_sort_index(p,&(abscoeff[0]),1,nsize);
251  for(int i=0;(i+nc)<nsize;i++)
252  data[p[i]]=0;
253  gsl_wavelet_transform_inverse(w,&(data[0]),1,nsize,work);
254  data.erase(data.begin()+origsize,data.end());
255  delete[] p;
256  gsl_wavelet_free (w);
257  gsl_wavelet_workspace_free (work);
258 }
259 
260 void filter::Filter::morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short verbose)
261 {
262  // bool bverbose=(verbose>1)? true:false;
263  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
264  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
265  const char* pszMessage;
266  void* pProgressArg=NULL;
267  GDALProgressFunc pfnProgress=GDALTermProgress;
268  double progress=0;
269  pfnProgress(progress,pszMessage,pProgressArg);
270  for(int y=0;y<input.nrOfRow();++y){
271  for(int iband=0;iband<input.nrOfBand();++iband)
272  input.readData(lineInput[iband],GDT_Float64,y,iband);
273  vector<double> pixelInput(input.nrOfBand());
274  vector<double> pixelOutput(input.nrOfBand());
275  for(int x=0;x<input.nrOfCol();++x){
276  pixelInput=lineInput.selectCol(x);
277  filter(pixelInput,pixelOutput,method,dim);
278  // morphology(pixelInput,pixelOutput,method,dim,bverbose);
279  for(int iband=0;iband<input.nrOfBand();++iband)
280  lineOutput[iband][x]=pixelOutput[iband];
281  }
282  for(int iband=0;iband<input.nrOfBand();++iband){
283  try{
284  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
285  }
286  catch(string errorstring){
287  cerr << errorstring << "in band " << iband << ", line " << y << endl;
288  }
289  }
290  progress=(1.0+y)/output.nrOfRow();
291  pfnProgress(progress,pszMessage,pProgressArg);
292  }
293 }
294 
295 void filter::Filter::smoothNoData(const ImgReaderGdal& input, const std::string& interpolationType, ImgWriterGdal& output)
296 {
297  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
298  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
299  const char* pszMessage;
300  void* pProgressArg=NULL;
301  GDALProgressFunc pfnProgress=GDALTermProgress;
302  double progress=0;
303  pfnProgress(progress,pszMessage,pProgressArg);
304  for(int y=0;y<input.nrOfRow();++y){
305  for(int iband=0;iband<input.nrOfBand();++iband)
306  input.readData(lineInput[iband],GDT_Float64,y,iband);
307  vector<double> pixelInput(input.nrOfBand());
308  vector<double> pixelOutput(input.nrOfBand());
309  for(int x=0;x<input.nrOfCol();++x){
310  pixelInput=lineInput.selectCol(x);
311  smoothNoData(pixelInput,interpolationType,pixelOutput);
312  for(int iband=0;iband<input.nrOfBand();++iband)
313  lineOutput[iband][x]=pixelOutput[iband];
314  }
315  for(int iband=0;iband<input.nrOfBand();++iband){
316  try{
317  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
318  }
319  catch(string errorstring){
320  cerr << errorstring << "in band " << iband << ", line " << y << endl;
321  }
322  }
323  progress=(1.0+y)/output.nrOfRow();
324  pfnProgress(progress,pszMessage,pProgressArg);
325  }
326 }
327 
328 void filter::Filter::smooth(const ImgReaderGdal& input, ImgWriterGdal& output, short dim)
329 {
330  assert(dim>0);
331  m_taps.resize(dim);
332  for(int itap=0;itap<dim;++itap)
333  m_taps[itap]=1.0/dim;
334  filter(input,output);
335 }
336 
337 void filter::Filter::filter(const ImgReaderGdal& input, ImgWriterGdal& output)
338 {
339  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
340  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());
341  const char* pszMessage;
342  void* pProgressArg=NULL;
343  GDALProgressFunc pfnProgress=GDALTermProgress;
344  double progress=0;
345  pfnProgress(progress,pszMessage,pProgressArg);
346  for(int y=0;y<input.nrOfRow();++y){
347  for(int iband=0;iband<input.nrOfBand();++iband)
348  input.readData(lineInput[iband],GDT_Float64,y,iband);
349  vector<double> pixelInput(input.nrOfBand());
350  vector<double> pixelOutput(input.nrOfBand());
351  for(int x=0;x<input.nrOfCol();++x){
352  pixelInput=lineInput.selectCol(x);
353  filter(pixelInput,pixelOutput);
354  for(int iband=0;iband<input.nrOfBand();++iband)
355  lineOutput[iband][x]=pixelOutput[iband];
356  }
357  for(int iband=0;iband<input.nrOfBand();++iband){
358  try{
359  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
360  }
361  catch(string errorstring){
362  cerr << errorstring << "in band " << iband << ", line " << y << endl;
363  }
364  }
365  progress=(1.0+y)/output.nrOfRow();
366  pfnProgress(progress,pszMessage,pProgressArg);
367  }
368 }
369 
370 void filter::Filter::stat(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method)
371 {
372  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
373  assert(output.nrOfCol()==input.nrOfCol());
374  vector<double> lineOutput(output.nrOfCol());
376  stat.setNoDataValues(m_noDataValues);
377  const char* pszMessage;
378  void* pProgressArg=NULL;
379  GDALProgressFunc pfnProgress=GDALTermProgress;
380  double progress=0;
381  pfnProgress(progress,pszMessage,pProgressArg);
382  for(int y=0;y<input.nrOfRow();++y){
383  for(int iband=0;iband<input.nrOfBand();++iband)
384  input.readData(lineInput[iband],GDT_Float64,y,iband);
385  vector<double> pixelInput(input.nrOfBand());
386  for(int x=0;x<input.nrOfCol();++x){
387  pixelInput=lineInput.selectCol(x);
388  switch(getFilterType(method)){
389  case(filter::median):
390  lineOutput[x]=stat.median(pixelInput);
391  break;
392  case(filter::min):
393  lineOutput[x]=stat.mymin(pixelInput);
394  break;
395  case(filter::max):
396  lineOutput[x]=stat.mymax(pixelInput);
397  break;
398  case(filter::sum):
399  lineOutput[x]=stat.sum(pixelInput);
400  break;
401  case(filter::var):
402  lineOutput[x]=stat.var(pixelInput);
403  break;
404  case(filter::stdev):
405  lineOutput[x]=sqrt(stat.var(pixelInput));
406  break;
407  case(filter::mean):
408  lineOutput[x]=stat.mean(pixelInput);
409  break;
410  case(filter::percentile):
411  assert(m_threshold.size());
412  lineOutput[x]=stat.percentile(pixelInput,pixelInput.begin(),pixelInput.end(),m_threshold[0]);
413  break;
414  default:
415  std::string errorString="method not supported";
416  throw(errorString);
417  break;
418  }
419  }
420  try{
421  output.writeData(lineOutput,GDT_Float64,y);
422  }
423  catch(string errorstring){
424  cerr << errorstring << "in line " << y << endl;
425  }
426  progress=(1.0+y)/output.nrOfRow();
427  pfnProgress(progress,pszMessage,pProgressArg);
428  }
429 }
430 
431 void filter::Filter::stats(const ImgReaderGdal& input, ImgWriterGdal& output, const vector<std::string>& methods)
432 {
433  assert(output.nrOfBand()==methods.size());
434  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
435  assert(output.nrOfCol()==input.nrOfCol());
436  Vector2d<double> lineOutput(methods.size(),output.nrOfCol());
438  stat.setNoDataValues(m_noDataValues);
439  const char* pszMessage;
440  void* pProgressArg=NULL;
441  GDALProgressFunc pfnProgress=GDALTermProgress;
442  double progress=0;
443  pfnProgress(progress,pszMessage,pProgressArg);
444  for(int y=0;y<input.nrOfRow();++y){
445  for(int iband=0;iband<input.nrOfBand();++iband)
446  input.readData(lineInput[iband],GDT_Float64,y,iband);
447  vector<double> pixelInput(input.nrOfBand());
448  for(int x=0;x<input.nrOfCol();++x){
449  pixelInput=lineInput.selectCol(x);
450  int ithreshold=0;//threshold to use for percentiles
451  for(int imethod=0;imethod<methods.size();++imethod){
452  switch(getFilterType(methods[imethod])){
453  case(filter::nvalid):
454  lineOutput[imethod][x]=stat.nvalid(pixelInput);
455  break;
456  case(filter::median):
457  lineOutput[imethod][x]=stat.median(pixelInput);
458  break;
459  case(filter::min):
460  lineOutput[imethod][x]=stat.mymin(pixelInput);
461  break;
462  case(filter::max):
463  lineOutput[imethod][x]=stat.mymax(pixelInput);
464  break;
465  case(filter::sum):
466  lineOutput[imethod][x]=stat.sum(pixelInput);
467  break;
468  case(filter::var):
469  lineOutput[imethod][x]=stat.var(pixelInput);
470  break;
471  case(filter::stdev):
472  lineOutput[imethod][x]=sqrt(stat.var(pixelInput));
473  break;
474  case(filter::mean):
475  lineOutput[imethod][x]=stat.mean(pixelInput);
476  break;
477  case(filter::percentile):{
478  assert(m_threshold.size());
479  double threshold=(ithreshold<m_threshold.size())? m_threshold[ithreshold] : m_threshold[0];
480  lineOutput[imethod][x]=stat.percentile(pixelInput,pixelInput.begin(),pixelInput.end(),threshold);
481  ++ithreshold;
482  break;
483  }
484  default:
485  std::string errorString="method not supported";
486  throw(errorString);
487  break;
488  }
489  }
490  }
491  for(int imethod=0;imethod<methods.size();++imethod){
492  try{
493  output.writeData(lineOutput[imethod],GDT_Float64,y,imethod);
494  }
495  catch(string errorstring){
496  cerr << errorstring << "in line " << y << endl;
497  }
498  }
499  progress=(1.0+y)/output.nrOfRow();
500  pfnProgress(progress,pszMessage,pProgressArg);
501  }
502 }
503 
504 void filter::Filter::filter(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim)
505 {
506  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
507  Vector2d<double> lineOutput(input.nrOfBand(),input.nrOfCol());;
508  const char* pszMessage;
509  void* pProgressArg=NULL;
510  GDALProgressFunc pfnProgress=GDALTermProgress;
511  double progress=0;
512  pfnProgress(progress,pszMessage,pProgressArg);
513  for(int y=0;y<input.nrOfRow();++y){
514  for(int iband=0;iband<input.nrOfBand();++iband)
515  input.readData(lineInput[iband],GDT_Float64,y,iband);
516  vector<double> pixelInput(input.nrOfBand());
517  vector<double> pixelOutput;
518  for(int x=0;x<input.nrOfCol();++x){
519  pixelInput=lineInput.selectCol(x);
520  filter(pixelInput,pixelOutput,method,dim);
521  for(int iband=0;iband<pixelOutput.size();++iband){
522  lineOutput[iband][x]=pixelOutput[iband];
523  // if(pixelInput[iband]!=0)
524  // assert(pixelOutput[iband]!=0);
525  }
526  }
527  for(int iband=0;iband<input.nrOfBand();++iband){
528  try{
529  output.writeData(lineOutput[iband],GDT_Float64,y,iband);
530  }
531  catch(string errorstring){
532  cerr << errorstring << "in band " << iband << ", line " << y << endl;
533  }
534  }
535  progress=(1.0+y)/output.nrOfRow();
536  pfnProgress(progress,pszMessage,pProgressArg);
537  }
538 }
539 
540 void filter::Filter::getSavGolayCoefficients(vector<double> &tapz, int np, int nl, int nr, int ld, int m) {
541  int j, k, imj, ipj, kk, mm;
542  double d, fac, sum;
543 
544  // c.resize(nl+1+nr);
545  vector<double> tmpc(np);
546  if(np < nl + nr + 1 || nl < 0 || nr < 0 || ld > m || nl + nr < m) {
547  cerr << "bad args in savgol" << endl;
548  return;
549  }
550  vector<int> indx(m + 1, 0);
551  vector<double> a((m + 1) * (m + 1), 0.0);
552  vector<double> b(m + 1, 0.0);
553 
554  for(ipj = 0; ipj <= (m << 1); ++ipj) {
555  sum = (ipj ? 0.0 : 1.0);
556  for(k = 1; k <= nr; ++k)
557  sum += (int)pow((double)k, (double)ipj);
558  for(k = 1; k <= nl; ++k)
559  sum += (int)pow((double) - k, (double)ipj);
560  mm = (ipj < 2 * m - ipj ? ipj : 2 * m - ipj);
561  for(imj = -mm; imj <= mm; imj += 2)
562  a[(ipj + imj) / 2 * (m + 1) + (ipj - imj) / 2] = sum;
563  }
564  ludcmp(a, indx, d);
565 
566  for(j = 0; j < m + 1; ++j)
567  b[j] = 0.0;
568  b[ld] = 1.0;
569 
570  lubksb(a, indx, b);
571  // for(kk = 0; kk < np; ++kk)
572  // c[kk] = 0.0;
573  for(k = -nl; k <= nr; ++k) {
574  // for(k = -nl; k < nr; ++k) {
575  sum = b[0];
576  fac = 1.0;
577  for(mm = 1; mm <= m; ++mm)
578  sum += b[mm] * (fac *= k);
579  // store in wrap=around order
580  kk = (np - k) % np;
581  //re-order c as I need for taps
582  // kk=k+nl;
583  tmpc[kk] = sum;
584  }
585  tapz.resize(nl+1+nr);
586  // for(k=0;k<nl+1+nr)
587  tapz[tapz.size()/2]=tmpc[0];
588  //past data points
589  for(k=1;k<=tapz.size()/2;++k)
590  tapz[tapz.size()/2-k]=tmpc[k];
591  //future data points
592  for(k=1;k<=tapz.size()/2;++k)
593  tapz[tapz.size()/2+k]=tmpc[np-k];
594 }
595 
596 void filter::Filter::ludcmp(vector<double> &a, vector<int> &indx, double &d) {
597  const double TINY = 1.0e-20;
598  int i, imax = -1, j, k;
599  double big, dum, sum, temp;
600 
601  int n = indx.size();
602  vector<double> vv(n, 0.0);
603 
604  d = 1.0;
605  for(i = 0; i < n; ++i) {
606  big = 0.0;
607  for(j = 0; j < n; ++j)
608  if((temp = fabs(a[i * n + j])) > big) big = temp;
609 
610  if(big == 0.0) {
611  cerr << "Singular matrix in routine ludcmp" << endl;
612  return;
613  }
614  vv[i] = 1. / big;
615  }
616 
617  for(j = 0; j < n; ++j) {
618  for(i = 0; i < j; ++i) {
619  sum = a[i * n + j];
620  for(k = 0; k < i; ++k)
621  sum -= a[i * n + k] * a[k * n + j];
622  a[i * n + j] = sum;
623  }
624  big = 0.0;
625  for(i = j; i < n; ++i) {
626  sum = a[i * n + j];
627  for(k = 0; k < j; ++k)
628  sum -= a[i * n + k] * a[k * n + j];
629  a[i * n + j] = sum;
630  if((dum = vv[i] * fabs(sum)) >= big) {
631  big = dum;
632  imax = i;
633  }
634  }
635 
636  if(j != imax) {
637  for(k = 0; k < n; ++k) {
638  dum = a[imax * n + k];
639  a[imax * n + k] = a[j * n + k];
640  a[j * n + k] = dum;
641  }
642  d = -d;
643  vv[imax] = vv[j];
644  }
645  indx[j] = imax;
646  if(a[j * n + j] == 0.0) a[j * n + j] = TINY;
647  if(j != n - 1) {
648  dum = 1. / a[j * n + j];
649  for(i = j + 1; i < n; ++i)
650  a[i * n + j] *= dum;
651  }
652  }
653 }
654 
655 void filter::Filter::lubksb(vector<double> &a, vector<int> &indx, vector<double> &b) {
656  int i, ii = 0, ip, j;
657  double sum;
658  int n = indx.size();
659 
660  for(i = 0; i < n; ++i) {
661  ip = indx[i];
662  sum = b[ip];
663  b[ip] = b[i];
664  if(ii != 0)
665  for(j = ii - 1; j < i; ++j)
666  sum -= a[i * n + j] * b[j];
667  else if(sum != 0.0)
668  ii = i + 1;
669  b[i] = sum;
670  }
671  for(i = n - 1; i >= 0; --i) {
672  sum = b[i];
673  for(j = i + 1; j < n; ++j)
674  sum -= a[i * n + j] * b[j];
675  b[i] = sum / a[i * n + i];
676  }
677 }
678 
679 double filter::Filter::getCentreWavelength(const std::vector<double> &wavelengthIn, const Vector2d<double>& srf, const std::string& interpolationType, double delta, bool verbose)
680 {
681  assert(srf.size()==2);//[0]: wavelength, [1]: response function
682  int nband=srf[0].size();
683  double start=floor(wavelengthIn[0]);
684  double end=ceil(wavelengthIn.back());
685  if(verbose)
686  std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush;
687 
689 
690  gsl_interp_accel *acc;
691  stat.allocAcc(acc);
692  gsl_spline *spline;
693  stat.getSpline(interpolationType,nband,spline);
694  stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
695  if(verbose)
696  std::cout << "calculating norm of srf" << std::endl << std::flush;
697  double norm=0;
698  norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc);
699  if(verbose)
700  std::cout << "norm of srf: " << norm << std::endl << std::flush;
701  gsl_spline_free(spline);
702  gsl_interp_accel_free(acc);
703  std::vector<double> wavelength_fine;
704  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
705  wavelength_fine.push_back(win);
706 
707  if(verbose)
708  std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl;
709  std::vector<double> srf_fine;//spectral response function, interpolated for wavelength_fine
710 
711  stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose);
712  assert(srf_fine.size()==wavelength_fine.size());
713 
714  gsl_interp_accel *accOut;
715  stat.allocAcc(accOut);
716  gsl_spline *splineOut;
717  stat.getSpline(interpolationType,wavelength_fine.size(),splineOut);
718  assert(splineOut);
719 
720  std::vector<double> wavelengthOut(wavelength_fine.size());
721 
722  for(int iband=0;iband<wavelengthOut.size();++iband)
723  wavelengthOut[iband]=wavelength_fine[iband]*srf_fine[iband];
724 
725  stat.initSpline(splineOut,&(wavelength_fine[0]),&(wavelengthOut[0]),wavelength_fine.size());
726  double centreWavelength=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
727 
728  gsl_spline_free(splineOut);
729  gsl_interp_accel_free(accOut);
730 
731  return(centreWavelength);
732 }
733 
734 // void filter::Filter::applyFwhm(const vector<double> &wavelengthIn, const ImgReaderGdal& input, const vector<double> &wavelengthOut, const vector<double> &fwhm, const std::string& interpolationType, ImgWriterGdal& output, bool verbose){
735 // Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
736 // Vector2d<double> lineOutput(wavelengthOut.size(),input.nrOfCol());
737 // const char* pszMessage;
738 // void* pProgressArg=NULL;
739 // GDALProgressFunc pfnProgress=GDALTermProgress;
740 // double progress=0;
741 // pfnProgress(progress,pszMessage,pProgressArg);
742 // for(int y=0;y<input.nrOfRow();++y){
743 // for(int iband=0;iband<input.nrOfBand();++iband)
744 // input.readData(lineInput[iband],GDT_Float64,y,iband);
745 // applyFwhm<double>(wavelengthIn,lineInput,wavelengthOut,fwhm, interpolationType, lineOutput, verbose);
746 // for(int iband=0;iband<output.nrOfBand();++iband){
747 // try{
748 // output.writeData(lineOutput[iband],GDT_Float64,y,iband);
749 // }
750 // catch(string errorstring){
751 // cerr << errorstring << "in band " << iband << ", line " << y << endl;
752 // }
753 // }
754 // progress=(1.0+y)/output.nrOfRow();
755 // pfnProgress(progress,pszMessage,pProgressArg);
756 // }
757 // }
758 
759 // void filter::Filter::applySrf(const vector<double> &wavelengthIn, const ImgReaderGdal& input, const vector< Vector2d<double> > &srf, const std::string& interpolationType, ImgWriterGdal& output, bool verbose){
760 // assert(output.nrOfBand()==srf.size());
761 // double centreWavelength=0;
762 // Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
763 // const char* pszMessage;
764 // void* pProgressArg=NULL;
765 // GDALProgressFunc pfnProgress=GDALTermProgress;
766 // double progress=0;
767 // pfnProgress(progress,pszMessage,pProgressArg);
768 // for(int y=0;y<input.nrOfRow();++y){
769 // for(int iband=0;iband<input.nrOfBand();++iband)
770 // input.readData(lineInput[iband],GDT_Float64,y,iband);
771 // for(int isrf=0;isrf<srf.size();++isrf){
772 // vector<double> lineOutput(input.nrOfCol());
773 // centreWavelength=applySrf<double>(wavelengthIn,lineInput,srf[isrf], interpolationType, lineOutput, verbose);
774 // for(int iband=0;iband<output.nrOfBand();++iband){
775 // try{
776 // output.writeData(lineOutput,GDT_Float64,y,isrf);
777 // }
778 // catch(string errorstring){
779 // cerr << errorstring << "in band " << iband << ", line " << y << endl;
780 // }
781 // }
782 // }
783 // progress=(1.0+y)/output.nrOfRow();
784 // pfnProgress(progress,pszMessage,pProgressArg);
785 // }
786 // }
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__coll__graph.map0000644000113200011300000000016712616110567030747 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktoolsUtils_1_1pktoolsUtils-members.html0000644000113200011300000001053212647637662024361 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktoolsUtils.pktoolsUtils Member List

This is the complete list of members for qgis.pktoolsUtils.pktoolsUtils, including all inherited members.

PKTOOLS_FOLDER (defined in qgis.pktoolsUtils.pktoolsUtils)qgis.pktoolsUtils.pktoolsUtilsstatic
pktoolsPath (defined in qgis.pktoolsUtils.pktoolsUtils)qgis.pktoolsUtils.pktoolsUtilsstatic
runpktools (defined in qgis.pktoolsUtils.pktoolsUtils)qgis.pktoolsUtils.pktoolsUtilsstatic
pktools-2.6.6/doc/html/inherit_graph_6.md50000644000113200011300000000004012616110567015312 00000000000000be15d991a7fe252377a40da2c00a817fpktools-2.6.6/doc/html/classMainWindow__coll__graph.map0000644000113200011300000000005712616110567020134 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy-members.html0000644000113200011300000002341512647637662025665 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkdiff_accuracy.pkdiff_accuracy Member List

This is the complete list of members for qgis.pkdiff_accuracy.pkdiff_accuracy, including all inherited members.

cliName (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracy
CMFORMAT (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
CMFORMAT_OPTIONS (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
CMOUTPUT (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
defineCharacteristics (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracy
EXTRA (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
FORMAT (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
group (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracy
INPUT (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
ITERATE (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
LABELCLASS (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
LABELREF (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
name (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracy
NODATA (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
OUTPUT (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
processAlgorithm (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracy
REFERENCE (defined in qgis.pkdiff_accuracy.pkdiff_accuracy)qgis.pkdiff_accuracy.pkdiff_accuracystatic
pktools-2.6.6/doc/html/classImgWriterOgr-members.html0000644000113200011300000003315612647637662017614 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ImgWriterOgr Member List

This is the complete list of members for ImgWriterOgr, including all inherited members.

addData(const ImgReaderGdal &imgReader, int layer=0, bool verbose=false) (defined in ImgWriterOgr)ImgWriterOgr
addLineString(std::vector< OGRPoint * > &points, const std::string &fieldName, const std::string &theId, int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
addLineString(std::vector< OGRPoint * > &points, const std::string &fieldName, int theId, int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
addPoint(double x, double y, const std::map< std::string, double > &pointAttributes, std::string fieldName, const std::string &theId, int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
addPoint(double x, double y, const std::map< std::string, double > &pointAttributes, std::string fieldName, int theId, int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
addRing(std::vector< OGRPoint * > &points, const std::string &fieldName, int theId, int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
ascii2ogr(const std::string &filename, const std::string &layername, const std::vector< std::string > &fieldName, const std::vector< OGRFieldType > &fieldType, short colX=1, short colY=2, const std::string &theProjection="", const OGRwkbGeometryType &eGType=wkbPoint, const char fs=' ') (defined in ImgWriterOgr)ImgWriterOgr
close(void) (defined in ImgWriterOgr)ImgWriterOgr
copyFields(const ImgReaderOgr &imgReaderOgr, int srcLayer=0, int targetLayer=0) (defined in ImgWriterOgr)ImgWriterOgr
copyLayer(OGRLayer *poSrcLayer, const std::string &layername, char **papszOptions=NULL) (defined in ImgWriterOgr)ImgWriterOgr
createFeature(int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
createFeature(OGRFeature *theFeature, int layer=0) (defined in ImgWriterOgr)ImgWriterOgr
createField(const std::string &fieldname, const OGRFieldType &fieldType, int theLayer=0) (defined in ImgWriterOgr)ImgWriterOgr
createLayer(const std::string &layername="New layer", const std::string &theProjection="", const OGRwkbGeometryType &eGType=wkbUnknown, char **papszOptions=NULL) (defined in ImgWriterOgr)ImgWriterOgr
getDataSource(void) (defined in ImgWriterOgr)ImgWriterOgrinline
getDriver(void) const (defined in ImgWriterOgr)ImgWriterOgrinline
getFeatureCount(int layer=0) const (defined in ImgWriterOgr)ImgWriterOgr
getFieldCount(int layer=0) const (defined in ImgWriterOgr)ImgWriterOgr
getFields(std::vector< std::string > &fields, int layer=0) const (defined in ImgWriterOgr)ImgWriterOgr
getFields(std::vector< OGRFieldDefn * > &fields, int layer=0) const (defined in ImgWriterOgr)ImgWriterOgr
getLayer(int layer=0) const (defined in ImgWriterOgr)ImgWriterOgrinline
getLayerName(int layer=0) (defined in ImgWriterOgr)ImgWriterOgrinline
ImgWriterOgr(void) (defined in ImgWriterOgr)ImgWriterOgr
ImgWriterOgr(const std::string &filename, const std::string &imageType="ESRI Shapefile") (defined in ImgWriterOgr)ImgWriterOgr
ImgWriterOgr(const std::string &filename, ImgReaderOgr &imgReaderOgr) (defined in ImgWriterOgr)ImgWriterOgr
ImgWriterOgr(const std::string &filename, ImgReaderOgr &imgReaderOgr, bool copyData) (defined in ImgWriterOgr)ImgWriterOgr
m_datasource (defined in ImgWriterOgr)ImgWriterOgrprotected
m_filename (defined in ImgWriterOgr)ImgWriterOgrprotected
open(const std::string &filename, ImgReaderOgr &imgReaderOgr) (defined in ImgWriterOgr)ImgWriterOgr
open(const std::string &filename, const std::string &imageType="ESRI Shapefile") (defined in ImgWriterOgr)ImgWriterOgr
setCodec(const std::string &imageType) (defined in ImgWriterOgr)ImgWriterOgrprotected
setCodec(OGRSFDriver *poDriver) (defined in ImgWriterOgr)ImgWriterOgrprotected
~ImgWriterOgr(void) (defined in ImgWriterOgr)ImgWriterOgr
pktools-2.6.6/doc/html/classFileReaderAscii-members.html0000644000113200011300000002376312647637662020211 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
FileReaderAscii Member List

This is the complete list of members for FileReaderAscii, including all inherited members.

close(void) (defined in FileReaderAscii)FileReaderAscii
FileReaderAscii(void) (defined in FileReaderAscii)FileReaderAscii
FileReaderAscii(const std::string &filename) (defined in FileReaderAscii)FileReaderAscii
FileReaderAscii(const std::string &filename, const char &fieldseparator) (defined in FileReaderAscii)FileReaderAscii
m_comment (defined in FileReaderAscii)FileReaderAsciiprotected
m_filename (defined in FileReaderAscii)FileReaderAsciiprotected
m_fs (defined in FileReaderAscii)FileReaderAsciiprotected
m_ifstream (defined in FileReaderAscii)FileReaderAsciiprotected
m_max (defined in FileReaderAscii)FileReaderAsciiprotected
m_maxRow (defined in FileReaderAscii)FileReaderAsciiprotected
m_min (defined in FileReaderAscii)FileReaderAsciiprotected
m_minRow (defined in FileReaderAscii)FileReaderAsciiprotected
nrOfCol(bool checkCols=false, bool verbose=false) (defined in FileReaderAscii)FileReaderAscii
nrOfRow(bool checkCols=false, bool verbose=false) (defined in FileReaderAscii)FileReaderAscii
open(const std::string &filename) (defined in FileReaderAscii)FileReaderAscii
readData(std::vector< std::vector< T > > &dataVector, const std::vector< int > &cols, double scale=1.0, double offset=0.0, bool transpose=false, bool verbose=false) (defined in FileReaderAscii)FileReaderAscii
readData(std::vector< T > &dataVector, int col, double scale=1.0, double offset=0, bool verbose=false) (defined in FileReaderAscii)FileReaderAscii
reset() (defined in FileReaderAscii)FileReaderAsciiinline
setComment(char comment) (defined in FileReaderAscii)FileReaderAsciiinline
setFieldSeparator(const char &fieldseparator) (defined in FileReaderAscii)FileReaderAsciiinline
setMaxRow(int maxRow) (defined in FileReaderAscii)FileReaderAsciiinline
setMinRow(int minRow) (defined in FileReaderAscii)FileReaderAsciiinline
~FileReaderAscii(void) (defined in FileReaderAscii)FileReaderAscii
pktools-2.6.6/doc/html/structsvm__model-members.html0000644000113200011300000001305212647637662017567 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
svm_model Member List

This is the complete list of members for svm_model, including all inherited members.

free_sv (defined in svm_model)svm_model
l (defined in svm_model)svm_model
label (defined in svm_model)svm_model
nr_class (defined in svm_model)svm_model
nSV (defined in svm_model)svm_model
param (defined in svm_model)svm_model
probA (defined in svm_model)svm_model
probB (defined in svm_model)svm_model
rho (defined in svm_model)svm_model
SV (defined in svm_model)svm_model
sv_coef (defined in svm_model)svm_model
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm__inherit__graph.png0000644000113200011300000000675312616110567025072 00000000000000‰PNG  IHDR½pÄÃæ bKGDÿÿÿ ½§“  IDATxœíÝ{LSgð§´Ð•J(:.ÃQ* °…Ä—]‚F¸Œ‰[™8‰àŒÛd¨Ù¦Â² Øf ›£rqXÅ ØÉõ‡‚3ã¨V(—hÏyÿ8ï{VJQ8oiëËïó‡9çÇyžç×öKO KÃq°DfÆn<“ 7€ È  r¨`f¥RÙÓÓƒa˜a–[±ìíímmm °r#—Ë=zd˜›´bÉåò‘‘‘ÿ«Ü<<< ¹ÜJóçŸl-x}¨€Ü* 7€ È  ÂÔssïÞ=fÈ©¾øâ –ššª¯N£ÑîÝ»GyZã2õÜèÔ××Çáp–cfÇ‹ŠŠœœœ„B¡¾æ\»ví‰'Ðr¶mxÏdn0 {ôèÑrÌÜÑÑqçμ¼¼¶¶¶îîn½ÌÉápˆg¯åkÛðL(7Äóyyy¹››Ûºuë>øàƒééiò«8Ž'$$xyy=|øðå—_F=÷ÜsÄ—FGG£££9Ž££cBB‚R©\¨H‰D/½ô‹Åâr¹€¬ùøøøùù¹»»ÏÊÁq<33sóæÍVVVÛ·o¿rå qš¿q[ª««œœ ˆÃ´ÚFUVVòx?77nÜÀq\­V#„zzzˆbKK q»´¶‰žÀ¹1¡óaãÆÄ†»»{?±ÝØØ¸mÛ¶äääùÇ«Õjb—Çãõ÷÷ë,’C¬­­Åb±D"qttôññùí·ßÌÌÌBEEE*•ŠÃáÐh´-[¶ „´NU½½½žžžäîæÍ›j€¼ O¾±ööö!buÒš5kBæææZÛ&ÅärC|S"„º»»‰»!$‰233‹ŠŠÄb±Öñëׯ§Óé}}}Änoo¯ƒƒƒÎ"9D¡P`V\\,“É8"“ÉÔjµP(LKKÿ¯øøx¡Pˆk\G»aÃÍßݹsg¡ˆí§>Þúúƒæimñç)>ŸßÓÓsëÖ­7ž>}Zó¹=11ÑÕÕU¡PÅññq¢áëëÛ×××ÑÑáááqúôiEr*…BÁb±JJJ¤Rivv6‹ÅR(b±˜N§“ý455!„ZZZÈgÏžutt¼~ýúÇ«««ÝÜÜh4Ú“×Âç§È¶‘Æ©iœ§æµ¶²¢_ßäæænذÃá9r„Œq€B¡puuMLLœ}íµ×V¯^MÔe2YTT”ÝÑ£G …΢æTB¡ÐÅÅÅÂÂÂÝݽ¼¼ÇñØØXÍ~0 sqq9qâ9P­V§§§»¸¸°Ù쀀€òòr[[Û§®Enkµ ¹yºÅçÆ íP$‰ÚÚÚÈÝ’’///#ö£eE¿.6eííí{÷îmii™šš’H$§NЉ‰1vSÆaÐë¶žÌÊÊ*66ÖØ]<Éñãǧ¦¦BCC¥R)—Ë}ï½÷L¼áåCà òww###Û¶m3ÀZ+ñ^Ï0UÂy P¹T@n@…AßO r¹•F©T²X,ìe Ü0™L¦¯+¡ Ãð šwîtspXcì^–`íÚµ†YÈ@¹a³Ù>>>†YK/$’Þ††ËnnÜÈÈmÆîÅÁëÝ.]j&þU©àoÚu€Üè03£*+kEMÕÕu»S¹ÑáÆ»SSÓ!:ݬ¬¬ÙØí˜"È¥¥ÍtºBH¥Â®]kW(fŒÝ‘ÉÜh›œœ¾~ý¶J¥&v§§UUUÆmÉAn´i†!dfF+-m2b?¦ r£­´´Ió²_• ‹ïÊå #¶d‚ 7sÈd“uuÝjõœ÷Þ8ŽWT´«%Ó¹™ãÊ•Í/â8^\ §ª9 7s””4ο Ãp‰¤wxxÌ(-™&ÈÍ?G››`˜Ž ét3‘HÇSÑŠ¹ù‡HÔ¶ÐE³*•º´~øº.Ý覦fìì¬È݉‰iËœÁøÏ·Ö³û§•ËÁ@×¥?‹ìíffî{ë-/c7bŠà<¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r¨€Ü* 7€ È  r(ÑüúßÿÝÂÂÂØ™ &ÓÉÌÌÒØ]˜ŠcÇŽiFeÎÿï700033“˜˜h¬æ€i*..þ믿4+:þ_Høtx ¥¶¶V«¯o@äP¹T,cnø|¾±†›f'Ïhó-cnV¯^®ß9‡††vìØ¡ß9˘6›}ðàAýΉa˜\.×‚%çÇñK—.íÛ·/((èðáí­­|>ÇñË—/GGGÇÇÇß¼y“Ïçk>»6448pÀßß?""¢²²RkNâÈúúú¨¨¨;wž={vvvVsÅŒŒŒ˜˜˜±±±÷ß!ôöÛo_š˜˜HMMݱcÇ®]»222fff*’ôՉΩNž}½§ZrnJKKãââ^ýu›­[·ÆÄÄEooo6›½eË–ýû÷k™Åq\¡PXXXˆD"&“9æC‡9::nÚ´)&&¦ªªŠ(fgg …ÂÄÄD+++­ãU*UMMÍ‘#Gììì¸\îþýû«ªªt—£S½òÊ+r¹¼«« !T]]@§Ó‰áaaa–––þþþ¡ˆˆKKË€€„Ðøø¸ 6ðTKÎÍÐÐÇ#w¹\.BhppÐÙÙ™,¾ð šCÖ¬Y“žžÞÙÙ¹k×®>ú¨½½¦ë܉ '''©TJlwuuyyyýøãóüø1†aöööÄ®ƒƒƒT*ÕY\ŽNtNÅd2_}õÕÚÚZ¥RÙÐÐ@<0KKK„ƒÁÐÚÖÉè <Õ’sÃápz{{É]â×]ëׯ¿ÿ>Y|ðàæééi Ã’’’D"QPPЧŸ~ª3ãýýýÄÆßÿmccCl'''ÇÇÇ×ÔÔ´¶¶jommmff644Dìr8Ååèd¡©ˆ3E}}½««+ùð/•Ñxª%ç&000##£¾¾^&“ݺu+;;!š••ÕÔÔ$—Ë[[[ 4¿i4Ú±cÇêêê&''ggg qv¸zõêää$yعsçîÞ½›››ûÆoE‹õüóÏGDD¤¥¥‘¯p BˆÁ`ðùüï¿ÿ~hhèþýûyyy~~~:‹ËÑÉBSy{{OLL-þ^5zKµägª°°0µZ}þüùÑÑQ.—ûå—_†††ªÕêôôô±±1¸¸¸o¿ý–baañÉ'ŸdeeŒŒØÛÛ'&&Wùœ9sÆËËkÕªUÄa~~~ü1ñâ.22RóüQ]]]XXõâ‹/¾óÎ;¡?üðܹsqqqæææÛ·oŒŒÔY$§Òc'ÑÑÑ:§b0>>>ÕÕÕ>>>‹¿WÞÀRÍùœÄ‹/†……‰ÅâÅØ»worròºuë\\\ˆb]]@ ÈÉÉYÒ$KZw™½£7 ÓçŸnkk{ñâE²¢ŸŸûõõõ}õÕW===ÓÓÓùùùÁÁÁz™˜&ý|žïž={”JåÉ“'GGGíììCBB?|ÕªUK:~ù½£7°Hÿëy ¬Ëuž+ äP¹T@n:ÞO%$$¾`Êúúú4쎴r³uëÖ={ö¨ÕjÃvL—Ëݽ{·feÎûp ^ß* 7€ È  r¨ø7l¡ý†©ɵIEND®B`‚pktools-2.6.6/doc/html/classSolver__inherit__graph.png0000644000113200011300000000500512616110567020050 00000000000000‰PNG  IHDR`pn,âôbKGDÿÿÿ ½§“ ºIDATxœíœkLËÀgK‘—*¯ðª€€ À•ˆyXÁGb”QA"h?¡ˆQyÅ¢1$R%NŒA´ˆ‡ðP %—¢y‰¬S–PiÙ½Ö¬µGéaiï=óû´;;³ûŸ_wfg»»ƒ‘$  ÃÒtÚ ‚€A`«W,11±¯¯oyCaww÷‚‚5 bê]Å0 Û°aƒ¥¥¥eWžÏŸ?¿yóF½šªyÂÃÃÔ.¾’<}ú4;;[½²¨‚€A@‚ AÔ嵐ÌÎΖ••={öL"‘XXXðx¼ÈÈÈU«Vý2óØØØñãÇŸ­««»{÷îÈÈHåVÆf³ýýý›ššüýýéÄS§NÆÆÆbæçç?99É\ð4êÿ”™™ù¿õw‡z5E÷b H$ ‚€AP øòåKÇ—1æ n}Õ„T úiy14ô24ôbbÏöööêÕTÍ‘4ÌÏü‘ ‰rX,LÓá|G‹ú çÏ%’‰ooÔt,?Ð"A¼`³Yºº¬º4Ë´EL&¯«ëQ(æår¢®®G&“k:¢ïh‹ ææ>ZŠL&onÖ–wk´EPeå ûÞ1cVYùB³ñÐh… ©TÖØøf~ž Vçç‰ÆÆ7R©L³QQh… ¿þê%ˆŸFAÖ×3õ¨kIh… ¡ð…ÊhŒ$I¡P+Z™æMLL··¡œHd{ûÀÄÄ´¦¢¢Ñ¼ ÚÚÿürÜŒaXmmÏÊÇ£‚æÝ¿ÿB¥¢ BFŒ466%}X@èéùðñãוJfKB™œÄmlLéˆ+êëëR«,krrÚÆÆTcñ©ý\Œ!âãÿܺuBÓü@ó}–ƒA@‚ A H$ ‚€A@‚ A H$ ‚€A@‚ A H$ ‚€A@‚ A H$ ‚¡üñ˜ƒƒƒfƒa³ÍÙlsx>&qtt\ðƒ: Ã’““·oß®Áø4ËóçÏóòò”¨¾Äéëë¾²QicõA H$Â’á8žššêèèh``àââ’™™)“-øåÛàà ýá2‚aXxx¸r‡ª| ÃUò«¤ü>K”ÐÝÝ]YY9::ZRRR]]ÍçóÕ;ö?A(ÒÓV2‹ò PQQ±øL¦¦¦ôjKK —Ë](óÀÀPwr‡EÄÇǯY³F,ÿý@€•ü*) AIWNYòdll|óæÍ/_¾P«~~~ïß¿§–¿~ýmnnngg—ššªÜô>œ’’B-ûöÃáÔÕÕär9ŸÏ·²²²´´äóùr¹œj,MMM\.·µµu¡0’““ÝÜÜâââH¦¿5Q1 =ƒêëëmmmõôô‚‚‚®]»622BoŠŒŒäñxCCC"‘ÈÃÃ#++‹þaïÝ»Çår ‚ I²ººÚÆÆF.—“$™››:::*‰6oÞœžžNÙ¿ss3Žã¿Œ000Ðßßo``PZZÊè´dA$I*ŠŽŽŽœœ»wï’$977§££óêÕ+*ÏÇé¸gffŒŒŒ:;;I’|ÌÎÎR›D"‘¾¾¾rÜiii8Žõ÷÷S‰*s°š˜˜PEæææ ƒ®ðüü¼¿¿ppp¿² zÿTÿDÐÒú ªžôÜĆíÝ»W¡P¬¬¬ttt†‡‡©MCCCÔ´¢4ÇŽ …=Ú²e =y¯¹¹9úÔÔ532@WW÷wâa±X¥¥¥mmm·oߦ¹\®òE½¯¯ÍfÛÛÛ/©¦?ÕYù—6±'N¸ººÖÖÖ µµµùúúž={–ÚÁãñ†‡‡{{{7nܘ‘‘¡|Q}³‹‹KYY½·ÄÄݰ°‘‘‘žžžmÛ¶9sæw.|àç3¢¨¨ˆQ«ëÖ­«©©nllôöö>yòäâ;¤Y†>H¡Pdeeyyy888œ;wŽnV‰$**ÊÌÌÌÚÚ:99yvvV¥¶qqq«W¯Vîz¥RiLL ‡Ã133‹‹‹›™™QCAAAAt)¹\~õêÕõë×ëëë;99]¸pafffñÒ,O'ýÌ2Œƒþmhø«çÅYè>Ž\Á‘µZÐJŠXÔÄ A HÕçbžžžVVV H³Œ÷öö’ =KII¡î9ÿµp8jPN£]“›h!¨‚€A@‚ Aþ ®5Ðô¯íIEND®B`‚pktools-2.6.6/doc/html/classFeatureSelector.html0000644000113200011300000001502112647637662016666 00000000000000 pktools: FeatureSelector Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
FeatureSelector Class Reference

Public Member Functions

template<class T >
double forward (std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int maxFeatures=0, short verbose=0)
 
template<class T >
double backward (std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int minFeatures, short verbose=0)
 
template<class T >
double floating (std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int maxFeatures=0, double epsilon=0.001, short verbose=0)
 
template<class T >
double bruteForce (std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int maxFeatures=0, short verbose=0)
 

Detailed Description

Definition at line 35 of file FeatureSelector.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass__inherit__graph.png0000644000113200011300000000742312616110567026543 00000000000000‰PNG  IHDRÝp$â}bKGDÿÿÿ ½§“ÈIDATxœíÝkPçðw!\*¤,—B… h‡§SgZÀz„2е€`µ¥ ÖjÁ)§:2¶Tq eHÔÆKŽÄÁª´ÊåõµV.5B$@²{>ì9{Ò9¢Á¼ÄÿïCg÷e÷Ý'ÉCv‰IJP…ÀŒ‰¡ ôàz p½8b:€nJ¥²µµ•$IC1rNNNööö†N¡¦½”Éd=Âó.32™¬¿¿Ï;Ó^Ò|}} Á˜ýþûðDp} p½8‚^A/ŽŒ­—mmmA¼È©¾úê+‚ 8 ¯ OÚ ˆ¶¶¶gžvv1¶^êÔÑÑÁápfbfŠ¢ÊÊÊ\]]E"‘¾æœ7o^ZZšÉØø{)zI’ä£Gfb榦¦;wî644´´´èeN‡C?ûÎ\lüÍâ^Òç»3gÎxyy988lß¾}llŒù)EQ;wîô÷÷ÿ믿/^Œzíµ×è nܸ‘ÃḸ¸ìܹS©T>i!‹ß~ûmKKKww÷ââbf¼¬¬, $$ÄÛÛ{òS&EQÀÇLJÍf/[¶ììÙ³ô zò±èÛrùòeWW×'NЛiÅF]¼x‘ËåÚÚÚòù|z„ ˆãÇ¿ùæ›ööö(..^°`;}ûôvG…¥¾¾>‰D2õ6­­­¡ÐÐЖ––šš.—›‘‘A’$É”’ّْÇã···766úùùeddèdö’Ëå ···°°ÅbÉårŠ¢H’\°`P(¤(ê‹/¾ðõõÕ FQT~~¾³³óÏ?ÿ<00péÒ%.—K?éXáááUUU ôfZ±B|ðL&«¨¨@Ñ7 !´nÝ:™LVPP€Z³fL& …ÌShnnnnnžÞó¢Ìú^666Ò«"‘ˆËåÒƒ©©©¡{÷îinI/›šš2Gee%—ËÕ9Èì%•JÍÌÌ:ôøñc’$‡‡‡Õj5EQ555,‹~økkkBMMMš‡óóóûᇘÀ¥¥¥¡)ŽEßf÷ɽ¼rå EQjµ!ÔÚÚJÖÕÕÑ·Kk™Þ` 8÷rŸÇižžžô‚··wWW½|óæÍÀÀÀìììÉÛ÷õõ©Õjz•Ëåvuuédv±µµ•H$555...W¯^511A•••©T*‡CÄ¢E‹BZ§òööv???fÕÇÇçI˜›0õurrBÑGgÌ;!dff¦µ<«Íú^ÒO*¡––úaC‰Åb@PVV&‘H´¶Ÿ?¾©©iGG½ÚÞÞîìì¬sÙE¡P$yòäI©T¿råJ©TªV«E"ÑáLJÿ+%%E$QŸKqssÓü7è;wî<)½üû¤¯—Àð7ë{¹cÇŽ¶¶¶›7oîÙ³'..Ž´²²òòòÚ½{wrr2óŒ\.G™™™ÅÄÄlß¾½³³³¹¹yïÞ½<Oç s‚ BCC+**d2Ùøø¸™™Ùœ9s®^½ÚßßÏãñ¬ÿ+66¶µµ•¾:¤mݺ555õâÅ‹=ªªªÊÈÈ bêcMFÇ~éúBB·§¿¾,((pssãp8Û¶mS(š×d …báÂ…éééï¿ÿ¾µµ5=.•Jׯ_oggçèèøé§Ÿ* ƒšS‰D"sssooï3gÎP•””ª™‡$I´´4fGµZ““ãááaccvæÌ{{ûÿ{,fY+6Ò¸dD×—“µ–ŸçëËYßËç‰Åↆfµ¼¼Üßß߀y´àÜËYÇYccc\\\]]ÝèèhMM;}û jvÀú}ÁSc³ÙIII†N1•ÔÔÔÑÑÑÈÈÈww÷>úóÀø (,¿× ¿¿ÿöíÛ†bÌè× ðüPœÇŽ —GÐK€#è%ÀÖ÷ôô:‚1S*•–––†N¡¦½´°° B_ï´}H’:z´6*ÊËÙy®¡³Lüyó A7L{icc`èÓPSÓ~ýúO^^î<^ ¡³¸¾ÔS§jéÿªTðJz½ÔƒñqUee=Bhhh´ºúž¡ãè¥\¹rwtt !djjRYYkè8Æz©µ¦¦&!•мp¡Q¡7t¢Yzù¼FFÆþùÏf•JM¯Ž©.]ºmØHFzù¼4K‰21!**n0q€^>¯ŠŠ[š»Q©H‰ä®L¦0`$#½|.RéHuu‹Zý·×†(Š:¾ÑP‘Œôò¹œ=û¯ÉƒE< §òç½|.åå7'¿±š$©ššö¾¾!ƒD2ÐËg×Ó3X[{Ÿ$u¼áßÔÔD,ÖñT žôòىŠOúŠJ¥®¨€ØŸ¦ïÛ˜FGÇÙ̪\>fiiÆbýçWý¥ùjŒéçÎf#'§O‚ ÿø‡¿¡ƒ8A/Ž —GÐK€#è%Àôàz p½8‚^A/Ž —GÐK€#è%Àôàz p½8‚^A/Ž —GÐK€#è%Àôàz p½8‚^A/Ž —GÐK€#è%Àôàz p½8‚^,QÜÜÜ g³°p51™c賕¹¹ù/¿üÂTño߯~ÿþýÕ«Wûøø*xiíß¿¿»»›YÕþÞŸÀÀÀš„öï߯¹ ×—GÐK€#è%Àôàh¦zÙÝÝd¨Ý2‰AôÂ2k™©^Z[[¯[·N¿sööö®ZµJ¿s<ÍT/mll6oÞ¬ß9I’”Édúàiz½¤(êÔ©S6lˆˆˆØºuk}}}PPEQ?ýôÓÆW¬X‘’’rãÆ   ÍçÿëׯÇÇLJ††ÆÆÆ^¼xQkNzËk×®­_¿>**êÛo¿˜˜ÐŸ/—˵ŽuãÆÄÄݰ°èèèÒÒÒ)â_æ§1½ÿŸî¹sç¾ÿþû””Ÿ¶¶6>Ÿ:þ|qqqjjêÂ… ÛÚÚrrr4wQ*•Û¶m{ï½÷~ýõׯ¿þzéÒ¥–––Z3Ÿ>}šÏçgee±Ùì„EQB¡°®®îðáÃl6ûèÑ£qqq•••ô.GŽ‘J¥@¡PdffΙ3gÆ “é©ô›„~Ì~üñÇÝ»w{zz–——÷öö …Bú·¢¨¨ˆÍfWWWóù|‚ Ìü£P(B,+((è›o¾éíííìì,,, Ñ98sIK–,ÉÏÏïëëëèèHMM=}úthhhAAAgggggç‘#Gúúú4·Ÿ˜˜P©T,k||¼¨¨!4::ª3ž1ež–éÇcbbÔjõwß}788èîîž”””™™©V«srr†††|}}“““<ÈìbnnþùçŸ …Âþþ~''§ôôtsss„СC‡üýý­¬¬èÍBBB>ûì3¥RÌãñ4Ï¿±±±—/_.--]¿~ý[o½}þüy„ÐŽ;rss“““ÍÌÌ–-[Æãñt2Sé1 óØÓâããsss ‚XºtiRR’‰‰‰R©Üµk—R©\¼xqRR’æöÖÖÖ[¶lÉÌÌ|å•WbccƒƒƒSSSO:¥3žÑdž‚¢¨ÿ­DzzúÓ¿Ï­»»;...;;ÛÁÁÁÃì®®...ÎÏÏŸÖ$‰d:±g>IžÞl̬SPPH$Z³f ½ª‡×Õ;::²²²Z[[ÇÆÆnß¾}üøñ+V<ÿ´àe6½ó¸Nk×®U*•{÷îttt _¹råÓïnee5­íg>IžÞlÌü4žë<€¾èÿ<€ÞA/Ž —GÐK€#í¿Ç‹‹‹Ïž=k(0þÖË”””* x™yzzj¾½ão¯€ ¸¾8‚^A/Ž —Gÿs TNföèIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_14.png0000644000113200011300000000262512616110570015475 00000000000000‰PNG  IHDR}%à?qèbKGDÿÿÿ ½§“JIDAThíš]HSoÇŸóo›:_–Y Ò\ƒAÌnJLº É‹nÊ-,Œ¦à$»ˆt¬0ò"‚d±;Å‚ °‹mÒ`Ì"Ò¨y¡ÛBÙD]Ùb;²7ÏÎÿâ¡Ãig›f¶z>Wçíûü¾Ï÷<ç7ÎaI’€£àüǶ= —;;p¹³—;;ðè;‹‹‹===ñxœ-7»­VÛÚÚJíþ–»ËåW©TwµËùüù³ÅbÉ™;Äb±ÐÒž@­Vgáú;;p¹³—;;p¹³ÃvrG²ñõëWAÔÆVä%%%(ŠnÓþ/6-šÁÇyüøñßÔúÓ¢t¶¹Þ?}úøýû÷ëõú?•cVWWwåÊ•B~ž#IÒd2I¥R³Ù¼ 95Ó?šrйŸÏ—ë¬ÏçË?H†|uu°ºººiÝt©TJ§Ó>|X,ëtºT*Åòù|@ ‰òHÆÇÇëëë…Bauu5lA ™LV^^ÞØØ899™K½ÿ^*•:N€Éd:wîÜùóçår9}ÉÛíö“'O×ÔÔŒŽŽ666¤Ré¡C‡®_¿þóçO°C}f›ëEÑ(T*E­8úÒ¼|ùòââ"†a§Nº{÷n†|yyùæÍ›†œ)‰D" ££ciiéÕ«W€`0h4Åb±Õj]YYyóæD"E™rè§¥¥åÇ8ާÓécÇŽ=}ú”$Éþþ~…Bëâ8^TT422ž?Îãñp7 …ð¹¹¹Ó§O÷õõÑ'¸õ‡Œ¹Þ·™{v»=«¹\à¶ÃáP*•LyYY™×ë¥gJ‰Ä—/_p'bbbàóùd2Ù‹/(ÕË—/aQ¦úÁ0 t¹\<omm$É©©)ÀÜÜI’¡PˆÏç?yò$§Óéh4Jĉ'¬V+z½^¸ÍfîÌþžÕMqq1=b‘H”!___ïíí=sæ 5NV‰Íf;{ö¬R©Ôh4P^RR‚¢(¥š™™E™rè'™LÂ+oß¾qãïß¿O9ÎÖÖÖÒÒÒ¦¦¦·oßÂÑà]Ùt¦ùù‡ý=+¤"‡Ã.—+ã¡PxãÆ ÇCþz˜’X,¦V«u:Ýôôôðð0¼ìèÑ£³³³Ô8'E>Ÿ Âl6FªCÞ¹sÇl6“$‹ÅÒéôØØX(êìì¼xñb(’H$ß¿‡# (úèÑ£Jæßæ~éÒ¥{÷îùý~ Ã.\¸044廉¢"â8žK’H$’ɤ@ ˆÅb€h4ÚÝÝ­Óél6Û?Þ½{÷àÁƒ­Tüøñc0¼víZÙ/®^½êóùPE¤¹¹ùõëבH$™Lòù|¡PØÞÞÞßßïv»Ýn÷­[·ü~ÿŽEC_ü;Þg"‘ˆF£©¬¬¬ªªêêêZ__gÊ ‚¨¨¨XXXÈ#18räÈððp[[›X,ÞØØ0 Ç/--mhh€ë:«œîG«Õ677Óm§ÓéÚÚZ½^§_[[+är¹Íf#I2÷õõI$‘HÔÖÖ‡sÍ4?Ì>ƒ´:‹ÅRàW˜=üLÿÀÎ}Ÿa.wvàrg.wvàrg.wvàrg‡,ÿãxöìYá}ìn¾}ûVSSóÛ!úK”ÓéÜ·oKÞv9½½½9ßW9 ×ßÙ˸ÜÙËþ†€êÂLå ›IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_33.map0000644000113200011300000000037312647437044015501 00000000000000 pktools-2.6.6/doc/html/pkcrop__gui_2mainwindow_8h_source.html0000644000113200011300000003310612647637661021345 00000000000000 pktools: /home/kempenep/pktools/qt/pkcrop_gui/mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.h
1 /**********************************************************************
2 mainwindow.h: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #ifndef MAINWINDOW_H
22 #define MAINWINDOW_H
23 
24 #include <QMainWindow>
25 #include <QModelIndex>
26 #include <QShortcut>
27 #include <QListWidget>
28 
29 namespace Ui {
30 class MainWindow;
31 }
32 
33 class MainWindow : public QMainWindow
34 {
35  Q_OBJECT
36 
37 public:
38  explicit MainWindow(QWidget *parent = 0);
39  ~MainWindow();
40 
41 private slots:
42  void on_actionInput_triggered();
43 
44  void on_toolButton_input_clicked();
45 
46  void on_toolButton_extent_clicked();
47 
48  void on_toolButton_output_clicked();
49 
50  void on_toolButton_ct_clicked();
51 
52  void on_toolButton_Run_clicked();
53 
54  void on_toolButton_defaults_clicked();
55 
56  void on_actionQuit_triggered();
57 
58  void on_actionOutput_triggered();
59 
60  void on_autoscale_clicked();
61 
62  void on_actionExtent_triggered();
63 
64  void on_manual_clicked();
65 
66  void on_noscale_clicked();
67 
68  void deleteItem();
69 
70  void on_toolButton_clicked();
71 
72 private:
73  Ui::MainWindow *ui;
74  void setDefaults();
75  bool m_manual;
76  bool m_as;
77 };
78 
79 #endif // MAINWINDOW_H
pktools-2.6.6/doc/html/classImgReaderGdal__inherit__graph.md50000644000113200011300000000004012647437043021125 000000000000009e99f02914c34ccf4dabd913c84e35b4pktools-2.6.6/doc/html/pkextract_8py_source.html0000644000113200011300000011755312647637661016745 00000000000000 pktools: /home/kempenep/pktools/qgis/pkextract.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkextract.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterRaster
30 from processing.core.parameters import ParameterVector
31 from processing.core.outputs import OutputVector
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 FORMATS = [
39  'ESRI Shapefile',
40  'GeoJSON',
41  'GeoRSS',
42  'SQLite',
43  'GMT',
44  'MapInfo File',
45  'INTERLIS 1',
46  'INTERLIS 2',
47  'GML',
48  'Geoconcept',
49  'DXF',
50  'DGN',
51  'CSV',
52  'BNA',
53  'S57',
54  'KML',
55  'GPX',
56  'PGDump',
57  'GPSTrackMaker',
58  'ODS',
59  'XLSX',
60  'PDF',
61 ]
62 EXTS = [
63  '.shp',
64  '.geojson',
65  '.xml',
66  '.sqlite',
67  '.gmt',
68  '.tab',
69  '.ili',
70  '.ili',
71  '.gml',
72  '.txt',
73  '.dxf',
74  '.dgn',
75  '.csv',
76  '.bna',
77  '.000',
78  '.kml',
79  '.gpx',
80  '.pgdump',
81  '.gtm',
82  '.ods',
83  '.xlsx',
84  '.pdf',
85 ]
86 
87 class pkextract(pktoolsAlgorithm):
88 
89  INPUT = "INPUT"
90  SAMPLE = "SAMPLE"
91  ITERATE = "ITERATE"
92  OUTPUT = "OUTPUT"
93 
94  RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'count', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
95 
96  RULE = "RULE"
97  POLYGON = "POLYGON"
98  BUFFER = "BUFFER"
99  SRCNODATA = "SRCNODATA"
100  BNDNODATA = "BNDNODATA"
101 
102  EXTRA = 'EXTRA'
103 
104  FORMAT = "FORMAT"
105 
106  def cliName(self):
107  return "pkextract"
108 
109  def defineCharacteristics(self):
110  self.name = "extract vector sample from raster"
111  self.group = "[pktools] raster/vector"
112  self.addParameter(ParameterRaster(self.INPUT, 'Input raster data set'))
113  self.addParameter(ParameterVector(self.SAMPLE, 'Sample vector data set'))
114  self.addParameter(ParameterBoolean(self.ITERATE, "Iterate over all layers",True))
115  self.addParameter(ParameterSelection(self.RULE,"extraction rule",self.RULE_OPTIONS, 0))
116 
117  self.addOutput(OutputVector(self.OUTPUT, 'Output vector data set'))
118  self.addParameter(ParameterSelection(self.FORMAT,
119  'Destination Format', FORMATS))
120 
121  self.addParameter(ParameterBoolean(self.POLYGON, "Create OGRPolygon as geometry instead of OGRPoint",False))
122  self.addParameter(ParameterNumber(self.BUFFER, "Buffer for calculating statistics for point features",0,19,0))
123  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
124  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
125 
126  self.addParameter(ParameterString(self.EXTRA,
127  'Additional parameters', '', optional=True))
128 
129  def processAlgorithm(self, progress):
130  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
131  commands = [cliPath]
132 
133  input=self.getParameterValue(self.INPUT)
134  commands.append('-i')
135  commands.append('"' + input + '"')
136 
137  sample=self.getParameterValue(self.SAMPLE)
138  if self.getParameterValue(self.ITERATE):
139  if str(sample).find('|')>0:
140  samplename=str(sample)[:str(sample).find('|')]
141  else:
142  samplename=str(sample)
143  else:
144  samplename=str(sample).replace("|layername"," -ln")
145  commands.append('-s')
146  commands.append(samplename)
147 
148  if self.getParameterValue(self.POLYGON):
149  commands.append("-polygon")
150 
151  commands.append("-r")
152  commands.append(self.RULE_OPTIONS[self.getParameterValue(self.RULE)])
153 
154  output = self.getOutputFromName(self.OUTPUT)
155  outFile = output.value
156  formatIdx = self.getParameterValue(self.FORMAT)
157  outFormat = '"' + FORMATS[formatIdx] + '"'
158  commands.append('-f')
159  commands.append(outFormat)
160  ext = EXTS[formatIdx]
161  if not outFile.endswith(ext):
162  outFile += ext
163  output.value = outFile
164  commands.append('-o')
165  commands.append('"' + outFile + '"')
166 
167  buffer=self.getParameterValue(self.BUFFER)
168  if buffer > 1:
169  commands.append("-buf")
170  commands.append(str(buffer))
171 
172  srcnodata=self.getParameterValue(self.SRCNODATA)
173  if srcnodata != "none":
174  srcnodataValues = srcnodata.split(';')
175  for srcnodataValue in srcnodataValues:
176  commands.append('-srcnodata')
177  commands.append(srcnodataValue)
178  bndnodata=self.getParameterValue(self.BNDNODATA)
179  bndnodataValues = bndnodata.split(';')
180  for bndnodataValue in bndnodataValues:
181  commands.append('-bndnodata')
182  commands.append(bndnodataValue)
183 
184  extra = str(self.getParameterValue(self.EXTRA))
185  if len(extra) > 0:
186  commands.append(extra)
187 
188  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/pkdiff__gui_2mainwindow_8cpp_source.html0000644000113200011300000007434512647637661021657 00000000000000 pktools: /home/kempenep/pktools/qt/pkdiff_gui/mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.cpp
1 /**********************************************************************
2 mainwindow.cpp: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "mainwindow.h"
21 #include "ui_mainwindow.h"
22 #include <QFileDialog>
23 #include <QStandardItemModel>
24 #include <QMessageBox>
25 #include <QProcess>
26 
27 MainWindow::MainWindow(QWidget *parent) :
28  QMainWindow(parent),
29  ui(new Ui::MainWindow)
30 {
31  ui->setupUi(this);
32  QStringList formatlist;
33  formatlist << "SQLite" << "ESRI Shapefile";
34  ui->f->addItems(formatlist);
35  setDefaults();
36 }
37 
38 MainWindow::~MainWindow()
39 {
40  delete ui;
41 }
42 
43 void MainWindow::setDefaults()
44 {
45  //tab input/output
46  ui->input->clear();
47  ui->reference->clear();
48  ui->msknodata->setText("0");
49  ui->output->clear();
50  ui->confusion->setChecked(false);
51 }
52 
53 void MainWindow::on_actionReference_triggered()
54 {
55  QString qsreference= QFileDialog::getOpenFileName(this, "Reference");
56  ui->reference->setText(qsreference);
57 }
58 
59 void MainWindow::on_actionMask_triggered()
60 {
61  QString qsmask = QFileDialog::getOpenFileName(this, "Mask");
62  ui->mask->setText(qsmask);
63 }
64 
65 void MainWindow::on_actionOutput_triggered()
66 {
67  QString qsoutput = QFileDialog::getSaveFileName(this,"Output image","","*.*");
68  ui->output->setText(qsoutput);
69 }
70 
71 void MainWindow::on_actionInput_triggered()
72 {
73  QString qsinput = QFileDialog::getOpenFileName(this, "Input");
74  ui->input->setText(qsinput);
75 }
76 
77 void MainWindow::on_toolButton_input_clicked()
78 {
79  on_actionInput_triggered();
80 }
81 
82 void MainWindow::on_toolButton_mask_clicked()
83 {
84  on_actionMask_triggered();
85 }
86 
87 void MainWindow::on_toolButton_output_clicked()
88 {
89  on_actionOutput_triggered();
90 }
91 
92 void MainWindow::on_toolButton_reference_clicked()
93 {
94  on_actionReference_triggered();
95 }
96 
97 void MainWindow::setClassTable(const QStringList &labels)
98 {
99  QStandardItemModel *model = new QStandardItemModel(labels.size(),2,this); //nlabel rows and 2 columns
100  model->setHorizontalHeaderItem(0, new QStandardItem(QString("label name")));
101  model->setHorizontalHeaderItem(1, new QStandardItem(QString("class nr")));
102  for(int ilabel=0;ilabel<labels.size();++ilabel){
103  QStandardItem *firstCol = new QStandardItem(QString(labels[ilabel]));
104  model->setItem(ilabel,0,firstCol);
105  QStandardItem *secondCol = new QStandardItem(QString::number(ilabel+1));
106  model->setItem(ilabel,1,secondCol);
107  }
108  ui->tableView_labels->setModel(model);
109 }
110 
111 void MainWindow::on_pushButton_run_clicked()
112 {
113  try{
114  ui->commandLineEdit->clear();
115  ui->consoleEdit->clear();
116  QString program = "pkdiff";
117  if(ui->input->text().isEmpty()){
118  MainWindow::on_actionInput_triggered();
119  if(ui->input->text().isEmpty()){
120  QString qsError="No input raster dataset selected";
121  throw(qsError);
122  }
123  }
124  if(ui->reference->text().isEmpty()){
125  MainWindow::on_actionReference_triggered();
126  if(ui->reference->text().isEmpty()){
127  QString qsError="No reference vector file selected";
128  throw(qsError);
129  }
130  }
131  for(int irow=0;irow<ui->tableView_labels->model()->rowCount();++irow){
132  QString qsOption;
133  qsOption+=" --class ";
134  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,0)).toString();
135  qsOption+=" --reclass ";
136  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,1)).toString();
137  program+=qsOption;
138  }
139 
140  QList<QComboBox*> qcomboBoxList = this->findChildren<QComboBox *>();
141 
142  for(QList<QComboBox*>::ConstIterator qcbit=qcomboBoxList.begin();qcbit!=qcomboBoxList.end();++qcbit){
143  QString qsOption;
144  qsOption+=" --";
145  qsOption+=(*qcbit)->objectName();
146  program+=qsOption;
147  program+=" ";
148  program+=(*qcbit)->currentText();
149  }
150 
151  QList<QLineEdit*> qlineEditList = this->findChildren<QLineEdit *>();
152 
153  for(QList<QLineEdit*>::ConstIterator qlbit=qlineEditList.begin();qlbit!=qlineEditList.end();++qlbit){
154  if(!((*qlbit)->text().isEmpty())){
155  QString qsOption;
156  qsOption+=" --";
157  qsOption+=(*qlbit)->objectName();
158  qsOption+=" ";
159  qsOption+=(*qlbit)->text();
160  program+=qsOption;
161  }
162  }
163 
164  if(ui->confusion->isChecked())
165  program+=" --confusion";
166 
167  ui->commandLineEdit->setText(program);
168 
169 // QProcess *myProcess = new QProcess(parent);
170  QProcess *myProcess = new QProcess(this);
171  myProcess->start(program);
172  myProcess->setProcessChannelMode(QProcess::MergedChannels);
173  this->setCursor(Qt::WaitCursor);
174  myProcess->waitForFinished(-1);
175  this->setCursor(Qt::ArrowCursor);
176  QMessageBox msgBox;
177  QString p_stderr = myProcess->readAllStandardError();
178  if(!p_stderr.isEmpty()){
179  msgBox.setText(p_stderr);
180  msgBox.exec();
181  }
182  QString p_stdout = myProcess->readAll();
183  ui->consoleEdit->insertPlainText(p_stdout);
184  delete myProcess;
185  }
186  catch(QString qsError){
187  QMessageBox msgBox;
188  msgBox.setText(qsError);
189  msgBox.exec();
190  }
191 }
192 
193 void MainWindow::on_pushButton_restore_clicked()
194 {
195  setDefaults();
196 }
197 
198 void MainWindow::on_commandLinkButtonPrepareTable_clicked()
199 {
200  int nclass=ui->nclass->text().toInt();
201  QStringList labels;
202  for(int iclass=1;iclass<=nclass;++iclass){
203  QString lstring="label";
204  lstring+=QString::number(iclass);
205  labels << lstring;
206  }
207  setClassTable(labels);
208 }
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__coll__graph.md50000644000113200011300000000004012616110566030644 00000000000000e6760bfbce67e55c523cf5ac056d08d1pktools-2.6.6/doc/html/hierarchy.html0000644000113200011300000012130212647637663014523 00000000000000 pktools: Class Hierarchy
pktools  2.6.6
Processing Kernel for geospatial data
Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 123]
oCCache
oCCompare_IndexValue
oCCompare_PosValue
oCconfusionmatrix::ConfusionMatrix
oCCostFactory
oCDataModel
oCdecision_function
oCDecrease_IndexValue
oCDecrease_PosValue
oCEgcs
oCstd::exceptionSTL class
oCFeatureSelector
oCFileReaderAscii
oCFileReaderLas
oCfilter::Filter
oCfilter2d::Filter2d
oCFilterI
oCImgRasterGdal
oCImgReaderOgr
oCimgregression::ImgRegression
oCImgWriterOgr
oCIncrease_IndexValue
oCIncrease_PosValue
oCIndexValue
oCFANN::neural_net
oCOptFactory
oCqgis.pktoolsUtils.pktoolsUtils
oCqgis.pktools.pktoolsUtils.pktoolsUtils
oCPosValue
oCqgis.pktools.ProcessingPktoolsPlugin.ProcessingPktoolsPlugin
oCqgis.ProcessingPktoolsPlugin.ProcessingPktoolsPlugin
oCQMainWindow
oCQMatrix
oCSolver::SolutionInfo
oCSolver
oCstatfactory::StatFactory
oCsvm_model
oCsvm_node
oCsvm_parameter
oCsvm_problem
oCFANN::training_data
oCUi_MainWindow
oCstd::vector< T >STL class
oCAlgorithmProvider
oCGeoAlgorithm
\CpktoolsAlgorithm
pktools-2.6.6/doc/html/md_examples_pksvm.html0000644000113200011300000000770212647637662016271 00000000000000 pktools: examples_pksvm
pktools  2.6.6
Processing Kernel for geospatial data
examples_pksvm

Examples of pksvm

Classify input image input.tif with a support vector machine. A training sample that is provided as an OGR vector dataset. It contains all features (same dimensionality as input.tif) in its fields (please check 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 colourtable (a five column text file: image value, RED, GREEN, BLUE, ALPHA) has also been provided.

pksvm -i input.tif -t training.sqlite -o output.tif -cv 2 -ct colourtable.txt -cc 1000 -g 0.1

Classification using bootstrap aggregation. The training sample is randomly split in three subsamples (33% of the original sample each).

pksvm -i input.tif -t training.sqlite -o output.tif -bs 33 -bag 3

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

pksvm -i input.tif -t training.sqlite -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
pktools-2.6.6/doc/html/inherit_graph_43.map0000644000113200011300000000030012647437044015470 00000000000000 pktools-2.6.6/doc/html/classSolver__inherit__graph.map0000644000113200011300000000022212616110567020035 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem.html0000644000113200011300000002347612647637662022330 00000000000000 pktools: qgis.pkfilterdem.pkfilterdem Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkfilterdem.pkfilterdem Class Reference
Inheritance diagram for qgis.pkfilterdem.pkfilterdem:
Collaboration diagram for qgis.pkfilterdem.pkfilterdem:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string DIM = "DIM"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
list FILTER_OPTIONS = ["promorph"]
 
string FILTER = "FILTER"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 39 of file pkfilterdem.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract__inherit__graph.map0000644000113200011300000000013312616110567026557 00000000000000 pktools-2.6.6/doc/html/classImgWriterGdal.html0000644000113200011300000011160312647637662016276 00000000000000 pktools: ImgWriterGdal Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for ImgWriterGdal:
Collaboration diagram for ImgWriterGdal:

Public Member Functions

void open (const std::string &filename)
 
void open (const std::string &filename, const ImgReaderGdal &imgSrc, const std::vector< std::string > &options=std::vector< std::string >())
 
void open (const std::string &filename, int ncol, int nrow, int nband, const GDALDataType &dataType, const std::string &imageType, const std::vector< std::string > &options=std::vector< std::string >())
 
void close (void)
 
void copyGeoTransform (const ImgReaderGdal &imgSrc)
 
void setProjection (const std::string &projection)
 
std::string setProjectionProj4 (const std::string &projection)
 
void setImageDescription (const std::string &imageDescription)
 
void setGeoTransform (double *gt)
 
template<typename T >
bool writeData (T &value, const GDALDataType &dataType, int col, int row, int band=0) const
 
template<typename T >
bool writeData (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const
 
template<typename T >
bool writeData (std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const
 
bool writeData (void *pdata, const GDALDataType &dataType, int band=0) const
 
template<typename T >
bool writeDataBlock (Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const
 
void setColorTable (const std::string &filename, int band=0)
 
void setColorTable (GDALColorTable *colorTable, int band=0)
 
void setMetadata (char **metadata)
 
void rasterizeOgr (ImgReaderOgr &ogrReader, const std::vector< double > &burnValues=std::vector< double >(), const std::vector< std::string > &layernames=std::vector< std::string >())
 
- Public Member Functions inherited from ImgRasterGdal
std::string getFileName () const
 
int nrOfCol (void) const
 
int nrOfRow (void) const
 
int nrOfBand (void) const
 
bool isGeoRef () const
 
std::string getProjection (void) const
 
std::string getProjectionRef (void) const
 
std::string getGeoTransform () const
 
void getGeoTransform (double *gt) const
 
bool getBoundingBox (double &ulx, double &uly, double &lrx, double &lry) const
 
bool getCenterPos (double &x, double &y) const
 
double getUlx () const
 
double getUly () const
 
double getLrx () const
 
double getLry () const
 
int getNoDataValues (std::vector< double > &noDataValues) const
 
bool isNoData (double value) const
 
int pushNoDataValue (double noDataValue)
 
int setNoData (const std::vector< double > nodata)
 
CPLErr GDALSetNoDataValue (double noDataValue, int band=0)
 
bool covers (double x, double y) const
 
bool covers (double ulx, double uly, double lrx, double lry) const
 
bool geo2image (double x, double y, double &i, double &j) const
 
bool image2geo (double i, double j, double &x, double &y) const
 
double getDeltaX (void) const
 
double getDeltaY (void) const
 
GDALDataType getDataType (int band=0) const
 
GDALRasterBand * getRasterBand (int band=0)
 
GDALColorTable * getColorTable (int band=0) const
 
std::string getDriverDescription () const
 
std::string getImageType () const
 
std::string getInterleave () const
 
std::string getCompression () const
 
GDALDataset * getDataset ()
 
char ** getMetadata ()
 
char ** getMetadata () const
 
void getMetadata (std::list< std::string > &metadata) const
 
std::string getDescription () const
 
std::string getMetadataItem () const
 
std::string getImageDescription () const
 

Protected Member Functions

void setCodec (const GDALDataType &dataType, const std::string &imageType)
 
void setCodec (const ImgReaderGdal &ImgSrc)
 

Protected Attributes

std::vector< std::string > m_options
 
- Protected Attributes inherited from ImgRasterGdal
std::string m_filename
 
GDALDataset * m_gds
 
int m_ncol
 
int m_nrow
 
int m_nband
 
double m_gt [6]
 
std::vector< double > m_noDataValues
 

Detailed Description

Definition at line 33 of file ImgWriterGdal.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/pkdiff.html0000644000113200011300000002031712647637662014013 00000000000000 pktools: pkdiff
pktools  2.6.6
Processing Kernel for geospatial data
pkdiff

program to compare two raster image files

SYNOPSIS

Usage: pkdiff -i input -ref reference

Options: [-ln layer] [-b band] [-cm] [-lr attribute] [-c name -r value]* [-nodata value]* [-m mask] [-msknodata value]*

Advanced options: [-o output] [-f OGR format] [-lc attribute] [-bnd value [-hom] [-circ]] [-ct colortable] [-co NAME=VALUE]*

Description

The utility pkdiff compares two datasets. The reference can either be a raster or a vector, but the input must be a raster dataset. In case the reference is a raster dataset, a pixel by pixel comparison is performed. With no further options, the utility reports if the rasters are identical or different. If required, an output raster dataset can be written with a qualitative information per pixel: 0 (input=reference), 1 (input>reference) or 2 (input<reference). If, however, the reference is a vector dataset, it must consist of point features. Polygon features are automatically converted to the centroid points before analyzing.

A typical use of the utility is to assess the accuracy of an input raster land cover map, based on a reference vector dataset. The reference dataset must contain an attribute (label) for each class. A confusion matrix is produced if the option -cm|–confusion is set. Here too, an output dataset can be written, which will be a vector dataset in this case. It contains the reference feature points with the extracted data value of the raster input dataset as a new attribute.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input raster dataset.
    ref reference std::string Reference (raster or vector) dataset
    ln ln std::string Layer name(s) in sample. Leave empty to select all (for vector reference datasets only)
    b band short 0 Input (reference) raster band. Optionally, you can define different bands for input and reference bands respectively: -b 1 -b 0.
    rmse rmse bool false Report root mean squared error
    reg reg bool false Report linear regression (Input = c0+c1*Reference)
    cm confusion bool false Create confusion matrix (to std out)
    lr lref std::string label Attribute name of the reference label (for vector reference datasets only)
    c class std::string List of class names.
    r reclass short List of class values (use same order as in classname option).
    nodata nodata double No data value(s) in input or reference dataset are ignored
    m mask std::string Use the first band of the specified file as a validity mask. Nodata values can be set with the option msknodata.
    msknodata msknodata double 0 Mask value(s) where image is invalid. Use negative value for valid data (example: use -t -1: if only -1 is valid value)
    o output std::string Output dataset (optional)
    f f std::string SQLite OGR format for output vector (for vector reference datasets only)
    of oformat std::string GTiff Output image format (see also gdal_translate).
    lc lclass std::string class Attribute name of the classified label (for vector reference datasets only)
    cmf cmf std::string ascii Format for confusion matrix (ascii or latex)
    cmo cmo std::string Output file for confusion matrix
    se95 se95 bool false Report standard error for 95 confidence interval
    bnd boundary short 1 Boundary for selecting the sample (for vector reference datasets only)
    hom homogeneous bool false Only take regions with homogeneous boundary into account (for reference datasets only)
    circ circular bool false Use circular boundary (for vector reference datasets only)
    ct ct std::string Color table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid).
    co co std::string Creation option for output file. Multiple options can be specified.
    commission short 2 Value for commission errors: input label < reference label
    Usage: pkdiff -i input -ref reference

Examples

Some examples how to use pkdiff can be found here

pktools-2.6.6/doc/html/inherit_graph_38.png0000644000113200011300000000330112647437044015507 00000000000000‰PNG  IHDRÍ%nÉúÑbKGDÿÿÿ ½§“vIDATxœí›_LIÇg[ä("”H6HUh¡’LŠ/¾í£^ *½ø˜öÁZ[iUWŸA¨ú BÐg*€>ƒPA,>›ŸŸ×ét»víâp8B¡°¡¡!ÊRˆÝnGd 7!LH ‚ 2™,tVZ‚ v»=,>¬d]Äâ³óçÏwvvº\®æææ'Ožèõú˜Ä›¹¹£ÑvåÊc [¢[Ë¿0$F£‘¢ÊðˆZñÕØºu+±@BðêÕ+>Ÿ¿RðäääZ>36d2ñ¥\ÎÂÖÕõGuu3Ÿ_ƒ¢ZÕ¸\3q’ Àh4FaBJ¥2##czzzyE€ÉÉɰø°’•ˆè¢Xú3.—{ÿþý™™âtÿþý?~$Ž=ÏéÓ§333·oß®ÓéB‡ƒ#GŽ\¼x‘8^\\LOOúô)Ã0½^Ÿ••µmÛ6½^aÑ[­V>Ÿßßß¿.m>ŸÿñãßOžlÊÏ¿¢T¶Z,aØÌÚûÄjµZ‘H¤P(ðøï ‹ÅgMMMV«5;;ûСCdŽ*•ÊívÛl¶îîîžžž7n—ªªª:;;‰&õôô$''K¥RÀíÛ·?|øðöí[«ÕúâÅ ƒÁ@Äߺu«µµµ´´t-’`oïŸju[I‰A£ùíåË¿1l)Ä™3V†Â²Ùì––‹ÅÒÚÚ¯¦’¬ÚãE$ ^»v­¸¸˜Íf·µµá8î÷ûÙlöøø8c2™Ù{½Þ””›Í†ãøñãÇkkk‰0‘HDvݽ½½b±˜¸etttU2™L*ýI¯7Ô¢¨fÇŠjVúcθ‰3 à¿qðÎ;\.×årÅuÜŒðÞ):^¯×l6Ëd2‰D"‘Hêëë.]º$—Ë¿|ù²´´”——GD ·ÛMÞ˜œœ|øðᎎŽÂÂB³ÙüîÝ;¢|jj EQ2,--8‰D«Š™žNu8ÒFGˆS¿?%X"ùu= § z£P©T&“éìÙ³÷îÝ -ÇCS|Ãëº}†ã¸\.‰Db±€ ˆT*}øð! ++‹Íf;ÎÂÂB€ÃáÈÎν·ªªêÂ… b±¸¬¬L(…™™™}}}àñx>þL”oÙ²eU1<žÃXÁà·{611!ºÏ®_¯àñR×ÛÞõòãÍÑ•@‹ÅzôèÑž={ |>ßn·“ULLL$$$lhsÀª=ÞrN:•ŸŸßÕÕåp8^¿~]^^®ÑhˆKr¹üÀN§sll¬¨¨È`0„öÆÄÓ«P(lii!?M­VWVVNMMŒŒH$•Jµö9ß|ÿ~º±±»¬ìÕääÔ0|ÜdBÁ·ãàƒˆÅ3âÔ`0äåå™Íf§Ói±XJKK«««×˜ˆ.ŠÅg@àêÕ«%%%gçΗ/_öù|Ä¥ÙÙÙ'Nðx<EµZ­Ïç k³B¡HMMŸŸ'KæææÎœ9“žžÎãñ …×ëÁg$##®úzSQQŠjø|3}Æ„†ù, ƒPô„ "ÌBß?0§Ó™››K·Šp¬V«Çã¡[m E( ]´íïïg³Ù” Û555k\§¦†ïùÂ$Ë·m~ó>‰ðù BÐg*€>ƒPô„ þÜÒ¨¬Ù‰IEND®B`‚pktools-2.6.6/doc/html/pkstatogr.html0000644000113200011300000001347412647637662014574 00000000000000 pktools: pkstatogr
pktools  2.6.6
Processing Kernel for geospatial data
pkstatogr

program to calculate basic statistics from vector file

SYNOPSIS

Usage: pkstatogr -i input [-n attribute]*

Options: [-ln layer]* [-n attribute]* [srcnodata]* [src_min] [src_max] [-s] [-mm] [-min] [-max] [-mean] [-median] [-stdev] [-hist] [-nbin] [-rel] [-kde]

Description

The utility pkstatogr calculates basic statistics on attributes of a vector file. Examples of the basic statistics include: minimum, maximum, median, mean and standard deviation. Histograms (in percentage or absolute values) can also be calculated. The attribute of interest can be selected using the option -n|–fname. Values defined by the -nodata option, or not withing the limits set by the options -src_min and -src_max are ignored for the statistics.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input OGR vector file
    n fname std::string Fields on which to calculate statistics
    ln lname std::string Layer name(s) in sample (leave empty to select all)
    nodata nodata double Set nodata value(s)
    src_min src_min double Set minimum value for histogram
    src_max src_max double Set maximum value for histogram
    s size bool false Sample size (number of points)
    mm minmax bool false Calculate minimum and maximum value
    min min bool false Calculate minimum value
    max max bool false Calculate maximum value
    mean mean bool false Calculate mean value
    median median bool false Calculate median value
    stdev stdev bool false Calculate standard deviation
    hist hist bool false Calculate histogram
    nbin nbin unsigned int Number of bins
    rel relative bool false Use percentiles for histogram to calculate histogram
    kde kde bool false Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb
    Usage: pkstatogr -i input [-n attribute]*

Examples

Some examples how to use pkstatogr can be found here

pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask__coll__graph.png0000644000113200011300000000676112616110567024010 00000000000000‰PNG  IHDRÀpÇtè%bKGDÿÿÿ ½§“ ¦IDATxœíÝTSuðï`“ÃD”†"RO¿ÎÉ£ #ˆÜç¹Ï¸.l?¯¿îýr¿ßïç o £á8Žø»\]XØ @€ (¡Ûs2¹\>11aÏïC¡¡¡v›Î®R*•ÞÞÞîîîöœô¾299©T*m€Bl6ÛÏÏÏΓÞ?~ÿý÷¾¾>{Î÷@€ (J@€nÞ¼I£Ñì9ÔG}D£Ñ:4W5XëN£ÑnÞ¼ù·‡u @) ‹5#ã8.‘H¥Ré\¹téÒ ù,ÛQj€0 ûã?æcäÞÞÞëׯWTTtww÷÷÷Ïɘ,‹8ŸÍ_ÙŽâ\"NõuuukÖ¬ñóóÛ·oßää$ùQdz³³###GFFžxâ „¿¿?ñ¡ÑÑÑ]»v±X,6›­Óé¬5’êëë~øaƒ"‹Év‰D²qãÆÍ›7‡……M? á8^RRîííýôÓOŸ9s†¸6MŸ‹XKsss``àñãljÃÌÊF555q¹\Ÿ‚‚¢…F£UVV®]»vÙ²e‡‹ÅÁÁÁL&óàÁƒsö‰žC¸Éd²áááËå¡èèèþþþööv.—+ ‰F ÃÈôG’“’’¢¢¢zzz"""„B¡ÅF²×øø¸»»{IIÉÐÐPEENÇqðàà`‘H„ãøûï¿¿nÝ:ÓÂp/++ 8{ö¬J¥:þ<—Ë%Ú­Í{ñâÅîînâ0³²BÏ?ÿ¼F£©­­EKC%&&j4šòòr„жmÛ4H$"˜Áðð°L&³ù C3¨§§‡Ø•J¥\.—hÌÉÉAݸqÃôHb{jjÊÕÕõ‡~ vO:Åår-6’½Ôjõ’%K>|çÎ ÃÆÆÆŒF#Žãííít:ø:]¹r!ÔÛÛk:]DDÄ—_~I\UU…ša.b-d÷éjiiÁqÜh4"„är9ÑØÕÕE¬Ël›8`ös]Âä¯r‰íï¿ÿ~Ó¦MùùùÓ6‡Øår¹ƒƒƒÉ.>>>2™¬½½ÍfoܸñÛo¿uqqAI$ƒÁÀb±h4ÚúõëBfW±ˆˆr7<<ÜZäf^ìÊ•+BÄì$///„Ð’%K̶3ˆø6Eõ÷÷Ÿ_„P}}}II‰D"‘ÉdfÇ/_¾ÜÕÕU¡P»É.Z­ðêêjµZššºe˵Zm4¥RiaaáØÿdeeI¥RÜä©ß   ü‘ܽ~ýºµˆíY¿ðsõ …ÃØótw—0'—Ë;::BCCsssMOûyyy«W¯ÖjµDãØØÑ.¢¢¢ Eooïºuërss-6’CiµZƒQSS£R©JKK †V«•Éd®®®¦vvv"„ºººÈŽGŽa³ÙçÎinn^³f F›y.|Ú%Œ,™\•É%lz£Ù¶5p$G•——±X¬×_Ì q€V«]½zu^^ž^¯ê©§<==‰vµZ’’âëë»bÅŠýû÷kµZ‹¦CI¥R‡ãææVWW‡ãxFFFtt´i=†q8œFcQQ‡Ãa2™111uuuË–-›u.rÛ¬lmî1@v«ço¨¯¯ïîî&wkjj"##X¸‰vv===ÉÉÉ]]]íííLKKstQŽdïÊfæíí‘‘áè*f’““311ÁçóU*UHHÈ«¯¾êäÏ7nÇ?,lii ‡'çñDâ¦M›ì6#\Â% @ P”Øû§°ÑÑQƒÁ`çIïãããvžÑ®rww¿}û¶=g¤èÂ…_B›7¯rp¶`0öœÎ®?Æ/,F#öä!„zzþéâ²Àå9oàȪ¶¶›jõ]µz¼µua?÷>¯ @VUWwÒé.K–¸TWïèZœÈ2NßÐpÍ`0êõXCÃ5Nï芜Ȳ‹¯“¡Ñéô/^wl=N dYmm'ù¬ F«­ítl=N dF£»p¡ÏhĈ]£»p¡O£ÑÍÜëþ²àìÙ^ ûË«†Ÿ;×ë¨zœÈ‚ššN³WÇp¯©«˜ s*ÕXk«Ã0ÓF Ã[[å*Õ˜£ªrZ sgÎt[|Ý™F£9sÍþõ89¹ÿ»Ó숀a¼¢8è/”Ê;==·¬]»vëöíQûWåÌœë¡z‡_¹r)yD¼–È`ü÷¯K]\\FFÆV®\ê°úœü6~&ÿB‰D;]ˆó‚K (J @€ (J @€ (J @€ (J @€ (J @€ (J @€ (J @€ (J @€ 7äèrœ ΢ÓYŽ®Â¹¬ZµÊ43ùw4mëÖ­ááá¬8³¾¾¾êêjÓ̘ÿ“Íððp{¾m=XèàP”@€% @É|H©Tòx·œ|-ó &“™žž>OƒÏ Ã0Fã¨Ùç–“¯Å¶á8þÕW_íܹó¹çžÛ»wïÕ«Wy<Žã_ýõ®]»âââ²²²ÚÚÚx<žé²µµ5555::Z 455™Iyùòå”””øøø#GŽèõzÓ‹‹‹ÓÒÒþüóOkC †’’’øøøøøø’’ƒÁðÚk¯!„^|ñEâ×ØØ¸sçN>Ÿ_UUÕÔÔ”˜˜WYYIÐÖÖ¶{÷˜„„„ªªªYË6«jQ®åÙ †††'N¤¥¥‰Åâ;v „¾ùæ±X¼wïÞªªª¤¤¤£GšvÑétB¡ÏçK$’”””O?ýT§³ðîµ§OŸ.((ÈÏÏÿî»ïÈeã8.‰ººº ™L¦µ¡jjj†††D"ÑgŸ}ÖÕÕuìØ±/¾ø!têÔ)rü+W®§§§—••µµµUTTdffŠÅbF311‘››zòäÉÌÌ̲²²ÑÑÑÊ6«jq¯eV¶¨¶¶vÏž=6lðõõ}üñÇÓÒÒÈÆG}”Éd®_¿þ•W^1í¢×ëq×jµnnn111õõõîîîÓGÎÌÌd³Ùk×®MKK;þ<ÑXZZ*•Jóòò¼½½gª±±ñ7Þðóó ÉÈÈèèè˜>þöíÛ=<<¢££BÀÃÃ#&&!466æææVQQ±oß>___???„ÐÝ»wg(Û¬ªÅ½–YÙ ¡¡!.—K„ „nß¾L6®ZµÊ´‹——WQQQ__ßÖ­[ß|óÍžžòýØM±Ùlb#00P¥RÛ7n܈ŒŒùä“z½¾±±ÑZÙ«š>àbZˬl;ÅÆÆ_¾|Y­Vwtt”––"„ø|¾H$êììÔh4W¯^=~ü¸é9†F£½ýöÛ—.]"Î¥t:8644ܽ{—<ìóÏ?W*•?ýôSyyù3ÏqâDFFBˆÏçoÛ¶­¨¨H H$’={ö˜Þ޹¹¹½ûî»"‘襗^ª®®ÎËËsssC>|xtôÿï?ºyóæ·ÞzëwÞyì±Ç’’’L'¡ªª*kC¥¦¦zxxìÞ½{ÿþý'##Ãßßÿ¡‡JHH¸—Eyzzfff~üñÇ;vìð÷÷ŠŠÊÉɱ6×ôªÙZleþ pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
MainWindow Member List

This is the complete list of members for MainWindow, including all inherited members.

MainWindow(QWidget *parent=0) (defined in MainWindow)MainWindowexplicit
MainWindow(QWidget *parent=0) (defined in MainWindow)MainWindowexplicit
MainWindow(QWidget *parent=0) (defined in MainWindow)MainWindowexplicit
MainWindow(QWidget *parent=0) (defined in MainWindow)MainWindowexplicit
MainWindow(QWidget *parent=0) (defined in MainWindow)MainWindowexplicit
~MainWindow() (defined in MainWindow)MainWindow
~MainWindow() (defined in MainWindow)MainWindow
~MainWindow() (defined in MainWindow)MainWindow
~MainWindow() (defined in MainWindow)MainWindow
~MainWindow() (defined in MainWindow)MainWindow
pktools-2.6.6/doc/html/pkcrop_8cc_source.html0000644000113200011300000035754312647637661016200 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkcrop.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcrop.cc
1 /**********************************************************************
2 pkcrop.cc: perform raster data operations on image such as crop, extract and stack bands
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19  ***********************************************************************/
20 #include <assert.h>
21 #include <cstdlib>
22 #include <string>
23 #include <list>
24 #include <iostream>
25 #include <algorithm>
26 #include "imageclasses/ImgWriterGdal.h"
27 #include "imageclasses/ImgReaderGdal.h"
28 #include "imageclasses/ImgReaderOgr.h"
29 #include "base/Optionpk.h"
30 #include "algorithms/Egcs.h"
31 
32 /******************************************************************************/
99 using namespace std;
100 
101 int main(int argc, char *argv[])
102 {
103  Optionpk<string> input_opt("i", "input", "Input image file(s). If input contains multiple images, a multi-band output is created");
104  Optionpk<string> output_opt("o", "output", "Output image file");
105  Optionpk<string> projection_opt("a_srs", "a_srs", "Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid");
106  //todo: support layer names
107  Optionpk<string> extent_opt("e", "extent", "get boundary from extent from polygons in vector file");
108  Optionpk<bool> cut_opt("cut", "crop_to_cutline", "Crop the extent of the target dataset to the extent of the cutline.",false);
109  Optionpk<string> mask_opt("m", "mask", "Use the the specified file as a validity mask (0 is nodata).");
110  Optionpk<float> msknodata_opt("msknodata", "msknodata", "Mask value not to consider for crop.", 0);
111  Optionpk<short> mskband_opt("mskband", "mskband", "Mask band to read (0 indexed). Provide band for each mask.", 0);
112  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box", 0.0);
113  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box", 0.0);
114  Optionpk<double> lrx_opt("lrx", "lrx", "Lower right x value bounding box", 0.0);
115  Optionpk<double> lry_opt("lry", "lry", "Lower right y value bounding box", 0.0);
116  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter) (empty: keep original resolution)");
117  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter) (empty: keep original resolution)");
118  Optionpk<double> cx_opt("x", "x", "x-coordinate of image center to crop (in meter)");
119  Optionpk<double> cy_opt("y", "y", "y-coordinate of image center to crop (in meter)");
120  Optionpk<double> nx_opt("nx", "nx", "image size in x to crop (in meter)");
121  Optionpk<double> ny_opt("ny", "ny", "image size in y to crop (in meter)");
122  Optionpk<int> ns_opt("ns", "ns", "number of samples to crop (in pixels)");
123  Optionpk<int> nl_opt("nl", "nl", "number of lines to crop (in pixels)");
124  Optionpk<unsigned short> band_opt("b", "band", "band index to crop (leave empty to retain all bands)");
125  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
126  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
127  Optionpk<double> autoscale_opt("as", "autoscale", "scale output to min and max, e.g., --autoscale 0 --autoscale 255");
128  Optionpk<double> scale_opt("scale", "scale", "output=scale*input+offset");
129  Optionpk<double> offset_opt("offset", "offset", "output=scale*input+offset");
130  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","");
131  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
132  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
133  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
134  Optionpk<float> nodata_opt("nodata", "nodata", "Nodata value to put in image if out of bounds.");
135  Optionpk<string> resample_opt("r", "resampling-method", "Resampling method (near: nearest neighbor, bilinear: bi-linear interpolation).", "near");
136  Optionpk<string> description_opt("d", "description", "Set image description");
137  Optionpk<bool> align_opt("align", "align", "Align output bounding box to input image",false);
138  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0,2);
139 
140  extent_opt.setHide(1);
141  cut_opt.setHide(1);
142  bstart_opt.setHide(1);
143  bend_opt.setHide(1);
144  mask_opt.setHide(1);
145  msknodata_opt.setHide(1);
146  mskband_opt.setHide(1);
147  option_opt.setHide(1);
148  cx_opt.setHide(1);
149  cy_opt.setHide(1);
150  nx_opt.setHide(1);
151  ny_opt.setHide(1);
152  ns_opt.setHide(1);
153  nl_opt.setHide(1);
154  scale_opt.setHide(1);
155  offset_opt.setHide(1);
156  nodata_opt.setHide(1);
157  description_opt.setHide(1);
158 
159  bool doProcess;//stop process when program was invoked with help option (-h --help)
160  try{
161  doProcess=input_opt.retrieveOption(argc,argv);
162  output_opt.retrieveOption(argc,argv);
163  projection_opt.retrieveOption(argc,argv);
164  ulx_opt.retrieveOption(argc,argv);
165  uly_opt.retrieveOption(argc,argv);
166  lrx_opt.retrieveOption(argc,argv);
167  lry_opt.retrieveOption(argc,argv);
168  band_opt.retrieveOption(argc,argv);
169  bstart_opt.retrieveOption(argc,argv);
170  bend_opt.retrieveOption(argc,argv);
171  autoscale_opt.retrieveOption(argc,argv);
172  otype_opt.retrieveOption(argc,argv);
173  oformat_opt.retrieveOption(argc,argv);
174  colorTable_opt.retrieveOption(argc,argv);
175  dx_opt.retrieveOption(argc,argv);
176  dy_opt.retrieveOption(argc,argv);
177  resample_opt.retrieveOption(argc,argv);
178  extent_opt.retrieveOption(argc,argv);
179  cut_opt.retrieveOption(argc,argv);
180  mask_opt.retrieveOption(argc,argv);
181  msknodata_opt.retrieveOption(argc,argv);
182  mskband_opt.retrieveOption(argc,argv);
183  option_opt.retrieveOption(argc,argv);
184  cx_opt.retrieveOption(argc,argv);
185  cy_opt.retrieveOption(argc,argv);
186  nx_opt.retrieveOption(argc,argv);
187  ny_opt.retrieveOption(argc,argv);
188  ns_opt.retrieveOption(argc,argv);
189  nl_opt.retrieveOption(argc,argv);
190  scale_opt.retrieveOption(argc,argv);
191  offset_opt.retrieveOption(argc,argv);
192  nodata_opt.retrieveOption(argc,argv);
193  description_opt.retrieveOption(argc,argv);
194  align_opt.retrieveOption(argc,argv);
195  verbose_opt.retrieveOption(argc,argv);
196  }
197  catch(string predefinedString){
198  std::cout << predefinedString << std::endl;
199  exit(0);
200  }
201  if(verbose_opt[0])
202  cout << setprecision(12) << "--ulx=" << ulx_opt[0] << " --uly=" << uly_opt[0] << " --lrx=" << lrx_opt[0] << " --lry=" << lry_opt[0] << endl;
203 
204  if(!doProcess){
205  cout << endl;
206  cout << "Usage: pkcrop -i input -o output" << endl;
207  cout << endl;
208  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
209  exit(0);//help was invoked, stop processing
210  }
211  if(input_opt.empty()){
212  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
213  exit(0);
214  }
215  if(output_opt.empty()){
216  std::cerr << "No output file provided (use option -o). Use --help for help information" << std::endl;
217  exit(0);
218  }
219 
220  float nodataValue=nodata_opt.size()? nodata_opt[0] : 0;
221  RESAMPLE theResample;
222  if(resample_opt[0]=="near"){
223  theResample=NEAR;
224  if(verbose_opt[0])
225  cout << "resampling: nearest neighbor" << endl;
226  }
227  else if(resample_opt[0]=="bilinear"){
228  theResample=BILINEAR;
229  if(verbose_opt[0])
230  cout << "resampling: bilinear interpolation" << endl;
231  }
232  else{
233  std::cout << "Error: resampling method " << resample_opt[0] << " not supported" << std::endl;
234  exit(1);
235  }
236 
237  const char* pszMessage;
238  void* pProgressArg=NULL;
239  GDALProgressFunc pfnProgress=GDALTermProgress;
240  double progress=0;
241  pfnProgress(progress,pszMessage,pProgressArg);
242  ImgReaderGdal imgReader;
243  ImgWriterGdal imgWriter;
244  //open input images to extract number of bands and spatial resolution
245  int ncropband=0;//total number of bands to write
246  double dx=0;
247  double dy=0;
248  if(dx_opt.size())
249  dx=dx_opt[0];
250  if(dy_opt.size())
251  dy=dy_opt[0];
252 
253  //convert start and end band options to vector of band indexes
254  try{
255  if(bstart_opt.size()){
256  if(bend_opt.size()!=bstart_opt.size()){
257  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
258  throw(errorstring);
259  }
260  band_opt.clear();
261  for(int ipair=0;ipair<bstart_opt.size();++ipair){
262  if(bend_opt[ipair]<=bstart_opt[ipair]){
263  string errorstring="Error: index for end band must be smaller then start band";
264  throw(errorstring);
265  }
266  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
267  band_opt.push_back(iband);
268  }
269  }
270  }
271  catch(string error){
272  cerr << error << std::endl;
273  exit(1);
274  }
275 
276  bool isGeoRef=false;
277  string projectionString;
278  for(int iimg=0;iimg<input_opt.size();++iimg){
279  imgReader.open(input_opt[iimg]);
280  if(!isGeoRef)
281  isGeoRef=imgReader.isGeoRef();
282  if(imgReader.isGeoRef()&&projection_opt.empty())
283  projectionString=imgReader.getProjection();
284  if(dx_opt.empty()){
285  if(!iimg||imgReader.getDeltaX()<dx)
286  dx=imgReader.getDeltaX();
287  }
288  if(dy_opt.empty()){
289  if(!iimg||imgReader.getDeltaY()<dy)
290  dy=imgReader.getDeltaY();
291  }
292  if(band_opt.size())
293  ncropband+=band_opt.size();
294  else
295  ncropband+=imgReader.nrOfBand();
296  imgReader.close();
297  }
298 
299  GDALDataType theType=GDT_Unknown;
300  if(verbose_opt[0])
301  cout << "possible output data types: ";
302  for(int iType = 0; iType < GDT_TypeCount; ++iType){
303  if(verbose_opt[0])
304  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
305  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
306  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
307  otype_opt[0].c_str()))
308  theType=(GDALDataType) iType;
309  }
310  if(verbose_opt[0]){
311  cout << endl;
312  if(theType==GDT_Unknown)
313  cout << "Unknown output pixel type: " << otype_opt[0] << endl;
314  else
315  cout << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
316  }
317  //bounding box of cropped image
318  double cropulx=ulx_opt[0];
319  double cropuly=uly_opt[0];
320  double croplrx=lrx_opt[0];
321  double croplry=lry_opt[0];
322  //get bounding box from extentReader if defined
323  ImgReaderOgr extentReader;
324 
325  if(extent_opt.size()){
326  double e_ulx;
327  double e_uly;
328  double e_lrx;
329  double e_lry;
330  for(int iextent=0;iextent<extent_opt.size();++iextent){
331  extentReader.open(extent_opt[iextent]);
332  if(!(extentReader.getExtent(e_ulx,e_uly,e_lrx,e_lry))){
333  cerr << "Error: could not get extent from " << extent_opt[0] << endl;
334  exit(1);
335  }
336  if(!iextent){
337  ulx_opt[0]=e_ulx;
338  uly_opt[0]=e_uly;
339  lrx_opt[0]=e_lrx;
340  lry_opt[0]=e_lry;
341  }
342  else{
343  if(e_ulx<ulx_opt[0])
344  ulx_opt[0]=e_ulx;
345  if(e_uly>uly_opt[0])
346  uly_opt[0]=e_uly;
347  if(e_lrx>lrx_opt[0])
348  lrx_opt[0]=e_lrx;
349  if(e_lry<lry_opt[0])
350  lry_opt[0]=e_lry;
351  }
352  extentReader.close();
353  }
354  if(cut_opt.size())
355  extentReader.open(extent_opt[0]);
356  }
357  else if(cx_opt.size()&&cy_opt.size()&&nx_opt.size()&&ny_opt.size()){
358  ulx_opt[0]=cx_opt[0]-nx_opt[0]/2.0;
359  uly_opt[0]=(isGeoRef) ? cy_opt[0]+ny_opt[0]/2.0 : cy_opt[0]-ny_opt[0]/2.0;
360  lrx_opt[0]=cx_opt[0]+nx_opt[0]/2.0;
361  lry_opt[0]=(isGeoRef) ? cy_opt[0]-ny_opt[0]/2.0 : cy_opt[0]+ny_opt[0]/2.0;
362  // if(cropulx<ulx_opt[0])
363  // cropulx=ulx_opt[0];
364  // if(cropuly>uly_opt[0])
365  // cropuly=uly_opt[0];
366  // if(croplrx>lrx_opt[0])
367  // croplrx=lrx_opt[0];
368  // if(croplry<lry_opt[0])
369  // croplry=lry_opt[0];
370  }
371  else if(cx_opt.size()&&cy_opt.size()&&ns_opt.size()&&nl_opt.size()){
372  ulx_opt[0]=cx_opt[0]-ns_opt[0]*dx/2.0;
373  uly_opt[0]=(isGeoRef) ? cy_opt[0]+nl_opt[0]*dy/2.0 : cy_opt[0]-nl_opt[0]*dy/2.0;
374  lrx_opt[0]=cx_opt[0]+ns_opt[0]*dx/2.0;
375  lry_opt[0]=(isGeoRef) ? cy_opt[0]-nl_opt[0]*dy/2.0 : cy_opt[0]+nl_opt[0]*dy/2.0;
376  // if(cropulx<ulx_opt[0])
377  // cropulx=ulx_opt[0];
378  // if(cropuly>uly_opt[0])
379  // cropuly=uly_opt[0];
380  // if(croplrx>lrx_opt[0])
381  // croplrx=lrx_opt[0];
382  // if(croplry<lry_opt[0])
383  // croplry=lry_opt[0];
384  }
385 
386  if(verbose_opt[0])
387  cout << "--ulx=" << ulx_opt[0] << " --uly=" << uly_opt[0] << " --lrx=" << lrx_opt[0] << " --lry=" << lry_opt[0] << endl;
388 
389  int ncropcol=0;
390  int ncroprow=0;
391 
392  ImgWriterGdal maskWriter;
393  if(extent_opt.size()&&cut_opt[0]){
394  try{
395  ncropcol=abs(static_cast<int>(ceil((lrx_opt[0]-ulx_opt[0])/dx)));
396  ncroprow=abs(static_cast<int>(ceil((uly_opt[0]-lry_opt[0])/dy)));
397  maskWriter.open("/vsimem/mask.tif",ncropcol,ncroprow,1,GDT_Float32,"GTiff",option_opt);
398  double gt[6];
399  gt[0]=ulx_opt[0];
400  gt[1]=dx;
401  gt[2]=0;
402  gt[3]=uly_opt[0];
403  gt[4]=0;
404  gt[5]=-dy;
405  maskWriter.setGeoTransform(gt);
406  if(projection_opt.size())
407  maskWriter.setProjectionProj4(projection_opt[0]);
408  else if(projectionString.size())
409  maskWriter.setProjection(projectionString);
410 
411  //todo: handle multiple extent options
412  vector<double> burnValues(1,1);//burn value is 1 (single band)
413  maskWriter.rasterizeOgr(extentReader,burnValues);
414  maskWriter.close();
415  }
416  catch(string error){
417  cerr << error << std::endl;
418  exit(2);
419  }
420  catch(...){
421  cerr << "error caught" << std::endl;
422  exit(1);
423  }
424  //todo: support multiple masks
425  mask_opt.clear();
426  mask_opt.push_back("/vsimem/mask.tif");
427  }
428  ImgReaderGdal maskReader;
429  if(mask_opt.size()){
430  try{
431  if(verbose_opt[0]>=1)
432  std::cout << "opening mask image file " << mask_opt[0] << std::endl;
433  maskReader.open(mask_opt[0]);
434  if(mskband_opt[0]>=maskReader.nrOfBand()){
435  string errorString="Error: illegal mask band";
436  throw(errorString);
437  }
438  }
439  catch(string error){
440  cerr << error << std::endl;
441  exit(2);
442  }
443  catch(...){
444  cerr << "error caught" << std::endl;
445  exit(1);
446  }
447  }
448 
449  //determine number of output bands
450  int writeBand=0;//write band
451 
452  if(scale_opt.size()){
453  while(scale_opt.size()<band_opt.size())
454  scale_opt.push_back(scale_opt[0]);
455  }
456  if(offset_opt.size()){
457  while(offset_opt.size()<band_opt.size())
458  offset_opt.push_back(offset_opt[0]);
459  }
460  if(autoscale_opt.size()){
461  assert(autoscale_opt.size()%2==0);
462  // while(autoscale_opt.size()<band_opt.size()*2){
463  // autoscale_opt.push_back(autoscale_opt[0]);
464  // autoscale_opt.push_back(autoscale_opt[1]);
465  // }
466  }
467 
468  for(int iimg=0;iimg<input_opt.size();++iimg){
469  if(verbose_opt[0])
470  cout << "opening image " << input_opt[iimg] << endl;
471  imgReader.open(input_opt[iimg]);
472  //if output type not set, get type from input image
473  if(theType==GDT_Unknown){
474  theType=imgReader.getDataType();
475  if(verbose_opt[0])
476  cout << "Using data type from input image: " << GDALGetDataTypeName(theType) << endl;
477  }
478  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
479  string theInterleave="INTERLEAVE=";
480  theInterleave+=imgReader.getInterleave();
481  option_opt.push_back(theInterleave);
482  }
483  int nrow=imgReader.nrOfRow();
484  int ncol=imgReader.nrOfCol();
485  // if(!dx||!dy){
486  // dx=imgReader.getDeltaX();
487  // dy=imgReader.getDeltaY();
488  // }
489  if(verbose_opt[0])
490  cout << "size of " << input_opt[iimg] << ": " << ncol << " cols, "<< nrow << " rows" << endl;
491  double uli,ulj,lri,lrj;//image coordinates
492  bool forceEUgrid=false;
493  if(projection_opt.size())
494  forceEUgrid=(!(projection_opt[0].compare("EPSG:3035"))||!(projection_opt[0].compare("EPSG:3035"))||projection_opt[0].find("ETRS-LAEA")!=string::npos);
495  if(ulx_opt[0]>=lrx_opt[0]){//default bounding box: no cropping
496  uli=0;
497  lri=imgReader.nrOfCol()-1;
498  ulj=0;
499  lrj=imgReader.nrOfRow()-1;
500  ncropcol=imgReader.nrOfCol();
501  ncroprow=imgReader.nrOfRow();
502  imgReader.getBoundingBox(cropulx,cropuly,croplrx,croplry);
503  double magicX=1,magicY=1;
504  // imgReader.getMagicPixel(magicX,magicY);
505  if(forceEUgrid){
506  //force to LAEA grid
507  Egcs egcs;
508  egcs.setLevel(egcs.res2level(dx));
509  egcs.force2grid(cropulx,cropuly,croplrx,croplry);
510  imgReader.geo2image(cropulx+(magicX-1.0)*imgReader.getDeltaX(),cropuly-(magicY-1.0)*imgReader.getDeltaY(),uli,ulj);
511  imgReader.geo2image(croplrx+(magicX-2.0)*imgReader.getDeltaX(),croplry-(magicY-2.0)*imgReader.getDeltaY(),lri,lrj);
512  }
513  imgReader.geo2image(cropulx+(magicX-1.0)*imgReader.getDeltaX(),cropuly-(magicY-1.0)*imgReader.getDeltaY(),uli,ulj);
514  imgReader.geo2image(croplrx+(magicX-2.0)*imgReader.getDeltaX(),croplry-(magicY-2.0)*imgReader.getDeltaY(),lri,lrj);
515  //test
516  ncropcol=abs(static_cast<int>(ceil((croplrx-cropulx)/dx)));
517  ncroprow=abs(static_cast<int>(ceil((cropuly-croplry)/dy)));
518  }
519  else{
520  double magicX=1,magicY=1;
521  // imgReader.getMagicPixel(magicX,magicY);
522  cropulx=ulx_opt[0];
523  cropuly=uly_opt[0];
524  croplrx=lrx_opt[0];
525  croplry=lry_opt[0];
526  if(forceEUgrid){
527  //force to LAEA grid
528  Egcs egcs;
529  egcs.setLevel(egcs.res2level(dx));
530  egcs.force2grid(cropulx,cropuly,croplrx,croplry);
531  }
532  else if(align_opt[0]){
533  if(cropulx>imgReader.getUlx())
534  cropulx-=fmod(cropulx-imgReader.getUlx(),dx);
535  else if(cropulx<imgReader.getUlx())
536  cropulx+=fmod(imgReader.getUlx()-cropulx,dx)-dx;
537  if(croplrx<imgReader.getLrx())
538  croplrx+=fmod(imgReader.getLrx()-croplrx,dx);
539  else if(croplrx>imgReader.getLrx())
540  croplrx-=fmod(croplrx-imgReader.getLrx(),dx)+dx;
541  if(croplry>imgReader.getLry())
542  croplry-=fmod(croplry-imgReader.getLry(),dy);
543  else if(croplry<imgReader.getLry())
544  croplry+=fmod(imgReader.getLry()-croplry,dy)-dy;
545  if(cropuly<imgReader.getUly())
546  cropuly+=fmod(imgReader.getUly()-cropuly,dy);
547  else if(cropuly>imgReader.getUly())
548  cropuly-=fmod(cropuly-imgReader.getUly(),dy)+dy;
549  }
550  imgReader.geo2image(cropulx+(magicX-1.0)*imgReader.getDeltaX(),cropuly-(magicY-1.0)*imgReader.getDeltaY(),uli,ulj);
551  imgReader.geo2image(croplrx+(magicX-2.0)*imgReader.getDeltaX(),croplry-(magicY-2.0)*imgReader.getDeltaY(),lri,lrj);
552 
553  ncropcol=abs(static_cast<int>(ceil((croplrx-cropulx)/dx)));
554  ncroprow=abs(static_cast<int>(ceil((cropuly-croplry)/dy)));
555  uli=floor(uli);
556  ulj=floor(ulj);
557  lri=floor(lri);
558  lrj=floor(lrj);
559  }
560 
561  double dcropcol=0;
562  double dcroprow=0;
563  double deltaX=imgReader.getDeltaX();
564  double deltaY=imgReader.getDeltaY();
565  dcropcol=(lri-uli+1)/(dx/deltaX);
566  dcroprow=(lrj-ulj+1)/(dy/deltaY);
567  if(!imgWriter.nrOfBand()){//not opened yet
568  if(verbose_opt[0]){
569  cout << "cropulx: " << cropulx << endl;
570  cout << "cropuly: " << cropuly << endl;
571  cout << "croplrx: " << croplrx << endl;
572  cout << "croplry: " << croplry << endl;
573  cout << "ncropcol: " << ncropcol << endl;
574  cout << "ncroprow: " << ncroprow << endl;
575  cout << "cropulx+ncropcol*dx: " << cropulx+ncropcol*dx << endl;
576  cout << "cropuly-ncroprow*dy: " << cropuly-ncroprow*dy << endl;
577  cout << "upper left column of input image: " << uli << endl;
578  cout << "upper left row of input image: " << ulj << endl;
579  cout << "lower right column of input image: " << lri << endl;
580  cout << "lower right row of input image: " << lrj << endl;
581  cout << "new number of cols: " << ncropcol << endl;
582  cout << "new number of rows: " << ncroprow << endl;
583  cout << "new number of bands: " << ncropband << endl;
584  }
585  // string theCompression;
586  // if(compress_opt[0]!="")//default
587  // theCompression=compress_opt[0];
588  // else
589  // theCompression=imgReader.getCompression();
590  // string theInterleave;
591  // if(interleave_opt[0]!="")//default
592  // theInterleave=interleave_opt[0];
593  // else
594  // theInterleave=imgReader.getInterleave();
595  string imageType;//=imgReader.getImageType();
596  if(oformat_opt.size())//default
597  imageType=oformat_opt[0];
598  try{
599  imgWriter.open(output_opt[0],ncropcol,ncroprow,ncropband,theType,imageType,option_opt);
600  if(nodata_opt.size()){
601  for(int iband=0;iband<ncropband;++iband)
602  imgWriter.GDALSetNoDataValue(nodata_opt[0],iband);
603  }
604  }
605  catch(string errorstring){
606  cout << errorstring << endl;
607  exit(4);
608  }
609  if(description_opt.size())
610  imgWriter.setImageDescription(description_opt[0]);
611  double gt[6];
612  gt[0]=cropulx;
613  gt[1]=dx;
614  gt[2]=0;
615  gt[3]=cropuly;
616  gt[4]=0;
617  gt[5]=(imgReader.isGeoRef())? -dy : dy;
618  imgWriter.setGeoTransform(gt);
619  if(projection_opt.size()){
620  if(verbose_opt[0])
621  cout << "projection: " << projection_opt[0] << endl;
622  imgWriter.setProjectionProj4(projection_opt[0]);
623  }
624  else
625  imgWriter.setProjection(imgReader.getProjection());
626  if(imgWriter.getDataType()==GDT_Byte){
627  if(colorTable_opt.size()){
628  if(colorTable_opt[0]!="none")
629  imgWriter.setColorTable(colorTable_opt[0]);
630  }
631  else if (imgReader.getColorTable()!=NULL)//copy colorTable from input image
632  imgWriter.setColorTable(imgReader.getColorTable());
633  }
634  }
635 
636  double startCol=uli;
637  double endCol=lri;
638  if(uli<0)
639  startCol=0;
640  else if(uli>=imgReader.nrOfCol())
641  startCol=imgReader.nrOfCol()-1;
642  if(lri<0)
643  endCol=0;
644  else if(lri>=imgReader.nrOfCol())
645  endCol=imgReader.nrOfCol()-1;
646  double startRow=ulj;
647  double endRow=lrj;
648  if(ulj<0)
649  startRow=0;
650  else if(ulj>=imgReader.nrOfRow())
651  startRow=imgReader.nrOfRow()-1;
652  if(lrj<0)
653  endRow=0;
654  else if(lrj>=imgReader.nrOfRow())
655  endRow=imgReader.nrOfRow()-1;
656 
657 
658 
659  int readncol=endCol-startCol+1;
660  vector<double> readBuffer(readncol+1);
661  int nband=(band_opt.size())?band_opt.size() : imgReader.nrOfBand();
662  for(int iband=0;iband<nband;++iband){
663  int readBand=(band_opt.size()>iband)?band_opt[iband]:iband;
664  if(verbose_opt[0]){
665  cout << "extracting band " << readBand << endl;
666  pfnProgress(progress,pszMessage,pProgressArg);
667  }
668  double theMin=0;
669  double theMax=0;
670  if(autoscale_opt.size()){
671  try{
672  imgReader.getMinMax(static_cast<int>(startCol),static_cast<int>(endCol),static_cast<int>(startRow),static_cast<int>(endRow),readBand,theMin,theMax);
673  }
674  catch(string errorString){
675  cout << errorString << endl;
676  }
677  if(verbose_opt[0])
678  cout << "minmax: " << theMin << ", " << theMax << endl;
679  double theScale=(autoscale_opt[1]-autoscale_opt[0])/(theMax-theMin);
680  double theOffset=autoscale_opt[0]-theScale*theMin;
681  imgReader.setScale(theScale,readBand);
682  imgReader.setOffset(theOffset,readBand);
683  }
684  else{
685  if(scale_opt.size()){
686  if(scale_opt.size()>iband)
687  imgReader.setScale(scale_opt[iband],readBand);
688  else
689  imgReader.setScale(scale_opt[0],readBand);
690  }
691  if(offset_opt.size()){
692  if(offset_opt.size()>iband)
693  imgReader.setOffset(offset_opt[iband],readBand);
694  else
695  imgReader.setOffset(offset_opt[0],readBand);
696  }
697  }
698 
699  double readRow=0;
700  double readCol=0;
701  double lowerCol=0;
702  double upperCol=0;
703  for(int irow=0;irow<imgWriter.nrOfRow();++irow){
704  vector<float> lineMask;
705  double x=0;
706  double y=0;
707  //convert irow to geo
708  imgWriter.image2geo(0,irow,x,y);
709  //lookup corresponding row for irow in this file
710  imgReader.geo2image(x,y,readCol,readRow);
711  vector<double> writeBuffer;
712  if(readRow<0||readRow>=imgReader.nrOfRow()){
713  //if(readRow<0)
714  //readRow=0;
715  //else if(readRow>=imgReader.nrOfRow())
716  //readRow=imgReader.nrOfRow()-1;
717  for(int icol=0;icol<imgWriter.nrOfCol();++icol)
718  writeBuffer.push_back(nodataValue);
719  }
720  else{
721  if(verbose_opt[0]>1)
722  cout << "reading row: " << readRow << endl;
723  try{
724  if(endCol<imgReader.nrOfCol()-1)
725  imgReader.readData(readBuffer,GDT_Float64,startCol,endCol+1,readRow,readBand,theResample);
726  else
727  imgReader.readData(readBuffer,GDT_Float64,startCol,endCol,readRow,readBand,theResample);
728  // for(int icol=0;icol<ncropcol;++icol){
729  double oldRowMask=-1;//keep track of row mask to optimize number of line readings
730  for(int icol=0;icol<imgWriter.nrOfCol();++icol){
731  imgWriter.image2geo(icol,irow,x,y);
732  //lookup corresponding row for irow in this file
733  imgReader.geo2image(x,y,readCol,readRow);
734  if(readCol<0||readCol>=imgReader.nrOfCol()){
735  // if(readCol<0||readCol>=imgReader.nrOfCol()){
736  // if(readCol<0)
737  // readCol=0;
738  // else if(readCol>=imgReader.nrOfCol())
739  // readCol=imgReader.nrOfCol()-1;
740  writeBuffer.push_back(nodataValue);
741  }
742  else{
743  bool valid=true;
744  double geox=0;
745  double geoy=0;
746  if(mask_opt.size()){
747  //read mask
748  double colMask=0;
749  double rowMask=0;
750 
751  imgWriter.image2geo(icol,irow,geox,geoy);
752  maskReader.geo2image(geox,geoy,colMask,rowMask);
753  colMask=static_cast<int>(colMask);
754  rowMask=static_cast<int>(rowMask);
755  if(rowMask>=0&&rowMask<maskReader.nrOfRow()&&colMask>=0&&colMask<maskReader.nrOfCol()){
756  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask)){
757 
758  assert(rowMask>=0&&rowMask<maskReader.nrOfRow());
759  try{
760  maskReader.readData(lineMask,GDT_Float32,static_cast<int>(rowMask),mskband_opt[0]);
761  }
762  catch(string errorstring){
763  cerr << errorstring << endl;
764  exit(1);
765  }
766  catch(...){
767  cerr << "error caught" << std::endl;
768  exit(3);
769  }
770  oldRowMask=rowMask;
771  }
772  if(lineMask[colMask]==msknodata_opt[0])
773  valid=false;
774  }
775  }
776 
777  if(!valid)
778  writeBuffer.push_back(nodataValue);
779  else{
780  switch(theResample){
781  case(BILINEAR):
782  lowerCol=readCol-0.5;
783  lowerCol=static_cast<int>(lowerCol);
784  upperCol=readCol+0.5;
785  upperCol=static_cast<int>(upperCol);
786  if(lowerCol<0)
787  lowerCol=0;
788  if(upperCol>=imgReader.nrOfCol())
789  upperCol=imgReader.nrOfCol()-1;
790  // writeBuffer.push_back((readCol-0.5-lowerCol)*(readBuffer[upperCol-startCol]*theScale+theOffset)+(1-readCol+0.5+lowerCol)*(readBuffer[lowerCol-startCol]*theScale+theOffset));
791  writeBuffer.push_back((readCol-0.5-lowerCol)*readBuffer[upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[lowerCol-startCol]);
792  break;
793  default:
794  readCol=static_cast<int>(readCol);
795  readCol-=startCol;//we only start reading from startCol
796  // writeBuffer.push_back(readBuffer[readCol]*theScale+theOffset);
797  writeBuffer.push_back(readBuffer[readCol]);
798  break;
799  }
800  }
801  }
802  }
803  }
804  catch(string errorstring){
805  cout << errorstring << endl;
806  exit(2);
807  }
808  }
809  if(writeBuffer.size()!=imgWriter.nrOfCol())
810  cout << "writeBuffer.size()=" << writeBuffer.size() << ", imgWriter.nrOfCol()=" << imgWriter.nrOfCol() << endl;
811  assert(writeBuffer.size()==imgWriter.nrOfCol());
812  try{
813  imgWriter.writeData(writeBuffer,GDT_Float64,irow,writeBand);
814  }
815  catch(string errorstring){
816  cout << errorstring << endl;
817  exit(3);
818  }
819  if(verbose_opt[0]){
820  progress=(1.0+irow);
821  progress/=imgWriter.nrOfRow();
822  pfnProgress(progress,pszMessage,pProgressArg);
823  }
824  else{
825  progress=(1.0+irow);
826  progress+=(imgWriter.nrOfRow()*writeBand);
827  progress/=imgWriter.nrOfBand()*imgWriter.nrOfRow();
828  assert(progress>=0);
829  assert(progress<=1);
830  pfnProgress(progress,pszMessage,pProgressArg);
831  }
832  }
833  ++writeBand;
834  }
835  imgReader.close();
836  }
837  if(extent_opt.size()&&cut_opt.size()){
838  extentReader.close();
839  }
840  if(mask_opt.size())
841  maskReader.close();
842  imgWriter.close();
843 }
Definition: Egcs.h:26
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop-members.html0000644000113200011300000002061312647637662021726 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkcrop.pkcrop Member List

This is the complete list of members for qgis.pkcrop.pkcrop, including all inherited members.

BAND (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
cliName (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcrop
defineCharacteristics (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcrop
DX (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
DY (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
EXTRA (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
group (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcrop
INPUT (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
name (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcrop
NODATA (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
OUTPUT (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
processAlgorithm (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcrop
PROJWIN (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
RESAMPLE (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
RESAMPLE_OPTIONS (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
RTYPE (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
TYPE (defined in qgis.pkcrop.pkcrop)qgis.pkcrop.pkcropstatic
pktools-2.6.6/doc/html/build-pkcrop__gui-gcc-Debug_2ui__mainwindow_8h_source.html0000644000113200011300000033321312647637661025056 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Debug/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QGroupBox>
20 #include <QtGui/QHBoxLayout>
21 #include <QtGui/QHeaderView>
22 #include <QtGui/QLabel>
23 #include <QtGui/QLineEdit>
24 #include <QtGui/QListWidget>
25 #include <QtGui/QMainWindow>
26 #include <QtGui/QMenu>
27 #include <QtGui/QMenuBar>
28 #include <QtGui/QPlainTextEdit>
29 #include <QtGui/QRadioButton>
30 #include <QtGui/QSpacerItem>
31 #include <QtGui/QStatusBar>
32 #include <QtGui/QTabWidget>
33 #include <QtGui/QToolBar>
34 #include <QtGui/QToolButton>
35 #include <QtGui/QVBoxLayout>
36 #include <QtGui/QWidget>
37 
38 QT_BEGIN_NAMESPACE
39 
40 class Ui_MainWindow
41 {
42 public:
43  QAction *actionInput;
44  QAction *actionExtent;
45  QAction *actionOutput;
46  QAction *actionQuit;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab;
51  QVBoxLayout *verticalLayout_2;
52  QGridLayout *gridLayout_2;
53  QLineEdit *uly;
54  QToolButton *toolButton_extent;
55  QSpacerItem *horizontalSpacer_2;
56  QLineEdit *lrx;
57  QLineEdit *lry;
58  QListWidget *listWidget_band;
59  QListWidget *listWidget_input;
60  QSpacerItem *horizontalSpacer_3;
61  QLineEdit *extent;
62  QToolButton *toolButton_input;
63  QLabel *label_2;
64  QLabel *label_4;
65  QLineEdit *ulx;
66  QLabel *label_16;
67  QLabel *label;
68  QToolButton *toolButton;
69  QWidget *tab_2;
70  QGridLayout *gridLayout_4;
71  QSpacerItem *horizontalSpacer_9;
72  QComboBox *resample;
73  QSpacerItem *verticalSpacer;
74  QLineEdit *dy;
75  QSpacerItem *verticalSpacer_3;
76  QLabel *label_9;
77  QSpacerItem *horizontalSpacer_8;
78  QGroupBox *groupBox;
79  QGridLayout *gridLayout_3;
80  QRadioButton *autoscale;
81  QLineEdit *offset;
82  QRadioButton *manual;
83  QLabel *label_21;
84  QLabel *label_20;
85  QRadioButton *noscale;
86  QLineEdit *scale;
87  QSpacerItem *horizontalSpacer_4;
88  QLabel *label_10;
89  QLineEdit *as_from;
90  QLabel *label_11;
91  QLineEdit *as_to;
92  QSpacerItem *horizontalSpacer_11;
93  QLabel *label_15;
94  QLineEdit *dx;
95  QLabel *label_18;
96  QLabel *label_17;
97  QSpacerItem *horizontalSpacer_5;
98  QSpacerItem *horizontalSpacer_10;
99  QWidget *tab_3;
100  QVBoxLayout *verticalLayout_3;
101  QGridLayout *gridLayout;
102  QComboBox *otype;
103  QComboBox *compressed;
104  QLabel *label_6;
105  QLabel *label_5;
106  QToolButton *toolButton_output;
107  QLabel *label_3;
108  QToolButton *toolButton_ct;
109  QLineEdit *output;
110  QCheckBox *tiled;
111  QLabel *label_13;
112  QLineEdit *a_srs;
113  QLabel *label_7;
114  QLabel *label_14;
115  QLineEdit *nodata;
116  QComboBox *oformat;
117  QLineEdit *ct;
118  QLabel *label_12;
119  QComboBox *interleaved;
120  QLabel *label_8;
121  QSpacerItem *horizontalSpacer_6;
122  QWidget *tab_4;
123  QVBoxLayout *verticalLayout_5;
124  QVBoxLayout *verticalLayout_4;
125  QLabel *label_24;
126  QLineEdit *commandLineEdit;
127  QLabel *label_25;
128  QPlainTextEdit *consoleEdit;
129  QSpacerItem *verticalSpacer_2;
130  QSpacerItem *horizontalSpacer;
131  QHBoxLayout *horizontalLayout_2;
132  QToolButton *toolButton_Run;
133  QSpacerItem *horizontalSpacer_7;
134  QToolButton *toolButton_defaults;
135  QMenuBar *menuBar;
136  QMenu *menuFile;
137  QToolBar *mainToolBar;
138  QStatusBar *statusBar;
139  QButtonGroup *buttonGroup;
140 
141  void setupUi(QMainWindow *MainWindow)
142  {
143  if (MainWindow->objectName().isEmpty())
144  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
145  MainWindow->resize(821, 701);
146  actionInput = new QAction(MainWindow);
147  actionInput->setObjectName(QString::fromUtf8("actionInput"));
148  actionExtent = new QAction(MainWindow);
149  actionExtent->setObjectName(QString::fromUtf8("actionExtent"));
150  actionOutput = new QAction(MainWindow);
151  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
152  actionQuit = new QAction(MainWindow);
153  actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
154  centralWidget = new QWidget(MainWindow);
155  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
156  verticalLayout = new QVBoxLayout(centralWidget);
157  verticalLayout->setSpacing(6);
158  verticalLayout->setContentsMargins(11, 11, 11, 11);
159  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
160  tabWidget = new QTabWidget(centralWidget);
161  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
162  tab = new QWidget();
163  tab->setObjectName(QString::fromUtf8("tab"));
164  verticalLayout_2 = new QVBoxLayout(tab);
165  verticalLayout_2->setSpacing(6);
166  verticalLayout_2->setContentsMargins(11, 11, 11, 11);
167  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
168  gridLayout_2 = new QGridLayout();
169  gridLayout_2->setSpacing(6);
170  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
171  uly = new QLineEdit(tab);
172  uly->setObjectName(QString::fromUtf8("uly"));
173 
174  gridLayout_2->addWidget(uly, 1, 2, 1, 1);
175 
176  toolButton_extent = new QToolButton(tab);
177  toolButton_extent->setObjectName(QString::fromUtf8("toolButton_extent"));
178 
179  gridLayout_2->addWidget(toolButton_extent, 4, 2, 1, 1);
180 
181  horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
182 
183  gridLayout_2->addItem(horizontalSpacer_2, 1, 1, 1, 1);
184 
185  lrx = new QLineEdit(tab);
186  lrx->setObjectName(QString::fromUtf8("lrx"));
187 
188  gridLayout_2->addWidget(lrx, 2, 4, 1, 1);
189 
190  lry = new QLineEdit(tab);
191  lry->setObjectName(QString::fromUtf8("lry"));
192 
193  gridLayout_2->addWidget(lry, 3, 2, 1, 1);
194 
195  listWidget_band = new QListWidget(tab);
196  listWidget_band->setObjectName(QString::fromUtf8("listWidget_band"));
197 
198  gridLayout_2->addWidget(listWidget_band, 6, 1, 1, 1);
199 
200  listWidget_input = new QListWidget(tab);
201  listWidget_input->setObjectName(QString::fromUtf8("listWidget_input"));
202 
203  gridLayout_2->addWidget(listWidget_input, 0, 1, 1, 1);
204 
205  horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
206 
207  gridLayout_2->addItem(horizontalSpacer_3, 1, 4, 1, 1);
208 
209  extent = new QLineEdit(tab);
210  extent->setObjectName(QString::fromUtf8("extent"));
211 
212  gridLayout_2->addWidget(extent, 4, 1, 1, 1);
213 
214  toolButton_input = new QToolButton(tab);
215  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
216 
217  gridLayout_2->addWidget(toolButton_input, 0, 2, 1, 1);
218 
219  label_2 = new QLabel(tab);
220  label_2->setObjectName(QString::fromUtf8("label_2"));
221 
222  gridLayout_2->addWidget(label_2, 1, 0, 1, 1);
223 
224  label_4 = new QLabel(tab);
225  label_4->setObjectName(QString::fromUtf8("label_4"));
226 
227  gridLayout_2->addWidget(label_4, 4, 0, 1, 1);
228 
229  ulx = new QLineEdit(tab);
230  ulx->setObjectName(QString::fromUtf8("ulx"));
231 
232  gridLayout_2->addWidget(ulx, 2, 1, 1, 1);
233 
234  label_16 = new QLabel(tab);
235  label_16->setObjectName(QString::fromUtf8("label_16"));
236 
237  gridLayout_2->addWidget(label_16, 6, 0, 1, 1);
238 
239  label = new QLabel(tab);
240  label->setObjectName(QString::fromUtf8("label"));
241 
242  gridLayout_2->addWidget(label, 0, 0, 1, 1);
243 
244  toolButton = new QToolButton(tab);
245  toolButton->setObjectName(QString::fromUtf8("toolButton"));
246 
247  gridLayout_2->addWidget(toolButton, 0, 3, 1, 1);
248 
249 
250  verticalLayout_2->addLayout(gridLayout_2);
251 
252  tabWidget->addTab(tab, QString());
253  tab_2 = new QWidget();
254  tab_2->setObjectName(QString::fromUtf8("tab_2"));
255  gridLayout_4 = new QGridLayout(tab_2);
256  gridLayout_4->setSpacing(6);
257  gridLayout_4->setContentsMargins(11, 11, 11, 11);
258  gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
259  horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
260 
261  gridLayout_4->addItem(horizontalSpacer_9, 1, 9, 1, 1);
262 
263  resample = new QComboBox(tab_2);
264  resample->setObjectName(QString::fromUtf8("resample"));
265 
266  gridLayout_4->addWidget(resample, 0, 1, 1, 1);
267 
268  verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
269 
270  gridLayout_4->addItem(verticalSpacer, 2, 4, 1, 1);
271 
272  dy = new QLineEdit(tab_2);
273  dy->setObjectName(QString::fromUtf8("dy"));
274 
275  gridLayout_4->addWidget(dy, 1, 4, 1, 1);
276 
277  verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
278 
279  gridLayout_4->addItem(verticalSpacer_3, 4, 0, 1, 1);
280 
281  label_9 = new QLabel(tab_2);
282  label_9->setObjectName(QString::fromUtf8("label_9"));
283 
284  gridLayout_4->addWidget(label_9, 1, 0, 1, 1);
285 
286  horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
287 
288  gridLayout_4->addItem(horizontalSpacer_8, 1, 3, 1, 1);
289 
290  groupBox = new QGroupBox(tab_2);
291  groupBox->setObjectName(QString::fromUtf8("groupBox"));
292  gridLayout_3 = new QGridLayout(groupBox);
293  gridLayout_3->setSpacing(6);
294  gridLayout_3->setContentsMargins(11, 11, 11, 11);
295  gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
296  autoscale = new QRadioButton(groupBox);
297  buttonGroup = new QButtonGroup(MainWindow);
298  buttonGroup->setObjectName(QString::fromUtf8("buttonGroup"));
299  buttonGroup->addButton(autoscale);
300  autoscale->setObjectName(QString::fromUtf8("autoscale"));
301 
302  gridLayout_3->addWidget(autoscale, 1, 0, 1, 1);
303 
304  offset = new QLineEdit(groupBox);
305  offset->setObjectName(QString::fromUtf8("offset"));
306 
307  gridLayout_3->addWidget(offset, 2, 4, 1, 1);
308 
309  manual = new QRadioButton(groupBox);
310  buttonGroup->addButton(manual);
311  manual->setObjectName(QString::fromUtf8("manual"));
312 
313  gridLayout_3->addWidget(manual, 2, 0, 1, 1);
314 
315  label_21 = new QLabel(groupBox);
316  label_21->setObjectName(QString::fromUtf8("label_21"));
317 
318  gridLayout_3->addWidget(label_21, 2, 3, 1, 1);
319 
320  label_20 = new QLabel(groupBox);
321  label_20->setObjectName(QString::fromUtf8("label_20"));
322 
323  gridLayout_3->addWidget(label_20, 2, 1, 1, 1);
324 
325  noscale = new QRadioButton(groupBox);
326  buttonGroup->addButton(noscale);
327  noscale->setObjectName(QString::fromUtf8("noscale"));
328 
329  gridLayout_3->addWidget(noscale, 0, 0, 1, 1);
330 
331  scale = new QLineEdit(groupBox);
332  scale->setObjectName(QString::fromUtf8("scale"));
333 
334  gridLayout_3->addWidget(scale, 2, 2, 1, 1);
335 
336  horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
337 
338  gridLayout_3->addItem(horizontalSpacer_4, 2, 5, 1, 1);
339 
340  label_10 = new QLabel(groupBox);
341  label_10->setObjectName(QString::fromUtf8("label_10"));
342 
343  gridLayout_3->addWidget(label_10, 1, 1, 1, 1);
344 
345  as_from = new QLineEdit(groupBox);
346  as_from->setObjectName(QString::fromUtf8("as_from"));
347 
348  gridLayout_3->addWidget(as_from, 1, 2, 1, 1);
349 
350  label_11 = new QLabel(groupBox);
351  label_11->setObjectName(QString::fromUtf8("label_11"));
352 
353  gridLayout_3->addWidget(label_11, 1, 3, 1, 1);
354 
355  as_to = new QLineEdit(groupBox);
356  as_to->setObjectName(QString::fromUtf8("as_to"));
357 
358  gridLayout_3->addWidget(as_to, 1, 4, 1, 1);
359 
360  horizontalSpacer_11 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
361 
362  gridLayout_3->addItem(horizontalSpacer_11, 1, 5, 1, 1);
363 
364 
365  gridLayout_4->addWidget(groupBox, 3, 0, 1, 8);
366 
367  label_15 = new QLabel(tab_2);
368  label_15->setObjectName(QString::fromUtf8("label_15"));
369 
370  gridLayout_4->addWidget(label_15, 1, 2, 1, 1);
371 
372  dx = new QLineEdit(tab_2);
373  dx->setObjectName(QString::fromUtf8("dx"));
374 
375  gridLayout_4->addWidget(dx, 1, 1, 1, 1);
376 
377  label_18 = new QLabel(tab_2);
378  label_18->setObjectName(QString::fromUtf8("label_18"));
379 
380  gridLayout_4->addWidget(label_18, 1, 5, 1, 1);
381 
382  label_17 = new QLabel(tab_2);
383  label_17->setObjectName(QString::fromUtf8("label_17"));
384 
385  gridLayout_4->addWidget(label_17, 0, 0, 1, 1);
386 
387  horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
388 
389  gridLayout_4->addItem(horizontalSpacer_5, 1, 6, 1, 1);
390 
391  horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
392 
393  gridLayout_4->addItem(horizontalSpacer_10, 0, 3, 1, 1);
394 
395  tabWidget->addTab(tab_2, QString());
396  tab_3 = new QWidget();
397  tab_3->setObjectName(QString::fromUtf8("tab_3"));
398  verticalLayout_3 = new QVBoxLayout(tab_3);
399  verticalLayout_3->setSpacing(6);
400  verticalLayout_3->setContentsMargins(11, 11, 11, 11);
401  verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
402  gridLayout = new QGridLayout();
403  gridLayout->setSpacing(6);
404  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
405  otype = new QComboBox(tab_3);
406  otype->setObjectName(QString::fromUtf8("otype"));
407 
408  gridLayout->addWidget(otype, 3, 1, 1, 1);
409 
410  compressed = new QComboBox(tab_3);
411  compressed->setObjectName(QString::fromUtf8("compressed"));
412 
413  gridLayout->addWidget(compressed, 6, 5, 1, 1);
414 
415  label_6 = new QLabel(tab_3);
416  label_6->setObjectName(QString::fromUtf8("label_6"));
417 
418  gridLayout->addWidget(label_6, 3, 0, 1, 1);
419 
420  label_5 = new QLabel(tab_3);
421  label_5->setObjectName(QString::fromUtf8("label_5"));
422 
423  gridLayout->addWidget(label_5, 2, 0, 1, 1);
424 
425  toolButton_output = new QToolButton(tab_3);
426  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
427 
428  gridLayout->addWidget(toolButton_output, 1, 2, 1, 1);
429 
430  label_3 = new QLabel(tab_3);
431  label_3->setObjectName(QString::fromUtf8("label_3"));
432 
433  gridLayout->addWidget(label_3, 1, 0, 1, 1);
434 
435  toolButton_ct = new QToolButton(tab_3);
436  toolButton_ct->setObjectName(QString::fromUtf8("toolButton_ct"));
437 
438  gridLayout->addWidget(toolButton_ct, 5, 2, 1, 1);
439 
440  output = new QLineEdit(tab_3);
441  output->setObjectName(QString::fromUtf8("output"));
442 
443  gridLayout->addWidget(output, 1, 1, 1, 1);
444 
445  tiled = new QCheckBox(tab_3);
446  tiled->setObjectName(QString::fromUtf8("tiled"));
447 
448  gridLayout->addWidget(tiled, 6, 2, 1, 1);
449 
450  label_13 = new QLabel(tab_3);
451  label_13->setObjectName(QString::fromUtf8("label_13"));
452 
453  gridLayout->addWidget(label_13, 6, 4, 1, 1);
454 
455  a_srs = new QLineEdit(tab_3);
456  a_srs->setObjectName(QString::fromUtf8("a_srs"));
457 
458  gridLayout->addWidget(a_srs, 2, 1, 1, 1);
459 
460  label_7 = new QLabel(tab_3);
461  label_7->setObjectName(QString::fromUtf8("label_7"));
462 
463  gridLayout->addWidget(label_7, 4, 0, 1, 1);
464 
465  label_14 = new QLabel(tab_3);
466  label_14->setObjectName(QString::fromUtf8("label_14"));
467 
468  gridLayout->addWidget(label_14, 7, 0, 1, 1);
469 
470  nodata = new QLineEdit(tab_3);
471  nodata->setObjectName(QString::fromUtf8("nodata"));
472 
473  gridLayout->addWidget(nodata, 7, 1, 1, 1);
474 
475  oformat = new QComboBox(tab_3);
476  oformat->setObjectName(QString::fromUtf8("oformat"));
477 
478  gridLayout->addWidget(oformat, 4, 1, 1, 1);
479 
480  ct = new QLineEdit(tab_3);
481  ct->setObjectName(QString::fromUtf8("ct"));
482 
483  gridLayout->addWidget(ct, 5, 1, 1, 1);
484 
485  label_12 = new QLabel(tab_3);
486  label_12->setObjectName(QString::fromUtf8("label_12"));
487 
488  gridLayout->addWidget(label_12, 6, 0, 1, 1);
489 
490  interleaved = new QComboBox(tab_3);
491  interleaved->setObjectName(QString::fromUtf8("interleaved"));
492 
493  gridLayout->addWidget(interleaved, 6, 1, 1, 1);
494 
495  label_8 = new QLabel(tab_3);
496  label_8->setObjectName(QString::fromUtf8("label_8"));
497 
498  gridLayout->addWidget(label_8, 5, 0, 1, 1);
499 
500  horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
501 
502  gridLayout->addItem(horizontalSpacer_6, 6, 3, 1, 1);
503 
504 
505  verticalLayout_3->addLayout(gridLayout);
506 
507  tabWidget->addTab(tab_3, QString());
508  tab_4 = new QWidget();
509  tab_4->setObjectName(QString::fromUtf8("tab_4"));
510  verticalLayout_5 = new QVBoxLayout(tab_4);
511  verticalLayout_5->setSpacing(6);
512  verticalLayout_5->setContentsMargins(11, 11, 11, 11);
513  verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
514  verticalLayout_4 = new QVBoxLayout();
515  verticalLayout_4->setSpacing(6);
516  verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
517  label_24 = new QLabel(tab_4);
518  label_24->setObjectName(QString::fromUtf8("label_24"));
519 
520  verticalLayout_4->addWidget(label_24);
521 
522  commandLineEdit = new QLineEdit(tab_4);
523  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
524 
525  verticalLayout_4->addWidget(commandLineEdit);
526 
527  label_25 = new QLabel(tab_4);
528  label_25->setObjectName(QString::fromUtf8("label_25"));
529 
530  verticalLayout_4->addWidget(label_25);
531 
532  consoleEdit = new QPlainTextEdit(tab_4);
533  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
534 
535  verticalLayout_4->addWidget(consoleEdit);
536 
537 
538  verticalLayout_5->addLayout(verticalLayout_4);
539 
540  tabWidget->addTab(tab_4, QString());
541 
542  verticalLayout->addWidget(tabWidget);
543 
544  verticalSpacer_2 = new QSpacerItem(20, 112, QSizePolicy::Minimum, QSizePolicy::Expanding);
545 
546  verticalLayout->addItem(verticalSpacer_2);
547 
548  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
549 
550  verticalLayout->addItem(horizontalSpacer);
551 
552  horizontalLayout_2 = new QHBoxLayout();
553  horizontalLayout_2->setSpacing(6);
554  horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
555  toolButton_Run = new QToolButton(centralWidget);
556  toolButton_Run->setObjectName(QString::fromUtf8("toolButton_Run"));
557 
558  horizontalLayout_2->addWidget(toolButton_Run);
559 
560  horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
561 
562  horizontalLayout_2->addItem(horizontalSpacer_7);
563 
564  toolButton_defaults = new QToolButton(centralWidget);
565  toolButton_defaults->setObjectName(QString::fromUtf8("toolButton_defaults"));
566 
567  horizontalLayout_2->addWidget(toolButton_defaults);
568 
569 
570  verticalLayout->addLayout(horizontalLayout_2);
571 
572  MainWindow->setCentralWidget(centralWidget);
573  menuBar = new QMenuBar(MainWindow);
574  menuBar->setObjectName(QString::fromUtf8("menuBar"));
575  menuBar->setGeometry(QRect(0, 0, 821, 25));
576  menuFile = new QMenu(menuBar);
577  menuFile->setObjectName(QString::fromUtf8("menuFile"));
578  MainWindow->setMenuBar(menuBar);
579  mainToolBar = new QToolBar(MainWindow);
580  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
581  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
582  statusBar = new QStatusBar(MainWindow);
583  statusBar->setObjectName(QString::fromUtf8("statusBar"));
584  MainWindow->setStatusBar(statusBar);
585  QWidget::setTabOrder(toolButton_input, uly);
586  QWidget::setTabOrder(uly, ulx);
587  QWidget::setTabOrder(ulx, lrx);
588  QWidget::setTabOrder(lrx, lry);
589  QWidget::setTabOrder(lry, extent);
590  QWidget::setTabOrder(extent, toolButton_extent);
591  QWidget::setTabOrder(toolButton_extent, listWidget_band);
592  QWidget::setTabOrder(listWidget_band, resample);
593  QWidget::setTabOrder(resample, dx);
594  QWidget::setTabOrder(dx, dy);
595  QWidget::setTabOrder(dy, noscale);
596  QWidget::setTabOrder(noscale, autoscale);
597  QWidget::setTabOrder(autoscale, scale);
598  QWidget::setTabOrder(scale, offset);
599  QWidget::setTabOrder(offset, output);
600  QWidget::setTabOrder(output, toolButton_output);
601  QWidget::setTabOrder(toolButton_output, a_srs);
602  QWidget::setTabOrder(a_srs, otype);
603  QWidget::setTabOrder(otype, oformat);
604  QWidget::setTabOrder(oformat, ct);
605  QWidget::setTabOrder(ct, toolButton_ct);
606  QWidget::setTabOrder(toolButton_ct, interleaved);
607  QWidget::setTabOrder(interleaved, tiled);
608  QWidget::setTabOrder(tiled, compressed);
609  QWidget::setTabOrder(compressed, nodata);
610  QWidget::setTabOrder(nodata, toolButton_Run);
611  QWidget::setTabOrder(toolButton_Run, toolButton_defaults);
612  QWidget::setTabOrder(toolButton_defaults, manual);
613  QWidget::setTabOrder(manual, consoleEdit);
614  QWidget::setTabOrder(consoleEdit, commandLineEdit);
615  QWidget::setTabOrder(commandLineEdit, listWidget_input);
616  QWidget::setTabOrder(listWidget_input, tabWidget);
617 
618  menuBar->addAction(menuFile->menuAction());
619  menuFile->addAction(actionInput);
620  menuFile->addAction(actionExtent);
621  menuFile->addAction(actionOutput);
622  menuFile->addAction(actionQuit);
623 
624  retranslateUi(MainWindow);
625 
626  tabWidget->setCurrentIndex(0);
627 
628 
629  QMetaObject::connectSlotsByName(MainWindow);
630  } // setupUi
631 
632  void retranslateUi(QMainWindow *MainWindow)
633  {
634  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkcrop_gui", 0, QApplication::UnicodeUTF8));
635  actionInput->setText(QApplication::translate("MainWindow", "Input(s)", 0, QApplication::UnicodeUTF8));
636  actionInput->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
637  actionExtent->setText(QApplication::translate("MainWindow", "Extent", 0, QApplication::UnicodeUTF8));
638  actionExtent->setShortcut(QApplication::translate("MainWindow", "Alt+E", 0, QApplication::UnicodeUTF8));
639  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
640  actionOutput->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
641  actionQuit->setText(QApplication::translate("MainWindow", "Quit", 0, QApplication::UnicodeUTF8));
642  actionQuit->setShortcut(QApplication::translate("MainWindow", "Alt+Q", 0, QApplication::UnicodeUTF8));
643  toolButton_extent->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
644  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
645 #ifndef QT_NO_TOOLTIP
646  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Provide geographical extent to crop in coordinate reference system of input data</p></body></html>", 0, QApplication::UnicodeUTF8));
647 #endif // QT_NO_TOOLTIP
648  label_2->setText(QApplication::translate("MainWindow", "Geographical extent", 0, QApplication::UnicodeUTF8));
649 #ifndef QT_NO_TOOLTIP
650  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Use an external OGR vector file to define the geographical extent to crop. Coordinate reference systems of input and vector must be identical</p></body></html>", 0, QApplication::UnicodeUTF8));
651 #endif // QT_NO_TOOLTIP
652  label_4->setText(QApplication::translate("MainWindow", "Extent via vector:", 0, QApplication::UnicodeUTF8));
653 #ifndef QT_NO_WHATSTHIS
654  label_16->setWhatsThis(QApplication::translate("MainWindow", "<html><head/><body><p>First select input image. Then select bands by clicking in the table (use Ctrl and Shift to select multiple bands)</p></body></html>", 0, QApplication::UnicodeUTF8));
655 #endif // QT_NO_WHATSTHIS
656  label_16->setText(QApplication::translate("MainWindow", "Select bands", 0, QApplication::UnicodeUTF8));
657 #ifndef QT_NO_TOOLTIP
658  label->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input image(s)</p></body></html>", 0, QApplication::UnicodeUTF8));
659 #endif // QT_NO_TOOLTIP
660  label->setText(QApplication::translate("MainWindow", "Input image(s)", 0, QApplication::UnicodeUTF8));
661  toolButton->setText(QApplication::translate("MainWindow", "clear", 0, QApplication::UnicodeUTF8));
662  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
663 #ifndef QT_NO_TOOLTIP
664  label_9->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output resolution in x and y distance measure (e.g., meter). Leave empty to read from input data</p></body></html>", 0, QApplication::UnicodeUTF8));
665 #endif // QT_NO_TOOLTIP
666  label_9->setText(QApplication::translate("MainWindow", "Output resolution", 0, QApplication::UnicodeUTF8));
667  groupBox->setTitle(QApplication::translate("MainWindow", "Scale data", 0, QApplication::UnicodeUTF8));
668 #ifndef QT_NO_TOOLTIP
669  autoscale->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Auto scale input data from to (e.g., use from=0 and to=255 for Byte type image)</p></body></html>", 0, QApplication::UnicodeUTF8));
670 #endif // QT_NO_TOOLTIP
671  autoscale->setText(QApplication::translate("MainWindow", "autoscale", 0, QApplication::UnicodeUTF8));
672 #ifndef QT_NO_TOOLTIP
673  manual->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Manually scale data using scale and offset: output=scale*input+offset</p></body></html>", 0, QApplication::UnicodeUTF8));
674 #endif // QT_NO_TOOLTIP
675  manual->setText(QApplication::translate("MainWindow", "manual", 0, QApplication::UnicodeUTF8));
676  label_21->setText(QApplication::translate("MainWindow", "offset", 0, QApplication::UnicodeUTF8));
677  label_20->setText(QApplication::translate("MainWindow", "scale", 0, QApplication::UnicodeUTF8));
678 #ifndef QT_NO_TOOLTIP
679  noscale->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Do not scale the data</p></body></html>", 0, QApplication::UnicodeUTF8));
680 #endif // QT_NO_TOOLTIP
681  noscale->setText(QApplication::translate("MainWindow", "no scaling", 0, QApplication::UnicodeUTF8));
682  label_10->setText(QApplication::translate("MainWindow", "from", 0, QApplication::UnicodeUTF8));
683  label_11->setText(QApplication::translate("MainWindow", "to", 0, QApplication::UnicodeUTF8));
684  label_15->setText(QApplication::translate("MainWindow", "dx", 0, QApplication::UnicodeUTF8));
685  label_18->setText(QApplication::translate("MainWindow", "dy", 0, QApplication::UnicodeUTF8));
686  label_17->setText(QApplication::translate("MainWindow", "Resample method", 0, QApplication::UnicodeUTF8));
687  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Scaling", 0, QApplication::UnicodeUTF8));
688  label_6->setText(QApplication::translate("MainWindow", "Output data type", 0, QApplication::UnicodeUTF8));
689 #ifndef QT_NO_TOOLTIP
690  label_5->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Assign projection (e.g., epsg:3035). Notice this will not re-project the image. Use gdalwarp instead.</p></body></html>", 0, QApplication::UnicodeUTF8));
691 #endif // QT_NO_TOOLTIP
692  label_5->setText(QApplication::translate("MainWindow", "Assign projection (EPSG:code)", 0, QApplication::UnicodeUTF8));
693  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
694 #ifndef QT_NO_TOOLTIP
695  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output raster image</p></body></html>", 0, QApplication::UnicodeUTF8));
696 #endif // QT_NO_TOOLTIP
697  label_3->setText(QApplication::translate("MainWindow", "Output image", 0, QApplication::UnicodeUTF8));
698  toolButton_ct->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
699  tiled->setText(QApplication::translate("MainWindow", "Tiled", 0, QApplication::UnicodeUTF8));
700  label_13->setText(QApplication::translate("MainWindow", "compressed", 0, QApplication::UnicodeUTF8));
701  label_7->setText(QApplication::translate("MainWindow", "Output image format", 0, QApplication::UnicodeUTF8));
702 #ifndef QT_NO_TOOLTIP
703  label_14->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Nodata value to put in image if out of bounds</p></body></html>", 0, QApplication::UnicodeUTF8));
704 #endif // QT_NO_TOOLTIP
705  label_14->setText(QApplication::translate("MainWindow", "Output nodata value", 0, QApplication::UnicodeUTF8));
706  label_12->setText(QApplication::translate("MainWindow", "Interleaved", 0, QApplication::UnicodeUTF8));
707 #ifndef QT_NO_TOOLTIP
708  label_8->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Color table must be provided as ASCII text file with five (space delimited) columns:</p><p>value red green blue alpha</p></body></html>", 0, QApplication::UnicodeUTF8));
709 #endif // QT_NO_TOOLTIP
710  label_8->setText(QApplication::translate("MainWindow", "Color table (ASCII)", 0, QApplication::UnicodeUTF8));
711  tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
712  label_24->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
713  label_25->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
714  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
715  toolButton_Run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
716  toolButton_defaults->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
717  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
718  } // retranslateUi
719 
720 };
721 
722 namespace Ui {
723  class MainWindow: public Ui_MainWindow {};
724 } // namespace Ui
725 
726 QT_END_NAMESPACE
727 
728 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/dir_0f63d6441a2c250919e1e8723011eb2f_dep.md50000644000113200011300000000004012616110567020051 0000000000000086fe584ad2c1b5db72576c266e4d690apktools-2.6.6/doc/html/classMainWindow.html0000644000113200011300000001452612647637662015657 00000000000000 pktools: MainWindow Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
MainWindow Class Reference
Inheritance diagram for MainWindow:
Collaboration diagram for MainWindow:

Public Member Functions

 MainWindow (QWidget *parent=0)
 
 MainWindow (QWidget *parent=0)
 
 MainWindow (QWidget *parent=0)
 
 MainWindow (QWidget *parent=0)
 
 MainWindow (QWidget *parent=0)
 

Detailed Description

Definition at line 31 of file mainwindow.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/pklas2img.html0000644000113200011300000001704012647637662014440 00000000000000 pktools: pklas2img
pktools  2.6.6
Processing Kernel for geospatial data
pklas2img

Rasterize LAS/LAZ point clouds with filtering/compositing options

SYNOPSIS

Options: [-n attribute] [-comp method] [-fir type] [-a_srs] [-ulx value -uly value -lrx value -lry value] [-dx value -dy value] [-ot type] [-of format] [-ret value]* [-class number]*

Advanced options: [-nbin value] [-nodata value] [-co option]* [-ct colortable]

Description

The utility pklas2img converts a las/laz point cloud into a gridded raster dataset. The implementation is based on liblas API. You can define the bounding box, grid cell size and spatial reference set. The composite rule for multiple returns within a single grid cell can be set with the option -comp. The default attribute is z (heiht), but can also be intensity (if available), scan angle rank (-n angle), the return number (-n return) or the total number of returns in that grid cell (-n nreturn). To select specific returns only, set the option -fir (first, last, single, multiple, or all).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input las file
    n name std::string z names of the attribute to select: intensity, angle, return, nreturn, z
    ret ret unsigned short number(s) of returns to include
    class class unsigned short classes to keep: 0 (created, never classified), 1 (unclassified), 2 (ground), 3 (low vegetation), 4 (medium vegetation), 5 (high vegetation), 6 (building), 7 (low point, noise), 8 (model key-point), 9 (water), 10 (reserved), 11 (reserved), 12 (overlap)
    comp comp std::string last composite for multiple points in cell (min, max, median, mean, sum, first, last, profile (percentile height values), percentile, number (point density)). Last: overwrite cells with latest point
    fir filter std::string all filter las points (first,last,single,multiple,all).
    angle_min angle_min unsigned short minimum scan angle to read points.
    angle_max angle_max unsigned short maximum scan angle to read points.
    o output std::string Output image file
    a_srs a_srs std::string assign the projection for the output file in epsg code, e.g., epsg:3035 for European LAEA projection
    ulx ulx double 0 Upper left x value bounding box (in geocoordinates if georef is true). 0 is read from input file
    uly uly double 0 Upper left y value bounding box (in geocoordinates if georef is true). 0 is read from input file
    lrx lrx double 0 Lower right x value bounding box (in geocoordinates if georef is true). 0 is read from input file
    lry lry double 0 Lower right y value bounding box (in geocoordinates if georef is true). 0 is read from input file
    ot otype std::string Byte Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate).
    dx dx double 1 Output resolution in x (in meter)
    dy dy double 1 Output resolution in y (in meter)
    nbin nbin short 10 Number of percentile bins for calculating percentile height value profile (=number of output bands)
    perc perc double 95 Percentile value used for rule percentile
    nodata nodata short 0 nodata value to put in image
    co co std::string Creation option for output file. Multiple options can be specified.
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    pklas2img -i lasfile -o output
pktools-2.6.6/doc/html/classImgReaderGdal__inherit__graph.png0000644000113200011300000001510612647437044021236 00000000000000‰PNG  IHDR}»H1‘ŒbKGDÿÿÿ ½§“ûIDATxœí{PgºÆŸ†¹Üˆ¨]Z–1jci¼”)Vã¥v# 1‘]w¡4«®ÖÊ ÑÝ£¢‚Z+ xÁ5‘ˆ‰É®$FT” 7E@†a†¹¾çÎt™„éþUu1Ý_ï÷4O—¾óˆˆÀÁ*ø–À1òp¦³Ît™ÎB¦jkk±mÛ6tuu¤3ƒµk×M3izQQòóó1lÂ8†‡[·n!;;ûÙMדmvQÃKdddŸé\ŸÎB8ÓYg: áLg!f5Ç㡲²Òœ!™¸=§qãÆaþüù())1{Yƒ¡¢¢+W®„««+¼½½ŽÒÒÒ>óTVV‚Çã yÁ0fjúþó466¢±±eee˜2e Ö­[‡¡^/ª®®†‡‡Ç ó?xð/½ô|}}QXXˆ«W¯ÂÏÏ .Ľ{÷†¤m¸è÷m´àéé ooo€··7<///477C,:®N§CKKË ó'&&bÁ‚HKKcjeXX¤R)’““qöìÙAÇ.†µ¦óxì9gggÝͱ±y¨ªªÂŒ3 ò…„„ÌK$P÷NŠÎÎNÄÄÄ **ŠI …¨¨¨À²eË0{ölœ9s†IsuuÅ7PTT„çž{¯¼ò ¾ùæðùÆ7¿¦¦>>>ÌÑÂ’%Kpÿþ}&=88@w—`oo‰D¤é5¶¶¶2Ë>ÅÅÅ8zô(³¾B¡€N§Ã… ÐÚÚŠ-[¶`ÕªUÆôÄÃÃÃ`'kkkCQQ“®ßaù|>/^Œ'NôŠ‘••Åüö÷÷ïu§ßÞ¾t£bô¾mÛ6$$$ÀÝݳgÏFii)öíÛ×ç@ÎÅÅÉdpvv†R©„J¥‚P(„B¡ÀþýûàñxXºt)Î;‡W^y*• ¶¶¶ppp`Œ—Édprr¬^½»víBjj*ÚÛÛ9sæ ..®—ŽÄÄDÌŸ?...ظq#t:rssqùòefçˆE|||˜I$ѲeË(77—<==æ#"ÒjµäââB÷ïßg–:tˆÜÜÜhâĉtôèQZ¿~=‰Åbf{I(Rpp0åææ‘Z­¦ ““G*•ÒæÍ›ÉÕÕ•ÜÝÝ)::š:;;Mö±ÅÅÅ´xñbrqq¡àà`Š‹‹#™LF/¼ði4JII¡   rtt¤yóæQQQË”î11,yyyTRRb°ìâÅ‹:"å[È „²²2lÚ´ ÅÅÅËå(**ž={°uëVKK³JFEŸž¹\Žððp477# QQQˆ‰‰±´4«dT˜.pàÀ8pÀÒRXÁ¨hÞ9FÎt™ÎB8ÓYH¿9c§9F7ÕÕÕ0™nÒt___ØØØXéaãÇ¿™ì{h4ÆÏ¿u^}õU“i<"ö=Ÿ^TT…Õ«`óæ…HL\mi9#+ûôÿùŸ;Ì_Fga5#ëLW©4¸téG@{»7oþ¯…<¬3ý«¯~†\®ØØðqéÒ +yXgzNÎØØto¶F£ÃÕ«eP(TV5²°ÊôÎN%¾øâ'h4Zf™R©AAÁè¼?}¸`•éO|>99?XH‘e`•é99?ôºK£ÑáÆŸ!•*,¤jäaé­­¸y³ZmïC4"¿þUfU–5¦çç›~ ˆpá{šxÖ˜~ñâm“;êt„¢¢*<|Ø>ª,+Lohx‚;w~NgúŒ³ yy}?^l-°Âô¼¼ôw…A£Ñ"'‡'jFÅ=rÃ\®‚‹Á2™L {{[¿î÷Ãðüÿ¨„•WÙ`„?âøñßã7Bû_ÙÊ`EóÎag: áLg!œé,„3…p¦³Ît™ÎB8ÓYg: áLg!œé,„3…p¦³Ît™ÎB8ÓYg: áLg!œé,„3…p¦³Ît™ÎB8ÓYg: áLg!œé,„3…p¦³Ît™ÎB8ÓÙˆ±/ôÅÇÇý|µ5Mvv~Äç;X\ÇpNþþþF¿Àhô3555 ADD„±dŽ1À½{÷pá£i&_4$‹ûü$ÇØ…ëÓYg: áLg!œé,Äl¦/Z´õõõæ g·çôúë¯ã½÷ÞCee¥ÙË€úúz,Z´hPyëêê°sçN¬Zµ «W¯ÆîÝ»QUU5äò†¢Éc¢¦9r999ÈÉÉAzz:ž{î9ìß¿ßä[-Á£G°mÛ6xzzâСCHNN†——¶oߎ_~ùÅÒò ï†?~<ÜÜÜnnnˆÅoû[´··cüøñV×͹sçð›ßü;vì`¾1eÊtvvâüùóصk—…þʰ™¾hÑ"$$$à³Ï>C{{;"##áááÓ§OC*•bÍš5ˆŠŠ!//—.]Bss3¦M›†ˆˆ|ðÁ¸qã†ÑØ666pttd–i4œ:u _|ñàõ×_ÇÖ­[!pëÖ-dddàÁƒpttÄš5k°aÃèt:dggãÊ•+hiiA@@ÂÃÃûùðáClÚ´ }ô’““±{÷nãOúS¯Ï…¼óÎ;xüø1ô[ž)æfXkú;wpìØ1|õÕWHIIÁ«¯¾Šôôtâ£>ÂÚµkñÍ7ß 33 ˜:u**++qøðaƒ8]]]P(º¿±"—Ë‘™™‰%K–ÀÖÖ–YçâÅ‹hllDZZd2’’’púôilܸ{÷îÅ’%Kðᇢ¤¤‰‰‰X±b ••…;v $$•••HIIé7æŠ+ÙÙÙØ¹s'üýýÑÐÐ&¯^¯P(Ä„ 999&Ë“Ëå&uš›aíÓ×­[,]º°aÃ888`Ù²e€ŽŽäää 66sæÌH$ÂìÙ³±yófƒ8[·nÅŠ+°bÅ ¬]»×®]úuë Ö¹zõ*âââ ‹€˜˜|ÿý÷ …HOOÇöíÛáîî±X èììÄåË—‹… ÂÝÝsçÎEttt¿1õDGG#,, *• D{{{&M¯W?è³¼¾tš›a­éÝ…Fç ¡¡“'O6È׳ÆÝý¥¯¯/@©T"##Ä'Ÿ|¬ÓÔÔ„5kÖästt„@ @]]RSS¡P(0eÊ&½¹¹AAAyz~‚ÚTL=~~~ºÇB¡uuuL|}×ÔÑÑ7Þx£ßòúÒin,>óòòÂýû÷ þÙ}víìì°lÙ2äç烈˜>T$áðáÃÌÎ!“ÉÐÚÚ ¥R‰}ûöaß¾}˜7oÔj5®^½ ðööFUU™ø555ÌoS1õèw^‡Y³f!??üã ôö—ôU^_:ÍÅÙÂÃÑ––†~øR©?þø#Μ9Ók@ÔGGGÈår¦ß€… âäÉ“xøð!ª««‘€þóŸP«ÕÐh4P©T8}ú4€î>ô7ÞÀ±cÇðïÿ­­­øþûï‘‘‘ÑoLclݺ×®]CZZª««QYY‰³gÏ"??ŸÙ9ú*¯/æÆâ5=<<Z­‡F{{;¦OŸŽØØXƒÕÓxzzÂÁÁR©”é2¶lÙ‚#GŽàí·ßÇÃË/¿Œ˜˜ØÙÙáwÞÁ0nÜ8lذ‹/FBBrrr V«qìØ1´´´ 00{öìÁ»ï¾ÛgLýh¼'øøãqüøq\¾|˜3g>þøc¼÷Þ{̶š*ÏÉÉɤÎ#GŽ˜õnôs‘‘‘hnnÆ_ÿúW³fŒ[·nA,4y7oÞDff&Nž<9ìå[+_}õ•ÉXoÞ«««‘˜˜‰D¥R‰{÷î!##+W®´´4«ÅâÍû›o¾‰®®.ìÞ½Ož<–/_ŽU«VYZšÕbqÓmll°eËlÙ²ÅÒRXƒÅ›wŽ‘‡3…p¦³Îtbr WZZŠ?ÿùÏ#©ÅìñÁãéïý–|6àñ´Ã#j„hkk3™fÔtkxÈA§ãáömoøùIáã3ð+U*·o{cúôŒ¯F…ÃOÏkõ}îÅ øïÿþ’||þ@ÑÑgž)ßåË?’Ïèµ×’N§&u–Å*ût¹\…£G¯îÜ©y¦¼eeuàóyøùçFܸñó0¨³³Sèó †1ÝÜœÐÖfþûÐG‹ß#7T|}]qëÖ_ ÓššÚQ[Û‚¿ý-]xá?TV>Bmm Z[;ÑÞ®0§³SGG{<÷ÜxŠ¡Vkñå—å8w.~~î˜8Ñ vvcþßÀÄ}ïcßÿþÆwÀ?þ1øÇ|¯]û o½•Žšš…Öa¶ž1ß¼C¡PcÜ8ÛþWì{{Ûÿ¥êgͱ‡•š®Â¸qÂ!ÅÐçW(Œûe¬Òt¹Üœ¦s5}L P¨˜æy°è»®¦Ìѧs5}ŒaŽ>È1ºMçšwSX¥é:õy} èó[ùö§±JÓmløP«‡ö°‚>ÏS±Ö‚õm[[“—YŠ>¿­íÐZŒÑˆUš.ؘ±¦s¦ lmùÐhL_Fúü\M#ækÞ¹š>F°µ5_óÎÕô1BwM7OóÎÞÇÜè½o¬Òt¡Ð¦Ï%‚>¿µÝ@X©é"Ñ8tt˜¾5j ´·Ë™XÖ†Ušîâ2Ož Õtø|œœìû_yŒaµ¦K¥C7ÝÙyø|Óo£«X¥é"Ñ8H¥]CŠ!•*¬²i¬Ôtg47K‡£¹¹NfR4º°JÓÅb<|84Ó>”ÂÓÓÙLŠFViº—— ººÔÌ|0fðöî6«±ñÉ òŸÀÇGdNY£«4ÝÕÕ"‘îßïý­•ðèQärüý=̬lt`•¦ÀäÉzåˆ1jjºwÎô1†¿¿cÞ³RSóöö¶\ó>Ö˜<ÙÕÕ̓Ê[]ÝŒI“Üûü6ÜXÆjMŸ>ÝUUÐÙùìorþé§:LŸî; ªFVmºNG(/oxæ¼wïÖ#$dÂ0¨\,®©©Áµk×,¥Å¬ììø8sæ"Š‹Þ7wuiÑÚ*CMM)Nœ¨F…#Ç”)S°hÑ¢_ô|ø›o¾©ÿ ‚UL<žpùÄãÙX\¿¹&@`ú}ïZ­ "«˜t:å ó©¡Ói,®ßSVV4ûˆ¬¶Oç0 g: áLg!œé,dȦóx>ÅÅÅ8zôhŸZ=<< ‘H˜óÙmmm(**bÒõ;3ŸÏÇâÅ‹qâĉ^1²²²˜ßæÔ6,6zß¶màîîŽÙ³g£´´ûöíc@o½õÞÿ}üýïÇôéÓQ]]øøxüîw¿ƒA¬¸¸8œ8qmmmøàƒ°iÓ&¸»»#>>"‘sçÎEII öîÝ P*•P©T …P(Ø¿? ££ƒi•d2œœºŸpY½z5víÚ…ÔÔT´··#::sæÌA\\\¯íJLLÄüùóáââ‚7B§Ó!77—/_fvŽØØØ!i2=Ûzsõé™×jµtøða $‘HDË–-£ÜÜ\òôô$""µZM¤iÓ¦‘½½=Ð_þòêììdbéû¸S§NѤI“ÈÃÃÞÿ}R(¤Ñh(%%…‚‚‚ÈÑÑ‘æÍ›GEEELÿvèÐ!rss£‰'ÒÑ£Giýúõ$‹I­VÓ‚ ÈÉɉ)G*•ÒæÍ›ÉÕÕ•ÜÝÝ)::š:;;Mö±ÅÅÅ´xñbrqq¡àà`Š‹‹#™LF/¼ðÑ µšÜ`ÉËË£’’ƒe/^¤ÐÐÐÇÌ?m3Ýb}zYY6mÚ„ââbÈåraÏž=غu«¥$±‹õé ËåGss3…˜˜˜Çpqqy¦õ9º1øpOdd$ ;;Ûb‚8ÌKvv6Ö­[gp¸Ë]pa!œé,„3…p¦³ÎtbpÈfccƒÏ>ûÌjÜc+66†¯:58d«®®Æ;wF\Çðâåå…—_~™™·Êìrô ×§³Ît™ÎB.XZÇÈòÙ®áǘIEND®B`‚pktools-2.6.6/doc/html/classImgReaderOgr.html0000644000113200011300000005347012647637662016113 00000000000000 pktools: ImgReaderOgr Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Collaboration diagram for ImgReaderOgr:

Public Member Functions

 ImgReaderOgr (const std::string &filename)
 
void open (const std::string &filename)
 
void close (void)
 
template<typename T >
int readXY (std::vector< T > &xVector, std::vector< T > &yVector, int layer=0, bool verbose=false)
 
template<typename T >
int readY (std::vector< T > &yVector, int layer=0, bool verbose=false)
 
template<typename T >
int readData (std::vector< T > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, OGRFeature *poFeature, int layer=0, bool pos=false, bool verbose=false)
 
template<typename T >
int readData (std::vector< T > &data, const OGRFieldType &fieldType, const std::string &theField, int layer=0, bool verbose=false)
 
template<typename T >
int readData (Vector2d< T > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, int layer=0, bool pos=false, bool verbose=false)
 
template<typename T >
int readData (std::map< int, Vector2d< T > > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &label, int layer=0, bool pos=false, bool verbose=false)
 
template<typename T >
int readData (std::map< std::string, Vector2d< T > > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &label, int layer=0, bool pos=false, bool verbose=false)
 
unsigned int readDataImageOgr (std::map< std::string, Vector2d< float > > &mapPixels, std::vector< std::string > &fields, const std::vector< unsigned short > &bands, const std::string &label, const std::vector< std::string > &layers, int verbose=false)
 
unsigned int readDataImageOgr (std::map< std::string, Vector2d< float > > &mapPixels, std::vector< std::string > &fields, double start, double end, const std::string &label, const std::vector< std::string > &layers, int verbose=false)
 
unsigned long int getFeatureCount (int layer=0) const
 
int getFieldCount (int layer=0) const
 
OGRLayer * getLayer (int layer=0)
 
std::string getProjection (int layer=0) const
 
OGRwkbGeometryType getGeometryType (int layer=0) const
 
std::string getLayerName (int layer=0)
 
int getFields (std::vector< std::string > &fields, int layer=0) const
 
int getFields (std::vector< OGRFieldDefn * > &fields, int layer=0) const
 
OGRDataSource * getDataSource (void)
 
OGRSFDriver * getDriver (void) const
 
int getLayerCount (void) const
 
template<typename T >
int readSql (Vector2d< T > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &sqlStatement, OGRGeometry *spatialFilter=NULL, int layer=0, bool pos=false, bool verbose=false)
 
template<typename T >
int readSql (std::map< int, Vector2d< T > > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &label, const std::string &sqlStatement, OGRGeometry *spatialFilter, int layer=0, bool pos=false, bool verbose=false)
 
bool getExtent (double &ulx, double &uly, double &lrx, double &lry, int layer)
 
bool getExtent (double &ulx, double &uly, double &lrx, double &lry)
 
void setFieldSeparator (const char fs)
 
char getFieldSeparator () const
 
template<>
int readData (std::vector< std::string > &data, const OGRFieldType &fieldType, const std::string &theField, int layer, bool verbose)
 

Protected Member Functions

void setCodec (void)
 

Protected Attributes

std::string m_filename
 
OGRDataSource * m_datasource
 
char m_fs
 

Friends

std::ostream & operator<< (std::ostream &theOstream, ImgReaderOgr &theImageReader)
 

Detailed Description

Definition at line 35 of file ImgReaderOgr.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/pkfsann_8h_source.html0000644000113200011300000002523712647637662016175 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfsann.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfsann.h
1 /**********************************************************************
2 pkfsann.h: feature selection for ann classifier
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <string>
21 #include <vector>
22 #include "base/Vector2d.h"
23 
24 #ifndef _PKFSANNH_H_
25 #define _PKFSANNH_H_
26 
27 enum SelectorValue { NA=0, SFFS=1, SFS=2, SBS=3, BFS=4};
28 
30 {
31  public:
33  CostFactoryANN(const std::vector<unsigned int>& nneuron, float connection, const std::vector<float> weights, float learning, unsigned int maxit, unsigned short cv, bool verbose);
34  ~CostFactoryANN();
35  double getCost(const std::vector<Vector2d<float> > &trainingFeatures);
36 
37  private:
38  std::vector<unsigned int> m_nneuron;
39  float m_connection;
40  const std::vector<float> m_weights;
41  float m_learning;
42  unsigned int m_maxit;
43 };
44 
45 
46 #endif
pktools-2.6.6/doc/html/structSolver_1_1SolutionInfo-members.html0000644000113200011300000001115412647637662021727 00000000000000 pktools: Member List
Solver::SolutionInfo Member List

This is the complete list of members for Solver::SolutionInfo, including all inherited members.

obj (defined in Solver::SolutionInfo)Solver::SolutionInfo
r (defined in Solver::SolutionInfo)Solver::SolutionInfo
rho (defined in Solver::SolutionInfo)Solver::SolutionInfo
upper_bound_n (defined in Solver::SolutionInfo)Solver::SolutionInfo
upper_bound_p (defined in Solver::SolutionInfo)Solver::SolutionInfo
pktools-2.6.6/doc/html/classBadConversion__inherit__graph.md50000644000113200011300000000004012616110566021224 000000000000005b65c0253f2ad29e47793e73620a6377pktools-2.6.6/doc/html/classCostFactory-members.html0000644000113200011300000002312412647637662017465 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
CostFactory Member List

This is the complete list of members for CostFactory, including all inherited members.

CostFactory(void) (defined in CostFactory)CostFactoryinline
CostFactory(unsigned short cv, short verbose) (defined in CostFactory)CostFactoryinline
getClassIndex(std::string classname) const (defined in CostFactory)CostFactoryinline
getClassValueMap() (defined in CostFactory)CostFactoryinline
getCost(const std::vector< Vector2d< float > > &trainingFeatures)=0 (defined in CostFactory)CostFactorypure virtual
getNameVector() (defined in CostFactory)CostFactoryinline
m_classvalue (defined in CostFactory)CostFactoryprotected
m_classValueMap (defined in CostFactory)CostFactoryprotected
m_cm (defined in CostFactory)CostFactoryprotected
m_cv (defined in CostFactory)CostFactoryprotected
m_nameVector (defined in CostFactory)CostFactoryprotected
m_nctest (defined in CostFactory)CostFactoryprotected
m_nctraining (defined in CostFactory)CostFactoryprotected
m_verbose (defined in CostFactory)CostFactoryprotected
pushBackClassName(std::string classname) (defined in CostFactory)CostFactoryinline
pushBackName(std::string classname) (defined in CostFactory)CostFactoryinline
setClassValueMap(const std::string &classname, short classvalue) (defined in CostFactory)CostFactoryinline
setCv(unsigned short cv) (defined in CostFactory)CostFactoryinline
setNameVector(std::vector< std::string > &nameVector) (defined in CostFactory)CostFactoryinline
setNcTest(const std::vector< unsigned int > nctest) (defined in CostFactory)CostFactoryinline
setNcTraining(const std::vector< unsigned int > nctraining) (defined in CostFactory)CostFactoryinline
~CostFactory(void) (defined in CostFactory)CostFactoryinlinevirtual
pktools-2.6.6/doc/html/classFileReaderLas.html0000644000113200011300000003462112647637662016243 00000000000000 pktools: FileReaderLas Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Collaboration diagram for FileReaderLas:

Public Member Functions

 FileReaderLas (const std::string &filename)
 
void open (const std::string &filename)
 
void close (void)
 
liblas::Header const & getHeader () const
 
bool isCompressed () const
 
unsigned long int getPointCount () const
 
void las2ascii (const std::string &filename, bool verbose=false) const
 
template<typename T >
liblas::Bounds< T > getExtent () const
 
void getExtent (double &ulx, double &uly, double &lrx, double &lry) const
 
double getMinZ () const
 
double getMaxZ () const
 
void resetReader ()
 
void setFilter (std::vector< liblas::FilterPtr > const &filters)
 
bool const & readNextPoint (liblas::Point &thePoint)
 
liblas::Point const & readPointAt (std::size_t n)
 
void addReturnsFilter (std::vector< unsigned short > const &returns)
 
void addClassFilter (std::vector< unsigned short > const &classes)
 
void setFilters (const std::vector< liblas::FilterPtr > &filters)
 
void setFilters ()
 

Protected Member Functions

void setCodec (const std::string &filename)
 

Protected Attributes

std::string m_filename
 
std::ifstream * m_ifstream
 
liblas::Reader * m_reader
 
std::vector< liblas::FilterPtr > m_filters
 

Detailed Description

Definition at line 39 of file FileReaderLas.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/config_8h_source.html0000644000113200011300000003422112647637661015772 00000000000000 pktools: /home/kempenep/pktools/config.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
/home/kempenep/pktools/config.h
1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
3 
4 /* Define to 1 if you have the <dlfcn.h> header file. */
5 #define HAVE_DLFCN_H 1
6 
7 /* Define to 1 if GDAL library are available */
8 #define HAVE_GDAL 1
9 
10 /* Define to 1 if you have the <gdal.h> header file. */
11 /* #undef HAVE_GDAL_H */
12 
13 /* Define to 1 if GDAL library includes OGR support */
14 #define HAVE_GDAL_OGR 1
15 
16 /* Define to 1 if you have the <inttypes.h> header file. */
17 #define HAVE_INTTYPES_H 1
18 
19 /* Define to 1 if you have the <iostream> header file. */
20 #define HAVE_IOSTREAM 1
21 
22 /* Define to 1 if you have the <memory.h> header file. */
23 #define HAVE_MEMORY_H 1
24 
25 /* Define to 1 if you have the <stdint.h> header file. */
26 #define HAVE_STDINT_H 1
27 
28 /* Define to 1 if you have the <stdlib.h> header file. */
29 #define HAVE_STDLIB_H 1
30 
31 /* Define to 1 if you have the <string> header file. */
32 #define HAVE_STRING 1
33 
34 /* Define to 1 if you have the <strings.h> header file. */
35 #define HAVE_STRINGS_H 1
36 
37 /* Define to 1 if you have the <string.h> header file. */
38 #define HAVE_STRING_H 1
39 
40 /* Define to 1 if you have the <sys/stat.h> header file. */
41 #define HAVE_SYS_STAT_H 1
42 
43 /* Define to 1 if you have the <sys/types.h> header file. */
44 #define HAVE_SYS_TYPES_H 1
45 
46 /* Define to 1 if you have the <unistd.h> header file. */
47 #define HAVE_UNISTD_H 1
48 
49 /* Define to the sub-directory in which libtool stores uninstalled libraries.
50  */
51 #define LT_OBJDIR ".libs/"
52 
53 /* Name of package */
54 #define PACKAGE "pktools"
55 
56 /* Define to the address where bug reports for this package should be sent. */
57 #define PACKAGE_BUGREPORT "kempenep@gmail.com"
58 
59 /* Define to the full name of this package. */
60 #define PACKAGE_NAME "pktools"
61 
62 /* Define to the full name and version of this package. */
63 #define PACKAGE_STRING "pktools 2.6.6"
64 
65 /* Define to the one symbol short name of this package. */
66 #define PACKAGE_TARNAME "pktools"
67 
68 /* Define to the home page for this package. */
69 #define PACKAGE_URL ""
70 
71 /* Define to the version of this package. */
72 #define PACKAGE_VERSION "2.6.6"
73 
74 /* Define to 1 if you have the ANSI C header files. */
75 #define STDC_HEADERS 1
76 
77 /* Version number of package */
78 #define VERSION "2.6.6"
79 
80 /* Define to `unsigned int' if <sys/types.h> does not define. */
81 /* #undef size_t */
pktools-2.6.6/doc/html/ftv2mlastnode.png0000644000113200011300000000036612647637661015161 00000000000000‰PNG  IHDRɪ|½IDATxíÝ!NAÅñ¤‡à\ ÷à Um@`Ô5iÒ`ëh ‚ÅW7] b§ÝˆŠ&oföÍd¾YÔ4 üšcø ‡€´‹Åòù3v=¼]†§µ\B… I¿‹=B·™B¡®;¸k´µ W°ÍN@vyÍÑÖ4ãß÷]ÈâYìã§|M}]ÔÚx6a }ôdׇØYüú¨>¤||5?Ó>|žB"¡î'¡IEND®B`‚pktools-2.6.6/doc/html/dir_0f38b5d14ac73b43e2a48a75f9e70be8_dep.md50000644000113200011300000000004012616110567020372 00000000000000e723766d52f35e43318ec9e0f0a6bc74pktools-2.6.6/doc/html/md_examples_pkdiff.html0000644000113200011300000000564512647637662016400 00000000000000 pktools: examples_pkdiff
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkdiff

Examples of pkdiff

Check if two raster images are different (reports only if images are different or not)

pkdiff -i input.tif -ref reference.tif

Validate a classification map using points from a reference sample and report confusion matrix

pkdiff -i classificationMap.tif -ref referencePoints.shp -cm
pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite__inherit__graph.map0000644000113200011300000000012312616110567025362 00000000000000 pktools-2.6.6/doc/html/inherit_graph_22.map0000644000113200011300000000031312647437044015471 00000000000000 pktools-2.6.6/doc/html/md_faq_pkcomposite.html0000644000113200011300000001036012647637662016411 00000000000000 pktools: faq_pkcomposite
pktools  2.6.6
Processing Kernel for geospatial data
faq_pkcomposite

Frequently asked questions about pkcomposite

  • How to use different nodata values in input images?

    For individual invalid value(s) in input image, use -srcnodata

    Usage: use unique value for each invalid bands set in -vb (–bndnodata) or use a single value that will be applied to all invalid bands

    Example:

pkcomposite -i input1.tif -i input2.tif -o output.tif -srcnodata 0 -srcnodata 255 -bndnodat 0 -bndnodata 1

will consider 0 in band 0 and 255 in band 1 of input images as no value

pkcomposite -i input1.tif -i input2.tif -o output.tif -srcnodata 0 -bndnodata 0 -bndnodata 1

will consider 0 in both bands 0 and 1 of input images as no value

  • How to use a range of nodata values in input images?

    For range(s) of invalid values in input images: use -min (–min) and -max (–max) Usage: use unique range set for each invalid bands set in -bndnodata

    Example:

    pkcomposite -i input1.tif -i input2.tif -o output.tif -min 0 -max 200 -min 0 -max 2 -bndnodata 0 -bndnodata 1

    will consider all negative values in band 0 and 1 of input images as invalid. Values larger or equal to 200 in band 0 will be invalid, as well as values larger or equal to 2 in band 1

  • If I take the mean value as composit rule for multi-band input images, will the output image contain the mean value of overlapping images in each band?

    Yes

pktools-2.6.6/doc/html/classCostFactorySVM-members.html0000644000113200011300000002520412647637662020054 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
CostFactorySVM Member List

This is the complete list of members for CostFactorySVM, including all inherited members.

CostFactory(void) (defined in CostFactory)CostFactoryinline
CostFactory(unsigned short cv, short verbose) (defined in CostFactory)CostFactoryinline
CostFactorySVM() (defined in CostFactorySVM)CostFactorySVM
CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose) (defined in CostFactorySVM)CostFactorySVM
getClassIndex(std::string classname) const (defined in CostFactory)CostFactoryinline
getClassValueMap() (defined in CostFactory)CostFactoryinline
getCost(const std::vector< Vector2d< float > > &trainingFeatures) (defined in CostFactorySVM)CostFactorySVMvirtual
getNameVector() (defined in CostFactory)CostFactoryinline
m_classvalue (defined in CostFactory)CostFactoryprotected
m_classValueMap (defined in CostFactory)CostFactoryprotected
m_cm (defined in CostFactory)CostFactoryprotected
m_cv (defined in CostFactory)CostFactoryprotected
m_nameVector (defined in CostFactory)CostFactoryprotected
m_nctest (defined in CostFactory)CostFactoryprotected
m_nctraining (defined in CostFactory)CostFactoryprotected
m_verbose (defined in CostFactory)CostFactoryprotected
pushBackClassName(std::string classname) (defined in CostFactory)CostFactoryinline
pushBackName(std::string classname) (defined in CostFactory)CostFactoryinline
setClassValueMap(const std::string &classname, short classvalue) (defined in CostFactory)CostFactoryinline
setCv(unsigned short cv) (defined in CostFactory)CostFactoryinline
setNameVector(std::vector< std::string > &nameVector) (defined in CostFactory)CostFactoryinline
setNcTest(const std::vector< unsigned int > nctest) (defined in CostFactory)CostFactoryinline
setNcTraining(const std::vector< unsigned int > nctraining) (defined in CostFactory)CostFactoryinline
~CostFactory(void) (defined in CostFactory)CostFactoryinlinevirtual
~CostFactorySVM() (defined in CostFactorySVM)CostFactorySVM
pktools-2.6.6/doc/html/dir_0d45166ba6790a432639a127a727f02c_dep.md50000644000113200011300000000004012616110567017775 00000000000000817dcbce1d237547e8b7e579102e7493pktools-2.6.6/doc/html/inherit_graph_41.png0000644000113200011300000000215612647437044015510 00000000000000‰PNG  IHDRe%ÔF°ôbKGDÿÿÿ ½§“#IDAThí™OH:KÀg3+4 ÑM¤ÒD!Dê$:DÒ%ŠBM$Èé ý;F‡ ¨¨(¼”™`":tÈ‚‚ÄN¦VFĦXšî;ì{ò{Vú[å•ïÇ~N3³3;ßù¸3;;B‚œß¦è§øŸûÂî ¸/l§åÍfóòòò„R€ˆD¢………_K ´÷£B¡8>>–J¥ßX!â÷ûGšŸôç •JM&ÓwEU¸˜L&¥R™Vˆ¯_ØÀ}a÷… Ü6þX_WWWa½”•?Ö×î 9ú²Ùlb±¸¬¬¬¶¶Öh4:;;GFFЫoooT*Õn· Z__‰D•••333F£±¦¦¦¢¢bbb"Ãý³¶z~~îëë£Óégttôõõ5‘H @@¡PšššNNNКñx\§Ó1™Lƒ¡ÓéâñxnCþäßÈår¹\Žd$—––.--µµµâââp8¼µµÅår“É$‚ V«•ÍfÇãqts¬R©B¡Ðêê*@¡P„B!ô“ëééé«.²¶R«Õ---ÇétÖ××OOOÏÏÏ3 ‹Åro·ÛÙl6:ºÙÙÙîîîÛÛ[§ÓÙÐÐ066æv»?ü#ÛÛÛ«åâ †a"‘877 “ÉäËËK"‘ˆD"d2ùôôAžž½^Ÿùùù9‚ ±X,-ív»3øÊÐ*‹—Ë…V¶X,|>_ lll¤î°¹¹‰ŽV(´ðàà@"‘äã+—ùH¥R‡Ãinn>::***"‘Hf³9‰Øl6F“ªO¡PD"1-™ ­‰ÇC³|>ÿîîÎï÷K$’Ts±XŒ&®¯¯Y,Aµ¶¶ú|¾†œ"_Ñh4™LîììÀ0<00ÐÞÞÃ0@¥R™Íæ½½½ÆÆÆººº|ÂÊ “É$^¯Íz<žªªªêêê‹‹‹TËËK4A§ÓSr0t8ùt‹/‚d2Ùîîn(ŠÅbD"‘D"d2Y0œššêïïÏ'¦¬‰D¥R944äóù\.×øø¸Z­ÔétV«õááarr­ÜÕÕ¥×ëonnœNg[[Ûââb^}§ÍÏßY¿Ð¹ÍãñJJJ„B¡ÕjM•kµÚòòòp8üëJ”úy¿J$k+†{{{i4‹ÅŽF£ïïïƒÏç“Éd©TŠ>G‚„B!FC¥Ri4šV«D"ù¬_ŸœðóðÏyNš|¿ŠOÎ ¿“¯¾ãBýWô‡}¬—¯Àç#6p_ØÀ}a÷…OÖ{¯×»²²òý¡gggŸ”¦í_SgX8.—›e“|ýÂî ¸/lྰñD¹¹/ÑæfIEND®B`‚pktools-2.6.6/doc/html/classCostFactory__inherit__graph.png0000644000113200011300000001370512616110567021044 00000000000000‰PNG  IHDRpJ<øXbKGDÿÿÿ ½§“zIDATxœíyXGÇg¹AQ¬–ŠR¬âE_DÂ)PD¡µÊ!õ¢¢"ˆøà‘ˆø ëQE ­ ‚E•KÁr%’dçýcßæ R„„2Ÿ¿vg&¿ùîÌ~wgö !¢kPÈ€@ô‘€Œ„@Èd$B(‘- '²jÕª’’²UôPFŽK¶Š†®ÚIƒaØ—_~©­­M¶GMMÍ_ý…öiЩmX,– Ù*z999[¶l![EOÍ‘€Œ„@Èd$B #!2]lè<ïÞ½KHHxðàÁßÿmllìáá1uêÔ®œ>}ºtâµk׺Ñ= #u’††ŸI“&………©¨¨Ü¾}{ëÖ­QQQãÇïxÊÊÊ+Vdee‰R8 §§×9IÒÑÝ2R'IMMµ´´ !VëêêØlög Çñ††ñ”4¨s’¤£!º 4Gê$¹¹¹‹-Oñöö^»v-±ÜÔÔ½`Á‹•ÐÚÚ ¸qãÆ²eËìììÜÝÝ/]ºð÷÷8::¶_×Í›7}}}ííí-Ztüøq€P(LMMuqqqppؾ}{SS“t4i ¯_¿ž>}zaa¡‹‹ËòåËwîÜI”är¹ööö¥¥¥²k…©3455ÕÕÕ‰'2™LÑÃûöí«­­MLLܱcÇŸþyâÄ îààpòäIOOÏ;wòx¼øøx@ff¦(ÇãŠ! [ZZ6oÞlff–žž¾råÊC‡½ÿ>###77wûöí{ö쩨¨HOOHD“Ö@¤s8œŸ~úiÙ²eùùùB¡ŸŸ¯§§7lØ0¹7\ß í:ñŒ †amæ ‚«W¯¦¤¤³%K–|Àq<<<üܹssæÌY¿~}cccG*úðáCxx¸««kRRÒêÕ«‰D ªª*bùéÓ§ÄÐNœ65ËJJÿ;zÚØØüþûï999£FÒÒÒêL+ þ©“,[¶ìþýûÛ¶m{øðaYYYZZZff&10SRRš>}zllleeåóçÏSRRfÍš…aXHHHnnnss3ŸÏWRR í¸\n;ñù|@ ¤¤ÔÚÚššš hii±³³KNN~þüùóçÏ÷íÛW]]-*ODkSƒDd ¡P˜––fgg'ÛÆQ@ÐЮ“ 80)))!!!,,ŒËåEEEMœ8‘ÈýñÇ8°bÅ 6cÆ :¾nݺƒÖÔÔèë뇅…Ñét]]ÝQ£F-Z´(;;ûS©ªª®\¹222’Édº»»Ïœ9síÚµ‡Çã…„„ðx¼‰'úùù$¢Ikî(еµõÅ‹­­­åÙT z© 0 S„×(’““«ªª6nÜØÁòÄkhŸ‘ í”ÖÖÖÊÊÊ .Ì;—l-}d$¥¤¤ÄÏÏoöìÙcÆŒ![K_Í‘”Ñ£GŸ={–l}tFB d2!‘€Œ„@Èt±¡m ˆwâ<~ü˜l =tC¶ _½z%ïZh4­~ý,y¼2ïiC1Ã Óææ»|~í¿—î†††Ò›#ÐЮ *** <¹yó©³s¼–Öb&óËÌÌÌ®<}ú4“ù¥–Öb—ø›7Ÿv=`; µ :#uÂË—ÆÄ\**ª R)8‡ ÓÊÉù©ë/á8´±‰~ö¬–BÁ„BÜÂÂ0(èÛY³¾D¯uÈHÝÇOO¿™p­ºúoŽmŽ%'7gŽ…Lªøå—û¾¾i@…‚tt¬\9}ñâo šLª@´2’|ihà:t=%%·¡!µ6†aÆiçä„Êê¤!œ6mdzg5âU`èߟ±l™µ¯ï´þý™2©Ñ&ÈHò¢ºúï®;v“Ï …¸D.†a‰‰^óæÉò9·³gï­\yTºC©T Fõðøæûïgèè aÈHr!;»èûïÓ¡@ i!†CCüüõTª,/ö…øäÉÛ**êÚìS%% FÝ¿±¬“qÐU;¹ ©©*âÿÌ…$Á0,8Ø^¶.P©”  o?5TÄq àššª²­A€Œ$&L0åpüi4*1ïÃ0CÃA ~-zÇ’žwQ(Fápü'L0•G½d$yaeeš–æC¥b^Â0 Ó•J ²—ð…‚Q©XZš•r‘¼@F’#£F _8þ>â.B #É…ªª¿-Šãó…..bcÝ ii©9:Ž•w펎cµ´Ôöï÷pvúô÷|¾ÐÉ)¾ª yI. #ÉžŠŠº bqfd ¬ppøzï^w  ²§Ñ¨ò@£Q¿¥P°½{Ý,° ¬ž‘ â‹ÅUV¾—·ÝG’1/_¾srŠ£Ñ”Nò××(žUVVkb¢)}Oà8,/kjúÑ÷Sß¼yïä'32ŒŒ4ºA†â€Œ$KÊËß²Xñýú)s8þÚÚjdËiƒššFgçøææ§Nù›˜h’-§ï€†v2£¼ü­“SœšãÔ©ê"€¶¶Ú©Sþjj '§¸òò·dËé; #Ɇ'Oªb `r8þÄD¿Ç¢¥¥ÆáøÀtpˆ}ò¤Šl9}d$ðøq‹¯§703óû^ñ ަ¦*‡ã¯©©ÆbÅ?~Œ¼$‘ºJII%‹g` Îf¯0@…l9ECCõôéu+®¤¤’l9½d¤.QRòÆÙ9ÞÈHãäɽTNž\ad¤áì_Rò†l9½d¤ÎsïÞKGÇ8ÍãÇ{Ÿ‹ú÷g?¾ÂÄDÃÑ1îÞ=ô1†ÎƒŒÔIîÞ}éêšhn®Ïf¯ìߟA¶œÎÓ¿?ƒÍö77×wuM¼{y©“ #u†‚‚nn ƒõUQ¡“-§«¨¨Ðõ5ÊÀÍ-¡ àÙrz%ÈHŸÍ;ÏÝÝG6JKóé." ¼daaäá‘XPPN¶œÞ2Ò瑟ÿÔÕ5ÑÒÒ8-͇Éì#."`2éiiËÆŒ1vqIÈÏïê7+ d¤Ï /ס)S†=êÓ'¿qÅdÒõ™<ÙÌËëP^^)ÙrzÈH%7÷±·wеõðC‡¾£Óûì7Óét¥ää%ÖÖý½“ÿý Ùrz ÈHâòå‡^^É66_$%}× ïA FMJúÎÆæ OÏC—/?$[Nïéß¹xñOêþc¡." Ñ¨‰‰Þ¶¶æ>>©—.= [N/é_øõ×âåËÌŸoë!×WÄ{451Ñkþ|K_ß#¿þZL¶œžŽí ;»ÈÏ/ÍÁáë½{ÝÊET*eï^7‡¯ýüÒ²³‹È–Ó£Q¸£ãœ>}ÇÏ/ÍÑqlLŒ«ºˆ€J¥Äĸ::ŽõóKËÌ, [NÏ¥Ï^}ê"wÖ¬9áéùMTÔ"ÿsÂKL&íÇã8trG¶¢ž2Rp8ôòš¹PÁ]D€aq@Y³æŽCgçñd+êq #Iròäíà`ö’%S#"‹D`éH¡PO@]\&­¨gŒô©©y7fúøX‡‡/@.’ðˆ  <ÙÒÒºdɲõ ‘þÏáÿoÚtfÕªY¡¡sÈÖÒCÁ0lËúƙ¥K§’­¨§€Œô?ºžµzµmHÈl²µôtBCçP(ئMgpúøX“-§G€Œ±±W¢£ ú6(Èžl-½ƒÙ ¶yó™––ÖU«f‘-‡|‘Àž=—víº°aÃÜ€€™dkéMÙ3´¨¨ó8ޝ^mG¶’Qt#ýüóÅŸþuãÆyþþ3ÈÖÒû˜‰aXdä9‡ß’-‡LÚHQQçãâ~ [àçgC¶–ÞŠ¿ÿ …‘Ååò7l˜K¶ÒP\#EFžKH¸ÍòòšD¶–ÞÍŠ6L&mýúÓÂç‘-‡ÔHYII×wì`-^ü ÙZúÞÞ“)lݺ á¦MóÉ–C g$á–-YÉɹ;w:»»O$[NßÁÓs…‚…†ž ñ°0…»­XF‚þôSƱc7wïvquµ"[N_ÃÃã*•ÌæñøÛ·;)”—ÈH8CCO±Ù·X,׿CVd\]­ ÚªUÇ„B¸c«{þU­' @FÚºõ쉷vïvA.’+_s¹­!!55åÍ›-§»€bäååÑé}ê[mâ0C™Ì‘d«$$$v™²·C&s$ƒ1”lò‚N§çåå‰wÁGg¤×¯_·¶¶r8²ô)111ååå]S^^>qâÄÀÀÀ®‡Btggçׯ_‹§´1´c±XÝ¥GÑ9uꔬB¢Ž#ý![‘€Œ„@Èd$BtÒHoÞ¼qww711QUU?~ü™3gº¨k‹.Æì[·nÅ0,::ZB‹Å‚ŠRž>}*RØ~n¢Ov\SSSppð!C˜L¦™™YXXÇ8pÀÀÀÇqQI¡±±ñþýû åfff⽘={6†aOŸ~ö¿ÚtÆHïÞ½³´´TQQa³Ùüñ‡«««››ÛÅ‹?+HYY™¦¦¦xÊ7*?¦+Ñ:„ðäÉ“FFFl6["+##C:±ƒ¹=„¾Úq?üðCaaáéÓ§_¾|™’’’••EÜXc±XUUU7nÜ•,,,¬¨¨prr"VËËËïß¿/Ê­¯¯ÏÍÍí¤ñ›JÄ®ð¯·ÿ\\\ÄS‚ƒƒgÍšõY÷KKKÅë”––~V„v¢ušû÷ïcvùòeÀãÇÅåùùù 4¨²²RºÆösÛÅb§².ÒÁ8}µãxëÖ-Ñêõë׌Œˆe[[Û~øA”µ~ýúiÓ¦Ë{{ûõë׋r92{öìŽl€Íf”"¾ÒA#éêêÞ¸qC<¥±±ñÅ‹Är}}½···†††APP—Ë…ž={vÔ¨QÊÊÊC† 9zô(„PCC ££#RÖ¦úsçÎ3†Édêêênß¾BÈçó7oÞlhh¨©©éééY__/MZÑaW®\144´´´\ºt©H9“É,,,$V×­[gcc!1bDDD„xÃ=zôhÒ¤IóæÍÃqJ©Üvèf#õÕŽ322òòòzûö­´ŒÃ‡ëéé buĈñññ"å)))Æ #º B8wîÜ”””n2R}}= ®®îS<<dȃB7lØ`nn..¯´´ôÉ“'L&355J©ÜvèN#õᎻxñ¢²²²­­í®]»ÊËËÅ·ZYYùúõëÂ’’ …RUU%RþèÑ#]]Ý»wïBß¿¯¢¢òöíÛn2R]]1šl3·µµ•J¥>xð€XÍÌÌ6lX]]FÛ½{w}}=ŽãB¡Pº?$8wî܇JJJššš„Báõë׉-üâ‹/233‰_ýõ×_IJx´65ŠŠŠ „@WW÷·ß~ƒΙ3'::š(yëÖ-%%%âÀVPP(..É#wß¾}ýû÷ùò¥´‘>•ÛÝi¤>ÜqDÖ­[·"""¾úê+*•zìØ1QÖÂ…  „QQQ3fÌW^ZZ°nÝ:azzº­­-ìØ`U6C;üü|ñ”?þøcܸqÍÍÍbT!,**b0¼¼<''§~ýúM:5;;vx¨••5eÊ”1cÆ,Y²„(Ã`0Dû·ñhmj ´¶¶‰þþþµµµt:½¢¢‚H\½zµÄ>±qãF yB¡pÚ´ivvvOž<‘6R›¹íÐÍC»>ÙqMMM'Nœ Þpß´i“¨ ‡£££#ÆŽK 7Ä•çää£;"·ûŒäëëëèè(YBW­Z5zôhøÏAåáÇDú™3g†ÚÒÒ’›› !üðáÑ#G¨Tê»wï:Ò---ÊÊÊYYY8Žs¹\¢Œ©©é¹sçˆwïÞŒŒ„mØ$4HTwíÚ5}}ý¸¸8Ñ!J èééÅÄĈ†(fffÄfŠË+++ëׯ_pp°´‘ÚÌm‡n6RŸì¸ÆÆF ÈáA^^žhÒ!lnnVUUMKKSRRª©©‘P.tttrssûõëW]]ý©-’@6Fª©©ÑÐÐðððÈÏÏ¿ÿ~xx8àüùóD®»»ûÌ™3ËÊÊŠ‹‹ÍÍÍ7oÞÌår FFFFmmmRRƒÁM"Å·J¢¢úúz Ã.\¸ÐÜܼvíZ@aaaXX˜……EqqqqqñäÉ“}}}á?ý!Š&­A¢?¶¶¶ŽŽ1¥^»vJ¥MIpç΢Fiy ÄÝ’6ÅKä¶C7©Ov„ÐÛÛ{øðáçÏŸöìY~~þĉW¯^-®gñâÅêêêvvvâ‰"åþþþ#GŽœ>}z;[$lŒ!,//wrrÒ××WSS›0aÂÙ³gEYuuužžžzzzkÖ¬!ÎÔl6{èСt:}ĈYYYB>Ÿ?eÊUUÕöÕÇÄÄ 4ÈÐÐ0>>ÞÍÍM[[›Çãëëë0ÀÍÍôKD“Ö =iY±b“Élhh Výüü$Çñ¡C‡†††JËÃqÜÖÖöSF’Èm‡n6ì‹!áááL&ÓÄÄ$44T4>$ÈÎÎ$''‹'Š”çääâââÚß"‰ßJ ƒbóE‡CÜgžAö=6lØP^^~ìØ158;;ºþ˜¬âô zBÇaÆf³‰f'P WÍEðx¼7oÞ>|øÄ‰dkA|=¹ãñ¡ÕÛ·o7néÒ¥666dkA|=¹ãñŒ4mÚ4⦠¢wÑ“;NÏH„ÌAFB d2!‘ÐÆÅâf"¢(..¶¶–Í°æææ¢Ž#‘Œdeeåêê* ÉR£hX[[‹ßÔë4è‹vÝŒ«««•ÕG€)Ès „\As$B #!2 ÈH„ ø/aÛ„¢u¬BQIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask__inherit__graph.png0000644000113200011300000000704312616110567024463 00000000000000‰PNG  IHDRÀpÇtè%bKGDÿÿÿ ½§“ ØIDATxœíÝTSuðï… ù!‡‰ â ¢ãéX§T$¼`/ô"ŒH$ Ïr€X,F…††öõõµµµq8>ŸO6â8N¥‡:’ê¸k×®àààîîn>Ÿo°‘ê5>>nmmŸŸ?44T\\Ì`0ÆÇÇ ‚ÀqÜÃÃC ññÇûùùéFDaa¡««ë¹sçd2Ù… 8Ù>Ó\áááMMM]]]äaze#„^xá…BQ]]"—†Љ‰Q(EEE¡W_}U¡Pê€Y ‹D¢ych0Çuww“»B¡Ãá)))¡7nèInOMMYZZþüóÏäîÉ“'9ŽÁFª—\._±bEvvö;wpÓjµA´µµ1 òûtåÊ„POOîtþþþß~û-Upyy9Bh–¹ÈµPݧ¨¹¹™ ­V‹‹Ådcgg'¹.½mò€Y?@æu #Q¿Êñõõ$·úé§ÀÀÀŒŒŒéÇkµZ///r—Ãá l¤º8::ŠD¢¶¶66›½uëÖ~øÁÂÂ!TQQ¡ÑhX,†a7nDé]Åüýý©].—;SÔf_¬‹‹ Bˆœbgg‡Z±b…Þ¶2Ç‘ÿLB}}}ä닪­­ÍÏϯ¨¨‰DzǯY³ÆÒÒR"‘»®®®©.J¥ÇñÊÊJ¹\ž°cǹ\®Õj…BaNNÎØÿ$'' …BBç©_ww÷_~ù…Ú½~ýúLÛs~ãê “1æéî>/aAAAb±¸½½ÝÛÛ;55U÷´Ÿ––æãã£T*ÉÆ±±1²ÇãK$’žž??¿ÔÔTƒÔPJ¥’ÉdVUUÉd²‚‚&“©T*E"‘¥¥¥n…¡ÎÎNªã±cÇØlöùóçGFFׯ_aØìsÓ.aTÙH窄t.aÓõ¶g÷@b„PQQ‘»»;‹ÅÚ¿?•ò¥Réãã“––¦V«Ÿ}öY[[[²].—ïÞ½ÛÉÉiíÚµï¾û®R©4ب;”P(ôòò²²²òõõ­©©!")))44T·ǽ¼¼:DuÔjµ¹¹¹^^^aaa555«W¯žs.j[¯lÐüÜg€ŒVÏ?P[[ÛÕÕEíVUU˜°=pm»ccc;;;'&&ÚÚÚ>œ˜˜hê¢LÉØ”ÍÎÞÞ>))ÉÔUÌ&%%ebb"22R&“yzz¾ñÆf^ðbÃ#þaass3—Ë…'ùDb`` Ñf„K hZ @€cÿ6::ªÑhŒ<éƒc||ÜÈ35@ÖÖÖ·nÝ2æŒ4]¼ø;B($d‰ë˜&“iÌéŒúcüÒ¢Õâ?ž†êîþ—…Åÿ•ç¢{ µ¶öËå÷äòñ––¥ýÜû¢‚ͨ²²ƒÁ°X±Â¢²ò'S×b¾ @†©T꺺kV­ÆëꮩTjSWd¦ @†55]§B£R©›š®›¶³2¬ººƒzVðêêÓÖc¶ @(ª‹{µZœÜÕjñ‹{ Õì½L ÎëÁñ¿½»ãÄùó=¦ªÇœA€ ¨ªêÐ{wŒ ˆª*¸ŠÒ'“µ´ˆq×mÄq¢¥E,“™ª*³ÒwæL—Á÷1 ;sæšñë1s }ß}סwDÂqÞQœô7Réîî›3]»vóÖ­QãWeÎÌë¡z“wqYEÝ‘ï%2™ÿýëR ‹‘‘1—U&«ÏüÀoãg“”ôo„@gêBÌ\Â- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€=„wwwS—c^ ƒÁ2uæeݺuº™ùÛq‡aØ+¯¼ÂårMX0g½½½•••º™ÑÿO6¹\®1?¶,uphZ @€ e±$•Jƒ‚‚LÕ}‘ü³ª–ÓZ¦[¬ÙÚÚÆÄÄ,ÒàszñÅM5ûÂ2óµ,V€Þ|óÍE|N8Ž+ S;°Ì|-ó A§NŠ‹‹Û¾}ûÛo¿}õêÕ   ‚ ¾ÿþûøøøˆˆˆäääÖÖÖ   Ý3dKKKBBBhh(ÇkhhГ<òòåË»wŠ:vì˜Z­Ö1///11ñîÝ»'Bi4šüüü¨¨¨¨¨¨üü|FóÖ[o!„^zé%r   úúú¸¸¸ÈÈÈòòò†††˜˜˜ˆˆˆ’’ò€ÖÖÖ={ö„……EGG———ÏY¶nUËu-÷i~ŸÖSWW÷õ×_'''s¹ÜþþþÌÌL„ÐÙ³gËÊÊRRR|||úûûsssu»¨T*>Ÿ¿ÿþgžyæÇüüóÏ·lÙÂd2õF>}útffæØØXzzº½½}HH¹6@ÐÙÙ™““coo_WWgp¢ªªª¡¡!@0>>ž••UZZúÕW_ÅÆÆžò¾}ûØlö† /\¸@6…´´4rm3MT__ÿÎ;ï8;;{zz&%%µ··OçÎ666¡¡¡!gcc†³²²*..>pà€“““³³3BèÞ½{³”­WÕò^Ëœæwâp8Ô®§§'BèÖ­[Tãºuët»ØÙÙåææVUU•––úøøðx¼M›6M™Íf“nnn2™ŒÜ¾qãF@@À7ß|óÁÌ2ÑŸþMµ¯\¹rúø666!ƒ¡·Mn fgg+•Jooï9ËÖ«jy¯eNó ‹Åðòò"wÿýw„К5k~ûí72L¡?þøC·Ëää$Žã|>_£Ñ466~ôÑG§OŸ¶³³ÓyppáæÍ›NNNdcFF†L&KHHxþùçŸx≙&rppÈÍÍuuuEËåòy-jrr’Ïçóùü§Ÿ~Z­V×××ÏT¶Áª¦¸œÖ2§ù]ÂÂÃÃóòò._¾,—ËÛÛÛ B‘‘‘ ££C¡P\½zõĉöÿ­Å0ìý÷ß¿téy.e0äù³®®îÞ½{ÔaÇ—J¥¿þúkQQѶmÛÈF&“ùÈ#ðx¼œœœ©©©™&Ú¼ysaaáðð°D"III¡^¥Ry?‹R«Õ†Á`LMM•––"„&&&f*{zUËl-ó5¿3ÐÎ;µZí—_~9::J^¤9©ÕjsssïÞ½ëçç·wïÞ£GR]¬¬¬>üðC@pûöm—´´4+++„Pvvv@@uŠ yï½÷T*Uppð®]»¨3?BˆÇã566–——ÇÅÅœ(!!áøñã{öìÁ0lË–-III ãÑGŽŽ>{ö윋²µµÝ·oß‘#Gzè!œ’’rêÔ)ƒeO¯*>>~9­eÎ)ôè?”––vÿsH¥ÒØØØŒŒ gggêºvéÒ¥²²²ÂÂÂy "‰æ<²µµ•ÎDF°œÖbPssó§Ÿ~ª›™x#Q"‘¤§§‹ÅâÉÉÉÞÞÞ’’’ˆˆúÚp"#X6kY€Om~íµ×T*Õ'Ÿ|2::ºvíÚððð;vÜ÷•+WÞçñ4'2‚å´–ûDë4‹r 2 hZôo¢===MX0gwîÜ‘H$3þ]XrròÍ›7^XJ"##uwÿv`¾àд@€- @Ë=í­øô=IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_2.map0000644000113200011300000000031112616110567015377 00000000000000 pktools-2.6.6/doc/html/md_examples_pkgetmask.html0000644000113200011300000000604512647637662017116 00000000000000 pktools: examples_pkgetmask
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkgetmask

Examples of pkgetmask

pkgetmask -i input.tif -o output.tif -min 0 -nodata 0 -data 1

create mask, setting all negative values to 0 (rest to 1)

pkgetmask -i input.tif -o output.tif -min 0 -max 10 -min 0 -max 250 -b 0 -b 1

create mask. Mask is set to 0 (default value for -nodata) if either band 0 is not between 0 and 10 OR (default operator) band 1 is not between 0 and 250. Else mask is set to 1 (default value for -data)

pktools-2.6.6/doc/html/inherit_graph_35.map0000644000113200011300000000035012647437044015476 00000000000000 pktools-2.6.6/doc/html/structsvm__parameter-members.html0000644000113200011300000001601712647637662020453 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
svm_parameter Member List

This is the complete list of members for svm_parameter, including all inherited members.

C (defined in svm_parameter)svm_parameter
cache_size (defined in svm_parameter)svm_parameter
coef0 (defined in svm_parameter)svm_parameter
degree (defined in svm_parameter)svm_parameter
eps (defined in svm_parameter)svm_parameter
gamma (defined in svm_parameter)svm_parameter
kernel_type (defined in svm_parameter)svm_parameter
nr_weight (defined in svm_parameter)svm_parameter
nu (defined in svm_parameter)svm_parameter
p (defined in svm_parameter)svm_parameter
probability (defined in svm_parameter)svm_parameter
shrinking (defined in svm_parameter)svm_parameter
svm_type (defined in svm_parameter)svm_parameter
verbose (defined in svm_parameter)svm_parameter
weight (defined in svm_parameter)svm_parameter
weight_label (defined in svm_parameter)svm_parameter
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass__inherit__graph.md50000644000113200011300000000004012616110566026427 00000000000000734d838e268dc55de60fb9356326c2d9pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsUtils_1_1pktoolsUtils.html0000644000113200011300000001247712647637662025017 00000000000000 pktools: qgis.pktools.pktoolsUtils.pktoolsUtils Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pktoolsUtils.pktoolsUtils Class Reference

Static Public Member Functions

def pktoolsPath
 
def runpktools
 

Static Public Attributes

string PKTOOLS_FOLDER = "PKTOOLS_FOLDER"
 

Detailed Description

Definition at line 35 of file pktoolsUtils.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__grid_1_1pkextract__grid-members.html0000644000113200011300000002361412647637662027534 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkextract_grid.pkextract_grid Member List

This is the complete list of members for qgis.pktools.pkextract_grid.pkextract_grid, including all inherited members.

BNDNODATA (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
BUFFER (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
cliName (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_grid
defineCharacteristics (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_grid
EXTRA (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
FORMAT (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
GRID (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
group (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_grid
INPUT (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
name (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_grid
OUTPUT (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
POLYGON (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
processAlgorithm (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_grid
RULE (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
RULE_OPTIONS (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
SRCNODATA (defined in qgis.pktools.pkextract_grid.pkextract_grid)qgis.pktools.pkextract_grid.pkextract_gridstatic
pktools-2.6.6/doc/html/StatFactory_8h_source.html0000644000113200011300000076665612647637661017020 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/StatFactory.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
StatFactory.h
1 /**********************************************************************
2 StatFactory.h: class for statistical operations on vectors
3 Copyright (C) 2008-2013 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _STATFACTORY_H_
21 #define _STATFACTORY_H_
22 
23 #include <iostream>
24 #include <vector>
25 #include <map>
26 #include <math.h>
27 #include <assert.h>
28 #include <string>
29 #include <sstream>
30 #include <fstream>
31 #include <algorithm>
32 #include <gsl/gsl_fit.h>
33 #include <gsl/gsl_errno.h>
34 #include <gsl/gsl_spline.h>
35 #include <gsl/gsl_rng.h>
36 #include <gsl/gsl_randist.h>
37 #include <gsl/gsl_cdf.h>
38 #include <gsl/gsl_statistics.h>
39 
40 namespace statfactory
41 {
42 
44 
45 public:
46  enum INTERPOLATION_TYPE {undefined=0,linear=1,polynomial=2,cspline=3,cspline_periodic=4,akima=5,akima_periodic=6};
47  //todo: expand with other distributions as in http://www.gnu.org/software/gsl/manual/gsl-ref_toc.html#TOC320
48  enum DISTRIBUTION_TYPE {uniform=1,gaussian=2};
49 
50  StatFactory(void){};
51  virtual ~StatFactory(void){};
52  INTERPOLATION_TYPE getInterpolationType(const std::string interpolationType){
53  std::map<std::string, INTERPOLATION_TYPE> m_interpMap;
54  initMap(m_interpMap);
55  return m_interpMap[interpolationType];
56  };
57  DISTRIBUTION_TYPE getDistributionType(const std::string distributionType){
58  std::map<std::string, DISTRIBUTION_TYPE> m_distMap;
59  initDist(m_distMap);
60  return m_distMap[distributionType];
61  };
62  static void allocAcc(gsl_interp_accel *&acc){
63  acc = gsl_interp_accel_alloc ();
64  };
65 
66  static void getSpline(const std::string type, int size, gsl_spline *& spline){
67  std::map<std::string, INTERPOLATION_TYPE> m_interpMap;
68  initMap(m_interpMap);
69  switch(m_interpMap[type]){
70  case(polynomial):
71  spline=gsl_spline_alloc(gsl_interp_polynomial,size);
72  break;
73  case(cspline):
74  spline=gsl_spline_alloc(gsl_interp_cspline,size);
75  break;
76  case(cspline_periodic):
77  spline=gsl_spline_alloc(gsl_interp_cspline_periodic,size);
78  break;
79  case(akima):
80  spline=gsl_spline_alloc(gsl_interp_akima,size);
81  break;
82  case(akima_periodic):
83  spline=gsl_spline_alloc(gsl_interp_akima_periodic,size);
84  break;
85  case(linear):
86  default:
87  spline=gsl_spline_alloc(gsl_interp_linear,size);
88  break;
89  }
90  assert(spline);
91  };
92  static int initSpline(gsl_spline *spline, const double *x, const double *y, int size){
93  return gsl_spline_init (spline, x, y, size);
94  };
95  static double evalSpline(gsl_spline *spline, double x, gsl_interp_accel *acc){
96  return gsl_spline_eval (spline, x, acc);
97  };
98 
99  static gsl_rng* getRandomGenerator(unsigned long int theSeed){
100  const gsl_rng_type * T;
101  gsl_rng * r;
102 
103  // select random number generator
104  r = gsl_rng_alloc (gsl_rng_mt19937);
105  gsl_rng_set(r,theSeed);
106  return r;
107  }
108  void getNodataValues(std::vector<double>& nodatav) const{nodatav=m_noDataValues;};
109  bool isNoData(double value) const{
110  if(m_noDataValues.empty())
111  return false;
112  else
113  return find(m_noDataValues.begin(),m_noDataValues.end(),value)!=m_noDataValues.end();
114  };
115  unsigned int pushNodDataValue(double noDataValue){
116  if(find(m_noDataValues.begin(),m_noDataValues.end(),noDataValue)==m_noDataValues.end())
117  m_noDataValues.push_back(noDataValue);
118  return m_noDataValues.size();
119  };
120  unsigned int setNoDataValues(std::vector<double> vnodata){
121  m_noDataValues=vnodata;
122  return m_noDataValues.size();
123  };
124  double getRandomValue(const gsl_rng* r, const std::string type, double a=0, double b=1) const{
125  std::map<std::string, DISTRIBUTION_TYPE> m_distMap;
126  initDist(m_distMap);
127  double randValue=0;
128  switch(m_distMap[type]){
129  case(uniform):
130  randValue = a+gsl_rng_uniform(r);
131  break;
132  case(gaussian):
133  default:
134  randValue = a+gsl_ran_gaussian(r, b);
135  break;
136  }
137  return randValue;
138  };
139 
140 
141  template<class T> T mymin(const typename std::vector<T>& v) const;
142  template<class T> T mymax(const typename std::vector<T>& v) const;
143  template<class T> T mymin(const typename std::vector<T>& v, T minConstraint) const;
144  template<class T> T mymax(const typename std::vector<T>& v, T maxConstraint) const;
145 // template<class T> typename std::vector<T>::const_iterator mymax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const;
146  template<class T> typename std::vector<T>::const_iterator mymin(const typename std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const;
147  template<class T> typename std::vector<T>::iterator mymin(const typename std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end) const;
148  template<class T> typename std::vector<T>::const_iterator mymin(const typename std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, T minConstraint) const;
149  template<class T> typename std::vector<T>::iterator mymin(const typename std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end, T minConstraint) const;
150  template<class T> typename std::vector<T>::const_iterator mymax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const;
151  template<class T> typename std::vector<T>::iterator mymax(const std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end) const;
152  template<class T> typename std::vector<T>::const_iterator mymax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, T maxConstraint) const;
153  template<class T> typename std::vector<T>::iterator mymax(const std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end, T maxConstraint) const;
154  template<class T> typename std::vector<T>::const_iterator absmin(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const;
155  template<class T> typename std::vector<T>::const_iterator absmax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const;
156 
157  template<class T> void minmax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, T& theMin, T& theMax) const;
158  template<class T> T sum(const std::vector<T>& v) const;
159  template<class T> double mean(const std::vector<T>& v) const;
160  template<class T> void eraseNoData(std::vector<T>& v) const;
161  template<class T> unsigned int nvalid(const std::vector<T>& v) const;
162  template<class T> T median(const std::vector<T>& v) const;
163  template<class T> double var(const std::vector<T>& v) const;
164  template<class T> double moment(const std::vector<T>& v, int n) const;
165  template<class T> double cmoment(const std::vector<T>& v, int n) const;
166  template<class T> double skewness(const std::vector<T>& v) const;
167  template<class T> double kurtosis(const std::vector<T>& v) const;
168  template<class T> void meanVar(const std::vector<T>& v, double& m1, double& v1) const;
169  template<class T1, class T2> void scale2byte(const std::vector<T1>& input, std::vector<T2>& output, unsigned char lbound=0, unsigned char ubound=255) const;
170  template<class T> void distribution(const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, std::vector<double>& output, int nbin, T &minimum, T &maximum, double sigma=0, const std::string &filename="") const;
171  template<class T> void distribution(const std::vector<T>& input, std::vector<double>& output, int nbin, double sigma=0, const std::string &filename="") const{distribution(input,input.begin(),input.end(),output,nbin,0,0,sigma,filename);};
172  template<class T> void distribution2d(const std::vector<T>& inputX, const std::vector<T>& inputY, std::vector< std::vector<double> >& output, int nbin, T& minX, T& maxX, T& minY, T& maxY, double sigma=0, const std::string& filename="") const;
173  template<class T> void cumulative (const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, std::vector<int>& output, int nbin, T &minimum, T &maximum) const;
174  template<class T> void percentiles (const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, std::vector<T>& output, int nbin, T &minimum, T &maximum, const std::string &filename="") const;
175  template<class T> T percentile(const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, double percent, T minimum=0, T maximum=0) const;
176  template<class T> void signature(const std::vector<T>& input, double& k, double& alpha, double& beta, double e) const;
177  void signature(double m1, double m2, double& k, double& alpha, double& beta, double e) const;
178  template<class T> void normalize(const std::vector<T>& input, std::vector<double>& output) const;
179  template<class T> void normalize_pct(std::vector<T>& input) const;
180  template<class T> double rmse(const std::vector<T>& x, const std::vector<T>& y) const;
181  template<class T> double nrmse(const std::vector<T>& x, const std::vector<T>& y) const;
182  template<class T> double cvrmse(const std::vector<T>& x, const std::vector<T>& y) const;
183  template<class T> double correlation(const std::vector<T>& x, const std::vector<T>& y, int delay=0) const;
184  // template<class T> double gsl_correlation(const std::vector<T>& x, const std::vector<T>& y) const;
185  template<class T> double gsl_covariance(const std::vector<T>& x, const std::vector<T>& y) const;
186  template<class T> double cross_correlation(const std::vector<T>& x, const std::vector<T>& y, int maxdelay, std::vector<T>& z) const;
187  template<class T> double linear_regression(const std::vector<T>& x, const std::vector<T>& y, double &c0, double &c1) const;
188  template<class T> double linear_regression_err(const std::vector<T>& x, const std::vector<T>& y, double &c0, double &c1) const;
189  template<class T> void interpolateNoData(const std::vector<double>& wavelengthIn, const std::vector<T>& input, const std::string& type, std::vector<T>& output, bool verbose=false) const;
190  template<class T> void interpolateUp(const std::vector<double>& wavelengthIn, const std::vector<T>& input, const std::vector<double>& wavelengthOut, const std::string& type, std::vector<T>& output, bool verbose=false) const;
191  template<class T> void interpolateUp(const std::vector<double>& wavelengthIn, const std::vector< std::vector<T> >& input, const std::vector<double>& wavelengthOut, const std::string& type, std::vector< std::vector<T> >& output, bool verbose=false) const;
192  // template<class T> void interpolateUp(const std::vector< std::vector<T> >& input, std::vector< std::vector<T> >& output, double start, double end, double step, const gsl_interp_type* type);
193  // template<class T> void interpolateUp(const std::vector< std::vector<T> >& input, const std::vector<double>& wavelengthIn, std::vector< std::vector<T> >& output, std::vector<double>& wavelengthOut, double start, double end, double step, const gsl_interp_type* type);
194  template<class T> void interpolateUp(const std::vector<T>& input, std::vector<T>& output, int nbin) const;
195  template<class T> void nearUp(const std::vector<T>& input, std::vector<T>& output) const;
196  template<class T> void interpolateUp(double* input, int dim, std::vector<T>& output, int nbin);
197  template<class T> void interpolateDown(const std::vector<T>& input, std::vector<T>& output, int nbin) const;
198  template<class T> void interpolateDown(double* input, int dim, std::vector<T>& output, int nbin);
199 
200 private:
201  static void initMap(std::map<std::string, INTERPOLATION_TYPE>& m_interpMap){
202  //initialize selMap
203  m_interpMap["linear"]=linear;
204  m_interpMap["polynomial"]=polynomial;
205  m_interpMap["cspline"]=cspline;
206  m_interpMap["cspline_periodic"]=cspline_periodic;
207  m_interpMap["akima"]=akima;
208  m_interpMap["akima_periodic"]=akima_periodic;
209  }
210  static void initDist(std::map<std::string, DISTRIBUTION_TYPE>& m_distMap){
211  //initialize distMap
212  m_distMap["gaussian"]=gaussian;
213  m_distMap["uniform"]=uniform;
214  }
215  std::vector<double> m_noDataValues;
216 };
217 
218 
219 template<class T> inline typename std::vector<T>::const_iterator StatFactory::mymin(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const
220 {
221  bool isValid=false;
222  typename std::vector<T>::const_iterator tmpIt;
223  for(typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
224  if(!isNoData(*it)){
225  if(isValid){
226  if(*tmpIt>*it)
227  tmpIt=it;
228  }
229  else{
230  tmpIt=it;
231  isValid=true;
232  }
233  }
234  }
235  if(isValid)
236  return tmpIt;
237  else if(m_noDataValues.size())
238  return m_noDataValues[0];
239  else{
240  std::string errorString="Error: no valid data found";
241  throw(errorString);
242  }
243 }
244 
245 template<class T> inline typename std::vector<T>::iterator StatFactory::mymin(const std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end) const
246 {
247  bool isValid=false;
248  typename std::vector<T>::iterator tmpIt;
249  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
250  if(!isNoData(*it)){
251  if(isValid){
252  if(*tmpIt>*it)
253  tmpIt=it;
254  }
255  else{
256  tmpIt=it;
257  isValid=true;
258  }
259  }
260  }
261  if(isValid)
262  return tmpIt;
263  else if(m_noDataValues.size())
264  return m_noDataValues[0];
265  else{
266  std::string errorString="Error: no valid data found";
267  throw(errorString);
268  }
269 }
270 
271 template<class T> inline typename std::vector<T>::const_iterator StatFactory::mymin(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, T minConstraint) const
272 {
273  bool isValid=false;
274  typename std::vector<T>::const_iterator tmpIt;
275  T minValue=minConstraint;
276  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
277  if(isNoData(*it))
278  continue;
279  if(isValid){
280  if((minConstraint<=*it)&&(*it<minValue)){
281  tmpIt=it;
282  minValue=*it;
283  }
284  }
285  else{
286  if(*it<minValue)
287  continue;
288  tmpIt=it;
289  minValue=*it;
290  isValid=true;
291  }
292  }
293  if(isValid)
294  return tmpIt;
295  else if(m_noDataValues.size())
296  return m_noDataValues[0];
297  else{
298  std::string errorString="Error: no valid data found";
299  throw(errorString);
300  }
301 }
302 
303 template<class T> inline typename std::vector<T>::iterator StatFactory::mymin(const std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end, T minConstraint) const
304 {
305  bool isValid=false;
306  typename std::vector<T>::iterator tmpIt;
307  T minValue=minConstraint;
308  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
309  if(isNoData(*it))
310  continue;
311  if(isValid){
312  if((minConstraint<=*it)&&(*it<minValue)){
313  tmpIt=it;
314  minValue=*it;
315  }
316  }
317  else{
318  if(*it<minConstraint)
319  continue;
320  tmpIt=it;
321  minValue=*it;
322  isValid=true;
323  }
324  }
325  if(isValid)
326  return tmpIt;
327  else if(m_noDataValues.size())
328  return m_noDataValues[0];
329  else{
330  std::string errorString="Error: no valid data found";
331  throw(errorString);
332  }
333 }
334 
335 template<class T> inline typename std::vector<T>::const_iterator StatFactory::mymax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const
336 {
337  bool isValid=false;
338  typename std::vector<T>::const_iterator tmpIt;
339  for (typename std::vector<T>::iterator it = begin; it!=end; ++it){
340  if(isNoData(*it))
341  continue;
342  if(isValid){
343  if(*tmpIt<*it)
344  tmpIt=it;
345  }
346  else{
347  tmpIt=it;
348  isValid=true;
349  }
350  }
351  if(isValid)
352  return tmpIt;
353  else if(m_noDataValues.size())
354  return m_noDataValues[0];
355  else{
356  std::string errorString="Error: no valid data found";
357  throw(errorString);
358  }
359 }
360 
361 template<class T> inline typename std::vector<T>::iterator StatFactory::mymax(const std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end) const
362 {
363  bool isValid=false;
364  typename std::vector<T>::iterator tmpIt;
365  for (typename std::vector<T>::iterator it = begin; it!=end; ++it){
366  if(isNoData(*it))
367  continue;
368  if(isValid){
369  if(*tmpIt<*it)
370  tmpIt=it;
371  }
372  else{
373  tmpIt=it;
374  isValid=true;
375  }
376  }
377  if(isValid)
378  return tmpIt;
379  else
380  return end;
381 }
382 
383 template<class T> inline typename std::vector<T>::const_iterator StatFactory::mymax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, T maxConstraint) const
384 {
385  bool isValid=false;
386  typename std::vector<T>::const_iterator tmpIt;
387  T maxValue=maxConstraint;
388  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
389  if(isNoData(*it))
390  continue;
391  if(isValid){
392  if((maxConstraint>=*it)&&(*it>maxValue)){
393  tmpIt=it;
394  maxValue=*it;
395  }
396  }
397  else{
398  if(*it>maxConstraint)
399  continue;
400  tmpIt=it;
401  maxValue=*it;
402  isValid=true;
403  }
404  }
405  if(isValid)
406  return tmpIt;
407  else
408  return end;
409 }
410 
411 template<class T> inline typename std::vector<T>::iterator StatFactory::mymax(const std::vector<T>& v, typename std::vector<T>::iterator begin, typename std::vector<T>::iterator end, T maxConstraint) const
412 {
413  bool isValid=false;
414  typename std::vector<T>::iterator tmpIt=v.end();
415  T maxValue=maxConstraint;
416  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
417  if(isNoData(*it))
418  continue;
419  if(isValid){
420  if((maxConstraint>=*it)&&(*it>maxValue)){
421  tmpIt=it;
422  maxValue=*it;
423  }
424  }
425  else{
426  if(*it>maxValue)
427  continue;
428  tmpIt=it;
429  maxValue=*it;
430  isValid=true;
431  }
432  }
433  if(isValid)
434  return tmpIt;
435  else
436  return end;
437 }
438 
439 template<class T> inline T StatFactory::mymin(const std::vector<T>& v) const
440 {
441  bool isValid=false;
442  if(v.empty()){
443  std::string errorString="Error: vector is empty";
444  throw(errorString);
445  }
446  T minValue;
447  for (typename std::vector<T>::const_iterator it = v.begin(); it!=v.end(); ++it){
448  if(isNoData(*it))
449  continue;
450  if(isValid){
451  if(minValue>*it)
452  minValue=*it;
453  }
454  else{
455  minValue=*it;
456  isValid=true;
457  }
458  }
459  if(isValid)
460  return minValue;
461  else if(m_noDataValues.size())
462  return m_noDataValues[0];
463  else{
464  std::string errorString="Error: no valid data found";
465  throw(errorString);
466  }
467 }
468 
469  template<class T> inline T StatFactory::mymin(const std::vector<T>& v, T minConstraint) const
470 {
471  bool isValid=false;
472  T minValue=minConstraint;
473  for (typename std::vector<T>::const_iterator it = v.begin(); it!=v.end(); ++it){
474  if(isNoData(*it))
475  continue;
476  if(isValid){
477  if((minConstraint<=*it)&&(*it<minValue))
478  minValue=*it;
479  }
480  else{
481  if(*it<minValue)
482  continue;
483  minValue=*it;
484  isValid=true;
485  }
486  }
487  if(isValid)
488  return minValue;
489  else if(m_noDataValues.size())
490  return m_noDataValues[0];
491  else{
492  std::string errorString="Error: no valid data found";
493  throw(errorString);
494  }
495 }
496 
497 template<class T> inline T StatFactory::mymax(const std::vector<T>& v) const
498 {
499  bool isValid=false;
500  if(v.empty()){
501  std::string errorString="Error: vector is empty";
502  throw(errorString);
503  }
504  T maxValue;
505  for (typename std::vector<T>::const_iterator it = v.begin(); it!=v.end(); ++it){
506  if(isNoData(*it))
507  continue;
508  if(isValid){
509  if(maxValue<*it)
510  maxValue=*it;
511  }
512  else{
513  maxValue=*it;
514  isValid=true;
515  }
516  }
517  if(isValid)
518  return maxValue;
519  else if(m_noDataValues.size())
520  return m_noDataValues[0];
521  else{
522  std::string errorString="Error: no valid data found";
523  throw(errorString);
524  }
525 }
526 
527 template<class T> inline T StatFactory::mymax(const std::vector<T>& v, T maxConstraint) const
528 {
529  bool isValid=false;
530  T maxValue=maxConstraint;
531  for (typename std::vector<T>::const_iterator it = v.begin(); it!=v.end(); ++it){
532  if(isNoData(*it))
533  continue;
534  if(isValid){
535  if((*it<=maxConstraint)&&(*it>maxValue))
536  maxValue=*it;
537  }
538  else{
539  if(*it>maxValue)
540  continue;
541  maxValue=*it;
542  isValid=true;
543  }
544  }
545  if(isValid)
546  return maxValue;
547  else if(m_noDataValues.size())
548  return m_noDataValues[0];
549  else{
550  std::string errorString="Error: no valid data found";
551  throw(errorString);
552  }
553 }
554 
555 template<class T> inline typename std::vector<T>::const_iterator StatFactory::absmax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const
556 {
557  bool isValid=false;
558  typename std::vector<T>::const_iterator tmpIt;
559  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
560  if(isNoData(*it))
561  continue;
562  if(isValid){
563  if(abs(*tmpIt)<abs(*it))
564  tmpIt=it;
565  }
566  else{
567  tmpIt=it;
568  isValid=true;
569  }
570  }
571  if(isValid)
572  return tmpIt;
573  else
574  return end;
575 }
576 
577 template<class T> inline typename std::vector<T>::const_iterator StatFactory::absmin(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end) const
578 {
579  bool isValid=false;
580  typename std::vector<T>::const_iterator tmpIt;
581  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
582  if(isNoData(*it))
583  continue;
584  if(isValid){
585  if(abs(*tmpIt)>abs(*it))
586  tmpIt=it;
587  }
588  else{
589  tmpIt=it;
590  isValid=true;
591  }
592  }
593  if(isValid)
594  return tmpIt;
595  else
596  return end;
597 }
598 
599 template<class T> inline void StatFactory::minmax(const std::vector<T>& v, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, T& theMin, T& theMax) const
600 {
601  bool isConstraint=(theMax>theMin);
602  double minConstraint=theMin;
603  double maxConstraint=theMax;
604  bool isValid=false;
605  for (typename std::vector<T>::const_iterator it = begin; it!=end; ++it){
606  if(isNoData(*it))
607  continue;
608  if(isValid){
609  if(isConstraint){
610  if(*it<minConstraint)
611  continue;
612  if(*it>maxConstraint)
613  continue;
614  }
615  if(*it<theMin)
616  theMin=*it;
617  if(*it>theMax)
618  theMax=*it;
619  }
620  else{
621  if(isConstraint){
622  if(*it<minConstraint)
623  continue;
624  if(*it>maxConstraint)
625  continue;
626  }
627  theMin=*it;
628  theMax=*it;
629  isValid=true;
630  }
631  }
632  if(!isValid){
633  if(m_noDataValues.size()){
634  theMin=m_noDataValues[0];
635  theMax=m_noDataValues[0];
636  }
637  else{
638  std::string errorString="Error: no valid data found";
639  throw(errorString);
640  }
641  }
642 }
643 
644 template<class T> inline T StatFactory::sum(const std::vector<T>& v) const
645 {
646  bool isValid=false;
647  typename std::vector<T>::const_iterator it;
648  T tmpSum=0;
649  for (it = v.begin(); it!= v.end(); ++it){
650  if(isNoData(*it))
651  continue;
652  isValid=true;
653  tmpSum+=*it;
654  }
655  if(isValid)
656  return tmpSum;
657  else if(m_noDataValues.size())
658  return m_noDataValues[0];
659  else{
660  std::string errorString="Error: no valid data found";
661  throw(errorString);
662  }
663 }
664 
665 template<class T> inline double StatFactory::mean(const std::vector<T>& v) const
666 {
667  typename std::vector<T>::const_iterator it;
668  T tmpSum=0;
669  unsigned int validSize=0;
670  for (it = v.begin(); it!= v.end(); ++it){
671  if(isNoData(*it))
672  continue;
673  ++validSize;
674  tmpSum+=*it;
675  }
676  if(validSize)
677  return static_cast<double>(tmpSum)/validSize;
678  else if(m_noDataValues.size())
679  return m_noDataValues[0];
680  else{
681  std::string errorString="Error: no valid data found";
682  throw(errorString);
683  }
684 }
685 
686 template<class T> inline void StatFactory::eraseNoData(std::vector<T>& v) const
687 {
688  if(m_noDataValues.size()){
689  typename std::vector<T>::iterator it=v.begin();
690  while(it!=v.end()){
691  if(isNoData(*it))
692  v.erase(it);
693  else
694  ++it;
695  }
696  }
697 }
698 
699  template<class T> unsigned int StatFactory::nvalid(const std::vector<T>& v) const{
700  std::vector<T> tmpV=v;
701  eraseNoData(tmpV);
702  return(tmpV.size());
703  }
704 
705 template<class T> T StatFactory::median(const std::vector<T>& v) const
706 {
707  std::vector<T> tmpV=v;
708  eraseNoData(tmpV);
709  if(tmpV.size()){
710  sort(tmpV.begin(),tmpV.end());
711  if(tmpV.size()%2)
712  return tmpV[tmpV.size()/2];
713  else
714  return 0.5*(tmpV[tmpV.size()/2-1]+tmpV[tmpV.size()/2]);
715  }
716  else if(m_noDataValues.size())
717  return m_noDataValues[0];
718  else{
719  std::string errorString="Error: no valid data found";
720  throw(errorString);
721  }
722 }
723 
724 template<class T> double StatFactory::var(const std::vector<T>& v) const
725 {
726  typename std::vector<T>::const_iterator it;
727  unsigned int validSize=0;
728  double m1=0;
729  double m2=0;
730  for (it = v.begin(); it!= v.end(); ++it){
731  if(isNoData(*it))
732  continue;
733  m1+=*it;
734  m2+=(*it)*(*it);
735  ++validSize;
736  }
737  if(validSize){
738  m2/=validSize;
739  m1/=validSize;
740  return m2-m1*m1;
741  }
742  else if(m_noDataValues.size())
743  return m_noDataValues[0];
744  else{
745  std::string errorString="Error: no valid data found";
746  throw(errorString);
747  }
748 }
749 
750 template<class T> double StatFactory::moment(const std::vector<T>& v, int n) const
751 {
752  unsigned int validSize=0;
753  typename std::vector<T>::const_iterator it;
754  double m=0;
755 // double m1=mean(v);
756  for(it = v.begin(); it!= v.end(); ++it){
757  if(isNoData(*it))
758  continue;
759  m+=pow((*it),n);
760  ++validSize;
761  }
762  if(validSize)
763  return m/validSize;
764  else if(m_noDataValues.size())
765  return m_noDataValues[0];
766  else{
767  std::string errorString="Error: no valid data found";
768  throw(errorString);
769  }
770 }
771 
772  //central moment
773 template<class T> double StatFactory::cmoment(const std::vector<T>& v, int n) const
774 {
775  unsigned int validSize=0;
776  typename std::vector<T>::const_iterator it;
777  double m=0;
778  double m1=mean(v);
779  for(it = v.begin(); it!= v.end(); ++it){
780  if(isNoData(*it))
781  continue;
782  m+=pow((*it-m1),n);
783  ++validSize;
784  }
785  if(validSize)
786  return m/validSize;
787  else if(m_noDataValues.size())
788  return m_noDataValues[0];
789  else{
790  std::string errorString="Error: no valid data found";
791  throw(errorString);
792  }
793 }
794 
795 template<class T> double StatFactory::skewness(const std::vector<T>& v) const
796 {
797  //todo: what if nodata value?
798  return cmoment(v,3)/pow(var(v),1.5);
799 }
800 
801 template<class T> double StatFactory::kurtosis(const std::vector<T>& v) const
802 {
803  //todo: what if nodata value?
804  double m2=cmoment(v,2);
805  double m4=cmoment(v,4);
806  return m4/m2/m2-3.0;
807 }
808 
809 template<class T> void StatFactory::meanVar(const std::vector<T>& v, double& m1, double& v1) const
810 {
811  typename std::vector<T>::const_iterator it;
812  unsigned int validSize=0;
813  m1=0;
814  v1=0;
815  double m2=0;
816  for (it = v.begin(); it!= v.end(); ++it){
817  if(isNoData(*it))
818  continue;
819  m1+=*it;
820  m2+=(*it)*(*it);
821  ++validSize;
822  }
823  if(validSize){
824  m2/=validSize;
825  m1/=validSize;
826  v1=m2-m1*m1;
827  }
828  else if(m_noDataValues.size()){
829  m1=m_noDataValues[0];
830  v1=m_noDataValues[0];
831  }
832  else{
833  std::string errorString="Error: no valid data found";
834  throw(errorString);
835  }
836 }
837 
838 template<class T1, class T2> void StatFactory::scale2byte(const std::vector<T1>& input, std::vector<T2>& output, unsigned char lbound, unsigned char ubound) const
839 {
840  output.resize(input.size());
841  T1 minimum=mymin(input);
842  T1 maximum=mymax(input);
843  if(minimum>=maximum){
844  std::string errorString="Error: no valid data found";
845  throw(errorString);
846  }
847  double scale=(ubound-lbound)/(maximum-minimum);
848  //todo: what if nodata value?
849  for (int i=0;i<input.size();++i){
850  output[i]=scale*(input[i]-(minimum))+lbound;
851  }
852 }
853 
854 template<class T> void StatFactory::distribution(const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, std::vector<double>& output, int nbin, T &minimum, T &maximum, double sigma, const std::string &filename) const
855 {
856  double minValue=0;
857  double maxValue=0;
858  minmax(input,begin,end,minimum,maximum);
859  if(minimum<maximum&&minimum>minValue)
860  minValue=minimum;
861  if(minimum<maximum&&maximum<maxValue)
862  maxValue=maximum;
863 
864  //todo: check...
865  minimum=minValue;
866  maximum=maxValue;
867 
868  if(maximum<=minimum){
869  std::ostringstream s;
870  s<<"Error: could not calculate distribution (min>=max)";
871  throw(s.str());
872  }
873  if(!nbin){
874  std::string errorString="Error: nbin not defined";
875  throw(errorString);
876  }
877  if(!input.size()){
878  std::string errorString="Error: no valid data found";
879  throw(errorString);
880  }
881  if(output.size()!=nbin){
882  output.resize(nbin);
883  for(int i=0;i<nbin;output[i++]=0);
884  }
885  bool isValid=false;
886  typename std::vector<T>::const_iterator it;
887  for(it=begin;it!=end;++it){
888  if(*it<minimum)
889  continue;
890  if(*it>maximum)
891  continue;
892  if(isNoData(*it))
893  continue;
894  isValid=true;
895  if(sigma>0){
896  // minimum-=2*sigma;
897  // maximum+=2*sigma;
898  //create kde for Gaussian basis function
899  //todo: speed up by calculating first and last bin with non-zero contriubtion...
900  //todo: calculate real surface below pdf by using gsl_cdf_gaussian_P(x-mean+binsize,sigma)-gsl_cdf_gaussian_P(x-mean,sigma)
901  for(int ibin=0;ibin<nbin;++ibin){
902  double icenter=minimum+static_cast<double>(maximum-minimum)*(ibin+0.5)/nbin;
903  double thePdf=gsl_ran_gaussian_pdf(*it-icenter, sigma);
904  output[ibin]+=thePdf;
905  }
906  }
907  else{
908  int theBin=0;
909  if(*it==maximum)
910  theBin=nbin-1;
911  else if(*it>minimum && *it<maximum)
912  theBin=static_cast<int>(static_cast<double>((nbin-1)*(*it)-minimum)/(maximum-minimum));
913  ++output[theBin];
914  // if(*it==maximum)
915  // ++output[nbin-1];
916  // else if(*it>=minimum && *it<maximum)
917  // ++output[static_cast<int>(static_cast<double>((*it)-minimum)/(maximum-minimum)*nbin)];
918  }
919  }
920  if(!isValid){
921  std::string errorString="Error: no valid data found";
922  throw(errorString);
923  }
924  else if(!filename.empty()){
925  std::ofstream outputfile;
926  outputfile.open(filename.c_str());
927  if(!outputfile){
928  std::ostringstream s;
929  s<<"Error opening distribution file , " << filename;
930  throw(s.str());
931  }
932  for(int ibin=0;ibin<nbin;++ibin)
933  outputfile << minimum+static_cast<double>(maximum-minimum)*(ibin+0.5)/nbin << " " << static_cast<double>(output[ibin])/input.size() << std::endl;
934  outputfile.close();
935  }
936 }
937 
938 template<class T> void StatFactory::distribution2d(const std::vector<T>& inputX, const std::vector<T>& inputY, std::vector< std::vector<double> >& output, int nbin, T& minX, T& maxX, T& minY, T& maxY, double sigma, const std::string& filename) const
939 {
940  if(inputX.empty()){
941  std::ostringstream s;
942  s<<"Error: inputX is empty";
943  throw(s.str());
944  }
945  if(inputX.size()!=inputY.size()){
946  std::ostringstream s;
947  s<<"Error: inputX is empty";
948  throw(s.str());
949  }
950  unsigned long int npoint=inputX.size();
951  if(maxX<=minX)
952  minmax(inputX,inputX.begin(),inputX.end(),minX,maxX);
953  if(maxX<=minX){
954  std::ostringstream s;
955  s<<"Error: could not calculate distribution (minX>=maxX)";
956  throw(s.str());
957  }
958  if(maxY<=minY)
959  minmax(inputY,inputY.begin(),inputY.end(),minY,maxY);
960  if(maxY<=minY){
961  std::ostringstream s;
962  s<<"Error: could not calculate distribution (minY>=maxY)";
963  throw(s.str());
964  }
965  if(nbin<=1){
966  std::ostringstream s;
967  s<<"Error: nbin must be larger than 1";
968  throw(s.str());
969  }
970  output.resize(nbin);
971  for(int i=0;i<nbin;++i){
972  output[i].resize(nbin);
973  for(int j=0;j<nbin;++j)
974  output[i][j]=0;
975  }
976  int binX=0;
977  int binY=0;
978  for(unsigned long int ipoint=0;ipoint<npoint;++ipoint){
979  if(inputX[ipoint]==maxX)
980  binX=nbin-1;
981  else
982  binX=static_cast<int>(static_cast<double>(inputX[ipoint]-minX)/(maxX-minX)*nbin);
983  if(inputY[ipoint]==maxY)
984  binY=nbin-1;
985  else
986  binY=static_cast<int>(static_cast<double>(inputY[ipoint]-minY)/(maxY-minY)*nbin);
987  if(binX<0){
988  std::ostringstream s;
989  s<<"Error: binX is smaller than 0";
990  throw(s.str());
991  }
992  if(output.size()<=binX){
993  std::ostringstream s;
994  s<<"Error: output size must be larger than binX";
995  throw(s.str());
996  }
997  if(binY<0){
998  std::ostringstream s;
999  s<<"Error: binY is smaller than 0";
1000  throw(s.str());
1001  }
1002  if(output.size()<=binY){
1003  std::ostringstream s;
1004  s<<"Error: output size must be larger than binY";
1005  throw(s.str());
1006  }
1007  if(sigma>0){
1008  // minX-=2*sigma;
1009  // maxX+=2*sigma;
1010  // minY-=2*sigma;
1011  // maxY+=2*sigma;
1012  //create kde for Gaussian basis function
1013  //todo: speed up by calculating first and last bin with non-zero contriubtion...
1014  for(int ibinX=0;ibinX<nbin;++ibinX){
1015  double centerX=minX+static_cast<double>(maxX-minX)*ibinX/nbin;
1016  double pdfX=gsl_ran_gaussian_pdf(inputX[ipoint]-centerX, sigma);
1017  for(int ibinY=0;ibinY<nbin;++ibinY){
1018  //calculate \integral_ibinX^(ibinX+1)
1019  double centerY=minY+static_cast<double>(maxY-minY)*ibinY/nbin;
1020  double pdfY=gsl_ran_gaussian_pdf(inputY[ipoint]-centerY, sigma);
1021  output[ibinX][binY]+=pdfX*pdfY;
1022  }
1023  }
1024  }
1025  else
1026  ++output[binX][binY];
1027  }
1028  if(!filename.empty()){
1029  std::ofstream outputfile;
1030  outputfile.open(filename.c_str());
1031  if(!outputfile){
1032  std::ostringstream s;
1033  s<<"Error opening distribution file , " << filename;
1034  throw(s.str());
1035  }
1036  for(int binX=0;binX<nbin;++binX){
1037  outputfile << std::endl;
1038  for(int binY=0;binY<nbin;++binY){
1039  double binValueX=0;
1040  if(nbin==maxX-minX+1)
1041  binValueX=minX+binX;
1042  else
1043  binValueX=minX+static_cast<double>(maxX-minX)*(binX+0.5)/nbin;
1044  double binValueY=0;
1045  if(nbin==maxY-minY+1)
1046  binValueY=minY+binY;
1047  else
1048  binValueY=minY+static_cast<double>(maxY-minY)*(binY+0.5)/nbin;
1049  double value=0;
1050  value=static_cast<double>(output[binX][binY])/npoint;
1051  outputfile << binValueX << " " << binValueY << " " << value << std::endl;
1052  /* double value=static_cast<double>(output[binX][binY])/npoint; */
1053  /* outputfile << (maxX-minX)*bin/(nbin-1)+minX << " " << (maxY-minY)*bin/(nbin-1)+minY << " " << value << std::endl; */
1054  }
1055  }
1056  outputfile.close();
1057  }
1058 }
1059 
1060 //todo: what with nodata values?
1061 template<class T> void StatFactory::percentiles (const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, std::vector<T>& output, int nbin, T &minimum, T &maximum, const std::string &filename) const
1062 {
1063  if(maximum<=minimum)
1064  minmax(input,begin,end,minimum,maximum);
1065  if(maximum<=minimum){
1066  std::ostringstream s;
1067  s<<"Error: maximum must be at least minimum";
1068  throw(s.str());
1069  }
1070  if(nbin<=1){
1071  std::ostringstream s;
1072  s<<"Error: nbin must be larger than 1";
1073  throw(s.str());
1074  }
1075  if(input.empty()){
1076  std::ostringstream s;
1077  s<<"Error: input is empty";
1078  throw(s.str());
1079  }
1080  output.resize(nbin);
1081  std::vector<T> inputSort;
1082  inputSort.assign(begin,end);
1083  typename std::vector<T>::iterator vit=inputSort.begin();
1084  while(vit!=inputSort.end()){
1085  if(*vit<minimum||*vit>maximum)
1086  inputSort.erase(vit);
1087  else
1088  ++vit;
1089  }
1090  eraseNoData(inputSort);
1091  std::sort(inputSort.begin(),inputSort.end());
1092  vit=inputSort.begin();
1093  std::vector<T> inputBin;
1094  for(int ibin=0;ibin<nbin;++ibin){
1095  inputBin.clear();
1096  while(inputBin.size()<inputSort.size()/nbin&&vit!=inputSort.end()){
1097  inputBin.push_back(*vit);
1098  ++vit;
1099  }
1100  if(inputBin.size()){
1101  output[ibin]=mymax(inputBin);
1102  }
1103  }
1104  if(!filename.empty()){
1105  std::ofstream outputfile;
1106  outputfile.open(filename.c_str());
1107  if(!outputfile){
1108  std::ostringstream s;
1109  s<<"error opening distribution file , " << filename;
1110  throw(s.str());
1111  }
1112  for(int ibin=0;ibin<nbin;++ibin)
1113  outputfile << ibin*100.0/nbin << " " << static_cast<double>(output[ibin])/input.size() << std::endl;
1114  outputfile.close();
1115  }
1116 }
1117 
1118 //todo: what with nodata values?
1119 template<class T> T StatFactory::percentile(const std::vector<T>& input, typename std::vector<T>::const_iterator begin, typename std::vector<T>::const_iterator end, double percent, T minimum, T maximum) const
1120 {
1121  if(input.empty()){
1122  std::ostringstream s;
1123  s<<"Error: input is empty";
1124  throw(s.str());
1125  }
1126  std::vector<T> inputSort;
1127  inputSort.assign(begin,end);
1128  typename std::vector<T>::iterator vit=inputSort.begin();
1129  while(vit!=inputSort.end()){
1130  if(maximum>minimum){
1131  if(*vit<minimum||*vit>maximum)
1132  inputSort.erase(vit);
1133  }
1134  else
1135  ++vit;
1136  }
1137  eraseNoData(inputSort);
1138  std::sort(inputSort.begin(),inputSort.end());
1139  return gsl_stats_quantile_from_sorted_data(&(inputSort[0]),1,inputSort.size(),percent/100.0);
1140 }
1141 
1142 template<class T> void StatFactory::signature(const std::vector<T>& input, double&k, double& alpha, double& beta, double e) const
1143 {
1144  double m1=moment(input,1);
1145  double m2=moment(input,2);
1146  signature(m1,m2,k,alpha,beta,e);
1147 }
1148 
1149 //todo: what with nodata values?
1150 template<class T> void StatFactory::normalize(const std::vector<T>& input, std::vector<double>& output) const{
1151  double total=sum(input);
1152  if(total){
1153  output.resize(input.size());
1154  for(int index=0;index<input.size();++index)
1155  output[index]=input[index]/total;
1156  }
1157  else
1158  output=input;
1159 }
1160 
1161 //todo: what with nodata values?
1162 template<class T> void StatFactory::normalize_pct(std::vector<T>& input) const{
1163  double total=sum(input);
1164  if(total){
1165  typename std::vector<T>::iterator it;
1166  for(it=input.begin();it!=input.end();++it)
1167  *it=100.0*(*it)/total;
1168  }
1169 }
1170 
1171 template<class T> double StatFactory::rmse(const std::vector<T>& x, const std::vector<T>& y) const{
1172  if(x.size()!=y.size()){
1173  std::ostringstream s;
1174  s<<"Error: x and y not equal in size";
1175  throw(s.str());
1176  }
1177  if(x.empty()){
1178  std::ostringstream s;
1179  s<<"Error: x is empty";
1180  throw(s.str());
1181  }
1182  double mse=0;
1183  for(int isample=0;isample<x.size();++isample){
1184  if(isNoData(x[isample])||isNoData(y[isample]))
1185  continue;
1186  double e=x[isample]-y[isample];
1187  mse+=e*e/x.size();
1188  }
1189  return sqrt(mse);
1190 }
1191 
1192 //normalized root mean square error
1193 template<class T> double StatFactory::nrmse(const std::vector<T>& x, const std::vector<T>& y) const{
1194  if(x.size()!=y.size()){
1195  std::ostringstream s;
1196  s<<"Error: x and y not equal in size";
1197  throw(s.str());
1198  }
1199  if(x.empty()){
1200  std::ostringstream s;
1201  s<<"Error: x is empty";
1202  throw(s.str());
1203  }
1204  std::vector<T> tmpX=x;
1205  eraseNoData(tmpX);
1206  std::vector<T> tmpY=y;
1207  eraseNoData(tmpY);
1208  double maxY=mymax(y);
1209  double minY=mymin(y);
1210  double rangeY=maxY-minY;
1211  double mse=0;
1212  for(int isample=0;isample<x.size();++isample){
1213  double e=x[isample]-y[isample];
1214  mse+=e*e/x.size();
1215  }
1216  return sqrt(mse)/rangeY;
1217 }
1218 
1219 // coefficient of variation root mean square error
1220 template<class T> double StatFactory::cvrmse(const std::vector<T>& x, const std::vector<T>& y) const{
1221  if(x.size()!=y.size()){
1222  std::ostringstream s;
1223  s<<"Error: x and y not equal in size";
1224  throw(s.str());
1225  }
1226  if(x.empty()){
1227  std::ostringstream s;
1228  s<<"Error: x is empty";
1229  throw(s.str());
1230  }
1231  std::vector<T> tmpX=x;
1232  eraseNoData(tmpX);
1233  std::vector<T> tmpY=y;
1234  eraseNoData(tmpY);
1235  double maxY=mymax(tmpY);
1236  double minY=mymin(tmpY);
1237  double rangeY=maxY-minY;
1238  double mse=0;
1239  for(int isample=0;isample<x.size();++isample){
1240  double e=x[isample]-y[isample];
1241  mse+=e*e/x.size();
1242  }
1243  return sqrt(mse)/mean(tmpY);
1244 }
1245 
1246 // template<class T> double StatFactory::gsl_correlation(const std::vector<T>& x, const std::vector<T>& y) const{
1247 // return(gsl_stats_correlation(&(x[0]),1,&(y[0]),1,x.size()));
1248 // }
1249 
1250  template<class T> double StatFactory::gsl_covariance(const std::vector<T>& x, const std::vector<T>& y) const{
1251  return(gsl_stats_covariance(&(x[0]),1,&(y[0]),1,x.size()));
1252  }
1253 
1254 
1255 template<class T> double StatFactory::correlation(const std::vector<T>& x, const std::vector<T>& y, int delay) const{
1256  double meanX=0;
1257  double meanY=0;
1258  double varX=0;
1259  double varY=0;
1260  double sXY=0;
1261  meanVar(x,meanX,varX);
1262  meanVar(y,meanY,varY);
1263  double denom = sqrt(varX*varY);
1264  bool isValid=false;
1265  if(denom){
1266  //Calculate the correlation series
1267  sXY = 0;
1268  for (int i=0;i<x.size();++i) {
1269  int j = i + delay;
1270  if (j < 0 || j >= y.size())
1271  continue;
1272  else if(isNoData(x[i])||isNoData(y[j]))
1273  continue;
1274  else{
1275  isValid=true;
1276  if(i<0){
1277  std::ostringstream s;
1278  s<<"Error: i must be positive";
1279  throw(s.str());
1280  }
1281  if(i>=x.size()){
1282  std::ostringstream s;
1283  s<<"Error: i must be smaller than x.size()";
1284  throw(s.str());
1285  }
1286  if(j<0){
1287  std::ostringstream s;
1288  s<<"Error: j must be positive";
1289  throw(s.str());
1290  }
1291  if(j>=y.size()){
1292  std::ostringstream s;
1293  s<<"Error: j must be smaller than y.size()";
1294  throw(s.str());
1295  }
1296  sXY += (x[i] - meanX) * (y[j] - meanY);
1297  }
1298  }
1299  if(isValid){
1300  double minSize=(x.size()<y.size())?x.size():y.size();
1301  return(sXY / denom / (minSize-1));
1302  }
1303  else if(m_noDataValues.size())
1304  return m_noDataValues[0];
1305  else{
1306  std::string errorString="Error: no valid data found";
1307  throw(errorString);
1308  }
1309  }
1310  else
1311  return 0;
1312 }
1313 
1314 //todo: what if no valid data?
1315 template<class T> double StatFactory::cross_correlation(const std::vector<T>& x, const std::vector<T>& y, int maxdelay, std::vector<T>& z) const{
1316  z.clear();
1317  double sumCorrelation=0;
1318  for (int delay=-maxdelay;delay<maxdelay;delay++) {
1319  z.push_back(correlation(x,y,delay));
1320  sumCorrelation+=z.back();
1321  }
1322  return sumCorrelation;
1323 }
1324 
1325 //todo: nodata?
1326 template<class T> double StatFactory::linear_regression(const std::vector<T>& x, const std::vector<T>& y, double &c0, double &c1) const{
1327  if(x.size()!=y.size()){
1328  std::ostringstream s;
1329  s<<"Error: x and y not equal in size";
1330  throw(s.str());
1331  }
1332  if(x.empty()){
1333  std::ostringstream s;
1334  s<<"Error: x is empty";
1335  throw(s.str());
1336  }
1337  double cov00;
1338  double cov01;
1339  double cov11;
1340  double sumsq;
1341  gsl_fit_linear(&(x[0]),1,&(y[0]),1,x.size(),&c0,&c1,&cov00,&cov01,&cov11,&sumsq);
1342  return (1-sumsq/var(y)/(y.size()-1));
1343 }
1344 
1345 //todo: nodata?
1346 template<class T> double StatFactory::linear_regression_err(const std::vector<T>& x, const std::vector<T>& y, double &c0, double &c1) const{
1347  if(x.size()!=y.size()){
1348  std::ostringstream s;
1349  s<<"Error: x and y not equal in size";
1350  throw(s.str());
1351  }
1352  if(x.empty()){
1353  std::ostringstream s;
1354  s<<"Error: x is empty";
1355  throw(s.str());
1356  }
1357  double cov00;
1358  double cov01;
1359  double cov11;
1360  double sumsq;
1361  gsl_fit_linear(&(x[0]),1,&(y[0]),1,x.size(),&c0,&c1,&cov00,&cov01,&cov11,&sumsq);
1362  return sqrt((sumsq)/(y.size()));
1363 }
1364 
1365 //alternatively: use GNU scientific library:
1366 // gsl_stats_correlation (const double data1[], const size_t stride1, const double data2[], const size_t stride2, const size_t n)
1367 
1368 template<class T> void StatFactory::interpolateNoData(const std::vector<double>& wavelengthIn, const std::vector<T>& input, const std::string& type, std::vector<T>& output, bool verbose) const{
1369  if(wavelengthIn.empty()){
1370  std::ostringstream s;
1371  s<<"Error: wavelengthIn is empty";
1372  throw(s.str());
1373  }
1374  std::vector<double> wavelengthOut=wavelengthIn;
1375  std::vector<T> validIn=input;
1376  if(input.size()!=wavelengthIn.size()){
1377  std::ostringstream s;
1378  s<<"Error: x and y not equal in size";
1379  throw(s.str());
1380  }
1381  int nband=wavelengthIn.size();
1382  output.clear();
1383  //remove nodata from input and corresponding wavelengthIn
1384  if(m_noDataValues.size()){
1385  typename std::vector<T>::iterator itValue=validIn.begin();
1386  typename std::vector<T>::iterator itWavelength=wavelengthOut.begin();
1387  while(itValue!=validIn.end()&&itWavelength!=wavelengthOut.end()){
1388  if(isNoData(*itValue)){
1389  validIn.erase(itValue);
1390  wavelengthOut.erase(itWavelength);
1391  }
1392  else{
1393  ++itValue;
1394  ++itWavelength;
1395  }
1396  }
1397  if(validIn.size()>1){
1398  try{
1399  interpolateUp(wavelengthOut, validIn, wavelengthIn, type, output, verbose);
1400  }
1401  catch(...){
1402  output=input;
1403  }
1404  }
1405  else//we can not interpolate if no valid data
1406  output=input;
1407  }
1408  else//no nodata values to interpolate
1409  output=input;
1410 }
1411 
1412 template<class T> void StatFactory::interpolateUp(const std::vector<double>& wavelengthIn, const std::vector<T>& input, const std::vector<double>& wavelengthOut, const std::string& type, std::vector<T>& output, bool verbose) const{
1413  if(wavelengthIn.empty()){
1414  std::ostringstream s;
1415  s<<"Error: wavelengthIn is empty";
1416  throw(s.str());
1417  }
1418  if(input.size()!=wavelengthIn.size()){
1419  std::ostringstream s;
1420  s<<"Error: input and wavelengthIn not equal in size";
1421  throw(s.str());
1422  }
1423  if(wavelengthOut.empty()){
1424  std::ostringstream s;
1425  s<<"Error: wavelengthOut is empty";
1426  throw(s.str());
1427  }
1428  int nband=wavelengthIn.size();
1429  output.clear();
1430  gsl_interp_accel *acc;
1431  allocAcc(acc);
1432  gsl_spline *spline;
1433  getSpline(type,nband,spline);
1434  assert(spline);
1435  assert(&(wavelengthIn[0]));
1436  assert(&(input[0]));
1437  int status=initSpline(spline,&(wavelengthIn[0]),&(input[0]),nband);
1438  if(status){
1439  std::string errorString="Could not initialize spline";
1440  throw(errorString);
1441  }
1442  for(int index=0;index<wavelengthOut.size();++index){
1443  if(wavelengthOut[index]<*wavelengthIn.begin()){
1444  output.push_back(*(input.begin()));
1445  continue;
1446  }
1447  else if(wavelengthOut[index]>wavelengthIn.back()){
1448  output.push_back(input.back());
1449  continue;
1450  }
1451  double dout=evalSpline(spline,wavelengthOut[index],acc);
1452  output.push_back(dout);
1453  }
1454  gsl_spline_free(spline);
1455  gsl_interp_accel_free(acc);
1456 }
1457 
1458 // template<class T> void StatFactory::interpolateUp(const std::vector<double>& wavelengthIn, const std::vector< std::vector<T> >& input, const std::vector<double>& wavelengthOut, const std::string& type, std::vector< std::vector<T> >& output, bool verbose){
1459 // assert(wavelengthIn.size());
1460 // assert(wavelengthOut.size());
1461 // int nsample=input.size();
1462 // int nband=wavelengthIn.size();
1463 // output.clear();
1464 // output.resize(nsample);
1465 // gsl_interp_accel *acc;
1466 // allocAcc(acc);
1467 // gsl_spline *spline;
1468 // getSpline(type,nband,spline);
1469 // for(int isample=0;isample<nsample;++isample){
1470 // assert(input[isample].size()==wavelengthIn.size());
1471 // initSpline(spline,&(wavelengthIn[0]),&(input[isample][0]),nband);
1472 // for(int index=0;index<wavelengthOut.size();++index){
1473 // if(type=="linear"){
1474 // if(wavelengthOut[index]<wavelengthIn.back())
1475 // output[isample].push_back(*(input.begin()));
1476 // else if(wavelengthOut[index]>wavelengthIn.back())
1477 // output[isample].push_back(input.back());
1478 // }
1479 // else{
1480 // double dout=evalSpline(spline,wavelengthOut[index],acc);
1481 // output[isample].push_back(dout);
1482 // }
1483 // }
1484 // }
1485 // gsl_spline_free(spline);
1486 // gsl_interp_accel_free(acc);
1487 // }
1488 
1489 //todo: nodata?
1490 template<class T> void StatFactory::interpolateUp(const std::vector<T>& input, std::vector<T>& output, int nbin) const
1491 {
1492  if(input.empty()){
1493  std::ostringstream s;
1494  s<<"Error: input is empty";
1495  throw(s.str());
1496  }
1497  if(!nbin){
1498  std::ostringstream s;
1499  s<<"Error: nbin must be larger than 0";
1500  throw(s.str());
1501  }
1502  output.clear();
1503  int dim=input.size();
1504  for(int i=0;i<dim;++i){
1505  double deltaX=0;
1506  double left=input[i];
1507  if(i<dim-1){
1508  double right=(i<dim-1)? input[i+1]:input[i];
1509  deltaX=(right-left)/static_cast<double>(nbin);
1510  for(int x=0;x<nbin;++x){
1511  output.push_back(left+x*deltaX);
1512  }
1513  }
1514  else
1515  output.push_back(input.back());
1516  }
1517 }
1518 
1519 //todo: nodata?
1520 template<class T> void StatFactory::nearUp(const std::vector<T>& input, std::vector<T>& output) const
1521 {
1522  if(input.empty()){
1523  std::ostringstream s;
1524  s<<"Error: input is empty";
1525  throw(s.str());
1526  }
1527  if(output.size()<input.size()){
1528  std::ostringstream s;
1529  s<<"Error: output size is smaller than input size";
1530  throw(s.str());
1531  }
1532  int dimInput=input.size();
1533  int dimOutput=output.size();
1534 
1535  for(int iin=0;iin<dimInput;++iin){
1536  for(int iout=0;iout<dimOutput/dimInput;++iout){
1537  int indexOutput=iin*dimOutput/dimInput+iout;
1538  if(indexOutput>=output.size()){
1539  std::ostringstream s;
1540  s<<"Error: indexOutput must be smaller than output.size()";
1541  throw(s.str());
1542  }
1543  output[indexOutput]=input[iin];
1544  }
1545  }
1546 }
1547 
1548 //todo: nodata?
1549 template<class T> void StatFactory::interpolateUp(double* input, int dim, std::vector<T>& output, int nbin)
1550 {
1551  if(!nbin){
1552  std::ostringstream s;
1553  s<<"Error: nbin must be larger than 0";
1554  throw(s.str());
1555  }
1556  output.clear();
1557  for(int i=0;i<dim;++i){
1558  double deltaX=0;
1559  double left=input[i];
1560  if(i<dim-1){
1561  double right=(i<dim-1)? input[i+1]:input[i];
1562  deltaX=(right-left)/static_cast<double>(nbin);
1563  for(int x=0;x<nbin;++x){
1564  output.push_back(left+x*deltaX);
1565  }
1566  }
1567  else
1568  output.push_back(input[dim-1]);
1569  }
1570 }
1571 
1572 //todo: nodata?
1573 template<class T> void StatFactory::interpolateDown(const std::vector<T>& input, std::vector<T>& output, int nbin) const
1574 {
1575  if(input.empty()){
1576  std::ostringstream s;
1577  s<<"Error: input is empty";
1578  throw(s.str());
1579  }
1580  if(!nbin){
1581  std::ostringstream s;
1582  s<<"Error: nbin must be larger than 0";
1583  throw(s.str());
1584  }
1585  output.clear();
1586  int dim=input.size();
1587  int x=0;
1588  output.push_back(input[0]);
1589  for(int i=1;i<dim;++i){
1590  if(i%nbin)
1591  continue;
1592  else{
1593  x=(i-1)/nbin+1;
1594  output.push_back(input[i]);
1595  }
1596  }
1597 }
1598 
1599 //todo: nodata?
1600 template<class T> void StatFactory::interpolateDown(double* input, int dim, std::vector<T>& output, int nbin)
1601 {
1602  if(!nbin){
1603  std::ostringstream s;
1604  s<<"Error: nbin must be larger than 0";
1605  throw(s.str());
1606  }
1607  output.clear();
1608  int x=0;
1609  output.push_back(input[0]);
1610  for(int i=1;i<dim;++i){
1611  if(i%nbin)
1612  continue;
1613  else{
1614  x=(i-1)/nbin+1;
1615  output.push_back(input[i]);
1616  }
1617  }
1618 }
1619 }
1620 
1621 #endif /* _STATFACTORY_H_ */
1622 
1623 // void Histogram::signature(double m1, double m2, double& k, double& alpha, double& beta, double e)
1624 // {
1625 // double y=m1*m1/m2;
1626 // beta=F_1(y,0.1,10.0,e);
1627 // double fb=F(beta);
1628 // double g=exp(lgamma(1.0/beta));
1629 // alpha=m1*g/exp(lgamma(2.0/beta));
1630 // k=beta/(2*alpha*g);
1631 // // std::cout << "y, alpha, beta: " << y << ", " << alpha << ", " << beta << std::endl;
1632 // }
1633 
1634 // double Histogram::F(double x)
1635 // {
1636 // double g2=exp(lgamma(2.0/x));
1637 // return(g2*g2/exp(lgamma(3.0/x))/exp(lgamma(1.0/x)));
1638 // }
1639 
1640 // //x1 is under estimate, x2 is over estimate, e is error
1641 // double Histogram::F_1(double y, double x1, double x2, double e)
1642 // {
1643 // double f1=F(x1);
1644 // double f2=F(x2);
1645 // assert(f1!=f2);
1646 // double x=x1+(x2-x1)*(y-f1)/(f2-f1);
1647 // double f=F(x);
1648 // while(f-y>=e||y-f>=e){
1649 // if(f<y)
1650 // x1=x;
1651 // else
1652 // x2=x;
1653 // if(x1==x2)
1654 // return x1;
1655 // assert(f1!=f2);
1656 // x=x1+(x2-x1)*(y-f1)/(f2-f1);
1657 // f=F(x);
1658 // }
1659 // return x;
1660 // }
pktools-2.6.6/doc/html/classOptFactory.html0000644000113200011300000000777412647637662015704 00000000000000 pktools: OptFactory Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Static Public Member Functions

static nlopt::opt getOptimizer (const std::string &algorithmString, unsigned int npar)
 

Detailed Description

Definition at line 25 of file OptFactory.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/dir_b6b6de371025fb67c6b8623f3d3cd2ce_dep.map0000644000113200011300000000054012616110567020543 00000000000000 pktools-2.6.6/doc/html/inherit_graph_1.md50000644000113200011300000000004012616110567015305 0000000000000017afa80b265b109e03a2a1e3cd25f7a2pktools-2.6.6/doc/html/md_examples_pkcomposite.html0000644000113200011300000001064112647637662017462 00000000000000 pktools: examples_pkcomposite
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkcomposite

Examples of pkcomposite

Create a composit from two input images. If images overlap, keep only last image (default rule)

pkcomposite -i input1.tif -i input2.tif -o output.tif

Create a composit from two input images. Values of 255 in band 1 (starting from 0) are masked as invalid. Typically used when second band of input image is a cloud mask

pkcomposite -i input1.tif -i input2.tif -srcnodata 255 -bndnodata 1 -dstnodata 0 -o output.tif

Create a maximum NDVI (normalized difference vegetation index) composit. Values of 255 in band 0 are masked as invalid and flagged as 0 if no other valid coverage. Typically used for (e.g., MODIS) images where red and near infrared spectral bands are stored in bands 0 and 1 respectively. In this particular case, a value of 255 in the first input band indicates a nodata value (e.g., cloud mask is coded within the data values).

pkcomposite -i input1.tif -i input2.tif -cr maxndvi -cb 0 -cb 1 -srcnodata 255 -bndnodata 0 -dstnodata 0 -o output.tif

Create a composite image using weighted mean: output=(3/4*input1+6/4*input2+3/4*input2)/3.0

pkcomposite -i input1.tif -i input2.tif -i input3.tif -o output.tif -cr mean -w 0.75 -w 1.5 -w 0.75

Create a median composit of all GTiff images found in current directory that cover (at least part of) the image coverage.tif. Values smaller or equal to 0 are set as nodata 0 (default value for -dstnodata)

pkcomposite -i large.tif $(for IMAGE in *.tif;do pkinfo -i $IMAGE --cover $(pkinfo -i coverage.tif -bb);done) -cr median -min 0 -o output.tif
pktools-2.6.6/doc/html/classSVR__Q__coll__graph.md50000644000113200011300000000004012616110566017050 00000000000000a7e53ec819237bac61d50010179771f7pktools-2.6.6/doc/html/PosValue_8h_source.html0000644000113200011300000002654312647637662016274 00000000000000 pktools: /home/kempenep/pktools/src/base/PosValue.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
PosValue.h
1 /**********************************************************************
2 PosValue.h: class to work with structs containing a position and a value
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _POSVALUE_H_
21 #define _POSVALUE_H_
22 
23 struct PosValue{
24  double posx;
25  double posy;
26  double value;
27 };
29 public:
30  int operator() (const PosValue& pv1, const PosValue& pv2) const{
31  return pv1.value>pv2.value;//for decreasing order
32  }
33 };
35 public:
36  int operator() (const PosValue& pv1, const PosValue& pv2) const{
37  return pv1.value>pv2.value;//for decreasing order
38  }
39 };
41 public:
42  int operator() (const PosValue& pv1, const PosValue& pv2) const{
43  return pv1.value<pv2.value;//for increasing order
44  }
45 };
46 #endif /* _POSVALUE_H_ */
pktools-2.6.6/doc/html/inherit_graph_39.md50000644000113200011300000000004012647437044015406 00000000000000eb536ae09518c9401a3cc68fe8336845pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__grid_1_1pkextract__grid__coll__graph.md50000644000113200011300000000004012616110566030262 00000000000000b903a258f35a053bb6f874051241e16bpktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass__coll__graph.map0000644000113200011300000000013312616110567026012 00000000000000 pktools-2.6.6/doc/html/dir_0af1587c8378955de40f48b4bd1869f0_dep.map0000644000113200011300000000052012616110567020267 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract__inherit__graph.md50000644000113200011300000000004012616110566024407 00000000000000a6cee43ad8ab79b55c7d052fe8a940e4pktools-2.6.6/doc/html/classImgWriterOgr__coll__graph.map0000644000113200011300000000032412616110567020436 00000000000000 pktools-2.6.6/doc/html/classImgReaderOgr__coll__graph.md50000644000113200011300000000004012616110566020266 00000000000000a7b2b3b91bc53ca3661c7ad39dd3aa5cpktools-2.6.6/doc/html/inherit_graph_43.md50000644000113200011300000000004012647437044015401 000000000000009c46a02da171be2dc8c99dffaea9ef17pktools-2.6.6/doc/html/inherit_graph_30.png0000644000113200011300000050620112647437044015506 00000000000000‰PNG  IHDR«ÕhWvbKGDÿÿÿ ½§“ IDATxœìÝy@Te÷ðï¨,n¨ (»²o!j¥¨å’šZšKhæVšK™Ú¨mðúªÙOÍÊ ·„TSQÑÜ@RqQvÜPA@@†mæüþðe’PÖ;Ì œÏ_3sçžsîæpŸû̽"""0Æcª+°•²+`Œ1ÆjÃÍŠ1ƘÊãfÅcLåq³bŒ1¦òÚ(»ÆTÅÁƒ±mÛ6e—Á˜ÊÓÖÖÆæÍ›ajjÚd9¹Y1ö?¸qã\\\”] c*-003fÌàfŘ²¸¸¸ @Ùe0¦ÒD"Q“çäsVŒ1ÆT7+Æc*›cŒ1•ÇÍŠ1ƘÊãfÅXKIIüµ"b*[Slï7õÁÍŠ±&Ö¹sg,]ºTÙe¨¼g÷SZZtuu•\‘zh®û›cMLWWkÖ¬Qv*ïÙý$“ÉðèÑ#%W¤šë~ãfÅXÉd2lÚ´ vvvèØ±#\\\ ‘H"‚··7ìíí¡££ƒaÆ!,, "‘¨Ú0Mhh(œœœ ­­ sssìÙ³ç¹ù*× ôõõ±xñb”––VyÁÍÍ ÎÎÎÈÉÉAEE<==ajj ===Ìœ9ùùùò÷çççãÃ?„®®.Œáææ†’’O¿OóÛo¿ÁÎÎzzzX³f öìÙƒž={¢S§Nøî»ïêT[M9^´ýÏî§þýûºwï.¯»¼¼îîîèÖ­ôõõáîîŽòòrÞoí7•CŒ1""ruu%WW×:¿Û¶m¤¯¯OÁÁÁtïÞ= 'ccc@;vì ###:zô(eggSDDYZZJNN¦Ê?½¢¢"ÒÒÒ"oooÊÊÊ¢]»vQ›6m¨¨¨¨Z¾ÊõFŽIIIIE–––äåå%_&“ÉÈÍÍœ)''‡ˆˆÖ®]K$‹)..ŽúõëGnnnò¸Ó¦M£7ß|“RSSI,“££#yyyš:u*ÐÎ; Mž<™ hÛ¶m€rrrj¬­¦5mÿ³ûéÙÇ•~üñGš4iݺu‹Äb1õéÓ‡–-[ÆûM ýVäïï_¯u)€›cÿSßfåàà@>>>U^óõõ%äèèHûöí«²ÌÏϯZ³ÊÍÍ% Z·nååå‘L&£ÂÂB’J¥ÕòU®'‹å¯ùûû“¥¥¥|™‡‡ ›7oÊßcccCÁÁÁòçׯ_—?/++£Ö­[S||¼|ypp0YZZÑÓ¥+W®Èßû¼çÉÉÉ5ÖVSŽš¶¿¶][[[ÊÊÊ’?ˆˆ gggÞoí·š(£Yñ0 c ”––ggç*¯999RSSáèèXe™½½}µ]ºtAdd$¢¢¢`llŒÁƒãìÙ³hÕêÅšVVVòǶ¶¶¸sçŽüyLL † ‚Õ«WË_ËÌ̬²Ž&L˜xðà¤R),,,äË---«ÄìØ±#@CCã¹Ïk«­¦ ÙþJ000€H$‚H$ˆ#žžþÂ÷ó~{ª¾ûMUp³b¬ŒŒŒpíÚµ*¯%$$ÌÌÌä+%&&V‹!‘H “ɈÜÜ\Ì™3cÇŽEnnî ó&''Ë'%%ÁÐÐPþ<44ÞÞÞ8pà"##†††ÈÈÈ¿'66«V­tëÖ ­[·FZZš|yjj*ŒŒŒjÛü:×VSކl%]]]$''ƒˆ@DÈËËCTTT½j«ÄûíÅûMUp³b¬fÏž www„„„àþýû8zô(–-[X¸p!<<û ™™™žþ—?eÊ,^¼éééˆÇ·ß~‹iÓ¦5hŸ<¯¶šrÔ¶ýÿVTT$²bj%)é>&OÞ ''cüþûÇܨk!øÈŠ©û÷cÚ´í°³3„ÏÇÐÒâ__ÆZ >²bj!?¿S¦lE÷î:ðõʱ†›SyI¦Oߎòr)||xè±–ˆÿ=e*M*•aÁ‚ß‘™ù¡¡Kеke—ÄSnVL¥­^†Ó§oÀÏozôÐUv9Œ1%áfÅTVHÈUl݉_†-•]cL‰øœSIqqwðùç~X°`Þ{ïe—ÃS2¾­=S9Œõºwï„€€OѦ ÿOÅX ÈŸL¥-Ú‰¤Û¶ÍâFÅÀ笘ŠÙ²åNŸ¾  …|½?ƘÿÛÊTÆ•+™ø¿ÿû_~ù^y¥§²ËaŒ©>gÅTBqqFŽ\#£.Ø¿ßå—1ö¬@d*áûïÿ@^^1‚‚>ãFàüùó6lÊÊÊ”] S={öDZZš²ËPnVLéÂïÁÏ/ ¿ý6ݺé(»•p÷î]”••! @Ù¥0pñâElذAÙe(7+¦TÙÙ…X¶ì \]_ŨQ/+»•ãêêªì˜ à³5<Á‚)™»{Ú¶ÕÀÿ;QÙ¥0ÆTY1¥9tè ""°ÿ|èèh+»Ƙ ã#+¦xzÂôé.xã e—ÃSqܬ˜Rüç?‡Ñºu+|ûíXe—ÂSܬX“»p!DÃËk<:väá?eJIIH$ìWSQÔ©Ö–Ž›kRååR|óM†·Ç¸qÎÊ.§Åëܹ3–.]ªì2«O°`MjûöÓ¸};{öÌSv) €®®.Ö¬Y£ì2«Y±&“™ùë×ÃâÅ#`lÜEÙå4+2™ ›6m‚:vìDFFB$ˆàíí {{{èèè`ذa ƒH$ª6  '''hkkÃÜÜ{öìyn¾ÊõBBB`cc}}},^¼¥¥¥UÞGDpssƒ³³3rrrPQQOOO˜ššBOO3gÎD~~~•˜'Ož„©©)Î;‡üü||øá‡ÐÕÕ…±±1ÜÜÜPRRRçüêV+«1ÖDæÏ÷¡WQii¹²KQyþþþTŸ?ÏmÛ¶‘¾¾>Ó½{÷(<<œŒ íØ±ƒŒŒŒèèÑ£”MdiiI(99Yž§¨¨ˆ´´´ÈÛÛ›²²²h×®]Ô¦M***ª–¯r½‘#GRRREEE‘¥¥%yyyÉ—Éd2rss#gggÊÉÉ!"¢µk×’ƒƒ‰ÅbŠ‹‹£~ýú‘››[•˜£G¦S§NQQQM›6Þ|óMJMM%±XLŽŽŽUráèèHûöí«²ÌÏϯZ³ÊÍÍ% Z·nååå‘L&£ÂÂB’J¥ÕòU®'‹å¯ùûû“¥¥¥|™‡‡ ›7oÊßcccCÁÁÁòçׯ_—?ÿw̲²2jݺ5ÅÇÇËß\%Çóò«s­/ÂÍŠx)œLFX±â0†µÅС¶Ê.G¥df>BDDÖ¯?ŠY³v¢woO˜™¹á§Ÿâê'-- ÎÎU'¬899RSSáèèXe™½½}µ]ºtAdd$¢¢¢`llŒÁƒãìÙ³hÕêÅVVVòǶ¶¶¸sçŽüyLL † ‚Õ«W?³½™UÖ±³³Ã„ ªÄ´µ}ú;òàÁH¥RXXXÈ—YZZVÉQS~u®•UÇÍŠ)\`` nÞÌ‚—×xe—¢TR© ññw±sç_øøãÝxõÕpqY‰Y³vbÇŽ¿PTT‚wÞqƆ SñÉ'Õ›IMŒŒŒpíÚµ*¯%$$ÌÌÌä+%&&V‹!‘H “ɈÜÜ\Ì™3cÇŽEnnî ó&''Ë'%%ÁÐÐPþ<44ÞÞÞ8pà"##†††ÈÈÈ¿'66«V­ªSCCЭ[7´nݺʕÆSSSaddT§üê\+{e۱歠@BNNßѲeÊ.¥É•—Kéòå Ú¼ù$Íœ¹ƒll–“Áçdm½Œ¦MÛFëÖ¥?ÿSffNµuë;ì³zõjÒ××§C‡QVVýùçŸòsV7n$ccc:vìåääÐÉ“'ÉÆÆ†D"Q•a@‰DBÚÚÚtðàAÊÎΦíÛ·“¶¶6I$""Ú±cåççÑ?Ã`C‡¥äädºtéYYYÑ÷ß_%&‘§§'Y[[“D"!OOOrrr¢¸¸8Š‹‹£Òܹs«Ä|Ö|@o¾ù&¥¥¥Q\\988TÉñ¼üêVk]ð0 Ÿ³b öãGÈÆfåä*»”&ñðaíÛw‘fÎÜA––KÉÀàsêÕë;š;w7íÜy†ââîPEEõs@ÿVß§²²2Z±bõìÙ“:tè@...òóRR©”6lØ@Ô©S'5j…„„žž^µ]²°° MMM²µµ¥ù2üïÑ?Ö;wî$333ÒÕÕ¥E‹‘D"©S"‘µµ5yzzRII ¹¹¹‘¡¡!uêÔ‰¦NJyyyUb>+77—f̘A]»v%úâ‹/ªäx^~u«µ.¸YQß)˜)Ì;yxãðÕWoaáÂ7•]ŽÂ$'?À±cñ8v,W¯fB[[C†Øbøp{ôëgŽž=õê3 S¦LiÔ­!RRR`ee…ÐÐP˜˜˜ W¯^òeAAAX¹r%®^½Ú¨ØÊúø¨O~uªõE„ø}Ps|§`¦8?ÿ|/½Ôs漡ìRwíÚm>|GÆ#==ºº0r¤#/Ž7Þ°––êüi‰Åb,_¾¾¾¾°µµ…X,Æwß}‡… *»4ÆêLuþ¢X³’’òþþ—°~ýûÐÖÖPv9‚¸{7ÁÁ—qðàßHN~€=t1fŒÞzË}ûö@«Vªy9cüøñÈÎΆ¹¹9fÏžùóç78¦ŽŽN£Öo¬úäW§ZÙ‹ñ0 Sˆ… ÷ .î"#—¢ukõtZZZÀÀìÝ{bñmôè¡‹I“úbìXgX[wWX^öaÏâßd ˜x!!W±iÓtµmT¹¹Oðûïç±wïE݆†•]c-7+&¨„„» »†íÛg©ì9œçIL¼‡Ÿ~:Ž?ÿÃÌLÿùÏx¸º¾Úlη1¦î¸Y1A­[w†3ÆIÙ¥ÔIBÂ]üôÓ1={{CìØñÞzËQ­-c-7+&˜„„»8~<;v|¨òw_ÍÈȧç!DD$ woS8°¯¿n­ì²ª1b„²K`*àÁƒÊ.Aé¸Y1ÁlÜxöö†=úee—òBÅÅeزå¶n„®nlÝ:ãÆ9«\síׯÞÿ}H¥Re—ÂT@—.]Zü?.†ý?lß> o¿Ý«ö” ,ì¾ý6D€»ûhL™ò44Z+»,ÆXíxê:ÆÖ­‘°²ê†Ñ£Uï\UnîxzBPÐßxï½Wàéù.ºví ì²cõÀÍŠ5Zå•~üÑUå&&?77´k§…ýû`ð`e—ÄknV¬Ñvì8}}LšôвK‘+..ƒ—×!ìÛ…Y³à»ïÆ¡m[Me—Åk nV¬QrsŸ`ïÞ‹ðð£2çîbþ|_äçc÷îÙ9Ò±ö•c*¯Ãe÷î³ÐÖÖÀôé.Ê.àï cÇþƒN8yÒcÍY±+))‡¯ïyÌœ9íÚ)wˆ­´´ß~ ?¿(ÌŸ?_=mÚðÿbŒ5ܬXƒýÂÂÌžýºRëÈÎ.ĬY;‘–– _ß1|¸½RëaŒ ›k"Âöíg0iÒ+ÐÕUÞ4ðÌÌG˜>};ŠŠJ´FJ«…1¦8fÌØ>}zÀÛ{¦Ê|·‹1¦XܬX½–ÀÏ/ ³f jòK+Ý¿ÿÓ¦m‡!vïžÃ7Fd¬áfÅêåàÁ¿A|ðA¿&Í›“S„‰7¡{wøúΖOde¬%áfÅêeïÞ ?¾ttÚ6YÎââ2Ìšµ"‘¾¾sùŒµ@ܬXEG§!11 ³gj²œ2,Xà‹Û·s±oß<¼ôRû&ËÍS<–ÂêlïÞ‹èÓÇ vv†M–ó‡Âpölöï_€=t›,/cLµð‘«“üüb„…Å6ékÃÛû4þïÿ&£‹&ËËS=ܬXÆ@KKãÇ÷i’|7oÞÇâÅû0wîpu}µIr2ÆT7+V+"ž=0qbŸ&™.^XX‚9s~C¯^&øöÛq ÏÇS}ܬX­¢£Ó’ò3f h’|îîþ(..ƒ·÷,¾Íc O°`uД+ö#GÄ8pàèéuTx>Ƙzà[Y=*BXص&™X‘–– /¯Cps,ž1¦>øÈŠÕ(4ô44ZcìXg…æ)/—bÁ_8;›â³ÏÞTh.¡OSgŒ½Y±ç:xðoôíÛCa-+«ÀW_ùcøp{Œ×[!9cÍ7+VMQQ)ŽÃÕõ…åØº5÷ï?ƪU<üW›””Á‡bë³òýÏ®GD˜>}::tèðÜçìÅxÿײjŽC&#¼û®b.Z›šú6‡‡ÇhwQHŽæ¤sçÎXºt©²ËPµ–{÷îaß¾}ÈÌÌ|îs&¼–¼ÿùÈŠUsèÐ fmÁc–. „µu7Ì›7DðøÍ‘®®.Ö¬Y£ì2T­E"‘€ü»9ÿ~΄ג÷?7+VEvv!ΞM¤IŠ #**«VMjq©•ÉdØ´iìììбcG¸¸¸ 22"‘DoooØÛÛCGGÆ CXXXµ¡ …““´µµannŽ={ö<7_åz!!!°±±¾¾>/^ŒÒÒÒ*ï#"¸¹¹ÁÙÙ999J¥X»v-¬­­Ñ±cG 8ÑÑÑUb@ÿþýÝ»wîóÚ„……¡wïÞh×® äÂðôô„©©)ôôô0sæLäçç׺ìßûéÙç•Ož< SSSœ;w®Aù/^Œ9sæÈs¡]»v¸zõªÚíµCŒ=ã·ßþ"›eTZZ.xì'OJ©O/úê«‚ÇVWWWruu­óû·mÛFúúúL÷îÝ£ððp266&´cÇ222¢£GRvv6EDD¥¥% äädªüS-**"---òöö¦¬¬,ÚµkµiÓ†ŠŠŠªå«\oäÈ‘”””DQQQdiiI^^^òe2™ŒÜÜÜÈÙÙ™rrrˆˆè§Ÿ~ªV§¡¡aµZž}ü¼ç5)(( MMMš={6ݹs‡öîÝKèáÇ´víZrpp ±XLqqqÔ¯_?rss#"ªqYMõT>=z4:uв²²”ÿÌ™3ÔµkW*/ú÷±wï^rpp ™L¦Vûÿß¿¿ƒÖm"ܬXï¾û+-^¼O!±×­;J66Ë(;»P!ñ›Z}›•ƒƒùøøTyÍ××—££#íÛWu¿ûùùUû€ÊÍÍ% Z·nååå‘L&£ÂÂB’J¥ÕòU®'‹å¯ùûû“¥¥¥|™‡‡ ›7oÊßcmmýÂ:…ú°,--¥ÄÄD***"©TJgΜ‘Ç·±±¡àà`ù{¯_¿.^Ó²º4«Ê}ÑÐüÔ½{w:yò$3†Ö¬YóÜmTåýÿoêЬZÖ8 «Ñ;yˆ‰IǸqÂ_´öîÝ>>òe™™™Uj¶³³Ã„ j]öoDTí5[[ÛFåoݺ5&Nœˆàà`äääàĉ˜6mZÛªŠû_q³br¡¡±èܹÞxÃFðØ?üŽîÝ;aþü!‚ÇVFFF¸víZ•×fffòÇ•«ÅH$Éd Dnn.æÌ™ƒ±cÇ"77÷…y“““å“’’`høÏ}ÉBCCáíí 22УGÖ)‰D‚É“'ÃÝÝW®\Á–-[äË ‘‘‘!‹U«VÕº¬REEàîÝ»Õòjhh4*?¸ººâ?þ@@@ ccã·U÷¿:âfÅ侊·ßv‚†FkAã^º”†?þ¸‚åËß<¶:™={6ÜÝÝ‚û÷ïãèÑ£X¶l`áÂ…ðððÀñãÇñèÑ#œ:u ^^^Õ¾‹#‰0räH¡  eeeÐÐÐ@»ví;wîÄãÇ«¬³dɤ¤¤ &&_ý5¦OŸ._Ö¾}{ØØØ`Ù²eX°`JJJ°`Á‚ju~ÿý÷‚î‹ÒÒR”••ASS‰žžž€ÂÂB̘1ß|ó âããÏ>ûL>»¦e;wüþûï(((À¯¿þ*x~xýõ×QQQ+V`ÆŒUâªËþWKʈdª!-í!|NgÏ& ûÝw¥wÞùù¹'¡ÕY}ÏY•••ÑŠ+¨gÏžÔ¡Crqq‘Ÿ—’J¥´aò°° N:ѨQ£($$„ôôôª‹ð÷÷' ÒÔÔ$[[[ ‘/ÃÿÎkýscçÎdffFººº´hÑ"’H$ÕbJ$²¶¶&OOOª¨¨ µk×’¥¥%µoßž\\\(**Jðs&?ýô½ôÒKdbbB[¶l¡©S§’¾¾>•””››R§NhêÔ©”——GDTã2"¢•+WRçÎÉÂ:F® IDAT‚BBB^XkCóWZ°`µmÛ– ª¼®Nûÿßu«ú9+nVŒˆˆ6l8FÎΞ$• ÛPŽ‹#CÃ/èï¿3« êÛ¬ž§ò&44”bcc«,;xð 9;;7:6Þ×_M|ðAïQ§ý¯ÍЇ ,ìFvôƇR© ?üŽ1cœÐ·¯™`q›#±XŒéÓ§ãÊ•+(..FTT¾ûî;|üñÇÊ.=£¤¤iiiøí·ß0wî\e—Ó¢ðå–ÒÒ²qýú=ü÷¿{èФ¦>ÄÎ ·9òðð@qq1Æììl˜››cöìÙ˜?~ƒcêèè4jýƪíÚwôœÙzª.::&LÀ'Ÿ|‚!C†Ôø^eïÿæFDêøÃõë¯'°{÷Y\¾ì%Ø‘Uy¹ƒ¯Á+¯ôÀ¯¿Ö<µW]Mž<øNÁLí‰D"øûû˧UP Y19"ÆÈ‘Â\ÂÝ»yð÷ÿD°˜Œ±–‹ÏYµp·n=‚X|£G¿,XÌ’’r¬[w S§öƒ‰ÉK‚ÅeŒµ\ܬZ¸£GãÑ©S; hUû›ëhÿþhäå=Á¢EËÉkÙ¸Yµpþ)ƈö‚}Y·¼\ŠM›NbÚ4ñ½ªcÂàfÕ‚=xP€˜˜tŒ-ÜuÇöïFnn–,!XL¦šû-?˜rq³jÁއ¶¶†µ$^y¹7žÀäɯA_¿£ 1™z(,,ĤI“ЧO$''cݺuX¾|9²³³ñóÏ?#((ááሌŒDRR’üZ{5-«‹õë×Ã××––– ÊÿÞ{ï!$$D~=Á˜››W»,S>ž Ø‚ýùg† ±…¶¶† ñþøã ´´´píÚ5˜˜˜ mÛ¶011<~ü;wîÄ?ü€—_~:‰g÷îݸqãÔ¸¬.~üñG¼üòË(++kPþBCCýõ† ???̘1£Ö¦Çͪ…*((Á… )X»V˜ïUÈd„OàÝwûÀ̬« 1™ú¨¼åÆÜ¹sQTT„Þ½{Ë—=ï–vvvµ.û·ç}%ôß·ü¨oþgoùáää„'N`Û¶m ÙLÁx°…:}úd2FŒp$^xø5¤§gcñbžØµ¤[~0åà#«êر8ôëgŽÎÛ5:á—_"ðÖ[ް²ê&@uLÝüû–ÿùÏT½åF=Ÿ}ö™üÆ’5-{ö–ï½÷^½nùQ×ü@Õ[~TNÊ`*H©×ÑeJQ^.%[Û¯ÉÛ;RxgÏÞ$ƒÏ›å•ÕŸ§¬¬‚BB®’³ó¼F_u½9iŽ·üh) W]çk¶@QQ©˜8q.\ø=zè6:Þ´iÛPRRŽ  Ï¨Nuݹ“‡}û.bÿþ(äå£S§BXY=FPÐe—Æé›o¾AFFöíÛ§ìR”‚¯ ÈTÒ‰×aa¡/H£JJºÓ§ob×®æ{eõË—3°eË)?ž€nÝtðÑG¯ãƒúcáÂ9µ¯ÌTZII îÝ»‡ß~û û÷ïWv9¬ܬZ ˆˆŒ)ÌÄŠ]»ÎÂ̬+FŽt$žª "œ8q[¶œBtt^}µ'vìø#F8 uë–9/©¥ßòƒ)7«&==Éɰfk£cåæ>A`` ¾ùæA¯Ø®LD„ÐÐXüôÓq$'?Àðáö8th^{Í\Ù¥):6£Ú <¹¹¹Ê.ƒÕ7«æÄ‰ëèÒ¥=^{­g£cíÝ{ššm0eJ?*S¾Ó§oà‡‘pãÆõ†·÷LØÚ(»,ƸYµ8×1dˆM£‡²Ê˥ؽû>ø :tШ:å¸|9?ü† R0dˆ-Žû FÊ.‹1ö nV-HAÑÑ©‚ܹ÷Ï?ÅÈÉ)ĬYƒ¨L9îÝËÇòå‘€,ö9úô1SvYŒ±çàfÕ‚œ?Ÿ™Œ0x°M£cíÞ}#F8¨å¥•d2¾}ñÃáÐÒÒÀÆÓ0qb_¾c*Œ›U ròäuôécÖè«VÄÅÝAtt>¨²¦sýú=¸»û#!áæÎŒÏ?öí>Œù×_aľ cŠÆÍª… "DFÞÀôé.޵wïEXXècà@K*k2lÚt6ÇÀVˆŒô@ÏžzŠéêÚø•Œ©‚÷ßýú©öD)nV-DRÒdeåcÈÆÝ»ª°°ÁÁ—áî>Zm†Íââî`É?Ü¿ÿ›6MÇØ±ÂÜ«ÈÕÕ•cM¤e~»±ŠŒ¼.]ÚÃÉ©qW” º ™Œðþû¯ T™âvì8ƒqã~AÇŽÚ8rä Ác¬iñ‘U qúô ¼ñ†u£¦¬||ÎaìØ^ÐÑi+`uÂ+,,ÁW_ÀÑ£qXºt ,Úb¯<ÁXsÀͪxò¤QQ©øñÇÆ YÅĤ#)é>Ö¯_ ÊãêÕ[˜7Ï­[·Bxøxùe¾?cêŽÿÕl.^LEy¹C‡>ÿ¬uåë{/¿lŒ¾}U÷»H!!Wáêºff]º„cÍ7«àôé°µí}ýŽ ŽQP Á‘#bLÚ_ÀÊ„µaÃq|úé|øá 8ð ôô¾½Œ1ÕÂÀ-@dä Œýr£býV­ZaÒ¤¾U%œ’’r,^¼ ðöžÉ“(k†¸Y5s·oç"==¯¿nݨ8þþ13Æ ;j T™0=*‡îBrò}ìÝ;_­¾ûÅ«;læÎžM‚–VôïoÑàׯ߃X|S¦¨ÖtõÇ‹1uª7nß~„€€O¹Q1ÖŒñ‘U3wæÌMôïo-­†ÿ¨.¡G]•j……%øàƒmÈÉ)¡C‹¹ë1cLuñ‘U3&“ÎKnÔ`y¹ÁÁ—1iÒ+*sÅŠÇ‹1iÒ&ää!4t 7*ÆZ>²jÆï!/ï  ²jpŒ“'¯#7÷‰Ê –””cî\°²ê†µk'«ÌÔyÆXÓãfÕ —áêÕÌF}‰78ø2ÆŽí­Ô{@}ùå~ääa×® ©ÉWkɸY5CÿŽòriƒ›U|ü]¤¤¸Y5C/¦ÂÅ¥aGUR© ÁÁW0aB«ª›’’r,\¸½{›ÁÃcŒRj`Œ©nVÍŒDR†ØØ[èßß¼Aë_¾œcܸÞWV7ÿýïadgbëÖhÓ†=cOñYëfæòåL”—K1`@ÃŽ¬ºGG#XYu¸²Ú:•ŸóظqZƒ‡0cÍ7«f&::¦¦]4)A*•!<\Œ9sÞP@e5ËÏ/†››?ÆŽí¥ôïv åàÁƒØ¶m›²Ë` ÚÚÚØ¼y3LM•sZܬš™‹S<xéR:²³ 1vlÓ_^é»ïþá‡ÞkòÜŠ€7nÀÅÅEÙ¥°.003fÌàfÅTCii._΀«ë« Z?,,öö†èÙSOàÊjvæÌMý;?B—.í›4·¢¹¸¸ @Ùe°®9|¡žÏ`7#±±·PZZ~ýêdõtðÞy§iªŠ‹Ëàææqãzóuÿc/Äͪ¹x1††t=À˜˜t<|XØä³7l8Ž¢¢R¬X1¡Ió2ÆÔ 7«fäÒ¥t¼újÏ­z vv07oº!Àë×ïaÛ¶H,[6úú›,/cLýp³j&¤Rþþ;ýúY4hÝððØ&½o•LFðð@¯^¦˜1c@“åeŒ©'nVÍDBÂ]•6h&àÕ«™xø°°IÏýk×ncÕª‰ ¾“1{*%%Eð芈©ŠZÊv6Ü¬š‰˜˜ttîÜ®A·{?z4={êÁÖÖ@•U÷äI)V¯ÇŒ.pr2i’œÍYçαtéRe—Q«´´4èê6ìþjʈÛP-e;›7«f"&&¯¼Ò£Aÿ%9"ÆÛo7ÝQÕ/¿D ¼¼K—òµÿ„ ««‹5kÖ(»ŒZÉd2bcoã­·TYU«W‡cÐ +¼ù¦}“äS7iiipvv®òš“ÓÓs‰©©©pt¬ús²·¯¾»té‚ÈÈHDEEÁØØƒÆÙ³gѪՋÿÔ­¬¬ämmmqçÎùó˜˜ 2«W¯®²NFF ‰ ‰0bĤ§§x:ácÞ¼yHHHÀ'Ÿ|RëvÛÚÚ455‘””„Q£F¡oß¾ðññ‘¿'33³Jvvv˜0¡~_$o)ÛÙ\q³jbbÒñÚkõ?_uâÄu´o¯‰×_WüÝxOœ¸Ž˜˜t|÷Ý8…çRWFFF¸víZ•×fffòÇ•«ÅH$Éd Dnn.æÌ™ƒ±cÇ"77÷…y“““å“’’`hh( ooo8p‘‘‘ò×uuu‘œœ "!//QQQ€Û·ocÓ¦M>|8¾úê«Z·[CCC^ûäÉ“áîîŽ+W®`Ë–-ò÷"##Cþ<66«V­ª5vKÜÎæŠ›•š+(àæÍû š\qìX<†µƒ¦¦b¯g,“V¯ÃرÎxùec…æRR© IýŽtgÏž www„„„àþýû8zô(–-[X¸p!<<dkû5/¡I“ê~Ϊ¬¬ŒV¬XA={ö¤:‹‹‹ü¼”T*¥ 6……uêÔ‰FE!!!¤§§Wí\†¿¿?YXX¦¦&ÙÚÚRHHˆ|þwn„èŸs ;wî$333ÒÕÕ¥E‹‘D"©S"‘µµ5yzzQAA}ôÑGÔ¥KêÚµ+Í›7žþ.>,İaŠBp àóÏG(4¢ΟOÆÞ½QøóO1:uj W×W±~ý8;7ÍíÁ---åÃW+W®ÄÊ•+‹­¯¯oooÁ⩪–²Í7+5våJڷת÷ÅkOœ¸cã.°³SÜ…kËË¥øùçLÚFFêuT•Ÿ_Œ½{/ÂÏ/ ™™0p 6nœŽÑ£_††Fke—ÇX‹ÄÍJ]¹r ÎÎ&hݺ~ß@8uê:†µSPUO_ÆÃ‡X´h¸Bó)++۶ƾ}QÐÒjƒ÷ßï‡éÓ]tçeƘ°¸Y©±+W20rdý®>‘“S„«Wo)´‰TTÈðË/?¾ZUÅÆÞ† Çqòäuô쩇ի'aüø>|Ř áf¥¦?.FRÒ,[öv½Ö;sæ44ZcÐ Å]µ"<ünÝz„ߟ«°BÈÌ|„~CXØ5ô쩇õëßÇĉ}¹I1¦‚¸Y©©ØØÛ ¢zO®8y2ýû[ ];M…Ô%“6l8Ž·ßîKK}…äh¬Ç‹ñË/صë,LL^ÂÖ­3ñöÛ½rÇâ´´4lß¾]𸌵4ܬÔÔåË05í ]Ýu^G*•᯿n*t022II÷ñË/(,GC•–V`Ó¦ðö>´°nÝLšôŠBš˜˜˜ 00§M3¥kݺ5ŒŒŒ”]F£p³RSW¯f¢O³z­síÚmäæ>QèUÏ·nÄàÁ6MòÝ£úˆŽNƒ››?îÜÉÅÇÆ¢Eᣣ­ÐœëׯÇúõ뚃±–‚›•""\¾œ‰/¿|«^ëEFÞ€©iW… ÏÅÆÞÂ… )ðóS#‰¢¢R¬^ _ß >Üû÷/Pû/(3Öq³RC™™Ÿ_ŒÞ½ë÷ÅÔ3gnâ77±b×®³°³3Ä!¶ ËQáá×ðÍ7A‰ZÁÇgFŒpPvIŒ±â[„¨¡k×nCC£5ë~»Ç‹qõj&ÞxÃF!5eeåãðá«øøã׿>ž<)Å_ìÇܹ>èÝÛ ÇŽ}ÅŠ15ÇGVjH,¾ +«nÐÒªûïüùPØ‘•ÏytéÒ“&½¢øu•šúsæìƃؼy&Lè£ÔzcÂà#+5$߆“Sý&0œ9sÎÎ&ÐÑi+x=Ož”â÷ß/`ÆŒ ¿‘cMüý/aĈuÐÑi‹S§Ü¹Q1ÖŒp³R3D„¸¸;õnV§OßÀàÁŠ9—tèÐH$e˜9s€Bâצ¼\ |ñÅ~Ì™ó‚ƒ?ƒAg¥ÔÂS T39(((“SÝÏW¥§gãöí\… vìø &ôž^GÁã׿ɓRÌ냨¨TlØ0S¦¼Öä50Æ›•š‹ï@C£5êþ¿Ó§oBGG}úô¼žK—Ò‘”t›6M¹¢´´—.¥aà@á›Õ¾}Qxýuë&¹åûÇ…xÿ}oèéuÀï¿ÏåFÅX ÄÍJˆÅ·ëuëË—3PZZ…\qï^>Nž¼ŽéÓ]û<¥¥˜={d2Âï¿ÏUøm=cª‰›•šÉê?¹âÂ…˜šv…©iWAk ¸„.]ÚaäHGAã>»»?RS³±ÿ|tïÞIáùcª‰ÏY©‰ÌÌúO®8w.Yð£*™ŒpàÀ%¼÷Þ+ÐÐh-hìûå—„„\E`à§èÙSO¡¹cª¬ÔD}'WAxø5|ðA?Ábþ[YYæÏ÷EÏžºøñGW…åaŒ©nVj !“+.^LüûU¡¡±ÐÐh·ßî%hÜg}ÿý¸};»vÍVê½±cª…›•øgrEÝš•DR±ø¶àçzüý/áí·{)ìÊüq¿ÿ~k×N†¡!ߊ1önVj rrE]¯l{ååRôë'\³JIyˆØØ[xï=Åܶ>--˜>ÝE¡GnŒ1õÄã,j ¾“+¢£SahØ&&/ VCPÐß00è,ø„ àé0§‡GºwïOÏw_ÉÃÃk×®UX|ÆØSššš8uên‚7+5PßÉ—.¥ :(“‚‚þÆ„ }Ъ•H°¸•vîü 11é8rä ´o¯%xüJèß¿?¾üòK…å`Œ“'OÆÝ»wÉÍJÅâãïaôh§:½_*•áòå ,_þŽ`5\º”†;wò0iR_ÁbVJOÏÆ?ÁÂ…oÖë½ ebbWWžeȘºásV*îÎ<<~\\çóUׯßCaa‰ ç«üvv†°³3,&ð´±.^ì‡=ºâ‹/F ›1Ö¼p³Rq‰‰÷ ‰`k[·FqéR:wn[Ûî‚ä/))Ghh¬B&VìÝ{±±·°ví…_º‰1¦Þ¸Y©¸ÄÄ,u®óÕÆ££Óðê«=! snéôéxò¤Tð»?xð«W‡aþü!èÓÇLÐØŒ±æ‡›•ŠKL̪×ð[tt^{­§`ùƒƒ/£ Á¿÷ôí·@__£Ëkž¸Y©¸ÄÄ{°·¯[³ÊÈÈAvv¡`ç« K‘€qã„=ª:qâ:ÂïaåʉÍò*)))‚Ù*2¦º©m4dñ~UÌ~UnV*¬¤¤iiÙ°³3¨Óû££Óж­&zõ2$ÿ‰×!•ÊðÎ;Â}I·´´ßÿÆŽuÆàÁ6‚ÅU%;wÆÒ¥K•]F­ÒÒÒ «+üž—÷kËޯܬTXRÒ}H¥2ØÚÖ½Y9;›6Y!$ä*´ÂK/µ$lÚt¹¹Eøï' SÕèêêbÍš5Ê.£V2™ =R›¸¼_[ö~åf2§Ö IDAT¥Â³ ¥Õææu»ÇÓóU æç#22QЉwïæaóæSX¼xôõ; WQd26mÚ;;;tìØ...ˆŒŒ„H$ÁÛÛöööÐÑÑÁ°aÑHTmØ$44NNNÐÖÖ†¹¹9öìÙóÜ|•ë…„„ÀÆÆúúúX¼x1JKK«¼ˆàæægggäääÊËËáîîŽnݺA__îîî(//ÇáÇadd„¼¼<Àþýûamm'Ož ÿþ€îÝ»WÉòäI˜ššâܹs Cï޽Ѯ];È?Ô***àéé SSSèééaæÌ™ÈÏÏ€jqkR—ýXY|¿J¥R¬]»ÖÖÖèØ±#ˆèèhÞ¯M¸_›1•ååuˆFŽ\W§÷Þ¿ÿ˜ >§ÈÈDAr8Mffnôøq± ñˆˆæÏ÷¥!CÖPy¹T°˜õáêêJ®®®u~ÿ¶mÛH__Ÿ‚ƒƒéÞ½{NÆÆÆ€vìØAFFFtôèQÊÎΦˆˆ²´´$”œœL•ZEEE¤¥¥EÞÞÞ”••E»ví¢6mÚPQQQµ|•ë9’’’’(**Š,--ÉËËK¾L&“‘››9;;SNNŽ|Ýü‘&MšD·nÝ"±XL}úô¡eË–ÑÌ™3iÖ¬Ytÿþ}êÖ­EGGWÉ÷ïü£G¦S§NQVVijjÒìÙ³éÎ;´wï^@>¤µk×’ƒƒ‰ÅbŠ‹‹£~ýú‘››ÛsãÖ¤.û±²žØØXyÜŸ~ú©ÚÏÆÐÐð¹yy¿*f¿Öùûû×kZp³Ra“'o¡Ï?÷«Ó{CCcÉØøK*(’{êToš9s‡ ±ˆˆ.]J#CÃ/èøñxÁbÖW}›•ƒƒùøøTyÍ××—££#íÛ·¯Ê2??¿jÍ*77—444hݺu”——G2™Œ I*­Þ°+׋Åò×üýýÉÒÒR¾ÌÃÃÐÍ›7«¬kkkKYYYòçäììLDDyyydllLNNNäååU-ß‹ò—––Rbb"‘T*¥3gÎÈ·ÏÆÆ†‚ƒƒåë^¿~]þ¼>ªuÙ•õ<×ÚÚú…?›ãýú”Ðûµ&ŠhV< ¨Â®_¿WçóU—.¥ÁÞÞPÛwäçãüùdÁ®~NDX±"¯¿n#‰ÙÒÒÒàìì\å5'§§—½JMM…££c•eöööÕbtéÒ‘‘‘ˆŠŠ‚±±1Œ³gÏ¢U«ÿéYYýs±`[[[ܹsGþ<&&C† ÁêÕ««¬“‘‘ˆD"ˆD"Œ1éééžž@Ÿ7oðÉ'ŸÔºÝ¶¶¶ž^Œ4)) £FBß¾}áãã#Offf•:íìì0a„Zcÿ[]öce=Ϻ}ûö 6/ÂûU1ûµ©p³RQÙÙ…xô¨¨^3…:_uôhZµaÌa~Iî!6ö6¾ÿ~œ ñšŠ‘‘®]»V嵄„€™™™üq¥ÄÄÄj1$ d2‘››‹9sæ`ìØ±ÈÍÍ}aÞäädù㤤$þóÕ…ÐÐPx{{ãÀˆŒŒ”¿®««‹äädˆyyyˆŠŠðôhÓ¦M>|8¾úê«Z·[CCC^ûäÉ“áîîŽ+W®`Ë–-ò÷"##Cþ<66«V­ª5ö¿Õe?VÖó¬=z¼ðgó"¼_³_›ŒÇiL8gÎÜ ƒÏéáÂZß[XXBÆÆ_Rhh¬ ¹gÎÜAÓ§o$VYY °Š-Ú+H¼Æ¨ï0àêÕ«I__Ÿ:DYYYôçŸÊÏYmܸ‘Œéرc”““C'Ož$‰DU†U$ ikkÓÁƒ);;›¶oßNÚÚÚ$‘<®Ý±cåççÑ?Ã1C‡¥äädºtéý?{weµÿü3ˆ  Ê"û*‚šá–R–Vj´jššWë¦vÕ®¹˜Z¦uÍ[Yvo©aZ¹+jBåwQÙ·†uÖa˜å9¿?üA³<³xÞ¯W¯3ó<çœç!æësÎ÷œ3tèPòñÇwëÚ¼y3 ê(gÕªUäµ×^#EEE$55•L˜0¼ûî»D.—“©S§’ýë_¤¶¶– 2„œ9s¦S}^·«««#‡üù矤¹¹¹£«,99™lÞ¼™Œ5Ф§§“ôôtòÄOüã ËU…í}ìÚ¾ÿþ÷¿Ý~7þþþŸÓûj˜ûÊè˜ÕÃãûïȨQ›X{éûÀ¦ŽH$&>>äèÑ›:—E!^'¾¾¤¬¬N/åéBÓ`%‘HȧŸ~JüüüHÿþýIXXXG¿¿\.'ß|ó  $<<œÄÄÄggçn_ÑÑÑ$ €X[[“àà`Óñþ ¿¾4öíÛG|||ˆ““Y¹r%‹ÅÝÊ‹Å$((ˆlÞ¼™BˆH$"‹-"ŽŽŽdðàÁdéÒ¥¤¹¹™|÷ÝwäÑG%‰„Bȯ¿þJÜÜÜHmm-‘J¥dÒ¤I¤ÿþêÐŽ;È Aƒˆ——Ù½{7™?>qqq!­­­$""‚¸»»2þ|RWwÿwܵ\U4¹¾–Éddûöí$00ØÙÙ‘°°0’˜˜Øñ9½¯†¹¯lÑ`õY½ú™7ï{VÇ~õÕŸ$,l«^êýí·dâåõ©­íž­¦©––6ú1ùôÓõ¦ÁJ‘ö?ìØØX’’ÒùIöÔ©Sƒïº”ý01Ä}ìŠÞ×ûô}_U1D°¢cVf*+«œõxÕ;E7ÎW/õþñG&N €££îþùš›Û°bųzh™yIKKÃÂ… ‘œœŒ––$&&bÓ¦Mxûí·MÝ´…ÞGÃè÷µ÷-ÌÖ Èd òòX²ä)µÇ2 Á½{ÅX¿^÷Í[[¥¸x17ê^Vcc+víºˆ%KžÒë æbݺuhiiÁÌ™3! áïïÅ‹cÙ²eZ—ioo¯ÓùæJݺr~ø¡^ïcWô¾æ¾ VfˆÇ«‚D"cµ€-'„HÔŠÑ£u_ðòå\ˆÅ¼ðÂ#:—µwïe0 Á;ï<­sYæ$00÷{9€­[·bëÖ­z+ÛÅÅQQQz+Ï\´ß/Uôy»¢÷µw Ý€f(;»––6Lý²*÷îÃÆÆŠõÊ쪜=›ŽÐPo¸º:èTŽHÔŠ½{¯`ñâI°·ï§s»(Š¢h°2CÙÙåð÷waµ}FJ #F¸ë¼x­\Îàüù,<ÿ¼îOUû÷_! –-›¢sYEQ Vf);»‚õÊ÷îñªûN»·o¢¦¦ áẫ¦¦6DE%àí·'Ó§*Š¢ô†+3Ä6°­M†ÌÌ2½ŒWÅÇg ÀìVxWæðá›ÉäxûmõÉ!EQlÑ 3#‰Q^^Ïj *#£ R©\/ÁêìÙ —Wjk“!*ê". ÃÀ¶:·É®\¹‚iÓ¦$kX[KLÜ"Š¢Ø ÁÊÌdgW€‚õÁ*%¥ŽŽvðõÕm÷P.W€¢¢j™=qâ6D¢V,_þŒNåÊœ9s2™Š‹íQYi‹Z Ôjâ–QTïòúë¯c„ z-“+3“›[‰làá1Pí±))% õR;ßBsç20hN‹e2»w_ļy™íÆŠ¯¼ò*øüøþû d‡¨¨WðÒKê|ÿ(Š2<¬ÌLnn‚‚†°úMN.Æ«¯ŽÑ¹Îsç21uêpôé£ýæÿþ—ŽÒÒ:³Í¼z5~ø øüZ¼ýöSXµjìíußN…¢(ã ÁÊÌp¹ êªö¸ººfU#4T·ñ*¡°wïaéÒÉ:•³sç¼øâ(»$õ­¥E‚­[ÏàÀ‰C‡–ÂÇg°©›EQ”†h°23\®O?¢ö¸ÔÔBtN®¸t)}úXà©§†i]ÆíÛ<¤¦–àßÿ~M§¶èÛµkyX»ö8d2¾gŸí¾9"EQ= VfD$C ±z²ºwoïÁ<¸¿Nu^¼˜ tÚaxÏžK7ÎOç§<}‘HdøòË?±gÏ%<óL¶oŸg¶ãhE±Cƒ•ÉϯVÁ*%…¯spÉ\º”‹Õ«§i]FQQ5þ÷¿ DEý]§¶èKII-–.ÝÂB!¾újæÍ{ÌÔM¢(Jè¤`3Âå `cc/¯AjMN.Ö¹ 05•††<ýt°ÖeìÝ{ÞÞƒõ²L“®ââRñì³_ÂÒ²> Š¢z¬Ì—+€¿¿3,,Tg–”Ô¢¦¦I/ãUެÌUD$jÅÉ“·ñÆë”I¨+©TŽM›~Ųeð÷¿O¯¿®„››úÔŠ¢zÚ hFØfÞ»W KK <òˆ§Nõ%$äè”Xqòäm0 Á‚uj‡.ššÚ°|ù\¿ÎÅöísñ·¿™®-E}²2#lƒUJ ÁÁnè×ÏZëºêêš‘šZ‚)S´ V CðãW1gÎx“-X[SÓ„9sv!3³gά¦Š¢z1úde&ÚÚd()©e¬’“ù=Z·•Ö¯\ɇLž¬]°ºt)ÅÅ5X´h’NíÐVa¡¯¿kkKÄÅ­†‡‡£IÚAQ”qÐ'+3Áã !—3jƒ•LÆ =½¡¡^:ÕwéRBC}´~*Ú¿ÿ¤Ýx—.22Ê0sæw°·ï‡_]IE=h°2\®––j·èÈÍ­€X,ÑéÉŠ‚„„l­»‹‹kpñb6ÞzËøOUé饘7ï{xx8âĉwàä¤Û<3Š¢zÚ h&¸\¼¼«Ýñ7=½¶¶Ö¬º •ÉÉ©@UU#¦LÑ.eýСpuuÐy£FMq¹üío{0t¨+^Šþýûµ~Š¢L‡>Y™ ¶Éii%>ÜC§Tñ„„8:ÚáÑG5ïJ”J刎¾×_ ––Æûß§   ³gïD@€ Ž[FE=dh°2lƒUzzyÄC§º.]ÊÁSOið~ÿ= -xóÍ'tjƒ&ªªñÆ{áèh‡\¤S$EQ= Vf@.gÀãU© Vr9ƒììrŒ¡}°jnní[<­»MÄÓO‡ÀÕÕ^ë6h¢µUŠ·ÞÚ¹œÁñãËu^ ‘¢¨ž‰+3PRR‹¶6™Ú`UXX– FŽÔ>Xݸ‘™Œaµ²{WEEÕ¸~=ßh“€ !x÷ÝÃ(,¬ÆÑ£Ëèªõ£ f€Ë€Ãá 0Pu&`FF)¬¬ú 8ØMëº.]ÊAp°›V«?~ ..öxæãlµ±cÇ9ÄÇg":úµY’EõnôÉÊ p¹¸ºÚ«Ý¦##£ ®°¶Öþß 9Z-\+•Êqüø-Ì›7Þ(‰çÏgá›oþ‡?~'¼>Š¢Ì Vf€mrEF†nÉEEÕ(*ªÖj¼*!!ÕÕMFYÒ¨¤¤+WÁüù±dÉS¯¢(óGƒ•ÈÏg› XŠ‘#µ_¼öòå\ôëgñãý4>7:ú6&N €··a·„¿ŸPñ#†uŶm³ ZEQ= Vf€ËUŸ XQQººf2¯]ãbâDôí«Y7¢P؈øøL£÷Ô©;xñÅG :W !2ò-š„_|Ô`õ´ãóùX±bZ[[ ^E= BBBðí·ß¬|¬LŒË`à@[8;«N%ÏÈ(Ói¼êúõ|88Øjܘ“SÔÔ|øáËZ×­!«V««=>þøƒÕó ÄÄDÄÅÅaΜ9F©¢z³’’|÷Ýw4XõfUpV{\FF),Óºž7ò1q¢?,,8wúô]¸»ÄãkþDÆÖ¡C7‘˜X€¸¸5:¥åkãĉF­¢z£'N`Þ¼y­ƒŽY™'T;áµ¾¾¥¥uZWÉå ó58r9ƒS§î`öìq9¶ …øôÓüóŸÏà‘G´r¤(ªw£ÁÊÄŠŠªáëë¤ò˜ŒŒ2к0+«"Q+žxb¨Fç%&òPYÙ€W_£U½llÜø <=a͚髃¢¨žvšT*GII-üýUwfd”ÁÙy€Ö‹Ç^¿žAƒì¢Ù2M¿ý–ŒáÃÝuZÞI•'’píqqk4N§§(êáBŸ¬L¨¤¤r9??uÁªT§ùU7oæcâÄp8ì»ò¤R9ââR1kÖX­ëU¥¦¦ Ÿ|ƒ¿ÿý ­öÕ¢(êáBƒ• ñxB`Õ ¨ËxÕ­[§¬_¹’ ‘HŒ—_Õª^u¶n…Ö¯Ñ å›‹üü|þ‘`ª2{;SÞ3úûÒ¬L¨°P'§þ*çN‰ÅTi=^•ž^ ‘¨?®ÙxUll BC½àå5H«zU¹s§'O&aóæ½~Çßâƒ>0u3ÔâñxprRý&s*÷a÷0þ¾h°2¡¢¢jµ]€ÙÙË­°½q#ÎΤ~íÁv‰ gÏfà•WFkU§* C°qã/˜ìÆß V&Äã Y%W `£¶«P™›7ó¦ÙxÕå˹hll5H09xðòòضí5½—mH Ã`çÎ Á€†„„p8B…áÇÃÞÞÏ<ó âââÀápºuÅÆÆbÔ¨Q°±±¿¿?:¤°¾öóbbb0lØ0¸¸¸`ÕªUhkkët! Euu5@*•"22®®®pqqAdd$¤R)Μ9ÔÕÕŽ;†   477câÄûë>2¤Sý.\€··7®]»†¸¸8Œ=¶¶¶pssëÂ2™ ›7o†··7œñæ›o¢¾¾º•«Š&u‡ÃÁ‘#G‚AƒáË/¿Èårlß¾AAA0`žxâ ܺu«ã¼úúz¼õÖ[prr‚§§'""":V2áp8øé§Ÿggg|þùç8tèüüüààà€M›6Ñß—©Êd&LøùÏΩ}:ÉËË#‰‰‰$00lÙ²¥ã3†aHDD %ÕÕÕç~ñÅdöìÙ„Ïç“´´42f̲~ýzB!o¾ù&ùûßÿN*++‰««+¹uëV§úºÖÿüóÏ“‹/’ŠŠ bmmM/^LJKKÉáÇ RUUE¶oßNFŒAÒÒÒHzz:™0a‰ˆˆPX®*šÔI!Èk¯½FêêêÈÞ½{ RSSCvìØÑíwåîîÞÑŽ gŸ}–´´42räH²eË–Ž2çÏŸOD"Ù·o@æÎKD"Ù³gÐé^?Ì¿¯iú÷¤…4X™ˆD"#žžï‘˜˜{*{é¥ÿ NjUÇÝ»EÄÍm Éϰ>G,–¡C? {÷^ÖªNU>úè4yôÑM¤±±UïekJÓ?®#Fýû÷wzïÀ9r$9räH§ÏŽ=Ú-XÕÖÖ+++òÕW_‘ºº:Â0 ill$r¹¼[}í祥¥ujs```ÇgëÖ­#Hnnn§sƒƒƒIEEEÇëøøxJ!¤®®Žxzz’Q£Fu|A?XŸ²úÛÚÚHvv6ijj"r¹œ\¾|¹ãú† FNŸ>ÝqnVVVÇkm‚›: ¹X!„H$’ŽÏ‚‚‚”þ®$ éÓ§ÉÈÈèøìôéÓ$00°£ÌäääNev}Ý^¿ª¶Òû_2F°¢Ý€&Âç×@.gTvB“Sw­ê¸q#C†8h´%|BBÄb©Þ³ ªpðàu¬Yó\Lªàñx í|OF(((ÀÈ‘#;}6|øðne8::"!!‰‰‰ðôôÄäÉ“qõêUXX(ÿ3:ô¯Ä˜àà`”––v¼NJJ”)S°mÛ¶NçÁÍÍ Ó¦MCaa!€û K—.Eff&Þyçµ×|£Nkkkäåå!<<cÇŽÅþýû;Ž)..îÔμúê«jËÖ¥Îvîî÷ÿ6¬¬¬:Þ+))Qú»Ëåøk÷éÀÀÀN÷uÀ€ÊìúZ•‡ñ÷e,4X™'‡ÃŸŸò±¨’’Z47·i=)÷ÆûãUš8sæÆ÷Óz²2Ÿ}g,\¨ýú†¦äááÔÔÔNïeff|||:~n—Ý­ ±X †apòäIÔÖÖbÉ’%xùå—Q[[«´^.—Ûñs^^^Ç—3pü+** ÇGBBBÇûNNNàr¹ „€‚ºº:$&&¸ÿE¾sçNL:ï¿ÿ¾Úënÿ‚‹Å˜;w."##‘œœŒÝ»wwãî¢¢Ž×)))øì³ÏÔ–­Kíz___¥¿+WWWôéÓ<¯ã³‚‚xxh?ñAãïËXh°2‘ÂÂj8;÷‡ò§ŒÜÜJp8 ¦y°’JåHJ*Ôh‰¥– ÎËÔûSÕõëù8{6›6½KËžù¿ÜâÅ‹‰˜˜TVVâìÙ³X¿~=`ÅŠX·nÎ;‡šš\¼x[¶lé–ÔÂáp0}útüòË/‰DH$°²²‚­­-`ß¾}hhhètÎêÕ«‘ŸŸ¤¤$lܸ .ìøÌÎÎÆ Ãúõë±|ùòŽ$Y³faÆ (..FZZÂÃñk×.0 ƒÅ‹cåÊ•8vìΟ?ØØØNõ555)¼þ¶¶6H$X[[C,cóæÍ€ÆÆF¼ñÆøðÑ‘‘ŒŒ ¼ûî»(..fU®*ªêTeùòåÝ~Wü1€û_æóæÍêU«PXXˆŒŒ |ôÑGX°`Æí£¿/#3d'#¥Ü† 'Õ&N|ûm<7î­Ê¿s§¸¹­!……BÖçÄÆ¦OÏ÷HU•H«:a†¼ðÂ2gÎ.½•©šö±K$òé§Ÿ???Ò¿Ö1.%—ËÉ7ß|Cˆƒƒ '111ÄÙÙ¹Û@tt4  ÖÖÖ$88˜ÄÄÄt|†ÆCÚÏÛ·oñññ!NNNdåÊ•D,w+S,“   ²yófB!"‘ˆ,Z´ˆ8::’Áƒ“¥K—’ææfòÝwß‘G}”H$B!¿þú+qss#µµµD*•’I“&‘þýûwªÿA;vì ƒ "^^^d÷îÝdþüùÄÅÅ…´¶¶’ˆˆâîîNÈüùóI]]!„t+WMêìz¿|-“ÉÈöíÛI`` ±³³#aaa$11±ÓØáo¼ALÜÜÜÈÚµk‰X,VY¦¢×ûïëA4Á¢›7ï{²fÍQ•ǬXqˆ,\¸G«òwíº@BC7ktÎÒ¥ûõT~ÿ=•¸»¯%ÉÉÅz-WWúøãjÿ‚ˆ%)))>;uêTÇ ¹.eS=ÃÃþû¢ ½Xa¡ú9V99ZuÀ­[¿ CT>Y !‘È´Ê,(¢®®ãÆù±>ç?Ò0qb ²Ó¸>Ed2_}³fÕxk’ž"00°ãËuë֭غu«ÞÊvqqATT”ÞÊ3=5©Ó[_æ„vš@QQ58ŽÊ'«œœ ôéc  Í—=¹s§vv}Yo+ÒÖ&Ã… Ùxáý=U>}eeuxï½çôV&EQ/¬L€ÇÂÅe€Ê´õ¼¼Jøú:iµ)áíÛ… õb&~ãF>ZZ$˜>}„Æu)"“1øÏÎaÆŒ1Z¯iHQªÐm7>4X™@a¡Pí—xNN¥Ö“ïÜ)Ô¨ 0>>#F¸ÃÝ} VõuõÛoÉ(-­ÕhÌŒ¢(J¬L °PýÖ 99Ö¼ °¦¦ BŒçËêxBÎËÄsÏT0 C°sç¼ð£j¯‘¢(Š-¬L@]Úzk«EEÕZW%'ƒÃÆg÷d••UŽòòzL›¦Ÿ.À³gÓÁå °fÍ4½”Gõ\=yËÊ rÕ]k«”xx¬%±±)JIO/%nnkH^^¥ÆåöY,™2åsÖÇýõY2fÌÂ0ŒÆuuÅ0 ™:u;Y²ä'Ë24#Lb|èõä-?EÉã IDAT(ÍÐ,z¡ÜÜ âæ¶†df–)=æäÉ$âãA¤Òî[G¨3sæ·$22šõñáá_“>8¡q=Š\¹’KÜÜÖ{÷Ìkµ Eh°2¼ž¼å¥º‚E/T\\‡ŸÁJÉÍ­D` ‹Æ‹¾J¥r¤¤ðY'WTTÔ#-­To]€;w^À¤ICÚ{W« 4ד·ü Ì VFVTÄfµuíö°JO/E[› ãÇû²:þÂ…lØÙYãÉ'ƒ4®««´´\½š‡+žÕ¹,ªwéÉ[~Pæƒ+#ãókáå¥ü© h_Pó䊤¤B89õg=·)>>O>kkÝ2Ù³ç†wÇSOéø¨ÞÉÜ·ü Ì VFÆç×ÀÛ{ÒÏVV¯U°ºs§ãÆù±š,ÙÒ"ÁÕ«y˜>]÷”õÊÊÄÅ¥bùò§éDMJ©â믿Ƃ  ___ÌŸ?ááá*Ï[±b"##ÀÀ@|úé§8zôhÇç;wî„»»;ÆéÓ§cúô騰aƒ¡/‡22º6 ‘•”ÔªœÓ”—W BˆV‚oßæ±^øöêÕ<¸¿FõtÕÒ"Á‘#‰xóÍÇaeÕG§²(Š¢”¡ÁʈjjšÐÒ"Q9f•“S‰  W»Ó’’ Ñ·¯%}ÔKí± CŸ¡—µOºƒ¶6)ÞxãqË¢z‡£ò?ŠÒÚ hD|~-¨|²ÊÍ­@p°æ™€wîâ‘G¼X%K¤¤ðQ]ݤs°b‚~¸„W_«·­E¨ž…v£QÆBŸ¬Œ¨¤¤––pwWÞÅÇå 0t¨«Æe'%j²žoïÁZ-çô 7¸àñ„X´h’NåPE©Cƒ•ñùµps¨t²oCC ‘ÆÁª¹¹ yyŒãÃêø‹³ñ쳺'V8pãÇûaäH:§…¢(âÁʈÔ%Wäç .•›šZ¹œa¬ª«›–VЧŸ֍ޮ*+ð¿ÿ¥ãïB§r(Š¢Ø ÁʈÔMÎÏ _?kxxh– ˜’‡««ÜÜÔïGuõj¬¬úàñÇ5ª£«ãÇoÁÁÁ/½¤¿Ý…)Š¢”¡ FÄç×`âD¥ŸTÁßßšeQ¥¦–°Ê€Ë—s0~¼/lm­5ªãAr9ƒ#G1{öX½¬~al))|ìÚ• ‹~˜6neBQº¯£ç}ÓôPr9ƒ²²:x{«z²ªÒ¸ ¸ÿå;þµÇBpéR–,yJã:tåJÊËë{\ºzcc+¾øâ8p£G{`ÆŒY°´”˜ºYÕã9::ü~4X‰@ ‚T*‡——ª1+Æ«@TW7¡¤¤–ÕJç99•¨ªjÄ”)ºW9r&ø# @óÀj „9’ˆmÛâЯŸ5~úi±ÞVš§(Ê8h°2>¿€ò9VR©ÅÅ5 Ô,05•‡Ã*X]º”'§þ:eï  8w.ß|3_ë2ŒI$jźu'pæÌ=Ìž=[¶ÌÐyÕŠ¢Œ+#áókÑ·¯%\\ì~^TT ©T®q7`J >>ƒ1p ­Úc¯\ÉÅ“Oé´²@ttú÷·ÁK/…ª?ØÄîÞ-Â?ÿyb±þC/ë Re4ÐHJJjàé9Hi Èϯ‚…G㮵”>«§*±X‚ÄÄ<õÔ0ÊÃ=šˆ9sÆ£o_óýwŽT*ǦM¿â•W¾EHˆ;.]ZOEõp4X Ÿ_«fŽ•ް±Ñl÷Ò””VÁêÖ-$9¦LÑ>X]½š‡’’Z³N¬¨­mÆßþ…ƒ¯cÓ¦WðóÏ‹éRPÕ ˜ï?{>¿Få¶šg––Ö¡¦¦ ¡¡êÓÖ¯\ÉŰaCàêê Q:rä&Æ÷Ó*cѲ³+°hÑ „ .n yÄÓÔM¢(JOè“•‘ÜŸ¬êɪJãäŠ{÷ŠaiiÁêKùÒ¥\žªΞMÇ‚µ.ÃNºƒ^Ø__'œ;÷> TÕËÐ`e‰ Aƒš9VÇ«RSK0tèôë§z‚oEE=rr*t¯:}ú.lm­ÍnÅ B¾ýö<Ö¬9Š×^C‡þõÉ&Eõ,´ÐÊÊêÀ0D阕@ ‚HÔªU& ›ñª+Wò`cc…°0í—X:u* 3fŒQ‰a6n<…£Gñ¯½ŠE‹ž4u“(Š2údeíc¥øÉ*?¿ 4ê”ˤ¥•°¯º|9=æ¯u_zz)²³+0wîx­Î7©TŽþó ~ùå.Ž{‡*Šêåh°2>¿öö6JçBåç àà` —¬Ë,(¨BSSFV½Ò:Ã\¹’‹É“uëôósÆØ±¾Z—¡Omm2,Yò.]ÊÁ‘#Kñĺ-ÊKQ”ù£ÁÊøüZxzªK®p֨̔”ØØXaØ0Õ(fd”¢¶¶Yëä ¹œÁo¿%ãÕWÇhu¾¾I$2,]ºIIE8rd9{LùÂÀEõtÌÊJJjÔ&Wh³ÌÒˆ°²ê£ò¸ë×óáäÔ_eÚ¼êó¹DxíµqZ¯O2ƒeËàÞ½bœ>½!!î¦nEQFBŸ¬Œ ´´NmÚº¦™€÷î±K®¸~‹ÇªõK§OßEh¨7|}´:__ärË–íÇ­[<œ}lmM³¼Ò{ïƒH$ÆO?-†µ5í­¦¨‡ VV^^¯´ ¸¿C°&iá<^Z[¥1Bõ“ÕÍ›ùpv€¡C5›¿u¿!’“‹MÖxàÀuüùg:öî}ˤãeE™¬ ¬¬¬~V]Ý„ÆÆVøù±Ve°²ê£6}ûæÍ|„…i7^uæÌ= d§Ó*íÚÊÉ©À'ŸÄ`õêif³¼EQ¦Gƒ•©z²**|}Ùwfd”"(hˆÊ„ ]Ç«ââRñ £4JúЩTŽwß=Œ±c}°fÍt£ÖMQ”y£ƒvÌJñ“W¾}-•~®HFF¹ÚäŠöñ*m&ççW!+«[¶ÌÐø\]ýûßq(/¯Ç‘#KÕf:š‹‹/"??ßÔÍ (LŸ>¾¾¾¦n†J4XP}} š›Û”>YWÃÇÇI£/æÌÌ2<÷ܕǴWi>^õçŸi<¸¿N{_iãúõ|üðÃeü÷¿ƒ««ƒQëÖÅsÏ=™LfêfP”NæÏŸ£Gšº*Ñ`e@ååªçXñxB’+ÊÊêPW׌‘#Ugê2¿ê?Ò0mÚôéc¼b±X‚ÈÈh<ûìpÌžmús5!“ɹs皺)¥•¹sçöˆpÑ1+*+«¥Ý|EEÕ'WXXp0|¸òE\år·obâDÍ»ùü¤¦–àÅ;·êë¯ÿ‡ÚÚf|ù%ý§(J1¬ ¨´´ŽŽvJç*j–¶ž‘Q oïÁ0ÀFé1éé¥hllÕj¼êìÙ ØÛÛàÉ'ƒ4>W[wï!**Ÿ~ú*\]íV/EQ= Vt?PñSUmm3D"±FOVééej'߸qÿ*mV&ÿã4<ûìp£M•JåX·îž|2sçŽ7JEõL4XPûêŠV€ÆOVê&'&h5^%4àÎB¼øâ£§‹Ÿ~ºŠÂÂjlÛ6ÛhuRÕ3Ñ`e@ªæX amm©ru‹ÕÖ6£¼¼^eÚ:Ã$%iµÕûÙ³°±±ÂÓOk|®6ªª±cÇÿ°råTøù±Ÿgö0ÊÏÏ×zóLmÊ$„`áÂ…èß¿·c ÑS`{Ú^ïÃ~ +RµzEqq5¼½±ÎºËÌ,•™€¹¹•hhhÁ„ š«?þHÃÓO‡ _?ã¬øÉ'¿ÁÙyÞ}÷Y£Ôד 8|ðÑê+//Ç‘#G••¥²~''Óî ÍV×¶ûž>¨7Þ_c ÁÊ@d2•• *ž¬ª5z¢ÈÈ(ƒ‹Ë¸¸ PzÌ;…°³ë«2[P‘ÚÚfܼ™o´,À›7 ðë¯Éؼy†ÑWÉ艜œœðù短>±X ðööVY?Ã0¨©©1Z»tѵ­Æ¾§ê÷×h°2ª*ärFé“Ua¡fs¬22JÕίº{·£G{k>}úX`êTÕ“õa>ý4“&aÚ4Ã×gN†ÁÎ;‚ ,, àp8 „ ** LJ½½=žyæÄÅÅÃátëŠÅ¨Q£`cc:tHa}íçÅÄÄ`ذapqqÁªU«ÐÖÖÖé8B"""ŠêêjLœ80dÈNåtÕõ8J¥ˆŒŒ„««+\\\ ©TÚQÆ… àíík×®©¼WÊ®QÝ5ÅÅÅaôèѰµµ…››[GPwMÊÎS¥'ß߉Pqû6¸¹­!eeu ? ÙH~úé*ëòžzêßdÛ¶8•Ç„…m%_|ñ‡Fí$„7ßÜKÞ|s¯ÆçiãÔ©$âéùÉÎ.7J}†€DGG³:vÏž=ÄÅÅ…œ>}š”——“ßÿxzzdïÞ½ÄÃÜ={–…BO ÂårIûŸjSSéÛ·/‰ŠŠ"äÇ$–––¤©©©[}íçMŸ>äåå‘ÄÄDH¶lÙÒñÃ0$""‚„††’êêêNçu-GÕÏí¾øâ 2{ölÂçóIZZ3f Y¿~}DZÏ?ÿ<¹xñ¢Âö¶Suª®I$kkk²xñbRZZJ>Lªª*•פÉy½áþv5gÎ2gÎÖÇ›È ¬ ä×_ï/¯÷ˆL&ïöY]]3qs[C²Y•ÕÜÜF<=ß#gÎÜSzŒ@ "nnkÈ… YµS$Ÿrüø-ÎÓ†X,!£Go&‘‘ì¾Ü{M‚Õˆ#Èþýû;½wàÀ€Œ9’9r¤ÓgGí¬jkk‰••ùꫯH]]a†466¹¼ûÿgí祥¥u¼M;>[·n@rss»§èµº/Óàà`RQQÑñ:>>ž„††*l‹2ª®QÕ5µµµ‘ììlÒÔÔDär9¹|ùrÇýSuMšœ×îoW=%XÑn@)/¯‡««ƒÂ.9MÓÖss+!—3*ÓÖ““‹`aÁÁ¸q¾µóÒ¥0 c”.¹®£¡AŒ÷ßÎàu™#‡ÐÐÐNïuœ°  #GŽìôÙðáû•áè舄„$&&ÂÓÓ“'OÆÕ«Waa¡üOyèС?£´´´ãuRR¦L™‚mÛ¶iuM]ÁÍÍ Ó¦MCaaa§úÕasŠ®ÉÚÚyyyÇØ±c±ÿ~VmÖöðôά¬¬2ØÚZ« nwîaèPWØÛ÷Ó¨çÎebüx? d§ÑyšjhhÁþÅ‹ŸìQ Õ꓇‡RSS;½—™™ ðññéø¹]vvv·2Äb1†ÁÉ“'Q[[‹%K–àå—_Fmm­Òz¹\nÇÏyyypwÿ+'66QQQ8~ü8´º®999Ëå‚BêêꘘØñ¹•••Ú2Ø\£¢k‹Å˜;w."##‘œœŒÝ»w³j³¶ç©jK;s¼¿= V¢*mÇÂÓs,-ÙÝþ¬¬ »©\ýÎ"Œï§Qår.dáÙg»ÿ ^ߢ¢.ÃV®|xSÕ/^ŒÈÈHÄÄÄ ²²gÏžÅúõë+V¬ÀºuëpîÜ9ÔÔÔàâŋزeK·w‡ƒéÓ§ã—_~H$‚D"••lmmûöíCCCC§sV¯^üü|$%%aãÆX¸paÇgvvv6lÖ¯_åË—£µµUãëjjjêøyÖ¬YذaŠ‹‹‘––†ððpìÚµK£òÔ]£²kjkkƒD"µµ5Äb16oÞ hllTØÖvlÎk×îoeÚnÈÞkêÔíä³Ïb~¶råa²páÖeÍšõyÿýãJ?ok“j5îÔž’—W©Ñyšª¬l ëÈ®] Z)@ƒ1+‰DB>ýôSâççGú÷ïOÂÂÂ:Æ¥är9ùæ›oH@@qpp ááá$&&†8;;w»ˆŽŽ&ÄÚÚš“˜˜˜Níár¹„¿Æ<öíÛG|||ˆ““Y¹r%‹ÅÝÊ‹Å$((ˆlÞ¼™õ˜ŠT*%“&M"ýû÷ï8V$‘E‹GGG2xð`²téRÒÜܬrìGeרêš!dÇŽdРAÄËË‹ìÞ½›ÌŸ?Ÿ¸¸¸tkk×ö(;¯ëq½åþ>¨§ŒYÑ`e Ǩ4Û綾¾!}tšuY!!ɾ}—•~~çN!qs[C ª4jã¶mq$,l«Fçhcýú“dìØ-¤µUjðºŒM“`¥Hû—Lll,IIIéôÙ©S§Hhh¨Îe÷&ætMæÔ]ô”`E»  µUŠººfs¬Øo "4 ¾¾ÁÁÊ'ú&%ÁÉ©¿F‹âÀùóYxæ™ÎÑTa¡G&â½÷žCß¾tû4eÒÒÒ°páB$''£¥¥‰‰‰Ø´iÞ~ûmS7¢Ìýö0€ÊÊû}ÚŠ ZP[ÛÌ:0'§â¦ô˜»w‹0v¬¯FkŠ•–Ö!;»›6½Ìúm|ñÅŸðósƼy´žžnݺuhiiÁÌ™3! áïïÅ‹cÙ²eZ—ioo¯Óù†¤îÿUBˆÂ÷ÍéšÌ©-¬  =X Ò=X•”ÜßÑÇg0«²²³+àâ2@e¶ÞíÛ<,]:Y£6^¸…þýûâñÇ ·}=—+@\\ vï~è;÷$_Ì[·nÅÖ­[õV¶‹‹ ¢¢¢ôVž>) Fê˜Ó5™S[ôÄ,--àìÜ}¿ââjXXpàíÍ.Xå䔫ìäók 6jœ xáBžxb¨A÷®úöÛó ‚—_U0EQ” 4X@EEœí¦šóùµpuu`½€kNN¥Ê.À¤¤BXYõÁ£z³nŸX,Áµk\Lj¸”õ¢¢jüö[2þùÏgè–”QzÛÊ´h°2 C†(Þ¢½¤¤ÞÞì&Ëå òò*¬z¼jÔ(O’®]㢭MfÐ…k÷î½ w÷˜9sŒÁê næ´íex4X@EEƒÂñ*àþ“Û.Àââ´¶JÕŸý“Uvv9úô±@PÐ…Ÿ77·!7·cÆø°n!çÏg´ ð矯ÂÁ¡þö·0ƒÕAõ<=aÛÊ|Ñ`eʺ !()©…—ÛäŠ x{†âõ¾ÒÒJ!“1;Ö—uÛrr*P^^o°%–D"1~þù/~ŠÎ«¢:477cΜ9X±bŠŠŠðÑGañâÅhnnî8f÷î݈‹‹Cll,þüóO|þùçhllÄìÙ³1fÌp¹\|õÕWذa„BaÇšx•••ÝêSuÕ3Ño=#„üÿ“U÷nÀªªF´µÉX?Y©K®HN.Â!pwWü§H||œ 4”}B†&ºX´h’Aʧz&‰D†aÐÔÔ,Z´sçÎE¿~-¼üÕW_u¬`þÙgŸáÃ?Ć šš ///ôë×^^^Ðm}¾®úöí«Õy”ù¢OVzV_ß‚¶6™’9V÷û×ÙŽYeg—« V))%„„lLž¬¬ú`äHVm’Ë\½š‡÷Þ{ŽÕñš8uê†`þü z/ÛT† ..QQ HIácâÄüüó<ûìpƒÌO£(J=¬ôH*•£¦¦IáÁ%%5°³ë‹Áƒû«-‡ËÀÞÞFé|¬”>‚ƒÝX/g”–V ‘H¬÷”uBöᅥٳÇÁÞ¾ŸúÌÃÄÆ¦à›oΡ   /¼0 Ÿ}6[£éE VzTU%Ã¥OV^^ìÆ«¸\•gÕÝ»Ç×è ôò帹 TÚ­¨­k׸ÈϯÂÞ½oéµ\c“É?~ ß}wõxýõ 8|x)<=MÝ4Š¢þ Vz¤nB°&ÁJY ¸LÆ #£L£n·+Wòðä“CÕ¨¡Ÿ~ºŠÇPº*|O˜X€?þ™™åxñÅQ8xðzêEéŽ+=ª¬¬‡…..ÝçYñùµ¬SÍóò*1i’âà’›[±Xº¬ææ6ܽ[„… õ»]Ÿ_ƒøøLüðÃ[z-×XJJj±uk,bcS0iRÎ{#F°ìêÂ… ¨¯¯×s )Ê8x<üýýMÝ µh°Ò£ÊÊ d§0㮤¤¯¼¢~BnSS**g÷Ç«ììú²ž|{ófd2O>Äêx¶ŽM„‹‹=¦O©×r ­µUŠo¿=¨¨¸¹ ÄþýKtº///üðÃzl!Eß”)SLݵh°Ò£ÊJ‘Â.@±X¡°‰ÕRKùùBT«<òˆ§Ò•-ººr%!!nz]¯O&c„… 'ö¨€oÜÈGdä ÔÔ4býú±hÑ$Sùù|¾žZGQ”*4XéÑý´õî‚KKë@a•¶Îå `cc¥4°Ý»W¬QVßå˹˜6mëãÙ8>ÕÕX° gì\SÓ„A\\*,˜ˆ?|‰Î“¢¨¦çü³¸¯ ÈçßßÇŠÍ„`.W??g…óyZZ$ÈÍ­d½x­@Ѐüü*<ñ„~“+Ž»…§ž bµÕ‰©ÅÇgbêÔí¸s§?ÿ¼_~9—*Šêh°Ò#@¤0X•–ÖÁÁÁýû÷U[†ªLÀìì Èå FòdÕžë×óaii‰õ7x*4 !!¯¿nÞ“€[[¥Ø°áÞzëG„‡?‚Ë—×÷¸ñ5Š¢þB»õH )Ì,+«c=g'/±np´ IDATO€Y³Æ*ü,-­Ú*Ý6¤«k׸;ÖýúY³:ž'’àà`‹ððGôV¦¾%%âÝwC"‘!:z9&MÒor EQÆGŸ¬ô¤µU ‘H¬4Xyx¨V‰ |~ ‚‚?Yed”aÄwÖkð%& ,,€Õ±lBpôh"fÍ«÷5õå矯bΜÝðôtĬ¥Š¢z úd¥'BáýHeÝ••Õ³šÃSP „\Î(íLO/Q:ÿª{u(*ªÖk°JL䡸¸Æ,×”HdX¿þNœ¸µkŸÃš5ÓXgLReþè_³žTUÝVÊŸ¬ºg vÅå `ii€—nŸI$2äæVbäHvãU7oÀÚÚãÆéoKcÇê­t]S)-­Ã‹/þþ™Ž#G–áý÷Ÿ£Š¢zú­'B¡..Ÿ¬d2•• ¬º¹\¼½+ìbËË@*•³^iýæÍ„†zÃÆÆŠÝ¨!‰—jv‰ii%˜1ã[ˆÅœ9³Jï‹õReh°Ò“ªªFØÛ÷ƒµuçžU r9ÃúÉJU ­­µÂ§.EnÞÌÇã²:–˜˜{àp8˜9sŒÞÊÔÕÕ«y˜={‚‚\ñÇkY¯êAQTÏCƒ•ž…¢nOUÀý.@,Ÿ¬*•~áfd”!$ÄU÷–!Æ«Ž»…_{{½•©‹cÇñ·¿íÁŒ£qøðÒ^±E EQÊÑ`¥'Ba£’`U+«> Dz$—3((ªx²*c=^•˜X+«>7ΗÕñêäåU"%…¹sÇë¥<]íÞ}'°lÙlß>—ŽOQÔC€þ•ëIUU#œ'W â ö •ϯD"S¬ärYYeWék~Õ©Swàå5Hï+ahc×® غ5«VMÅG½Ì:Ÿ¢¨ž+= ¯^Q^ÎnŽ—+‡ÃQ¬ «ÑÒ"Á#°ÏÔ×x!¿þšŒW^mòÀu Ÿ}‡_¼`Ò¶Pe\tž•žÜ²RÜ È6X¹¹9Àήû’Lé饰²êÃ*e¼²²……B½W%%¢¬¬¯¾jÚÄŠÿþ7_|ñ>ùd&þñÉ&m EQÆGŸ¬ô¤ªJ¤0X•–ÖÁÝ]}&`~~•Ò­ì32J1t¨k·LCEnÜȇ•UŒ¯ŸùU¿þšŒà`7 î®—ò´ñÝwçi ¢¨‡ Vz ‰ÑÖ&S:!˜]°R•¶^¦Qà£êg¼J*•#663fŒÖ¹,mÅÄÜÃêÕG±jÕ4¼ÿþsF¯Ÿ¢(óBƒ•…"XZZ`Ð »Nï³ V<^(\"#£  ®þÉêöm,--ô²`ssΞM7IbÅùóYXµêÞ~û)¬[÷¼Ñë§(ÊüÐ`¥UUprÐmwß²²zØÛÛ¨]õ¡ @+…c[¥ðõubµqã­[…1ƒձêœ;— ‰Dfôñª7ò±té~Ìž=›7Ï0jÝE™/¬ôàþêÚϱâñ„ðósR¸•ýýñ*vÉ·n`Âýì üÛoɘ4)ƒ÷×KyldgW`É’Ÿñøãøâ‹9&Ÿ×EQ”ù ÁJ”¯ ÈnŽ'T8^™™å¬’+D¢VääTè%e½¶¶—.å5±¢¼¼ þ€¡C]±wï[f»¹#EQ¦Aƒ•¨Zj‰]°ª‚¿¿s·÷ëêšQQQÏjŽÓ½{Å`‚ÇÓýÉ*..}úXà…Fé\ÕÕMxíµ]4ÈGŽ,ÕÛ2QEõ4XéAU•ò×Õͱb‚ÂÂj…Á*3³0b„ú`•”TŸÁ '&k*..O?¬—±/uZZ$xóͽË>ü `«º+ãçç‡Cÿ£ÿõêÿÖ­[gê?µnèrKz v_jI.g·ébyy=Z[¥è¬²³Ë1xp¸º:¨mÃíÛ…z鬮nÂÍ›ùعs¡Îe©#“1xçƒ(-­Å™3«Y]§©aíÚµ 3uS(Ê vìØ¢¢"S7£¬t$“1¨©iꬪªDJå¬ÓÖYegW 8x«6$'é%{îìÙtXYõÁÔ©Ãu.KmÛbqùr.Ž[_ßî¢ÍÕĉ1gÎS7ƒ¢ âäÉ“¦n‚B´PG55M`ÒmÅu¶s¬ „8жÛ-àþ“UHˆú.Àœœ ´´Hôòdõû縉B§rTÉÉ©ÀЇ0cÆh¬^=Í`õPÕ»Ð`¥#¡°¶¶ÖݺÍ*+ëáæ¦>a }BpWYYå°°à°zZJJÒOrÅï¿§âÉ'ƒ`oßO粩©iÂ[oýˆ  W|ýõë:WŠ¢4X騺úþRK]UV6¨ Vmm2””Ô*|²ÊÉ©€¯¯“Ú9Gååõ(/¯×9X56¶âòå\¼ø¢aæVÉå V®<‚¶6)~øá-ôíKs{”ÉÏÏ×{ WU&! .Dÿþý»kˆ¶ôdÚÞzÿuGƒ•ŽjjšàäÔ}I¢òò ¢zŽUqq5† 0Pq& ›ÉÀII…°²êƒ1c|Ø7Z ²À0 ÂÃÑ©eþýïßqóf>~üq1ÜÜÔïïõ08p >øà£ÕW^^Ž#GŽ ++Keý<NN='kSs»Ž‡íþk‹+ÕÔ4+\?M7 '‡ÃQØ ˜]ÎjûÛ·ï/^kccÅ¾Ñ üþ{ÂÂáèØ=+QWÇßÂ÷ß'`çÎ…:Õ‡““>ÿüs£Õ'‹ÞÞÞ*ëg555Fk—¡˜Ûu6l8…þóƒgš†a°sçN„„„`À€ CBB8!ˆŠŠÂðáÃaoogžyqqqàp8ݺ~bcc1jÔ(ØØØÀß߇RX_ûy1116l\\\°jÕ*´µµu:Ž‚ˆˆ„††¢ºº'N 2¤S9]u=¤R)"##áêê DFFB*•v”qáÂx{{ãÚµk*kTwMÊê—Édؼy3¼½½áììŒ7ß|õõõ ¯CQ[ãââ0zôhØÚÚÂÍÍÕ?zòý肋éÓ¿"[·ÆvzO 7·5äÚ5®Êsß{ï8™3gw·÷ïÜ)$nnkHa¡Påù­ÄÓó=›¢y×B<=ß#UU"Ê骲²ž„†~LÞ|s/‘˽–m*Htt4«c÷ìÙC\\\ÈéÓ§Iyy9ùý÷߉§§'@öîÝK<<<ÈÙ³g‰P($ñññ$00 \.—´ÿi655‘¾}û’¨¨(RQQA~üñGbiiIšššºÕ×~ÞôéÓI^^ILL$dË–-Ÿ1 C"""Hhh(©®®ît^×rTýÜî‹/¾ ³gÏ&|>Ÿ¤¥¥‘1cÆõë×wûüóÏ“‹/*lo;UרêšTÕ¿}ûv2bÄ’––FÒÓÓÉ„ HDD„ÊëmokEE±¶¶&‹/&¥¥¥äðá骪RxzúýïjΜ9dΜ9¬7’4XéhìØ-äûï:½—šÊ'nnkW¥òÜ™3¿%ëןìöþÁƒ×IPÐzÂ0ª¿à¯^Í#nnkHyyÆí~Ð;ï$¯¾úNet%—3dÞ¼ïÉĉÿ"µµìÿPÌ&ÁjĈdÿþýÞ;pà@FŽIŽ9Òé³£Gv VµµµÄÊÊŠ|õÕW¤®®Ž0 C‰\.ïV_ûyiiiïEGG“ÀÀÀŽÏÖ­[GÜÜÜnç)z­îË288˜TTTt¼Ž'¡¡¡ Û¢ŒªkTuMªê6l9}útÇûYYY¯•]o{mmm$;;›455¹\N._¾Üñ{a¬zÚýïÊ\ƒíÔQuu÷‹ÊÊÀ!ê»ýüºOÎÉ©@PеY@wïÁÃÃQ§„©TŽ‹³ñüóúM¬øâ‹?”Tˆýûß6È8XOÀãñÚé½Q£îg[`äÈ‘>>¼ûWŽŽŽHHH@bb"<==1yòd\½zÊÿt‡Úñspp0JKK;^'%%aÊ”)ضm›V×ÔUQQÜÜÜ:@6m ;Õ¯›kTvMÊê/..îtNHH^}õU•ího«µµ5òòòޱcÇbÿþý¬î…º¶æyÿ{ ¬tÐØØ ‰DÖ-X•—7ÀÁÁVeÚySS„ÂF¥s¬Ø¬\‘œ\Œ±c}5n÷ƒnÞ̇H$Öëv ÿû_vî¼€mÛf뼪FOæááÔÔÔNïefÞŸxíããÓñs»ìììneˆÅb0 ƒ“'O¢¶¶K–,ÁË/¿ŒÚÚZ¥õr¹ÜŽŸóòòàîþרgll,¢¢¢püøq$$$hu]rrr—Ë!„ÔÕÕ!11±ãs++õ‰?l®QÙ5)«ßÝݽÓb¬)))øì³ÏT¶£½­b±sçÎEdd$’““±{÷nV÷B][ó¼ÿ= V:¨©i€n ••õpwWýTUTT Ýž¬!ÿ¿& »`¥kvݹs™ qcµï|~ Ö¬9†¹sÇcÞ¼ÇôRfOµxñbDFF"&&•••8{ö,Ö¯_X±bÖ­[‡sçΡ¦¦/^Ä–-[º=Ms8LŸ>¿üò D"$ ¬¬¬`kk Ø·o:³zõjäçç#)) 7nÄÂ…­ ogg‡aÆaýúõX¾|9Z[[5¾®¦¦¦ŽŸgÍš… 6 ¸¸iiiÇ®]»4*OÝ5ªº&eõ¿ñÆøðÑ‘‘ŒŒ ¼ûî»ÿÇÞ™‡EUõqü;l";Ê®ˆ•Z–fnÙf.å›J–¥å–¢V¦¥–fi‹&îšb™Z¦ 把Ⱦ3À 3̾1sÞ?&ÆÙ‡mÀóyžž‡™¹÷Üso2_~;ŠŠŠ ÞGCd2är9œœœ ‘H°fÍ€@ Ð9¶=<ÿ6C+ú Û}úøøx­ýää¨yê΋%!!!ÄÇLJ|ðÁD"‘è¬)‘HH¯^½Èš5kÌŽ™( 2räHâææ¦9–Ïç“9sæoooÒ¹sgòÎ;ï‘Hd4¶£C÷h잌]_*•’eË–‘   âééIf̘A¸\®Þûз×-[¶N:‘àà`²}ûv2cÆ âçç§sl{yþ ±Õ˜«Fpúô¸XGp"#·“?ú™ÎûgÎÜ%AAK'6zþ‰)¤[·% ÷î•“ÀÀÅäÖ­B«×hȆ $44šdf–7Éz¶ˆ%b¥º/‘„„rû¶vço¿ýF"""½v{¢-ÝS[Ú«1lU¬¨°°Ùxx8ÃÉI»u9Á……ÕzãUYYð4ÙŸ/%¥}û5ªmÑ™3wáç玈ˆnV¯QÇÕ«yؾ=Ÿ}6Ù¬bæ‡ôôtÌœ9)))‹ÅHNNÆêÕ«1wîÜÖÞ…b“Ðm ºZ„Nt»W0™<“™€……,tï®› ˜•UaÖÀÅ””B Ò8‘9{6cÆôƒ]ãzq¹"ÌŸ/¾™3é]sˆŽŽ†X,ÆäÉ“Áb±Ѝ¨(Ì›7Ïê5=<<u~sb*³•¢÷}[¾§iK{m‹P˪¨ûj7±¤‰d&ÓÉ «Ñ½{g÷³²˜&-¹¼wî”að`ë“+ªª¸}»¸IÆ,[;lÚD§çš"<<„888`ýúõ(..†D"AFF–-[ëÿ~ôóóCLLLî¶é ÿe«ú϶|OÒ–öÚ¡bÕÔ­–´kˆ˜LuKcn@™¬Lf BB´Ý€J¥ 99•èÕ˸euï^9äòÚFež;—GG{<ýto«×€¸¸ë8s&?üðF³¡PšÚÙ¼m@Ū¨ ‚µ-«º‚`c–UI *A÷î>:ïËdµèÙÓßèuSS‹àéé‚ÐP]7¢¹œ9“‘#{ÂÅÅøcäç³ðñÇÇ0oÞh NGÓSZ‡½#ùëF o<“ÉCÇŽNðòr1pV}Õƒb•]ƒaR¬RRŠlõ_ƒ‰.dcܸ¦6€B¡Ä‚ЫWV¬˜dõ:JSð°w$ bÕª«…:ÁLf üý=ŒžWTÄFçÎnpsÓž.œ•UÀ@O¸»;=¿±ÅÀ—/çB*U`ÂëãUßÙÙ•øî»×áèhoõ:”öK{è¤N±¨XY !Žî,«Š ‚‚ÌI®ÐuYääTšlOÄåŠPXÈnTrÅÙ³èß?þþÆ3 qëV!¾ûî,V¯~ɤHy8‰DˆŒŒÄ‚ PXXˆO>ùQQQ‰Dšc¶oߎ“'O"!!ýõ—F<¶nÝŠ‚‚ܼyçÎCbb">ýôS|ûí·8vìN:…¤¤$dggkZ(Õµª¨¨ÐÚÇ7ß|ƒ}ûö!<<¯¾ú*† ‚œœ|ýõ×XµjX,V =Jc¡©ëVÂãI P(õºÍK[×_cõÄáFϽ}»„ l]Ú:!gÎdà7†[u¾@ Å‚ñÌ3}1kÖV­AiÿÈår¨T*…B8;;cΜ9˜:u*:v¬OÂùúë¯5M_7lØ€?þkÖ¬Áž={””„€€cÓ¦MX¾|9$ ¾üòK<òˆºéòž={pÿþ}£ûØ´iyäÈår¤¥¥!88;vDpp0è´J¢Ø.Ô²²6[_@&³Æª´u•Š 7· ½z™ŠW!$¤³ÞéÄæpÿ>••<ŒÓתóׯO€P(ÅW_EÒ *ŠAÚ['uJëCÅÊJ 7±åM[W*U()á褭—”p ‘ÈM¦­§¦5ÊøÏ?÷àããfU׊‹³qðàU|õÕT«]ˆ”‡ƒöÖIÒúP±²6[ƒNêë¬ %ª«EF,˜LäòZVKu™€ÆÄŠÒèäŠóçïcÔ¨>w­ eXºô&OܤãD(í“¶ÜIb›Ð˜••°ÙBxzvÔÊ„«ªâƒ‚€ÃnÀº´õ-«ìluO@c™€ÅÅÔÔˆlÕžù|)nÜ(À·ßZÞéË/OB&S`ýú)V]›òpáììŒ}ûöaÅŠ())Ahh(âââàì\ÿïû7ÞÀرc!‰0cÆ ¬Zµ °~ýz,Z´ƒ†^}õUlÚ´ ööö‰D˜0aD"&Mš„¯¾ú н{wŒ9zÈËË ß|ó Þxã ¸ººbÕªU˜1c&NœˆË—/·ÌC¡4 *VV¢/m½²’F-«¢"6ÜÜ:è$f¨;WWݾ] GG{<òˆubuùrT*‚Ñ£-›zíZ>öí»Œï¿ã¡úK±œ©S§bêÔ©?ë­·ðÖ[oé¼ïîîŽÝ»wc÷îÝ:ŸmÞ¼›7oÖyßÁÁ/^Ô¼®kkÕ%K–`É’%š×ï½÷žægc-Ÿ(¶uZIuµHGpªªø`0ðós7p–:¹âA« PgšJ[OO/AÏžþVwZ?þ> Ör]šB&«Å‡Áرý1eÊP«®K¡P(…Š••²¬<=;êŒ iHa!['m‚œœJ“5Kéé%8Ð:« λgqàÖ­£ªŠ ¨û¢M]¶ž¡ÿ A»“S¬Š••p8B ¥ªŠo²{Ea!!!Úi륥\ˆÅr£–•JEž^jµXåäT¢¼¼£G›ß¸6=½Û·'bÕªç›lì}[%3“‰+~…££_koÅfx:©Sl*VVÂáˆtβ’??Ób¥¯' £™€EElR dX%%݇——‹Ùiï …K—Á!Ý1kÖH«®ÙÖ©­UáäÉ4¼öÚxöÙ¯pófŒ¦O¤P(MM°°.W¬“l`ʲª®B$’éXVYYð÷7>8-­ŽŽöè×/Ȫý&%eâé§{ÁÞÞ¼¿O~þù<òòªðÏ?Ë=œ±­!HñóÏç±ÿðùDF>†O?} ƒÁXÑÚÛ£PJ¨XY ‡#Ô«ÊJ¾ ëHÝúA±2'°1ɉÉÉyظѼáˆ99•ؼù4-‡°°‡Çí%ÉpàÀUìØ‘„š1^}8Þ{o ºv}¸] Š-@ÅÊ Äb9d²Z‹cV%%88Ø!(HûË/;»C‡v7zÍôôR d]?À+Wr!—+ñÌ3æ%W|òÉï éŒ ÆXu½¶†TªÀ®]°m["`îܧõMÓ§Pl*VVÀåª;G7ü2S*U`³…FŪ¸¸^ppÐvÅååUaÚ´aÏS©îÜ)Å‹/FXµßóç³Ð·o Ñ”ú:nãÒ¥?þ¾Ñ¬Æö€JEpâD ¾úê/TUñ1{ö“xÿý±¥öS(”–¡}5ŽZ¬Ž´¯®A©TM°()á [·NZïUVòÀçKnØÝVX¨N®°60))Ï=gºE’H$Ú5'0uêcxüñP«®ÕV¸~=Ÿ|ò;îßgbúôaX²d¼ÉÄ`ooiÓ¦aÚ´i-°K ¥u˜>}zkoA*VVPoYÕ÷9«ª2ݽ¢¸˜ƒà`íxUn®zžNx¸á˜UzºõÉ¥¥\äç³0j”é”õmÛÎA,–ãã_´ø:m…Š Ö­û'N¤bìØ~رczôð5ûüÄÄDTVV6ã)”ÖgèPÛk@ÅÊ ¸\1ì´²÷*+ÕsqŒYVÅÅÕ6LÛbÉË«‚‡GG£.ºôôôê`UrÅùó÷áêÚAçºRPÀÂöí‰øøãu:s´ %~þù<¶n=??ìß?Ï>ÛÏâuž~úéfØ…B1++àp„ðòrѪүªâÃÕµ\]õ×á(•*”•quÜ€yyU 3þ—}Zšõ+.]ÊÆ°a¡&GÏþù÷CTÔSV]Ç–IM-Ʋeq((`añâñx÷ÝÑí>G¡´7hQ°p8º5V¦ ‚++ùP(”èÖíA7`¥Q JEp÷nìjñ>U*‚‹s0rd/£Ç%%ÝÇßßÅgŸMÖIþhˈD2|úéq¼ôÒwðövAbb4.K…ŠBiƒÐßZ+àru»W˜J[/.V×XéZV, f𼂖ÕÉ÷Ëáé§ ‹•B¡ÄÚµ'0iÒ@“¢Ö–¸r% ‚LV‹íÛÿgu&%…B± ¨XY‡#²Ø²*)á C­c¤RJK9FÝ€éé¥V'W\¸7ôíhð˜={.¡´”‹Ã‡ßµx}[D©Tá»ïÎâÛoÏ`Ĉp|÷Ýë S)”¶++àrE:]«ªø2¤»ÁsŠ‹9èÚµ“Vœ« € •Š˜Ì´6¹âÒ¥<ùdOƒ°«ªøæ›Ó˜?ÿ™NÛ¶uÊʸ˜?ÿÒÓKðÉ'/áí·Ÿ6Úý›B¡´ÚO€¢1dYï^Qà`Ýä {{;÷ ¹{·t±xry-®]ËÇSOví}õÕŸðövÅ‚ÏZ¼¾­qùr.&NÜ@Š?ÿ\ŠwÞE…ŠBiGP±².W¤UcEAU•ÀDÚºnApnn%‚ƒ; øBpçŽuÉ7oB"‘ãé§õ×Wed”!.î:V­zÎÎŽ¯o+¨T6œÄÔ©Û1aœ>½Ô¨Û“B¡´M¨Ð 8‘ÖàEO¹¼Öd‚ÅØ±Úu=yy,£+JJ8àó%èßßrËêÒ¥tïîc° ëúõ :´;^z©í&ÈåµXºôþø#Ÿ~úæÍÝÚ[¢P(Í+ ‘Éj!˵,«ÊJu÷ C–•B¡De%_¯ÐX±nFF9ììè×Ïr±ºx1Ë  0)é>.\ÈÆŸ.i³®²š1æÌÙ…¬¬ >üž|2¼µ·D¡Pšê´ºVK S×MµZ*+ãB©TiÕXB×â- IDATþ+6lYÝ»W†¸¹Y6ðÇãöíŒÙSç3•Š`ýúLš4ÐêAŽ­Mnn&NÜK€¿þZJ…ŠBy be!ú:®WVòÑ¡ƒ<=õO,)áЮ±ªª@ «;wʬJ®¸z5„½bŸŠœœ ¬Zõ¼ÅëÚwî”âÕW·ÁÝÝÇŽ½¯3ŒB¡´O¨XYHuµ~ËÊÇÇÝ K­¸¸nn´./¯ ŒÆ¬22ʬª¯ºx1tÕÉX”Ëk±qã)L›6 ¡¡æ7oµRS‹1uêOèÝ;Ç`4FH¡PÚT¬,„ËÁÞÞžžõ1+K`´­ºÛúƒ™€Uðôt¯¯þó8ÊʸV%WŠW>n· ºr%v>\;ËðçŸÿ…R©ÂÂ…c-Z¯µ9sæ.Þ|3Ï??11oR¡¢PR¨XY—«ÛqÅ+uA°>ËÊX&`¹U)ëW¯æaРnèØÑIk11IX°`ŒÖ .[çôé;xûí½xå•!غuìíé?W åa…þö[ˆ~ËJ`p`¡Tª›-Ô*ΕËkQZÊ5šäp÷®u™€W®äâ‰'´»¸ÿý?ðð船sGY¼^kqêTæÍÛ‡™3G`Ë–éT¨(”‡ú `!¶ZR*UàpD-«²2.!èÚµÞ XXȆR©2hYÉdµÈÉ©°8°²’‡¼¼*ŒQ¯*,dcÿþËX²d¼UÍp[ƒÓ§ï`þüxíµÇ°nÝ”6[¸L¡Pš*VRS#Ö+.W ¥Re0Á¢¬Œ Z–UAvv t﮿mvvjkUg&'çÃÑÑ=ÖCóÞ?œC—.Þ˜6íq‹Öj-.\ȼyû0cÆ0|ýõT­D …òðBÅÊB¸\±VÚ:›-ƒ–Ui)nnàåUNAþþžÈfd”¡cG'£ ú¸z5ÃÅÅé¿ë°pôèu,]:¡M$&$'çaöì]˜:õq|ùåkÔ¢¢P(¨XY'Ñ+V†bVåå5 Òn&[PÀBh¨á± åèÝ;Àâ8ÍÕ«yZ)ëÛ·'¡[·Îxå•!­ÓܹSŠY³b1~|lÜH…ŠB¡hCÅÊ!àñÄðòªÏ¨c±„pt´×²œRZÊA—.Úƒ XèÑÃprEFF™Å.Àª*rs«0bDØ×åâèÑëX°`ŒÍ''äåUáõ×wàÑG»ã‡fÚü~)JËC¿,@$’£¶V¥%L,–:¹´ÊʸZÉŸÏ2¯"„X%VÉÉypp°ÓÄ«~ú)þþˆŒ|Ì¢uZš²2.¦Mû ¡¡¾ˆÓ&Ü• ¥å¡be<žtÜ€¾¾ú]€€ÚÂéÒ¥Þ (•*Àdò ¦­—–r!HѯŸe““s1p`W¸ºv@E‡%ã½÷ÆØô—?—+ÂÌ™?ÃÍÍ{÷¾¥UfËDGGƒÁ`Ðÿèíî¿:àòåË­ý+¦—¶‘Ël#ÔÔ¨ÅJÛ h¸ X¥"(/¯Ñr²A!7à½{å`0[VW®äaüøþ€˜˜$x{»â7†[´FK"É0sæÏHˆÿ@§ÐÚ–),,ÄðáñtéÒÖÞ …Ò¤L:eee­½ ½P±²€š h¹Õ–•~±b±øP(”Z–•©´õÌÌrw‚««ùZY,rr*±fÍË`³…8pà*¢£Ÿƒ““mþïU*U˜?ÿŠŠªÿëžÞ¶z@pp0"##[{ÊCuZ'ƒÁÐjYÄf ÖX•–Ö€V̪ €…À@/ƒº÷ï3ѧ¥.@u¼êñÇ{`ÇŽópuu›o>aÑ-Éš5'péRx={ú·öv(J€Š•ÔÔˆáîÞA+[ÍXÇõ²2ìíí´šÑ°Ñ£‡á´õÌL&úöµ\¬y¤+d²ZìÙso¿=Êfã?11ç±oßeìÜ9ƒwkííP(”6+ ¨©Ñ.&„ü×q]‚Ei)þþpp¨ÌÆÒÖe²Z°¬«| †]».ÀÑѳg´èü–âôé;X¿þ|òÉ‹3¦oko‡B¡´!¨XY€º ¸Þ(H!—×é X£7mÝXåæV¢¶Ve‘°¦FŒû÷™4({ö\ÂìÙOÂÝÝÙìó[ŠÔÔbÌŸÿûߘ7otko‡B¡´1¨XY€º X»Æ 0Üj©¬Œ«• (ËQYÉ7ؽ"3“ ''„†šßféÆ0@~~d²Z¼ý¶íuV//¯ATÔ.<öX|þù+­½6Cnn.Œ¦íäalMBfΜ 777c›c/æì©¹¡Ï£í@ÅÊjjô‹UçΆ,8Z™€EEê´uC™€÷ï3î§å64ÅèÙÓûö]Áë¯×_ÒÚˆD2Ìž //Zôk!^^^X±bE‹]¯¼¼‡½{÷Œ^???>>†ã®íú öövFŪo_ËÆ‚\»–??°X¼ýöÓÛÜ(•*¼ûî>0™<ìÛ7×&Ý“¶Œ6nÜØbדHÔ¥ݺu3z}•J…êêêÛWkAŸ‡mAÅÊx<±VÌŠÅÀÛÛUo/;@ O¬3$0ÐÓ`ý“¥™€2Y-ÒÒJPXÈÆÄ‰èL#nm¶lùÿþ›…œis{kIT*¶mÛ†¾}ûÂÝÝ#FŒ@RR !ˆ‰‰A¿~ýàáá1cÆàäÉ“`0:î „„ 8ÎÎÎ Åô^¯î¼øøxôîÝ~~~X¸p!d2™Öq„,[¶ `³Ù>\]D µÎƒ‰k×®™\ vïÞ¾}ûÂ××7nÄУGxzzbõêÕôy˜ñ<Ú,„b6ǯ#?üðæõW_ýIžyf“Þc33ËI`àb’™Y®yoÉ’ÃdêÔíz¯©‘ÀÀÅäܹ{fï'99.&‹ÉùfŸ×œ9s—-!»w_lí­49‘‘‘$22ÒìãwìØAüüüÈï¿ÿNÊËËÉ©S§H×®] ²sçNÒ¥KrúôiÂb±ÈÙ³gIxx8@rrrHݯ¨P($:t 111„Éd’]»v" u®WwÞøñãIvv6INN&ááádíÚµšÏT*Y¶l‰ˆˆ l6[ë¼×1ös›6m"¯¾ú*)..&ééédÈ!dåÊ•šcŸ{î9’˜˜HÖ­[§ó,‚‚‚4ëZ‡B3f>ŸObcc 2uêTÂçóÉŽ;ͽÐçaøy‰‹‹³èœâ(+ èÓç#ràÀÍëèè£$2R¿øüóO \L©æ½É“¿'+Wþª÷ø:á)/çš½Ÿï¿?KzôXN^xa«Ùç´99•¤gÏäôöVšKŪÿþdïÞ½ZïíÛ·  ‡Òúì—_~Ñ+‡CÉ×_M¸\.Q©TD ¥R©s½ºóÒÓÓ5ïÅÅÅ‘ððpÍgÑÑÑÉÊÊÒ9OßkS_Î}úô!L&SóúìÙ³$""Bg/½zõ2ø,Œ­Cˆú‹4%%…Bˆ\.×û:''‡>Ïö,VÔ h&*@ ºÎf α*+«‡GG¸¹Õ·M*,di³Ä„§§ ½ô~®óçïC*­Å;ïŒ6ûœæF"‘cÞ¼½ óÆ ¯¶övl‚üü|DDDh½7pà@@^^  õY¿~ýtÖðööFRR’““ѵkWŒ5 /^„á_áž={j~îÓ§JKK5¯oܸѣGã‹/¾°êž¤°°š†¨ãÆCAAÖõ ¤¤Äà³0gwwu2“£££Þׯ Ï£mCÅÊL T*ò@_@¡±âjÅ«$9ªªF’+ÊѧO€ÞÏô¡RܺUˆÎ]1iÒ@Ó'´Ë—Ee%±±s ¶”zØèÒ¥ ÒÒÒ´ÞËÈÈ„„„h~®#33Sg ‰D•J…_ýo½õ^|ñEp8ƒ×ÍÉÉÑüœ  úä„„ÄÄÄàÈ‘#HJJ²ê¾âãボœB@—ËErr²æóº/ÏîÝ»|æ¬ÓèóhÛP±2}Ml««…SÅÕÝÖëŪ°°„„„èO4°4¹âÆ|ÈåJL›ö˜Í +<|8ññ©øé§7µîýa'** Ë—/G||<***púôi¬\¹°`ÁDGGãÌ™3¨®®Fbb"Ö®]«Èg0?~<Ž;>Ÿ¹\GGG¸¸¨ÿ=ÆÆÆ‚Çãi³hÑ"äææâÆøè£0sæLÍg®®®èÝ»7V®\‰wß}R©Ôâû …šŸ§L™‚U«V¡¨¨ééé˜8q"~üñGsÞ}÷]gñé§ŸZ¼Ž)èóh‡´š²qûv1 \LŠŠê–}ú|Dö↓÷øW^ù¬ZUŸ:}ú ZBÄb™Î±*•Šôî½’ìÛ§-}ÌšK—ObÁ]4éé%¤{÷edóæ¿Z{+ÍŽ¥1+¹\N>ÿüsÒ£GâææFFŒ¡‰K)•J²uëVF<==ÉĉI||<ñõõÕ‰…ÄÅÅ‘°°0âääDúôéCâãã5Ÿ¡A|¢î¼ØØXB|||È|@$‰Îš‰„ôêÕ‹¬Y³ÆìB¡ #GŽ$nnnšcù|>™3gñöö&;w&ï¼ó‰D:kÖÖÖ’Í›7“ððpâêêJFŒA’““5ÇZçÁ{4õš>Ý׿ŽYQ±2“ÿ½OOL!D¡P’  %äÔ©4½Ç¶Ž|ÿýYÍë;ΓˆˆOõ[ZÊ!‹ÉõëæeôÉ嵤Gh2|ø: ï¢yàñÄdĈõä7v¥RÕÚÛiv,+}Ô}i%$$Û·ok}öÛo¿i‚èY›¢†>ó±e±² ÿQ ¦F{{;Ma+—+!;ëÆ¬!`2k´’%ŠŠª Öef2Á`0л·ynÀ“'Ó “Éñü󃬸“¦':ú(¤R¾ýöuØÙÑ61–žžŽ™3g"%%b±ÉÉÉX½z5æÎÛÚ[£Pl 7õxgM,¡ºZíŸÖ³b³…P(”ZbU\l80;»žðð0¯ÃÃŽçA0n\Ko£É9xð*þúëŽ[`0Ù„b˜èèhˆÅbLž<, ¡¡¡ˆŠŠÂ¼yó¬^ÓÃãQç·7èóhP±2“›ØVW‹@¯eÅdª‡.6lb[TTˆýó›²²*Ìî´žž^‚ôôØÛÛaР`³÷ßdf–ã“O~ÇŠ“ðè£=Zu/-…R©Bm­TZ'<<„Àúõë±~ýú¦ØÀÏÏ111M¶^[‡>ö+3yp<‡#„½½–€ÕQ^^ƒ¡±¬T*‚âbBB [V#F„™µƒ¯ÂÛÛ¡¡~pvn½Z ©TùóàñÇ{àÝwŸiµ}´„ܸQ€ß~»‰„„489y¢wonko‹By¨ 1+3áó%Zãì««EðòrÑ£a2kàíí¢©3ª¨àA.¯Õ›¶®RdgW¢W/Ó5Vǧ cG'<úhwëo¦ ظñªªøþû7ÚmœŠÇ#6öÆŽý“'ÿ€«Wó0wîÓ ´öÖ(”‡jY™ Ÿ/Õ²¬Œ×Xñt’+赬JK9Häf‰Õ±c·@Ae%C‡v·ðšŽþ¹‡;/`çÎÙðlµ}47nààÁ«HH¸ ggGDF>†-[¦kÜ®×®íjåR(T¬Ì„Ï—h ‡#Ò¯Ô–UPPÃäŠj¸¸8Á×W÷øììJ0 ôìéor\ÁðáaHLÌÄcu·ü&šK€¥K#2òQ›êœÑXäòZ?ž‚Ÿþ™™åxôÑØ´)/½4˜vâ Plú[h&D«RuµÐ¨X5´”êÒÖõ¨Ë45ëéæÍdf–cذ ò‚¿Ë[4„,YrîîÛMß?K€ýû/cÿþ+àó%˜2åQlÛö†É¹b.\À¸qãZh— …Š•™ðx¸»k'X„†úê=¶¼¼£FõѼ.*b¬±Êή@ïÞ¦]€û÷_ÁÀÁ(+«iµxÕWqñb6âãÂÕµƒél˜ÂB6¶lùññ©ðõunjŴi›5 222²vH¡´<Ó§OǰaÃZ{z¡be&T«ªºZ¤7][]ÌC``½åS\\m0Æ”•e:°ºZˆ?þ¸õë_ÁÆbÑ¢–ÿ‹¾°uëþÀ»ï>c0¿-PYÉöm‰8xð ¼¼\±víËxýõ¹ú"##©`Q(- +3áñ´³9¡ÞqöÕÕ"Èåµ Ònb;eÊPc !ÈɩĬYO½ö¯¿Þ„³³†íGÔâÉ„,[‡îÝ}°lÙĽvS!ÊðÃÿ`çÎáéÙü"þ÷¿'h<ŠBi#ÐßT3Ëk!•*4bE‡#B§N† ‚ƒ‚Ô–•@ EuµP¯°´” ±XŽž= » !Ø¿ÿ2^}õ1dd”¡C<òHצ¸-³Ù³çnÞ,ÄÙ³Ëàèhߢ×n,J¥ ‡_ÃæÍA&«Å²eõT«Ö¨Q(Ë¡bez\@X R(J½–Uy¹Z¬ê2KJÔó†ô¥­geU€Á` W/Ù€ÉÉù(,dã7†ãÀ+xä‘àŒÂB66l8‰>kVÆ¢-qõj>þøòòª0kÖ“X²d<¼½õ—P(Û†Š•ðùêYVu1«º¾€ú²ËËkàííªù˽¨¨vv tëÖIçXs2NÆ!!è×/7oâ©§z<¶©!„ :ú(ÂÂ|[%Nf-l¶ëÖýß~»‰qãúc÷î(ƒ})JÛ€Š•ðùÚ–‡c¼/`ëÂB6<áä¤û¨srŒw®àó%8y2 Ÿþ „Bîßgbñâ–#G®áÚµ|üùç88Ø~³B¼Š/¾8'ÄÆÎÁsÏ=ÒÚÛ¢P(M+30dYéë`Ádò´Äª¤¤Úàtବ j𺠷Á`0ðò˃qûv1”JU‹¥­3™5øì³x¼óÎhôïߥE®Ù˜Ì,Yr—/ç *ê),_þÜÜÚvz=…B©Çöÿ\¶ø|  ÜÜêÅÊÍ­ƒ^kI=ǪaÚ:GorE]& ±xÕÑ£70a¸»;ãÖ­BtéâÝbÅÀ+VüŠ€/,_nÛÙ„ÄÆ^ÀÈ‘_¢¬Œ‹„„Eøì³ÉT¨(”v+3àó%psë{{õã2Öj©¼\wèbp°n¼ª´” ‘H†^½ôÉ˫˜:õ1À­[…-–²~âD ’’îã›o¦ëd[A$’aþüøôÓãxùåÁøë¯¥mºŒB¡Æv¿‰l>_ª•a¨ÕÒƒ‚ !(-åè«ìl㙀ǎÝBPž~º7 5µ|0¶)nÇ(|¾kמÀÌ™#0thH³_ÏZòóYxë­Ý`2yص+ŠÆ¦(”vµ¬Ì@ x°ãºHo¼ŠËC&«ÕÔXUU “ÕêuæäTÁßßCo& R©B\Üu¼òÊPØÙ1PXÈFuµ°EÄcÓ¦?Á`0ðÑG/4ûµ¬å?nc„oàáÑIIÑT¨(”‡*Vfð`_@.W¿XUTðj˪´T]c¥Ï²2– xåJ.˜Ì̘¡îÑuûv1í1`@óߺU„}û.ã³Ï^1«G^kðÝwgñÞ{û1eÊP=:_ËåJ¡PÚ/Ô hÁƒS‚E÷Ó9®® ¸nÆSI ŽŽöð÷÷Ð967·Ò`'Š£Go`ðànšF¹©©ÅèÛ7¨Y[)•*|ôÑo5ª7^z)¢Ù®c- …Ë—Çáøñ|ýõT̘1¼µ·D¡PZjY™Ú²ª·48‘ÞN••<¸¹uÐd¢sÐ¥‹·&1£!99• Ó<>_ŠS§Òù¸æ½””" ܼ‰^EVVÖ¯ŸÒ¬×±K€)S~À¹s™øý÷÷©PQ(!T¬ÌàÁ˜—+Ö+V|­É¹¥¥tíªë¬®¢¦FŒž=uÅêÔ©ÛP©&O @mQܽ[Ú¬Ynl¶7þ‰wÞ…=ô=i-²³+ðâ‹ß¡¦F‚„„E­:!™B¡´T¬Ì ¡e¥Tª Hàíí¢s\e%OK¬JJôgææVÂÃu3»…gŸí //õú™™åÉj›U¬6lH€‡‡3–,ßl×°†ÄÄL¼ð· òBBÂ"Ú2‰Byˆ¡beêYVjËŠÇ“@¥"Ü€|­¢Ý’ºvõÖ9.7·îîÎZ¨ Š““óù˜æ½ÔÔb¸»;7[Ù«Wópôè ¬^ý:vtj–kXÃñã)ˆŠÚ‘#{áСw4âM¡PN¨X™AÃYV\®º/ >±b2k4¤R”–r ZVúâU'N¤Âã#ž}¶Ÿæ½Û·‹1p`WØÙ1šä^R[«ÂÇÃ3ÏôÁ / jòõ­eÏžKxÿýƒ˜5ëIÄÆÎ±)¥P(­Í4!Baý”à:±êÔIŸ¯Éü«ªâC.¯5 V•z³ ÿø#'>¢5$5µãÇ÷o’{yÇ“‘—W…˜˜7›e}kذá$¶oOÄúõS0gÎÈÖÞ…B±¨ee‘H¥RÕÀ²е¬ %ª«…Zië€þ+}–UA ii%xùåÁš÷ø|)rs+›%^%ʰyó_˜={¤ÑÎï-!ë×'à§Ÿ±iS$* …¢µ¬L ¨;®×%Xp8"¸¸8éôÌc±P©Ô–UI NN:q)©T’ŽŽe•7<ùdý¼ªôôb¨T¤YÒÖ¿ýö T*‚?œÐäk[ŠJEðÑG¿áðákضm&&OÒÚ[¢P(6+ÔͲª+CiëL¦º{E]‚EI AA^:±¦‚T*¢“ ŸŠI“jÍJM-†¿¿g“wi(-åb×® øä“5ckQ[«ÂâÅ¿àÔ©4ÄÆÎÁ¸qÍãò¤P(mê4P(ÐP¬DÓÖ †–P›¥*88ØiºSêZ¢ÌÌr¼ôÒ`­cSS‹›ÅªÚ¸ñºtñÆ›o>Ùäk[‚R©Â²eGpòdbbfQ¡¢P(¡–• „BµeU7ËJ-Vú»WtêäªIŽ0\cU‰ààÎZI iðÄðáaZǦ¦!*ê©&»@]xüx vµ‡–Fí‚<‚„„4ìß?WÓ]¾-PXXˆ3gδö6(”&ÇÙÙÓ§O‡““íeàR±2@ ƒÁ€««º…’Ú ¨kYUTðµz–”p0bD˜ÎqyyU:ñªøø<ÿü -—aE••| ÜT·øüó?ðøã=0iÒÀ&]×T*‚¥KãÔ©tÄŽ‹GíÑj{±†U«VáÈ‘#­½ ¥YpssÔ)¶×vŠ• „B)\]4BÂåŠôè6ì^¡R”•鯱ÊɩԲ"23™Èͭ–-ÓµŽKK+ƒÁhR±:sæ.®]ËÇÉ“‹›lMK!„à“OŽ!>>û÷¿Ýæ„ ”J%"##qôèÑÖÞ …Ò¤0 ÔÖÖ¶ö6ôBcV&¤ `Ø ÈdÖ‹Ue% …RG¬T*‚¼<ÂÂêãUü‘ŠààN:=ïÒÒJÒžžMÓ¹A¡Pbݺ¼ôRD³7Å5ÆÚµñøå—kسç-<õT¯VÛ…Bi[P±2P(ÓtQG¿°²²¾‰mi)t𨖗×@"‘keÆÇ§â…ÁÐμs§6UuôèuWcÅŠIM¶¦¥|óÍiìÙsÛ·ÿ£G÷iµ}P(”¶+ˆD2­ñ †,«Š ž&fehŽU~¾ºm]&`f&……l<ÿ¼n«£ôôR Ø4Ãe²Z|óÍßxóÍ'[­ì¶mç°uëlÙ2£Uãe ¥mBcV&hè‹åËku,+±X>_¢eYyé̱ÊËcÁËË;»þü3 AA^:n¹Š X,A“‰Õ®] J[­«úÑ£7ðå—§°nÝ+xíµG[e ¥mC-+R­+@·ÕRee]A°Ú’*/ç¢KÝnëùùÚñªÓ§ïb„z\€¥`0' [ºÿLÄܹ£Ð©“®EØÜœ?Ë—ÇaéÒ Mž†ßÞÉÍÍÕù·a‹k¶Muôy´¨X™@(”ju¯ ó¥_QÁ¨;M”•é«‚–bjÿÅ IDATf¸aqq522Ê0aÂãÒÓKÜ©I’+~þù_Bðî»Ï4z-K¹y³QQ»ñæ›OÚD[§¶†——V¬XÑÚÛ0I~~>||謱:èóh¨X™@(”ij¬jjê,+m©¬äÁÁÁ>>j÷^YYA˪.ftæL<=]0bD¸ÎqM¯ª®"&& óæÖto)òòª0kÖ.ŒÓŸ}6¹E¯Ý^ðññÁÆ[{&Q©T¨®®nímØ ôy4T¬LÐÐ Èáˆaoowwí~zUUtî쮩Å*-U÷lˆB¡Di)G“\ñ÷ßw0fL½]$ÒÓK›ÄøÓOIpqqÂÛojôZ–PU%ÀoüŒ°0?lÛ6³Yfqµ%T*¶mÛ†¾}ûÂÝÝ#FŒ@RR !ˆ‰‰A¿~ýàáá1cÆàäÉ“`0:®„„ 8ÎÎÎ Åô^¯î¼øøxôîÝ~~~X¸p!d2™Öq„,[¶ `³ÙF÷ …Ë—/‡¿¿?üüü°|ùr( >Pß½ŸÁ``÷îÝèÛ·/|}}±qãF8p=zô€§§'V¯^­9öäÉ“ë@f̘Aø|>‰%ÈÔ©S ŸÏ';vì ›Í&|>Ÿ899‘¨¨(RZZJèó0þ<Œ€ÄÅÅY|^ p”Š• ú÷ÿ˜ìÝ{‰BÈÖ­“‘#¿Ð9fáÂCäÿû™BȽ{e$0p1ÉÊbjóÏ?$0p1áñ$$.î: YF„B©ÎZgϪkìýÇ#C†¬%R©¢QëXBm­’ÌžKúõû˜äæV¶Øu[KŪÿþdïÞ½ZïíÛ·  ‡Òúì—_~Ñ+‡CÉ×_M¸\.Q©TD ¥R©s½ºóÒÓÓ5ïÅÅÅ‘ððpÍgÑÑÑÉÊÊÒcl/„Ò§OÂdÖÿ»>{ö,‰ˆˆ0øåœ’’B!D.—ë}““Cd2ÉÌÌ$B¡(•Jòï¿ÿj>3vÏÆîƒ>ãÏö,VÔ h‚†nÀš1¼¼t“ªªøðõUgÖ?³*,d£sg7xx8ãï¿ïàÉ'Ã5±°†Ü¹SŠ®]½õÖr™Kqq5¸‚… Ç¢C‡–«NظñOœ?{÷¾¥3\òa&??Zï ¨®5ËËËÀÚI6ýúõÓYÃÛÛIIIHNNF×®]1jÔ(\¼xvv†…{ö¬ŸÖ§O”––j^߸q£GÆ_|¡yÏÔ^ ƒƒqãÆ¡  ÀàõÝÝÝŽŽŽz_€““²³³1qâD :{÷îµèžõÝ}æ=¶+#ÈåµP(”±âñ$ðòÒÿTU%€¯o}r…——‹Žåç³Ñ£‡/$9ΟÏ„ è½æ;WíØq¾¾î˜1cX£Ö±„Ç“±}{"¶m›‰Çk{ýþš“.]º --M뽌Œ @HHˆæç:233uÖH$P©Tøõ×_ÁápðÖ[oáÅ_‡Ã1xÝœœÍÏÙÙÙ Ò¼NHH@LL Ž9‚¤¤$³öâãボœB@—ËErr²©Û7ŠD"ÁÔ©S±|ùr¤¤¤`ûöíݳ¾û0}m*VFÔãAê³ÅzÓÉÙl|}Õ%ª±*(`!4Ô/fC*U`Âý³›ÒÓ×f©¢‚‡C‡’±pá8iÆÍEjj1>úè,£·ÇÃNTT–/_ŽøøxTTTàôéÓX¹r%`Á‚ˆŽŽÆ™3gP]]ÄÄD¬]»V§f†Á``üøñ8vìø|>är9áâ¢þ÷ §u΢E‹››‹7nà£>ÂÌ™35Ÿ¹ºº¢wïÞX¹r%Þ}÷]H¥R“{™2e V­Z…¢¢"¤§§câĉøñÇ5k …B‹ŸL&ƒ\.‡““$ Ö¬Y&ïÙÐ}Ðç¡û<ڭ놴m X$0p1IO/!„òÊ+?>:¦uŒB¡$]º,Ñ$KÌŸ¿ŸÌš«³ÖðáëÈÖ­“%K“I“¶è½‹%Лœa kמ kˆLÖ2±*&³†DD|JÞ|s'Q*U-rÍÖÆÒ˜•\.'Ÿþ9éÑ£qss##FŒÐÄ>”J%Ùºu+ #žžždâĉ$>>žøúúêÄ>âââHXXqrr"}úô!ñññšÏð_\ƒúMll, !>>>äƒ> ‰DgM‰DBzõêEÖ¬Yct/„ÂçóÉœ9sˆ··7éܹ3yçwˆH$" …‚Œ9’¸¹¹éÝ©×[¶l!:u"ÁÁÁdûöídÆŒÄÏÏÏè=»úŠVcÆŒ`2yX¿~ îÞ]‡îÝù­½= 塃ZVF‹åšÌºš1œœб£v¦]U•Ç«gR••Õ 0ÐSëóââj¨TÔ¤X½úêP‹÷¸}{"ÆЬ½ø8Þ{ïž}¶æÏo^WckR[«ÂéÓwpðàU\º” __Ìœ9S§>†ž=ý[{{ÊC +#ˆDõƒ÷T»ß˜ÌŒ¥@QP N[÷÷÷@ß¾úSÖkjÄ(*ª¶¸'àHK+Áš5/[tž¥,[•Š`óæií2NU]-Ä¡CÉØ·ï2Øluܾ}s1zt—.ØÛÛãÈ‘#íòYP(¶) ¶¹+áAËêÁ‚`™¬<žX+b2y:–UAŽŽFSÖïÞ-!ÄâLÀŸþƒwÃðáag ^Å™3wqôè|«‹•m•œœJlßžˆ'RàææŒ™3G`öì'áïïiô¼ 6`Ê”)-´K ¥å°··Ç¤I“Z{z¡be‘H¦ù‚æñt»W°ÙuÁËkÁሠýE—•ÅDm­Ò¨ 0=½~~î:磨¨§OßÁwß½nö9–’•UÕ«ÇÂ…ãðÄáÍv–&%¥۶Ù3wѳ§?6nŒÄäÉÇŠÐÐÐfÞ%…Bi+#¨³ë»W<謪ªkµäŽŠ ! Ô.¾}[’þÔS=akÆ‚ìÙsþþxñÅÓ[B¡ÄÂ…‡Ð¯_–.mõT7o`Ó¦?qùr.† Á®]Q?¾?uçQ(m*VF‹e Ü€úúª³Âüü<–V :nÀ’’jyé-RGzz)^~y°Ùûâó¥øå—d,Z4ŽŽöfŸg ß~{¹¹Uøûïáàж“F33˱qãŸ8{6Æ…âèÑù9Òð Åö be„†1+OŒ®]µÓÒ«ªððpF‡`2ypp°Óª“’J‹exæý]+µð²-J[?räfÎaá™Ç­[…øá‡ðÙg¯ <¼íNü-/¯Á—_žÂñã·Ð»w öïcÇêNá¥P(¶+#4¬³Rgêkµ¤®±b2yðõõÐÊ»v-„Ïý'lÜø'fÏ~ü±ýû›o¥R(”¶u@$RwÕvqqÒL ~0fUUŇ¯¯;T*‚ª*¾–uéRììF›¾æç³ —×¢Ób%‘Èwï¿ÿl“' ܾ]Œ;/à믧5{çö¦âï¿ïbéÒ#ðòrÁ‰ ŠæºÊà +H$jËÊÅÅ©eU/V"‘ b±¾¾î`³…P(”Z1« ²@Œ6˜½w¯ŽŽöf5IO…L¦À믷ö–ô¢P(ñá‡G0rdO«§·$2Y->ÿ<{÷^ÆÌ™#°fÍËš$ …Ò~¡be€:ËÊÕµÊËkõn@«®{…**ԟ׹U*‚+WrAA>¯qï^9ÂÂüàädúþ}—ñüóƒÐ©“«u7d€íÛQ\ÌÁ¾}o7éºÍAi)sçîAy9{÷¾…qãú·ö–(J AcV¨‹YÕYV C“¨]€€ºÕ“É0#£ vv tïnX¬23ÍK®HK+AZZ fÍjÚº§ìì lÝzË—?§Sðlküùg:ƌَ8~%* å!ƒŠ•D¢:±ê@ WW'­‚_K;;:wV‹•··«¦žçÒ¥¸¸8! ÀÃh¹™€ûö]Æ€]ðØc=yWÚ|òÉïèÓ'QQÍS³Õ(•*lØpo¿½³fÄ/¿Ìkrë’B¡Ø>Ô h±X''88ØÏ—jÅ«u•··+ìPQQ£•\‘œœ‡ÎÝÜÉàúŽ<“™€55bœ8‘‚µk'7î†àøñ\½š‡S§Ûlï?6[ˆ÷ÞÛ‡ÔÔblßþ?‹ú'R(”ö+4ì^!H´âU€v÷ &“‡  úxÕµkùðñqGHˆñx“–Õñã)°··ÃäÉMWûÄåŠðÉ'¿#*ê)‹ghµ,üï;!“ÕâØ±÷1hmî“B¡´ ¶ù'µ Õ1dY5ì^ ÎÌʪŸ/D"C·n†-«ÌÌrøø¸™,^=xð &O¢#–᫯þB‡X¾ü¹&[³)¹r%Ï?ÿ-:wvÃéÓK©PQ(*V†h8D ꈅv÷Šz7àõëùpsë6[ˆnÝ:\ÿÞ½rôécܪºs§™™LLŸÞt)å))E8pà >ýô%¸¹u0}B ³{÷EL›ö^z)ÇŽ½ÎÛ×tb …bT¬ Ðpð¢@ …››n÷ ?¿:˪Fã¼~=ýúuB¡4)V¦Š¹Žž=ý1th÷FÜI=J¥ }t O<Þ¤nŦ ¶V…èè£øôÓãX³æelÜi³±4 …ÒòÐo4´¬ø|ݘ‹%€;ø|)Äb¹Æ xýz&VeÈ X[«BVV…Ñä ™¬ÇßjÒBÝ®âþ}&6nŒl²5›©TyóöâèÑøî»×1wîÓ­½% …bcÐ h'XHááQ³"„ü×Ð L¦º 8 Àee\”•qáãゎàã£ß…•Ÿ_¹¼ÖhrÅéÓw ÉùX“Ü—+ÂæÍ!*j$BC}›dͦ€Ï—bÖ¬Èʪ@\Ü{6,´µ·D¡Pl*V‰äšÁ‹|¾D«‰-'\^û_÷ uApP'ïÃÑÑvvöîdpTf&ŽŽöèÕËp›¥#G®aôè>Z“‡Ã×_Ÿ†““–.Ø$ë5Lf ¦OX,GBÂ"£­©(Êà uÀX‚E]÷ __wTTðб£<=]pýz>ú÷ï&³!!ÆãUÆÚ,••qqñb6¦OÖ$÷’™ÉÄþýWðñÇ/ØLRE~> /¿ü=T*‚'> BE¡PŒB-+h§®K´R×Y,!u_ÀòríLÀ§žê…””b hxLý½{eèÛ7ÐàçGÞ@§N®;¶_SÜ Ö¬9ŽGéŠW_Ú$ë5–ŒŒ2¼þúøû{à—_Þ5è.mKcÁ‚J¥­½ Å,úöí‹ï¿ÿ¾µ·a6T¬ PgYÉåµÉjµ,+6[GG{xy¹ ¢B]\S#ÆýûXºtâãSñ ƒ ®}ïQQ#õ~¦RÄÅ]Ç”)Cáèhßèû8wî.]ÊÁï¿¿ocêÓÓK0cÆtïÞ‡ÍÓhÙVINNÆÉ“'i[É+Š>JJJðÃ?P±j¨cVõ³¬ZVl¶:¹ÂÎŽŠ uAðÍ›… „`àÀ`TU fr¹"0™5è×OÿÀ[· Q\\Ý$‰ …Ÿ}‰Áðáa^¯±Ü½[†éÓcЯ_ö훫Õ¸½pôèÑÖÞ…b’£GbÚ´i­½ ‹ 1+ÔÕYÕ‹U½eU]-B§Nj×Uy¹zBð­[…èÞÝR©„ƒ5V™™L@¿~úÝ€¿þzýú5ÉÄÛC‡’Q\ÌÁ§Ÿ¾ÔèµKjj1^{m}´;~ùe^»* …Ò|P±2@P¿X 5**x±zôÑî(.®ƒMlïÝ«k³ä©ó™\^‹„„4L™ÒøØŸ/Å7ߜƛo>atLIKpûv1fÌø ƒuÃÏ?Ï6k~…B¡4„Š•ê,+>_-V cVj±r…LV G??Oܾ]ŒÁƒCP\Ì··«–¸5ÄX›¥ÄÄL…Ò&I„øé§D(µX´h\£×j ii%˜>=ƒuþ}sŽL¡P(CP±ÒƒLV ¥RõŸe¥i߰݇£vVTð@Am­B¡ C†„ ¤¤Úd[C.Àß¿…aÃBõZ]–PYÉÇÎÿbÁ‚g[µ·^nnÞ|s'z÷ÀîÝQT¨(ŠÕP±ÒCÝHûŽÀçKѱ£“Vf^eUW\YɃ³³#úõ BQQµÁx•Ri¸ÍŸ/ÁÙÿ³wæaQWß˰ ²(¨hàRj‹¶èKË%LÙ¢™ZVZ.eš¥i™e©abi.¹’ˆšJлЀ ²)û¾³Ïùý10€3ÀÃê}=ÏÃÌgî¹ç~d>oî½çžqS¦´>gß÷ߟ‚µµ)æÍÛj[-%+«3fü‚>}l±w/Û£Ò))):êlÌf[ôמö[Ów{Wƒ‰•jJÚ+,Ôó `k«Lµd` ‡”” Ô††úÈÈ(ip¿êÁƒ"ˆDRÁÿ} Dh4ä]RR ðçŸÿbñâñ02꘽¡ììRL™ò3,°oß‚Ns¹;`mm%K–t´ͦ¼¼o¼ñœakk‹×_ÅÅÅ]v<ÍáQ».ab¥š™•©)·º–U­XÉå ”•UÁÎÎ ¹¹åpp°ÄÍ›:Ôª—5ϬîÞÍn0ÍÒ‘#7ðÜs`eÕºsG6œ‚««=fÎÔMö‹æRZZ‰Y³~…™™öîßàÞ£eØÛÛcݺuíF³™1c²²²‰èèhã½÷Þë²ãiòØu + ¨Ï¬jÏX•— ¡PììÌ«ÏXYâÞ½\ ê‚òò*ðù¢÷¬îÞÍ››ƒZ4\^^9®^Mnuà­[YŧŸúA_¿ýÿk1fÍúB¡û÷/€­­Y»ûÐUP(ؼy3  Œ5 ‘‘‘àp8 "càÀ°´´ÄsÏ=‡ãǃÃá¨-…‡‡cÈ!066†››vïÞ­±¿švaaaðôô„££#>úè#ˆÅâzŸ#"ÀÇÇEEEjvŽ?___˜šš‚ÇãÕ{Ø6ä‹T*Å™3g°zõjxzzÂÝÝ«W¯Æ©S§ÔÆÃápðÛo¿aÀ€pppÀºuë°{÷n¸ººÂÊÊ +V¬PùÙÐ=bcï¦CK—’ˆÇ[LÅÅúôÓý4cÆ/ªkIIyÄã-¦„„š7o'Mº™x¼Å”ž^Dññ™Äã-¦û÷ 4Ú}óÍíôþû¨½IžžËH$’¶Êïÿû¿`7î;R(­²Ó$½þú6òöþœ’“óÛ½ÿŽæÀÔœ¯Ó¶mÛÈÑÑ‘BCC)''‡Nœ8A½zõ"´}ûvêÙ³':uŠ )""‚<<<%''«údddDÁÁÁ”››K;vì jýÕ´?~<%%%QTTyxxЪU«T× ÕkGDÄçó‰ËåÒœ9s(++‹öìÙC¨   Q_d2%''“TZûû½nÝ:zì±ÇêÙ'"@3gÎ$>ŸO!!!€¦OŸN|>Ÿ¶mÛF¨¨¨¨Ñ{ÄÆÞ4Íý}íìRÞ¶gÎÜ&o1‰DRš?'Í›·SuíÚµâñSAŸ&Nü‘&Oþ™† YADDáá±Ô³çÇ$‘È4Ú>üKÚ¼ùµ÷_zéúðÃ=­òùòådâñÓ?ÿÜi•– P(hñâ}Ô¿ÿRŠÏl÷þ;Íýò4ˆvîÜYï½]»vòöö¦½{÷Ö»¶oß>5±*))!CCCÚ°a•––’B¡ ŠŠ ’ËåjýÕ´‹¯ç³‡‡‡êZPP ÄÄDµvDDb±˜H \.§ .¨|ÒÖ—òòrZ²d ¹¸¸PLLŒÆvLL I$¯“““½GlìMÓÅŠ-j ªJ=€Ï©…­ëéq`cc†üürTTáãÓ‘Q ''+9ýø|!rrÊàåU?l=-­11é­®Üûç1l˜ ž^7Éo›Ãºu'ñ×_1صk.n8/£–û÷ïÃÇǧÞ{C† ¤¦¦ÂÛÛ»ÞµÕÿ_mll‰¨¨(ôêÕ cÆŒÁ¥K— §×ð׺_¿~ªŸ½¼¼••¥z±cÇbíÚµÛr¹\$%%ÁÏÏÆ ÃÎ;›åËŸþ‰¢¨¨ÑÑÑðõõÕØ……²,Ž¡¡¡Æ×€ö÷ˆ½ûÀÄJ••9…vÈ IDATb˜˜Ô”ª¶´4¾>ÈË+‡¯¯R¬23KܯJLÌ©…­Ÿ<kkS<ýtÿû{íZ*®^MA`à„Ûh)¿ÿ~›7ŸÅ¦Mÿ×)òvzö쉸¸¸zïݹsàââ¢ú¹†„„5B¡ …‡BII ÞyçLš4 %%% ö›œœ¬ú9)) Îε¿áááÆþýû©±¿éÓ§#00111غu«Ö¾lܸ+W®Dxx8BBBààк ÚÞ£º<Êcï0±Ò€²JpMy‘Zª%[[3UÆ’’Êz3«†êXÝ»— KK8;[×{ÿøñ8Œ?¨UÖ×­;Q£ÜñÌ3ž-¶ÑNŸ¾/¾ø ~xåÍ)243gÎ",, yyy8uê–.] X¸p!‚‚‚pæÌãܹsXµj•Ú:‡ÃÁøñãqäÈðù|H$ÂÔTQ‚òòòzm-Z„””DGGcùòå˜5k–êš™™<==±téR,X°@­Ü‰X,†D"—Ë…P(ÄÊ•+úR^^Ž+V`õêÕ011Á½{÷TÿZJS÷èQ{·¥£";#?þx†F^CDD>>+iûö ªk+V„ÒË/o¢ÄÄ\âñ‘³óÇTVVIDDO=µ–6l8¥ÑægŸ¡‰¬÷^ZZñx‹)"¢åûLW®(÷ª.]JlúÃ:äúõ4rs ¢%K¶k¿•æîH$Z½z5¹ºº’¹¹95Jµï —Ëé‡~ www²²²"??? #µ}Ž»»;q¹\òòò¢°°0Õ5TïqÕî¿„„„‹‹ ÙÛÛÓ‡~HB¡PͦP(¤þýûÓÊ•+Õ®mܸ‘lmm©wïÞ´uëVš9s&9::6êËåË— €Æšömj|nìuc÷èQ»6tÅ=«.åm{±víqzá…ÈÝ=ˆöïÿWuíý÷ÿ Ù³w¨"‡_EDDr¹‚úö  ƒÿÓhÓß }úéþzïmÝz޼¼–7¡ þþ[hòäŸZܾ%ðiذU4uêÏ$·.‚±» ‹/ÍÃ+<<œbccë];|ø0ùøø´Úvw¡9÷èQ{CtE±bË€¨Ib+“) Jë³*.®„9 + §ÇÁ!½(K݋Ų'&æÁÓ³G½÷ŽŸq[¼øï¿÷qùr2>þx|‹Ú·¡P‚Y³~…¹¹1vîœË2¨·ñññ˜5kbbbPUU…¨¨(¬X±sçÎíh×: ò=zTÇΞ4¨¬T–D ¢z{V%%<öXoäçóÁápàí­Œ~«) ¢)À¢¤¤……õÄ*3³±±™­ÊŠþãgðøãníºWtééE8qâc–¢ BUU&OžŒÂÂB¸¹¹aΜ9˜?~‹mZZZ¶ª}g£9÷èQ{w‚‰•”\ðùÊŒëõ£•3«ÌÌbÈåooež¿ŒŒp¹3¦''ç@=±:q"F;Ö«E>FG?À… ‰Ø»·ý~A·m;£Gc°{÷»pwwl·~<<<@D€¯¿þ_ýµÎl;::"88Xgö:­ïÑ£<öî[Ô€P(‰IÃ…mmÍœ\€0dHí̪W/èé©Gä$&æÁÚÚ´ž<gŸÐâe´­[ÏaÈÞ;¶}fUgÏÞÅW_C@€_‹¶;#—SG»À`tkØÌJ"‘ŽŽ–uÄJ¹g%ˆ!‘È`ggެ¬R˜˜ªHyƪáýª~ýj“׿çó“†ùóßj‘÷îåâÌ™;øí·9í®š™Y‚E‹öá…áÃ_hóþº áúõˆˆ¸‹ˆˆ;(++oºƒÁh1L¬4 Iall¨«šeÀ’ÀÎÎ EEpr²TµIO/Ö˜M’’rë-ž>}FF†xî¹-òï—_"Ñ¿¿ÆÔ¢öÍA"‘aþü]°³3ÇæÍ³4Έׯ§áرXDDÜAFF1ìíÍñüóajZ†‡Îø2 ÂÄJb± ÆÆ†àó…àr TKuÅÅ•[[sTVŠáëë¢j“‘QŒ^Мò$11ÿûß`Õ눈Ûxê©~ª,Í!+«GÆàÛo§·Ë¬jÙ²#¸¿§N}úHÖ¥""ÄÄd <ü&ŽS¥Ìš:uÆ„Çë ==<ØÑ®2Ý&VPά”yNµ††zËðòRΖ$òòÊ5],. ¨H šY b\º”Œµk§µÈ· pt´lu9m8pà?ìßÿ/~ÿ}úöµoóþ:iiE8rä:¾Žôôbx{÷ÄoŒÆÄ‰5\ò믿¶£— F˸qãFG»Ðl˜Xi î2`Í~  A71á"..T3«œœ2(¤Q¬’’”‘€ýû+ÅêâÅDÈdrŒï­öÙ¦(-­Äž=×0¡Ué™´áöíl,]zóæi‘¯]‘Š Ž»‰C‡®#:ú\\ìàï?S§kR¬{öì }}ýn>Ìè>ôéÓ§£]hL¬4 I`llˆÜÜrµ™•¢£Ó@¶ž™©LX©I¬j#•û[wàëë{{ófûµk×`Ö¬QÍnÛø|æÍÛ Ÿ>øì³ImÚWGCD¸|9{ö\ÃéÓ·aiiŒ×^{ë×û«ânŒ'Ÿ|2™¬ =e0m˜Xi@$’ÁÈHóÌÊÖÖ÷îåzôPFfg—ÂÄ„«±2nRR®jV%—+pæÌ¼ÿþ³-ðIŠß~»„·ÞÝæ{GŸ~|¾‡½ƒîyº¡ªJ‚#G®cÏžk¸u+ :cÍš©˜2eLM›¿—È`0Ú&V¨YäóÕ˃ØÙ™!5µ††úª‡Zvv)œ­5<$%å«þB¿q# ¥¥•õ‚-´%4ôø|fÏ~º…£ÒŽ#G®ãÈ‘صk.zö´iÓ¾:‚¬¬RlÛvü ¹œ0mÚ0lØð«ÃÅ`tr˜X=„BAH”Ñ€••bØÙÕ.×ÕˆÕÕ«)°²ªqeg—5ø`OLÌË/*‹ê9sîîŽððh^ö…‚°uë9¼úêðzáòº&%¥K–‚cŒlìª$%å!8ø˜X=„X,B ×;è[R"€ƒƒ9Äb<Ö¯?‰C‡¢áâb‡Ÿž…W^ñe"Å`tq˜X=DíÌŠ‹ª*1ÌÌ”AR©|¾%%U00àÀÑÑ€r¶%Ëг§µš­¤¤Úœ€çÎ%`ÌÏfG×ýþû%¸ºÚcܸ¶I­Äç ±dÉ!Œ73g>Ñ&}´"‘ÁÁ‘زå,-M°aÃk˜6mx·fd05˜X=„PX»gUw°&/`^^9$9•ÙÙ¥ 1À¢¦à¢P(Á•+)øæ›W›åKii%ˆÆ²e/µYj¥%KÃáà§Ÿþ¯]Ò7é"ÂÑ£7±víq”•UaáÂç0þØ¥²b0&VQ3³ârõ«ëZÕˆ•2/`VV är”3«ììRp88;k«I“õk©‹exöÙæ%®ýóÏah¨‡3ÚfÆsìX,ދž}óëUCî*¤¤`Ù²CˆŠº3ž@`àÕŒ—Á`t/˜X=DM4 ‘2d¼ænM^@©TõfVööæ02ª+ +PZZ‰þýyøûïx èܬ©BAؽû*¦MÞ&‡€ *°|ùa̘ñÆŒi¿Jú@ cýú“صë2||\pæL àu´[ £ abõ53«šbz5Ë€ÅÅ•ÐÓã€ÃQ^««œÍg¬êFìÇ+¯ø6˳gï"#£ï¾;¦ÅciŒÀÀ°´4ÁW_MiûmÅ•+) <€Â ¬Xñ2æÌyúúl_ŠÁèî0±zˆ±R(”3¨º{V&&†°°0Fa¡òp0 œYi«¤¤<ØÙ™£¢Bˆôôâf×®úã+xòÉ~mwøðuœ={¡¡t™ÔBb± ß|s!!ñüóqøðB8;«µ0Œî «‡‰¤Ð××S…°×DWB__¶¶P(Hõ×|vv)FŒpU³“””‡þýpöl¬­M1lX_­}ÈÈ(Fdä=üòË›­ÐC °jÕQ¼ñÆèf‡Ñwÿþ{‹íCE…¿üò&&Mòéh— F;ÃÖOB,–ÁÈÈ`fV[%X.—ÃÔÔµ)”y޼páž|²_³–ªöƒ%&LÒÊѨ³lÙaXZšà‹/^Ö¹m]#—+°iS¦Oߊ>}ìpæÌ§L¨ŒG&V!JUaë@Ý™•B¡rÖU(!ËPX(ÐxÆêÞ½<¸»;áÚµTŒ«}ƒD"þ}Q˜1ãqŸ:y2'OÆcÆ×:}hwNN¦OߊM›"°jÕ+8p`A·L¬Ë`0´ƒ->DMÆõÊJ1ôô8ª=Ü\> ‚L¦PWäæ–ˆÔ¢(/¯‚\®@U•cÇziÝÿ©S·PVV¥óšUååUX¾ü0fÎ|£G{èÔ¶®9|ø:–/? WWüóO ÜÜ:Ú%ƒÑÁ0±zˆšÂ‹UU˜˜pUe ù€ÊJ‰J¬²²”E«ää|ÕuWW‡fÍvíº‚gŸõÒù,bõêpèëëã‹/^Ñ©]]"IñÅaÏžkxóÍÑXµj2Œ ;Ú-ƒÑ `bõÊ=+C"Õ ”•UÁÂÂ%%u—ÁÈÈ@­êoRRllÌpãFžy¦¿Ö}?xPˆ¨¨ûرc¶nSÍÅ‹‰Ø¿ÿ_ìÚ5·^}®ÎDFF1æÎý% ™­*«Â`0Û³RC$’ÂÄÄ••µÙ+eeY''KWªö¬²²”Á§)JM-@ß¾öˆÏÂSOõÓºï½{£ÀãYaüxoÝ ÊCÌŸŠÿýÏ»ÓÖ¨:~</¼ð¸\DF1¡b0j0±zˆº{V5™#¤R9¤R9œœ¬ªS-5~ 85µ@5+{úiífVR©‡EÃß„N3„ÿôÓ?((¨Àºuþ:³©+ ÂÆ§±`Á.¼ð <ø>xDÍ̪ªJ¢«»wsVV&06V¦\""ä䔩¥ü¹¿D„¼<¾ÖK€ùù|œ={W§ÙÕ‹ÅåËIøöÛé*wÞÍ›øßÿ¾‡\®ÀÙ³L¨ †Vtž§X'A)VÜêh@¥X¥¤¸\Õ¬ª¤¤B¡DmÏ*5µúúz022Àðá}µêóÈ‘ë055Âĉéd |¾_|Š™3GÂǧNlꂈˆ;˜>}+ú÷çáСî»?‡Ãþ±‘®\¹ÒÑ_‘Á–B,–UïYÕάÒÓ‹¡§ÇAyyìì”aê ]TWaÈ^Z""üù翘<ÙWggжl9 ±XŽ%K^Ô‰=]°{÷U,_~3f<µk§ÁÐP¿£]j3ÒÒÒ0räH|òÉ'í ƒQéÓ§#;;»£ÝhL¬B9³ªÙ³RFôåä”Ë5@qq¥êLUvv8ŽÚ2`rr$FŽtת¿¸¸L¤¦àÇÿO'þ§¦ 88_}5UíüWG PV®<Šß¿„U«&cîÜg:Ú¥v¡wïÞð÷ï|˜ FW…‰ÕCÔ¬9gUTT33#UÔ+ºhkk¦–c/!!"‘£Fi—ÒèàÁÿàåÅða.:ñÕª£è×Ï ¯¿>R'öZƒH$ÅÂ…»qî\¶m{ /½¤›eNƒñèÁö¬BÓ9«ÒÒ*X[›¢¸¸Rµ ˜“£^ÇJ¡ ¤¥ÁÀ@O+ñ‘Hd8zô&¦N¦ßÏž½‹sçîaíÚiTQU%ÁìÙ;pñb~ûí&T £U°™ÕC(C×kÏY•”TB"‘ÁÞÞ™™Åuö¬ÊÔÎXee•@*•ÃÛ»'¸Ü¦oí¹s ¨¨áÕW‡·Úo‰D†+þÂĉux*>_ˆY³¶ãþý>¼=Ö»Cýa0]&VQsÎJ(”ÂÔ”‹´4å+Ï ±±éuö¬J1thýÙSjj!`Ìí²¬>|#Gº¡G«Vû½cÇ%äçóqøpÇ&ªÍÍ-Ãk¯ý™L“'?Öé¹1ƒñè–B$’‚ÃÑÁÌÌiiEàpsˆÅ²zÑ€]¼~= 0fLÓõ«JK+q¯¾:¢Õ>—–Vâ§ŸþÁܹÏth©÷ììRøûopèÐûL¨Ú˜””p8ºKÍÕV6;¢myÔÆÛ•abU"‚X,‡Css#¡.ÉÈ(Æ«¯nAVØ·oA«Å÷QD¡P`óæÍ0`,,,0jÔ(DFF‚ÃဈŒÂÒÒÏ=÷Ž?‡£¶¼Ž!C†ÀØØnnnؽ{·ÆþjÚ………ÁÓÓŽŽŽøè£ ‹ë}Žˆ©Ú={}úôÁåË—!•J'''8::"00R©2™ +W®DŸ>}ààà€7ß|eeeý9~ü8|}}ajj WO€¯æñv[ˆ¡"/¯œx¼ÅôÛo‰Ç[Lùù|òöþœx¼Å´zuõë·„ˆˆBCoPïÞŸL&Wµ½¿x¼Å´aÃßMöóÓO4pàg$‘ÈZåïÅ‹‰Äã-¦sçZe§¥ddÓðá_Ò‹/n¤òra‡øÐñ÷÷'­?¿mÛ6rtt¤ÐÐPÊÉÉ¡'NP¯^½mß¾zöìI§N¢ÂÂBŠˆˆ @ÉÉÉTódddDÁÁÁ”››K;vì jýÕ´?~<%%%QTTyxxЪU«T× Õk7aÂ:wî Z¿~=M›6222(>>ž†JK—.¥ï¾ûŽ DñññtëÖ-zâ‰'(  ž"">ŸO\.—æÌ™CYYY´gÏ@މ·áñ6:pà@³Út2±ªCZZñx‹iûö Äã-¦Â âñ·˜>ÿüùmÙr–†]U¯í–-g‰Ç[L·og5ÙÏóÏK­û…‘ËôüóßÒŒ¿´ÊNKÉÈ(¦#¾¤ ˜P=LsÅjРA´sçÎzïíÚµ‹··7íÝ»·Þµ}ûö©‰UII Ò† ¨´´” UTT\.§‡©i¯zïÀäá᡺D(11±Ñv^^^”››«zA>>>äééI¡¡¡ª÷ïÞ½«z]×o±XL $H.—Ó… TcklLl¼ ·1º²X±eÀ:ˆDÊe@™L==ŠŠ*ê]« [ÏË+W?ÜüÚµTèéq0`€s£}$'çãîݼòŠO«| Ž{¹X¾|b«ì´„¼¼r¼öÚ/°··Àþý `iÉ–þZÃýû÷áãSÿ÷aÈeàMjj*¼½ëWŽ8P½â³ "##…^½za̘1¸té’j¯UýúÕf¼÷òòBVV–êutt4ÆŽ‹µkתµóòª=š‘––§J”:nÜ8<¸W‹í´„üürL›¶VV&ÕB¥]qIFÃôìÙqqqõÞ»sçÀÅÅEõs j6„B! :„’’¼óÎ;˜4iJJJì799YõsRRœkÿÐ Gpp0öïßÈÈÈzí kˆìí표œ\˜D(--ETTœ‘––¦ú\ll,Ö¬Y£ÑïéÓ§#00111غu«Vcbãmz¼Ý &VuHd”beff„¬¬R˜™ÁØØeeµ×ssËêä‹eÈÏ/Gß¾öMöqôh ^ziH«Ò!8ð22ŠÛ=«zii%þïÿ¶ÁÐPüñ.*1gÎ",, yyy8uê–.] X¸p!‚‚‚pæÌãܹsXµj•Ú¹‡ƒñãÇãÈ‘#àóùH$044„©©²`hHHÊËËëµY´hRRRåË—cÖ¬YªkfffðôôÄÒ¥K±`ÁˆD"¾O:Ë–-Czz:âããáçç‡-[¶à7ÞÀgŸ}†Û·oãöíÛøàƒžž®Ö^,C"‘€ËåB(båÊ•€ŠŠŠFÇÄÆ[¼» Ù¹¸r%™x¼Å´fM8½†¾úê ¶Š|}WÒ /|Gk×'"¢aÃVÑ–-gUí¢£ï·˜>ûìp£öïÞÍ!o1]»–ÒbÅb) þ%}úéþÛh UUbš8ñG=z åçóÛµï®Fs÷¬$ ­^½š\]]ÉÜÜœF¥Ú—’ËåôÃ?»»;YYY‘ŸŸ………‘ƒƒC½½"å>Œ»»;q¹\òòò¢°°0Õ5Tï‹Õî¡„„„‹‹ ÙÛÛÓ‡~HB¡PͦP(¤þýûÓÊ•+Õ®)fÏžM666dggGóæÍ£ÊÊJ‰D@ÎÎÎdeeE3gΤÒÒÒzý×°qãF²µµ¥Þ½{ÓÖ­[iæÌ™äèèØä˜Øxè¹  ïY1±ªCddñx‹é‹/þ¢qã¾£ùówÒ3Ϭ£çž[O>>+iÛ¶ó$“É©wïO(4ô†ªÝæÍgÉÙy19r½QûëÖ _ß•$—+Zìãï¿_&—ÊÊ*i±æ"KÉß þ%åæ–µ[¿]•投&jpááá[ïÚáÇÉÇǧնµñ6FW+¶ X©T@¹wennŒÌÌéÃÚÚ%%ØÙ™¡¨H™LQoðÒ¥DŽÚ?q"& ir_«!„B 6m:ƒ×_Ùn" ¢EûpëV6öì™§“<† í‰Ç¬Y³ƒªª*DEEaÅŠ˜;wnG»Æ`´+,‘mjö¬„B)Ì̸HM-gsscH¥òz‚ëFÆÇgÃáÀÍ­a±JLÌCJJ¾ývz‹ýÛ½ûø|>ú¨ýÒ*}þùœ:u þ¹žž=Ú­_†’   TUUaòäÉ(,,„››æÌ™ƒùóç·Ø¦¥¥e«Úw5µñvW˜XÕA"‘ÃÀ@UU¢¨H€=¬`d¤Lcdggެ,eôMÍ #;»T|QSÿJ§NÝ‚9FŒpm‘o?ý7ß ''ËÙh.[·žÃîÝ×°cÇl­+3tƒ‡‡‡*“Ê×_¯¿þZg¶¬3{Gm¼Ý¶ X‰DCCTU‰U¡©R©\®>eÛÜÜrØØ˜©òÿÅÆf€Ãá49ë8}ú6ÆÔâ(À;/C"‘áÃ_hQûæràÀX³æ8Ö®†ñã½›nÀ`0m«:H¥rêC(”B.WPV¼­9hgg޼¼òzû6qq™066l4'`nnââ21aÂàùUQ!Â/¿Dböì§akkÖ"wR¿% IDATÍáܹÄ¢EãðÆ£Û¼?ƒÁh ¶ X‰D##ƒêÒö°°0Fy¹`aa CC}äæ–ÁÙ¹V¬bc3ADîW>}ff\­ê\ibûö P( >×¢öÍáöíl¼÷Þxùe_úµyÝ>_ˆ‹“pþü=ÄÆ:Àǧ°£]b0ºL¬ê ‘Ô̬$066g””|ÈdrÕ༼r¸¸(ÿââÒ!IáææÐ ÝÓ§oaÌ/­JÝ?LYY~ýõ<Þ}wl›ÂÍÏçã­·Bàëë‚g°‚q —+—‰óçïáüùDܼ™==e-3{{ vï ]ÂĪR© \®²¤½‘‘ööæHJʃD"WåÌÉ)ÃO(ƒ ÒÒŠPQ¡,3ÐX•—WáêÕ|ÿýŒù´cÇE¼ûî3-j¯-UUÌšõ+¬­M2††úmÚ_W$?¿çÏ'"2ò.]JBii%z÷¶Åر^xÿýgñä“ý`aaŒéÓ§ãâÅ‹7®ãŠa2Ý &VuH”bUZZ .W½{ÛPžoª;³ª [Í„¾¾ôô8èÕËV£ÍsçîÆÔl1¶o¿ˆyóÆ´é¬J¡ |ôÑ^äå•ãäÉj|ÔHI)@XX ÂÃã””KKŒã‰U«^Á˜1^pt´Pkãïïßž2M3cÆ <ñÄíF‹`bU‡Ú ôôôTQY)A¯^6à󅨪’¨’ØÆÅe¨BÖ 4Ǫœ>} #Gº·Hl~ÿýàÝwÇ´pDÚ±qãiDDÜÁ¡Cï«úQ&+«ÇÇáøñXܼ™++øù ÆÊ•¯`ôh5þµñ÷÷g‚Å`è&VuPάô!)£ML”áé|~•ªœ=P{Æ*66ffÜ—ÅbΞMÀòå/5Û‘HŠíÛ/àÍ7G·iõÝ¿þŠÁ?œÁ÷ß¿†Çwk³~:;Ï œœ,1q¢¾øâe îÚâ¬# C70±ªƒ2ÀÂ2™2™ÆÆ†04ÔGii¥*lœ­ “)pëVìíÍáêªY¬®\IFU•& i¶/û÷ÿ@ܦ³ª›73ðÉ'âí·ŸÄŒ]si 5””T"4ôŽÁÍ›°°0†ŸŸ7>ÿ|ÆŒñdûv F'‚‰U¤Ry½C»ú°´4AIIeõà2˜˜paeeŠ{÷r!JPZZÙ X>}C†ôjv>=™LààH¼öÚãppPßѹ¹e˜3gFŒp×_ª‰ë®Èd DF&àÀÿq††úxñÅ!X´hÆŒñlQÄ&ƒÁh{Ø7³‰ úuþ˜ÖÓãÀÜÜÅÅØÛ›#::M%, „Áè0±ªƒD"S•‰622„D"ƒ‰Im^Àº‘€qqpuµÃ½{ygV7of °°~~ÍËZ¡P6mŠÀË/û¢O»VŽH3+Vü…û÷ qìØG°¶î¾ÅÛärÎKÀ®]Wpþü=ØÙ™ãµ×Çk¯=w÷Æ3ä3ŒÎ«:H$r•X98X€Ïª"¿ìì”×k"cc3áà`‰Šàìl­fëôé[psshv¦ò³gï"%¥ÁÁoµr4š9x0ûöE!8ø- àÜtƒ.Ÿ/ž=W±sçede•bÄWlÞ< /½ôÛ‡b0º(L¬ê ‘ÈTY•beh¨‡Säæ–ÃÓ“‰D†;w²ñì³^èÛ×^c¤ØÙ³w1n\óÏVmÚ^ˆx­ÏÃܺ•…%Kâý÷ŸÃË/ûèÜ~G“—WŽ‹Ø½û*d2¦M†Ù³Ÿê¶¢Ì`llÌ ËPRR Ïqq™°°0F~~ÆŽUON{áB"ÌÌŒðÄÍ;·´yóYŒ鎡C]t2žˆ~¸"‘?ÿüz‹Ë”t6RS ðÃgvnnøæ›W1mÚð&í2Œ®ûV×A"‘«*x<+\º”[[SØØ˜!?¿D„=¬ðÏ?wáíÝññYps{JÍÎùó÷0j”{³öGnÝʹs سgžÎÆSÃöíqþü=„†~Ðf¡ðíÉ­[Yذáþùç.|}û`ß¾ùxúéþíƒÁhCºÇŸØ:B*•PVgut´Ÿ/„\Nªý*@y øîÝl¸ºÚ£²R¬¶ (“)pñbÆŽõjVß;v\„—Ï>Û¼vMñß÷ñõ×ǰlÙD ÖW§¶Û›¼¼r|òÉ~¼øâÈÍ-CHÈl„‡/bBÅ`<°™U$¤ReÑE''åž•““ ¶¶Ê°u=ØØ˜áÞ½\ÕÒÍ;ž¸¸ ðùÂf‰U^^9þú+ß}÷šNËr ðÞ{»áç7óç·m~Á¶„ÏaË–³ ¹Ï Û·¿ÿýÏ›•0a0!˜XÕA"‘C,–¬¬L!‘È É`ccм¼rØÛ[ 3³b± úúz033‚££e=çÏ߃‹‹]£õ­fïÞk°¶6Åäɾ: á“OöƒËÕÇwßMï’v‘HŠ-[Î"8ø<ÌͰnrOŠåéc0=˜XÕA*­+cce …P(™ªœ}BB.ôô8 %èÛ×^MΟ¿‡gžÑ¾"°X,î]WðÆ£ušêgÇŽK¸p!áá‹`eÕµþÂÃc±nÝIdg—âwžÆ¢EãºÜ8 †î`bU±X±Xªˆ9@3$'çÃÑщ‰¹pq±GFF‰Ú쩬¬ ±±™xÿýçµî󨱛(/âÍ7ŸÔÙ8nÞÌÀW_ÃÊ•¯`ðà^:³ÛÄÆf`éÒøs'3g>O>ù_³s+2Œî«:H¥2ˆDR裢B@YÑÖÖ|¸»;"!!ðšZ –JéÒ¥$èéqðÔSý´î3$ä"&N| NN–MX *+ÅX¸p7ÆŽõÂìÙꑊ¡P‚M›"ðË/‘puuÀÁƒïcÔ(÷Žv‹Á`tX4`¤R9$)¸\ðùBÊürÊÐu>-‘ /¯HK+R‹<>>>}´®?uýúܺ•…wÞÑ]ÉúÕ«¡ªJŒï¿ŸÑeö©ŠÆèÑk°sçe¬Y3 çÎ1¡b0õ`3«:Ô,‚ÏB__O%V|ØÚš"=½ŽŽV‹eõ"‰çÏßìY£´î/$ä†uÑÙ!àððXìÙs {ö̃½½¹Nl¶%99eX±"ÿ} /¾8«WOјg‘Á`0˜XÕA*•C&“ÃÌÌååB˜˜p!ˆ`llˆŠ ¤R R_ÔY%%å#7·LëõÜÜ2œ<‡Ÿ~z]'¾çç—cÙ²ÃxóÍÑ:?«¥käre½®ï¿? ;„†~€‘#ÙLŠÁ`4 «j¤R9ˆR© &&Ê$¶¦¦†DÉä>_)`••bXY™Âήvörþü=ØØ˜aÈíþøã*,ñÒKµÚw…‚°hÑŸpr²ÄªU“[m¯-ÉÌ,Á§ŸÀµk)˜?,üTâÏ`0 ÁĪ©T)H2ÁÜœ >_.×@µ$|ôëç„ôô"¸ºÖ? |þü=<ýt­òî‰DRìÞ}sç>£“’¿þz×®¥àĉ;m^¼º³)Gœ9ó)ˆÎ`0´¦s>Ù:‰DÉä077FE…††ú°¶6E~>zz¤§cÀ<(Bß¾öõÚþ÷ß|ýµvYÖAe¥o¼1ºÕ~'&æaýúøä“ÿÁÛ»g«íµ))øøã?Ÿ‰   ˜7o,«+Å`0š«j$åÌJ¡PÀÒÒ¸º<ˆ^à 3$&æâ¹ç`ïÞkxùåÚlׯ§A(”`ÌíöŠvíº‚I“|ê-#¶™LÅ‹÷aðàÞøàíÏvµ'{÷^êUapr²Ä‘# 1|¸kG»ÔjÒÒÒpæÌ™ŽvƒÁÐ9ÆÆÆ˜1c¸\nG»¢«j”Il"ÀÒRy®ŠÃAõ« ØÚš#))^^=‘Q—Ú’ó×®¥ wo[­"Ùbc3—‰µk_mµÏ›6AJJΞ ìte?ø|àøñ8¼óÎÓX¾|b·Ù›Z¶löïßßÑn0m‚¹¹9¦NÚÑn¨ÁĪšše@°¶6Arr> RͬLM•iØØX@"‘Õ[¼v-£G{hÕÏÞ½Qðöî _ß>­ò7..›6EàË/'£O»¦´#.$â£öB__¾'ŸÔîÞtär9üýýqðàÁŽv…ÁÐ)2™¬évëÏñ¤fllÌÀç !“)`kk¦Ú³²³3‡@  ¶pqQŠ•X,ÃiZ…^WTˆpôh fÎÙ*_Åb-Ú‡ÇwÃ[ouž,R©+Vü…ÿû¿mðõuÁ?ÿv;¡b0›YUSžvvÊÐu‡3DG§AO/¯HO/‚©)Êý¦›7Ó!˴ʸpìØM(„iÓ†·Ê×M›"“SŠÝ»ßí4È32Šñþû»‘‹œ ÿíƒÁèF0±ª¦&tllLÁç‹`dd Z433Âã»!-­..vªTFW¯¦ W/­–âöîÂĉÁÒR»tLšˆÍÀæÍÿ`õê©èÝÛ¶ÅvtÉåËIxÿýÝ077Fhèxì±ÞíƒÁèf°eÀjär…êg=…TVŠaiiŒ’’J п¿òŒUÍ DE¥jµxûv6bc3ðúë-_¬Yþ{òÉ~xë­Ö‡½·"¦M˜9sFöÀ™3L¨ F›ÀĪ™¬V¬ ei{©T===ªªÄpww@ZZ1úöU΢$®_OÓj pß¾kðôìÇwk±7žFnn¾ý¶ã‹)TàÕW·`Ó¦lÜ8ÁÁoÁÜܨC}ên¤¤¤èüÿ¹-lvº»]&VÕÔ«ºûW EíûnnŽHK«YÅÆf@$’bԨƃªª$ ½ÑªÀŠ»ws‰%K^ìðå¿èèðóû99e8vlÛŸj#¬­­±dÉ’Žv£Iîß¿{{û¦?øˆÀîGÛÀĪšºU72°æü•™™LL”©—jÂÖ¯^M³³u½0vM„‡ÇB,–Áß¿e !(è † éÙ³Ÿn‘ ]±k×øûo…‡‡ÂÃwÚ¬Ý{{{¬[·®£Ýh…BâââŽv£ÓÀîGÛÀĪšúbU{ΠªJYߪo_{¤§+k_»–Š'žhzYoïÞ(L˜066f-ò-$ä"nßÎÆ?Îì°è?¡P‚ þÀ矇"0Ð,èeH: …›7oÆ€`aaQ£F!22D„àà` 8–––xî¹çpüøqp8µ¥ððp 2ÆÆÆpssÃîÝ»5öWÓ.,, žžžpttÄG}±X\ïsD„€€øøø ¨¨¨É>¤R)áääGGGB*•bäHåŠA=TŸåp8øí·ß0`À888`ݺuؽ{7\]]aee…+V¨>{üøqøúúÂÔÔ<¯ž@k3fMã`÷£áûÑe!>}‹x¼ÅÄã-¦;/“³óÇÔ«×'ôÝw'©_¿%4þN:z4†úôù”¤R9I$2rs ¢Ý»¯6j7!!‡x¼Åtùrr‹üJO/"7· Z¿þd‹Úë‚ü|>Mš´‰úõ[Bÿßa~tüýýÉßß_ëÏoÛ¶)44”rrrèĉÔ«W/@Û·o§ž={Ò©S§¨°°"""ÈÃÃPrr2Õ|EQpp0åææÒŽ;ÈÀÀ€Z5íÆOIIIE´jÕ*Õ5…BAäããCEEEZõ±~ýzš6meddP||< :”–.]ZÏÏÐÌ™3‰ÏçSHH éÓ§ŸÏ§mÛ¶***">ŸO\.—æÌ™CYYY´gÏ@úÓØ8Øýhü~4:pà@³Ûµ™XUsâDœJ¬¶m;O}ûÒ AŸQ`àrwWŠÅ?ž¡‘#¿""¢èèûÄã-¦ÔÔ‚Fí~ùåQ9ò+’Ë-òëõ×·ÑSO­%±XÚ¢ö­åÚµòöþœÆŒYGvˆæŠÕ AƒhçÎõÞÛµk oooÚ»wo½kûöíS«’’244¤ 6Pii)) ª¨¨ ¹\®Ö_M»øøÚ?,8@ªkAAA€UŸiª///ÊÍÍU}>""‚||||8ÇÄÄ‘D"Ñø:99™Äb1%$$@ ¹\N.\P]kÌŸÆÆÁîGã÷£1:³X±eÀjê. …Rp¹ú°±1C^^9D")ÜÜêW\½š ''+¸¹94dR©‡]ÇŒO´hùîĉ8DFÞÃúõþàrÛÿHÜÿaÆŒ`ŒáŠãÇ7¹7ÇÐÌýû÷áããSï½!C†RSSáíí]ïÚÀÕlØØØ 22QQQèÕ«ÆŒƒK—.AO¯á¯p¿~ýT?{yy!++Kõ:::cÇŽÅÚµkµî#-- <ãÆÃƒìßÂÂ`hh¨ñ5p¹\$%%ÁÏÏÆ ÃÎ;›5fMã`÷C»ûÑÕ`bUHT»O%K`` «¬¬R(77¤§×†­GGßÇã7žAüüù{(-­Ä«¯6?°‚Ïâ³ÏŽ`êÔaZçÔ2™AAñÉ'ûè‡;f³°ôVгgOÄÅÅÕ{ïÎ;ÕÏ5$$$¨Ù …P(8tèJJJðÎ;ï`Ò¤I())i°ßäädÕÏIIIpv®­Žàà`ìß¿‘‘‘Zõaooäädˆ¥¥¥ˆŠŠjæÝP×ôéÓˆ˜˜lݺµYcÖ4v?´»] &VÕTTˆzz…Rèéq`c£¬e úŒ•rf¥P¢£Óš«Ã‡¯cäHwôìiÓlÖ¯? ™L/¿lßÊ¿"‘ï½÷ŠÆ?ÎÄÂ…ÏwûómÍœ9sˆ°°0äååáÔ©SXºt)`áÂ… ™3gP\\ŒsçÎaÕªUj÷œÃá`üøñ8räø|>$ ajj  Ayyy½6‹-BJJ ¢££±|ùrÌš5KuÍÌÌ žžžXºt),X‘HÔdS§NŲeËžžŽøøxøùùaË–-*› Ù÷F,C"‘€ËåB(båÊ•€ŠŠŠ&ýihì~¨ßnAÇ.Cv~þ9‚x¼Åäâò)}úé~òöþœ>ø`õìù1õë·”„B 9;L'OÆSrr>ñx‹)&&½A{ee•Ô·oýùgT³}¹~ýõìù1íÝ{­5Cj6……4qâ4hÐg}¿]ûîJ4wÏJ"‘ÐêÕ«ÉÕÕ•ÌÍÍiÔ¨Qª})¹\N?üð¹»»“••ùùùQXX988¨í}8p€ÜÝ݉Ëå’——………©®¡z_ƒ¨v&$$„\\\ÈÞÞž>üðC …j6…B!õïߟV®\Ùd|>ŸfÏžM666dggGóæÍ£ÊÊJ’J¥ôÔSO‘¹¹¹Fšz½qãF²µµ¥Þ½{ÓÖ­[iæÌ™äèèØ¨?MƒÝúãÐtâ=+&VÕ|óÍ âñ«"ÿüŒ·˜ž}ö[JLÌ%o1ݽ›Mû÷ÿK®®$‘È´÷ÇWÈÍ-ˆø|a³üË4aÂFš8ñ‡e´„[·²ÈÇg%=ÿü·”›[ÖnývEš+Vš¨y¸„‡‡Slll½k‡&ŸVÛf(a÷C{:³X±eÀj„Bå™ ccCb(åíqsSž±âp8èÓÇ7n¤aðà^–f?tè:üü¼aaѼ¤µ»w_Å;ÙØ°aF»©:{ö.¦Lù ý=zXµK¿ >>³fÍBLL ªªª…+V`îܹíƒÑ©`Y׫©¬”PŠUE…H•¹ à!-­ööæ033Âé3¦ƒ¶RS pýú|üñøfùPRR‰uëNâ­·ž„§g¦è€?þ¸ŠÏ??‚É“‡âûïg4*À Ý„ªª*Lž<………pssÜ9s0þüÛ´´´lUûî»Ý&VÕˆDRp8€‘‘!ÄbÄb)`àÀž¸|9..ö¨¨!11·Q!úë¯89Yâ™g4M¬_ÆÆ œÐª±hËæÍgñÍ7'°`ÁX|öÙ¤NSëQÀÃÃDÊ„É_ý5¾þúkÙvttDpp°ÎìuuØýè°eÀj„B ŒŒ Àç‹ —+PV¦¬ ¬ [/Bß¾vˆ‹Ë„BA1¢¯F;D„ƒÿÔ)C¡¯¯ýí½y3{÷^ÃÒ¥/5{é°¹(„/¾ø ëÖÀW_MÁŠ/3¡b06³ªF(”ÃQ.ff–JK+pз¯=ÒÒŠàëë‚7Òàìl ''Íû:ÿþ{YY¥xõUí3‘)ÅcÄWLŸÞ¶ÌkBÓ/\HÄo¿ÍÁøñÞM7b0Œ†‰U5‰ŽrfUU¥<›PZZ##}è!3³}ûÚáØ±X Ö·A;‡_ÇÀÎ8йÁÏ<ÌÁƒÑˆÍÀßÒ¦gšø|!Þ~{îÞÍÆ¾}óµ*É`0¶ XP(‡Ãärå^Ÿ/„…… òóùJåèÝÛׯ§aèP6¤R9NžŒÇ”)Cµî—ÏbÍšpÌš5ªMËmäæ–á•W~BZZÂÂ1¡b0] 6³ªF,VFÿééÕFÃUVŠáìl­* ¢¯¯ÒÒJ ÞW£óç\ˆ)S†iÝïO?ý©T€¿–;ß™™%˜1#2™‡/l4Ÿ!ƒÁ`tF˜XU#+÷¬ ”Ëp\®>„B)zô°BFF1LL¸xð \®î¥ÑFXØM êggk­úLO/FHÈE|ñÅ˰³k›ÚP©©xíµ_`aaŒÐÐ… îµ1´G__û÷ï×jÉV_ß\®3¸\gØ£¸ø`;xÈ`´ƒÎ) Ó«@"‘©²'€¥¥ ŠŠèÕË™™%èÕË7of`ðàž3 ‹DRœ9s»Yaç«W‡ÁÍÍo½õ¤ÎÆQ—˜˜t¼þú¯è×Ï {ö¼ KK“6éçQcÍš5˜:uªÚûr9!'§Tàþ}>î߯@y¹\®>\\Ìáæf‰^˜.—ectNôõõñâ‹/v´abUD"‡)ÅÊÔÔ€nnŽHHÈAŸ>¶ˆÍ€¯¯æýªÈÈ{¨ª’àå—}µêïòå$üý÷-ìÙ3¯Y!îÚrùr2fÏÞ¡C]ðûïïÀÔ”«ó>UÜÜÜàææ†ÊJ1®_OÃõëðï¿póf:*+Åpt´Àˆn˜<ÙÇ»bðà^ªl( £e0±ªF"Qæp”Á5//'œ>}ðpéR2Þ~û)íÃÂnbÄW89Y6Ù—BAøòËc3ÆÏ=7@G#¨åüù{xçß1fŒ'‚ƒßìZXÝ‘²²*\º”¤ú—ž^ CC}øøôÁã»áÝwŸÁcõ££EG»Ê`t;ØS¬©T€"Ô; ;hP/ddÃ×·$™Æýªª* ""îàóÏ'jÕב#×qï^.ΜùTWî«8w.sçþާŸî_~aBÕD")nÜHÇիɸr%7o¦C&SÀÓ³^xaFöÀ¨Qî°¶6mÚƒÁhìIVL¦‡£,¢f` _-^€•• ø‹e01á¢_?'µ¶ÿüs‰ /½ä£víaªª$øæ›˜>ýq  ýY,mˆˆ¸ƒwßÝ ?¿Áøùç×Yž¿f"•ÊqãF®\IÁµk)¸q# b± ýú9áÉ'=ðÎ;Ocôh6 †a0 ÃĪ©T}}=Èå p8H¥rê#;» ¡¤¤ ò4î/…‡ÇbäH7­–¶m;@„¥Ku»‰z‹íÃoŒÂš5ÓXÁD- "ܺ•…K—’pñbþûï>¤R9¼½{áé§ûcÑ¢qðõuaU’ŒN+(Zr9A_Ë”K@ffFÈÈPž±ÊÈ(‚Ooµ¶"üóÏ|ùå”&ûÉÏçcëÖsÿÏÞy‡EytmüÞHGšAé"jÄ®ˆJÔÄD£Ø5vM,ÑHP“—hÔ?kP4±°"¶Ø bÁ®X©¢¢TéÒ¶œïeWV–¦‘ù]—»Ï<3çÌ#ì½3sæ ¾ù¦ kn]ãàÁ˜µ$_ IDAT3ç|ýuW,]:˜ UäçãÒ¥„…E!,ì1žÆ©S÷pæÌCdgç£uksŒ×}ú8ÁÉÉ”:Œ +¼+"BAÁ›‚-, "‚]³2ÑuááÑ(,¢ÿŠÙˆŒ|Ž;غõëÙöÓ§ïÄØ±Ò5ªÆJJJ6BBî"$änÝz .—ww{,Y2½{;²ÑƒñÁÄ ÒTK2 …ò×-[bïÞ+ÐÕm‚ÎmÊÔ;uê>Ú¶µ¨4ßÞŠ'Ю%>û¬òu­Ê8þ&LØŽQ£:aÙ²Æ'T©©¹8~ü.Nž¼‡ˆˆXp¹\tïÞ +WzáÓOYX9ƒñ‘ÂÄ oÖ¬Ù‰ÁRttš 3ó5 …pvV\¯‰$ø÷ßûøæ›^¶}ñb ÂÂãС™ïígDD¦LÙ¡C;`ùòÆžž›[ˆ'"qøð-\ºƒ&MððpÀ† càááPë'+3Œú‡‰ÞL¾ýZÆ^PP\&¸âÆ'ÈÌ|Ï>s)·]"ÂòåÇàînÿÞçGݽû_½ }û:á÷ß½>z¡ÊË+ÂÉ“‘8pà._Ž…ššýû·Æ¾}ÓÐ¥‹M­äSd0.L¬ð¶X KÚJ÷äp¹€ƒƒbpÅ¿ÿÞG«Vư²*ÿl¨S§î#2ò9Μñ~/ÿ¢¢’1zôtêÔ6Œþh?¨…B1Nº‡n <<b±îîöؼy,úöu‚šš ¾]d0õ+(NŠDbp8\„ŒŒ×ÐÐÀØX§LÖòÊN–Hk֜€.ï•V)..^^›àà`‚-[¾þ(S(%$¤#(è:¯!)) ŽŽ¦ðöî‡AƒÚ± º +Š#+i"[@MM€ÄÄLü2bóèÑK<žþýËŸ|ÏŸ¿ÂÞ½SßÉŸÌÌ×5Ê{÷N…¶vÃŽvËÎÎÇ7°oßUš‘Á`Ô,L¬‰Ë\Ó××@AA1TTø ¢sþü#hh¨ sgå¡è\Ç‹™øþûO«í‡H$Áôé»ðäIŽ™ss½j·Qß¼~]„þ¹Š]».!66ÎÎfX±b(¾ø¢-TUÙ¯ƒÁx7اd#+€7C+ éÔ›¥¥¾B¨øÙ³ѵk+¥'ð …büñÇ¿6Ì­ÚB#‘fÏÞ‹«WãqäȬw^ëª/=JÂ߇ãÈ‘[‹ C†´ÇÆcàâRöXƒÁ¨.L¬ ™Ò³R¥×¯JØ‹páB~ùeÒv¼””̜ٻÚ>,_~ 'NDbß¾ieæ~¨H$„óçaÇŽ‹ { SS]ÌœÙ#Gv¬Ñóº ƒ‰¤™*J¯WŠ‹Eàr¹ ëUq((¢OG¥m¬_C‡v€¥¥~µìoÝúüüB±iÓXtéR6á‡F^^‚‚®aûöp<}šìØ1,¢Á`Ô L¬ù‘ À›©Àìì|H$…QÎÙ³áèhª4‚íðá[HLÌÀwßõ©–ínà—_‚ñÓOŸãË/Û¾kê„Ç“°yóy=zêê*˜4©;ÆŒéccíúví£ãÙ³g˜1c ëÛÆ‚ƒƒÖ¯__ßnÔL¬H$Ò€\.¡ä%’“³@aƒê™30hPÙ¬ aƳøâ‹¶°°¨ú¨êÂ…(Ì›€I“ºãÛo=Þ£µ‡X,Á‰‘ضí®_#,[önWc‡H2ÊcÇŽÁËË«¾]a|<þ6l`bÕØ‘¬¤i–¤j•šš ž<ÝO||ž>}¥t ðôéûˆ‹KŶmªlóþý˜2e>ýÔ‹+_«OŠ‹E8pà¶o¿€G’àêj?ÿ‡\>Ê”O*AAAõíã ((ǯo7ê&VŠÀáHE‹Ë23óad¤#ßtöìC4mªWW‹2õׯ?‹>}œÐª•q•ì=ž±c·ÂÑÑ6Œù Öy²³ó±sçelß~¯Ñ¯_k¬Xá…¬êÛ5ƒÑˆabÙÈŠäá몪ª(((R˜Ò {Œ=ìÊd<Æ;ÏpüøÜ*ÙJOÏÃðá¢iS ìÜ9åƒÙ{“‚ Î"8ø644T1iRwŒÛFF,ªÁ`Ô?Æ'e=#=·Š"éGCCEòœ€……B\¹‹•+‡•©»aÃYtébƒ¶mËŽ¸Þ¦¨H„©Sw /¯ûöMû Ò(]¿þ7žÃ¹sajª _ß/0rdG¶Å`0>(˜X%{ªH¾·J]]@.\]¥{¬®^Gq±={Ú*Ô»qã .^ŒÁ?ÿL¯’yóùÎ|§TL5É… Qؼ9.DÁÞÞkÖŒÀàÁí”nvf0Œú†}2¡tèºnÉLŸ““4«ú… Q°µ5.²¾iÓy´iÓ={ÚUjcÕªS8zô6víš‚6mê'«ƒH$ÁáÃ7±yóyÄÆ¦bÀ92 nnÖõâ£þ‰E«V­ä_Ô>Ô6k‹†äkc‡‰Þl –e±ÀXYIG?ÿýUF?NÂéÓ°uëו¶àÀ ¬[wK– ‚»»}û_b±GÞÁúõg“‚~ýZcýúÑhÝZù'ŒÆƒ®®.æÏŸ_ßn0•ÂÄ oFV²/W……"¨©©@MM€””ŸòòòÊØ“Õóôô¤èèhŠˆˆ Z¼x±¼L"‘··7¹ººRzzz¥6È‚$ “©©) …B"’~£9r$åääжmÛ 6ŒrrrhË–-@n§¡úZÕý}ø jt½ŽN&3³¹rqªÎO¯^+iûö deõmÙFDD3gî¦9söQa¡PnC(ÓÈ‘~ÔºõÿèÙ³WµÞ§‚‚bò÷ÿÚ´ñ%kkúå—#”ššSëvµGu?œœœœhÇŽ ×vîÜIÈÙÙ™öîÝ«P¶oß¾2b•‘‘A€V¯^M™™™$‘H(77—Äbq{²z‘‘‘ >ÛØØÈË|||EEEÉï©ÈÆëׯICCƒ®]»FDD#FŒ … Êë [·nQqq±Ò÷111 Ú×ò`bEAnÐÄD\î»uûñã$øú†D"A||"#qäÈ-]ÀàåË,À/¿ãÊ•Xüõ×ÄZvËÍ•N÷µoÿ V¯>‰±c»àæÍEøùç/ÙŒøøx¸ºº*\sq‘®§ÆÅÅÁÙÙY¡ÌѱlÚ0===„††"""æææèÙ³'ÂÃÃ+ü{iÕª•üµ½½=åï¯_¿www,_¾¼J6ÔÕÕñå—_âÀxýú5BBB0a‚b 3--éïµ@ Pú¾"’¯Œ²4º MMU èŠÃ‡o¾S}"Bq±{÷^Æž=—!ÝŸÄĤ¢Gß0dÈ'سç þüs>ù¤vRåæbëÖ0üý÷EˆDbL™Ò'v‡žžF­Øc|ø˜™™áîÝ»hÓ¦üÚƒ–––xðà\¼àÑ£GeÚ(((€D"ÁþýûQ\\ŒþùDjj*š6Uþ¥+&&­[·DGGÃÔÔT^‚ÄÄD´iÓ_ý5zõêU©‘#Gâ»ï¾ƒ««+Ú·o¯ 0ïKCò•Q–F7²/¯OÞ» ±˜ ‘¼ÉÒ.‰QP ÄîÝWàêjÏ?oSqo±zõI„„ܩ𞂂blÚt;/ÃÖ­ÿa„n¸rå˜7¯ªFÎĉñÃ? 88ÉÉÉ8uê,X˜1c|||púôi¼zõ çÏŸÇâÅ‹+iP€§§'<ˆœœC @]]°mÛ6dgg+Ôùî»ï‹ëׯãÇĘ1cäe°³³Ã‚ 0}útVjÃÓÓ™™™X´h&NœøÎÏ£!ùʨR¬ºw·…¦fͧ¢’¨ÂÈÈç7Î99U;‹hÕª“øãÓðñ B^^Q™r™H¹¹-ÅœÆÈ‘˜H1ðööÆÌ™31wî\´jÕ K–,Áï¿ÿøöÛo1oÞ<|ûí·hÙ²%V­Z…ßÿŠYTÔÔÔ°sçNÌŸ?ffføã?55iZ°)S¦ --M¡ÎèѣѧO 0ýúõÃÂ… Ëø&Í+VTjCEE^^^HJJÂСCßùy4$_UƒCÔ8·n/ZtþþÿÕZû|>ÖÖFصkr…g\mÛv‹Àãq1gN_Ì›×€4'áöíàç†üübLœØÓ§»ËÃê/²#!ÞçÏS–!$$Í›7W˜"0µX™™éÁή¢¢’•–s8p8ÒoÀ¶¶Í0sfoŒå§pÇ…¹yS¬];;–ÜÆýû/0zô–’,ïåC‰$8rä¾ý¶œœÌÞ­sŒZ#7·P.6OŸ¾BJJ6RRd¯s’’ƒìì|ùý¦¦º°°Ð‡±±6Üܬai)}ml¬ KK}èè¨+Ø BPPN]wÁø`iÔb&tÇ‚ûË\çñxPSã#?¿ææz ü¿ÿ~B¡|>0~Lê€W®çÏ30jԉʜŸ¥ GÒ¾c[¯Krs ñäIš\tJ‹Ñ³g¯œœ¢"‘ü~uu˜›7•‹Ž››Œu`i©##m4k¦]Fˆ Fõiôb5hP;,\x ÌHG"‘ÀÒR¾„¶vìÛ7ÚÚMpôèm…bp¹88˜à?FT:úIKËÅ!›••±X¢ô€‰„äå|>¯J¢Æ¨:99…HH`BÄ`4D”ŠUaa!222êÚ—z£ukSDF¾P¸6dHܺ•uulÚä GF ++Mšð1cFxyµÇÁË—/Ëm;/¯&ìEbbø|.TU(.–öȬ¬ôÑ¢ES´hÑ––MaaÑÍšié¸íwËåÂÈȨZù“’² ¥Õ¤V6R×Õ" U˜™é}ðB´uëÖúvñp󿻥‡û˜P*VñññHMM­k_êaÃlðäI Eps3@èßß ††\˜šjA"É@tt²²²àáa‰¯¾²CÓ¦M[iÛÑÑHOÏEóæÚhÞ\ ¦¦Z05Õ„‰‰ôGEåí©ÃbäæWù:ZMÀãñ`hhXé}'aݺ3 ¹ƒo¾ñÀO?}^iÚ '§ éU"MMU˜š~øBTfffàñx,äš!Ç¢¾]¨W”†®Ë`:99Õ¹CŒÚ%,, ŽŽŽ022*÷ž»wŸcÍšS8wîx<ÄbÂ矷Á–-_׸?ÙÙù Õ"iBÃ"ƒQmwè:ã D„³gâÿþï nß~  "‚H$ý.óìYõ§…e¢SU!ÒÒRƒ••aƒ1ŒÚ‰U#G"!|6œE\\ZI®Ã7#©·yõ*ãÆù#99ÉÉÙHOÏ“— <iÃÔT&&ºh×Îffz01ÑA³fº07×…x¼F›Š’Á`¼'L¬ áäɇð÷¿Œ'OÒÀáp@T~6Òõø|.ºw·…‰‰.LMuѬ™ÌÌtah¨ .·ò ƒñ®ÔúWÝØØØ2‡¼}6–.] ‡ƒ+V¼w[•QY›±±•GÖ§NÅcáÂ`ÄǧÕÚË5kV_øú~É“{`À´kg cc&T £Ö©×y™øøø2ÀÕD„€€XXX 00°Öíéêêbþüùê¯Ï2úôi ¼ðÝw}áæféàZE…_É4ç­ õ ƒQwÔë4 D"Á«W¯êÜî½{÷ðèÑ#œ>}}ûöEtt4lmmkÍž|W_}–¡¢ÂC÷î62Dº.Š™ˆ7ž ""×®Å#33\.EEBÇÄŠÁ`Ô52²’MsÃÎÎFFF˜={6ŠŠh'"x{{ÃÕÕéééèÔ© Y³fò{²²²0~üxÀÜÜÞÞÞ(,,¬´¬4!!!pqqšš¬­­±{÷n…ò€€ôìÙ}úô½½}¹£+"‚ŸŸ¡­­ ;vL>¥Wž?²çqîÜ9XXX`ÇŽò:Êú §OŸ† ôôôðÛo¿É¯s8üõ×_ppp€¡¡!V¬XÝ»wÃÊÊ :::ðõõ­ü?¨Ú··Ä´iîøûïIxðàW\¼ø#Ö¬ÁƒÛÉO9‹%HKË}/[ ƒñÎîß¿O÷ïßWV¤”˜˜@žžžMdccC‹/–—I$òöö&WWWJOOW¨WšÑ£GSïÞ½)..Ž"##ÉÙÙ™/^\aYévòòòHUU•üüü())‰¶oßN|>ŸòòòˆˆH"‘••mÙ²…ˆˆ~úé'rrr*Ó""233£S§NQZZ9s†llläå•ùÓ¿:þ<ݹsG^GYŸÐçŸN999tðàA FhäÈ‘”““CÛ¶m#4lØ0ÊÉÉ¡-[¶(Ü[BCC)%%¥Ê÷¥§çÒÙ³(11£Zõ £†ªQ±ŠŒŒ”_ $y™ ¨¨¨2õdÇS°}èÐ!²±±©°¬t;$hõêÕ”™™I‰„rssI,QDDñù|ùüÍ›7 Ý»w¯ŒOÎÎδwï^…¾îÛ·TÉÙó(ÝfybFDDb±˜PLLŒ¼ìÖ­[òç£ì½ìÞªð.bÅ`0õLPX´jÕJþÚÞÞ‰‰‰ò÷ׯ_‡»»;–/_^ný””ˆÅb´lÙR~ÍÆÆ‰‰‰–•FOO¡¡¡ˆˆˆ€¹¹9zöì‰ððpyâÖ€€ˆD"€Ãá }ûö t*0..ÎÎÎ ×+õµô3¨*¦¦¦ 4Á¬––@ (}Ï`0;5*V111ò×ÑÑÑò`@ºŽäç燀€„††*­oll ‡øøxùµ¸¸8˜™™UXVš‚‚H$ìß¿˜4iˆŒŒ ˆÅbâ?þ@nn®üçûï¿G```™cB,--åye#GnÇãB(|#Z¦¦z uŒu`l¬—æJÛ­HТ¢’ÍÁ`T &V 9ŽŽ¦Ø¸q ¦L鉵kOãÌóQŸ IDAT™x Å07oZíöª"hùùÅxñ"ÉÉÙHJÊFbb’“³‘œœ›7pìØ]deåËïWQáÃÄDÍšéÀܼ)š5Ó‰‰ÌÍõЬ™š5Ó…‘ ±g0>6”ЇÃAjj*ÂÂÂêØúáéÓüøc¸\lm›bÀk¤¦æC$’`àÀV ÷>„““!œ «ÔvttÖ¬¹ ]]54o®SS-˜šjÂÄDú£¢R÷£„Êò¶iÓ;vLÂãÇIX·î BBîÀ¢úbUÔÕUЪ•1Zµ2®ð¾ìì|<}ú aaWáë»h€ÇÓ—«>_<ž.ˆ„HNÞT+¾2ŒÚÇÊÊJ!çª ¥¡ë*wÝ´iû‘ Ïãqж­nÞ|†_ˆÏ>{“y½ÿMxù2}û:ÀǧO¥ßâóòŠ0nÜNÄÅ¥ƒÃx<Äb1ˆ¤¢¡§§K˦°³3‚••>Z´Ð‡¥¥>š5Óªµä¶úúúJ³»—GRR´´š@SSµVü©AAA>|8‚‚‚® …df!?_Œ-X0ƒÑ¹rå Ö®]«,Ò~¥bÕ˜ "XXx—‰„ÓÕUGVV>.šöí-kÖü‹5kþŸÏŸÏÃüù0iRðùåø§¥åâ³ÏþÉÉÙJƒé”™DBr?TTøèÑûvM©¡ž~ÈĪ‘ÿÚ2%ü}ï¯Ñ¬ë ‘ðð¥!ÛÙÙàp¤™FÚ‚„„tÀðánàp‘H‚ÂB!~ý5]º,ChèãrmjáàÁÐÓÓ(78@(+ø!I³J0 £†iˆ¬YsJéuiº!@"!aôè­ÈÉ)„¹¹:th.W:E'I””Ñ£·`ìX¼x‘©´½æÍ›"8x´´TÁãU>½ÇápàëûÅ»wŒÁ`0>"µX‰Åܼ™Pé}"‘ÏŸg`êÔ¿!K0bDG”¥ÊFD.D¡[·åX³æ”BØ·Œ- °ÿL¨©©ÊÅN|>#F¸ÁÚºjA ƒñ±Ó¨ÅêÌ™UN5$‰qñb ~ûí8>û¬Òé<¡PŒ¢"Ö®=Þ½WáÚµ²-&˜€W`q0bDÇêt…Á`0>jµX­[w¶Z÷K$„Í›Ï#$ä<=Áç+_’Hññ©Ÿ MMU|õÕFÌ›ˆçÏ3ªå#£fˆ­ñhÌÚh³.lÔ…ßuMCý¿¨oê³OV¬D" "#ŸW»‡ÃÁ‚ûѦ9D¢òséI$"ö칂+WâÊ”wïn ?¿qeFWjj\¾ü6nƒk×âѹó2L›¶qq©Õö•ñîèêêbþüùuf/>>uf¯±Súÿ—=ûªSŸÏ­ÑŠUHÈíw –^lÜxzzêåÞÇçs¡¢ÂƒŸß8ôéã¨ôž\°xñ Ⱦ¨ðx\LŸÞ ººê8Ðÿý·þ9¾DÏž+0mÚNÄǧUÛgFõ100ÀŠ+êÌžD"Á«W¯êÌ^c§ôÿ/{öU§>Ÿ[£«M›ÎWñβ‚&KŸ_ "R^.ðд©&Ž›ƒ/¾h[aë“'÷ÀܹŸ´´T1uª»¼ŒËå(ˆÖƒ/УÇo˜6m'ž|(_‘ŸDÒÝ[·nÉïUö>&&¦Bß*²QQÿ+ûе··§¤¤$ùû3gΫ«+{n5ôÜÊ£"±j”Ó€ýþÎu–/‚Ç—cÆÑ7®+8éÐ|î\O¬[7 ¿ü2ú>üO¤§×|ŽE€/¯øï¿X½z8nÜH@Ïž+0{ö^<}ÊæÞKWWW…k...€¸¸88;;+”9:–]_ÔÓÓChh("""`nnŽž={"<<¼ÂüŠ­Z½I€looÄÄDùûëׯÃÝÝË—//·~JJ Äb1Z¶l)¿fccƒÄÄÄ ËêÚï§OŸ*ÔqppÀàÁƒ+íƒ --inM@ ô}e¾Udã]ú/#!!&&&àp8àp8èÛ·/ž>AUn;""Ž,-½iéÒ£µáºRdkZ=züFffsiÜ8ºuëiÙ¯Mª+VÅÅÅ´dɲ²²"MMMêܹ³|]J,ÓÚµk©eË–¤££Cýúõ£àà`244,óAH-[¶$²··§àà`yYé Y½mÛ¶‘¥¥%ЬY³Êü¡IÅÄÖÖ–-ZDB¡ºuëFšššòòŒŒ ;v,éë듉‰ Í;W.4å•յ߅……äííM¦¦¦¤££C#GޤÌÌÌ*õ¡ººÊ|«ÌFyý/Ý'eÏ>''‡&L˜@zzz¤¯¯OS§N¥×¯_³çöÏ­*0±ª„üü"…‘•••7™˜Ì¡´´\êÜy­\yB~ï–-adc3Ÿrs «Ü~pðm25Kýu¡6Ü/±XB§Oß§þ “9ôÅëèôéû•Wü€©®X)CöBwîÜQ(;pà@µ„Ëk»¡ñ!ûÍ|{7>dßʃXTÂÛéCŠ‹¥IhÒЩSKDD¼É@áåõ D"1‚ƒoU¹ý/¾pÅüùðóÏGðï¿÷kÆé*Àårз¯BBæà¯¿&B$ã믷aøð?qñbLå |äDFFb̘1¸uëòóó___Lž<¹¾]c0oÁÄ (“òH"!¨¨ð‘ð :µÄ­[OQT$èéià³ÏÚ`÷î+Õ²1{vŒÛß~»·o?«1ß«—ËA¿~­qüø\φššÃ‡ÿ ß±gÏyß>>>øòË/1hÐ èëëcÒ¤I˜8q"¦M›öÎmjkk¿WýúâCö›ùön|Ⱦ½ þ¤`@š-ÝÒÒ[áZóæú6ìxyu@§NËpèÐLtê$ ó¼x1Æý‰3g¼áäTõ¡PŒQ£üðäI:Ž›ƒfÍtj´ÕáÎgØ´é}œðë¯!hÓægøúFRRVå 0 FÂÄ o €|ã›@ÀÃÓ§Ò£ì;uj‰«WãKÝÏÁ¤I=pðà df¾®–-mí&Ø¿ÿ[‹0b„òòŠ*¯T‹˜›ëaéÒÁ¸vígL›æŽC‡n¢S§e˜={/¢¢’ëÕ7ƒÁÁÄ ŠkV²× !!Aš ÂÍÍ ·n%(œþëåÕ׫mO__{÷NCrr6&NÜŽââú_3jÚTóæõÕ+ÿƒO\¸…>}VaÊ”¸~½fv 3 Æ»ÂÄ e£y<ŠŠŠñêUrr ѽ»-òòŠpëÖSù=ššª2¤=víºTåÓ†Kci©}û¦ãÞ½˜>}ÄâòÏÆªK´µÕ0cFo\»ö3V®ôB||*¾ür= X‹ààÛ ‚Í`0u¿¾øár¹ÈÏ—¦µú4­[›ÃÂB/F£cGkù}&tÇΗñßQèÕ˾ÚvLð×_1j”~úé V¬ðª±>¼/**|ŒÕ £FuBdäslÛv³gï…¯ï! Þ“'w‡±qýˆôíÛ·Þl3ŒÚ!%%¥Ü2 X‚™Ù÷ "p¹ÒÜ~ªªää`óæ±8ÐÞÞˆ‰IApðl…zC‡n‚††*vî|÷½9§OßÇäÉã»ïúbÞ¼~ïÛ•Z#55»w_Âß_Dnn!¾ü²-¾ùÆ&uæÃÓ§O±`ÁˆÅl„Ç`|Œ4oÞkÖ¬yûò~6²’Càp ?P17·&&:HHYtïn‹  kÈÍ-„––š¼ÖøñÝ0}úN<{ö úïdÙÓÓ¿ý6?üuLžÜ£FzTÓiaÞ¼~˜6­‚‚®aûöpôí» 7®+<<ÊìY«i,--ñÏ?ÿÔª ƒñáÁÖ¬ÞB:Îä@$Ãܼ©<È¢k×V‹I!*>ýԚػ÷ý2 Ý>>ý±xñ=zû½Úªm45U1qbw„‡/ÄŽ“!‘Æß†N–býú³HKcß FÍÂÄJ² QYÀDÓ¦êòðuMØÛ›àâÅh…ZcÇvÅž=WÞû(9s<1yrÌšµaaß«­º€Ëå OGìÙ37o.Æ×_wÅ®]—жí" þ'BBî|0# £aÃĪ„ÒB¡4”\MM Ÿ€=lývULšÔEEB\{o?|}¿@Ÿ>Ž˜>}'îßñÞíÕÆÆÚ˜1£7®^õÅßOLŸ¾ :,Áš5§jåJƒÑx`b%çZÉö=‰‘””ÂBid`·n­ðøqr™ƒ uuÕ1tè'ضíÂ;…±—†ÇãbóæqpqiŽ#þÄãÇIïÕ^]ÃãqÑ·¯¿ÁÉ“sáînÍ›Cáæ¶³gïÅå˱,UƒÁ¨6L¬JàrGW›["³gÒu«NZ‚Ïçâòå²˧NuÇÓ§é8{öA™²ê¢ªÊÇž=SáêjAƒ64¨Vi\\šã?FàÖ­Eøé§ÏñàÁK º ]».Çúõg‘’’]ß.2Œ«R¼ý…?==OŸJÅJCCmÚX(=^ÃÚÚغõ¿ñEE…ÿñpv6ÃÈ‘~ˆŽn¸©ttÔ1iRœ;÷.\XˆÏ>kƒmÛþCûö¿àË/××ÈzƒÁø¸abU‚,äZ6ºâñ¸HMÍ&žùîî+±iÓ¹2A- £qÁĪY2[.— 55hk«®SÉ6KË9èÙÓ¡¡Ê÷A}õÕ'ÐÑi‚¿ÿ¾X£þik7Á¾}Ó ¡¡ŠáÃÿDJJN¶ÿ¡àâÒK—ÆÍ›‹qäÈ,¸¹Yaݺ3h×n‘|}+7·°¾Ýd0u «Þ¬Yq ªÊ‡šš*x<.3 ½ÙÜÚ«—=®_‚œœ²šªª|L›æŽíÛ/ '§ F}Ô××Äþý3Àçs1tè¦:SÇ…››5~ÿ}nÞ\Œ5kF I,\xíÛ/Æôé;|› ƒÑH`bU‚,°‚ËTTxàñ¤˜Å ÅxñâÍÔ›»»=Äb .]*cÇv‡ÃÁ®]—kÜOML‡X,ÁÈ‘~Èʪ¿Ó†ë --5 €é¸ys1.üù˜5kZ·öÅØ±[±o_^½bŒ&V%È+$é(K"!ˆDbddHO.dÑ´©\\š#4Tùº•––ÆŽíÿÿäŠk]ìÛ7 ¯^½Æ×_oÃë×õ{Úp]bd¤… º!(èDEýÿñÐÓÓÀ’%ÁhÝÚîî+±fÍ©êÏ`0ÊÂĪ™XIÀáp!J ‘žÚ ‹ªÐ¤‰  pÁúõ£¹ÓÑ®%víº OÏÕhÛv¾ûn޹%-3Œ†«ø|™XÄb òòŠäï 4"ÀÕÕzz8¾üìè3fôFbb&Nœ¸[k~7oÞÌ€P(†—×&$'³F=zØá·ß†â֭ŸråðöîÂB!æÏßgçÿ¡sçeðñ ™3PT$ªo— F%°“‚KèÐa ^¼È—Ë…žž:òó‹!‘HP\,Fÿþ­ñäIÎóQ¨3uêää" `z¹íNºññi8sÆ[_¤¦æbĈ?ñúu‚‚¾…¥å»ù±“Ÿ_ŒK—b…°°ÇòiÞ=láînww{˜šêÖ·› C‘ýldU‚ldED(*¡  ††ZÐÑiHHxUfÝÃÓÓW®Ä";»üˆ¼iÓzáá×åFÖFFZ úZZj:t“ÂFfÆÔÕ¥ë\¿þú.]ú‘‘K±jÕ0èêªã÷ßOà“O~«ëϘ6m'öì¹ÂÒ?1ldUB÷î¿Ésïñù\ˆD´icŒŒ<´li„°°Ç¸}{1Œuäu²²òáââ‹õëGcРvå¶=dÈFðx\}[ëýÈÎÎÇèÑ[‘˜˜€€o`ooRë6?„B1nÞLÀ¥K±¸r%7o& ¨H„V­ŒÑµ« :w¶A—.6Ð×׬oWŒÆÆ~&V%¸»¯@ttŠÂµ=l‘˜˜ uuÜ¿ÿ‡ÏBÇŽÖ ÷ º ZðóWnÛW®ÄaÈ8p`ºt±©ÿK““Sˆ1c¶"!! ßÀÑÑ´Öm~Œ qóæS\¾ƒK—bqûöSˆDØÙ5C×®­Ð¥‹ :wn ]]õúv•ÁøØab%£oßÕxð@1[ú§Ÿ¶FTT22òP\,Æo¿ Åðán ÷øûÿ‡Õ«Oáþýexå¶_—£+@º63~üvDF>Ǿ}ÓЮeØý˜‰$xøðÂãqáB4®_‚ÂB!Œµáæf¬àæfggsyFƒQ#°5+²5+@ªÝ\.MšPX(DNN!ÌÌô”®yz:#7·—/ÇVØþܹž¸x1W¯Æ×´ëJ‘fkŸ„¶m-0j”®_R'v?fø|.\\šcÆŒÞ ü÷î-Å?ÿLǘ1‘™™•+O _¿?ЮÝ"L™²þþÿáöígµ¶uÁhLðëÛÙ>+ÙQ!ªàóyÈÌ”Oèéi(+KK}ØÛ›àßï¡gO»rÛïÖÍ;Zcݺ3Ø·oZû¯ ÙyXÓ¦íĈ~رcºw·­Û´´$DEý-- O<<¬‘œ\€çÏ ðôé\¸ð¹¹"\˜™©ÁÂBÝ»ëC `ßjjj1bTTTêÛ•rabU‚t ÙÈJSS \.PT$„¶¶ÔÔåž%õé§Î ¼†_Raxúœ9ž9R:ÊéÐÁªzQ€?¿q˜2e&LØŽíÛ'V(ªŒª³páBTx§ Sdg›":ÚAuäƒQ=455ñÕW_Õ·å¾â•ÀãqÁ-õ4ÔÕU ‘H…ËÔT¯<ÜÓÓÉÉÙ¸w/±B={Ú¡C+lØp¶fœ®"**|lÛ6}û:aÜ89r«Ní¬ˆÅbxyyˆÊý‰²‘ŸÿYYçžXá½ì‡ýÔ׈Döæx&V%HÅJ:*xPS ¸X 01ÑF^^²³ó‘ž^6³·«ks˜˜èâßïWjgöì>8{ö!îÜyV³¨€‡Í›Çböì>˜1cÖ¬9U§ö ã}`bUÇ•Oᩪò¡ªÊC~~TTøÐÓÓ”ŸÎ+Û‹U‡ƒ>}qêTåbÕ»·#Ú¶µÀºugj¶U€Ãá`Þ¼~Xºt0Ö®=ÿýï|ôÈ`02L¬Jàñ8òˆ@>Ÿ ‡ÌÌ×04Ô‚ºº ÒÓó ®®‚øø²bH×­=zYîºVifÎìƒ3gàÑ£—5Ú‡ª2qbwlØ0»w_ÆìÙ{!ŠëŃÁ¨*L¬Jàñxà–,Zq¹\p¹\ddä£Y3mùˆËÈH»Üu«.]l ®®‚3gTj«ÿÖhÛÖË–…Ô\ªÉàÁíàï?'NDbêÔ(((®7_ £2˜X•ÀãqÀá ä‡‡JFVÚÈÎ.€‘‘45U•N€šš}û:!8øN•ìÍŸß¡¡qéRÅû³jOOgLÇÕ«ñðòÚ¬t=ŽQÿÄÆÆÖxäÚh³.lÔ…ß5ECòµ!ÀĪ>_:²’þr$BNNš5ÓArr6ìíM!‘ññiå¶1p +nÞLÀ‹™•ÚëÖÍݺÙâ÷ßOÔ`/ª››5NúÙÙJ³x0ê]]]ÌŸ?¿ÎìÅÇÇÃÀÀ Îì1U‰U \®tdÅãñ@ˆÅRÁÒÓSGRRM—Wˆ„„tˆÅÊ3ôîíMMUœz÷vDHHÕ¦]]-àéé„+Ž×{Tž®®:‚‚¾‡‡¾þÚ{÷^©W>F$ 6nÜhii¡sçÎ ‡ÃÁÏÏŽŽŽÐÖÖ†‡‡Ž;‡Sf:)$$...PSSƒµµ5vïÞ­Ôž¬k  IDAT^pp0ììì`dd„Ù³g£¨¨Há>"‚··7\]]‘žžŽN:š5k&¿'++ ãLJÌÍÍáííÂÂÂJËJSÛ~‹D",Z´044ĸqã••¥Ðæ¹sç`aa‹/–ëwUí74_<Ä "¢ï¾ÛKNN?RË–>dc3ŸzöüLLæÐöíÈÄd…‡G“‰É21™CçÎ=,·'"ÉÌl.%%eUÉîãÇIdf6—¾YS]y/„B1Í›@¦¦siÓ¦sõíΗ—yyyUùþ-[¶‘‘:tˆ^¾|IÇ'sss@þþþdffF§N¢´´4:sæ ÙØØЉ‰!ÙŸj^^©ªª’ŸŸ%%%ÑöíÛ‰ÏçS^^^{²zžžžMdccC‹/–—I$òöö&WWWJOOW¨WšÑ£GSïÞ½)..Ž"##ÉÙÙ™/^\aY]û½jÕ*rrr¢ÈÈHºwïuìØ‘¼½½Úìß¿??žòòò*õ[™ý†ìkE ÀÀÀjÕ©c‚˜X•0wî?ääôÙÚ. -¼ÉÍm)™šÎ¥;.’‰Éºy3š7ÿžlm¿ÿå¶SX($[Û´}û…*Ûž9suî¼ŒŠ‹E5Ñ•aíÚÉÔt.ÍûÏåׇDuÅÊÉɉvìØ¡pmç΀œiïÞ½ eûöí+#V$hõêÕ”™™I‰„rssI,—±'«)¿H666ò2@QQQeêÉ(..&G÷ïß—_;tèÙØØTXV×~ÛÙÙÑ¡C‡äï>|(ÿv›Uñ[™ý†ìkE4±bÓ€%ðùÒi@ÙÁ‹yy…ÐÒR‘t}êÕ«}ª>>>ýñâE&®¾w?jŠ9s<±{÷œ8qƒo@jjn}»Ôà‰‡«««Â5@\\œÊË´¡§§‡ÐÐPDDDÀÜÜ={öDxx¸|Û…2Zµj%mooÄÄ7iÁ®_¿www,_¾¼Üú)))‹ÅhÙ²¥üš +,«k¿Ÿ>}ªPÇÁÁƒVhÓÞÞ¾Ò>UÅ~Cöµ¡ÂĪéš•ô_±X*VúúZÈÉ)‚ŽŽ:^¾Ì‚½½ 8 6VyøºŒ]qýú¤¤dWÉvóæMáåÕëןEQч“ŸËÃÃ'NH#ûõ[ƒÈÈçõíRƒÆÌÌ wïÞU¸öà4¸ÆÒÒRþZÆ£GÊ´QPP‰D‚ýû÷###“&MÂÀ‘‘‘Q®Ý˜˜ùëèèh˜š¾9Œ3$$~~~@hh¨ÒúÆÆÆàñxˆs¼M\\ÌÌÌ*,«k¿MMM‘ ¿çÎ;øõ×_Ú•ö©*ö²¯ &V%”Þ H8×ÓSÇ«Wy01‘†¯;8˜ü?{g×týÇñ×î1nÇ6@9DDÌ#5K355+ðD-4µ¼Ñ<òHûy¤–WhZZiyGhš¥fjj˜¢æ}¡xp3ŒmïßcƒÁ@î~žÇnß゚ÏûóÅíµÏçó>““W¦û: ÿ’·¶á×_ãËÝÿG½Ž”%6lø«òƒ¨||\;~~nèÛw5öï/Ÿ§#£$˜2e bbbððáCì߿ӦMŒ3QQQ8pàRRRpèÐ!Ì™3§Dœ‡ÃA×®]±sçNdffB­VC @"ÑW+^¿~=22L$M˜0ׯ_G\\¦OŸŽððpã9kkk`Ú´i=z´‰c„R©»èß¿?Æ[·n!!!3gÎÄàÁƒËÙMÁÁ3©E‹¹FGŠ¿¢1c¾§Aƒ¢iâÄ-tà@Éå“H.ŸD99ye¶7fÌ÷Ô»÷Ê ÙðùçûÈÏo*=|˜Q•¡Ôyyù4qâòôü¨BûqÏ2ݳR«Õ4oÞ<òöö&jÛ¶­q_J«ÕÒòåËÉ××—ìíí©[·nC...%ö¶nÝJ¾¾¾$ )00bbbŒçP°ÇET¸÷±~ýzjРI¥R7n©TªmªT*ò÷÷§Ù³gS~~>µoßžlllŒçSSSiÈ!äììL2™Œ&MšD*•ªÌsµmwnn.EFF’\.'{{{8p ¥¥¥™´Y”§Ùm®ÿúfkyA=سbeí ˜7/;vœ†X,Db¢~iâ7šA©Ì…\îˆÄÄT,]:­[Ï<8—>Õþí· þ þýw6ÜÜìËeCnn>Ú·ÿ :5ÆâÅýª>¨`ݺ#˜?ÿôéÓ †A,XÚ$‹Ñ¯Ÿþo´m[åkT]¿~5Bll,<==ѬY3ã¹;wbþüù8{öl•Ú®oqKÛ]‘þë“­eÁáp°uëVãÿé:+ko@¿üÇ)Hµ¤?fe%@JŠr¹~P¡p€­­\.ç©ûV:@"â·ßÊð+ 0eJwüøã)\¾œT…ÑÔ#GvÀÎcqäÈtéò9®^}hi“ž âããŽ3gÎ '''OžÄ¬Y³0bÄK›Æ`Ô ˜XÀçs…È ûB¡ÉÉJ¸»Û#))ÍšyB"=ußJ, k×`ìÞýo…ì k…&M˜?ÿ—J¥¦iÕÊû÷ zöü{÷žúEŒ2‰ŠŠÂÛo¿^½zÁÙÙÇGDDFUé6íììªt½¥°´Ýé¿>ÙZßabU€ÁH"}ú%>ŸƒÔÔl¸»ÛC©ÌƒR™‡OT¦ûº~ýZáÔ©›O¶¢p¹|òÉ[8|ø?üùgÝM{äæfÝ»Çaذö9r,ØSj*FéøùùˆÀçó1þ|ܽ{*• /^Ddd$ø|~¥ÛvuuEttt5Z[;XÚîŠô_Ÿl­ï0±*€ËåB§#hµúÙ•@À—ËZ­½½ ))!!žÈÉQãÚµGOm³}{Èdؽ»beäÛµóC—.M0gN 4šº+|>3fôÄüù½±nÝŸ>ü[ddäXÚ,ƒñ ÂĪCáÅBqàÀ°g)èÝ>|˜fÍ<¡Ó®]+{Ï ÐÏ’zõjŽ;OWxô“OÞ­[O°ukÝ .÷Þ{Û¶}ˆóçï¢k×¥ø÷_ó.¸ ƒQY˜XÀãÄJ”KDÐétÇt‹xð ^^N°µC©ÌEjjöSÛíÛ·%nßNÆ™3û÷õuExx;,Zô+²²J&­k¼ø¢ŽùÍ›{¡W¯Xºt?[d0Õ«x<ý2 Z­/ñ®ÕjÏSS•ƺVAAúÈñÒJÜ%(Hޯ娱ãt…mš8± òò4X·îH…¯µvvbDGòe°fÍaôïÿU¹³x0 FY0±*@ ਰ4ˆVKHOWÁÆFd’ÅZ·ö‡ƒRKܧo߈‰9kl»¼¸¸Øb„.X½ú îÝ+=-M]#,¬~ýuRS³Ñ¹óç8t¨dÚ ƒÁ¨L¬ àóyÐhÈÄ¡!%E gg$'+!“9àÁ}½™ÐP/ 嫪۷o deåVêK{äÈŽðövÁÌ™»*|­% pÇÏ?G»v~6l=/Þ‡ü|­¥ÍªVx<¶oß^›ÇìQªäyZÔmëj¡gÜ£2šª«”ý2 Á°Y3OÀùówËÕ¶››=ÚµóÃŽ§Ñ­[Ó ÙÅçsñ¿ÿõEïÞ«ðûïÑ¥K“ ]oIììÄX»v¶l9‰Ù³Æá×±re8üü\-mZµ°`ÁôéÓÇÒf0U†Çã¡G–6£L˜XÀçóŒB!jµYY¹ðõuEJŠÍšy")I?³’Ë`m-ÂåŸêÛ·%¦LÙŠ´´l8:ZWȶ֭}ðÖ[¡˜=ûg¼òJD¢úõg4¨ :v Äĉ[ðÚk‹1~|gLœØÕèÔR_ñññ¥Í`0ž ê÷·E5"òŒK€‰"‘JežÉÌ*%%Û¸ïäã#EZZv¹÷¡zöl¡={*—íaîÜÞHIQ⫯UêzK#—;`ëÖ°`A_¬Ys½z­ÄíÛåÛóc0 &Vðù…Ë€VVBX[ ‘››''k¤¤dC&sáÑ£LÀ /4•;;…D"D×®M*å®®zg‹+þ¨WÎEáp8o‹_~ìì<ôè±11•KÒÊ`0ž/˜X òŒÏÅb>$!ˆ¶¶VFo@FÀ—_\¸PþŠœ½z½€Ó§oWZlÞ¿<=0o^ÝÍXš4Q`ß¾0`@kŒû† [ot^a0 s0±*€Ï/+‘ˆ++!½p¥¤(áêjkÜ·jÙÒpüøõr÷ѱc \\l*]¾^ àaÁ‚>Ø»÷<®»y˃HÄÇ'Ÿ¼c íÛ†¥K÷?sƒ £z`bU€@À+òœ±XïÄ  ››¼< \\l‘”¤ŸY¹ºÚB$âãâÅòϬlƒÍ›OTúK¹}{ôìÙ 3gîªpÜV]¤qc9bb&`úôžˆŽþݺ-«p¶ƒñìÃĪ€¢b% êÅʰ•œœeÌba@&s@bbZ…ú8ðE$'+qðà¥JÛ:sæ›HJJÇ·ß«tu >Ÿ‹#^Á¯¿N‚­­½{¯Äÿþ·¹¹ù–6Á`Ô˜X`:³â“×fd¨))ÙP(MöV‚‚dÈÌÌ…NWþ$µ^^ÎhßÞ›7Ÿ¨´­^^Θ8±+–,Ù‡;wR*ÝN]£Q#7ìÚ5sçöÆÆÇбã"üö[‚¥Íb0u&VÄŠËå@ (¼-†dµ))J(¸¿p&õòË "ÄÅݪP_ƒ·ÁáÃÿUxVV”1c:ÁÏÏ }ôc½+[^\.ï¾ûNš….]š`ĈoÑ·ïª:[9™Á`ÔL¬ 0ˆ•HÄŸÏCnn>8?΄D",(oïh"VÝ»ë³QTô×·nMáäd]¥ò<Ë—ÀéÓ·ñÕŸ¥ÕU$øôÓÞøõ×IÈÏ×áõ×?ǬY»‘™Y÷3Ð3Œê‡‰U†e?¡‡‹ìì<…|<~œi V(ðäI–ѱÁÕÕ§OWlf%ðЯ_klÙrªJe47–cäÈŽ˜??Öè¥ø¬Ñ´©vïÖ/ îØq¯½¶{öœ¦f“ ãé0±*ÀP|ÑP!8;;b±À˜Ì65U¿g¥Ó‘Ñ#\\ìÊUˆ±8ƒµÁÇUvAŸ<ùu8;Û`êÔíUj§.ÃãqñÞ{íqüøttìˆÑ£7¡gÏ/pìØUK›Æ`0j &V¼ÿ¸\ ;[ ;;122r ²X(¡P8€ÉR`@€;22r–öôBŒEññqA›6>Ur´±X€Ï?ïƒ/ã—_žílNNÖX²¤Nœ˜‰&M0 o¾ùE…bÝ Fý„‰U† `¡PKrrò`oo…¬¬<¸¸ØâÉ“,H¥6‰ø&bÕ¦>8¸¢N0xp[ŸÃÞ½££ ˆ"g< <q­Ÿ¥ƽ„-[N!;;¯FÌŸßNNÖøè£ŸX¶‡\]m1yr7œ81“&½ŽcÇ®áõ×—",l5~ùå["d0ê0L¬Š`˜YååiŒ™,àÁƒ H¥6xü8 …ÓÀàFÜ@DÈÌTáÊ•Ê%\ o µZSé²÷ű¶áË/áøñkظñÙ(%R]88HðÁ¯âï¿g`ß¾IðövÁ„ ›Ñ´éLDEmÃÿ±¤¹ F]ƒ‰U ¥RåÃÚZdtaOJÊ€Tj‹ää,XY áèhm2³òñqŸÏ…XÌÇ©S•Û·rr²F¯^/àë¯TÛL¨U+o|ðÁ«˜?nܨxJ¨çO,^ÜÇŽMÇ{lß~K@çÎK0dÈ:ìÝ{þ™(pÉ`< 0±*Ÿ¯ÎËÓ‹•F£ƒ@ÀƒV«ƒOžèc­ øæ›£•D1¾ür®]{„+~¯¶vŸUÞ~»9v샄„ù˜>½'.^|€ž=¿@‹s±`Áܺ¥Ï‡ÃìQï"‘ÇWOøLMÁ·´u €‡ƒ¼< ÜÝEÈÎÎ…³³ ²²rADÆ, …c /²€w\¼x¤ãÆÇðõu­” Ç¿‚÷ßßX¥6ŠÓ¨‘"#»aÑ¢_Ñ¥K„„xVK»Ï:„‡·Exx[$$ÜÇŽqر#_}u/½ÔiiIhÓ¦ >úè#K›Ê`T‰~ýúáþýºíËĪú™››[[123sáà ­­ùù$'ëÅJ.w(Qp1 ÀIIé°µãØ±k•š×_†§§6m:ŽyózWyLF~‡]ÆèÑßá·ß&ÃÖV\mm?+¬À¬Yoáèѫصë_”XÌ7ά”JýÞ‘P¨¯kÅãqáîn_"ï^@€;®^}ˆ¶mýpüxÕĪqc:w²eû«ÔŽ9¸\V® "Âøñ›«}öƨ^®_¿‡SçÛ¬>*Ú¦áýE¯#"„‡‡ÃÆÆÆìkFÝ„‰U‚BçH¡¬,­‘­†½½ÖÖ"£G >ÖÊT¬üýÝqçN ZµjˆS§nš8`T† ºàßïàäÉê¯Çäìlƒ¯¿~G^ÅW_ªööÕ‡ƒƒ¦NZkýݼyR©´Öú« ŠÞÃ`óæÍ¸té’Ù׌º «"èK‚èŸóx¼‘²4l(ŸÏ-’ÅÂ\`°;´Z4"3SU©úVEyá…h×Î+WþQ¥vJ£E‹Æø«S§*—1žQóH¥R,\¸°ÖúÓétHI©z¹šºDÑ{¨Ré½8½¼¼Ì¾fÔM˜XA (¬Ìçs JÚ èS,iµº"Y,JÖµòöv@ÀCNŽ 8WKyùqã:ãðáÿ¯Êm™cìØ×ЩSFÚht"aÔ :«V­BãÆakk‹¶mÛâðáÃàp8 "DGG#((vvvèÔ©öìÙSb bcc±X |ÿý÷fû3\ƒ€€¸ººbüøñÈË3ÍìODˆŒŒDhh(’““ѦM€»»»ñ=éééx÷Ýw!•JáááÈÈHäææ>õ\QjÚn­V‹%K–Àßß¶¶¶x饗pêÔ)“6”Ÿ¹ñ2êL¬Š ŸYéÅŠ[pgø|ý;äæægVryÉ™•@Àƒ ®\IÂ+¯àÈ‘ª‹U‡ õÂêÕ5³TÇáp°dI?p8Lš´¥ÊK—ŒÒY¿~=>ýôS|öÙg¸zõ*fÍš…¡C‡6lØ€ùóçcùòå¸yó&¦OŸŽI“&•h#;;aaa3f nß¾™3g"""ÙÙ¥;ʬY³{öìAll,öíÛg2K#"DEEáàÁƒ8xð ¤R)Nž< xøð¡ñ}cÇŽEbb"þùçìÛ·¿ýö-ZôÔsµi÷Š+ðùçŸcÑ¢E¸zõ*f̘¨¨¨íŸ¹ñ2ê Ä0¹•ÂÂÖ\>‰Ö­û“d²‰táB"ÉdiáÂ=$“M¤W^ùýþûE’É&RvvžI£Fm¤wß]O{÷ž'(--»ÊvíÝ{žŠItýú£*·U§NÝ /¯É4wîÏ5ÖdzFXX………•ûýMš4¡7šÛ´i àà`Ú¼y³É¹-[¶ºví>ª©©©$èóÏ?§´´4Òét”••EZ­¶D†ëâããǶnÝJ~~~ÆsQQQ€®\¹Râ:jµšx<%$$íÚµ‹üüüÊeÃ< …çÏŸ79vñâE@ƒ ŒÏ \¾|¹D*• :Û·oGjj*†Ž7ß|©©©%ÞkàÚµÂ0Š«W¯B.—_ÇÆÆ"::?ýô>löz777ðx<ܼYè„sãÆ (Š2ÏÕ¶Ý 6,õþ2ê?L¬Š ñ‘——‰DF>ŸkŒµÊÈPA¡p!%E ‰Dggk$&š~ØeÐéׯ?F‡8t¨äNeèÝ»ÜÝí±nÝŸÕÒ^iLÚ:5ÆÈ‘qûvröõ¼)S¦ &&>Äþýû1mÚ4À˜1c… %%‡œ9sJÄq8tíÚ;wîDff&Ôj5$})›õë×###Ãäš &àúõ눋‹ÃôéÓnù¤R+FÄÒ ‘u‰/¾8@íÚ- ŽÒ’%û(0p:}ÿýßԯߊŒÜJáákI&›HçÏß%"¢=–•ØãÉÏ×Rƒ‘´}{ýûïm’É&ÒµkÕ³×ôÍ7GÉÇ'Š’“³ª¥½ÒP*s©S§ÅôÊ+ÿ£Œ UöUŸ©èž•Z­¦yóæ‘··7ÙØØPÌf IDATÛ¶mûRZ­––/_N¾¾¾dooOݺu£˜˜rqq)±§²uëVòõõ%¡PHc<‡‚ý¢Â½˜õë×Sƒ H*•Ò¸qãH¥R•hS¥R‘¿¿?Íž=›òóó©}ûödccc<ŸššJC† !ggg’Éd4iÒ$R©Tež«m»5 -Y²„üüüÈÚÚšÚ¶mK'Ožd{Våõ`ÏŠCÄÒoˆŽþë×››^|Ñ{÷Æcذ—ŸF __¬\yß}÷>:wÂèÑßA£Ñbýú÷LÚyíµ%èÔ©1¦Níàà™˜:µ;Þ{ïå*Û——§A›6ŸbàÀ6ˆŠê^åöÊ"11 =z,C‹ ±aC¸ÜšÍvPéׯ`Û¶m•nãúõëhÔ¨bccáéé‰fÍšÏíܹóçÏÇÙ³g«Ôv}ûˆ×W»ë3[·n5þŸ®ƒlgË€E‰xP«õ{V99jØØˆ¡TæÁÑQ‚´´lê×Ì ±VžžN%,€Â´K|>¯¾ˆªgÝ\$âcĈWðÍ7!3³úʇ˜ÃÃÃ6Dàðáÿ°dɾí‹ÄÇÇ#<<gΜANNNž<‰Y³faĈ–6Á¨0±*‚Hdp°!'G ;;qƒ…5ÒÓsàïï¸rEáéé„»wÍ‹•á=;áĉP*óJ¼¯2 Òðã'«¥½²hÕÊ‹÷Ê`÷î35ÞßóLTTÞ~ûmôêÕ ÎÎÎ>|8"""0jÔ¨J·iggW¥ë-E}µ›Q³0±*‚HÄGnn>¬¬ô3+[[1²²Tpp 55þþî¼¼œ‘‘Sb–(Cbb*rrÔxõÕÆÐju8v¬ê^€¾|È»ï¶ÇW_‚J¥®–6Ë¢_¿V6¬¢¢¶á…ħ_À¨~~~ "ðù|ÌŸ?wïÞ…J¥ÂÅ‹ >¿òż]]]]ÖÖõÕnFÍÂĪ"‘ùùÚbb•k\x°±3Wxy9@ À€wèt„k×ÁÉÉ¡¡^øãêK’ùᇯA­Öbýú¿ª­Í²˜;·7Z¶lˆ!CÖáÎg+g£nÀ²©3ž«"ˆDü‚yÅÄJ_Ó*'G ggcæuGp¹%c­¼¼œ! L–¼TmÆvvbŒÙ«WBFFNµ´Yß~;žžÎèßÿ+“ É †%aÙÔŸ˜XÁ¹B$â#''¶¶VF±€ôôxy9!3SŸ¥Y(äÃÅÅ®„“—ËŸŸ+®^-«G2‘p¿Úl}ÿýxµ6»‹Ø´i Š6ÞÃ’°lêÏL¬Š`˜Y2§ÛÚŠ‘™©_€´´l4jäF‡ìl½Ã„——y'‹À@®\Ñ—¶ ’C&sÀï¿W_4½µµ£GwĺuGž^ó³+pr²Æ·ßÇÇ™3æ{cõdFõ°gÏ4oÞ‰2™Ìø%¬Ñh0{ölxyyÁÅÅC‡EzzúSÏ_Z+úÚðüàÁƒðòò±cÇ*Õÿøñã1|øpcJ¥‰Ä¬»}]Ϧþ¬ßÿzÅB¼ê çÎÝ-HZ»—š7ŸMß|ó…„Ì¢ÔT%ÉdéèÑ+´uë)’É&Ò_éhŽó= ¶¾D[«VýA­ZÍ5¾ŽŒÜJ=z,«V{³³ó($d}öÙžjm÷iüóÏMòöžBcÆ|OZ­®Vû®KT4(¸,233I(RDD%&&Ò?ü@èñãÇ´dÉjÒ¤ ÅÇÇÓ… èÅ_¤ÈÈH"¢2Ï•üjxÞ½{w:tè%%%Uªÿ#G޳³3åççÑ?ü@Mš4!®äÿ CŸ]»v¥«W¯ÒÉ“'ÉÏÏæÌ™c<§Óé(22’BCC)99™ˆˆ–-[F®®®´k×.zðàíÝ»—äryµû>÷¿,P‚‚™Xáòå$“M¤¥K÷S@ÀÇ´}{5lIZ­ŽŠIôË/g)!á>ÉdiÙ²ýDD´hѯԩӢm8@rù$ÊÌÔGù²°Wwö‰Õ«’¿ÿ4JIQVk»Oãèѫ԰a$¿ù¹¬ê«¼¼<º|ù2)•JÒjµtäÈã—q@@íÚµËøÞK—._—u®<_–†Ìæ•í_£Ñ»»;öíaíÚaøùç3˜5kw­öý," qõêUtëÖ -Z´ÀÆçîܹc’¼qãÆèÝ»÷SχÌ8øV©‡>}ú`×®]HNNÆüQ"/`qêb6õçéþ×W˜XÁP˜Çã ?_ ±XÆd¶iiÙpp€ÇãâÚ5}¬•§§”Ê<¤¥™‘óòr‚­­/ê*¬­EèØ1{÷šf…®*‰S¦tÇÆÇj=ñl×®ÁX¾| 6m:†¥K«Õ¾Ÿ5T*úõë‡)S¦àÌ™3X³fñœ\.ÇíÛ·¯Ï;‡ <õœF¸¿¤ƒ@ ¨Rÿ†Ý»wcÛ¶mhß¾=<<<Êk]̦þ<Ýÿú «"fV†;†×™™*89Yì쬔¤µòôÔÇZw²àp8 ”á¿ÿ’ŒÇºukŠ£G¯!+«zS%õïßÞÞ.X¼¸öÓ"õéÓ³g¿eË~÷ß«õþŸòòò V«! ¡R©0{öl@VV† ‚3f !! ;v,îܹežspЯ|÷ÝwÈÌÌÄŠ+ª½xùå—¡Ñh0oÞ< 2ĤÝú’MýY½ÿÏ^‡¬Sdeå’L6‘¢£‘L6‘âân’L6‘âãïQxøZš0A_ÉõÕW‘L6‘?Î$µZCQlì¹íM›¶zõZa|šª$OÏ(&æLµÛ¾wïy’Ë'3Â×6+VüNrù$Ú¸ñ˜Eú·Õ¹gE¤w$prr"OOOZ³f 8\]])77—"##I.—“½½= 8ÒÒÒˆˆÊ}: 4¨Ì÷°R5GyîYÔ±bË€Exàñ¸0„Fb" )—RSõûRN‰øÆ _//§)— (H†ÌÌ\Ü¿Ÿn<öúëÁ8xðòò4ÕnÿŒ=qäÈ=Z=y+ÊûïwÀܹ½°`Á|óÍQ‹ØÀ¨]rssqóæM|óÍ7xÿý÷-mÎsÇótÿ™XðOjµ"YY¹Jm‘’¢¯œêæf‡c«ÒJ…ÊÁáppùòã±îÝC­Æñã×J¼¿ª´iã‹öíý±hѯ«ôþûÕŸ|²?üpÂ"6ÔU8N™úÈ©S§Ð²eKDDD cÇŽe¾×ÒÙÔŸ÷û_ß©|Jçg‘HNÿE¯/b…¬,œ­båînü|­1 ¹§§3Ξ½[¢-¼¼œpñâ}téÒ€>Ÿ`Pû÷_@§N«Ýþùó{£sç%رã4ÂÂZU{ûåa„.àr9˜:u;rrÔ9²ƒEì¨kXêDMÒ¡C¤¦–ü¡fKgSÞï}‡Í¬Š!ê·¡cVV¤R[deå"/O77{hµ:Ü»—ŠôôãÌÊ܇¡qc¹‰G  _ üý÷KFQ¬NüýÝÑ¿ÿ‹øßÿö"'§æKˆ”Ƹq±xqæÍ‹Á‚{,fƒÁx6`bU ±˜ü|-„B}2[CFgg}2ÛÔT%ÜÝíè©]¼ø^^NÈÍÍGr²²D{AAr\ºôÀäX÷îMñèQNŸ¾U#c˜:µ²³ó}¸FÚ//ƒ·ÅªUáX»ö0¦MÛ^#âÌ`0ž˜XC_-8ßXÚÞP€Q*µ$'+áîn°··Â… ‰ðôtP2Ö Ð'´½u+Ù¤Pb“& øû»#&¦f’MJ¥6øðÃNøê«Ã/çÑ«× X¾| 6o>‰iÓ¶C«ÕYÔƒQ?abU ‘ˆ_PÚÞ´£““¾€[JŠÖÖ"ØÚŠ!“9 !!îîöx¸w¯da  9´Z®^}drüÍ7›aïÞó5öå=zô«pt”X$P¸8}û¶DtôPlÛ‡÷ß߈ÜÜ|K›Ä`0êL¬Š¡ŸY•+;;1„B¾q©ÏÍÍööVHH¸ …Â|ŽÀ† ¥H„&гg(?ΩS7kh|LžÜ Û·ÿc,iIÞx£v¸[èÓg•Ù%SƒÁ( &VÅ‹ùË€¢±²2¦Grr2õ ù¸qã1rrÔðð0ï¾Îårà^bß* ÀþþîØ³ç\%,¬‚‚˜5kWõQš7÷Blìdd¨ðæ›_àÖ­'–6©Jðx*JÆRìØñ!^‡wÞYƒï¾&M–6«R,X°}úô±´ F•áñxèÑ£‡¥Í(&VʼnÈÍ58XäÁÛ[Šôt}yl©Ô))ú,îîö¸r% R© þý÷6<=pâÄ ³m6n,ï¿Æ—8þöÛ/`éÒßpêÔM´kçW#ã ñÄàÁm0wn :wn;;qôSd2üüó8Œ±½z­ÄŠƒÑ½{SK›Ua|||àããci3Œç¶ X ¡°pf¥R©aoo…ŒŒÂ™UrrýžÕÇhÖÌçÎÝ…§§>å’9÷ìÆåHOÏÁǦ٧ýü\(«Ñ¥@øøã7 Ó–/¯;e<ìì¬ðã£ðî»í1bÄ·X°`smg0¥ÂĪ"juá2 ƒƒ¹¹ùÈËÓ@*µAjj¡ƒEJJ6BB›Åƒé°±•êá$3;«ñ÷wGh¨¶o«‰áár9˜3§7âânaÏžê­V\têÔ±± Tæâõ×—Z,s<ƒÁ¨›0±*†!ƒ…••afe+œm Tæ!/Oww{p8¨Tj4hà\°oå\jiù  ._N2{®OŸØ»÷|/µhуµÁ'ŸìFffõV+®üýÝñûïSеk0 ˆfûX ëbu°ÈÉÉ3άÒÓs •f±xpt”àáà „†záìÙ»ðö–âöí’Y,½Gàõë V—¬cÕ«× P«58p ¡æVÀ¬YoÃá`îܘï«2ˆD|,]Ú³f½…µkcĈo‘™©²´Y ÃÂ0±*†>(Øà ˜‘ˆ‘ˆoܳ`kõèQ&BC½pæÌ4l(-ufÕ¸±×®=*qN*µÁ+¯`×®kn`ØÚŠ1o^oüôÓ);Vý5µª‡ƒÑ£;bÛ¶qöìtéò9ââj&é/ƒÁ¨0±*†aÐÚZ¥R¿Tæà 1.0¦ rw·Ã£GhÞÜ éé9°µãömó{V¾¾®‰øf,ýRàŸþ‡'O²j`T¦ôìÙ ]º4Á´iÛk¤bquѦ/ŽùÍ›7@¯^+1kÖnäçk-mƒÁ°L¬Šap°°µ#/Oƒü|mXéÅH(ä›Ì¬’’2д©ø|.T*523s‘šš]¢]>Ÿ‹FÜJuïÞ½)Äbbck6æÊÀ‚}ðèQ&V­:X+ýU;;1¢£‡â‹/bË–“xë­/ë}š&ƒQq˜XÃ0³²±ÑgzP*sao/1f±Ð{êÅJ&Ó/ZY Ѩ‘»ñø­[¥9YÈqé’y' ++!ºw©•¥@P(1aB¬^}°Ô¥ËºDXX+ìÞ=™™¹èÞ}9~üñdsÁg05«b‚‚mmõqSYY¹Å²X&³uuµ3f¥xñEo$$܇PÈ/u)00Ð|Ž@o¿ÝgÏÞÅ;æ4ª›Q£:ÂÛÛ“'ÿT/¼îBB<ñÛo“Ñ·o L™² ýûU/„–Á`T&VʼnøÐéb± Tæ÷¬Ód¶îîöÈÌT!'GV­|péÒ}xx8–ê$Ó'Y¥îK½òJ\\l°cGÍÆ\xXµj0NŸ¾uëŽÔJŸUÅÆF„ úâÀH(•yèÐa!,ØcÖË’Á`<;0±*†H¤)Cº|ÃÌ*-M?³’JmMÄ ?ÎDëÖÞÐhtpt´Æ;¥{(uvÅçsѯ_klÞ|²Ö*ê6n,Çøñ]°páÞ:Q÷ª¼ÉñË/0kÖ[ظñºu[†3gîXÚ,ƒQC0±*†H¤)¡ pÏÊÜ2 »»>{ERR GÈå ¢R÷¬\\l!•Ú”ºo¾ˆG2ñ×_µ—Áa„. ”aòäŸêUÙy>Ÿ‹#^Á¾}ÁÞÞ ½{¯ÄÌ™»ŒƒñìÀΆ™@àó¹Ë€¦™× _†Îζàñ¸xü8кµ23Ue„x">þ^©ç½½]кµ7¶n=U=*|>Ë– À… ‰X»öÏZë·ºðósÅ®]c±hQ~ý5íÚ-À_`IqŒg&VÅ‹õ3+µZ kk}I{I±šVz±âó¹JmñàA: U+o$&¦!%EYj:£¦M=páBb™6 ð"öí»`Ö¾¦ ’cüøÎX¼x_½Z4Àáp0`À‹8ujfÍz ß|s-[ÎÅêÕët,ƒÁ(L¬Š!‘99jØØˆ TæÁÞ^µZ•Jm̘››ððp0f ñEãñÒö­‚ƒ¸uë ”Ê¼RmxóÍPˆD|ìÞ];nìÆë oo)¦LÙV¯–‹"ðÞ‡OEïÞ-°xñ>té²ûö]`®î F=†‰U1 b¥R©ak+Fvv.ôeBŠf±0Ì® GãÌ*0P[[1¸\N©ûVM›z@§#\ºt¿LÞ|³9¶l9Ymã*B!ÑÑÈeËêN¡ÆÊàìlƒ úàÈ‘ihÜXŽ#¾Åk¯-Á®]ÿB£©ŸBÌ`<Ï0±*†•UÑ™•¸À°0™mq±’Ë gV\.-[6„•• Ô}+OO'88HPºXÀÀ­qùrÒS— «›€w̘Ñ_~ù;Nœ¸Q«}× J±ví0üý÷ ¼ôR#LžüZ´˜ƒ¥K÷×ÉÌó ¶mçcéÒýHOϱ´y ã)0±*†@Àƒ@À3άL—õùE"¾±£BáˆÔÔlã^UË–ÞP«5¸zµt'…ò8YúC?ÿ|ÆØvmÁáp°téäæª1{öϵÚwMãâb‹É“»áèÑéo‹¯¿þ mÚ|Š3v–ZoŒÁ`X&Vf°²B¥*\ ù°²ƒœlŠÌ¬ô±UIIúÙÕ /4—ËÅKm?8ØW¯>|ª—ÚàÁm““‡Ÿ>SM#+?R© –/„­[ÿÁ/¿ÔNrÝÚÄÅÅüââ>Á”)Ýñ÷ß×ñÚk‹ñÖ[+°}{ó d0êL¬Ì`¨lXP°¤ûºBáÆ}+‰D??WddäB¥2çÓ´©4þû¯ì_òŽŽÖèÙ3›6¯–qU”W_ Ä Am0sæN<~\ó¥K,­­Ç¿‚ǧ"&f<¼½¥˜:u;š7ŸÙ³fÞŒ:+3è«ëgV¦5­Ì[C$âãþýÂ}«6m|P© i}|\`m-*×Rà°aípþü=œ;w·Š£ªsçö‚““ ÆŒù®Þº³—ÅñãÇ!‰ÀápкµV¬ŒÛ·—ãÖ­íXµê{w‡Ãaö`R>>>µòYå×J/õ ++T*5ìí%F±²··2)b+‡™ÌÁÄÉâõ×›â»ïþÆéÓ·(+Ñ>—ËAP O«–-½¬À¦MÇêUë‰7Çë¯/Åÿþ·3g¾Yë6Ô$÷ï߇Z­Æ¶mÛÌž×é\.§–­b0ê'NœÀòåËk¥/&VfHDP©òáá!.² X8³’JmL–‡ S±j×ÎpìØ5„‡·5ÛGÓ¦åž-…‡·Ãœ9?cöì·áà ©Ô˜ªBÆR,YÒ|ðZµòÆë¯׺ 5MXX˜¥M`0êµhÏ–Í`X4€££é2 ¡Ð" ß·2ìYúd¸ööVeΜš6õÀ¥KÊ Ú·o ý´<=1zô&äçk-fƒÁxþ`be†¢3+ÆÀà¢{VÙÙ…ù‹f±0Ь™'òòòK ö÷w‡HÄ/w†Š¡CÛáöíd?~­²Ãª2"+W†ãÊ•‡X¼xŸÅì`0ÏL¬ÌP躮+¥2פLˆ««¾ŽÕ£GúÒ …#²³ó™©2¶Ñ¶­/௿®˜íC à!0PöÔ´K7–£E‹øî»¿+7¨j" À †aÍšCˆ}ö⯠FÝ„‰•$CP°@ÑŒz1rsÓ‹Õ“'z±’ËÀdvÕ¨‘ààÁË¥ö\¾LÞ¿#~ý5¾ÌzYµÁ;ï´Ä¼Šñã7ãüùÒks1 ¹~ý:8œêõ*¬‰6k£Ú°».𼌳¶`be†¢qV€aÐ ùùZää¨!•Ú‚Ãá˜Ì¬˜ìQ5l(ÄÅÝ,µŸà`.^¼®|ûP=z„@&sÀÆÇ*5®êdúôžh×Î#F|Ë*ó–L:µÖú»yó&¤Ri­õgijj¼uí>>/ã4+3Ò-™.f^xpt”+ÛØˆ`gge2³²µÃÎN›uó¦ù,M›z ++·ÔÚWÅáó¹xï½öزå¤Å3†s¹¬^=|>£Gobe7ž‚T*ÅÂ… k­?N‡”óAéÏ"55ÞºvŸ—qšƒ‰• {VB!ßD¬ ûVnnv&)ˆŠÇZúrëB!‡›_ ’ƒÏçâÂ…òí[@xx[Û·×~6öâ88H°aCΜ¹‹O?ýÅÒæÔ :«V­BãÆakk‹¶mÛâðáÃàp8 "DGG#((vvvèÔ©öìÙ‡SbI(66!!!‹ÅðññÁ÷ßo¶?Ãu111€««+Ƽ<ÓâD„ÈÈH„††"99mÚ´¸»»ß“žžŽwß}R©ˆŒŒDnnîSÏ¥¦í€üü|L™2nnnpuuÅ”)SŸŸ_~ù …iiú…?þø#üýý‘]b¼†þ<///;v {öìAóæÍ!‘H “ÉŒ?4 fÏž ///¸¸¸`èСHO×–ÍÝÇçqœub”àûïÿ¦€€‰ˆ(8x&}ûí1zò$‹d²‰ô÷ß׉ˆhÀ€¯è£~2^¾–ÆŽýÁ¤±c Y¾¶Ô¾^}u-X[!û¦OßAmÛÎ'­VW¡ëjŠ-[N\>‰~þùŒ¥M©0[·n¥Š| Ö®]K®®®´k×.zðàíÝ»—<<<}ýõפP(hÿþýôäÉúý÷ßÉÏÏеk׌ý(•J‰DMIII´aÃâóù¤T*Kôg¸®k×®tõêU:yò$ùùùÑœ9sŒçt:EFFRhh(%''›\W”ÁƒÓk¯½F7nÜ øøx ¦9sæ”y®¶í&"Z´hõíÛ—îÞ½Kñññô /дiÓˆˆhèС4lØ0zøð!¹¹¹Ñ©S§ÌŽ×ðº{÷îtèÐ!JJJ"¡PH”˜˜H?üð ÇÓ’%K¨I“&O.\ _|‘"##K½Ïã8K£¢J5Ú IDATŸŸ*°‰•vî Dbbáÿ™¸¸8tìØŸ}öY©×?zôZ­¾¾¾Æc~~~HLL,óœ%ì¾}û6d2™1Qj—.]pëÖ-zG•‘#GââÅ‹øàƒJí·hŸ  qõêUtëÖ -Z´ÀÆï¹s玉7FïÞ½ŸÚöó8NKÂÄÊ ‰¡Zp~AæõÂü€†šV®®¶xò¤pÏJ.w@RRº‰g_£FnÐh´ððpÄŸš·jÚÔiiÙ%ö»žÆˆ¯àرk¸téA…®«) >>.>ݺuÃêÕ«¡ÓéqãÆáÇÄüØØX“þ ã-N^^Ôj5„B!T*fÏž ÈÊÊÂ!C0cÆ $$$ !!cÇŽÅ;wJm÷yg£6ë.$’L6‘nÝzB~øEDl "¢>}VÒÇo'"¢¿ÿ¾N2ÙDzô(“ˆˆnßN&™l"9sǤ­æÍgÓĉ[H.ŸDf˜í¯]»ôùçû*lç¶mÿ—×dºw/µÂ×Ö$ÿý—DÓhäÈuÆ ¤4*ºæ®V«iÞ¼yäííM666Ô¶m[ã¾”V«¥åË—“¯¯/ÙÛÛS·nÝ(&&†\\\Jì lݺ•|}}I(R`` ÅÄÄÏ¡`¨p/aýúõÔ A’J¥4nÜ8R©T%ÚT©TäïïO³gϦüü|jß¾=ÙØØϧ¦¦Ò!CÈÙÙ™d2Mš4‰T*U™çjÛn"¢ÌÌLzï½÷ÈÑÑ‘œiäÈ‘”M+W®¤fÍš‘Z­&"¢Ý»w“L&£ÔÔÔã5·³lÙ2rrr"OOOZ³f 8\]])77—"##I.—“½½= 8ÒÒÒˆˆÌÞÇçeœå9XX˜7“L6‘.]ºOQQÛ(,l ½÷ÞúàƒïLÞ“HDDjµ†ŠI{Τ­°°Õ4~üjÐ ’¶mûÇl£Fm¢aÃÖWØNµZC­ZÍ¥Y³v=ý͵̾}ñ¤PL¢E‹~µ´)eR6ÃFll,;gú÷ß±c‡qÓ¼*m×7ê«Ýåygi0 cX,^&ÄÉÉ©©Ù[…ù\\lÍÆZݹ“Œ–-–ºØ´©¢ÂË€†>GêˆÍ›OÖ¹,ݺ5ŧŸöÆ_À·ß֥ʚ$>>ááá8sæ rrrpòäIÌš5 #FŒ°´i F½‡‰• 99ú2!YYEÅJ/ ¶¶bH$ÂN˜f_÷õuÅѱc ޹b6µR“& $%¥…°" Ô‰ß|S÷á½÷^Æ´io`æÌÝøé§S–6§Æ‰ŠŠÂÛo¿^½zÁÙÙÇGDDFUé6íììªt½¥¨¯vW”çeœu&Vf°²2xêgV†jÁŽŽÖFo@À¼ûzñ™•¯¯+RR”xá…HMÍ6[1$Ä*•ÖÊJˆˆˆ—ñÍ7ÇŒ^‹u‰ñã;cÔ¨˜2eöí»`isj???ø|>æÏŸ»wïB¥RáâÅ‹ˆŒŒŸ_ù‚Ü®®®ˆŽŽ®Fkk‡újwEy^ÆY`be¡>Ÿ[ÌVdvÐ/òú”KÅëZùù鳯 ýÍ ÃGGÇZû¡Çά¬D&¥í³³sÁår`oo…ÔÔÂü€ðäIlmÅàr9ËJd_÷õuA~¾÷k×&˜ööÎ;¬©ëÿãï,fH€BHØÁ£ZWÑÖ-Vë¨UëhÕjE«_ëhÚZµjëÞZµîhµZµVûµŽ".\¨(¨ eÏœßù&pÉ Îëyx“{ï9çÞHÞ|>ç3fìÇ… ÷ѵkã¼ÐЊí[À”)ݰÿ8ð jU¡±ªÀ»vÇ A5+XnnnصkWµÏK¡PŒƒîYéÀÊJ hmm‹¥N ¶³+I V‰UYW`YËJUÐöÁƒWH„–ãÔ)fun@dqófb…ZÄËåv8°%–.ýèQ,ðË/ŸÂÞÞC†¬§Q‚ E'T¬t`iÉCNN86¬¬ÌÔ ·öö%‰Á"‘586^¿f†¯'%1£ýø|sH$Uwþí·Øš^…B©EP±Ò*)Kdf–ˆ•ʲ4«X¸¸Ø#;;_£(­——£Ú ï¾€?þ¸­1¯2È¢b– Ü;ûè£VX¾üT°®eâðš5Ã1`@sŒ» {öÔ ¡¥P(U+¨Ê-€Ph¡¶¬ìì¬ÊXVšb@úR´}óF¹ßÞ7o&"1‘ŒâŠ{÷’ÕBY>û¬3^¿Î¬SÏ96-ˆ¡Cù۷ÿ·¦—D¡PjT¬tPÖ²ÊÈ0̲’ÉìÀf³4ÄJUÐVå lßÞööÖ8rä:ã¼W+LêoU¹Ü£G¿ƒE‹Ž«÷Üêl6 ß?“'wÃŒû±`ÁQ` …Ò° b¥U¹%@¹g¥+;;kde壠@Y0ÖÑ‘¹gÅãq ‘5ÄJUÐVå ärÙèÖ­Žû—qž««b1¿ÂùV*&Mê…‚`Íš³•2^u2uê{ذa6mú #GnV[º ¥áAÅJJËJ®.0,f1Û´´lƾ‹‹½†{OUжt.ÑûïãÆgç6iâbrö²–˜0¡3Ö®=«Q³°.УG0öïÿW¯& ÿUŒf— ¥á@ÅJVVfÈÏ/Bq±ânÀ’ÐuŒ*„¤¤”|‰*Ã×5 Òz{3ƒ,Ú·÷…Ph©a]U¤]ˆ6FŽl±˜¥KOVÚ˜ÕIÓ¦nˆŽžŒ¬¬<ôìùî߯¾zd ¥v@ÅJªº}yy…Z-«Òõk(]†ï½×ÇŽ1ôCB\ñôi*RR²*å^Ì͹˜6­;vï¾Tg+»¹‰pðàD88ðÑ·ï š‹E¡40¨XéÀÊJ)V99êÐu…‚@(´‹ÅR»%’’ú€*tåZ•.h«âý÷›àêÕFÓÆÐP7À¿ÿVžuÕ¿sHñý÷Ç*mÌêFUí¢K—@ ²Ë–„BA/(”†+XZò(ÅJ(´„BA••.— ¡Ð©©J«Ç‚ Ë*'§@}ŽŠÒmUtèàÀÇ—XWööÖpuUª+ÍfaæÌpòdþþûA¥[ÝXXð°|ùGøé§°jÕiDD¬b<{ …R?¡b¥++e«Ü\¥e@(ó.º²MuåZy{KÔmUðxtí¨ÕX™bï¾ëÖ­½°hÑou>¼_¿f8qb*RS³¾W®<®é%Q(”*„Š•TnÀìl¥e”ˆ•HÄWW^”®ÀÒn@]¹VVVfŒ‚¶*>ø  ._~„—/K àV´Í½.fÏî…þIÀ‘#7*}ìêÆÛÛ‡ODãÆ2DD¬ÆêÕgjm—d …R1¨Xé t+•e¥ ²‰ø Ÿƒ³c°®\+@3È:vô‡µµ9ŽS¿WÑ6÷º uÅàÁ­0gΡ:•(¬ [[+lÛ6_}Õ‹GŸ>+h« ¥BÅJª>VÚ,+±˜)Ve«X€««=ž?gæOÌ‚¶*Ì̸èÔ)¿ýVÂ,—Ë®tW ̘ñ>òó‹°bÅ•>vMÀb±0~ü»8wn,,¸èÔi,8Zgj"R(”ò¡b¥‡ ²²òÀãq`aÁ+cY•”\*»gè_÷òrÔú—ÿþÍñ÷ßÔ×XZšÁÇÇ©JÄJ,æcÊ”nX·îO~Mãæ&ž=ã1{v/DGÿ‹Îa×®š—E¡ÔQ¨XéÁÚÚYYÊ eb°òß"‘5Š‹jq’Jm€ÑÎ^W®•LfKK3­%ƒúõk†øøduk÷Êjs¯‹öí}ѵkæÍ;\/÷wx<F~—.}ˆˆ–˜9ó:tX¨µ…B©ÝP±ÒŸoÎp–XV6 "''!0 ÅÊåÚs­Øl|}%¸w/Ic¾fÍÜàé途֕¯¯,,x•ZÉ¢,ß|ÓOŸ¦aóæóU6GM#XbÖ¬püø89 0|øŒ½¥Êþ P(•+=ðùæ 7`é<+ D¬ø|sØØX 9¹Ä²’ËíÁå²µ†žûú:é¬Ñ×·oS:t ÅÅ ðx4n,ÇÕ«ï¬ ww1FŒh‹åËOÕûŠæÎØ·ïslÜø âã“Ñ©Ó"Lœ¸ )5½4 …RÜš^@mÆÚÚ‚aY©¢øìí­Áf³.>''!C¬¸\6œítˆ•ÿý¯ö’Gýû7ÇÒ¥'ñ÷ß÷ñÎ;~hѧNݪÌÛÒ૯zàĉ8|ýõA¬[÷q•ÎUèÑ#Ý»7ÆÜÆ¢EÇÑ®Ýwxÿý&˜1£<<ª|þýû÷cݺuU>¥áaaaU«VÁÕÕµ¦—RéP±ÒŸo®Î•*`Áå²!X2J.99 ñâÅ[Æõnn"<}ªÝ²zñâ 23ó`ccÁ8æî.Fh¨+¼ŠwÞñCóæîX³æ,޼ɭ­Ueß"e˜üwßõÇСëÑ¿3tëÖ¨Jæ©M°X,t턎ý±oß,_~ï¾»C†„a̘psUÙÜ{÷îÅÝ»wVesP&ûöíðaèX54JïY j7  YÅB*"9™ÙÜÐÍM„Ç5ó||}@Áýû/Ñ´©›Æñ~ýšá»ïŽâ»ï ysBpíÚtêPY·¦A§Nxÿý&˜5ë Ú¶õµµy•ÍU›àñ8øè£Öˆˆh;.bÍš3ضíÞ{¯>ý´Z·öª’yðwïÞ*›Òpa±X5½„*ƒîYéAWè: ™,•Ú2Ü€€2IU›ÐÅÅVVf:7ø{÷Eaa1NžŒƒẊ»»W¯&TÂégÁ‚þÈÌÌÃÒ¥¿Wù\µ ƒO>i‡˜˜ÙصkŠŠè×o%Ú¶ý7þ…ÜÜ‚š^"…Ò ¡b¥‡Ò¡ë¶¶VÈÈÈUçé”-¹ää$d„®J±JJz«Îf³àí-Ñ)V"mÛúàСk€æÍÝqåJBeÝ–Nm0sæûذánÞL¬òùj#l6 íÛûbÛ¶Ñ8|x"üý0oÞa´i³‹Gb¢f - …RõP±ÒCi7  ¢³òºT*Ä›79Œ¿ÀÝÜD(.V 1Q39X¾®;t:"¢Ξ½ƒW¯2Ѭ™;nÜxR-Ň kƒÐP7LŸ¾·ÁW0oÙÒ›6Ä… ÿAïޡضío´ný:t=Nœ¸Y%ÉÚ E;T¬ôPÚ (*ƒT‰ÀÊ’KLË `¶·WmÒë _×L VñÁM Za×®´hᬬüjiIÏf³ðø}û¶mû»Êç« ¸»‹1o^\»6+V E^^!FÚ‚-¾Å¢EÇiè;…R P±ÒŸoŽÂÂb«#ñJÄʺL€…²ŠEéöô¶¶V,u†¯«"µÁãqЯ_3ìÚu ¾¾N°±±À?ÿ$TÖ­éÅß_ŠQ£ÚcѢ㴠o)Ì͹èÛ·)öïÿçÏÏD¿~M±}ûѦÍtï¾k×þÉøükšTú†{UŒYsTǺ)U +=¨ºgeåi+>ÒÒ²Õ{X"<G#ÈÂÍM¤µF`éˆ@] Ü OŸ¦ââÅ q­– ‘‘ÝaooéÓiÄš6<=0{v/\»6;vŒ¿¿Ë—ŸD‹ߢOŸزå<^½ªÙ$k[[[|õÕWÕ6ߣG ‹«m¾š¦ªî·¡=GC¡b¥>_%VùàóÍÁå²Õb%óQ\¬ÀÛ·Ê×l6 ŽŽ ±rwku¹ºŠ`aÁÓ+VþþR4kæ†_Uº«Ë²”]W¬Š3gîà—_þ[móÖ5x<:u À²eƒqëÖ|:4˱lÙI„„ÌAÇŽ?`Á‚£¸|ù£*u ‹±páÂj›O¡P 5µr›…Öfªê~Ús4*Vz(-V, B¡ÒÓK,+áëÚ"µ¹•ŽZk–fðàÖøí·XøøHR­­.š5sÃçŸw·ßFÑ}àpØhÙÒÿ÷}qùòlÞ<¡¡®Ø½ûúôYbÁ‚£ÈÌ43j\…B•+W" 666 ÃÙ³gÁb±@ÁÚµk@€N:áèÑ£`±X®¯èèhÞžžØ¾}»ÖùT×EEEÁÏÏŽŽŽ˜4iòóóçB‰¤¤¤ uëÖ'''õ9oÞ¼Áˆ# ‹!—ˉ¼¼¼r•¦ª× ………˜6m$ 1mÚ4âÈ‘#ÉdHOWFîÚµ ¾¾¾ÈÎÎÖ¸_Õü§OŸ†««+.\¸€£G"44VVVJ¥ê?ŠŠŠ0wî\¸ººÂÁÁÇÇ›7J²¶çH@(:IN~C¤ÒÉäÊ•G„BÚµûŽ,[ö;ãXLÌCõùcÆl%£GoaŒñË/Ÿ¯´Ž?aÂ2dÈ:½kÈÊÊ#>>_‘Ÿ>Ed²)ääɸ Ü‘ñ‘÷Þû‘ôêõ)**®Ö¹ëwï&‘•+ÿ ½zýD‚‚Æ‘ˆˆƒ¯]·nqtt$$/^¼ ÇŽ#r¹œ 6l 2™Œœ8q‚¼~ýšœ:uŠx{{äþýûDõ+ž••EÌÍÍÉÚµkIRRÙ´iár¹$++Kc>Õuݺu#ñññ$&&†x{{“yóæ©) IBBBHJJ ãºÒ 2„tîÜ™<|øÄÆÆ’F‘yóæé=VÝë&„~øôïߟ<}ú”ÄÆÆ’¦M›’3fB>|8ùøãIrr2‘H$äÒ¥KZïWõº{÷îäÌ™3$))‰˜™™‘‘#G’ÄÄD²cÇ€¼zõŠ,^¼˜‘ØØXróæMÒªU+©ó9 ²gÏ“®­åì¥b¥‡ÌÌ<"•N&gÏÞ!„òÁËɼy‡ !„™l ‰Ž¾¡>ΜCäý÷—1Æ8wî.‘J'“ÔTÍ_®Ÿ>Eš7ÿ¦ÜuLº›¼óÎ÷¤cÇ…ä»ïŽVä–LâÞ½$âîIÖ¬9[ís×Gúõh”X‘­[·2ÞÛ¶m@5jDvîÜÉ8ö믿jˆUZZáñxdÉ’%$==( ’™™IŠ‹5ÿQ]«~oÏž=ÄÛÛ[}lúôé¹wïžÆu* ‡Ã!qq%`CNNbc«¿›Í¢EqÿþK¬_ÿgµÏß9r$¦M›†¨¨($''ãĉ˜1càóÏ?ÇôéÓqòäI¤¦¦âÌ™3˜7ožFN‹ÅB·nÝpàÀddd   <VVÊ”Œ7âí[¦Wà‹/¾ÀƒpåÊüç?ÿÁСCÕǬ­­áçç‡3f`ܸqŒÀˆ¬,eÇÇ~ˆI“&áñãLj‹‹Ã×_!C†è=VëîׯfΜ‰'Ož 66áááXµj Fމ‰'b×®]øã?͘Ou¿eÉÏÏGAAÌÌÌ››‹¹sç2331lØ0Ìš5 qqqˆ‹‹Ã„ ðä ³o®q,5쇬õ´m»€,_~’BÈ’%ÇI‡ ÕÇÆÿ…Œ±Qý:!!…H¥“ÉõëOc ¸šLº[ëøÝ»/%_}Pë±Ò¤¤dWשÄÏo&Yµê´)·R)lØpޏºNÕ¸GŠáDDDµgUPP@¾ýö[âááAø|> SïK“eË–///" Ixx8‰ŠŠ"{{öì!^^^ÄÌÌŒøûû“¨¨(õ1üo/…’=“7777"‹ÉĉInn®Æ˜¹¹¹Ä××—Ì;—’víÚ>Ÿ¯>ž––F† FD"‘J¥dÊ”)$77Wï±ê^7!„dddO>ù„ØÙÙ‘HDÆŒC²³³ÉŠ+H“&MHAA!„C‡©TJÒÒÒ4îWÛ^ÓÒ¥K‰½½=qqq!«W¯&ƒ&ŽŽŽ$//DFFggg" ÉàÁƒIzz:!„h}ކ‚z¼gEŪÞ{ïG2~4!„Ï‘9êcsæ"|PP‘—WHœ§ãÇccLº›DD¬Ò:þ”)»È€+ ZË_ì$¾¾3ÈÇo,ÿä*däÈM¤Y³y$-M3h„R>ÆŠ•6T_ŒÑÑÑäÆŒcû÷ïWTdìºF]]weRŸÅŠºËA °@f¦²xmé<+@å,1ÕÍ͹‰¬Õ Uxxˆñø±ö<¥€)îÜ1,haôèÈÌÌÃÅ‹ª=Á´4Ë– ‡ÃÆ´i´ºEM‹¡C‡âÚµkÈÉÉALL fϞѣG×ôÒ(”J…ŠU9ØØX #£dϪ  99ÊÊêe÷¬@&³Ó¨çî.FRÒäåjŒ EZZ¶A¥y5’! À ™™yåeT%%V¬‚“'ã°u+-v[“LŸ>½{÷FŸ>} ‰0jÔ(Œ9cÇŽ5yL@P¡ëkŠººnŠaP±*ÀR`ag§ÜÔU•X‹ùÈÍ-PG ʈÀçÏ™båéé…‚h ²ð÷WF*ݽ[~|öYÀ‰7¼“Ê¥eKOL™òæÍ;Œ[·ž×èZ"ÞÞÞ „€Ëåbþüùxúô)rssqëÖ-DFF‚Ë5½ ¸££#Ö®][‰«­êêº)†AŪøü˪l›`XWÎÎvn@ww1X,–Ö’Eb1b1ß`W`¯^!03ãâСëÆßL%óÅ]Ѳ¥'ÆŒÙVn®…B¡T*VåPzÏJUy]µo¥«²¹VeÝ€––fptèÜ·ò÷w68Ù–Çã yswÜ¿ŸŒüü"ãn¦’a³YøùçðömæÌ9T£k¡TŒòZh˜Òbƒ¶å¨šçÚP¡bU|¾…ºç”­­X,V©Êë6`±XŒ ™Ì¯^eht‘õð#!áµÖ9Œ ²€?n…‚ÔŠæˆNNB,Z4{ö\Ftôš^ÅDª»ˆ©Ôµ¶uå¹Ö¨X•ƒ@PâärÙ°¶6S‹Ç@`ÉpÊd¶(.VàÕ+fÓB½ññÉ·‘ïÜ9l6 ›63å–*=‚1bD[Lº»ZºS*Ÿên'b*u­-G]y®u*Vå`cc‰ìì|u¨¸f ~™=+eÇ`Í}+‘Î6þþRäåj ÀІ••¼½ñìY:®^}RþÕÀ7ßôE“&.6l}µ¶1¡è†Ð>DÕÎbëÖ­jwTqq1/^ ___ØØØ mÛ¶¸té’Ö9b[Žêx®-Ôd–W]àÌ™;D*L23ó!„tíº˜Qù¼_¿dÆŒ}ê×EEÅÄÅåKrøð5Æ8GŽ\'2Ù’—W¨1GNN>‘ɦ£GohÓÅ7ß&žžÓÈçŸo7ö–ªŒôôlÒºõÿ‘ˆˆU¤°¶ÑEe$‚!íCTí,nܸ¡N¨]ºt©FKggg­ · ±-GuDÕ΢4Ïž=ÓÙ’D ©-Gu>WJ T¬ÊA%Vªˆ@{{k¤¥•ìÉZÅÂÚÚ|=AÎF‰•ƒƒ ||$ ’aóæóê Ú@ß¾M1n\G̘±7n<­éå4X i¢jgQwww-ItÑÚrTçs¥”@Ūll,”+>ÒÒ²ÕÇËö´´[Vàîî 3|Ýß_Š'OR›[`ðÚ¼••‹…;þkðuÕÁ¬Y=Ѧ7FÞ‚”pQÚ>¤,ãÆÓhI2gÎõñ†Þ–£ªž+¥jÚYÛQ(D.ÿ’DE]'„²~ýŸ$$d®úøÉ“qD*L²³óÕïmÞüiÔèk±&Oþ• ´Fë<¼$RédrãÆSƒ×u¸¸|IfÏ>Hš4™­5x£&yý:“4k6DD¬"E5½œZCuíYÓ>¤ô뢢"²xñbâííM¬­­IXX‰‰‰QGoËQUϵ2@=Þ³¢be~~3ÉÎ !„ìÛw…¸ºNU»ví ‘J'“'OJ¢œNœ¸Iœ§ÜÜÆ8Ë—Ÿ$­[ÿŸÖ9 ‹‰»{$Ù½û’Áëzù2ƒ8;O!‡]#îî‘ä×_/s[ÕBlì3âíý™<ùW¢P(jz9µ‚ꫪhR–†Ø–£:ž«©Ôg±¢n@(]yÝÞÞ……ÅêZx%õ™U,!HNfºJ<<ÄHLL×ÚžËe# Àqq†…ut´§§nß~Žþý›cõê³P(j®uˆ67–cëÖÑ8xð*~øá·š^Nƒ‚¶©ès­L/ÍÜ€,JU^·¤§gƒÏ7‡X̤¦jK ~w÷’.(.VàéÓTxy9jÌèltó6m¼qñâüôÓìÞ} 'OÆ!<¼±q7XÅ´më~ˆÀ—_î†Tj‹?n[ÓKª7”·O2kÖ,ôéÓ¯_¿†§§g…Û‡”¥¾¶å¨éçJÑ„Š•ØØXªC×íí•b•–– {XXð X0úQÙÙYÁÒÒLkõuxü8E«X9ãèÑA1¸¸eX˜v튣£áá±bŵN¬`РVxü8³g„››;j†öRŒ‡ЄsþüùU6}mËQÓÏ•¢ u€¹:PeY•Ž”H„xù²ÄåÇb± • ñâEz™q, óuæZÉ‘‘‹ÄÄt­Çµæ¢"®^MÀ„ qýúSÄÄ<4øúêdÆŒèÝ»)ƌي۷ ëßE¡P(+ƒ°±±T‹•@`ƒôôÒb%À˗̵ÎΚ¹Vàæ&Ö“ì ‹e”+P"ÀÃÃ/>@Hˆ+Ú¶õÆêÕg ¾¾:a±XXºtš4qÁ!ëµ> …BÑ+(`(Ý|¥-+GGM±’Él‘”¤ùeìííˆ^éœÇÕÕ·ngu„…yáâE¥55fLGœ9sññµ³ú9ÇÁêÕÃanÎÅèÑ[“cx^…Bi¸P±2›’Œ€21¸<ËJ.·Ã³gšî×ËË„<~œ‚ÀÀ’úi*‚‚dxöìwddäA °0h}R©-ÜÝŸxñ!ÚµóE×®A qÁ’%'°eË(So»Ê bÏžñ0`ÆÛ†õëG€ÇãÔô²ªœˆˆˆš^¥ž2hÐ ´jÕª¦—Q%P±2€Ò¡ë€Ò²JH(i”èè(@Q‘iiÙê$a¹Ü˜˜Î+p¹l<|øJ§XBpçÎ ´jåið[·.Ù·€/¿|ÆmÀõëOêjøÍV3ɰcǧÿ|;Ö¬®üúJDD, ÅHê÷·B%accüü"u割•×%0ZÙ;;Û‚ÃaãÙ3¦+Çã@.·×¹o%“ÙB(´2:9¸uk/\¿þyy…€ÎÑ´©–-ûݨqj‚æÍ=°yóHœ:u ‘‘{ Êq¡P( *V (+¯¿}«´®ì쬑ž^ÒÓÊÑQ)V¥Ë+ñx8: ´æLyz:àáCíÕ×Y,¥FGvèà‹üü"\¾üHýÞÔ©áøãÛ¸zõ‰ž+kíÛûbݺqðàUÌž}¨¦—C¡PjT¬ ÀÖV)V*W Ó²âóÍammΰ¬ÀÅEwEeGJ$Bx{;âüù’¾Bï¾ë–-=ñã'Œ«¦èÖ­–,ù[·^ÀO?ªéåP(”Z+PYVªÁööÖÈÏ/bäi´ÓpJ±zôH¿Xݹ“„¢"…QëlßÞ.Ä3Þ›2¥þüón­­jQ–ˆˆøþûX´èxY …RõP±2•X•¶¬€²%—:,+í¹VyŒz‚¥ tFAA‘^ëKíÚùâæÍDµ¨@‡~hÕʳVç]•eذ6X½z~þù̘±¯ÖU’§P(Õ+àóÍÁå²Õ{V"QIåuº,+ín@Ði]ùù9Çã]?¯m[o°X,ü÷¿ïùå{¸p!^ãýÚLïޡظñìÙs“&í4ÚʤP(õ *VÀb±`cc©«Ò•×Uh³¬är{dfæáíÛÆû‰ÖÖæ:-'33îÿúT'V%7–k¸Û·÷E³fîX¾¼îXWеk6m‰ß~‹Å„ Ûµö£P( *V"–äZÙØX€Ëe—[rÉÅÅ4Ê.±X¬ÿEêvó5iâ‚ØØgF¯³];F…Н¾ê îãÌ™;FY“tê€_‹3gî`Ԩʹ4…Ò@¡be Ba‰eÅb±`k«½˜mé!™Ì,KOD öðu@Ùa766Ñ蜣öí}ñðá+"ºíÚù <¼1æÎ=\ç,”Ö­½°wïgøçŸ ²ÙÙù5½$ …RÍP±2À’áÎÓV̶°°˜Ü`nÎ…ƒ_gD >˪qc9Þ¾ÍÑz­>Z¶ô„¹9W«uõõ×=ñôi*víºdÔ˜µWlßþ)ââžã“O63ªàS(”ú+±µµÒ(¹”–V"Lª*Ú\Ú"½½ñôiªN+'(H‡›7Z§¹9Í›»kì[Êdä¡CðdÉqF­ÃºB³fîØ·ï3ÄÇ'¡OŸŸr …Rw¡be %Þ¼)+±Ø©©%¡çÚJ.€L¦=1ØÓÓEE <}šªq ¬­Íáéé`´XÊvm– Œ ,((ºu=nm qc9~ÿ=ff\¼÷Þu*‘B¡˜+)`(Ã×SR²J·‚¹9W«e¥Ë Èb±Êuš*V/_¾ÕÚäQ$âã³Ï:cõê3Z›CÖ$öîý ÁÁ.:t=޹QÓK¢P(U + -ûQJË*‹qŽî\+M7 ••$ήÁ€R¬þý×øˆÀ–8^ÓcÇv„HÄÇ?Öþ"·º,°}û§0 9Æÿß~Es±(”z +ô[V€n±zó&Gk@€——=Òì‚´´l¼xaœÄá°Ñª•'þþ[»+ÐÜœ‹iÓºcϞ˸{7ɨ±k<‹ ĪUC±}ûE|ðÁrºE¡ÔS¨Xˆ*ÀBJ.Ù ==ÅÅ%ÍK$¼~­=×êùsMëÊ×WŠ{÷’uÎÙ¨‘ l6Ë$W`ÇŽþøë¯{:8 hŽ  ,ˆ6zìÚFŸ>M5 ¹èÕëgF_/ …R? be %ŠŠÈÎV¯‰øP(£UˆTj‹/Þ2®“Ë•b¥-ÈÂÇG‚û÷_êœÓÆÆnnb“ÄêÝwý‘••k×´·a³Y˜=»NŸ¾£Ó]X— tƉSѼ¹;""VáÛo£h1…R be B!³˜­X¬ìþ›’R(• ‘œÌtÙYY™ÁÎÎZ뾕¹®ÃÒ›dáî.†››þyWç9mÛzãwü°`ÁÑzQ,V °À† #°fÍpìÙs:,¤V…RO be *±R%«Ä*5µ$1ØÉIˆ—/34¾øÝÝExò$EcL__ èµ®”•,Œ²”×Ï»§÷œï¿ï»w“°eËy“æ¨ôì‚ߟ ;|øáj,\xLÝA™B¡ÔM¨XHÙnÁ¶¶VàpØŒ\+''! ‹5¢]]ExòD3ŸÊÁÁ¶¶V¸_÷¾Up°/_fèµ¾tѱ£?bcŸi¬§47®#-:nÒµ¹Ü{ö|†9szcÓ¦óèÔiþúK¿pS(”Ú +±µµP"VvvV !J…˜ííÀÍM¤3ù·¼}«Æå`±L ²h×Î.h T1yr7ØÙYãûï=Gm†Ífaôèwð×_3èŒAƒÖb„xýZ{1 …R{¡be <––fj±”A¥Ý€R©-h$Ûª,+mEiË+¡Ð ®®ö&¹ù|s„†ºéÝ· æÍë}ûþ©—{ëןêU§qàÀ?˜6-¶‡cÜßmؽ{7òò¨àQê>>>x÷Ýwkz:¡be¶¶eƒù‰ÁÎÎB­n@xú4U«X½~‰7orԮƲ4j$ÇŽÿ5iÍ;úcÑ¢ã¸{7R½ç~óM¼ûîضíoŒýŽIóÕv,-ÍðÅ]ñÑG­ñã'ðÕWû°~ý9|ùå{xÿý&`³u ziŽ=Š?þ¸ŠWK¡T\.……µ7‰º@iY•+Í’KNNšbåìl £5ÈÂ×× €þˆÀà`9ÓõJè¾Ö"¿\W   wŸ0¡3/>Ž—/ß–{~]ÆÁÁ FàôééðôtÀ¸q¿ K—ÅˆŽ¾aPQ‘2‡‹BèOÿÙ³gúÿtm…Š•”m¢­ä’““­†ÃaC&³Ó*V2™-¬­ÍõŠUÓ¦î`±X:|õÁf³Ð¶­Ab'vƒƒ ,¨_Áºðñ‘`Ó¦‘8qâK¸¸ØcìØmèÒe1¾Fk R(µ*VF ­MHY±’J…Z«™ëŠd±XðòrÔ+V<<ĸqã©Ië~÷]\ºô99åžkfÆÅüùýpàÀÕÕ~£qc9¶m£G'ÃÙÙŸ¾íÚ}‡-[ÎôÜ(JÕBÅÊ´µ ÉÈÈeÔßÓæÊ_×k¡¡n&‹U‡~(,,FLŒa‘~;ú£S'Ì›w¸ÁYM›ºaÇŽ18}zÚµóÁ·ßAË–ßbÉ’õÞ5J¡Ôf¨XPX6Є¤¥1s­23ó••ϸVWb0P~ø: lûqýúSb|Y$''!||$åV³(Íüùýñðák¬]{ÖèùêþþR,Yò!þùg.Fz;w^D‹ßbôè-øë¯{&} Åt¨X5£•½¶’Kª\«²Ö•««ÉÉoQP ¹‰éë+Áóço¯qLEHˆÞ¼ÉÑ)xåÑ¥K NžŒ3ø|77fÏî…E‹~39l¾> ñ1eJ7\¾<+WEjj Z‹ n€Í¶¬òù>Bô6blÔHc²+°K—@þ¸ Ú´ñÁ”)»t¶i(ðxôêŠC‡&âôéihÞÜ EnùV[[[|õÕWU>ŠGA,WÛ|5MUÝoC{ŽÕ+#°³³BAA‘zÃ](´ÇaXVvvÊööe#ÝÜ”ÿqµYFnnb˜™qõºÍ͹p6Y¬Z´ð€5þøã¶Á×°X,,^< )X³¦aºµàŒðpyµÌ%‹±páÂj™  RSM³Þë"Uu¿ í9VT¬ŒÀÖÖÔííY,ìí­–‹Å‚““PC¬ ØÚZi+.— q¹ûV¡¡®¸~Ý4±âpØèÐÁ§O.V€²yäŒ=°téïuº«pM£P(°råJÀÆÆaaa8{ö,X,!X»v-!ЩS'=z,KÃõàà`XXXÀÓÓÛ·o×:Ÿêº¨¨(øùùÁÑÑ“&MB~>ÓÕLAdd$BBB’’‚Ö­[œœœÔç¼yó#FŒ€X,†\.Gdd¤ºr‡¾c¥©êu@aa!¦M›‰DGGGL›6 ………8räd2ÒÓ•mzvíÚ___dggkܯjþÓ§OÃÕÕ.\ÀÑ£G +++H¥RõEEE˜;w.\]]áàà€áÇãÍ¥GEÛs¤TB1˜G^©t2‰‹KT¿×¹ó"òý÷Gçõéó3™9sŸÆõáá?’o¾9¬uìÑ£·‘#7é÷îKÄÝ=’™°zBø‡¸ºN%oßæu]q±‚ôí»‚tíºØä¹ë{öì!Æüú¬[·Ž8::’ƒ’/^cÇŽ¹\N 6™LFNœ8A^¿~MN:E¼½½ rÿþ}õÕu±±±Œ5{{{«MŸ> ÷îÝÓ¸NEAAáp8$..NýÞÁƒ‰···ÞcÕ½nBñ÷÷'IIIê×§N"!!!„BÒÓÓ‰\.'ÁÁÁj¡Õv¿eçÏÏÏ'wîÜ!YYY¤¸¸˜œ;wNý¹øùù‘ƒª¯½}û¶ú5«Jg/uPh6›U&ÈÂZ£ ’²c°fN޾ðõ€)Rô& úú:ÁÆÆÂdW ­­š6u7jßJ…››Ó¦uÇâÅ'pïžþœ0Š&=BHHã½àà`ÀÇѨQ#ƱÀÀ@1ìììpöìYÄÄÄ@.—£C‡8þ<ØlÝ¿Æ>>>êûûû#1±¤ÕÌ•+WбcG|÷Ýw:¯ùò%Š‹‹áåå¥~ÏÛÛ‰‰‰zÕĺ •JÁb±Àb±ÐµkW<~ü€2Pe̘1¸uëÆ¯sÞÒs€™™âããŽfÍšaëÖ­êsžüðCLš4 ?F\\¾þúk 2DﱚXw¿~ý0sæL `ff†ÜÜ\Ì;™™‰aÆaÖ¬Yˆ‹‹C\\&L˜€'O˜õ;uK1švDÖ5Þ#Hb÷îKÄÃcãœ+W©t2yþ<ñ~BB ‘J'“«W´ŽÝµëb*޹Näò/Ivv¾‰w@HË–ß’%KŽ›|ýòå'‰‡Ç4rçÎ “Ǩëëã/(( ß~û-ñðð |>Ÿ„……©÷¥Š‹‹É²eˈ—— …$<<œDEE½={ö///bffFüýýITT”úþ·—BHÉžÉÆ‰››‹Ådâĉ$77WcÌÜÜ\âëëKæÎK I»víŸÏWOKK#Æ #"‘ˆH¥R2eÊ’››«÷Xu¯›B222È'Ÿ|BìììˆH$"cÆŒ!ÙÙÙdÅŠ¤I“&¤  €BÈ¡C‡ˆT*%iii÷«m¯iéÒ¥ÄÞÞž¸¸¸Õ«W“ÁƒGGG’——G"##‰³³3 …dðàÁ$=]ù;¯í9ÖfêžU­^]mdÈudòä_կϜ¹C¤ÒÉŒ»gÏÒˆT:™üóS” Šˆ‹Ë—äðákZÇž4i'}:z÷î>}ú@$aÔ¨Q9r$ÆŽkò˜ B××uuÝ”ª‡Š•‘ØÚZ•‰´‡ÃfXV “ÙáŠ;VxüX»X©ÚΗÞ¢….]z¤÷}XXðо½¯Q…mµÑ¹s >þ¸ fÎܧ3Ê‘¢oooBÀår1þ|<}ú¹¹¹¸uë"##ÁårMÛÑÑk×®­ÄÕVuuÝ”ª‡Š•‘ØÛ3-+‡ {{k¼~Ít©Édvxþ\Ó²òðãñã×ZÇ–Jm!Xâî]ýbÕ¼¹^¾|«U ¥G`œ9s§ÂçÎí™ÌãÆýÒà‹ÝR(”ªƒŠ•‘ØÚZãÍ›F?#ƒÅÊÝ]Œ´´lF_¬ÒøûKqï^yáë.àñ8øçŸÇ&Ü’nÝ‚PTTlT+m˜›s±zõ0ܽ›„3ÝP±2;;+)ÍÁ Îζxþ\Óòñôt½®Àòr­,-ÍàŒþI0rõ%ØÙY£eKOœ8qÓä1Tøù9aöìžX¹ò4Ο¯ðxŠ.hK† +#±µU&2–v::ÚhìYÉåvHOÏÖp³Éåöàñ8:ƒ,üü¤åº ysw\½š`äꙄ‡7Æ©S·*¥uýˆíÐ¥K&LØ¡aeR(•méÑp¡be$vvÌ6!€²½}YËJ&³}%.— ™Ìiß·ò÷wÂÛ·9HJÒ¿Õ¼¹;ââž#7×ô=§ððÆxû611LC‹Å¢EAÁŒûhÛw#0¦- |Ö;wîD@@ìíí±hÑ"@qq1/^ ___ØØØ mÛ¶¸té’ú:}í/C¨ {Vµzuµ•/¾ØI†]Çx¯Y³yA{÷^&îî‘ZƒÂÂæ“¥KµççWש$*êz¹kéÙó'2sæ>#V¯Iaa1 œEÖ¬9[¡qt±víY"“M!'OÆ•r¡ürW ´¥Gý ü¦¦P¶˜- tjsæçi´½ôY˜™qáååˆÛ·Ÿ—»–-ÜqåJ‚á‹×—ËF·nA8vìF…ÆÑÅØ±ÑŸ¾÷↓’9(Jý†Š• ØÛó‘šÊŒüspЬ+ÈBWÉ% tÆ­[å‹U³fî¸{7‰QþÉúömŠ«WŸTxÿK FÀÛ[‚Q£6#3³á\¨"ÞtýÔUêkKúúyÕe¨X™€Hd´4¦µ¤+fÉ%gg[°Ù,­BtW_Tbõ¢Üµ4mê†âbbcŸ¸zí´m뱘cÇþ-ÿd07çbÍšáHIÉÂÔ©»¡P4¬€ ò¿ˆ7]?u•úÚÒ£¾~^u*V&`oÏGFF£%†67 ǃƒ@G«½áëÉœüV« ±4NNB¸¸ØãòeÓû[ÊV'=z#*êz…ÆÑ‡››;wŽÅéÓwðÍ7QU6…B©P±2‘HY°´uåàÀ×Ú&^.·Õ™ è_ RæS²oæ…‹–¿ðrèÙ3qqÏõZ|%4ÔË—ƦMaË–óU6…B©_P±2‘ˆŒ}+ÒÒ²5êêk%“ÙËeëÜ#‰øH¹[µòÄÕ« n~æ‰Dˆ#Gª&ÐBEÏž!˜>½æÌ9ŒS§nUé\ ¥~@ÅÊìí•–UjjiËÊ„½,]bÅãq —ÛãáÃW:ç ’áömCÄÊ 99¸y³b%“Ølzô®r±€‰;£wïPLœ¸“–d¢P(å­éÔE„B+p¹l¤¥•XV‰²ŠÅË—H„ê÷u•\ <Ð/V†XžžHˆ‰yˆ¦MÝ ½ ­ôê‚-[Î#>>¾¾å·K0‹…¥KaРµ2d=¢£¿€““°ü këׯ¯é%P(æêÕ«5½„r¡bel6 ¶¶V ËJõE›œüÁÁ.ê÷e2;¤¤d¡  ffÌÇíã#Á_én+äŒ5kÎ ?¿ææú?ª-ò''F®•‹‹=è+Gääh”¹X––f%·ní…·ospï^Å÷zõ ѝp÷nù"YˆD|ìØ1‰‰é?þé/àK¡PT¬LÄÞÞZ‹X 5,+ …VZÅÊÛ[:ƒ,86¤E8C °DLLÅCØ›6u…‹‹=¢£«>ÐB…»»›7Ä… ÷1{öAB/)J T¬L¤¬PŠÕË—o5Îuq±Ó*VööÖ°³³ÖdahÙ%6›…-ÜqéRÅ’ƒeðC÷îqôhÕT³ÐE³fîØ°a~ý5ÿ÷Gªun …R»¡be"ÚÜ€‰ÉÉçººŠ´Š tê _ T†¯bi´jå…˜˜åžg-pÿþK\»V½~ìN°mÛhlÞ|sç®Ö¹)Jí…Š•‰hsJ$B$'k³¬ìuŠ•··£^˪Q#gdfæáéSí×—¦U+O¼z•Y)Åhƒ‚dpÆÿTx,céØÑ«WÖ-ç±dɉjŸŸB¡Ô>¨X™ˆHÄGzz#úÎÉIˆ7orŸ_Ä8·"bà 6›ePrp“&.°°àUŠ+ú÷o†C‡®¡  ¨ü“+™=‚1~,[vëן«öù)J킊•‰ˆDÖ(.V0 Ñ:9 AÑØ·rq±GJJrs5ò½½‘œüÙÙÚ[|X[›ÃÕUdP@33.BC]+%ÈPŠUffNŸ¾S)ãËðám0gN/|óM, ¥CÅÊDìí•É«¥ƒ,œœJªX”ÆÅÅ„èʵr!¤œ}+ÃÚ…Ê}«Ê²¬$!ÚµóÁþýW*eW†0thfÍúK–œÀêÕgjt- ¥ú¡be"<66æUÖœl5Ü€€ÒºJLÔ¾þàÁKs5iâ‹…›7Ë·®ll,Ф‰+Ο¿_`ee†î݃k$*°,Ÿ}Ö _ÝóçGcÁ‚£4q˜Bi@P±ªöö|†e¨r­4]púr­¼½õW_·µµ‚\ng°+°}{_\¸oй†0`@s\»öDï«‹Ï>넟‚õëÿÄèÑ[4"/)Jý„ŠU‰´—\Ò^ÅÂOŸjï ìííˆG^ë-BÛ¤‰ bc ëWÕ¦7žXŽíÛk×ú(Jå@Ū誼h&»ºŠÀb±ô–]Ò'VB¡\\ì «¶m}ðòeF¥E ÒÇŽý«!Ð5½½5ví‹Y³zâë¯bĈMŒÊ" ¥îCŪh/f«¬b‘œÌÜC±°àA,æë+OOýbdѤ‰ ‹J ìÝ»),,xØ¿¿æÃØËÂb±0zô;سg<þý÷)ºtY‚«WkwçS …b8T¬*€½½5òò ­Øíí­afÆÕÚ*D_A[??§r;óË ¶¬¸\6ZµòÂßWNË@™sÕ§OSìØq±Öæ8µní…cǦÀÉI€ˆˆUX»öOÓÎÃJ]‡ŠUptTZQ¯_—=°X,H$­áëú"ýüœ’’¥×Åì‚ää·Z8´Ñ®.\¸_©_ÖC†´ÆÃ‡¯pùòãJ³²Q†ÙOħŸvÀwßE£W¯ŸÊýC€B¡Ôn¨XU@J 3BOÙ×J[Fýbññº+YËÿWÉÂ0W`»v>ÈÈÈ­Ô(¹à`4n,ÇÎ+m̪€Çã`æÌ÷qêÔ4@·nK0{ö!†L¡PêT¬*€X¬¬X6œÜÉÉxËÊÉIàÿÙ;ó¸(«ýfdG†f†aGÉ…ÔÜÍ%—B3—RÛîµ\º¨h™VÚOo–·E/¦•^ÓBÓ$´kšb.…¢¨.l"Š((‹#Ûœß\Hdž™çY8ï×k^/fÎs¾çû<È|<ç|Ï÷Û W¯ÞbÏÁÁìƒ,epq±Ók;ИXvß¾ ¸w¯ã1¸bïÞ¹˜??ÿùÏIŒû/£W?¦P(퇊U;°°ÂÞ¾[‹e@@ûÌêÞ½¨¨Pi´çï,íËU\‚,x<¢¢”z;ÜÄ„ ½Àçó:D¾@6ˆD¼ýöüúë?`i)ÂØ±ŸaîÜíô 1…bFP±j'..¶­ÄJ&s@qqëlÞÞ.€k×4—pÕº 4.ñÍ4.¦¤ä¡®®u]ØÙYaìØplßž¢7›Æ 0P†ýûç#>~RS¯¡_¿•X¶ì'£¥kZ´hx<}Ñ—Á_–––8yò¤Qþ] ¡©0w\\ìZíY)N()©@}½B!¿Åç"‘ùùwг§{+[þþR8pQëxaan()i ²h “ׯ€~P©jqî\úôñayWº™6- §qöl>"#½ôf×Ððx<ŒŽ‘#{`ëÖ“X»ö¿Ø³ç,,ˆÆË/hñûÒ7ùùùèׯÞ~ûmƒA¡À¤I“pãFçÊèBŪ¸¸Ø·šYÉåŽhhP£´´2™cóçB! …òó™gVwï6F:;Ûj¼¦GÆ ‹ôôë>ŸgqÝÝÝcÛJg†.¶»Vry£@·Þñök+¬‚,ØFÀСA8räëëÙ2cÆ“øé§4”—›®Šp{‘Jðé§/àСX(•RüýïÛ0dÈìÙs–žÏ¢P:T¬Ú‰¦e@©Ô7n´+//f±’Jàèh­U¬€ÆjÀ\"ÚÄùó×õ.*/¾Ø––BlÙbþkãAArlÜø’“#,ÌóçïÀSO­FBÂiÔ×SÑ¢PL «v¢)ÀB(äÃÅÅNãÌÊÓSŒü|Íu­ÀÏOЬ,vbÅ6‹ÄÀþàóyz«ÜD·nxñÅ~øöÛ㦢ŸŸ_|1))Ë0th–.Ý^½–cÕª}(*b.áB¡P «v"Û¡ºº¦ÕaS…ÂQch´——3nß®`<œàªsfá‰{÷0F>Ž""šgEþþ®(/¯n%~" ªÀ¹sì÷­† ­[÷qåŠv!l ¯¼ò22n %%Wï¶; BLœ‰¤¤ùøõ× 0P†wÞÙž=ßÃßÿ¾ ‡_ê0{[ŽŽŽX¼x±ÑÆËË˃X,6Úxú¢¸¸Û·oÇ¥KÁGLÏÍ\ﯳAŪ0¥\j«Ö3+KK!¤RÆ%<ÝЫ—ÒÒØ/Gõèá±ØÖ K½{{#"›7Ó»íŽHnøôÓpáÂX½:wîT⥗6£W¯åX¶ì'œ?oÚeB±XŒÕ«Wm<µZ»w™÷a;**Uc&ÌÏÍ\ﯳAŪ0¥\’ËQZZ©1s„··˜qf%•ÚÃÑÑÙÙºƒ,._.†JÅ.1+ŸÏÃSOD¬`öì§ð믌˛KLšÔ;wþ+±hÑ(¤¦^èQëò.æÎÝŽC‡2Q[Û¶àµZ/¿üAAA°³³CTT’““Áãñ@A||<‚ƒƒaoo¡C‡bß¾}àñx­–°’’’+++øøø`Û¶mÇkê—˜˜ˆ€€H$Ì;555-®#„ 66ááá¸sçúõëpuum¾æÞ½{xùå—!‹áææ†ØØX<|øPgÛ£Ûo¦¥?M÷WWW‡… B*•B"‘`áÂ…¨««k¶qøðaxxxàĉ}¦´Bi7~DÖ®=Ðâ³´´"“Í'……w[]ÿöÛ?I“60Ú7îs²xñN­cÜ!2Ù|rêT.k?wíJ%ÿ UUY÷aKmm=éÕkY±b¯Þm›.’Õ«÷“!CÖ™l> ~‡ÌŸ¿ƒ 6ÄÄݶ³qãF"‘HÈž={Hqq1Ù¿?qss#ȦM›ˆB¡  ¥¥¥äСCD©T$;;›4ýiWUUKKKOnÞ¼I¾þúk" IUUU«ñšúEGG“¬¬,’’’B”J%Y±bEs›Z­&±±±$<<œÜ¹s§E¿G™:u*6lÉÍÍ%ééé$44”¬X±Bk›©ý~ô=ÓÏM¬Y³†<÷Üs¤°°¤§§“^½z‘¸¸¸ækŸyæräÈþ$!!Á$cˆT¬ôÀĉ_¸¸]->»uë>‘Éæ“””Öbòùç‡Hß¾2Ú[´h'?þsㆅ-#6aíçíÛD._@Êd݇ ÿú×Aâç·˜TT¨ bß)-­$;wž&3fl"ÁÁop«²eË–Ÿmݺ• ¡¡¡dûöí-ÚvìØÑJ¬ÊÊʈH$"k×®%åååD­V“ÊÊJÒÐÐÐj¼¦~éééÍŸ%$$¥RÙܶhÑ"€\½zµU¿&jkk‰@ ÍŸíÙ³‡(•J­m¦ö›‹X’›7o6¿?tè ×è‹)èŒbE—õ€¦”K..v‰Œg­nÜ(gL.ÛX5Xw DD„'§ ;„†* ¶8ujêêpÚ öͱØ11½±uë+Ö\†‰¼¼<„‡‡·ø,,, ››‹ÐÐÐmÁÁÁ­l899!99)))pssàAƒpüøqðùÌú~~~Í?¢¨è¯l)©©©úè#Æþ%%%hhh€¯¯oógJ¥EEEZÛLí7òóó!“Éš×Ëtº IDATÇ>×®ýU400P/ãPþ‚Š•Дr‰ÏçÁÕÕAãY+oo1ÔŒµ­üý¥¸ÿA+›Ó«—'ΞåV›iðà@ƒ‰•Xl‹éÓŸÄ—_þ†‡ë 2†9Ããq;6 P(páÂ…Ÿeff<==›nâòåË­l¨T*¨ÕjìÚµ eee˜={6ÆŽ‹²2fáÌÎþëðxVVäryóû¤¤$ÄÇÇã‡~@rr²ÆþR©yyyÍŸåææB¡Phm3µß\‹ÅÈÎÎ!„”——#%å¯*"‘¨ÝcPZBÅJhJ¹4Y0¥\À˜vÉϯ©j°® ܼy·nµ.ôÈÄàÁÈË+5X Äßþ6÷î©ðÃtvÕ^fÍš…… "11·nݘ3g-Z„ƒâîÝ»8räV¬XÑ*@€Çã!::»wïFEEjkk!‰`mm ؼy3îßoùïgÞ¼yÈÉÉAjj*–.]ŠiÓ¦5·ÙØØ qqqxã7ZFTUUhü¢ž$nno“}ûγöµ®®Ä‘-[N°îÕE‹v’ÈȤ¶¶Þ`c˜#111œö¬jkkÉ|@¼½½‰­­-‰ŠŠjÞ—jhh ëÖ­#¾¾¾ÄÁÁŒ9’$&&—V{, Ä××—XXXÀÀ@’˜˜ØÜ†ÿíqò×ÞÌæÍ›‰§§'‹Åä­·Þ"*•ª•M•JEüýýÉòåËI]]0`±µµmn/++#Ó§O'ÎÎÎD&“‘ •J¥µÍØ~³Ý³ÒtdæÌ™ÄÉɉ8;;“×^{TWWkÜß2è„{V¦ª€ƒ3ˆL6ŸTW×´ø|åÊ$½VcŸ1cÖ‘eËö0ÚŒ‰Ù@æÏß¡sì!CÖ?ü™“¿/½´™Ìšõ5§>\(**#ÿ ?üpÊ`c˜#\ÅJM_†IIIäüù–ÿIùñÇIxxx»m›æê·!éŒbE—õsÊ%@c…¶¥¸923uO㚢£CpôèUÖg´¸¢P8aâÄH|öÙ¡“Õ¡³‘žžŽiÓ¦!-- <@JJ –-[†W^yÅÔ®Q(Š•`N¹ä„²²jÁ^^b\»VÊh3(Hެ¬åè{õòÄ… ×9‰Btt(jjêpâ„~³°?ʼyÃqýzöï¿ ûb g-Z„qãÆaüøñpvvÆìÙ³1kÖ,¼þúëm¶iooß®þ¦Â\ý¦pƒŠ•Жr‰¢1ÂÓÓ……eŒþBB䨭­Gnîm­cGDxB¥ªÅ•+79ùîC‡2u_ÜF¼¼Ä3¦'Ö­;µZ¿És»2J¥„…B¬\¹………P©TÈÌÌDll,„¶ÿ–H$ˆ×£·ÆÁ\ý¦pƒŠ•Жr €Æˆ@oo1jkë#ùüü¤‰¸|Y»ùûKaccÉé¼ ‚C‡2õž…ýQ,ˆFNN Ì0ØÃÁ6óx[3”wõŒè†~¾ *VzBSÆîÝm`e%ÒxÖÊã)|]󾕅…¾¾ûV8s&Ÿ“¿ÑÑ¡()©Àùó×9õã‚¿¿+† Æúõ‡ 6E<ž]ÜØÙÛ¥3fDïHÏסb¥'4µâñk ²Hì`oß 99%Œ6ƒƒå¸|¹XçØ}ûúp.Ï$ƒ‡‡³A—ÆÙUZZ¡ÁÇ¡´ŸÇ³‹;{û£tÆŒèéùš#T¬ô„Tê qIO¡Ð\× |}]—Çd,Ç¥KºÅªO\¿^ÆyÈDtt~ýõ"§>\ ÷ÀøñxÿýDÁ"n0e%ו…|ß¾}ˆˆˆ€µµ5d2Yó¦®,äLý´aÎÑÍáùv)L9߉xÿý½dÔ¨O[}>wîv2cÆ&}Þ|ó;2uêFF›ÉÉ—‰L6Ÿ”–Vj»ºº†xxüƒìÝ›ÆÉçãǯ™l>)(¸Ã©W ïOÏXòí·†;ˆlèãœUÚ²’kËB^QQA,,,ȬY³HQQùî»ïrûöm­‡d¹ô{s͈n.Ï— ÐsV&$ܺUÑêsw÷îŒ9uϬó¥]¹¢}vemmNŸÎÓzÝãôíë k‰Äb±-23Ù,zãÔ)nb% 0dH ÁÅ hÜ»jhPcãÆ£«+À&+¹¦,äÈÊÊÂÈ‘#‰-[¶°¯­ý´ùÒDG̈nnÏ·+@ÅJOH$ö¨¯WãîÝꟻ¹uGuu Êʪ[õQ*%hhP3&´³ ²èÝÛW®ÜDE…Š“ßÑÑ!8u*÷ï?àÔ+Ö˜3g(âã“QRÒzJ᛬䚲«T*Lš4 .DZZ6lØÀz¼¶ôÓæK1#º¹=ß®+=áêê¸}»å±»{wÐ8»òñqŸÏCn.óR`cÚ%vA„€sûС5’“ S6äQ^yeœœlðé§¿|¬ÎŽ®¬ä€æ,ä555¨­­………T*–/_¨¬ü+’õÑìâM°é×DgȈޑŸoW…Š•žJó>(—;B àk+++d2Gäå1g©hL»tKg$‹‹¼½Åœ÷­ìí­Ð·¯Q–--…ˆ‰;Rpõªîâ’f¬¬¬°uëV,^¼ …Ÿ~ú)`eeÕ|ÍÔ©SñôÓOcÔ¨Q9r$–,YGGG|òÉ'˜:u*áåå…)S¦`äÈ‘ðòò€ “ÉZ§­ßã¼úê«(-mù0M¾}ÅŠk )OOg„†*”tžS¿ö0gÎ0H$öˆ‹Ûe´1)ŠyBÅJ¸ºÚãÎJ Y,˜ÏZñùÂÃ=pæ w±úk)ðç¾í!.n4ºu³Äòå{:.…B1¨X鑦,š‚,´µjšY=¾|ø(=z¸±IïÛ×þÉ­ccdžã¿ÿ5ÞR ØÛwÃ?ÿƒ}û.`Ïž³FרìÚµKgÈ4}ÑW{_  Mü/^¿t®»11ݺYÀÞ¾cø:ÓY+__ÔÖÖãÆrxxh.‘æŽþó¿¸{· ÎζZý8П|ryy¥ðñqátÏ>ÿû¿ýøãl<õT§¾íaøðÌœ9‹ïB¯^žðò2Rå\Xµj&Nœhj7(]@€Q£F™Ú ½BÅJÏ0…¯»»wGF†æª¼†¯k+ÈȸAƒ´‹HD„'ll,qâD6g±zt)Иbï½÷,þü3óæíÀž=oB è\øøø˜Ú Å,é\ߦðumg­­Ñ½»Ö}+±Ø®®¬ö­D"úôñns „)–ÆD·k×Nƹs´î…Bi+=ãêj’ÍË€Lg­Ý@ãìŠí¾Uÿþ~8y2GëI|&LØD¯^žX¾|>úhŽ»jôñ)JÇ„Š•žaJ¹¤í¬Ð¨K¬ØEÀ“O*q÷n®\¹ÉêúGñôtFHˆñ£›˜=û)L˜‰·ÞÚ®Qø)J×ƒŠ•ž‘J5'³U(œÀçóÅÊÏOªó on(,,ý{º«úöèákœ8ѶÙÑèÑaøõ׋F_ lbÕªç`cc‰¹sw˜Ì …Òq b¥g¤R{ܹSÕê ¶ñ¬•£Xùû»âÖ­ûZËÒ‡…¹ƒ‚Œ ݳ+€¾}}pòdÛrý=ÿ|o”•UãðáKmêß^ìí­ðõ×3qî\–-Ûc(JÇŠ•žquu€ZMPZÊí¬U@€+h]I¥öJ푞În)°%RRr´žßbÂÍÍ ýúùb×®TÎ}õEP›6ÍÄöíbýúÃ&óƒB¡˜*VzF"i*oÏ$VšgVnnN°±±DVV‰VûAìÄjÀ?TT©Ä©Sy¨­m[ùø˜˜Þ8{¶99Úí‡þsúôñÁÌ™_ãìÙ“úC¡PŒ + P8¢¸¸u¹‹¦|ww4öóó“âæÍû¨¨xÈhÛÕÕ‰§}+•ªçβºþqô‡\îØ!ÌŠD|ýõL„…¹aÊ”ã?ŒSÕ˜B¡˜*V@.wDqq뙕««,-…¸vM³X¸‚‚ìlÝK/²Ëdáë+««C›÷­ø|&LˆÄ?¦r®>lll,±}ûë:4S¦Äã—_ÒMí…B1T¬ €\î„›7[g^àóyððpfœY¹¹u‡µµ²³uf4¦^jÏ,$&æ •w˜½"‘H€õë§cÒ¤>xýõ­Ø¹Óô{j ŰP±22™Š‹ïiÌËçå%F~¾f±âóyP*ug² U ?ÿª«kXùÓ¿¿gÎäãáÃ:V×?Ž¿¿+zötÇ?vQøX³&Ó§Gáÿø›6ýnj—(Š¡beär'ÔÖÖãîÝÖç“<=QPp—±/›ˆÀž=ÝÑРf=»ŠŠR¢¶¶©©Ü«7Óûö]`-Æ€ÏçᣞÇÒ¥cðÁ?cÁ‚ïÛHB¡P:6T¬ €Bá÷­´Í¬€Æ ‹«WµÏ¬ '¸º:àìÙ|Vþxz:C©”´+uÒ„ ½P[[ß!æþíoC°{÷9r£Gÿ‹1K…B1_¨X™Ì<OcD §§3Êʪ#þ\Q\|UUÚg0‘‘^HKc¾=dH’“¯°¾þqœœl0xp`‡ˆ ÔDŸ>>HLœ‹†5Æûœ†¶S( *VÀÒRˆîÝm4Š•·wcå^máël"#"<––ÏÚ§!C‘]Ò®YÇ /ôÅÑ£W´l6%^^b$%ÍCïÞ^˜0ás|òɯ4c;…ÒI be Ã×[‹•»{w|Æ¥@gX[[è ²ˆŒôÂíÛ•¬Å'*J‰nÝ,œ|™Õõš1"r¹#¶n=Ùf†ÆÆÆññ/aÆؼù¢£×âòåbS»E¡PÚ +Á”ÅB$@&s` ²àóyðõ•èœY……¹A(ä³^ ´´"*ÊG¶})ÏçáÅûáûïO¡¦¦c2ŒÓIIó òñ쳟ãûïSÚT5™B¡t ¨X¦³Vàåå¢5ÈÂßßW¯j¯ðÛ­›‚‚ä8wŽýÞÌàÁ8~< uu ¬û<΋/F¡ªê!öï7Ma.(•ìÛ7S§öClìNLž¯õ¹S(”Ž +јrIó——³±’ê _€^½<9 „ªªœ9“ϺÏãH$v1"´C/>Š……+VŒÇÁƒÿ@uõC ´«Víëð3C …Ò¡©è¬ÈdŽ()©@CƒAËÿxy‰qäóÞQ@€+ŠŠÊQ]]KÆë""<ñçPWבH Ó'xy‰‘œ|QQ¾ìoæ1fÌx“&ý—/ßDP¬ÍvŒIHˆ{÷ÎÅÆG±nÝA9r kÖÄà‰'¼õ6Æ?þˆ7êÍ…b(¬¬¬°~ýzxxx˜ÚÖP±2r¹#êêpçN%¤R‡mžžÎ¸uë>jjêaiÙúWàïߘ#0'ç6zötg#2Ò55õ¸t©Xëu2xp’“¯`éÒ1Ünèú÷÷ƒ¯¯Û¶ÄG=ßf;ÆF$àÍ7‡aìØp¼óÎnŒ÷F Ã’%£áããÒnû;wîÄ•+W¥o)ñk×.LŸ>Š¥Q¬àÆ{­ÄÊËK µšàúõ2(•’V}=<œae%ÂÕ«·´Š ­‘––ÏA¬±uë()¹ßÊ/¶ðx9€%KÆÀÎΪMvL…§§3¾ûî5œ=›>øO=õ=º'Þyg <<œÛe;** ;wîÔ“§Šaàñx¦v3tÏÊ@¸º:€Ï×|0¸©Tȵk¥ûòù<øø¸èŒäñxÿ;ožüÇ€þ‰8zô*ë>š˜2¥/öîMk—Sé…={ÞÄÚµ“‘šz C‡þkÖü‚òòÖi²(Ši¡be D"\\ì4Š•%Äb[­9CB¸tIwÅÆ ‹|Ö~Y[[ OŸv…°€½}7ŒÓÓl-˜øxá…¾8yr)æÎŽ­[O¢OŸñá‡?3ɤP(Æ‡Š•aªkžžÚsÉqé’öðuèÕË wQVÆ~60xp޽І†öew˜1ãI\ºTÜ)Ruëf¹sŸFjê{X° »wŸA¿~âÝw÷hü…B1.T¬ ˆö³VbÆ”K"GIÉ}ܹS¥uŒˆˆÆ R.ç­† Âýûpþ<»ŽLDFz!0P†íÛÿl—Ž„%þþ÷¡HM]Ž5kbpìØUôéó&Oþ7ʤ‹)AÅÊ€h›Y5žµb^ –®\Ñž*ÈÑÑ>>.œÊÖÉ —;âèѶ§^jbÆŒþØ»7 wïjUsC$ &¦7^„/¿œ†êê¼ôÒf<ýôZlßþ'TªZ“ù–““£÷ rCØ4ÆÚlB0mÚ4ØÚÚ¶ºÖ÷KÑ/T¬ ˆLæˆ74/!yzŠqýzãRœ³³-$;–KÜö­`à@ÿvYÀ /ôµµ¾ýöD»muDD"Æï…}ûæcÿþ tÅÒ¥»±K–üÈé? úÂÑÑ‹/6Úxyyy‹ÅFO_cûöí¸t©±4Ós3×ûëjP±2 r¹#JK+5¦7òö£¶¶žq™‚ƒÙYDDxâܹB¨Õì—¨ž~:çÎè\fÔ…••3fôÇÖ­'Û\‰Ø\ˆˆðÀúõÓqúô{xýõÁøý÷«=z† Yƒÿ;µµºfë±XŒÕ«We,P«Õ¸{—y £¢R© ù,Ós3×ûëjP±2 …#Ô¸}»¢U›§gãÿä´YËqé’îŒá‘‘ž¨¨P!/Os(¼&† ‚¥¥¿þz‘u&f͈ªª‡øñÇ3í¶eH¥öX° 'O.ÅÞ½o¡W//üë_‘‘Á팖Z­Æ—_~‰   ØÙÙ!** ÉÉÉàñx „ >>ÁÁÁ°··ÇСC±oß>ðx¼VKXIII ƒ••|||°mÛ6ã5õKLLD@@$ æÎ‹šš–µÓ!ˆExx8îܹƒ~ýú\]]›¯¹wï^~ùeˆÅb¸¹¹!66>ÔÙö(Æö›iéOÓýÕÕÕaáÂ…J¥H$X¸p!êêêšm>|8q¢s®(tHÅ`—™l>9}:¯U›Z­&JåbòÝw0öß½û ñôŒ%µµõZÇ©­­'ÞÞ ÉΧ9ù÷ÒK›Éôé_qêÃļyÛÉ€‘†µ^ì™ÔÑ£§˜˜Ö}6nÜH$ Ù³g)..&û÷ï'nnnÙ´iQ(äÀ¤´´”:tˆ(•J€dgg“¦?ݪª*biiIâããÉÍ›7É×_M„B!©ªªj5^S¿èèh’••ERRRˆR©$+V¬hnS«Õ$66–„‡‡“;wî´è÷(S§N%Æ #¹¹¹$==„††’+Vhm3µß¾gú¹‰5kÖçž{Ž’ôôtÒ«W/×|í3Ï…xzÆ’ÊʇœúiâÂ…B"“Í'ÉÉ—ÛmË\‰‰‰á$V!!!dË–-->Ûºu+@BCCÉöíÛ[´íر£•X•••‘HDÖ®]KÊËˉZ­&•••¤¡¡¡ÕxMýÒÓÓ›?KHH J¥²¹mÑ¢E¹zõj«~MÔÖÖ@@222š?Û³gQ*•ZÛLí7± $7oÞl~èÐ!®ÑsÄÅŠ.€‰Ä^c]+ðõ• 7—yéN©”ÀÂBÈj)°o_œ:•ËÉ¿§ŸACƒ¿ÿÞ¾ÂæŽ'ŸTbÆ#í¶ÕUÈËËCxxx‹Ï¹¹¹ mÑÜʆ““’““‘’’777 4ÇŸÏü§íçç×üs`` ŠŠŠšß§¦¦bðàÁøè£û—”” ¡¡¾¾%CV*•(**ÒÚfj¿¹ŸŸ™L‡áÇãÚµk-Ƨ*VF.wb>™„‡¿Çj¬‘#?!Ë–íáäßµk¥D&›ONœÈæÔ‰ÿþ7Èå ÈÅ‹Ez±gNpݳª­­%|ðñöö&¶¶¶$**ªy_ª¡¡¬[·Žøúú2räH’˜˜H\\\Zí±$$$___baaAIbbbsþ·ÇEÈ_{3›7o&žžžD,“·Þz‹¨TªV6U*ñ÷÷'Ë—/'uuudÀ€ÄÖÖ¶¹½¬¬ŒLŸ>8;;™LF,X@T*•Ö6cûÍvÏJÓýUTT™3g'''âììL^{í5R]]­q:’ש IDATËîY™ÿSïàlßþ'Q*kl«®®!rùràÀEÆþÇŽ]%2Ù|RZZ©s¬åË"ÑÑk9û8xðjÎ"Ç„Z­&C†¬!sælÓ‹=s‚«Xi¢éË0))‰œ?¾EÛ?þHÂÃÃÛmÛÜ0W¿;2æ(VtÐÀ¸»wGuuÆD³ÖÖpuu@n.ó¾USÚ%6K}ûúâÒ¥bTTp[1"´ÿ¼и¼óú냑”t……ô e[IOOÇ´iÓ––† %%Ë–-Ã+¯¼bj×(“@ÅÊÀ¸»wÆ}+]AÎζJíYY¨Õiiùœ|1¢ŠŠÊYÁ†çŸžžÎX»ö€^ìuE-Z„qãÆaüøñpvvÆìÙ³1kÖ,¼þúëm¶iooß®þ¦Â\ý¦è*VF¡pŸÏÓdá¢uf4– a3³êÞݾ¾.8u*Oçµî™ÌQo³+€ Fà§ŸÒt¤´D©T‚¡Pˆ•+W¢°°*• ™™™ˆ…PØöâÞ‰ñññzôÖ8˜«ßýBÅÊÀˆDH¥ZgVºÄ*8XŽÌLv³ž¾}}9‹UcdVˆÞBØ`ܸøû»bݺƒz³I¡Pº.T¬Œ€»{w1 .+«ÖZJ=8Xެ¬[ZCÜ›èÓÇii¨©©çä㈡Èȸ¡·Bƒ|>o¿Ÿ>ÇjVH1_ÚZnƒ–÷Ð]åyP±2bÅ<³ 5 mp°uu Z÷¶šèÛ×µµõHOçVX±?ØÚZê%±mÏ<†€W|öÙoz³I1 ­LFW+ïÑYîÃP±2Ú+N°²i"¥R !«Ї‡3ärGÎK"‘ƒààÁLݳ„ÏçaÑ¢QHJ:ÏY<)Æ¥£•Éèjå=:Ë}*VFÀÍ͉1Œ›ÏçÁÛ[¬ußJ(ä³N»½{{sÎ4î38‘ÒÒJÎ}™1"O>é‹+õf³«ÀTBCWÉ ¦òõõõX¾|9<<<àââ‚3fàÞ½Æe_¦r–ÂØ·o"""`mm ™Lƪ¦–9—÷è Ï¿Saâƒ^]‚ãÇöÞ¹£ù`﫯~KfÍúZ«yó¶“)SâY÷í·'H@@©¯oÁZÖ‘€€8òÍ7Ç8õÓEZZ‘Ëß~ËÔ«ÝŽ†>7¡­„†¶’„0—·øøãIHHIOO'/^$}ûö%±±±„æ åM¥0nÞ¼I,,,ȬY³HQQùî»ïrûöm­‡v͵¼GgyþLÀ S±2M)Î+ÐØ¾zõ~2hÐj­6¾ùæ \JÔjÝõ¢šJ‹dfÞàìë[o}Gž}ö3Îýt1sæ×dèÐ5œԜЧXi+¡¡­d!Ìå-Èž=e*¹téRó{¦/˦1jjjÈåË—IUUihh ¿ÿþ{sJ$6benå=:ËógÂÅŠ.… _køúµk¥Z“Ɇ…yàþýŒ6%0ÐŽŽÖm^ ý+Æö°°edãÆ£ZmÌŸ¿ƒLš´ÕxgÎä™l>ÉË»ÍÉOB9q"›ÈdóINsé’¶òÍ7lj‡Ç? bÛÔèsÏŠæÚJfÂ\ÞâáÇ$66–Èårâàà@¦L™BÊËË !­ËdhÚùôÓOI÷î݉»»;Ù°a™2e ‘H$­®E')ïa®ÏŸ 0Ã=+*VFâãÿKf¢˜0á ²hÑN­6¾ùæ8ë ‹úú¸”|óÍqξ64¨IDÄr²víÎ}ÙøõôÓ“É“ÿ­wÛ¦FßbÅ„9•Ì0'_ÙÒîÉÅŠ. wwæƒÁ»aaî¸ÿ tøˆŠòʼnYœ}åóy3¦'Ó8÷eã׊ãqìØU>|Iïö)J焊•‘psëŽjq÷®æ5i6bª€H$`½o5p NžÌAC÷’õãÆõBNÎmdfÞàÜWýû+1qb$–.ÝÝ¥ƒ-š¢Å˜^L˜SÉŒŽìkWxþ *VFÂÝÝ PXÈè‚’’ TV2o.[Z áç'eºhàÀTT¨pñ";q{”^½<àáጽ{ j¾råD¨Tµøè£}±oÿE‹1½˜0§’Ù×®ðü;T¬Œ„\î¡PûY+@{B[ q)íÌJ©”@&sĉÙº/~ ‡gŸ ÇÞ½iZÿpÛŠ££5Þ{o¶l93g®éî@¡Pº4T¬Œ„Pȇ««ãY*OOgXY‰påÊM­vÅê:k0ÀÇsß·€ñã{áÆr¤¥辸 <÷\$úõóÅ;ïìÑz šB¡P¨Xm¥B>|}%Èʺ¥ÕFX˜**T¬‚,€F±:}:Öqö78XWƒ-òx<¬Yƒìì|ñ-#B¡P˜¡beD<<œµF¸âêUíbÒdÁnßê©§üQSSßæ¥¶1czbß¾ m Ò`ƒ¯¯Ë—Ã'ŸhSÆ …Ò5šÚ®„››Î+dlpÅþó‡VYáÙg#tŽ)•:@©”àøñl àÏÙçÉ“û`ݺƒ8rä2†áÜŸ 3f<‰ß~ËÄüù;pèÐBØÚZdcpìØ1 >ÜÔnP(*VFÄÍ­q¢146 ÀÅÅ÷PYùvvVŒvzöôÀ… Ì¢÷8úÿï¼ÕhÎ>»»wG¿~>ص+Õ`bÅãñ°zu † û'V¯Þ•+'dCcj(V¼ð èÛ·¯©Ýà+#âå%ƃµ¸}»R©C«vWB]‚^½<í„…¹aÿþóP« ø|æó M àÿüçÜ¿ÿÖ:¯œI“ú`Ñ¢(+«F÷î6œû³A¡pÂÊ•ÏaÞ¼4(À`ÂhHbbb¨`Q(‚îY//1àÚµ;Û=<œammÁ"ÈÂQP ÙÎãôï¯üù'÷’!0vl8,-…Éhñ(Ï?ÿ¦Oœ9Ût¦P(] *VFD*µ‡­­%òó5‹ ŸÏƒR)ed!ç”ÉÂÞ¾zôpÃñãÜÏ[€µµFî‰;SÛÔŸ |0¾¾¼öÚÖ6E0R(”Î +#ãááÌ(V@㾕®³VBøû»²Ž÷­Ž¿ÊúúÇ™4©.\¸ŽË—‹Ûlƒ BlØ0EEeXµªëf· P(-¡bed¼½]tŠ•®™ôìéΪcú!'ç6n޼Ǻϣôíëw÷îØ½ûl›úsÁÛÛëÖMÁ7ßGBÂiƒG¡P:>T¬ŒŒ§§3ãžÐdqëÖ}TT¨´Ú uCFÆ Ö™,z÷ö••¨M©—€Æ%Ê_ì‡ï¿?…ššú6Ùà¨QaX²d4.Lhs …Òy bed¼¼Ä:gVtY„‡»£¢B…Ü\í¹›°´â‰'¼Û,V0eJ?TU=Ä/¿¤·ÙÞ|s&MêƒW^ù–Õl“B¡t^¨X//1*+âÎÍ¥BÜÜœ`kk©óË94Ô ÖÖHMeŸõ¡)O`[ÓJ$v6,ß}§ýà²>Y¹r"|}%xõÕoË«P(”Î+#ãíݾžŸ¯yFÄ㱋 ù sÇÙ³ì“ÌŒ[·î##£í5ª¦Ní‡?ÿÌÕ9óÓVV"|ûílÔ׫ñ ñ¸ÿQÆ¥P( *VFF&s„¥¥Pë¾UcD n1ˆŒôÂÙ³ù¬Ç ’ÃÍÍ ¿ýÖö ½C†ÁÍÍ ßªÍ6¸"•ÚcÏž7QYùÏ=·÷îQÁ¢PºT¬Œ ŸÏƒ§§XkÖtWdei_€'žðBVV §ÙÆ!Aí*'Ïçóð }±sgªQ-špuuÀ¶m¯¢¤¤3g~­µH%…Bé|P±2^^b\»Æ(ÃíÛ•(/¯Öj'2Ò „œ?Ï>„}ذ œ?_ˆÒÒJÖ}gòä>¨¨PáÀ‹m¶Ñüü¤Ø±ãudg— &fÝâPºT¬L€·7ÛˆÀ­vÄb[xz:sZ 0À"‘G^aÝçq 'ŒÙ›6ýÞfm¥G7üòËTV>ĨQë´Š>…BéKùÓO£¢â!ΜÉgÝG³f Dbâ¹víµküðÈŠRâùç×㫯~oó2 …Ò±¡beÜܺC$°Hh«{f$G·nœ–=<œ¡TJÚ½8qb$ll,±cGJ»ì´++6mz«V=‡U«’0yr<ãk …b¾P±2B!nnÝuŠÕÝ»U:#ÞD"zöäv8† n×y+ Q(&MêíÛÿD}½º]¶ÚË´iQøùçyÈÏ/ÅÈ‘Ÿpo …Òñ¡be"¼½ÅZ‹'úûK莸Yb••u ……Ìç½ØðòËpóæ}üòË…vÙÑ={ºãçŸçA.wÂóÏ¯ÇÆG9íåQ(”Ž +ÑxÖJ[D #¬YÕj<| ìÊöíë{{+>|™uMxz:c̘žøì³ß:Ä~‘««vW_„U«’0aÂÈË£áíйCÅÊDèʾ4ž)ºxQw5àÈH/¨Õçϳ_ ‰80 ÝûVð·¿ ÁåËÅ8y²íÝõ‰H$ÀÒ¥cpð`,êê0dȬZµ¯]Ñ Å´P±2^^b”–V¢ªª†ñšÐP9«3Dæºo„“'³¡RÕrê÷8aaîè×Ïÿþwr»ìè›À@çâ­·žÆW_EL̃W:¦P(†Š•‰ø+û:óì*8X«Wo±š´eßjèÐ`ÔÖ6´«ÆUo¼1ÉÉWpéRÇ‘H€ØØ‘øïßF}}¢£?Allnß6M¸=…BiT¬L„‡‡3¾ÖtA!! ÔÕ5 ;›M…'ΜÉçP ‘Ø¡G7½,??)¾úêh»m‚à`9öí›;^GZZúõû«Ví£ q)3Ahjº*"‘r¹£Ö™•ŸŸ––BddÜ@p°\«½ÈH/TT¨—W ¥RÂÚ¡Cƒ°{÷Ö×3Áãñ0sæ@¬X±‹‚LæØn›í¡°°sæÌÁǭňÏçÁÁÁññ‡°iÓ¡TfƒÇ3}p…Ò™ ÂçŸÞæþT¬LHcsè¸PÈG@€ —.ÝÐ[«­Gs«gžéýë Ο/Dx¸ë~š˜:µ6l8Œ/¾ø }ô|»lµ—””ìÛ·111Û»wo€·w **,н»i…•Béì\¿~_|ñ+sÅËKŒœíK|!! VA"‘=z¸áܹLžÜ‡µ=z¸ÁËKŒýûÓÛ-V"‘ûÛ¼ÿþϘ;w8\]ÚeOìܹÓÔ.P(]ž;wbòäÉí²A÷¬Lˆ¯¯99Úsú…„Èqñâ Vg˜z÷öÆ©Syœý5* IIç9÷ÓÄ‹/F¡{wÄÇw¬È@ …bÞP±2!J¥¥¥•Z+ý†„(PQ¡Â÷tÚëß_‰¬¬ΉeG Caá]½”Ú°´â7†`Û¶?iŽ> …¢7¨X™¦½%m³«à`9x<+!éÝÛB!))¹œüˆˆð€Bá„ýûÓ9õcbêÔ~èÖM„¯¿>¦{ …BÅÊ„¸¹uG·nZÅÊÎÎ žžÎÈÈÐ-V66–èÑóXñx<Œ†Ÿ>Ç©Ÿ6?^}0¾ùæ8Êʪõb“B¡tm¨X™>Ÿoo±Î}«ÐPÅÿ"uÓ¯Ÿ/þü“›XÀèÑaÈË+eUð‘ ¯½666–ø×¿êÅ^G%''<¯ÃÛ4ÆÚlB0mÚ4ØÚÚ¶ºÖ÷kŒgÙ–±»âóh/T¬LŒŸŸTgD`p°™™ì2CDEùâêÕ[œ÷‹žxÂR©öíÓOötKK!ÞzëilÝz²Ý™Ý;2ŽŽŽX¼x±ÑÆËË˃X,6Úxú¢¸¸Û·oÇ¥KЙž›¹ÞWèóà+£T²‰Tàúõ2­Môéã>Ÿ‡S§¸Í®ø|žy&T¯¥>¦M‹‚\îˆÏ>ûMo6;b±«W¯6Úxjµwø«T*€‡Gãñ¦çf®÷Çú<¸CÅÊÄ(•RÜÑšÿ/4TB.]Ò]æÞÎÎ ¡¡Š6-ŽÕ—/ßÔ)žl‰˜??;wžf•2Ê”¨Õj|ùå— ‚¢¢¢œœ Bâãã {{{ :ûöíÇkµ¬’””„°°0XYYÁÇÇÛ¶mÓ8^S¿ÄÄD@"‘`îܹ¨©i™Ø˜‚ØØX„‡‡ãÎ;èׯÀÕÕµùš{÷îáå—_†X,†››bcc›3whk{cûÍ´¥éþêêê°páBH¥RH$,\¸uuuÍ6> üþûïøøãáïï;;;ôïß§NÒihÜ·ýæ›o¬^½Û¶mƒ··7°lÙ2ú;Ĺ/µµõ$*j%ùûßÿ£7›lHHH \þyoܸ‘H$²gÏR\\LöïßOÜÜܲiÓ&¢P(ÈHii)9tèQ*•ÉÎÎn§ªªŠXZZ’øøxróæMòõ×_¡PHªªªZ×Ô/::šdee‘””¢T*ÉŠ+šÛÔj5‰%áááäÎ;-ú=ÊÔ©SɰaÃHnn.IOO'¡¡¡dÅŠZÛLí÷£ï™~nbÍš5ä¹çž#………$==ôêÕ‹ÄÅÅ5_ûÌ3Ï#GŽ?ü°ÕïP.—7Ûc²C!È”)SHEEÙ¼y3@&MšD***ÈÆ €æ{¡Ïƒùy0ÁõïQ;©X™•ª–( È/¿¤k½nÒ¤ dþü¬l<˜AäòäîÝÖ_6ºˆM ÑÑk9÷ÓÆÞ½iD._@ÒÒ ôjW\ÿ8BBBÈ–-[Z|¶uëV€„††’íÛ··hÛ±cG+±*++#"‘ˆ¬]»–”——µZM*++ICCC«ñšú¥§ÿõ{OHH J¥²¹mÑ¢E¹zõj«~MÔÖÖ@@222š?Û³gQ*•ZÛLí7—/çÀÀ@róæÍæ÷‡"ááá­|ñ÷÷güj³CHã—sZZZó3Õô>;;›>σ }ˆ]41VV"(N:ƒ,BCÙ¥]€¾}}Áçópú4÷l£G‡áâÅ"…!¹0n\úöõÁ»ïîîÕ„5‘——‡ðð🅅…rssÚ¢-88¸• '''$''#%%nnn4hŽ?>ŸùÏÌÏϯùçÀÀ@ýUl355ƒÆG}ÄØ¿¤¤ ðõõmþL©T¢¨¨Hk›©ýæB~~>d2x<x<†Žk×®µhÌ?Çô;dcÇÎÎ ‰4¾×}†‡ŠU@©” 7Wû>Qp°œum+{{+ÉÚ´oÕ¿¿­ñË/ú9 ÜÄLÀ… ×ñÓOizµ«/ .\h\’™™ ðôôlþ¹‰Ë—/·²¡R© V«±k×.”••aöìÙ;v,ÊÊÊÇÍÎþ«–XVVäò¿²ë'%%!>>?üð’“5§¯’J¥ÈËûë?&¹¹¹P(ZÛLí7Äb1²³³A!åååHIIinoúòôòòbü²±Óèó0øàâííMlmmITTTó¾TCCY·nñõõ%däÈ‘$11‘¸¸¸´ÚSHHH ¾¾¾Ä‚’ÄÄÄæ6<²ÎßÔoóæÍÄÓÓ“ˆÅbòÖ[o•JÕʦJ¥"þþþdùò央®Ž 0€ØÚÚ6·—••‘éÓ§ggg"“ÉÈ‚ ˆJ¥ÒÚfl¿ÙîÑhº¿ŠŠ 2sæLâääDœÉk¯½Fª««[Ù¬¯¯'ü1Q*•ÄÆÆ†DEE‘”””æk˜ì<~ºÞÓçÑú½.h€E'áäÉl"“Í'·nÝ×zÝÈ‘ŸåËbe³¼¼š( ȯ¿^äìÏÇuÄß?ŽlÜx”s_]üßÿí#JåbR\\®wÛ¢‡?Žæ?þ¤¤$rþüùm?þøcóft{l›æê·¡ Ïƒ4À¢“ TJhOh ÁÁìƒ,­ж}+KK!ÆŽ Ç®]©œûêâí·GÀÕÕK–ìÖ»mC‘žžŽiÓ¦!-- <@JJ –-[†W^yÅÔ®Q(]*V‰ÄÖ:#ÃÃÝqáÂu44¨YÙmÜ·â.V0qb$23oàòeÝ‘¹`a!Äš518t(fèÕ¶¡X´hƇñãÇÃÙÙ³gÏÆ¬Y³ðú믷٦½½}»ú› sõÛPÐça<¨Xu”Jž¨ªªÑy]QQ¾ÈÌ¼Š g¢¢|áîÞ?ýt–s_]<ù¤&ôÂ;ïìéÁM(•JB  ±råJB¥R!33±±± Û^h["‘ >>^ÞsõÛPÐça<¨XuØD¸ÂÊJ„ó篳²Ù¯Ÿ/Ôj‚Ó§¯é¾ø1x<Æ‹Àž=g¡VëÿlÔòåãPUUƒÏ>;¤wÛ ¥óAŪƒÐ˜ÐVû2 H$@Hˆ.²²Ù½» üý¥œë[5ñüóO ¸øNâ~¸X..vX¼x6n<Š+Wô»ÔH¡P:T¬:J¥7nÜÓ¹,îsçØ‰иœ÷ÇÜÏ[€¿¿+BBسGÿKðÒKO¢%æÌùŽÕag …Òu¡bÕAP*% „ /¯TëuááîÈ̼ÚÚzVv Dzúuܽ˭¾UãÇG`ÿþ ‡O>y7n”cݺÎ]¤‘B¡´¶ïSôЧ§"‘99% U0^\ºTŒðpvû÷÷ƒ@ÀÇÉ“9xöÙp×?Îĉ‘X½ú<˜Ñ£{rî¯ WW¼÷Þ³ˆ‹Û…áÃC¡ûž¸ðÕW_éÕ…BáÎÙ³í_¡bÕA ùðòëŒôóñq½}7œ?•XÙÚZ¢gO?žÕ&±’É1xp¶oO1ˆXÀ”)}‘˜x &à—_À¢ýÿ,  +¦P:M…&Û ]ì@(•dgk+‡°0wÖAðÔSþøý÷+mökòä¾8vì*nÜ(o³ mðx<|úé (**Çûïÿ¬›ýû÷G}}}s’Nú¢/ú2í«   ]ÓT¬:>>º³¯@D„Οg/Vú£¨¨¼Íe?FŒ…££5~üñL›ú³A¡pÂúõÓ°eË ƒdΠP(æ «„¿¿99%:3T„‡{ ;»••ì²7GFzÁÎÎ ÇŽeµÉ/‘H€ñã{áûïOÃÕ£6,¯¾ú–,ù‘uvy …Ò5 bÕ–£¦¦žUD ZM‘Á.O PÈG¿~¾8vìj›}›<¹ ïäÌÕ£,YÇ\Á IDAT2ÞÞ.˜3gjjØE>™ÌR©Îc¿ˆÿUæ6¤1oÞpL˜à°°¸zµéûxŒ±Ö“U ãæf¿þ*ÃÇM_jóòê @ Õç­^~Ù.Ü@yùC™ã›6Í—.ÝÂÙ³Ò¯ä.­gË199Y 8ø{?PzŸŒ±–‰“U ãêj±˜påÊ&Ÿ×±c{ØÛ›I¼] æ--ÌSØ _?xxØ >þ7™Û†¾¾vì˜ôñúëkQ\,TI¿Œ±–…“U cg× :èK|)Pš3+##ôíÛ ii—ä ÁÁ>Ø¿ÿ<îß$W;’266ÀÎó¡¥%À›oƨ¬_ÆXËÁɪ…ÑÒÀÅ¥‹DÛÉK»]ðôR`ZÚ%¹6Tœ4©ôôt°{·êVš077ÄÖ­³q÷nfÌØ¤ô‰Œ±–…“U ôt’…d3KK+QT$ùš}/¿ì†ÒÒJääÉ_‡ú;Ö ;vd(uE‹ÿåäd‰;æ!/¯“'¯—ëÞcL³p²jžN_oþ̪W/[èèhIõáàž=­Ñ¹³ ÒÓeŸÂ3f Anîœ<™'W;ÒêÕË.Äýû0jÔ\¿^ªÒþcêÁɪrq±BYÙCܽ[ÑäóÚµÓC÷î¥úp°@ Àˆ.rß·òð°Á!Ý“.W;²èÚÕ ?ýCC}L˜ðD÷÷cš“U äîn ] 0ÀQêõú†wÁùó×ñà|fφ£G¯¨eÑYKK#$$¼ÎM0yòzdd¨<Ƙêp²j:uê #‰.öïï€ìì¿ UKܾ¯¯;Ž‘ïìjäÈžpt´ÀæÍ'äjGVff†Ø·ot”)ßaËõÄÁS>NV-”¤+Y àˆššZ©>oell€qè|Ë ̘1»wgªm²C‡úظq>ÿü DG'aþüðè‘䉛1¦8YµP’N²°µ5…µuGœ9#Ý¥À‘#{âèÑK¨©©•5DOwÖÕÕÂΧåjG^!!>زe޽Œ×_ÿùùÍobÉÓœ¬Z(77käæÞ‘hK‘™)ÝòGþþ ˽?•¡¡>à‡~•yûEñõuCjê‡ÐÑÑ‚¿ÿWزå„J§Ö3Æ”‡“U åêj…Çk$ššÝ¿¿23¯J•,ìíÍУG…¬h>{ö0ܼYŽää r·%¯nÝÌ‘’ò/~ ÑÑI7î\»V¢î°crâdÕBõèÑZZ‰¶ 0À›]OðÙ‡åÈb{{3L˜à5kɵ2†¢Ìž= ‰‰ï¢´´£F­A|ü¯-"6Ƙl8YµPíÚéÁÞÞ\¢InnÖ066ú’ž¿O\¿^ŠÜ\é’Ü‹¼óŽ/òóïâÈÙ· Q´¾}»áðápLšÔ‹ïÃk¯ýKªÏ¤1ÆZNV-˜¤“,´´èÛ·›Ô÷­¼½íaff¨KnnVðósúuir·¥H:èãÓO_Gjê‡ÐÖ`̘5ˆŠÚ#ÕTƘúq²jÁ$MVÀÓûVÒ~0V[[ #F¸Êµ!ãó,ðÙ3…RÏLT†S§NA__¶HIYˆÒÒlܸíÛÔ•ññ—ò¿åzMë(èSWW+\¿^‘¨íÚé5ùܱjÕAܼYS‰û3ƳgoAqñtîl"W¼:¢¬[—†äûÔ×Í›7Q]]Ý»w7òŒ7UcmÙo¿ý†5kÖÈÕ'«ÌÍÍb1!7·½{Û5ù\oo{èêjãÌ™«xýuɓՈ®h×N©©9xë­Áò†Œùó_Æœ9[pùòm¸ºZÉÝž¼Õcmž">B—[0{{3èëëH4ÉÂÀ@½zÙ"3SºKpºðõuÃÁƒÈf=ðô´ÃÊ•ÿQH{Œ1p²jÑ´µµÐ³§ ²³%Û{jÀœ>-Ý$ 5ª~û-_!;ð ,\èŸÎÁ… Òm ÉcádÕÂõêe‹ìlɦ[÷ïïˆ+WnC(IÕÇ+¯ô„––@9²'¼½í±fÍ!…´Çcœ¬Z¸^½lñ矷ðäIó«S è"H=…ÝÐPC‡öÀÁƒÙ²†ÙÀGàðá‹ÈÊ’|cHÆk '«®W/[ˆDÕ((h~aÖN:ÀÁÁ\êd£G{âèÑ˨¬¬’%Ì^~Ù:bõêŸÒ^K•ŸŸ@ÐâÛTEªˆ[5>ŠÅɪ…suµ‚žžþøCÒûVŽ8sFúdõꫨ­#=]¾=®ž6éé—qþ|ë½wÕ±cG,Z´HeýÂÜÜ\eý©[[osÚòñàdÕÂéêjÃÕÕJŠdå€ó篣ºú‰Tý˜švÀ€ŽHMU̬@àﳫÏ>Û¯°6[sss¬X±Beý‰Åb”–6¿¸qkÑÖÆÛœ¶|<8Yi€^½l¥:³ªªz"ñ¤Œçß©©9 ݼð³Ï&âôéB…MW±XŒµk×ÂÍÍ FFFðññAzz:ˆ111pww‡±±1|}}‘’’@ÐàIrr2<==a``GGGÄÇÇ¿°¿gõ’’’àââKKK„……¡ªªþeX"Bxx8¼¼¼PRR‚AƒºtéR÷œû÷ïcÆŒ077‡­­-ÂÃÃñøñãfËž§ì¸›:†PSSƒˆˆtîÜ–––ˆˆˆ@MMÍ Ç+°yóf¸¹¹ÁÂÂ+V¬@||<`bb‚¥K—Ö=7%%}úôAûöíaeeUï…$cþßqðñhúx(±oëÖSä켈jkÅÍ>W,S¯^Khݺ#R÷SZZIvvRRR–,a6êw~ Áƒ?§êê' m·) $ÍŸ÷† ÈÒÒ’éÖ­[tàÀ²µµ%´qãF²±±¡ÔÔTºwï>|˜œ åååÕõSYYIúúúC·oߦM›6‘ŽŽUVV6èïY=ÊÍÍ¥ŒŒ rvv¦èèèº2±XLáááäååE%%%õê=/88˜üüü¨  €²³³ÉÃ⣣›,SuÜMC"¢•+WÒo¼A7nÜ ììlòöö¦¨¨¨Ž‘P(¤ØØX@“'O&¡PH6l TRRBB¡ôôô(44”ŠŠŠhÛ¶m€îÞ½Û䘛¦Gc¤}=¾ÀnNV +ë:YY}@ùùÅ=æÌM4cF¬L}Mú…†n’©ncnÜ(%{ûpŠ‹;©Ðv›"í‹£gÏžWï±­[·òðð íÛ·×+Û±cGƒdUVVFºººôÕW_Qyy9‰Åbª¨¨ ÚÚÚý=«—]/fgg纲ÈÈH@W®\iPï™êêjÒÖÖ¦œœœºÇÉÙÙ¹É2UÇÝÔ1$"ruu¥Û·oו>|˜¼¼¼ý眕•U7þýœ——GUUUtéÒ%ª¬¬¤ÚÚZ:vìX]YScnj|<š>QD²âË€ÀÝݺºÚ_ 2¤;~û-_¦{Ç´K ^*’•]'¼õÖ`|ýu***×®"ÂËË«Þcžžž€‚‚xxxÔ+swwoІ©©)ÒÓÓ‘‘‘[[[ >'Nœ€–Vã/³îÝ»×}ïêꊢ¢¿Ç™™™1b¾øâ‹F룶¶NNNu9;;£¨¨¨É2UÇÝÜ1¼ví¬¬¬ê=9r$®^m|¢‘‘@WW÷…?€žžrss€¾}û"..Nª1Krüùx¨'+  ¯¯ƒîÝ;Kœ¬^zÉBácääÜ”º¯Ñ£=!“B6e|Þ{bÇkðý÷ÇÚ®¢ØØØà÷߯÷ØÅ‹O?$moo_÷ý3—.5œ5)‰ ‹±gÏ”••aÖ¬Y;v,ÊÊÊí7//¯îûÜÜ\X[[×ýœœœŒ˜˜ìÚµ ééé/¬ß¹sghkk£°ðïe¶ `ccÓd™ªãnîš››#//D"Byy9222í_"‘“'OFDD²²²°~ýz©Æ,Éñ†‡òq²ÒÒL²pqé #œ:•×ü“ÿ‡±q; î‚ýûÏK]·)ææ†øà¬[w7n´¼ÙL¡¡¡ˆˆˆ@RRîܹƒÔÔTDEE,X€ÈÈH:t¥¥¥HKKCtttƒÏžøûûcß¾} …¨®®†®®.Ú·oˆÅƒêÕyÿý÷‘ŸŸÌÌL,^¼!!!ue:t€‹‹ ¢¢¢0þüz#*++<}ç>>u÷jkkiÍš5äääD&&&@IIIdaaÑàBBB999‘žž¹ººRRRR]þ{€èï{±±±dooOæææôÞ{ï‘H$jЦH$¢=zвe˨¦¦†† B†††uåeee4mÚ4233#+++Z¸p!‰D¢&ËTwSLjH(ÒÌ™3ÉÔÔ”ÌÌÌhîܹôðáÃŽ÷ùxšûyõêÕÔ©S'²³³£õë×SPPYZZ69æ¦ÆÁÇ£áñO°hC23 ÉÊêºvM²Y8qq'ÉÙy‘L3ðßÉÉ]º˜à×_óз¯½ÔýM™2sælÁ­[÷amÝQ–µdÉX öO|÷]>ú(@¡m+Cdd$=z„ &àÞ½{pttDhh(æÍ›'s›ÆÆÆrÕWYãVÆ1l øx¨Ž€H[82• ÛŽ’’JìØ!Ùô‚ñ(-}ˆ]»æKÝWMM-¼¼–áí·_Æ»ïúI]¿9ëÖÁ—_¦âСУG—æ+Hi÷îݘ2eŠBv(eŒÉG¯Ç=|PƒH³· Ü™™W¥^'xº&á¸q^س'S꺒xûm_ôîm‡ ¶¡¦¦V)}0ÆZNV¤W/[”•=ÄÍ›å=ßÇÇ "QµLëÀ¤Iý—W,ñ”yihi ðõ×S‘Ÿ_ŒõëÓÞ>c¬uád¥Azõ²…––@âäáà`këŽ8~ž<‘~«ûg‚‚")é<„B‘ÌmHBKK€uë¦ÁĤ=æÌ‰“i¹(ÆXëÂÉJ¹»[ÃÀ@WªKC†t‡P(Âï¿ß¹ßI“úA à§Ÿ»‹ð‹êcÓ¦™ÈË»ƒÈÈÝJï1Ö²q²Ò@ººÚèÙÓçÏKž¬\]­`g× ¿üò§Ìý·ƒ¿OìÜ©üKÀÓmN¾þz*öì9‹¸¸S*é“1Ö2q²ÒPÒN²??79"{²€ÐСøý÷¿pîÜ5¹Ú‘Ô˜1½±xñ,Y²))¿«¤OÆXËÃÉJCy{ÛãòåÛ‰$ßm÷å—Ýpñâ-Ë>i¡xzÚaË–“2·!­ ü6 Ä#-í’ÊúeŒµœ¬4TŸ>]QSS+Õôî¡C{@__GÊ>+¦O ÉÉpï^…\íH#2rÞzk0æÌ‰ÃÙ³WUÖ/c¬eàd¥¡ºv5ƒ……‘T— táãã$÷ÙÉĉ}Ñ¡ƒ¾J¦±?ï“OÆcøp„†nÆ¥K·TÚ7cL½8Yi0/¯®RM²__7=zY®í8 t1uêÄÇÿ*×Txiéèh!&f:úô±Ço¬“úžcLsq²Ò`½{ÛáÂév~啞¨¨x,÷‰éÓãÎ8t(G®v¤¥§§ƒÍ›CáïßëåÚ«‹1¦98Yi°qãF)nß¾/q{{38:ZÈ})°[7s Úññ¿ÊÕŽ,´µµðÕWS1z´'BC7áðá‹*1¦Zœ¬4˜··=tt´¤^¯ÏÏÏ]!³êBC‡âøñ\\¹rG¥££…ÿûMöGhèf¬[wD©‹ì2ÆÔ‹“•kß^nnÖÈÌ”nv܈®¸té¶Üëî½òŠ;\\º`ýú4¹Ú‘•––«VMÆ?ÿ9 «VÄ[oÅB(|¬–XcÊÅÉJÃõïï u²2¤;ŒŒ pðàrõ-0oÞüôSnÝ’üR¤¢…„ø`ûö¹8wî:&NüýU¦¶XcÊÁÉJÃõïoâáÃ*‰ëèêjcÄWüü³ü“#&Nì‹N Uú!á2¤Ž‰€.üüVaÛ¶ßÔcL±8Yi¸~ýºáÉ1~ÿ]ºY¯¾êß~Ë—{u]]mÌš5ññ¿¢²Rò„© ]º˜`Ïžw0iR?,Z´ï¼¯ôâcªÁÉJÃÙØ˜ÂÚº£Ô—ýüÜ@!S¿§O b±»v–»-yµk§‡/¾˜„~˜_̓¯ï*œ<™§î°crâdÕ ôë'ý}+cc è„ÔTùî[=m«‚‚aãÆc*ýpSüüÜqüøbøø8còäõ˜7o«J—‡bŒ)'«V ÿn8{öšÄ;?óê«=‘ž~I®Õ,ž ŠÛ·ïã?ÿÉ–»-E166À·ßcýúi8s¦¾¾«°wïYžâΘ¿r5^vö_XôôEpqé"q½¢¢r ø)vaÃ\äŽcáÂÈʺŽôôEÐÒÈÝž" …±dÉ.$&f£[·ö ±kq12ÖZ`êÔ©ÐÓÓST“{tÕSwwtè ÌÌ«R%+[[S¸¹YáçŸs’¬Þ$† û'RR.`ܸ>r·§HÆÆ¸wïgܽ›†û÷ípêÔ9u‡ÄX«fhhˆ‰'*¬=¾ Ø èèh¡wo;™¶Î9²§Â–+êÖͯ½æ…Õ«I}IRjkk1aÂpTV>½È_üÅ_Êù€'Ož(ôõËɪ•ðñq¯¿æK]/  ŠŠÊ‘-ÝÔ÷Æ,\èüüâuïŠ1¦ù8Yµ:¡¨¨EEåRÕëÝÛݺ™cÿþ ‰£{÷Îè…¯¿Nm‘gWŒ1ÍÄɪ•èׯôôt‘Q uÝÑ£=‘’ò»ÂbY¸Ð¹¹Å Y!ƒ1ÆNV­†.z÷¶“)YÓ7n”"'ç¦BbéÙÓ#F¸`ÍšŸë®_3Ƙ<8Yµ"ƒ9É”¬¼¼ì`kkŠwvµdÉ8üùç-$&¶½Ywùùù;-^mª¢¦ÚTö˜TqÌdí¿µ]8Yµ":¢°ðŠ‹¥ÛúC `̘ÞHNVÌ}+ps³Â„ ÞXµê ª«;+¨¥ëر#-Z¤²þ ann®²þZš`Ú´i°¶¶F§NŒÒÒR•ÿÔ¡-“U+Ò¿¿´µµpú´ôSØÇŒñDaá=\¾|[añ,Z4ÅÅBlßÞ¶V@777ÇŠ+TÖŸX,Fii©Êúki¦NŠ¢¢"¤§§#33¥¥¥xûí·Uþ{P‡¶4vNV­ˆ‘‘<X½úÚWd—…X,ÆÚµkáææ###øøø ==D„˜˜¸»»ÃØØ¾¾¾HII@ hp &99žžž000€££#âãã_Øß³zIIIpqq¥¥%ÂÂÂPUUÿØÂÃÃáåå…’’ 4Ð¥Ëß¿ÿ>f̘sssØÚÚ"<<?n¶ìyÊŽû¥¤¤ OŸ>hß¾=¬¬¬êý³m,–šš:tË—/‡‹‹ œœœ°|ùr¤¦¦6ø=lÞ¼nnn°°°ÀŠ+˜˜˜`éÒ¥uq6ö»å±«±V%:ú'òõ])SÝ%Kéå—e«Û˜’’ êÞ}­Yó³BÛ•E`` Jüü 6¥¥%%&&Ò­[·èÀdkkKhãÆdccC©©©tïÞ=:|ø09;;ÊËË£g/­ÊÊJÒ××§˜˜º}û6mÚ´‰ttt¨²²²AÏêùûûSnn.edd³³3EGGו‰Åb '///*))©WïyÁÁÁäççG”MÝd™:ã …¤§§G¡¡¡TTTDÛ¶m#t÷îÝ&cyòä åååQMMM]<+V¬ Þ½{78.(((ˆ„B!ÅÆÆš'Nœ€–Vã/½îÝ»×}ïêꊢ¢¢ºŸ3331bÄ|ñÅÖ/..Fmm-œœœêsvvFQQQ“eêŒ[OO¹¹¹@ß¾}'U,;wî„»»;JJJ™™‰>}^¼6¥‘‘@WW÷…?’ÿnyìªÅɪ•133„››NœÈ•º®@ Àر^øñÇ,…~>ÊØØK—ŽÃÖ­'¥ÞÑXlllðûïõïá]¼øtE{{ûºïŸ¹téRƒ6D"Äb1öìÙƒ²²2Ìš5 cÇŽEYYY£ýæåý½Ydnn.¬­­ë~NNNFLL víÚ…ôôôÖïܹ3´µµQXXX÷XAAlllš,SgÜ"‘“'OFDD²²²°~ýz‰cY½z5–-[†äädÄÆÆÂ¢Ñ%!éïöymyìªÂɪ2¤»Ì»ã¾þº7®]+Áùó7Ó¤Iýп¿>ùäGù phh("""””„;wî 55QQQ€  22‡Bii)ÒÒÒ<â IDATÝàF´@ €¿¿?öíÛ¡Pˆêêjèêê¢}ûö€ØØXòóó‘™™‰Å‹#$$¤®¬C‡pqqATTæÏŸ_obDee%€§ï”§L™‚°°0\½z999X²d ‚ƒƒ›,SWÜPUU…êêjèééA$aÙ²e€ŠŠŠ&cyðà–.]ŠåË—£]»v¸|ùrÝ—¬šûݶ屫•"/*²–áС²¶^HÅÅB™ê±‚–.MTpTDÙÙ‘ÍBúé§,…·- iïYUWWÓòåËÉÁÁ ÉÇǧîú}mm-­Y³†œœœÈÄÄ„())‰,,,Ü/HHH '''ÒÓÓ#WWWJJJª+Ãïý}#66–ìííÉÜÜœÞ{ï=‰D Ú‰DÔ£GZ¶lÕÔÔÐ!CÈÐа®¼¬¬Œ¦M›FfffdeeE .$‘HÔd™ªãþß²Õ«WS§NÈÎÎŽÖ¯_OAAAdiiÙd,'Ož$/üzÑ}›g17õsS¿Û¶>vI'X0ITT<¦®]?’9)üë_‡¨wï¥ôäIÛéòúè£]äíMV)¼íæH›¬^äÙ?äädºpáB½²½{÷’———ÜmkM»1ÒünÛòØ›¢ŒdÅ—[!CC}xzÚáÔ)Ù.N˜à{÷*eÚr¤9£PYù11/¾ß¢)²³³‚¬¬,½vv¤®¿yó ¬\ùüþûrè6_A b1a„oQ[[‹ýû߇¶¶jNð'Ož ؽ{·Júc¬­HHH¨{Í)À¾ ØJõïï]™/åÓUãèQÙg5FKK€U«‘“s[¶œTxûŒ±Ö‡“U+¥¯¯ƒ~ýºÉ|ߪsgcøúºaçÎÓ Žì)WW+,Xà‡þó®_o»‹°2Æ$Ãɪ<¸;Nœ-YÀäÉý‘ž~ ÅÅBFõ·> [[SDD$hÌg¯cêÁɪ{é%g?ÀÕ«÷dªïïï“ö _~é==|öÙDœ:•}ûÚÞ&Œ1Éq²jż¼ºÂÈÈÇŽI¿ôèêjcÂo¥] €¡C{ 8x–,Ù‡7ør cìÅ8YµbººÚ:´ÒÓe_ÛkÊ”((¸‹¬¬ë Œ¬¾O?›N˜;w+jjj•Ö¶¶6öìÙ@À_üÅ_JüÅ~2Ч®·r?üð+–/OŸ~==Ùþx^yåKôíÛ +W*8º¿]¹r_cÞ¼ˆŠ£”> qî_ndLÙ´µµ1zôh(ªÉ=œ¬Z¹¿þ*ÃÀŸbÏž<ØY¦66n<†¯¿NÅùóÿ‡víôáß6l8ŠO?Ý„„wdŽ•1Ö*ñç¬Z;;»Npp°À±c²^j⾉jpðà Œ¬¡9s†cÐ '„‡ï‚PØp›uÆXÛÅɪ 1ÂE®÷š™âå—ÝpFQ5¤¥%À7ߣ¢â1Þ{oÄb>égŒ=Åɪ >Ü/ÞBII¥ÌmÌœ9'NäâÊ•; Œ¬!k뎈‹›…£G/ãË/*µ/ƘæàdÕ¼ôRwèèháøñ+2·1lX88X`ÇŽ Föbýú9 :z¾ù椤üÞ|ÆX«Çɪ 04ÔG¿~Ýäº(< g U+0º›9s‚‚báÂÈÍUîÙc¬åãdÕF æ‚cǮȵ¬QPÐ@TUÕ`ÿþ Œ¬qŸ}6æxûíPQÁ.kË8YµC‡öÀ½{¸|ù¶Ìm˜švÀ˜1½±mÛ¯ Œ¬qºØ¼yÊÊbÖ¬-JýÀ0c¬eãdÕFôîm‡N:àÈÙW³€éÓ_¹s×ñÇE Ьi¶¶¦HL|—/ßœ9q¨­«¤_ÆXËÂɪÐÖÖÂÈ‘=qèÐE¹Ú0ÀnnVؾý7EÖ< lÝ:§Nåañâ}*ë—1Örp²jCüüÜ‘•uM®)ìðæ›ƒðÓOY¨¬¬RPdÍëÓ§+¾ý6;vd &æ¨ÊúeŒµ œ¬ÚáÃ] ­­%÷î¿S§ PéÙôÂÊ•øì³ýœ°kc8Yµ!FF4È ¿üò§\ítè 7߈M›ŽãÉÕÞCzóÍAX»6_|‘ŒÏ>KæMk#8Yµ1¯¼âŽ£G/É=³.4tîÜy€ƒ³™ä&LðƦM¡ˆ=ލ¨½¼,cm'«6ÆßßBácdf^•«[[Søû{àûï)(2éŒÙëÖ…`×®ÓOài팵rœ¬Ú{{389YâÈù.ÀìÙÃpîÜ5œ;§¼›2fLolÞŠýûÏãÍ7cP^þP-q0Æ”“U4r¤;–o ; ä/¯®Ø¸Q=gWÀÓއ…£¸X?¿/qá µÅÂSNVmŸ_Oäçßŵk%r·5sæ8ð;nÜ(U@d²qt´@ròûèÑ£ ^ý[ìÛwVm±0Æ”ƒ“U4`€ŒŒ r)pܸ>05m~PÍL11iøø9 ì÷ßßO?ݪª'j‰1¦8œ¬Ú ]]mŒÙÈ?“O__ó翌¸¸“(-•ïÃÆòÒÕÕÆªU“ñõ×S±mÛoøZeËB1Æ”‹“U5jT/df^•{5 ˜>}0tuu°eËID&¿)SàĉÅèÚÕ £G¯Á矧 ºšÏ²Ódœ¬Ú(__7èééàðá¹Û24ÔǬYC{ BaËØÊÃÒÒ[¶ÌÂ’%c{ ãÆ}ƒ¬,õÌZdŒÉ“UÕ®†íÔTù“ðt»XLˆ?¥öAKK€yóFàçŸ?Bûöz7îßøè£µ_®dŒIO@¼^M›•p‹íANÎg04Ô—»½O?ݽ{Ïâôé¥00ÐU@„ŠCDHL<÷߉µ˜3gÒÒ¾GUUË8dLÓ¹¹¹á›o¾QVó{8YµaååÑ»÷'X·nÆŽõ’»½»w+0hЧXºtf΢€O$ªÆúõiؽûΜù“ÔcﯿþBFF†2×êädÕÖ®ƒ……1Ö¯Ÿ¦ö""vãÔ©<?þ1ttZîUæ;<•ÂeLvïÞ)S¦(5YµÜÿ&L%FòDZÚŸ [[oÁ_ܼY޽{3Òž²èèÔcL œ¬Ú¸Ñ£=QQQ…S§òÒ^·næ ñÁÊ•ñøqBÚdŒ1NVm\—.&èÙÓ?ÿ¬˜Y6B¡ññê]Õ‚1Özp²b˜0ÁÉÉv)°sgcÌœ9ÿþ÷aTVV)¤MÆXÛÆÉŠaüø>(/¤°KÀÓ{W55µØ²å„ÂÚÔDùùù{Lmª¢M[Vmm¼ÊÆÉŠÁÆÆÞÞ]‘”t^amššvÀܹ#°n]}о}{XYYÕ{ãÐÔ˜x¼/¯Zcÿ5qâ·´`A¼BÛ¬®~BƒNaaÛÚ®¼Hš?ÿ 6¥¥%%&&Ò­[·èÀdkkKhãÆdccC©©©tïÞ=:|ø09;;ÊË˫맲²’ôõõ)&&†nß¾M›6m"ª¬¬lÐß³zþþþ”››KäììLÑÑÑueb±˜ÂÃÃÉËË‹JJJêÕ{^pp0ùùùQAAegg“‡‡EGG7Y¦®¸GEiiiTYYI+W®¤7ÞxƒnܸAÙÙÙäííMQQQôå—_RÏž=);;›þøã8p …‡‡7¿P($=== ¥¢¢"Ú¶m »wï69&oããmŒ´¯'ìædÅêÄŤîÝ‘HT­ÐvÌ&kë…”•u]¡íÊCÚWÏž=)..®Þc[·n%äááAÛ·×OÆ;vìh¬ÊÊÊHWW—¾úê+*//'±XLT[[Û ¿gõ²³³ëÅììì\WIèÊ•+ ê=S]]MÚÚÚ”““S÷Xbb"9;;7Y¦®¸Ÿ¯çêêJ·oß®ûùðáÃäååE...”˜˜X÷øŸþY÷óóqWUUÑ¥K—¨²²’jkk騱cu¿“¦ÆÄãm|¼QE²âË€¬Îk¯õÆãÇ5 ÙAøy½0th|òÉ»¼Qaa!¼¼ê¯Ÿèéé (((€‡‡G½2ww÷m˜šš"==°µµÅðáÃqâÄ hi5þ2ìÞ½{Ý÷®®®(*ú{3ÉÌÌLŒ1_|ñE£õ‹‹‹Q[[ ''§ºÇœQTTÔd™ºâvuu­ûþÚµk°²²‚@ €@ ÀÈ‘#qõêU\¿~½^ûnnnxýõ×´¥§§‡ÜÜ\ oß¾ˆ‹‹“hL<ÞæÇ«ÊL…LóL™òÍ×ü¥tñâM²µý~ú)KámËBÚw‚ÎÎδuëÖz=»ÌâêêJ;vì¨W¶sçÎgV=¢ãÇÑÓwÁqqq¤­­M¥¥¥ ú{Ñ;ï={ö££c]Yee%]¾|™ôõõ)--­^½gž=]¼x±î±ü‘œœœš,SwÜDD¶¶¶”——W÷syy9]ºt‰)99¹îñóçÏÓgŸ}Ö G‘¾¾>%%%‘X,&‘HT÷;ijL<ÞÆÇÛ>³b*7vlo9ò'>Tì‡yÝÝ­1uê@,_¾"QµBÛV…ÐÐPDDD )) wîÜAjj*¢¢¢ ,@dd$:„ÒÒR¤¥¥!::ºÁç_üýý±oß>…BTWWCWWíÛ·ÄÆÆâÁƒõê¼ÿþûÈÏÏGff&/^Œº²:ÀÅÅQQQ˜?~½‰••O÷ìÒÕÕÅ”)S†«W¯"''K–,Appp“eêŠûy'NÄÇŒëׯ#;;X·n¦M›†üãÈÉÉANNÞ}÷]\¿Þpcͪª*TWWCOO"‘Ë–-TTT49&oýñ¶ÊL…Ló…"rtŒ¤;3Þö;÷ÉÙy}óÍa…·--iß VWWÓòåËÉÁÁ ÉÇǧî¾Tmm-­Y³†œœœÈÄÄ„())‰,,,¼ƒNHH '''ÒÓÓ#WWWJJJª+ÃßýýŽ966–ìííÉÜÜœÞ{ï=‰D Ú‰DÔ£GZ¶lÕÔÔÐ!CÈÐа®¼¬¬Œ¦M›FfffdeeE .$‘HÔd™ªã~Ñ™†P(¤™3g’©©)™™™ÑܹséáÇôøñc 'kkk211¡   *//¯×ÿ3«W¯¦N:‘­_¿ž‚‚‚ÈÒÒ²Ù1ñx“H<Á‚©Å¼y[é7Ö*¥íµk!GÇHºv­D)íKJ/®gÿ(’““éÂ… õÊöîÝK^^^r·­i45nYµµñ6†/2µ˜4©~û­7n(þÃ¥ó翌îÝ;ãÃwjìd‹ÿ•deeáÑ£GÈÈÈÀÒ¥K1{ölu‡ÆX«ÁÉŠ50b„+,, ‘˜xNámkkkaÕª@œ9s»w·ì=¯$‰ñãÇc„ 033ìY³ŠyóæÉܦ±±±\õÕESã–U[¯:ñNÁì…–-û ¿üò'NžüX) e.[ööìÉÄñãÃÜÜPáí7G;›2ÖfðNÁLm&MꇫWï!+ë†RÚŠ cãvø¿ÿKRJûŒ±Ö…“{¡^½láæf…}û”s©®];=|òÉ8$&žÃ¯¿æ+¥ÆXëÁÉŠ5jâľøé§ó ]‰ýy£G{âÕW=°páNTT¼ø³'Œ1p²bM˜0ÁB¡éé—•ÖÇ¿þ„ÚZ1>üp—Òú`Œi>uÀZ.S Ü;vdàÕW=š¯ cãvX½z*‚‚6 1ñ&Nì«”~óý÷ß«´?ÆZ£sç?søq²bMš>ý%Ì›·EEå°µ5UJƹ 4t(/Þ‹•ÖÏólll ­­ÍÓŽS®]»*µ}žºÎšôä‰ýûÿ‚ƒ} ´~ª«Ÿ`Ô¨Õ02j‡}û@[›¯P3ÆêðÔuÖ4-¼ñF?ìÜyµµb¥õ£§§ƒ¯¿žŠóç¯cãÆãJë‡1¦™8Y±f…„øàÎHK»¤Ô~¼¼º""bþùÏœ>]¨Ô¾cš…“kV·næxé%'lßž¡ô¾Þ}×£FõÂÌ™›ð×_eJï1¦8Y1‰û -íOܹó ù'Ëé믧¢sgcÌŸ¿UiŸñbŒiNVL"cÆô†‰I{ìÜyZé}uè M›BQPpK—þ¨ôþc-'+&]]mŒß»wŸX¬ü ¤ŽŽX¹r2¶mû ûöUzŒ±–““Ø´i/áÆ2¥O´xfüø>˜3gÂÑQ ’>c-'+&1—.>ÜßLe}.[6ãÇ÷ÁôéqñâM•õËkY8Y1©„†ÅÉ“¹¸té¶JúøòË)è×Ï!!QTT®’~c- '+&??789YbëÖ“*ëSWWß?––F ù÷ï?RYߌ±–““Š@ À[o Æž=gUš4 õ±uël<|X…¹s·âñã•õÍS?NVLjS§„ŽŽví:£Ò~»t1ÁŽópåÊmLŸ¾V©´Ƙúp²bR34ÔG``lÞ|\©ë¾H÷î‘’ònÜ(ÃĉkQVöP¥ý3ÆÔƒ““ɬYCqëÖ}9ò§Êû¶³ë„}û ¢â1^ý[+U Ƙzq²b2qp°À!=°y³ê&Z<ÏÆÆ»vÍÇãÇ5 \k×JÔcL58Y1™½û®Ž¿‚s箫¥ÿ®]Í”†öíõ1zôœ<™§–8cÊÇÉŠÉlÈîèÛ×6¤«-†.]L°^}ÕAA1X·îˆÚbaŒ)'+&—ùó_Æþ“«Wï©-==¬^=|à/¾8€ÈÈÝ<µ±V†““˨Qžpr²DLÌQµÆ!ðÑG¯âûïßÂþýç1jÔj\ºtK­11Ƈ““‹––óæ@BÂ ÕÆŒé'Ãʪ#^}õk|ýuªJV‰gŒ)'+&·I“úÁÔ´¶l9¡îPFøá‡9X°Àÿú×a¼õÖFܼÉk 2¦É8Y1¹ééé`Μaˆ‹; ¡ð±ºÃèèhaÑ¢ÑHHx÷0bÄJlÜxLåbfŒ)'+¦!!> víRþNÂÒxé%g;…E‹FcÕªƒ9ò+œ={UÝa1Ƥ$ "¾ Ï⫯RwKah¨¯ÖXN:___TWW×=¦£c _Õ¢¬ì'5FÇXÛãàà€ÂÂBY«ïÑQd0¬m›;w6m:Í›O ,ìµÆróæMTWWc÷îÝõ'"<~,F»voª)2ÆÚžß~û kÖ¬‘« NVLaŒ 0gÎ0¬_Ÿ†·Þz &&íÕÕcmž".àñ=+¦Psæ ‡––±±ÇÕ c¬ádÅÊÈÈóæ@LÌQ”–Vª;ÆX+ÁÉŠ)ÜìÙÃ`` ‹ Žª;ÆX+ÁÉŠ)\‡ú˜;w86o>{÷*Ôc¬àdÅ”bÆŒ!Ð××ÅúõiêE©òóó!Z|›ªèCq«‚¢ÆÁÇC±8Y1¥022@xx6o>ÂBõ­È®l;vÄ¢E‹TÖ_aa!ÌÍÍUÖŸºµµñ6§-NVLi¦M{ ŽŽøì³du‡¢4æææX±b…Êú‹Å(--UYêÖÖÆÛœ¶|<8Y1¥ÑÑÑÂâů!5õ¿‹¯X,ÆÚµkáææ###øøø ==D„˜˜¸»»ÃØØ¾¾¾HII@ hp‰$99žžž000€££#âãã_Øß³zIIIpqq¥¥%ÂÂÂPUUUïyD„ððpxyy¡¤¤ƒ téÒ¥î9÷ïßÇŒ3`nn[[[„‡‡ãñãÇÍ–=OÙq7×GMM """йsgXZZ"""555/¯@ ÀæÍ›áææ ¬X±ñññppp€‰‰ –.]Z÷Ü””ôéÓíÛ·‡••U½7’ŒùEãàãÑøñP*bLɦLùŽFŽü’jkÅ*ë3!!¤ùóÞ°aYZZRbb"ݺu‹8@¶¶¶€6nÜH666”ššJ÷îݣÇ“³³3 ¼¼¼º~*++I__ŸbbbèöíÛ´iÓ&ÒÑÑ¡ÊÊÊý=«çïïO¹¹¹”‘‘AÎÎÎ]W&‹)<<œ¼¼¼¨¤¤¤^½ç“ŸŸPvv6yxxPttt“eªŽ»¹>V®\Io¼ñݸqƒ²³³ÉÛÛ›¢¢¢^8^DB¡bcc Mž<™„B!mذPII …BÒÓÓ£ÐÐP***¢mÛ¶º{÷n“ñ45>MÆHûz|Ýœ¬˜Ò]¼x“lm?¤}ûΪ¬Oi_={ö¤¸¸¸zmݺ•‡‡mß¾½^ÙŽ;$«²²2ÒÕÕ¥¯¾úŠÊËËI,SEEÕÖÖ6èïY½ìììz1;;;וEFFºråJƒzÏTWW“¶¶6åääÔ=–˜˜HÎÎÎM–©:îæúpuu¥Û·o×=ÿðáÃäååÕè?第¬ºñ¿èç¼¼<ªªª¢K—.Qee%ÕÖÖÒ±cÇêÊšŠ§©qðñhúx4FÉŠ/2¥sw·ÆäÉðùç)‰ª›¯ ………ðòòª÷˜§§'   õÊÜÝÝ´ajjŠôôtdddÀÖÖÇlj' ¥ÕøË¬{÷îuß»ºº¢¨¨¨îçÌÌLŒ1_|ñE£õ‹‹‹Q[[ ''§ºÇœQTTÔd™ªãn®k×®ÁÊÊ #GŽÄÕ«¯ŽoddÐÕÕ}áÏ §§‡ÜÜ\ oß¾ˆ‹‹“jÌ’>*$OªcLR·n•“£c$­[wD%ýIûNÎÙÙ™¶nÝZï±g—I\]]iÇŽõÊvîÜÙàÌêÑ£Gtüøq""ªªª¢¸¸8ÒÖÖ¦ÒÒÒý½èùž={ÈÑѱ®¬²²’._¾Lúúú”––V¯Þ3ÏΞ.^¼X÷Ø?þHNNNM–©:îæú°µµ¥¼¼¼º6ËËËéÒ¥KžI<ÿÜÆ~~ôèéëëSRR‰Åb‰DõÊ‹§©qðñhúx4†Ï¬˜Æ°²êˆ°°W°zõÏ(*jy»ö†††"""III¸sçRSSX°`"##qèÐ!”––"-- ÑÑÑ >{"àïï}ûöA(¢ºººººhßþ邾±±±xðàA½:ï¿ÿ>òóó‘™™‰Å‹#$$¤®¬C‡pqqATTæÏŸ_obDeåÓ¥¬tuu1eÊ„……áêÕ«ÈÉÉÁ’%KÜd™ªãn®‰'âã?Æõëב€€¬[·®Áx¥QUU…êêjèééA$aÙ²e€ŠŠŠfãiêøóñhø÷¨ò¤:ƤQSSK~~«(((Fé}IûN®ººš–/_NdhhH>>>u÷¥jkkiÍš5äääD&&&@IIIdaaÑànBB999‘žž¹ººRRRR]ž{Çû¬^ll,ÙÛÛ“¹¹9½÷Þ{$‰´)‰¨G´lÙ2ª©©¡!C†¡¡a]yYYM›6ÌÌÌÈÊÊŠ.\H"‘¨É2UÇÝ\B¡fΜI¦¦¦dffFsçÎ¥‡¾p¼ðL‚ˆhõêÕÔ©S'²³³£õë×SPPYZZ6OsãàãQ’à Lãœ>]@ÖÖ ))é¼RûQÀ‹£îEšœœL.\¨W¶wï^òòò’»mM£©q+ Éðe@¦q pÄÔ©ñÉ'‰ EêG"ÙÙÙ AVV=z„ŒŒ ,]º³gÏVwhŒµœ¬˜Ê-]:µµ„U«ª;‰DFFbüøñ˜0aÌÌÌ0kÖ,„††bÞ¼y2·ill,W}uÑÔ¸•…‡êˆ°…#cRJH8ƒ>Ú…ýû߇··½ÂÛß½{7¦L™¢JcòQÀëqŸY'§§ FIDAT1µ ìoïnX¼xjjjÕc¬…ãdÅÔBKK€µkƒQXxWc.2ÆÔ‡“S›®]ÍðÉ'ãñÝwiøí·u‡ÃkÁ8Y1µ ñŸŸ;.܉РÈ1¦1tÔc«WO…¯ï*,[öV¯žªÐ¶GŽ©ÐöcÒ+..–» NVLíÌÌ ±jÕdÌœ¹ ¾¾nxíµÞr·9pà@L:µµû,‰‰çÔcL x¹%¦¦O ׯ—à£vÁÖÖ8ª;$Ƙ ñ™ÓÿøÇXøù¹cÖ¬-¸t鶺ÃaŒ©'+¦1´´X·nzõ²E`à:\¼xSÝ!1ÆT„“Ó(úú:غu6 pÄo¬ÅÙ³WÕcL8Y1£««ï¾›Ž~ý²çÎ]SwHŒ1%ãdÅ4’¾¾6oÅ€˜<ù;¤¤ü®îcJÄÉŠi,=½§—ßyçė¥Kä•.k¥xê:Óh}gçÎX¸p'Š‹àßÿ~íÚé©;4Ƙñ™kÆïƒøø¹8u*“&­Ãµk%ê‰1¦@œ¬X«1x°3RS?„¶¶6üý¿ÂÞ½¼c­oÂZ'OÄX½úg|ûí/7Î +Vò#Œi¶=œ¬X«uá ¼óN<>¬Â’%cØ_Ý!1ÆdÃûY±ÖËË«+RS?Ä«¯zàƒvbæÌM¸u뾺ÃbŒÉ€Ï¬X›pæL!"#÷àÖ­r|ôQBC‡BWW[®6¯]»†C‡)(BÆÔÇÀÀS§N…ž^‹EË—YÛQSS‹uëŽàÛoÀÒÒ‹Æøñ} dj/((»víRp”Œ©Ç¾}û0qâDu‡ÑNV¬í)/ˆõëÓ±qã1ØÛ›!<<cÇzIÝÎäÉ“»wïVtˆŒ©”@ @BBBÝßt Ä÷¬XÛcjÚÿøÇk8xðCØÙu¼y[ñÆkqìØu‡Æk'+Öf¹¹YaÛ¶¹Ø·ï]èêê ((£G¯Ajê¼lc- '+Öæùø8a×®ùHMý66¦˜={ |}W!.î**«;<Æ8Y1VÇÓÓ7ÎÀ±cQ8П}¶ÞÞÑX´hoôȘšq²bì89YbåÊ@deý-_ÍÇÈ‘_a̘5ؼùJK+UO~~¾Ì3UÙ¦*úPEÜŠ¢I±jNVŒ5ÂØØ³gÃñãQصk>ºu3Ç矧 OŸe˜>}#îÝk"åÿ3êØ±#-Z¤ô~ž),,„¹¹¹ÊúcL¼EcÍ6Ìƹ ºú Ž»‚ää 8~ÜææÊ¿§ennŽ+V(½ŸgÄb1JKKUÖc’à3+Ƥ §§ƒ‘#{â›o‚Ñ·o1Ég ŠÅb¬]»nnn022‚ÒÓÓ!@Dˆ‰‰»»;Œáëë‹””‚—“’““áéé 8::">>þ…ý=«—””XZZ",, UUUõžGD‡——JJJ0hÐ @—.]êžsÿþ}̘1æææ°µµExx8?~ÜlÙó”wS}L˜0~øa]ݪª*˜ššâÀž¾!Ù¼y3ÜÜÜ`aa+V >>011ÁÒ¥K5>VGŒ1™R`` ÄÏß°aYZZRbb"ݺu‹8@¶¶¶€6nÜH666”ššJ÷îݣÇ“³³3 ¼¼|øÖ÷ñãG@YY™q½íÓ§Os躎T*…ññqhš† ±±š¦í¸n86®¿|ù‚ââb£ ñòåKŒaffæ§ã‹ŠŠ ( b±˜ÑFQRRbËvÞ»­ÑÜÜ ŸÏ‡7oÞ ¦¦&­À”•rµ*+¢,q¹\xòä VVV099‰îîn@GGÜn7¦¦¦ðõëWLOO£¯¯/ã=¼¼<ÔÕÕÁï÷ccc‰Dªª¢  àñxðíÛ·´1=B$Áìì,ž={†––#VXXˆŠŠ tww£½½=íÁˆïßÿyŸLUUܾ}]]]XZZÂââ"ž?Ž»wïšÆ²÷nkÔÕÕa}}½½½p¹\{ÿÿe¥\ÿ(‡}#’Ȫöºg•H$¤¿¿_.\¸ 6›M®]»fìK%“I»Ý.'Ož”úúz röìÙŒ=$¯×+v»]Ž=*N§S€Ãö+¶Çy<)++“3gÎHgg§èºž1§®ëréÒ%éíí•?~Hmm­Øl6#®išÜ»wONŸ>-çΓÇ‹®ë¦±lç½Û""mmmb³Ù2ìÀÿöyÌÚVÊõWÁ{V<"„hŸ~Ç!‘Håååƒ8þ<ª««˜ßïÇÀÀæçç4·Õ~âVÊÛJ¹šá!DôKÐÒÒ‚¹¹9lmm! ¡§§­­­‡QNà?Xå·Û­­-455amm /^„ËåÂÇ÷=ç‰'4þ°X)o+åju¼ H´O<)˜þ¼ HDDô°XQÎc±""¢œÇbEDD9ÅŠˆˆr]'Ú'EQ066Æ£Ë韟Û倮íS,Ãû÷ï; ¢S 8vìØa§²“q+""Êu|ÏŠˆˆr‹å<+""ÊyùÆ; """¡¿[0<;CSîIEND®B`‚pktools-2.6.6/doc/html/classUi__MainWindow__inherit__graph.map0000644000113200011300000000025512616110567021441 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm__inherit__graph.map0000644000113200011300000000011312616110567025043 00000000000000 pktools-2.6.6/doc/html/inherit_graph_8.png0000644000113200011300000000363412616110570015421 00000000000000‰PNG  IHDR£%.…YEbKGDÿÿÿ ½§“QIDATxœí›{H“aƯiêRB³Ôti¢aF`¦„t€,¢ K J¨ ÊAdDBeä¡ì@GM–)A'%0Oe¥T¦æJÚb*朻¾>÷9ÝfÊÌñõüàýãyî÷½ïû¹Þ‹=ï|§„$!Ì=¥sÝ@0†0£ÀnfØ ÂŒ»až¹É²²2üí^ÿR©yyy˜3kÆ’’¼ÿQQQ³Þœàߢ´´IIInFˆŠŠBIIɬ6&ø÷H$câ™Q`73 ìaFÝ Ì(°lfF‰Dbr"99}}}¶*a·H$tttÌèÚŽŽ«õS‘›› ™LƒÁ`2OË–-CNNάַ%6ýd¬­­Eoo/º»»qûömhµZDDDàׯ_¶,#G||¡âãão.dlooŸ4ÿúõkzxxÇ.\àîÝ»ùõëW6773""‚'Nœ`VVW­ZÅææf¶´´píÚµLOO'I¶···oßΗ/_r``Àb­VKggg¦¦¦²»»›< þøñƒtqqáµkרÛÛË[·nqÞ¼y°ÚÛt×€qqqÔh4¼qãðçÏŸÌÎΦ··7 ¿}ûÆÊÊJúùùqì6X«ŸœœÌ}ûöQ¥RÑÇLJõõõÆz†...¬®®&I¶µµÑÁÁ*•Š$­j2¦íxǘ8ž©>µ*..6*ùëf eoo¯qüìÙ3†‡‡sÅŠT(ÆùwïÞÇc¢477O™gxx˜mmmàèè(«««½©Õj:99ñÒ¥KÔh44 ìïïçèè¨ÕœÓ];¾zõŠ$©ÓéŒñÞ¹sÇäÚ»wïo¸µú†K—.eXXÏœ93©‡ØØX:tˆ$™™™ÉèèhcÌš&Ó1ãLõ™¨Õœ™ñáÇŒŒŒ4Ž¥R)˜îîî”J¥lii1›{LN7e’T*•\¿~=ÃÃÙ’’bÒ[MM ãââèææÆ 6°ªªêrNgíøáÇIñùóç³±±ÑäÚ7oÞoøTõÏž=KGGG~ÿþ}R%%%ôññ¡^¯gdd$ Lâ–4±fÆ?šŒgªÏD­,™qVŸIâêÕ«ˆ‰‰1Î-^¼ííí ’Ðh4¨««ƒŸŸ¾|ùb<¯±±™™™&ùœœœ¦Ì344„„„Èår444 ??ßxÍÐÐ JKK¡V«±ÿ~ìØ±jµÚjΙàà0YÚÀÀ@455™Ì½}ûvÊ5@WWrss±eË?~|R ¢°°MMMˆ5Y·%MÌ¡×ë===&ó¶ÔÇ65c__T*zzzP]]ØØX|þüÇŽ3ž³k×.œ}zÊ5 ¤¦¦âÈ‘#(**ÂóçÏQQQa’ÛÕÕ;wîÄÑ£G ///cÌš&ãñððÜ»wZ­W®\1‰Ï¶>6ݦÇþþþÜ»wï¤-E«Õ2%%… .ä¢E‹xàÀò÷ïßLOO§ŸŸÝÝÝ™˜˜HFCròöa-IfggÓÓÓ“þþþÌÏÏgbb"½½½I’ÅÅÅ ¦³³3CCC©T*ÿ(çTkŸ¸M›ëõzfeeqùòåtsscTTëêêŒk³T?''‡«W¯6>¦”——Ó××—jµÚ¤ªª*àÍ›7'õhI“‰Úž;wŽ ¦R©4‰ÍTŸ‰ZYÚ¦%ÿ=Á„„„?!؉D‚ââb£ÇÆ!þ;P`?Xüq­àLõîÖÌæ"˜ÂŒ€0ÛßAlÓ»A˜Q`73 ìaFÝ`ñ ̧OŸpýúõ¿Ù‹àǬýýýQZZŠƒþí~ÿç8::B&“™™}#Ìâ ŒÀ~fØ ÂŒ»A˜Q`7üwÑÊ´iszIEND®B`‚pktools-2.6.6/doc/html/annotated.html0000644000113200011300000014062612647637663014534 00000000000000 pktools: Class List
pktools  2.6.6
Processing Kernel for geospatial data
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 1234]
oNconfusionmatrix
|\CConfusionMatrix
oNFANN
|oCtraining_data
|\Cneural_net
oNfilter
|\CFilter
oNfilter2d
|\CFilter2d
oNimgregression
|\CImgRegression
oNqgis
|oNpkcomposite
|oNpkcrop
|oNpkdiff_accuracy
|oNpkextract
|oNpkextract_grid
|oNpkextract_random
|oNpkfilter_spatial
|oNpkfilter_spectral
|oNpkfilterdem
|oNpkgetmask
|oNpklas2img
|oNpkreclass
|oNpksetmask
|oNpksvm
|oNpktools
|oNpktoolsAlgorithm
|oNpktoolsAlgorithmProvider
|oNpktoolsUtils
|\NProcessingPktoolsPlugin
oNstatfactory
|\CStatFactory
oNUi
|\CMainWindow
oCBadConversionThrow this class when syntax error in command line option
oCCache
oCCompare_IndexValue
oCCompare_PosValue
oCCostFactory
oCCostFactoryANN
oCCostFactorySVM
oCDataModel
oCdecision_function
oCDecrease_IndexValue
oCDecrease_PosValue
oCEgcs
oCFeatureSelector
oCFileReaderAscii
oCFileReaderLas
oCImgRasterGdal
oCImgReaderGdal
oCImgReaderOgr
oCImgUpdaterGdal
oCImgWriterGdal
oCImgWriterOgr
oCIncrease_IndexValue
oCIncrease_PosValue
oCIndexValue
oCKernel
oCLastReturnFilter
oCMainWindow
oCONE_CLASS_Q
oCOptFactory
oCOptionpk
oCPosValue
oCQMatrix
oCSolver
|\CSolutionInfo
oCSolver_NU
oCSVC_Q
oCsvm_model
oCsvm_node
oCsvm_parameter
oCsvm_problem
oCSVR_Q
oCUi_MainWindow
\CVector2d
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract__coll__graph.md50000644000113200011300000000004012616110566025752 0000000000000090220da46079f3d06c739089255dbeedpktools-2.6.6/doc/html/classCostFactory__coll__graph.map0000644000113200011300000000056312616110567020322 00000000000000 pktools-2.6.6/doc/html/CostFactory_8h_source.html0000644000113200011300000003350512647637661016771 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/CostFactory.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
CostFactory.h
1 /**********************************************************************
2 CostFactory.h: select features, typical use: feature selection for classification
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _COSTFACTORY_H_
21 #define _COSTFACTORY_H_
22 
23 #include <math.h>
24 #include <vector>
25 #include <map>
26 #include "ConfusionMatrix.h"
27 #include "base/Vector2d.h"
28 
29 
31 public:
32  CostFactory(void){};
33  CostFactory(unsigned short cv, short verbose) : m_cv(cv), m_verbose(verbose){};
34 
35  virtual ~CostFactory(void){};
36  void setCv(unsigned short cv){m_cv=cv;};
37  void setClassValueMap(const std::string& classname, short classvalue){ m_classValueMap[classname]=classvalue;};
38  std::map<std::string,short> getClassValueMap(){return m_classValueMap;};
39  std::vector<std::string> getNameVector(){return m_nameVector;};
40  void setNameVector(std::vector<std::string>& nameVector){m_nameVector=nameVector;};
41  int getClassIndex(std::string classname) const {return m_cm.getClassIndex(classname);};
42  //pushBackClassName is for confusion matrix
43  void pushBackClassName(std::string classname){m_cm.pushBackClassName(classname,true);};//doSort=true
44  //pushBackName is for nameVector in CostFactory
45  void pushBackName(std::string classname){m_nameVector.push_back(classname);};
46  void setNcTraining(const std::vector<unsigned int> nctraining){m_nctraining=nctraining;};
47  void setNcTest(const std::vector<unsigned int> nctest){m_nctest=nctest;};
48  //getCost needs to be implemented case by case (e.g., SVM, ANN)
49  virtual double getCost(const std::vector<Vector2d<float> > &trainingFeatures)=0;
50 
51 protected:
53  std::map<std::string,short> m_classValueMap;
54  std::vector<std::string> m_nameVector;
55  std::vector<unsigned int> m_nctraining;
56  std::vector<unsigned int> m_nctest;
57  unsigned short m_cv;
58  /* std::string m_classname; */
59  short m_classvalue;
60  short m_verbose;
61 };
62 #endif
pktools-2.6.6/doc/html/classONE__CLASS__Q__coll__graph.md50000644000113200011300000000004012616110566020103 000000000000003cc848b1d60d5cb3df39d11225084950pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask__coll__graph.map0000644000113200011300000000011312616110567023732 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite__coll__graph.png0000644000113200011300000000724412616110567024673 00000000000000‰PNG  IHDRÕpó¢‰bKGDÿÿÿ ½§“YIDATxœíÝ{P×ð³Jd(B © Ð3Nÿ¨”fPj u*’@}@Ë(SÊÃZè´ÚZ[”D^NC)Q@iD{q$«R‘ÇEêƒg;(HÉîýcïÝFH¸ÀIà|þpv{Îùø²» IÄ‚‰ìe å å 剻€(ŠÖÖVÇa²Ä988ØÚÚ®â¿ô(2™l``@¾5K’L&ëëëÓŸo²åäéé »„¥ì?þ€]ÂsÐýÊÊÊÓRÈ_[[†a‹9Ô矎aXzzú|Õ0]w ÃÚÚÚæ<¬þ[ ùÓª££ƒÁ`,ÄÈA;;;‹D¢ùsÕªUIII`!ËÖOK68Ž ,ÄÈ÷îÝ{ðàA^^^cccKK˼ŒÉ`0ȳé•­Ÿ ,äuª¼¼ÜÝÝÝÎÎîðáÃãããÔW ‚ˆ÷ööþûï¿7nÜX³f ù¥¡¡¡½{÷2 ''§øøx…B1]#E,¿öÚkæææL&S(RíÅÅž¾¾SOAðùüõë×[YYmÞ¼ùÒ¥Kä…uê\äZ®]»æìì|öìYò°Ie*++Y,–µµuZZÙ‚aX~~þºuëlmmÓÓÓ…B¡««+N?~üø¼}£ ¡7z{{%ÉÌÇ´¶¶ØlvKKKMM ‹ÅJII!q§ÂGIuäñx[¶liooojjòòòJIIÑÚHõ133ãóùR©4//F£ŒŒ㸫««@ âÓO?õôôÔ,Œ ˆœœGGÇ_~ù¥¿¿ÿêÕ«,‹lŸn®­[·VUU566’‡M*ðöÛoËd²ÒÒR¹4@hh¨L&ËÍÍìÚµK&“ ê€477777ëöƒYH™¿¦¦&rW$±X,²111ðèÑ#Í#Ém¥RillL}ßËÊÊX,–ÖFª×àà ‰‰É‰'ž>}Šãø³gÏÔj5A5554ü1×ÕÕîÝ»§9——×?þH\TT˜a.r-T÷©ù»~ý:AjµÐÚÚJ6Ö×ד뚴M0}ËŸ]I¯¼ò ¹áááÑÕÕEn×ÖÖúùù¥¦¦N=¾··W­V»¹¹‘»,«««Kk#ÕÅÚÚZ"‘ÔÔÔ899ùúúÞ¸qÃÈÈP\\¬R© †a6lLº···{yyQ»ëׯŸ®j 3/ÖÁÁ@ÎNY¹r%ÀÄÄdÒ¶Á1Èü‘' @KK ùãˆÅb>Ÿ_\\,‘H&¿zõjcc㎎r·½½ÝÑÑQk#ÕE.—ã8~þüùÁÁÁˆˆˆíÛ·ªÕj‘H”‘‘ñìâââD"¡ñÍ¿±>xð`ºÈíæf¾žZÒO™¿ØØØ¶¶¶ÚÚÚ£G†……‘–––îîîGŽ‰ŽŽ¦IŒŒŒLLLBBB>ÜÙÙÙÜÜ|ìØ1§µ‘šÃ06›]ZZ*“É”J¥‰‰‰……Å7úúúx<ÞŠÿár¹­­­äÝ)&&&11±²²r`` ªª*%%ð™çšŠ,{Y€}ðÙßÿåææº¸¸0ŒC‡ÉårÍ{&¹\¾víÚää䉉‰7ÞxcÅŠdûàà`xx¸½½ýG}$—˵6j%‰ÜÜÜLMM=<<ÊËË ‚ˆŠŠb³Ùšõà8îææ–””DuT«Õ™™™nnnt:=00°¼¼ÜÖÖö…sQÛ“Ê·t@ãþojã¤íéèÛýŸAæoQÊ™#±XÜØØHí–””x{{C¬g}ËŸA^õYSSSXXX}}ýØØXMMÍñãÇ###a¥¿ôîõ§3³²²ŠŠŠ‚]ÅLÇÆÆ8N?“ÉÜ¿¿ž FèÍûÏûúúîß¿ïç绥Œ|l®?/2G×_&”?&”?&”?&½{üÛÓÓ»„¥L¡P˜››Ã®âz”?333 Ãæë‹Ç‰Ó§ë‚ƒÝW®E«V­‚]Â?ô(t:Ý××v:¨©i¿uëgww&ç»C…îÿæîÂ…:ò_• }fÍ¡üÍ‘R©*+k UW?‚]Ž¡Bù›£ë׎ŒÊÊê`—c¨Pþ樴´ÎØØ RáW®4ÉåJØ$”¿¹ÿ׿šU*5¹;>®ºzõ>Ü’ Êß\h†`d„•–Þ…XáBù›‹ÒÒ»šoËP©p‰ä¡L&‡X’BùÓÙààhuu‹ZýÜs.A\¾Ü«$Ã…ò§³K—þ=µ‘ ˆóçÑ%Xg(:+)©ú¢]'jjÚ{{‡¡”d¸PþtÓÓ3TW÷ŽkyѸ±±‘X¬åÔˆÌåO7bqãtoXP©Ô¥¥è‰hÝèÑë ÂØ˜ÒÞÞŠÚ777¡Ñþûk¼¤?ª`AèÑû ‘ƒÃG|þžwÞñ†]ˆ¡B×_&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?*BÃo¿ýfjj »"Cbfældd» C’ ¹ç>ÿ¹»»[©T&''Ã*YÚΟ?ÿçŸj¶hùüq??¿Å©Yn~ýõ×I-èþ å å åió×ÝÝíïï«ûB›Çò–ÏJ§ZÀü­X±"44táÆ‡‹ZT*ݱcìrЂ®tóG§Ó8°pãÃE­Çq™L»œ´ +Õ9A\¸paÏž=Û¶m‹‰‰ihhð÷÷'âçŸÞ»woPPP\\ÜíÛ·ýýý5ÏÛ·nÝŠˆˆ`³Ù\.·²²rÒ˜ä‘7oÞ þþûï'&&4gÌÎÎŽŒŒV«Õ!!!'--mdd„?88888˜Ïç«Tªå¹ÒYÒ9?üðCdd¤P(|ÿý÷ÓÒÒ—/_ …111EEE<ïÔ©Sš] EJJ ‡Ã)..ÿúë¯ ÅÔ‘/^¼˜–––ššúûï¿‘A‚úúúŒŒ :^RRR]]–––™™ùøñãÂÂBò°“'Oö÷÷óùü¯¾úª¶¶ö§Ÿ~"Ûëêê²³³8““sûöí¼¼¼ƒ …Bê÷xê¤S‡š¹þÓ§OÊÊÊÈÝ’’©T*¾ýöÛúúú‚‚‚å¼ÒÒ9¥¥¥ÑÑÑ›6m²±±ñññ‰ŒŒ¤_ýu:¾aÆ}ûöiv™˜˜ B.—›ššŠÅb33³©#ª{HHˆ……›Íp¹\ ‹ÀÀ@À³gÏ´Nªu¨YÖOºråJll¬“ÉŒŠŠºsçÎr^é éüÿÿJ¥R‹Eí2™L@OO««+ÕøòË/kvY¹refffIIIAAÁÚµk¹\®ÏÔ‘œœÈ ggçþþ~rûÑ£GÞÞÞ………GŽôööR‡¹¸¸¸¸¸ž>}Šã¸ƒƒÙîèèHu·°°Ðh´IÛÓMªu¨YÖOzòäÉÎ;©]KKËå¼ÒÒùüÇ`0ÚÛÛ©]òÏÉ«W¯îìì¤ÿúë/Í.ããã8ާ¤¤ˆÅâmÛ¶=z”ú¥ÔÔÕÕEn<~üØÆÆ†ÜNMM‹‹«ªªjhhØØØøÃ°7ß|“¬pù¬TWAÔιsçBBB$Éìûwww‡……¥¦¦ÚÙÙ¹¹¹‘ÕÕÕB¡0''G§Atš÷ÿ‡&]|Ÿ}ö™­­í¹s稖ùyþ¹££ãË/¿lmm¿ÿ~~~~PPмŒŒ,m:_µÚ½{·B¡8vìØÐн½ýÖ­[·oß>ûî–––:?/Фúàÿ½þ"Èì-ÔõAæå å åIËãßøøøÅ¯Y:::&ýÁæ¹üùøøìÞ½[­V/nUÈrÁd2wíÚ¥ÙòÜó/²ÈÐýÊÊÊÓÁå• oŸëèIEND®B`‚pktools-2.6.6/doc/html/md_examples_pkascii2ogr.html0000644000113200011300000000612612647637662017345 00000000000000 pktools: examples_pkascii2ogr
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkascii2ogr

Examples of pkascii2ogr

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

pkascii2ogr -i input.txt -o output.shp -x 2 -y 1 -n id -ot Integer -n label -ot Integer -a_srs epsg:4326
pktools-2.6.6/doc/html/classEgcs.html0000644000113200011300000001763612647637662014471 00000000000000 pktools: Egcs Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Public Member Functions

 Egcs (unsigned short level)
 
unsigned short cell2level (const std::string &cellCode) const
 
std::string geo2cell (double x, double y) const
 
double getSize () const
 
void setLevel (unsigned short level)
 
unsigned short getLevel () const
 
unsigned short res2level (double resolution) const
 
double getResolution () const
 
void force2grid (double &ulx, double &uly, double &lrx, double &lry) const
 
void cell2bb (const std::string &cellCode, int &ulx, int &uly, int &lrx, int &lry) const
 
void cell2mid (const std::string &cellCode, double &midX, double &midY) const
 

Detailed Description

Definition at line 26 of file Egcs.h.


The documentation for this class was generated from the following files:
  • /home/kempenep/pktools/src/algorithms/Egcs.h
  • /home/kempenep/pktools/src/algorithms/Egcs.cc
pktools-2.6.6/doc/html/dir_f92e37ed5759424bff98155847b1034b.html0000644000113200011300000001045612647637663017577 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Release Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkcrop_gui-gcc-Release Directory Reference
Directory dependency graph for build-pkcrop_gui-gcc-Release:
/home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Release

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/inherit_graph_15.png0000644000113200011300000000225412616110570015474 00000000000000‰PNG  IHDRu%óè1bKGDÿÿÿ ½§“aIDAThí˜KH:k‡Ç£ŽÝ,,š4*ÈDl#ê.ÜGn+“– ]¨eH¹ÑUÐ iSD(µI( ‚¨($m']ìb$%8“¦¦žÅp†ÉË¿§©sdžÕÌÇüÞïÇÏOgÙl ¡Œ¿~»‡öK-´_j¡ýR  GGGßÞÞ~«›`hh¨··;ýà×ãñ8NµZýã]•n·Ûf³åõ‹b³Ù~°¥’¢¯¯/g„Þ©…öK-´_j¡ýRK1~d\\\0 °ƒBâåååJ¥ÒëõÙþ?|9)~ö‹‹‹9]áü(„£££ÖÖÖ…X¬ñññ?Ã0<99©ÑhÎÎÎ ôÿ¢H¿õõõ|>?gpjjêOã|>ff¦¡¡!CT\3ÿe¾mÿ%ý†¦R)½^ßÐÐA^¯O¥RÄ ›ÍA°¦¦æ“ˆÓé”ËåýÓéôìì¬X,ær¹J¥òøø8_mlww·¥¥Åår‘6O¬€ÃáJ¥eeeB¡puuµH/Yëëë9#¤àõza©T* Yì ›ÍNOO÷ôôƒAŸÏ§P(&&&râ÷÷÷###Z­+NŒD£Qu:ÝÝÝÝÚÚOOOf³‚ ÍÍ͇‡‡­­­ÆÆFtRbíG¥Rííí!@ Àßi}A8ÎÒÒR(ZYYa±X‚|iF­V«Õꮊó›ƒÃá õ+‘HB¡z¼³³#“ɈñªªªÓÓS¬81’H$ü~?‚ étúàà$‹- –²Z­è¤Ä8ÚÏçÚÏñKZÿåå…ÍfÏÍÍE"‘L&Ãp:þÒ Ño‘ûo ‰DøÒåëëk@€b›ÅbF£Q§Ó¹Ýî|ÏÏÏ‘Ëåèøíí­L&Ã.“J¥ŸÏ(‘HòÝ i}·¿¿???o2™ …Á`P©TŸ*É^váë7g dqË¿~›šš°+#‘ˆßï'ÆONN¸\n&“ɉÅbÇn·g2™x<ŽÆÛÛÛ­V+Vý^“Æñý6OZ?‹f³ÙD"a±X˜Læóóó—fˆë—Úç‹îînƒÁpssãóùºººˆ×TWWÃ0ŒîŒ¤‘D"‘L&AŒÇã&“ †‡‡‡õz½Ýn||ÜÞÞ6…χqÖg0Ñh4™L²Ù슊ŠbàeûúF£Z­–ÇãÕÕÕ ¾¾¾ãétºººúêê꓈Ùl®­­mnn^\\ìïï‡ èýý}vvV$UVVvttx<tRbœ¸~‰ˆõQmmm J$»Ýþ¥ÒõËÀOi³Ù4 i4…€¾ŸÄ¿à¥ß?P í—Zh¿ÔBû¥Ú/µÐ~©…öK-$ï–——¾ÒàòòR(~Â?l¸\.&“ùK½•cccyŸßh¾zÿ¥Ú/µÐ~©…öK-|Å+ßIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass-members.html0000644000113200011300000002073412647637662023114 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkreclass.pkreclass Member List
pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy__inherit__graph.md50000644000113200011300000000004012616110566027125 00000000000000ef701b67026c6319312d673a8645c11cpktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid__coll__graph.md50000644000113200011300000000004012616110566026206 000000000000005329576720c306ce1e73ae3720c000efpktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask__coll__graph.md50000644000113200011300000000004012616110566023670 0000000000000055dc897a815a6313e823df16f9c9b716pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__random_1_1pkextract__random.html0000644000113200011300000002642712647637662026777 00000000000000 pktools: qgis.pktools.pkextract_random.pkextract_random Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkextract_random.pkextract_random Class Reference
Inheritance diagram for qgis.pktools.pkextract_random.pkextract_random:
Collaboration diagram for qgis.pktools.pkextract_random.pkextract_random:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
 
string RULE = "RULE"
 
string POLYGON = "POLYGON"
 
string BUFFER = "BUFFER"
 
string RANDOM = "RANDOM"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string EXTRA = 'EXTRA'
 
string FORMAT = "FORMAT"
 

Detailed Description

Definition at line 87 of file pkextract_random.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/functions.html0000644000113200011300000001503712647637663014564 00000000000000 pktools: Class Members pktools-2.6.6/doc/html/closed.png0000644000113200011300000000020412647637661013631 00000000000000‰PNG  IHDR à‘KIDATxíÝm @!†ÑGk™É7À-`&séts¦Àñþòð@åk}ª2€… P%Á_Ëþ¿N² .:0Dk¥‹Â›x" Ö›)¡xÒ5õIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img__inherit__graph.map0000644000113200011300000000013312616110567026327 00000000000000 pktools-2.6.6/doc/html/dir_0af1587c8378955de40f48b4bd1869f0.html0000644000113200011300000001221612647637663017652 00000000000000 pktools: /home/kempenep/pktools/src/base Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
base Directory Reference
Directory dependency graph for base:
/home/kempenep/pktools/src/base

Files

file  IndexValue.h [code]
 
file  Optionpk.h [code]
 
file  pktestOption.cc [code]
 
file  PosValue.h [code]
 
file  Vector2d.cc [code]
 
file  Vector2d.h [code]
 
pktools-2.6.6/doc/html/classCostFactory__coll__graph.png0000644000113200011300000006051112616110567020330 00000000000000‰PNG  IHDR-é¦ãOnbKGDÿÿÿ ½§“ IDATxœìÝyXTeÛðç̾Á°ïû¢à†h.}š–šÛ›¥¢ŠY®™šo¯ ¢V¸¢–ff¹+j¸`*f%ˆKšK* ˆ² ‚À00³¯ç|›FVa¹WW×™³<ç>ãpæžç< FmŽbîº(ÈÃÌò0ó ™;@gsùòåÜÜ\sGگѣG{yy™; Ú ÚéZN×ét掴_aaaÇŽ3w´ Pha:.>>>44ÔÜ€ö(44Òt  }€y@`‡˜äaæy ƒ!"<<œÇã5é¨ÜÜ\ ÃZ)¤Ö ¤¤dúôé^^^<oÀ€gΜij ôM Óƒ< ÐÁ”””=zôÑ£GM:ÊÊÊjÅŠ­’±üü|;;»  ²²288˜ÃáÄÇÇß¹sçý÷ß ûý÷ß›TH;Óè²`ü0@ Ã0¬UÇ­ÈÍÍõ÷÷o·÷®oñâÅ?ÿü³aMdddjjê¥K—ÌU³‘Œ'N˜;Ú¨´5NíááaooÿÁTUU‘뫪ª>üðC;;;77·ˆˆ•J…Â0ìèÑ£666›7oF <!äää„^~pf¼|þüù>}ú°X,Ÿ#GŽÔØÚÈ‘+÷ïßhoo¿qãÆ#GŽx{{óùü5kÖ;$&&’•UÎÎÎ7n4^rr²‡‡ÇÁƒÉÎ;çêê*‹BÇïÖ­›\.¯çZNŸ>½téRã70::zß¾}íöM4- !_ϱ±±={öLOOøðá Aƒ"""Èõ3fÌ9rd^^^zzz¯^½Ö®]K–6eʱX¼gÏ„PeeeNNŽáÞerY&“1™ÌÝ»w—––îÛ·F£Éd2ã=y"reXX˜D"Ù»w/B(44T"‘üøã¡ŠŠ ‰DÂ`0fÏž]\\‡*//¯Ò¸qã._¾œššjXÿÁÌš5«¬¬ÌÑÑñöíÛäʪªª={öÔX&Ó5‘HT×›Ùß´úM:uêÔ© î@y …5˜‡uïÞ=!!\~ô蹬Ñh¨TjFF¹>!!ÁÏÏ,-%%…Ü!”““Ó`J!‰ètú–-[Äb1ŽãR©T¯×¶6þDäÊû÷ïV/çää¨Õꬬ,™L¦×ë¯^½ZWxééé5B‹Ånnn}úô!³™zˆD"„X,6¹µ}¾iõƒ< cð\ÐÖ ýýýÉåÀÀÀI“&!„^¯÷õõ%×ûùù“Ë...!:^±Ä?Ÿ¬­­SRRnÝºåææ6|øðëׯS(ÿÞëšz" ÃJãe„ƒÁÈÎÎ;vlÿþýmÚ´O?ýôéÓ§ŸþùŒ3,ÊÊÊ !tøða‰D²cÇr%†a£G>}ú´D"Ñh4t:ÃáiÞ‰LR«Õ†Á`(•Êèèh„T*%7Éd²ºŽÂq|öìÙK–,9~üxRRÒùóçÉõÕÕÕd+´ËëÖ­»zõêÌ™3oÞ¼™žžþå—_îØ±ƒL^;â›x‰™Ÿ‹:ÔPû0•JáââÂçóàŸD"ÑÌ™3mmm?ûì3¥RI–fhu„j5u""&&ÆÊÊÊ××÷ìÙ³†õñññ¾¾¾ # àìÙ³ÄË¢y¢ºV/oÛ¶ÍÆÆÆÝÝ}×®]aaaZ­vèС<¨£%Öwß}¤Ñh‚8s挳³3Ù ¿®&\AL™2ÅÅÅÅÂÂbàÀçÎ3lj‡oZý }Æ`ü0@ kíñÃ@‡ã‡` žK˜äaæy€y@`‡@`V{ÂìqãÆa–››Û¤¢ŒgotM‡@Ó¤¥¥^ŠÅâk×®Õ³~~¾]íõVVV+V¬hùøäaÐ4£F:yò¤áå¹sç†^Ïþ8ŽWVVÖ^ogg·qãÆ–Ðq@M3uêÔ'NMž:ujÊ”)†­‰‰‰ÁÁÁÇÙÙ™L³ŒrrrBÿ<‹LNNöðð8xð ù\òܹs®®®b±!tüøñnݺÉåò¶¿.@Ûƒ< šfÈ!2™Œ|4Y]]}ùòå÷Þ{Ü$•JCBBúõë—““³eË–¨¨(¡PxëÖ-„PYY™¡„­[·:t(88˜|ùî»ïŽ5ê³Ï>Ÿ}öY\\—Ëmó˘ÍÜ@C¥RCBBNœ8Ñ·oßÄÄÄ!C†ØÚÚ’›˜LfZZš»»;›ÍvwwGUWW×.aÓ¦M½{÷6n׿}ûöÞ½{=záÂ…l› ˜Ô‡@“M:õäÉ“AÔx(É`0²³³ÇŽÛ¿ÿƒÖux@@@5VVVóçÏÏÌÌ\¸pa+Å h‡ €&:t¨T*ýóÏ?/]º4qâDÃz¥Ryÿþý]»vÕu8N¯±¦¨¨hçΣFZ¶lYk h €&#M.X°`àÀ†õjµZ£Ñ0 ¥R’J¥ä&™LVWi8ŽÏž={É’%ÇOJJ:þ|kÇh' €æ ÍÊÊ2~(‰²²²ÚºuëŒ3¼¼¼ÂÂÂÆŽëåå5tèPgg纊ڵk—P(\±b…µµõ?ü°`Á²ï$ ÓÃjŒ ¯ðøøøÐÐPsÚ#òƒqâÄ s@»õaæyІíß¿?00ÐÞÞ~ãÆGŽñööæóùkÖ¬©ëNíááaooÿÁTUU5»(ÐÉ@4MRRÒ;w6nÜ•˜˜˜žžcr+„зß~{úôé .¤¤¤dgg¯[·®ÙENÚ‡Z´õh|û0T¯S㻚c|˜†a÷ïßÖjµ Ãx9''ÇÏϯö!6l˜4iB(++ëñãÇär3Š Œ§Àl”"B¨•—kdB¨••id¥Y™V!Ôè5ÂÐô_{sÚ]*faaþÎx¹.………þþþär``````³‹ äaÚ`tŽ:ûÁc™@«ªÒáºÏd0 †QBŒÒPÛ¶3|O¹¸¸ôêÕ !”ššzáÂ…Õ«W›;(Ð.t†Ï7€§X)=Ê35V8Aà/­Á0äЋK¡bm[«™9sæêÕ«½¼¼B‹/îÑ£‡¹#íäa€–—œœl耱ìÂGzŸŸÖLÚqgÇsG†ú°Ú0æòšE[ÆÖz¢¢¢ärù˜1cärùøñã7oÞlîˆ@{íô-ÌÃ㨨ÈÜQ€ökÙ²e[¶l‘>W_yöü®!„êø" úЩÇT;ž£-à-AÀlò“Ä××=Ó)ðÚc†¨ ŠNóœÎýxNÁ<§¾<+o–Yâ •@ÀœÔýíÏŸüRaÿû•dÛýÞ¡a¦¼äoié=Yyº\§ÆÙ6´‘}œûóÌpý0Ìtƒ6ø¶&AÀüJïÉ®~Y(+Sz„¢Ð±Sí__æfØ×å™òÒ¿eÝß³åØÃÈ “€< @» Uàï*ÉüYˆQ®C#7zù¼mÝøÃ¯}UhãÇvîoaãÏÆ`²ÐA@ f*®~Y ÎW͸ػñõ^:%~umaÉ=©J¬cZR‚y.¯Y8÷çÙøs 'íäaÚ\OTå«lüÙM>’@¢\eÉ]éó»Ò²{2\o߃3ñH@+Ä@Ë€< @'Dà„ð‘B]­wbiîX¨äaºœü$ñ󿤮¯[¸´`ZÂæÀlààËÁu„0Kñä\B˜}OŽÛ`K·×-í{q:Ç4J ú0]”J¬{~GúüŽäùm©¬Tð ŽÞêãÜ¿“L¦:ÈÃTýLýüŽÄg¤5Ëž¶yЀû{Kƒ-ƒ¸<¸- ò0 >J‘.q~vÕSƒGudáþ|·ÿ³ä:À˜þ @4LZ¢)¾))ºYýüŽT§Äm»±ýß±í=ÃÁÜqŽ ò0  ô¢ì¬èf5Û†4ËÑÜဎ ò0 %©Ä:&ŸŠQ %hô ZÒµ˜Âç·¤.,<‡ñ=†ó9¶Ð’ Ô êÀ–$)V^­~v­ºì £"ç~žoò=‡ñ¹Ž s‡ÚÈÀV¡–è‹nT^­.þK¢UèÓú°øð ¼ò0 uáZ¢â‰Â¡×Ü€vò0Àl$Eꢯ·¬¸ŽÐŒ¬+‚< 0›§ÉU×¾*ÔÈõ½¸Þ#¬¼GZY¸2Íh;‡æ¤×ÏïH .W^©VUël»s¼GXù¿cÃs‚výäa@»@à¨ò‰¢ðZuÞo¢!Q®-Ìhu‡Ì///¯¨¨ÈÜQ€&£P(AAA|>ßÜt6ŽBÅÜq€Öhæ§R©,--ÝÝÝÍhšÌÌLµZmî(:¡º20\KÜý¾Äë-+Ç>\Ãõw ‡Ú&“ioooî(hפ¥šÂkÕéG>>GŽA <!äää„Òëõ±±±Ýºu³°°2dÈíÛ·É£ŒÌ/c¶ÿþÀÀ@{{û79rÄÛÛ›Ïç¯Y³†Ü!11188˜Ãá8;;“© yøÙ³g»wïîààðé§ŸšÅT(*ŠV ¾þÒÈ=“““=<<>ÞÏÏ ¥RyøðáÿøãR©´Uƒo°4ã8×#„RRRŒ/³W¯^G5”|ìØ1Èú&\ŸŸû$õ@™¢RkîXºx. 謭­SRRnÝºåææ6|øðëׯS(/ÝÁŠŠŠúöíkxÙ§OŸË´°°@ÑéôË!ƒ‘=vìØþýûùx s?ÞÝ%i檳3÷ƒQhTû0‚ âãã}}} F@@ÀÙ³g ‚ÐjµC‡åñxAètºØØX???.—ûúë¯ßºu‹¼ÅÕn8E.#„rrrêYÞ¶m›»»û®]»ÂÂÂÈÃ÷îÝëééigg·dÉ¥Ri¡X,Þ¶m›¯¯oAAA«_i¿d½^ÿÍ7ßøúúòùü±cÇž={ÖÞ޾ƞõ€öa›Z¦SKt探“ÃØ˜ùh¬gϞ椹¹¹þþþ Þ6qÇqœFë4&&&º»»‘/OŸ>óàÁ Ã*++mllê?üÊ•+=zôppphýHèœà¹$´0 …Ò!’0„Pzzzxxøýû÷ Å­[·Ö¬Y3wî\„аaÃLÂ@—¥ªÖ=:)Ô©`rñy4–¥¥å‚ ÌEKZ¾|ù{ï½7qâD[[Û9sæÌž=›¼@r¨Ž®©¥fäܹs§««+Žÿ›¬áééùÝwßµày1 «]G;nÜ8 Ãrss›ZZ#•?”ßþæùñÿdÜû±æEð\€ö¥‘O¾:™Žò\ÔÐ)ŸK¶Ôß @ pqq¹zõêСCÉ5÷îÝ0`ÀóçÏ[꼆Ñh´»wïÆ=‹Ånnn …"''‡˜·5(EºŒcåN q-Ñm‚mð|'Ž­‰þ¹ AP¯ªUë@åèè8räÈ'NÖ$$$ 6Ìdö*FuòäIÃËsçÎ >¼eOQÛ†6`±Kد½úÍw~z¹êçw2ÿ\ÿL-A.š ò00ƒüü|;;;sGÑ©48ahm:.::ÚÃÃÃÞÞþƒ>¨=ü[í9F‘©É=ëZvêÔ)½þEv’0mÚ´zJ&Õ5©¨V«ŒŒttttppˆŒŒÔjµäú©S§ž8qÂP‘vêÔ©)S¦Ôs œ&µ1\jЇŽï'öü?ת IEÓ™­§&ÀÃ(8Ž/[¶,((H(¡Ñh"""ìíí#""4Í’%KfÏžM%•JÙl693Ϲsçz÷îÍd2½½½>lÆki¼FŽ[Ñn¡Æò`Ìx8‰Ž«‘ãV赸L ií`P½†š<$66¶gÏžééé>4hPDDaôOcrŽQ““{š\I„X,f2™W¯^%"++‹B¡”••ÕU²á¼u ;²iÓ¦gÏž¥§§÷ë×oåÊ•äU?~üØÉÉéÁƒATUUq8œŠŠ ò3Ù¼iRA[êðw:ò‰ãxDDDß¾} ßµoÁW¯^µµµÕjµAÄÅÅõìÙÇñº¾Ú¹”‡™LsBßÿ½¯¯¯••ÕúõëÉ•b±xÖ¬Y¶¶¶®®®Ë–-S*•ä?nRR’»»;ùKØÑѱFùååår¹¼M/éÔ“‡iUú’¿%÷~*Iœ÷dßàû{^»¯‘ë[5Tï„¡&éÞ½{BB¹üèÑ#rÙú˜œcÔääž&W’ÅNš4iÑ¢EA¬[·nĈäÊzf/%êÎÃJKKÉåK—.õíÛ—øç7À¢E‹¢¢¢‚ˆ‹‹{ûí· ë›4M*0 ¨B =Z¹rå–-[âããmmmÉ5عs§»»{ïÞ½7mÚôÛo¿ 2„N§_»v !tìØ±™3gb¦ÑhÈlŒÅb}ôÑGb±˜Íf›õR:¹\>uêÔE‹|þùç³gÏ–Ëå䦋/>xð`ß¾}«V­ª¬¬D-^¼¸¸¸øÎ;/^üý÷ß7mÚDî¹uëÖC‡¥¦¦"„ÊÊÊjœ"--ÍÛÛ{ùòåOŸ>mÃ+kZ…¾è¦äî÷%¿Ì|rð´Äù9ö–•Ü“é5BˆÆjNˆõ«gÂP“ ³…Nš4Éx«É9FMNîYÏŒŸ†G“Æ%뙽´¨Ù~AA³³3†a†½ýöÛÆŸ©S§ž|X"‘ìØ±Ã°~òäÉQQQ………ééécÇŽýþûï ›¨TjHHÈ‚ h<ŒHã§ImÉ·ÕCyÿ\ÏK\3Ž—Ÿ‘vP SÃè¯/©9âs^^^»ýƒïô(JPPŸÏ7w Àü¸\n÷îÝW®\ùñǧ¥¥±X,ò¼eË–êêêùóç0à»ï¾{ã7t:ÝW_}eèoE~ÄÅÅ >¼Æ÷xu†4W£Ñ?~|„ åååä¸ó5Fàttt¤R©ùùù=zô@åå幺º’›êRf 233‹‹‹Ün.ózépC-%p}_®:5ž/ä:ÐÙ¶tž#mC§Ð[ý1eƒ¢¢¢ärù˜1cärùøñã7oÞl¼ÕÊÊjëÖ­3fÌàr¹QQQaaacÇŽ‡Z±bEQQ‘O||]¹r% [ â#u_Ye¶£`8NÔþv¥P1:—‚Q0UÕ¿c¯³mh\GƤ¸jA‹3ã`ÑJ‘öÁ¾²¬Ó£·ùºÿ_Íû@×db4&“i¨;´1²ã¹Ìb±ž>žÁ`´âÅ´ óeí3ʺ,Uö`_YñM …†áº—¿ã)X¯0‡~óõBQ¡U5Š \¨©k‚BUµîÔ”,ŽcÏàØÑ¸ ¶-ëÀàØÓí{@ýnƶ¡ÿ_¤{Ð,'®C{|Nmc&Z@m*•ª¤¤dÿþýÇoËóê5„¬L#hdeY©†É§õœfâ—FEˆ@N}y<†… ÃÂ…iá uüaM¦¹ÆU †ekkëÇïfœdÓh´ëׯ×.ÿÝwß iɈۊS_Þ¸ïü*+Æ•çý&ƨèßl '8vt„•Y¸0,\È/)T¬ïlGE…V!ÔÊÊ4åår¡V#Õ[¸2ß?g¢ÒT§ÄŸß•rlé\:ˆfòW]S7š¥ZȼÌ>M*$aÆ  £º}ûö¤I“.\øæ›o¶ÁéÄùª«k åeEå‹Ê-*ã91œ_³0¹¿]gÔfŸ6¬“idë±vË.€óVŒWÐ,Ç´ƒ‚ü?Äéµ®'šÔNŸÁ£ö «ÙBC§Æëþ ú™êÏòÈeŒ‚Ø6tŽcO·ëÎé¿ðÅ$B]0ߪ‹ƒƒÃîÝ»Íxò0:ªáÇ·@_H)*´Ò´T-+ÑHK4 ]åQ{G–Õ±×b¬5בÁs¢s0­/¨‹?û­u^»<Œ+ÏJê5×þU?-4&…Æ4]ŸjÛóÑ;ÊJ¢B«é•Ze¥V)Ö¡:‚Wf+on*âØ¿H×8vt²×ÎàQ_1NÐlÉ+Ÿ:óCì(´.Ô„ò0º(¥Hw~n¶¬TMޱI¡b\G:Ï™iãgºÁÛ†þz„[ÛÆ:6ž3ãõH·àùNÅ7$6ÝZ·Ë'IiÌO•ÙvgËZa¦\&Ð(E:\K „Ü^··Ó¯öþ¹^Q®å:ÒéÈÒZ ®#øÌ;ÛŸgÆ -uõÞU†h‹<¬þ®¯Øq£µû}˜±_Iû! KJJÌE›rqqé ½UTb¬L#hd¥Y™FV¦QWëÿ³Û¿öžL>ÕwŒ5ùÕÅsfréдŸæ7ÞÆÜQ¼ÄÊ‹õË_@)Ò*+ë¬?+¾)I^ù!DcQ¸ŽtŽ-ã@çØÒ‚y^oYµAÀ]…†½ö‰K¯éö”%EæÛ°ææÌkøÈ®Åò°üüü’s‹¶%++«+V¼z9uÅßRåwhååå …ÂÒ²£öqk*‰DR^^Þáò0G‡†§i/а¬i<'Ï‘aãÇÆõDí‹BÅú/pnó0hØ6t¶MON݇XN>(j”:ÃÿËReT:Åd&H—?MÿÛÍÓ–Æuè Téòå˹¹¹Í?žÐ{á-÷óó䨧ò¬åB3?ÿ·ÞzËxM‹åa8Ž“Sªµ1;;;Ö¯¢®ø[ªüŽÎÒÒ²ýíÔRȱ¬êWt£:ýˆ°ïG®ƒZ1=ÕkYé¿-· SN2-kþñbôÆç,+*בÁsfÔÕ’ÐTtÕ¶;Û¶{c­*+´‚T¹\X¥kÉçþd!½ÃLþøÑkŒŠ:M…ô˜1ct:]Ãû5¤¯Õ›œ‹›‡Ï¿zQíFÓjµ/­i^AçÏŸ_½zuvv¶‹‹Ë—_~9sæÌÁƒ#„œœœÊÊÊôzý¶mÛöìÙSZZÚ§OŸO>ù„<Êø_ç}Gýâ‹/$É”)S¶nÝÊáp׬YóäÉ>Ÿ¿téÒ•+Wš<¯¡N÷õ×_8p@©TŽ7nÇŽäÔ͈Ÿ,3))é£>úꫯ>úè#2N ÃâââbbbÁÊ•+—/_NÄ?þ¸cÇŽâââ×^{íÿûß„ j?Ä …\.†5ï Tpµêï]¥â<%Âc§Uó°“!™Ò BˆmCã91¸Ž ûž\ïQÖuõÀ÷cÝzÁÉk„•׈_@j‰^Y©UŠtŠ ­¥;ÓäþãÿP¶¦³íè\²÷€cKwì˵ñk§S)ÔC§ÓEGG·\?îÿµP9æwåÊ•/¿ü²ÆÊæäar¹|êÔ©Û·oï½÷~ýõ×Ù³gOž<ùÖ­[þþþeee¡;vlÙ²e÷î݃~ðàÁ¼yóÈííí÷ìÙS{!´ÿþß~ûM$…‡‡ýõ׫V­ OLL¼råJxxøœ9s8NíóJøöÛoOŸ>}áÂ ÃæÎ»nÝºØØØæÅOÚºuë¡C‡ÈK ~ùå—¿þúëÔ©SóæÍ›;wnBBBLL̾}ûú÷šºpáÂçº{÷î÷ßÿ믿¦¥¥AÖ¡áz"ûlåý½eŠrÍ‹F$F&I'-ÑHKÔò2­´TMp*hd%šwt³ínâã1j³Cá93¨ ¨Ü CbZR™–T+ïúöñeméÆTThåB­¢B+)V—¥ÉåÚ¾sœLæa¥÷eÕ*CO¶ ƒ;D‡ÕœþøãÈÈH>Ÿ?hРÔÔÔ/¾ø‚<°ººúäÉ“äãHãe„вeËvíÚ%‹W­Z5{ölµZ­Ñh †R©$µI¥Òz΋š9sæêÕ«½¼¼B‹/&«¦šãߊE‹-_¾ÜÖÖ¶ÿþiiik×®Å0,(((%%%##cçÎݺu{ï½÷.\Ø¿ÿ¦¿Ó&ÕgϦJ¥ªeËÆ´H­ªeG3i³±Eª2ðœÝZ­äyƒ{šöKO®#dW€ö˸߉À ¥Hǰ0]ö÷®’’»/¦Ÿ§s(†8ú~ädí[çÄöMUYYùÃ?dddTWW{zzΘ1ã7Þx•kŒAJIIy•2Û@sò0‹uèС+VùøøÄÇdzX,//¯¡C‡:;;K¥ÒE‹i4šˆˆ²¿ä±cÇÈÞˆB¡lÞ^c!4gΜ·ß~[¡PÌœ9óÿûƒÁغuëŒ3¸\nTTTXXØØ±cAíó¢ŠŠŠ’ËåcÆŒ‘ËåãÇß¼ys³ãoü[ñÉ'ŸètºO>ù¤¢¢âõ×_ß¼y³áŠzõêµ{÷î78p`Ú´iÉÉÉžžøÙR‡êjÅ… é§Nݽ}û)A Ù!ò°–Í¤ÍÆÑ« *ÓI ‚@Fèë›™NV¦< б`ŒS÷ŒŸãwù+EZržuÃÿåB-VÇ3Ì¿¶««u\{ÇžÎu¢óh ·Q“H$sçÎý¿ÿû¿èèh‡sûöí¯¿þzݺu hüU”––~üñÇgÏž5¬Ù¹s§³s3‡E¬]ZÛÀj|ÁÏ»ÎHQ¯(11ÑÝÝÝðöôéÓ111<¨±Žã8ŽÓh d½W®\éÑ£‡ƒÃ¿³ÛŠDò„„{¿ürÿÁƒgT*†ãŽ!™Ýv£š5òSQ{4;;»ÊÊJGGG“£™„‡‡Q×h&õ—Öâc‹Ô¾ÞÀî=D9ʲT™ð‘¢ôo©¼\‹¢Ð0\O ŽÆ(èͯ½üƶ¯±Â -ýýC‰(G©éB­R¤[ÿðÃðˆ‰õ[±}ûöêêjÃã2„ÐîÝ»sss·lÙÒøó>þ<<<ÜPãõÖ[oÅÅŹºº6ë"j–ÖÈq+j|Áü’¯$===**êСCééékÖ¬Y´hQíÝ(J†eõS(4.¤?Ÿzåʽ§P0‚ tºv=·RËŽfÒ–c‹Ô…BÃì9/z,¨ª@UþP.H——>Iž©Qé®#deMº:™×º¿œƒ¥!4±þC®]»öÕW_¯™5k–áy”L&Û¹sç_ýÅ`0FŒ1g΃qóæÍ}ûöÙÙÙ}øá‡£G&G'üÛo¿©ÕêAƒ-Y²„ÇãÕ(­v B¡0<<|ëÖ­›6mâóù~~~Ë—/G)•ÊI“&}÷Ýw†Î‚MÒÉó°ºú*¶T›îåË—+Љ' …BŸÙ³g/X° Ù¥étøµk¹—.]üãL­VG¥Rt:=BH¯oשeG3iƒ±EšCVÞ,+oV·wmB¹^˜!¤ËË3Ö^¯Úºæ0t)2™L$yxx¯4}ûv‘H´{÷n¥RÃáp¦M›¶víÚ%K– 2äöíÛ›7o6lØ®]»ÂÃÓ0•J¥T* / †Z­þâ‹/Þ~ûí 6¤¦¦®[·nüøñ¿ÿþûµk×6lØ€aXlll\\ÜÇ\£´Ú1Œ5 !tâĉ•+Wj4šõë×ëõz*•zãÆ ggg??3Ä7F'ÏÃZû»F£ÅÄÄÄÄÄ´Hi¤§¤^⸾®=U*‹Ëg-rÒÆð÷·Ûµ«7-;šIk-òŠ\ªë ËVI¿5˜kX@m;wîܰaCQQ‘ái A^^^K–,1ol­ÍÐŒÄäVNwùòå}ûö‘-½>úè£üqòäÉA(•Jƒ1vìØ7ß|“É41âšñ¸¤¡õë×0`ß¾}L&“lö#—Ë/\¸0oÞ<„Њ+ž=«9…¥ÉÈ>>d[£ôôôààत¤Ñ£G7{ŒªŽš‡a–““Óìô³}?Þ×ÑÑþ÷߉Š&“¦V×9?Nýþûð6 ¬ªÊĸ5´ìh&­=¶H×d®I`µM:uéÒ¥7oÞ:t(¹æþýûEEES¦Li|!ôÇ•………µµuaa¡q³ãÇûí·Û·o—H$8Ž“¿¨B®®®B¡ÐÂÂâ›o¾9uêÔºuë6}úôAƒÕ.Ùdû°âââ-[¶(•JÃsC@àææF.{zzÖîE'‹kÇ@.“Õx å7Þ¸víšÏ½{÷–-[Öìw££æa’««ÅÛoÚ²eúß?=w.íôé»ÕÕJJ>4F¥b&ô5YHkhÌp-;šIk-Òœw¡…hµÚU«V>|˜ ˆY³f­_¿¾þ­t:ð}ûöÅÆÆVTT,[¶ÌÕÕõ‹/¾‰DŸ~úé×_]ÏQ5º,O¢ŠLõ„0Ë@×äèè8räÈ'Nò°„„„aÆ5©»_Çýq5dÈøøø/¿üÒpC¾té’N§c2™ÖÖÖ ¥´´”LJJJìììÔj5Žãk×®ÕétÉÉÉ«V­úå—_s"µZ½víÚµk×¾þúëZ­öâÅ‹![[Û²²2ooo„Pnnî­[·ÂÃ_ªÚ0¹ÉÐåîÍ7ߌ‰‰ñòòêÝ»÷« C ã³µ; 6p OL̤ŒŒ˜øø…ï½×—ͦc¢ÑÚõ?–a4WW×mÛ¶Õ !´hÑ¢ÈÈȈˆ??¿¯¾úêØ±cää&5–,­ñ>ùä“eË–}òÉ'¾¾¾±±±›7o6ü9™Å7ß|óôéÓ¿ÿþ;99ùòåËÆÝ…êÙš””tçÎ7FEE%&&¦§§ÇÆÆÆÄķຎ"»,lÞ¼yÅŠ"‘èÖ­[!2 #{B,Z´¨  àóÏ?Ÿ={¶\.oÓ7€6„aØþýûííí7nÜxäÈooo>Ÿ¿fÍšú:zôh`` a,¤ÄÄÄàà`‡ãììl1§ÁòµZmdd¤£££ƒƒCdd¤V«E………:uJ¯ñK;!!aÚ´iuíONžíááaooÿÁTUU!„ ?®È£ªªª>üðC;;;77·ˆˆ•J•››‹aXrr²‡‡ÇŸþÙ²ï꫘3gNZZÚúõë333óóó:”@þ §Ñho½õÖŽ;JKKŸ>}ºoß¾Q£FayíÚ5¹\®Õji4šá¹¤qƒ°ÚÈ·ŽF£i4rLx…B1zôè½{÷>}úôéÓ§Û·o†ýÉÒLÆP£ä>}úèõúC‡=ú•Þ âeD»¡Õj¿øâ www;;»™3gŠÅbr=Bèûï¿÷õõµ²²Z¿~=¹òüùó}ûöe³ÙNNN6l "''!”””äîî~ýúuC±ååår¹¼í/§~))) öúêjåÏ?ß Ýåêú™»û2W×ÏüýW´e`ííSÑ$çÏŸOMM5¼‘H$¢Óé[¶l!«ß¥R©^¯o¥KÀìBaaa‰dïÞ½¡ÐÐP‰Dòã?"„***ê9jÊ”)b±˜ìÇ]YY)‘H ÆìÙ³‹‹‹ãââBååå)Ó¦M!!!Ïž=KOOïׯßÊ•+ ‚‹ÅL&óêÕ«AdeeQ(”²²2òÔµ÷íÙ³gzzúÇ AüógxÆŒ#GŽÌËËKOOïÕ«×ÚµkÉÆwùòe™LÖšïñKï[tttJC~þùçáÇÛÚÚr8œ€€€uëÖ6;wnôèÑ–––¶¶¶S§Nýý÷ßSRR¢££]\\h4š‡‡¹sRRRïÞ½Ùl6yB(..®ö‰>ùä ‡ÿþ÷¿#GŽ´²²úã?¦M›fkkËårGŽyþüùÚ¥ÕŽü7.ùÝwße2™.\hðbIÑÑѵó®ö>~Ø–-[Ÿÿ÷ßúKÖÞZUUeÜÒär]G=yò¤[·n†=BÆ3oܸñí·ß^¼x±žžt†Ý¿?88X«Õ2 ãåzšc–’’òæ›oöôððÈÏÏwwwg³ÙþùçðáÃÉÃ,?000%%…¬¸JJJŠŒŒ$GšœŸO.„……-Y²dûöí óçϯgµZmhfX#T@ ×ë}}}É—~~~ÅÅÅä²É®åàUh4šÊÊÊ‹/Öÿh»1Ú{æQXXhüÉ# È?Ã7 ùç1vìØþýû6111ÁÁÁ#FŒ Ú´iSã·6¯LãŽ&{B4éBè‚ÔjµF£a0J¥’lëÓÈ)‰ëú±Äáp&NœøßÿþwĈÆ}îjï?sæÌÕ«W“­W/^\Xøï`“ä+:>mÚ´O?ýôéÓ§ŸþùŒ3Zòâ‘   sçÎÕ®¬yÚûsIò“çåå…Z¼xq=ƒpÿy|ùå—!©TJV׆ãxRRÒ?üp÷îÝ9sæÜ¸qÃ0L®ÿ¡êdHø§ž‚Pƒ³IÙø5-³°°Ø¿ÿþýû küüü ÍjoE/Glr¹ñG]¿~ݰ244444´IÁÐÅYYYmݺuÆŒ\.7***,,lìØ±Æ½íê³téÒàà` …büciúôéqqq5þkïO¥Rårù˜1cärùøñãÉþ›†Wd:¸sçÎ¥K—0€Á`¼ÿþûQQQ†G“ ÝjïíôÕjõçŸ~ìØ1ò“·k×.+++TGkåo¾ù&&&†üó¸~ýzrrò7LÎsúôé-[¶,Y²dÊ”) à fJƒíôÍ¥½}*Zy½n<ß»;Kž^®¢P1¼Ž©¥hlJŸŽV>,+/–•7“ÊhïÌÐRœ>×T?SU=UW?Sõ|ßÁÚ‡…ºR;ý¦2ÙN¿½ça­D«Õ¶Ãç凵Æ×ûüŽô¯Ø¢ªÂ1½œaˆçÈ`ÛЪ ÔZ…£ ž3ÓÚ›eåÍ úБeÕÞ+› žœ­|v½ºª@%)VãZ!IJ¢ñ=Yƒ–º8ñäauëý%[I;LÂÚ9•JURRbî(ÚˆJ¥24–rhß#÷WÑ­oе2½Þè9%…Fñc=ðSW„¬ìEoʪ§*á#y]cåržƒc?Ú‘ºæØ¨ý,¥+ p$/×HŸ«yN WýTU:„!¯áV|O¦•7‹ïÉdZvÑ\¢EÀ{Æb±„Ba#›£väãoFAþïØx´J;,H; Òkq !B‡ñœ<'†ÛàúfþƵĹ² œ ±)|¦¥;“ïÆ²ô`Zº3ƒyÈœ“-Ð¥uÍ|Ë@˜)/¾%UµÒµ¤X#+Uë5BhÐR×>8ÖÞ?h–‰• ÙºèsÉö©Ý>—Õ…ê[Û‹Ÿ]­¦Ð1\KL>hÛ½Ñíô $hªŸ©%EjI‘ººHE.ÐXÔRú´fÔ€®K)ÒÉ™@õ§Û÷äÖÞ!3^˜/´tcZº1,\™–®L 7†¥“ÆjfƒWf˜¬©•ðhVtŒ)Ö6ÜC¢½¡R©:Îx Ô‡Ð|Oæ˜m¾%KoÆKŠÔVÞMë{Qmæ:ðßn¼ŽTUZ“»KŸkN¿ÿÈ•iá°pfòœ. ž3ƒçÌ€Æg€º”?”?>S!+ÓÈÊ´²R^ƒ“ë{¾oo2ë9Í¾ç´æOS]ÛåË—Ó‡´Ùp9Uþ³ ÆÑóÂ:^kGÇšµ‰p7 É\^³9¨k©ŒW}šˆQÛÆts1:2è¿n!”Øâ IDATÒçji‰¦-0ÄÎx^ƒKK4d¥ÚJïÉ®D¼¨ µpeÍr”«¥Åš‚”*ésµV#„¼FX½ëÓ†aš–——S‡u5 %((È0—" )Eºâ›E¥VY©UŠtŠ ­R¤UŠtÖ>ìw~ò¯½?߃Õg¦#ËŠÆsfð\:…ÞYIŸkd3¸Ôñ?ø³m:OöÒy®€.ŽçÄè1õ¥FJ‘VR¬¡1Mß²ŸüRyëÛb²ÉÚ‹û»Ý™aéÎj{œJ¥²´´twoœ蠣ËÌÌT«Õ探í8Rе*‘N^®UŠ´†ù¿cS{7…Ps}]!˚ε§³lh–®L§ ˆÆ÷0=Y-בÞ{FWï¿¥‘ë/.Ρs(ãvùu¦$ ÕÎÃ0 +//¿råŠ9‚uc@3°mèu5>C9öåXä"+ÓÈË´•O”…W«B-}Â}æZ{Lİ 6;&“i<ƒ!/¾!qdÁà6ÿ£Õ64r½É ¥%šKyÊJR¤#ðͨ ŠC/ŽÉ<̶;gö_Á­k§ÃàR{ÍpðiͲîTIª‡y{{ÃÒŒlmM4º 5Xy±j<åÄõ„B¨¥ÐLÿH?"x°·ŒÆ¢ðœ\:ÇÎsdpèÎÁÖ¾0G8h2¹@ûè¤0ë”P-Õ[ãi²É¹YhäúŒãåj±^Y¥U‰tJ‘NU¥S‰ul;Úô_{×ޟɧº¿ÎgÙÐØ¶4®=ƒmCãØÓ¼öžVv8=¦tÎä¤fÆf³Ùì¦Í[ è(TŒçTgÿ£ÀÉvŽ}¸r¡V.ÐÊ…P[‘¥ ´ý:›ÌÃér…P˱£sé¦E-h‚4Ùãå)Õ†p=A¡aªj]Ç5#I‘JU¥SŠu*±NYù"¯Òip“M'1 åþ*bYÑXÖ4 ¦Co.˚Ʋ¢±ëø3¸ÔK\Z/~йu¶ú=@+á:2šÔKüi²øÑ‰ ÃØEÎoS½g §KÓ)ñÇ¿Td/—>×Pèÿ3Œ8†Ô’&ça¸žPWëTUzuµNU­SWé52}ïpí¨=q"ä9=,CåØÑ^äUÖu á†&À`æ ÀmÐ*æ6ø37ÃXÞeè,ÙuIK4GËŸüR¡Óä$./ ¿BjɿïëÔ¸ºJ¯ªÖ©«u.,j—†txDzÔΡ0ù´žïÛ×~°N¡c“²ø4–5íÕÇü eÕœ×ZCkÌ™–››ëïïßYob-xuæz£®¤\±×ø]Pß”`4¬®¡ï0„ضt¶-MU­SWëu*ܰiÖµ “Mã³+*“Ocò©,>ɇ«SÉŒÚø±œû›ÊÂ;¨´kùùù¬¨¨è”çmÙ³ÔUš••ÕŠ+ZäMR²““%DB"êHÂBBTæ3ÚšiAcZR–TÃmºµ{·wÚK£~вÝÙþ<ý¨àõen‡€ùá8^YYÙYÏÛ²g©«4;;»7¶ÔYÛ[ËÄ8Uµ8AP™½¯kO›Ú÷#§¶Œ ´C¹>yÅÓ²²··øx½ieîpÚHÍ6qþüù>}ú°X,Ÿ#GŽ „ŒrrrBéõúØØØnݺYXX 2äöíÛäQ¹¹¹†±÷ Ë'NüßÿþG®T«ÕÖÖÖ.\@iµÚÈÈHGGG‡ÈÈH­V«Ó颣£=<<ìíí?øàƒªªªçEUUU}øá‡vvvnnn*•Š/A3fÌ9rd^^^zzz¯^½Ö®]Kî0nܸ˗/Ëd2ÞwîÜ™5k–½½}IIIë]]ƒ¥‡—ššjXš2eŠX,Þ³gB¨²²rÏž=®®®¿ýö›P(¼té’ŸŸ_¯†K—.‘9k~~~£þ±ÿ‘’’"Œ×HŠUN ÿX–w`胟úÝÛÿúý=îýÔïÞ¡šTrçSãóÖ¤­@ÅcÅѱé'B2%ÅjsÇÒÖ:ó¿+ ýhL&‰ètú–-[Äb1ŽãR©T¯×uëÖíàÁƒ†ý:TÏ—“\.çr¹wîÜ!âý÷ߊŠ"×”––’Ë—.]êÛ·o÷îÝÈ5="—Ï«Ñh¨Tª!þ„„???r‡ôôtr¥R©<|øðÀƒƒƒüñG©TÚªW×`iÆá¯G¥¤¤…ÊÉÉéÕ«×Ñ£G %;v¬öyŸ?íææ6a„ßÿ]¯×ט±Úy˜^‡—¥ÊþÞ]rffÖžþ÷÷ê„yX^^ž­­m#w …+V¬hÞÖŽ×'§fþ2ë±R¤5w,fy -4&#âÏ?ÿœ2e —Ë}ã7~ýõWâå‚Íf§¦¦v~ðàAý•Ó§O_¾|¹L&ãr¹ÙÙÙäJë¥Qgù|>‹ÅzøðacÏKÎP®T*É—ééé,‹ÜA£ÑÿÔÍš5ëöíÛd \\]ý¥‡W#{òä‰a9''‡Íf§¥¥Š5®<«A£Ñœ8qbèСݺu{öìY=±‘êÉÃŒ©%ºªUƒ»u8¾«U(µªF%÷´´J¥Çñ“'OŠD¢9sæL˜0A$ïàåå•––fxIŽ…Q°°°S§N;w®ÿþþþþäJ;;»œœò(‹oݺåââRPP@nMMM]·n]r©Tj~~>ù2//ÏÕõÅœt:!dooߣG›7oÞ¸qƒl^ÖÚW×`iÆáÕ@¡¼tç÷ôô4>WVVV]'™™™ÅÅÅýúõkÁ™WT¾§é)®[†aû÷ï ´··ß¸qã‘#G¼½½ù|þš5kê?ªF»›ÖhM˜˜˜ÌápœÉ.Æ-ÿj—_ÿV¢¡~íß“EcvՄĬY  «hL}˜R©d±X§N …?ýô‹ÅR*•d¥ù˜oûöí¿üòKiiéÅ‹}||PÝ-¨‚ ›çûûû?ïûôÓO§L™RPP––6hРŋGGG÷éÓçáÇ>2dȼyóˆ*3 §OŸ>räÈüüü‡öìÙó‹/¾¨]ÛñðáÃÿßÞGEqå{¿ÝÐìB7Ð@£"Òl >EŽM\.×ÙÙ1&Ê–J¥¿ùÍoJKK5MIIÉÖ­[×­[gÙaÐ"³qΪÆî¡%† æLö÷÷¯X±"33³´´ô¯ý료?üÚG¯ðcM‘›ÛÎ¥ÿ«áòà5”ã“cü™€Q’••¥ÑhRRRºººÂÂÂÖ¬Y³~ýz¶ƒr0iii[¶l %„lܸ1&&ƼJ¥RyyyYvÖétz½ÞÅÅ¥¿¿ÿý÷ß'„(•Ê žü>6lÈÊÊòóó›5kVyyùŽ;ì°N_Ûg¼²­±¥D‘”ö²€ípìò0€qÍÙÙ9'''''‡í@Xvv¶Z­^°`Z­^´hó3ÆÐÐФ¤$‘H¤T*-;óùü?ÿùÏ+W®ôôôÌÎÎNMMMNN¾víÚïýí·ß6o¿ývww÷œ9söìÙcuG“um¥ªâ÷ê á¼r8"p†×Ã7O84=ä»WF óÜ$66–í@Àv¾û˜˜€€¶ãÎ;7yòä3f0Ïœ9“““ÃÌ?Ç:Ê@_ÿ µòTgØ<Á/¶†¸xþâöñ õaì¡~,ª¿Ô[uº+aãÄ—þ{*’°Aá¹$À †ª²²·çHö\á'^ à‡¹ùEŽØ¬¿cžK€-à¹ä8„ç’…ûa`#}}}–ïíäa` ¸)2x{{³ØMjΞKØN]]]BBBww· ¶²™®Ûš+ï7ÌJž:Ïv,¹+€íPÕÓÓc›­l€2Ñ·Žµµöž³—æÆv8ŽyÀ8αcÇ$‰P(ܵk×É“'§Nêãã³uëÖá·ÊÏÏ—H$¾¾¾ÌT®F£qûöí!!!B¡pÕªU½½½„ÄÄDBHPP³•Á`ÈÌÌ ÈÌÌ4 „³gÏNŸ>ÝÍÍ-,,ìäÉ“·²Ýw4…©wËŽµÏÍšœrñëDþ¶#ûPðÆ@¾5mŸ1ø¯éib~(fÆ·Ü`æ­_ŒZŠíàgÈÃÆš´ßR}·­á“—¥ê=ÛÑ!¨óͺêÈjþ)S4ëgxÍÝâ&@`pƬ–¥ymåjÏ@^Ä"¿Èž>SPƒoG‡ŒY4E¼D.ñ¿Mœ=ÃÅ;¹í~/ ÀÔé80š"íeªë¶Òn¬8<—p@4éªR×^×]”«; ‚0·Ø×„^A.l‡Ï%I×mMÍ?e Žªv½÷dWñ|AØ|Þé p? À‘4÷¶ÞPD¾âú"ß/ é—cÃý0`™V«­®®¦(Lðí<<<"""ØŽb|¡L4× ¿|#p? X¦P(zzz„B!ÛÀcÓét­­­ÈÃF–QGµý¤lú^aÔRÏoŸ2°’°±yØ…ØØX¶C€ÇÖÙÙYUUÅvc„¢Y×|MÑ|­¯í¦Êd ü%Sžç³Œ:äal¢)úïK«-:WoçIs&$ýgȤg½Ý}ñ=.à2°‰ÃåÌ\äê0ÍSÞ7ÈÃFW_“®Cªê(SG/óÆz ì¹ÄÏöQ=@0Â(ÝuGÓ)U·—©:¤ê~™ëÄñ‹r×)Œl‡öyŒA555ãd^žQ:ØquGÜ­ãí7ÿ§ÍÅÓ)`ºgÌkþA3¼¦y:»ã]‚` y8ªººº„„„îîîq²ß¡ðùüM›6±ÅxdÔRº>“g oનÅþ¡Ïób7Ô{Áð‡€£¢(ª§§güìw(þþþ»víb;ŠqÁ 1ußí﹫龫龣émÐÅy¾’9°§g oÐü À î‘€c8{öìôéÓÝÜÜÂÂÂNžø`ûöíñññÙÙÙ .´ìÐÜÜgþ8}úôaFóððøÕ¯~UPPsöìÙ²²2fyCCƒH$2wóññÑétæ—'J$‰Db5TGG‡Éd‹ÅÌÇððð––¦MùöÛoW®\¹páÂ<óÌ3ægŽC¡ü}"sSŠÇã=Êy¨­­6mšùcLLÌPã z°z½þÑÏáðEÚ]M—ÁÙ•ëâÊu‹Jñó»û†»;»¡blÿµ€èïï§(êôéÓ2™líÚµ‹/–Éd–BCCËËËÍoß¾=ü€©©©_}õÕ¬Y³Ì™–¿¿?s¯ˆ¦i¹\^RRÜÐÐÀ¬½uëÖÎ;­Æ trrª««c>ÖÖÖNœ8‘i3IP(Œ‰‰ùᇮ]»Æ”— Åh4BZ[[-r¹ü•þŸO9qâ„B¡øË_þòdç²aƬ¬¬ .ôôô\¾|yÇŽÃÜ~x°CÃ'Ö~KõmfÝg¯Ü.?Ñ¡SåuÚ§px?ä6öJåßæÞ*XQuñuŸtö5h'Ltj4¿(Ï@‚i%€]¬= iú‘kŒN:%‹]\\¢££‹ŠŠhš6 III^^^4MÆÜÜÜððpOOÏ9sæ”””0߆*½¢i:==ÝËË˲Ž^¡P¬^½Z øùù¥§§«Õj­V›‘‘ìã㓚š*—Ë­öKÓ´L&KKKóóó‰Dï¾ûn¿ÕŽÌärù¾}ûÄbqCCƒÕªœœ>Ÿ/‹‹ŠŠˆE}˜ù–•¹=ð<˜wg2™öïß/‹}||’““‹ŠŠ„BáPã <Ø¡Îá0½v©âÓŽÏWŽ¿y$¡ôpüÍÃñ7Î.½¶§iøÑ¥é1tÞV×_’W|ÚñÃÞæ µí·¬ ìw¾è*;ÖV{QÖ}W­WŸ`_¶Ç¡1W2°ª³³³ªªê…^`;¡(Š¢(gç‘/Ï=wîÜäÉ“g̘Á|€Mq¹ÜÕZ#B*•fgg?~<::Z*•nݺuÆ £±#k4i½¡¬ÈïhùAA¸Ú4È?ïišîkÒ–Ü¡é1heFu—A+7ô÷µ}Æg3'Ǿ.¸É¤¹Þ±›g ‹W‹—ˆçä‚Bƒ‡ŒYYY&%%¥««+,,lÍš5ëׯíjî9¾ÛsOC¸B2XÆPwªNwyyî¾Î>S\Eñ^î¾Îþ<¿(AûOL˜0jQØ <—–·ç’cIggç·Yõê !®¡†NÂ!^"—ÔsÓ†é0á~<¹à7ûgOo+Uµ–(¾ëÕÊ\g.m¢þ#_¯0±!€=CðTjjj"""Æó³w_^ØSÜb_Îùã$®f¯xò0€‘ôå—_þøã{öìÙ´i“L&cf¥ooo·êV^^>uêÔ¬¬¬úúz6»€< `$mذÏç¿ñÆ„«—‘[š7o^YY™‡‡ÇsÏ=·dÉ’ .PeÃ0À. IÁÁÁ„÷(=wìØQWW—––ö§?ýI"‘477~€`G‡Œ¤Ç}gQGGÇíÛ·[ZZâããÝÝÝG)*°OÈÃFJ¥²ZBQÔ… –.]š˜˜HÓôµk×>ûì3V¶`Þ Ë ÚÚIDAT€Qš””$‰”J¥åò/¾øbïÞ½ï¼óΩS§\\\Ø Ø…< à©„‡‡›'Ó·œUßܾzõêÀ­–,Y²|ùr„ö Ï%Xð(…ü0æ!`ò0v `ò0v `ò0v`þ0° ååål‡M¯×³€cC,óöö°œ…³³³¯¯/ÛQ80þö°õaì@Àäaìø?嘠'Áº›IEND®B`‚pktools-2.6.6/doc/html/svm_8cpp_source.html0000644000113200011300000147665412647637661015712 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/svm.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
svm.cpp
1 #include <math.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <ctype.h>
5 #include <float.h>
6 #include <string.h>
7 #include <stdarg.h>
8 #include <limits.h>
9 #include <locale.h>
10 //test
11 // #include <iostream>
12 #include "svm.h"
13 int libsvm_version = LIBSVM_VERSION;
14 typedef float Qfloat;
15 typedef signed char schar;
16 #ifndef min
17 template <class T> static inline T min(T x,T y) { return (x<y)?x:y; }
18 #endif
19 #ifndef max
20 template <class T> static inline T max(T x,T y) { return (x>y)?x:y; }
21 #endif
22 template <class T> static inline void swap(T& x, T& y) { T t=x; x=y; y=t; }
23 template <class S, class T> static inline void clone(T*& dst, S* src, int n)
24 {
25  dst = new T[n];
26  memcpy((void *)dst,(void *)src,sizeof(T)*n);
27 }
28 static inline double powi(double base, int times)
29 {
30  double tmp = base, ret = 1.0;
31 
32  for(int t=times; t>0; t/=2)
33  {
34  if(t%2==1) ret*=tmp;
35  tmp = tmp * tmp;
36  }
37  return ret;
38 }
39 #define INF HUGE_VAL
40 #define TAU 1e-12
41 #define Malloc(type,n) (type *)malloc((n)*sizeof(type))
42 
43 static void print_string_stdout(const char *s)
44 {
45  fputs(s,stdout);
46  fflush(stdout);
47 }
48 static void (*svm_print_string) (const char *) = &print_string_stdout;
49 #if 1
50 static void info(const char *fmt,...)
51 {
52  char buf[BUFSIZ];
53  va_list ap;
54  va_start(ap,fmt);
55  vsprintf(buf,fmt,ap);
56  va_end(ap);
57  (*svm_print_string)(buf);
58 }
59 #else
60 static void info(const char *fmt,...) {}
61 #endif
62 
63 //
64 // Kernel Cache
65 //
66 // l is the number of total data items
67 // size is the cache size limit in bytes
68 //
69 class Cache
70 {
71 public:
72  Cache(int l,long int size);
73  ~Cache();
74 
75  // request data [0,len)
76  // return some position p where [p,len) need to be filled
77  // (p >= len if nothing needs to be filled)
78  int get_data(const int index, Qfloat **data, int len);
79  void swap_index(int i, int j);
80 private:
81  int l;
82  long int size;
83  struct head_t
84  {
85  head_t *prev, *next; // a circular list
86  Qfloat *data;
87  int len; // data[0,len) is cached in this entry
88  };
89 
90  head_t *head;
91  head_t lru_head;
92  void lru_delete(head_t *h);
93  void lru_insert(head_t *h);
94 };
95 
96 Cache::Cache(int l_,long int size_):l(l_),size(size_)
97 {
98  head = (head_t *)calloc(l,sizeof(head_t)); // initialized to 0
99  size /= sizeof(Qfloat);
100  size -= l * sizeof(head_t) / sizeof(Qfloat);
101  size = max(size, 2 * (long int) l); // cache must be large enough for two columns
102  lru_head.next = lru_head.prev = &lru_head;
103 }
104 
105 Cache::~Cache()
106 {
107  for(head_t *h = lru_head.next; h != &lru_head; h=h->next)
108  free(h->data);
109  free(head);
110 }
111 
112 void Cache::lru_delete(head_t *h)
113 {
114  // delete from current location
115  h->prev->next = h->next;
116  h->next->prev = h->prev;
117 }
118 
119 void Cache::lru_insert(head_t *h)
120 {
121  // insert to last position
122  h->next = &lru_head;
123  h->prev = lru_head.prev;
124  h->prev->next = h;
125  h->next->prev = h;
126 }
127 
128 int Cache::get_data(const int index, Qfloat **data, int len)
129 {
130  head_t *h = &head[index];
131  if(h->len) lru_delete(h);
132  int more = len - h->len;
133 
134  if(more > 0)
135  {
136  // free old space
137  while(size < more)
138  {
139  head_t *old = lru_head.next;
140  lru_delete(old);
141  free(old->data);
142  size += old->len;
143  old->data = 0;
144  old->len = 0;
145  }
146 
147  // allocate new space
148  h->data = (Qfloat *)realloc(h->data,sizeof(Qfloat)*len);
149  size -= more;
150  swap(h->len,len);
151  }
152 
153  lru_insert(h);
154  *data = h->data;
155  return len;
156 }
157 
158 void Cache::swap_index(int i, int j)
159 {
160  if(i==j) return;
161 
162  if(head[i].len) lru_delete(&head[i]);
163  if(head[j].len) lru_delete(&head[j]);
164  swap(head[i].data,head[j].data);
165  swap(head[i].len,head[j].len);
166  if(head[i].len) lru_insert(&head[i]);
167  if(head[j].len) lru_insert(&head[j]);
168 
169  if(i>j) swap(i,j);
170  for(head_t *h = lru_head.next; h!=&lru_head; h=h->next)
171  {
172  if(h->len > i)
173  {
174  if(h->len > j)
175  swap(h->data[i],h->data[j]);
176  else
177  {
178  // give up
179  lru_delete(h);
180  free(h->data);
181  size += h->len;
182  h->data = 0;
183  h->len = 0;
184  }
185  }
186  }
187 }
188 
189 //
190 // Kernel evaluation
191 //
192 // the static method k_function is for doing single kernel evaluation
193 // the constructor of Kernel prepares to calculate the l*l kernel matrix
194 // the member function get_Q is for getting one column from the Q Matrix
195 //
196 class QMatrix {
197 public:
198  virtual Qfloat *get_Q(int column, int len) const = 0;
199  virtual double *get_QD() const = 0;
200  virtual void swap_index(int i, int j) const = 0;
201  virtual ~QMatrix() {}
202 };
203 
204 class Kernel: public QMatrix {
205 public:
206  Kernel(int l, svm_node * const * x, const svm_parameter& param);
207  virtual ~Kernel();
208 
209  static double k_function(const svm_node *x, const svm_node *y,
210  const svm_parameter& param);
211  virtual Qfloat *get_Q(int column, int len) const = 0;
212  virtual double *get_QD() const = 0;
213  virtual void swap_index(int i, int j) const // no so const...
214  {
215  swap(x[i],x[j]);
216  if(x_square) swap(x_square[i],x_square[j]);
217  }
218 protected:
219 
220  double (Kernel::*kernel_function)(int i, int j) const;
221 
222 private:
223  const svm_node **x;
224  double *x_square;
225 
226  // svm_parameter
227  const int kernel_type;
228  const int degree;
229  const double gamma;
230  const double coef0;
231 
232  static double dot(const svm_node *px, const svm_node *py);
233  double kernel_linear(int i, int j) const
234  {
235  return dot(x[i],x[j]);
236  }
237  double kernel_poly(int i, int j) const
238  {
239  return powi(gamma*dot(x[i],x[j])+coef0,degree);
240  }
241  double kernel_rbf(int i, int j) const
242  {
243  return exp(-gamma*(x_square[i]+x_square[j]-2*dot(x[i],x[j])));
244  }
245  double kernel_sigmoid(int i, int j) const
246  {
247  return tanh(gamma*dot(x[i],x[j])+coef0);
248  }
249  double kernel_precomputed(int i, int j) const
250  {
251  return x[i][(int)(x[j][0].value)].value;
252  }
253 };
254 
255 Kernel::Kernel(int l, svm_node * const * x_, const svm_parameter& param)
256 :kernel_type(param.kernel_type), degree(param.degree),
257  gamma(param.gamma), coef0(param.coef0)
258 {
259  switch(kernel_type)
260  {
261  case LINEAR:
262  kernel_function = &Kernel::kernel_linear;
263  break;
264  case POLY:
265  kernel_function = &Kernel::kernel_poly;
266  break;
267  case RBF:
268  kernel_function = &Kernel::kernel_rbf;
269  break;
270  case SIGMOID:
271  kernel_function = &Kernel::kernel_sigmoid;
272  break;
273  case PRECOMPUTED:
274  kernel_function = &Kernel::kernel_precomputed;
275  break;
276  }
277 
278  clone(x,x_,l);
279 
280  if(kernel_type == RBF)
281  {
282  x_square = new double[l];
283  for(int i=0;i<l;i++)
284  x_square[i] = dot(x[i],x[i]);
285  }
286  else
287  x_square = 0;
288 }
289 
290 Kernel::~Kernel()
291 {
292  delete[] x;
293  delete[] x_square;
294 }
295 
296 double Kernel::dot(const svm_node *px, const svm_node *py)
297 {
298  double sum = 0;
299  while(px->index != -1 && py->index != -1)
300  {
301  if(px->index == py->index)
302  {
303  sum += px->value * py->value;
304  ++px;
305  ++py;
306  }
307  else
308  {
309  if(px->index > py->index)
310  ++py;
311  else
312  ++px;
313  }
314  }
315  return sum;
316 }
317 
318 double Kernel::k_function(const svm_node *x, const svm_node *y,
319  const svm_parameter& param)
320 {
321  switch(param.kernel_type)
322  {
323  case LINEAR:
324  return dot(x,y);
325  case POLY:
326  return powi(param.gamma*dot(x,y)+param.coef0,param.degree);
327  case RBF:
328  {
329  double sum = 0;
330  while(x->index != -1 && y->index !=-1)
331  {
332  if(x->index == y->index)
333  {
334  double d = x->value - y->value;
335  sum += d*d;
336  ++x;
337  ++y;
338  }
339  else
340  {
341  if(x->index > y->index)
342  {
343  sum += y->value * y->value;
344  ++y;
345  }
346  else
347  {
348  sum += x->value * x->value;
349  ++x;
350  }
351  }
352  }
353 
354  while(x->index != -1)
355  {
356  sum += x->value * x->value;
357  ++x;
358  }
359 
360  while(y->index != -1)
361  {
362  sum += y->value * y->value;
363  ++y;
364  }
365 
366  return exp(-param.gamma*sum);
367  }
368  case SIGMOID:
369  return tanh(param.gamma*dot(x,y)+param.coef0);
370  case PRECOMPUTED: //x: test (validation), y: SV
371  return x[(int)(y->value)].value;
372  default:
373  return 0; // Unreachable
374  }
375 }
376 
377 // An SMO algorithm in Fan et al., JMLR 6(2005), p. 1889--1918
378 // Solves:
379 //
380 // min 0.5(\alpha^T Q \alpha) + p^T \alpha
381 //
382 // y^T \alpha = \delta
383 // y_i = +1 or -1
384 // 0 <= alpha_i <= Cp for y_i = 1
385 // 0 <= alpha_i <= Cn for y_i = -1
386 //
387 // Given:
388 //
389 // Q, p, y, Cp, Cn, and an initial feasible point \alpha
390 // l is the size of vectors and matrices
391 // eps is the stopping tolerance
392 //
393 // solution will be put in \alpha, objective value will be put in obj
394 //
395 class Solver {
396 public:
397  Solver() {};
398  virtual ~Solver() {};
399 
400  struct SolutionInfo {
401  double obj;
402  double rho;
403  double upper_bound_p;
404  double upper_bound_n;
405  double r; // for Solver_NU
406  };
407 
408  void Solve(int l, const QMatrix& Q, const double *p_, const schar *y_,
409  double *alpha_, double Cp, double Cn, double eps,
410  SolutionInfo* si, int shrinking, bool verbose=false);
411 protected:
412  int active_size;
413  schar *y;
414  double *G; // gradient of objective function
415  enum { LOWER_BOUND, UPPER_BOUND, FREE };
416  char *alpha_status; // LOWER_BOUND, UPPER_BOUND, FREE
417  double *alpha;
418  const QMatrix *Q;
419  const double *QD;
420  double eps;
421  double Cp,Cn;
422  double *p;
423  int *active_set;
424  double *G_bar; // gradient, if we treat free variables as 0
425  int l;
426  bool unshrink; // XXX
427 
428  double get_C(int i)
429  {
430  return (y[i] > 0)? Cp : Cn;
431  }
432  void update_alpha_status(int i)
433  {
434  if(alpha[i] >= get_C(i))
435  alpha_status[i] = UPPER_BOUND;
436  else if(alpha[i] <= 0)
437  alpha_status[i] = LOWER_BOUND;
438  else alpha_status[i] = FREE;
439  }
440  bool is_upper_bound(int i) { return alpha_status[i] == UPPER_BOUND; }
441  bool is_lower_bound(int i) { return alpha_status[i] == LOWER_BOUND; }
442  bool is_free(int i) { return alpha_status[i] == FREE; }
443  void swap_index(int i, int j);
444  void reconstruct_gradient();
445  virtual int select_working_set(int &i, int &j);
446  virtual double calculate_rho();
447  virtual void do_shrinking();
448 private:
449  bool be_shrunk(int i, double Gmax1, double Gmax2);
450 };
451 
452 void Solver::swap_index(int i, int j)
453 {
454  Q->swap_index(i,j);
455  swap(y[i],y[j]);
456  swap(G[i],G[j]);
457  swap(alpha_status[i],alpha_status[j]);
458  swap(alpha[i],alpha[j]);
459  swap(p[i],p[j]);
460  swap(active_set[i],active_set[j]);
461  swap(G_bar[i],G_bar[j]);
462 }
463 
464 void Solver::reconstruct_gradient()
465 {
466  // reconstruct inactive elements of G from G_bar and free variables
467 
468  if(active_size == l) return;
469 
470  int i,j;
471  int nr_free = 0;
472 
473  for(j=active_size;j<l;j++)
474  G[j] = G_bar[j] + p[j];
475 
476  for(j=0;j<active_size;j++)
477  if(is_free(j))
478  nr_free++;
479 
480  if(2*nr_free < active_size)
481  info("\nWARNING: using -h 0 may be faster\n");
482 
483  if (nr_free*l > 2*active_size*(l-active_size))
484  {
485  for(i=active_size;i<l;i++)
486  {
487  const Qfloat *Q_i = Q->get_Q(i,active_size);
488  for(j=0;j<active_size;j++)
489  if(is_free(j))
490  G[i] += alpha[j] * Q_i[j];
491  }
492  }
493  else
494  {
495  for(i=0;i<active_size;i++)
496  if(is_free(i))
497  {
498  const Qfloat *Q_i = Q->get_Q(i,l);
499  double alpha_i = alpha[i];
500  for(j=active_size;j<l;j++)
501  G[j] += alpha_i * Q_i[j];
502  }
503  }
504 }
505 
506 void Solver::Solve(int l, const QMatrix& Q, const double *p_, const schar *y_,
507  double *alpha_, double Cp, double Cn, double eps,
508  SolutionInfo* si, int shrinking,
509  bool verbose)//pk
510 {
511  this->l = l;
512  this->Q = &Q;
513  QD=Q.get_QD();
514  clone(p, p_,l);
515  clone(y, y_,l);
516  clone(alpha,alpha_,l);
517  this->Cp = Cp;
518  this->Cn = Cn;
519  this->eps = eps;
520  unshrink = false;
521 
522  // initialize alpha_status
523  {
524  alpha_status = new char[l];
525  for(int i=0;i<l;i++)
526  update_alpha_status(i);
527  }
528 
529  // initialize active set (for shrinking)
530  {
531  active_set = new int[l];
532  for(int i=0;i<l;i++)
533  active_set[i] = i;
534  active_size = l;
535  }
536 
537  // initialize gradient
538  {
539  G = new double[l];
540  G_bar = new double[l];
541  int i;
542  for(i=0;i<l;i++)
543  {
544  G[i] = p[i];
545  G_bar[i] = 0;
546  }
547  for(i=0;i<l;i++)
548  if(!is_lower_bound(i))
549  {
550  const Qfloat *Q_i = Q.get_Q(i,l);
551  double alpha_i = alpha[i];
552  int j;
553  for(j=0;j<l;j++)
554  G[j] += alpha_i*Q_i[j];
555  if(is_upper_bound(i))
556  for(j=0;j<l;j++)
557  G_bar[j] += get_C(i) * Q_i[j];
558  }
559  }
560 
561  // optimization step
562 
563  int iter = 0;
564  int max_iter = max(10000000, l>INT_MAX/100 ? INT_MAX : 100*l);
565  int counter = min(l,1000)+1;
566 
567  while(iter < max_iter)
568  {
569  // show progress and do shrinking
570 
571  if(--counter == 0)
572  {
573  counter = min(l,1000);
574  if(shrinking) do_shrinking();
575  if(verbose)//pk
576  info(".");
577  }
578 
579  int i,j;
580  if(select_working_set(i,j)!=0)
581  {
582  // reconstruct the whole gradient
583  reconstruct_gradient();
584  // reset active set size and check
585  active_size = l;
586  if(verbose)//pk
587  info("*");
588  if(select_working_set(i,j)!=0)
589  break;
590  else
591  counter = 1; // do shrinking next iteration
592  }
593 
594  ++iter;
595 
596  // update alpha[i] and alpha[j], handle bounds carefully
597 
598  const Qfloat *Q_i = Q.get_Q(i,active_size);
599  const Qfloat *Q_j = Q.get_Q(j,active_size);
600 
601  double C_i = get_C(i);
602  double C_j = get_C(j);
603 
604  double old_alpha_i = alpha[i];
605  double old_alpha_j = alpha[j];
606 
607  if(y[i]!=y[j])
608  {
609  double quad_coef = QD[i]+QD[j]+2*Q_i[j];
610  if (quad_coef <= 0)
611  quad_coef = TAU;
612  double delta = (-G[i]-G[j])/quad_coef;
613  double diff = alpha[i] - alpha[j];
614  alpha[i] += delta;
615  alpha[j] += delta;
616 
617  if(diff > 0)
618  {
619  if(alpha[j] < 0)
620  {
621  alpha[j] = 0;
622  alpha[i] = diff;
623  }
624  }
625  else
626  {
627  if(alpha[i] < 0)
628  {
629  alpha[i] = 0;
630  alpha[j] = -diff;
631  }
632  }
633  if(diff > C_i - C_j)
634  {
635  if(alpha[i] > C_i)
636  {
637  alpha[i] = C_i;
638  alpha[j] = C_i - diff;
639  }
640  }
641  else
642  {
643  if(alpha[j] > C_j)
644  {
645  alpha[j] = C_j;
646  alpha[i] = C_j + diff;
647  }
648  }
649  }
650  else
651  {
652  double quad_coef = QD[i]+QD[j]-2*Q_i[j];
653  if (quad_coef <= 0)
654  quad_coef = TAU;
655  double delta = (G[i]-G[j])/quad_coef;
656  double sum = alpha[i] + alpha[j];
657  alpha[i] -= delta;
658  alpha[j] += delta;
659 
660  if(sum > C_i)
661  {
662  if(alpha[i] > C_i)
663  {
664  alpha[i] = C_i;
665  alpha[j] = sum - C_i;
666  }
667  }
668  else
669  {
670  if(alpha[j] < 0)
671  {
672  alpha[j] = 0;
673  alpha[i] = sum;
674  }
675  }
676  if(sum > C_j)
677  {
678  if(alpha[j] > C_j)
679  {
680  alpha[j] = C_j;
681  alpha[i] = sum - C_j;
682  }
683  }
684  else
685  {
686  if(alpha[i] < 0)
687  {
688  alpha[i] = 0;
689  alpha[j] = sum;
690  }
691  }
692  }
693 
694  // update G
695 
696  double delta_alpha_i = alpha[i] - old_alpha_i;
697  double delta_alpha_j = alpha[j] - old_alpha_j;
698 
699  for(int k=0;k<active_size;k++)
700  {
701  G[k] += Q_i[k]*delta_alpha_i + Q_j[k]*delta_alpha_j;
702  }
703 
704  // update alpha_status and G_bar
705 
706  {
707  bool ui = is_upper_bound(i);
708  bool uj = is_upper_bound(j);
709  update_alpha_status(i);
710  update_alpha_status(j);
711  int k;
712  if(ui != is_upper_bound(i))
713  {
714  Q_i = Q.get_Q(i,l);
715  if(ui)
716  for(k=0;k<l;k++)
717  G_bar[k] -= C_i * Q_i[k];
718  else
719  for(k=0;k<l;k++)
720  G_bar[k] += C_i * Q_i[k];
721  }
722 
723  if(uj != is_upper_bound(j))
724  {
725  Q_j = Q.get_Q(j,l);
726  if(uj)
727  for(k=0;k<l;k++)
728  G_bar[k] -= C_j * Q_j[k];
729  else
730  for(k=0;k<l;k++)
731  G_bar[k] += C_j * Q_j[k];
732  }
733  }
734  }
735 
736  if(iter >= max_iter)
737  {
738  if(active_size < l)
739  {
740  // reconstruct the whole gradient to calculate objective value
741  reconstruct_gradient();
742  active_size = l;
743  if(verbose)//pk
744  info("*");
745  }
746  info("\nWARNING: reaching max number of iterations");
747  }
748 
749  // calculate rho
750 
751  si->rho = calculate_rho();
752 
753  // calculate objective value
754  {
755  double v = 0;
756  int i;
757  for(i=0;i<l;i++)
758  v += alpha[i] * (G[i] + p[i]);
759 
760  si->obj = v/2;
761  }
762 
763  // put back the solution
764  {
765  for(int i=0;i<l;i++)
766  alpha_[active_set[i]] = alpha[i];
767  }
768 
769  // juggle everything back
770  /*{
771  for(int i=0;i<l;i++)
772  while(active_set[i] != i)
773  swap_index(i,active_set[i]);
774  // or Q.swap_index(i,active_set[i]);
775  }*/
776 
777  si->upper_bound_p = Cp;
778  si->upper_bound_n = Cn;
779 
780  if(verbose)//pk
781  info("\noptimization finished, #iter = %d\n",iter);
782 
783  delete[] p;
784  delete[] y;
785  delete[] alpha;
786  delete[] alpha_status;
787  delete[] active_set;
788  delete[] G;
789  delete[] G_bar;
790 }
791 
792 // return 1 if already optimal, return 0 otherwise
793 int Solver::select_working_set(int &out_i, int &out_j)
794 {
795  // return i,j such that
796  // i: maximizes -y_i * grad(f)_i, i in I_up(\alpha)
797  // j: minimizes the decrease of obj value
798  // (if quadratic coefficeint <= 0, replace it with tau)
799  // -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
800 
801  double Gmax = -INF;
802  double Gmax2 = -INF;
803  int Gmax_idx = -1;
804  int Gmin_idx = -1;
805  double obj_diff_min = INF;
806 
807  for(int t=0;t<active_size;t++)
808  if(y[t]==+1)
809  {
810  if(!is_upper_bound(t))
811  if(-G[t] >= Gmax)
812  {
813  Gmax = -G[t];
814  Gmax_idx = t;
815  }
816  }
817  else
818  {
819  if(!is_lower_bound(t))
820  if(G[t] >= Gmax)
821  {
822  Gmax = G[t];
823  Gmax_idx = t;
824  }
825  }
826 
827  int i = Gmax_idx;
828  const Qfloat *Q_i = NULL;
829  if(i != -1) // NULL Q_i not accessed: Gmax=-INF if i=-1
830  Q_i = Q->get_Q(i,active_size);
831 
832  for(int j=0;j<active_size;j++)
833  {
834  if(y[j]==+1)
835  {
836  if (!is_lower_bound(j))
837  {
838  double grad_diff=Gmax+G[j];
839  if (G[j] >= Gmax2)
840  Gmax2 = G[j];
841  if (grad_diff > 0)
842  {
843  double obj_diff;
844  double quad_coef = QD[i]+QD[j]-2.0*y[i]*Q_i[j];
845  if (quad_coef > 0)
846  obj_diff = -(grad_diff*grad_diff)/quad_coef;
847  else
848  obj_diff = -(grad_diff*grad_diff)/TAU;
849 
850  if (obj_diff <= obj_diff_min)
851  {
852  Gmin_idx=j;
853  obj_diff_min = obj_diff;
854  }
855  }
856  }
857  }
858  else
859  {
860  if (!is_upper_bound(j))
861  {
862  double grad_diff= Gmax-G[j];
863  if (-G[j] >= Gmax2)
864  Gmax2 = -G[j];
865  if (grad_diff > 0)
866  {
867  double obj_diff;
868  double quad_coef = QD[i]+QD[j]+2.0*y[i]*Q_i[j];
869  if (quad_coef > 0)
870  obj_diff = -(grad_diff*grad_diff)/quad_coef;
871  else
872  obj_diff = -(grad_diff*grad_diff)/TAU;
873 
874  if (obj_diff <= obj_diff_min)
875  {
876  Gmin_idx=j;
877  obj_diff_min = obj_diff;
878  }
879  }
880  }
881  }
882  }
883 
884  if(Gmax+Gmax2 < eps)
885  return 1;
886 
887  out_i = Gmax_idx;
888  out_j = Gmin_idx;
889  return 0;
890 }
891 
892 bool Solver::be_shrunk(int i, double Gmax1, double Gmax2)
893 {
894  if(is_upper_bound(i))
895  {
896  if(y[i]==+1)
897  return(-G[i] > Gmax1);
898  else
899  return(-G[i] > Gmax2);
900  }
901  else if(is_lower_bound(i))
902  {
903  if(y[i]==+1)
904  return(G[i] > Gmax2);
905  else
906  return(G[i] > Gmax1);
907  }
908  else
909  return(false);
910 }
911 
912 void Solver::do_shrinking()
913 {
914  int i;
915  double Gmax1 = -INF; // max { -y_i * grad(f)_i | i in I_up(\alpha) }
916  double Gmax2 = -INF; // max { y_i * grad(f)_i | i in I_low(\alpha) }
917 
918  // find maximal violating pair first
919  for(i=0;i<active_size;i++)
920  {
921  if(y[i]==+1)
922  {
923  if(!is_upper_bound(i))
924  {
925  if(-G[i] >= Gmax1)
926  Gmax1 = -G[i];
927  }
928  if(!is_lower_bound(i))
929  {
930  if(G[i] >= Gmax2)
931  Gmax2 = G[i];
932  }
933  }
934  else
935  {
936  if(!is_upper_bound(i))
937  {
938  if(-G[i] >= Gmax2)
939  Gmax2 = -G[i];
940  }
941  if(!is_lower_bound(i))
942  {
943  if(G[i] >= Gmax1)
944  Gmax1 = G[i];
945  }
946  }
947  }
948 
949  if(unshrink == false && Gmax1 + Gmax2 <= eps*10)
950  {
951  unshrink = true;
952  reconstruct_gradient();
953  active_size = l;
954  info("*");
955  }
956 
957  for(i=0;i<active_size;i++)
958  if (be_shrunk(i, Gmax1, Gmax2))
959  {
960  active_size--;
961  while (active_size > i)
962  {
963  if (!be_shrunk(active_size, Gmax1, Gmax2))
964  {
965  swap_index(i,active_size);
966  break;
967  }
968  active_size--;
969  }
970  }
971 }
972 
973 double Solver::calculate_rho()
974 {
975  double r;
976  int nr_free = 0;
977  double ub = INF, lb = -INF, sum_free = 0;
978  for(int i=0;i<active_size;i++)
979  {
980  double yG = y[i]*G[i];
981 
982  if(is_upper_bound(i))
983  {
984  if(y[i]==-1)
985  ub = min(ub,yG);
986  else
987  lb = max(lb,yG);
988  }
989  else if(is_lower_bound(i))
990  {
991  if(y[i]==+1)
992  ub = min(ub,yG);
993  else
994  lb = max(lb,yG);
995  }
996  else
997  {
998  ++nr_free;
999  sum_free += yG;
1000  }
1001  }
1002 
1003  if(nr_free>0)
1004  r = sum_free/nr_free;
1005  else
1006  r = (ub+lb)/2;
1007 
1008  return r;
1009 }
1010 
1011 //
1012 // Solver for nu-svm classification and regression
1013 //
1014 // additional constraint: e^T \alpha = constant
1015 //
1016 class Solver_NU : public Solver
1017 {
1018 public:
1019  Solver_NU() {}
1020  void Solve(int l, const QMatrix& Q, const double *p, const schar *y,
1021  double *alpha, double Cp, double Cn, double eps,
1022  SolutionInfo* si, int shrinking, bool verbose=false)
1023  {
1024  this->si = si;
1025  Solver::Solve(l,Q,p,y,alpha,Cp,Cn,eps,si,shrinking,verbose);
1026  }
1027 private:
1028  SolutionInfo *si;
1029  int select_working_set(int &i, int &j);
1030  double calculate_rho();
1031  bool be_shrunk(int i, double Gmax1, double Gmax2, double Gmax3, double Gmax4);
1032  void do_shrinking();
1033 };
1034 
1035 // return 1 if already optimal, return 0 otherwise
1036 int Solver_NU::select_working_set(int &out_i, int &out_j)
1037 {
1038  // return i,j such that y_i = y_j and
1039  // i: maximizes -y_i * grad(f)_i, i in I_up(\alpha)
1040  // j: minimizes the decrease of obj value
1041  // (if quadratic coefficeint <= 0, replace it with tau)
1042  // -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
1043 
1044  double Gmaxp = -INF;
1045  double Gmaxp2 = -INF;
1046  int Gmaxp_idx = -1;
1047 
1048  double Gmaxn = -INF;
1049  double Gmaxn2 = -INF;
1050  int Gmaxn_idx = -1;
1051 
1052  int Gmin_idx = -1;
1053  double obj_diff_min = INF;
1054 
1055  for(int t=0;t<active_size;t++)
1056  if(y[t]==+1)
1057  {
1058  if(!is_upper_bound(t))
1059  if(-G[t] >= Gmaxp)
1060  {
1061  Gmaxp = -G[t];
1062  Gmaxp_idx = t;
1063  }
1064  }
1065  else
1066  {
1067  if(!is_lower_bound(t))
1068  if(G[t] >= Gmaxn)
1069  {
1070  Gmaxn = G[t];
1071  Gmaxn_idx = t;
1072  }
1073  }
1074 
1075  int ip = Gmaxp_idx;
1076  int in = Gmaxn_idx;
1077  const Qfloat *Q_ip = NULL;
1078  const Qfloat *Q_in = NULL;
1079  if(ip != -1) // NULL Q_ip not accessed: Gmaxp=-INF if ip=-1
1080  Q_ip = Q->get_Q(ip,active_size);
1081  if(in != -1)
1082  Q_in = Q->get_Q(in,active_size);
1083 
1084  for(int j=0;j<active_size;j++)
1085  {
1086  if(y[j]==+1)
1087  {
1088  if (!is_lower_bound(j))
1089  {
1090  double grad_diff=Gmaxp+G[j];
1091  if (G[j] >= Gmaxp2)
1092  Gmaxp2 = G[j];
1093  if (grad_diff > 0)
1094  {
1095  double obj_diff;
1096  double quad_coef = QD[ip]+QD[j]-2*Q_ip[j];
1097  if (quad_coef > 0)
1098  obj_diff = -(grad_diff*grad_diff)/quad_coef;
1099  else
1100  obj_diff = -(grad_diff*grad_diff)/TAU;
1101 
1102  if (obj_diff <= obj_diff_min)
1103  {
1104  Gmin_idx=j;
1105  obj_diff_min = obj_diff;
1106  }
1107  }
1108  }
1109  }
1110  else
1111  {
1112  if (!is_upper_bound(j))
1113  {
1114  double grad_diff=Gmaxn-G[j];
1115  if (-G[j] >= Gmaxn2)
1116  Gmaxn2 = -G[j];
1117  if (grad_diff > 0)
1118  {
1119  double obj_diff;
1120  double quad_coef = QD[in]+QD[j]-2*Q_in[j];
1121  if (quad_coef > 0)
1122  obj_diff = -(grad_diff*grad_diff)/quad_coef;
1123  else
1124  obj_diff = -(grad_diff*grad_diff)/TAU;
1125 
1126  if (obj_diff <= obj_diff_min)
1127  {
1128  Gmin_idx=j;
1129  obj_diff_min = obj_diff;
1130  }
1131  }
1132  }
1133  }
1134  }
1135 
1136  if(max(Gmaxp+Gmaxp2,Gmaxn+Gmaxn2) < eps)
1137  return 1;
1138 
1139  if (y[Gmin_idx] == +1)
1140  out_i = Gmaxp_idx;
1141  else
1142  out_i = Gmaxn_idx;
1143  out_j = Gmin_idx;
1144 
1145  return 0;
1146 }
1147 
1148 bool Solver_NU::be_shrunk(int i, double Gmax1, double Gmax2, double Gmax3, double Gmax4)
1149 {
1150  if(is_upper_bound(i))
1151  {
1152  if(y[i]==+1)
1153  return(-G[i] > Gmax1);
1154  else
1155  return(-G[i] > Gmax4);
1156  }
1157  else if(is_lower_bound(i))
1158  {
1159  if(y[i]==+1)
1160  return(G[i] > Gmax2);
1161  else
1162  return(G[i] > Gmax3);
1163  }
1164  else
1165  return(false);
1166 }
1167 
1168 void Solver_NU::do_shrinking()
1169 {
1170  double Gmax1 = -INF; // max { -y_i * grad(f)_i | y_i = +1, i in I_up(\alpha) }
1171  double Gmax2 = -INF; // max { y_i * grad(f)_i | y_i = +1, i in I_low(\alpha) }
1172  double Gmax3 = -INF; // max { -y_i * grad(f)_i | y_i = -1, i in I_up(\alpha) }
1173  double Gmax4 = -INF; // max { y_i * grad(f)_i | y_i = -1, i in I_low(\alpha) }
1174 
1175  // find maximal violating pair first
1176  int i;
1177  for(i=0;i<active_size;i++)
1178  {
1179  if(!is_upper_bound(i))
1180  {
1181  if(y[i]==+1)
1182  {
1183  if(-G[i] > Gmax1) Gmax1 = -G[i];
1184  }
1185  else if(-G[i] > Gmax4) Gmax4 = -G[i];
1186  }
1187  if(!is_lower_bound(i))
1188  {
1189  if(y[i]==+1)
1190  {
1191  if(G[i] > Gmax2) Gmax2 = G[i];
1192  }
1193  else if(G[i] > Gmax3) Gmax3 = G[i];
1194  }
1195  }
1196 
1197  if(unshrink == false && max(Gmax1+Gmax2,Gmax3+Gmax4) <= eps*10)
1198  {
1199  unshrink = true;
1200  reconstruct_gradient();
1201  active_size = l;
1202  }
1203 
1204  for(i=0;i<active_size;i++)
1205  if (be_shrunk(i, Gmax1, Gmax2, Gmax3, Gmax4))
1206  {
1207  active_size--;
1208  while (active_size > i)
1209  {
1210  if (!be_shrunk(active_size, Gmax1, Gmax2, Gmax3, Gmax4))
1211  {
1212  swap_index(i,active_size);
1213  break;
1214  }
1215  active_size--;
1216  }
1217  }
1218 }
1219 
1220 double Solver_NU::calculate_rho()
1221 {
1222  int nr_free1 = 0,nr_free2 = 0;
1223  double ub1 = INF, ub2 = INF;
1224  double lb1 = -INF, lb2 = -INF;
1225  double sum_free1 = 0, sum_free2 = 0;
1226 
1227  for(int i=0;i<active_size;i++)
1228  {
1229  if(y[i]==+1)
1230  {
1231  if(is_upper_bound(i))
1232  lb1 = max(lb1,G[i]);
1233  else if(is_lower_bound(i))
1234  ub1 = min(ub1,G[i]);
1235  else
1236  {
1237  ++nr_free1;
1238  sum_free1 += G[i];
1239  }
1240  }
1241  else
1242  {
1243  if(is_upper_bound(i))
1244  lb2 = max(lb2,G[i]);
1245  else if(is_lower_bound(i))
1246  ub2 = min(ub2,G[i]);
1247  else
1248  {
1249  ++nr_free2;
1250  sum_free2 += G[i];
1251  }
1252  }
1253  }
1254 
1255  double r1,r2;
1256  if(nr_free1 > 0)
1257  r1 = sum_free1/nr_free1;
1258  else
1259  r1 = (ub1+lb1)/2;
1260 
1261  if(nr_free2 > 0)
1262  r2 = sum_free2/nr_free2;
1263  else
1264  r2 = (ub2+lb2)/2;
1265 
1266  si->r = (r1+r2)/2;
1267  return (r1-r2)/2;
1268 }
1269 
1270 //
1271 // Q matrices for various formulations
1272 //
1273 class SVC_Q: public Kernel
1274 {
1275 public:
1276  SVC_Q(const svm_problem& prob, const svm_parameter& param, const schar *y_)
1277  :Kernel(prob.l, prob.x, param)
1278  {
1279  clone(y,y_,prob.l);
1280  cache = new Cache(prob.l,(long int)(param.cache_size*(1<<20)));
1281  QD = new double[prob.l];
1282  for(int i=0;i<prob.l;i++)
1283  QD[i] = (this->*kernel_function)(i,i);
1284  }
1285 
1286  Qfloat *get_Q(int i, int len) const
1287  {
1288  Qfloat *data;
1289  int start, j;
1290  if((start = cache->get_data(i,&data,len)) < len)
1291  {
1292  for(j=start;j<len;j++)
1293  data[j] = (Qfloat)(y[i]*y[j]*(this->*kernel_function)(i,j));
1294  }
1295  return data;
1296  }
1297 
1298  double *get_QD() const
1299  {
1300  return QD;
1301  }
1302 
1303  void swap_index(int i, int j) const
1304  {
1305  cache->swap_index(i,j);
1306  Kernel::swap_index(i,j);
1307  swap(y[i],y[j]);
1308  swap(QD[i],QD[j]);
1309  }
1310 
1311  ~SVC_Q()
1312  {
1313  delete[] y;
1314  delete cache;
1315  delete[] QD;
1316  }
1317 private:
1318  schar *y;
1319  Cache *cache;
1320  double *QD;
1321 };
1322 
1323 class ONE_CLASS_Q: public Kernel
1324 {
1325 public:
1326  ONE_CLASS_Q(const svm_problem& prob, const svm_parameter& param)
1327  :Kernel(prob.l, prob.x, param)
1328  {
1329  cache = new Cache(prob.l,(long int)(param.cache_size*(1<<20)));
1330  QD = new double[prob.l];
1331  for(int i=0;i<prob.l;i++)
1332  QD[i] = (this->*kernel_function)(i,i);
1333  }
1334 
1335  Qfloat *get_Q(int i, int len) const
1336  {
1337  Qfloat *data;
1338  int start, j;
1339  if((start = cache->get_data(i,&data,len)) < len)
1340  {
1341  for(j=start;j<len;j++)
1342  data[j] = (Qfloat)(this->*kernel_function)(i,j);
1343  }
1344  return data;
1345  }
1346 
1347  double *get_QD() const
1348  {
1349  return QD;
1350  }
1351 
1352  void swap_index(int i, int j) const
1353  {
1354  cache->swap_index(i,j);
1355  Kernel::swap_index(i,j);
1356  swap(QD[i],QD[j]);
1357  }
1358 
1359  ~ONE_CLASS_Q()
1360  {
1361  delete cache;
1362  delete[] QD;
1363  }
1364 private:
1365  Cache *cache;
1366  double *QD;
1367 };
1368 
1369 class SVR_Q: public Kernel
1370 {
1371 public:
1372  SVR_Q(const svm_problem& prob, const svm_parameter& param)
1373  :Kernel(prob.l, prob.x, param)
1374  {
1375  l = prob.l;
1376  cache = new Cache(l,(long int)(param.cache_size*(1<<20)));
1377  QD = new double[2*l];
1378  sign = new schar[2*l];
1379  index = new int[2*l];
1380  for(int k=0;k<l;k++)
1381  {
1382  sign[k] = 1;
1383  sign[k+l] = -1;
1384  index[k] = k;
1385  index[k+l] = k;
1386  QD[k] = (this->*kernel_function)(k,k);
1387  QD[k+l] = QD[k];
1388  }
1389  buffer[0] = new Qfloat[2*l];
1390  buffer[1] = new Qfloat[2*l];
1391  next_buffer = 0;
1392  }
1393 
1394  void swap_index(int i, int j) const
1395  {
1396  swap(sign[i],sign[j]);
1397  swap(index[i],index[j]);
1398  swap(QD[i],QD[j]);
1399  }
1400 
1401  Qfloat *get_Q(int i, int len) const
1402  {
1403  Qfloat *data;
1404  int j, real_i = index[i];
1405  if(cache->get_data(real_i,&data,l) < l)
1406  {
1407  for(j=0;j<l;j++)
1408  data[j] = (Qfloat)(this->*kernel_function)(real_i,j);
1409  }
1410 
1411  // reorder and copy
1412  Qfloat *buf = buffer[next_buffer];
1413  next_buffer = 1 - next_buffer;
1414  schar si = sign[i];
1415  for(j=0;j<len;j++)
1416  buf[j] = (Qfloat) si * (Qfloat) sign[j] * data[index[j]];
1417  return buf;
1418  }
1419 
1420  double *get_QD() const
1421  {
1422  return QD;
1423  }
1424 
1425  ~SVR_Q()
1426  {
1427  delete cache;
1428  delete[] sign;
1429  delete[] index;
1430  delete[] buffer[0];
1431  delete[] buffer[1];
1432  delete[] QD;
1433  }
1434 private:
1435  int l;
1436  Cache *cache;
1437  schar *sign;
1438  int *index;
1439  mutable int next_buffer;
1440  Qfloat *buffer[2];
1441  double *QD;
1442 };
1443 
1444 //
1445 // construct and solve various formulations
1446 //
1447 static void solve_c_svc(
1448  const svm_problem *prob, const svm_parameter* param,
1449  double *alpha, Solver::SolutionInfo* si, double Cp, double Cn)
1450 {
1451  int l = prob->l;
1452  double *minus_ones = new double[l];
1453  schar *y = new schar[l];
1454 
1455  int i;
1456 
1457  for(i=0;i<l;i++)
1458  {
1459  alpha[i] = 0;
1460  minus_ones[i] = -1;
1461  if(prob->y[i] > 0) y[i] = +1; else y[i] = -1;
1462  }
1463 
1464  Solver s;
1465  s.Solve(l, SVC_Q(*prob,*param,y), minus_ones, y,
1466  alpha, Cp, Cn, param->eps, si, param->shrinking, param->verbose);
1467 
1468  double sum_alpha=0;
1469  for(i=0;i<l;i++)
1470  sum_alpha += alpha[i];
1471 
1472  if (Cp==Cn)
1473  if(param->verbose)//pk
1474  info("nu = %f\n", sum_alpha/(Cp*prob->l));
1475 
1476  for(i=0;i<l;i++)
1477  alpha[i] *= y[i];
1478 
1479  delete[] minus_ones;
1480  delete[] y;
1481 }
1482 
1483 static void solve_nu_svc(
1484  const svm_problem *prob, const svm_parameter *param,
1485  double *alpha, Solver::SolutionInfo* si)
1486 {
1487  int i;
1488  int l = prob->l;
1489  double nu = param->nu;
1490 
1491  schar *y = new schar[l];
1492 
1493  for(i=0;i<l;i++)
1494  if(prob->y[i]>0)
1495  y[i] = +1;
1496  else
1497  y[i] = -1;
1498 
1499  double sum_pos = nu*l/2;
1500  double sum_neg = nu*l/2;
1501 
1502  for(i=0;i<l;i++)
1503  if(y[i] == +1)
1504  {
1505  alpha[i] = min(1.0,sum_pos);
1506  sum_pos -= alpha[i];
1507  }
1508  else
1509  {
1510  alpha[i] = min(1.0,sum_neg);
1511  sum_neg -= alpha[i];
1512  }
1513 
1514  double *zeros = new double[l];
1515 
1516  for(i=0;i<l;i++)
1517  zeros[i] = 0;
1518 
1519  Solver_NU s;
1520  s.Solve(l, SVC_Q(*prob,*param,y), zeros, y,
1521  alpha, 1.0, 1.0, param->eps, si, param->shrinking, param->verbose);
1522  double r = si->r;
1523 
1524  if(param->verbose)//pk
1525  info("C = %f\n",1/r);
1526 
1527  for(i=0;i<l;i++)
1528  alpha[i] *= y[i]/r;
1529 
1530  si->rho /= r;
1531  si->obj /= (r*r);
1532  si->upper_bound_p = 1/r;
1533  si->upper_bound_n = 1/r;
1534 
1535  delete[] y;
1536  delete[] zeros;
1537 }
1538 
1539 static void solve_one_class(
1540  const svm_problem *prob, const svm_parameter *param,
1541  double *alpha, Solver::SolutionInfo* si)
1542 {
1543  int l = prob->l;
1544  double *zeros = new double[l];
1545  schar *ones = new schar[l];
1546  int i;
1547 
1548  int n = (int)(param->nu*prob->l); // # of alpha's at upper bound
1549 
1550  for(i=0;i<n;i++)
1551  alpha[i] = 1;
1552  if(n<prob->l)
1553  alpha[n] = param->nu * prob->l - n;
1554  for(i=n+1;i<l;i++)
1555  alpha[i] = 0;
1556 
1557  for(i=0;i<l;i++)
1558  {
1559  zeros[i] = 0;
1560  ones[i] = 1;
1561  }
1562 
1563  Solver s;
1564  s.Solve(l, ONE_CLASS_Q(*prob,*param), zeros, ones,
1565  alpha, 1.0, 1.0, param->eps, si, param->shrinking, param->verbose );
1566 
1567  delete[] zeros;
1568  delete[] ones;
1569 }
1570 
1571 static void solve_epsilon_svr(
1572  const svm_problem *prob, const svm_parameter *param,
1573  double *alpha, Solver::SolutionInfo* si)
1574 {
1575  int l = prob->l;
1576  double *alpha2 = new double[2*l];
1577  double *linear_term = new double[2*l];
1578  schar *y = new schar[2*l];
1579  int i;
1580 
1581  for(i=0;i<l;i++)
1582  {
1583  alpha2[i] = 0;
1584  linear_term[i] = param->p - prob->y[i];
1585  y[i] = 1;
1586 
1587  alpha2[i+l] = 0;
1588  linear_term[i+l] = param->p + prob->y[i];
1589  y[i+l] = -1;
1590  }
1591 
1592  Solver s;
1593  s.Solve(2*l, SVR_Q(*prob,*param), linear_term, y,
1594  alpha2, param->C, param->C, param->eps, si, param->shrinking, param->verbose);
1595 
1596  double sum_alpha = 0;
1597  for(i=0;i<l;i++)
1598  {
1599  alpha[i] = alpha2[i] - alpha2[i+l];
1600  sum_alpha += fabs(alpha[i]);
1601  }
1602  if(param->verbose)//pk
1603  info("nu = %f\n",sum_alpha/(param->C*l));
1604 
1605  delete[] alpha2;
1606  delete[] linear_term;
1607  delete[] y;
1608 }
1609 
1610 static void solve_nu_svr(
1611  const svm_problem *prob, const svm_parameter *param,
1612  double *alpha, Solver::SolutionInfo* si)
1613 {
1614  int l = prob->l;
1615  double C = param->C;
1616  double *alpha2 = new double[2*l];
1617  double *linear_term = new double[2*l];
1618  schar *y = new schar[2*l];
1619  int i;
1620 
1621  double sum = C * param->nu * l / 2;
1622  for(i=0;i<l;i++)
1623  {
1624  alpha2[i] = alpha2[i+l] = min(sum,C);
1625  sum -= alpha2[i];
1626 
1627  linear_term[i] = - prob->y[i];
1628  y[i] = 1;
1629 
1630  linear_term[i+l] = prob->y[i];
1631  y[i+l] = -1;
1632  }
1633 
1634  Solver_NU s;
1635  s.Solve(2*l, SVR_Q(*prob,*param), linear_term, y,
1636  alpha2, C, C, param->eps, si, param->shrinking, param->verbose);
1637 
1638  if(param->verbose)//pk
1639  info("epsilon = %f\n",-si->r);
1640 
1641  for(i=0;i<l;i++)
1642  alpha[i] = alpha2[i] - alpha2[i+l];
1643 
1644  delete[] alpha2;
1645  delete[] linear_term;
1646  delete[] y;
1647 }
1648 
1649 //
1650 // decision_function
1651 //
1653 {
1654  double *alpha;
1655  double rho;
1656 };
1657 
1658 static decision_function svm_train_one(
1659  const svm_problem *prob, const svm_parameter *param,
1660  double Cp, double Cn)
1661 {
1662  double *alpha = Malloc(double,prob->l);
1664  switch(param->svm_type)
1665  {
1666  case C_SVC:
1667  solve_c_svc(prob,param,alpha,&si,Cp,Cn);
1668  break;
1669  case NU_SVC:
1670  solve_nu_svc(prob,param,alpha,&si);
1671  break;
1672  case ONE_CLASS:
1673  solve_one_class(prob,param,alpha,&si);
1674  break;
1675  case EPSILON_SVR:
1676  solve_epsilon_svr(prob,param,alpha,&si);
1677  break;
1678  case NU_SVR:
1679  solve_nu_svr(prob,param,alpha,&si);
1680  break;
1681  }
1682 
1683  if(param->verbose)//pk
1684  info("obj = %f, rho = %f\n",si.obj,si.rho);
1685 
1686  // output SVs
1687 
1688  int nSV = 0;
1689  int nBSV = 0;
1690  for(int i=0;i<prob->l;i++)
1691  {
1692  if(fabs(alpha[i]) > 0)
1693  {
1694  ++nSV;
1695  if(prob->y[i] > 0)
1696  {
1697  if(fabs(alpha[i]) >= si.upper_bound_p)
1698  ++nBSV;
1699  }
1700  else
1701  {
1702  if(fabs(alpha[i]) >= si.upper_bound_n)
1703  ++nBSV;
1704  }
1705  }
1706  }
1707 
1708  if(param->verbose)//pk
1709  info("nSV = %d, nBSV = %d\n",nSV,nBSV);
1710 
1712  f.alpha = alpha;
1713  f.rho = si.rho;
1714  return f;
1715 }
1716 
1717 // Platt's binary SVM Probablistic Output: an improvement from Lin et al.
1718 static void sigmoid_train(
1719  int l, const double *dec_values, const double *labels,
1720  double& A, double& B)
1721 {
1722  double prior1=0, prior0 = 0;
1723  int i;
1724 
1725  for (i=0;i<l;i++)
1726  if (labels[i] > 0) prior1+=1;
1727  else prior0+=1;
1728 
1729  int max_iter=100; // Maximal number of iterations
1730  double min_step=1e-10; // Minimal step taken in line search
1731  double sigma=1e-12; // For numerically strict PD of Hessian
1732  double eps=1e-5;
1733  double hiTarget=(prior1+1.0)/(prior1+2.0);
1734  double loTarget=1/(prior0+2.0);
1735  double *t=Malloc(double,l);
1736  double fApB,p,q,h11,h22,h21,g1,g2,det,dA,dB,gd,stepsize;
1737  double newA,newB,newf,d1,d2;
1738  int iter;
1739 
1740  // Initial Point and Initial Fun Value
1741  A=0.0; B=log((prior0+1.0)/(prior1+1.0));
1742  double fval = 0.0;
1743 
1744  for (i=0;i<l;i++)
1745  {
1746  if (labels[i]>0) t[i]=hiTarget;
1747  else t[i]=loTarget;
1748  fApB = dec_values[i]*A+B;
1749  if (fApB>=0)
1750  fval += t[i]*fApB + log(1+exp(-fApB));
1751  else
1752  fval += (t[i] - 1)*fApB +log(1+exp(fApB));
1753  }
1754  for (iter=0;iter<max_iter;iter++)
1755  {
1756  // Update Gradient and Hessian (use H' = H + sigma I)
1757  h11=sigma; // numerically ensures strict PD
1758  h22=sigma;
1759  h21=0.0;g1=0.0;g2=0.0;
1760  for (i=0;i<l;i++)
1761  {
1762  fApB = dec_values[i]*A+B;
1763  if (fApB >= 0)
1764  {
1765  p=exp(-fApB)/(1.0+exp(-fApB));
1766  q=1.0/(1.0+exp(-fApB));
1767  }
1768  else
1769  {
1770  p=1.0/(1.0+exp(fApB));
1771  q=exp(fApB)/(1.0+exp(fApB));
1772  }
1773  d2=p*q;
1774  h11+=dec_values[i]*dec_values[i]*d2;
1775  h22+=d2;
1776  h21+=dec_values[i]*d2;
1777  d1=t[i]-p;
1778  g1+=dec_values[i]*d1;
1779  g2+=d1;
1780  }
1781 
1782  // Stopping Criteria
1783  if (fabs(g1)<eps && fabs(g2)<eps)
1784  break;
1785 
1786  // Finding Newton direction: -inv(H') * g
1787  det=h11*h22-h21*h21;
1788  dA=-(h22*g1 - h21 * g2) / det;
1789  dB=-(-h21*g1+ h11 * g2) / det;
1790  gd=g1*dA+g2*dB;
1791 
1792 
1793  stepsize = 1; // Line Search
1794  while (stepsize >= min_step)
1795  {
1796  newA = A + stepsize * dA;
1797  newB = B + stepsize * dB;
1798 
1799  // New function value
1800  newf = 0.0;
1801  for (i=0;i<l;i++)
1802  {
1803  fApB = dec_values[i]*newA+newB;
1804  if (fApB >= 0)
1805  newf += t[i]*fApB + log(1+exp(-fApB));
1806  else
1807  newf += (t[i] - 1)*fApB +log(1+exp(fApB));
1808  }
1809  // Check sufficient decrease
1810  if (newf<fval+0.0001*stepsize*gd)
1811  {
1812  A=newA;B=newB;fval=newf;
1813  break;
1814  }
1815  else
1816  stepsize = stepsize / 2.0;
1817  }
1818 
1819  if (stepsize < min_step)
1820  {
1821  info("Line search fails in two-class probability estimates\n");
1822  break;
1823  }
1824  }
1825 
1826  if (iter>=max_iter)
1827  info("Reaching maximal iterations in two-class probability estimates\n");
1828  free(t);
1829 }
1830 
1831 static double sigmoid_predict(double decision_value, double A, double B)
1832 {
1833  double fApB = decision_value*A+B;
1834  // 1-p used later; avoid catastrophic cancellation
1835  if (fApB >= 0)
1836  return exp(-fApB)/(1.0+exp(-fApB));
1837  else
1838  return 1.0/(1+exp(fApB)) ;
1839 }
1840 
1841 // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng
1842 static void multiclass_probability(int k, double **r, double *p)
1843 {
1844  int t,j;
1845  int iter = 0, max_iter=max(100,k);
1846  double **Q=Malloc(double *,k);
1847  double *Qp=Malloc(double,k);
1848  double pQp, eps=0.005/k;
1849 
1850  for (t=0;t<k;t++)
1851  {
1852  p[t]=1.0/k; // Valid if k = 1
1853  Q[t]=Malloc(double,k);
1854  Q[t][t]=0;
1855  for (j=0;j<t;j++)
1856  {
1857  Q[t][t]+=r[j][t]*r[j][t];
1858  Q[t][j]=Q[j][t];
1859  }
1860  for (j=t+1;j<k;j++)
1861  {
1862  Q[t][t]+=r[j][t]*r[j][t];
1863  Q[t][j]=-r[j][t]*r[t][j];
1864  }
1865  }
1866  for (iter=0;iter<max_iter;iter++)
1867  {
1868  // stopping condition, recalculate QP,pQP for numerical accuracy
1869  pQp=0;
1870  for (t=0;t<k;t++)
1871  {
1872  Qp[t]=0;
1873  for (j=0;j<k;j++)
1874  Qp[t]+=Q[t][j]*p[j];
1875  pQp+=p[t]*Qp[t];
1876  }
1877  double max_error=0;
1878  for (t=0;t<k;t++)
1879  {
1880  double error=fabs(Qp[t]-pQp);
1881  if (error>max_error)
1882  max_error=error;
1883  }
1884  if (max_error<eps) break;
1885 
1886  for (t=0;t<k;t++)
1887  {
1888  double diff=(-Qp[t]+pQp)/Q[t][t];
1889  p[t]+=diff;
1890  pQp=(pQp+diff*(diff*Q[t][t]+2*Qp[t]))/(1+diff)/(1+diff);
1891  for (j=0;j<k;j++)
1892  {
1893  Qp[j]=(Qp[j]+diff*Q[t][j])/(1+diff);
1894  p[j]/=(1+diff);
1895  }
1896  }
1897  }
1898  if (iter>=max_iter)
1899  info("Exceeds max_iter in multiclass_prob\n");
1900  for(t=0;t<k;t++) free(Q[t]);
1901  free(Q);
1902  free(Qp);
1903 }
1904 
1905 // Cross-validation decision values for probability estimates
1906 static void svm_binary_svc_probability(
1907  const svm_problem *prob, const svm_parameter *param,
1908  double Cp, double Cn, double& probA, double& probB)
1909 {
1910  int i;
1911  int nr_fold = 5;
1912  int *perm = Malloc(int,prob->l);
1913  double *dec_values = Malloc(double,prob->l);
1914 
1915  // random shuffle
1916  for(i=0;i<prob->l;i++) perm[i]=i;
1917  for(i=0;i<prob->l;i++)
1918  {
1919  int j = i+rand()%(prob->l-i);
1920  swap(perm[i],perm[j]);
1921  }
1922  for(i=0;i<nr_fold;i++)
1923  {
1924  int begin = i*prob->l/nr_fold;
1925  int end = (i+1)*prob->l/nr_fold;
1926  int j,k;
1927  struct svm_problem subprob;
1928 
1929  subprob.l = prob->l-(end-begin);
1930  subprob.x = Malloc(struct svm_node*,subprob.l);
1931  subprob.y = Malloc(double,subprob.l);
1932 
1933  k=0;
1934  for(j=0;j<begin;j++)
1935  {
1936  subprob.x[k] = prob->x[perm[j]];
1937  subprob.y[k] = prob->y[perm[j]];
1938  ++k;
1939  }
1940  for(j=end;j<prob->l;j++)
1941  {
1942  subprob.x[k] = prob->x[perm[j]];
1943  subprob.y[k] = prob->y[perm[j]];
1944  ++k;
1945  }
1946  int p_count=0,n_count=0;
1947  for(j=0;j<k;j++)
1948  if(subprob.y[j]>0)
1949  p_count++;
1950  else
1951  n_count++;
1952 
1953  if(p_count==0 && n_count==0)
1954  for(j=begin;j<end;j++)
1955  dec_values[perm[j]] = 0;
1956  else if(p_count > 0 && n_count == 0)
1957  for(j=begin;j<end;j++)
1958  dec_values[perm[j]] = 1;
1959  else if(p_count == 0 && n_count > 0)
1960  for(j=begin;j<end;j++)
1961  dec_values[perm[j]] = -1;
1962  else
1963  {
1964  svm_parameter subparam = *param;
1965  subparam.probability=0;
1966  subparam.C=1.0;
1967  subparam.nr_weight=2;
1968  subparam.weight_label = Malloc(int,2);
1969  subparam.weight = Malloc(double,2);
1970  subparam.weight_label[0]=+1;
1971  subparam.weight_label[1]=-1;
1972  subparam.weight[0]=Cp;
1973  subparam.weight[1]=Cn;
1974  struct svm_model *submodel = svm_train(&subprob,&subparam);
1975  for(j=begin;j<end;j++)
1976  {
1977  svm_predict_values(submodel,prob->x[perm[j]],&(dec_values[perm[j]]));
1978  // ensure +1 -1 order; reason not using CV subroutine
1979  dec_values[perm[j]] *= submodel->label[0];
1980  }
1981  svm_free_and_destroy_model(&submodel);
1982  svm_destroy_param(&subparam);
1983  }
1984  free(subprob.x);
1985  free(subprob.y);
1986  }
1987  sigmoid_train(prob->l,dec_values,prob->y,probA,probB);
1988  free(dec_values);
1989  free(perm);
1990 }
1991 
1992 // Return parameter of a Laplace distribution
1993 static double svm_svr_probability(
1994  const svm_problem *prob, const svm_parameter *param)
1995 {
1996  int i;
1997  int nr_fold = 5;
1998  double *ymv = Malloc(double,prob->l);
1999  double mae = 0;
2000 
2001  svm_parameter newparam = *param;
2002  newparam.probability = 0;
2003  svm_cross_validation(prob,&newparam,nr_fold,ymv);
2004  for(i=0;i<prob->l;i++)
2005  {
2006  ymv[i]=prob->y[i]-ymv[i];
2007  mae += fabs(ymv[i]);
2008  }
2009  mae /= prob->l;
2010  double std=sqrt(2*mae*mae);
2011  int count=0;
2012  mae=0;
2013  for(i=0;i<prob->l;i++)
2014  if (fabs(ymv[i]) > 5*std)
2015  count=count+1;
2016  else
2017  mae+=fabs(ymv[i]);
2018  mae /= (prob->l-count);
2019  info("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma= %g\n",mae);
2020  free(ymv);
2021  return mae;
2022 }
2023 
2024 
2025 // label: label name, start: begin of each class, count: #data of classes, perm: indices to the original data
2026 // perm, length l, must be allocated before calling this subroutine
2027 static void svm_group_classes(const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
2028 {
2029  int l = prob->l;
2030  int max_nr_class = 16;
2031  int nr_class = 0;
2032  int *label = Malloc(int,max_nr_class);
2033  int *count = Malloc(int,max_nr_class);
2034  int *data_label = Malloc(int,l);
2035  int i;
2036 
2037  for(i=0;i<l;i++)
2038  {
2039  int this_label = (int)prob->y[i];
2040  int j;
2041  for(j=0;j<nr_class;j++)
2042  {
2043  if(this_label == label[j])
2044  {
2045  ++count[j];
2046  break;
2047  }
2048  }
2049  data_label[i] = j;
2050  if(j == nr_class)
2051  {
2052  if(nr_class == max_nr_class)
2053  {
2054  max_nr_class *= 2;
2055  label = (int *)realloc(label,max_nr_class*sizeof(int));
2056  count = (int *)realloc(count,max_nr_class*sizeof(int));
2057  }
2058  label[nr_class] = this_label;
2059  count[nr_class] = 1;
2060  ++nr_class;
2061  }
2062  }
2063 
2064  int *start = Malloc(int,nr_class);
2065  start[0] = 0;
2066  for(i=1;i<nr_class;i++)
2067  start[i] = start[i-1]+count[i-1];
2068  for(i=0;i<l;i++)
2069  {
2070  perm[start[data_label[i]]] = i;
2071  ++start[data_label[i]];
2072  }
2073  start[0] = 0;
2074  for(i=1;i<nr_class;i++)
2075  start[i] = start[i-1]+count[i-1];
2076 
2077  *nr_class_ret = nr_class;
2078  *label_ret = label;
2079  *start_ret = start;
2080  *count_ret = count;
2081  free(data_label);
2082 }
2083 
2084 //
2085 // Interface functions
2086 //
2087 svm_model *svm_train(const svm_problem *prob, const svm_parameter *param)
2088 {
2089  svm_model *model = Malloc(svm_model,1);
2090  model->param = *param;
2091  model->free_sv = 0; // XXX
2092 
2093  if(param->svm_type == ONE_CLASS ||
2094  param->svm_type == EPSILON_SVR ||
2095  param->svm_type == NU_SVR)
2096  {
2097  // regression or one-class-svm
2098  model->nr_class = 2;
2099  model->label = NULL;
2100  model->nSV = NULL;
2101  model->probA = NULL; model->probB = NULL;
2102  model->sv_coef = Malloc(double *,1);
2103 
2104  if(param->probability &&
2105  (param->svm_type == EPSILON_SVR ||
2106  param->svm_type == NU_SVR))
2107  {
2108  model->probA = Malloc(double,1);
2109  model->probA[0] = svm_svr_probability(prob,param);
2110  }
2111 
2112  decision_function f = svm_train_one(prob,param,0,0);
2113  model->rho = Malloc(double,1);
2114  model->rho[0] = f.rho;
2115 
2116  int nSV = 0;
2117  int i;
2118  for(i=0;i<prob->l;i++)
2119  if(fabs(f.alpha[i]) > 0) ++nSV;
2120  model->l = nSV;
2121  model->SV = Malloc(svm_node *,nSV);
2122  model->sv_coef[0] = Malloc(double,nSV);
2123  int j = 0;
2124  for(i=0;i<prob->l;i++)
2125  if(fabs(f.alpha[i]) > 0)
2126  {
2127  model->SV[j] = prob->x[i];
2128  model->sv_coef[0][j] = f.alpha[i];
2129  ++j;
2130  }
2131 
2132  free(f.alpha);
2133  }
2134  else
2135  {
2136  // classification
2137  int l = prob->l;
2138  int nr_class;
2139  int *label = NULL;
2140  int *start = NULL;
2141  int *count = NULL;
2142  int *perm = Malloc(int,l);
2143 
2144  // group training data of the same class
2145  svm_group_classes(prob,&nr_class,&label,&start,&count,perm);
2146  if(nr_class == 1)
2147  info("WARNING: training data in only one class. See README for details.\n");
2148 
2149  svm_node **x = Malloc(svm_node *,l);
2150  int i;
2151  for(i=0;i<l;i++)
2152  x[i] = prob->x[perm[i]];
2153 
2154  // calculate weighted C
2155 
2156  double *weighted_C = Malloc(double, nr_class);
2157  for(i=0;i<nr_class;i++)
2158  weighted_C[i] = param->C;
2159  for(i=0;i<param->nr_weight;i++)
2160  {
2161  int j;
2162  for(j=0;j<nr_class;j++)
2163  if(param->weight_label[i] == label[j])
2164  break;
2165  if(j == nr_class)
2166  fprintf(stderr,"WARNING: class label %d specified in weight is not found\n", param->weight_label[i]);
2167  else
2168  weighted_C[j] *= param->weight[i];
2169  }
2170 
2171  // train k*(k-1)/2 models
2172 
2173  bool *nonzero = Malloc(bool,l);
2174  for(i=0;i<l;i++)
2175  nonzero[i] = false;
2176  decision_function *f = Malloc(decision_function,nr_class*(nr_class-1)/2);
2177 
2178  double *probA=NULL,*probB=NULL;
2179  if (param->probability)
2180  {
2181  probA=Malloc(double,nr_class*(nr_class-1)/2);
2182  probB=Malloc(double,nr_class*(nr_class-1)/2);
2183  }
2184 
2185  int p = 0;
2186  for(i=0;i<nr_class;i++)
2187  for(int j=i+1;j<nr_class;j++)
2188  {
2189  svm_problem sub_prob;
2190  int si = start[i], sj = start[j];
2191  int ci = count[i], cj = count[j];
2192  sub_prob.l = ci+cj;
2193  sub_prob.x = Malloc(svm_node *,sub_prob.l);
2194  sub_prob.y = Malloc(double,sub_prob.l);
2195  int k;
2196  for(k=0;k<ci;k++)
2197  {
2198  sub_prob.x[k] = x[si+k];
2199  sub_prob.y[k] = +1;
2200  }
2201  for(k=0;k<cj;k++)
2202  {
2203  sub_prob.x[ci+k] = x[sj+k];
2204  sub_prob.y[ci+k] = -1;
2205  }
2206 
2207  if(param->probability)
2208  svm_binary_svc_probability(&sub_prob,param,weighted_C[i],weighted_C[j],probA[p],probB[p]);
2209 
2210  f[p] = svm_train_one(&sub_prob,param,weighted_C[i],weighted_C[j]);
2211  for(k=0;k<ci;k++)
2212  if(!nonzero[si+k] && fabs(f[p].alpha[k]) > 0)
2213  nonzero[si+k] = true;
2214  for(k=0;k<cj;k++)
2215  if(!nonzero[sj+k] && fabs(f[p].alpha[ci+k]) > 0)
2216  nonzero[sj+k] = true;
2217  free(sub_prob.x);
2218  free(sub_prob.y);
2219  ++p;
2220  }
2221 
2222  // build output
2223 
2224  model->nr_class = nr_class;
2225 
2226  model->label = Malloc(int,nr_class);
2227  for(i=0;i<nr_class;i++)
2228  model->label[i] = label[i];
2229 
2230  model->rho = Malloc(double,nr_class*(nr_class-1)/2);
2231  for(i=0;i<nr_class*(nr_class-1)/2;i++)
2232  model->rho[i] = f[i].rho;
2233 
2234  if(param->probability)
2235  {
2236  model->probA = Malloc(double,nr_class*(nr_class-1)/2);
2237  model->probB = Malloc(double,nr_class*(nr_class-1)/2);
2238  for(i=0;i<nr_class*(nr_class-1)/2;i++)
2239  {
2240  model->probA[i] = probA[i];
2241  model->probB[i] = probB[i];
2242  }
2243  }
2244  else
2245  {
2246  model->probA=NULL;
2247  model->probB=NULL;
2248  }
2249 
2250  int total_sv = 0;
2251  int *nz_count = Malloc(int,nr_class);
2252  model->nSV = Malloc(int,nr_class);
2253  for(i=0;i<nr_class;i++)
2254  {
2255  int nSV = 0;
2256  for(int j=0;j<count[i];j++)
2257  if(nonzero[start[i]+j])
2258  {
2259  ++nSV;
2260  ++total_sv;
2261  }
2262  model->nSV[i] = nSV;
2263  nz_count[i] = nSV;
2264  }
2265 
2266  if(param->verbose)//pk
2267  info("Total nSV = %d\n",total_sv);
2268 
2269  model->l = total_sv;
2270  model->SV = Malloc(svm_node *,total_sv);
2271  p = 0;
2272  for(i=0;i<l;i++)
2273  if(nonzero[i]) model->SV[p++] = x[i];
2274 
2275  int *nz_start = Malloc(int,nr_class);
2276  nz_start[0] = 0;
2277  for(i=1;i<nr_class;i++)
2278  nz_start[i] = nz_start[i-1]+nz_count[i-1];
2279 
2280  model->sv_coef = Malloc(double *,nr_class-1);
2281  for(i=0;i<nr_class-1;i++)
2282  model->sv_coef[i] = Malloc(double,total_sv);
2283 
2284  p = 0;
2285  for(i=0;i<nr_class;i++)
2286  for(int j=i+1;j<nr_class;j++)
2287  {
2288  // classifier (i,j): coefficients with
2289  // i are in sv_coef[j-1][nz_start[i]...],
2290  // j are in sv_coef[i][nz_start[j]...]
2291 
2292  int si = start[i];
2293  int sj = start[j];
2294  int ci = count[i];
2295  int cj = count[j];
2296 
2297  int q = nz_start[i];
2298  int k;
2299  for(k=0;k<ci;k++)
2300  if(nonzero[si+k])
2301  model->sv_coef[j-1][q++] = f[p].alpha[k];
2302  q = nz_start[j];
2303  for(k=0;k<cj;k++)
2304  if(nonzero[sj+k])
2305  model->sv_coef[i][q++] = f[p].alpha[ci+k];
2306  ++p;
2307  }
2308 
2309  free(label);
2310  free(probA);
2311  free(probB);
2312  free(count);
2313  free(perm);
2314  free(start);
2315  free(x);
2316  free(weighted_C);
2317  free(nonzero);
2318  for(i=0;i<nr_class*(nr_class-1)/2;i++)
2319  free(f[i].alpha);
2320  free(f);
2321  free(nz_count);
2322  free(nz_start);
2323  }
2324  return model;
2325 }
2326 
2327 // Stratified cross validation
2328 void svm_cross_validation(const svm_problem *prob, const svm_parameter *param, int nr_fold, double *target)
2329 {
2330  int i;
2331  int *fold_start = Malloc(int,nr_fold+1);
2332  int l = prob->l;
2333  int *perm = Malloc(int,l);
2334  int nr_class;
2335 
2336  // stratified cv may not give leave-one-out rate
2337  // Each class to l folds -> some folds may have zero elements
2338  if((param->svm_type == C_SVC ||
2339  param->svm_type == NU_SVC) && nr_fold < l)
2340  {
2341  int *start = NULL;
2342  int *label = NULL;
2343  int *count = NULL;
2344  svm_group_classes(prob,&nr_class,&label,&start,&count,perm);
2345 
2346  // random shuffle and then data grouped by fold using the array perm
2347  int *fold_count = Malloc(int,nr_fold);
2348  int c;
2349  int *index = Malloc(int,l);
2350  for(i=0;i<l;i++)
2351  index[i]=perm[i];
2352  for (c=0; c<nr_class; c++)
2353  for(i=0;i<count[c];i++)
2354  {
2355  int j = i+rand()%(count[c]-i);
2356  swap(index[start[c]+j],index[start[c]+i]);
2357  }
2358  for(i=0;i<nr_fold;i++)
2359  {
2360  fold_count[i] = 0;
2361  for (c=0; c<nr_class;c++)
2362  fold_count[i]+=(i+1)*count[c]/nr_fold-i*count[c]/nr_fold;
2363  }
2364  fold_start[0]=0;
2365  for (i=1;i<=nr_fold;i++)
2366  fold_start[i] = fold_start[i-1]+fold_count[i-1];
2367  for (c=0; c<nr_class;c++)
2368  for(i=0;i<nr_fold;i++)
2369  {
2370  int begin = start[c]+i*count[c]/nr_fold;
2371  int end = start[c]+(i+1)*count[c]/nr_fold;
2372  for(int j=begin;j<end;j++)
2373  {
2374  perm[fold_start[i]] = index[j];
2375  fold_start[i]++;
2376  }
2377  }
2378  fold_start[0]=0;
2379  for (i=1;i<=nr_fold;i++)
2380  fold_start[i] = fold_start[i-1]+fold_count[i-1];
2381  free(start);
2382  free(label);
2383  free(count);
2384  free(index);
2385  free(fold_count);
2386  }
2387  else
2388  {
2389  for(i=0;i<l;i++) perm[i]=i;
2390  for(i=0;i<l;i++)
2391  {
2392  int j = i+rand()%(l-i);
2393  swap(perm[i],perm[j]);
2394  }
2395  for(i=0;i<=nr_fold;i++)
2396  fold_start[i]=i*l/nr_fold;
2397  }
2398 
2399  for(i=0;i<nr_fold;i++)
2400  {
2401  int begin = fold_start[i];
2402  int end = fold_start[i+1];
2403  int j,k;
2404  struct svm_problem subprob;
2405 
2406  subprob.l = l-(end-begin);
2407  subprob.x = Malloc(struct svm_node*,subprob.l);
2408  subprob.y = Malloc(double,subprob.l);
2409 
2410  k=0;
2411  for(j=0;j<begin;j++)
2412  {
2413  subprob.x[k] = prob->x[perm[j]];
2414  subprob.y[k] = prob->y[perm[j]];
2415  ++k;
2416  }
2417  for(j=end;j<l;j++)
2418  {
2419  subprob.x[k] = prob->x[perm[j]];
2420  subprob.y[k] = prob->y[perm[j]];
2421  ++k;
2422  }
2423  struct svm_model *submodel = svm_train(&subprob,param);
2424  if(param->probability &&
2425  (param->svm_type == C_SVC || param->svm_type == NU_SVC))
2426  {
2427  double *prob_estimates=Malloc(double,svm_get_nr_class(submodel));
2428  for(j=begin;j<end;j++)
2429  target[perm[j]] = svm_predict_probability(submodel,prob->x[perm[j]],prob_estimates);
2430  free(prob_estimates);
2431  }
2432  else
2433  for(j=begin;j<end;j++)
2434  target[perm[j]] = svm_predict(submodel,prob->x[perm[j]]);
2435  svm_free_and_destroy_model(&submodel);
2436  free(subprob.x);
2437  free(subprob.y);
2438  }
2439  free(fold_start);
2440  free(perm);
2441 }
2442 
2443 
2444 int svm_get_svm_type(const svm_model *model)
2445 {
2446  return model->param.svm_type;
2447 }
2448 
2449 int svm_get_nr_class(const svm_model *model)
2450 {
2451  return model->nr_class;
2452 }
2453 
2454 void svm_get_labels(const svm_model *model, int* label)
2455 {
2456  if (model->label != NULL)
2457  for(int i=0;i<model->nr_class;i++)
2458  label[i] = model->label[i];
2459 }
2460 
2461 double svm_get_svr_probability(const svm_model *model)
2462 {
2463  if ((model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) &&
2464  model->probA!=NULL)
2465  return model->probA[0];
2466  else
2467  {
2468  fprintf(stderr,"Model doesn't contain information for SVR probability inference\n");
2469  return 0;
2470  }
2471 }
2472 
2473 double svm_predict_values(const svm_model *model, const svm_node *x, double* dec_values)
2474 {
2475  int i;
2476  if(model->param.svm_type == ONE_CLASS ||
2477  model->param.svm_type == EPSILON_SVR ||
2478  model->param.svm_type == NU_SVR)
2479  {
2480  double *sv_coef = model->sv_coef[0];
2481  double sum = 0;
2482  for(i=0;i<model->l;i++)
2483  sum += sv_coef[i] * Kernel::k_function(x,model->SV[i],model->param);
2484  sum -= model->rho[0];
2485  *dec_values = sum;
2486 
2487  if(model->param.svm_type == ONE_CLASS)
2488  return (sum>0)?1:-1;
2489  else
2490  return sum;
2491  }
2492  else
2493  {
2494  int nr_class = model->nr_class;
2495  int l = model->l;
2496 
2497  double *kvalue = Malloc(double,l);
2498  for(i=0;i<l;i++)
2499  kvalue[i] = Kernel::k_function(x,model->SV[i],model->param);
2500 
2501  int *start = Malloc(int,nr_class);
2502  start[0] = 0;
2503  for(i=1;i<nr_class;i++)
2504  start[i] = start[i-1]+model->nSV[i-1];
2505 
2506  int *vote = Malloc(int,nr_class);
2507  for(i=0;i<nr_class;i++)
2508  vote[i] = 0;
2509 
2510  int p=0;
2511  for(i=0;i<nr_class;i++)
2512  for(int j=i+1;j<nr_class;j++)
2513  {
2514  double sum = 0;
2515  int si = start[i];
2516  int sj = start[j];
2517  int ci = model->nSV[i];
2518  int cj = model->nSV[j];
2519 
2520  int k;
2521  double *coef1 = model->sv_coef[j-1];
2522  double *coef2 = model->sv_coef[i];
2523  for(k=0;k<ci;k++)
2524  sum += coef1[si+k] * kvalue[si+k];
2525  for(k=0;k<cj;k++)
2526  sum += coef2[sj+k] * kvalue[sj+k];
2527  sum -= model->rho[p];
2528  dec_values[p] = sum;
2529 
2530  if(dec_values[p] > 0)
2531  ++vote[i];
2532  else
2533  ++vote[j];
2534  p++;
2535  }
2536 
2537  int vote_max_idx = 0;
2538  for(i=1;i<nr_class;i++)
2539  if(vote[i] > vote[vote_max_idx])
2540  vote_max_idx = i;
2541 
2542  free(kvalue);
2543  free(start);
2544  free(vote);
2545  return model->label[vote_max_idx];
2546  }
2547 }
2548 
2549 double svm_predict(const svm_model *model, const svm_node *x)
2550 {
2551  int nr_class = model->nr_class;
2552  double *dec_values;
2553  if(model->param.svm_type == ONE_CLASS ||
2554  model->param.svm_type == EPSILON_SVR ||
2555  model->param.svm_type == NU_SVR)
2556  dec_values = Malloc(double, 1);
2557  else
2558  dec_values = Malloc(double, nr_class*(nr_class-1)/2);
2559  double pred_result = svm_predict_values(model, x, dec_values);
2560  free(dec_values);
2561  return pred_result;
2562 }
2563 
2564 double svm_predict_probability(
2565  const svm_model *model, const svm_node *x, double *prob_estimates)
2566 {
2567  if ((model->param.svm_type == C_SVC || model->param.svm_type == NU_SVC) &&
2568  model->probA!=NULL && model->probB!=NULL)
2569  {
2570  int i;
2571  int nr_class = model->nr_class;
2572  double *dec_values = Malloc(double, nr_class*(nr_class-1)/2);
2573  svm_predict_values(model, x, dec_values);
2574 
2575  double min_prob=1e-7;
2576  double **pairwise_prob=Malloc(double *,nr_class);
2577  for(i=0;i<nr_class;i++)
2578  pairwise_prob[i]=Malloc(double,nr_class);
2579  int k=0;
2580  for(i=0;i<nr_class;i++)
2581  for(int j=i+1;j<nr_class;j++)
2582  {
2583  pairwise_prob[i][j]=min(max(sigmoid_predict(dec_values[k],model->probA[k],model->probB[k]),min_prob),1-min_prob);
2584  pairwise_prob[j][i]=1-pairwise_prob[i][j];
2585  k++;
2586  }
2587  multiclass_probability(nr_class,pairwise_prob,prob_estimates);
2588 
2589  int prob_max_idx = 0;
2590  for(i=1;i<nr_class;i++)
2591  if(prob_estimates[i] > prob_estimates[prob_max_idx])
2592  prob_max_idx = i;
2593  for(i=0;i<nr_class;i++)
2594  free(pairwise_prob[i]);
2595  free(dec_values);
2596  free(pairwise_prob);
2597  return model->label[prob_max_idx];
2598  }
2599  else
2600  return svm_predict(model, x);
2601 }
2602 
2603 static const char *svm_type_table[] =
2604 {
2605  "c_svc","nu_svc","one_class","epsilon_svr","nu_svr",NULL
2606 };
2607 
2608 static const char *kernel_type_table[]=
2609 {
2610  "linear","polynomial","rbf","sigmoid","precomputed",NULL
2611 };
2612 
2613 int svm_save_model(const char *model_file_name, const svm_model *model)
2614 {
2615  FILE *fp = fopen(model_file_name,"w");
2616  if(fp==NULL) return -1;
2617 
2618  char *old_locale = strdup(setlocale(LC_ALL, NULL));
2619  setlocale(LC_ALL, "C");
2620 
2621  const svm_parameter& param = model->param;
2622 
2623  fprintf(fp,"svm_type %s\n", svm_type_table[param.svm_type]);
2624  fprintf(fp,"kernel_type %s\n", kernel_type_table[param.kernel_type]);
2625 
2626  if(param.kernel_type == POLY)
2627  fprintf(fp,"degree %d\n", param.degree);
2628 
2629  if(param.kernel_type == POLY || param.kernel_type == RBF || param.kernel_type == SIGMOID)
2630  fprintf(fp,"gamma %g\n", param.gamma);
2631 
2632  if(param.kernel_type == POLY || param.kernel_type == SIGMOID)
2633  fprintf(fp,"coef0 %g\n", param.coef0);
2634 
2635  int nr_class = model->nr_class;
2636  int l = model->l;
2637  fprintf(fp, "nr_class %d\n", nr_class);
2638  fprintf(fp, "total_sv %d\n",l);
2639 
2640  {
2641  fprintf(fp, "rho");
2642  for(int i=0;i<nr_class*(nr_class-1)/2;i++)
2643  fprintf(fp," %g",model->rho[i]);
2644  fprintf(fp, "\n");
2645  }
2646 
2647  if(model->label)
2648  {
2649  fprintf(fp, "label");
2650  for(int i=0;i<nr_class;i++)
2651  fprintf(fp," %d",model->label[i]);
2652  fprintf(fp, "\n");
2653  }
2654 
2655  if(model->probA) // regression has probA only
2656  {
2657  fprintf(fp, "probA");
2658  for(int i=0;i<nr_class*(nr_class-1)/2;i++)
2659  fprintf(fp," %g",model->probA[i]);
2660  fprintf(fp, "\n");
2661  }
2662  if(model->probB)
2663  {
2664  fprintf(fp, "probB");
2665  for(int i=0;i<nr_class*(nr_class-1)/2;i++)
2666  fprintf(fp," %g",model->probB[i]);
2667  fprintf(fp, "\n");
2668  }
2669 
2670  if(model->nSV)
2671  {
2672  fprintf(fp, "nr_sv");
2673  for(int i=0;i<nr_class;i++)
2674  fprintf(fp," %d",model->nSV[i]);
2675  fprintf(fp, "\n");
2676  }
2677 
2678  fprintf(fp, "SV\n");
2679  const double * const *sv_coef = model->sv_coef;
2680  const svm_node * const *SV = model->SV;
2681 
2682  for(int i=0;i<l;i++)
2683  {
2684  for(int j=0;j<nr_class-1;j++)
2685  fprintf(fp, "%.16g ",sv_coef[j][i]);
2686 
2687  const svm_node *p = SV[i];
2688 
2689  if(param.kernel_type == PRECOMPUTED)
2690  fprintf(fp,"0:%d ",(int)(p->value));
2691  else
2692  while(p->index != -1)
2693  {
2694  fprintf(fp,"%d:%.8g ",p->index,p->value);
2695  p++;
2696  }
2697  fprintf(fp, "\n");
2698  }
2699 
2700  setlocale(LC_ALL, old_locale);
2701  free(old_locale);
2702 
2703  if (ferror(fp) != 0 || fclose(fp) != 0) return -1;
2704  else return 0;
2705 }
2706 
2707 static char *line = NULL;
2708 static int max_line_len;
2709 
2710 static char* readline(FILE *input)
2711 {
2712  int len;
2713 
2714  if(fgets(line,max_line_len,input) == NULL)
2715  return NULL;
2716 
2717  while(strrchr(line,'\n') == NULL)
2718  {
2719  max_line_len *= 2;
2720  line = (char *) realloc(line,max_line_len);
2721  len = (int) strlen(line);
2722  if(fgets(line+len,max_line_len-len,input) == NULL)
2723  break;
2724  }
2725  return line;
2726 }
2727 
2728 svm_model *svm_load_model(const char *model_file_name)
2729 {
2730  FILE *fp = fopen(model_file_name,"rb");
2731  if(fp==NULL) return NULL;
2732 
2733  char *old_locale = strdup(setlocale(LC_ALL, NULL));
2734  setlocale(LC_ALL, "C");
2735 
2736  // read parameters
2737 
2738  svm_model *model = Malloc(svm_model,1);
2739  svm_parameter& param = model->param;
2740  model->rho = NULL;
2741  model->probA = NULL;
2742  model->probB = NULL;
2743  model->label = NULL;
2744  model->nSV = NULL;
2745 
2746  char cmd[81];
2747  while(1)
2748  {
2749  fscanf(fp,"%80s",cmd);
2750 
2751  if(strcmp(cmd,"svm_type")==0)
2752  {
2753  fscanf(fp,"%80s",cmd);
2754  int i;
2755  for(i=0;svm_type_table[i];i++)
2756  {
2757  if(strcmp(svm_type_table[i],cmd)==0)
2758  {
2759  param.svm_type=i;
2760  break;
2761  }
2762  }
2763  if(svm_type_table[i] == NULL)
2764  {
2765  fprintf(stderr,"unknown svm type.\n");
2766 
2767  setlocale(LC_ALL, old_locale);
2768  free(old_locale);
2769  free(model->rho);
2770  free(model->label);
2771  free(model->nSV);
2772  free(model);
2773  return NULL;
2774  }
2775  }
2776  else if(strcmp(cmd,"kernel_type")==0)
2777  {
2778  fscanf(fp,"%80s",cmd);
2779  int i;
2780  for(i=0;kernel_type_table[i];i++)
2781  {
2782  if(strcmp(kernel_type_table[i],cmd)==0)
2783  {
2784  param.kernel_type=i;
2785  break;
2786  }
2787  }
2788  if(kernel_type_table[i] == NULL)
2789  {
2790  fprintf(stderr,"unknown kernel function.\n");
2791 
2792  setlocale(LC_ALL, old_locale);
2793  free(old_locale);
2794  free(model->rho);
2795  free(model->label);
2796  free(model->nSV);
2797  free(model);
2798  return NULL;
2799  }
2800  }
2801  else if(strcmp(cmd,"degree")==0)
2802  fscanf(fp,"%d",&param.degree);
2803  else if(strcmp(cmd,"gamma")==0)
2804  fscanf(fp,"%lf",&param.gamma);
2805  else if(strcmp(cmd,"coef0")==0)
2806  fscanf(fp,"%lf",&param.coef0);
2807  else if(strcmp(cmd,"nr_class")==0)
2808  fscanf(fp,"%d",&model->nr_class);
2809  else if(strcmp(cmd,"total_sv")==0)
2810  fscanf(fp,"%d",&model->l);
2811  else if(strcmp(cmd,"rho")==0)
2812  {
2813  int n = model->nr_class * (model->nr_class-1)/2;
2814  model->rho = Malloc(double,n);
2815  for(int i=0;i<n;i++)
2816  fscanf(fp,"%lf",&model->rho[i]);
2817  }
2818  else if(strcmp(cmd,"label")==0)
2819  {
2820  int n = model->nr_class;
2821  model->label = Malloc(int,n);
2822  for(int i=0;i<n;i++)
2823  fscanf(fp,"%d",&model->label[i]);
2824  }
2825  else if(strcmp(cmd,"probA")==0)
2826  {
2827  int n = model->nr_class * (model->nr_class-1)/2;
2828  model->probA = Malloc(double,n);
2829  for(int i=0;i<n;i++)
2830  fscanf(fp,"%lf",&model->probA[i]);
2831  }
2832  else if(strcmp(cmd,"probB")==0)
2833  {
2834  int n = model->nr_class * (model->nr_class-1)/2;
2835  model->probB = Malloc(double,n);
2836  for(int i=0;i<n;i++)
2837  fscanf(fp,"%lf",&model->probB[i]);
2838  }
2839  else if(strcmp(cmd,"nr_sv")==0)
2840  {
2841  int n = model->nr_class;
2842  model->nSV = Malloc(int,n);
2843  for(int i=0;i<n;i++)
2844  fscanf(fp,"%d",&model->nSV[i]);
2845  }
2846  else if(strcmp(cmd,"SV")==0)
2847  {
2848  while(1)
2849  {
2850  int c = getc(fp);
2851  if(c==EOF || c=='\n') break;
2852  }
2853  break;
2854  }
2855  else
2856  {
2857  fprintf(stderr,"unknown text in model file: [%s]\n",cmd);
2858 
2859  setlocale(LC_ALL, old_locale);
2860  free(old_locale);
2861  free(model->rho);
2862  free(model->label);
2863  free(model->nSV);
2864  free(model);
2865  return NULL;
2866  }
2867  }
2868 
2869  // read sv_coef and SV
2870 
2871  int elements = 0;
2872  long pos = ftell(fp);
2873 
2874  max_line_len = 1024;
2875  line = Malloc(char,max_line_len);
2876  char *p,*endptr,*idx,*val;
2877 
2878  while(readline(fp)!=NULL)
2879  {
2880  p = strtok(line,":");
2881  while(1)
2882  {
2883  p = strtok(NULL,":");
2884  if(p == NULL)
2885  break;
2886  ++elements;
2887  }
2888  }
2889  elements += model->l;
2890 
2891  fseek(fp,pos,SEEK_SET);
2892 
2893  int m = model->nr_class - 1;
2894  int l = model->l;
2895  model->sv_coef = Malloc(double *,m);
2896  int i;
2897  for(i=0;i<m;i++)
2898  model->sv_coef[i] = Malloc(double,l);
2899  model->SV = Malloc(svm_node*,l);
2900  svm_node *x_space = NULL;
2901  if(l>0) x_space = Malloc(svm_node,elements);
2902 
2903  int j=0;
2904  for(i=0;i<l;i++)
2905  {
2906  readline(fp);
2907  model->SV[i] = &x_space[j];
2908 
2909  p = strtok(line, " \t");
2910  model->sv_coef[0][i] = strtod(p,&endptr);
2911  for(int k=1;k<m;k++)
2912  {
2913  p = strtok(NULL, " \t");
2914  model->sv_coef[k][i] = strtod(p,&endptr);
2915  }
2916 
2917  while(1)
2918  {
2919  idx = strtok(NULL, ":");
2920  val = strtok(NULL, " \t");
2921 
2922  if(val == NULL)
2923  break;
2924  x_space[j].index = (int) strtol(idx,&endptr,10);
2925  x_space[j].value = strtod(val,&endptr);
2926 
2927  ++j;
2928  }
2929  x_space[j++].index = -1;
2930  }
2931  free(line);
2932 
2933  setlocale(LC_ALL, old_locale);
2934  free(old_locale);
2935 
2936  if (ferror(fp) != 0 || fclose(fp) != 0)
2937  return NULL;
2938 
2939  model->free_sv = 1; // XXX
2940  return model;
2941 }
2942 
2943 void svm_free_model_content(svm_model* model_ptr)
2944 {
2945  if(model_ptr->free_sv && model_ptr->l > 0 && model_ptr->SV != NULL)
2946  free((void *)(model_ptr->SV[0]));
2947  if(model_ptr->sv_coef)
2948  {
2949  for(int i=0;i<model_ptr->nr_class-1;i++)
2950  free(model_ptr->sv_coef[i]);
2951  }
2952 
2953  free(model_ptr->SV);
2954  model_ptr->SV = NULL;
2955 
2956  free(model_ptr->sv_coef);
2957  model_ptr->sv_coef = NULL;
2958 
2959  free(model_ptr->rho);
2960  model_ptr->rho = NULL;
2961 
2962  free(model_ptr->label);
2963  model_ptr->label= NULL;
2964 
2965  free(model_ptr->probA);
2966  model_ptr->probA = NULL;
2967 
2968  free(model_ptr->probB);
2969  model_ptr->probB= NULL;
2970 
2971  free(model_ptr->nSV);
2972  model_ptr->nSV = NULL;
2973 }
2974 
2975 void svm_free_and_destroy_model(svm_model** model_ptr_ptr)
2976 {
2977  if(model_ptr_ptr != NULL && *model_ptr_ptr != NULL)
2978  {
2979  svm_free_model_content(*model_ptr_ptr);
2980  free(*model_ptr_ptr);
2981  *model_ptr_ptr = NULL;
2982  }
2983 }
2984 
2985 void svm_destroy_param(svm_parameter* param)
2986 {
2987  free(param->weight_label);
2988  free(param->weight);
2989 }
2990 
2991 const char *svm_check_parameter(const svm_problem *prob, const svm_parameter *param)
2992 {
2993  // svm_type
2994 
2995  int svm_type = param->svm_type;
2996  if(svm_type != C_SVC &&
2997  svm_type != NU_SVC &&
2998  svm_type != ONE_CLASS &&
2999  svm_type != EPSILON_SVR &&
3000  svm_type != NU_SVR)
3001  return "unknown svm type";
3002 
3003  // kernel_type, degree
3004 
3005  int kernel_type = param->kernel_type;
3006  if(kernel_type != LINEAR &&
3007  kernel_type != POLY &&
3008  kernel_type != RBF &&
3009  kernel_type != SIGMOID &&
3010  kernel_type != PRECOMPUTED)
3011  return "unknown kernel type";
3012 
3013  if(param->gamma < 0)
3014  return "gamma < 0";
3015 
3016  if(param->degree < 0)
3017  return "degree of polynomial kernel < 0";
3018 
3019  // cache_size,eps,C,nu,p,shrinking
3020 
3021  if(param->cache_size <= 0)
3022  return "cache_size <= 0";
3023 
3024  if(param->eps <= 0)
3025  return "eps <= 0";
3026 
3027  if(svm_type == C_SVC ||
3028  svm_type == EPSILON_SVR ||
3029  svm_type == NU_SVR)
3030  if(param->C <= 0)
3031  return "C <= 0";
3032 
3033  if(svm_type == NU_SVC ||
3034  svm_type == ONE_CLASS ||
3035  svm_type == NU_SVR)
3036  if(param->nu <= 0 || param->nu > 1)
3037  return "nu <= 0 or nu > 1";
3038 
3039  if(svm_type == EPSILON_SVR)
3040  if(param->p < 0)
3041  return "p < 0";
3042 
3043  if(param->shrinking != 0 &&
3044  param->shrinking != 1)
3045  return "shrinking != 0 and shrinking != 1";
3046 
3047  if(param->probability != 0 &&
3048  param->probability != 1)
3049  return "probability != 0 and probability != 1";
3050 
3051  if(param->probability == 1 &&
3052  svm_type == ONE_CLASS)
3053  return "one-class SVM probability output not supported yet";
3054 
3055 
3056  // check whether nu-svc is feasible
3057 
3058  if(svm_type == NU_SVC)
3059  {
3060  int l = prob->l;
3061  int max_nr_class = 16;
3062  int nr_class = 0;
3063  int *label = Malloc(int,max_nr_class);
3064  int *count = Malloc(int,max_nr_class);
3065 
3066  int i;
3067  for(i=0;i<l;i++)
3068  {
3069  int this_label = (int)prob->y[i];
3070  int j;
3071  for(j=0;j<nr_class;j++)
3072  if(this_label == label[j])
3073  {
3074  ++count[j];
3075  break;
3076  }
3077  if(j == nr_class)
3078  {
3079  if(nr_class == max_nr_class)
3080  {
3081  max_nr_class *= 2;
3082  label = (int *)realloc(label,max_nr_class*sizeof(int));
3083  count = (int *)realloc(count,max_nr_class*sizeof(int));
3084  }
3085  label[nr_class] = this_label;
3086  count[nr_class] = 1;
3087  ++nr_class;
3088  }
3089  }
3090 
3091  for(i=0;i<nr_class;i++)
3092  {
3093  int n1 = count[i];
3094  for(int j=i+1;j<nr_class;j++)
3095  {
3096  int n2 = count[j];
3097  if(param->nu*(n1+n2)/2 > min(n1,n2))
3098  {
3099  free(label);
3100  free(count);
3101  return "specified nu is infeasible";
3102  }
3103  }
3104  }
3105  free(label);
3106  free(count);
3107  }
3108 
3109  return NULL;
3110 }
3111 
3112 int svm_check_probability_model(const svm_model *model)
3113 {
3114  return ((model->param.svm_type == C_SVC || model->param.svm_type == NU_SVC) &&
3115  model->probA!=NULL && model->probB!=NULL) ||
3116  ((model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) &&
3117  model->probA!=NULL);
3118 }
3119 
3120 void svm_set_print_string_function(void (*print_func)(const char *))
3121 {
3122  if(print_func == NULL)
3123  svm_print_string = &print_string_stdout;
3124  else
3125  svm_print_string = print_func;
3126 }
Definition: svm.cpp:196
Definition: svm.h:53
Definition: svm.cpp:69
Definition: svm.cpp:1369
Definition: svm.cpp:1273
Definition: svm.cpp:395
Definition: svm.cpp:204
Definition: svm.h:12
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask__inherit__graph.png0000644000113200011300000000746112616110567026543 00000000000000‰PNG  IHDRíp}×`EbKGDÿÿÿ ½§“æIDATxœí{Pg÷ÇŸ…p)·È°\ â l‡ŽÓ±V%‚¤¾B©Z.XP°ØR[«%N¹8Õ´¥ä¢SZ†Œ‚ZT|a«PäEŠÊÍ:)P#$\’Ýßû¾ûK“€¤&Æ<=Ÿ?œ}Ïsö{6_7‡Ín (ŠB`ä˜Zèð1€àcÀǰ -@;&&&ºººH’4´Ìqqqqtt4´ -02K¥Òû÷ï×!6:¤RéÐÐqd#ó1¯¯¯¡%àÌo¿ýfh Zý1€àcÀÇ€ø§ø¸»»› ˆ§™êË/¿$âÀºÒ0Ór‚ º»»ÿvZ<ø§øX#½½½G™)Š*++sww‰DºÊ9o޼ݻw#}Ê6^þÑ>&IòþýûúÈ|ãÆ›7oµ¶¶vvvê$'‡Ã¡Ïîú“m¼`ècúý÷ôéÓ‹-rrrJII™œœd~JQÔ®]»üüüþüóÏ×^{ !ôüóÏÓ?‰‹‹ãp8nnn»v횘˜˜)ÈPYYùòË/[ZZzyy•””0ñ²²²U«V.^¼Xý”LQ”P(ôññ±³³[½zõ™3gè†A}_t-µµµîîîÇŽ£§©ÈFUWWs¹\{{û¬¬,:BDqqñ’%K8PRRâééÉf³÷íÛ§³ýLAƒƒƒõõõ³ÏéêêBuvv655q¹\@@I’dLÌÌdFGGôôô´µµ-]ºT h 2«ÆÆÆ,,,„B¡X,.**b±XcccE‘$éé陟ŸOQÔçŸîëë«,Œ¢¨‚‚WW×óçÏ×ÔÔp¹\:>Ó¾BBBêêêZ[[éi*²Bo¿ý¶T*-//GÑ¥!„"##¥Riaa!BhãÆR©4??Ÿ™0 ííííííÚ½0†[·µµÑC‘HÄåré ŸÏGݾ}[y&½=55ejjʼ~\.WcY%‘HÌÌÌ:ôàÁ’$GGG EQMMM,‹¶Kss3BèÆÊ»[ºtéO?ýÄ.--EͲ/ºf¹º/\¸@Q”B¡@uuuÑÁ––º.•mzÂ,£1ì+h,X@o,^¼¸¯¯Þ¾zõª¿¿ff¦úüÁÁA…BáííM¹\n__ŸÆ ³ÄÞÞ¾¾¾¾©©ÉÍÍmÕªU/^411A•••Éår‡CIJeËB*­EOOÏÒ¥K™¡ÏL˜f/ÖÅÅ!DïÁÖÖ!dff¦²%Øú˜>i!„:;;é—!TYY) ËÊÊêëëUæÏŸ?ßÔÔ´··—öôô¸ººj 2Kd2I’Ç—H$ñññëÖ­“H$ …B$eggþÔÔT‘HD)=?æáá¡|ÃÍ›7g@o?Öºº¤h¼`ëã;wvww_½zuÏž=111tÐÚÚzÑ¢EŸ~úiRRóÛØØBÈÌÌlÓ¦M)))wîÜiooß»wott´Æ ³ ‚ ‚‚‚ÊËË¥RéÔÔ”™™™••ÕÅ‹‡††¢££mþGTTTWWÝÝÒìØ±ƒÏçWWWß¿¿®®N 1û¾Ô¡eÿÅÐv̽?.,,ôððàp8ÉÉÉ2™L¹§”Éd .LKK›žž~óÍ7mllè¸D"Ù¼y³ƒƒƒ³³óG}$“É4•S‰D"ooossóÅ‹Ÿ>}š¢¨ÄÄÄ   e=$Iz{{ïÞ½›Y¨P(rrr¼½½ÙlvppðéÓ§»/f[E6Rjy‘R¬TÙž cì±õñS‘ó7©¬¬lmme†'Nœðóó3 ŒÑÇØöÏ2mmm111---ãããMMMûöíKHH0´(ãÆ(;;»ÄÄDC«˜ >Ÿ?>>6<<ìååõþûï?ゟ}ʨ¾‡ehh¨££ÃßßßÐBp†¾–b\Ý@_àøÀð1€àcŒòzÅÀÀ€¡%àÌÄÄ„¥¥¥¡Uh‡‘ùØÂ‚ ]Ý™þ IêðáæððE®®¶†Ö¢óæÍ3´í02³ÙìU«VZ…45õ\¾üó¢E^ÑÑþ†Ö‚3Ðë—“'›éårøN:=>Ö#SSòŠŠë¡‡ÇnZ΀õÈ… ·ÆÇ'B¦¦&͆–ƒ3àc=R^Þljj‚’Ëɪª6™lÊЊ°|¬/=šü÷¿Ûår=œœ”×ÔtVÆ€õ…²‰B&&Dyù5êÁð±¾(/¿¦üØœ\NÖ×ß’Je”„1àc½ ‘Ö 'N\U@$©¦¦žÁÁ‡‘„7àcÝ300ÒÜ|—$5Ñ=FvŸQ0>>åìlÇ ÇÆ&--ÍX¬ÿž2þñ_ý£Œì9ScÄÅå#¡0ö_ÿò3´œ¾Àð1€àcÀÇ€8>p| àøÀð1€àcÀÇ€8>p| àøÀð1€àcÀÇ€8>p| àøÀð1€àcÀÇ€8>p| àøÀJ CËÁ w+C«À ssó_~ù…±î_þ>ÈÝ»w7lØàããc(q0GöïßßßßÏ Uÿο¿ÿSUÚ³ÿ~å!ôÇ€8>p@_>îïïçñx†Zþl*Ñ!ONµ¨ /ÛØØDFFê6§X,^¿~½nsêcÔ<Ïr-úò1›ÍÞ¶m›ns’$)•Ju›Sߣæ™x–kÑÎÇE@½óÎ;ôÆÆÆ8°~ýú 6äååMMMÍdЕ%#„är¹P(  …r¹\E3Ç«ªªŠ +--­®®ŽŒŒ -..¦'466nݺ5888""¢´´ô±²•UáZË\PýdvΞ=ûÃ?¤¦¦úøøtwwgee!„Î;WRRÂçó.\ØÝÝ““£¼dbbB $''¿ñÆ¿þúëW_}µråJKKK•̧NÊÊÊÍÈȰ³³ ¤ ËÏÏoiiÉÎζ³³;|øpLLLEE½ä›o¾‘H$B¡P&“¥§§[YYÅÆÆªéTºUröìY%Ÿ8qB,çççÓÿŽ=ª¢!ÔÜÜœ——wáÂ…ƒúûûÕÕÕ}ýõ×ï¾û.‹Åúâ‹/Ö¬Y“••ÕÚÚš‘‘±víZKKKuÙt*Uê¯NµÌŽvçãòòò¤¤¤+V888,_¾ŸÏ¼H´æÇ2==-—ËY,ÖÔÔÔÑ£GBããã3ÉÖx|pªE+´;oÚ´I¡P|ÿý÷###tÛ”žž¦P(rrr>|èëë›””tðàAf‰¹¹ùgŸ}–ŸŸ?44äââ’––fnnŽ:t蟟Ÿµµ5=-00ðã?ž˜˜ˆŽŽV¢jkkKKK7oÞüÒK/EDDœ;w!´sçÎÜÜܤ¤$33³Õ«WGGGk 2©t¨$66VcÉñññ¹¹¹[·n%båÊ•‰‰‰,KYóìØØØlß¾===ý¹çž‹ŠŠ àóù'OžÔ([]U\\Nµp| à€êõŠ’’’3gÎD ümþâãÔÔÔ{÷îJ Ì ,_¾œþåº)Ð8>p| àøÀÿ§@›`R’NIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img__coll__graph.md50000644000113200011300000000004012616110566023446 000000000000003d928e691b28993511fa3bf891620dccpktools-2.6.6/doc/html/dir_ab1bbd5a6b4bd6507847335527b029bb_dep.md50000644000113200011300000000004012616110567020272 00000000000000a3a1f0efad1743e2ec5d8734dc6f1eb9pktools-2.6.6/doc/html/pkgetmask_8cc_source.html0000644000113200011300000011552212647637662016656 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkgetmask.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkgetmask.cc
1 /**********************************************************************
2 pkgetmask.cc: program to create mask image based on values in input raster image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <vector>
22 #include "imageclasses/ImgReaderGdal.h"
23 #include "imageclasses/ImgWriterGdal.h"
24 #include "base/Optionpk.h"
25 
26 /******************************************************************************/
71 using namespace std;
72 int main(int argc,char **argv) {
73  Optionpk<string> input_opt("i", "input", "Input image file");
74  Optionpk<short> band_opt("b", "band", "band(s) used for mask", 0);
75  Optionpk<double> min_opt("min", "min", "Values smaller than min threshold(s) are masked as invalid. Use one threshold for each band");
76  Optionpk<double> max_opt("max", "max", "Values greater than max threshold(s) are masked as invalid. Use one threshold for each band");
77  Optionpk<string> operator_opt("p", "operator", "Operator: [AND,OR].", "OR");
78  Optionpk<unsigned short> data_opt("data", "data", "value(s) for valid pixels: between min and max", 1);
79  Optionpk<unsigned short> nodata_opt("nodata", "nodata", "value(s) for invalid pixels: not between min and max", 0);
80  Optionpk<string> output_opt("o", "output", "Output mask file");
81  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", "Byte");
82  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
83  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
84  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
85  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0,2);
86 
87  band_opt.setHide(1);
88  operator_opt.setHide(1);
89  otype_opt.setHide(1);
90  oformat_opt.setHide(1);
91  option_opt.setHide(1);
92  colorTable_opt.setHide(1);
93 
94  bool doProcess;//stop process when program was invoked with help option (-h --help)
95  try{
96  doProcess=input_opt.retrieveOption(argc,argv);
97  output_opt.retrieveOption(argc,argv);
98  min_opt.retrieveOption(argc,argv);
99  max_opt.retrieveOption(argc,argv);
100  data_opt.retrieveOption(argc,argv);
101  nodata_opt.retrieveOption(argc,argv);
102  band_opt.retrieveOption(argc,argv);
103  operator_opt.retrieveOption(argc,argv);
104  otype_opt.retrieveOption(argc,argv);
105  oformat_opt.retrieveOption(argc,argv);
106  option_opt.retrieveOption(argc,argv);
107  colorTable_opt.retrieveOption(argc,argv);
108  verbose_opt.retrieveOption(argc,argv);
109  }
110  catch(string predefinedString){
111  std::cout << predefinedString << std::endl;
112  exit(0);
113  }
114  if(!doProcess){
115  cout << endl;
116  cout << "Usage: pkgetmask -i input -o output" << endl;
117  cout << endl;
118  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
119  exit(0);//help was invoked, stop processing
120  }
121 
122  const char* pszMessage;
123  void* pProgressArg=NULL;
124  GDALProgressFunc pfnProgress=GDALTermProgress;
125  double progress=0;
126  pfnProgress(progress,pszMessage,pProgressArg);
127  GDALDataType theType=GDT_Unknown;
128  if(verbose_opt[0])
129  cout << "possible output data types: ";
130  for(int iType = 0; iType < GDT_TypeCount; ++iType){
131  if(verbose_opt[0])
132  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
133  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
134  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
135  otype_opt[0].c_str()))
136  theType=(GDALDataType) iType;
137  }
138  if(verbose_opt[0]){
139  cout << endl;
140  if(theType==GDT_Unknown)
141  cout << "Unknown output pixel type: " << otype_opt[0] << endl;
142  else
143  cout << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
144  }
145 
146  assert(input_opt.size());
147  ImgReaderGdal imgReader(input_opt[0]);
148  assert(band_opt.size()>=0);
149  assert(band_opt.size()<=imgReader.nrOfBand());
150 
151  if(min_opt.size()&&max_opt.size()){
152  if(min_opt.size()!=max_opt.size())
153  cerr << "Error: number of min and max options must correspond if both min and max options are provide" << endl;
154  assert(min_opt.size()==max_opt.size());
155  }
156  if(min_opt.size()){
157  while(band_opt.size()>min_opt.size())
158  min_opt.push_back(min_opt[0]);
159  while(min_opt.size()>data_opt.size())
160  data_opt.push_back(data_opt[0]);
161  }
162  if(max_opt.size()){
163  while(band_opt.size()>max_opt.size())
164  max_opt.push_back(max_opt[0]);
165  while(max_opt.size()>data_opt.size())
166  data_opt.push_back(data_opt[0]);
167  }
168  // assert(min_opt.size()==max_opt.size());
169  // if(verbose_opt[0]){
170  // cout << "min,max values: ";
171  // for(int imin=0;imin<min_opt.size();++imin){
172  // cout << min_opt[imin] << "," << max_opt[imin];
173  // if(imin<min_opt.size()-1)
174  // cout << " ";
175  // else
176  // cout << endl;
177  // }
178  // }
179 
180  vector< vector<float> > lineBuffer(band_opt.size());
181  for(int iband=0;iband<band_opt.size();++iband)
182  lineBuffer.resize(imgReader.nrOfCol());
183  ImgWriterGdal imgWriter;
184  //if output type not set, get type from input image
185  if(theType==GDT_Unknown){
186  theType=imgReader.getDataType();
187  if(verbose_opt[0])
188  cout << "Using data type from input image: " << GDALGetDataTypeName(theType) << endl;
189  }
190  string imageType;//=imgReader.getImageType();
191  if(oformat_opt.size())//default
192  imageType=oformat_opt[0];
193  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
194  string theInterleave="INTERLEAVE=";
195  theInterleave+=imgReader.getInterleave();
196  option_opt.push_back(theInterleave);
197  }
198  assert(output_opt.size());
199  imgWriter.open(output_opt[0],imgReader.nrOfCol(),imgReader.nrOfRow(),1,theType,imageType,option_opt);
200  if(colorTable_opt.size()){
201  if(colorTable_opt[0]!="none")
202  imgWriter.setColorTable(colorTable_opt[0]);
203  }
204  else if (imgReader.getColorTable()!=NULL)//copy colorTable from input image
205  imgWriter.setColorTable(imgReader.getColorTable());
206 
207  imgWriter.setProjection(imgReader.getProjection());
208  double gt[6];
209  imgReader.getGeoTransform(gt);
210  imgWriter.setGeoTransform(gt);//ulx,uly,imgReader.getDeltaX(),imgReader.getDeltaY(),0,0);
211 
212  if(nodata_opt.size())
213  imgWriter.GDALSetNoDataValue(nodata_opt[0]);
214 
215  vector<char> writeBuffer(imgWriter.nrOfCol());
216  for(int irow=0;irow<imgReader.nrOfRow();++irow){
217  for(int iband=0;iband<band_opt.size();++iband)
218  imgReader.readData(lineBuffer[iband],GDT_Float32,irow,band_opt[iband]);
219  for(int icol=0;icol<imgReader.nrOfCol();++icol){
220  bool valid=(operator_opt[0]=="OR")?false:true;
221  unsigned short validValue=data_opt[0];
222  if(min_opt.size()&&max_opt.size()){
223  assert(max_opt.size()==min_opt.size());
224  for(int ivalid=0;ivalid<min_opt.size();++ivalid){
225  bool validBand=false;
226  // for(int iband=0;iband<band_opt.size();++iband){
227  unsigned short theBand=(band_opt.size()==min_opt.size())? ivalid:0;
228  if(lineBuffer[theBand][icol]>=min_opt[ivalid]&&lineBuffer[theBand][icol]<=max_opt[ivalid]){
229  validValue=data_opt[ivalid];
230  validBand=true;
231  }
232  valid=(operator_opt[0]=="OR")?valid||validBand : valid&&validBand;
233  }
234  }
235  else if(min_opt.size()){
236  for(int ivalid=0;ivalid<min_opt.size();++ivalid){
237  bool validBand=false;
238  // for(int iband=0;iband<band_opt.size();++iband){
239  unsigned short theBand=(band_opt.size()==min_opt.size())? ivalid:0;
240  if(lineBuffer[theBand][icol]>=min_opt[ivalid]){
241  validValue=data_opt[ivalid];
242  validBand=true;
243  }
244  valid=(operator_opt[0]=="OR")?valid||validBand : valid&&validBand;
245  }
246  }
247  else if(max_opt.size()){
248  for(int ivalid=0;ivalid<max_opt.size();++ivalid){
249  bool validBand=false;
250  // for(int iband=0;iband<band_opt.size();++iband){
251  unsigned short theBand=(band_opt.size()==max_opt.size())? ivalid:0;
252  if(lineBuffer[theBand][icol]<=max_opt[ivalid]){
253  validValue=data_opt[ivalid];
254  validBand=true;
255  }
256  valid=(operator_opt[0]=="OR")?valid||validBand : valid&&validBand;
257  }
258  }
259  if(valid)
260  writeBuffer[icol]=validValue;
261  else
262  writeBuffer[icol]=nodata_opt[0];
263  }
264  imgWriter.writeData(writeBuffer,GDT_Byte,irow);
265  progress=(1.0+irow)/imgWriter.nrOfRow();
266  pfnProgress(progress,pszMessage,pProgressArg);
267  }
268 
269  imgReader.close();
270  imgWriter.close();
271 }
pktools-2.6.6/doc/html/classCostFactoryANN__coll__graph.map0000644000113200011300000000075312616110567020660 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite__coll__graph.map0000644000113200011300000000012312616110567024651 00000000000000 pktools-2.6.6/doc/html/pkreclass.html0000644000113200011300000001236212647637662014540 00000000000000 pktools: pkreclass
pktools  2.6.6
Processing Kernel for geospatial data
pkreclass

program to replace pixel values in raster image

SYNOPSIS

Usage: pkreclass -i input [-c from -r to]* -o output

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image
    m mask std::string Mask image(s)
    msknodata msknodata unsigned short 1 Mask value(s) where image has nodata. Use one value for each mask, or multiple values for a single mask.
    nodata nodata int 0 nodata value to put in image if not valid (0)
    code code std::string Recode text file (2 colums: from to)
    c class std::string list of classes to reclass (in combination with reclass option)
    r reclass std::string list of recoded classes (in combination with class option)
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    o output std::string Output mask file
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate)
    b band unsigned short 0 band index(es) to replace (other bands are copied to output)
    n fname std::string label field name of the shape file to be replaced
    co co std::string Creation option for output file. Multiple options can be specified.
    d description std::string Set image description
    v verbose short 0 verbose
    Usage: pkreclass -i input [-c from -r to]* -o output

Examples

Some examples how to use pkreclass can be found here

pktools-2.6.6/doc/html/classFANN_1_1neural__net.html0000644000113200011300000015472012647637662017202 00000000000000 pktools: FANN::neural_net Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Public Member Functions

void destroy ()
 
bool create_standard (unsigned int num_layers,...)
 
bool create_standard_array (unsigned int num_layers, const unsigned int *layers)
 
bool create_sparse (float connection_rate, unsigned int num_layers,...)
 
bool create_sparse_array (float connection_rate, unsigned int num_layers, const unsigned int *layers)
 
bool create_shortcut (unsigned int num_layers,...)
 
bool create_shortcut_array (unsigned int num_layers, const unsigned int *layers)
 
fann_type * run (fann_type *input)
 
std::vector< fann_type > run (std::vector< fann_type > input)
 
void randomize_weights (fann_type min_weight, fann_type max_weight)
 
void init_weights (const training_data &data)
 
void print_connections ()
 
bool create_from_file (const std::string &configuration_file)
 
bool save (const std::string &configuration_file)
 
int save_to_fixed (const std::string &configuration_file)
 
void train (fann_type *input, fann_type *desired_output)
 
float train_epoch (const training_data &data)
 
void train_on_data (const training_data &data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
 
void train_on_data (const std::vector< std::vector< fann_type > > &input, const std::vector< std::vector< fann_type > > &output, bool initWeights, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
 
void train_on_data (const std::vector< Vector2d< fann_type > > &input, unsigned int num_data, bool initWeights, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
 
float cross_validation (std::vector< Vector2d< fann_type > > &trainingFeatures, unsigned int ntraining, unsigned short cv, unsigned int max_epochs, float desired_error, std::vector< unsigned short > &referenceVector, std::vector< unsigned short > &outputVector, short verbose=0)
 
float cross_validation (std::vector< std::vector< fann_type > > &input, std::vector< std::vector< fann_type > > &output, unsigned short cv, unsigned int max_epochs, float desired_error, std::vector< std::vector< fann_type > > &referenceVector, std::vector< std::vector< fann_type > > &outputVector, short verbose=0)
 
void train_on_file (const std::string &filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
 
fann_type * test (fann_type *input, fann_type *desired_output)
 
float test_data (const training_data &data)
 
float test_data (const std::vector< Vector2d< fann_type > > &input, unsigned int num_data)
 
float get_MSE ()
 
void reset_MSE ()
 
void set_callback (callback_type callback, void *user_data)
 
void print_parameters ()
 
training_algorithm_enum get_training_algorithm ()
 
void set_training_algorithm (training_algorithm_enum training_algorithm)
 
float get_learning_rate ()
 
void set_learning_rate (float learning_rate)
 
activation_function_enum get_activation_function (int layer, int neuron)
 
void set_activation_function (activation_function_enum activation_function, int layer, int neuron)
 
void set_activation_function_layer (activation_function_enum activation_function, int layer)
 
void set_activation_function_hidden (activation_function_enum activation_function)
 
void set_activation_function_output (activation_function_enum activation_function)
 
fann_type get_activation_steepness (int layer, int neuron)
 
void set_activation_steepness (fann_type steepness, int layer, int neuron)
 
void set_activation_steepness_layer (fann_type steepness, int layer)
 
void set_activation_steepness_hidden (fann_type steepness)
 
void set_activation_steepness_output (fann_type steepness)
 
error_function_enum get_train_error_function ()
 
void set_train_error_function (error_function_enum train_error_function)
 
float get_quickprop_decay ()
 
void set_quickprop_decay (float quickprop_decay)
 
float get_quickprop_mu ()
 
void set_quickprop_mu (float quickprop_mu)
 
float get_rprop_increase_factor ()
 
void set_rprop_increase_factor (float rprop_increase_factor)
 
float get_rprop_decrease_factor ()
 
void set_rprop_decrease_factor (float rprop_decrease_factor)
 
float get_rprop_delta_min ()
 
void set_rprop_delta_min (float rprop_delta_min)
 
float get_rprop_delta_max ()
 
void set_rprop_delta_max (float rprop_delta_max)
 
unsigned int get_num_input ()
 
unsigned int get_num_output ()
 
unsigned int get_total_neurons ()
 
unsigned int get_total_connections ()
 
network_type_enum get_network_type ()
 
float get_connection_rate ()
 
unsigned int get_num_layers ()
 
void get_layer_array (unsigned int *layers)
 
void get_layer_array (std::vector< unsigned int > vlayers)
 
void get_bias_array (unsigned int *bias)
 
void get_connection_array (connection *connections)
 
void get_connection_array (std::vector< connection > &convector)
 
void set_weight_array (connection *connections, unsigned int num_connections)
 
void set_weight_array (std::vector< connection > convector)
 
void set_weight (unsigned int from_neuron, unsigned int to_neuron, fann_type weight)
 
float get_learning_momentum ()
 
void set_learning_momentum (float learning_momentum)
 
stop_function_enum get_train_stop_function ()
 
void set_train_stop_function (stop_function_enum train_stop_function)
 
fann_type get_bit_fail_limit ()
 
void set_bit_fail_limit (fann_type bit_fail_limit)
 
unsigned int get_bit_fail ()
 
void cascadetrain_on_data (const training_data &data, unsigned int max_neurons, unsigned int neurons_between_reports, float desired_error)
 
void cascadetrain_on_file (const std::string &filename, unsigned int max_neurons, unsigned int neurons_between_reports, float desired_error)
 
float get_cascade_output_change_fraction ()
 
void set_cascade_output_change_fraction (float cascade_output_change_fraction)
 
unsigned int get_cascade_output_stagnation_epochs ()
 
void set_cascade_output_stagnation_epochs (unsigned int cascade_output_stagnation_epochs)
 
float get_cascade_candidate_change_fraction ()
 
void set_cascade_candidate_change_fraction (float cascade_candidate_change_fraction)
 
unsigned int get_cascade_candidate_stagnation_epochs ()
 
void set_cascade_candidate_stagnation_epochs (unsigned int cascade_candidate_stagnation_epochs)
 
fann_type get_cascade_weight_multiplier ()
 
void set_cascade_weight_multiplier (fann_type cascade_weight_multiplier)
 
fann_type get_cascade_candidate_limit ()
 
void set_cascade_candidate_limit (fann_type cascade_candidate_limit)
 
unsigned int get_cascade_max_out_epochs ()
 
void set_cascade_max_out_epochs (unsigned int cascade_max_out_epochs)
 
unsigned int get_cascade_max_cand_epochs ()
 
void set_cascade_max_cand_epochs (unsigned int cascade_max_cand_epochs)
 
unsigned int get_cascade_num_candidates ()
 
unsigned int get_cascade_activation_functions_count ()
 
activation_function_enum * get_cascade_activation_functions ()
 
void set_cascade_activation_functions (activation_function_enum *cascade_activation_functions, unsigned int cascade_activation_functions_count)
 
unsigned int get_cascade_activation_steepnesses_count ()
 
fann_type * get_cascade_activation_steepnesses ()
 
void set_cascade_activation_steepnesses (fann_type *cascade_activation_steepnesses, unsigned int cascade_activation_steepnesses_count)
 
unsigned int get_cascade_num_candidate_groups ()
 
void set_cascade_num_candidate_groups (unsigned int cascade_num_candidate_groups)
 
void scale_train (training_data &data)
 
void descale_train (training_data &data)
 
bool set_input_scaling_params (const training_data &data, float new_input_min, float new_input_max)
 
bool set_output_scaling_params (const training_data &data, float new_output_min, float new_output_max)
 
bool set_scaling_params (const training_data &data, float new_input_min, float new_input_max, float new_output_min, float new_output_max)
 
bool clear_scaling_params ()
 
void scale_input (fann_type *input_vector)
 
void scale_output (fann_type *output_vector)
 
void descale_input (fann_type *input_vector)
 
void descale_output (fann_type *output_vector)
 
void set_error_log (FILE *log_file)
 
unsigned int get_errno ()
 
void reset_errno ()
 
void reset_errstr ()
 
std::string get_errstr ()
 
void print_error ()
 

Protected Attributes

struct fann * ann
 

Detailed Description

Definition at line 978 of file myfann_cpp.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classSVR__Q.html0000644000113200011300000002154512647637662014673 00000000000000 pktools: SVR_Q Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for SVR_Q:
Collaboration diagram for SVR_Q:

Public Member Functions

 SVR_Q (const svm_problem &prob, const svm_parameter &param)
 
void swap_index (int i, int j) const
 
Qfloat * get_Q (int i, int len) const
 
double * get_QD () const
 
- Public Member Functions inherited from Kernel
 Kernel (int l, svm_node *const *x, const svm_parameter &param)
 

Additional Inherited Members

- Static Public Member Functions inherited from Kernel
static double k_function (const svm_node *x, const svm_node *y, const svm_parameter &param)
 
- Protected Attributes inherited from Kernel
double(Kernel::* kernel_function )(int i, int j) const
 

Detailed Description

Definition at line 1369 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm__inherit__graph.map0000644000113200011300000000007312616110567022774 00000000000000 pktools-2.6.6/doc/html/classSolver__NU__coll__graph.md50000644000113200011300000000004012616110566017772 000000000000006543c36bd4df2184596e187d1c765cdfpktools-2.6.6/doc/html/md_installation_linux.html0000644000113200011300000002632212647637662017152 00000000000000 pktools: installation_linux
pktools  2.6.6
Processing Kernel for geospatial data
installation_linux

Installation on Linux

Installation for Debian Linux (via repository)

A binary package of pktools for Debian is maintained by Francesco Paolo Lovergine and available in the repository. You can install it using the advanced package tool (apt):

sudo apt-get install pktools

The version in the repository might not be the latest available (please check the packages overview). The latest version of pktools can always be installed via the installation script or from the source code using a manual installation.

Installation for Ubuntu (Debian based) Linux distributions (from source code via automatic script)

Users working with Debian based distributions (e.g., Ubuntu) can download install_pktools.sh. This script will automatically download the latest release of pktools and dependencies. You need an internet connection when running the script (as root or sudo):

sudo bash install_pktools.sh

Manual installation for (all Linux distributions)

For a manual installation, download the latest release from Savannah

Optionally: check the release md5sum to ensure originality.

md5sum pktools-latest.tar.gz

The result should be identical to the content of the corresponding md5 file you downloaded.

Unpack the tar zip file

tar xzvf pktools-latest.tar.gz
cd pktools-*

You can install pktools via

Installation via autotools

Add libtool support to your package:

If you obtained pktools from the git repository, please please perform the following actions first (assuming the current directory is pktools):

libtoolize

Remake the GNU Build System files by scanning 'configure.ac' and running 'autoconf', 'autoheader', 'aclocal', 'automake' and 'libtoolize':

autoreconf

Finalize package generation:

automake --add-missing

Basic installation (please refer to INSTALL file for more advanced configuration)

./configure
make
sudo make install
sudo ldconfig

Required dependences

packages to install before pktools

Example on how to install required packages in Debian based system (using apt-get):

  • sudo apt-get install g++ make libgdal-dev libgsl0-dev libarmadillo-dev

Optional dependences

To enable program pkoptsvm

Install additional package

Example on how to install required packages in Debian based system (using apt-get):

sudo apt-get install libnlopt-dev

Note: currently, the repository seems not to include this package anymore and manual installation is required (see also http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation)

  • Install pktools with with extra configuration option –enable-nlopt:
./configure --enable-nlopt
make
sudo make install
sudo ldconfig

To enable programs pkann and pkfsann

Install package

Example on how to install required packages in Debian based system (using apt-get):

sudo apt-get install libfann-dev

Install pktools with extra configuration option –libfann-dev:

./configure --enable-fann
make
sudo make install
sudo ldconfig

To enable program pklas2img

Install additional packages:

Example on how to install required packages in Debian based system (using apt-get):

  • first add the following two lines to /etc/apt/sources.list (replace <codename> with what you get from lsb_release -c)
deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main
  • then install extra packages:
sudo apt-get install libboost-dev liblas-dev liblas-c-dev liblas1 liblas2 liblas-c2 python-liblas

Or install manually as explained in http://www.liblas.org/compilation.html#using-unix-makefiles-on-linux

! Note that if you want support for compressed las format (LAZ), you need to install laszip first (http://www.laszip.org) and install liblas manually

  • Install pktools with with extra configuration option –enable-las:
./configure --enable-las
make
sudo make install
sudo ldconfig

Installation via cmake (or ccmake)

Note that CMake version 3.0 or higher is required for building via cmake We will build out-of-source:

mkdir build
cd build
ccmake ..

Within ccmake, press "c" to configure. Make sure all paths are correctly set. Then press "g" to generate and exit ccmake.

Compile and link via make:

make
pktools-2.6.6/doc/html/md_examples_pkstatogr.html0000644000113200011300000000561112647637662017144 00000000000000 pktools: examples_pkstatogr
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkstatogr

Examples of pkstatogr

pkstatogr -i input.shp -f FIELDID -n 100

report histogram of values in FIELDID (to standard output)

pkstatogr -i input.shp -f FIELDID -min -max -mean -stdev

report min, max, mean and standard deviation of values in FIELDID (to standard output)

pktools-2.6.6/doc/html/pkdsm2shadow_8cc_source.html0000644000113200011300000006430412647637661017276 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkdsm2shadow.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdsm2shadow.cc
1 /**********************************************************************
2 pkdsm2shadow.cc: program to calculate sun shadow based on digital surface model and sun angles
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <iostream>
22 #include <string>
23 #include <fstream>
24 #include <math.h>
25 #include <sys/types.h>
26 #include <stdio.h>
27 #include "base/Optionpk.h"
28 #include "base/Vector2d.h"
29 #include "algorithms/Filter2d.h"
30 #include "imageclasses/ImgReaderGdal.h"
31 #include "imageclasses/ImgWriterGdal.h"
32 
33 /******************************************************************************/
79 using namespace std;
80 
81 /*------------------
82  Main procedure
83  ----------------*/
84 int main(int argc,char **argv) {
85  Optionpk<std::string> input_opt("i","input","input image file");
86  Optionpk<std::string> output_opt("o", "output", "Output image file");
87  Optionpk<double> sza_opt("sza", "sza", "Sun zenith angle.");
88  Optionpk<double> saa_opt("saa", "saa", "Sun azimuth angle (N=0 E=90 S=180 W=270).");
89  Optionpk<int> flag_opt("f", "flag", "Flag to put in image if pixel shadow", 0);
90  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", "");
91  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
92  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
93  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
94  Optionpk<double> scale_opt("s", "scale", "scale used for input dsm: height=scale*input+offset");
95  Optionpk<double> offset_opt("off", "offset", "offset used for input dsm: height=scale*input+offset");
96  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
97 
98  scale_opt.setHide(1);
99  offset_opt.setHide(1);
100 
101  bool doProcess;//stop process when program was invoked with help option (-h --help)
102  try{
103  doProcess=input_opt.retrieveOption(argc,argv);
104  output_opt.retrieveOption(argc,argv);
105  sza_opt.retrieveOption(argc,argv);
106  saa_opt.retrieveOption(argc,argv);
107  flag_opt.retrieveOption(argc,argv);
108  scale_opt.retrieveOption(argc,argv);
109  offset_opt.retrieveOption(argc,argv);
110  option_opt.retrieveOption(argc,argv);
111  otype_opt.retrieveOption(argc,argv);
112  oformat_opt.retrieveOption(argc,argv);
113  colorTable_opt.retrieveOption(argc,argv);
114  verbose_opt.retrieveOption(argc,argv);
115  }
116  catch(string predefinedString){
117  std::cout << predefinedString << std::endl;
118  exit(0);
119  }
120  if(!doProcess){
121  cout << endl;
122  cout << "Usage: pkdsm2shadow -i input.txt -o output [-sza angle] [-saa angle]" << endl;
123  cout << endl;
124  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
125  exit(0);//help was invoked, stop processing
126  }
127 
128  ImgReaderGdal input;
129  ImgWriterGdal output;
130  assert(input_opt.size());
131  assert(output_opt.size());
132  input.open(input_opt[0]);
133  if(scale_opt.size())
134  input.setScale(scale_opt[0]);
135  if(offset_opt.size())
136  input.setOffset(offset_opt[0]);
137 
138  // output.open(output_opt[0],input);
139  GDALDataType theType=GDT_Unknown;
140  if(verbose_opt[0])
141  cout << "possible output data types: ";
142  for(int iType = 0; iType < GDT_TypeCount; ++iType){
143  if(verbose_opt[0])
144  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
145  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
146  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
147  otype_opt[0].c_str()))
148  theType=(GDALDataType) iType;
149  }
150  if(theType==GDT_Unknown)
151  theType=input.getDataType();
152 
153  if(verbose_opt[0])
154  std::cout << std::endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
155 
156  string imageType;//=input.getImageType();
157  if(oformat_opt.size())
158  imageType=oformat_opt[0];
159 
160  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
161  string theInterleave="INTERLEAVE=";
162  theInterleave+=input.getInterleave();
163  option_opt.push_back(theInterleave);
164  }
165  try{
166  output.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),theType,imageType,option_opt);
167  }
168  catch(string errorstring){
169  cout << errorstring << endl;
170  exit(4);
171  }
172  output.setProjection(input.getProjection());
173  double gt[6];
174  input.getGeoTransform(gt);
175  output.setGeoTransform(gt);
176 
177  if(input.getColorTable()!=NULL)
178  output.setColorTable(input.getColorTable());
179 
180  filter2d::Filter2d filter2d;
181  if(verbose_opt[0])
182  std::cout<< "class values: ";
183  if(colorTable_opt.size())
184  output.setColorTable(colorTable_opt[0]);
185  filter2d.shadowDsm(input,output,sza_opt[0],saa_opt[0],input.getDeltaX(),flag_opt[0]);
186  input.close();
187  output.close();
188  return 0;
189 }
pktools-2.6.6/doc/html/inherit_graph_9.map0000644000113200011300000000030712616110570015405 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img-members.html0000644000113200011300000002354712647637662022725 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pklas2img.pklas2img Member List

This is the complete list of members for qgis.pklas2img.pklas2img, including all inherited members.

ATTRIBUTE (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
ATTRIBUTE_OPTIONS (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
cliName (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2img
COMPOSITE (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
COMPOSITE_OPTIONS (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
defineCharacteristics (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2img
DX (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
DY (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
EXTRA (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
FILTER (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
FILTER_OPTIONS (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
group (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2img
INPUT (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
name (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2img
NODATA (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
OUTPUT (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
PERCENTILE (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
processAlgorithm (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2img
RTYPE (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
TYPE (defined in qgis.pklas2img.pklas2img)qgis.pklas2img.pklas2imgstatic
pktools-2.6.6/doc/html/classKernel__coll__graph.map0000644000113200011300000000021312616110567017272 00000000000000 pktools-2.6.6/doc/html/build-pkextract__gui-gcc-Release_2ui__mainwindow_8h_source.html0000644000113200011300000024456012647637661026125 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkextract_gui-gcc-Release/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QHBoxLayout>
20 #include <QtGui/QHeaderView>
21 #include <QtGui/QLabel>
22 #include <QtGui/QLineEdit>
23 #include <QtGui/QMainWindow>
24 #include <QtGui/QMenu>
25 #include <QtGui/QMenuBar>
26 #include <QtGui/QPlainTextEdit>
27 #include <QtGui/QPushButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStatusBar>
30 #include <QtGui/QTabWidget>
31 #include <QtGui/QTableView>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput;
43  QAction *actionSample;
44  QAction *actionMask;
45  QAction *actionOutput;
46  QWidget *centralWidget;
47  QGridLayout *gridLayout_5;
48  QHBoxLayout *horizontalLayout_3;
49  QTabWidget *tabWidget;
50  QWidget *tab_2;
51  QHBoxLayout *horizontalLayout_4;
52  QGridLayout *gridLayout;
53  QLabel *label_14;
54  QLineEdit *bndnodata;
55  QLabel *label_13;
56  QLineEdit *output;
57  QLineEdit *input;
58  QToolButton *toolButton_input;
59  QComboBox *f;
60  QLabel *label_16;
61  QLabel *label_15;
62  QLabel *label_3;
63  QLineEdit *sample;
64  QLabel *label_23;
65  QLineEdit *srcnodata;
66  QToolButton *toolButton_output;
67  QToolButton *toolButton_sample;
68  QCheckBox *polygon;
69  QWidget *tab;
70  QHBoxLayout *horizontalLayout_5;
71  QGridLayout *gridLayout_4;
72  QLineEdit *bname;
73  QLabel *label_20;
74  QComboBox *rule;
75  QLabel *label_4;
76  QLineEdit *nclass;
77  QLabel *label_21;
78  QToolButton *toolButton_createTable;
79  QLabel *label_2;
80  QLabel *label;
81  QLineEdit *threshold;
82  QSpacerItem *verticalSpacer_2;
83  QLabel *label_5;
84  QLineEdit *cname;
85  QVBoxLayout *verticalLayout_2;
86  QLabel *label_17;
87  QTableView *tableView_labels;
88  QLabel *label_22;
89  QWidget *tab_4;
90  QHBoxLayout *horizontalLayout_6;
91  QVBoxLayout *verticalLayout;
92  QLabel *label_18;
93  QLineEdit *commandLineEdit;
94  QLabel *label_19;
95  QPlainTextEdit *consoleEdit;
96  QHBoxLayout *horizontalLayout;
97  QPushButton *pushButton_run;
98  QSpacerItem *horizontalSpacer;
99  QPushButton *pushButton_restore;
100  QMenuBar *menuBar;
101  QMenu *menuFile;
102  QToolBar *mainToolBar;
103  QStatusBar *statusBar;
104 
105  void setupUi(QMainWindow *MainWindow)
106  {
107  if (MainWindow->objectName().isEmpty())
108  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
109  MainWindow->resize(703, 706);
110  actionInput = new QAction(MainWindow);
111  actionInput->setObjectName(QString::fromUtf8("actionInput"));
112  actionSample = new QAction(MainWindow);
113  actionSample->setObjectName(QString::fromUtf8("actionSample"));
114  actionMask = new QAction(MainWindow);
115  actionMask->setObjectName(QString::fromUtf8("actionMask"));
116  actionOutput = new QAction(MainWindow);
117  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
118  centralWidget = new QWidget(MainWindow);
119  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
120  centralWidget->setMinimumSize(QSize(423, 392));
121  gridLayout_5 = new QGridLayout(centralWidget);
122  gridLayout_5->setSpacing(6);
123  gridLayout_5->setContentsMargins(11, 11, 11, 11);
124  gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
125  horizontalLayout_3 = new QHBoxLayout();
126  horizontalLayout_3->setSpacing(6);
127  horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
128  tabWidget = new QTabWidget(centralWidget);
129  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
130  tab_2 = new QWidget();
131  tab_2->setObjectName(QString::fromUtf8("tab_2"));
132  horizontalLayout_4 = new QHBoxLayout(tab_2);
133  horizontalLayout_4->setSpacing(6);
134  horizontalLayout_4->setContentsMargins(11, 11, 11, 11);
135  horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
136  gridLayout = new QGridLayout();
137  gridLayout->setSpacing(6);
138  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
139  label_14 = new QLabel(tab_2);
140  label_14->setObjectName(QString::fromUtf8("label_14"));
141 
142  gridLayout->addWidget(label_14, 1, 3, 1, 1);
143 
144  bndnodata = new QLineEdit(tab_2);
145  bndnodata->setObjectName(QString::fromUtf8("bndnodata"));
146 
147  gridLayout->addWidget(bndnodata, 1, 1, 1, 1);
148 
149  label_13 = new QLabel(tab_2);
150  label_13->setObjectName(QString::fromUtf8("label_13"));
151 
152  gridLayout->addWidget(label_13, 1, 0, 1, 1);
153 
154  output = new QLineEdit(tab_2);
155  output->setObjectName(QString::fromUtf8("output"));
156 
157  gridLayout->addWidget(output, 3, 1, 1, 1);
158 
159  input = new QLineEdit(tab_2);
160  input->setObjectName(QString::fromUtf8("input"));
161 
162  gridLayout->addWidget(input, 0, 1, 1, 1);
163 
164  toolButton_input = new QToolButton(tab_2);
165  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
166 
167  gridLayout->addWidget(toolButton_input, 0, 2, 1, 1);
168 
169  f = new QComboBox(tab_2);
170  f->setObjectName(QString::fromUtf8("f"));
171 
172  gridLayout->addWidget(f, 3, 4, 1, 1);
173 
174  label_16 = new QLabel(tab_2);
175  label_16->setObjectName(QString::fromUtf8("label_16"));
176 
177  gridLayout->addWidget(label_16, 3, 3, 1, 1);
178 
179  label_15 = new QLabel(tab_2);
180  label_15->setObjectName(QString::fromUtf8("label_15"));
181 
182  gridLayout->addWidget(label_15, 3, 0, 1, 1);
183 
184  label_3 = new QLabel(tab_2);
185  label_3->setObjectName(QString::fromUtf8("label_3"));
186 
187  gridLayout->addWidget(label_3, 0, 0, 1, 1);
188 
189  sample = new QLineEdit(tab_2);
190  sample->setObjectName(QString::fromUtf8("sample"));
191 
192  gridLayout->addWidget(sample, 2, 1, 1, 1);
193 
194  label_23 = new QLabel(tab_2);
195  label_23->setObjectName(QString::fromUtf8("label_23"));
196 
197  gridLayout->addWidget(label_23, 2, 0, 1, 1);
198 
199  srcnodata = new QLineEdit(tab_2);
200  srcnodata->setObjectName(QString::fromUtf8("srcnodata"));
201 
202  gridLayout->addWidget(srcnodata, 1, 4, 1, 1);
203 
204  toolButton_output = new QToolButton(tab_2);
205  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
206 
207  gridLayout->addWidget(toolButton_output, 3, 2, 1, 1);
208 
209  toolButton_sample = new QToolButton(tab_2);
210  toolButton_sample->setObjectName(QString::fromUtf8("toolButton_sample"));
211 
212  gridLayout->addWidget(toolButton_sample, 2, 2, 1, 1);
213 
214  polygon = new QCheckBox(tab_2);
215  polygon->setObjectName(QString::fromUtf8("polygon"));
216 
217  gridLayout->addWidget(polygon, 4, 3, 1, 1);
218 
219 
220  horizontalLayout_4->addLayout(gridLayout);
221 
222  tabWidget->addTab(tab_2, QString());
223  tab = new QWidget();
224  tab->setObjectName(QString::fromUtf8("tab"));
225  horizontalLayout_5 = new QHBoxLayout(tab);
226  horizontalLayout_5->setSpacing(6);
227  horizontalLayout_5->setContentsMargins(11, 11, 11, 11);
228  horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
229  gridLayout_4 = new QGridLayout();
230  gridLayout_4->setSpacing(6);
231  gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
232  bname = new QLineEdit(tab);
233  bname->setObjectName(QString::fromUtf8("bname"));
234 
235  gridLayout_4->addWidget(bname, 1, 1, 1, 1);
236 
237  label_20 = new QLabel(tab);
238  label_20->setObjectName(QString::fromUtf8("label_20"));
239 
240  gridLayout_4->addWidget(label_20, 4, 0, 1, 1);
241 
242  rule = new QComboBox(tab);
243  rule->setObjectName(QString::fromUtf8("rule"));
244 
245  gridLayout_4->addWidget(rule, 0, 1, 1, 1);
246 
247  label_4 = new QLabel(tab);
248  label_4->setObjectName(QString::fromUtf8("label_4"));
249 
250  gridLayout_4->addWidget(label_4, 0, 0, 1, 1);
251 
252  nclass = new QLineEdit(tab);
253  nclass->setObjectName(QString::fromUtf8("nclass"));
254  QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
255  sizePolicy.setHorizontalStretch(10);
256  sizePolicy.setVerticalStretch(0);
257  sizePolicy.setHeightForWidth(nclass->sizePolicy().hasHeightForWidth());
258  nclass->setSizePolicy(sizePolicy);
259 
260  gridLayout_4->addWidget(nclass, 4, 1, 1, 1);
261 
262  label_21 = new QLabel(tab);
263  label_21->setObjectName(QString::fromUtf8("label_21"));
264 
265  gridLayout_4->addWidget(label_21, 3, 1, 1, 1);
266 
267  toolButton_createTable = new QToolButton(tab);
268  toolButton_createTable->setObjectName(QString::fromUtf8("toolButton_createTable"));
269 
270  gridLayout_4->addWidget(toolButton_createTable, 4, 2, 1, 1);
271 
272  label_2 = new QLabel(tab);
273  label_2->setObjectName(QString::fromUtf8("label_2"));
274 
275  gridLayout_4->addWidget(label_2, 1, 0, 1, 1);
276 
277  label = new QLabel(tab);
278  label->setObjectName(QString::fromUtf8("label"));
279 
280  gridLayout_4->addWidget(label, 5, 0, 1, 1);
281 
282  threshold = new QLineEdit(tab);
283  threshold->setObjectName(QString::fromUtf8("threshold"));
284 
285  gridLayout_4->addWidget(threshold, 5, 1, 1, 1);
286 
287  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
288 
289  gridLayout_4->addItem(verticalSpacer_2, 6, 0, 1, 1);
290 
291  label_5 = new QLabel(tab);
292  label_5->setObjectName(QString::fromUtf8("label_5"));
293 
294  gridLayout_4->addWidget(label_5, 2, 0, 1, 1);
295 
296  cname = new QLineEdit(tab);
297  cname->setObjectName(QString::fromUtf8("cname"));
298 
299  gridLayout_4->addWidget(cname, 2, 1, 1, 1);
300 
301 
302  horizontalLayout_5->addLayout(gridLayout_4);
303 
304  verticalLayout_2 = new QVBoxLayout();
305  verticalLayout_2->setSpacing(6);
306  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
307  label_17 = new QLabel(tab);
308  label_17->setObjectName(QString::fromUtf8("label_17"));
309 
310  verticalLayout_2->addWidget(label_17);
311 
312  tableView_labels = new QTableView(tab);
313  tableView_labels->setObjectName(QString::fromUtf8("tableView_labels"));
314 
315  verticalLayout_2->addWidget(tableView_labels);
316 
317  label_22 = new QLabel(tab);
318  label_22->setObjectName(QString::fromUtf8("label_22"));
319 
320  verticalLayout_2->addWidget(label_22, 0, Qt::AlignHCenter);
321 
322 
323  horizontalLayout_5->addLayout(verticalLayout_2);
324 
325  tabWidget->addTab(tab, QString());
326  tab_4 = new QWidget();
327  tab_4->setObjectName(QString::fromUtf8("tab_4"));
328  horizontalLayout_6 = new QHBoxLayout(tab_4);
329  horizontalLayout_6->setSpacing(6);
330  horizontalLayout_6->setContentsMargins(11, 11, 11, 11);
331  horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
332  verticalLayout = new QVBoxLayout();
333  verticalLayout->setSpacing(6);
334  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
335  label_18 = new QLabel(tab_4);
336  label_18->setObjectName(QString::fromUtf8("label_18"));
337 
338  verticalLayout->addWidget(label_18);
339 
340  commandLineEdit = new QLineEdit(tab_4);
341  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
342 
343  verticalLayout->addWidget(commandLineEdit);
344 
345  label_19 = new QLabel(tab_4);
346  label_19->setObjectName(QString::fromUtf8("label_19"));
347 
348  verticalLayout->addWidget(label_19);
349 
350  consoleEdit = new QPlainTextEdit(tab_4);
351  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
352 
353  verticalLayout->addWidget(consoleEdit);
354 
355 
356  horizontalLayout_6->addLayout(verticalLayout);
357 
358  tabWidget->addTab(tab_4, QString());
359 
360  horizontalLayout_3->addWidget(tabWidget);
361 
362 
363  gridLayout_5->addLayout(horizontalLayout_3, 0, 0, 1, 1);
364 
365  horizontalLayout = new QHBoxLayout();
366  horizontalLayout->setSpacing(6);
367  horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
368  pushButton_run = new QPushButton(centralWidget);
369  pushButton_run->setObjectName(QString::fromUtf8("pushButton_run"));
370 
371  horizontalLayout->addWidget(pushButton_run);
372 
373  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
374 
375  horizontalLayout->addItem(horizontalSpacer);
376 
377  pushButton_restore = new QPushButton(centralWidget);
378  pushButton_restore->setObjectName(QString::fromUtf8("pushButton_restore"));
379 
380  horizontalLayout->addWidget(pushButton_restore);
381 
382 
383  gridLayout_5->addLayout(horizontalLayout, 1, 0, 1, 1);
384 
385  MainWindow->setCentralWidget(centralWidget);
386  menuBar = new QMenuBar(MainWindow);
387  menuBar->setObjectName(QString::fromUtf8("menuBar"));
388  menuBar->setGeometry(QRect(0, 0, 703, 25));
389  menuFile = new QMenu(menuBar);
390  menuFile->setObjectName(QString::fromUtf8("menuFile"));
391  MainWindow->setMenuBar(menuBar);
392  mainToolBar = new QToolBar(MainWindow);
393  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
394  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
395  statusBar = new QStatusBar(MainWindow);
396  statusBar->setObjectName(QString::fromUtf8("statusBar"));
397  MainWindow->setStatusBar(statusBar);
398  QWidget::setTabOrder(input, toolButton_input);
399  QWidget::setTabOrder(toolButton_input, bndnodata);
400  QWidget::setTabOrder(bndnodata, srcnodata);
401  QWidget::setTabOrder(srcnodata, sample);
402  QWidget::setTabOrder(sample, toolButton_sample);
403  QWidget::setTabOrder(toolButton_sample, output);
404  QWidget::setTabOrder(output, toolButton_output);
405  QWidget::setTabOrder(toolButton_output, f);
406  QWidget::setTabOrder(f, polygon);
407  QWidget::setTabOrder(polygon, rule);
408  QWidget::setTabOrder(rule, bname);
409  QWidget::setTabOrder(bname, cname);
410  QWidget::setTabOrder(cname, nclass);
411  QWidget::setTabOrder(nclass, toolButton_createTable);
412  QWidget::setTabOrder(toolButton_createTable, threshold);
413  QWidget::setTabOrder(threshold, pushButton_run);
414  QWidget::setTabOrder(pushButton_run, pushButton_restore);
415  QWidget::setTabOrder(pushButton_restore, tabWidget);
416  QWidget::setTabOrder(tabWidget, tableView_labels);
417  QWidget::setTabOrder(tableView_labels, commandLineEdit);
418  QWidget::setTabOrder(commandLineEdit, consoleEdit);
419 
420  menuBar->addAction(menuFile->menuAction());
421  menuFile->addAction(actionInput);
422  menuFile->addAction(actionMask);
423  menuFile->addAction(actionSample);
424  menuFile->addAction(actionOutput);
425 
426  retranslateUi(MainWindow);
427 
428  tabWidget->setCurrentIndex(0);
429 
430 
431  QMetaObject::connectSlotsByName(MainWindow);
432  } // setupUi
433 
434  void retranslateUi(QMainWindow *MainWindow)
435  {
436  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkextract_gui", 0, QApplication::UnicodeUTF8));
437  actionInput->setText(QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
438  actionSample->setText(QApplication::translate("MainWindow", "Sample", 0, QApplication::UnicodeUTF8));
439  actionMask->setText(QApplication::translate("MainWindow", "Mask", 0, QApplication::UnicodeUTF8));
440  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
441 #ifndef QT_NO_TOOLTIP
442  label_14->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>invalid value(s) for input image</p></body></html>", 0, QApplication::UnicodeUTF8));
443 #endif // QT_NO_TOOLTIP
444  label_14->setText(QApplication::translate("MainWindow", "srcnodata", 0, QApplication::UnicodeUTF8));
445 #ifndef QT_NO_TOOLTIP
446  label_13->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Band(s) in input image to check if pixel is valid (used for srcnodata)</p></body></html>", 0, QApplication::UnicodeUTF8));
447 #endif // QT_NO_TOOLTIP
448  label_13->setText(QApplication::translate("MainWindow", "bndnodata", 0, QApplication::UnicodeUTF8));
449  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
450 #ifndef QT_NO_TOOLTIP
451  label_16->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>OGR supported vector format</p></body></html>", 0, QApplication::UnicodeUTF8));
452 #endif // QT_NO_TOOLTIP
453  label_16->setText(QApplication::translate("MainWindow", "format", 0, QApplication::UnicodeUTF8));
454 #ifndef QT_NO_TOOLTIP
455  label_15->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output will contain sample features with input band information included</p></body></html>", 0, QApplication::UnicodeUTF8));
456 #endif // QT_NO_TOOLTIP
457  label_15->setText(QApplication::translate("MainWindow", "Output data", 0, QApplication::UnicodeUTF8));
458 #ifndef QT_NO_TOOLTIP
459  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Raster input dataset containing band information</p></body></html>", 0, QApplication::UnicodeUTF8));
460 #endif // QT_NO_TOOLTIP
461  label_3->setText(QApplication::translate("MainWindow", "Input data", 0, QApplication::UnicodeUTF8));
462 #ifndef QT_NO_TOOLTIP
463  label_23->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>OGR vector file with features to be extracted from input data. Output will contain features with input band information included. Sample image can also be GDAL raster dataset.</p></body></html>", 0, QApplication::UnicodeUTF8));
464 #endif // QT_NO_TOOLTIP
465  label_23->setText(QApplication::translate("MainWindow", "Sample image", 0, QApplication::UnicodeUTF8));
466  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
467  toolButton_sample->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
468 #ifndef QT_NO_TOOLTIP
469  polygon->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Keep output features as polygons (only if input vector are polygons as well)</p></body></html>", 0, QApplication::UnicodeUTF8));
470 #endif // QT_NO_TOOLTIP
471  polygon->setText(QApplication::translate("MainWindow", "polygons", 0, QApplication::UnicodeUTF8));
472  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Input/Output", 0, QApplication::UnicodeUTF8));
473 #ifndef QT_NO_TOOLTIP
474  label_20->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Prepare a table with class names. To prepare the table, first enter the number of classes and then press the button '-&gt;'. </p><p>Prepare a class table only in two cases:</p><p>1) The sample is a raster file and you want to select a subset of classes, with each a defined threshold (in percentage). A threshold of 50 means you want half of the pixels to be selected.</p><p>2) The sample is a vector file and the extraction rule is either 'proportion' or 'maxvote'. For 'proportion', define only the clas(ses) for which you want to calculate the proportion (e.g. proportion with respect to remaining classes). For 'maxvote', define all the (e.g. land cover) classes in the input raster map</p><p>In all other cases, do NOT prepare a class table</p></body></html>", 0, QApplication::UnicodeUTF8));
475 #endif // QT_NO_TOOLTIP
476  label_20->setText(QApplication::translate("MainWindow", "prepare table ", 0, QApplication::UnicodeUTF8));
477 #ifndef QT_NO_TOOLTIP
478  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Rule how to extract the features from the input data</p></body></html>", 0, QApplication::UnicodeUTF8));
479 #endif // QT_NO_TOOLTIP
480  label_4->setText(QApplication::translate("MainWindow", "extraction rule", 0, QApplication::UnicodeUTF8));
481  label_21->setText(QApplication::translate("MainWindow", "# classes", 0, QApplication::UnicodeUTF8));
482 #ifndef QT_NO_TOOLTIP
483  toolButton_createTable->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Prepare a table with class names. To prepare the table, first enter the number of classes and then press the button '-&gt;'. </p><p>Prepare a class table only in two cases:</p><p>1) The sample is a raster file and you want to select a subset of classes, with each a defined threshold (in percentage). A threshold of 50 means you want half of the pixels to be selected.</p><p>2) The sample is a vector file and the extraction rule is either 'proportion' or 'maxvote'. For 'proportion', define only the clas(ses) for which you want to calculate the proportion (e.g. proportion with respect to remaining classes). For 'maxvote', define all the (e.g. land cover) classes in the input raster map</p><p>In all other cases, do NOT prepare a class table</p></body></html>", 0, QApplication::UnicodeUTF8));
484 #endif // QT_NO_TOOLTIP
485  toolButton_createTable->setText(QApplication::translate("MainWindow", "->", 0, QApplication::UnicodeUTF8));
486 #ifndef QT_NO_TOOLTIP
487  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>For single band input data, this extra attribute name will correspond to the raster values. For multi-band input data, multiple attributes with this prefix will be added (e.g. B0, B1, B2, etc.)</p></body></html>", 0, QApplication::UnicodeUTF8));
488 #endif // QT_NO_TOOLTIP
489  label_2->setText(QApplication::translate("MainWindow", "attribute (prefix) name for raster info", 0, QApplication::UnicodeUTF8));
490 #ifndef QT_NO_TOOLTIP
491  label->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Threshold value for selection process. Select this percentage of the raster pixels (if sample is a raster dataset) or this percentage of the features in the vector file (if sample is a vector file). In case the sample is a land cover raster dataset, you can also define a threshold for each land cover class individually by preparing the table on the right.</p></body></html>", 0, QApplication::UnicodeUTF8));
492 #endif // QT_NO_TOOLTIP
493  label->setText(QApplication::translate("MainWindow", "Single threshold", 0, QApplication::UnicodeUTF8));
494  label_5->setText(QApplication::translate("MainWindow", "attribute for class output", 0, QApplication::UnicodeUTF8));
495  label_17->setText(QApplication::translate("MainWindow", "class name-threshold (%) pairs", 0, QApplication::UnicodeUTF8));
496  label_22->setText(QApplication::translate("MainWindow", "replace label names with\n"
497 " the labels in your training\n"
498 " vector file", 0, QApplication::UnicodeUTF8));
499  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Extract", 0, QApplication::UnicodeUTF8));
500  label_18->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
501  label_19->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
502  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
503  pushButton_run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
504  pushButton_restore->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
505  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
506  } // retranslateUi
507 
508 };
509 
510 namespace Ui {
511  class MainWindow: public Ui_MainWindow {};
512 } // namespace Ui
513 
514 QT_END_NAMESPACE
515 
516 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/md_examples_pkpolygonize.html0000644000113200011300000000537312647637662017665 00000000000000 pktools: examples_pkpolygonize
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkpolygonize

Examples of pkpolygonize

pkpolygonize -i input.tif -m input.tif -o ouput.shp

create vector file from raster image (typically a classification image), based on pixel (land cover class) values.

pktools-2.6.6/doc/html/inherit_graph_19.map0000644000113200011300000000027412616110570015471 00000000000000 pktools-2.6.6/doc/html/classImgUpdaterGdal__inherit__graph.map0000644000113200011300000000062112647437044021425 00000000000000 pktools-2.6.6/doc/html/dir_5785acc8d2e42f8795bdbe936856f26d_dep.md50000644000113200011300000000004012616110567020347 000000000000005a8c8ae158394bd02678e26657f8b391pktools-2.6.6/doc/html/dir_849702d4228bd835bdf1201002937cb3_dep.map0000644000113200011300000000054612616110567020077 00000000000000 pktools-2.6.6/doc/html/pksvm_8py_source.html0000644000113200011300000007473112647637661016100 00000000000000 pktools: /home/kempenep/pktools/qgis/pksvm.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksvm.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pksvm.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterVector
31 from processing.core.parameters import ParameterRaster
32 from processing.core.outputs import OutputRaster
33 from processing.core.parameters import ParameterSelection
34 from processing.core.parameters import ParameterFile
35 from processing.core.parameters import ParameterNumber
36 from processing.core.parameters import ParameterString
37 from processing.core.parameters import ParameterBoolean
38 from processing.core.parameters import ParameterExtent
39 
40 class pksvm(pktoolsAlgorithm):
41 
42  INPUT = "INPUT"
43  TRAINING = "TRAINING"
44  ITERATE = "ITERATE"
45  LABEL = "LABEL"
46 # CV = "CV"
47  GAMMA = "GAMMA"
48  COST = "COST"
49  OUTPUT = "OUTPUT"
50  MASK = "MASK"
51  MSKNODATA = "MSKNODATA"
52 # NODATA = "NODATA"
53 
54 # SVM_TYPE_OPTIONS = ["C_SVC", "nu_SVC,one_class", "epsilon_SVR", "nu_SVR"]
55 # KERNEL_TYPE_OPTIONS = ["linear", "polynomial", "radial", "sigmoid"]
56  EXTRA = 'EXTRA'
57 
58  def cliName(self):
59  return "pksvm"
60 
61  def defineCharacteristics(self):
62  self.name = "Support vector machine"
63  self.group = "[pktools] supervised classification"
64  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
65  self.addParameter(ParameterVector(self.TRAINING, 'Training vector file.'))
66  self.addParameter(ParameterBoolean(self.ITERATE, "Iterate over all layers",True))
67  self.addParameter(ParameterString(self.LABEL, "Attribute name for class label in training vector file","label"))
68  self.addParameter(ParameterNumber(self.GAMMA, "Gamma in kernel function",0,100,1.0))
69  self.addParameter(ParameterNumber(self.COST, "The parameter C of C_SVC",0,100000,1000.0))
70  self.addParameter(ParameterFile(self.MASK, "Mask vector/raster dataset used for classification","None",optional=True))
71  self.addParameter(ParameterString(self.MSKNODATA, "Mask value(s) not to consider for classification (in case of raster mask, e.g., 0;255)","0"))
72  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
73  self.addParameter(ParameterString(self.EXTRA,
74  'Additional parameters', '-of GTiff', optional=True))
75 
76 # self.addParameter(ParameterSelection(self.KERNEL_TYPE,"Type of kernel function (linear,polynomial,radial,sigmoid)",self.KERNEL_TYPE_OPTIONS, 2))
77 # self.addParameter(ParameterSelection(self.SVM_TYPE,"Type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)",self.SVM_TYPE_OPTIONS, 0))
78 
79  def processAlgorithm(self, progress):
80  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
81  commands = [cliPath]
82 
83  input=self.getParameterValue(self.INPUT)
84  if input != "":
85  commands.append('-i')
86  commands.append('"' + input + '"')
87 
88  commands.append('-t')
89  training=self.getParameterValue(self.TRAINING)
90 
91  if(str(training).find('|')>0):
92  if self.getParameterValue(self.ITERATE):
93  trainingname=str(training)
94  commands.append(trainingname[:trainingname.find('|')])
95  else:
96  trainingname=str(training).replace("|layername"," -ln")
97  commands.append(trainingname)
98  else:
99  commands.append(training)
100 
101  commands.append('-label')
102  commands.append(str(self.getParameterValue(self.LABEL)))
103  # if self.getParameterValue(self.CV):
104  # commands.append("-cv 2")
105  commands.append('-g')
106  commands.append(str(self.getParameterValue(self.GAMMA)))
107  commands.append('-cc')
108  commands.append(str(self.getParameterValue(self.COST)))
109 
110  mask = str(self.getParameterValue(self.MASK))
111  if mask != "":
112  commands.append('-m')
113  commands.append(mask)
114  msknodata=str(self.getParameterValue(self.MSKNODATA))
115  msknodataValues = msknodata.split(';')
116  for msknodataValue in msknodataValues:
117  commands.append('-msknodata')
118  commands.append(msknodataValue)
119 
120  extra = str(self.getParameterValue(self.EXTRA))
121  if len(extra) > 0:
122  commands.append(extra)
123 
124  output=self.getOutputValue(self.OUTPUT)
125  if output != "":
126  commands.append('-o')
127  commands.append('"' + output + '"')
128 
129  pktoolsUtils.runpktools(commands, progress)
string TRAINING
Definition: pksvm.py:43
string EXTRA
Definition: pksvm.py:56
string MASK
Definition: pksvm.py:50
string GAMMA
Definition: pksvm.py:47
string ITERATE
Definition: pksvm.py:44
string MSKNODATA
Definition: pksvm.py:51
string COST
Definition: pksvm.py:48
string LABEL
Definition: pksvm.py:45
string INPUT
Definition: pksvm.py:42
string OUTPUT
Definition: pksvm.py:49
pktools-2.6.6/doc/html/inherit_graph_29.map0000644000113200011300000000026412647437044015505 00000000000000 pktools-2.6.6/doc/html/classOptionpk__inherit__graph.map0000644000113200011300000000022012616110567020364 00000000000000 pktools-2.6.6/doc/html/sync_on.png0000644000113200011300000000151512647637661014036 00000000000000‰PNG  IHDRàw=øIDATxíÝ_HTYÀñï8ã¤ó§i§4-g6ÆËÕ&kQ)¨Ô!Š0ÒURKÚ…„ê¡/»PEÁ>ìK-+KÁ²Ñ.Y”¾dEPaA‰ø°¥¶›ZSÓïÜ;3wºŠ–¯—߯gfîïœsçœWKÇñ.€ÉøD­¨a‘'¬âq_ôˆk¢ÀŒ ÀDŽøQ´ÄïC¨¶åñÏÿgÅ ñ 0„Y‚:qZ¦Á)~õâ€èLý0HVñ× žz-¿‰C“%¨g¦˜6€é8%Úõ¬ëwêÙUÏ¿˜ª³Ä }? ?€·3ÀÀž©Š À”K• @hà a±ðaÇæUe‹ sù~ë2²ì“&Ú&B*AÄljæºììi*˨,Ëçí»÷oÆ£T”,d[˜¼3-*ÁÀ…>å‡Ë çLÉŸçfk˜Ò éw#*AEjKUy>ûšËÉõ&{µ¢8—m5Ki¬ jjƒD*¿NŽÖigwÃ7Dª’mz骹úKÛ¾±ˆ¶M!æ¤ÍkÐ?šoý¬_åÓlXí#Ò~–¸¬ê×ÒÑXŠÓ‘ùRÙ*Eû‚ՂדðEÜ;6«e"Q(²Ù=–¿Ezæ5Kؼָ_ 1òzBªJë ±XŒì96åªjL^7{ùãJÑ÷1½i@%8'7M©_\Qœ#ÓUŒËñýÿyõ Wo Éx8¼s¥v¯ªì|×SnÜ q_m Ýé î>bèÕí[JX,½4[Tú{R£ë¼ôˆ¾þa€tÝjjzzÅ'ÅìȶiIžŽòwÏs ¡€—ÕKøõâC^ŽŒ˜Y­¨µÉ%6¨´êˆº]vÛðhâ½iWv–hôëê°Ò¨¾'æÌ‚·ñ|[ßìúÅ^€YrD=<ýDû]äÇ÷s€Ïõ‹8™ºCì? À ¨—t4õᩎ¡Jã‡W‹É± îr¼cjMɘìx| šE©øNÔ‰œøA¢þ«–€Z¼ñ‡jó î#™§¢¢4gIEND®B`‚pktools-2.6.6/doc/html/structsvm__problem.html0000644000113200011300000001213512647637662016500 00000000000000 pktools: svm_problem Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
svm_problem Struct Reference
Collaboration diagram for svm_problem:

Public Attributes

int l
 
double * y
 
struct svm_node ** x
 

Detailed Description

Definition at line 18 of file svm.h.


The documentation for this struct was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.h
pktools-2.6.6/doc/html/classIncrease__IndexValue-members.html0000644000113200011300000000652212647637662021244 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Increase_IndexValue Member List

This is the complete list of members for Increase_IndexValue, including all inherited members.

operator()(const IndexValue &pv1, const IndexValue &pv2) const (defined in Increase_IndexValue)Increase_IndexValueinline
pktools-2.6.6/doc/html/inherit_graph_15.map0000644000113200011300000000027612616110570015467 00000000000000 pktools-2.6.6/doc/html/ftv2cl.png0000644000113200011300000000070512647637661013566 00000000000000‰PNG  IHDRÚ}\ˆŒIDATxíÝ;H#AÇño4Љႇ œ„K‰‡‚á ’ê,m„ØØ vÚžJ°²¹ÚÎþî‚§ XY ÅB|dr³cvo—˜Ä°Ý ù0Ã’™3ÿͤõ”Ëe×´¸Éõ¯1XÞ8Œ‰nQˆ88ööÖ§3*rbñ¯¢û-$¨‚þ´˜“P1Žè@Z…-# Ïú01ÑÏÎêÄ1HkKŸ w¶O@¥ªÈóñ!f§ñu˜åác÷;’sá×Bý[E´Añ±—Í\ß>°ùý¿ÏËÊÂ]–P€zØf| Íñ¯“+Ù´gð5…b  i5ümM³œ_æÍq,ÒcŽõèoÓd´ !¶äò©ô•,ôðÀ{¹¨µYß,€zTÍ8H]𤕘ï7¼»/òó8ËQæ !F€~6ãá?Y ÀA@ŨÁ.@ƒ¶TäÄYïŠËë±r‘µ8Ð*·é>€Šçÿ?€×þŸe[6«xÂIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass__inherit__graph.map0000644000113200011300000000013312616110567026523 00000000000000 pktools-2.6.6/doc/html/classQMatrix__inherit__graph.png0000644000113200011300000001773612616110567020201 00000000000000‰PNG  IHDR7»'Ù%bKGDÿÿÿ ½§““IDATxœíÝwTçúðï@ˆ¨áŠŒŠDE бM0(Q"&Æ^¢ÒT¢1ö£Ø’?KcA®…bƒ+ˆ-*M (QP)"ìîûûÃë^—ºÀ.³ Ïçœ9vfßyöݙ3Æ!„ðK˜ë !D(Ü!¼DáFá% 7B/‰¹.€ðý{÷0{öl”””p]ŠÆèÚµ+¶lÙÂuM–€Î–U ÅøñãáààÀu)!777oÞ­^œ £-7¢Rßÿ=×%h„ØØXüðÃ\—ѤÑ17B/Q¸Bx‰ÂÂKn„^¢p#œ*))ÁöíÛ1eÊŒ13gÎÄÞ½{!•JåÓ8::ÂÝݽÒ3¾¾¾pttÄÇëUÇÇáèèX¯6ˆf¡p#œ)..ÆôéÓqóæML›6 ;wîÄ„ pòäIx{{C&“ɧ}ôènß¾­ðþ‚‚\½zU©yåää`̘1UŽ×ÓÓÃ_|Q·B4…áLpp0 áïïþýûã½÷Þƒ¶mÛ†œœ;vL>mŸ>}«ðþ .ÀÚÚZ©yÉd2¼xñ¢Êñ˜6mZ>ÑLn„3'OžÄ¤I“ *.†Íš5ƒ››N:%ÍÁÁ±±± »¦qqq°··Wxo||<¦NŠáÇcìØ±Ø·o`Ö¬YÿÛ MNNÆøñã%ß-½pá>ÿüsNŸ>/¿ü’~}ÑÈP¸N"//ï¿ÿ~¥ã-,,p÷î]ùÿ=zôÀË—/廦EEEHNNÆÀåÓcÙ²e°°°Àž={0sæLìܹÏž=C`` ààÁƒ ó Å¢E‹`aa!mÀ€èÓ§ŸŸ€€øùù¡Y³f*ûüDýè „S Ò×c [tB¡ƒFll,Þÿ}ÄÇÇ£gÏžhÙ²¥|mmmüöÛohÛ¶-tttжm[¯ƒ°*Ó¦MC§N*œ˜;w.¾þúkxyya̘1°´´¬ÏÇ$ -7 ===´nÝ•ŽÏÈÈ€™™™ÂkoïšV¶K*‹ñàÁøøø`Ú´iˆŠŠª±Žòóx»>gggdffV{"‚h. 7™¡C‡"88Xá¬èÊ•+qúôiìÛ·C† Q˜¾gÏž(..Æõëב””„Aƒ)Œõê–/_777ìØ±óçϯ±±¸ò—ÜÜ\DDD OŸ>ò]ZÒ¸P¸Îxxx //^^^HLLă`bb‚U«V¡´´£FR˜þÍ®é¦M›ÐµkW*Œ/++ƒD"X,Fii)þøã¯Å½ñòåËëbŒaýúõpqqÁÒ¥KqéÒ%\¸pAŸ˜4$ 7™æÍ›cÇŽ°°°À¯¿þŠ)S¦ &&îîîèСÖ¬YSá=ŽŽŽÈÊʪ°K ¼Þ•œ9s&V­Z…I“&ÁØØC† ŒÑ³gOŒ;¶Æº:„gÏžá‹/¾€¾¾>,X€M›6ÉÏž’ÆîçFTâÍýÜbbbTÒžD"AZZºu릒öÚ›[ÑêÅzúÑLb±¸ÑÑ n„^¢p#„ð…!„—(Ü!¼DáFá% 7B/Ñç‰J=z”ë4Bjj*×%4ynD%LMM!‰°qãFNë‹[COÏÏžÕü£yukß¾=×%4i´[JTbàÀH$`Œq:x{ï„®®%ns^˽{÷¸þZš4 7‰ I€ˆˆKWC¸FáFx#../^¼¾ëGxx2Êʤ5¼ƒð…დ!‰Åů›ÂqE„Kn„Š‹KyÉë­5‘H€ðpÚ5mÊ(Ü/œ:uCa7T"‘!*ê:ŠŠ^qXá…á…’PþY3‰'NÜঠÂ9 7Òè={VŒ˜˜H¥åo )@xx'5îQ¸‘Fïøñk•¾.“É—ŠüüªíGø‹Â4zaaIɪ¾÷Ñ£W°¢)(ÜH£öèÑsüç?wª|Vc $6pUDP¸‘FíÈ‘+‰ª^Œe2†¤¤,ää}fff8wîöîÝ‹®]»¢uëÖX¿~}í~ p#'44S§NE›6m`mm]a¼¿¿?îÞ½‹¤¤$œ>}ÑÑÑX¶l™|üÆ$ßÚ;tèâãã±~ýzøúú"//O©vH#ÇQWWWæêêZ«÷`­Zµbñññ¬{÷îlæÌ™¦±´´d999òÿOž<ɬ­­Yzz:À®]»¦Ð^LL cŒ±ÒÒR€¥§§+ÕNmë ©Õ{ˆZ…Ò17¢qBCCakk‹Ý»wãÃ?„‹‹ †*Ÿ™™ …÷Èÿ¶´´T×®];€–––Âë5µC7Ú-%ÇÜÜзo_øúúâ믿ÆóçÏåãÛ´iƒôôt0ÆÀC~~>äãˇ˜PXùb^S;¤q£p#méÒ¥000P¸³ˆ‹‹ /^Œ¬¬,\»v ÇG@@@­ÛVU;D3Q¸¦££ƒÝ»w#88‘‘‘€U«VA__½{÷ÆG}+++üøãµn[UíÍ$`Œ1®‹ ü4nÜ8¯¡ñ@ @HHˆü3Î…Ñ–!„—(Ü!¼DáFá% 7B/Q¸Bx‰ÂÂKn„^¢ß–µ:sæ œœœª/“ ñò¥.ÊÊ´a`UÜW&B(”Õú}ÅÅÍÍ›׿Â9 7¢6åŸWÊðò¥……:xñB ÏŸë ¤D Æ‘ˆ¡}{Äâú]Sþô©.ÒÒZÁÆ&"QíÚúçŸÖÈÍÕ…––FF/ѦM1ôô”»¿›››ú÷ï_—’‰šÐ/ˆÚäå!99 —/g!!á®^ÍBqq„B@*}½è ìÞ=NNÝë=ω·#&&?ÿ<®®ýjõÞò1xðZ”””A,A"‘ÂÄÄnn6=º7ºt1®w}¤Á„Q¸•:p ÑÑ·p½¾“‡H$„TZùn¢P(€ÏHÌ›7´ÒñµñìY1zö\ ©”ÁÁ¡ öí›^ë6~ÿý,–.ÀÛ«…ŽŽ¯^I`lÜ£FYcܸ~èÙó½z×KԊ¨V¿~+ý Ê,Vb±Ü;vx¨äiSÁÁàç©T‘H€ääðî»úµjC&c5j3nÜx‰DZa¼¶¶¥¥tìø.\\>ÀgŸõA§NïÖ»v¢rôÛR¢Z?þèZóD´´DèÚµ~ùÅ]eÑ;p QªG^­uB¡ëÖ}™¬ò-ÍÒR +ë ~þùììÖbΜ½u/š¨ …Q©>ꊡC»B,U9H$DË–ºž ÕœÓÊÎ~†K—²ä¡$“É–X§¶¬¬ÚcÊ”ÁÐÒªú3ÈdL¾e§§§S§ùõ¢p#*·fÍç‰*ßòFF-U6Ï¿þº ‘Hàõ|e2àêÕû¸?¯Ní-Z4mÛêC(¬z«R,¢o_s¬\ùYæAԋ¨ÔÓ§…øñÇHTy{ïŸ~‡>}ÌU:ß°°DH¥ŠÇÈÄb!þúërÚÓÕÕÆO?‡LVù±C¡PCÃصë«j·ðw(܈ÊDD$cÈõˆMÁ·ß:ÁÜüÿnM½& 1iÒŒoSM+µ—–ö))9(C"‘"4´n»¦àà` ggëJÂëõÖœ‡ÇÀZŸ° ‡ÂÔÛ­[93f ¾ýv/\]m°nný±q£›|ËGKK„¾}ͱb…êwá¾RéÖc@FÆc¤¤äÔ¹íÕ«] ££¥ðË 1¢üýÿ%K ¬¬âYUÂ= 7Rg……¯°ti>þxd2†¨(Oøù9£ysm@ÿþàìl04lŽmÛ…MGìÞýJO ¼qíÚ<|˜_åøÒR •ºî®*&Ø¢W¯×íöèaŠ+>ØÚvFTÔBhi‰0bÄ&œ=›VçyÕ£p#µrïÞSLš´óçS7œ;·®®ýª¼VÍÈȇÍCïÞfj©çСdhiU9Ivö3$'ß«ó<„B6múýûwÂï¿ míÿÍÏÄÄs1lXL˜°§ë<¢Zô ¢”ÒR ¶n=…€€htèðÖ­sEÿþ¸. ÖÖßãÉ“‚j¯«+-•bÆ {,[6F­µìÙ?¿pŒÙ 7ºÉwÏ 'èçW¤fgΤbñâpäæ¾€¯ïHxx Ԙ˶m‹ÅÓ§…òÿïßÏC|ümŒ§ø£ùAƒ,`oßEíõ$&ÞÅ´i»Ñºµ~ÿýktèðŽÚçI*EáFªöÏ?øî»ƒ8rä œ­°bÅg066ຬj>|3f!;ÛŸ³?~Žo¾ù·oÿƒÀÀ/áà`ÉY-Mý¶”T$•ʰk×ØÙ­Å•+÷ô v올ñÁ¦)ŒŒ >ÎÎV˜8qV¯>ZåÅÀD}èf•DÁåË÷°hQRRr0oÞPÌšõtuéØQmik‹±~ý8ôë×¾¾aHK{„­[ÝѲe3®Kk2hË JàãŠO>Ù ƒæˆ‰ñ…§çp ¶zruí‡C‡æâæÍlŒ¹ ii¸.©É p# KÄàÁkuþþ_ $dÝ£L…zõj¨¨…011€³ófDF^㺤&­ ËÈÈ…«k,Øggkœ=»¸ÚkÖHݽóŽöïŸ A˜:u7‡ktÌ­ zõJ‚ ¢°cG,ºuk‡ÈÈèÕ«=×eñžX,„ŸŸ3ºv5·w(nÝÊF@€; šs]/Ñ–[“GÇ|K—ŽÆ‘#ó)ؘ‹Küõ×<¤§?ƈþ¸u«î?ì'U£pk"²³ŸÁÃc&NÜŽ¾}ÍqæÌ"|óÍ`ˆÅ´p¡GSDE-Dûö­1zôÏ8|ø ×%ñ-Ù<'•Êpƒ¯Å;ÿ 4t¶l™##ºfk­ZµÀ¾}Ó1yò ̘ŸPº}’ Ñ17»t) ‹…!=ý1æÎ‚Ù³‡ Y3-®Ë"o‰^‡ëÑÞžâöí\lÛæA7ÁTÚrã¡üü"Ì›·£GÿŒ6môûúš5 6Í5fLo9ò-²³ŸaøðM¸r¥îw1!¯Q¸ñc aa‰ppøqq©Ø¶möïŸsó6\—F”еk;?¾]ºã³Ï¶âÏ?ÿÃuIí–òDjê#,^|‰‰w1yò x{GË–º\—EjÉа9þïÿ¦bóæðò ArrV¯«1waiL(ܹ¢¢WX·.ÁÁçѳç{8~|!zô0åº,R"‘žžÃÑ«W{Ì»ii±}»‡ZîdÌg´[Úˆ:uC†ü„°°‹X½z,þ–‚GœœºãرÈÏ/Âðá›péR×%5*nЃùððØ]°±éˆ3g–ÀÝýÃj L§ÎÛâØ±øà3Œû öì‰çº¤FƒvK‘²2)¶l9‰ÀÀ¼÷^+„…Í€ïs]Q3==ìÚõ£±hQ.^¼ƒõëÇÑÙïP¸5‰‰w±hÑܹ“ /¯á˜6Í27!³gA—.&˜3gRS·à·ß¾Æ{ïµâº4E»¥îéÓBÌ›·Ÿ~º&&ˆ‰ñÅìÙC(Øš¨¡C»áøñ(-•`øð8w.ë’4…›†’Éví:ƒAƒÖ">þ6vïž‚={¦Ñ5k;¾‹£GçcÀ€÷1aÂ6zœ`h·Tݺ•ƒÅ‹ 99Ó§;bÁ‚aô˜8¢ E lßîÀÀh¬[‰›7³±aÃxºsò[hËMƒ¾ÂÒ¥øøã JeˆŠò„ŸŸ3©Ô›ãpÁÁS‚Ñ£·àÞ½§\—¥1(Ü4DXX"ììÖ""â6ntÃáÃóЭ[;®Ë"€££%Ž_™L†#ü—ÊuIÂc÷î=…‡Ç.ÌŸ¿NNÝpîܺÕ7©5só6ˆŒ\ˆ¡C»ÁÝ}N£©?’˜Ž¹q¤´T‚­[O! :¼ƒƒç ÿN\—E11~þyúõë?¿p$&fbëÖ‰Ð×oš¤-7œ9“ GÇõض-K–8ãÄ / 6¢2îî"$d&._ÎÂÈ‘þHOÌuIœ pk@Ožbúô ¸¹mC÷îípöìb|óÍ`ºf¨œ­mgDE-DË–Íàì¼QQ×¹.©ÁQ¸5©TößkÖÖàòå,}ƒ;&ÃØ˜nõMÔÇÄÄÎŨQV˜2å&÷8A:æ¦f—/ßâEaHIÉÁ¼yC1kÖGt-i0::blÚä†>è?¿p¤¦æà—_ܛĽþhËMM JàãŠO>Ù ƒæˆ‰y}«o 6Âw÷6 ×®ÝLjþHIáÿã)ÜÔ ,,ƒ¯Åñã×áïÿBBf S§w¹.‹4q66å‰Ö­›ã“O~ÆÑ£W¹.I­(ÜT(##®®X°`?œ­qîÜbºfhcc„‡ÏÁ§Ÿ~€éÓƒ°zõQH¥2®ËR +w¥_tt4222¸ª§Ñºs§þùúúbŒeŒNZp]RpttT[û™™™8qâ„ÚÚWÆß¿À±|yWNëhÖ¬ÜÜÜ ­­žÃªXOòpâÄcŒkŠîÝï-Ì«X®ÃÀʋе„BÖ¢E&ˆ8¯¥ªA,—ÿºUÊÍÍóϨICxx¸ÚúZUë©–Ö»œ÷S}‡*–ëÐ »¥‰!!!`ŒÑP‹A*-Aaad2 çµT6„„„@"‘”ÿºUJ*•ÂÕÕ•óϪ ÛuI]Tµž––ærÞWêZ®é˜!„—(Ü!¼DáFá% 7B/©$ÜŠŠŠàíí +++èëë£_¿~X³fÂ>@ ?Øü¶ŒŒ …ëÀA•ƒ²²³³1a˜››COOýúõCDD„Â4 ÆSé+W®„@ Àºuë*Œ+,,„——:vì]]]XXXàûï¿GIII­¦©IQQ|||`ee===ØØØ`íÚµj?9ÐPjê£_~ù¦¦¦É¯ÅbŒ¡C‡غu«ü5e¾÷šðµ¿UÕÏå×I]]] 8W®\©U= ÒϬ,$$¤üËUzñâ³´´döööìøñã,55•…‡‡³nݺ1&‘Häí`û÷ïWxzz:{» ìÂ… ,''§Â Œ'Ož°¶mÛ²)S¦°„„vãÆ ¶a棣⢢擞ž^e;2™ŒuëÖ™™™1kkë ã'OžÌÙ¥K—Xnn.‹‹‹cVVVlΜ9µš¦:oúvðàÁ,22R¡oå}«ŒVÉ×­R®®®ÌÕÕµVï©©=zÄ„B!;{ö¬Âû’’’˜@ `ÙÙÙŒ1å¿÷ꨲ¿k»ÕVmÛWU?—_?ÓÒÒ˜‡‡û׿þÅd2™Rµ4ÐrZïpóòòbvvv *,,dææælçÎòv§OŸÎZ·n­T•…[u¡S“Ù³g³ñãÇWZçСC•žÏÕ«W™@ `'OždXjjªÂxCCC– ðZ\\333«Õ4Õ©©o·mÛ¦T;Œin¸)ÓGNNNlîܹ Ó,Y²„ÙÛÛËÿWö{¯Ž*û[ÓÂMUý\Ùzóøñc€=~üX©Zh¹®¸³“'OV:. @Þ1XJJ 0`ûä“Oä)¯êp366f.\¨ðzAAËÊÊRz>‹/fŒ1Æ,--ÙŠ+Æ›™™±I“&±'OžTÙ†2ÓT§º¾ dvvvJ·¥©á¦LýþûïÌÄÄDae°´´dòÿ•ýÞ«£ÊþÖ´pSU?W¶Þäåå1mmmVRR¢T- ´\×/ÜòóóöÏ?ÿT:þüùóÌÈÈHÞnzz:KKKcºººì?þ`ŒUnW®\aeëÉËË«qÚêÂM&“±Ž;²íÛ·3ÆóóócÝ»wW˜æßÿþ7355e:::ÌÉɉýôÓO,33³ÖÓÔôYªêÛøøxÖºuk¥ÚbLsÃM™>ÊÏÏg:::,..Ž1ÆØ­[·˜P(d=’Wö{¯Šªû[ÓÂMýüf¾o¯Ÿ>d³fÍb_}õ•Ru4àr]ñ ª$ !•J^³°°Àºuëðí·ßâþýû•¾ÏÚÚúúú†š°ÿž¬¨ïÕ/^¼ˆû÷ïcìØ±ܸqÿý·|šaÆ!++ qqq°³³CPP:wîŒ}ûöÕjššTõYc ÿÉneúÈÐÐ#GŽDhh(ààÁƒppp€‘‘Õ}ïÕµÑØû[ýüÆÛë§©©)‚ƒƒáíí]«z¤ŸËÇT¸[ú믿²?þXÞî›-%©TÊìííÙ°aÃXZZšJwKŒŒØùóç+¼~ñâEÖ·o_VTTTã|æÏŸ_éoؾûî;ÆØëcû÷ïWØ|—ÉdléÒ¥ÌÔÔTéijbllÌN:Ué¸ÀÀ@6hÐ ¥ÚaL3·ÜjÓG¡¡¡ÌÈȈI$Ö§OùVõÊ~ïÕQe×v=ª­Ú´¯Ê~.¿Þ1OOOfkk«tí ´\×ÿ˜›§§gµýýýåí¾Ý)wîÜa-Z´`^^^* ·©S§2— gnæÍ›Ç¬¬¬jœD"a&&&lÓ¦M »Ä .dL&“±‚‚&ØåË—Þ{îÜ9ùn¸2ÓÔÄÓÓ“ÙÛÛ+ô­››Û·o333cJµÃ˜f†[mú¨¨¨ˆééé±   &‹Ynn®Âxe¿÷ꨲ¿5)ÜTÙÏ•­7ׯ_gúúúJŸ-m åºþáöüùsÖ¥Kù¥ iiiìàÁƒ¬{÷îlàÀòƒŒ•uʯ¿þÊJ/ÉÍÍeï¼ó›8q";þ<»zõ*[¾|9ÀŽ=Zã|bbb˜H$ªpæ'))‰`ÉÉÉŒ1&?ý}ôèQvûömvþüyfkkËæÏŸ/2Ó(Ó·ŽŽŽ,**Š¥¦¦²%K–0¬mÛ¶ìÕ«WJµÃ˜f†cµë#wwwÖªU+6lذ ã”ýÞ«£ÊþÖ¤pcLuý\Ùzœ••Ű/^(UK-×õ7Æ^o¥yzz²=z°æÍ›³îÝ»³U«V±ââb…vËwŠL&cNNN­ªAY™™™ìóÏ?gíÚµcúúúÌÆÆ†>|¸Âç¬l˜>}z¥_ªL&c;wf¾¾¾Œ±×[xË—/g½zõbºººÌÜÜœùúú²—/_ÊߣÌ45y»o›5kÆ:wîÌüüü˜½½}¥—>TESí6}ɰ]»vUÚ–2ß{MTÕßšnªêçÊÖc©TÊZ¶lÉîÞ½«t= °\«&ÜHÃ{õê‹WzzM ·Æ¢¶ý­iáÖX¨p¹VïÙR¢>ÚÚÚ°µµåºŒ&ƒú»a¨²ŸÝ£ýj:ÝÏÊývU“ñé³4Ôß CSú¹Ñ…Ÿ@>}–Æ€ú»ahJ?Ón)!„—(Ü!¼DáFá% 7B/Q¸Bø©ü•o"‘æ>T˜†ú "‘¨—U*ʬ8¨ó¡Ì´žþo¨b¹­p)Htt4?~\þeÂåo]£j«W¯†‹‹‹ZçÑXˆD"Œ9RmíÓzú?U-ׯ4ä¢BQ0:æFá% 7B/Q¸BxI Œë"!DÅþëYÜ\Þ(õÇIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite__coll__graph.md50000644000113200011300000000004012616110566026632 000000000000002da4461a4e6b277d95fe960fcbe8e840pktools-2.6.6/doc/html/dir_6d2fd95b0bd390617ad5a1eb4a537b4a.html0000644000113200011300000001652212647637663020115 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
imageclasses Directory Reference
Directory dependency graph for imageclasses:
/home/kempenep/pktools/src/imageclasses

Files

file  ImgGdal.h [code]
 
file  ImgRasterGdal.cc [code]
 
file  ImgRasterGdal.h [code]
 
file  ImgReaderGdal.cc [code]
 
file  ImgReaderGdal.h [code]
 
file  ImgReaderOgr.cc [code]
 
file  ImgReaderOgr.h [code]
 
file  ImgUpdaterGdal.cc [code]
 
file  ImgUpdaterGdal.h [code]
 
file  ImgWriterGdal.cc [code]
 
file  ImgWriterGdal.h [code]
 
file  ImgWriterOgr.cc [code]
 
file  ImgWriterOgr.h [code]
 
pktools-2.6.6/doc/html/inherit_graph_9.png0000644000113200011300000000314412616110570015416 00000000000000‰PNG  IHDR˜%1ô·ÝbKGDÿÿÿ ½§“IDATxœíšoHS]ÇÏÜ¿Ë ¶²9çŸ[`ÄÒÀ7Y¨½HSdÌIúB‚ETLHŒì…A¡TŠZÑ_­&CóMd,Æ‚ŠëtʘZ[JNî¦sÿîy^¸ÜÜÏÜ3ëyîs?¯ÎùÝýîïûóË9÷ìN„pü÷ÉøÓ8Òg$KàŒd œ‘,A@ŸÌÎÎƵµµ?¥†#I0 ëêêR©TTä#ÇÆÆ†‡‡kjj~»0ŽÍñòåKƒÁÐHÄÀÀÀo”Ä‘ <o]„{F²ÎH–ÀÉ8#YB*FòhìÙ³§¾¾~qq1íʶºx©TzòäI—˵©;Ü»w/77—$I*!ܽ{÷Ý»w??==6I;)®H»Ýîñxæçç=zDDQQÑòòrz•mHü÷ïß­V+I’uuu›J¯©©ñz½v»Š|úôinn®ºº:ÝJ7AŠFÊåòìììÜÜܲ²²ÁÁAµZ}ûöíô*Û:x¥R©Õjïß¿o·Û ‚H>]¡PTTTп¤™Íæ#GŽ(•Ê-›,ixFòx¼³gϾyóM#‘Hss³B¡ÈÊÊjnnŽD"Ñh´­­M¥RÉåòúúz´vцóîÝ;•Je³Ùâ³ÃÃÔH$J¥òÆèþCCCÀ0L­V?{ö,QÑ$Åóù|@4,//Ÿ9sf×®]yyy&“ ½áb,§Óé^½z‹ÅÐÔl6×ÖÖ¢1£f}¥Sÿ Fÿº#€©©)zäãÇ2™ oÞ¼yúôéÙÙYÇ‹ŠŠ._¾ÜÑÑQXXˆãøøøxII‰Éd‚NMMNœ81::Ⳃ‰DóóóÏŸ?,,,±XÜÓÓãñx>|(cÑ ÄùòÅï÷1==]UUuèÐ!tI¯×WTTÌÌÌà8¾ÿþk×®%*çóùÄb±Õj…:ÎŒŒ ¯× !dÔŒ:¥ZFµèãäÅÓ»èïïÿ%BŸ¤ÅÈ‚‚ǃÆoß¾Õjµûöí3›Í(299‰Æ¨Çe…B!§Ób±˜ÕjEE—––„Bagg§Ïç#IÒï÷Çb1Æô ÄS…£G¢^Âá0ŸÏw8ècf³yïÞ½‰ÊA+++F#„ðúõëååå(ȨùoL^<½‹-1òÅ‹ÅÅÅhŒaý%•J1 _wÔI8N”!´X,‡Öjµ TQ›ÍV]]½mÛ¶ÒÒÒ‘‘‘ Ò“˜››ƒA4ÅqðDå „ …"÷ööRñxÍŒF~ýú•'/žÞEú$I²´´ôêÕ«hš——G]õù|N§S­V ¡ÈçÏŸÛÛÛ×uصºº*‹- I’Á`]]]ýðá„0 =~ü˜Ïçÿüù“1=IñhENLL éàà F£ITB¸²²²}ûö'Ož‚……dÔ¼ÎÈH$!|ÿþ=Õ~òâé]¬32ÅÃÎââ¢×ëýöí›Õj­¬¬t¹\—.]B—ªªªZZZÜn7ŽãÇïêê2 ­­­‡Ãápœ;wÎívÇß0>+ …Ãa‘H ÛÚÚ~¿ŸÇã;vìõë×A„Ãa¡P(‘HÓ7Û‘P(¬­­=þ¼Ëår8W®\Ñëõ‰Ê$É©S§.\¸P^^.—ËQQ3UB&“ž>}JÄ;w6è}³âHõ°C‘ŸŸ¯×ëüøA]%¢¡¡aÇŽ™™™MMM+++kkk&“)''G*•êt:ŸÏãVd|„ðÖ­[;wîÌÏÏïîîÖétYYYH¤F£‰D‹eƒôDâW$„piiÉ`0dff*•Ê‹/¢m–±bddðàÁz0^3½Óööv™L¦Ñh, L^<½‹4l­œx#¹w­,á‡evèõ&déÿñ²ÖH¶–nke œ‘,3’%pF²†ÃN__ßï×ÁñO¡©´Ùlè÷9Ž9|>ßf³Ñ½ãýߎél…{F²ÎH–ÀÉ8#YÂ_L 39ƒIEND®B`‚pktools-2.6.6/doc/html/classBadConversion__coll__graph.png0000644000113200011300000001314112616110567020621 00000000000000‰PNG  IHDR…»Kª]ábKGDÿÿÿ ½§“IDATxœíÝ{XS÷ýðwH X¹J rñR@ÄÚÇÚn}ÔQç,-cúèju³Šhí/s«Î*ÝÚ=*®[,XuÚÉ]‘ÖvC‹:ê°T«;•‹"å&% 1HB>¿?øqfø‚Dn›ïëyxä›óý~Ïçä¼=ç@Ž„ˆw± à ŽÁCÁ1x(8†¬§‹‹‹ÑÔÔÔ—µp}ÈÁÁcÇŽ…³³óCíq(*++áææ¹\ÞÓ)¸~TWWooï øûûC©Töf ®Ÿœ9s¦Çcù5Çà¡à<ƒ‡‚c<¡())D"»Œ^y”¶AôP”••A¡Pˆ]FŸë¸]xã7D¬Èv¢‡Âb± ¾¾^ì2ú\ÇíR(ؾ}»ˆÙnÀB‘““ƒ‰'ÂÙÙ8|ø0`Ê”)€#FZ[[àà`¸ºº"44.\æéxîØ6™Lˆ…··7”J%bcca2™pâÄ øùùA£ÑŽ=Šàà`466Âl6cÛ¶m5j†Ž%K–@«Õv;gûº³³³1nÜ8(•J¬Y³---Ìvu¬S«ÕâÕW_…B¡€¿¿?Ö¯_ææf€D"ÁG}„ñãÇcذaعsgßí[PåååQmm­M}õz=ÉårJLL¤êêjÚ¿?Éd2ÒëõT\\L÷—ñî»ï’R©¤¬¬,ªªª¢O>ù„|}}…>Z­–’’’„þÛ;vì yóæÑ;wH¥RÑ3ÏÍŸ?Ÿ†JÓ¦M£“'Oû?hÈ!tùòe«±_ýµÍ¡pvv&V_îîîÂò?üá$•J­jwvv¦«W¯>ôœíµ ¡ï•+WÈÙÙù¡¨¨¨`Æ©T*rvv&¢¶PܸqCX6Сk ƒÁ‹Å‚ôôt¨ÕjDGGcöìÙP«ÕLß1cÆàÊ•+V]»vÍæu) ƒÚFƒ‚‚@EEöìÙƒ^x¿ûÝï„1¾¾¾¸}û¶Ð¾|ù2Þyç›æÚÞ1nwóæMøúú>°FoooH¥R”•• •––ÂÏÏOh;8ˆ÷3À€¬Y"‘ <<™™™Ðét0pttÄc=&ôÑëõ€•+W"66ÙÙÙ¨©©ÁgŸ}†­[· ýœœÜeûå—_ƦM›P^^•J…ˆˆìÝ»‹¿úÕ¯°zõj=z§NBNN ** ¿ÿýïQTT„¢¢"¬Zµ åååÝÎÙníÚµ())Aaa!6oތŋ3Ûu?GGG,X°kÖ¬Á­[·PTT„-[¶ 22²7OsßéÑñ¥‡§ÔÔT $''' ¡ììl""2™LôÜsÏ‘‹‹ ™ÍfЧ   :t(M:• „Cowp:Ž–-[FžžžäååE111ÔØØHûÛßè©§ž"£ÑHDDÇŽ#R«ÕÔÜÜLëׯ'___rww§… ’F£évÎöu'''ÓèÑ£I¡PÐêÕ«É`00ÛÕ±NµZMQQQäååE>>>´nÝ:át‚§‹Žm[ôæô!ùÿ•>´3gÎà‰'ž°ë·ÎKJJ0vìXôð)ìW½Ù?¢¿xÅ ><½àææ†+Vˆ]FŸã¡è¥R‰ÄÄD±Ëès<ƒ‡‚cðPp  ŽÑ«_ñ×jµ0›Í}U 7Hô8r¹UUU}Y‹h,Âûï_Äܹãàçç*v9}B"‘ôøµzŠ©S§ötè SPPŠóçO`ܸDFþDìrDǯ);vQø×l¶ˆ\øì>F£YY_špîÜ ‘+ŸÝ‡âÌ™ëhjjH¥Èʺ(rEâ³ûPdf^„TÚö4˜Í|ú© ƒQäªÄeסhllÁ?ÿY³¹Ux¬¥ÅŒÜÜoD¬J|vŠŽ 23¿©¢ÁÁ®C‘™ùó§|f³yyסÓDªJ|v µºçÎÝDk+û#(áäI•U vŠ?¾Òå2"BzºýžBì6…]þn¥ÅB(((EmmÃW58Øe(ªª´¸x±K׿p+•: '§ë£É÷™]†"'ç2ºûl³¹™™öùBV¯Þ:T55áããfõ˜^ßggGÈdÿûòˆ|ÆHŸëñß}|ßøú®CbâRÌ™3IìRDg—§îÁx(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1˜O²)((@ss³Xõˆ¦¨¨#GºÁݽg7NyT988à©§ž‚»»»ðó™WÍÍÍð÷÷·êd&L»q\»v ---VuúAhnnn>|ø€Å >üš‚cðPp  ŽÁCÁ1D EII s¿ {Zÿ`Õo¡(++ƒB¡è¯é{¤cMxã7D¬hpê·PX,Ô××÷×ô=Ò±&…BíÛ·‹XÑàÔëPäää`âĉpvvF@@> ˜2e `Ĉ€ÖÖVÄÇÇ#88®®® Å… „y:Êïo·úôiŒ5 ì²/ÐvKç>úãÇǰaðsçÎNkêl܇~ˆñãÇcøðáØ¾};>ŒÇîîîxóÍ7…¾&“ ±±±ðöö†R©Dll,L&S·ÏWWãºÚÆöv~~>´Z-^}õU( øûûcýúõhnnfÆæççÛ²ëºFäååQmmmLJ;¥×ëI.—Sbb"UWWÓþýûI&“‘^¯§ââbºúwß}—”J%eeeQUU}òÉ'äëë+ôÑjµ”””$ô¿¿Ý>×Ï~ö3úüóÏéòåËVsw\š?>i4JJJ"T__ÏôëlÜÂ… I§ÓQrr2 _þò—¤Óéhß¾}€¾ûî;""Ú±cÍ›7îܹC*•ŠžyæÚ¸qc·ÏYWãºÚÆö¶^¯§ÈÈH £ÒÒRR©Tôä“OR\\3V¯×Û´ÿˆ:ßß½ …Z­&GGGÚµki4²X,tïÞ=jmmežðàà`:xð ÕøC‡Q'¹d´Ï¥R©¬Ú— P^^F@ÅÅÅ6»té’Õ¸Žíââb"" ¡êêjalnn.Mš4©Ûméj\WÛØÞ6$•J©¨¨H›••EAAAL߇ÑÙþîÕéÃÓÓyyy(((€¿¿?¦OŸŽÿûßpp`§­¨¨À¤IÖ·M˜8qâC­/$$¤ÓÇ©“»Søúúj®®®Vã:¶Ûݾ}>>>H$H$xñÅqëÖ­nçïn\Çmlo×ÖÖ¢µµ²   |ûí·]Ží©^…Â`0Àb± ==jµÑÑј={6Ôj5Ów̘1¸rÅúöK×®]{¨õuÜ1f³PYYÉôí,˜}I¡P ¸¸Ôv´…F£AAAA¯ÇuÜÆö¶··7¤R)ÊÊÊ„e¥¥¥ðóóërlOõꙓH$Gff&t:ŒF#ñØc }ôz=`åÊ•ˆEvv6jjjðÙgŸaëÖ­B¿††$''wÙ¾Ÿ‡‡àïÿ;t:vïÞýPu·×Ô/¿ü26mÚ„òòr¨T*DDD`ïÞ½ý6ÎÑÑ ,Àš5kpëÖ-aË–-ˆŒŒìõ¶0l9ÇÚØËË 111ؼys¯ç=pàž~úiÄÆÆ =jµ©©©xöÙg{½Žþäî˜±ËèÔ€_SH¥Rxzz íÿüç?xíµ×yóæáÿøÀb± %%QQQ˜9s&V­Z…ÿþ÷¿Â¸sçÎaÞ¼yÌüK—.ņ „¶^¯ÇöíÛñóŸÿ¿øÅ/£Ñ íôvêÔ),]ºsæÌAJJ `Ë–-xÿý÷…9L&fÏž‚‚m¯Ù$&&bîܹ˜;w.a6›QYY‰3fàÒ¥KX°`®^½ŠóçÏ#::áááX´hþõ¯€Ð·7uö—~Ess3 šššPQQääd¼øâ‹€¦¦&lݺcÇŽÅ‘#Gðúë¯#)) Z­™™™HMMELL >Œ¨¨($&&h{Õj5FŬoÈ!P*•Bû½÷ÞC]]±cÇâèÑ£Âòüü|ìÝ»+V¬À¾}ûpïÞ=„……áìÙ³hÿØòÂÂBÈåráè“‘‘êêjìÛ·þóŸqéÒ%8p@˜3-- 7nÄÈ‘#‡—^zIøÎ;;}« 'uö—~ÅòåË1sæLÌš5 K–,ÁÍ›7prrÂþýû±fÍxyy ;³±±'NœÀÊ•+1mÚ4xyyaòäÉÂá¶}gµßO´+f³Ÿþ9V¯^ `Ù²eÈÍÍú¼ôÒKpqqÁOúSm×*?úÑ ÓépãÆ ÀéÓ§©´í“ÿ?ýôS¬]»J¥X±b¾üòï™ÄÄÄàé§Ÿ†T*Á`0ÀÉÉ ÈÉÉ\.ï“:ûK¿_S9r~~~€––dddà·¿ý-RRR “Éðí·ßb×®]0 ;v¬0®®®AAAVs\]]áéé‰òòrL˜0ÁªÏõë×ñ׿þï½÷t:, |}}…å~~~¨««Ú … “ýï©Ëå ÅÙ³g1fÌœ?IIIÂòššæÔ5tèPáûö#˜««+þò—¿ ##@pp0-Z„É“'[Õh4=ª³¿ è5…\.ǬY³p÷î]hµZ´´´ ..¯¼ò >øàüæ7¿úŽ1¥¥¥Vãoß¾-|ŠÔÔTá¨Ñ.77f³r¹žžžppp@uuµ°¼ªªJx‚®6í§/¾øÁÁÁð÷÷–¹»»ãÈ‘#ÈËËC^^rrr¬®AÚw\KK , âââ““ƒ™3gbóæÍÌ¡¿7uö‡~…V«…Z­†Z­ÆÝ»wqôèQ(•JxxxÀd2Ál6C&“Áh4 ç妦&Ì™3 øâ‹/ V«ñå—_âÃ?掎ƕ+Wð§?ý ×®]CYY:„¬¬,,_¾@ÛΙ1cvïÞêêjܺu û÷ïÇ /¼ÐmÝÏ>û,ôz=<ˆ™3gZ-›6m’’’P[[‹²²2lذÇgæH$ˆÅ¹sçÐØØ“É™LÆœ>zSgè÷cѪU«„ï% üqÄÅÅA"‘ÀÅů¿þ:Þ~ûm 2‹-BXX6lØ€ÌÌL˜L&$$$ ¾¾xóÍ7ñë_ÿ@Ûº|ð°mÛ6 Œ5 ï¼ó¦L™"¬síڵسgV®\ GGG<ÿü󈌌ì¶n™L†éÓ§ãôéÓ˜>}ºÕ²èèhìÙ³¯½ö$ ~üãcÅŠøî»ï¬ú999aÓ¦MØ·oîÞ½ ___lÛ¶ NNNÌúzZg°ùÎ@iiiX°`Á |Ž{°·Þz ÇGZZšMýù{ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à6¿¢ÙþaÇ_±ã ¯¼òŠÍ}m~E³¹¹'OžDkkk ãÄóƒü@x—¹;6‡‚³üš‚cðPp  Ž!.vÜàòú½,~ðüIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_28.md50000644000113200011300000000004012647437044015404 0000000000000053be632956c02d01c5dba81e3b1b18a2pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy__coll__graph.png0000644000113200011300000001003212616110567026516 00000000000000‰PNG  IHDR½€ÑQÿbKGDÿÿÿ ½§“ÏIDATxœí{P×ÇÏ’ðèO$:äáTÁ±ŽŒcU@|´X†  ˆZEJ¥ Á+j[E0 ˆI lö÷Çö·ÆRØÂ&ÈùŒÜ=¹÷œ³—/÷n¸Ç„ ( d˜;dD‚ºAØ€ºAØ€ºAØÀç&ŒJ¥’Éd†›p£GGG{{{q¤…BÑÚÚÊÍ-Z Essó+¥.Ã6þøãÎbáó ÂÔ ÂÔ ÂÔ ÂS×Mmm-A\ºúî»ï‚صk×PåÐßp‚ jkkY»5.¦®½Ô××ÛÙÙ ‡gŠ¢233%ÉPù7n\tt4 gÚÜ3"u£ÑhZ[[‡ÃsuuuMMÍ‘#GnÞ¼yïÞ½!ñiggG¯^×6÷˜nèõ<77wêÔ©6lèîîf^¥(jË–-^^^Ož<™;w.Lœ8‘~©½½}õêÕvvvNNN[¶lQ©TýòòòfΜiee% ÓÓÓ{ff¦··÷¢E‹¦M›ÖwÉ¡(*99yÆŒ666ï¾ûî¹sçè ¨o,ú^ ?NwÓIòóóE"Ñøñãi AG>}º½½ý®]»ÒÓÓ]]]ALLÌMô@q‚\./**2ÜG&“€X,¾wï^YY™H$Ч† Ó“ìããSWWWUUåéé¯×ÈŒêìì´´´LNNnjj:räŸÏïìì¤(J£Ñ¸ºº¦¤¤Põí·ßzxxh'FQÔáÇ'Ož|ñâÅ–––Ë—/‹D"ÚÞ_,??¿+W®Ü¼y“6,]ºT¡Pdgg}k¨P(ÒÒÒàã?V()))LܺuëÖ­[ƒûÁ°ÅätSUUE_J$‘HD£¢¢àîÝ»Ú=évOOÇcæ+''G$é52£ÚÚÚÌÍÍ÷ìÙóôéSFÓÑÑA’$EQeee|>ŸþñTTT@uuµv8OOÏŸþ™I8## Ä¢ï…ÞW7W¯^¥(Š$IÉd´Q*•Ò÷¥Ó¦;€KݘÐ>EãîîN7¦M›ÖÐÐ@·oܸ±`Á‚„„„¾ýår9I’nnnô¥H$jhhÐkd†Œ?¾¨¨¨¬¬ÌÉÉÉÛÛ»¤¤ÄÌÌ 233{{{íì삘3gèlUuuužžžÌåŒ3úK€¹Ã7ëèètt†±cÇ€¹¹¹NÛ¤09Ýп”pïÞ=zZ ///99933³¨¨H§ÿ„ x<^}}=}YWW7yòd½FfˆR©Ôh4'Ožlkk ]¶lY[[I’‰dïÞ½ÿgÓ¦M‰„Òª£uqqÑ>ª©©é/ºý?ï¡úƒàfYø>µpáB™Lvýúuww÷ØØXíµ=..nÊ”)J¥’6vttÐö   ŸúúúêêjØØX½FÆ•R©´²²:uêTKKKjjª•••R©,**âñxr¹œÉ§¼¼¤R)3pÿþýNNN—.]zòäIaaáÔ©S ‚0‹ê³O1iƒÖÖZûT_£N»?FõóMZZš‹‹‹Ý_|ÁH„î T*§L™§V«ßyçkkkÚÞÖÖbkk;iÒ¤/¿üR©Tê5j»’H$nnnÓ¦MËÍÍ¥(*""B,kç£ÑhÜÜÜ¢££™$I&%%¹¹¹ __ßÜÜ\{{ûŒÅ´uÒFÝü3× 'é°$//ïæÍ›Ìå©S§¼¼¼Œ˜£ú¹Ø”©ªªZ¹r¥T*íêê*++‹‰‰ 3vRÆÓº-ÃØØØDDD; CDEEuuuùûû·´´…Â5kÖ˜xÂÃAqòÿîš››oß¾½`ÁbZè÷zÜUâ>…°uƒ°uƒ°uƒ°Ó÷S\†û—ÈåÖ#è(@¥RYYYq‹#ÝXZZ1T•PÐÙÙy)4Ôkþü×Ë 7n78Ò@ ðööæ&ÖpìØ¯jµF*}bì\L|¾ÑONNA@yùŸr¹Âع˜"¨=<|Ø&•þEQ@ÄéÓRc§cŠ nô›[Éã™IjNž¼aìtLÔ²²nôöþý‘+55uuÍÆÍÇAÝèrçNSm­àïc;ss³3g*›’ ‚ºÑ%7·’Ïç1—j5nUz@ݼEQ'OÞèí%µ´VU=4VJ¦ êæ%¤Òí:F>Ÿwæ ¾«z ÔÍKœ9#57çé{{ɬ¬r’Ä'|êæ$©ÉÉ)W«É¾/µµu^¿~Ÿû”LÔÍ JKeOŸvé}‰Ï7;}º‚ã|LÔÍ .]º|>þÇã™ñx·I’ºp¡ÊØ š&T—ntçNŸîÈ\FEeÿwÖ¬¿ÏÃÇÿ‘ò2E8ªK‰8:~™œüÉòå^ÆNÄÁ} aêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaÃKŸÓÖÓÓ“™™©R©Œ•©QPPðøñucgaˆÅâ7ÞxãÅ5¥Evv¶Ñò2=x<A˜; S!00P[*/­7½½½PTTd¤Üeûöí´6ðùaêaêaêaÃ0êæÑ£G .Öát¦'EQ;wîôóóÓi¿’w~†ñsö­­­‡Ïß@­­­‰D§=ÊŽùÆõF „‡‡Ÿÿ¾º»»ÀÁÁA§=ÊŽù´n(Š:}úô'Ÿ|²xñâÈÈÈÊÊÊ… RuöìÙÕ«W/Y²dÓ¦M×®]Ó^à·ß~ ‹ÅAAAùùù:>鞥¥¥!!!ï¿ÿþþýûÕjµvÄC‡………={öL£Ñdff†„„,^¼øóÏ?¯©©­û³Ï>€>ø@§Ý×®][»v­¯¯ï‡~˜‘‘$I;v, Àßß?11±³³³?£öÝ1mº!•Jª««èÿþý»wï¦])•J___™Lf óc€Aëæüùó?ýôSXXXzzúªU«àÂ… ééé‘‘‘ÁÁÁТR©âããýýýé[Ú½{·Þ£Œ3gÎ$&&&$$üþûïô,EQ)))R©tïÞ½ ;;["‘„‡‡§§§‡„„$''k{8xð äääè´õÒÕÕëîî~âĉõë×>|¸½½ýÔ©SÅÅʼn‰‰III>¿ªª Äb1AFŸà Z7MMMÚ¿ B¡]]]ãK`cÇŽMJJº}ûöG}´qãÆªª*½óâääD7œ[ZZèöÝ»w½¼¼˜_ñ–––¾ÑÙÁçó¢¢¢ÂÃÃ/^¼Hår9“†‹‹Ë¼yóú3j£ó]LÎÎ΃òoff6oÞ¼âââgÏžUTT,Z´HoÂÏa­;;»ºº:æòÏ?ÿ€ &Ü¿ÿâë'ÿúë/í!ÝÝÝ&>>>//oñâÅß|óMGGG_Ï tãáǶ¶¶t;!!aÓ¦MW®\©¬¬€‰'öÎŽîîîøøø+V¤¦¦nܸ‘6ÚÚÚ>~ü˜n×ÖÖÒ?½Fzsyò䉶g>Ÿ?(ÿ°`Á‚’’’«W¯¾ùæ›ööözæx~ 3hÝøùù:t¨´´´­­íúõë©©©àï’R^^®P(*++?®½¢±uëÖâââçÏŸ«Õj>ŸOïSçÏŸþü9Óí‡~xôèÑ;wÒÒÒÞ{ï=Úheeõúë¯íÝ»·§§gùòåÚÑ=ÊúÎÕjuoo/ŸÏïéé9vìtuu‰Åâ´´´û÷ï߿߾}r¹ô­­­ ??¿««KïSÂÀýÀÌ™3I’üñÇÅb1ãÁ¸óc˜Aÿý& €$É´·· …ˆˆˆ;vøûû“$™””ôìÙ3uëÖ}ÿý÷Ì ‹¯¿þ:%%¥¹¹ÙÑÑ1..ÎÂÂöìÙãåå5f̺ۢE‹6oÞ¬R©|||‚ƒƒ™¥‚‚‚ 322V­Z¥V«:ÔÚÚêææC¿/`µµõúõëwìØñÚk¯ùøøDEEeee©Tª­[·ªTª¹sçFDD@ppp_£@  =xðà‰'"##KJJXû33³ùóç_ºtiþüùŒãÎa^úžÄ¬¬¬€€€AÕQzôè’%K†Äóh §§§©©é—_~Yºt©±s(CsΰbÅ •JµmÛ¶öööI“&ùùù-[¶làÃÇŒ3¨þƒ¥¿sYájjjbbb–/_îå¥ÿ;`‡{~Xðo÷)d40\û2Ú@Ý l@Ý l@Ý lxeu3Rj$F(¯¦nF\ĈcëD]#áàà`ii©]ðvíZúˆ8::úÁƒ ×h€ððp¡PØÛÛ;@ÿLÄìÙ³ ÔHŒ8^MÝÐ5 {öìQ*•îîî´Q§†ÁÅÅ¥?£6j$⟩‘ …›7oŽûåžWsŸq5#ŽWs½Ñ®a8~ü8hÕ0Lœ8öíÛG—é525ÞÞÞÿX#aØ?hÕHpS¥Ï ¯¦nL¿Fb¤ƒçS\` FbD€çS\3k$ˆߧFzÄeÄëÆDôѳfÍ:{ö¬±³zpŸBØ€ºAØ€ºAØ€ºAØ ç¹øÜ¹sÜç˜2º'$ÚJû믿òx<#冘4›7oÖ– ¡sÞ‹ Ÿo6 n6 n6 n6 n6ü˜¿¯^âûw;IEND®B`‚pktools-2.6.6/doc/html/classSolver__NU__inherit__graph.png0000644000113200011300000000474012616110567020616 00000000000000‰PNG  IHDR`pn,âôbKGDÿÿÿ ½§“ •IDATxœíyLÛ€gÚ(¡!l‰%‚Èu#@©"š!@”M!†¢‰%l&*K4‘)0ÄÀ‹,‹A…x –Z…JØò((QY‚ÁBJ •–™÷ǘ±—'Zoiß»çûkæ,ßù˜³t¦3 8Ž#µ¡;S €‚Ðô«Æãñ†††þÞP Ч§'ŸÏ×£"ªß,†¢¨ŸŸŸ«««u7žÉÉÉÎÎN=çk\/úÕÝxÞ-…c( `@AJ¥2==}Û¶mt:Åbåää¨Tªµ øðEQã7z®ƒÖCJJÊøøxCCƒ««ëÐÐÇ“Ëå%%%†;¢AÐoòCÖ1ÍÛØØ«±XÌd2×*<<<¬w0@Ltšß¼ysYYÙׯ_‰]ÿññqb{~~>!!ÁÎÎÎÅÅ%==]»ë………¥¥¥Ûß¾}c0ÍÍÍ‚¨Õꌌ {{ûŒŒ µZMôJ¡PÈd2ÛÛÛ Õ ý¼"ë8ƒZZZœÍÍÍ=ZXX866FfÅÆÆr8œ‘‘©Têíí››KžA>d2™†á8þøñc'''µZãxAAADDÄÄÄ„T*Ý»wovv6QåøñãmmmJ¥ò‘üÎdØ•´F£éììÌÏÏ÷öö¦R©<Àq|yy™J¥e=z´}ûvRÐâ⢕•UWWŽã§OŸ¾rå QlÇŽ2™ŒØnmmݽ{7QE*•Ã0EAJ¥²¦¦F£Ñ»†]»vÍÙÙÇñÉÉIA–––ˆ,©Tjaa¡=ÅÄÄdff*•J++«÷ï߉Ú'¾µµ5Qeyy­)ŽAD;ˆ]E;¦Ñhqpp R©£££DÖÈȈ³³³vÝèèèúúú'OžìÛ·Åb‰vvvÃÃÃDÐsssDº™™™šð£%z€¬£‹={ÖÃã©©idd¤££ÃÏÏïÒ¥KDVLL ‡Ãعsçõë×µÏ blf±XÕÕÕä§ñx¼ÈÈȱ±±þþþ\¼xqýŸ)v1Ç5Mnn®NwssËÊÊ"»•\.·µµutt¼|ùòÒÒÒªÖr¹ÜM›6i½ …"11‘Á`ØÚÚr¹ÜÅÅÅÿyA¦ƒ)ŽAÿ7@A  P(  ÿ3¡P8??ÿ7†b8z{{õ¯¬ßòÉ@· --},-} ñÉ¿¸V÷kô¼³jVV°?þÈAD*ͧPLåú´ A¯_Ëår¥DòÁرüÀ„ÕÕõÐh33J]]·±cù©R©ÔÍÍýÍŠZ57÷«TjcGôSÔÖ6DJQ©Ômm¦òÛSÔÐÐCÞ8DQ´¡¡Ç¸ñ˜„ …BõüùÛ•ŒØ]YÁž?«P¬yv#1 Aþ9€aYm`ÞÒ2`¬x´1 Aõõ=«Vc8Ž××›D/3¾ ™™‰dÃ0íD Ã%’á™™cEEb|AMMÿþéºEѦ¦þgÆT[Û³j"À0ÌVŒF455'•N®!éïŸüôÉÈ øû õ0;«tr²! b­hañýf)…B™]pr²1Z|zÿNÚ@$'ÿ A;wÎ; 2q  P( €‚@A  P( €‚@A  P( €‚@A  P( €‚@A ´Ûºu«qƒ¡Ñìh4;ãÆàææ¶æu(ŠFEEyyy1>ãòöíÛºº:m'«Äéå帡A™6p €‚@At´´´T^^}ìØ±¸¸¸ªªªåååµ OMM±Ùìß‹ð'°ÙìÜÜ\í¹Fû@l6{jjjUùU)ëGçGø|þôôt~~þ–-[&&&ø|þÂÂÇÓïðz#‹E"QPP¡¤óÔÞÞž””Äb±lll|||x<^GG‡!"û5¡¡¡·oß–Ëå†>΂,-- ±ëããC¼! A¥RyëÖ­“'OFEE•——kw½«W¯–••Ûjµ:44”xÏŸF£©¨¨¯¨¨Ðh4Dgéëë;uêù–Áÿ&**ŠÉdúYeddôõõEFFfdd‚ééi2«¸¸xff¦¢¢¢   »»»¦¦†Ìâp8b±˜hLww·¹¹¹¯¯/‚ õõõ2™ìÎ;EEE}}}UUUDùÚÚÚììlò%Š?‰›BÉÎÎîíímiiѵ :¡³ ýû÷ ‚âââ]»vµ´´ÄÄÄ…BA4M[[[JJŠ£££»»{bbbkk+YëàÁƒ …âÝ»w‚…Â*•Š È³gÏRSSíííÝÝÝ“““»ººˆò\.wÏž=«Þ¾¹ .—[RRòåË][±~t¤U*•D" ôôôôôôŒ¯®®®¨¨àp8sss†999%gffÈŠæææ‡‹Ånnn‰¤²²’HÿüùsDDYÌÊÊŠØ`2™ë‰'<<üåË—………©©©ÚéÚýî7û ngŽã7nÜ ß2Š¢¨¯¯ïÊÊ ‚ ƒB¡Èd2"ëÓ§Ovvù^Nô²ŽŽ"ÑÚÚúþýû"‘H$=}ú”§h´uýåPÍÊÊljj"íííµ'õ‰‰ *•joo¯SKItD§Óƒƒƒóòò:;;e2Ù›7oÊËË9‚ 4Ífóù|™LöñãÇ»wï9rD»®¯¯¯R©¬®®>qâ™xøðáÊÊÊéééÑÑÑÌÌÌÆÆF]àèèxáÂ…ÚÚZ2%$$„Ïç¿~ýZ&“õõõݼy388XïW¾ê¼ÊÌ̼wï^eeåÔÔƒÁ`³Ù DVjjjiiéùóçÍÌÌ‚‚‚bccµ{F  …dâ¹sçJKK“’’Põ÷÷ONNžÕ5¤ÐÐÐW¯^õô|ÎþÌ™3t:½¼¼|zzÚÖÖ–ÃáÄÅÅéú™$«¯åääü“/w¼xñ"//OÛ ü.ÀÈO=ÿšµ¾Ç‰D¢ ‹Á¤m¤ˆµ€]  X½rwwg0F ȸÌÍÍŽŽ®y_,--ø§ÿd´wMëå&&ƒ@A  P€ÿÌÁQã9¢hIIEND®B`‚pktools-2.6.6/doc/html/bc_s.png0000644000113200011300000000124412647637661013273 00000000000000‰PNG  IHDR€_ kIDATxíËkQÆÏ¹É̤I&“¦mš&156*nÄ…”ܸR,4 +Hµ(U­b”ª1‚ŠˆJ.º(E·mßúhëJmKS'C›(‚èäÑ…¤ï &äÖþ ‡ïrÎåü3gö(z÷ýÒ&_9ó}’ÕŸ@‰mÚu ` Øh`ñ÷Ô¯  „ú&·ññ×Ù~“½—Üò‡ÎÝÑM4¸%‰3²§?Êêh)€ÿù™\ÄYi>Jb @gûßiÞˆú²Ñkg§ãê\è½­šEUæv+?E€î"pæÖÛB\ƒY&ðØó$vM+ê’Dn¼)}òþ:§Xoâ ƒ3ŠÚ¯'¯¿.‚fÁ0ìuŠ9òLýj€f6¸%«3Gf”Ô#Ôsm(,ùÃk*Ê’³Jª…¯¼JË¢o䆔¼u_~ °r]%%mnu]z°r5[ÍÆ°«Úò•Xeµ’†Iù<ÈèÐÅg@IÔÚÞàµë3‚:/<JÇ’ÐQ) ñ¹…tÚß÷(Mû\63éCgl!ýí;ÿ¸4Ùhâñ=÷Zë29­w’ÝÒ´·ˆV;ÊL3ƒj&7©·º½÷a!I†)ëë$-öÇÓú³›‹7tIV¾VàñÔübf¨8¡ÈƒB<﫵imnÿœÈ‡„ lߣù‡ÛD —#É5“­'Æ4?쬲øM’™›°»g¬‚|5Åçµ½GNdÓÐr|ô”Ã&„ì"7+'³@ 5‡G➑Džâɬ^;õã–.3Òr"ý_R³¿Â@²oI¾å$IEND®B`‚pktools-2.6.6/doc/html/pkstatascii_8cc_source.html0000644000113200011300000022366312647637662017215 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkstatascii.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkstatascii.cc
1 /**********************************************************************
2 pkstatascii.cc: program to calculate basic statistics from text file
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <fstream>
22 #include <vector>
23 #include <math.h>
24 #include "base/Optionpk.h"
25 #include "fileclasses/FileReaderAscii.h"
26 #include "algorithms/StatFactory.h"
27 /******************************************************************************/
90 using namespace std;
91 
92 int main(int argc, char *argv[])
93 {
94  Optionpk<string> input_opt("i","input","name of the input text file");
95  Optionpk<char> fs_opt("fs","fs","field separator.",' ');
96  Optionpk<char> comment_opt("comment","comment","comment character",'#');
97  Optionpk<bool> output_opt("o","output","output the selected columns",false);
98  Optionpk<bool> transpose_opt("t","transpose","transpose input ascii vector (use in combination with --output)",false);
99  Optionpk<int> col_opt("c", "column", "column nr, starting from 0", 0);
100  Optionpk<int> range_opt("r", "range", "rows to start/end reading. Use -r 1 -r 10 to read first 10 rows where first row is header. Use 0 to read all rows with no header.", 0);
101  Optionpk<bool> size_opt("size","size","sample size",false);
102  Optionpk<unsigned int> rand_opt("rnd", "rnd", "generate random numbers", 0);
103  Optionpk<std::string> randdist_opt("dist", "dist", "distribution for generating random numbers, see http://www.gn/software/gsl/manual/gsl-ref_toc.html#TOC320 (only uniform and Gaussian supported yet)", "gaussian");
104  Optionpk<double> randa_opt("rnda", "rnda", "first parameter for random distribution (mean value in case of Gaussian)", 0);
105  Optionpk<double> randb_opt("rndb", "rndb", "second parameter for random distribution (standard deviation in case of Gaussian)", 1);
106  Optionpk<bool> mean_opt("mean","mean","calculate median",false);
107  Optionpk<bool> median_opt("median","median","calculate median",false);
108  Optionpk<bool> var_opt("var","var","calculate variance",false);
109  Optionpk<bool> skewness_opt("skew","skewness","calculate skewness",false);
110  Optionpk<bool> kurtosis_opt("kurt","kurtosis","calculate kurtosis",false);
111  Optionpk<bool> stdev_opt("stdev","stdev","calculate standard deviation",false);
112  Optionpk<bool> sum_opt("sum","sum","calculate sum of column",false);
113  Optionpk<bool> minmax_opt("mm","minmax","calculate minimum and maximum value",false);
114  Optionpk<bool> min_opt("min","min","calculate minimum value",false);
115  Optionpk<bool> max_opt("max","max","calculate maximum value",false);
116  Optionpk<double> src_min_opt("src_min","src_min","start reading source from this minimum value");
117  Optionpk<double> src_max_opt("src_max","src_max","stop reading source from this maximum value");
118  Optionpk<bool> histogram_opt("hist","hist","calculate histogram",false);
119  Optionpk<bool> histogram2d_opt("hist2d","hist2d","calculate 2-dimensional histogram based on two columns",false);
120  Optionpk<short> nbin_opt("nbin","nbin","number of bins to calculate histogram");
121  Optionpk<bool> relative_opt("rel","relative","use percentiles for histogram to calculate histogram",false);
122  Optionpk<bool> kde_opt("kde","kde","Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb",false);
123  Optionpk<bool> correlation_opt("cor","correlation","calculate Pearson produc-moment correlation coefficient between two columns (defined by -c <col1> -c <col2>",false);
124  Optionpk<bool> rmse_opt("rmse","rmse","calculate root mean square error between two columns (defined by -c <col1> -c <col2>",false);
125  Optionpk<bool> reg_opt("reg","regression","calculate linear regression between two columns and get correlation coefficient (defined by -c <col1> -c <col2>",false);
126  Optionpk<bool> regerr_opt("regerr","regerr","calculate linear regression between two columns and get root mean square error (defined by -c <col1> -c <col2>",false);
127  Optionpk<short> verbose_opt("v", "verbose", "verbose mode when positive", 0,2);
128 
129  src_min_opt.setHide(1);
130  src_max_opt.setHide(1);
131  fs_opt.setHide(1);
132  range_opt.setHide(1);
133  output_opt.setHide(1);
134  transpose_opt.setHide(1);
135  comment_opt.setHide(1);
136 
137  bool doProcess;//stop process when program was invoked with help option (-h --help)
138  try{
139  //mandatory options
140  doProcess=input_opt.retrieveOption(argc,argv);
141  col_opt.retrieveOption(argc,argv);
142  //optional options
143  size_opt.retrieveOption(argc,argv);
144  rand_opt.retrieveOption(argc,argv);
145  randdist_opt.retrieveOption(argc,argv);
146  randa_opt.retrieveOption(argc,argv);
147  randb_opt.retrieveOption(argc,argv);
148  mean_opt.retrieveOption(argc,argv);
149  median_opt.retrieveOption(argc,argv);
150  var_opt.retrieveOption(argc,argv);
151  stdev_opt.retrieveOption(argc,argv);
152  skewness_opt.retrieveOption(argc,argv);
153  kurtosis_opt.retrieveOption(argc,argv);
154  sum_opt.retrieveOption(argc,argv);
155  minmax_opt.retrieveOption(argc,argv);
156  min_opt.retrieveOption(argc,argv);
157  max_opt.retrieveOption(argc,argv);
158  histogram_opt.retrieveOption(argc,argv);
159  nbin_opt.retrieveOption(argc,argv);
160  relative_opt.retrieveOption(argc,argv);
161  kde_opt.retrieveOption(argc,argv);
162  histogram2d_opt.retrieveOption(argc,argv);
163  correlation_opt.retrieveOption(argc,argv);
164  rmse_opt.retrieveOption(argc,argv);
165  reg_opt.retrieveOption(argc,argv);
166  regerr_opt.retrieveOption(argc,argv);
167  //advanced options
168  src_min_opt.retrieveOption(argc,argv);
169  src_max_opt.retrieveOption(argc,argv);
170  fs_opt.retrieveOption(argc,argv);
171  range_opt.retrieveOption(argc,argv);
172  output_opt.retrieveOption(argc,argv);
173  transpose_opt.retrieveOption(argc,argv);
174  comment_opt.retrieveOption(argc,argv);
175  verbose_opt.retrieveOption(argc,argv);
176  }
177  catch(string predefinedString){
178  std::cout << predefinedString << std::endl;
179  exit(0);
180  }
181  if(!doProcess){
182  cout << endl;
183  cout << "Usage: pkstatascii -i input [-c column]*" << endl;
184  cout << endl;
185  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
186  exit(0);//help was invoked, stop processing
187  }
188 
189  if(src_min_opt.size()){
190  while(src_min_opt.size()<col_opt.size())
191  src_min_opt.push_back(src_min_opt[0]);
192  }
193  if(src_max_opt.size()){
194  while(src_max_opt.size()<col_opt.size())
195  src_max_opt.push_back(src_max_opt[0]);
196  }
198  if(rand_opt[0]>0){
199  gsl_rng* r=stat.getRandomGenerator(time(NULL));
200  //todo: init random number generator using time...
201  if(verbose_opt[0])
202  std::cout << "generating " << rand_opt[0] << " random numbers: " << std::endl;
203  for(unsigned int i=0;i<rand_opt[0];++i)
204  std::cout << i << " " << stat.getRandomValue(r,randdist_opt[0],randa_opt[0],randb_opt[0]) << std::endl;
205  }
206  vector< vector<double> > dataVector(col_opt.size());
207  vector< vector<double> > statVector(col_opt.size());
208 
209  if(!input_opt.size())
210  exit(0);
211  FileReaderAscii asciiReader(input_opt[0]);
212  asciiReader.setFieldSeparator(fs_opt[0]);
213  asciiReader.setComment(comment_opt[0]);
214  asciiReader.setMinRow(range_opt[0]);
215  if(range_opt.size()>1)
216  asciiReader.setMaxRow(range_opt[1]);
217  asciiReader.readData(dataVector,col_opt);
218  assert(dataVector.size());
219  double minValue=0;
220  double maxValue=0;
221  unsigned int nbin=0;
222  if(nbin_opt.size())
223  nbin=nbin_opt[0];
224  if(histogram_opt[0]){
225  stat.minmax(dataVector[0],dataVector[0].begin(),dataVector[0].end(),minValue,maxValue);
226  if(src_min_opt.size())
227  minValue=src_min_opt[0];
228  if(src_max_opt.size())
229  maxValue=src_max_opt[0];
230  if(nbin<1){
231  std::cerr << "Warning: number of bins not defined, calculating bins from min and max value" << std::endl;
232  nbin=maxValue-minValue+1;
233  }
234  }
235  double minX=0;
236  double minY=0;
237  double maxX=0;
238  double maxY=0;
239  if(histogram2d_opt[0]){
240  assert(col_opt.size()==2);
241  if(nbin<1){
242  std::cerr << "Warning: number of bins not defined, calculating bins from min and max value" << std::endl;
243  stat.minmax(dataVector[0],dataVector[0].begin(),dataVector[0].end(),minX,maxX);
244  stat.minmax(dataVector[1],dataVector[1].begin(),dataVector[1].end(),minY,maxY);
245  if(src_min_opt.size())
246  minX=src_min_opt[0];
247  if(src_min_opt.size()>1)
248  minY=src_min_opt[1];
249  if(src_max_opt.size())
250  maxX=src_max_opt[0];
251  if(src_max_opt.size()>1)
252  maxY=src_max_opt[1];
253  minValue=(minX<minY)? minX:minY;
254  maxValue=(maxX>maxY)? maxX:maxY;
255  if(verbose_opt[0])
256  std::cout << "min and max values: " << minValue << ", " << maxValue << std::endl;
257  nbin=maxValue-minValue+1;
258  }
259  }
260  for(int icol=0;icol<col_opt.size();++icol){
261  if(!dataVector[icol].size()){
262  std::cerr << "Warning: dataVector[" << icol << "] is empty" << std::endl;
263  continue;
264  }
265  if(size_opt[0])
266  cout << "sample size column " << col_opt[icol] << ": " << dataVector[icol].size() << endl;
267  if(mean_opt[0])
268  cout << "mean value column " << col_opt[icol] << ": " << stat.mean(dataVector[icol]) << endl;
269  if(var_opt[0])
270  cout << "variance value column " << col_opt[icol] << ": " << stat.var(dataVector[icol]) << endl;
271  if(stdev_opt[0])
272  cout << "standard deviation column " << col_opt[icol] << ": " << sqrt(stat.var(dataVector[icol])) << endl;
273  if(skewness_opt[0])
274  cout << "skewness value column " << col_opt[icol] << ": " << stat.skewness(dataVector[icol]) << endl;
275  if(kurtosis_opt[0])
276  cout << "kurtosis value column " << col_opt[icol] << ": " << stat.kurtosis(dataVector[icol]) << endl;
277  if(sum_opt[0]){
278  cout << setprecision(2);
279  cout << fixed << "sum column " << col_opt[icol] << ": " << (stat.sum(dataVector[icol])) << endl;
280  }
281  if(median_opt[0])
282  cout << "median value column " << col_opt[icol] << ": " << stat.median(dataVector[icol]) << endl;
283  if(minmax_opt[0]){
284  cout << "min value column " << col_opt[icol] << ": " << stat.mymin(dataVector[icol]) << endl;
285  cout << "max value column " << col_opt[icol] << ": " << stat.mymax(dataVector[icol]) << endl;
286  }
287  if(min_opt[0])
288  cout << "min value column " << col_opt[icol] << ": " << stat.mymin(dataVector[icol]) << endl;
289  if(max_opt[0])
290  cout << "max value column " << col_opt[icol] << ": " << stat.mymax(dataVector[icol]) << endl;
291  if(histogram_opt[0]){
292  //todo: support kernel density function and estimate sigma as in practical estimate of the bandwith in http://en.wikipedia.org/wiki/Kernel_density_estimation
293  double sigma=0;
294  if(kde_opt[0]){//.size()){
295  // if(kde_opt[0]>0)
296  // sigma=kde_opt[0];
297  // else
298  sigma=1.06*sqrt(stat.var(dataVector[icol]))*pow(dataVector[icol].size(),-0.2);
299  }
300  assert(nbin);
301  if(verbose_opt[0]){
302  if(sigma>0)
303  std::cout << "calculating kernel density estimate with sigma " << sigma << " for col " << icol << std::endl;
304  else
305  std::cout << "calculating histogram for col " << icol << std::endl;
306  }
307  //test
308  // cout << "debug0" << endl;
309  // cout << "dataVector.size(): " << dataVector.size() << endl;
310  // cout << "statVector.size(): " << statVector.size() << endl;
311 
312  // double theMinValue=0;
313  // double theMaxValue=0;
314 
315  // stat.minmax(dataVector[icol],dataVector[icol].begin(),dataVector[icol].end(),theMinValue,theMaxValue);
316  // if(minValue<maxValue&&minValue>theMinValue)
317  // theMinValue=minValue;
318  // if(minValue<maxValue&&maxValue<theMaxValue)
319  // theMaxValue=maxValue;
320 
321  // //todo: check...
322  // minValue=theMinValue;
323  // maxValue=theMaxValue;
324 
325  // if(maxValue<=minValue){
326  // std::ostringstream s;
327  // s<<"Error: could not calculate distribution (min>=max)";
328  // throw(s.str());
329  // }
330  // assert(nbin);
331  // assert(dataVector[icol].size());
332  // if(statVector[icol].size()!=nbin){
333  // statVector[icol].resize(nbin);
334  // for(int i=0;i<nbin;statVector[icol][i++]=0);
335  // }
336  // typename std::vector<double>::const_iterator it;
337  // for(it=dataVector[icol].begin();it!=dataVector[icol].end();++it){
338  // if(*it<minValue)
339  // continue;
340  // if(*it>maxValue)
341  // continue;
342  // if(stat.isNoData(*it))
343  // continue;
344  // int theBin=0;
345  // if(*it==maxValue)
346  // theBin=nbin-1;
347  // else if(*it>minValue && *it<maxValue)
348  // theBin=static_cast<int>(static_cast<double>((nbin-1)*(*it)-minValue)/(maxValue-minValue));
349  // assert(theBin<statVector[icol].size());
350  // ++statVector[icol][theBin];
351  // // if(*it==maxValue)
352  // // ++statVector[icol][nbin-1];
353  // // else if(*it>=minValue && *it<maxValue)
354  // // ++statVector[icol][static_cast<int>(static_cast<double>((*it)-minValue)/(maxValue-minValue)*nbin)];
355  // }
356 
357  // exit(0);
358  //end test
359 
360  stat.distribution(dataVector[icol],dataVector[icol].begin(),dataVector[icol].end(),statVector[icol],nbin,minValue,maxValue,sigma);
361  if(verbose_opt[0])
362  std::cout << "min and max values: " << minValue << ", " << maxValue << std::endl;
363  }
364  }
365  if(correlation_opt[0]){
366  assert(dataVector.size()==2);
367  cout << "correlation between columns " << col_opt[0] << " and " << col_opt[1] << ": " << stat.correlation(dataVector[0],dataVector[1]) << endl;
368  }
369  if(rmse_opt[0]){
370  assert(dataVector.size()==2);
371  cout << "root mean square error between columns " << col_opt[0] << " and " << col_opt[1] << ": " << stat.rmse(dataVector[0],dataVector[1]) << endl;
372  }
373  if(reg_opt[0]){
374  assert(dataVector.size()==2);
375  double c0=0;
376  double c1=0;
377  double r2=stat.linear_regression(dataVector[0],dataVector[1],c0,c1);
378  cout << "linear regression between columns: " << col_opt[0] << " and " << col_opt[1] << ": " << c0 << "+" << c1 << " * x " << " with R^2 (square correlation coefficient): " << r2 << endl;
379  }
380  if(regerr_opt[0]){
381  assert(dataVector.size()==2);
382  double c0=0;
383  double c1=0;
384  double err=stat.linear_regression_err(dataVector[0],dataVector[1],c0,c1);
385  if(verbose_opt[0])
386  cout << "linear regression between columns: " << col_opt[0] << " and " << col_opt[1] << ": " << c0 << "+" << c1 << " * x " << " with rmse: " << err << endl;
387  else
388  cout << c0 << " " << c1 << " " << err << endl;
389  }
390  if(histogram_opt[0]){
391  for(int irow=0;irow<statVector.begin()->size();++irow){
392  double binValue=0;
393  if(nbin==maxValue-minValue+1)
394  binValue=minValue+irow;
395  else
396  binValue=minValue+static_cast<double>(maxValue-minValue)*(irow+0.5)/nbin;
397  std::cout << binValue << " ";
398  // std::cout << minValue+static_cast<double>(maxValue-minValue)*(irow+0.5)/nbin << " ";
399  for(int icol=0;icol<col_opt.size();++icol){
400  if(relative_opt[0])
401  std::cout << 100.0*static_cast<double>(statVector[icol][irow])/static_cast<double>(dataVector[icol].size());
402  else
403  std::cout << statVector[icol][irow];
404  if(icol<col_opt.size()-1)
405  cout << " ";
406  }
407  cout << endl;
408  }
409  }
410  if(histogram2d_opt[0]){
411  assert(nbin);
412  assert(dataVector.size()==2);
413  assert(dataVector[0].size()==dataVector[1].size());
414  double sigma=0;
415  //kernel density estimation as in http://en.wikipedia.org/wiki/Kernel_density_estimation
416  if(kde_opt[0]){
417  // if(kde_opt[0]>0)
418  // sigma=kde_opt[0];
419  // else
420  sigma=1.06*sqrt(sqrt(stat.var(dataVector[0]))*sqrt(stat.var(dataVector[1])))*pow(dataVector[0].size(),-0.2);
421  }
422  assert(nbin);
423  if(verbose_opt[0]){
424  if(sigma>0)
425  std::cout << "calculating 2d kernel density estimate with sigma " << sigma << " for cols " << col_opt[0] << " and " << col_opt[1] << std::endl;
426  else
427  std::cout << "calculating 2d histogram for cols " << col_opt[0] << " and " << col_opt[1] << std::endl;
428  std::cout << "nbin: " << nbin << std::endl;
429  }
430  std::vector< std::vector<double> > histVector;
431  stat.distribution2d(dataVector[0],dataVector[1],histVector,nbin,minX,maxX,minY,maxY,sigma);
432  for(int binX=0;binX<nbin;++binX){
433  std::cout << std::endl;
434  for(int binY=0;binY<nbin;++binY){
435  double binValueX=0;
436  if(nbin==maxX-minX+1)
437  binValueX=minX+binX;
438  else
439  binValueX=minX+static_cast<double>(maxX-minX)*(binX+0.5)/nbin;
440  double binValueY=0;
441  if(nbin==maxY-minY+1)
442  binValueY=minY+binY;
443  else
444  binValueY=minY+static_cast<double>(maxY-minY)*(binY+0.5)/nbin;
445  double value=0;
446  value=static_cast<double>(histVector[binX][binY])/dataVector[0].size();
447  std::cout << binValueX << " " << binValueY << " " << value << std::endl;
448  // std::cout << minX+static_cast<double>(maxX-minX)*(binX+0.5)/nbin << " " << minY+static_cast<double>(maxY-minY)*(binY+0.5)/nbin << " " << value << std::endl;
449  }
450  }
451  }
452 
453  if(output_opt[0]){
454  if(transpose_opt[0]){
455  for(int icol=0;icol<col_opt.size();++icol){
456  for(int irow=0;irow<dataVector.begin()->size();++irow){
457  cout << dataVector[icol][irow];
458  if(irow<dataVector.begin()->size()-1)
459  cout << " ";
460  }
461  cout << endl;
462  }
463  }
464  else{
465  for(int irow=0;irow<dataVector.begin()->size();++irow){
466  for(int icol=0;icol<col_opt.size();++icol){
467  cout << dataVector[icol][irow];
468  if(icol<col_opt.size()-1)
469  cout << " ";
470  }
471  cout << endl;
472  }
473  }
474  }
475 }
pktools-2.6.6/doc/html/dir_b7cc22b4453454f1e686d9a2e78d988d_dep.md50000644000113200011300000000004012616110567020256 0000000000000040d7a54b1a14c4a5188ebe70da9adad6pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__grid_1_1pkextract__grid__coll__graph.map0000644000113200011300000000015712616110567030364 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract.html0000644000113200011300000002644012647637662021520 00000000000000 pktools: qgis.pkextract.pkextract Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pkextract.pkextract:
Collaboration diagram for qgis.pkextract.pkextract:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string SAMPLE = "SAMPLE"
 
string ITERATE = "ITERATE"
 
string OUTPUT = "OUTPUT"
 
list RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'count', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
 
string RULE = "RULE"
 
string POLYGON = "POLYGON"
 
string BUFFER = "BUFFER"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string EXTRA = 'EXTRA'
 
string FORMAT = "FORMAT"
 

Detailed Description

Definition at line 87 of file pkextract.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm__coll__graph.md50000644000113200011300000000004012616110566022164 00000000000000cf11085ef0104b77bc12740aee8128cbpktools-2.6.6/doc/html/ImgWriterOgr_8cc_source.html0000644000113200011300000032176212647637662017256 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgWriterOgr.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgWriterOgr.cc
1 /**********************************************************************
2 ImgWriterOgr.cc: class to write vector files using OGR API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <fstream>
22 #include <sstream>
23 #include "ImgReaderOgr.h"
24 #include "ImgWriterOgr.h"
25 #include "ImgReaderGdal.h"
26 #include "cpl_string.h"
27 //---------------------------------------------------------------------------
28 ImgWriterOgr::ImgWriterOgr(void)
29 {}
30 
31 ImgWriterOgr::~ImgWriterOgr(void)
32 {
33 }
34 
35 ImgWriterOgr::ImgWriterOgr(const std::string& filename, const std::string& imageType)
36 {
37  open(filename,imageType);
38 }
39 
40 ImgWriterOgr::ImgWriterOgr(const std::string& filename, ImgReaderOgr& imgReaderOgr)
41 {
42  m_filename=filename;
43  setCodec(imgReaderOgr.getDriver());
44  int nlayer=imgReaderOgr.getDataSource()->GetLayerCount();
45  for(int ilayer=0;ilayer<nlayer;++ilayer){
46  std::string layername = imgReaderOgr.getLayer(ilayer)->GetName();
47  createLayer(layername,imgReaderOgr.getProjection(),imgReaderOgr.getGeometryType(),NULL);
48  copyFields(imgReaderOgr,ilayer,ilayer);
49  }
50 }
51 
52 ImgWriterOgr::ImgWriterOgr(const std::string& filename, ImgReaderOgr& imgReaderOgr, bool copyData)
53 {
54  CPLErrorReset();
55  m_filename=filename;
56  setCodec(imgReaderOgr.getDriver());
57  int nlayer=imgReaderOgr.getDataSource()->GetLayerCount();
58  for(int ilayer=0;ilayer<nlayer;++ilayer){
59  std::string layername = imgReaderOgr.getLayer(ilayer)->GetName();
60  createLayer(layername,imgReaderOgr.getProjection(),imgReaderOgr.getGeometryType(),NULL);
61  copyFields(imgReaderOgr,ilayer,ilayer);
62  if(copyData){
63  OGRFeature *poFeature;
64  while(true){// (poFeature = imgReaderOgr.getLayer()->GetNextFeature()) != NULL ){
65  poFeature = imgReaderOgr.getLayer(ilayer)->GetNextFeature();
66  if( poFeature == NULL )
67  break;
68  OGRFeature *poDstFeature = NULL;
69 
70  poDstFeature=createFeature(ilayer);
71  //todo: check here if SetFrom works (experienced segmentation fault)
72  if( poDstFeature->SetFrom( poFeature, TRUE ) != OGRERR_NONE ){
73  const char* fmt;
74  std::string errorString="Unable to translate feature %d from layer %s.\n";
75  fmt=errorString.c_str();
76  CPLError( CE_Failure, CPLE_AppDefined,
77  fmt,
78  poFeature->GetFID(), getLayerName().c_str() );
79  // CPLError( CE_Failure, CPLE_AppDefined,
80  // "Unable to translate feature %d from layer %s.\n",
81  // poFeature->GetFID(), getLayerName().c_str() );
82 
83  OGRFeature::DestroyFeature( poFeature );
84  OGRFeature::DestroyFeature( poDstFeature );
85  }
86  poDstFeature->SetFID( poFeature->GetFID() );
87  OGRFeature::DestroyFeature( poFeature );
88 
89  CPLErrorReset();
90  if(createFeature( poDstFeature,ilayer ) != OGRERR_NONE){
91  const char* fmt;
92  std::string errorString="Unable to translate feature %d from layer %s.\n";
93  fmt=errorString.c_str();
94  CPLError( CE_Failure, CPLE_AppDefined,
95  fmt,
96  poFeature->GetFID(), getLayerName().c_str() );
97  OGRFeature::DestroyFeature( poDstFeature );
98  }
99  OGRFeature::DestroyFeature( poDstFeature );
100  }
101  }
102  }
103 }
104 
105 //---------------------------------------------------------------------------
106 
107 void ImgWriterOgr::open(const std::string& filename, ImgReaderOgr& imgReaderOgr)
108 {
109  m_filename=filename;
110  setCodec(imgReaderOgr.getDriver());
111  int nlayer=imgReaderOgr.getDataSource()->GetLayerCount();
112  for(int ilayer=0;ilayer<nlayer;++ilayer){
113  std::string layername = imgReaderOgr.getLayer(ilayer)->GetName();
114  createLayer(layername,imgReaderOgr.getProjection(),imgReaderOgr.getGeometryType(),NULL);
115  copyFields(imgReaderOgr,ilayer,ilayer);
116  }
117 }
118 
119 void ImgWriterOgr::open(const std::string& filename, const std::string& imageType)
120 {
121  m_filename = filename;
122  setCodec(imageType);
123 }
124 
125 //---------------------------------------------------------------------------
126 void ImgWriterOgr::close(void)
127 {
128 #if GDAL_VERSION_MAJOR < 2
129  OGRDataSource::DestroyDataSource(m_datasource);
130 #else
131  GDALClose(m_datasource);
132 #endif
133 }
134 
135 //---------------------------------------------------------------------------
136 void ImgWriterOgr::setCodec(const std::string& imageType){
137 #if GDAL_VERSION_MAJOR < 2
138  //register the drivers
139  OGRRegisterAll();
140  //fetch the OGR file driver
141  OGRSFDriver *poDriver;
142  poDriver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(imageType.c_str());
143 #else
144  //register the drivers
145  GDALAllRegister();
146  GDALDriver *poDriver;
147  poDriver = GetGDALDriverManager()->GetDriverByName(imageType.c_str());
148 #endif
149  if( poDriver == NULL ){
150  std::string errorString="FileOpenError";
151  throw(errorString);
152  }
153 #if GDAL_VERSION_MAJOR < 2
154  m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), TRUE );
155 #else
156  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_UPDATE, NULL, NULL, NULL);
157 #endif
158  if( m_datasource == NULL ){
159 #if GDAL_VERSION_MAJOR < 2
160  m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), FALSE );
161 #else
162  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_READONLY, NULL, NULL, NULL);
163 #endif
164  if ( m_datasource != NULL){// we can only open in not update mode
165  std::string errorString="Update mode not supported, delete output dataset first";
166  throw(errorString);
167 #if GDAL_VERSION_MAJOR < 2
168  OGRDataSource::DestroyDataSource(m_datasource);
169 #else
170  GDALClose(m_datasource);
171 #endif
172  m_datasource = NULL;
173  }
174  else //create the data source
175 #if GDAL_VERSION_MAJOR < 2
176  m_datasource=poDriver->CreateDataSource(m_filename.c_str(),NULL);
177 #else
178  m_datasource=poDriver->Create(m_filename.c_str(),0,0,0,GDT_Unknown,NULL);
179 #endif
180  }
181  else{//datasets exists, always overwrite all layers (no update append for now)
182  int nLayerCount = m_datasource->GetLayerCount();
183  for(int iLayer = 0; iLayer < nLayerCount; ++iLayer){
184  if(m_datasource->DeleteLayer(iLayer)!=OGRERR_NONE){
185  std::string errorstring="DeleteLayer() failed when overwrite requested";
186  throw(errorstring);
187  }
188  }
189  }
190  if(m_datasource==NULL){
191  std::string errorString="Creation of output file failed";
192  throw(errorString);
193  }
194 }
195 
196 #if GDAL_VERSION_MAJOR < 2
197 void ImgWriterOgr::setCodec(OGRSFDriver *poDriver){
198  OGRRegisterAll();
199 #else
200 void ImgWriterOgr::setCodec(GDALDriver *poDriver){
201  GDALAllRegister();
202 #endif
203  if( poDriver == NULL ){
204  std::string errorString="FileOpenError";
205  throw(errorString);
206  }
207 #if GDAL_VERSION_MAJOR < 2
208  m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), TRUE );
209 #else
210  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_UPDATE, NULL, NULL, NULL);
211 #endif
212  if( m_datasource == NULL ){
213 #if GDAL_VERSION_MAJOR < 2
214  m_datasource = OGRSFDriverRegistrar::Open( m_filename.c_str(), FALSE );
215 #else
216  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_READONLY, NULL, NULL, NULL);
217 #endif
218  if ( m_datasource != NULL){// we can only open in not update mode
219  std::string errorString="Update mode not supported, delete output dataset first";
220  throw(errorString);
221 #if GDAL_VERSION_MAJOR < 2
222  OGRDataSource::DestroyDataSource(m_datasource);
223 #else
224  GDALClose(m_datasource);
225 #endif
226  m_datasource = NULL;
227  }
228  else //create the data source
229 #if GDAL_VERSION_MAJOR < 2
230  m_datasource=poDriver->CreateDataSource(m_filename.c_str(),NULL);
231 #else
232  m_datasource=poDriver->Create(m_filename.c_str(),0,0,0,GDT_Unknown,NULL);
233 #endif
234  }
235  else{//datasets exists, always overwrite all layers (no update append for now)
236  int nLayerCount = m_datasource->GetLayerCount();
237  for(int iLayer = 0; iLayer < nLayerCount; ++iLayer){
238  if(m_datasource->DeleteLayer(iLayer)!=OGRERR_NONE){
239  std::string errorstring="DeleteLayer() failed when overwrite requested";
240  throw(errorstring);
241  }
242  }
243  }
244  if(m_datasource==NULL){
245  std::string errorString="Creation of output file failed";
246  throw(errorString);
247  }
248 }
249 
250 // OGRLayer* ImgWriterOgr::copyLayer(OGRLayer* poSrcLayer, const std::string& layername, char** papszOptions)
251 // {
252 // return(m_datasource->CopyLayer(poSrcLayer, layername.c_str(),papszOptions));
253 // }
254 
255 OGRLayer* ImgWriterOgr::createLayer(const std::string& layername, const std::string& theProjection, const OGRwkbGeometryType& eGType, char** papszOptions)
256 {
257  if( !m_datasource->TestCapability( ODsCCreateLayer ) ){
258  std::string errorString="Test capability to create layer failed";
259  throw(errorString);
260  }
261  //papszOptions = CSLSetNameValue( papszOptions, "DIM", "1" );
262  //if points: use wkbPoint
263  //if no constraints on the types geometry to be written: use wkbUnknown
264  OGRLayer* poLayer;
265 
266  OGRSpatialReference oSRS;
267 
268  if(theProjection!=""){
269  oSRS.SetFromUserInput(theProjection.c_str());
270  poLayer=m_datasource->CreateLayer( layername.c_str(), &oSRS, eGType,papszOptions );
271  // if(theProjection.find("EPSPG:")!=std::string::npos){
272  // int epsg_code=atoi(theProjection.substr(theProjection.find_first_not_of("EPSG:")).c_str());
273  // OGRSpatialReference oSRS;
274  // oSRS.importFromEPSG(epsg_code);
275  // poLayer=m_datasource->CreateLayer( layername.c_str(), &oSRS, eGType,papszOptions );
276  // }
277  // else{
278  // OGRSpatialReference oSRS(theProjection.c_str());
279  // poLayer=m_datasource->CreateLayer( layername.c_str(), &oSRS, eGType,papszOptions );
280  // }
281  // }
282  // oSRS.importFromProj4(theProjection);
283  }
284  else
285  poLayer=m_datasource->CreateLayer( layername.c_str(), NULL, eGType,papszOptions );
286  //check if destroy is needed?!
287  CSLDestroy( papszOptions );
288  if( poLayer == NULL ){
289  std::string errorstring="Layer creation failed";
290  throw(errorstring);
291  }
292  // OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
293  return poLayer;
294 }
295 
296 void ImgWriterOgr::createField(const std::string& fieldname, const OGRFieldType& fieldType, int theLayer)
297 {
298  OGRFieldDefn oField( fieldname.c_str(), fieldType );
299  if(fieldType==OFTString)
300  oField.SetWidth(32);
301  if(theLayer<0)
302  theLayer=m_datasource->GetLayerCount()-1;//get back layer
303  if(m_datasource->GetLayer(theLayer)->CreateField( &oField ) != OGRERR_NONE ){
304  std::ostringstream es;
305  es << "Creating field " << fieldname << " failed";
306  std::string errorString=es.str();
307  throw(errorString);
308  }
309 }
310 
311 int ImgWriterOgr::getFields(std::vector<std::string>& fields, int layer) const
312 {
313  if(layer<0)
314  layer=m_datasource->GetLayerCount()-1;
315  assert(m_datasource->GetLayerCount()>layer);
316  OGRLayer *poLayer;
317  if((poLayer = m_datasource->GetLayer(layer))==NULL){
318  std::string errorstring="Could not get layer";
319  throw(errorstring);
320  }
321  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
322  fields.clear();
323  fields.resize(poFDefn->GetFieldCount());
324  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
325  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
326  fields[iField]=poFieldDefn->GetNameRef();
327  }
328  return(fields.size());
329 }
330 
331 int ImgWriterOgr::getFields(std::vector<OGRFieldDefn*>& fields, int layer) const
332 {
333  if(layer<0)
334  layer=m_datasource->GetLayerCount()-1;
335  assert(m_datasource->GetLayerCount()>layer);
336  OGRLayer *poLayer;
337  if((poLayer = m_datasource->GetLayer(layer))==NULL){
338  std::string errorstring="Could not get layer";
339  throw(errorstring);
340  }
341  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
342  fields.clear();
343  fields.resize(poFDefn->GetFieldCount());
344  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
345  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
346  fields[iField]=poFDefn->GetFieldDefn(iField);
347  }
348  assert(fields.size()==getFieldCount(layer));
349  return(fields.size());
350 }
351 
352 void ImgWriterOgr::copyFields(const ImgReaderOgr& imgReaderOgr, int srcLayer, int targetLayer){
353  if(targetLayer<0)
354  targetLayer=m_datasource->GetLayerCount()-1;//get back layer
355  //get fields from imgReaderOgr
356  std::vector<OGRFieldDefn*> fields;
357 
358  imgReaderOgr.getFields(fields,srcLayer);
359  for(int iField=0;iField<fields.size();++iField){
360  if(m_datasource->GetLayer(targetLayer)->CreateField(fields[iField]) != OGRERR_NONE ){
361  std::ostringstream es;
362  es << "Creating field " << fields[iField]->GetNameRef() << " failed";
363  std::string errorString=es.str();
364  throw(errorString);
365  }
366  }
367 }
368 
369 void ImgWriterOgr::addPoint(double x, double y, const std::map<std::string,double>& pointAttributes, std::string fieldName, const std::string& theId, int layer){
370  OGRFeature *poFeature;
371  poFeature=createFeature(layer);
372  OGRPoint pt;
373  poFeature->SetField( fieldName.c_str(), theId.c_str());
374  for(std::map<std::string,double>::const_iterator mit=pointAttributes.begin();mit!=pointAttributes.end();++mit){
375  poFeature->SetField((mit->first).c_str(), mit->second);
376  }
377  pt.setX(x);
378  pt.setY(y);
379  poFeature->SetGeometry( &pt );
380  if(createFeature(poFeature,layer)!=OGRERR_NONE){
381  std::string errorString="Failed to create feature";
382  throw(errorString);
383  }
384  OGRFeature::DestroyFeature( poFeature );
385 }
386 
387 void ImgWriterOgr::addPoint(double x, double y, const std::map<std::string,double>& pointAttributes, std::string fieldName, int theId, int layer){
388  OGRFeature *poFeature;
389  poFeature = createFeature(layer);
390  OGRPoint pt;
391  if(pointAttributes.size()+1!=poFeature->GetFieldCount()){
392  std::ostringstream ess;
393  ess << "Failed to add feature: " << pointAttributes.size() << " !=" << poFeature->GetFieldCount() << std::endl;
394  throw(ess.str());
395  }
396  assert(pointAttributes.size()+1==poFeature->GetFieldCount());
397  poFeature->SetField( fieldName.c_str(), theId);
398  int fid=0;
399  for(std::map<std::string,double>::const_iterator mit=pointAttributes.begin();mit!=pointAttributes.end();++mit){
400  poFeature->SetField((mit->first).c_str(),mit->second);
401  }
402  pt.setX(x);
403  pt.setY(y);
404  poFeature->SetGeometry( &pt );
405  if(createFeature(poFeature,layer)!=OGRERR_NONE){
406  std::string errorString="Failed to create feature";
407  throw(errorString);
408  }
409  OGRFeature::DestroyFeature( poFeature );
410 }
411 
412 //add a line std::string (polygon), caller is responsible to close the line (end point=start point)
413 void ImgWriterOgr::addLineString(std::vector<OGRPoint*>& points, const std::string& fieldName, int theId, int layer){
414  OGRFeature *poFeature;
415  poFeature = createFeature(layer);
416  poFeature->SetStyleString("PEN(c:#FF0000,w:5px)");//see also http://www.gdal.org/ogr/ogr_feature_style.html
417  poFeature->SetField( fieldName.c_str(), theId);
418  OGRLineString theLineString;
419  theLineString.setNumPoints(points.size());
420  for(int ip=0;ip<points.size();++ip)
421  theLineString.setPoint(ip,points[ip]);
422  if(poFeature->SetGeometry( &theLineString )!=OGRERR_NONE){
423  std::string errorString="Failed to set line OGRLineString as feature geometry";
424  throw(errorString);
425  }
426  if(createFeature(poFeature,layer)!=OGRERR_NONE){
427  std::string errorString="Failed to create feature";
428  throw(errorString);
429  }
430  OGRFeature::DestroyFeature( poFeature );
431 }
432 
433 //add a ring (polygon), caller is responsible to close the line (end point=start point)?
434 void ImgWriterOgr::addRing(std::vector<OGRPoint*>& points, const std::string& fieldName, int theId, int layer){
435  OGRFeature *poFeature;
436  poFeature = createFeature(layer);
437  poFeature->SetStyleString("PEN(c:#FF0000,w:5px)");//see also http://www.gdal.org/ogr/ogr_feature_style.html
438  poFeature->SetField( fieldName.c_str(), theId);
439  // OGRLineString theLineString;
440  // theLineString.setNumPoints(points.size());
441  OGRPolygon thePolygon;
442  OGRLinearRing theRing;
443  for(int ip=0;ip<points.size();++ip)
444  theRing.addPoint(points[ip]);
445  // theRing.addPoint(points[0]);//close the ring
446  theRing.closeRings();//redundent with previous line?
447  thePolygon.addRing(&theRing);
448  // SetSpatialFilter(&thePolygon)
449  poFeature->SetGeometry( &thePolygon );
450  if(createFeature(poFeature,layer)!=OGRERR_NONE){
451  std::string errorString="Failed to create feature";
452  throw(errorString);
453  OGRFeature::DestroyFeature( poFeature );
454  }
455  if(poFeature->SetGeometry( &thePolygon )!=OGRERR_NONE){
456  std::string errorString="Failed to set polygon as feature geometry";
457  throw(errorString);
458  }
459  OGRFeature::DestroyFeature( poFeature );
460 }
461 
462 //add a line string (polygon), caller is responsible to close the line (end point=start point)
463 void ImgWriterOgr::addLineString(std::vector<OGRPoint*>& points, const std::string& fieldName, const std::string& theId, int layer){
464  OGRFeature *poFeature;
465  poFeature = createFeature(layer);
466  poFeature->SetField( fieldName.c_str(), theId.c_str());
467  OGRLineString theLineString;
468  theLineString.setNumPoints(points.size());
469  for(int ip=0;ip<points.size();++ip)
470  theLineString.setPoint(ip,points[ip]);
471  if(poFeature->SetGeometry( &theLineString )!=OGRERR_NONE){
472  std::string errorString="Failed to set line OGRLineString as feature geometry";
473  throw(errorString);
474  }
475  if(createFeature(poFeature,layer)!=OGRERR_NONE){
476  std::string errorString="Failed to create feature";
477  throw(errorString);
478  }
479  OGRFeature::DestroyFeature( poFeature );
480 }
481 
482 OGRFeature* ImgWriterOgr::createFeature(int layer){
483  return(OGRFeature::CreateFeature(m_datasource->GetLayer(layer)->GetLayerDefn()));
484 }
485 
486 OGRErr ImgWriterOgr::createFeature(OGRFeature *theFeature,int layer){
487  return m_datasource->GetLayer(layer)->CreateFeature(theFeature);
488 }
489 
490 int ImgWriterOgr::getFieldCount(int layer) const
491 {
492  assert(m_datasource->GetLayerCount()>layer);
493  OGRLayer *poLayer;
494  if((poLayer = m_datasource->GetLayer(layer))==NULL){
495  std::string errorstring="Could not get layer";
496  throw(errorstring);
497  }
498  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
499  return(poFDefn->GetFieldCount());
500 }
501 
502 int ImgWriterOgr::getFeatureCount(int layer) const
503 {
504  return(getLayer(layer)->GetFeatureCount());
505 }
506 
507 int ImgWriterOgr::ascii2ogr(const std::string& filename, const std::string &layername, const std::vector<std::string>& fieldName, const std::vector<OGRFieldType>& fieldType, short colX, short colY, const std::string& theProjection, const OGRwkbGeometryType& eGType, const char fs)
508 {
509  char **papszOptions=NULL;
510  createLayer(layername, theProjection, eGType, papszOptions);
511  //create attribute fields that should appear on the layer. Fields must be added to the layer before any features are written. To create a field we initialize an OGRField object with the information about the field. In the case of Shapefiles, the field width and precision is significant in the creation of the output .dbf file, so we set it specifically, though generally the defaults are OK
512  int ncol=fieldName.size();
513  assert(colX>=0);
514  assert(colY>=0);
515  assert(colX<ncol+2);
516  assert(colY<ncol+2);
517  for(int ifield=0;ifield<ncol;++ifield)
518  createField(fieldName[ifield],fieldType[ifield]);
519  //create a local OGRFeature, set attributes and attach geometry before trying to write it to the layer. It is imperative that this feature be instantiated from the OGRFeatureDefn associated with the layer it will be written to.
520  //todo: try to open and catch if failure...
521  std::ifstream fpoints(filename.c_str(),std::ios::in);
522  std::string line;
523  OGRPolygon thePolygon;
524  OGRLinearRing theRing;
525  OGRPoint firstPoint;
526  OGRFeature *polyFeature;
527  if(eGType!=wkbPoint)
528  polyFeature=createFeature();
529 
530 
531  if(fs>' '&&fs<='~'){//field separator is a regular character (minimum ASCII code is space, maximum ASCII code is tilde)
532  std::string csvRecord;
533  while(getline(fpoints,csvRecord)){//read a line
534  OGRFeature *pointFeature;
535  if(eGType==wkbPoint)
536  pointFeature=createFeature();
537  OGRPoint thePoint;
538  bool skip=false;
539  std::istringstream csvstream(csvRecord);
540  std::string value;
541  int colId=0;
542  int fieldId=0;
543  while(getline(csvstream,value,fs)){//read a column
544  if(colId==colX)
545  thePoint.setX(atof(value.c_str()));
546  else if(colId==colY)
547  thePoint.setY(atof(value.c_str()));
548  else{
549  switch(fieldType[fieldId]){
550  case(OFTReal):
551  if(eGType==wkbPoint)
552  pointFeature->SetField(fieldId,atof(value.c_str()));
553  else if(firstPoint.IsEmpty())
554  polyFeature->SetField(fieldId,atof(value.c_str()));
555  break;
556  case(OFTInteger):
557  if(eGType==wkbPoint)
558  pointFeature->SetField(fieldId,atoi(value.c_str()));
559  else if(firstPoint.IsEmpty())
560  polyFeature->SetField(fieldId,atoi(value.c_str()));
561  break;
562  case(OFTString):
563  if(eGType==wkbPoint)
564  pointFeature->SetField(fieldId,value.c_str());
565  else if(firstPoint.IsEmpty())
566  polyFeature->SetField(fieldId,value.c_str());
567  break;
568  default:
569  break;
570  }
571  ++fieldId;
572  }
573  ++colId;
574  }
575  if(colId!=fieldId+2){
576  std::ostringstream ess;
577  ess << "Error: colId = " << colId << " is different from fieldId+2 = " << fieldId;
578  throw(ess.str());
579  }
580  if(eGType==wkbPoint){
581  pointFeature->SetGeometry( &thePoint );
582  if(createFeature(pointFeature)!=OGRERR_NONE){
583  std::string errorString="Failed to create feature";
584  throw(errorString);
585  OGRFeature::DestroyFeature( pointFeature );
586  }
587  }
588  else{
589  if(firstPoint.IsEmpty()){
590  firstPoint=thePoint;
591  }
592  theRing.addPoint(&thePoint);
593  }
594  }
595  }
596  else{//space or tab delimited fields
597  while(getline(fpoints,line)){
598  OGRFeature *pointFeature;
599  if(eGType==wkbPoint)
600  pointFeature=createFeature();
601  OGRPoint thePoint;
602  bool skip=false;
603  std::istringstream ist(line);
604  std::string value;
605  int colId=0;
606  int fieldId=0;
607  while(ist >> value){
608  if(colId==colX)
609  thePoint.setX(atof(value.c_str()));
610  else if(colId==colY)
611  thePoint.setY(atof(value.c_str()));
612  else{
613  switch(fieldType[fieldId]){
614  case(OFTReal):
615  if(eGType==wkbPoint)
616  pointFeature->SetField(fieldId,atof(value.c_str()));
617  else if(firstPoint.IsEmpty())
618  polyFeature->SetField(fieldId,atof(value.c_str()));
619  break;
620  case(OFTInteger):
621  if(eGType==wkbPoint)
622  pointFeature->SetField(fieldId,atoi(value.c_str()));
623  else if(firstPoint.IsEmpty())
624  polyFeature->SetField(fieldId,atoi(value.c_str()));
625  break;
626  case(OFTString):
627  if(eGType==wkbPoint)
628  pointFeature->SetField(fieldId,value.c_str());
629  else if(firstPoint.IsEmpty())
630  polyFeature->SetField(fieldId,value.c_str());
631  break;
632  default:
633  break;
634  }
635  ++fieldId;
636  }
637  ++colId;
638  }
639  if(colId!=fieldId+2){
640  std::ostringstream ess;
641  ess << "Error: colId = " << colId << " is different from fieldId+2 = " << fieldId;
642  throw(ess.str());
643  }
644  if(eGType==wkbPoint){
645  pointFeature->SetGeometry( &thePoint );
646  if(createFeature(pointFeature)!=OGRERR_NONE){
647  std::string errorString="Failed to create feature";
648  throw(errorString);
649  OGRFeature::DestroyFeature( pointFeature );
650  }
651  }
652  else{
653  if(firstPoint.IsEmpty()){
654  firstPoint=thePoint;
655  }
656  theRing.addPoint(&thePoint);
657  }
658  }
659  }
660  if(eGType!=wkbPoint){
661  theRing.addPoint(&firstPoint);//close the ring
662  thePolygon.addRing(&theRing);
663  // SetSpatialFilter(&thePolygon)
664  polyFeature->SetGeometry( &thePolygon );
665  if(createFeature(polyFeature)!=OGRERR_NONE){
666  std::string errorString="Failed to create feature";
667  throw(errorString);
668  OGRFeature::DestroyFeature( polyFeature );
669  }
670  }
671  return getFeatureCount();
672 }
673 
674 int ImgWriterOgr::addData(const ImgReaderGdal& imgReader, int theLayer, bool verbose)
675 {
676  OGRLayer *poLayer;
677  assert(m_datasource->GetLayerCount()>theLayer);
678  if(verbose)
679  std::cout << "number of layers: " << m_datasource->GetLayerCount() << std::endl;
680  if(verbose)
681  std::cout << "get layer " << theLayer << std::endl;
682  poLayer = m_datasource->GetLayer(theLayer);
683  //start reading features from the layer
684  OGRFeature *poFeature;
685  if(verbose)
686  std::cout << "reset reading" << std::endl;
687  poLayer->ResetReading();
688  for(int iband=0;iband<imgReader.nrOfBand();++iband){
689  std::ostringstream fs;
690  fs << "band" << iband;
691  createField(fs.str(),OFTReal,theLayer);
692  }
693  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
694  int nfield=poFDefn->GetFieldCount();
695  if(verbose)
696  std::cout << "new number of fields: " << nfield << std::endl;
697  while( (poFeature = poLayer->GetNextFeature()) != NULL ){
698  OGRGeometry *poGeometry;
699  poGeometry = poFeature->GetGeometryRef();
700  assert(poGeometry != NULL
701  && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint);
702  OGRPoint *poPoint = (OGRPoint *) poGeometry;
703  double x=poPoint->getX();
704  double y=poPoint->getY();
705  for(int iband=0;iband<imgReader.nrOfBand();++iband){
706  double imgData;
707  imgReader.readData(imgData,GDT_Float64,x,y,iband);
708  //todo: put imgdata in field
709  std::ostringstream fs;
710  fs << "band" << iband;
711  poFeature->SetField(fs.str().c_str(),imgData);
712  }
713  }
714  return(nfield);
715 }
716 
pktools-2.6.6/doc/html/inherit_graph_21.map0000644000113200011300000000027412647437044015476 00000000000000 pktools-2.6.6/doc/html/inherit_graph_44.md50000644000113200011300000000004012647437044015402 00000000000000aadebe5d38499b3e0dfb844f4a073095pktools-2.6.6/doc/html/inherit_graph_38.map0000644000113200011300000000043312647437044015503 00000000000000 pktools-2.6.6/doc/html/inherit_graph_0.png0000644000113200011300000000674412616110567015424 00000000000000‰PNG  IHDRÀ%Z¹®¡bKGDÿÿÿ ½§“ ™IDATxœíœyPS×ÇOØdU ˜ËâB@E°ã‚Ø.¯Ží`7@Ñj—`¦.”E©c ØvÞAŸ}öu¬Hk‹Ž%²…G+ÓRç¡ VÙRj Rö@$†@HBrÞçMz%É5¤!‰x>ÃçÞœsî÷þ~¿óãÜs„`0 fæX™[ƒÁ<­àŠÁ`0‚(ƒÁN  c 6äÉÉI.—«R©Ì¥æéÅÁÁ! ÀÜ*þddddppÐÜ*ž9‚ðôô4·Š?éííÝ·oßä䤹…Ì’““cccÉ{K b±xttÔ¢"à©@&“ XTåóùÎÎÎæò !‹ù|¾E Ÿ†††ÊÊʸ¸8s ™ Ô×׳X,ªŠ 5•¤9ŸÏooo7·Šé8;;cWš’_ýÕÜ´Ãb±Ì-a.¯¹¯b0ŒàŠÁ`0‚(ƒÁN  c ³ž@;;;i4ÚleFX ¤§‚Ù¶ö‹¹ ‘pss‹ѳ-Ùkƒƒƒ»víZ¼x±££ãêÕ«+**fMòÌ„ÍÆI ]]]Féj– +tuuÍÌÌ4½.w8?¿šÅºcúCë‰]i ~1%SSªŸ¾Ÿ™y¹³“on-qëÖ-788XSSÓßßàÀ™ö0::áààPRRÒØØ¸sç΄„„~øa6ÔêƒiÂIËcL R©FGGÒÕ,AVèáá‘››k²C Ùì¦Ë—ùýw´ÈHÿøøÕ&;úL1±+ÍèS!¼{·»¢¢©¢â®H4mùro&“nn]âéé¹páBƒÁÈËË‹‰‰™iÙÙÙ7nºH$zûí·=<<|||222Ð;4íâÅ‹ÁÁÁ ,8~ü¸a–íí=qâûçŸÿÇêÕçåý§£cÀ‚¾hDW¢Â?þèççwþüy­¾Ö4¬.¿Ðh´¯¾ú*88ØÓÓ377·¸¸xÉ’%...}ôª éw]ç¨+BÈRQ¹®®N3È•ëêêfd^acc×áìàà£Û·ÿëâÅz‘h`ccÑ÷¬­­éôÿ'÷ÊÊJ4¯d0(銊²²²””r?ÙÙÙEEE¨¬ç@{õÕWÓÒÒP™LæææVUUžäĺº:ÍH6Í0Äððpmm-¤D"‘Ì›7ïÌ™3<¯¨¨ÈÆÆF"‘p¹\uW'Ož¤Óéåå僃ƒUUUA ŸD"Qaa!ªC.çåå½ñƽ½½­­­«V­úàƒ „{÷î}ë­·†††¼¼¼nß¾ !ÌÏÏ mmmmkk[»vmFF†®æHÌ‹/¾ØÑÑÑÐÐÀd2srrÈ ÉåÝ»woÞ¼ùÁƒ­­­Ë—/ÏÉÉAH …………€ÑÑQj›í622VXxãå—ÿI©~~é‘Ê`¼Oþ{ýõÓÔ½‡Ãáp¨ëו¨á¶mÛ~úé§ææf­ÖÖ4¬.¿Äb1šÑÄÇÇ‹Åâ/¿üððáC¨#l´¢+BÈRQY"‘hƹ²D"ÑÓæmmý~XžÍ`¼¿hQÆ´ðõMÿöÛ›ÔÞ1 %%%ÓÆ¸VÍÍÍcccb±øþýûÑÑÑü1„P,ÛÙÙ½ûî»ýýý.\ðù|­Q¦;@×!ôhß}÷ŸŸŸJ¥‚²Ùl‚  |’‡‡‡©#Ù(Ã<.....nºéÈú$P@`kk[PP  U*ÕØØ˜R©$k <þ¼ºþ7ß|Cí   ‡Ê555áááB¡Pèãã†NB¸lÙ²òòrTnooW—5›#1­­­hgII “ÉÔ:Pår¹µµµ:èËËË™L&„€ì —Ë\.—Ú&ÃÃÃÕÕ5,Vc\Ü¿½½S}|Ò||¦çM L Æu%Ùìiqša)jÞ»wO]“\FîÐ6Z¡ŽrYkõ7¬“““º&¹ŒÐåwMtÕ$KEeŠxПïîî¾{÷î›7o¶´´äää*++Ñ!ôhèÞQ@@y¡€Ú‰‘<Ó£S`œ5PaII‰¿¿¿]PP›Í†*Š 68::B§¦¦òóó™Læüùó###ÐièŠZ±XüÎ;︹¹¹»»'%%Ÿ>}zåÊ•r¹BXQQÁ`0ÁäädFFA... êÕÍæ¨ósçÎ-Z´ÈÃÃãÀR©”¬|t@°gÏwwwƒ‘šš*•J °¬¦Ý¤RùÕ«Mo¾yÖ×7 ­ŠZ`…Fuå´Dóé§Ÿºººúûû³ÙlŠ´¨Ë/OL š~×uŽº"dš~„f<@Õ  olÚtœÁxßÏ/ÁHµØªÆÊÊ*,,¬¡¡ýtòäÉ øúú~ñÅ t:]WT@»»»ccc ‚prrZ³f šú f4Ð’’’ɷ쨵E²Ñ‡¹ÖJ#›}–-::zÆóXK¢³³3 j,ÏvzÄf7••ýÂá ØÙÙ(Êuë––•íŸmIè ÎΔPؼ©©÷Ê•{w>”Ì›g#—+ssc÷ìY¯YÓ¸°X¬;v˜r,ÌaÐçì¦}Ð8Òct±p¡KrrtrrôŒTTÜ+-½ãëënnQSáá—•µ½¾¾³¢¢©ªª… \Í- cæ`uvvNNN6·Šé,Yâ™–¶5-ÍÑlU¯½üý‰è_‹?€Œê ]€Y(ŠNñ±8fý1°Öqún-eâ¨øtºmâÈ Ó0}b›ù%·©µ×Œ®=Ÿ0´³?Š1sŸ‹0€¯8À‘;_ ‹W|%\ Zð— >舽ln¨p©.aÇ{ )t;Ú b nŸš¯›65°¢¡2çÅÔ?Žž>Oдàuönm¤¢Ì`×­Z¬WjC~>‘Ö¾0+á {{©fÝ×Mæ·æÅ•ìÙ¼˜` Ý›%uA6´½ÅÆö¨Á,]k¢ÄW¼™u±›]‹ˆ7§¯iòh€ ¶¶¬ÏÖu1 ló —Ҷ̺–:ÞÍ\ÄcãÏxøhR²Êè‡Qt$¿ß§¨ ª fdºü<4BÿÙ[•f¸d7=.Mé9/—éªÃëù/ÿO Üaàò}€,‘j?Ÿõ.5Úšm?œÿŸ®ŽXÿ2¬#¸d píæ(£?cÛú¼!½›a1¥Þ—ŽòØ©ܾ7dÔK:‚ùÒ‰ì)Ê3‚Ü™àÌà]€,±H€µ+køöäu<|`·LhC7¹ÔeÍ Ÿ×Ÿ˜tÜ‹ óH$^2%l.êaeÐäýE”ÌÉ|ÅÜìî‰Ýsä }¸ýDû^hzé~ðR›¦Ã¡¿]|#ü¯@×—Ö‡[k¹–<|š(Ç*€Ý¹dÇtMé:Ýñø«Ø,êÅû¢]”' øXÓ_nò¡Æ|Øý /c§fžâOIEND®B`‚pktools-2.6.6/doc/html/classLastReturnFilter__coll__graph.map0000644000113200011300000000007312616110567021327 00000000000000 pktools-2.6.6/doc/html/structsvm__model.html0000644000113200011300000002006712647637662016143 00000000000000 pktools: svm_model Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
svm_model Struct Reference
Collaboration diagram for svm_model:

Public Attributes

struct svm_parameter param
 
int nr_class
 
int l
 
struct svm_node ** SV
 
double ** sv_coef
 
double * rho
 
double * probA
 
double * probB
 
int * label
 
int * nSV
 
int free_sv
 

Detailed Description

Definition at line 53 of file svm.h.


The documentation for this struct was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.h
pktools-2.6.6/doc/html/classImgReaderOgr-members.html0000644000113200011300000003665612647637662017552 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ImgReaderOgr Member List

This is the complete list of members for ImgReaderOgr, including all inherited members.

close(void) (defined in ImgReaderOgr)ImgReaderOgr
getDataSource(void) (defined in ImgReaderOgr)ImgReaderOgrinline
getDriver(void) const (defined in ImgReaderOgr)ImgReaderOgrinline
getExtent(double &ulx, double &uly, double &lrx, double &lry, int layer) (defined in ImgReaderOgr)ImgReaderOgr
getExtent(double &ulx, double &uly, double &lrx, double &lry) (defined in ImgReaderOgr)ImgReaderOgr
getFeatureCount(int layer=0) const (defined in ImgReaderOgr)ImgReaderOgr
getFieldCount(int layer=0) const (defined in ImgReaderOgr)ImgReaderOgr
getFields(std::vector< std::string > &fields, int layer=0) const (defined in ImgReaderOgr)ImgReaderOgr
getFields(std::vector< OGRFieldDefn * > &fields, int layer=0) const (defined in ImgReaderOgr)ImgReaderOgr
getFieldSeparator() const (defined in ImgReaderOgr)ImgReaderOgrinline
getGeometryType(int layer=0) const (defined in ImgReaderOgr)ImgReaderOgr
getLayer(int layer=0) (defined in ImgReaderOgr)ImgReaderOgrinline
getLayerCount(void) const (defined in ImgReaderOgr)ImgReaderOgrinline
getLayerName(int layer=0) (defined in ImgReaderOgr)ImgReaderOgrinline
getProjection(int layer=0) const (defined in ImgReaderOgr)ImgReaderOgr
ImgReaderOgr(void) (defined in ImgReaderOgr)ImgReaderOgr
ImgReaderOgr(const std::string &filename) (defined in ImgReaderOgr)ImgReaderOgr
m_datasource (defined in ImgReaderOgr)ImgReaderOgrprotected
m_filename (defined in ImgReaderOgr)ImgReaderOgrprotected
m_fs (defined in ImgReaderOgr)ImgReaderOgrprotected
open(const std::string &filename) (defined in ImgReaderOgr)ImgReaderOgr
operator<< (defined in ImgReaderOgr)ImgReaderOgrfriend
readData(std::vector< T > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, OGRFeature *poFeature, int layer=0, bool pos=false, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readData(std::vector< T > &data, const OGRFieldType &fieldType, const std::string &theField, int layer=0, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgrinline
readData(Vector2d< T > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, int layer=0, bool pos=false, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readData(std::map< int, Vector2d< T > > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &label, int layer=0, bool pos=false, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readData(std::map< std::string, Vector2d< T > > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &label, int layer=0, bool pos=false, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readData(std::vector< std::string > &data, const OGRFieldType &fieldType, const std::string &theField, int layer, bool verbose) (defined in ImgReaderOgr)ImgReaderOgrinline
readDataImageOgr(std::map< std::string, Vector2d< float > > &mapPixels, std::vector< std::string > &fields, const std::vector< unsigned short > &bands, const std::string &label, const std::vector< std::string > &layers, int verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readDataImageOgr(std::map< std::string, Vector2d< float > > &mapPixels, std::vector< std::string > &fields, double start, double end, const std::string &label, const std::vector< std::string > &layers, int verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readSql(Vector2d< T > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &sqlStatement, OGRGeometry *spatialFilter=NULL, int layer=0, bool pos=false, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readSql(std::map< int, Vector2d< T > > &data, const OGRFieldType &fieldType, std::vector< std::string > &fields, const std::string &label, const std::string &sqlStatement, OGRGeometry *spatialFilter, int layer=0, bool pos=false, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readXY(std::vector< T > &xVector, std::vector< T > &yVector, int layer=0, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
readY(std::vector< T > &yVector, int layer=0, bool verbose=false) (defined in ImgReaderOgr)ImgReaderOgr
setCodec(void) (defined in ImgReaderOgr)ImgReaderOgrprotected
setFieldSeparator(const char fs) (defined in ImgReaderOgr)ImgReaderOgrinline
~ImgReaderOgr(void) (defined in ImgReaderOgr)ImgReaderOgr
pktools-2.6.6/doc/html/pkdiff__gui_2mainwindow_8h_source.html0000644000113200011300000003030112647637661021304 00000000000000 pktools: /home/kempenep/pktools/qt/pkdiff_gui/mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.h
1 /**********************************************************************
2 mainwindow.h: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef MAINWINDOW_H
21 #define MAINWINDOW_H
22 
23 #include <QMainWindow>
24 
25 namespace Ui {
26 class MainWindow;
27 }
28 
29 class MainWindow : public QMainWindow
30 {
31  Q_OBJECT
32 
33 public:
34  explicit MainWindow(QWidget *parent = 0);
35  ~MainWindow();
36 
37 private slots:
38  void on_actionInput_triggered();
39 
40  void on_actionReference_triggered();
41 
42  void on_actionMask_triggered();
43 
44  void on_actionOutput_triggered();
45 
46  void on_toolButton_input_clicked();
47 
48  void on_toolButton_mask_clicked();
49 
50  void on_toolButton_output_clicked();
51 
52  void on_toolButton_reference_clicked();
53 
54  void on_pushButton_run_clicked();
55 
56  void on_pushButton_restore_clicked();
57 
58  void on_commandLinkButtonPrepareTable_clicked();
59 
60 private:
61  void setClassTable(const QStringList &labels);
62  void setDefaults();
63 
64  Ui::MainWindow *ui;
65 };
66 
67 #endif // MAINWINDOW_H
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract__inherit__graph.md50000644000113200011300000000004012616110566026463 0000000000000090220da46079f3d06c739089255dbeedpktools-2.6.6/doc/html/classqgis_1_1pktoolsUtils_1_1pktoolsUtils.html0000644000113200011300000001231712647637662022734 00000000000000 pktools: qgis.pktoolsUtils.pktoolsUtils Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktoolsUtils.pktoolsUtils Class Reference

Static Public Member Functions

def pktoolsPath
 
def runpktools
 

Static Public Attributes

string PKTOOLS_FOLDER = "PKTOOLS_FOLDER"
 

Detailed Description

Definition at line 35 of file pktoolsUtils.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/pkdumpogr_8cc_source.html0000644000113200011300000011217712647637661016702 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkdumpogr.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdumpogr.cc
1 /**********************************************************************
2 pkdumpogr.cc: dump ogr file to text file or standard output
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <math.h>
21 #include <string>
22 #include <fstream>
23 #include <assert.h>
24 #include "base/Optionpk.h"
25 #include "imageclasses/ImgReaderOgr.h"
26 #include "pkdumpogr.h"
27 
28 /******************************************************************************/
70 using namespace std;
71 
72 int main(int argc, char *argv[])
73 {
74  Optionpk<string> input_opt("i", "input", "Input shape file");
75  Optionpk<string> layer_opt("ln", "lname", "Layer name(s) in sample (leave empty to select all)");
76  Optionpk<string> output_opt("o", "output", "Output ASCII file");
77  Optionpk<string> attribute_opt("n", "name", "names of the attributes to select. Each attribute is stored in a separate band. Default is ALL: write all attributes", "ALL");
78  Optionpk<bool> pos_opt("pos","pos","include position (x and y)",false);
79  Optionpk<bool> transpose_opt("t","transpose","transpose output (does not work for -n ALL ",false);
80  Optionpk<char> fs_opt("fs","fs","field separator.",' ');
81  Optionpk<short> verbose_opt("v", "verbose", "verbose (Default: 0)", 0,2);
82 
83  fs_opt.setHide(1);
84  verbose_opt.setHide(2);
85 
86  bool doProcess;//stop process when program was invoked with help option (-h --help)
87  try{
88  doProcess=input_opt.retrieveOption(argc,argv);
89  layer_opt.retrieveOption(argc,argv);
90  output_opt.retrieveOption(argc,argv);
91  attribute_opt.retrieveOption(argc,argv);
92  pos_opt.retrieveOption(argc,argv);
93  transpose_opt.retrieveOption(argc,argv);
94  fs_opt.retrieveOption(argc,argv);
95  verbose_opt.retrieveOption(argc,argv);
96  }
97  catch(string predefinedString){
98  std::cout << predefinedString << std::endl;
99  exit(0);
100  }
101  if(!doProcess){
102  cout << endl;
103  cout << "Usage: pkdumpogr -i input [-o output]" << endl;
104  cout << endl;
105  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
106  exit(0);//help was invoked, stop processing
107  }
108 
109  if(input_opt.empty()){
110  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
111  exit(0);
112  }
113 
114  ImgReaderOgr inputReader;
115  try{
116  inputReader.open(input_opt[0]);
117  }
118  catch(string errorstring){
119  cerr << errorstring << endl;
120  }
121  ofstream outputFile;
122  if(output_opt.size())
123  outputFile.open(output_opt[0].c_str(),ios::out);
124 
125  inputReader.setFieldSeparator(fs_opt[0]);
126 
127  //support multiple layers
128  int nlayerRead=inputReader.getDataSource()->GetLayerCount();
129  if(verbose_opt[0])
130  cout << "number of layers: " << nlayerRead << endl;
131 
132  for(int ilayer=0;ilayer<nlayerRead;++ilayer){
133  OGRLayer *readLayer=inputReader.getLayer(ilayer);
134  string currentLayername=readLayer->GetName();
135  if(layer_opt.size())
136  if(find(layer_opt.begin(),layer_opt.end(),currentLayername)==layer_opt.end())
137  continue;
138  if(verbose_opt[0])
139  cout << "processing layer " << currentLayername << endl;
140  // if(layer_opt.size())
141  // cout << " --lname " << currentLayername << endl;
142 
143  if(attribute_opt[0]=="ALL"){
144  attribute_opt.clear();
145  OGRFeatureDefn *poFDefn = readLayer->GetLayerDefn();
146  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
147  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
148  std::string fieldname=poFieldDefn->GetNameRef();
149  attribute_opt.push_back(fieldname);
150  }
151  }
152  // if(attribute_opt[0]!="ALL"){
153  vector<double> xvector;
154  vector<double> yvector;
155  if(inputReader.getGeometryType()==wkbPoint)
156  inputReader.readXY(xvector,yvector);
157  Vector2d<std::string> theData(attribute_opt.size());
158  for(int ifield=0;ifield<attribute_opt.size();++ifield){
159  if(verbose_opt[0])
160  cout << "field: " << ifield << endl;
161  theData[ifield].clear();
162  inputReader.readData(theData[ifield],OFTReal,attribute_opt[ifield],ilayer,verbose_opt[0]);
163  }
164  if(verbose_opt[0]){
165  std::cout << "number of fields: " << theData.size() << std::endl;
166  std::cout << "number of samples: " << theData[0].size() << std::endl;
167  }
168  if(transpose_opt[0]){
169  if(pos_opt[0]&&(inputReader.getGeometryType()==wkbPoint)){
170  if(output_opt.size()){
171  outputFile << "X" << fs_opt[0];
172  for(int isample=0;isample<xvector.size();++isample){
173  outputFile << xvector[isample];
174  if(isample<xvector.size()-1)
175  outputFile << fs_opt[0];
176  else
177  outputFile << std::endl;
178  }
179  outputFile << "Y" << fs_opt[0];
180  for(int isample=0;isample<yvector.size();++isample){
181  outputFile << yvector[isample];
182  if(isample<yvector.size()-1)
183  outputFile << fs_opt[0];
184  else
185  outputFile << std::endl;
186  }
187  }
188  else{
189  std::cout << "X" << fs_opt[0];
190  for(int isample=0;isample<xvector.size();++isample){
191  std::cout << xvector[isample];
192  if(isample<xvector.size()-1)
193  std::cout << fs_opt[0];
194  else
195  std::cout << std::endl;
196  }
197  std::cout << "Y" << fs_opt[0];
198  for(int isample=0;isample<yvector.size();++isample){
199  std::cout << yvector[isample];
200  if(isample<yvector.size()-1)
201  std::cout << fs_opt[0];
202  else
203  std::cout << std::endl;
204  }
205  }
206  }
207  for(int ifield=0;ifield<theData.size();++ifield){
208  if(output_opt.size()){
209  outputFile << ifield << fs_opt[0];
210  for(int isample=0;isample<theData[0].size();++isample){
211  outputFile << theData[ifield][isample];
212  if(isample<theData[0].size()-1)
213  outputFile << fs_opt[0];
214  else
215  outputFile << std::endl;
216  }
217  }
218  else{
219  std::cout << ifield << fs_opt[0];
220  for(int isample=0;isample<theData[0].size();++isample){
221  std::cout << theData[ifield][isample];
222  if(isample<theData[0].size()-1)
223  std::cout << fs_opt[0];
224  else
225  std::cout << std::endl;
226  }
227  }
228  }
229  }
230  else{
231  for(int isample=0;isample<theData[0].size();++isample){
232  if(output_opt.size()){
233  outputFile << isample << fs_opt[0];
234  if(pos_opt[0])
235  outputFile << xvector[isample] << fs_opt[0] << yvector[isample] << fs_opt[0];
236  for(int ifield=0;ifield<theData.size();++ifield){
237  outputFile << theData[ifield][isample];
238  if(ifield<theData.size()-1)
239  outputFile << fs_opt[0];
240  else
241  outputFile << std::endl;
242  }
243  }
244  else{
245  std::cout << isample << fs_opt[0];
246  if(pos_opt[0])
247  std::cout << xvector[isample] << fs_opt[0] << yvector[isample] << fs_opt[0];
248  for(int ifield=0;ifield<theData.size();++ifield){
249  std::cout << theData[ifield][isample];
250  if(ifield<theData.size()-1)
251  std::cout << fs_opt[0];
252  else
253  std::cout << std::endl;
254  }
255  }
256  }
257  }
258  if(output_opt.size())
259  outputFile.close();
260  // }
261  // else{
262  // if(output_opt.size()){
263  // ofstream outputFile(output_opt[0].c_str(),ios::out);
264  // outputFile << inputReader;
265  // outputFile.close();
266  // }
267  // else
268  // std::cout << inputReader;
269  // }
270  }
271  inputReader.close();
272 }
273 
pktools-2.6.6/doc/html/inherit_graph_32.png0000644000113200011300000002146512647437044015514 00000000000000‰PNG  IHDR«t;#bKGDÿÿÿ ½§“ IDATxœíÝ{PSçº?ðï2 l¹™M¹!¢p,£ÎnÛC«•±=v×£ÝZ/SmG;ÓÖ™:àe[/SýY{ìÑÓÓv¼ ¢è”¢»Ž`­“Úªt;ˆDnîp'Éz~Ь&$žÏL¦d½k½ïó®,ót]ò¾cŒ1÷uzÜpGÀcŒõ†“cŒ1·ÇÉŠ1ƘÛóî(--î0õbccñ / ¸°`c‘§§'L&Óp‡Áبçáá£Ñ8ÐjNó™“L&Ôj5–-[6Ü¡06j:u Ë—/wI]|ÏŠ1ƘÛãdÅcÌíq²bŒ1æö8Y1Æs{œ¬$¥¥¥ÁíëŠ6Ü5îÝ»wCìÛ·oÀuõ¦·:AàŸS8ÁÉŠ±A2iÒ$lÞ¼yÈÚÓëõP(CÖž« WÜD„¬¬,DDD@­Vz{ÖÇÃHý¬†'+ƉB¡°û?öÁ$Š"êë뇬=W®¸‹‹‹qçÎ=zEEE())Ôö¬‡‘úY 'NVŒõBE|ñŘ>}:|}}‘””„ÂÂB‚"Bzz:f̘???Ì›7çΓ.éX_öÉÍÍÅÌ™3áåå…èèh?~Üa{–írrr0mÚ4aÆ èèè°YˆššŠÄÄDÔÕÕá™gžLž882™ z½^ZVVV†°°0§e£=n³Ù µZ ©©IzmܸjµÔmlogŸq_âéO2ìÇûG4WœŸ16Ò —÷îÝKAAAôõ×_Suu5}ûí·Ò=«Ï?ÿœÂÃÃé»ï¾£ºº:ºxñ"M›6A°¹ÔÓÖÖF^^^”MµµµtèÐ!òòò¢¶¶6"êº/òøñc"úýÑ /¼@:Ž®^½J±±±´cÇ»ËG;wî$•JEmmmRYSS“T¾råJš?>éõz*..¦øøxÚ±c‡Ó²Ñwaa!Éd2ª©©±ùœùåéòšu]Î>ã¾Æc½¬ÿ¶î3º]ÊC·Ë€=•9zï.øžcÔŸdÕÙÙI}ôEEE‘%%%I÷,Ìf3s²rŠ“›ú“¬±|ñäææRQQ‘MYvv6%&&¸î‘f¤ÆÝ›ÁøŒÇ ~À‚17¡Õj±zõj\¿~­­­Ðh4ؾ};Þ~ûíá¹Æî'_dl6mÚ„ÖÖV,^¼µµµˆŽŽÆÚµk±~ýú'®ÓÏÏo@Û—‘woã3fýÇÓÚ³1Iž)˜±Af™)Øiæ4_dŒ1æö8Y1Ö‚ ؼüýý±hÑ"”——»´Þ¦‘ì©6x*¡›Êc¬S®ÂÉŠ±>ºrå ª««QUU…ï¿ÿ¢(bõêÕ.mc¨§éžÊÃõÆú1Õü€c}(’‚Ç#<<ƒ~~~.ic¨§éážÊ#// ,@II T*Õ µ7”SyŒõcª?øÌб'$“É&“Én:ˆ~ø¡Ç©#/^Œ7Jõttt@.—ãüùó6—dÌf3öïß•J___Ì;?ýô“´ÑhDZZ‚ƒƒ„´´4F‡±Xã©<Üw*‘zL WüZ‹±‘ýüQ0***¢¦¦&2 TZZJK–,¡9sæÑï?ˆµLÑÜÜÜãÔYYYA¢(QNN…††’Ñh´ùaíì¦& •Ê?ùäZºt)UVV’V«¥Y³fÑ–-[Æb§òp©%&&:œªÃOåá8ž¡žÊc4S=á,:D"Bgg'.]º¥Ri³Že:gSGLœ8¯¾ú*²³³ÑÒÒ‚ÜÜ\¬Y³Æ®½û÷ï÷85 TTT $$DzšlÁ‚6O’õ65Oå1üSyŒ¶cj0q²bÌ…,_H½M±bÅ dggã›o¾ÁìÙ³m‡ÅÔ©S{œšèºqnýeרØFcKOx*‘1•ÇH:¦•+ÎÏið—jíèr‘³i.:::H.—Sll¬Íeëz>ûì3»©I¢££¥ò 6Ðk¯½FtóæMzúé§é½÷Þs Oåá~SyŒôcª/øžc4ÉÊÙ4DDëÖ­#››ÕÖõ˜L&Ú¿?)•Jòöö¦¤¤$Òh4R¹Á` 5kÖ\.§€€Z·nµ´´ôxŸ…§òp¯©“IDYÙ#””<´9;*)yˆš€ß/Ù©T¶ )""¡¡“àé)PŸ.^¼ˆÇ¨ÆXÏ®]»æ²ºì’U{{;t:DQtY#Ìý7±±±ðòò²Y^W׌ÿüÏ|ü÷_Áh4Ke‚ @¯¯í1Y‰"áþý«³£‡ÒÙRUÕcfŒ'`Ê”?"""*Õd¼òJ¢KRO¦L™‚C‡ JÝŒ±ßEDD¸¤»de0P__ÀÀ@—4ÀF†ÚÚZKÉÊ`hÇçŸÿ/Žù?ˆ"Áh4Ùmãé9ee¤d}vTRòPJH‚ "¢+!EFàŸÿY•j2TªÉƒšœ©¬¬ò6cOÎîwV=Âßÿþw<ÿüó×.]úm†U9Žý?ü×ý/ÚÛ6gRÝÉdã0qâx45uÍþêí=S§*ˆ¨(¢¢û; …ÏPu…16úðï¬X“IÄÉ“¿àØ1 [¤{RΘÍ"‚‚ü™ù6¢£ü`clÐp²b€ÿøŸpóæ£~o×ØØŠ¤¤˜ÞWdŒ±àdÅþ³ ³fÅàîÝ:ßGSS;Æ0~¼:;MEÇÃ¥46¶ ¥¥ÞÞ†8bÆØXÂÉŠ¦OÀÒ¥3 ëG¿ÅÅP\üZí}U¢±±€€ d0™D˜Í"ˆuˆsÞcŒ €K§Ù½{7AÀ¾}ûl–—––º|èÞꥥ¥nG›—¿¿?-Z„òòò×m­·þ Æ>tfÊ”?âå—gbóæ—qâÄzܾýÿpíÚNdf®Å{ïÍÇóÏÇáìzhÂ`h²¸cc“ËάˆYYYˆˆˆ€Z­Æ–-[\UµC“&MÂæÍ›z½úÓŸPWW7(m]¹rQQQ "ÔÔÔà¯ý+V¯^üÑemX÷Ç]…„LBHÈ$¤¤$HËššÚáëëåd+Æ8—%«ââbܹsyyyX°`JJJ R©\U½…B!Á‰¢ˆúúúAk+00“'O„„„àðáÇÁ`€ŸŸŸKÚ°îÏH‰Š16\v0++ ÉÉÉxñŵZíp="Bzzúo¿éñüyópîÜ9é×ãÇñæ›oB¡P <<©©©hoo—.ƒ]¼xÈÌÌ”¶yæ™g@J(yyyP*•Ëåøøã¥å‚ àØ±c˜>}:±oß>?~QQQð÷÷ÇöíÎ9•ɺ~Äj2™ìâúá‡zìÃâÅ‹±qãF©žŽŽÈårœ?Þæ2ŸÙlÆþýû¡R©àë당sçâ§Ÿ~’¶3HKKCpp0‚‚‚––£Ñè0ƨ›šš*,,ì¾Ø)Q)**Š222ˆˆhÛ¶m/•ët:²4uøða £ .Pmm-åçç“R©”ÊW­ZEóçϧ²²2Òjµ”@»ví’êx饗¨  €ŠŠŠ¤m¬ë·@‹-"ƒÁ@gΜ!TWW'•­X±‚ 9r„вeËÈ`0PFF†ÝºEEEÔÔÔDƒJKKiÉ’%4gΛ¶-q577÷؇¬¬,Šˆˆ Q‰ˆ(''‡BCCÉh4ÚôáÀDgÏž¥ªª*:þ<…††JåŸ|ò -]º”*++I«ÕÒ¬Y³hË–-cé«ÂÂBª©©éǧÎcCæ”K’•F£!é þÚµk€Š‹‹‰È6™$$$Љ'l¶?yò$ ÎÎN’ÉdtëÖ-©ììÙ³¤T*¥:´Z­]=%«K—.‘Ùl&¤Ó餲ëׯQgg§Ã÷ÖëZ¿<==)99Y*ï—³>´´´··7]½z•ˆˆ^ýuÚºu«]T*effÚô端¾’Êãâ⨺ºZ*ËÏϧÄÄD»Xúƒ“cÌrÉ=«¬¬,˜L&( ›åjµ 6ËÊÊÊì–͘1PSS³ÙŒ˜˜ßdªT*ñàÁé}\\\Ÿã Ð5Hkw¾¾¾OOO‡ï­ét:(•J§mYârÖ‡‰'âÕW_Evv6f̘ÜÜ\ܸqî®û÷ï#1Ñvž¨™3gJWTT $ÄvðXÿßGèÏ>bŒ±‘`À÷¬Ìf3Ôj58€¦¦&éµqãF¨ÕjíЃˆŒŒÄíÛ·m–ݹs ™L½^/••••!,ì÷ßð8J&=ÊG½-qõÖ‡+V ;;ß|ó fÏžØØX»º¦NŠ›7oÚ,³Þg …:D"Bcc#4],Œ16Z 8Y]¾|=ªU«àãã#½V®\ N‡¢¢"›õß}÷]lÚ´ yyy¨¯¯GAAvíÚAàéé‰åË—cÆ (//Ç­[·ðá‡bÕªU}Š¥¹¹y Ý°Þú’’‚ÆÆFìܹk×®uXÇ;#´´4äääàáǸpávìØ!•/Y²[·nŽ{÷ Õj±páB|ùå—CÒ?ÆÝ/ ö÷žÕúõë)%%Ån¹(ŠC›7o¶¹c6›éàÁƒCþþþ´páBÊÉÉ¡ÀÀ@""jhh 7Þxƒ($$„>øàjkk³»/eýÞh4Ò³Ï>K>>>R9¬î;uשּׁ·u»st¿¬§>X¬[·Ž|||l€°®Çd2ÑþýûI©T’··7%%%‘F£‘Ê ­Y³†är9кu먥¥Åa,}Å÷¬cnìÔOrîÜ9L™2O=õ”´ìÌ™3سgÃû7lhX¦± ·Äcnä´K‡[ê ­V‹Õ«Wãúõëhmm…F£ÁöíÛñöÛou(l€Ìf4ÚÝ—dŒ1Wòl7mÚ„ÖÖV,^¼µµµˆŽŽÆÚµk±~ýú¡…õƒÉ$B§{­¶kpÛŸ®@II5::L8}ú]ÌëüiIƈ!OVسgöìÙ3ÔM³>2͸{÷!Š‹ïãæÍøå—rèt50ÍÉÆˆl¦ áY€cƒ§a€ë×";ûnÝzˆ²²G0›Eé÷i¢øû¬ÁÝg‘‘C+clìádÅùùåv3['©žøÀË‹×Å\Cþ€sO›7'!#cTªÉÇ£~8âë;'OjpåJ)ªªóÃŒ±AÁgVLòôÓSQP° çÏßÄÞ½çPYYAzœÒÞÓS†ÖÖNlÛv&À„ ˜:UÈH¢¢˜:õ÷WX˜üÿGŒ±þë1YUUU eÌMŒ'à•Wñ/ÿòΟ¿‰Ý»¿ùíŒ vgM‚¼õÖ?ã½÷æãÿhŽ{õ¸w¯••]ÿýûß«páB1*+¤mýý'"22‘‘ˆˆ€JŒiÓ&cêÔ@øù=ùÜX?þø#æÍ›‡ÎÎÎõŸ16|Æ‚‚Ì;×®Ì.YM˜0‚  ¤¤dH‚cîAL˜0AzoIZ þÔê«ø÷ÿêë[l–ÑhÆÔ©]ƒûûOÄÌ™1s滺;;M¨®þJJ¢¤ä¡”Ô´Úûxð Qzh£{"ëþ·3¿þú+:;;qêÔ)WìÆØ0X¶l~ýõW‡evÉÊßßÉÉɃ<=eX½: ÿú¯³pìØe|ñÅE´·wÂhA„>= 8~¼‡”x,ˆ·)3ͨªz,YÎÌòóoC¯“©+‘ùùýá·Ë‹ö‰lÊ”?Jõýå/qí`Œ¹¾gÅúÄÛ{ÞÿEüÛ¿=‹C‡.!=½mmFéÌêIyzʤÄóÜs¶emm¨¨¨CEE=ÊËkqï^=ÊËëPTT‰ªªÇÒ™\î ??‚0~@±0ÆÜ'+Ö/~~^HM]ˆ·Þz·ný _ß'¿ÏÔ›?üa<¦OÅôé¡veF£••]É«¢¢h4|¿Š±ÑŠ“{"r¹7ž{N5lí{zÊ„˜˜®wýüâþgØÂaŒ 2~Ž˜1ƘÛãdÅX?”––º|êÁ¨ÓmìÞ½‚ `ß¾}®«7½Õ)JKKÜŽ 6/,Z´ååå®ÛZoýìÏÜ]©àdÅX?Lš4 ›7o²öôz=Š=Äò$ˆYYYˆˆˆ€Z­ôö¬÷ë`÷ùÊ•+¨®®FUU¾ÿþ{ˆ¢ˆÕ«W»´¡>Núc¸Ž©â{VŒõƒB¡°;ÓL¢(¢¾¾~ÈÚ³(..Æ;w——‡  ¤¤*ÕàÝ£´Þ¯ƒÝçÀÀ@Lž<‚Ç#<<ƒ~~~.ic¨“þ®cj øÌŠI¢(â‹/¾ÀôéÓáë다¤$BÒÓÓ1cÆ øùùaÞ¼y8wîœt)ÊúÒGnn.fΜ ///DGGãøñãÛ³l—““ƒiÓ¦!((6l@GG‡ÍzD„ÔÔT$&&¢®®Ï<ó H_®ðøñc¼ùæ›P(Gjj*ÚÛÛ{-³Ö[ÜYYYHNNÆ‹/¾ˆ¸¸¸Ï®œí+gñXöÇÅ‹ÌÌLiG}€¼¼<(•JÈår|üñÇÒrApìØ1LŸ>Ø·oŽ?ލ¨(øûûcûöíc·Éd“Éd×?üÐc/^Œ7Jõttt@.—ãüùó6ljÙlÆþýû¡R©àë당sçâ§Ÿ~’¶3HKKCpp0‚‚‚––£Ñè0k#혰Þ&¾gl$P«ÕÔŸÃ9##ƒ‚‚‚èìÙ³TUUEçÏŸ§ððp@‡¦°°0ºpáÕÖÖR~~>)•J@:Nj§¹¹™&L˜@éééT]]MG%jnn¶kϲ]JJ •””F£!¥RI»ví’ÊDQ¤ÔÔTJLL¤ºº:›í¬­ZµŠæÏŸOeee¤Õj)!!víÚå´¬?q‹¢HQQQ”‘‘ADDÛ¶m£øøx»¾‘Ó}Õ—x^zé%*(( ¢¢"iG}@‹-"ƒÁ@gΜ!Ò>@+V¬ ƒÁ@GŽ!´lÙ22 ”‘‘a·nQQ555‘Á` ÒÒRZ²d Í™3ǦmK\ÍÍÍ=ö!++‹"""HE""ÊÉÉ¡ÐÐP26}8pà€Ý±*•òÉ'´téRª¬¬$­VK³fÍ¢-[¶8Œe¤S}€Ôjµ£¢Sœ¬Ø¨ÐßdO™™™6˾úê+@ tâÄ ›²“'OÚ%«††òôô¤O?ý”IEjjj"³Ùlמe;­Vk³R©”Ê6mÚDèîÝ»vÛYtvv’L&£[·nIËΞ=KJ¥ÒiYâÖh4äáá!}¹]»vPqq±]LÎöU_â±ìë:{JV—.]"""³Ù,}–²ëׯKûÇÑ{ëu­_žžž”œœ,•wËYZZZÈÛÛ›®^½JDD¯¿þ:mݺծ*•ªÇcˆ(..Žª««¥²üü|JLLtxÌXIÇT_9KV|Iz½‰‰‰6ËfΜ (++CBB‚MÙŒ3ìêËå(,,„F£Axx8’““qùòe§Ó«ÄÆÆJÇÅÅáÁƒÒûŸþÏ?ÿ<öîÝÛãö5550›Íˆ‰‰‘–)•J&m‰«·>¬X±ÙÙÙøæ›o0{öl›Äa1uêÔ5 ëa ëÚØØFcKOÜý˜r™~£1æ¦ú{pïÞ½D_ý5UWWÓ·ß~+ݳúüóÏ)<<œ¾ûî;ª««£‹/Ò´iÓH›KmmmäååEÙÙÙT[[K‡"///jkk#¢®û9?&¢ß/½¼ð ¤ÓéèêÕ«K;vì°»,³sçNR©TÔÖÖ&•555Iå+W®¤ùóç“^¯§ââbЧ;v8-ëkÜ………$“ɨ¦¦ÆfýòË/Òå5ëºœí«¾Æc½¬ÿ¶î3¬.åuשּׁ·u»st ÒÙþîèè ¹\N±±±6—ú¬ëùì³Ï쎵èèh©|Æ ôÚk¯QEEݼy“ž~úizï½÷Æ2©þß³b£]“Ugg'}ôÑGE>>>”””$Ýk1›ÍtðàAЉ‰!Z¸p!åääP`` Ý—€Z­¦˜˜?~<ÅÅÅQNNŽTfýÅhÙîÈ‘#I …‚Þÿ}›/‹¶¶6R©T´sçN2ôì³Ï’TÞÐÐ@o¼ñPHH}ðÁÒ—BOe}{ýúõ”’’b·¿DQ¤˜˜Ú¼y³M]ÎöUâ±~ï¨ÏÙ¬œío"¢uëÖ‘ÍÃÖõ˜L&Ú¿?)•Jòöö¦¤¤$Òh4R¹Á` 5kÖ\.ålHÞIDAT§€€Z·nµ´´ôxïn¤SýÁÉŠzýMVŽXþñåææRQQ‘MYvv6%&&¸îÑf0öë›ÑxL9KV|ÏŠ±n´Z-V¯^ëׯ£µµÛ·oÇÛo¿=Ü¡¹ÞWl¨ðŒu³iÓ&´¶¶bñâŨ­­Ett4Ö®]‹õë×?q~~~ÚÞ] ƾb}3Z©ž¿z16¢:u Ë—/·{Z16r‚µZeË–u/:Í—#xõ'7Ü£¨3þccñ(êâΣ¨|ÏŠ±1€GQwE}¬à3+ÆÆEÝýGQg½ÂGè4®øÕhÅ£¨ŒQÔÿ(˜œ¬zÆ£¨ŒQÔ™ódÅ÷¬å¬GQ·¦V«íFL©£¨w5½»þŽ¢>cÆ äææâÆvuõuukþþþv±°þá{VŒb<Šz—‘4Š:sŒ“c£ØåË—ñèÑ#¬Zµ >>>ÒkåÊ•Ðét(**²YÿÝwßŦM›——‡úúz`×®]žžžX¾|96lØ€òòrܺu ~ø!V­ZÕ§X𛛣‹ýÒ[RRRÐØØˆ;wbíÚµëxçw––†œœ<|ø.\ÀŽ;¤ò%K–`ëÖ­¸wï´Z-.\ˆ/¿ürHú7ª éIÆ ß³rŒGQwïQÔ™-8¹gÅÃ-±Q‡[rsçÎaÊ”)xê©§¤egΜÁž={Þ¿aÌ•x¸%ÆXŸð(êÌ]ñÓ€Œ1 ¢ÎÜ'+ƘÄÃÃ{öìÁž={†;Ælðe@Æcn“cŒ1·ÇÉŠ1ƘÛãdÅcÌíq²bŒ1æöøi@6*Xæ0â©ÅÙ<<§%Á‚ íííøÛßþ³Ù<Ü¡0ÆžL&ÃË/¿ //¯îE§9Y1Æsw<ÜcŒ1÷ÇÉŠ1ƘÛãdÅcÌíýµ9ƒÓ„¥`IEND®B`‚pktools-2.6.6/doc/html/classSVC__Q-members.html0000644000113200011300000001355112647637662016302 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
SVC_Q Member List

This is the complete list of members for SVC_Q, including all inherited members.

get_Q(int i, int len) const (defined in SVC_Q)SVC_Qinlinevirtual
get_QD() const (defined in SVC_Q)SVC_Qinlinevirtual
k_function(const svm_node *x, const svm_node *y, const svm_parameter &param) (defined in Kernel)Kernelstatic
Kernel(int l, svm_node *const *x, const svm_parameter &param) (defined in Kernel)Kernel
kernel_function (defined in Kernel)Kernelprotected
SVC_Q(const svm_problem &prob, const svm_parameter &param, const schar *y_) (defined in SVC_Q)SVC_Qinline
swap_index(int i, int j) const (defined in SVC_Q)SVC_Qinlinevirtual
~Kernel() (defined in Kernel)Kernelvirtual
~QMatrix() (defined in QMatrix)QMatrixinlinevirtual
~SVC_Q() (defined in SVC_Q)SVC_Qinline
pktools-2.6.6/doc/html/ftv2mnode.png0000644000113200011300000000036612647637661014275 00000000000000‰PNG  IHDRɪ|½IDATxíÝ!NAÅñ¤‡à\ ÷à Um@`Ô5iÒ`ëh ‚ÅW7] b§ÝˆŠ&oföÍd¾YÔ4 üšcø ‡€´‹Åòù3v=¼]†§µ\B… I¿‹=B·™B¡®;¸k´µ W°ÍN@vyÍÑÖ4ãß÷]ÈâYìã§|M}]ÔÚx6a }ôdׇØYüú¨>¤||5?Ó>|žB"¡î'¡IEND®B`‚pktools-2.6.6/doc/html/classDataModel-members.html0000644000113200011300000002312212647637662017055 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
DataModel Member List

This is the complete list of members for DataModel, including all inherited members.

DataModel() (defined in DataModel)DataModelinline
DataModel(const SensorModel::SensorModel &theModel) (defined in DataModel)DataModelinline
erase(int index) (defined in DataModel)DataModelinline
getAttPlatform(int index) const (defined in DataModel)DataModelinline
getCol(int index) const (defined in DataModel)DataModelinline
getDistGeo(int index) const (defined in DataModel)DataModelinline
getHeight(int index) const (defined in DataModel)DataModelinline
getModel() const (defined in DataModel)DataModelinline
getPos(int index) const (defined in DataModel)DataModelinline
getPosGCP(int index) const (defined in DataModel)DataModelinline
getPosPlatform(int index) const (defined in DataModel)DataModelinline
getRow(int index) const (defined in DataModel)DataModelinline
getSize() const (defined in DataModel)DataModelinline
getThreshold() (defined in DataModel)DataModelinline
pushAttPlatform(const arma::vec &atp) (defined in DataModel)DataModelinline
pushCol(int c) (defined in DataModel)DataModelinline
pushPosGCP(const arma::vec &pgcp) (defined in DataModel)DataModelinline
pushPosPlatform(const arma::vec &ppl) (defined in DataModel)DataModelinline
pushRow(int r) (defined in DataModel)DataModelinline
setBoresightAtt(const arma::vec &bc_att) (defined in DataModel)DataModelinline
setModel(const SensorModel::SensorModel &theModel) (defined in DataModel)DataModelinline
setThreshold(double theThreshold) (defined in DataModel)DataModelinline
~DataModel() (defined in DataModel)DataModelinline
pktools-2.6.6/doc/html/ftv2pnode.png0000644000113200011300000000034512647637661014275 00000000000000‰PNG  IHDRɪ|¬IDATxí=QF‘Ø¥D«ÔkÄ:‰F©PK؃=V@§Õ³ Õ8SHxñÌ0bnrróŠ{ò½¿¾’$ ÀÏTŠP  ö¼X¬OÛd6êìòð"°²S´±O¥B€(¡àQé)š+YĈ ÒªËRÉÐ>VtÉsˆm9(ê„䜥k‚-@ȧ-Ü$ó b Ò[he ¿Kp-ôl|CùÿApRG'rÍ­aIEND®B`‚pktools-2.6.6/doc/html/dir_d7b2ebecdb5f44d7fa09bdedebc881a7_dep.md50000644000113200011300000000004012616110567021113 000000000000007af0df1697ef693c5b6ca2143c088c4bpktools-2.6.6/doc/html/pkeditogr_8cc_source.html0000644000113200011300000014136612647637661016664 00000000000000 pktools: /home/kempenep/pktools/src/apps/not_used/pkeditogr.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkeditogr.cc
1 /**********************************************************************
2 pkeditogr.cc: program to edit (rename fields) ogr fil
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <map>
22 #include "base/Optionpk.h"
23 #include "imageclasses/ImgReaderOgr.h"
24 #include "imageclasses/ImgWriterOgr.h"
25 #include "imageclasses/ImgReaderGdal.h"
26 #include "imageclasses/ImgWriterGdal.h"
27 
28 using namespace std;
29 
30 int main(int argc, char *argv[])
31 {
32  Optionpk<string> input_opt("i", "input", "Input vector file");
33  Optionpk<string> output_opt("o", "output", "Output vector file");
34  Optionpk<string> ogrformat_opt("f", "f", "Output OGR file format","ESRI Shapefile");
35  Optionpk<string> selectField_opt("select", "select", "select field (combined with like opt)");
36  //selectField can also be done via ogr2ogr using the -select option
37  Optionpk<string> 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)");
38  Optionpk<bool> stringent_opt("st", "stringent", "string in like option must exactly match to select feature)",false);
39  // Optionpk<string> field_opt("as_field", "_field", "output field names (number must exactly match input fields)");
40  //renaming fields can also be done via ogr2ogr using the -sql option:
41  //ogr2ogr outdataset indataset -sql "SELECT src_field1 AS dst_field1, src_field2 AS dst_field2 FROM sourcelayer"
42  Optionpk<long int> setfeature_opt("sf", "sf", "id of feature(s) to set (start from 0)");
43  Optionpk<string> setname_opt("sn", "sn", "name(s) of field(s) to set");
44  Optionpk<string> setvalue_opt("sv", "sv", "value(s) of field(s) to set");
45  Optionpk<string> addname_opt("an", "an", "name(s) of field(s) to add (number must exactly match field types)");
46  Optionpk<string> addtype_opt("at", "at", "type(s) of field(s) to add (number must exactly match fieldnames to add", "Real");
47  Optionpk<string> addvalue_opt("av", "av", "value(s) of field(s) to add");
48  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0);
49 
50  bool doProcess;//stop process when program was invoked with help option (-h --help)
51  try{
52  doProcess=input_opt.retrieveOption(argc,argv);
53  output_opt.retrieveOption(argc,argv);
54  ogrformat_opt.retrieveOption(argc,argv);
55  selectField_opt.retrieveOption(argc,argv);
56  like_opt.retrieveOption(argc,argv);
57  stringent_opt.retrieveOption(argc,argv);
58  // field_opt.retrieveOption(argc,argv);
59  addname_opt.retrieveOption(argc,argv);
60  addtype_opt.retrieveOption(argc,argv);
61  addvalue_opt.retrieveOption(argc,argv);
62  setfeature_opt.retrieveOption(argc,argv);
63  setname_opt.retrieveOption(argc,argv);
64  setvalue_opt.retrieveOption(argc,argv);
65  verbose_opt.retrieveOption(argc,argv);
66  }
67  catch(string predefinedString){
68  std::cout << predefinedString << std::endl;
69  exit(0);
70  }
71  if(!doProcess){
72  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
73  exit(0);//help was invoked, stop processing
74  }
75  if(input_opt.empty()){
76  std::cerr << "No input file provided (use option -i). Use --help for help information";
77  exit(0);//help was invoked, stop processing
78  }
79  if(output_opt.empty()){
80  std::cerr << "No output file provided (use option -o). Use --help for help information";
81  exit(0);//help was invoked, stop processing
82  }
83  if(verbose_opt[0])
84  cout << "opening " << input_opt[0] << " for reading " << endl;
85  ImgReaderOgr ogrReader(input_opt[0]);
86  if(verbose_opt[0])
87  cout << "opening " << output_opt[0] << " for writing " << endl;
88 
89  OGRFieldType fieldType[addtype_opt.size()];
90  int ogr_typecount=11;//hard coded for now!
91  for(int it=0;it<addtype_opt.size();++it){
92  for(int iType = 0; iType < ogr_typecount; ++iType){
93  if( OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType) != NULL
94  && EQUAL(OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType),
95  addtype_opt[it].c_str()))
96  fieldType[it]=(OGRFieldType) iType;
97  }
98  if(verbose_opt[0]>1)
99  std::cout << std::endl << "field type is: " << OGRFieldDefn::GetFieldTypeName(fieldType[it]) << std::endl;
100  }
101 
102  //start reading features from the layer
103  // if(field_opt.size())
104  // assert(field_opt.size()==ogrReader.getFieldCount());
105  unsigned long int ifeature=0;
106  if(verbose_opt[0])
107  cout << "going through features" << endl << flush;
108 
109  ImgWriterOgr ogrWriter(output_opt[0],ogrformat_opt[0]);
110 
111  //support multiple layers
112  int nlayer=ogrReader.getLayerCount();
113  if(verbose_opt[0])
114  std::cout << "number of layers: " << nlayer << endl;
115 
116  for(int ilayer=0;ilayer<nlayer;++ilayer){
117  OGRLayer *readLayer=ogrReader.getLayer(ilayer);
118  if(verbose_opt[0])
119  cout << "reset reading" << endl;
120  readLayer->ResetReading();
121 
122  OGRLayer *writeLayer=ogrWriter.createLayer(output_opt[0],ogrReader.getProjection(),ogrReader.getGeometryType(ilayer),NULL);
123  std::vector<OGRFieldDefn*> readFields;
124  std::vector<OGRFieldDefn*> writeFields;
125  ogrReader.getFields(readFields,ilayer);
126  writeFields=readFields;
127  try{
128  for(int ifield=0;ifield<readFields.size();++ifield){
129  // if(field_opt.size()>ifield)
130  // writeFields[ifield]->SetName(field_opt[ifield].c_str());
131  if(verbose_opt[0])
132  std::cout << readFields[ifield]->GetNameRef() << " -> " << writeFields[ifield]->GetNameRef() << std::endl;
133  if(writeLayer->CreateField(writeFields[ifield]) != OGRERR_NONE ){
134  ostringstream es;
135  // if(field_opt.size()>ifield)
136  // es << "Creating field " << field_opt[ifield] << " failed";
137  // else
138  es << "Creating field " << readFields[ifield] << " failed";
139  string errorString=es.str();
140  throw(errorString);
141  }
142  }
143  }
144  catch(string errorString){
145  std::cerr << errorString << std::endl;
146  exit(1);
147  }
148  if(verbose_opt[0])
149  std::cout << "add " << addname_opt.size() << " fields" << std::endl;
150  if(addname_opt.size()){
151  assert(addname_opt.size()==addtype_opt.size());
152  while(addvalue_opt.size()<addname_opt.size())
153  addvalue_opt.push_back(addvalue_opt.back());
154  }
155  for(int iname=0;iname<addname_opt.size();++iname){
156  if(verbose_opt[0])
157  std::cout << addname_opt[iname] << " " << std::endl;
158  ogrWriter.createField(addname_opt[iname],fieldType[iname]);
159  }
160  if(verbose_opt[0]){
161  std::cout << std::endl;
162  std::cout << addname_opt.size() << " fields created" << std::endl;
163  }
164  const char* pszMessage;
165  void* pProgressArg=NULL;
166  GDALProgressFunc pfnProgress=GDALTermProgress;
167  double progress=0;
168  OGRFeature *poFeature;
169  unsigned long int nfeature=ogrReader.getFeatureCount(ilayer);
170  while((poFeature = ogrReader.getLayer(ilayer)->GetNextFeature()) != NULL ){
171  if(verbose_opt[0])
172  std::cout << "feature " << ifeature << std::endl;
173  ++ifeature;
174  bool doSelect;
175  if(like_opt.empty())
176  doSelect=true;
177  else{
178  assert(selectField_opt.size());
179  int fieldIndex=poFeature->GetFieldIndex(selectField_opt[0].c_str());
180  string fieldValue=poFeature->GetFieldAsString(fieldIndex);
181  if(stringent_opt[0]){
182  if(fieldValue==like_opt[0])
183  doSelect=true;
184  else
185  doSelect=false;
186  }
187  else{
188  doSelect=false;
189  for(int ilike=0;ilike<like_opt.size();++ilike){
190  if(fieldValue.find(like_opt[ilike])!=std::string::npos){
191  if(verbose_opt[0])
192  std::cout << "found " << like_opt[ilike] << " in " << fieldValue << std::endl;
193  doSelect=true;
194  break;
195  }
196  }
197  }
198  }
199  if(!doSelect){
200  if(verbose_opt[0])
201  std::cout << "string not found in feature " << ifeature << std::endl;
202  continue;
203  }
204  OGRFeature *poDstFeature = NULL;
205  poDstFeature=ogrWriter.createFeature(ilayer);
206  if( poDstFeature->SetFrom( poFeature, TRUE ) != OGRERR_NONE ){
207  const char* fmt;
208  string errorString="Unable to translate feature %d from layer %s.\n";
209  fmt=errorString.c_str();
210  CPLError( CE_Failure, CPLE_AppDefined,
211  fmt,
212  poFeature->GetFID(), ogrWriter.getLayerName().c_str() );
213  OGRFeature::DestroyFeature( poFeature );
214  OGRFeature::DestroyFeature( poDstFeature );
215  }
216  long int fid=poFeature->GetFID();
217  poDstFeature->SetFID( poFeature->GetFID() );
218  for(int ifeature=0;ifeature<setfeature_opt.size();++ifeature){
219  if(fid==setfeature_opt[ifeature]){
220  switch(poDstFeature->GetFieldDefnRef(fid)->GetType()){
221  case(OFTReal):
222  poDstFeature->SetField(setname_opt[ifeature].c_str(),string2type<float>(setvalue_opt[ifeature]));
223  break;
224  case(OFTInteger):
225  poDstFeature->SetField(setname_opt[ifeature].c_str(),string2type<int>(setvalue_opt[ifeature]));
226  break;
227  case(OFTString):
228  poDstFeature->SetField(setname_opt[ifeature].c_str(),setvalue_opt[ifeature].c_str());
229  break;
230  default:
231  std::cerr << "Error: field type not supported" << std::endl;
232  exit(1);
233  break;
234  }
235  }
236  }
237 
238  //set default values for new fields
239  if(verbose_opt[0])
240  std::cout << "set default values for new fields in feature " << ifeature << std::endl;
241  for(int iname=0;iname<addname_opt.size();++iname){
242  switch(fieldType[iname]){
243  case(OFTReal):
244  if(verbose_opt[0])
245  std::cout << "set field " << addname_opt[iname] << " to default " << string2type<float>(addvalue_opt[iname]) << std::endl;
246  poDstFeature->SetField(addname_opt[iname].c_str(),string2type<float>(addvalue_opt[iname]));
247  break;
248  case(OFTInteger):
249  if(verbose_opt[0])
250  std::cout << "set field " << addname_opt[iname] << " to default " << string2type<int>(addvalue_opt[iname]) << std::endl;
251  poDstFeature->SetField(addname_opt[iname].c_str(),string2type<int>(addvalue_opt[iname]));
252  break;
253  case(OFTString):
254  if(verbose_opt[0])
255  std::cout << "set field " << addname_opt[iname] << " to default " << addvalue_opt[iname] << std::endl;
256  poDstFeature->SetField(addname_opt[iname].c_str(),addvalue_opt[iname].c_str());
257  break;
258  default:
259  std::cerr << "Error: field type not supported" << std::endl;
260  exit(1);
261  break;
262  }
263  }
264  CPLErrorReset();
265  if(verbose_opt[0])
266  std::cout << "create feature" << std::endl;
267  if(ogrWriter.createFeature( poDstFeature,ilayer ) != OGRERR_NONE){
268  const char* fmt;
269  string errorString="Unable to translate feature %d from layer %s.\n";
270  fmt=errorString.c_str();
271  CPLError( CE_Failure, CPLE_AppDefined,
272  fmt,
273  poFeature->GetFID(), ogrWriter.getLayerName().c_str() );
274  OGRFeature::DestroyFeature( poDstFeature );
275  }
276  OGRFeature::DestroyFeature( poFeature );
277  OGRFeature::DestroyFeature( poDstFeature );
278  progress=static_cast<float>(ifeature+1)/nfeature;
279  pfnProgress(progress,pszMessage,pProgressArg);
280  }
281  }
282  if(verbose_opt[0])
283  std::cout << "replaced " << ifeature << " features" << std::endl;
284  ogrReader.close();
285  ogrWriter.close();
286 }
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem.html0000644000113200011300000002374612647637662024404 00000000000000 pktools: qgis.pktools.pkfilterdem.pkfilterdem Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkfilterdem.pkfilterdem Class Reference
Inheritance diagram for qgis.pktools.pkfilterdem.pkfilterdem:
Collaboration diagram for qgis.pktools.pkfilterdem.pkfilterdem:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string DIM = "DIM"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
list FILTER_OPTIONS = ["promorph"]
 
string FILTER = "FILTER"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 39 of file pkfilterdem.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_30.map0000644000113200011300000001120712647437044015474 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite__coll__graph.png0000644000113200011300000000737112616110567026750 00000000000000‰PNG  IHDRp~E9DbKGDÿÿÿ ½§“®IDATxœíÝ{P×ð³ 2”G¥„´"Ø^fœNý£T¢”©#Ô ú€ –QZÊ£µ:ÐÛhkal±$òÐ[,+EÔ‹J,ŽHEÑbåiGB4b@ ìÞ?öv›†Â½ «9¿Ï_»'gÏùíš/œÍ Š¢¸2b»ØXƒ¬AÖ8l K?f» gnnþÜsϱ]…ÎTúúú,--MMMÙ.Ä`÷õõAž\NNNvvvlWa°†††ÚÚÚØ®B—à` °Xƒ¬APgg'Aó9Ô'Ÿ|BDff¦®j˜ép‚ :;;ÿçaqЬ»»›ËåêcdŠ¢JJJ–-[VZZª«1/^œ’’‚ôY¶¡‚hF’äýû÷õ1òõë×oÞ¼YPPÐÒÒÒÞÞ®“1¹\.ýûDe*¼@/*++—/_ngg·k×®ññqæQŠ¢===ïÝ»·zõj„ÐÒ¥K釆‡‡·lÙÂårœœ ÅLŒªªª_|ÑÌÌŒÇã1í%%%kÖ¬ñññqss›þK€¢(‘Häîînii¹víÚ'NÐk›ésÑçrîܹeË–>|˜î¦V6B¨¦¦†Ïç[[[gddÐ-A®X±ÂÖÖ633³¨¨ÈÅÅÅÊÊjïÞ½:»ÐOÊ€H$’ÁÁA-:::B¾¾¾ííí |>?--n$I’yö3=™…Báºu뺺ºZ[[W®\™––¦±‘9jttÔÔÔT$ p8œÑÑQŠ¢H’tqq‹ÅE}ôÑGª…Q•——çèèxúôi©TzæÌ>ŸO·Ï4—¿¿mmmKK ÝM­l„Ð믿.—Ë+**Bô©!„ÂÂÂäry~~>B($$D.—‹Åb¦ƒƒƒƒ‰dÎÿ0O0ÐÚÚJï–––òù|º199!tëÖ-ÕžôöÄÄÄ‚ nܸAï;vŒÏçkldŽ’ÉdÆÆÆûöí{ðàI’###J¥’¢¨††‡C?Ï®^½Šº~ýºêt+W®üþû‹‹‹BZæ¢Ï…9|zΟ?OQ”R©DuttÐMMMôy©mÓ´0¼àµ¢1eqssëíí¥·½½½ÓÓÓ§÷T*•®®®ô.ŸÏïííÕØÈbmm-‘HœœœÖ¬YsáÂ###„PIIÉÔÔ—Ë%bÕªU!µUPWW×Ê•+™]ww÷™ `NAûÉ:88 „èÙ‹-B«mcÇÐ?&Bíííôó!TUU%‰JJJ$‰Zÿ%K–,X° »»›ÞíêêrttÔØÈ266F’dYY™L&‹ŠŠÚ°aƒL&S*•¥¥¥YYY#HHH(--¥T¾•êììü믿2»7oÞœ©zûoŸ¸ºz…×Pá€øøøÎÎÎÆÆÆÝ»wGDDÐË—/ÿàƒbcc™ÛÙÑÑQ„±±qhhè®]»zzznܸ±gÏ¡P¨±‘™‚ __ßŠŠ ¹\>11alllnn~áÂ…¡¡!¡P¸ðáááô ž—œœ\SSsÿþýÚÚÚ´´4‚ ´Ï5]6˜¶×`º4Ë{€üü|ggg.—»sçα±1ÕuóØØØóÏ?Ÿšš:99ùÊ+¯,\¸n—Éd‘‘‘666öööï½÷ÞØØ˜ÆFÕ¡JKK]]]MLLÜÜÜ*++)ŠŠ‰‰ñõõU­‡$IWW×””æ@¥R™íêêjeeåççWYYikkû·s1Ûje#•e=R¹˜Þ¨¶=ûÀ1óVÏÿ ªªª¥¥…Ù-//÷ôôd±5†—@O²ÖÖÖˆˆˆ¦¦¦Ç744ìÝ»7::ší¢ ™¡}!F;KK˘˜¶«Ð&99ùñãÇR©”ÇãmÛ¶í /øiGPô‡±ÎŸ?ïîîßÓúaÞÞÞl¢3°Xƒ¬AÖ k†ö*ÐðððÔÔÛU,Ã{Ù `jjÚßßÏvspöìm„ϳ,×1fffl— Kõ2èÓE©$ÿñT„Pkë?Œà#kì€{Ö\ºÔ)“=’ÉFëëá{묰¦¬ì ‡cdllTVÖÈv-ø‚°C¡˜¬®¾65¥œœ$««¯)“lW„);jko2Oz…b²¶ö&»õ` ÀŽŠŠ+Ìwµ‚¨¨¸Ân=Ø‚°@.Wœ=Û¦T’ô®RIž=Û&—+´ôÀ‚Ó§¯“ä_^}&Iêßÿ¾ÎV=8ƒ° ¼üŠÚ»/E•—Ã*ˆ€ù&•ŽÔ×w$©ÚH’T}}‡T:ÂVU؂̷'Z4¾ïKĉ׿¿ÌAæÛÑ£WÔnh$IÂ;bó0¯úú´¶Þ™!èÚµ;ýýÃó_Î êÓ O¾{÷F37ô{affÿýënFFF÷î88,f­>üÀ§AÙó/„X¼™íBðK €5À` °Xƒ¬AÖ k€5À` °Xƒ¬AÖ k€5À` °Xƒ¬AÖ k€5À` °Xƒ¬AÖ k€7êIIIlׂ‡ËápÙ®;IIIÌÓþÏÿ#ìöíÛîîîÁÁÁ,V€¾•••ݾ}›ÙýË’gggçíí=Ï0Ÿ~þùgÕ]¸Xƒ¬AÖ kú @__Ÿ@ `ëð'³}xr.”¾é©<}`áÂ…aaaºs```ãÆºóiÇ\gƒ¿8z:S}ÀÊÊjûöíº“$I¹\®Û1ŸvÌu6ø‹£§3[(ŠúñÇ7oÞ¼~ýú¸¸¸ææf@@QÔO?ý´eË–€€€„„„K—. Õ_XõõõQQQ¾¾¾ááá555jcÒ=/^¼ôÍ7ßLNNªÎ˜››ýðáÃwÞy!ôÆoÐŽŽfffnܸ188877wbbb¦F†®*Q*•‡ ÌÈÈÕR’@ 8uêÔæÍ›‹‹‹kjj µLªq¨éõ3×YíâLMM‰D¢      ‘H455…ç™þ­¹ ººú»ï¾‹ŽŽ.**zë­·222B'Ož,**Š‹‹+.. …P=D¡P¤¥¥–””DFF~ñÅ …búÈÇÏÈÈHOOÿå—_Š‹‹éFŠ¢ÄbqSSSVV–••Õ·ß~‹:vìýèþýû¥R©H$úüóÏøá‡™u^Iyyy]]]FFFvvö;wŽ9¢¥$„ÐÕ«Wsss·oßž——wéÒ¥‚‚‚;v1?ɦO:}(íõ«]œòòò±XüÕW_555:tç3Õbn¨¨¨ˆõòò²±±yùå—£££™Æ—^zÉÊÊjÕªU[·nU=drr’¢¨±±1??¿ªª*SSÓé#ïØ±ÃÉÉiÅŠÑÑÑgΜ¡<44ÔÜÜÜ××!nnnîçç‡Ñ8©Æ¡fY?íÔ©Sñññvvv</&&æòåË8Ÿ©s ÀÀÀŸÏgvy<B¨¿¿ßÅÅ…i|öÙgUY´hQvvv[[[ppð»ï¾ÛÚÚJÄô‘œœèeË–I¥RzûÖ­[žžžÌOU< IÒÁÁÞutt”J¥õQÉàà ÓÍÙÙÙËËk¦’èmsss„‡ÃQÛžiRCͲ~ÚÝ»w7mÚ$AbbâÀÀÎgªÅÜÀår»ºº˜]úCEK–,éééaÿýwÕCÆÇÇI’LKK«ªªZ¿~ýîÝ»™ªz{{é;wîØØØÐÛééé µµµÍÍÍjý­­­ŒŒ˜³íïïçr¹õQ‰ÍÝ»wé‡:;;é§‹öÙµS›TãP³¬ŸfeeuäȉD"‘Hªªªèe¶gªÅÜàï›{ñâE™Lvùòåƒ"„Åbñ•+WäryssóáÇUóJDRRR]]Ý£G&''9ý묺ºúÑ£GL·œœœ¾¾¾ß~û-??ÿµ×^£ÍÌÌžyæ™ððð¬¬,ævvll !ÄápÁ×_=00ÐÓÓSPPàã㣱Q•øúúæçç÷ôôôôôìß¿ppp¦’fyaÕ&Õ8ÔLõ«¢/BÈËË+//opp°»»;99ùøñãXéìqþ¾‹ŠÐÐP¥RyàÀááazÉõé§Ÿ*•Êììì‡zxxÄÆÆ~ùå—Ì!&&&~ø¡X,rppHMM511AíÛ·ÏÓÓÓ‚îæããóþûï+ŠuëÖ …BÕ¥Kxxø¹s犋‹###_xá…M›6>ÞÖÖVXXðÿ À<˜ÛH£7ß|S¡PìÙ³gxxØÞÞÞß߯ ³?ÜÂÂbNýõ‡•J`Rvý_K ž:º_ðô‚¬AÖ kyèÚµk‰‰‰l•À<èîîV}ßúÏÀŸÄ8àñx!!!ÌîŸ/ƒ€!¸Xƒ¬AÖ kÿúùÛ¯­`SIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_29.png0000644000113200011300000000260312647437044015513 00000000000000‰PNG  IHDR[%-•(bKGDÿÿÿ ½§“8IDAThí™_HSmǿǹ)»(Í?ëà*h»ð"¢²!”B° ­)bBt#DEƒ„@/ ¢‹Jé/„ÕÅ6HÑ6 ñJjFóO¥5ëb‹³Étº}»y=¯Ó-ü3Ÿ|ÏØóüžçáw>~{Î9IBC®Œÿ:ƒÿšlh²¢ÉHf²Áîînþœøë×/ú|>.\æâßÉú7oÞäÉ“'ùíÛ7z½^8p€W¯^]µ‡Ã‘,äL«ìÅM¯×³¬¬Œ>Ÿ$F©Óé844¤®q»Ý´Z­ Ôëõ¼uëƒÁ ãñ8C¡c±˜:·ººšÍÍÍ$Éëׯ³¼¼\ÍÎÎrxx˜áp˜±XŒ‡èóùV%»¸¸˜~¿_í÷öörß¾}«öJvZˈÏçID4ÅÛ·oaµZ?þD,ƒÅbQç[­VLNN"77}}}€ÙlFYYÞ½{‡ŒŒÓ[\J––ƒÁ€ÏŸ?£²²%%%xúôéŠòå’T_¾|,Ëê‰êÈ‘#ë>M-FØ9Ûd2A§ÓallLEQQ"‘âñ8\.Î;‡ãÇ#¨s«ªª0==/^àãǨ®®Vc‘Hµµµ°ÛíDggç_sYøùþý{Âx~~~  100ŽË P¶^¯G]].\¸€ññq áÚµkhhh€$I8zô(^¾| EQF¡×ëa4ÕõF£'NœÀÅ‹Q^^Ž‚‚56;;‹h4 ƒÁ€H$‚ÖÖV@(JÈ!''ÐÕÕEQpç΄xMM ZZZðõëWx½^TVV¢££#}’—µÖì…úœŠ@ ÀÆÆFæååQ–e^ºt‰‘H„$ép8h±Xh0X\\Ìžžžeëß¼yC|üøñ²ØíÛ·¹mÛ6îØ±ƒ¬¯¯gaaᲺÜÞÞΜœZ,öôô$ÄEaSSsss™——ÇóçÏszzzÕRÕléŸ ÔÖÖ€öŠu H’‡Ã¡:\„öu]$šlh²¢Éˆ&[ šlh²’ò}öØØ>|(2—ÍO²GË—//{‹§µ•5NÇ÷ï߯ü RcCО E¢Éˆ&[ šlüCá ¨ëUö¹IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_17.png0000644000113200011300000000132112616110570015470 00000000000000‰PNG  IHDR`%2o{°bKGDÿÿÿ ½§“†IDAThí˜=¬)AÇ:Bá³D¡C#$*•ZPiEOD4*…¨>…FtJ¡*íÊ¢A‚ˆ„(ˆ½Å&²owÝy>öòrçW=3ëæofvgEEæ6Þ]À§ƒ B€ B€ B f]7b±ø–R>H$â÷û™ë) ûý¾ËåúÙÂ>zàõz™dÏ àvú%ƒAnïA°A°A°A1ˆ¢¨P($•J`<‹D"fð*D|'w ž§’ù|^«Õf³(ŠD"Ál%IÒáp¬×ëç‹ëõzF£‘™‹ÅÂÉñòˆAÇãôz=(•ÊL&Ãl½\.›Íæ%Å©T*­VËJ 'ÇË#KÌét]:wª3[àt:ÅãqF£V«ãñøét¢oi·Ûz½¾Ûí2¹pž—»w°4 `¹\þKk>ŸŸL&Ãá°Ýnw:T*Eçs¹\µZµÛí*•ª\.ÓIf ‡ÃaÏà|>?/w÷h©¿ @€ú‚ ®7^cn@c±X‹·Z-›ÍFwFß«pKm6›ÂÉÝû#{Ð]L§SNw½”Ëåt`±X÷a6›™™ñx,œ/‚¿)•J‚ èc»ÝÒ+$É!'”Aûýž|>_2™œÍf£ÑÈëõ VÏÝnW©T¸±@r÷òzƒ ƒÛí¾Îót:-“Éìv»Çã±Z­Ùl–ÕµZ…Ãan,ܽð|€ßü¹ƒ5v|C€ B€ B€ B€ B€ B€ BÀs#I²T*ý|)o‡$I“ÉÄβ¯Ñhôµ} ±XŒeûMÃïA°A°A°A¾ØŒ4ßcKéIEND®B`‚pktools-2.6.6/doc/html/structIndexValue.html0000644000113200011300000001035212647637662016057 00000000000000 pktools: IndexValue Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
IndexValue Struct Reference

Public Attributes

int position
 
double value
 

Detailed Description

Definition at line 23 of file IndexValue.h.


The documentation for this struct was generated from the following file:
pktools-2.6.6/doc/html/pkextract__grid_8py_source.html0000644000113200011300000011507012647637661020101 00000000000000 pktools: /home/kempenep/pktools/qgis/pkextract_grid.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract_grid.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkextract_grid.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterRaster
30 from processing.core.parameters import ParameterVector
31 from processing.core.outputs import OutputVector
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 FORMATS = [
39  'ESRI Shapefile',
40  'GeoJSON',
41  'GeoRSS',
42  'SQLite',
43  'GMT',
44  'MapInfo File',
45  'INTERLIS 1',
46  'INTERLIS 2',
47  'GML',
48  'Geoconcept',
49  'DXF',
50  'DGN',
51  'CSV',
52  'BNA',
53  'S57',
54  'KML',
55  'GPX',
56  'PGDump',
57  'GPSTrackMaker',
58  'ODS',
59  'XLSX',
60  'PDF',
61 ]
62 EXTS = [
63  '.shp',
64  '.geojson',
65  '.xml',
66  '.sqlite',
67  '.gmt',
68  '.tab',
69  '.ili',
70  '.ili',
71  '.gml',
72  '.txt',
73  '.dxf',
74  '.dgn',
75  '.csv',
76  '.bna',
77  '.000',
78  '.kml',
79  '.gpx',
80  '.pgdump',
81  '.gtm',
82  '.ods',
83  '.xlsx',
84  '.pdf',
85 ]
86 
87 class pkextract_grid(pktoolsAlgorithm):
88 
89  INPUT = "INPUT"
90  OUTPUT = "OUTPUT"
91 
92  RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
93 
94  RULE = "RULE"
95  POLYGON = "POLYGON"
96  BUFFER = "BUFFER"
97  GRID = "GRID"
98  SRCNODATA = "SRCNODATA"
99  BNDNODATA = "BNDNODATA"
100  EXTRA = 'EXTRA'
101 
102  FORMAT = "FORMAT"
103 
104  def cliName(self):
105  return "pkextract"
106 
107  def defineCharacteristics(self):
108  self.name = "extract regular grid"
109  self.group = "[pktools] raster/vector"
110  self.addParameter(ParameterRaster(self.INPUT, 'Input raster data set'))
111  self.addParameter(ParameterSelection(self.RULE,"extraction rule",self.RULE_OPTIONS, 0))
112 
113  self.addOutput(OutputVector(self.OUTPUT, 'Output vector data set'))
114  self.addParameter(ParameterSelection(self.FORMAT,
115  'Destination Format', FORMATS))
116  self.addParameter(ParameterBoolean(self.POLYGON, "Create OGRPolygon as geometry instead of OGRPoint",False))
117  self.addParameter(ParameterNumber(self.BUFFER, "Buffer for calculating statistics for point features",1,25,1))
118  self.addParameter(ParameterNumber(self.GRID, "Cell grid size (in projected units, e.g,. m)",0,1000000,1))
119 
120  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
121  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
122  self.addParameter(ParameterString(self.EXTRA, 'Additional parameters', '', optional=True))
123 
124  def processAlgorithm(self, progress):
125  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
126  commands = [cliPath]
127 
128  input=self.getParameterValue(self.INPUT)
129  commands.append('-i')
130  commands.append('"' + input + '"')
131 
132  commands.append("-r")
133  commands.append(self.RULE_OPTIONS[self.getParameterValue(self.RULE)])
134 
135  output = self.getOutputFromName(self.OUTPUT)
136  outFile = output.value
137  formatIdx = self.getParameterValue(self.FORMAT)
138  outFormat = '"' + FORMATS[formatIdx] + '"'
139  commands.append('-f')
140  commands.append(outFormat)
141  ext = EXTS[formatIdx]
142  if not outFile.endswith(ext):
143  outFile += ext
144  output.value = outFile
145  commands.append('-o')
146  commands.append('"' + outFile + '"')
147 
148  if self.getParameterValue(self.POLYGON):
149  commands.append("-polygon")
150  buffer=self.getParameterValue(self.BUFFER)
151  if buffer > 1:
152  commands.append("-buf")
153  commands.append(str(buffer))
154 
155  if self.getParameterValue(self.GRID) > 0:
156  commands.append("-grid")
157  commands.append(str(self.getParameterValue(self.GRID)))
158 
159  srcnodata=self.getParameterValue(self.SRCNODATA)
160  if srcnodata != "none":
161  srcnodataValues = srcnodata.split(';')
162  for srcnodataValue in srcnodataValues:
163  commands.append('-srcnodata')
164  commands.append(srcnodataValue)
165  bndnodata=self.getParameterValue(self.BNDNODATA)
166  bndnodataValues = bndnodata.split(';')
167  for bndnodataValue in bndnodataValues:
168  commands.append('-bndnodata')
169  commands.append(bndnodataValue)
170 
171  extra = str(self.getParameterValue(self.EXTRA))
172  if len(extra) > 0:
173  commands.append(extra)
174 
175  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/pkfilterdem.html0000644000113200011300000001322312647637662015054 00000000000000 pktools: pkfilterdem
pktools  2.6.6
Processing Kernel for geospatial data
pkfilterdem

Filter digital elevation model raster datasets

SYNOPSIS

Usage: pkfilterdem -i input.txt -o output

Options: [-f filter] [-dim maxsize]

Advanced options: [-ot type] [-of format] [-ct colortable] [-nodata value] [-circ] [-st threshold] [-ht threshold] [-minchange value]

Description

The utility pkfilterdem can be used to filter digital elevation models. It is typically used after the utility pklas2img to create a digital terrain model. The default filter operation is the progressive morphological filter.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image file
    o output std::string Output image file
    f filter std::string post processing filter: vito, etew_min, promorph (progressive morphological filter),open,close).
    dim dim double 17 maximum filter kernel size
    circ circular bool false circular disc kernel for dilation and erosion
    st st double 0 slope threshold used for morphological filtering. Use a low values to remove more height objects in flat terrains
    ht ht double 0.2 initial height threshold for progressive morphological filtering. Use low values to remove more height objects. Optionally, a maximum height threshold can be set via a second argument (e.g., -ht 0.2 -ht 2.5 sets an initial threshold at 0.2 m and caps the threshold at 2.5 m).
    minchange minchange short 0 Stop iterations when no more pixels are changed than this threshold.
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate).
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table
    nodata nodata short nodata value
    Usage: pkfilterdem -i input.txt -o output
pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm-members.html0000644000113200011300000001060612647637662026037 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktoolsAlgorithm.pktoolsAlgorithm Member List
pktools-2.6.6/doc/html/inherit_graph_14.map0000644000113200011300000000030212616110570015454 00000000000000 pktools-2.6.6/doc/html/classCompare__IndexValue-members.html0000644000113200011300000000651312647637662021101 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Compare_IndexValue Member List

This is the complete list of members for Compare_IndexValue, including all inherited members.

operator()(const IndexValue &pv1, const IndexValue &pv2) const (defined in Compare_IndexValue)Compare_IndexValueinline
pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem__inherit__graph.md50000644000113200011300000000004012616110566025211 000000000000006848dbb8564bac7bb85324114cc2e769pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop.html0000644000113200011300000002650512647637662022360 00000000000000 pktools: qgis.pktools.pkcrop.pkcrop Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pktools.pkcrop.pkcrop:
Collaboration diagram for qgis.pktools.pkcrop.pkcrop:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string DX = "DX"
 
string DY = "DY"
 
string PROJWIN = 'PROJWIN'
 
string BAND = "BAND"
 
string NODATA = "NODATA"
 
list RESAMPLE_OPTIONS = ['near', 'bilinear']
 
string RESAMPLE = "RESAMPLE"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkcrop.py.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/qgis/pktools/pkcrop.py
pktools-2.6.6/doc/html/classImgReaderGdal__coll__graph.md50000644000113200011300000000004012647437043020414 00000000000000f678d91443c884ac22b260f318d6676bpktools-2.6.6/doc/html/pkdiff__accuracy_8py_source.html0000644000113200011300000012250612647637661020206 00000000000000 pktools: /home/kempenep/pktools/qgis/pkdiff_accuracy.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdiff_accuracy.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkdiff_accuracy.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 
28 from PyQt4.QtCore import QVariant
29 from qgis.core import QgsField
30 
31 from pktoolsUtils import pktoolsUtils
32 from pktoolsAlgorithm import pktoolsAlgorithm
33 from processing.core.parameters import ParameterRaster
34 from processing.core.parameters import ParameterVector
35 from processing.core.outputs import OutputVector
36 from processing.core.outputs import OutputFile
37 #from processing.core.outputs import OutputTable
38 from processing.core.parameters import ParameterSelection
39 from processing.core.parameters import ParameterNumber
40 from processing.core.parameters import ParameterString
41 from processing.core.parameters import ParameterBoolean
42 from processing.core.parameters import ParameterExtent
43 
44 FORMATS = [
45  'ESRI Shapefile',
46  'GeoJSON',
47  'GeoRSS',
48  'SQLite',
49  'GMT',
50  'MapInfo File',
51  'INTERLIS 1',
52  'INTERLIS 2',
53  'GML',
54  'Geoconcept',
55  'DXF',
56  'DGN',
57  'CSV',
58  'BNA',
59  'S57',
60  'KML',
61  'GPX',
62  'PGDump',
63  'GPSTrackMaker',
64  'ODS',
65  'XLSX',
66  'PDF',
67 ]
68 EXTS = [
69  '.shp',
70  '.geojson',
71  '.xml',
72  '.sqlite',
73  '.gmt',
74  '.tab',
75  '.ili',
76  '.ili',
77  '.gml',
78  '.txt',
79  '.dxf',
80  '.dgn',
81  '.csv',
82  '.bna',
83  '.000',
84  '.kml',
85  '.gpx',
86  '.pgdump',
87  '.gtm',
88  '.ods',
89  '.xlsx',
90  '.pdf',
91 ]
92 
93 class pkdiff_accuracy(pktoolsAlgorithm):
94 
95  INPUT = "INPUT"
96  REFERENCE = "REFERENCE"
97  ITERATE = "ITERATE"
98  LABELREF = "LABELREF"
99  NODATA = "NODATA"
100 # TABLE = 'TABLE'
101  OUTPUT = "OUTPUT"
102  CMOUTPUT = "CMOUTPUT"
103  CMFORMAT_OPTIONS = ["ascii", "latex"]
104  CMFORMAT = "CMFORMAT"
105 
106  FORMAT = "FORMAT"
107  LABELCLASS = "LABELCLASS"
108  EXTRA = 'EXTRA'
109 
110  def cliName(self):
111  return "pkdiff"
112 
113  def defineCharacteristics(self):
114  self.name = "Accuracy assessment with ground reference"
115  self.group = "[pktools] supervised classification"
116  self.addParameter(ParameterRaster(self.INPUT, 'Classification result (raster map)'))
117  self.addParameter(ParameterVector(self.REFERENCE, 'Labeled reference vector data set'))
118  self.addParameter(ParameterBoolean(self.ITERATE, "Iterate over all layers",True))
119  self.addParameter(ParameterString(self.LABELREF, "Attribute name of the reference label","label"))
120  self.addParameter(ParameterString(self.NODATA, "No data value(s) in input or reference dataset to ignore (e.g., 0;255)","0"))
121  self.addOutput(OutputFile(self.CMOUTPUT, self.tr("Confusion matrix output file ")))
122  self.addParameter(ParameterSelection(self.CMFORMAT,"Format for confusion matrix output",self.CMFORMAT_OPTIONS, 0))
123 
124 # self.addOutput(OutputTable(self.TABLE, self.tr('Confusion matrix table')))
125  self.addOutput(OutputVector(self.OUTPUT, 'Assessment output vector data set'))
126  self.addParameter(ParameterSelection(self.FORMAT,
127  'Assessment output vector Format', FORMATS))
128  self.addParameter(ParameterString(self.LABELCLASS, "Attribute name of classified (map) label","class"))
129  self.addParameter(ParameterString(self.EXTRA,
130  'Additional parameters', '', optional=True))
131 
132  def processAlgorithm(self, progress):
133  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
134  commands = [cliPath]
135  #outputtable = self.getOutputFromName(self.TABLE)
136 
137  input=self.getParameterValue(self.INPUT)
138  commands.append('-i')
139  commands.append('"' + input + '"')
140 
141  reference=self.getParameterValue(self.REFERENCE)
142  if self.getParameterValue(self.ITERATE):
143  if str(reference).find('|')>0:
144  referencename=str(reference)[:str(reference).find('|')]
145  else:
146  referencename=str(reference)
147  else:
148  referencename=str(reference).replace("|layername"," -ln")
149  commands.append('-ref')
150  commands.append(referencename)
151 
152  commands.append('-lr');
153  commands.append(self.getParameterValue(self.LABELREF))
154 
155  nodata=self.getParameterValue(self.NODATA)
156  if nodata != "none":
157  nodataValues = nodata.split(';')
158  for nodataValue in nodataValues:
159  commands.append('-nodata')
160  commands.append(nodataValue)
161 
162  commands.append("-cm")
163  commands.append("-cmf")
164  commands.append(self.CMFORMAT_OPTIONS[self.getParameterValue(self.CMFORMAT)])
165  commands.append("-cmo")
166  commands.append(self.getOutputValue(self.CMOUTPUT))
167 
168  output = self.getOutputFromName(self.OUTPUT)
169  outFile = output.value
170  formatIdx = self.getParameterValue(self.FORMAT)
171  outFormat = '"' + FORMATS[formatIdx] + '"'
172  commands.append('-f')
173  commands.append(outFormat)
174  ext = EXTS[formatIdx]
175  if not outFile.endswith(ext):
176  outFile += ext
177  output.value = outFile
178  commands.append('-o')
179  commands.append('"' + outFile + '"')
180  commands.append('-lc');
181  commands.append(self.getParameterValue(self.LABELCLASS))
182 
183  extra = str(self.getParameterValue(self.EXTRA))
184  if len(extra) > 0:
185  commands.append(extra)
186 
187  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/dir_f92e37ed5759424bff98155847b1034b_dep.map0000644000113200011300000000067212616110567020220 00000000000000 pktools-2.6.6/doc/html/ftv2ns.png0000644000113200011300000000060412647637661013606 00000000000000‰PNG  IHDRÚ}\ˆKIDATxíÝ1K1Àñ­ž ØG•â‚n‚Šà ‚âælÁE¿€‹“ (nºêââêäࢋƒÐMAá@°‹ µât¾ÄK¡à%Ü•Û ý]BIïå%áuÍ…a™€,e × v¯ç¥«ˆi‹º¨Õö–î\tòòuénÄ0ã æÜÉoV\Ì$G.&@Y=ÆË%$um·¢ûÛ6–'Úß«9Qó\bÙ)²º0Ðë-Zœ¥TèHÍ`pÀcsm µö5:>Áë‡Þ¦I µØ ‚F‹Çà]» ›jg—ìoÏáõ©[ œõ š­onë €Ô¬¨vqõ„?\Ðç”  6»øüÒTe ÃÉéŸeç ÀÅlQ ¡c”€ª¬ü3*d€ÅWTMÏ\rÿÿh6™ø1±F ‹°fžIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop__inherit__graph.png0000644000113200011300000000675112616110567025364 00000000000000‰PNG  IHDR½pÄÃæ bKGDÿÿÿ ½§“ žIDATxœíyPgÇŸ… CÐrJ‡@;tœŽÎ´ʈ֊í(Ê1x0BÛ¡­”£—B§ Lµ0V+‡`bÂe1B« ÄÒjSåzÁ¢rÖ)G! ì¾ìûnc@öͱ¾ü>0ÏóËóû=ßÝ|³Ï&Ù°Aˆ™©O%à€à€à€,ãL£P(:;;q7Ît‹;;;#Ld$ßÈd²‡g“-2™lhhèÿÊ7$>>>Æœn±ñÇm.8¿è¾è¾è¾èÀtßtuuafÌR_|ñ†a™™™úÒ0[:†a]]]´Ëš¦ûF'===\.ו ‚(..vvvúª¹bÅŠ””dHÙÆç©ô Žã>4Då¶¶¶;wî¶´´tttè¥&—Ë%^†“m|äòx^YYééé¹råÊ÷Þ{ojjŠz” ˆÄÄD??¿¬[·!ôÌ3ÏŒŒìÙ³‡Ëå:99%&&*ŠÙ‚B¡ð…^`³Ù<¯¨¨ˆŠûûûyyyir‚ÈÍÍõööæp87n¼|ù2¹iÏEnKmm­³³ó¹sçÈa²BW¯^åóù666dð³gÏ®^½ÚÎÎ.33³¨¨ÈÕÕÕÚÚúСCzÛÑz0 ‰D$Í=¦³³!ÜÑÑ!‹ù|~ZZÄqœ2 5’JŒˆˆ ìîînmmõõõMKKÓ¤²ÆÇÇ­¬¬rss Y,Öøø8A8Ž»ººæååñé§Ÿúøø¨ #âÌ™3ŽŽŽ?ýôÓððpMM ŸÏ'ã³ÍRWW×ÒÒBÓzýõ×e2Yyy9BˆÜ4„ÐîÝ»e2YAABhçÎ2™,//0·oß¾}ûöžº0Î7­­­dW ðù|2˜œœŒºwïžúH²===mnnNí¯ŠŠ >Ÿ¯3HeI¥R ‹ãÇ?zôÇñ±±1•JE„X,f±XäÓÓØØˆjkkSŸÎ××÷ûï¿§_¸p!4Ç\ä¶PéÚ¾¹víA*• !ÔÙÙI›ššÈíÒh“æÀ˜¾aÐ:EâîîN6¼¼¼úúúÈö­[·6lØžž®=^"‘¨T*777²Ëçóûúút©‘H$‹œœüýýùå333„Pqq±R©är¹†­Y³!¤±TuwwûúúR]ooïÙP›0÷Æ:88 „ÈÙ)–/_޲°°Ðh3 Æù†|Q"„:::ÈÝŠ …¹¹¹ÅÅÅ"‘HcüªU«ÌÍÍ{zzÈnww·£££Î •"—Ëq/--•J¥û÷ïߺu«T*U©T ++kì¿$$$Bí:Zõï€îܹ3›²=ïó­¯L€qkO¾NtvvÞ¼yÓÝÝýðáÃêÇöÔÔT¹\NÇÆÆÈxxxx```OOO[[›ÏáÇu©Rr¹œÍf—•• ççç³Ùl¹\.‰ÌÍÍ% ¥§¡¡!ÔÔÔD%žü]—nr&'§íí9Tw||ŠÍ¶`±þóÒzzZiŒt]úÓˆƒÃÁÜÜè7Þð3µ&ë@ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ õ›Ðÿú믖––¦VĬ¬œÍÌ–˜ZSHJJR·Êcÿ߯¿¿zz:55ÕTâfRZZú矪Gtü_H¸;< ÁÏ?ÿ¬ó€à€à€à€ôM@@€©Ò™©ä) }³lٲݻwë·æààà¶mÛô[ }cmm}àÀýÖÄq\&“é·&@ƒû† ˆ‹/FGGoÞ¼ùÝwßmnn âÒ¥K{öìÙ²eKBBÂo¿ý ~t½qãÆþýûƒƒƒÃÃï^½ªQ“yýúõ¨¨¨íÛ·Ÿúè#ww÷¯¾úJ§úÑÑÑL0/ >Þ”——ÇÅÅ­_¿ÞÖÖvíÚµ111Tð¥—^²¶¶^³fÍÞ½{ÕSfff‚Ëå–––›6m …VVVÚ•ß~ûm''§Õ«WÇÄÄÔÔÔÁüü|@ššÊáp4Æ+•ʺººøøx{{{·wïÞššAC(©ªªÚ·oÇsuuMIIñññ¡Ò8ðâ‹/²X¬Ù”è¬Ï(ó²`ß òù|ªËãñB®®®Tð¹çžSOY¾|yvvv{{ûŽ;>øàƒÖÖVL×ÍœœœœÈ†³³óðð0Ù¾wŸßùóçµÇ?zôÇq²ëèè8<<¬3h%‰„æââ²~ýz*ÝÙÙy6ysÔg”€yY°o¸\nww7Õ%¿îZµjUoo/¼ÿ¾zÊÔÔŽãiiiB¡póæÍŸ|òÉØØ˜vå¾¾>²ñ×_ÙÚÚ’íôôô„„„ºººææfñ666fffƒƒƒdw``€Ëåê B‰­­íßÿM>ÔÕÕ¥îl‹5›¼9ê3JÀ¼,Ø7!!!999ׯ_—J¥7oÞÌÏÏG…††æåå544Èd²æææsçΩ¿Ž1 KJJª¯¯Ÿ˜˜˜™™a±XäêPUU511A ;uêTÿÝ»w ^{í52Èf³Ÿ}öÙððð¬¬,ê W.—#„X,V@@À×_=88ØÛÛ[XX¤3h%ÁÁÁ½½½½½½'NœH$;j%ÚõM.`¡,ø¼8,,L¥R}óÍ7###</66öÈ‘#¡¡¡*•*;;{ttÔÇÇ'..îØ±cTŠ¥¥åÇœ——744äààššJ^åsüøq??¿¥K—’‚‚>üðC…B¡~ü ¯­­½páBTTÔóÏ?ÿÖ[oUWW#„ÞÿýS§NÅÅÅYXXlܸ1""Bg*¥G% …"))I¡P¬[·.66V{_ͦD£>,”Çî“XRR&‰ž<¿¿¿?222==}åÊ•nnnd°¾¾¾¨¨èÌ™3 *² y „¡•Ì[ßätòùçŸÛÙÙ•””Pý|î×ÓÓsôèÑÎÎΩ©©ööö³gÏnÙ²E/•f¢ŸûùîÚµK¡P|öÙg###ööö!!![·n}òô¥K—.h¼á0´’yë›\Àò¿®SÀbÀPë°ØßtßtßtÐñ~*11Ñø:&ÓÓÓ£þ±;ÒðÍÚµkwíÚ¥R©Œ« `:<oçÎê‘ÇÞ‡Àç7À7À7À7þ ÒBIý1~jIEND®B`‚pktools-2.6.6/doc/html/classCostFactory.html0000644000113200011300000003172412647637662016042 00000000000000 pktools: CostFactory Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
CostFactory Class Referenceabstract
Inheritance diagram for CostFactory:
Collaboration diagram for CostFactory:

Public Member Functions

 CostFactory (unsigned short cv, short verbose)
 
void setCv (unsigned short cv)
 
void setClassValueMap (const std::string &classname, short classvalue)
 
std::map< std::string, short > getClassValueMap ()
 
std::vector< std::string > getNameVector ()
 
void setNameVector (std::vector< std::string > &nameVector)
 
int getClassIndex (std::string classname) const
 
void pushBackClassName (std::string classname)
 
void pushBackName (std::string classname)
 
void setNcTraining (const std::vector< unsigned int > nctraining)
 
void setNcTest (const std::vector< unsigned int > nctest)
 
virtual double getCost (const std::vector< Vector2d< float > > &trainingFeatures)=0
 

Protected Attributes

confusionmatrix::ConfusionMatrix m_cm
 
std::map< std::string, short > m_classValueMap
 
std::vector< std::string > m_nameVector
 
std::vector< unsigned int > m_nctraining
 
std::vector< unsigned int > m_nctest
 
unsigned short m_cv
 
short m_classvalue
 
short m_verbose
 

Detailed Description

Definition at line 30 of file CostFactory.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/pkfssvm_8cc_source.html0000644000113200011300000033656012647637662016370 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfssvm.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfssvm.cc
1 /**********************************************************************
2 pkfssvm.cc: feature selection for support vector machine classifier pksvm
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <stdlib.h>
21 #include <vector>
22 #include <string>
23 #include <map>
24 #include <algorithm>
25 #include "base/Optionpk.h"
26 #include "algorithms/ConfusionMatrix.h"
27 #include "algorithms/CostFactorySVM.h"
28 #include "algorithms/FeatureSelector.h"
29 #include "algorithms/svm.h"
30 #include "imageclasses/ImgReaderOgr.h"
31 
32 #ifdef HAVE_CONFIG_H
33 #include <config.h>
34 #endif
35 
36 /******************************************************************************/
98 using namespace std;
99 
100 enum SelectorValue { NA=0, SFFS=1, SFS=2, SBS=3, BFS=4};
101 
102 // CostFactorySVM::CostFactorySVM()
103 // : CostFactory(2,0), m_svm_type("C_SVC"), m_kernel_type("radial"), m_kernel_degree(3), m_gamma(1.0), m_coef0(0), m_ccost(1000), m_nu(0.5), m_epsilon_loss(100), m_cache(100), m_epsilon_tol(0.001), m_shrinking(false), m_prob_est(true){
104 // }
105 
106 // CostFactorySVM::~CostFactorySVM(){
107 // }
108 
109 // CostFactorySVM::CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, bool verbose)
110 // : CostFactory(cv,verbose), m_svm_type(svm_type), m_kernel_type(kernel_type), m_kernel_degree(kernel_degree), m_gamma(gamma), m_coef0(coef0), m_ccost(ccost), m_nu(nu), m_epsilon_loss(epsilon_loss), m_cache(cache), m_epsilon_tol(epsilon_tol), m_shrinking(shrinking), m_prob_est(prob_est){};
111 
112 // double CostFactorySVM::getCost(const vector<Vector2d<float> > &trainingFeatures){
113 // std::map<std::string, svm::SVM_TYPE> svmMap;
114 
115 // svmMap["C_SVC"]=svm::C_SVC;
116 // svmMap["nu_SVC"]=svm::nu_SVC;
117 // svmMap["one_class"]=svm::one_class;
118 // svmMap["epsilon_SVR"]=svm::epsilon_SVR;
119 // svmMap["nu_SVR"]=svm::nu_SVR;
120 
121 // std::map<std::string, svm::KERNEL_TYPE> kernelMap;
122 
123 // kernelMap["linear"]=svm::linear;
124 // kernelMap["polynomial"]=svm::polynomial;
125 // kernelMap["radial"]=svm::radial;
126 // kernelMap["sigmoid;"]=svm::sigmoid;
127 
128 // unsigned short nclass=trainingFeatures.size();
129 // unsigned int ntraining=0;
130 // unsigned int ntest=0;
131 // for(int iclass=0;iclass<nclass;++iclass){
132 // ntraining+=m_nctraining[iclass];
133 // ntest+=m_nctest[iclass];
134 // }
135 // if(ntest)
136 // assert(!m_cv);
137 // if(!m_cv)
138 // assert(ntest);
139 // unsigned short nFeatures=trainingFeatures[0][0].size();
140 
141 // struct svm_parameter param;
142 // param.svm_type = svmMap[m_svm_type];
143 // param.kernel_type = kernelMap[m_kernel_type];
144 // param.degree = m_kernel_degree;
145 // param.gamma = (m_gamma>0)? m_gamma : 1.0/nFeatures;
146 // param.coef0 = m_coef0;
147 // param.nu = m_nu;
148 // param.cache_size = m_cache;
149 // param.C = m_ccost;
150 // param.eps = m_epsilon_tol;
151 // param.p = m_epsilon_loss;
152 // param.shrinking = (m_shrinking)? 1 : 0;
153 // param.probability = (m_prob_est)? 1 : 0;
154 // param.nr_weight = 0;//not used: I use priors and balancing
155 // param.weight_label = NULL;
156 // param.weight = NULL;
157 // param.verbose=(m_verbose>1)? true:false;
158 // struct svm_model* svm;
159 // struct svm_problem prob;
160 // struct svm_node* x_space;
161 
162 // prob.l=ntraining;
163 // prob.y = Malloc(double,prob.l);
164 // prob.x = Malloc(struct svm_node *,prob.l);
165 // x_space = Malloc(struct svm_node,(nFeatures+1)*ntraining);
166 // unsigned long int spaceIndex=0;
167 // int lIndex=0;
168 // for(int iclass=0;iclass<nclass;++iclass){
169 // // for(int isample=0;isample<trainingFeatures[iclass].size();++isample){
170 // for(int isample=0;isample<m_nctraining[iclass];++isample){
171 // prob.x[lIndex]=&(x_space[spaceIndex]);
172 // for(int ifeature=0;ifeature<nFeatures;++ifeature){
173 // x_space[spaceIndex].index=ifeature+1;
174 // x_space[spaceIndex].value=trainingFeatures[iclass][isample][ifeature];
175 // ++spaceIndex;
176 // }
177 // x_space[spaceIndex++].index=-1;
178 // prob.y[lIndex]=iclass;
179 // ++lIndex;
180 // }
181 // }
182 
183 // assert(lIndex==prob.l);
184 // if(m_verbose>2)
185 // std::cout << "checking parameters" << std::endl;
186 // svm_check_parameter(&prob,&param);
187 // if(m_verbose>2)
188 // std::cout << "parameters ok, training" << std::endl;
189 // svm=svm_train(&prob,&param);
190 // if(m_verbose>2)
191 // std::cout << "SVM is now trained" << std::endl;
192 
193 // m_cm.clearResults();
194 // if(m_cv>1){
195 // double *target = Malloc(double,prob.l);
196 // svm_cross_validation(&prob,&param,m_cv,target);
197 // assert(param.svm_type != EPSILON_SVR&&param.svm_type != NU_SVR);//only for regression
198 // for(int i=0;i<prob.l;i++){
199 // string refClassName=m_nameVector[prob.y[i]];
200 // string className=m_nameVector[target[i]];
201 // if(m_classValueMap.size())
202 // m_cm.incrementResult(type2string<short>(m_classValueMap[refClassName]),type2string<short>(m_classValueMap[className]),1.0);
203 // else
204 // m_cm.incrementResult(m_cm.getClass(prob.y[i]),m_cm.getClass(target[i]),1.0);
205 // }
206 // free(target);
207 // }
208 // else{
209 // struct svm_node *x_test;
210 // vector<double> result(nclass);
211 // x_test = Malloc(struct svm_node,(nFeatures+1));
212 // for(int iclass=0;iclass<nclass;++iclass){
213 // for(int isample=0;isample<m_nctest[iclass];++isample){
214 // for(int ifeature=0;ifeature<nFeatures;++ifeature){
215 // x_test[ifeature].index=ifeature+1;
216 // x_test[ifeature].value=trainingFeatures[iclass][m_nctraining[iclass]+isample][ifeature];
217 // }
218 // x_test[nFeatures].index=-1;
219 // double predict_label=0;
220 // assert(svm_check_probability_model(svm));
221 // predict_label = svm_predict_probability(svm,x_test,&(result[0]));
222 // // predict_label = svm_predict(svm,x_test);
223 // string refClassName=m_nameVector[iclass];
224 // string className=m_nameVector[static_cast<short>(predict_label)];
225 // if(m_classValueMap.size())
226 // m_cm.incrementResult(type2string<short>(m_classValueMap[refClassName]),type2string<short>(m_classValueMap[className]),1.0);
227 // else
228 // m_cm.incrementResult(refClassName,className,1.0);
229 // }
230 // }
231 // free(x_test);
232 // }
233 // if(m_verbose>1)
234 // std::cout << m_cm << std::endl;
235 // assert(m_cm.nReference());
236 // // if(m_verbose)
237 
238 // // std::cout << m_cm << std::endl;
239 // // std::cout << "Kappa: " << m_cm.kappa() << std::endl;
240 // // double se95_oa=0;
241 // // double doa=0;
242 // // doa=m_cm.oa_pct(&se95_oa);
243 // // std::cout << "Overall Accuracy: " << doa << " (" << se95_oa << ")" << std::endl;
244 
245 // // *NOTE* Because svm_model contains pointers to svm_problem, you can
246 // // not free the memory used by svm_problem if you are still using the
247 // // svm_model produced by svm_train().
248 // // however, we will re-train the svm later on after the feature selection
249 // free(prob.y);
250 // free(prob.x);
251 // free(x_space);
252 // svm_free_and_destroy_model(&(svm));
253 
254 // return(m_cm.kappa());
255 // }
256 
257 int main(int argc, char *argv[])
258 {
259  // vector<double> priors;
260 
261  //--------------------------- command line options ------------------------------------
262  Optionpk<string> input_opt("i", "input", "input test set (leave empty to perform a cross validation based on training only)");
263  Optionpk<string> training_opt("t", "training", "training vector file. A single vector file contains all training features (must be set as: B0, B1, B2,...) for all classes (class numbers identified by label option).");
264  Optionpk<string> tlayer_opt("tln", "tln", "training layer name(s)");
265  Optionpk<string> label_opt("label", "label", "identifier for class label in training vector file.","label");
266  Optionpk<unsigned short> maxFeatures_opt("n", "nf", "number of features to select (0 to select optimal number, see also ecost option)", 0);
267  Optionpk<unsigned int> balance_opt("bal", "balance", "balance the input data to this number of samples for each class", 0);
268  Optionpk<bool> random_opt("random","random", "in case of balance, randomize input data", true);
269  Optionpk<int> minSize_opt("min", "min", "if number of training pixels is less then min, do not take this class into account", 0);
270  Optionpk<unsigned short> band_opt("b", "band", "band index (starting from 0, either use band option or use start to end)");
271  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
272  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
273  Optionpk<double> offset_opt("offset", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
274  Optionpk<double> scale_opt("scale", "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);
275  Optionpk<string> selector_opt("sm", "sm", "feature selection method (sffs=sequential floating forward search,sfs=sequential forward search, sbs, sequential backward search ,bfs=brute force search)","sffs");
276  Optionpk<float> epsilon_cost_opt("ecost", "ecost", "epsilon for stopping criterion in cost function to determine optimal number of features",0.001);
277 
278  Optionpk<std::string> svm_type_opt("svmt", "svmtype", "type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)","C_SVC");
279  Optionpk<std::string> kernel_type_opt("kt", "kerneltype", "type of kernel function (linear,polynomial,radial,sigmoid) ","radial");
280  Optionpk<unsigned short> kernel_degree_opt("kd", "kd", "degree in kernel function",3);
281  Optionpk<float> gamma_opt("g", "gamma", "gamma in kernel function",1.0);
282  Optionpk<float> coef0_opt("c0", "coef0", "coef0 in kernel function",0);
283  Optionpk<float> ccost_opt("cc", "ccost", "the parameter C of C-SVC, epsilon-SVR, and nu-SVR",1000);
284  Optionpk<float> nu_opt("nu", "nu", "the parameter nu of nu-SVC, one-class SVM, and nu-SVR",0.5);
285  Optionpk<float> epsilon_loss_opt("eloss", "eloss", "the epsilon in loss function of epsilon-SVR",0.1);
286  Optionpk<int> cache_opt("cache", "cache", "cache memory size in MB",100);
287  Optionpk<float> epsilon_tol_opt("etol", "etol", "the tolerance of termination criterion",0.001);
288  Optionpk<bool> shrinking_opt("shrink", "shrink", "whether to use the shrinking heuristics",false);
289  Optionpk<bool> prob_est_opt("pe", "probest", "whether to train a SVC or SVR model for probability estimates",true,2);
290  Optionpk<unsigned short> cv_opt("cv", "cv", "n-fold cross validation mode",2);
291  Optionpk<string> classname_opt("c", "class", "list of class names.");
292  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in classname opt.");
293  Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0,2);
294 
295  tlayer_opt.setHide(1);
296  label_opt.setHide(1);
297  balance_opt.setHide(1);
298  random_opt.setHide(1);
299  minSize_opt.setHide(1);
300  band_opt.setHide(1);
301  bstart_opt.setHide(1);
302  bend_opt.setHide(1);
303  offset_opt.setHide(1);
304  scale_opt.setHide(1);
305  svm_type_opt.setHide(1);
306  kernel_type_opt.setHide(1);
307  kernel_degree_opt.setHide(1);
308  gamma_opt.setHide(1);
309  coef0_opt.setHide(1);
310  ccost_opt.setHide(1);
311  nu_opt.setHide(1);
312  epsilon_loss_opt.setHide(1);
313  cache_opt.setHide(1);
314  epsilon_tol_opt.setHide(1);
315  shrinking_opt.setHide(1);
316  prob_est_opt.setHide(1);
317  selector_opt.setHide(1);
318  epsilon_cost_opt.setHide(1);
319  cv_opt.setHide(1);
320  classname_opt.setHide(1);
321  classvalue_opt.setHide(1);
322 
323  bool doProcess;//stop process when program was invoked with help option (-h --help)
324  try{
325  doProcess=input_opt.retrieveOption(argc,argv);
326  training_opt.retrieveOption(argc,argv);
327  maxFeatures_opt.retrieveOption(argc,argv);
328  tlayer_opt.retrieveOption(argc,argv);
329  label_opt.retrieveOption(argc,argv);
330  balance_opt.retrieveOption(argc,argv);
331  random_opt.retrieveOption(argc,argv);
332  minSize_opt.retrieveOption(argc,argv);
333  band_opt.retrieveOption(argc,argv);
334  bstart_opt.retrieveOption(argc,argv);
335  bend_opt.retrieveOption(argc,argv);
336  offset_opt.retrieveOption(argc,argv);
337  scale_opt.retrieveOption(argc,argv);
338  svm_type_opt.retrieveOption(argc,argv);
339  kernel_type_opt.retrieveOption(argc,argv);
340  kernel_degree_opt.retrieveOption(argc,argv);
341  gamma_opt.retrieveOption(argc,argv);
342  coef0_opt.retrieveOption(argc,argv);
343  ccost_opt.retrieveOption(argc,argv);
344  nu_opt.retrieveOption(argc,argv);
345  epsilon_loss_opt.retrieveOption(argc,argv);
346  cache_opt.retrieveOption(argc,argv);
347  epsilon_tol_opt.retrieveOption(argc,argv);
348  shrinking_opt.retrieveOption(argc,argv);
349  prob_est_opt.retrieveOption(argc,argv);
350  selector_opt.retrieveOption(argc,argv);
351  epsilon_cost_opt.retrieveOption(argc,argv);
352  cv_opt.retrieveOption(argc,argv);
353  classname_opt.retrieveOption(argc,argv);
354  classvalue_opt.retrieveOption(argc,argv);
355  verbose_opt.retrieveOption(argc,argv);
356  }
357  catch(string predefinedString){
358  std::cout << predefinedString << std::endl;
359  exit(0);
360  }
361  if(!doProcess){
362  cout << endl;
363  cout << "Usage: pkfssvm -t training -n number" << endl;
364  cout << endl;
365  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
366  exit(0);//help was invoked, stop processing
367  }
368 
369  CostFactorySVM costfactory(svm_type_opt[0], kernel_type_opt[0], kernel_degree_opt[0], gamma_opt[0], coef0_opt[0], ccost_opt[0], nu_opt[0], epsilon_loss_opt[0], cache_opt[0], epsilon_tol_opt[0], shrinking_opt[0], prob_est_opt[0], cv_opt[0], verbose_opt[0]);
370 
371  assert(training_opt.size());
372  if(input_opt.size())
373  costfactory.setCv(0);
374  if(verbose_opt[0]>=1){
375  if(input_opt.size())
376  std::cout << "input filename: " << input_opt[0] << std::endl;
377  std::cout << "training vector file: " << std::endl;
378  for(int ifile=0;ifile<training_opt.size();++ifile)
379  std::cout << training_opt[ifile] << std::endl;
380  std::cout << "verbose: " << verbose_opt[0] << std::endl;
381  }
382 
383  static std::map<std::string, SelectorValue> selMap;
384  //initialize selMap
385  selMap["sffs"]=SFFS;
386  selMap["sfs"]=SFS;
387  selMap["sbs"]=SBS;
388  selMap["bfs"]=BFS;
389 
390  unsigned int totalSamples=0;
391  unsigned int totalTestSamples=0;
392 
393  unsigned short nclass=0;
394  int nband=0;
395  int startBand=2;//first two bands represent X and Y pos
396 
397  // if(priors_opt.size()>1){//priors from argument list
398  // priors.resize(priors_opt.size());
399  // double normPrior=0;
400  // for(int iclass=0;iclass<priors_opt.size();++iclass){
401  // priors[iclass]=priors_opt[iclass];
402  // normPrior+=priors[iclass];
403  // }
404  // //normalize
405  // for(int iclass=0;iclass<priors_opt.size();++iclass)
406  // priors[iclass]/=normPrior;
407  // }
408 
409  //convert start and end band options to vector of band indexes
410  try{
411  if(bstart_opt.size()){
412  if(bend_opt.size()!=bstart_opt.size()){
413  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
414  throw(errorstring);
415  }
416  band_opt.clear();
417  for(int ipair=0;ipair<bstart_opt.size();++ipair){
418  if(bend_opt[ipair]<=bstart_opt[ipair]){
419  string errorstring="Error: index for end band must be smaller then start band";
420  throw(errorstring);
421  }
422  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
423  band_opt.push_back(iband);
424  }
425  }
426  }
427  catch(string error){
428  cerr << error << std::endl;
429  exit(1);
430  }
431  //sort bands
432  if(band_opt.size())
433  std::sort(band_opt.begin(),band_opt.end());
434 
435  if(classname_opt.size()){
436  assert(classname_opt.size()==classvalue_opt.size());
437  for(int iclass=0;iclass<classname_opt.size();++iclass)
438  costfactory.setClassValueMap(classname_opt[iclass],classvalue_opt[iclass]);
439  }
440 
441  //----------------------------------- Training -------------------------------
442  vector<double> offset;
443  vector<double> scale;
444  vector< Vector2d<float> > trainingPixels;//[class][sample][band]
445  vector< Vector2d<float> > testPixels;//[class][sample][band]
446  map<string,Vector2d<float> > trainingMap;
447  map<string,Vector2d<float> > testMap;
448  vector<string> fields;
449 
450  struct svm_problem prob;
451  //organize training data
452  trainingPixels.clear();
453  testPixels.clear();
454  if(verbose_opt[0]>=1)
455  std::cout << "reading training file " << training_opt[0] << std::endl;
456  try{
457  ImgReaderOgr trainingReader(training_opt[0]);
458  if(band_opt.size()){
459  totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
460  if(input_opt.size()){
461  ImgReaderOgr inputReader(input_opt[0]);
462  totalTestSamples=inputReader.readDataImageOgr(testMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
463  inputReader.close();
464  }
465  }
466  else{
467  totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
468  if(input_opt.size()){
469  ImgReaderOgr inputReader(input_opt[0]);
470  totalTestSamples=inputReader.readDataImageOgr(testMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
471  inputReader.close();
472  }
473  }
474  if(trainingMap.size()<2){
475  string errorstring="Error: could not read at least two classes from training input file";
476  throw(errorstring);
477  }
478  if(input_opt.size()&&testMap.size()<2){
479  string errorstring="Error: could not read at least two classes from test input file";
480  throw(errorstring);
481  }
482  trainingReader.close();
483  }
484  catch(string error){
485  cerr << error << std::endl;
486  exit(1);
487  }
488  catch(std::exception& e){
489  std::cerr << "Error: ";
490  std::cerr << e.what() << std::endl;
491  std::cerr << CPLGetLastErrorMsg() << std::endl;
492  exit(1);
493  }
494  catch(...){
495  cerr << "error caught" << std::endl;
496  exit(1);
497  }
498  //todo: delete class 0 ?
499  // if(verbose_opt[0]>=1)
500  // std::cout << "erasing class 0 from training set (" << trainingMap[0].size() << " from " << totalSamples << ") samples" << std::endl;
501  // totalSamples-=trainingMap[0].size();
502  // trainingMap.erase(0);
503 
504  if(verbose_opt[0]>1)
505  std::cout << "training pixels: " << std::endl;
506  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
507  while(mapit!=trainingMap.end()){
508  //delete small classes
509  if((mapit->second).size()<minSize_opt[0]){
510  trainingMap.erase(mapit);
511  continue;
512  }
513  costfactory.pushBackName(mapit->first);
514  trainingPixels.push_back(mapit->second);
515  if(verbose_opt[0]>1)
516  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
517  ++mapit;
518  }
519  nclass=trainingPixels.size();
520  if(classname_opt.size())
521  assert(nclass==classname_opt.size());
522  nband=trainingPixels[0][0].size()-2;//X and Y//trainingPixels[0][0].size();
523 
524  mapit=testMap.begin();
525  while(mapit!=testMap.end()){
526  if(costfactory.getClassValueMap().size()){
527  // if(classValueMap.size()){
528  //check if name in test is covered by classname_opt (values can not be 0)
529  if((costfactory.getClassValueMap())[mapit->first]>0){
530  ;//ok, no need to print to std::cout
531  }
532  else{
533  std::cerr << "Error: names in classname option are not complete, please check names in test vector and make sure classvalue is > 0" << std::endl;
534  exit(1);
535  }
536  }
537  //no need to delete small classes for test sample
538  testPixels.push_back(mapit->second);
539  if(verbose_opt[0]>1)
540  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
541  ++mapit;
542  }
543  if(input_opt.size()){
544  assert(nclass==testPixels.size());
545  assert(nband=testPixels[0][0].size()-2);//X and Y//testPixels[0][0].size();
546  assert(!cv_opt[0]);
547  }
548 
549  //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp
550  //balance training data
551  //todo: do I mean to use random_opt?
552  if(balance_opt[0]>0){
553  if(random_opt[0])
554  srand(time(NULL));
555  totalSamples=0;
556  for(int iclass=0;iclass<nclass;++iclass){
557  if(trainingPixels[iclass].size()>balance_opt[0]){
558  while(trainingPixels[iclass].size()>balance_opt[0]){
559  int index=rand()%trainingPixels[iclass].size();
560  trainingPixels[iclass].erase(trainingPixels[iclass].begin()+index);
561  }
562  }
563  else{
564  int oldsize=trainingPixels[iclass].size();
565  for(int isample=trainingPixels[iclass].size();isample<balance_opt[0];++isample){
566  int index = rand()%oldsize;
567  trainingPixels[iclass].push_back(trainingPixels[iclass][index]);
568  }
569  }
570  totalSamples+=trainingPixels[iclass].size();
571  }
572  assert(totalSamples==nclass*balance_opt[0]);
573  }
574 
575  //set scale and offset
576  offset.resize(nband);
577  scale.resize(nband);
578  if(offset_opt.size()>1)
579  assert(offset_opt.size()==nband);
580  if(scale_opt.size()>1)
581  assert(scale_opt.size()==nband);
582  for(int iband=0;iband<nband;++iband){
583  if(verbose_opt[0]>1)
584  std::cout << "scaling for band" << iband << std::endl;
585  offset[iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband];
586  scale[iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband];
587  //search for min and maximum
588  if(scale[iband]<=0){
589  float theMin=trainingPixels[0][0][iband+startBand];
590  float theMax=trainingPixels[0][0][iband+startBand];
591  for(int iclass=0;iclass<nclass;++iclass){
592  for(int isample=0;isample<trainingPixels[iclass].size();++isample){
593  if(theMin>trainingPixels[iclass][isample][iband+startBand])
594  theMin=trainingPixels[iclass][isample][iband+startBand];
595  if(theMax<trainingPixels[iclass][isample][iband+startBand])
596  theMax=trainingPixels[iclass][isample][iband+startBand];
597  }
598  }
599  offset[iband]=theMin+(theMax-theMin)/2.0;
600  scale[iband]=(theMax-theMin)/2.0;
601  if(verbose_opt[0]>1){
602  std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl;
603  std::cout << "Using offset, scale: " << offset[iband] << ", " << scale[iband] << std::endl;
604  std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[iband])/scale[iband] << "," << (theMax-offset[iband])/scale[iband] << "]" << std::endl;
605  }
606  }
607  }
608 
609  // if(priors_opt.size()==1){//default: equal priors for each class
610  // priors.resize(nclass);
611  // for(int iclass=0;iclass<nclass;++iclass)
612  // priors[iclass]=1.0/nclass;
613  // }
614  // assert(priors_opt.size()==1||priors_opt.size()==nclass);
615 
616  if(verbose_opt[0]>=1){
617  std::cout << "number of bands: " << nband << std::endl;
618  std::cout << "number of classes: " << nclass << std::endl;
619  // std::cout << "priors:";
620  // for(int iclass=0;iclass<nclass;++iclass)
621  // std::cout << " " << priors[iclass];
622  // std::cout << std::endl;
623  }
624 
625  //set names in confusion matrix using nameVector
626  vector<string> nameVector=costfactory.getNameVector();
627  for(int iname=0;iname<nameVector.size();++iname){
628  if(costfactory.getClassValueMap().empty())
629  costfactory.pushBackClassName(nameVector[iname]);
630  // cm.pushBackClassName(nameVector[iname]);
631  else if(costfactory.getClassIndex(type2string<short>((costfactory.getClassValueMap())[nameVector[iname]]))<0)
632  costfactory.pushBackClassName(type2string<short>((costfactory.getClassValueMap())[nameVector[iname]]));
633  }
634 
635 
636  //Calculate features of training (and test) set
637 
638  vector<unsigned int> nctraining;
639  vector<unsigned int> nctest;
640  nctraining.resize(nclass);
641  nctest.resize(nclass);
642  vector< Vector2d<float> > trainingFeatures(nclass);
643  for(int iclass=0;iclass<nclass;++iclass){
644  if(verbose_opt[0]>=1)
645  std::cout << "calculating features for class " << iclass << std::endl;
646  nctraining[iclass]=trainingPixels[iclass].size();
647  if(verbose_opt[0]>=1)
648  std::cout << "nctraining[" << iclass << "]: " << nctraining[iclass] << std::endl;
649  if(testPixels.size()>iclass){
650  nctest[iclass]=testPixels[iclass].size();
651  if(verbose_opt[0]>=1){
652  std::cout << "nctest[" << iclass << "]: " << nctest[iclass] << std::endl;
653  }
654  }
655  else
656  nctest[iclass]=0;
657 
658  trainingFeatures[iclass].resize(nctraining[iclass]+nctest[iclass]);
659  for(int isample=0;isample<nctraining[iclass];++isample){
660  //scale pixel values according to scale and offset!!!
661  for(int iband=0;iband<nband;++iband){
662  assert(trainingPixels[iclass].size()>isample);
663  assert(trainingPixels[iclass][isample].size()>iband+startBand);
664  assert(offset.size()>iband);
665  assert(scale.size()>iband);
666  float value=trainingPixels[iclass][isample][iband+startBand];
667  trainingFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]);
668  }
669  }
670  for(int isample=0;isample<nctest[iclass];++isample){
671  //scale pixel values according to scale and offset!!!
672  for(int iband=0;iband<nband;++iband){
673  assert(testPixels[iclass].size()>isample);
674  assert(testPixels[iclass][isample].size()>iband+startBand);
675  assert(offset.size()>iband);
676  assert(scale.size()>iband);
677  float value=testPixels[iclass][isample][iband+startBand];
678  // testFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]);
679  trainingFeatures[iclass][nctraining[iclass]+isample].push_back((value-offset[iband])/scale[iband]);
680  }
681  }
682  assert(trainingFeatures[iclass].size()==nctraining[iclass]+nctest[iclass]);
683  }
684 
685  costfactory.setNcTraining(nctraining);
686  costfactory.setNcTest(nctest);
687  int nFeatures=trainingFeatures[0][0].size();
688  int maxFeatures=(maxFeatures_opt[0])? maxFeatures_opt[0] : 1;
689  double previousCost=-1;
690  double cost=0;
691  list<int> subset;//set of selected features (levels) for each class combination
692  FeatureSelector selector;
693  try{
694  if(maxFeatures>=nFeatures){
695  subset.clear();
696  for(int ifeature=0;ifeature<nFeatures;++ifeature)
697  subset.push_back(ifeature);
698  cost=costfactory.getCost(trainingFeatures);
699  }
700  else{
701  while(fabs(cost-previousCost)>=epsilon_cost_opt[0]){
702  previousCost=cost;
703  switch(selMap[selector_opt[0]]){
704  case(SFFS):
705  subset.clear();//needed to clear in case of floating and brute force search
706  cost=selector.floating(trainingFeatures,costfactory,subset,maxFeatures,epsilon_cost_opt[0],verbose_opt[0]);
707  break;
708  case(SFS):
709  cost=selector.forward(trainingFeatures,costfactory,subset,maxFeatures,verbose_opt[0]);
710  break;
711  case(SBS):
712  cost=selector.backward(trainingFeatures,costfactory,subset,maxFeatures,verbose_opt[0]);
713  break;
714  case(BFS):
715  subset.clear();//needed to clear in case of floating and brute force search
716  cost=selector.bruteForce(trainingFeatures,costfactory,subset,maxFeatures,verbose_opt[0]);
717  break;
718  default:
719  std::cout << "Error: selector not supported, please use sffs, sfs, sbs or bfs" << std::endl;
720  exit(1);
721  break;
722  }
723  if(verbose_opt[0]>1){
724  std::cout << "cost: " << cost << std::endl;
725  std::cout << "previousCost: " << previousCost << std::endl;
726  std::cout << std::setprecision(12) << "cost-previousCost: " << cost - previousCost << " ( " << epsilon_cost_opt[0] << ")" << std::endl;
727  }
728  if(!maxFeatures_opt[0])
729  ++maxFeatures;
730  else
731  break;
732  }
733  }
734  }
735  catch(...){
736  std::cout << "caught feature selection" << std::endl;
737  exit(1);
738  }
739 
740  if(verbose_opt[0])
741  cout <<"cost: " << cost << endl;
742  subset.sort();
743  for(list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
744  std::cout << " -b " << *lit;
745  std::cout << std::endl;
746  // if((*(lit))!=subset.back())
747  // else
748  // cout << endl;
749 
750  // *NOTE* Because svm_model contains pointers to svm_problem, you can
751  // not free the memory used by svm_problem if you are still using the
752  // svm_model produced by svm_train().
753 
754  // free(prob.y);
755  // free(prob.x);
756  // free(x_space);
757  // svm_destroy_param(&param);
758  return 0;
759 }
760 
pktools-2.6.6/doc/html/graph_legend.html0000644000113200011300000001502212647637663015165 00000000000000 pktools: Graph Legend
pktools  2.6.6
Processing Kernel for geospatial data
Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };
/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };
/* Class not documented with doxygen comments */
class Undocumented { };
/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };
/*! A template class */
template<class T> class Templ { };
/*! Class that is inherited using protected inheritance */
class ProtectedBase { };
/*! Class that is inherited using private inheritance */
class PrivateBase { };
/*! Class that is used by the Inherited class */
class Used { };
/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
protected ProtectedBase,
private PrivateBase,
public Undocumented,
public Templ<int>
{
private:
Used *m_usedClass;
};

This will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled gray box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.

The arrows have the following meaning:

  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
pktools-2.6.6/doc/html/doxygen.css0000644000113200011300000005657712647637661014071 00000000000000/* The standard CSS for doxygen 1.8.6 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ h1.groupheader { font-size: 150%; } .title { font: 400 14px/28px Roboto,sans-serif; font-size: 150%; font-weight: bold; margin: 10px 2px; } h2.groupheader { border-bottom: 1px solid #879ECB; color: #354C7B; font-size: 150%; font-weight: normal; margin-top: 1.75em; padding-top: 8px; padding-bottom: 4px; width: 100%; } h3.groupheader { font-size: 100%; } h1, h2, h3, h4, h5, h6 { -webkit-transition: text-shadow 0.5s linear; -moz-transition: text-shadow 0.5s linear; -ms-transition: text-shadow 0.5s linear; -o-transition: text-shadow 0.5s linear; transition: text-shadow 0.5s linear; margin-right: 15px; } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd { margin-top: 2px; } p.starttd { margin-top: 0px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited, a.line, a.line:visited { color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; font-family: monospace, fixed; font-size: 105%; } div.fragment { padding: 4px 6px; margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } div.line { font-family: monospace, fixed; font-size: 13px; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; white-space: pre; } span.lineno a { background-color: #D8D8D8; } span.lineno a:hover { background-color: #C8C8C8; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; margin-right: 8px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .memberdecls td, .fieldtable tr { -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { background-color: cyan; box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memSeparator { border-bottom: 1px solid #DEE4F0; line-height: 1px; margin: 0px; padding: 0px; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; font-size: 80%; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; -o-transition: box-shadow 0.5s linear; transition: box-shadow 0.5s linear; display: table !important; width: 100%; } .memitem.glow { box-shadow: 0 0 15px cyan; } .memname { font-weight: bold; margin-left: 6px; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px; } .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; background-image:url('nav_g.png'); background-repeat:repeat-x; background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; /* webkit specific markup */ -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .paramname code { line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } span.mlabel { background-color: #728DC1; border-top:1px solid #5373B4; border-left:1px solid #5373B4; border-right:1px solid #C4CFE5; border-bottom:1px solid #C4CFE5; text-shadow: none; color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; font-size: 7pt; white-space: nowrap; vertical-align: middle; } /* @end */ /* these are for tree view when not used as main index */ div.directory { margin: 10px 0px; border-top: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; width: 100%; } .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; padding-top: 3px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } .directory tr.even { padding-left: 6px; background-color: #F7F8FB; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; font-size: 9pt; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3D578C; } div.dynheader { margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } address { font-style: normal; color: #2A3D61; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { /*width: 100%;*/ margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; vertical-align: top; } .fieldtable td.fieldname { padding-top: 3px; } .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; /*width: 100%;*/ } .fieldtable td.fielddoc p:first-child { margin-top: 0px; } .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; font-size: 90%; color: #253555; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #A8B8D9; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; background-position: 0 -5px; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; color: #283A5D; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { font-size: 8pt; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .diagraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #90A5CE; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#334975; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } div.toc { padding: 14px 25px; background-color: #F4F6FA; border: 1px solid #D8DFEE; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 20px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #4665A2; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } .inherit_header { font-weight: bold; color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .inherit_header td { padding: 6px 0px 2px 5px; } .inherit { display: none; } tr.heading h2 { margin-top: 12px; margin-bottom: 4px; } /* tooltip related style info */ .ttc { position: absolute; display: none; } #powerTip { cursor: default; white-space: nowrap; background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { color: grey; font-style: italic; } #powerTip div.ttname a { font-weight: bold; } #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { color: #006318; } #powerTip div { margin: 0px; padding: 0px; font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { content: ""; position: absolute; margin: 0px; } #powerTip.n:after, #powerTip.n:before, #powerTip.s:after, #powerTip.s:before, #powerTip.w:after, #powerTip.w:before, #powerTip.e:after, #powerTip.e:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.se:after, #powerTip.se:before, #powerTip.nw:after, #powerTip.nw:before, #powerTip.sw:after, #powerTip.sw:before { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; } #powerTip.n:after, #powerTip.s:after, #powerTip.w:after, #powerTip.e:after, #powerTip.nw:after, #powerTip.ne:after, #powerTip.sw:after, #powerTip.se:after { border-color: rgba(255, 255, 255, 0); } #powerTip.n:before, #powerTip.s:before, #powerTip.w:before, #powerTip.e:before, #powerTip.nw:before, #powerTip.ne:before, #powerTip.sw:before, #powerTip.se:before { border-color: rgba(128, 128, 128, 0); } #powerTip.n:after, #powerTip.n:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.nw:after, #powerTip.nw:before { top: 100%; } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { border-top-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.n:before { border-top-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.n:after, #powerTip.n:before { left: 50%; } #powerTip.nw:after, #powerTip.nw:before { right: 14px; } #powerTip.ne:after, #powerTip.ne:before { left: 14px; } #powerTip.s:after, #powerTip.s:before, #powerTip.se:after, #powerTip.se:before, #powerTip.sw:after, #powerTip.sw:before { bottom: 100%; } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { border-bottom-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.s:after, #powerTip.s:before { left: 50%; } #powerTip.sw:after, #powerTip.sw:before { right: 14px; } #powerTip.se:after, #powerTip.se:before { left: 14px; } #powerTip.e:after, #powerTip.e:before { left: 100%; } #powerTip.e:after { border-left-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } #powerTip.w:after, #powerTip.w:before { right: 100%; } #powerTip.w:after { border-right-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } pktools-2.6.6/doc/html/inherit_graph_3.png0000644000113200011300000000337312616110567015422 00000000000000‰PNG  IHDR•%Ä ©T:ëªhâÅ‹Z­6®­V;‹’h’@&“EeèýÚÐþQÚ?jCûGmfèßÄÄÄž={-Z4wîÜâââ»wï¦VVÊaÈÎÎÞ¶mÛèèhR=\ºt)???‰Ç .^¼³Þn·3Œ_3ñïóçÏ«V­âp8æåË—»wïV(>L¹¸Ôb4NçÄÄ„Á`ˆD"µµµI.•J].—Ñh$2f³ùÝ»wä»ùÙ'Æï‡Ÿ¢R©6nÜØÙÙ ›Ë–-s¹\­­­›7oN©¶ÃçóçÏŸ@äÚµk"‘𬬬 …eeeZ­výúõ0£Óé6lØ€ Èÿ¥8f2ÿz{{›ššÈ•JÕÕÕã/_¾ìÝ»—Çã‰D¢cÇŽÁ§9 ãúõëK—.åóù---ÝÝÝ‹/ÎÎÎ>}ú4øo©ÑëõK–,@Ð××':‚ ---DåãÇ.\Øßß …”J¥P(J¥2 %8&“ øþý{<Á÷ïß_±bÅœ9s »»»áQ …âÎ;áp6u:\.‡ñT©ä…”ÏXüà$4MTf*àv»ãÔÔÔ”•• [,–åË—777ÃWŒ …Ã08ke2†aW®\|úôÉf³ÊËË­V«ÉdBQ´¹¹Ã06›½ÿ~‡ÃÑÓÓøøñ#¬Ü²eË“'O|>ß¹sçvíÚ5>>n±XV¯^}üøñxª¯^½òz½†Ùíöªªªµkׯìóù222:::œNgWWWzzºÏçƒcÏÈÈ0 8Ž ¥¥¥¹\.ǧ‘Šã8Dʼn‹'J¥R©ô‡q‘‰øçv»'æ§Á`Éd¦N§CQž>³Ù ¢b›ÍGe±X(Š¡¡!ŸÏ‡ CÌJ‰Dât:aüèÑ£•+WÆ“M¾dY,VII‰Íf‹'Øív³X¬ÖÖVljD¼^o8†••• 8Ž«ÕêÒÒR˜œF*ß¿ÄÅLõ/éõ“Ëå …Â7oÞ“ÅÅÅ_¿~ýðáC8‹Å0¢¨Ãá€qff&\ZZÊçóarz©999€›7obÖÖÖ–Bñ$ÿ«®®ÎËËËÌÌ\·nݽ{÷ˆÜnw]]]nn.‚ GŽñûýp¦×ÚÔμÎÎ΂‚wèÐ!xÔ… æÍ›·`Á‚ööv…B!ÈûŽã†íÛ·Ëåæææ pktools: /home/kempenep/pktools/src/base/Vector2d.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
Vector2d.h
1 /**********************************************************************
2 Vector2d.h: 2-dimensional vector class (inherits from stl vector class)
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _VECTOR2D_H_
21 #define _VECTOR2D_H_
22 
23 #include <vector>
24 #include <list>
25 #include <algorithm>
26 #include <numeric>
27 #include <gsl/gsl_matrix.h>
28 #include "IndexValue.h"
29 #include "algorithms/StatFactory.h"
30 
31 template<class T> class Vector2d: public std::vector<std::vector <T> >
32 {
33 public:
34  Vector2d();
35  Vector2d(const Vector2d<T>& v1);//copy constructor
36  ~Vector2d();
37  Vector2d(int nrow);
38  Vector2d(int nrow, int ncol);
39  Vector2d(int nrow, int ncol, const T& value);
40  Vector2d(const gsl_matrix* gsl_m);
41  void resize(int nrow)
42  {
43  std::vector< std::vector<T> >::resize(nrow);
44  };
45  void resize(int nrow, int ncol);
46  int nRows() const {return this->size();};
47  int nCols() const {if(this->size()) return this->begin()->size(); else return 0;};
48  void selectCol(int col, std::vector<T> &output) const;
49  void selectCol(int col, T* output) const;
50  std::vector<T> selectCol(int col);
51  void selectCols(const std::list<int> &cols, Vector2d<T> &output) const;
52  void setMask(const Vector2d<T> &mask, T msknodata, T nodata=0);
53  void transpose(Vector2d<T> &output) const{
54  output.resize(nCols(),nRows());
55  for(int irow=0;irow<nRows();++irow){
56  for(int icol=0;icol<nCols();++icol){
57  output[icol][irow]=(*this)[irow][icol];
58  }
59  }
60  };
61  void selectCols(const std::list<int> &cols);
62  void sort(Vector2d<T>& output);
63  void scale(const std::vector<double> &scaleVector, const std::vector<double> &offsetVector, Vector2d<T>& scaledOutput);
64  void scale(const T lbound, const T ubound, std::vector<double> &scaleVector, std::vector<double> &offsetVector, Vector2d<T>& scaledOutput);
65  Vector2d<T> operator=(const Vector2d<T>& v1);
66  Vector2d<T> operator+=(const Vector2d<T>& v1);
67 // std::ostream& operator<<(std::ostream& os, const Vector2d<T>& v);
68 // template<class T> std::ostream& operator<<(std::ostream& os, const Vector2d<T>& v);
69  template<class T1> friend std::ostream& operator<<(std::ostream & os, const Vector2d<T1>& v);
70  Vector2d<T> sum(const Vector2d<T>& v1, const Vector2d<T>& v2) const;
71  T mymax(int& x, int& y, double maxValue) const;
72 
73  T sum() const;
74 };
75 
76 template<class T> Vector2d<T>::Vector2d()
77  : std::vector< std::vector<T> >()
78 {
79 }
80 
81 template<class T> Vector2d<T>::~Vector2d()
82 {
83 }
84 
85 //copy constructor
86 template<class T> Vector2d<T>::Vector2d(const Vector2d<T>& v1){
87  this->resize(v1.size());
88  for(int irow=0;irow<v1.size();++irow)
89  this->at(irow)=v1[irow];
90 }
91 
92 template<class T> Vector2d<T> Vector2d<T>::operator=(const Vector2d<T>& v1){
93  //check for assignment to self (of the form v=v)
94  if(this==&v1)
95  return *this;
96  else{
97  this->resize(v1.size());
98  for(int irow=0;irow<v1.size();++irow)
99  this->at(irow)=v1[irow];
100  return *this;
101  }
102 }
103 
104 template<class T> Vector2d<T> Vector2d<T>::operator+=(const Vector2d<T>& v1){
105  assert(v1.nRows()==nRows());
106  assert(v1.nCols()==nCols());
107  for(int irow=0;irow<nRows();++irow)
108  for(int icol=0;icol<nCols();++icol)
109  (*this)[irow][icol]+=v1[irow][icol];
110  return *this;
111 }
112 
113 template<class T> Vector2d<T>::Vector2d(int nrow)
114  : std::vector< std::vector<T> >(nrow)
115 {
116 }
117 
118 template<class T> Vector2d<T>::Vector2d(int nrow, int ncol)
119 // : std::vector< std::vector<T> >(nrow)
120 {
121  this->resize(nrow);
122  for(int irow=0;irow<nrow;++irow){
123  (this->operator[](irow)).resize(ncol);
124 // (*this)[irow].resize(ncol);
125  }
126 }
127 
128 template<class T> Vector2d<T>::Vector2d(int nrow, int ncol, const T& value)
129 {
130  this->resize(nrow);
131  for(int irow=0;irow<nrow;++irow){
132  (this->operator[](irow)).resize(ncol);
133  for(int icol=0;icol<ncol;++icol)
134  (this->operator[](irow))[icol]=value;
135  }
136 }
137 
138 template<class T> Vector2d<T>::Vector2d(const gsl_matrix* gsl_m)
139 {
140  this->resize(gsl_m->size1);
141  for(int irow=0;irow<this->size();++irow){
142  (this->operator[](irow)).resize(gsl_m->size2);
143  for(int icol=0;icol<this->operator[](irow).size();++icol)
144  (this->operator[](irow))[icol]=gsl_matrix_get(gsl_m,irow,icol);
145  }
146 }
147 
148 
149 template<class T> void Vector2d<T>::resize(int nrow, int ncol)
150 {
151  this->std::vector< std::vector<T> >::resize(nrow);
152  for(int irow=0;irow<nrow;++irow){
153  (this->operator[](irow)).resize(ncol);
154  }
155 }
156 
157 template<class T> void Vector2d<T>::selectCols(const std::list<int> &cols, Vector2d<T> &output) const
158 {
159  output.resize(this->size());
160  std::list<int>::const_iterator it;
161  for(int irow=0;irow<this->size();++irow){
162  output[irow].resize(cols.size());
163  it=cols.begin();
164  for(int icol=0;icol<cols.size();++icol)
165  output[irow][icol]=(*this)[irow][*(it++)];
166  }
167 }
168 
169 template<class T> void Vector2d<T>::selectCol(int col, std::vector<T> &output) const
170 {
171  assert(col>=0);
172  assert(col<(*this)[0].size());
173  output.resize(this->size());
174  for(int irow=0;irow<this->size();++irow){
175  output[irow]=(*this)[irow][col];
176  }
177 }
178 
179 template<class T> std::vector<T> Vector2d<T>::selectCol(int col)
180 {
181  assert(col>=0);
182  assert(col<(*this)[0].size());
183  std::vector<T> output(this->size());
184  for(int irow=0;irow<this->size();++irow)
185  output[irow]=(*this)[irow][col];
186  return(output);
187 }
188 
189 template<class T> void Vector2d<T>::selectCol(int col, T* output) const
190 {
191  assert(col>=0);
192  assert(col<(*this)[0].size());
193  for(int irow=0;irow<this->size();++irow){
194  output[irow]=(*this)[irow][col];
195  }
196 }
197 
198 template<class T> void Vector2d<T>::selectCols(const std::list<int> &cols)
199 {
200  for(int irow=0;irow<this->size();++irow)
201  for(int icol=((*this)[irow]).size()-1;icol>=0;--icol)
202  if(find(cols.begin(),cols.end(),icol)==cols.end())
203  (*this)[irow].erase(((*this)[irow]).begin()+icol);
204 }
205 
206 template<class T> void Vector2d<T>::setMask(const Vector2d<T> &mask, T msknodata, T nodata)
207 {
208  assert(mask.nRows()==nRows());
209  assert(mask.nCols()==nCols());
210  for(int irow=0;irow<this->size();++irow)
211  for(int icol=0;icol<((*this)[irow]).size()-1;++icol)
212  if(mask[irow][icol]==msknodata)
213  (*this)[irow][icol]=nodata;
214 }
215 
216 template<class T1> std::ostream& operator<<(std::ostream& os, const Vector2d<T1>& v)
217 {
218  for(int irow=0;irow<v.size();++irow){
219  for(int icol=0;icol<v[irow].size();++icol){
220  os << v[irow][icol] << "\t";
221  }
222  os << std::endl;
223  }
224  return os;
225  // os << theOption.getLongName() << ": ";
226  // for(int index=0;index<theOption.size();++index)
227  // os << type2string<T>(theOption[index]) << " ";
228  // os << std::endl;
229  // return os;
230 }
231 
232 template<class T> void Vector2d<T>::sort(Vector2d<T>& output)
233 {
234  //sort according to first sample (ex. wavelength)
235  int nsample=this->size();//including first sample (ex. wavelength)
236  int nband=(*this)[0].size();
237  std::vector<IndexValue> sortW(nband);
238  for(int ilevel=0;ilevel<nband;++ilevel){
239  IndexValue pv;
240  pv.position=ilevel;
241  pv.value=(*this)[0][ilevel];
242  sortW[ilevel]=pv;
243  }
244  std::sort(sortW.begin(),sortW.end(),Increase_IndexValue());
245  output.resize(nsample);
246  for(int isample=0;isample<nsample;++isample){
247  output[isample].resize(nband);
248  for(int iband=0;iband<nband;++iband)
249  output[isample][iband]=(*this)[isample][sortW[iband].position];
250  }
251 }
252 
253 template<class T> void Vector2d<T>::scale(const std::vector<double> &scaleVector,const std::vector<double> &offsetVector, Vector2d<T>& scaledOutput)
254 {
255  int nsample=this->size();//including first sample (ex. wavelength)
256  int nband=(*this)[0].size();
257  assert(scaleVector.size()==nband);
258  assert(offsetVector.size()==nband);
259  std::vector<T> pixel(nband);
260  scaledOutput.resize(nsample,nband);
261  for(int isample=0;isample<nsample;++isample)
262  for(int iband=0;iband<nband;++iband)
263  scaledOutput[isample][iband]=((*this)[isample][iband])*scaleVector[iband]+offsetVector[iband];
264 }
265 
266 template<class T> void Vector2d<T>::scale(const T lbound, const T ubound, std::vector<double> &scaleVector, std::vector<double> &offsetVector, Vector2d<T>& scaledOutput)
267 {
268  //scale to lbound and ubound
269  int nsample=this->size();//including first sample (ex. wavelength)
270  int nband=(*this)[0].size();
271  scaleVector.resize(nband);
272  offsetVector.resize(nband);
273  std::vector<T> pixel(nsample);
274  T theMin;
275  T theMax;
277  scaledOutput.resize(nsample,nband);
278  for(int iband=0;iband<nband;++iband){
279  pixel=selectCol(iband);
280  stat.minmax(pixel, pixel.begin(), pixel.end(), theMin, theMax);
281  scaleVector[iband]=static_cast<double>(ubound-lbound)/(theMax-theMin);
282  offsetVector[iband]=static_cast<double>(-theMin*scaleVector[iband])-lbound;
283  for(int isample=0;isample<pixel.size();++isample)
284  scaledOutput[isample][iband]=((*this)[isample][iband])*scaleVector[iband]+offsetVector[iband];
285  }
286 }
287 
288 template<class T> Vector2d<T> Vector2d<T>::sum(const Vector2d<T>& v1, const Vector2d<T>& v2) const{
289  Vector2d<T> vsum(v1.size());
290  assert(v1.size()==v2.size());
291  for(int irow=0;irow<v1.size();++irow){
292  assert(v1[irow].size()==v2[irow].size());
293  vsum[irow].resize(v1[irow].size());
294  for(int icol=0;icol<v1.size();++icol)
295  vsum[irow][icol]=v1[irow][icol]+v2[irow][icol];
296  }
297  return vsum;
298 }
299 
300 template<class T> T Vector2d<T>::sum() const{
301  double theSum=0;
302  for(int irow=0;irow<this->size();++irow){
303  for(int icol=0;icol<this->operator[](irow).size();++icol)
304  theSum+=(this->operator[](irow))[icol];
305  }
306  return theSum;
307 }
308 
309 template<class T> T Vector2d<T>::mymax(int& x, int& y, double maxValue) const{
310  //todo: what if this->operator[](0)[0] >=maxValue?
311  // double theMax=(this->operator[](0))[0];
312  double theMax=0;
313  for(int irow=0;irow<this->size();++irow){
314  for(int icol=0;icol<(this->operator[](irow)).size();++icol){
315  double currentValue=(this->operator[](irow))[icol];
316  if(currentValue<maxValue&&currentValue>theMax){
317  assert(theMax<maxValue);
318  y=irow;
319  x=icol;
320  theMax=currentValue;
321  }
322  }
323  }
324  assert(theMax<maxValue);
325  return theMax;
326 }
327 
328 #endif /* _VECTOR2D_H_ */
pktools-2.6.6/doc/html/classONE__CLASS__Q__coll__graph.map0000644000113200011300000000037312616110567020205 00000000000000 pktools-2.6.6/doc/html/pksetmask_8cc_source.html0000644000113200011300000015622312647637662016675 00000000000000 pktools: /home/kempenep/pktools/src/apps/pksetmask.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksetmask.cc
1 /**********************************************************************
2 pksetmask.cc: program to apply mask image (set invalid values) to raster image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 
22 #include "imageclasses/ImgReaderGdal.h"
23 #include "imageclasses/ImgWriterGdal.h"
24 #include "base/Optionpk.h"
25 /******************************************************************************/
71 using namespace std;
72 
73 int main(int argc, char *argv[])
74 {
75  //command line options
76  Optionpk<string> input_opt("i", "input", "Input image");
77  Optionpk<string> mask_opt("m", "mask", "Mask image(s)");
78  Optionpk<string> output_opt("o", "output", "Output mask file");
79  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", "");
80  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate)","GTiff");
81  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
82  Optionpk<int> msknodata_opt("msknodata", "msknodata", "Mask value(s) where image has nodata. Use one value for each mask, or multiple values for a single mask.", 1);
83  Optionpk<short> mskband_opt("mskband", "mskband", "Mask band to read (0 indexed). Provide band for each mask.", 0);
84  Optionpk<char> operator_opt("p", "operator", "Operator: < = > !. Use operator for each msknodata option", '=');
85  Optionpk<int> nodata_opt("nodata", "nodata", "nodata value to put in image if not valid", 0);
86  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
87  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0,2);
88 
89  otype_opt.setHide(1);
90  oformat_opt.setHide(1);
91  option_opt.setHide(1);
92  colorTable_opt.setHide(1);
93  mskband_opt.setHide(1);
94 
95  bool doProcess;//stop process when program was invoked with help option (-h --help)
96  try{
97  doProcess=input_opt.retrieveOption(argc,argv);
98  mask_opt.retrieveOption(argc,argv);
99  msknodata_opt.retrieveOption(argc,argv);
100  mskband_opt.retrieveOption(argc,argv);
101  output_opt.retrieveOption(argc,argv);
102  nodata_opt.retrieveOption(argc,argv);
103  operator_opt.retrieveOption(argc,argv);
104  otype_opt.retrieveOption(argc,argv);
105  oformat_opt.retrieveOption(argc,argv);
106  option_opt.retrieveOption(argc,argv);
107  colorTable_opt.retrieveOption(argc,argv);
108  verbose_opt.retrieveOption(argc,argv);
109  }
110  catch(string predefinedString){
111  std::cout << predefinedString << std::endl;
112  exit(0);
113  }
114  if(!doProcess){
115  cout << endl;
116  cout << "Usage: pksetmask -i input -m mask [-m mask]* [-msknodata value -nodata value]* -o output" << endl;
117  cout << endl;
118  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
119  exit(0);//help was invoked, stop processing
120  }
121 
122  if(verbose_opt[0])
123  cout << "number of mask images: " << mask_opt.size() << endl;
124 
125  //duplicate band used for mask if not explicitly provided
126  while(mskband_opt.size()<mask_opt.size())
127  mskband_opt.push_back(mskband_opt[0]);
128 
129  vector<ImgReaderGdal> maskReader(mask_opt.size());
130  for(int imask=0;imask<mask_opt.size();++imask){
131  if(verbose_opt[0])
132  cout << "opening mask image file " << mask_opt[imask] << endl;
133  maskReader[imask].open(mask_opt[imask]);
134  }
135  assert(input_opt.size());
136  if(verbose_opt[0])
137  cout << "opening input image file " << input_opt[0] << endl;
138  ImgReaderGdal inputReader;
139  inputReader.open(input_opt[0]);
140  string imageType;//=inputReader.getImageType();
141  if(oformat_opt.size())//default
142  imageType=oformat_opt[0];
143  GDALDataType theType=GDT_Unknown;
144  if(verbose_opt[0]){
145  std::cout << "Image type: " << imageType << std::endl;
146  std::cout << "possible output data types: ";
147  }
148  for(int iType = 0; iType < GDT_TypeCount; ++iType){
149  if(verbose_opt[0])
150  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
151  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
152  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
153  otype_opt[0].c_str()))
154  theType=(GDALDataType) iType;
155  }
156  if(theType==GDT_Unknown)
157  theType=inputReader.getDataType();
158 
159  assert(output_opt.size());
160  if(verbose_opt[0]){
161  std::cout << std::endl << "Output data type: " << GDALGetDataTypeName(theType) << std::endl;
162  std::cout << "opening output image for writing: " << output_opt[0] << std::endl;
163  }
164  ImgWriterGdal outputWriter;
165  try{
166  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
167  string theInterleave="INTERLEAVE=";
168  theInterleave+=inputReader.getInterleave();
169  option_opt.push_back(theInterleave);
170  }
171  outputWriter.open(output_opt[0],inputReader.nrOfCol(),inputReader.nrOfRow(),inputReader.nrOfBand(),theType,imageType,option_opt);
172  for(int iband=0;iband<inputReader.nrOfBand();++iband)
173  outputWriter.GDALSetNoDataValue(nodata_opt[0],iband);
174  outputWriter.setProjection(inputReader.getProjection());
175  outputWriter.copyGeoTransform(inputReader);
176  }
177  catch(string errorstring){
178  cout << errorstring << endl;
179  exit(1);
180  }
181  // if(verbose_opt[0])
182  // cout << "opening output image file " << output_opt[0] << endl;
183  // outputWriter.open(output_opt[0],inputReader);
184  if(colorTable_opt.size()){
185  if(colorTable_opt[0]!="none")
186  outputWriter.setColorTable(colorTable_opt[0]);
187  }
188  else if (inputReader.getColorTable()!=NULL)//copy colorTable from input image
189  outputWriter.setColorTable(inputReader.getColorTable());
190  if(inputReader.isGeoRef()){
191  for(int imask=0;imask<mask_opt.size();++imask)
192  assert(maskReader[imask].isGeoRef());
193  }
194  assert(nodata_opt.size()==msknodata_opt.size());
195  assert(operator_opt.size()==msknodata_opt.size()||operator_opt.size()==1);
196  if(verbose_opt[0]){
197  cout << " mask files selected: " << mask_opt.size() << endl;
198  for(int iv=0;iv<msknodata_opt.size();++iv){
199  char op=(operator_opt.size()==msknodata_opt.size())?operator_opt[iv]:operator_opt[0];
200  cout << op << " " << msknodata_opt[iv] << "->" << nodata_opt[iv] << endl;
201  }
202  }
203 
204  Vector2d<double> lineInput(inputReader.nrOfBand(),inputReader.nrOfCol());
205  Vector2d<double> lineOutput(outputWriter.nrOfBand(),outputWriter.nrOfCol());
206  assert(lineOutput.size()==lineInput.size());
207  assert(inputReader.nrOfCol()==outputWriter.nrOfCol());
208  // Vector2d<int> lineMask(mask_opt.size());
209  Vector2d<double> lineMask(mask_opt.size());
210  for(int imask=0;imask<mask_opt.size();++imask){
211  if(verbose_opt[0])
212  cout << "mask " << imask << " has " << maskReader[imask].nrOfCol() << " columns and " << maskReader[imask].nrOfRow() << " rows" << endl;
213  lineMask[imask].resize(maskReader[imask].nrOfCol());
214  }
215  int irow=0;
216  int icol=0;
217  const char* pszMessage;
218  void* pProgressArg=NULL;
219  GDALProgressFunc pfnProgress=GDALTermProgress;
220  float progress=0;
221  if(!verbose_opt[0])
222  pfnProgress(progress,pszMessage,pProgressArg);
223  // double oldRowMask=-1;
224  vector<double> oldRowMask(mask_opt.size());
225  for(int imask=0;imask<mask_opt.size();++imask)
226  oldRowMask[imask]=-1;
227  for(irow=0;irow<inputReader.nrOfRow();++irow){
228  //read line in lineInput buffer
229  for(int iband=0;iband<inputReader.nrOfBand();++iband){
230  try{
231  inputReader.readData(lineInput[iband],GDT_Float64,irow,iband);
232  }
233  catch(string errorstring){
234  cerr << errorstring << endl;
235  exit(1);
236  }
237  }
238  double x,y;//geo coordinates
239  double colMask,rowMask;//image coordinates in mask image
240  for(icol=0;icol<inputReader.nrOfCol();++icol){
241  if(mask_opt.size()>1){//multiple masks
242  for(int imask=0;imask<mask_opt.size();++imask){
243  inputReader.image2geo(icol,irow,x,y);
244  maskReader[imask].geo2image(x,y,colMask,rowMask);
245  colMask=static_cast<int>(colMask);
246  rowMask=static_cast<int>(rowMask);
247  bool masked=false;
248  if(rowMask>=0&&rowMask<maskReader[imask].nrOfRow()&&colMask>=0&&colMask<maskReader[imask].nrOfCol()){
249  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask[imask])){
250  assert(rowMask>=0&&rowMask<maskReader[imask].nrOfRow());
251  try{
252  // maskReader[imask].readData(lineMask[imask],GDT_Int32,static_cast<int>(rowMask));
253  maskReader[imask].readData(lineMask[imask],GDT_Float64,static_cast<int>(rowMask),mskband_opt[imask]);
254  }
255  catch(string errorstring){
256  cerr << errorstring << endl;
257  exit(1);
258  }
259  oldRowMask[imask]=rowMask;
260  }
261  }
262  else
263  continue;//no coverage in this mask
264  int ivalue=0;
265  if(mask_opt.size()==msknodata_opt.size())//one invalid value for each mask
266  ivalue=msknodata_opt[imask];
267  else//use same invalid value for each mask
268  ivalue=msknodata_opt[0];
269  char op=(operator_opt.size()==mask_opt.size())?operator_opt[imask]:operator_opt[0];
270  switch(op){
271  case('='):
272  default:
273  if(lineMask[imask][colMask]==ivalue)
274  masked=true;
275  break;
276  case('<'):
277  if(lineMask[imask][colMask]<ivalue)
278  masked=true;
279  break;
280  case('>'):
281  if(lineMask[imask][colMask]>ivalue)
282  masked=true;
283  break;
284  case('!'):
285  if(lineMask[imask][colMask]!=ivalue)
286  masked=true;
287  break;
288  }
289  if(masked){
290  if(verbose_opt[0]>1)
291  cout << "image masked at (col=" << icol << ",row=" << irow <<") with mask " << mask_opt[imask] << " and value " << ivalue << endl;
292  for(int iband=0;iband<inputReader.nrOfBand();++iband){
293  if(mask_opt.size()==nodata_opt.size())//one flag value for each mask
294  lineInput[iband][icol]=nodata_opt[imask];
295  else
296  lineInput[iband][icol]=nodata_opt[0];
297  }
298  masked=false;
299  break;
300  }
301  }
302  }
303  else{//potentially more invalid values for single mask
304  inputReader.image2geo(icol,irow,x,y);
305  maskReader[0].geo2image(x,y,colMask,rowMask);
306  colMask=static_cast<int>(colMask);
307  rowMask=static_cast<int>(rowMask);
308  bool masked=false;
309  if(rowMask>=0&&rowMask<maskReader[0].nrOfRow()&&colMask>=0&&colMask<maskReader[0].nrOfCol()){
310  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask[0])){
311  assert(rowMask>=0&&rowMask<maskReader[0].nrOfRow());
312  try{
313  // maskReader[0].readData(lineMask[0],GDT_Int32,static_cast<int>(rowMask));
314  maskReader[0].readData(lineMask[0],GDT_Float64,static_cast<int>(rowMask),mskband_opt[0]);
315  }
316  catch(string errorstring){
317  cerr << errorstring << endl;
318  exit(1);
319  }
320  oldRowMask[0]=rowMask;
321  }
322  for(int ivalue=0;ivalue<msknodata_opt.size();++ivalue){
323  assert(msknodata_opt.size()==nodata_opt.size());
324  char op=(operator_opt.size()==msknodata_opt.size())?operator_opt[ivalue]:operator_opt[0];
325  switch(op){
326  case('='):
327  default:
328  if(lineMask[0][colMask]==msknodata_opt[ivalue])
329  masked=true;
330  break;
331  case('<'):
332  if(lineMask[0][colMask]<msknodata_opt[ivalue])
333  masked=true;
334  break;
335  case('>'):
336  if(lineMask[0][colMask]>msknodata_opt[ivalue])
337  masked=true;
338  break;
339  case('!'):
340  if(lineMask[0][colMask]!=msknodata_opt[ivalue])
341  masked=true;
342  break;
343  }
344  if(masked){
345  for(int iband=0;iband<inputReader.nrOfBand();++iband)
346  lineInput[iband][icol]=nodata_opt[ivalue];
347  masked=false;
348  break;
349  }
350  }
351  }
352  }
353  for(int iband=0;iband<lineOutput.size();++iband)
354  lineOutput[iband][icol]=lineInput[iband][icol];
355  }
356  //write buffer lineOutput to output file
357  for(int iband=0;iband<outputWriter.nrOfBand();++iband){
358  try{
359  outputWriter.writeData(lineOutput[iband],GDT_Float64,irow,iband);
360  }
361  catch(string errorstring){
362  cerr << errorstring << endl;
363  exit(1);
364  }
365  }
366  //progress bar
367  progress=static_cast<float>(irow+1.0)/outputWriter.nrOfRow();
368  pfnProgress(progress,pszMessage,pProgressArg);
369  }
370  inputReader.close();
371  for(int imask=0;imask<mask_opt.size();++imask)
372  maskReader[imask].close();
373  outputWriter.close();
374 }
pktools-2.6.6/doc/html/classqgis_1_1ProcessingPktoolsPlugin_1_1ProcessingPktoolsPlugin-members.html0000644000113200011300000001200012647637662030637 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.ProcessingPktoolsPlugin.ProcessingPktoolsPlugin Member List
pktools-2.6.6/doc/html/pkextract.html0000644000113200011300000002547412647637662014566 00000000000000 pktools: pkextract
pktools  2.6.6
Processing Kernel for geospatial data
pkextract

extract pixel values from raster image from a (vector or raster) sample

SYNOPSIS

Usage: pkextract -i input [-s sample | -rand number | -grid size] -o output

Options: [-ln layer]* [-c class]* [-t threshold]* [-f format] [-ft fieldType] [-lt labelType] [-polygon] [-b band]* [-r rule]

Advanced options: [-sband band -eband band]* [-bndnodata band -srcnodata value]* [-tp threshold] [-test testSample] [-bn attribute] [-cn attribute] [-geo value] [-down value] [-buf value [-circ]]

Description

The utility pkextract extracts pixel values from an input raster dataset, based on the locations you provide via a sample file. Alternatively, a random sample or systematic grid of points can also be extracted. The sample can be a vector file with points or polygons. In the case of polygons, you can either extract the values for all raster pixels that are covered by the polygons, or extract a single value for each polygon such as the centroid, mean, median, etc. As output, a new copy of the vector file is created with an extra attribute for the extracted pixel value. For each raster band in the input image, a separate attribute is created. For instance, if the raster dataset contains three bands, three attributes are created (b0, b1 and b2).

Instead of a vector dataset, the sample can also be a raster dataset with categorical values. The typical use case is a land cover map that overlaps the input raster dataset. The utility then extracts pixels from the input raster for the respective land cover classes. To select a random subset of the sample raster dataset you can set the threshold option -t with a percentage value.

A typical usage of pkextract is to prepare a training sample for one of the classifiers implemented in pktools.

Overview of the possible extraction rules:

extraction rule output features
point Extract all pixel values covered by the polygon (option -polygon not set) or extract a pixel on the surface option (-polygon set).
centroid Extract pixel value at the centroid of the polygon.
mean Extract average of all pixel values within the polygon.
stdev Extract standard deviation of all pixel values within the polygon.
median Extract median of all pixel values within the polygon.
min Extract minimum value of all pixels within the polygon.
max Extract maximum value of all pixels within the polygon.
sum Extract sum of the values of all pixels within the polygon.
mode Extract the mode of classes within the polygon (classes must be set with the option class).
proportion Extract proportion of class(es) within the polygon (classes must be set with the option class).
count Extract count of class(es) within the polygon (classes must be set with the option class).
percentile Extract percentile as defined by option perc (e.g, 95th percentile of values covered by polygon).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Raster input dataset containing band information
    s sample std::string OGR vector dataset with features to be extracted from input data. Output will contain features with input band information included. Sample image can also be GDAL raster dataset.
    ln ln std::string Layer name(s) in sample (leave empty to select all)
    rand random unsigned int Create simple random sample of points. Provide number of points to generate
    grid grid double Create systematic grid of points. Provide cell grid size (in projected units, e.g,. m)
    o output std::string Output sample dataset
    c class int Class(es) to extract from input sample image. Leave empty to extract all valid data pixels from sample dataset. Make sure to set classes if rule is set to mode, proportion or count
    t threshold float 100 Probability threshold for selecting samples (randomly). Provide probability in percentage (>0) or absolute (<0). Use a single threshold for vector sample datasets. If using raster land cover maps as a sample dataset, you can provide a threshold value for each class (e.g. -t 80 -t 60). Use value 100 to select all pixels for selected class(es)
    perc perc double 95 Percentile value used for rule percentile
    f f std::string SQLite Output sample dataset format
    ft ftype std::string Real Field type (only Real or Integer)
    lt ltype std::string Integer Label type: In16 or String
    polygon polygon bool false Create OGRPolygon as geometry instead of OGRPoint.
    b band int Band index(es) to extract (0 based). Leave empty to use all bands
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    r rule std::string centroid Rule how to report image information per feature (only for vector sample). point (value at each point or at centroid if polygon), centroid, mean, stdev, median, proportion, count, min, max, mode, sum, percentile.
    bndnodata bndnodata int 0 Band(s) in input image to check if pixel is valid (used for srcnodata)
    srcnodata srcnodata double Invalid value(s) for input image
    tp thresholdPolygon float (absolute) threshold for selecting samples in each polygon
    test test std::string Test sample dataset (use this option in combination with threshold<100 to create a training (output) and test set
    bn bname std::string b For single band input data, this extra attribute name will correspond to the raster values. For multi-band input data, multiple attributes with this prefix will be added (e.g. b0, b1, b2, etc.)
    cn cname std::string label Name of the class label in the output vector dataset
    geo geo short 1 Use geo coordinates (set to 0 to use image coordinates)
    down down short 1 Down sampling factor (for raster sample datasets only). Can be used to create grid points
    buf buffer short Buffer for calculating statistics for point features
    circ circular bool false Use a circular disc kernel buffer (for vector point sample datasets only, use in combination with buffer option)
    Usage: pkextract -i input [-s sample | -rand number | -grid size] -o output

Examples

Some examples how to use pkextract can be found here

pktools-2.6.6/doc/html/pkextract__gui_2mainwindow_8h_source.html0000644000113200011300000002157212647637661022060 00000000000000 pktools: /home/kempenep/pktools/qt/pkextract_gui/mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include <QMainWindow>
5 
6 namespace Ui {
7 class MainWindow;
8 }
9 
10 class MainWindow : public QMainWindow
11 {
12  Q_OBJECT
13 
14 public:
15  explicit MainWindow(QWidget *parent = 0);
16  ~MainWindow();
17 
18 private slots:
19  void on_actionInput_triggered();
20 
21  void on_actionSample_triggered();
22 
23  void on_actionOutput_triggered();
24 
25  void on_toolButton_input_clicked();
26 
27  void on_toolButton_output_clicked();
28 
29  void on_toolButton_sample_clicked();
30 
31  void on_pushButton_run_clicked();
32 
33  void on_toolButton_createTable_clicked();
34 
35  void on_pushButton_restore_clicked();
36 
37 
38 private:
39  void setClassTable(const QStringList &labels);
40  void setDefaults();
41 
42  Ui::MainWindow *ui;
43 };
44 
45 #endif // MAINWINDOW_H
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img.html0000644000113200011300000003163612647637662023347 00000000000000 pktools: qgis.pktools.pklas2img.pklas2img Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pklas2img.pklas2img Class Reference
Inheritance diagram for qgis.pktools.pklas2img.pklas2img:
Collaboration diagram for qgis.pktools.pklas2img.pklas2img:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list ATTRIBUTE_OPTIONS = ["z","intensity", "return", "nreturn"]
 
list COMPOSITE_OPTIONS = ["last", "min", "max", "median", "mean", "sum", "first", "profile" "percentile", "height", "values", "percentile", "number"]
 
list FILTER_OPTIONS = ["all","first","last","single","multiple"]
 
string ATTRIBUTE = "ATTRIBUTE"
 
string COMPOSITE = "COMPOSITE"
 
string FILTER = "FILTER"
 
string PERCENTILE = "PERCENTILE"
 
string DX = "DX"
 
string DY = "DY"
 
string NODATA = "NODATA"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 39 of file pklas2img.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop__coll__graph.map0000644000113200011300000000007712616110567022563 00000000000000 pktools-2.6.6/doc/html/inherit_graph_24.md50000644000113200011300000000004012647437044015400 000000000000009a43f2ea03fd9e148d021675b11a669fpktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass__coll__graph.png0000644000113200011300000000742312616110567026032 00000000000000‰PNG  IHDRÝp$â}bKGDÿÿÿ ½§“ÈIDATxœíÝkPçðw!\*¤,—B… h‡§SgZÀz„2е€`µ¥ ÖjÁ)§:2¶Tq eHÔÆKŽÄÁª´ÊåõµV.5B$@²{>ì9{Ò9¢Á¼ÄÿïCg÷e÷Ý'ÉCv‰IJP…ÀŒ‰¡ ôàz p½8b:€nJ¥²µµ•$IC1rNNNööö†N¡¦½”Éd=Âó.32™¬¿¿Ï;Ó^Ò|}} Á˜ýþûðDp} p½8‚^A/ŽŒ­—mmmA¼È©¾úê+‚ 8 ¯ OÚ ˆ¶¶¶gžvv1¶^êÔÑÑÁápfbfŠ¢ÊÊÊ\]]E"‘¾æœ7o^ZZšÉØø{)zI’ä£Gfb榦¦;wî644´´´èeN‡C?ûÎ\lüÍâ^Òç»3gÎxyy988lß¾}llŒù)EQ;wîô÷÷ÿ믿/^Œzíµ×è nܸ‘ÃḸ¸ìܹS©T>i!‹ß~ûmKKKww÷ââbf¼¬¬, $$ÄÛÛ{òS&EQÀÇLJÍf/[¶ììÙ³ô zò±èÛrùòeWW×'NЛiÅF]¼x‘ËåÚÚÚòù|z„ ˆãÇ¿ùæ›ööö(..^°`;}ûôvG…¥¾¾>‰D2õ6­­­¡ÐÐЖ––šš.—›‘‘A’$É”’ّْÇã···766úùùeddèdö’Ëå ···°°ÅbÉårŠ¢H’\°`P(¤(ê‹/¾ðõõÕ FQT~~¾³³óÏ?ÿ<00péÒ%.—K?éXáááUUU ôfZ±B|ðL&«¨¨@Ñ7 !´nÝ:™LVPP€Z³fL& …ÌShnnnnnžÞó¢Ìú^666Ò«"‘ˆËåÒƒ©©©¡{÷îinI/›šš2Gee%—ËÕ9Èì%•JÍÌÌ:ôøñc’$‡‡‡Õj5EQ555,‹~økkkBMMMš‡óóóûᇘÀ¥¥¥¡)ŽEßf÷ɽ¼rå EQjµ!ÔÚÚJÖÕÕÑ·Kk™Þ` 8÷rŸÇižžžô‚··wWW½|óæÍÀÀÀìììÉÛ÷õõ©Õjz•Ëåvuuédv±µµ•H$555...W¯^511A•••©T*‡CÄ¢E‹BZ§òööv???fÕÇÇçI˜›0õurrBÑGgÌ;!dff¦µ<«Íú^ÒO*¡––úaC‰Åb@PVV&‘H´¶Ÿ?¾©©iGG½ÚÞÞîìì¬sÙE¡P$yòäI©T¿råJ©TªV«E"ÑáLJÿ+%%E$QŸKqssÓü7è;wî<)½üû¤¯—Àð7ë{¹cÇŽ¶¶¶›7oîÙ³'..Ž´²²òòòÚ½{wrr2óŒ\.G™™™ÅÄÄlß¾½³³³¹¹yïÞ½<Oç s‚ BCC+**d2Ùøø¸™™Ùœ9s®^½ÚßßÏãñ¬ÿ+66¶µµ•¾:¤mݺ555õâÅ‹=ªªªÊÈÈ bêcMFÇ~éúBB·§¿¾,((pssãp8Û¶mS(š×d …báÂ…éééï¿ÿ¾µµ5=.•Jׯ_oggçèèøé§Ÿ* ƒšS‰D"sssooï3gÎP•””ª™‡$I´´4fGµZ““ãááaccvæÌ{{ûÿ{,fY+6Ò¸dD×—“µ–ŸçëËYßËç‰Åↆfµ¼¼Üßß߀y´àÜËYÇYccc\\\]]ÝèèhMM;}û jvÀú}ÁSc³ÙIII†N1•ÔÔÔÑÑÑÈÈÈww÷>úóÀø (,¿× ¿¿ÿöíÛ†bÌè× ðüPœÇŽ —GÐK€#è%ÀÖ÷ôô:‚1S*•–––†N¡¦½´°° B_ï´}H’:z´6*ÊËÙy®¡³Lüyó A7L{icc`èÓPSÓ~ýúO^^î<^ ¡³¸¾ÔS§jéÿªTðJz½ÔƒñqUee=Bhhh´ºúž¡ãè¥\¹rwtt !djjRYYkè8Æz©µ¦¦&!•мp¡Q¡7t¢Yzù¼FFÆþùÏf•JM¯Ž©.]ºmØHFzù¼4K‰21!**n0q€^>¯ŠŠ[š»Q©H‰ä®L¦0`$#½|.RéHuu‹Zý·×†(Š:¾ÑP‘Œôò¹œ=û¯ÉƒE< §òç½|.åå7'¿±š$©ššö¾¾!ƒD2ÐËg×Ó3X[{Ÿ$u¼áßÔÔD,ÖñT žôòىŠOúŠJ¥®¨€ØŸ¦ïÛ˜FGÇÙ̪\>fiiÆbýçWý¥ùjŒéçÎf#'§O‚ ÿø‡¿¡ƒ8A/Ž —GÐK€#è%Àôàz p½8‚^A/Ž —GÐK€#è%Àôàz p½8‚^A/Ž —GÐK€#è%Àôàz p½8‚^A/Ž —GÐK€#è%Àôàz p½8‚^,QÜÜÜ g³°p51™c賕¹¹ù/¿üÂTño߯~ÿþýÕ«Wûøø*xiíß¿¿»»›YÕþÞŸÀÀÀš„öï߯¹ ×—GÐK€#è%Àôàh¦zÙÝÝd¨Ý2‰AôÂ2k™©^Z[[¯[·N¿sööö®ZµJ¿s<ÍT/mll6oÞ¬ß9I’”Édúàiz½¤(êÔ©S6lˆˆˆØºuk}}}PPEQ?ýôÓÆW¬X‘’’rãÆ   ÍçÿëׯÇÇLJ††ÆÆÆ^¼xQkNzËk×®­_¿>**êÛo¿˜˜ÐŸ/—˵ŽuãÆÄÄݰ°èèèÒÒÒ)â_æ§1½ÿŸî¹sç¾ÿþû””Ÿ¶¶6>Ÿ:þ|qqqjjêÂ… ÛÚÚrrr4wQ*•Û¶m{ï½÷~ýõׯ¿þzéÒ¥–––Z3Ÿ>}šÏçgee±Ùì„EQB¡°®®îðáÃl6ûèÑ£qqq•••ô.GŽ‘J¥@¡PdffΙ3gÆ “é©ô›„~Ì~üñÇÝ»w{zz–——÷öö …Bú·¢¨¨ˆÍfWWWóù|‚ Ìü£P(B,+((è›o¾éíííìì,,, Ñ98sIK–,ÉÏÏïëëëèèHMM=}úthhhAAAgggggç‘#Gúúú4·Ÿ˜˜P©T,k||¼¨¨!4::ª3ž1ež–éÇcbbÔjõwß}788èîîž”””™™©V«srr†††|}}“““<ÈìbnnþùçŸ …Âþþ~''§ôôtsss„СC‡üýý­¬¬èÍBBB>ûì3¥RÌãñ4Ï¿±±±—/_.--]¿~ý[o½}þüy„ÐŽ;rss“““ÍÌÌ–-[Æãñt2Sé1 óØÓâããsss ‚XºtiRR’‰‰‰R©Üµk—R©\¼xqRR’æöÖÖÖ[¶lÉÌÌ|å•WbccƒƒƒSSSO:¥3žÑdž‚¢¨ÿ­DzzúÓ¿Ï­»»;...;;ÛÁÁÁÃì®®...ÎÏÏŸÖ$‰d:±g>IžÞl̬SPPH$Z³f ½ª‡×Õ;::²²²Z[[ÇÆÆnß¾}üøñ+V<ÿ´àe6½ó¸Nk×®U*•{÷îttt _¹råÓïnee5­íg>IžÞlÌü4žë<€¾èÿ<€ÞA/Ž —GÐK€#í¿Ç‹‹‹Ïž=k(0þÖË”””* x™yzzj¾½ão¯€ ¸¾8‚^A/Ž —Gÿs TNföèIEND®B`‚pktools-2.6.6/doc/html/ImgRegression_8h_source.html0000644000113200011300000003315712647637661017311 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/ImgRegression.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgRegression.h
1 /**********************************************************************
2 ImgRegression.h: class to calculate regression between two raster datasets
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGREGRESSION_H_
21 #define _IMGREGRESSION_H_
22 
23 #include <vector>
24 #include "imageclasses/ImgReaderGdal.h"
25 #include "imageclasses/ImgWriterGdal.h"
26 #include "StatFactory.h"
27 
28 namespace imgregression
29 {
31  public:
32  ImgRegression(void);
33  ~ImgRegression(void);
34  double getRMSE(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const;
35  double getRMSE(const ImgReaderGdal& imgReader, unsigned short b1, unsigned short b2, double& c0, double& c1, short verbose=0) const;
36  double getR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double &c0, double &c1, unsigned short b1=0, unsigned short b2=0, short verbose=0) const;
37  double pgetR2(const ImgReaderGdal& imgReader1, const ImgReaderGdal& imgReader2, double& c0, double& c1, unsigned short band1, unsigned short band2, short verbose=0) const;
38  double getR2(const ImgReaderGdal& imgReader, unsigned short b1, unsigned short b2, double& c0, double& c1, short verbose=0) const;
39  double pgetR2(const ImgReaderGdal& imgReader, unsigned short band1, unsigned short band2, double& c0, double& c1, short verbose=0) const;
40 
41  void setThreshold(double theThreshold){m_threshold=theThreshold;};
42  void setDown(int theDown){m_down=theDown;};
43  private:
44  int m_down;
45  double m_threshold;
46  };
47 }
48 #endif //_IMGREGRESSION_H_
pktools-2.6.6/doc/html/classSVR__Q__coll__graph.map0000644000113200011300000000035512616110567017152 00000000000000 pktools-2.6.6/doc/html/structsvm__model__coll__graph.md50000644000113200011300000000004012616110566020322 00000000000000f1b564de644568331df725046d60b3b4pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral__coll__graph.png0000644000113200011300000001054112616110567027523 00000000000000‰PNG  IHDRÀ¶³ÝhbKGDÿÿÿ ½§“IDATxœíÝ{P”UðïË¥Dи© ÄÍV8N£Í›©i$™æL$`š hN:y2 œ3™&MP eÅ o¦øê˜äL)Sn7aörÞ?zx^–½°‚ìßgfgØç<ûœß9ðeÏÂaác „Æ®€cAa „Ga „Ga „'2têˆÅbÔÔÔº Ò,,,àëë [[[C—¢Â(ÃP__ÖÖVØÛÛºò”‰Åb¸ººRž„½½=üüü ]yÊΟ?oè4¢× „ð( „ð( „ð( „ðÌ> ¥¥¥à8Îèúøâ‹/Àq¶mÛÖçkõ¤§kr‡ÒÒÒ§Ú§)2û0hS^^'''½÷ËCff&F…¬¬¬~ïoÈ!ˆŽŽ`¸1›‚…Bû÷ïë½ß[·náöíÛHKKÃ7p÷îÝ~íÏÉÉIx2Ô˜MY„¡s——‡1cÆÀÅÅ«V­B{{»ÒyŒ1¬[·þþþhhhÀ”)SÆ ÎijjÂâÅ‹áääwww¬[·‰¤Ç¶®Ž;†_|¶¶¶ðòòBzzºR{ff&¦M›†Y³faìØ±ŸcHJJÂøñãaoo×_Ç–<šê霳gÏbÔ¨Q8pà€ðuc€Ó§OÃÇÇC‡EBB‚pœã8ìÛ·ãÆƒ³³3¶mÛ†ôôtxzzÂÁÁ›6mêùd*˜*..fÅÅÅ:Ÿ_RR°€€v÷î]VPPÀ|||X\\œÐ¦P(غu똿¿?khhPz\W¡¡¡læÌ™¬¬¬ŒÝ¼y“M˜0ÅÅÅimëz––fccÃ’’’Xmm-KKKc"‘ˆµ´´0ÆS(ÌÓÓ“%''3Æûì³Ï˜ŸŸŸÊXc,%%…¹¹¹±Ÿ~ú‰‰ÅbvæÌæãã#´÷TO`` ;wî»qã†ðucÀÞ~ûmÖÜÜÌrrraް °ææf–ššÊ°÷Þ{577³ääd¥su‘ŸŸÏêêêt>_²Í* 7oÞŽeee1¡-**Š`wîÜQy\§ŽŽfii©Ô÷Ñ£G™Ö¶®×illdVVVlÇŽìÁƒL¡P°G1¹\Îc¬  €‰D"á èúõë »uë–JM&L`‡RkFF S=óÑõššÂpþüyÆcr¹œ`%%%B[aa¡0?êîwž« cƒY,“:ùúú ;UUUÂý«W¯búôéˆ×øøºº:Èårx{{ Ç|||PUU¥µ­«¡C‡"??pwwÇ´iÓpñâEXXü;Õ™™™ÉdprrÇq˜4i¨]*•••a„ JÇÆßc­]ç@W#FŒ¡Î® °²²R{ß\˜UJJJ„ïÞ½+|‚×ñIIIÈÌÌD~~¾ÚÇ»ººÂÒÒååå±²²2¸¹¹im몭­ …‡Fcc#ÂÃÃ1wî\466B.—#++ ;wîÄ£G„Ûš5k••Öí/p=<<ðûï¿+»}ûvµvz’/Öþþñ³)0«0¬^½¥¥¥¸zõ*6lØ€°°0¡mРA3f bbb°|ùr¥¾---þýâ ƪU«PQQââblܸ¡¡¡ZÛºâ8ÈÉÉAss3:::`ee…gŸ}/^D}}=BCCagg'ÜBBBPRR‚7n(]kåÊ•ˆŠŠÂéÓ§qÿþ}œ;wqqqà8Nçz4é3éÂÐ 5uzûš!55•yxx0'''öñdz¶¶6•5r[[=z4‹eR©”½úê«ÌÎÎNholld .dŽŽŽløðáì“O>ammmZÛº÷‘••ż½½™µµ5;v,ËËËcŒ1ÉTêW(ÌÛÛ›EGG+]K.—³ÄÄDæííÍØìÙ³Y^^svv~¢zºÞW7ft[÷£ÛkMmêî÷Ę_3pŒß»ct. tÝÂ]ZZ ___•e†©;~ü8Fމ—^zI8–““ƒ-[¶ ¨¨È€•õÞùóç1~üx¸¸¸º”îèÝ1ŒÙÍ›7†ÂÂB´¶¶¢  ›6mBDD„¡K3KFûÇ=OÂÞÞ‘‘‘†.ã©‹ŠŠBkk+‚‚‚ ‹áåå…%K–˜åXY,“ˆé e!&€Â@Â@Â@Ïhš$‘Hĉ1ÆP_ßW×Á†.eÀ3Ê0ØÚÚB,ãÑ£G†.¥ßý÷¿ÿ`߾߰{÷›°³³6t9ýŽã8ØØØº µŒ2 ÞÞÞJ»1ÍYbâ×Jhh„·ßþ¡ËÐè5ƒÕÕ=ĵkƒã€£G¯ºœÂ`@G‚cÀõ룲²ÑÐ% h:|ø*ärÀÒÒ?þhš›ïÌ…Á@ÊÊêñ矵Â}™Lì쫬ˆP $7·VV]§Ÿ¡¤¤wîÜ3XM…Á@23¯@*U(‰,‘—GK%C¡0Ào¿U¢ºúÊq™LŽìì+f÷GJ¦‚Â`¹¹…‰,Õ¶ÕÔ4¡¨è=WD ƒÞÉå >| 2™\m»Hd‰ÜÜB=WE ƒÞýúk95¿3…L&GNÎ5áG®D( zöÃ×5.‘:=xЊ_~¡·ˆ×7 ƒž½{!faóæÍÉd*Çé5!< !< !< !<ƒ„¡ºº3fÌÐÛ5cغu+UÎíZLYoçÃæß a°³³Ã‚ ôÖßýû÷ñóÏ?ã»ï¾ÓÚmm-Þyç½ÕÕ_Œm¦2ÿ ƒƒƒ–-[¦·þÚÛÛ...ZûW(hnnÖ[]ýÅØÆa*óß§00ÆðÃ?`Ñ¢Exë­·°råJaÆŒ`ŒáÇÄâÅ‹1gάY³—/_ÆŒ3Tžù儇‡# !!!8}ú´Úþ:wéÒ%,\¸óæÍÃ7ß|©TªRמ={‡â£>¼ûî»J×é®ûyÀ¿¿wIJJ¼yó0oÞ<$%%A&“ ×(,,Dpp0nݺ¥u®4±§1iê_.—cÿþýFPPÐÒÒ¢vêj½|ù2–.]ŠÙ³gcþüùÈÈÈÐZ¿©Ï¿.ú†'Nàûï¿GDDÒÓÓñÁ !!pòäI¤§§cåÊ•ÈÈÈ@hh(vïÞ­r ‰D‚¸¸8!33 .ÄöíÛ!‘H4ö›››‹„„ÄÇÇã×_UúD2ÆœœŒÂÂBìܹøöÛoGÕ:uç9rµµµHNNÆW_}…ÂÂBìß¿_hÏÎÎFLL |}}5^W—1j“¦þ9‚ . !!‰‰‰¨¬¬ÄÁƒ5Ž£k­nnnøüóÏáë닃bÅŠHIIASS“Öùé©VÀ8ç_W} CNN–/_Ž©S§ÂÑÑ“'OFDD„RÛË/¿ Lš4 ~ø¡Ê5¤R)chkkƒµµ5fÏžcÇŽÁÆÆFc¿+V¬€»»;Ƈˆˆœ9sFhÛ»w/²²² {{û¾ pêÔ)¬^½...ðòòBdd$®\¹"´/[¶ 'N„­­­Ækè2FMcÒÔÿ‰'°dÉxyyÁÓÓÑÑÑðóóÓ:–ÎZííí‘––†U«VÁÑÑQX¾<~üX§91µùוÊvŒ'Q[[ ¥c^^^€ššxzz*µ©lŒ0xð`$&&âÈ‘#Ø¿?FLž…ÁÉÉ eeeðööŽýõ×_WWWTTTဿÿþ[åíííP(ˆ‹‹ƒL&ÃÙ³g±aÃäææbðàÁjû­ªª®[YY GGG¡->>b±áááxóÍ71qâľ HLL„›› ¥¥B»HÔójcOcÒÔLL îÝ»'|Ã)--EAAÂÂÂ4ÖÑYk{{;âââ‡W^yR©§NÒyNLmþuÕ§eR`` öìÙƒK—.¡±±W®\¶"!99×®]Css3ŠŠŠpàÀp§t Žã°~ýz\¸p?†T*…H$–'NœPyúÞµkª««ñçŸ"55o¼ñ†Ðfkk‹‘#G"$$;wîDGGÇ«­­MøxêÔ©HIIA]]ÊËË¥ôE¬‹žÆ¨mLšú@jj****PQQ¯¿þuuuÇÑ•T*…L&ƒH$BGG‡°ommU9׿_W}ŠUpp0är9vïÞ¦¦&aM·eËA.—#11>„ŸŸ–/_Ž/¿üRéÖÖÖøôÓO‘œœŒúúzŒ1±±±°¶¶ìرþþþJO³fÍÂÚµk!‘H0sæL„††*=U@HHΞ=‹ŒŒ ¥O–6Æ à /¼€ùóçãäÉ“€ððpìÚµ K—.Çqxíµ×‰††ç©§1j“¶þ-,, ‘H°~ýzH$L™2‘‘‘ÇÑ•V¬X-[¶à™gžAHHfΜ‰¨¨(ìÚµKé\s˜]qŒ1¦t€ãú´…»ººaaaˆ‡‹‹‹ÒêÂ… HOOGJJJŸ®ŸŸß«Ç#S“)ÕªÍæÍ›áììŒìì쮇÷Û/ÝÊË˱uëV””” ½½üñöíÛ‡9sæôW—„ôÉÓ{õÑÍû￉D‚7¢©© ÇG`` æÎÛëk4¨OïO=í¯ÑôÝÔ˜ÇÔ)ÕÚO}™Dˆ±Óû2‰SCaŒi›´1£0˜Coo( &ÂÐÛ› C˜Ã¶lò†^2·mÙ¤Ï`îÔmËž>}ºÚmÙÔÔT,Z´§NBbb"ž{î9¸¸¸ 22IIIhooÇÒ¥K…MpÑÑÑøçŸ´Ö±lÙ2xyyA&“!-- ...°±±yâmÙ„ÂÐkæ¶-›PzÍܶezÍÐk¦¼-›¨GÏ ½dÊÛ²‰z´7©˜ËVgsE{“é-“´Û²ÉÿQ´èí2gÈ!X³fÍS®†ô7Z&£0£0£0ÂSûúúõëÂÖaBÌMMM œUºÿ3\wwwƒÿ^ºÑ­¿ok×®íùÿ@WVVv?DÈ€@¯áQáQáQáQáý\Cç×öM/!IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm__inherit__graph.md50000644000113200011300000000004012616110566022675 00000000000000cf11085ef0104b77bc12740aee8128cbpktools-2.6.6/doc/html/md_examples_pkreclass.html0000644000113200011300000000777512647637662017132 00000000000000 pktools: examples_pkreclass
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkreclass

Examples of pkreclass

pkreclass -i input1.tif -o output.tif -c 1 -r 0 -c 2 -r 0

replace pixel values 1 and 2 with value 0

pkreclass -i vector.shp -o output.shp -c FROM -r TO -n INFIELD

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

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)

same as previous but without temporary file

pktools-2.6.6/doc/html/inherit_graph_44.png0000644000113200011300000000230512647437044015507 00000000000000‰PNG  IHDRp%ÁúXbKGDÿÿÿ ½§“zIDAThí™KH:_ÇïdSaEH>Ф‡DD­ZER‹(zXbAHZd” E- ÚÖ&- ,ZEµ(H Z ­ÒìA AŒ1™JÎo1†ù›õëoóïÅ|VgΜs<óåÞ;s¯A€…9¾ºß+(ð‚2 +(Ã$F]Ûíö¹¹¹/iå'¢Óéš››é(ê-¯V«ËËË?·± )ÔÊÊ Ý=B/ƒXb¢V«_:Ù5”aXA†”aXAæ÷êv»!zóå÷úM`e˜8ÝÜÜ,..NII‘ÉdKKK€†††¡¡!òn0äñx[[[‚ ÁäääÒÒR^^^FFÆØØØkÅÉyêp8 „B¡^¯ƒ¤sgg';;ûàààþþ¾³³“ÏçK¥Òááá§§'2wyyY.— ‚¾¾¾ÇÇGzÙp8l4E"‘P(4áp8¾öþñoZZZZZZˆ7Áq<99yvvÖëõ.,,$&&â8nµZ³³³#‘A‡C"‘„Ãar¦Ñh0 ³X,µZa¹»½»»‹YßårT*ÕÙÙ™ÓéT(¤³¶¶vwwÇq­V[UUu~~Ž HQQPYYIe™L&ÒI–ššjjjº¾¾F¤´´Ôd2Å×ÞÛZÅ#(Š¢0 OOOû|¾H$òðððüüì÷ûSSSŽŽ‚hkk3›Íÿü'''A„B¡(Ûår½!(‚ ä¥ÍfS(tg(âp8§§§dÀúúzT™•——GT©Tz½^ÒÞÞÞ.))‰¯½·µŠgÊóx¼½½=§Ó)•J+**ö÷÷¸\n}}½Ýn÷ûý›››]]]T|zz:†á(ûmòóóIC©TÞÜÜP6àöööùùY.—“N…BAг¼^/½àåå¥X,† ‚ êêê‹‹‹´÷ñ"‘Èêê*Š¢===uuu(Š4ÝnߨØ(++£,nÈÁ8;;“H$¤M>ªH$âp8‡tžŸŸgee½ÌÊÉÉ¡äóùÔ óù|N§óƒÆ$A!R©Tkkk†…B!†¹\.@¥Rù|¾ñññîîîw600àv»GFFÚÛÛé·`nmmÕëõ§§§£££Z­–¼e0¨¬ÎÎNzVcc£Ùl¾ººB¤¦¦fffæãMÆà=ëÂKl6›\.OJJR*•‡ƒò÷öö¦¥¥á8Nym1zÍŽ‚e‹%''‡Ïç÷÷÷újHŠ¢™™™b±xpp °Z­¹¹¹B¡Ð`0ƒAz†a]]]</33³··×ï÷Ç×ÞÛZÅ8|íñÛíÎÏÏ'¾ýß±1µb?ì&ÆógòÚF[§Ó}r'LñÅ‚~ÿyý_a§<ð‚2 +(ð‚2LŒ—’Ç㙟ŸÿüV~G&“E{£>ô©3M–÷`0þ²Sbù ìÊ0¬  à Ê0¬  ó ›èKIEND®B`‚pktools-2.6.6/doc/html/dynsections.js0000644000113200011300000000630112647637661014556 00000000000000function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); var summary = $('#'+base+'-summary'); var content = $('#'+base+'-content'); var trigger = $('#'+base+'-trigger'); var src=$(trigger).attr('src'); if (content.is(':visible')===true) { content.hide(); summary.show(); $(linkObj).addClass('closed').removeClass('opened'); $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); } else { content.show(); summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); } return false; } function updateStripes() { $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); } function toggleLevel(level) { $('table.directory tr').each(function(){ var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); if (l pktools: pkfillnodata
pktools  2.6.6
Processing Kernel for geospatial data
pkfillnodata

program to fill holes in raster image

SYNOPSIS

Usage: pkfillnodata -i input.txt -m mask -o output

Options: [-b band]*

Advanced options: [-d distance] [-it iterations]

Description

The utility pkfillnodata fills nodata values in a raster dataset. Nodata values are defined as 0 values in the mask raster dataset. You can use the input file as the mask image if 0 values in the input raster have to be filled. Per default, all bands are filled. Use the option -b to fill individual band(s) in a multiband raster input image.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input raster dataset
    b band int band(s) to process (Default is -1: process all bands)
    o output std::string Output image file
    m mask std::string Mask raster dataset indicating pixels to be interpolated (zero valued)
    d distance double 0 Maximum number of pixels to search in all directions to find values to interpolate from
    it iteration int 0 Number of 3x3 smoothing filter passes to run (default 0)
    Usage: pkfillnodata -i input.txt -m mask -o output
pktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img__inherit__graph.map0000644000113200011300000000011312616110567024251 00000000000000 pktools-2.6.6/doc/html/nav_h.png0000644000113200011300000000014212647637661013454 00000000000000‰PNG  IHDR ,é@)IDATxíÝA @BQ­³šÛ›Ð¢Žáà) )ëý éaÅèÜ¿Æo‡RlÐßIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilter__spectral_1_1pkfilter__spectral-members.html0000644000113200011300000002445412647637662030745 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkfilter_spectral.pkfilter_spectral Member List

This is the complete list of members for qgis.pktools.pkfilter_spectral.pkfilter_spectral, including all inherited members.

cliName (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectral
defineCharacteristics (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectral
DZ (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
EXTRA (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
group (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectral
INPUT (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
METHOD (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
METHOD_OPTIONS (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
name (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectral
NODATA (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
OUTPUT (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
PADDING (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
PADDING_OPTIONS (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
processAlgorithm (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectral
RTYPE (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
TYPE (defined in qgis.pktools.pkfilter_spectral.pkfilter_spectral)qgis.pktools.pkfilter_spectral.pkfilter_spectralstatic
pktools-2.6.6/doc/html/pkpolygonize_8cc_source.html0000644000113200011300000005610512647637662017423 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkpolygonize.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkpolygonize.cc
1 /**********************************************************************
2 pkpolygonize.cc: program to make vector file from raster image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "cpl_string.h"
21 #include "gdal_priv.h"
22 #include "gdal.h"
23 #include "imageclasses/ImgReaderGdal.h"
24 #include "imageclasses/ImgWriterGdal.h"
25 #include "imageclasses/ImgWriterOgr.h"
26 #include "base/Optionpk.h"
27 #include "ogrsf_frmts.h"
28 extern "C" {
29 #include "gdal_alg.h"
30 #include "ogr_api.h"
31 }
32 
33 #ifdef HAVE_CONFIG_H
34 #include <config.h>
35 #endif
36 
37 /******************************************************************************/
76 using namespace std;
77 
78 int main(int argc,char **argv) {
79  Optionpk<string> input_opt("i", "input", "Input image file");
80  Optionpk<string> mask_opt("m", "mask", "All pixels in the mask band with a value other than zero will be considered suitable for collection as polygons. Use input file as mask to remove background polygon! ");
81  Optionpk<string> output_opt("o", "output", "Output vector file");
82  Optionpk<string> ogrformat_opt("f", "f", "Output OGR file format","SQLite");
83  Optionpk<int> band_opt("b", "band", "the band to be used from input file", 0);
84  Optionpk<string> fname_opt("n", "name", "the field name of the output layer", "DN");
85  Optionpk<double> nodata_opt("nodata", "nodata", "Disgard this nodata value when creating polygons.");
86  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
87 
88  bool doProcess;//stop process when program was invoked with help option (-h --help)
89  try{
90  doProcess=input_opt.retrieveOption(argc,argv);
91  mask_opt.retrieveOption(argc,argv);
92  output_opt.retrieveOption(argc,argv);
93  ogrformat_opt.retrieveOption(argc,argv);
94  band_opt.retrieveOption(argc,argv);
95  nodata_opt.retrieveOption(argc,argv);
96  fname_opt.retrieveOption(argc,argv);
97  verbose_opt.retrieveOption(argc,argv);
98  }
99  catch(string predefinedString){
100  std::cout << predefinedString << std::endl;
101  exit(0);
102  }
103  if(!doProcess){
104  cout << endl;
105  cout << "Usage: pkpolygonize -i input [-m mask] -o output" << endl;
106  cout << endl;
107  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
108  exit(0);//help was invoked, stop processing
109  }
110  if(input_opt.empty()){
111  std::cerr << "No input file provided (use option -i). Use --help for help information";
112  exit(0);
113  }
114  if(output_opt.empty()){
115  std::cerr << "No output file provided (use option -o). Use --help for help information";
116  exit(0);
117  }
118 
119  GDALAllRegister();
120 
121  double dfComplete=0.0;
122  const char* pszMessage;
123  void* pProgressArg=NULL;
124  GDALProgressFunc pfnProgress=GDALTermProgress;
125  pfnProgress(dfComplete,pszMessage,pProgressArg);
126 
127 
128  ImgReaderGdal maskReader;
129  GDALRasterBand *maskBand=NULL;
130  if(mask_opt.size()){
131  if(verbose_opt[0])
132  cout << "opening mask file " << mask_opt[0] << endl;
133  maskReader.open(mask_opt[0]);
134  maskBand = maskReader.getRasterBand(0);
135  }
136 
137  ImgReaderGdal inputReader(input_opt[0]);
138  GDALRasterBand *inputBand;
139  inputBand=inputReader.getRasterBand(0);
140  if(nodata_opt.size())
141  inputBand->SetNoDataValue(nodata_opt[0]);
142  ImgWriterOgr ogrWriter(output_opt[0],ogrformat_opt[0]);
143  OGRLayer* theLayer=ogrWriter.createLayer(output_opt[0].substr(output_opt[0].rfind('/')+1), inputReader.getProjectionRef());
144  if(verbose_opt[0])
145  cout << "projection: " << inputReader.getProjection() << endl;
146  ogrWriter.createField(fname_opt[0],OFTInteger);
147 
148  OGRLayerH hOutLayer=(OGRLayerH)ogrWriter.getLayer();
149  if(verbose_opt[0])
150  cout << "GDALPolygonize started..." << endl;
151 
152  int index=theLayer->GetLayerDefn()->GetFieldIndex(fname_opt[0].c_str());
153  if(GDALPolygonize((GDALRasterBandH)inputBand, (GDALRasterBandH)maskBand, hOutLayer,index,NULL,pfnProgress,pProgressArg)!=CE_None)
154  cerr << CPLGetLastErrorMsg() << endl;
155  else{
156  dfComplete=1.0;
157  pfnProgress(dfComplete,pszMessage,pProgressArg);
158  }
159  cout << "number of features: " << OGR_L_GetFeatureCount(hOutLayer,TRUE) << endl;
160 
161  inputReader.close();
162  if(mask_opt.size())
163  maskReader.close();
164  ogrWriter.close();
165 }
166 
pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem__inherit__graph.map0000644000113200011300000000012312616110567025304 00000000000000 pktools-2.6.6/doc/html/pkfilter__spectral_8py_source.html0000644000113200011300000007726612647637661020622 00000000000000 pktools: /home/kempenep/pktools/qgis/pkfilter_spectral.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilter_spectral.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkfilter_spectral.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkfilter_spectral(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "smooth", "density", "smoothnodata values", "threshold local filtering", "stdev", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "savgolay", "percentile"]
43  METHOD = "METHOD"
44  DZ = "DZ"
45  NODATA = "NODATA"
46  PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
47  PADDING = "PADDING"
48  RTYPE = 'RTYPE'
49  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
50  EXTRA = 'EXTRA'
51 
52  def cliName(self):
53  return "pkfilter"
54 
55  def defineCharacteristics(self):
56  self.name = "spectral/temporal filter"
57  self.group = "[pktools] filter"
58  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
59  self.addParameter(ParameterSelection(self.METHOD,"filter rule",self.METHOD_OPTIONS, 0))
60  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
61  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
62  self.addParameter(ParameterNumber(self.DZ, "Filter kernel size",0.0,None,1.0))
63  #for smooth nodata:
64  self.addParameter(ParameterString(self.NODATA, "nodata value to smooth(e.g., 0;255)","none"))
65  self.addParameter(ParameterSelection(self.PADDING,"Padding (edge effects)",self.PADDING_OPTIONS, 0))
66  self.addParameter(ParameterString(self.EXTRA,
67  'Additional parameters', '-of GTiff', optional=True))
68 
69  def processAlgorithm(self, progress):
70  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
71  commands = [cliPath]
72 
73  input=self.getParameterValue(self.INPUT)
74  if input != "":
75  commands.append('-i')
76  commands.append('"' + input + '"')
77 
78  method=self.METHOD_OPTIONS[self.getParameterValue(self.METHOD)]
79  if method != "none":
80  commands.append("-f")
81  commands.append(method)
82  commands.append("-pad")
83  commands.append(self.PADDING_OPTIONS[self.getParameterValue(self.PADDING)])
84 
85  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
86  commands.append('-ot')
87  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
88  output=self.getOutputValue(self.OUTPUT)
89  if output != "":
90  commands.append("-o")
91  commands.append('"' + output + '"')
92 
93  if self.getParameterValue(self.DZ) != 0:
94  commands.append("-dz")
95  commands.append(str(self.getParameterValue(self.DZ)))
96  nodata=self.getParameterValue(self.NODATA)
97  if nodata != "none":
98  nodataValues = nodata.split(';')
99  for nodataValue in nodataValues:
100  commands.append('-nodata')
101  commands.append(nodataValue)
102  extra = str(self.getParameterValue(self.EXTRA))
103  if len(extra) > 0:
104  commands.append(extra)
105 
106  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/inherit_graph_14.md50000644000113200011300000000004012616110567015371 0000000000000070f7c2bb09bded5be1cd7f20c73a61abpktools-2.6.6/doc/html/classImgRasterGdal__inherit__graph.png0000644000113200011300000003033212647437044021272 00000000000000‰PNG  IHDRÿ»ªÁH°bKGDÿÿÿ ½§“ IDATxœíÝw\S×ÿ?ð×MBD¦lEQàDëÞZ­Jk©AdãV(Új±ê¯âÂu0A† ÷¨¶®êW µ•"VmE©PQ03ÎïK*²$&$ó|}ŠO?ýTâö………ð÷÷‡vìØaÉ’%øçŸÞ+%;tÍ߆têÔ ººº]]]øøøà³Ï>CII :uê$q¿"‘¥¥¥·Ç€°bÅ 0 èÕ«ÊËË‘˜˜ˆÕ«WKÜ7%;´øelÒ¤I DRRJJJààà}}}8p¥¥¥°³³ƒ»»;!8uêŽ=Š¢¢"ôéÓöööX³fM£›¼l6êêêâçÒÒÒÜÜ\¨««ÃÎÎsçÎüüóÏˆŠŠBnn.ôõõáêêŠiÓ¦ÁÏÏ0{öl=z °ÿ~üðÀ>ú(((€‹‹ ¶oߎ|õÕWÈÈÈÀÊ•+Å…_Ë××ÏŸ?ðz“’’‚3gΠ¸¸=zô€­­í;å¦dƒnö·‚›7obß¾}ðòòBdd$ÒÒÒ___ÄÅÅ¡´´ßÿ=âââàïïÄÄD8;;cÏž=uú©ªªBee%*++Q\\Œ¨¨(L:***€ŠŠ ¬[·½zõB||<|}}‰W¯^¡ªª ÁÁÁ°µµERRæÍ›‡-[¶ ªª {÷îqáÀáÇñôéS„‡‡cûöíÈÈÈÀ᧤¤ ((Ý»wÇ“'Oн{wñkµ¹\.LLLGŽArr2¼¼¼‡yóæ!,,¬ÙÜ”ìÐ5+ptt„šš¦M›†­[·bîܹPSSÃôéÓ±}ûv”••áÈ‘#ðññÁ°aÃC‡…››6nÜ(îÇÃãN¿;vľ}ûĹ\.¢¢¢`hhˆ:ˆOI.//›Í!D\”Ó§OÇĉÑ¡C‡3Ÿ={¡¡¡ÐÕÕ…¡¡!¼½½†™3g¼¼¼Ð£GƒUUUqÛÚ¿©uùòeœ>>7n@OO^^^øöÛo›ÌMÉ-þV ¦¦àp8 >€'OžÀÜܼN»7צê|‹P]]èèhlÙ²E¼…Àáp——‡mÛ¶¡²²½zõ·ÕÔÔDhh(>Œ wïÞ˜;w.FŒÑ`ægÏžÁÎήÎsoî^˜™™x}ìËå"//O<½ÚÝ”²²2Ìš5 PTTTï[‰=z4››’Zü ÂÈÈÿý·¸ 4y¤¼C‡˜>}:NŸ> B†Auu5‚ƒƒŒQ£FÏçãìÙ³^/,D"‚ƒƒ!pñâE¬Y³Ço°mmm„††Š6</^¼¿^»àbC† ÁéÓ§±|ùò:}¼y¬ÂØØ>¬óÕߣGÄÙËMÉÝçW¶¶¶Ço¿ý†ÒÒRüþû‰©wíMêêꨨ¨@ee%€ÏçC €Ãá ¦¦F¼^QQ†a€«W¯¢¼¼|>§Îfm?0nÜ8DFF¢  999 ltAáááüáááÈÉÉÁƒ‹Ó§O‹³f;}ûpýúu¼xñ7nÜ@ttt³¹)Ù¡k~akk ¡PˆÐÐP””” _¿~ðññÁÖ­[mc``555”––BMM ðõõÅÆѱcGÌ;S¦LA`` Ž;†Õ«W#<<………011Á×_ .— ccc 0vvvøþûï .ÄîÝ»áéé †a0~üxx{{‹Þ¿©gϞصkÂÂÂpòäIèëëcذaصk-Z$þÿø|>öíÛ‡ââbôìÙk×®…ŸŸ_“¹wïÞ-›7œ¢×ó7‡a|ýõ×2¿¤7-- †††u6‹¯^½Š¸¸8DFFÊtÚíQí%½tön½WQäää`Ó¦MÈÎÎFuu5îÞ½‹èèhØØØÈ;ÕNÑÍ~1gÎTUU᫯¾Â«W¯Ð¹sg̘1Ÿ|ò‰¼£Qí-~Áf³±páB,\¸PÞQ(%A7û)JIÑâ§(%E‹Ÿ¢”-~ŠRRô€ß;¸yó&x<ž¼cP-ð×_É;‚£'ù4£k×®ÈËË“wŒwÂfk@Cc8øü"TTÜ–jß\®)ÔÕÇ» >¿@ª}ËJ×®]ñøñcyÇPTô$Ÿæäææ‚¢Ð?/^ð| &&^PSˆíÛwI}ׯÿTU{ÃÀ`.æÍ‹ÀÝ»Oäþ7÷C ¿itÍ߆•—W#"â vï¾€š!„BTUU™¹ZZ¥>½3v ++, "‘66ƒðÅ3ѳ'½•YD×ümWíÛÏaðà`ìØñ#*+ù EPQaÁÙy”L /þ„0 E 8wî6ÆßŒyó"qïÞ™L“’ºæoCjjˆŒ¼‚Ý»/Ç«‚P(ªó:Ã0¸~} ºw×—ÉôE"‚#6àÉ“—xs®ápØ E°±ˆÕ«m`nn “éSRE×ümP(B||FŽÜ€o¿=ƒ’’Êz…Ïá°0iR_™>°X |}'Ū;ÛBBpîÜ?~3/ŽÇãÇÅ2ËAI]ó+¸kײñÍ7'ðÇOÀb½^û6æÐ!L˜ÐG¦yx¼jX[¯CyyM£Ãá°Àf³àá1Ë–M…ºzÃãRrE×üЬ¸˜‡9söáîÝ|¤ÑÂgææ?¾·Ì3ihtÀüùcÀá°ý@„êj>ö칈‹ïÊ<%Zü LOOÛ¶9`Àb5>œÃ>>›òKš¼¼&4;Hððå—cÖ,ëVÉDµ-~7gÎ$%ù€Ëå4ºÐÒêGÇá­–ÉÈH¶¶ÖPQixíÏ0 6nœ ÿ)­–‰j9ZümÀر½ï‡ §îGÆá°°`Áp¹­{¦¶Ÿßõ¿m`ÀÃc<ÜÜÆ¶jªåhñ·55ìÜyjj\hh¨ÖÙß&puÓê™,-;cäÈžâ…‹õúgذHHHÃo¿ýÝꙨ–¡Å¯àø|!<=cðÇy8rdNœX]]5p¹p8l̘1FFÚrÉæí=‹Å€aìÚå‚#Güñá‡V˜;7™™ôôZEF‹_‰DË—ÂõëÙˆ‹ó‚¥egôêe„3g–ÃØXÞÞä–ïÃû¡kW°X,DFºá³Ï†€Ífá»ï\0bDÌ™†;wòå–jýž_­Ys‰‰¿ .ÎãÆÕý¯¸˜‡ î¶ê¾†üñG>ø|!¬­Íê<_UŇ³s8²³ pìØbzþ¿âI¥Å¯ vìø¡¡?"<|fÎ(ï8)+«‚ƒÃ^•áøñ%èÒEGÞ‘¨ÿГ|QDÄlÛv›6ÙµÙÂMMU$$xCSSŽŽûPXX&ïHÔhñ+˜ääX¿þg`þüÑòŽóÞtuÕ‘šê‹“S^½¢÷ßS´øÈ… w˜oï X¶lš¼ãH¾¾’“}QVV‰yó"P^^-ïHhñ+Œ_~É—W >ÿ|Ö®%ï8RgbÒ ÉɾxüøÜÜ¢P]-w$¥G‹_üñG>,ˆÄ‡ZaËûV;G¿µ™› )É·oçÃÛ;¶Þ‚Të¢Å/gÂÉ) ÖÖݰgÏ<°Ùíû#±´4A|¼®_ÏÆ²e‰M^¢LÉVûžÓ\AA \\"Ð¥‹"#ݽP¦½:´pÇ™3·ðå—Gèm´å„¿œ¼zU'§pp¹$$xCCC¹¼;¶7Âà !! ÁÁ'äG)Ñâ—ƒòòj¸¸D€Ç«BR’tuÕåI.¦Më;ç"*ê*víº ï8J‡Þ±§•ÕÔàæÜÜ8~|1:wî$ïHr5{öPðùB¬X‘„8ðöž(ïHJƒ+ Eðõ=ˆ¬¬\=ºˆŽrû/GÇá(+«Â×_‡––*œœFÊ;’R Åߊ¾üò.]º‡„oXY™È;ŽBñð/ʘ uuUÌš5XÞ‘Ú=Zü­$$ä{$&¦#*Ê£G[È;ŽB œªª,^uu.¦L±’w¤vðkaa?á»ï. 4Ô S§ö“w…¶ví,88 ‡§g ÒÓÊ;N»F‹_ÆJdž '±aÃg°³û@ÞqÃ0ؼùs|ôQ,X°·nåÊ;R»E‹_†Îœ¹…ÀÀT,]:nnãä§Í`³YصË#Fô€³s8îß&ïHí-~¹zõ/øùÅÁÝ}gÈ;N›£¢ÂFD„+úöíŒ9sÂðÏ?ôö_ÒFGò‘¬¬\ØÛïÅäɖسg^“7Ü šVVVGÇ}xù²Ç/–Û`¥íÉGÚ<(Äܹá>Ü»v9ÓÂOššªHJò††*ììö ¨ˆŽ$-´ø¥(/ï%÷¡W/#¥ºPGÖ´´:âÐ!0ÌëÑ€JJèh@Ò@‹_JŠŠÊàè¸zzêˆõ„ªªŠ¼#µ+µ£•–VÂÅ%ß%˜z7´ø¥€Ç«Æ‚ûÁb1HLô––ª¼#µKµ£åæÃÍ- 55t4 ÷A‹ÿ=UW àæ¶……¥HNö…¾¾†¼#µkææ8tÈ·oçÁÇç  è=Ðâ>>±¸sç ¼ab¢ÜWèµKËΈ÷µk÷±bÅ!:„hñKˆ‚•+“píZ6¼Ñ§±¼#)•!Cº!:z!NÊÄÚµGå§M¢Å/¡uëŽãĉßqà€{½[UQ­cìØ^ˆˆpE||¶l9+ï8m-~ ìÙs±±×6cÇön¾%3S§öÃÞ½óðÝw°gÏEyÇiShñ·PBB¾ýö ¶m›ƒéÓÈ;ÀÆf¶msÄ·ßžÁÁƒ?Ë;N›A¯ço“'3tAA6pp&ï8Ô‡ƒÇ«Âš5‡¡©©ŠÏ>"ïH ÿ;º|ùO,^oï‰X´hмãP X¸p<^¾¬À’% PQaããÉ;’B£Åÿ~ýõoxx€½ý0|ùåÇòŽC5aժ騬¬¿ÔÕ;`Ò¤¾òޤ°è>3îßW×(|ø¡BBÚï­´Ú“¯¾úŽŽÃááq7näÈ;ŽÂ¢—ô6¡  ³fý&&pè=_¿ DðòŠÁ98~| ,, åIѤ‚¼¥{÷îýð‰¦æhÂ0䞥¥?o´RÕæ“ÿ>?®Ü³ÈóÇÜܼ¡0¥Þ>ÿ£G°|ùrŒ5êí—¨6bÇŽxôè‘L§Aç“¶!-- ¡¡¡ ¾Öà¿‘#GÂÞÞ^¦¡(ÙIMMm•éÐùDñ5µWOøQ”’¢ÅOQJŠ?E))Zü¥¤Þ»ø†Áƒ¤‘¥^¿oþtìØcÆŒAff¦Ô§<øžû÷ïÃÆÆ:::066†­­-nݺõÞÓ{ŸLŠF󉿿?FŒQç¹0 ƒ‡ÿ»ÕWnn.†ÁåË—ëõ!í÷¸-Í ½æÿùçŸñôéS<}úYYYèÕ«›<‚ÙÚrss1zôh˜ššâÒ¥K8{ö,ÌÌÌ0nÜ8ܽ{WÞñÚµ‰'â÷ßGee¥ø¹ .€ÅbáüùóâçÒÒÒÀår1rdý[wêÔ _|ñ ''úúúçikó‚BŸÛo``cã×#äcË–-022BQQ ㌭M›6aìØ±/™­­­QZZŠÄÆÆÊ9aû5~üxðù|ܼycÇŽEee%þïÿþ ,ÀùóçáããHOOÇðáÃѱcÇz}èëëcóæÍ‘H„âbÉï ÔÖæ©¯ù†Att4,--a``€Í›7#..æææÐÖÖÆÚµk¼þþ1,, VVVÐÒÒÂäÉ“qúôé&7mTTTÀår¡­ýß][ø|>`ddCCC€ÏçNŸ> kkk¨©©¡sçÎâY(bëÖ­èÝ»74551fÌüòË/ÍöY»éuñâE˜™™áÚµk¸xñ"–,YR/÷¶mÛ°bÅŠwš^c9Û3iÌ'FFF°´´DZZàúõëèÚµ+¼¼¼pñâE¯G÷MKKÄ  Þg#þìj· jW8@;ŸÞ>çINN~çÓ<ììì:œœHii)Ù¿?@Hii) 'ÈóçÏIdd$155%çÎ#EEEäüùóÄ‚ÔF@233IYY)++#ùùùÄÏϸ¹¹Õ™~HH±³³#?&YYYdÈ!$((ˆ”––.—KÜÝÝI^^‰'Haa!Ù±c144$G%OžéÔ©IKK#UUU„Ëå’ü‘Bê}†™™™â¾z¿Ûú¼œœÜX»™FF!„šššggg“þýû“„„„:}%&&Ö)þ·444ÈÝ»wë´éÛ·/yúô©øñùóçÉàÁƒIuu5¹wïáñxD(’+W®ˆ§Ý»woS§ŸØØXñ´ë³öÈÊÊ"„’ŸŸOˆ?؆rBšœ^S9Û{ñKc>IJJ"†††D$‘!C†ÔÔTB!vvvdýúõ$--°Ùlñgôögøæ{ÜÐûÝÖç…¦Š_&ûüššš^o¦7ô>|ˆþýû×igeeUçqvv6,,,X·nÜÝÝÅ›yÀësÌ;wî\§¶¶6¸\.îß¿OOOðxæóùdìØ±DCCCüz[ŸdzÀOR§N"™™™už;|ø0VV\\\‘‘ŠŠ ¤§§cíÚµðððW$JÑùDvä¶ÏˆŠŠ ØÚÚ¢¨¨=zô€»»;¼½½å‰R@t>‘¹?‡ÃÁƱqãFyE Ú:ŸÈŽB_ØCQ”ìÐâ§(%E‹Ÿ¢”-~ŠRRõîØÃ0  ###yeju" ,–¨EmÊËÕÁb‰Ð±ceóÜÊnß¾ñãÇ#%%EfÓP¤ù¤ººjj¸ÐÔ,kQ;I>÷¶¦  ·oßnhœÔzGûW¬XÜÜÜÖI¦*+ÙÈÈ0†±q9ºu+‡ón£=}ª‡/T¡¡ÁG—.eÐÕ­KA¶£Æ™NCÞó !ÀË—ªÈÏ×@II¨©ñafVøNmE"kâÉMôëWmí§•L:µÁ×”þ^}|…’’JèëkbûvGLÚ¯Ùv7näÀÖö;0Ìëµ ŽŽ:¼¼&ÀÙytuÕ[!¹rzõª‡ý‚ˆˆ+(,,¯ÑÂÃà“O7Ó¸zõ/¬\™Œüü—PQaãöíÐÒR•ulE”ªôÅ_|‘ŠÄÄtˆD¯¯Üúä“ÁØ´ÉúúM¶suÂåË÷Àç **lˆD3f €§ç fÞñ•Â9ˆŒ¼ŠsçnƒÅbÄï9‡ÃÂÀ]qúô²&Û?ÎúuÇqüøM°X¯/ ú裈Šr“yvE‹ÒÓböìÝâÇ\.AA6pw'žYÞöða!&NÜ ¡°î[Èá°!ѯŸ)¼¼&ÀÖvTTØ2ýÚ£ª*>þ \ý{O ¢Â}-†apêÔR Ò­Á>„B¸†Í›Ï€Ï¾ÑžAt´¦O ãÿBaÑ⑈`Рu(.æ½ñ,†¬­Í°sçÜFoñ¼lY"Ž» >¿þ#6›‘ˆ@GG NN#áá1FFÚ ôB½)?ÿ%bb®#>þgðxÕ „@$ª?›ª¨°1i’%bb6ØOVV.–/OŸ>­wÀKC£îÜÙ¤Ì åT9D%_,ÓÀÚùõ.@VV&OÁöíçê­u`ùò j䀱P(úwˆ „…]ÆèÑ›påÊ_²ù'Ú‰kײ1zô&DDü„’’J…¢ xýþͬ÷|yy5¾úêfÎ Evö³z…Ïá°ñÉ'ÖÊ\øè÷übŸ~:¸Áâ„D ýS¦lÅ­[upw릇yóFAE¥ñË$È¿£À0 &&¤ž½=±²2y§­#.—ƒÏ?†¾}ë±õÓObüøÍˆ½‘ˆ@ ¨¿d„øì³!RËÜVÑâÿ×!Ý¡§×ø>‘ˆàï¿ ññÇ;ñ¿ÿ¯óÚªU3 ¢Òø[É0 ¸\öC¯^òÿ^\‘éêªãäÉ%ÐÑQ‡ÓÔ{ ¬^mSç¹  T8;G   Baãßßëè¨aÔ¨žRËÜVÑâÿ‹Å`öì¡àpß _ï{;v³ÎóººêðõÔàÌÊ0›ÍààAO l&õÜ푱±6RR|¡ªªÒàÁV‡ ŸI02Òªóüãǯo¸ÑØnBm[;»ÀfÓYŸ¾o°µ þ¦-†a`o? ?ü°ªÞk>>“ ¡ÑS¯Íĉ}1hPWiÇm׌;¡K°XL½€¦føûO©×&!ÁkÖØˆïïØ@;»d’¹­¡Åÿkk3˜šêÔ{žÍfÍf!$Ä;w:¡C‡úû÷êê°té´:3*Ã0 ²Áï¿?†‹Kx¼j™æo/Š‹y˜=û;TU °u«£øD*àõÚŠý» ­‹aøûOALÌB¨ªrÀf×ߊ33Ó£ âÑâ‹­í:›ïªª*04ÔÂŒM'¼`ÁñÙ} ¬Xñ-š‚ãÇãñãbØÙíFII…Ló·u¥˜={7*+ù8rÄŽŽÃ±aƒ€×ï©¡¡æÍÝd½{CM‹N:ÖÙãpX°·§kýZ´øßbc3P|„˜Ãa¡Sœ>½;ª`îÜp”—7¾öVUUA@Àt€«ë8¬\ù gOC>ìÂÂR¸¸D ¬¬JöÿHTPP{û=`ÇŽ-Fçί¿quƒe˦‚`ÍšÁå6þÍJaa÷¡{w\¸° #Göïß "Ìš¥<7Ei–,Gm‹D":4˜t&55B!='|E\\ Ÿ/l´½@ $çÏß!B¡¨ÞkÙÙdРµäãw’²²*™ýmÑÓ§¯ÈرÿLœ¸™–6ø7¿þšCD¢úïk­²²*2mÚ62fÌ&R\Ì#„¼þ<6l8ELL–“‰7Ë${•BÏðkÀùówPUůw¡È9pt܇Ï?†­[%»jîÁƒB|þùn˜™é#1Ñ»Á}Weóôé+|þù^¨ªrœì×ì5 áó…pvÇ_=ÃÉ“KÑ­›^×Ϩé4ƒIDATŸ¿ƒNÔèõÿI¥kþ:yòwbjºœìÝ{Iâ>îÞÍ'ýú}IfÍúáñ”{ àŸž“áÿ!“'o!ÏŸ—5ß "‘ˆøù$_ÌÌÇRNØnÉoÜþ¶ê“OcõjlÜx GÞl¾A,-Mšê‡‡ áìÑäq„ö쟊ag·ººê8zÔ¿É“¬šò=NÊDXØ|z$¿hñKÀß \]Ç`åÊ$üúëßõaii‚”?dgÀÅ%íw@‰†_OÏܺ•‡”?XXH6É«WppØ‹šö‡¡¡Vó¨æÜ¥Å/eFèÒE6œ‚ª*Ç÷¨kën„Ø´é4úô1FïÞÆRN*[B¡¾¾qøùç8|ØVV&õÃãUcîÜp¼|YŽ£GÑaФçnã—GQ³·†²²*¬]{ ÚÚjpq%Q?_|15ðó‹C\œ*Æï#夲AÁªUɸ|ù’’|ЯŸ©DýTTÔÀÙ9yy/pìØâÇZ ÞƒœÏ/n×6o>CLM—“'2$îC(_߃¤wï rëVÛ8oý«¯Ž’nÝV‘+Wþ”¸êj>™3g±´\CîÞÍ—b:ê_)´øeìë¯3³•äâÅ»÷QS# óæE~ý¾$÷ï?“b:éÛ±ãÒµë röl–Ä}ðùB²pa4éÕë róæ#)¦£Þ@‹_ÖD"Y¶,‘ôèH~ùå¡ÄýðxUÄÆ&”Œ¹4|½»¼%$¤“å$6öºÄ}…"²dI17 ×®eK1õzUŸ¬1 ƒ-[0|¸9ÜÝ£ñ×_Ï$êG]½ââ<Áårà꺕•Šu!ÐÅ‹w”Š  ™˜?¿éa¶š²iÓ);v{öÌØ1RLH½+PQa#*ÊF°·ß#ñ@GGÉɾ(((…§§ä'IÛo¿ý OϸºŽÅâÅJÔ!ÁÁÇqÿûŸs³ã%Rï+QSãâÐ!oXZšàÓOw!3ó±Dýk#&f!ÒÓbõêÃRNÙr99EpuÂäÉ–¶•¨‘ˆ`ÕªÄÄ\Ç éÝtZ -þVÔ±#±±4¨+æÌ “x0`@ìÚåŒC‡Ò±ÿU)§|wÏŸóàâssìÞíÒèÝŒ›"ˆ°hQ<Žý ÑÑîøðCzM~k¡ÅßÊTUUê,~ÿ]²ÀÌ™±fÍÇ>ŽsçnK9eó*+k0~$†Al¬TUUZÜÇëÂùs·½“'[Ê )ÕZürðæÀÉIò€ŸßdÌ›7~~q÷! ¡PŸƒÈÍ}„/‰.Íåó…ðó;ˆ‹ï!!Á“&õ•ARª)´øå¤î`ŸÄÅ»aÃl ÞîîQÈÏ)å” û曓¸zõ/DE¹¡{wý·¯©`áÂh\¾ü'ââ<éM3å„¿ý·0ƒ“Ó>ddüÓâ>8"#]¡««—”–Êö† ‘‘Wþ7ÏY¢ëª«pwFzúC$$xaäHZøòB‹_ÎÞ\Ì&Ñ@SS11xñ¢¾¾’(Òœ3gnaýúX³æãz÷4xUU|¸¹Eá×_ÿFb¢·Ä=QÒA‹_Hcе«.ÂÃàúõØ´é”Ô3feåbéÒD88 ‡Ÿßä·//}u^fæc¤¦úáƒèÍ3ä¿‚PUUAt´;,-Màì›7µ¸‘#{bëV„‡ÿ„Ç“Z¶ÂÂ2¸¹EcèÐî ±oqû²²*¸ºîÇ;ù8xÐÒ±õ-~¢®Þ Þ°¶6ƒ£ã>üôÓŸ-îÃÞ~üü&cåÊ$ܸ‘óÞ™*+kàâm펈Šroñ˜yEEe°³Û¿þzF×ø †¿‚QSã".Ο~:óæE")é—÷±fÍÇ;¶¼½cQPPò^yRðäÉ+ÄÄ,lñ}>,„M(*+ùøþût¯`hñ+ 6›…mÛàí=+W&·x,?‹Áž=󠪪ðùB‰rìÝ{ 'OþŽ}ûæÃÌL¯ùo¸yó>ùä06î„S§–¢K:‡Â‘÷u…TÓvï¾@LL–“Oµ¸mFÆ?¤[·UdÆ“-nûóÏH×®+Èž=[ÜöÒ¥{¤gÏ@âìNÊË«[Üžjôzþ¶ 9ùéÚu J%Baã÷§oHLÌ5bb²¼Eƒ‰”’Áƒ×oF%ÇŽÝ$ff+Éò凟/lq{ªÕÐâo+λMºw_E|}’šA‹Ú.^Oúö]C?.nöokjäãCÉ„ ›[¼ÖÞ·ï211YN6l8ID¢–-¤¨VG‹¿-¹v-›ôîDìí÷¯êÛñxUdܸÿGllB›]p|óÍ Ò³g ùóϧïÜ¿H$"7ž"¦¦ËIdä•wnGÉU CH;½1œ„jjj””„ª*Ùž&+©Ç+˜˜‡!C´1mÚ»ƒŸŸ_‰þ‹‹ºwoø®¸åå|÷]¦N5ÄСï>Dö;¥8rä fÎ4Â(æ=UUUÌ™3\.WÞQE*-þ·=zvvvòŽÑ$G"Q9D¢–- X,uˆDåïý7õ1àr;£¦æI Ûµ®#GŽ`öìÙòŽ¡(Ré¸ýoÐn¬†¶Ôkô{~ŠRR´ø)JIÑâ§(%E‹Ÿ¢”-~)`lll ££cccØÚÚâÖ­[ï­µò+ZüT=999Ð×oùØ|µrss1zôh˜ššâÒ¥K8{ö,ÌÌÌ0nÜ8ܽ{WŠI©÷A¿ê£ê‰D(..–¸ý¦M›0vìX„‡‡‹×ÒÖÖÖ(--EHHbcc¥•ztÍ/ à ::–––000ÀæÍ›ssshkkcíÚµ^ŸK+++hiiaòäÉ8}út‹6kk7ƒOœ8>}úÀÐÐK–,Auu5„B!¶nÝŠÞ½{CSScÆŒÁ/¿ü7>ÀéÓ§amm 555tîÜ›7oŒ9`ll,þ[>Ÿ€€ÁÐÐàóùâé_¼xfff¸ví.^¼ˆ%K–Ôû?¶mÛ†+V€ÄÙ()’çÉÅŠ(99™´ôm@²³³ë>ž ………â>ßBìììÈãÇIVV2d ÿíŒ3È¥K—Hqq1a±XäÙ³ÿn%^VVVç‡"Õlïú%''·¸];F/ìy›´Š?##ƒBHMMMƒ³³³IÿþýIBBB¾%*þ¬¬¬:ÿƒ……éÝ»7‰‰©{Ynll,@ª««É½{÷Ç#B¡\¹rEÜoCÖ·o_òôéûœ?ž <¸Þôóóó q‘׿}ó‡"Õlï‚=)tŸ_F455*** >€‡¢ÿþuÚYYÕ½Wyë4ã·×êÕ«—ø÷¾}û"// Ã`ðàºCl8Àårqÿþ}xzz‚ÇãÁÚÚºÉÿçÑ£Gèܹsç´µµëLx½« ªªŠììlqŸµ™_¾| ]]]¯ J+%ºÏ/GݺuÃ;wêŸO¶lÙBúôéCTUUI=È—_~IÊËËÅ}Õîïß¿ŸtëÖèëë“Å‹“ÊÊJ"ÈÖ­[‰……QWW'£F"éééâÿoÇŽDWW—tíÚ•ìÝ»—899CCCÂçóÉØ±c‰†††x:¥¥¥ÄÍÍèèè===âååEÊËËÝÏÈÈ S¦L!ZZZ¤oß¾déÒ¥„Çã‘AƒBˆÄÙè>¿ÔÐ~o“¤ø%uêÔ)’™™Yç¹Ã‡“Áƒ¿s’ƒ²¡Å_O Ýç—£¬¬,¸¸¸ ##HOOÇÚµkááá!ïh” ûürˆŠŠ ØÚÚ¢¨¨=zô€»»;¼½½ß¹--­ý=EÕ¢Ãx½%%%ŽŽŽt$Ÿv†a$''ÃÁÁAÞQE*Ýì§(%E‹Ÿ¢”-~ŠRR´ø)JIÑâ§(%E¿ê{ ›Í:TT;ÄáÐÙýMô«¾·TUUáûᅦP(Ù=í)ÅÄf³1sæL¨ªªÊ;Š¢ ·ë¢(%E¿ç§(eE‹Ÿ¢”-~ŠRR©òAQT«KÿÿoþðüôXöIEND®B`‚pktools-2.6.6/doc/html/classLastReturnFilter.html0000644000113200011300000001137312647637662017051 00000000000000 pktools: LastReturnFilter Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
LastReturnFilter Class Reference
Inheritance diagram for LastReturnFilter:
Collaboration diagram for LastReturnFilter:

Public Member Functions

bool filter (const liblas::Point &point)
 

Detailed Description

Definition at line 28 of file FileReaderLas.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/inherit_graph_22.png0000644000113200011300000000331112647437044015501 00000000000000‰PNG  IHDR›%U¡›‰bKGDÿÿÿ ½§“~IDATxœí›[HÓmÇ¿ËÃÖ,4à h˜#0«‹ˆî:(1(C/*°  E•áEVt퀴·Ë’ ƒzQÆ”¤ôƹýÇÜ<Ìmß÷â}÷ß97Ëwþ}_ßç»xžgû¾|÷ü÷?LE’fŸßÌu‚ÿÂlÅf(†0›@1b'OØív”••alll.êÌ ._¾2¯š|6j6›±oß>)Vœ`þÐ×ׇÖÖVLq‘ã·-€ÙlžÝªó’Àf5â7›@1„ÙŠ!Ì&P a6bDÅl*• ===Ñõ¯åŸôØÓÓ•J5ãÜW®\Azz:ü~ÐTUU!''‹/ÆÆÑÖÖ6mþ§OŸ"==’$êëë‘““·Û 0xôè|>ŸËb±]ÓŠ¤I€É‡ÔÉãhé3%œÄÇ9ÅtD°»»;h\XXHI’xëÖ-ààà «ªª¸jÕ*Úl6vttpýúõ,//'IvwwwîÜÉ7oÞÐårñÂ… Ü»w/ív;m6×®]Ë'NÐét2>>ž¥¥¥üúõ+ïß¿O Ëå¢Z­æõë×ÙßßÏ;wî066–.—‹$ÃÆŒVÕÕÕÔét´X,üöíŸ?δ´4YÓHù‹‹‹yðàA:êõz¶µµÉù$I¢Z­fss3I²««‹ , Ãá Ɉš´ý»Î&gªO€þ1ÏšÙšššH’G^_¹r%-‹ü¾OŸ>Éã@Ó6›M^ÏÍÍe¿<~ùò%óóó9>>ή®.º\.ú|>677Ë9†††ÇK—.Q’$úý~ÓçóEŒ­srrX[[ôÙºº:YÓHù%IbFFóòòxæÌ™vïÞͲ²2’ä¹sçXPP ¯EÒäWÌ6S}̉Ù>þ²®ÑhØÑÑ1eŒ@ÓGžÓh4ôJLL$IZ­VnÚ´‰ùùù,)) ª¡¥¥…………LHHàæÍ›ÙØØøS1£ÑãÂ… ùñãǠ϶··ËšN—ÿìÙ³Œ‰‰á÷ïßCj0›ÍÔëõôz½\·noܸ´N“HfûòåKÐx¦ú˜³M5ÎÊÊbCCƒ<ßÞÞÎÊÊJ’¡"dFFFPI’ØÕÕÅ‘‘ªÕjZ­Vúý~ŽŽŽÊ9FFFøöí[’|ÛkkkÃÁÁÁˆ1£Õ£Á``]]]Ðg‡´éòÛívêt:nß¾û÷ï©ÁívsÑ¢E¬««cll,äµHšLe¶‰‰ ’dSSSî3Õ'@$³)z6zàÀœ:u èììÄÑ£GÑÛÛöý{öìÁÉ“'ÑÛÛ ›Í†;vàêÕ«‡ÇãA|| pktools: /home/kempenep/pktools/qgis/pktools/pkextract_random.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract_random.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkextract_random.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterRaster
30 from processing.core.parameters import ParameterVector
31 from processing.core.outputs import OutputVector
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 FORMATS = [
39  'ESRI Shapefile',
40  'GeoJSON',
41  'GeoRSS',
42  'SQLite',
43  'GMT',
44  'MapInfo File',
45  'INTERLIS 1',
46  'INTERLIS 2',
47  'GML',
48  'Geoconcept',
49  'DXF',
50  'DGN',
51  'CSV',
52  'BNA',
53  'S57',
54  'KML',
55  'GPX',
56  'PGDump',
57  'GPSTrackMaker',
58  'ODS',
59  'XLSX',
60  'PDF',
61 ]
62 EXTS = [
63  '.shp',
64  '.geojson',
65  '.xml',
66  '.sqlite',
67  '.gmt',
68  '.tab',
69  '.ili',
70  '.ili',
71  '.gml',
72  '.txt',
73  '.dxf',
74  '.dgn',
75  '.csv',
76  '.bna',
77  '.000',
78  '.kml',
79  '.gpx',
80  '.pgdump',
81  '.gtm',
82  '.ods',
83  '.xlsx',
84  '.pdf',
85 ]
86 
87 class pkextract_random(pktoolsAlgorithm):
88 
89  INPUT = "INPUT"
90  OUTPUT = "OUTPUT"
91 
92  RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
93 
94  RULE = "RULE"
95  POLYGON = "POLYGON"
96  BUFFER = "BUFFER"
97  RANDOM = "RANDOM"
98  SRCNODATA = "SRCNODATA"
99  BNDNODATA = "BNDNODATA"
100  EXTRA = 'EXTRA'
101 
102  FORMAT = "FORMAT"
103 
104  def cliName(self):
105  return "pkextract"
106 
107  def defineCharacteristics(self):
108  self.name = "extract random points"
109  self.group = "[pktools] raster/vector"
110  self.addParameter(ParameterRaster(self.INPUT, 'Input raster data set'))
111  self.addParameter(ParameterSelection(self.RULE,"extraction rule",self.RULE_OPTIONS, 0))
112 
113  self.addOutput(OutputVector(self.OUTPUT, 'Output vector data set'))
114  self.addParameter(ParameterSelection(self.FORMAT,
115  'Destination Format', FORMATS))
116 
117  self.addParameter(ParameterBoolean(self.POLYGON, "Create OGRPolygon as geometry instead of OGRPoint",False))
118  self.addParameter(ParameterNumber(self.BUFFER, "Buffer for calculating statistics for point features",1,25,1))
119  self.addParameter(ParameterNumber(self.RANDOM, "Number of random points to generate",0,1000000,100))
120 
121  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
122  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
123  self.addParameter(ParameterString(self.EXTRA,
124  'Additional parameters', '', optional=True))
125 
126  def processAlgorithm(self, progress):
127  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
128  commands = [cliPath]
129 
130  input=self.getParameterValue(self.INPUT)
131  commands.append('-i')
132  commands.append('"' + input + '"')
133 
134  commands.append("-r")
135  commands.append(self.RULE_OPTIONS[self.getParameterValue(self.RULE)])
136 
137  output = self.getOutputFromName(self.OUTPUT)
138  outFile = output.value
139  formatIdx = self.getParameterValue(self.FORMAT)
140  outFormat = '"' + FORMATS[formatIdx] + '"'
141  commands.append('-f')
142  commands.append(outFormat)
143  ext = EXTS[formatIdx]
144  if not outFile.endswith(ext):
145  outFile += ext
146  output.value = outFile
147  commands.append('-o')
148  commands.append('"' + outFile + '"')
149 
150  if self.getParameterValue(self.POLYGON):
151  commands.append("-polygon")
152  buffer=self.getParameterValue(self.BUFFER)
153  if buffer > 1:
154  commands.append("-buf")
155  commands.append(str(buffer))
156 
157  if self.getParameterValue(self.RANDOM) > 0:
158  commands.append("-rand")
159  commands.append(str(self.getParameterValue(self.RANDOM)))
160 
161  srcnodata=self.getParameterValue(self.SRCNODATA)
162  if srcnodata != "none":
163  srcnodataValues = srcnodata.split(';')
164  for srcnodataValue in srcnodataValues:
165  commands.append('-srcnodata')
166  commands.append(srcnodataValue)
167  bndnodata=self.getParameterValue(self.BNDNODATA)
168  bndnodataValues = bndnodata.split(';')
169  for bndnodataValue in bndnodataValues:
170  commands.append('-bndnodata')
171  commands.append(bndnodataValue)
172 
173  extra = str(self.getParameterValue(self.EXTRA))
174  if len(extra) > 0:
175  commands.append(extra)
176 
177 
178  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classImgWriterGdal__coll__graph.png0000644000113200011300000003775112647437044020611 00000000000000‰PNG  IHDRy81e£bKGDÿÿÿ ½§“ IDATxœíÝi@×ú0ð3ÙØwVÙÊVA¸·êUo]Z‹Z-Ö­÷ ½V{mÅ¥Õboõ­U«mm-µ(ÅŠźUѺá†+eG†@È6ó~˜6ÿ ™žß§ÉdæœçÌLžÌ™Ì™`A èe4ªô kú¹ kú¹  ªÐìùóçyyy8ŽSH?5`À.—KuÀ¨h®‘H$8ŽQHôôéÓ¶¶6ª£ÆÆ@s ‰ÍfSBTWWGuÀÁõ€>@®èä€>@®èC?Ê5ÅÅņõìÝ—,üåõvùô6cË5¥¥¥ŽŽŽú¯×ÖÖvݺu/_NGñëª|¨bl¹Çñ††ý×ëèè¸mÛ¶—/§£øuU>TéÛ¹æÔ©Sƒ655õññIJJB 6 !äììŒR(;vì8p ••Õˆ#nݺE®¥ÚQë›$''s¹\6›½|ùòÖÖV„Pffæ!CÌÍÍ]\\”Ÿööõ*Ë‘Ëåqqql6{îܹMMM=ŽŸ,óâÅ‹‰‰‰Ê81 KNN°··ß¾};Bˆ ˆøøøÀÀ@kkë±cÇfffjìpÕ×ד€„Aª­­ÍÊÊê|‘Hdbb_]]}àÀƒ!‰ø|¾²Q»víâp8éééUUU§OŸvuu%ßjjjJHH —QN“+Ž;¶¨¨(;;Û××wýúõB¡Åb-\¸°¢¢âçŸFÕÕÕu^ïŽ;‚‚‚x<Þƒ†ºfÍšÇONO˜0áÒ¥K¹¹¹Êù¡éÓ§ ‚„„„PCCCBB‚››ÛÙ³gëëë/\¸àëë«¶goß¾=oÞ<6›]UUÕåÆÏÏÏÏÏÏïr1º¥çšÆÆF&“¹sçN@€ãxss³B¡Pý¬8011Q¹ü¡C‡:É­äŠ<|™’’âíí-‘H>|(‰ Å•+WB|>¿óz ”žžNRXX¨œîAüª!©ÎG‘G*•’!'''+K>rä¹°X,>|øð«¯¾:dÈ}ûö577w¾IIk@oèÃ}(;;»¬¬¬ììlww÷×^{íêÕ«4Ú Íyúôihh¨òåàÁƒ»,ÓÏÏœð÷÷¯®®f±XEEEáá቉‰ÚÔ[^^®,$ `êÔ©=Ž_Iû™ä9“É$_–””+ß Dýþûïžžž/^ܳgϽ{÷–.]jiiÙå —ôá\#‹q?~üxccã¢E‹&OžÜØØ¨º€——W^^žòeAAA—e’§¡¢¢"OOO±XD±ÙìÀÀÀ7n\¿~½óËFèAÎ5†?>--M(J¥R&“innN¾%‰BË–-‹ÍÈȨ©©9{öì§Ÿ~J¾ûüùóýû÷·ŸF}ôÑGÅÅÅwîÜùøãçÏŸ/‘H¤R)‹Å‹Åqqq¡æææNêEÍ™3ç“O>!»!ï¿ÿ~yyyã×ÞŠ+Ö®]{þüù†††K—.mÞ¼𬬬ôôôG 8pñâÅ÷îÝëV±èÕ8Í´¹^CDJJ —Ëe±XþþþAÈd²‘#GZZZ!—ËwìØáëëkaa1|øðììl²½í¯‰('Ž=êååÅáp>úè#‰DBÄ®]»ìíí °wïÞ¨¨(‡£±^e9mmmkÖ¬quuµ±±‰ŠŠ=Ž_cœA „ø|¾ê´B¡Ø½{7—˵±±‰ˆˆÈÈÈ`³Ùª ‚]»vq¹Ü²²².·*\¯½# ò?[êêê GMu }Cffæ€BBBÈ—iii[¶l¹ÿ¾Úb8Žã8Î`tñ ²;ºÕ‡ûP@‰ÇãÍž=;''§µµ5;;{Ó¦M‹/n¿Fë2ÑÐKàÈӇކ2éê¤ríÚµ­­­‘‘‘õõõ>>> .Œ‰‰ÑIÉè ô¡€:èCÞ}¨—‚aXqq1ÕQÐ@®èä€>@®ÑJ'£·ÏŸ?ïëëkgg÷Å_sÚ W±}íÚ5åº0ðôk´òõ×_§¥¥>}:++«¨¨HuäÁ™3gîß¿àÀ?þ¸¡¡¡¹¹yÚ´iaaa|>çÎ6l¨¯¯'—üꫯ:4dÈåºyyyÞÞÞk×®}üø±¾›€žQ|/a´¼oXo:½º|ù2A …!Äçó5 WD®ª²²2..ÎÝÝ}òäÉçÎS(zkTGà¾aÐà¼F+ŒÞ&‡\+CjNêhÄöæÍ›KKKçÌ™óùçŸ<}ú´—Z… ×h¥“ÑÛj÷éiNÒ8b›T[[[PPPQQfff¦ËÐ0 k´¢ýèmCÃ;ZÇñóçÏO:uذaA\¿~ý—_~¡äÙìô6£ • 6´´´¼ùæ›---'N$Ÿò«‘­­íW_}maa±aƨ¨¨ˆˆˆëׯk\ø×_ݹsçÊ•+SRRX,V¯…õ`Œ•d2Y'+ªÀРE%L4ôÈ5}€\ÐÈ5}€\ÐÈ5}€\ÐÈ5}0Ðû†ÉAF—/_¦:žËñÿýïÚœ9¯øùÙQKq8ªCÆÆ@sƒƒCß½oõÊ~q±àöíÆÈÈ‘TÇÒCðÏß@ç 4×Ðh46›Mu=”•uÃPVV‘µµ‰‰naô ®×èXK‹äôé<‚@mm²óçó©C¹FÇΟ/Ë! KK»Ku8 È5:––v! !$—ã—.ý)Š©Žƒ¹F—‚–+Wá8N¾$â·ßxÔ†€€\£K™™yª/ ?Ý(‚\£[©©wTŸ=†ãø­[%uu>€þrÎTW7ݽ[Žã/<çðS§îS†rΜ8qŸNWßž8N?~‡’x0(ktæøñ; ®6“ ¯¢¬ì%!`8 ×èFIIÝŸVk|P<“ÉÈÈ€nèï ×èÆÉ“¹äm5íÉdòÔTø5 ôw0ZG7,‡÷Q¾ÌÉ)÷öfÛÙ™“/9kŠâÀPèÿCõu®®«ããçM™Ju  èCôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @ ×ôr @TлX,Ö½î¨ªªJÏõÒh4‡C£ÖWŽãuuu8ŽSè6{{{SSS…¡“‚ Ó•+WŒ»í±Ùlª£xA}}}AAÕQ€žàp8:)ÊÈÏk‚ äp8T¢'—/_6ÀÜJ†4zôhªÝSPP ÃÃɰN¶Æ r @ ×ôr @ ×tOqq1†a†VT?Ô§·^wƒ×¸|ŸÛk4(--uttìíÒlmm×­[§«ZŒ’nw„á×kÜ ×h€ãxCCCo—æèè¸mÛ6]Õb”t»# ¿^ã¹:ujðàÁ¦¦¦>>>III¡aÆ!„œB …bÇŽ´²²1bÄ­[·ÈµTÏ`U§;/\òâÅ‹‰‰‰Êµ0 KNN°··ß¾};Bˆ ˆøøøÀÀ@kkë±cÇfffö­æÐᎈŒŒüðÃÉ™‰ÄÎÎîôéÓ!™LëääÄápbcce2™\.‹‹óðð`³ÙsçÎmjjR«!ÔÔÔ4þ|GGGww÷5kÖ´µµ©îÇk×®©5¤¾¾¾µµUuNGÁwTrû¦!„’““¹\.›Í^¾|¹ZùíÛÕy<Ô ŒZVVVmmm' ˆD"“øøøêêê0 ‘HÄçó•[f×®]'==½ªªêôéÓ®®®ä[MMM ä2Êé.K#§'L˜péÒ¥ÜÜ\å|„ÐôéÓABBB¨¡¡!!!ÁÍÍíìÙ³õõõ.\ðõõÕfguÙ^JÔÖÖfeeu¾ŒnwÄÑ£G=<E‰Åbò%Ç355UÝäYüyónݺEžIµ§1øNJ&ç©æå’yyyjK¶o—Æ0¤Ré±cÇFŽ9pàÀ'Ožt²õHºÍ5ýýzX,Æqüøñã‹-šÔ²E}”nwB(***55õäÉ“ááá~~~äLGGG>ŸOú ;;ÛÕÕµ¬¬Œ|777wëÖ­jå899ÑéôÒÒRòeII‰››9MîG6›xãÆëׯ“—{ÚÓ|'%Ëår„Pee¥j!drAyzzª¾Õ¾]è­­-((¨¨¨ 333Ó¸L/ÒUÒ2L]~Ï‹ÅbSSÓÔÔÔúúúüÑÔÔT,“;•<þæ›o8Ή'ª««Ïœ9ãããƒ:¾LÐeiω¿ÏeT§÷ìÙãîî~îܹgÏž]¼xqРA†½|{)¡ÍynwAä%a???ÕÎ˪U«¦OŸ^VV–——7tèÐ÷ß?..nðàÁuêT¤r^óÆoðùüÛ·oûùù}ñŪ1´o—jí …âܹs‘‘‘nnnŸ~úiee¥–;úPÝ Íg/%%…Ëå²X,ÿŒŒ ‚ d2ÙÈ‘#--- ‚Ëå;vìðõõµ°°>|8ùAtœ5:/Mû\£P(vïÞÍårmll"""222Øl¶NÚ«Zö¡t»#‚Xºt©¥¥¥êµ[¡P¸`Á;;;‡¥K—¶´´´µµ­Y³ÆÕÕÕÆÆ&**J ¨ÕKDccãœ9s\\\V¯^­L‚í› víÚÅårËÊÊTçw|û’ ‚زe‹­­-—ËÍÈÈPmãÑ£G½¼¼8ÎG}$‘HTchß.ÕÚSSS‡ –œœ,‘HºÜ ªt›kŒüù5—/_î£Ï”ÈÌÌ0`@HHù2--mË–-d?¿†ÙÞºººÂÂÂþóL Çqg0 å-2™Lc·½Kd_/((H'aô÷ë5‹ÇãÍž=;''§µµ5;;{Ó¦M‹/¦:( f8‰up}Pÿ h‹Uk×®mmmŒŒ¬¯¯÷ññY¸paLL ÕAÐsk ƒÁزeË–-[¨Ý€>@ ×ôr @ ×ôr @Œüw( à uX&Þ†5œgYÿCnâªxÉ¢V¾ÃÂd€ÂzˆÜÜ_Ž1tp_¥>æ† éòåËT¢3ÏΘÐÍ»ÑRªéu:¼/ÔÈsMHHˆÚsƒ^R}^Û½]m ŠA£Ý\‚t0z­É­îY®D”ˤ›b®#ÍŒ5w 1¡Ñ{ž/^>*ÝrppÐÕ½§† êª˜ÿû3硦AA†õÿ¢½ÁÒÒRWEùRHñ;ßUå©CÂØÜ¬¦¹z ¢jéñér Dc \&4¯±¶>oØ ø—5ap')ýœð©$-ê¡\Œ»¾j5é?ªÃéKŒü¼FWjrEYŸ¿à[Gs:º$Lc ‡fƒçÖ“"úAIÛµ­OÊ€K¡Õ=k4h©•ý¶œûûJ…ŒPökH4&Í{œ.;PJÿXîjÆfbtõù 1Ìèãwsé,ØYÔµ*έ.&^¼ÃÎkº _uuù-i³ÖÜ!Mß[¸ 0Òº7êe˜ÒF}âA´¿e‡À^ÿÒÇÒ™Õ•müñù“–þâé-!ƒóšî\£N!ÁRuð³‰5ƒhÑKUø—µÏ›vª¿sc²À,8V'm~ÙûAÏ<Êhx|A€·»š¦ÁyM÷@®Qçn5#=ÐÑß¼ýÏÌ4Í{Œ-Ö›ÛlÄÚ 3™éhtÌk¬ÝØ->|qê¬ÂZ^K/V 4ix$¾öÿžh¼ ‡óšn‚\£¥3kòÁC;cR½^‹+þÕž©-ãÕ•na4féÌü÷&vyd’¿=×,sqQ^bm¯ÖTárââúÇD)E!×o4}äÍhtÌyˆ%A †ö÷NtrfÕÛUûOut 6§1ÐøÝ\–!djÈøÖ÷ÿq½ó}Õ…J¥"èOéƒBŠÓM0'h µeF(ˆŽÒÐÆ(h¦â©3:š[í~éãǵy"D ·W­&ìÕÇmémy[“ÜÖÛTm~ùϯĕYº˜DDcÂÄú |*)Ëjz|©©>¿a˜ò–N„Ђ¡ ø¶Öl)ÍòÔ·6Ȇý×Í‚Ã|ëG¿°¥.†y¿a§ŸÚMíí BÈóß6SŽbC¢Ñë&ƒç:½ù5—À0ÿ·\ÿa©¼xÃÏÞÝc4幉5!ó,œX!Œ†…-qñÇÑÌŽúÍe寲r3¸‘ÜFïɵçt6ôCw¦9MÚ¢xzMøìÏV¦E»»¡@Ǩÿð ûj˜f´ÁsœTgÂX¤þ¬,«Éõï·, :÷M;î›z:É5ЇR×R+-<ö,t¡3tÅI.Æ+o6{íÝŸ |œÔUÝ™³™ƒÞv¤:î)¿ò\—zGÅM¡BFxþ»WƦôЇRç÷–½÷¶tV_ºø*n”_Ž+³v3·ÍÛz€ Õá›ÇYMN!föðay)p^£AŸë=™Ù3¦§ÐMhi³þ™þŒêpŒ .#ž\}î5Nj^Ü_cn›·½Ÿž¾€NÀWŸ±qjõvâ@¦ín|Õ±ðà¼Æ8á2B&ÆM¬áf3`( ×ôúP¹¾íéŸ'àz ä„RH‰¢Ì¢«'’à?Øv …A böìÙäÿ(*·¤lRÝÂTxyyÍ;·¾¾þe üî»ïÜÜÜpüÿv>}º.ƒÖ䄪¸)´õ6%GuÇtÿoP¦¶ î›vYË.Ä–¶=×÷såÄb1BÈÃÃ!äèè¸mÛ6=Ð]—>)»ó=¿å±Ùlggg77·1cÆüúë¯>>>»wïîhá.''§qãÆ;vL9'==ýßÿþ·‹‹‹.ƒÖ䄪¾'rªþÀ=™LëääÄápbcce2Y—ïbvðàÁ€€6›½mÛ¶¤¤$ooo›M›6u¾Vrrr@@€½½ýöíÛBÆ C9;;“k:ujðàÁ¦¦¦>>>III=n&Ž…Ç¸L>0°±Hœ:ýáÓëÏ{\T—-mOµQOÔµÜ8¡ÌÌÌ!C†˜››»¸¸(sVÏ6~Gž—·5òÅÞ¯«ß.܃†wÔŠ¦¦¦ùóç;::º»»¯Y³¦­­MãŠË–-;}útG W;T4n™¨¨¨ÔÔT…â¯s´ôôôY³fu²Ÿ¯Übíß%‚ܯB¡pÿþý¡™3g …Â}ûö!„ž={ÖÉZÓ§O ¡††ÕŠD"‘‰‰I|||uuõ †H$zÉ&KDò?¶”ÿ~ï-å2±¢%tÙÒöT¥œÖf“ªm¡PÈb±.\XQQñóÏ?#„êêê´ IcùÉý©æð¸<\¿|Ã5¶‚ ˆèèèqãÆ•””ðx¼àààÍ›7“Kòù|ÕuïܹckkK„Ɔ«nÀ޶Œ@ 011¹rå A>¤Ñh555]¨qiÜŒZ¢kˆgZ »×Xܪ6ßßß¿ººšœ¾páBhh¨êoÿ.A¡œœ‚ ¤R©Ú4yu´VVV–ê’ª5662™Ì;w Ç›››Šžd‡öe<ûidî¹ÕÅ=X·Ë–¶×e®ÑrãH$’‡ŠD"…BqåÊe=Ûø91÷Ï+Ÿ•é¤á[!•Jétz~~>¹@zzº¯¯/Ñi®ÑØpÕ ØÑ–!bêÔ©+V¬ bëÖ­cÇŽídù.sMûͨå! CWQCQ+E³ñTæfYY™jŸÖÆÆF›w­¬¬BL&Smºóµ\]]Õ–T²³³ËÊÊúúë¯ãââÂÂÂ6lØ0a„4³½S\Â-Ûšzxù³ó–ö€–‡Åb-Y²D$ 2Dû:ß¡ªZj¥u-C;k|·g WkEmm­B¡àr¹äK__ßŠŠ +òù|r±NNêd¨¨¨•+W~óÍ7éééK—.íry5„Ê]xí7£¶‡h'©½ŸÀ„°RÒ~¾»»»òkA <|øP5»·—xñKIã´–k©VÔÚÚúÇ!‘Hét:yN­.[Ú^—ç5ZnœÖÖV“ŒŒ ÇÉëÍÊóšl|òÖ%ŽÊ•KÔ;P=k¸Æ%Éóš‚‚r毿þÊårÛ—ƒãø¨Q£>ýôS‚ 46\íPѸe‚hii±´´, ¿ýö[åüö›QÛC´£L „Bá‚ ììì–.]ÚÒÒ¢vNí]B‹/=-×’Éd#GŽ´´´$g¦¤¤p¹\‹åï‘¡‡¶ã]]ê²¥íuy^£ý&ݵk—½½ý€öîÝÅáp´ Icùe6TÝkÖUÃ;Z²±±qΜ9...«W¯‹ÅÄ‹† ][[«,§}ÃÕ[†ôÛo¿!„öï߯XûåU÷È–-[lmm¹\nFFFç»I›CÆCu¸œÈ˜÷Èm˜UxŒkßz>!0dЇí`Èû Ûü#u',èJÏ5R‘‚eç5=Tr¶ñä¢GW?"êûÉ[:WËk7Ê¼ÇØQˆÑêï_é ·Æö˜ÿ;Ž,+úÍå4½ºÊÍo’Ög¿¼Ê²šl½Lí¸p^Ó[úì¡¡# AcB®é9Ÿ7ìf¤rÇÛ_ÝòäÄÜ?«sDTGÔ#*»Ôä5þ´»õ÷\CÈ rÍKaY҇ǺO?`îÈÌ\Rtí‹'TGÔm E­ÍUR¯±>Ѽ¼þ~ ЭÊ[Ír1î9º}hïýP]”Ù•Œà{§×ô÷ë5@·Ú?"¾O ›b';@¢éUp^Їþ~½èGKLT#¥: @%È5@òÕ›Zxë›J‰‚’†úP@ä¼àh}^b B(tsлl: ¾çúÈ5@äb¼ ¥>÷` ‰ žãôJ4nnê? ×}ÕHïþPUü[#7Â~Ìç^T‡ô¤¿çšÓ1|[/ÓPH¿ÓÈãrÂ1ÀøUHý½ÏlbCoëûãû"{?3ÊMéï‚«Ÿ?AýúÛVúû½|&Ö Q5üÛOñO7â2náÓ~^cM7‚ç!“ª»Íw÷VI›{ý§qY«¢2[è5Æ[êIÏ5,k:ÜñaPZëd…ÇëN)ÈK¬•·á½WQÅÍf\޼Æô±¡[}WïC™Z3à¼Æ øN´÷c[RŸw¨†w¸vð\§ (6ÃD÷_ŠeYMNƒ-Ìì™:/hç5t©HAôâ×'è6†-d¾ÓÌ_ƒNqÈù±:mæÃâ3º­—O®>‡”>½ð›7ŸÏomm¥0ýkæe‡‰ÀOhôþú<6sss??¿—,äÉ“'+V¬hkkÓIHªX„¹Ûk&¸Å‹TËÄÍ·E<2½"¢é8‹éDLLÌôéÓ©ŽBÇ^È5—/_¶¶¶611¡0  O‰D(Ž=ú%Ë9vìØ¬Y³f̘¡‹ ú»›7o>üرcT¢cê×kÜÝÝ9%¡ý«««+,,ÔUiÆ÷ñ ÄÌ™3©¡Wô÷ë5ý€\ÐÈ5}€\ЇÞÍ5ÅÅÅf´£MtØ:ãÞPJ†¿d Jfff#FŒÈÍÍÕUx(**š4i’³³sddd^^žÆÅ:ÙýdwB¹¦´´ÔÑÑñåË1Ìzu[KG¥ÙÚÚ®[·NWµ·7nTWWWWWóxý׿þåæævéÒ¥3gÎxxxŒ5J‡¿ßõ:£€ãxCCÃË—c˜õê¶–ŽJsttܶm›®j1nl6ÛÙÙ!äìì¼}ûv''§úúúnݨÑÝ}ºuëÖ‘#GîÛ·<12dˆP(üòË/:ÔÝàû³nŸ×œ:ujðàÁ¦¦¦>>>III¡aÆ!„ÈݯP(vìØ1pà@++«#Fܺu‹\KõR9ùᇒ3%‰ÝéÓ§B2™,66ÖÉɉÃáÄÆÆÊd2¹\çááÁf³çÎÛÔÔ¤V/B¨©©iþüùŽŽŽîîîkÖ¬ikk#+ºxñ¢‡‡Çµk×ÔR__ßþ&i¶®ËÒTÃKLLT®…aXrrr@@€½½ýöíÛBAÄÇÇZ[[;633Síl\c[ †a `³ÙÛ¶mKJJòöö¶±±Ù´iÒ¢É$&“Éb±llþ?™™™9dÈssseîî|/ MǛڑsñâÅU«V©°sçNòÐíèÐIG¨ÈÊʪ­­%:&‰LLLâãã«««8À`0D"ŸÏW–³k×.‡“žž^UUuúôiWWWò­¦¦¦„„råôÑ£G=<}º@ HHH@544$$$¸¹¹={¶¾¾þÂ… ¾¾¾j;îÂ… ä礴´´“Ý×^mmmVVV·VÑ(%%E-$B|>_9% ÷ïßš9s¦P(Ü·oBèÙ³g5!”››ÛÜÜÜÜÜ\YYùŸÿügÁ‚dB¡Åb-\¸°¢¢âçŸFÕÕÕu¹MÇ›ê®ihh Ñh555äÂÍ*ˆ ‘¨UÚ‰3f̘1£;›¿oè^®illd2™;wî8Ž777+ Õ8pàÀÄÄDåòäIfG¥µ´´XXXܾ}› ˆwß}wÆ ä|ÿêêjrúÂ… ¡¡¡ƒ JOO'ç’ÓªõJ¥R:žŸŸO¾LOO÷õõ%àñxäL±X|øðáW_}uÈ!ûöí#•Þk]—¥©†§:!D~þ¥R)ùá NNNV–|äÈ‘öõVVVÆÅŹ»»Ož<ùܹs …¢£ÀTQ›krrrˆ¿›©:ÝI“Õ¾)--- Ée$ÉÇE"‘B¡¸rå YN—{Ðt¼©îšÊÊJ„òhQûžÖxHhŒrM÷úPvvvYYYÙÙÙîîöÚÕ«Wi´Jxúôihh¨òåàÁƒ;)ÍÜÜüí·ßNMMmii9uêÔ‚ Èùeee...äo o¼ñÆãÇËËË•ã¦NªVTmm­B¡àr¹äK__ßŠŠ rÚßß!ôûï¿{zz^¼xqÏž=÷îÝ[ºt©¥¥e¯¶®ËÒTÃSC~=2™=î ¤¤$88Xùn`` ÆU6oÞ\ZZ:gΜÏ?ÿ< àéÓ§„g¬¬¬ÐßÍTF6Y™­ZZZbbb.\HÎg±XEEEáá቉‰äLmöBûãœOîgggSSS2S ¿“Ecã_#65#ÝË5b±ÇñãÇ766.Z´hòäÉÊNòòòRý9°   ó£¢¢RSSOž<®Ì&ŽŽŽÊãI dgg»ºº–••‘ïææænݺU­''':^ZZJ¾,))qss#§É×ÍfÞ¸qãúõëäåžÞn]—¥©†§Fíóàéé©Z×Ç;ª´¶¶¶   ¢¢",,ÌÌ̬“ð œ6M677Ÿ?~AAA!±XlýÜÚµk[[[###ëëë}||.\CuP½«6ÙèA®é Æ–-[¶lÙBu úÓ›lôúo  Okú¹ kú ~m¸©©I.‡ÿœ}’FÂÔÑórwï`îœÚü” $+ÌÍéTÒs¥¥¥>>>TG¡{/䓪ª*ªB1X-ù̪D3«p™ã ÃÖØþŽ×ÔTÿøéææF§Ó)ÿYšÉ䨨ŒÃ0V}}ß~ŠÕËÿ; zá/F²Vüç7yòVœFGÓ9aKœMíà^Ã"¶mÛvúðáë8NÌ›7â‹/Œíj€ö tŽiN šÁ¦10\ Óê~óÁÕ-OÄÐÓ4¿þš3|øçII7pœ|ÒØ?¨Žhç5ZÕHN. ð¿¶Ža Å ]è̲è×úºÜÜ'kÖûóOòùŠLJÃÍ›©Ž hç5Z±tfyü󠮿뱸‚PH^RÝ/óókRÈ×úÖÜÜ{lÒ¤¯=ªÆñ¿¾1 ú¬Y¯RÐ Îk´U}O”¹´¨ý| ÃÌá1.ƒ"0Z¿þ ý "5õîgŸ Ûäò.ÕcvëÖ&ww;ªb€\£5›V(|"ѰÅ0„d?Ðì>Öî&T×_Õ¬]{ìÎ2 C8þÂŽ Ñ°ÐPÏÌÌ¨Š túPZÃÐàÙ„iJÍBÖTÚÖ&€ ƽèêÕ¢ñ㿺ÿ)Aj‰!„aØŒpUØpA®é¿·X–®ctŒeA›rpç ýGÕ¸¹ÙÙÛ›#Ôá™ø”)¡½(¹¦è,,`:[y…˜Dc S[ú”Ÿ±ƒÌ© ¬Ÿðña_º´îŸÿô¦ÓÕ[ƒ>~|°äzù¦{‚f²U/×И˜©ã•÷8v>:¸ûtÉÖÖ<%eùâů©=ê\¡P@ÊÀA®és6Ók´-yjCcb6¦Áïqî|_Ut’‚4ïŸètZKK[hè:F§ÿ•q¬¬LÇÓð·YÀpÀ½öÝ4‹ýø¢€ÆÀì}Í&îõ5±f0LèWþWNàhP¤ÕÑ¿øøË¿ürëðá%L&mÑ¢ŸÚÚd¡)S†0™pS¥Aƒ\Óm.á–ƒÌLloîâ2Ìh¡ Yli³âêÖ'L šÏpsG/úý÷Â-[N®[7qÌ„йsÍžýciiý´iÐ2tpMO(¤8IC/Þ¸wgO/¹ö>#m(ŠËÈÕLžüÍë¯~÷Ýlåõšææ¶¬¬‡“'‡jü³:`8 ×èRöǟEìẄ[Q‹± Å“&}mmmšž¾ÒÄÎÇûØgº4ô7¹WûQ¼<…‰9ÔÒ"IM]‰¦‚óÐlÙrjÿþ?ÒÒV„‡{Q è!øŠ†îèÑ[{÷^úæ›÷ Ñôip 0h99å6¤.YòÚŒÿ¤:ðR  WuuÓĉ»ƒ‚ÜZÜ~\è[ ×èƒBJÐYpÁ¸{Äbidä‘HòÛoÿµ±±f}|Wô:ÞáÚÌ%E²VÕô1k×//vøðbH4ÆrM¯ãFØ‹²ß–CºÑÞ?d8‘?ËåP Ð È5½Î‚ܸ×OT+=ó~±¬ÕØþ^ª7üþ{áÖ­§Ö­›8z´?Õ±ë5zÒð¨53†ïjùÆ®ÝtèÑ£š)S¾yýõÀ￟Cu,@—à¼FO™OØã[}OtñãǸܠó{qq1Uc‹„Bñ¢E}}9»vEQè=kô‡óŠEÄnÅManb Õ±¨+--utt$§mmm×­[§ÿÈ­­ÒƒÁ@ã}(}«/lµó6%Fa8Š‹‹ýüü¨=>ÿüäWa ‚±2¬#¾?`š÷,Ñ`vðàÁ€€6›½mÛ¶¤¤$ooo›M›6u²VSSÓüùóÝÝÝ׬YÓÖÖFv‘222 ÄápV­Z%‘H† †rvvF/ö¡Ú¯NF’œœ`oo¿}ûvrÉS§N <ØÔÔÔÇÇ'))©»­ûå—ì~ÈÚ¹s$£E€>!% ÷ïßš9s¦P(Ü·oBèÙ³g­=nܸ’’¼yóf>Ÿ?~|QQQvv¶¯¯¯r&¹ŠêtûÕÉH¦OŸ.B "‘ÈÄÄ$>>¾ººúÀ C$iß´»w˼¼ÖÄÅýú›:È5}B(''‡ ©Tª6Íçó5®"•Jétz~~>ù2==Ý××—L%<œ™’’¢œIÎQNk\Œ$++KµöÆÆF&“¹sçN@€ãxss³B¡Ð²]UU‚M³gï“˵]ôEЇêK¬¬¬BL&Smº#µµµ …‚Ëå’/}}}+**Èi???rÂßß_9SûÕ]]]Uk·³³ËÊÊÊÎÎvwwíµ×®^½J£iuh‰ÅÒùóXX˜~÷ÝlñdÜ`ïROÜ(Ïù±šè…»üœœœètzii)ù²¤¤ÄÍÍœ&O^BEEEdâèÖêj©D,ã8~üøñÆÆÆE‹Mž<¹±±Q›×®=^^ÞúÈ5ÔkzÜ–—X{å³2¢Ýÿƾ$&“9kÖ¬U«V=~ü8??ãÆÑÑÑä[|ðAqqñ;w>þøãÙ³g“3E"‘–««Á0lüøñiiiB¡P*•2™Lsó®sÇÞ½—NœÈ‰Ÿ úª;q€ ¢&·9qTîÙŠå¼£eÊu™Ž¦Ûkllœ3gŽƒƒƒ‹‹ËêÕ«Åb1yF³ÿ~OOOGGÇ•+WŠÅb™L6räHKKKâÅkÃíWï¨ö””.—Ëb±üýý322ºlòùóùnn«¿ûîwm¶0p¡¨/l=³¢˜óŠÅ;½é¬^<ß4„[i=ª™<ùëñヿûn6…a}‚>”¡`šOüÁ·>¿åÂG¥r‰1Ñ$"øù9}õÕ»TÇôrqô7ón탖K£nžv`h¿¤µµuLLŒn"î>¹_º"ôGЇ28õ…­Ebcý»Þÿý/ãàÁkii{R Ð+È5@~ù%û£R¾ý6zútøKÜ~úP@OîÝ+ÿøã´˜˜Ñhú'8¯úP]Ý4a®Áƒ$&.¦ÑàQaýäÐëÈDHä§N}`eeJu8€ЇêÊ/?”ˆ©Ž¢‡bc•—78°M¹¦/ Pþ/u§óëò[¨¥Ûöî½”‘qß>øG„þrM_€¡7¿æ²Í[ί¼ÝLu4ÝpáBÁÿû™6LzíµATÇ(×kú \F\ÚøøÉÏÇ|îíýº-ÕátˆðÖ[¡»vÁýÁrMßB {?Vç$T‡-q q¡:šÎ<Þ:iÒ×¶¶æiiïÃýÁ!AŸ‚¡ð:»³·ÊÄŠüž^‘Ëñ˜˜Ã­­RH4@ Žƒ¾'t¡³¥3Ë)Ä’ê@:´uë©Û·KOœXéädMu,ÀP@®é“|'ÚSB‡ŽÉÞ·ïò·ßF<€êX€ß¡€.‘–-ƒ@\:@' ×Ý‹¥o¿ý­Tª€@#èC G—?-+¿òœšÚ ⃎>>dä;wî‹ÅÊ“)`Ü ×''§Ç“c„ò {{û$%%q¹\kkk„Pxxø×_mff¦ÚB*iK#›Ý»w»¹¹!„D"Qcc£êZ†………eff®^½Z¹ ™qBÎÎÎ%%%\.—|IŽ™”H$›7oÞ¼yóðáÃe2Ù™3g^r Ã}(c¹oß¾»wï …Âû÷ï'&&*/Ó†††Þ¸q#<<œ|éââââârûöíÐÐÐ.‹‹ÅäĨQ£jkkKKK×®]{âÄ µ%/^|þüù}ûö•––:t(33“ÌDS¦Lùᇮ_¿ÞØØxûömòb¶L&“Ëå C*•’WZ[[u´1€‚\c "##gΜ¹{÷î÷Þ{ïèѣ˖-³±±!ß"sŠ2× „þñ`ÜIÎÎί¼òвߴhÑ"ssó%K–¬^½šËåÆÄĨ-Ïår¿ýöÛ¢¢¢•+W~þùçÍÍÍß~û­§§'Û»ï¾ûÃ?DGG>|xÓ¦M!KKËåË—oÙ²eîܹÎÎÎãÆ[»v­î¶0Dð¬, ;vlÖ¬YÊ^ÆË»yó&‡ÃQöSþøã¤¤¤„„]•oh>ûì36›}ìØ1ªÝç5Æ ´´tëÖ­|>_"‘Gô€ùpЇÀ}Ã}€ë5}€\ÐÈ5}€\Їÿ[ïšÓóýIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy.html0000644000113200011300000002663112647637662024240 00000000000000 pktools: qgis.pkdiff_accuracy.pkdiff_accuracy Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkdiff_accuracy.pkdiff_accuracy Class Reference
Inheritance diagram for qgis.pkdiff_accuracy.pkdiff_accuracy:
Collaboration diagram for qgis.pkdiff_accuracy.pkdiff_accuracy:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string REFERENCE = "REFERENCE"
 
string ITERATE = "ITERATE"
 
string LABELREF = "LABELREF"
 
string NODATA = "NODATA"
 
string OUTPUT = "OUTPUT"
 
string CMOUTPUT = "CMOUTPUT"
 
list CMFORMAT_OPTIONS = ["ascii", "latex"]
 
string CMFORMAT = "CMFORMAT"
 
string FORMAT = "FORMAT"
 
string LABELCLASS = "LABELCLASS"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 93 of file pkdiff_accuracy.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_43.png0000644000113200011300000000250612647437044015511 00000000000000‰PNG  IHDR{%bC–øbKGDÿÿÿ ½§“ûIDATxœí›_HSoÆŸóÓMY†L×ü-*ÅÙ…¨ÝxÑõЋHЬA7éE” œóRA"„¤Â¼±‹œv1ÿ\EEÐÅ(2ØM°I” ± ŽGÖ6ÜÓÍo#Ýÿ\;ïçêœ÷}¾{Ÿsžó¾çÀ‘H50÷ßA;¶Ša«¶Š(ÝÛ°¶¶†Û·oãçÏŸáGPš››111‘Ô.í];N\½zW®\)š9Aáøþý;Ün7R}333€îîn &tápz½ËËËI’0==ææf;v £££˜™™Á©S§PYY‰{÷îe{uu’$Áår¡©© F£wïÞE8,--¡­­ :uuuÝU÷êÕ+˜L&¼{÷.­6_¯Ñh6› 5550°ÙlˆF£èèèÔÖÖfÕ¦ò·o¸‡ÙÙY¦hN‹¢(,++ã£Gè÷ûùôéS–––RQ>þœ&“‰±XŒ$ér¹X__Ïh4ÊÿßÜÑjµR–eNMM{zz(Ë2?~LÜÜÜÌ8¾Ïç#Z,z½^ºÝn644pdd„²,S«Õ²··—ëëë|öìpcc#Q×ÕÕÅׯ_Óï÷§ÕæëullŒ—/_æÚÚ=ÛÛÛ944”ów²iãþEÉ) ù9÷v  F£áøø8ƒÁ c±·¶¶¸³³Ãíím9r„ïß¿'I^»vv»=Q €+++$ÉH$’rßçóe?~R<Ï®chhh`8æçÏŸ©( wvvøöíÛÄoî­Ë¤Í׫Ùl¦ßïOøyùò%[[[S†MûûqåB¦°Ó¾.ͽ^7oÞàÁƒp8hoo‡ÝnGWWt:.^¼ˆùùyœ={‹‹‹øôéÓ®ú£G4MÊý\illLl›Íf¬¯¯C«ÕÂëõâÖ­[PmmmIuf³rÒæêõëׯ¨««ÛÕVYY™Òw6mÜ_!Ø÷œ …‹Å077‡@ €›7oâÂ… «ÕŠùùy,,,àܹs»B)$>Ÿ/±íõzQ__P(„žžØl6¬¬¬`rr2©.T.Ú\1 ðù| ’ƒp»Ý¤Í÷OŸ‰}‡-I, ^¼xY–‰D Ñh Óé‹Á`‡½½½û6œŽ¬®®âÇÆõëׇ‰D Õj …àp8[[[Iõùh³qéÒ%Øív|ûö xøða¢_Q”œµ%{~ÆyâÌ™3Ôjµ4›Ít¹\»úûúúXQQ‘´ÈÀž99Û~*âsÛÔÔOžâãÇiû’Â>~ü8JJJÄãÌ!Æd2¥lOú"DðÏ"¾ÏV"l!ÂV"lñ د«`Ï1~IEND®B`‚pktools-2.6.6/doc/html/classSolver-members.html0000644000113200011300000002706012647637662016502 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Solver Member List

This is the complete list of members for Solver, including all inherited members.

active_set (defined in Solver)Solverprotected
active_size (defined in Solver)Solverprotected
alpha (defined in Solver)Solverprotected
alpha_status (defined in Solver)Solverprotected
calculate_rho() (defined in Solver)Solverprotectedvirtual
Cn (defined in Solver)Solverprotected
Cp (defined in Solver)Solverprotected
do_shrinking() (defined in Solver)Solverprotectedvirtual
eps (defined in Solver)Solverprotected
FREE enum value (defined in Solver)Solverprotected
G (defined in Solver)Solverprotected
G_bar (defined in Solver)Solverprotected
get_C(int i) (defined in Solver)Solverinlineprotected
is_free(int i) (defined in Solver)Solverinlineprotected
is_lower_bound(int i) (defined in Solver)Solverinlineprotected
is_upper_bound(int i) (defined in Solver)Solverinlineprotected
l (defined in Solver)Solverprotected
LOWER_BOUND enum value (defined in Solver)Solverprotected
p (defined in Solver)Solverprotected
Q (defined in Solver)Solverprotected
QD (defined in Solver)Solverprotected
reconstruct_gradient() (defined in Solver)Solverprotected
select_working_set(int &i, int &j) (defined in Solver)Solverprotectedvirtual
Solve(int l, const QMatrix &Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking, bool verbose=false) (defined in Solver)Solver
Solver() (defined in Solver)Solverinline
swap_index(int i, int j) (defined in Solver)Solverprotected
unshrink (defined in Solver)Solverprotected
update_alpha_status(int i) (defined in Solver)Solverinlineprotected
UPPER_BOUND enum value (defined in Solver)Solverprotected
y (defined in Solver)Solverprotected
~Solver() (defined in Solver)Solverinlinevirtual
pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy__inherit__graph.map0000644000113200011300000000014312616110567027222 00000000000000 pktools-2.6.6/doc/html/classSolver.html0000644000113200011300000003671012647637662015054 00000000000000 pktools: Solver Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for Solver:
Collaboration diagram for Solver:

Classes

struct  SolutionInfo
 

Public Member Functions

void Solve (int l, const QMatrix &Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking, bool verbose=false)
 

Protected Types

enum  { LOWER_BOUND, UPPER_BOUND, FREE }
 

Protected Member Functions

double get_C (int i)
 
void update_alpha_status (int i)
 
bool is_upper_bound (int i)
 
bool is_lower_bound (int i)
 
bool is_free (int i)
 
void swap_index (int i, int j)
 
void reconstruct_gradient ()
 
virtual int select_working_set (int &i, int &j)
 
virtual double calculate_rho ()
 
virtual void do_shrinking ()
 

Protected Attributes

int active_size
 
schar * y
 
double * G
 
char * alpha_status
 
double * alpha
 
const QMatrixQ
 
const double * QD
 
double eps
 
double Cp
 
double Cn
 
double * p
 
int * active_set
 
double * G_bar
 
int l
 
bool unshrink
 

Detailed Description

Definition at line 395 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/md_examples_pkascii2img.html0000644000113200011300000001623212647637662017331 00000000000000 pktools: examples_pkascii2img
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkascii2img

Examples of pkascii2img

We create a 5x5 raster dataset containing all 0 values except for its center (value=1)

cat input.txt
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0

We define a pixel size of 25 by 25 m and and a projected in the European projection system ETS89/LAEA. The location of the upper left pixel is also set:

pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000

We check the output GeoTIFF using gdalinfo :

gdalinfo output.tif
Driver: GTiff/GeoTIFF
Files: output.tif
Size is 5, 5
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010042,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",52],
PARAMETER["longitude_of_center",10],
PARAMETER["false_easting",4321000],
PARAMETER["false_northing",3210000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","3035"]]
Origin = (1000000.000000000000000,1000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2014:11:08 11:33:52
TIFFTAG_DOCUMENTNAME=output.tif
TIFFTAG_SOFTWARE=pktools 2.5.4 by Pieter Kempeneers
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 1000000.000, 1000000.000) ( 23d13' 9.44"W, 25d30'21.01"N)
Lower Left ( 1000000.000, 999875.000) ( 23d13' 8.02"W, 25d30'17.24"N)
Upper Right ( 1000125.000, 1000000.000) ( 23d13' 5.27"W, 25d30'22.72"N)
Lower Right ( 1000125.000, 999875.000) ( 23d13' 3.85"W, 25d30'18.95"N)
Center ( 1000062.500, 999937.500) ( 23d13' 6.65"W, 25d30'19.98"N)
Band 1 Block=5x5 Type=Byte, ColorInterp=Gray
pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite.html0000644000113200011300000003340512647637662022377 00000000000000 pktools: qgis.pkcomposite.pkcomposite Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkcomposite.pkcomposite Class Reference
Inheritance diagram for qgis.pkcomposite.pkcomposite:
Collaboration diagram for qgis.pkcomposite.pkcomposite:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list CRULE_OPTIONS = ["overwrite", "maxndvi", "maxband", "minband", "validband", "mean", "mode", "median", "sum", "minallbands", "maxallbands","stdev"]
 
string CRULE = "CRULE"
 
string DX = "DX"
 
string DY = "DY"
 
string PROJWIN = 'PROJWIN'
 
string CB = "CB"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string DSTNODATA = "DSTNODATA"
 
string MINGUI = "MINGUI"
 
string MAXGUI = "MAXGUI"
 
list RESAMPLE_OPTIONS = ['near', 'bilinear']
 
string RESAMPLE = "RESAMPLE"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkcomposite.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/dir_b7cc22b4453454f1e686d9a2e78d988d.html0000644000113200011300000002275412647637663017744 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
pktools Directory Reference
Directory dependency graph for pktools:
/home/kempenep/pktools/qgis/pktools

Files

file  __init__.py [code]
 
file  pkcomposite.py [code]
 
file  pkcrop.py [code]
 
file  pkdiff_accuracy.py [code]
 
file  pkextract.py [code]
 
file  pkextract_grid.py [code]
 
file  pkextract_random.py [code]
 
file  pkfilter_spatial.py [code]
 
file  pkfilter_spectral.py [code]
 
file  pkfilterdem.py [code]
 
file  pkgetmask.py [code]
 
file  pklas2img.py [code]
 
file  pkreclass.py [code]
 
file  pksetmask.py [code]
 
file  pksvm.py [code]
 
file  pktoolsAlgorithm.py [code]
 
file  pktoolsAlgorithmProvider.py [code]
 
file  pktoolsUtils.py [code]
 
file  ProcessingPktoolsPlugin.py [code]
 
pktools-2.6.6/doc/html/classSolver__NU__inherit__graph.md50000644000113200011300000000004012616110566020503 00000000000000701fd7ff490aa194f36920de56b96d23pktools-2.6.6/doc/html/pkfilterdem_8cc_source.html0000644000113200011300000020041512647637662017172 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfilterdem.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilterdem.cc
1 /**********************************************************************
2 pkfilterdem.cc: Filter digital elevation model raster datasets
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <iostream>
22 #include <string>
23 #include "base/Optionpk.h"
24 #include "base/Vector2d.h"
25 #include "algorithms/Filter2d.h"
26 #include "imageclasses/ImgReaderGdal.h"
27 #include "imageclasses/ImgWriterGdal.h"
28 
29 /******************************************************************************/
72 using namespace std;
73 /*------------------
74  Main procedure
75  ----------------*/
76 int main(int argc,char **argv) {
77  Optionpk<std::string> input_opt("i","input","input image file");
78  Optionpk<std::string> output_opt("o", "output", "Output image file");
79  // Optionpk<std::string> tmpdir_opt("tmp", "tmp", "Temporary directory","/tmp",2);
80  Optionpk<bool> disc_opt("circ", "circular", "circular disc kernel for dilation and erosion", false);
81  Optionpk<string> postFilter_opt("f", "filter", "post processing filter: vito, etew_min, promorph (progressive morphological filter),open,close).");
82  Optionpk<double> dim_opt("dim", "dim", "maximum filter kernel size", 17);
83  Optionpk<double> maxSlope_opt("st", "st", "slope threshold used for morphological filtering. Use a low values to remove more height objects in flat terrains", 0.0);
84  Optionpk<double> hThreshold_opt("ht", "ht", "initial height threshold for progressive morphological filtering. Use low values to remove more height objects. Optionally, a maximum height threshold can be set via a second argument (e.g., -ht 0.2 -ht 2.5 sets an initial threshold at 0.2 m and caps the threshold at 2.5 m).", 0.2);
85  Optionpk<short> minChange_opt("minchange", "minchange", "Stop iterations when no more pixels are changed than this threshold.", 0);
86  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","");
87  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
88  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table");
89  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
90  Optionpk<short> nodata_opt("nodata", "nodata", "nodata value");
91  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
92 
93  disc_opt.setHide(1);
94  maxSlope_opt.setHide(1);
95  hThreshold_opt.setHide(1);
96  minChange_opt.setHide(1);
97  otype_opt.setHide(1);
98  oformat_opt.setHide(1);
99  colorTable_opt.setHide(1);
100  nodata_opt.setHide(1);
101 
102  bool doProcess;//stop process when program was invoked with help option (-h --help)
103  try{
104  doProcess=input_opt.retrieveOption(argc,argv);
105  output_opt.retrieveOption(argc,argv);
106  // tmpdir_opt.retrieveOption(argc,argv);
107  postFilter_opt.retrieveOption(argc,argv);
108  dim_opt.retrieveOption(argc,argv);
109  disc_opt.retrieveOption(argc,argv);
110  maxSlope_opt.retrieveOption(argc,argv);
111  hThreshold_opt.retrieveOption(argc,argv);
112  minChange_opt.retrieveOption(argc,argv);
113  otype_opt.retrieveOption(argc,argv);
114  oformat_opt.retrieveOption(argc,argv);
115  colorTable_opt.retrieveOption(argc,argv);
116  nodata_opt.retrieveOption(argc,argv);
117  verbose_opt.retrieveOption(argc,argv);
118  }
119  catch(string predefinedString){
120  std::cout << predefinedString << std::endl;
121  exit(0);
122  }
123  if(!doProcess){
124  cout << endl;
125  cout << "Usage: pkfilterdem -i input.txt -o output" << endl;
126  cout << endl;
127  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
128  exit(0);//help was invoked, stop processing
129  }
130 
131  ImgReaderGdal input;
132  ImgWriterGdal outputWriter;
133  if(input_opt.empty()){
134  cerr << "Error: no input file selected, use option -i" << endl;
135  exit(1);
136  }
137  if(output_opt.empty()){
138  cerr << "Error: no outputWriter file selected, use option -o" << endl;
139  exit(1);
140  }
141  if(postFilter_opt.empty()){
142  cerr << "Error: no filter selected, use option -f" << endl;
143  exit(1);
144  }
145  input.open(input_opt[0]);
146  GDALDataType theType=GDT_Unknown;
147  if(verbose_opt[0])
148  cout << "possible output data types: ";
149  for(int iType = 0; iType < GDT_TypeCount; ++iType){
150  if(verbose_opt[0])
151  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
152  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
153  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
154  otype_opt[0].c_str()))
155  theType=(GDALDataType) iType;
156  }
157  if(theType==GDT_Unknown)
158  theType=input.getDataType();
159 
160  if(verbose_opt[0])
161  std::cout << std::endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
162 
163  string imageType;//=input.getImageType();
164  if(oformat_opt.size())
165  imageType=oformat_opt[0];
166 
167  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
168  string theInterleave="INTERLEAVE=";
169  theInterleave+=input.getInterleave();
170  option_opt.push_back(theInterleave);
171  }
172 
173  if(verbose_opt[0])
174  cout << "opening output file " << output_opt[0] << endl;
175  outputWriter.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),1,theType,imageType,option_opt);
176  //set projection
177  outputWriter.setProjection(input.getProjection());
178  outputWriter.copyGeoTransform(input);
179  if(colorTable_opt.size())
180  outputWriter.setColorTable(colorTable_opt[0]);
181 
182  //set nodata value
183  if(nodata_opt.size()){
184  for(int iband=0;iband<outputWriter.nrOfBand();++iband)
185  outputWriter.GDALSetNoDataValue(nodata_opt[0],iband);
186  }
187 
188  Vector2d<double> inputData(input.nrOfRow(),input.nrOfCol());
189  Vector2d<double> outputData(outputWriter.nrOfRow(),outputWriter.nrOfCol());
190  Vector2d<double> tmpData(outputWriter.nrOfRow(),outputWriter.nrOfCol());
191  input.readDataBlock(inputData,GDT_Float64,0,inputData.nCols()-1,0,inputData.nRows()-1);
192 
193  //apply post filter
194  std::cout << "Applying post processing filter: " << postFilter_opt[0] << std::endl;
195 
196  // const char* pszMessage;
197  // void* pProgressArg=NULL;
198  // GDALProgressFunc pfnProgress=GDALTermProgress;
199  // double progress=0;
200  // pfnProgress(progress,pszMessage,pProgressArg);
201 
202  //make sure dim_opt contains initial [0] and maximum [1] kernel sizes in this order
203  if(dim_opt.size()<2)
204  dim_opt.insert(dim_opt.begin(),3);
205  if(dim_opt[0]>dim_opt[1]){
206  dim_opt.insert(dim_opt.begin(),dim_opt[1]);
207  dim_opt.erase(dim_opt.begin()+2);
208  }
209 
210  filter2d::Filter2d theFilter;
211  if(nodata_opt.size()){
212  for(int inodata=0;inodata<nodata_opt.size();++inodata)
213  theFilter.pushNoDataValue(nodata_opt[inodata]);
214  }
215 
216  unsigned long int nchange=1;
217  if(postFilter_opt[0]=="vito"){
218  //todo: fill empty pixels
219  // hThreshold_opt.resize(4);
220  // hThreshold_opt[0]=0.7;
221  // hThreshold_opt[1]=0.3;
222  // hThreshold_opt[2]=0.1;
223  // hThreshold_opt[2]=-0.2;
224  vector<int> nlimit(4);
225  nlimit[0]=2;
226  nlimit[1]=3;
227  nlimit[2]=4;
228  nlimit[2]=2;
229  //init finalMask
230  for(int irow=0;irow<tmpData.nRows();++irow)
231  for(int icol=0;icol<tmpData.nCols();++icol)
232  tmpData[irow][icol]=1;
233  for(int iheight=0;iheight<hThreshold_opt.size();++iheight){
234  if(verbose_opt[0])
235  cout << "height: " << hThreshold_opt[iheight] << endl;
236  //todo:replace with binary mask (or short) -> adapt template with T1,T2 in Filter2d
237  Vector2d<double> tmpMask(input.nrOfRow(),input.nrOfCol());
238  for(int irow=0;irow<tmpMask.nRows();++irow)
239  for(int icol=0;icol<tmpMask.nCols();++icol)
240  tmpMask[irow][icol]=1;//1=surface, 0=terrain
241  if(verbose_opt[0])
242  cout << "filtering NWSE" << endl;
243  //from here
244  // Vector2d<double> tmpDSM(inputData);
245  // int dimX=dim_opt[0];
246  // int dimY=dim_opt[0];
247  // assert(dimX);
248  // assert(dimY);
249  // statfactory::StatFactory stat;
250  // Vector2d<double> inBuffer(dimY,inputData.nCols());
251  // if(tmpData.size()!=inputData.nRows())
252  // tmpData.resize(inputData.nRows());
253  // int indexI=0;
254  // int indexJ=inputData.nRows()-1;
255  // // int indexJ=0;
256  // //initialize last half of inBuffer
257  // for(int j=-(dimY-1)/2;j<=dimY/2;++j){
258  // for(int i=0;i<inputData.nCols();++i)
259  // inBuffer[indexJ][i]=tmpDSM[abs(j)][i];
260  // --indexJ;
261  // // ++indexJ;
262  // }
263  // for(int y=tmpDSM.nRows()-1;y>=0;--y){
264  // if(y){//inBuffer already initialized for y=0
265  // //erase first line from inBuffer
266  // inBuffer.erase(inBuffer.end()-1);
267  // // inBuffer.erase(inBuffer.begin());
268  // //read extra line and push back to inBuffer if not out of bounds
269  // if(y+dimY/2<tmpDSM.nRows()){
270  // //allocate buffer
271  // // inBuffer.push_back(inBuffer.back());
272  // inBuffer.insert(inBuffer.begin(),*(inBuffer.begin()));
273  // for(int i=0;i<tmpDSM.nCols();++i)
274  // inBuffer[0][i]=tmpDSM[y-dimY/2][i];
275  // // inBuffer[inBuffer.size()-1][i]=tmpDSM[y+dimY/2][i];
276  // }
277  // else{
278  // int over=y+dimY/2-tmpDSM.nRows();
279  // int index=(inBuffer.size()-1)-over;
280  // assert(index>=0);
281  // assert(index<inBuffer.size());
282  // inBuffer.push_back(inBuffer[index]);
283  // }
284  // }
285  // for(int x=tmpDSM.nCols()-1;x>=0;--x){
286  // double centerValue=inBuffer[(dimY-1)/2][x];
287  // //test
288  // cout << "pixel (" << x << "," << y << "): " << centerValue << endl;
289  // short nmasked=0;
290  // std::vector<double> neighbors;
291  // for(int j=-(dimY-1)/2;j<=dimY/2;++j){
292  // for(int i=-(dimX-1)/2;i<=dimX/2;++i){
293  // indexI=x+i;
294  // //check if out of bounds
295  // if(indexI<0)
296  // indexI=-indexI;
297  // else if(indexI>=tmpDSM.nCols())
298  // indexI=tmpDSM.nCols()-i;
299  // if(y+j<0)
300  // indexJ=-j;
301  // else if(y+j>=tmpDSM.nRows())
302  // indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
303  // else
304  // indexJ=(dimY-1)/2+j;
305  // double difference=(centerValue-inBuffer[indexJ][indexI]);
306  // //test
307  // cout << "centerValue-inBuffer[" << indexJ << "][" << indexI << "]=" << centerValue << " - " << inBuffer[indexJ][indexI] << " = " << difference << endl;
308  // if(i||j)//skip centerValue
309  // neighbors.push_back(inBuffer[indexJ][indexI]);
310  // if(difference>hThreshold_opt[iheight])
311  // ++nmasked;
312  // }
313  // }
314  // //test
315  // cout << "pixel " << x << ", " << y << ": nmasked is " << nmasked << endl;
316  // if(nmasked<=nlimit[iheight]){
317  // ++nchange;
318  // //reset pixel in outputMask
319  // tmpData[y][x]=0;
320  // //test
321  // cout << "pixel " << x << ", " << y << " is ground" << endl;
322  // }
323  // else{
324  // //reset pixel height in tmpDSM
325  // sort(neighbors.begin(),neighbors.end());
326  // assert(neighbors.size()>1);
327  // inBuffer[(dimY-1)/2][x]=neighbors[1];
328  // //test
329  // cout << "pixel " << x << ", " << y << " is surface, reset DSM to " << neighbors[1] << endl;
330  // /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */
331  // }
332  // }
333  // }
334  //to here
335 
336  theFilter.dsm2dtm_nwse(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]);
337  if(verbose_opt[0])
338  cout << "filtering NESW" << endl;
339  theFilter.dsm2dtm_nesw(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]);
340  if(verbose_opt[0])
341  cout << "filtering SENW" << endl;
342  theFilter.dsm2dtm_senw(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]);
343  if(verbose_opt[0])
344  cout << "filtering SWNE" << endl;
345  theFilter.dsm2dtm_swne(inputData,tmpData,hThreshold_opt[iheight],nlimit[iheight],dim_opt[0]);
346  }
347  outputData=tmpData;
348  //todo: interpolate
349  //outputData.setMask(tmpData,1,0);
350  }
351  else if(postFilter_opt[0]=="etew_min"){
352  //Elevation Threshold with Expand Window (ETEW) Filter (p.73 from Airborne LIDAR Data Processing and Analysis Tools ALDPAT 1.0)
353  //first iteration is performed assuming only minima are selected using options -fir all -comp min
354  //increase cells and thresholds until no points from the previous iteration are discarded.
355  int dim=dim_opt[0];
356  // theFilter.setNoValue(0);
357  int iteration=1;
358  while(nchange>minChange_opt[0]&&dim<=dim_opt[1]){
359  double hThreshold=maxSlope_opt[0]*dim;
360  nchange=theFilter.morphology(inputData,outputData,"erode",dim,dim,disc_opt[0],hThreshold);
361  inputData=outputData;
362  dim+=2;//change from theory: originally double cellCize
363  std::cout << "iteration " << iteration << ": " << nchange << " pixels changed" << std::endl;
364  ++iteration;
365  }
366  }
367  else if(postFilter_opt[0]=="promorph"){
368  //Progressive morphological filter tgrs2003_zhang vol41 pp 872-882
369  //first iteration is performed assuming only minima are selected using options -fir all -comp min
370  //increase cells and thresholds until no points from the previous iteration are discarded.
371  int dim=dim_opt[0];
372  double hThreshold=hThreshold_opt[0];
373  int iteration=1;
374  while(nchange>minChange_opt[0]&&dim<=dim_opt[1]){
375  std::cout << "iteration " << iteration << " with window size " << dim << " and dh_max: " << hThreshold << std::endl;
376  try{
377  nchange=theFilter.morphology(inputData,outputData,"erode",dim,dim,disc_opt[0],hThreshold);
378  theFilter.morphology(outputData,inputData,"dilate",dim,dim,disc_opt[0],hThreshold);
379  theFilter.doit(inputData,outputData,"median",dim,dim,1,disc_opt[0]);
380  inputData=outputData;
381  }
382  catch(std::string errorString){
383  cout << errorString << endl;
384  exit(1);
385  }
386  int newdim=(dim==1)? 3: 2*(dim-1)+1;
387  hThreshold=hThreshold_opt[0]+maxSlope_opt[0]*(newdim-dim)*input.getDeltaX();
388  dim=newdim;
389  if(hThreshold_opt.size()>1){
390  if(hThreshold>hThreshold_opt[1]){
391  hThreshold=hThreshold_opt[1];
392  }
393  }
394  std::cout << "iteration " << iteration << ": " << nchange << " pixels changed" << std::endl;
395  ++iteration;
396  }
397  }
398  else if(postFilter_opt[0]=="open"){
399  try{
400  theFilter.morphology(inputData,tmpData,"erode",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]);
401  theFilter.morphology(tmpData,outputData,"dilate",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]);
402  outputData=inputData;
403  }
404  catch(std::string errorString){
405  cout << errorString << endl;
406  exit(1);
407  }
408  }
409  else if(postFilter_opt[0]=="close"){
410  try{
411  theFilter.morphology(inputData,tmpData,"dilate",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]);
412  theFilter.morphology(tmpData,outputData,"erode",dim_opt[0],dim_opt[0],disc_opt[0],hThreshold_opt[0]);
413  }
414  catch(std::string errorString){
415  cout << errorString << endl;
416  exit(1);
417  }
418  }
419  //write outputData to outputWriter
420  outputWriter.writeDataBlock(outputData,GDT_Float64,0,outputData.nCols()-1,0,outputData.nRows()-1);
421 
422  // progress=1;
423  // pfnProgress(progress,pszMessage,pProgressArg);
424  input.close();
425  outputWriter.close();
426  return 0;
427 }
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__random_1_1pkextract__random-members.html0000644000113200011300000002424212647637662030420 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkextract_random.pkextract_random Member List

This is the complete list of members for qgis.pktools.pkextract_random.pkextract_random, including all inherited members.

BNDNODATA (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
BUFFER (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
cliName (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_random
defineCharacteristics (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_random
EXTRA (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
FORMAT (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
group (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_random
INPUT (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
name (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_random
OUTPUT (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
POLYGON (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
processAlgorithm (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_random
RANDOM (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
RULE (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
RULE_OPTIONS (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
SRCNODATA (defined in qgis.pktools.pkextract_random.pkextract_random)qgis.pktools.pkextract_random.pkextract_randomstatic
pktools-2.6.6/doc/html/ConfusionMatrix_8cc_source.html0000644000113200011300000012767312647637661020031 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/ConfusionMatrix.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ConfusionMatrix.cc
1 /**********************************************************************
2 ConfusionMatrix.cc: class for (classification accuracy) confusion matrix
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "ConfusionMatrix.h"
21 #include <iostream>
22 #include <numeric>
23 
24 using namespace confusionmatrix;
25 
26 bool compareClass(const std::string& string1, const std::string& string2){
27  int int1=string2type<int>(string1);
28  int int2=string2type<int>(string2);
29  return(int1<int2);
30 };
31 
32 ConfusionMatrix::ConfusionMatrix()
33  : m_classes(),m_results(),m_se95(true),m_format(ASCII)
34 {
35 }
36 
37 ConfusionMatrix::~ConfusionMatrix()
38 {
39 }
40 
41 //constructor where class names are 0,1,...,nclass-1
42 ConfusionMatrix::ConfusionMatrix(short nclass){
43  resize(nclass);
44 }
45 
46 ConfusionMatrix::ConfusionMatrix(const std::vector<std::string>& classNames){
47  setClassNames(classNames);
48 }
49 
50 //copy constructor
51 ConfusionMatrix::ConfusionMatrix(const ConfusionMatrix& cm){
52  setClassNames(cm.m_classes);
53  setResults(cm.m_results);
54 }
55 
56 //assignment operator
57 ConfusionMatrix& ConfusionMatrix::operator=(const ConfusionMatrix& cm){
58  //check for self-assignment by comparing the address of the implicit object and parameter
59  if(this==&cm)
60  return *this;
61  else{
62  setClassNames(cm.m_classes);
63  setResults(cm.m_results);
64  }
65  return *this;
66 }
67 
68 ConfusionMatrix& ConfusionMatrix::operator+=(const ConfusionMatrix &cm)
69 {
70  if(cm.m_classes.size()!=this->m_classes.size()){
71  std::cerr << "error0: "<< cm.m_classes.size() << "!=" << this->m_classes.size() << std::endl;
72  exit(0);
73  }
74  if(cm.m_results.size()!=this->m_results.size()){
75  std::cerr << "error1: "<< cm.m_results.size() << "!=" << this->m_results.size() << std::endl;
76  exit(1);
77  }
78  for(int irow=0;irow<m_results.size();++irow){
79  if(cm.m_results[irow].size()!=this->m_results[irow].size()){
80  std::cerr << "error2: " << cm.m_results[irow].size() << "!=" << this->m_results[irow].size() << std::endl;
81  exit(2);
82  }
83  for(int icol=0;icol<m_results[irow].size();++icol)
84  this->m_results[irow][icol]+=cm.m_results[irow][icol];
85  }
86  return *this;
87 }
88 
89 ConfusionMatrix& ConfusionMatrix::operator*=(double weight)
90 {
91  for(int irow=0;irow<m_results.size();++irow){
92  for(int icol=0;icol<m_results[irow].size();++icol)
93  m_results[irow][icol]*=weight;
94  }
95  return *this;
96 }
97 
98 void ConfusionMatrix::sortClassNames(){
99  sort(m_classes.begin(),m_classes.end(),compareClass);
100 }
101 
102 ConfusionMatrix ConfusionMatrix::operator*(double weight)
103 {
104  ConfusionMatrix result = *this;//make a copy of myself
105  result*=weight;
106  return result;
107 }
108 
109 void ConfusionMatrix::resize(short nclass){
110  m_classes.resize(nclass);
111  for(short iclass=0;iclass<nclass;++iclass){
112  std::ostringstream osclass;
113  osclass << iclass;
114  m_classes[iclass]=osclass.str();
115  }
116  m_results.resize(nclass,nclass);
117 }
118 
119 void ConfusionMatrix::setClassNames(const std::vector<std::string>& classNames, bool doSort){
120  m_classes=classNames;
121  if(doSort)
122  sortClassNames();
123  if(m_results.size()!=m_classes.size())
124  m_results.resize(m_classes.size(),m_classes.size());
125 }
126 
127 void ConfusionMatrix::pushBackClassName(const std::string& className, bool doSort){
128  m_classes.push_back(className);
129  if(doSort)
130  sortClassNames();
131  if(m_results.size()!=m_classes.size())
132  m_results.resize(m_classes.size(),m_classes.size());
133 }
134 
135 
136 void ConfusionMatrix::setResults(const Vector2d<double>& theResults){
137  m_results=theResults;
138 }
139 
140 void ConfusionMatrix::clearResults(){
141  m_results.clear();
142  m_results.resize(m_classes.size(),m_classes.size());
143 }
144 
145 void ConfusionMatrix::setResult(const std::string& theRef, const std::string& theClass, double theResult){
146  // int ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theRef));
147  // int ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
148  // assert(ir>=0);
149  // assert(ir<m_results.size());
150  // assert(ic>=0);
151  // assert(ic<m_results[ir].size());
152  int ir=getClassIndex(theRef);
153  int ic=getClassIndex(theClass);
154  m_results[ir][ic]=theResult;
155 }
156 
157 void ConfusionMatrix::incrementResult(const std::string& theRef, const std::string& theClass, double theIncrement){
158  // int ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theRef));
159  // int ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
160  int ir=getClassIndex(theRef);
161  int ic=getClassIndex(theClass);
162  assert(ir>=0);
163  if(ir>=m_results.size())
164  std::cerr << "Error: " << theRef << " not found in class ConfusionMatrix when incrementing for class " << theClass << std::endl;
165  assert(ir<m_results.size());
166  assert(ic>=0);
167  assert(ic<m_results[ir].size());
168  m_results[ir][ic]+=theIncrement;
169 }
170 
171 double ConfusionMatrix::nReference(const std::string& theRef) const{
172  // int ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theRef));
173  int ir=getClassIndex(theRef);
174  return accumulate(m_results[ir].begin(),m_results[ir].end(),0);
175 }
176 
177 double ConfusionMatrix::nReference() const{
178  double nref=0;
179  for(int ir=0;ir<m_classes.size();++ir)
180  nref+=accumulate(m_results[ir].begin(),m_results[ir].end(),0);
181  return nref;
182 }
183 
184 double ConfusionMatrix::nClassified(const std::string& theClass) const{
185  // int ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
186  int ic=getClassIndex(theClass);
187  double nclassified=0;
188  for(int iref=0;iref<m_results.size();++iref){
189  assert(ic<m_results[iref].size());
190  nclassified+=m_results[iref][ic];
191  }
192  return(nclassified);
193 }
194 
195 double ConfusionMatrix::pa(const std::string& theClass, double* se95) const{
196  assert(m_results.size());
197  assert(m_results.size()==m_classes.size());
198  double producer=0;
199  // int ir=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
200  int ir=getClassIndex(theClass);
201  assert(ir>=0);
202  assert(ir<m_results.size());
203  assert(!theClass.compare(m_classes[ir]));
204  for(int iclass=0;iclass<m_results.size();++iclass){
205  assert(iclass<m_results[ir].size());
206  producer+=m_results[ir][iclass];
207  }
208  double dpa=(producer>0)? static_cast<double>(m_results[ir][ir])/producer : 0;
209  double dqa=1.0-dpa;
210  if(se95!=NULL)
211  *se95=(dpa<1&&dpa>0)? sqrt(dpa*dqa/(producer-1)) : 0;
212  return dpa;
213 }
214 
215 int ConfusionMatrix::pa_pct(const std::string& theClass, double* se95) const{
216  double dpa=pa(theClass,se95);
217  if(se95!=NULL)
218  *se95=static_cast<double>(static_cast<int>(0.5+1000*(*se95)))/10.0;
219  return static_cast<int>(0.5+100.0*dpa);
220 }
221 
222 
223 double ConfusionMatrix::ua(const std::string& theClass, double* se95) const{
224  assert(m_results.size());
225  assert(m_results.size()==m_classes.size());
226  double user=0;
227  // int ic=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),theClass));
228  int ic=getClassIndex(theClass);
229  assert(ic>=0);
230  assert(ic<m_results.size());
231  assert(!theClass.compare(m_classes[ic]));
232  for(int iref=0;iref<m_results.size();++iref){
233  assert(ic<m_results[iref].size());
234  user+=m_results[iref][ic];
235  }
236  double dua=(user>0)? static_cast<double>(m_results[ic][ic])/user : 0;
237  double dva=1.0-dva;
238  if(se95!=NULL)
239  *se95=(dua<1&&dua>0)? sqrt(dua*dva/(user-1)) : 0;
240  return dua;
241 }
242 
243 int ConfusionMatrix::ua_pct(const std::string& theClass,double* se95) const{
244  double dua=ua(theClass,se95);
245  if(se95!=NULL)
246  *se95=static_cast<double>(static_cast<int>(0.5+1000*(*se95)))/10.0;
247  return static_cast<int>(0.5+100.0*dua);
248 }
249 
250 double ConfusionMatrix::oa(double* se95) const{
251  double ntotal=m_results.sum();
252  double pChance=0;
253  double pCorrect=0;
254  for(int iclass=0;iclass<m_classes.size();++iclass)
255  pCorrect+=static_cast<double>(m_results[iclass][iclass])/ntotal;
256  double qCorrect=1-pCorrect;
257  if(se95!=NULL)
258  *se95=(pCorrect<1&&pCorrect>0)? sqrt(pCorrect*qCorrect/(ntotal-1)) : 0;
259  if(ntotal>0)
260  return(pCorrect);
261  else
262  return(0);
263 }
264 
265 int ConfusionMatrix::oa_pct(double* se95) const{
266  double doa=oa(se95);
267  if(se95!=NULL)
268  *se95=static_cast<double>(static_cast<int>(0.5+1000*(*se95)))/10.0;
269  return static_cast<int>(0.5+100.0*doa);
270 }
271 
272 double ConfusionMatrix::kappa() const{
273  double ntotal=m_results.sum();
274  double pChance=0;
275  double pCorrect=0;
276  for(int iclass=0;iclass<m_classes.size();++iclass){
277  pChance+=nClassified(m_classes[iclass])*nReference(m_classes[iclass])/ntotal/ntotal;
278  pCorrect+=static_cast<double>(m_results[iclass][iclass])/ntotal;
279  }
280  if(pChance<1)
281  return((pCorrect-pChance)/(1-pChance));
282  else
283  return(0);
284 }
pktools-2.6.6/doc/html/pkdsm2shadow.html0000644000113200011300000001204712647637662015157 00000000000000 pktools: pkdsm2shadow
pktools  2.6.6
Processing Kernel for geospatial data
pkdsm2shadow

program to calculate sun shadow based on digital surface model and sun angles

SYNOPSIS

Usage: pkdsm2shadow -i input.txt -o output [-sza angle] [-saa angle]

Options: [-f value] [-ot type] [-of GDALformat] [-ct filename] [-co option]*

Advanced options: [–scale value] [–offset value]

Description

Utility to create a binary shadow mask from a digital surface model, based on Sun zenith (-sza) and azimuth angles (-saa).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image file
    o output std::string Output image file
    sza sza double Sun zenith angle.
    saa saa double Sun azimuth angle (N=0 E=90 S=180 W=270).
    f flag int 0 Flag to put in image if pixel shadow
    s scale double scale used for input dsm: height=scale*input+offset
    off offset double offset used for input dsm: height=scale*input+offset
    co co std::string Creation option for output file. Multiple options can be specified.
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate).
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    Usage: pkdsm2shadow -i input.txt -o output [-sza angle] [-saa angle]

Examples

Some examples how to use pkdsm2shadow can be found here

pktools-2.6.6/doc/html/build-pkcrop__gui-gcc-Release_2moc__mainwindow_8cpp_source.html0000644000113200011300000005547512647637661026117 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Release/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkcrop_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  15, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  69, 11, 11, 11, 0x08,
36  100, 11, 11, 11, 0x08,
37  131, 11, 11, 11, 0x08,
38  158, 11, 11, 11, 0x08,
39  186, 11, 11, 11, 0x08,
40  219, 11, 11, 11, 0x08,
41  245, 11, 11, 11, 0x08,
42  273, 11, 11, 11, 0x08,
43  296, 11, 11, 11, 0x08,
44  324, 11, 11, 11, 0x08,
45  344, 11, 11, 11, 0x08,
46  365, 11, 11, 11, 0x08,
47  378, 11, 11, 11, 0x08,
48 
49  0 // eod
50 };
51 
52 static const char qt_meta_stringdata_MainWindow[] = {
53  "MainWindow\0\0on_actionInput_triggered()\0"
54  "on_toolButton_input_clicked()\0"
55  "on_toolButton_extent_clicked()\0"
56  "on_toolButton_output_clicked()\0"
57  "on_toolButton_ct_clicked()\0"
58  "on_toolButton_Run_clicked()\0"
59  "on_toolButton_defaults_clicked()\0"
60  "on_actionQuit_triggered()\0"
61  "on_actionOutput_triggered()\0"
62  "on_autoscale_clicked()\0"
63  "on_actionExtent_triggered()\0"
64  "on_manual_clicked()\0on_noscale_clicked()\0"
65  "deleteItem()\0on_toolButton_clicked()\0"
66 };
67 
68 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
69 {
70  if (_c == QMetaObject::InvokeMetaMethod) {
71  Q_ASSERT(staticMetaObject.cast(_o));
72  MainWindow *_t = static_cast<MainWindow *>(_o);
73  switch (_id) {
74  case 0: _t->on_actionInput_triggered(); break;
75  case 1: _t->on_toolButton_input_clicked(); break;
76  case 2: _t->on_toolButton_extent_clicked(); break;
77  case 3: _t->on_toolButton_output_clicked(); break;
78  case 4: _t->on_toolButton_ct_clicked(); break;
79  case 5: _t->on_toolButton_Run_clicked(); break;
80  case 6: _t->on_toolButton_defaults_clicked(); break;
81  case 7: _t->on_actionQuit_triggered(); break;
82  case 8: _t->on_actionOutput_triggered(); break;
83  case 9: _t->on_autoscale_clicked(); break;
84  case 10: _t->on_actionExtent_triggered(); break;
85  case 11: _t->on_manual_clicked(); break;
86  case 12: _t->on_noscale_clicked(); break;
87  case 13: _t->deleteItem(); break;
88  case 14: _t->on_toolButton_clicked(); break;
89  default: ;
90  }
91  }
92  Q_UNUSED(_a);
93 }
94 
95 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
96  0, qt_static_metacall
97 };
98 
99 const QMetaObject MainWindow::staticMetaObject = {
100  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
101  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
102 };
103 
104 #ifdef Q_NO_DATA_RELOCATION
105 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
106 #endif //Q_NO_DATA_RELOCATION
107 
108 const QMetaObject *MainWindow::metaObject() const
109 {
110  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
111 }
112 
113 void *MainWindow::qt_metacast(const char *_clname)
114 {
115  if (!_clname) return 0;
116  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
117  return static_cast<void*>(const_cast< MainWindow*>(this));
118  return QMainWindow::qt_metacast(_clname);
119 }
120 
121 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
122 {
123  _id = QMainWindow::qt_metacall(_c, _id, _a);
124  if (_id < 0)
125  return _id;
126  if (_c == QMetaObject::InvokeMetaMethod) {
127  if (_id < 15)
128  qt_static_metacall(this, _c, _id, _a);
129  _id -= 15;
130  }
131  return _id;
132 }
133 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/dir_280a0ba2820d23d6529bf494f1ea3ddd_dep.map0000644000113200011300000000070312616110567020447 00000000000000 pktools-2.6.6/doc/html/inherit_graph_10.map0000644000113200011300000000025312616110570015455 00000000000000 pktools-2.6.6/doc/html/dir_849702d4228bd835bdf1201002937cb3_dep.png0000644000113200011300000000374212616110567020107 00000000000000‰PNG  IHDR‹ß1ðbKGDÿÿÿ ½§“—IDATxœíÝLÓwÇñWKG+w‰^Ýé¡ —u‚àa'†Ü¸àþs.C°'çP·•x.(^°(å„qVæŽá‹.8¶àvãnjƒ?1°t¨—[@‘l ÜÞX.ÝÊ[Šm¥¯Ç_„ï÷óý¾Óuê:4Y³Ðc¤Ñh`4:ác¸ËÉ“'qýz+bbbÝ9 yÀÙ³ 33Ó{±@LL,Þzë°»‡¡Ç¬®Nëö1øš…Ä ‰1c,$ÆXHŒ±c!1¿Œ¥¡¡IIñˆˆÆÒ¥Ñ8sÆ0›» ÓiñÅÿ@||.^ü'ÊË÷">> ‹ÏGnn6îzyzïñ»Xl66oÎBfæ|þùlÚ”‹¼¼Øl¶±}*+(-=ˆ‹ÿ…úú¼û® 'NÔ »»–yqzïò»X;FFF`µZ¡V«‘ž¾--ÝÐh4cûäå÷Ô֞ƛo <<aa()1"&f‰§÷.¿‹eúô8q¢--Mxá……ÈÈHFSÓy(•ß?:Ý|@o¯Ï>«ûýóχ!11Ùã3û ¿‹exx###8pà._î‚^¿¯½–;wúÇöQ©žÌšŒo¾éû}kë5|ò …k×®@}}-ïÁnw@¥RaÚ´ §}SSW¡¬¬mèèhƒÁ°7oZ¼0µopû¿ÎOµZ}û*PRbÀ­[½ ‡ýû« V«öÍÎþ††¬xõÕ4Øl6,]º yyE^˜Ú7(ܹ>‹^¯‡ÕjçGž:&“ z½~¢‡àõYHޱc!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±˜G?ƒ[TôG|ýu»'O9¥eddᥗ~ç±óy4–cÇÞÁâÅq˜;÷OžvJjj:ºº3S7ظq+^~y¦ÿÉÊÒÃá°{ôœ|ÍBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±˜ÏÆ2::Š7ÞXƒŸºº:¡Õ*œ~ž¨É8†¿ñÙK›Þ¾}ÕÕÇqõªÀÃ+coÙ’çå©ü›Ïþe„„<¼µìÌ™OcçνÞÉïùl,‰‰q€ðð_pý´áp8PX¸ áá³6 ……Ûàp8ðàÁìÝ»QQ¡˜?ÿçÈÎþ=îÞ½óƒÇøè£³HHˆÆœ9AX° åå߇Y__‹øøEÖ :ú9˜Lmû±¹Æ[ç«|6–?¾ho¿=î¾…ÙÜsç.áý÷ÐØx{öâí·ËQSs&Ó‡¨©ù(+û³ÓúÁÁ{X»6 ‹Å ¹ù+ìÞ]Š]»òñí·ÿÍfEVÖJlذ W®Ü@n³6›Õå6Ws·ÎWùl,âøñÃØ·ïæÎ}‘‘Q0JÐÐPcÇ*QP°‘‘Qˆˆø%ŒÆÃX²ä×NëÕhl¼‚’’ý˜=;xìÛwa·wË™A¨Õ¬^…îî~h4Ó\ns5×xë|Õ”ˆ¥§ç,†V«€V«@jê2˜ÍݰXÌc·ƒ€°°$'§:­ DggÒÓ—ãÅ…÷Þ;2¶mÆŒŸ¡¦æS45]ÀÂ…!HNNÀùóP*•.·¹šk¼u¾Ê·§š9ói\ºôúúFÑ×7Šîî~|òÉÏAOϱý®]kùÁ§¡áá!¬[§GNÎ6|öÙe”–ü¿m###8r¤]]}X³f=22RÐßßçr›«¹Æ[竦D,))+°kW>,3¾üò*ÒÓ—£²ÒˆU«2Q\¼mm×ÑÖvÛ·o†ÅbvZÿþ}Øívbxx{öìððµŒB¡ÀЉ¨­={÷àpØ¡R=…   —Û\Í5Þ:_å³ï³<Š;Š‘Ÿ¿ ÑP*•HIIƒÁP¥2V«ii¿…ÍfŲeI(*ú‹ÓúéÓg ¸¸ ¯¿þ ‚‚~‚­[ó‘––•+—£½ýߨ¨8 ƒ!½½Ì›÷ªªLP«Þ&ÏÕ¶›K­Ö¸\ç«KWWš››Ý€<# IIIÐh&|Á j·b!¿Â‹ùc!1ÆBbŒ…Ä ‰1c,$ÆXHŒ±c!1ÆBbŒ…Ä ‰©T{{z"\ø/ž“©IEND®B`‚pktools-2.6.6/doc/html/ImgWriterGdal_8cc_source.html0000644000113200011300000020522012647637662017364 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgWriterGdal.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgWriterGdal.cc
1 /**********************************************************************
2 ImgWriterGdal.cc: class to write raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <iomanip>
22 #include <time.h>
23 #include <algorithm>
24 #include "ogr_spatialref.h"
25 extern "C" {
26 #include "gdal_alg.h"
27 }
28 #include "ImgWriterGdal.h"
29 
30 #ifdef HAVE_CONFIG_H
31 #include <config.h>
32 #endif
33 
34 //---------------------------------------------------------------------------
35 
36 // ImgWriterGdal::ImgWriterGdal(void)
37 // : m_gds(NULL), m_magic_x(1), m_magic_y(1), m_isGeoRef(false), m_ncol(0), m_nrow(0), m_nband(0), m_interleave("BAND"), m_compression("LZW")
38 // {}
39 
40 ImgWriterGdal::ImgWriterGdal(void){};
41 
42 ImgWriterGdal::~ImgWriterGdal(void)
43 {
44  // delete m_gds;
45 // GDALDumpOpenDatasets(stderr);
46 // GDALDestroyDriverManager();//could still be be used by other objects
47 }
48 
49 //---------------------------------------------------------------------------
50 void ImgWriterGdal::open(const std::string& filename, const ImgReaderGdal& imgSrc, const std::vector<std::string>& options)
51 {
52  // m_isGeoRef=imgSrc.isGeoRef();
53  m_filename=filename;
54  m_ncol=imgSrc.nrOfCol();
55  m_nrow=imgSrc.nrOfRow();
56  m_nband=imgSrc.nrOfBand();
57  // m_type=imgSrc.getDataType();
58  m_options=options;
59  // m_interleave=imgSrc.getInterleave();
60  // m_compression=imgSrc.getCompression();
61  // imgSrc.getMagicPixel(m_magic_x,m_magic_y);
62  setCodec(imgSrc);
63 }
64 
65 // void ImgWriterGdal::open(const std::string& filename, int ncol, int nrow, int nband, const GDALDataType& dataType, const std::string& imageType, const std::string& interleave, const std::string& compression, int magicX, int magicY)
66 // {
67 // m_isGeoRef=false;
68 // m_filename = filename;
69 // m_ncol = ncol;
70 // m_nrow = nrow;
71 // m_nband = nband;
72 // m_type=dataType;
73 // m_interleave = interleave;
74 // m_compression=compression;
75 // m_magic_x=magicX;
76 // m_magic_y=magicY;
77 // setCodec(imageType);
78 // }
79 
80 void ImgWriterGdal::open(const std::string& filename, int ncol, int nrow, int nband, const GDALDataType& dataType, const std::string& imageType, const std::vector<std::string>& options)
81 {
82  // m_isGeoRef=false;
83  m_filename = filename;
84  m_ncol = ncol;
85  m_nrow = nrow;
86  m_nband = nband;
87  // m_type=dataType;
88  // m_interleave = interleave;
89  // m_compression=compression;
90  m_options=options;
91  // m_magic_x=magicX;
92  // m_magic_y=magicY;
93  setCodec(dataType,imageType);
94 }
95 
96 //---------------------------------------------------------------------------
97 void ImgWriterGdal::close(void)
98 {
99  ImgRasterGdal::close();
100  char **papszOptions=NULL;
101  for(std::vector<std::string>::const_iterator optionIt=m_options.begin();optionIt!=m_options.end();++optionIt)
102  papszOptions=CSLAddString(papszOptions,optionIt->c_str());
103  if(papszOptions)
104  CSLDestroy(papszOptions);
105 }
106 
107 //---------------------------------------------------------------------------
108 void ImgWriterGdal::setCodec(const ImgReaderGdal& imgSrc){
109  GDALAllRegister();
110  GDALDriver *poDriver;
111  poDriver = GetGDALDriverManager()->GetDriverByName(imgSrc.getDriverDescription().c_str());
112  if( poDriver == NULL ){
113  std::string errorString="FileOpenError";
114  throw(errorString);
115  }
116  char **papszMetadata;
117  papszMetadata = poDriver->GetMetadata();
118  //todo: try and catch if CREATE is not supported (as in PNG)
119  assert( CSLFetchBoolean( papszMetadata, GDAL_DCAP_CREATE, FALSE ));
120  char **papszOptions=NULL;
121  for(std::vector<std::string>::const_iterator optionIt=m_options.begin();optionIt!=m_options.end();++optionIt)
122  papszOptions=CSLAddString(papszOptions,optionIt->c_str());
123  // char **papszOptions=NULL;
124  // std::ostringstream compressList;
125  // compressList << "COMPRESS=" << m_compression;
126  // papszOptions = CSLAddString(papszOptions,(compressList.str()).c_str());
127  // std::ostringstream interleaveList;
128  // interleaveList << "INTERLEAVE=" << m_interleave;
129  // papszOptions = CSLAddString(papszOptions,(interleaveList.str()).c_str());
130  m_gds=poDriver->Create(m_filename.c_str(),m_ncol,m_nrow,m_nband,imgSrc.getDataType(),papszOptions);
131  // if(imgSrc.isGeoRef()){
132  setProjection(imgSrc.getProjection());
133  double gt[6];
134  imgSrc.getGeoTransform(gt);
135  setGeoTransform(gt);
136  // }
137  m_gds->SetMetadata(imgSrc.getMetadata() );
138  m_gds->SetMetadataItem( "TIFFTAG_DOCUMENTNAME", m_filename.c_str());
139  std::string versionString="pktools ";
140  versionString+=VERSION;
141  versionString+=" by Pieter Kempeneers";
142  m_gds->SetMetadataItem( "TIFFTAG_SOFTWARE", versionString.c_str());
143  time_t rawtime;
144  time ( &rawtime );
145 
146  time_t tim=time(NULL);
147  tm *now=localtime(&tim);
148  std::ostringstream datestream;
149  //date std::string must be 20 characters long...
150  datestream << now->tm_year+1900;
151  if(now->tm_mon+1<10)
152  datestream << ":0" << now->tm_mon+1;
153  else
154  datestream << ":" << now->tm_mon+1;
155  if(now->tm_mday<10)
156  datestream << ":0" << now->tm_mday;
157  else
158  datestream << ":" << now->tm_mday;
159  if(now->tm_hour<10)
160  datestream << " 0" << now->tm_hour;
161  else
162  datestream << " " << now->tm_hour;
163  if(now->tm_min<10)
164  datestream << ":0" << now->tm_min;
165  else
166  datestream << ":" << now->tm_min;
167  if(now->tm_sec<10)
168  datestream << ":0" << now->tm_sec;
169  else
170  datestream << ":" << now->tm_sec;
171  m_gds->SetMetadataItem( "TIFFTAG_DATETIME", datestream.str().c_str());
172 // list<std::string> lmeta;
173 // imgReader.getMetadata(lmeta);
174 // list<std::string>::const_iterator lit=lmeta.begin();
175 // while(lit!=lmeta.end()){
176 // cout << *lit << endl;
177 // ++lit;
178 // }
179  // m_gds->SetMetadataItem( "INTERLEAVE", m_interleave.c_str(), "IMAGE_STRUCTURE" );
180  // m_gds->SetMetadataItem( "COMPRESS", m_compression.c_str(), "IMAGE_STRUCTURE" );
181  if(imgSrc.getColorTable()!=NULL)
182  setColorTable(imgSrc.getColorTable());
183 }
184 
185 void ImgWriterGdal::setCodec(const GDALDataType& dataType, const std::string& imageType)
186 {
187  GDALAllRegister();
188  GDALDriver *poDriver;
189  poDriver = GetGDALDriverManager()->GetDriverByName(imageType.c_str());
190  if( poDriver == NULL ){
191  std::ostringstream s;
192  s << "FileOpenError (" << imageType << ")";
193  throw(s.str());
194  }
195  char **papszMetadata;
196  papszMetadata = poDriver->GetMetadata();
197  //todo: try and catch if CREATE is not supported (as in PNG)
198  assert( CSLFetchBoolean( papszMetadata, GDAL_DCAP_CREATE, FALSE ));
199  char **papszOptions=NULL;
200  for(std::vector<std::string>::const_iterator optionIt=m_options.begin();optionIt!=m_options.end();++optionIt)
201  papszOptions=CSLAddString(papszOptions,optionIt->c_str());
202  // std::ostringstream compressList;
203  // compressList << "COMPRESS=" << m_compression;
204  // papszOptions = CSLAddString(papszOptions,(compressList.str()).c_str());
205  // std::ostringstream interleaveList;
206  // interleaveList << "INTERLEAVE=" << m_interleave;
207  // papszOptions = CSLAddString(papszOptions,(interleaveList.str()).c_str());
208  m_gds=poDriver->Create(m_filename.c_str(),m_ncol,m_nrow,m_nband,dataType,papszOptions);
209 
210  // m_gds->SetMetadataItem( "INTERLEAVE", m_interleave.c_str(), "IMAGE_STRUCTURE" );
211  // m_gds->SetMetadataItem( "COMPRESSION", m_compression.c_str(), "IMAGE_STRUCTURE" );
212  m_gds->SetMetadataItem( "TIFFTAG_DOCUMENTNAME", m_filename.c_str());
213  std::string versionString="pktools ";
214  versionString+=VERSION;
215  versionString+=" by Pieter Kempeneers";
216  m_gds->SetMetadataItem( "TIFFTAG_SOFTWARE", versionString.c_str());
217  time_t rawtime;
218  time ( &rawtime );
219 
220  time_t tim=time(NULL);
221  tm *now=localtime(&tim);
222  std::ostringstream datestream;
223  //date std::string must be 20 characters long...
224  datestream << now->tm_year+1900;
225  if(now->tm_mon+1<10)
226  datestream << ":0" << now->tm_mon+1;
227  else
228  datestream << ":" << now->tm_mon+1;
229  if(now->tm_mday<10)
230  datestream << ":0" << now->tm_mday;
231  else
232  datestream << ":" << now->tm_mday;
233  if(now->tm_hour<10)
234  datestream << " 0" << now->tm_hour;
235  else
236  datestream << " " << now->tm_hour;
237  if(now->tm_min<10)
238  datestream << ":0" << now->tm_min;
239  else
240  datestream << ":" << now->tm_min;
241  if(now->tm_sec<10)
242  datestream << ":0" << now->tm_sec;
243  else
244  datestream << ":" << now->tm_sec;
245  m_gds->SetMetadataItem( "TIFFTAG_DATETIME", datestream.str().c_str());
246 // m_gds->SetMetadataItem( "TIFFTAG_DATETIME", ctime(&rawtime));
247 }
248 
249 void ImgWriterGdal::setMetadata(char** metadata)
250 {
251  assert(m_gds);
252  m_gds->SetMetadata(metadata);
253 }
254 
255 //---------------------------------------------------------------------------
256 void ImgWriterGdal::setGeoTransform(double* gt){
257  // m_isGeoRef=true;
258  m_gt[0]=gt[0];
259  m_gt[1]=gt[1];
260  m_gt[2]=gt[2];
261  m_gt[3]=gt[3];
262  m_gt[4]=gt[4];
263  m_gt[5]=gt[5];
264  if(m_gds)
265  m_gds->SetGeoTransform(m_gt);
266 }
267 
268 // void ImgWriterGdal::setGeoTransform(double ulx, double uly, double deltaX, double deltaY, double rot1, double rot2)
269 // {
270 // m_isGeoRef=true;
271 // m_ulx=ulx;
272 // m_uly=uly;
273 // m_delta_x=deltaX;
274 // m_delta_y=deltaY;
275 // double adfGeoTransform[6];// { 444720, 30, 0, 3751320, 0, -30 };
276 // adfGeoTransform[0]=ulx;
277 // adfGeoTransform[1]=deltaX;
278 // adfGeoTransform[2]=rot1;
279 // adfGeoTransform[3]=uly;
280 // adfGeoTransform[4]=rot2;
281 // adfGeoTransform[5]=-deltaY;//convention of GDAL!
282 // if(m_gds)
283 // m_gds->SetGeoTransform(adfGeoTransform);
284 // }
285 
286 void ImgWriterGdal::copyGeoTransform(const ImgReaderGdal& imgSrc)
287 {
288  setProjection(imgSrc.getProjection());
289  double gt[6];
290  imgSrc.getGeoTransform(gt);
291  setGeoTransform(gt);
292  // imgSrc.getGeoTransform(ulx,uly,deltaX,deltaY,rot1,rot2);
293  // setGeoTransform(ulx,uly,deltaX,deltaY,rot1,rot2);
294 }
295 
296 std::string ImgWriterGdal::setProjectionProj4(const std::string& projection)
297 {
298  // if(!m_isGeoRef)
299  // m_isGeoRef=true;
300 
301  OGRSpatialReference theRef;
302  theRef.SetFromUserInput(projection.c_str());
303  char *wktString;
304  theRef.exportToWkt(&wktString);
305  assert(m_gds);
306  m_gds->SetProjection(wktString);
307  return(wktString);
308 
309  // OGRSpatialReferenceH hSRS;
310  // char *pszResult = NULL;
311 
312  // CPLErrorReset();
313 
314  // hSRS = OSRNewSpatialReference( NULL );
315  // if( OSRSetFromUserInput( hSRS, projection.c_str() ) == OGRERR_NONE )
316  // OSRExportToWkt( hSRS, &pszResult );
317  // else
318  // {
319  // std::ostringstream s;
320  // s << "Error in set projection " << projection;
321  // throw(s.str());
322  // }
323  // std::string theProjection=pszResult;
324  // assert(m_gds);
325  // m_gds->SetProjection(theProjection.c_str());
326  // OSRDestroySpatialReference( hSRS );
327 
328  // return theProjection;
329 }
330 
331 void ImgWriterGdal::setProjection(const std::string& projection)
332 {
333  // if(!m_isGeoRef)
334  // m_isGeoRef=true;
335  OGRSpatialReference oSRS;
336  char *pszSRS_WKT = NULL;
337  assert(m_gds);
338  m_gds->SetProjection(projection.c_str());
339  CPLFree(pszSRS_WKT);
340 }
341 
342 //default projection: ETSR-LAEA
343 // std::string ImgWriterGdal::setProjection(void)
344 // {
345 // std::string theProjection;
346 // OGRSpatialReference oSRS;
347 // char *pszSRS_WKT = NULL;
348 // //// oSRS.importFromEPSG(3035);
349 // oSRS.SetGeogCS("ETRS89","European_Terrestrial_Reference_System_1989","GRS 1980",6378137,298.2572221010042,"Greenwich",0,"degree",0.0174532925199433);
350 // // cout << setprecision(16) << "major axis: " << oSRS.GetSemiMajor(NULL) << endl;//notice that major axis can be set to a different value than the default to the well known standard corresponding to the name (European_Terrestrial_Reference_System_1989), but that new value, while recognized by GetSemiMajor, will not be written in the geotiff tag!
351 // oSRS.SetProjCS( "ETRS89 / ETRS-LAEA" );
352 // oSRS.SetLAEA(52,10,4321000,3210000);
353 // oSRS.exportToWkt( &pszSRS_WKT );
354 // theProjection=pszSRS_WKT;
355 // CPLFree( pszSRS_WKT );
356 // assert(m_gds);
357 // m_gds->SetProjection(theProjection.c_str());
358 // return(theProjection);
359 // }
360 
361 //filename is ascii file containing 5 columns: index R G B ALFA (0:transparent, 255:solid)
362 void ImgWriterGdal::setColorTable(const std::string& filename, int band)
363 {
364  //todo: fool proof table in file (no checking currently done...)
365  std::ifstream ftable(filename.c_str(),std::ios::in);
366  std::string line;
367 // poCT=new GDALColorTable();
368  GDALColorTable colorTable;
369  short nline=0;
370  while(getline(ftable,line)){
371  ++nline;
372  std::istringstream ist(line);
373  GDALColorEntry sEntry;
374  short id;
375  ist >> id >> sEntry.c1 >> sEntry.c2 >> sEntry.c3 >> sEntry.c4;
376 // poCT->SetColorEntry(id,&sEntry);
377  colorTable.SetColorEntry(id,&sEntry);
378  }
379  // assert(nline==colorTable.GetColorEntryCount());
380 // (m_gds->GetRasterBand(band+1))->SetColorTable(poCT);
381  (m_gds->GetRasterBand(band+1))->SetColorTable(&colorTable);
382 }
383 
384 void ImgWriterGdal::setColorTable(GDALColorTable* colorTable, int band)
385 {
386  (m_gds->GetRasterBand(band+1))->SetColorTable(colorTable);
387 }
388 
389 //write an entire image from memory to file
390 bool ImgWriterGdal::writeData(void* pdata, const GDALDataType& dataType, int band) const{
391  //fetch raster band
392  GDALRasterBand *poBand;
393  if(band>=nrOfBand()+1){
394  std::ostringstream s;
395  s << "band (" << band << ") exceeds nrOfBand (" << nrOfBand() << ")";
396  throw(s.str());
397  }
398  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
399  poBand->RasterIO(GF_Write,0,0,nrOfCol(),nrOfRow(),pdata,nrOfCol(),nrOfRow(),dataType,0,0);
400  return true;
401 }
402 
403 void ImgWriterGdal::rasterizeOgr(ImgReaderOgr& ogrReader, const std::vector<double>& burnValues, const std::vector<std::string>& layernames ){
404  std::vector<int> bands;
405  std::vector<double> burnBands;//burn values for all bands in a single layer
406  std::vector<double> burnLayers;//burn values for all bands and all layers
407  if(burnValues.empty()){
408  std::string errorString="Error: burn values not provided";
409  throw(errorString);
410  }
411  burnBands=burnValues;
412  while(burnBands.size()<nrOfBand())
413  burnBands.push_back(burnValues[0]);
414  for(int iband=0;iband<nrOfBand();++iband)
415  bands.push_back(iband+1);
416  std::vector<OGRLayerH> layers;
417  int nlayer=0;
418  for(int ilayer=0;ilayer<ogrReader.getLayerCount();++ilayer){
419  std::string currentLayername=ogrReader.getLayer(ilayer)->GetName();
420  if(layernames.size())
421  if(find(layernames.begin(),layernames.end(),currentLayername)==layernames.end())
422  continue;
423  std::cout << "processing layer " << currentLayername << std::endl;
424  layers.push_back((OGRLayerH)ogrReader.getLayer(ilayer));
425  ++nlayer;
426  for(int iband=0;iband<nrOfBand();++iband)
427  burnLayers.insert(burnLayers.end(),burnBands.begin(),burnBands.end());
428  }
429  void *pTransformArg;
430  char **papszOptions;
431  double dfComplete=0.0;
432  const char* pszMessage;
433  void* pProgressArg=NULL;
434  GDALProgressFunc pfnProgress=GDALTermProgress;
435  pfnProgress(dfComplete,pszMessage,pProgressArg);
436  if(GDALRasterizeLayers( (GDALDatasetH)m_gds,nrOfBand(),&(bands[0]),layers.size(),&(layers[0]),NULL,pTransformArg,&(burnLayers[0]),papszOptions,pfnProgress,pProgressArg)!=CE_None){
437  std::cerr << CPLGetLastErrorMsg() << std::endl;
438  exit(1);
439  }
440  else{
441  dfComplete=1.0;
442  pfnProgress(dfComplete,pszMessage,pProgressArg);
443  }
444 }
pktools-2.6.6/doc/html/inherit_graph_0.map0000644000113200011300000000061512616110567015404 00000000000000 pktools-2.6.6/doc/html/md_examples_pkinfo.html0000644000113200011300000001051312647637662016411 00000000000000 pktools: examples_pkinfo
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkinfo

Examples of pkinfo

pkinfo -i image.tif -nb

show number of bands in raster image.tif

pkinfo -i image.tif -max -b 1

show maximum value of band 1 (starting from 0) of raster image.tif

pkinfo -i image.tif -x 0 -y 0 -r -b 3 -b 2 -b 1

read (dump) upper left pixel value for bands 3,2,1

pkinfo -i image.tif -x 3528120 -y 4329681 -geo -r -b 3 -b 2 -b 1

read (dump) pixel value at this geographic location (x,y) for bands 3,2,1

pkinfo -i image1.tif -b

show bounding box (-ulx -uly -lrx -lry) in geo coordinates for image1.tif

pkinfo -i image1.tif -i image2.tif -i image3.tif -b

show bounding box (-ulx -uly -lrx -lry) in geo coordinates for each image (and union and intersect)

pkinfo -i image1.tif --mask 0 --mask 255 -ref

show the reference pixel (centre of gravity) for image1.tif, treating 0 and 255 as NO VALUE

pkinfo -i image.tif $(pkinfo -i image.tif -c) -geo -r

read (dump) pixel value at image centre for band 0

pkinfo $(for IMAGE in modis_2010*.tif; do pkinfo -i $IMAGE --cover -x 4215500 -y 2534000;done) -x 4215500 -y 253400

read (dump) pixel value in band 0 (default) for all images in current directory that cover this geographic location

pktools-2.6.6/doc/html/pkkalman1_8cc_source.html0000644000113200011300000106475212647450425016546 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkkalman1.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkkalman1.cc
1 /**********************************************************************
2 pkkalman.cc: produce kalman filtered raster time series
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <sstream>
21 #include <vector>
22 #include <algorithm>
23 #include "base/Optionpk.h"
24 #include "base/Vector2d.h"
25 #include "imageclasses/ImgReaderGdal.h"
26 #include "imageclasses/ImgWriterGdal.h"
27 #include "algorithms/StatFactory.h"
28 #include "algorithms/ImgRegression.h"
29 
30 /******************************************************************************/
76 using namespace std;
77 /*------------------
78  Main procedure
79  ----------------*/
80 int main(int argc,char **argv) {
81  Optionpk<string> direction_opt("dir","direction","direction to run model (forward|backward|smooth)","forward");
82  Optionpk<string> model_opt("mod","model","model input datasets, e.g., MODIS (use: -mod model1 -mod model2 etc.)");
83  Optionpk<string> observation_opt("obs","observation","observation input datasets, e.g., landsat (use: -obs obs1 -obs obs2 etc.)");
84  Optionpk<int> tmodel_opt("tmod","tmodel","time sequence of model input. Sequence must have exact same length as model input. Leave empty to have default sequence 0,1,2,etc.");
85  Optionpk<int> tobservation_opt("tobs","tobservation","time sequence of observation input. Sequence must have exact same length as observation input)");
86  Optionpk<string> projection_opt("a_srs", "a_srs", "Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid");
87  Optionpk<string> outputfw_opt("ofw", "outputfw", "Output raster dataset for forward model");
88  Optionpk<string> outputbw_opt("obw", "outputbw", "Output raster dataset for backward model");
89  Optionpk<string> outputfb_opt("ofb", "outputfb", "Output raster dataset for smooth model");
90  Optionpk<string> gain_opt("gain", "gain", "Output raster dataset for gain");
91 
92  Optionpk<double> modnodata_opt("modnodata", "modnodata", "invalid value for model input", 0);
93  Optionpk<double> obsnodata_opt("obsnodata", "obsnodata", "invalid value for observation input", 0);
94  Optionpk<double> obsmin_opt("obsmin", "obsmin", "Minimum value for observation data");
95  Optionpk<double> obsmax_opt("obsmax", "obsmax", "Maximum value for observation data");
96  Optionpk<double> modoffset_opt("modoffset", "modoffset", "offset used to read model input dataset (value=offset+scale*readValue)");
97  Optionpk<double> obsoffset_opt("obsoffset", "obsoffset", "offset used to read observation input dataset (value=offset+scale*readValue)");
98  Optionpk<double> modscale_opt("modscale", "modscale", "scale used to read model input dataset (value=offset+scale*readValue)");
99  Optionpk<double> obsscale_opt("obsscale", "obsscale", "scale used to read observation input dataset (value=offset+scale*readValue)");
100  Optionpk<double> eps_opt("eps", "eps", "epsilon for non zero division", 0.00001);
101  Optionpk<double> uncertModel_opt("um", "uncertmodel", "Multiply this value with std dev of first model image to obtain uncertainty of model",2);
102  Optionpk<double> uncertObs_opt("uo", "uncertobs", "Uncertainty of valid observations",0);
103  Optionpk<double> weight_opt("w", "weight", "Penalize outliers in measurement via weights. Use first weight to penalize small measurements wrt model and second weight to penalize large measurements wrt model");
104  Optionpk<double> deltaObs_opt("dobs", "deltaobs", "Lower and upper thresholds for relative pixel differences (in percentage): (observation-model)/model. For instance to force the observation within a +/- 10 % interval, use: -dobs -10 -dobs 10 (equivalent to -dobs 10). Leave empty to always update on observation");
105  Optionpk<double> uncertNodata_opt("unodata", "uncertnodata", "Uncertainty in case of no-data values in observation", 10000);
106  Optionpk<double> regTime_opt("rt", "regtime", "Weight for regression in time series", 1.0);
107  Optionpk<double> regSensor_opt("rs", "regsensor", "Weight for regression model - measurement (model - observation).");
108  Optionpk<int> down_opt("down", "down", "Downsampling factor for reading model data to calculate regression");
109  Optionpk<float> threshold_opt("th", "threshold", "threshold for selecting samples (randomly). Provide probability in percentage (>0) or absolute (<0).", 0);
110  Optionpk<int> minreg_opt("minreg", "minreg", "Minimum number of pixels to take into account for regression", 5, 2);
111  Optionpk<float> c0modGlobalMin_opt("c0modmin", "c0modmin", "Minimum value for c0 in model regression", -65, 2);
112  Optionpk<float> c0modGlobalMax_opt("c0modmax", "c0modmax", "Maximum value for c0 in model regression", 65, 2);
113  Optionpk<float> c1modGlobalMin_opt("c1modmin", "c1modmin", "Minimum value for c1 in model regression", 0.7, 2);
114  Optionpk<float> c1modGlobalMax_opt("c1modmax", "c1modmax", "Maximum value for c1 in model regression", 1.3, 2);
115  // Optionpk<bool> regObs_opt("regobs", "regobs", "Perform regression between modeled and observed value",false);
116  // Optionpk<double> checkDiff_opt("diff", "diff", "Flag observation as invalid if difference with model is above uncertainty",false);
117  Optionpk<unsigned short> window_opt("win", "window", "window size for calculating regression (use 0 for global)", 0);
118  // Optionpk<string> mask_opt("m", "mask", "Use the first band of the specified file as a validity mask. Nodata values can be set with the option msknodata.");
119  // Optionpk<double> msknodata_opt("msknodata", "msknodata", "Mask value(s) not to consider for filtering. First value will be set in output image.", 0);
120 
121  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image","GTiff",2);
122  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
123  Optionpk<short> verbose_opt("v", "verbose", "verbose mode when positive", 0);
124 
125  bool doProcess;//stop process when program was invoked with help option (-h --help)
126  try{
127  doProcess=direction_opt.retrieveOption(argc,argv);
128  model_opt.retrieveOption(argc,argv);
129  observation_opt.retrieveOption(argc,argv);
130  tmodel_opt.retrieveOption(argc,argv);
131  tobservation_opt.retrieveOption(argc,argv);
132  projection_opt.retrieveOption(argc,argv);
133  outputfw_opt.retrieveOption(argc,argv);
134  outputbw_opt.retrieveOption(argc,argv);
135  outputfb_opt.retrieveOption(argc,argv);
136  gain_opt.retrieveOption(argc,argv);
137  modnodata_opt.retrieveOption(argc,argv);
138  obsnodata_opt.retrieveOption(argc,argv);
139  obsmin_opt.retrieveOption(argc,argv);
140  obsmax_opt.retrieveOption(argc,argv);
141  modoffset_opt.retrieveOption(argc,argv);
142  modscale_opt.retrieveOption(argc,argv);
143  obsoffset_opt.retrieveOption(argc,argv);
144  obsscale_opt.retrieveOption(argc,argv);
145  eps_opt.retrieveOption(argc,argv);
146  uncertModel_opt.retrieveOption(argc,argv);
147  uncertObs_opt.retrieveOption(argc,argv);
148  weight_opt.retrieveOption(argc,argv);
149  deltaObs_opt.retrieveOption(argc,argv);
150  uncertNodata_opt.retrieveOption(argc,argv);
151  regTime_opt.retrieveOption(argc,argv);
152  regSensor_opt.retrieveOption(argc,argv);
153  down_opt.retrieveOption(argc,argv);
154  threshold_opt.retrieveOption(argc,argv);
155  minreg_opt.retrieveOption(argc,argv);
156  c0modGlobalMin_opt.retrieveOption(argc,argv);
157  c0modGlobalMax_opt.retrieveOption(argc,argv);
158  c1modGlobalMin_opt.retrieveOption(argc,argv);
159  c1modGlobalMax_opt.retrieveOption(argc,argv);
160  // regObs_opt.retrieveOption(argc,argv);
161  // checkDiff_opt.retrieveOption(argc,argv);
162  window_opt.retrieveOption(argc,argv);
163  // mask_opt.retrieveOption(argc,argv);
164  // msknodata_opt.retrieveOption(argc,argv);
165  oformat_opt.retrieveOption(argc,argv);
166  option_opt.retrieveOption(argc,argv);
167  verbose_opt.retrieveOption(argc,argv);
168  }
169  catch(string predefinedString){
170  std::cout << predefinedString << std::endl;
171  exit(0);
172  }
173  if(!doProcess){
174  std::cerr << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
175  exit(0);//help was invoked, stop processing
176  }
177 
178  if(deltaObs_opt.size()==1){
179  if(deltaObs_opt[0]<=0)
180  deltaObs_opt.push_back(-deltaObs_opt[0]);
181  else
182  deltaObs_opt.insert(deltaObs_opt.begin(),-deltaObs_opt[0]);
183  }
184  if(weight_opt.size()==1){
185  weight_opt.push_back(weight_opt[0]);
186  }
187 
188  if(down_opt.empty()){
189  std::cerr << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
190  exit(0);//help was invoked, stop processing
191  }
192  try{
193  ostringstream errorStream;
194  if(model_opt.size()<2){
195  errorStream << "Error: no model dataset selected, use option -mod" << endl;
196  throw(errorStream.str());
197  }
198  if(observation_opt.size()<1){
199  errorStream << "Error: no observation dataset selected, use option -obs" << endl;
200  throw(errorStream.str());
201  }
202  if(direction_opt[0]=="smooth"){
203  if(outputfw_opt.empty()){
204  errorStream << "Error: output forward datasets is not provided, use option -ofw" << endl;
205  throw(errorStream.str());
206  }
207  if(outputbw_opt.empty()){
208  errorStream << "Error: output backward datasets is not provided, use option -obw" << endl;
209  throw(errorStream.str());
210  }
211  if(outputfb_opt.empty()){
212  errorStream << "Error: output smooth datasets is not provided, use option -ofb" << endl;
213  throw(errorStream.str());
214  }
215  }
216  else{
217  if(direction_opt[0]=="forward"&&outputfw_opt.empty()){
218  errorStream << "Error: output forward datasets is not provided, use option -ofw" << endl;
219  throw(errorStream.str());
220  }
221  else if(direction_opt[0]=="backward"&&outputbw_opt.empty()){
222  errorStream << "Error: output backward datasets is not provided, use option -obw" << endl;
223  throw(errorStream.str());
224  }
225 
226  if(model_opt.size()<observation_opt.size()){
227  errorStream << "Error: sequence of models should be larger than observations" << endl;
228  throw(errorStream.str());
229  }
230  if(tmodel_opt.size()!=model_opt.size()){
231  if(tmodel_opt.empty())
232  cout << "Warning: time sequence is not provided, self generating time sequence from 0 to " << model_opt.size() << endl;
233  else
234  cout << "Warning: time sequence provided (" << tmodel_opt.size() << ") does not match number of model raster datasets (" << model_opt.size() << ")" << endl;
235  tmodel_opt.clear();
236  for(int tindex=0;tindex<model_opt.size();++tindex)
237  tmodel_opt.push_back(tindex);
238  }
239  if(tobservation_opt.size()!=observation_opt.size()){
240  errorStream << "Error: time sequence for observation must match size of observation dataset" << endl;
241  throw(errorStream.str());
242  }
243  }
244  }
245  catch(string errorString){
246  std::cout << errorString << std::endl;
247  exit(1);
248  }
249 
251  stat.setNoDataValues(modnodata_opt);
253  // vector<ImgReaderGdal> imgReaderModel(model_opt.size());
254  // vector<ImgReaderGdal> imgReaderObs(observation_opt.size());
255  ImgReaderGdal imgReaderModel1;
256  ImgReaderGdal imgReaderModel2;
257  ImgReaderGdal imgReaderObs;
258  ImgWriterGdal imgWriterEst;
259  //test
260  ImgWriterGdal imgWriterGain;
261 
262  imgReaderObs.open(observation_opt[0]);
263 
264  int ncol=imgReaderObs.nrOfCol();
265  int nrow=imgReaderObs.nrOfRow();
266  if(projection_opt.empty())
267  projection_opt.push_back(imgReaderObs.getProjection());
268  double geotransform[6];
269  imgReaderObs.getGeoTransform(geotransform);
270 
271  string imageType=imgReaderObs.getImageType();
272  if(oformat_opt.size())//default
273  imageType=oformat_opt[0];
274  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
275  string theInterleave="INTERLEAVE=";
276  theInterleave+=imgReaderObs.getInterleave();
277  option_opt.push_back(theInterleave);
278  }
279 
280  if(down_opt.empty()){
281  imgReaderModel1.open(model_opt[0]);
282  double resModel=imgReaderModel1.getDeltaX();
283  double resObs=imgReaderObs.getDeltaX();
284  int down=static_cast<int>(ceil(resModel/resObs));
285  if(!(down%2))
286  down+=1;
287  down_opt.push_back(down);
288  imgReaderModel1.close();
289  }
290  imgReaderObs.close();
291 
292  if(regSensor_opt.empty())
293  regSensor_opt.push_back(1.0/down_opt[0]);
294  //hiero
295  // ImgReaderGdal maskReader;
296  // double colMask=0;
297  // double rowMask=0;
298 
299  // if(mask_opt.size()){
300  // try{
301  // if(verbose_opt[0]>=1)
302  // std::cout << "opening mask image file " << mask_opt[0] << std::endl;
303  // maskReader.open(mask_opt[0]);
304  // maskReader.setNoData(msknodata_opt);
305  // }
306  // catch(string error){
307  // cerr << error << std::endl;
308  // exit(2);
309  // }
310  // catch(...){
311  // cerr << "error catched" << std::endl;
312  // exit(1);
313  // }
314  // }
315 
316  int obsindex=0;
317 
318  const char* pszMessage;
319  void* pProgressArg=NULL;
320  GDALProgressFunc pfnProgress=GDALTermProgress;
321  double progress=0;
322 
323  imgreg.setDown(down_opt[0]);
324  imgreg.setThreshold(threshold_opt[0]);
325 
326  double c0modGlobal=0;//time regression coefficient c0 (offset) calculated on entire image
327  double c1modGlobal=1;//time regression coefficient c1 (scale) calculated on entire image
328  double c0modGlobal_prev=0;//previous time regression coefficient c0 (offset) calculated on entire image to fall back
329  double c1modGlobal_prev=1;//previous time regression coefficient c1 (scale) calculated on entire image to fall back
330  double c0mod=0;//time regression coefficient c0 (offset) calculated on local window
331  double c1mod=1;//time regression coefficient c1 (scale) calculated on local window
332 
333  double c0obs=0;//offset
334  double c1obs=1;//scale
335  double c0obs_prev=0;//previous offset to fall back
336  double c1obs_prev=1;//previous scale to fall back
337  double errObs=uncertNodata_opt[0];//start with high initial value in case we do not have first observation at time 0
338 
339  vector<int> relobsindex;
340  // cout << tmodel_opt << endl;
341  // cout << tobservation_opt << endl;
342 
343  for(int tindex=0;tindex<tobservation_opt.size();++tindex){
344  vector<int>::iterator modit;
345  modit=upper_bound(tmodel_opt.begin(),tmodel_opt.end(),tobservation_opt[tindex]);
346  int relpos=modit-tmodel_opt.begin()-1;
347  assert(relpos>=0);//todo: for now, we assume model is available at time before first measurement
348  relobsindex.push_back(relpos);
349  if(verbose_opt[0])
350  cout << "observation " << tindex << ": " << "relative position in model time series is " << relpos << ", date of observation is (tobservation_opt[tindex]): " << tobservation_opt[tindex] << ", relobsindex.back(): " << relobsindex.back() << ", filename observation: " << observation_opt[tindex] << ", filename of corresponding model: " << model_opt[relpos] << endl;
351  // if(verbose_opt[0])
352  // cout << "tobservation_opt[tindex] " << tobservation_opt[tindex] << " " << relobsindex.back() << endl;
353  }
354 
355  int ndigit=log(1.0*tmodel_opt.back())/log(10.0)+1;
356 
357  double geox=0;
358  double geoy=0;
359 
360  if(find(direction_opt.begin(),direction_opt.end(),"forward")!=direction_opt.end()){
362  cout << "Running forward model" << endl;
363  obsindex=0;
364  //initialization
365  string output;
366  if(outputfw_opt.size()==model_opt.size()){
367  output=outputfw_opt[0];
368  }
369  else{
370  ostringstream outputstream;
371  outputstream << outputfw_opt[0] << "_";
372  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[0];
373  outputstream << ".tif";
374  //test
375  // outputstream << outputfw_opt[0] << "_" << tmodel_opt[0] << ".tif";
376  output=outputstream.str();
377  }
378  if(verbose_opt[0])
379  cout << "Opening image " << output << " for writing " << endl;
380 
381  imgWriterEst.open(output,ncol,nrow,2,GDT_Float64,imageType,option_opt);
382  imgWriterEst.setProjectionProj4(projection_opt[0]);
383  imgWriterEst.setGeoTransform(geotransform);
384  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
385 
386  //test
387  if(gain_opt.size()){
388  imgWriterGain.open(gain_opt[0],ncol,nrow,model_opt.size(),GDT_Float64,imageType,option_opt);
389  imgWriterGain.setProjectionProj4(projection_opt[0]);
390  imgWriterGain.setGeoTransform(geotransform);
391  imgWriterGain.GDALSetNoDataValue(obsnodata_opt[0]);
392  }
393 
394  if(verbose_opt[0]){
395  cout << "processing time " << tmodel_opt[0] << endl;
396  if(obsindex<relobsindex.size())
397  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
398  else
399  cout << "There is no next observation" << endl;
400  }
401 
402  try{
403  imgReaderModel1.open(model_opt[0]);
404  for(int inodata=0;inodata<modnodata_opt.size();++inodata)
405  imgReaderModel1.pushNoDataValue(modnodata_opt[inodata]);
406  // imgReaderModel1.setNoData(modnodata_opt);
407  if(modoffset_opt.size())
408  imgReaderModel1.setOffset(modoffset_opt[0]);
409  if(modscale_opt.size())
410  imgReaderModel1.setScale(modscale_opt[0]);
411  }
412  catch(string errorString){
413  cerr << errorString << endl;
414  }
415  catch(...){
416  cerr << "Error opening file " << model_opt[0] << endl;
417  }
418 
419  //calculate standard deviation of image to serve as model uncertainty
420  GDALRasterBand* rasterBand;
421  rasterBand=imgReaderModel1.getRasterBand(0);
422  double minValue, maxValue, meanValue, stdDev;
423  void* pProgressData;
424  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev,pfnProgress,pProgressData);
425  double modRow=0;
426  double modCol=0;
427  if(relobsindex[0]>0){//initialize output_opt[0] as model[0]
428  //write first model as output
429  if(verbose_opt[0])
430  cout << "write first model as output" << endl;
431  for(int irow=0;irow<nrow;++irow){
432  vector<double> estReadBuffer;
433  vector<double> estWriteBuffer(ncol);
434  vector<double> uncertWriteBuffer(ncol);
435  //test
436  vector<double> gainWriteBuffer(ncol);
437  // vector<double> lineMask;
438  imgWriterEst.image2geo(0,irow,geox,geoy);
439  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
440  if(modRow<0||modRow>=imgReaderModel1.nrOfRow()){
441  cerr << "Error: geo coordinates (" << geox << "," << geoy << ") not covered in model image " << imgReaderModel1.getFileName() << endl;
442  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
443  }
444  try{
445  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow);
446  //simple nearest neighbor
447  //stat.nearUp(estReadBuffer,estWriteBuffer);
448 
449  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
450  for(int icol=0;icol<ncol;++icol){
451  imgWriterEst.image2geo(icol,irow,geox,geoy);
452  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
453  double modValue=estReadBuffer[modCol];
454  if(imgReaderModel1.isNoData(modValue)){
455  estWriteBuffer[icol]=obsnodata_opt[0];
456  uncertWriteBuffer[icol]=uncertNodata_opt[0];
457  gainWriteBuffer[icol]=obsnodata_opt[0];
458  }
459  else{
460  //todo: should take into account regression model-obs...
461  estWriteBuffer[icol]=modValue;
462  uncertWriteBuffer[icol]=uncertModel_opt[0]*stdDev;
463  gainWriteBuffer[icol]=0;
464  }
465  }
466  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
467  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
468  if(gain_opt.size())
469  imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0);
470  }
471  catch(string errorString){
472  cerr << errorString << endl;
473  }
474  catch(...){
475  cerr << "Error writing file " << imgWriterEst.getFileName() << endl;
476  }
477  }
478  }
479  else{//we have a measurement
480  if(verbose_opt[0])
481  cout << "we have a measurement at initial time" << endl;
482  imgReaderObs.open(observation_opt[0]);
483  imgReaderObs.getGeoTransform(geotransform);
484  imgReaderObs.setNoData(obsnodata_opt);
485  if(obsoffset_opt.size())
486  imgReaderObs.setOffset(obsoffset_opt[0]);
487  if(obsscale_opt.size())
488  imgReaderObs.setScale(obsscale_opt[0]);
489 
490  if(regSensor_opt[0]>0){
491  errObs=regSensor_opt[0]*imgreg.getRMSE(imgReaderModel1,imgReaderObs,c0obs,c1obs,0,0,verbose_opt[0]);
492  if(errObs<0){
493  // c0obs=0;
494  // c1obs=1;
495  c0obs=c0obs_prev;
496  c1obs=c1obs_prev;
497  }
498  else{
499  c0obs_prev=c0obs;
500  c1obs_prev=c1obs;
501  }
502  }
503  else{
504  c0obs=0;
505  c1obs=1;
506  errObs=0;
507  }
508  if(verbose_opt[0])
509  cout << "c0obs, c1obs: " << c0obs << ", " << c1obs << endl;
510 
511  for(int irow=0;irow<nrow;++irow){
512  vector<double> estReadBuffer;
513  imgWriterEst.image2geo(0,irow,geox,geoy);
514  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
515  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
516  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow);
517  vector<double> obsLineBuffer;
518  vector<double> estWriteBuffer(ncol);
519  vector<double> uncertWriteBuffer(ncol);
520  vector<double> uncertObsLineBuffer;
521  //test
522  vector<double> gainWriteBuffer(ncol);
523  // vector<double> lineMask;
524  // imgReaderObs.readData(estWriteBuffer,GDT_Float64,irow,0);
525  imgReaderObs.readData(obsLineBuffer,GDT_Float64,irow,0);
526 
527  if(imgReaderObs.nrOfBand()>1)
528  imgReaderObs.readData(uncertObsLineBuffer,GDT_Float64,irow,1);
529  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
530  for(int icol=0;icol<ncol;++icol){
531  imgWriterEst.image2geo(icol,irow,geox,geoy);
532  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
533  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
534  double modValue=estReadBuffer[modCol];
535  if(imgReaderModel1.isNoData(modValue)){//model is nodata: retain observation
536  estWriteBuffer[icol]=obsLineBuffer[icol];
537  if(imgReaderObs.isNoData(obsLineBuffer[icol])){
538  estWriteBuffer[icol]=obsnodata_opt[0];
539  uncertWriteBuffer[icol]=uncertNodata_opt[0];
540  gainWriteBuffer[icol]=obsnodata_opt[0];
541  }
542  else if(uncertObsLineBuffer.size()>icol)
543  uncertWriteBuffer[icol]=uncertObsLineBuffer[icol];
544  else
545  uncertWriteBuffer[icol]=uncertObs_opt[0];
546  //test
547  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
548  if(obsmin_opt.size())
549  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
550  if(obsmax_opt.size()){
551  if(estWriteBuffer[icol]>obsmax_opt[0]){
552  cout << "estWriteBuffer[icol], obsLineBuffer[icol], irow, icol: " << estWriteBuffer[icol] << ", " << obsLineBuffer[icol] << ", " << irow << ", " << icol << endl;
553  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
554  }
555  }
556  }
557  }
558  else{//model is valid: calculate estimate from model
559  double errMod=uncertModel_opt[0]*stdDev;
560  errMod*=regTime_opt[0];
561  // double certNorm=(errMod*errMod+errObs*errObs);
562  // double certMod=errObs*errObs/certNorm;
563  // double certObs=errMod*errMod/certNorm;
564  // double regTime=0;
565  // double regSensor=(c0obs+c1obs*modValue)*certMod;
566  // estWriteBuffer[icol]=regTime+regSensor;
567  estWriteBuffer[icol]=modValue;
568  double totalUncertainty=errMod;
569  // if(errMod<eps_opt[0])
570  // totalUncertainty=errObs;
571  // else if(errObs<eps_opt[0])
572  // totalUncertainty=errMod;
573  // else{
574  // totalUncertainty=1.0/errMod/errMod+1/errObs/errObs;
575  // totalUncertainty=sqrt(1.0/totalUncertainty);
576  // }
577  uncertWriteBuffer[icol]=totalUncertainty;//in case observation is not valid
578  gainWriteBuffer[icol]=0;
579  //test
580  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
581  if(obsmin_opt.size())
582  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
583  if(obsmax_opt.size()){
584  if(estWriteBuffer[icol]>obsmax_opt[0]){
585  cout << "estWriteBuffer[icol], irow, icol: " << estWriteBuffer[icol] << ", " << irow << ", " << icol << endl;
586  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
587  }
588  }
589  }
590  }
591  // uncertWriteBuffer[icol]+=uncertReadBuffer[icol];
592  //measurement update
593  if(!imgReaderObs.isNoData(obsLineBuffer[icol])){
594  double kalmanGain=1;
595  double uncertObs=uncertObs_opt[0];
596  if(uncertObsLineBuffer.size()>icol)
597  uncertObs=uncertObsLineBuffer[icol];
598  else if(weight_opt.size()||deltaObs_opt.size()){
599  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
600  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
601  int maxCol=(icol+down_opt[0]/2<imgReaderObs.nrOfCol()) ? icol+down_opt[0]/2 : imgReaderObs.nrOfCol()-1;
602  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
603  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
604 
605  imgReaderObs.readDataBlock(obsWindowBuffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
606  statfactory::StatFactory statobs;
607  statobs.setNoDataValues(obsnodata_opt);
608  double obsMeanValue=(statobs.mean(obsWindowBuffer)-c0obs)/c1obs;
609  double difference=obsMeanValue-modValue;
610  if(modValue){
611  double relativeDifference=difference/modValue;
612  if(deltaObs_opt.size()){
613  assert(deltaObs_opt.size()>1);
614  if(100*relativeDifference<deltaObs_opt[0])//lower bound
615  kalmanGain=0;
616  else if(100*relativeDifference>deltaObs_opt[1])//upper bound
617  kalmanGain=0;
618  }
619  else if(weight_opt.size()){
620  assert(weight_opt.size()>1);
621  if(obsMeanValue<modValue)
622  uncertObs=-weight_opt[0]*relativeDifference;
623  else if(obsMeanValue>modValue)
624  uncertObs=weight_opt[1]*relativeDifference;
625  }
626  }
627  if(uncertObs<=0)
628  uncertObs=0;
629  if(verbose_opt[0]>1)
630  cout << "obsMeanValue:" << obsMeanValue << ", modValue: " << modValue << endl;
631  }
632  if(kalmanGain>0){
633  if((uncertWriteBuffer[icol]+uncertObs)>eps_opt[0])
634  kalmanGain=uncertWriteBuffer[icol]/(uncertWriteBuffer[icol]+uncertObs);
635  }
636  assert(kalmanGain<=1);
637  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
638  if(obsmin_opt.size()){
639  if(estWriteBuffer[icol]<obsmin_opt[0])
640  estWriteBuffer[icol]=obsnodata_opt[0];
641  }
642  if(obsmax_opt.size()){
643  if(estWriteBuffer[icol]>obsmax_opt[0])
644  estWriteBuffer[icol]=obsnodata_opt[0];
645  }
646  uncertWriteBuffer[icol]*=(1-kalmanGain);
647  //test
648  gainWriteBuffer[icol]=kalmanGain;
649  //test
650  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
651  if(obsmin_opt.size())
652  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
653  if(obsmax_opt.size()){
654  if(estWriteBuffer[icol]>obsmax_opt[0]){
655  cout << "estWriteBuffer[icol], irow, icol: " << estWriteBuffer[icol] << ", " << irow << ", " << icol << endl;
656  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
657  }
658  }
659  }
660  }
661  //test
662  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
663  if(obsmin_opt.size())
664  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
665  if(obsmax_opt.size()){
666  if(estWriteBuffer[icol]>obsmax_opt[0]){
667  cout << "estWriteBuffer[icol], irow, icol: " << estWriteBuffer[icol] << ", " << irow << ", " << icol << endl;
668  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
669  }
670  }
671  }
672  }
673  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
674  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
675  if(gain_opt.size())
676  imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0);
677  }
678  imgReaderObs.close();
679  ++obsindex;
680  }
681  imgReaderModel1.close();
682  imgWriterEst.close();
683 
684  for(int modindex=1;modindex<model_opt.size();++modindex){
685  if(verbose_opt[0]){
686  cout << "processing time " << tmodel_opt[modindex] << endl;
687  if(obsindex<relobsindex.size())
688  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
689  else
690  cout << "There is no next observation" << endl;
691  }
692  string output;
693  if(outputfw_opt.size()==model_opt.size())
694  output=outputfw_opt[modindex];
695  else{
696  ostringstream outputstream;
697  outputstream << outputfw_opt[0] << "_";
698  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
699  outputstream << ".tif";
700  // outputstream << outputfw_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
701  output=outputstream.str();
702  }
703 
704  //two band output band0=estimation, band1=uncertainty
705  imgWriterEst.open(output,ncol,nrow,2,GDT_Float64,imageType,option_opt);
706  imgWriterEst.setProjectionProj4(projection_opt[0]);
707  imgWriterEst.setGeoTransform(geotransform);
708  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
709 
710  //calculate regression between two subsequence model inputs
711  imgReaderModel1.open(model_opt[modindex-1]);
712  imgReaderModel1.setNoData(modnodata_opt);
713  if(modoffset_opt.size())
714  imgReaderModel1.setOffset(modoffset_opt[0]);
715  if(modscale_opt.size())
716  imgReaderModel1.setScale(modscale_opt[0]);
717  imgReaderModel2.open(model_opt[modindex]);
718  for(int inodata=0;inodata<modnodata_opt.size();++inodata)
719  imgReaderModel2.pushNoDataValue(modnodata_opt[inodata]);
720  // imgReaderModel2.setNoData(modnodata_opt);
721  if(modoffset_opt.size())
722  imgReaderModel2.setOffset(modoffset_opt[0]);
723  if(modscale_opt.size())
724  imgReaderModel2.setScale(modscale_opt[0]);
725  //calculate regression
726  //we could re-use the points from second image from last run, but
727  //to keep it general, we must redo it (overlap might have changed)
728 
729  pfnProgress(progress,pszMessage,pProgressArg);
730 
731  if(verbose_opt[0])
732  cout << "Calculating regression for " << imgReaderModel1.getFileName() << " " << imgReaderModel2.getFileName() << endl;
733 
734  double errMod=imgreg.getRMSE(imgReaderModel1,imgReaderModel2,c0modGlobal,c1modGlobal,0,0);
735  if(verbose_opt[0])
736  cout << "c0modGlobal, c1modGlobal, errMod: " << c0modGlobal << ", " << c1modGlobal << ", " << errMod << endl;
737  if(c0modGlobal>c0modGlobalMax_opt[0]||c0modGlobal<c0modGlobalMin_opt[0]||c1modGlobal>c1modGlobalMax_opt[0]||c1modGlobal<c1modGlobalMin_opt[0]||errMod!=errMod){
738  c0modGlobal=c0modGlobal_prev;
739  c1modGlobal=c1modGlobal_prev;
740  errMod=uncertModel_opt[0]*stdDev;
741  }
742  else{
743  c0modGlobal_prev=c0modGlobal;
744  c1modGlobal_prev=c1modGlobal;
745  errMod*=regTime_opt[0];
746  }
747 
748  // double errMod=imgreg.getRMSE(imgReaderModel1,imgReaderModel2,c0modGlobal,c1modGlobal,verbose_opt[0]);
749  if(verbose_opt[0])
750  cout << "c0modGlobal, c1modGlobal, errMod: " << c0modGlobal << ", " << c1modGlobal << ", " << errMod << endl;
751 
752  bool update=false;
753  if(obsindex<relobsindex.size()){
754  update=(relobsindex[obsindex]==modindex);
755  }
756  if(update){
757  if(verbose_opt[0])
758  cout << "***update " << relobsindex[obsindex] << " = " << modindex << " " << observation_opt[obsindex] << " ***" << endl;
759 
760  imgReaderObs.open(observation_opt[obsindex]);
761  imgReaderObs.getGeoTransform(geotransform);
762  imgReaderObs.setNoData(obsnodata_opt);
763  if(obsoffset_opt.size())
764  imgReaderObs.setOffset(obsoffset_opt[0]);
765  if(obsscale_opt.size())
766  imgReaderObs.setScale(obsscale_opt[0]);
767  //calculate regression between model and observation
768  if(verbose_opt[0])
769  cout << "Calculating regression for " << imgReaderModel2.getFileName() << " " << imgReaderObs.getFileName() << endl;
770  if(regSensor_opt[0]>0){
771  errObs=regSensor_opt[0]*imgreg.getRMSE(imgReaderModel2,imgReaderObs,c0obs,c1obs,0,0,verbose_opt[0]);
772  if(errObs<0||errObs!=errObs){
773  // c0obs=0;
774  // c1obs=1;
775  c0obs=c0obs_prev;
776  c1obs=c1obs_prev;
777  }
778  else{
779  c0obs_prev=c0obs;
780  c1obs_prev=c1obs;
781  }
782  }
783  else{
784  c0obs=0;
785  c1obs=1;
786  errObs=0;
787  }
788  if(verbose_opt[0])
789  cout << "c0obs, c1obs, errObs: " << c0obs << ", " << c1obs << ", " << errObs << endl;
790  }
791  //prediction (also to fill cloudy pixels in update mode)
792  string input;
793  if(outputfw_opt.size()==model_opt.size())
794  input=outputfw_opt[modindex-1];
795  else{
796  ostringstream outputstream;
797  outputstream << outputfw_opt[0] << "_";
798  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex-1];
799  outputstream << ".tif";
800  // outputstream << outputfw_opt[0] << "_" << tmodel_opt[modindex-1] << ".tif";
801  input=outputstream.str();
802  }
803  if(verbose_opt[0])
804  cout << "opening " << input << endl;
805  ImgReaderGdal imgReaderEst(input);
806  imgReaderEst.setNoData(obsnodata_opt);
807  if(obsoffset_opt.size())
808  imgReaderEst.setOffset(obsoffset_opt[0]);
809  if(obsscale_opt.size())
810  imgReaderEst.setScale(obsscale_opt[0]);
811 
812  vector< vector<double> > obsLineVector(down_opt[0]);
813  vector<double> obsLineBuffer;
814  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
815  vector<double> model1LineBuffer;
816  vector<double> model2LineBuffer;
817  vector<double> model1buffer;//buffer for model 1 to calculate time regression based on window
818  vector<double> model2buffer;//buffer for model 2 to calculate time regression based on window
819  vector<double> uncertObsLineBuffer;
820  vector<double> estReadBuffer;
821  // vector<double> estWindowBuffer;//buffer for estimate to calculate average corresponding to model pixel
822  vector<double> uncertReadBuffer;
823  vector<double> estWriteBuffer(ncol);
824  vector<double> uncertWriteBuffer(ncol);
825  vector<double> gainWriteBuffer(ncol);
826  // vector<double> lineMask;
827 
828  //initialize obsLineVector if update
829  if(update){
830  if(verbose_opt[0])
831  cout << "initialize obsLineVector" << endl;
832  assert(down_opt[0]%2);//window size must be odd
833  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
834  if(iline<0)//replicate line 0
835  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,0,0);
836  else
837  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,iline,0);
838  }
839  }
840  for(int irow=0;irow<imgWriterEst.nrOfRow();++irow){
841  //do not read from imgReaderObs, because we read entire window for each pixel...
842  imgReaderEst.readData(estReadBuffer,GDT_Float64,irow,0);
843  imgReaderEst.readData(uncertReadBuffer,GDT_Float64,irow,1);
844  //read model2 in case current estimate is nodata
845  imgReaderEst.image2geo(0,irow,geox,geoy);
846  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
847  assert(modRow>=0&&modRow<imgReaderModel2.nrOfRow());
848  imgReaderModel2.readData(model2LineBuffer,GDT_Float64,modRow,0);
849 
850  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
851  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
852  imgReaderModel1.readData(model1LineBuffer,GDT_Float64,modRow,0);
853 
854  if(update){
855  int maxRow=(irow+down_opt[0]/2<imgReaderEst.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderEst.nrOfRow()-1;
856  obsLineVector.erase(obsLineVector.begin());
857  imgReaderObs.readData(obsLineBuffer,GDT_Float64,maxRow,0);
858  obsLineVector.push_back(obsLineBuffer);
859  obsLineBuffer=obsLineVector[down_opt[0]/2];
860  // imgReaderObs.readData(obsLineBuffer,GDT_Float64,irow,0);
861  if(imgReaderObs.nrOfBand()>1)
862  imgReaderObs.readData(uncertObsLineBuffer,GDT_Float64,irow,1);
863  }
864  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
865  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
866  imgReaderEst.image2geo(icol,irow,geox,geoy);
867  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
868  int maxCol=(icol+down_opt[0]/2<imgReaderEst.nrOfCol()) ? icol+down_opt[0]/2 : imgReaderEst.nrOfCol()-1;
869  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
870  int maxRow=(irow+down_opt[0]/2<imgReaderEst.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderEst.nrOfRow()-1;
871  if(update){
872  obsWindowBuffer.clear();
873  for(int iline=0;iline<obsLineVector.size();++iline){
874  for(int isample=minCol;isample<=maxCol;++isample){
875  assert(isample<obsLineVector[iline].size());
876  obsWindowBuffer.push_back(obsLineVector[iline][isample]);
877  }
878  }
879  // imgReaderObs.readDataBlock(obsWindowBuffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
880  }
881  double estValue=estReadBuffer[icol];
882  double estMeanValue=0;//stat.mean(estWindowBuffer);
883  double nvalid=0;
884  //time update
885  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
886  assert(modRow>=0&&modRow<imgReaderModel2.nrOfRow());
887  double modValue=model2LineBuffer[modCol];
888  bool estNodata=imgReaderEst.isNoData(estValue);//validity of current estimate
889  if(estNodata){
890  //we have not found any valid data yet, better here to take the current model value if valid
891  if(imgReaderModel2.isNoData(modValue)){//if both estimate and model are no-data, set obs to nodata
892  estWriteBuffer[icol]=obsnodata_opt[0];
893  uncertWriteBuffer[icol]=uncertNodata_opt[0];
894  gainWriteBuffer[icol]=0;
895  }
896  else{
897  estWriteBuffer[icol]=modValue;
898  uncertWriteBuffer[icol]=uncertModel_opt[0]*stdDev;
899  gainWriteBuffer[icol]=0;
900  }
901  //test
902  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
903  if(obsmin_opt.size()){
904  if(estWriteBuffer[icol]<obsmin_opt[0])
905  cout << "estWriteBuffer[icol], icol, irow" << estWriteBuffer[icol] << ", " << icol << ", " << irow << endl;
906  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
907  }
908  if(obsmax_opt.size()){
909  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
910  if(estWriteBuffer[icol]<obsmin_opt[0])
911  cout << "estWriteBuffer[icol], modValue, icol, irow" << estWriteBuffer[icol] << ", " << modValue << ", " << icol << ", " << irow << endl;
912  }
913  }
914  }
915  else{
916  if(window_opt[0]>0){
917  try{
918  // imgReaderModel2.geo2image(geox,geoy,modCol,modRow);//did that already
919  minCol=(modCol>window_opt[0]/2) ? modCol-window_opt[0]/2 : 0;
920  maxCol=(modCol+window_opt[0]/2<imgReaderModel2.nrOfCol()) ? modCol+window_opt[0]/2 : imgReaderModel2.nrOfCol()-1;
921  minRow=(modRow>window_opt[0]/2) ? modRow-window_opt[0]/2 : 0;
922  maxRow=(modRow+window_opt[0]/2<imgReaderModel2.nrOfRow()) ? modRow+window_opt[0]/2 : imgReaderModel2.nrOfRow()-1;
923  imgReaderModel2.readDataBlock(model2buffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
924 
925  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
926  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
927  minCol=(modCol>window_opt[0]/2) ? modCol-window_opt[0]/2 : 0;
928  maxCol=(modCol+window_opt[0]/2<imgReaderModel1.nrOfCol()) ? modCol+window_opt[0]/2 : imgReaderModel1.nrOfCol()-1;
929  minRow=(modRow>window_opt[0]/2) ? modRow-window_opt[0]/2 : 0;
930  maxRow=(modRow+window_opt[0]/2<imgReaderModel1.nrOfRow()) ? modRow+window_opt[0]/2 : imgReaderModel1.nrOfRow()-1;
931  imgReaderModel1.readDataBlock(model1buffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
932  // imgReaderEst.image2geo(icol,irow,geox,geoy);
933  }
934  catch(string errorString){
935  cerr << "Error reading data block for " << minCol << "-" << maxCol << ", " << minRow << "-" << maxRow << endl;
936  }
937  //erase no-data from buffer
938  vector<double>::iterator it1=model1buffer.begin();
939  vector<double>::iterator it2=model2buffer.begin();
940  while(it1!=model1buffer.end()&&it2!=model2buffer.end()){
941  //erase nodata
942  bool modNodata=false;
943  modNodata=modNodata||imgReaderModel1.isNoData(*it1);
944  modNodata=modNodata||imgReaderModel2.isNoData(*it2);
945  if(modNodata){
946  model1buffer.erase(it1);
947  model2buffer.erase(it2);
948  }
949  else{
950  ++it1;
951  ++it2;
952  }
953  }
954  if(model1buffer.size()>minreg_opt[0]&&model2buffer.size()>minreg_opt[0]){
955  errMod=stat.linear_regression_err(model1buffer,model2buffer,c0mod,c1mod);
956  errMod*=regTime_opt[0];
957  }
958  else{//use global regression...
959  c0mod=c0modGlobal;
960  c1mod=c1modGlobal;
961  }
962  }
963  else{
964  c0mod=c0modGlobal;
965  c1mod=c1modGlobal;
966  }
967  double regTime=c0mod+c1mod*estValue;
968  double regSensor=c0obs+c1obs*modValue;
969 
970  if(regSensor_opt[0]<=0)
971  estWriteBuffer[icol]=regTime;
972  else{
973  double certMod=1;
974  double certObs=1;
975  double certNorm=(errMod*errMod+errObs*errObs);
976  if(certNorm>eps_opt[0]){
977  certMod=errObs*errObs/certNorm;
978  certObs=errMod*errMod/certNorm;
979  }
980  else{
981  certMod=0.5;
982  certObs=0.5;
983  }
984  estWriteBuffer[icol]=regTime*certObs+regSensor*certMod;
985  }
986  //test
987  // if(regTime<regSensor){
988  // cout << "regTime = (" << c0mod << "+" << c1mod << "*" << estValue << ")*" << certObs << " = " << regTime << endl;
989  // cout << "regSensor = (" << c0obs << "+" << c1obs << "*" << modValue << ")*" << certMod << " = " << regSensor << endl;
990  // assert(regTime+regSensor>0);
991  // assert(regTime+regSensor<=1);
992  // }
993 
994  if(obsmin_opt.size()){
995  if(estWriteBuffer[icol]<obsmin_opt[0])
996  estWriteBuffer[icol]=obsnodata_opt[0];
997  }
998  if(obsmax_opt.size()){
999  if(estWriteBuffer[icol]>obsmax_opt[0])
1000  estWriteBuffer[icol]=obsnodata_opt[0];
1001  }
1002 
1003  double totalUncertainty=0;
1004  if(errMod<eps_opt[0])
1005  totalUncertainty=errObs;
1006  else if(errObs<eps_opt[0])
1007  totalUncertainty=errMod;
1008  else{
1009  totalUncertainty=1.0/errMod/errMod+1/errObs/errObs;
1010  totalUncertainty=sqrt(1.0/totalUncertainty);
1011  }
1012  uncertWriteBuffer[icol]=totalUncertainty+uncertReadBuffer[icol];
1013  //test
1014  gainWriteBuffer[icol]=0;
1015  }
1016  //measurement update
1017  if(update&&!imgReaderObs.isNoData(obsLineBuffer[icol])){
1018  double kalmanGain=1;
1019  double uncertObs=uncertObs_opt[0];
1020  if(uncertObsLineBuffer.size()>icol)
1021  uncertObs=uncertObsLineBuffer[icol];
1022  else if(weight_opt.size()>1||deltaObs_opt.size()){
1023  statfactory::StatFactory statobs;
1024  statobs.setNoDataValues(obsnodata_opt);
1025  double obsMeanValue=(statobs.mean(obsWindowBuffer)-c0obs)/c1obs;
1026  double difference=obsMeanValue-modValue;
1027  if(modValue){
1028  double relativeDifference=difference/modValue;
1029  if(deltaObs_opt.size()){
1030  assert(deltaObs_opt.size()>1);
1031  if(100*relativeDifference<deltaObs_opt[0])//lower bound
1032  kalmanGain=0;
1033  else if(100*relativeDifference>deltaObs_opt[1])//upper bound
1034  kalmanGain=0;
1035  }
1036  else if(weight_opt.size()){
1037  assert(weight_opt.size()>1);
1038  if(obsMeanValue<modValue)
1039  uncertObs=-weight_opt[0]*relativeDifference;
1040  else if(obsMeanValue>modValue)
1041  uncertObs=weight_opt[1]*relativeDifference;
1042  }
1043  }
1044  if(uncertObs<=0)
1045  uncertObs=0;
1046  if(verbose_opt[0]>1)
1047  cout << "obsMeanValue:" << obsMeanValue << ", modValue: " << modValue << endl;
1048  }
1049  if(kalmanGain>0){
1050  if((uncertWriteBuffer[icol]+uncertObs)>eps_opt[0])
1051  kalmanGain=uncertWriteBuffer[icol]/(uncertWriteBuffer[icol]+uncertObs);
1052  }
1053  assert(kalmanGain<=1);
1054  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
1055  if(obsmin_opt.size()){
1056  if(estWriteBuffer[icol]<obsmin_opt[0])
1057  estWriteBuffer[icol]=obsnodata_opt[0];
1058  }
1059  if(obsmax_opt.size()){
1060  if(estWriteBuffer[icol]>obsmax_opt[0])
1061  estWriteBuffer[icol]=obsnodata_opt[0];
1062  }
1063  uncertWriteBuffer[icol]*=(1-kalmanGain);
1064  //test
1065  gainWriteBuffer[icol]=kalmanGain;
1066  }
1067  //test
1068  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
1069  if(obsmin_opt.size())
1070  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
1071  if(obsmax_opt.size())
1072  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
1073  }
1074  }
1075  //test
1076  if(gain_opt.size()){
1077  imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,modindex);
1078  }
1079  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
1080  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
1081  progress=static_cast<float>((irow+1.0)/imgWriterEst.nrOfRow());
1082  pfnProgress(progress,pszMessage,pProgressArg);
1083  }
1084 
1085  imgWriterEst.close();
1086  imgReaderEst.close();
1087 
1088  if(update){
1089  imgReaderObs.close();
1090  ++obsindex;
1091  }
1092  imgReaderModel1.close();
1093  imgReaderModel2.close();
1094  }
1095  if(gain_opt.size())
1096  imgWriterGain.close();
1097  }
1098  if(find(direction_opt.begin(),direction_opt.end(),"backward")!=direction_opt.end()){
1100  cout << "Running backward model" << endl;
1101  obsindex=relobsindex.size()-1;
1102  //initialization
1103  string output;
1104  if(outputbw_opt.size()==model_opt.size())
1105  output=outputbw_opt.back();
1106  else{
1107  ostringstream outputstream;
1108  outputstream << outputbw_opt[0] << "_";
1109  outputstream << setfill('0') << setw(ndigit) << tmodel_opt.back();
1110  outputstream << ".tif";
1111  // outputstream << outputbw_opt[0] << "_" << tmodel_opt.back() << ".tif";
1112  output=outputstream.str();
1113  }
1114  if(verbose_opt[0])
1115  cout << "Opening image " << output << " for writing " << endl;
1116  imgWriterEst.open(output,ncol,nrow,2,GDT_Float64,imageType,option_opt);
1117  imgWriterEst.setProjectionProj4(projection_opt[0]);
1118  imgWriterEst.setGeoTransform(geotransform);
1119  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
1120 
1121  if(verbose_opt[0]){
1122  cout << "processing time " << tmodel_opt.back() << endl;
1123  if(obsindex<relobsindex.size())
1124  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
1125  else
1126  cout << "There is no next observation" << endl;
1127  }
1128 
1129  try{
1130  imgReaderModel1.open(model_opt.back());
1131  imgReaderModel1.setNoData(modnodata_opt);
1132  if(modoffset_opt.size())
1133  imgReaderModel1.setOffset(modoffset_opt[0]);
1134  if(modscale_opt.size())
1135  imgReaderModel1.setScale(modscale_opt[0]);
1136  }
1137  catch(string errorString){
1138  cerr << errorString << endl;
1139  }
1140  catch(...){
1141  cerr << "Error opening file " << model_opt[0] << endl;
1142  }
1143 
1144  //calculate standard deviation of image to serve as model uncertainty
1145  GDALRasterBand* rasterBand;
1146  rasterBand=imgReaderModel1.getRasterBand(0);
1147  double minValue, maxValue, meanValue, stdDev;
1148  void* pProgressData;
1149  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev,pfnProgress,pProgressData);
1150  double modRow=0;
1151  double modCol=0;
1152  if(relobsindex.back()<model_opt.size()-1){//initialize output_opt.back() as model[0]
1153  //write last model as output
1154  if(verbose_opt[0])
1155  cout << "write last model as output" << endl;
1156  for(int irow=0;irow<nrow;++irow){
1157  vector<double> estReadBuffer;
1158  vector<double> estWriteBuffer(ncol);
1159  vector<double> uncertWriteBuffer(ncol);
1160  // vector<double> lineMask;
1161  imgWriterEst.image2geo(0,irow,geox,geoy);
1162  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1163  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1164  try{
1165  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow);
1166  //simple nearest neighbor
1167  //stat.nearUp(estReadBuffer,estWriteBuffer);
1168 
1169  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
1170  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
1171  imgWriterEst.image2geo(icol,irow,geox,geoy);
1172  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1173  double modValue=estReadBuffer[modCol];
1174  if(imgReaderModel1.isNoData(modValue)){
1175  estWriteBuffer[icol]=obsnodata_opt[0];
1176  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1177  }
1178  else{
1179  estWriteBuffer[icol]=modValue;
1180  uncertWriteBuffer[icol]=uncertModel_opt[0]*stdDev;
1181  }
1182  //test
1183  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
1184  if(obsmin_opt.size())
1185  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
1186  if(obsmax_opt.size())
1187  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
1188  }
1189  }
1190  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
1191  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
1192  }
1193  catch(string errorString){
1194  cerr << errorString << endl;
1195  }
1196  catch(...){
1197  cerr << "Error writing file " << imgWriterEst.getFileName() << endl;
1198  }
1199  }
1200  }
1201  else{//we have an measurement at end time
1202  if(verbose_opt[0])
1203  cout << "we have an measurement at end time" << endl;
1204  imgReaderObs.open(observation_opt.back());
1205  imgReaderObs.getGeoTransform(geotransform);
1206  imgReaderObs.setNoData(obsnodata_opt);
1207  if(obsoffset_opt.size())
1208  imgReaderObs.setOffset(obsoffset_opt[0]);
1209  if(obsscale_opt.size())
1210  imgReaderObs.setScale(obsscale_opt[0]);
1211 
1212  if(regSensor_opt[0]>0){
1213  errObs=regSensor_opt[0]*imgreg.getRMSE(imgReaderModel1,imgReaderObs,c0obs,c1obs,0,0,verbose_opt[0]);
1214  if(errObs<0||errObs!=errObs){
1215  // c0obs=0;
1216  // c1obs=1;
1217  c0obs=c0obs_prev;
1218  c1obs=c1obs_prev;
1219  }
1220  else{
1221  c0obs_prev=c0obs;
1222  c1obs_prev=c1obs;
1223  }
1224  }
1225  else{
1226  c0obs=0;
1227  c1obs=1;
1228  errObs=0;
1229  }
1230  if(verbose_opt[0])
1231  cout << "c0obs, c1obs: " << c0obs << ", " << c1obs << endl;
1232 
1233  for(int irow=0;irow<nrow;++irow){
1234  vector<double> estReadBuffer;
1235  imgWriterEst.image2geo(0,irow,geox,geoy);
1236  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1237  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1238  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow);
1239  vector<double> obsLineBuffer;
1240  vector<double> estWriteBuffer(ncol);
1241  vector<double> uncertWriteBuffer(ncol);
1242  vector<double> uncertObsLineBuffer;
1243  // vector<double> lineMask;
1244  // imgReaderObs.readData(estWriteBuffer,GDT_Float64,irow,0);
1245  imgReaderObs.readData(obsLineBuffer,GDT_Float64,irow,0);
1246 
1247  if(imgReaderObs.nrOfBand()>1)
1248  imgReaderObs.readData(uncertObsLineBuffer,GDT_Float64,irow,1);
1249  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
1250  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
1251  imgWriterEst.image2geo(icol,irow,geox,geoy);
1252  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1253  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1254  double modValue=estReadBuffer[modCol];
1255  if(imgReaderModel1.isNoData(modValue)){//model is nodata: retain observation
1256  estWriteBuffer[icol]=obsLineBuffer[icol];
1257  if(imgReaderObs.isNoData(obsLineBuffer[icol])){
1258  estWriteBuffer[icol]=obsnodata_opt[0];
1259  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1260  }
1261  else if(uncertObsLineBuffer.size()>icol)
1262  uncertWriteBuffer[icol]=uncertObsLineBuffer[icol];
1263  else
1264  uncertWriteBuffer[icol]=uncertObs_opt[0];
1265  }
1266  else{//model is valid: calculate estimate from model
1267  double errMod=uncertModel_opt[0]*stdDev;
1268  errMod*=regTime_opt[0];
1269  // double certNorm=(errMod*errMod+errObs*errObs);
1270  // double certMod=errObs*errObs/certNorm;
1271  // double certObs=errMod*errMod/certNorm;
1272  // double regTime=0;
1273  // double regSensor=(c0obs+c1obs*modValue)*certMod;
1274  // estWriteBuffer[icol]=regTime+regSensor;
1275  estWriteBuffer[icol]=modValue;
1276  double totalUncertainty=errMod;
1277  // if(errMod<eps_opt[0])
1278  // totalUncertainty=errObs;
1279  // else if(errObs<eps_opt[0])
1280  // totalUncertainty=errMod;
1281  // else{
1282  // totalUncertainty=1.0/errMod/errMod+1/errObs/errObs;
1283  // totalUncertainty=sqrt(1.0/totalUncertainty);
1284  // }
1285  uncertWriteBuffer[icol]=totalUncertainty;//in case observation is not valid
1286  }
1287  //measurement update
1288  if(!imgReaderObs.isNoData(obsLineBuffer[icol])){
1289  double kalmanGain=1;
1290  double uncertObs=uncertObs_opt[0];
1291  if(uncertObsLineBuffer.size()>icol)
1292  uncertObs=uncertObsLineBuffer[icol];
1293  else if(weight_opt.size()>1||deltaObs_opt.size()){
1294  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
1295  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
1296  int maxCol=(icol+down_opt[0]/2<imgReaderObs.nrOfCol()) ? icol+down_opt[0]/2 : imgReaderObs.nrOfCol()-1;
1297  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
1298  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
1299 
1300  imgReaderObs.readDataBlock(obsWindowBuffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
1301  statfactory::StatFactory statobs;
1302  statobs.setNoDataValues(obsnodata_opt);
1303  double obsMeanValue=(statobs.mean(obsWindowBuffer)-c0obs)/c1obs;
1304  double difference=obsMeanValue-modValue;
1305  if(modValue){
1306  double relativeDifference=difference/modValue;
1307  if(deltaObs_opt.size()){
1308  assert(deltaObs_opt.size()>1);
1309  if(100*relativeDifference<deltaObs_opt[0])//lower bound
1310  kalmanGain=0;
1311  else if(100*relativeDifference>deltaObs_opt[1])//upper bound
1312  kalmanGain=0;
1313  }
1314  else if(weight_opt.size()){
1315  assert(weight_opt.size()>1);
1316  if(obsMeanValue<modValue)
1317  uncertObs=-weight_opt[0]*relativeDifference;
1318  else if(obsMeanValue>modValue)
1319  uncertObs=weight_opt[1]*relativeDifference;
1320  }
1321  }
1322  if(uncertObs<=0)
1323  uncertObs=0;
1324  if(verbose_opt[0]>1)
1325  cout << "obsMeanValue:" << obsMeanValue << ", modValue: " << modValue << endl;
1326  }
1327  if(kalmanGain>0){
1328  if((uncertWriteBuffer[icol]+uncertObs)>eps_opt[0])
1329  kalmanGain=uncertWriteBuffer[icol]/(uncertWriteBuffer[icol]+uncertObs);
1330  }
1331  assert(kalmanGain<=1);
1332  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
1333  if(obsmin_opt.size()){
1334  if(estWriteBuffer[icol]<obsmin_opt[0])
1335  estWriteBuffer[icol]=obsnodata_opt[0];
1336  }
1337  if(obsmax_opt.size()){
1338  if(estWriteBuffer[icol]>obsmax_opt[0])
1339  estWriteBuffer[icol]=obsnodata_opt[0];
1340  }
1341  uncertWriteBuffer[icol]*=(1-kalmanGain);
1342  }
1343  //test
1344  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
1345  if(obsmin_opt.size())
1346  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
1347  if(obsmax_opt.size())
1348  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
1349  }
1350  }
1351  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
1352  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
1353  }
1354  imgReaderObs.close();
1355  --obsindex;
1356  }
1357  imgReaderModel1.close();
1358  imgWriterEst.close();
1359 
1360  for(int modindex=model_opt.size()-2;modindex>=0;--modindex){
1361  if(verbose_opt[0]){
1362  cout << "processing time " << tmodel_opt[modindex] << endl;
1363  if(obsindex<relobsindex.size())
1364  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
1365  else
1366  cout << "There is no next observation" << endl;
1367  }
1368  string output;
1369  if(outputbw_opt.size()==model_opt.size())
1370  output=outputbw_opt[modindex];
1371  else{
1372  ostringstream outputstream;
1373  outputstream << outputbw_opt[0] << "_";
1374  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1375  outputstream << ".tif";
1376  // outputstream << outputbw_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1377  output=outputstream.str();
1378  }
1379 
1380  //two band output band0=estimation, band1=uncertainty
1381  imgWriterEst.open(output,ncol,nrow,2,GDT_Float64,imageType,option_opt);
1382  imgWriterEst.setProjectionProj4(projection_opt[0]);
1383  imgWriterEst.setGeoTransform(geotransform);
1384  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
1385 
1386  //calculate regression between two subsequence model inputs
1387  imgReaderModel1.open(model_opt[modindex+1]);
1388  imgReaderModel1.setNoData(modnodata_opt);
1389  if(modoffset_opt.size())
1390  imgReaderModel1.setOffset(modoffset_opt[0]);
1391  if(modscale_opt.size())
1392  imgReaderModel1.setScale(modscale_opt[0]);
1393  imgReaderModel2.open(model_opt[modindex]);
1394  imgReaderModel2.setNoData(modnodata_opt);
1395  if(modoffset_opt.size())
1396  imgReaderModel2.setOffset(modoffset_opt[0]);
1397  if(modscale_opt.size())
1398  imgReaderModel2.setScale(modscale_opt[0]);
1399  //calculate regression
1400  //we could re-use the points from second image from last run, but
1401  //to keep it general, we must redo it (overlap might have changed)
1402 
1403  pfnProgress(progress,pszMessage,pProgressArg);
1404 
1405  if(verbose_opt[0])
1406  cout << "Calculating regression for " << imgReaderModel1.getFileName() << " " << imgReaderModel2.getFileName() << endl;
1407 
1408  double errMod=imgreg.getRMSE(imgReaderModel1,imgReaderModel2,c0modGlobal,c1modGlobal,0,0);
1409  if(c0modGlobal>c0modGlobalMax_opt[0]||c0modGlobal<c0modGlobalMin_opt[0]||c1modGlobal>c1modGlobalMax_opt[0]||c1modGlobal<c1modGlobalMin_opt[0]||errMod!=errMod){
1410  c0modGlobal=c0modGlobal_prev;
1411  c1modGlobal=c1modGlobal_prev;
1412  errMod=uncertModel_opt[0]*stdDev;
1413  }
1414  else{
1415  c0modGlobal_prev=c0modGlobal;
1416  c1modGlobal_prev=c1modGlobal;
1417  errMod*=regTime_opt[0];
1418  }
1419  // double errMod=imgreg.getRMSE(imgReaderModel1,imgReaderModel2,c0modGlobal,c1modGlobal,verbose_opt[0]);
1420  if(verbose_opt[0])
1421  cout << "c0modGlobal, c1modGlobal: " << c0modGlobal << ", " << c1modGlobal << endl;
1422 
1423  bool update=false;
1424  if(obsindex<relobsindex.size()){
1425  update=(relobsindex[obsindex]==modindex);
1426  }
1427  if(update){
1428  if(verbose_opt[0])
1429  cout << "***update " << relobsindex[obsindex] << " = " << modindex << " " << observation_opt[obsindex] << " ***" << endl;
1430 
1431  imgReaderObs.open(observation_opt[obsindex]);
1432  imgReaderObs.getGeoTransform(geotransform);
1433  imgReaderObs.setNoData(obsnodata_opt);
1434  if(obsoffset_opt.size())
1435  imgReaderObs.setOffset(obsoffset_opt[0]);
1436  if(obsscale_opt.size())
1437  imgReaderObs.setScale(obsscale_opt[0]);
1438  //calculate regression between model and observation
1439  if(verbose_opt[0])
1440  cout << "Calculating regression for " << imgReaderModel2.getFileName() << " " << imgReaderObs.getFileName() << endl;
1441  if(regSensor_opt[0]>0){
1442  errObs=regSensor_opt[0]*imgreg.getRMSE(imgReaderModel2,imgReaderObs,c0obs,c1obs,0,0,verbose_opt[0]);
1443  if(errObs<0||errObs!=errObs){
1444  // c0obs=0;
1445  // c1obs=1;
1446  c0obs=c0obs_prev;
1447  c1obs=c1obs_prev;
1448  }
1449  else{
1450  c0obs_prev=c0obs;
1451  c1obs_prev=c1obs;
1452  }
1453  }
1454  else{
1455  c0obs=0;
1456  c1obs=1;
1457  errObs=0;
1458  }
1459  if(verbose_opt[0])
1460  cout << "c0obs, c1obs: " << c0obs << ", " << c1obs << endl;
1461  }
1462  //prediction (also to fill cloudy pixels in update mode)
1463  string input;
1464  if(outputbw_opt.size()==model_opt.size())
1465  input=outputbw_opt[modindex+1];
1466  else{
1467  ostringstream outputstream;
1468  outputstream << outputbw_opt[0] << "_";
1469  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex+1];
1470  outputstream << ".tif";
1471  // outputstream << outputbw_opt[0] << "_" << tmodel_opt[modindex+1] << ".tif";
1472  input=outputstream.str();
1473  }
1474  ImgReaderGdal imgReaderEst(input);
1475  imgReaderEst.setNoData(obsnodata_opt);
1476  if(obsoffset_opt.size())
1477  imgReaderEst.setOffset(obsoffset_opt[0]);
1478  if(obsscale_opt.size())
1479  imgReaderEst.setScale(obsscale_opt[0]);
1480 
1481  vector< vector<double> > obsLineVector(down_opt[0]);
1482  vector<double> obsLineBuffer;
1483  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
1484  vector<double> model1LineBuffer;
1485  vector<double> model2LineBuffer;
1486  vector<double> model1buffer;//buffer for model 1 to calculate time regression based on window
1487  vector<double> model2buffer;//buffer for model 2 to calculate time regression based on window
1488  vector<double> uncertObsLineBuffer;
1489  vector<double> estReadBuffer;
1490  // vector<double> estWindowBuffer;//buffer for estimate to calculate average corresponding to model pixel
1491  vector<double> uncertReadBuffer;
1492  vector<double> estWriteBuffer(ncol);
1493  vector<double> uncertWriteBuffer(ncol);
1494  // vector<double> lineMask;
1495 
1496  //initialize obsLineVector
1497  if(update){
1498  assert(down_opt[0]%2);//window size must be odd
1499  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
1500  if(iline<0)//replicate line 0
1501  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,0,0);
1502  else
1503  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,iline,0);
1504  }
1505  }
1506  for(int irow=0;irow<imgWriterEst.nrOfRow();++irow){
1507  assert(irow<imgReaderEst.nrOfRow());
1508  //do not read from imgReaderObs, because we read entire window for each pixel...
1509  imgReaderEst.readData(estReadBuffer,GDT_Float64,irow,0);
1510  imgReaderEst.readData(uncertReadBuffer,GDT_Float64,irow,1);
1511  //read model2 in case current estimate is nodata
1512  imgReaderEst.image2geo(0,irow,geox,geoy);
1513  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
1514  assert(modRow>=0&&modRow<imgReaderModel2.nrOfRow());
1515  imgReaderModel2.readData(model2LineBuffer,GDT_Float64,modRow,0);
1516 
1517  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1518  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1519  imgReaderModel1.readData(model1LineBuffer,GDT_Float64,modRow,0);
1520 
1521  if(update){
1522  int maxRow=(irow+down_opt[0]/2<imgReaderEst.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderEst.nrOfRow()-1;
1523  obsLineVector.erase(obsLineVector.begin());
1524  imgReaderObs.readData(obsLineBuffer,GDT_Float64,maxRow,0);
1525  obsLineVector.push_back(obsLineBuffer);
1526  obsLineBuffer=obsLineVector[down_opt[0]/2];
1527  // imgReaderObs.readData(obsLineBuffer,GDT_Float64,irow,0);
1528  if(imgReaderObs.nrOfBand()>1)
1529  imgReaderObs.readData(uncertObsLineBuffer,GDT_Float64,irow,1);
1530  }
1531  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
1532  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
1533  imgReaderEst.image2geo(icol,irow,geox,geoy);
1534  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
1535  int maxCol=(icol+down_opt[0]/2<imgReaderEst.nrOfCol()) ? icol+down_opt[0]/2 : imgReaderEst.nrOfCol()-1;
1536  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
1537  int maxRow=(irow+down_opt[0]/2<imgReaderEst.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderEst.nrOfRow()-1;
1538  if(update){
1539  obsWindowBuffer.clear();
1540  for(int iline=0;iline<obsLineVector.size();++iline){
1541  for(int isample=minCol;isample<=maxCol;++isample){
1542  assert(isample<obsLineVector[iline].size());
1543  obsWindowBuffer.push_back(obsLineVector[iline][isample]);
1544  }
1545  }
1546  // imgReaderObs.readDataBlock(obsWindowBuffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
1547  }
1548  double estValue=estReadBuffer[icol];
1549  double estMeanValue=0;//stat.mean(estWindowBuffer);
1550  double nvalid=0;
1551  //time update
1552  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
1553  assert(modRow>=0&&modRow<imgReaderModel2.nrOfRow());
1554  double modValue=model2LineBuffer[modCol];
1555  bool estNodata=imgReaderEst.isNoData(estValue);
1556  if(estNodata){
1557  //we have not found any valid data yet, better here to take the current model value if valid
1558  if(imgReaderModel2.isNoData(modValue)){//if both estimate and model are no-data, set obs to nodata
1559  estWriteBuffer[icol]=obsnodata_opt[0];
1560  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1561  }
1562  else{
1563  estWriteBuffer[icol]=modValue;
1564  uncertWriteBuffer[icol]=uncertModel_opt[0]*stdDev;
1565  }
1566  }
1567  else{
1568  if(window_opt[0]>0){
1569  try{
1570  // imgReaderModel2.geo2image(geox,geoy,modCol,modRow);//did that already
1571  minCol=(modCol>window_opt[0]/2) ? modCol-window_opt[0]/2 : 0;
1572  maxCol=(modCol+window_opt[0]/2<imgReaderModel2.nrOfCol()) ? modCol+window_opt[0]/2 : imgReaderModel2.nrOfCol()-1;
1573  minRow=(modRow>window_opt[0]/2) ? modRow-window_opt[0]/2 : 0;
1574  maxRow=(modRow+window_opt[0]/2<imgReaderModel2.nrOfRow()) ? modRow+window_opt[0]/2 : imgReaderModel2.nrOfRow()-1;
1575  imgReaderModel2.readDataBlock(model2buffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
1576 
1577  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1578  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1579  minCol=(modCol>window_opt[0]/2) ? modCol-window_opt[0]/2 : 0;
1580  maxCol=(modCol+window_opt[0]/2<imgReaderModel1.nrOfCol()) ? modCol+window_opt[0]/2 : imgReaderModel1.nrOfCol()-1;
1581  minRow=(modRow>window_opt[0]/2) ? modRow-window_opt[0]/2 : 0;
1582  maxRow=(modRow+window_opt[0]/2<imgReaderModel1.nrOfRow()) ? modRow+window_opt[0]/2 : imgReaderModel1.nrOfRow()-1;
1583  imgReaderModel1.readDataBlock(model1buffer,GDT_Float64,minCol,maxCol,minRow,maxRow,0);
1584  // imgReaderEst.image2geo(icol,irow,geox,geoy);
1585  }
1586  catch(string errorString){
1587  cerr << "Error reading data block for " << minCol << "-" << maxCol << ", " << minRow << "-" << maxRow << endl;
1588  }
1589  //erase no-data from buffer
1590  vector<double>::iterator it1=model1buffer.begin();
1591  vector<double>::iterator it2=model2buffer.begin();
1592  while(it1!=model1buffer.end()&&it2!=model2buffer.end()){
1593  //erase nodata
1594  bool modNodata=false;
1595  modNodata=modNodata||imgReaderModel1.isNoData(*it1);
1596  modNodata=modNodata||imgReaderModel2.isNoData(*it2);
1597  if(modNodata){
1598  model1buffer.erase(it1);
1599  model2buffer.erase(it2);
1600  }
1601  else{
1602  ++it1;
1603  ++it2;
1604  }
1605  }
1606  if(model1buffer.size()>minreg_opt[0]&&model2buffer.size()>minreg_opt[0]){
1607  errMod=stat.linear_regression_err(model1buffer,model2buffer,c0mod,c1mod);
1608  errMod*=regTime_opt[0];
1609  }
1610  else{//use global regression...
1611  c0mod=c0modGlobal;
1612  c1mod=c1modGlobal;
1613  }
1614  }
1615  else{
1616  c0mod=c0modGlobal;
1617  c1mod=c1modGlobal;
1618  }
1619  double regTime=c0mod+c1mod*estValue;
1620  double regSensor=c0obs+c1obs*modValue;
1621 
1622  if(regSensor_opt[0]<=0)
1623  estWriteBuffer[icol]=regTime;
1624  else{
1625  double certMod=1;
1626  double certObs=1;
1627  double certNorm=(errMod*errMod+errObs*errObs);
1628  if(certNorm>eps_opt[0]){
1629  certMod=errObs*errObs/certNorm;
1630  certObs=errMod*errMod/certNorm;
1631  }
1632  else{
1633  certMod=0.5;
1634  certObs=0.5;
1635  }
1636  estWriteBuffer[icol]=regTime*certObs+regSensor*certMod;
1637  }
1638 
1639  if(obsmin_opt.size()){
1640  if(estWriteBuffer[icol]<obsmin_opt[0])
1641  estWriteBuffer[icol]=obsnodata_opt[0];
1642  }
1643  if(obsmax_opt.size()){
1644  if(estWriteBuffer[icol]>obsmax_opt[0])
1645  estWriteBuffer[icol]=obsnodata_opt[0];
1646  }
1647 
1648  double totalUncertainty=0;
1649  if(errMod<eps_opt[0])
1650  totalUncertainty=errObs;
1651  else if(errObs<eps_opt[0])
1652  totalUncertainty=errMod;
1653  else{
1654  totalUncertainty=1.0/errMod/errMod+1/errObs/errObs;
1655  totalUncertainty=sqrt(1.0/totalUncertainty);
1656  }
1657  uncertWriteBuffer[icol]=totalUncertainty+uncertReadBuffer[icol];
1658  }
1659  //measurement update
1660  if(update&&!imgReaderObs.isNoData(obsLineBuffer[icol])){
1661  double kalmanGain=1;
1662  double uncertObs=uncertObs_opt[0];
1663  if(uncertObsLineBuffer.size()>icol)
1664  uncertObs=uncertObsLineBuffer[icol];
1665  else if(weight_opt.size()>1||deltaObs_opt.size()){
1666  statfactory::StatFactory statobs;
1667  statobs.setNoDataValues(obsnodata_opt);
1668  double obsMeanValue=(statobs.mean(obsWindowBuffer)-c0obs)/c1obs;
1669  double difference=obsMeanValue-modValue;
1670  if(modValue){
1671  double relativeDifference=difference/modValue;
1672  if(deltaObs_opt.size()){
1673  assert(deltaObs_opt.size()>1);
1674  if(100*relativeDifference<deltaObs_opt[0])//lower bound
1675  kalmanGain=0;
1676  else if(100*relativeDifference>deltaObs_opt[1])//upper bound
1677  kalmanGain=0;
1678  }
1679  else if(weight_opt.size()){
1680  assert(weight_opt.size()>1);
1681  if(obsMeanValue<modValue)
1682  uncertObs=-weight_opt[0]*relativeDifference;
1683  else if(obsMeanValue>modValue)
1684  uncertObs=weight_opt[1]*relativeDifference;
1685  }
1686  }
1687  if(uncertObs<=0)
1688  uncertObs=0;
1689  if(verbose_opt[0]>1)
1690  cout << "obsMeanValue:" << obsMeanValue << ", modValue: " << modValue << endl;
1691  }
1692  if(kalmanGain>0){
1693  if((uncertWriteBuffer[icol]+uncertObs)>eps_opt[0])
1694  kalmanGain=uncertWriteBuffer[icol]/(uncertWriteBuffer[icol]+uncertObs);
1695  }
1696  assert(kalmanGain<=1);
1697  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
1698  if(obsmin_opt.size()){
1699  if(estWriteBuffer[icol]<obsmin_opt[0])
1700  estWriteBuffer[icol]=obsnodata_opt[0];
1701  }
1702  if(obsmax_opt.size()){
1703  if(estWriteBuffer[icol]>obsmax_opt[0])
1704  estWriteBuffer[icol]=obsnodata_opt[0];
1705  }
1706  uncertWriteBuffer[icol]*=(1-kalmanGain);
1707  }
1708  //test
1709  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
1710  if(obsmin_opt.size())
1711  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
1712  if(obsmax_opt.size())
1713  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
1714  }
1715  }
1716  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
1717  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
1718  progress=static_cast<float>((irow+1.0)/imgWriterEst.nrOfRow());
1719  pfnProgress(progress,pszMessage,pProgressArg);
1720  }
1721 
1722  imgWriterEst.close();
1723  imgReaderEst.close();
1724 
1725  if(update){
1726  imgReaderObs.close();
1727  --obsindex;
1728  }
1729  imgReaderModel1.close();
1730  imgReaderModel2.close();
1731  }
1732  }
1733  if(find(direction_opt.begin(),direction_opt.end(),"smooth")!=direction_opt.end()){
1735  cout << "Running smooth model" << endl;
1736  obsindex=0;
1737  for(int modindex=0;modindex<model_opt.size();++modindex){
1738  if(verbose_opt[0]){
1739  cout << "processing time " << tmodel_opt[modindex] << endl;
1740  if(obsindex<relobsindex.size())
1741  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
1742  else
1743  cout << "There is no next observation" << endl;
1744  }
1745  string output;
1746  if(outputfb_opt.size()==model_opt.size())
1747  output=outputfb_opt[modindex];
1748  else{
1749  ostringstream outputstream;
1750  outputstream << outputfb_opt[0] << "_";
1751  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1752  outputstream << ".tif";
1753  // outputstream << outputfb_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1754  output=outputstream.str();
1755  }
1756 
1757  //two band output band0=estimation, band1=uncertainty
1758  imgWriterEst.open(output,ncol,nrow,2,GDT_Float64,imageType,option_opt);
1759  imgWriterEst.setProjectionProj4(projection_opt[0]);
1760  imgWriterEst.setGeoTransform(geotransform);
1761  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
1762 
1763  //open forward and backward estimates
1764  //we assume forward in model and backward in observation...
1765 
1766  string inputfw;
1767  string inputbw;
1768  if(outputfw_opt.size()==model_opt.size())
1769  inputfw=outputfw_opt[modindex];
1770  else{
1771  ostringstream outputstream;
1772  outputstream << outputfw_opt[0] << "_";
1773  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1774  outputstream << ".tif";
1775  // outputstream << outputfw_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1776  inputfw=outputstream.str();
1777  }
1778  if(outputbw_opt.size()==model_opt.size())
1779  inputbw=outputbw_opt[modindex];
1780  else{
1781  ostringstream outputstream;
1782  outputstream << outputbw_opt[0] << "_";
1783  outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1784  outputstream << ".tif";
1785  // outputstream << outputbw_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1786  inputbw=outputstream.str();
1787  }
1788  ImgReaderGdal imgReaderForward(inputfw);
1789  ImgReaderGdal imgReaderBackward(inputbw);
1790  imgReaderForward.setNoData(obsnodata_opt);
1791  if(obsoffset_opt.size())
1792  imgReaderForward.setOffset(obsoffset_opt[0]);
1793  if(obsscale_opt.size())
1794  imgReaderForward.setScale(obsscale_opt[0]);
1795  imgReaderBackward.setNoData(obsnodata_opt);
1796  if(obsoffset_opt.size())
1797  imgReaderBackward.setOffset(obsoffset_opt[0]);
1798  if(obsscale_opt.size())
1799  imgReaderBackward.setScale(obsscale_opt[0]);
1800 
1801  vector<double> estForwardBuffer;
1802  vector<double> estBackwardBuffer;
1803  vector<double> uncertObsLineBuffer;
1804  vector<double> uncertForwardBuffer;
1805  vector<double> uncertBackwardBuffer;
1806  vector<double> uncertReadBuffer;
1807  vector<double> estWriteBuffer(ncol);
1808  vector<double> uncertWriteBuffer(ncol);
1809  // vector<double> lineMask;
1810 
1811  bool update=false;
1812  if(obsindex<relobsindex.size()){
1813  update=(relobsindex[obsindex]==modindex);
1814  }
1815 
1816  if(update){
1817  if(verbose_opt[0])
1818  cout << "***update " << relobsindex[obsindex] << " = " << modindex << " " << observation_opt[obsindex] << " ***" << endl;
1819  imgReaderObs.open(observation_opt[obsindex]);
1820  imgReaderObs.getGeoTransform(geotransform);
1821  imgReaderObs.setNoData(obsnodata_opt);
1822  if(obsoffset_opt.size())
1823  imgReaderObs.setOffset(obsoffset_opt[0]);
1824  if(obsscale_opt.size())
1825  imgReaderObs.setScale(obsscale_opt[0]);
1826  //calculate regression between model and observation
1827  }
1828 
1829  pfnProgress(progress,pszMessage,pProgressArg);
1830 
1831  for(int irow=0;irow<imgWriterEst.nrOfRow();++irow){
1832  assert(irow<imgReaderForward.nrOfRow());
1833  assert(irow<imgReaderBackward.nrOfRow());
1834  imgReaderForward.readData(estForwardBuffer,GDT_Float64,irow,0);
1835  imgReaderBackward.readData(estBackwardBuffer,GDT_Float64,irow,0);
1836  imgReaderForward.readData(uncertForwardBuffer,GDT_Float64,irow,1);
1837  imgReaderBackward.readData(uncertBackwardBuffer,GDT_Float64,irow,1);
1838 
1839  if(update){
1840  imgReaderObs.readData(estWriteBuffer,GDT_Float64,irow,0);
1841  if(imgReaderObs.nrOfBand()>1)
1842  imgReaderObs.readData(uncertObsLineBuffer,GDT_Float64,irow,1);
1843  }
1844 
1845  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
1846  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
1847  imgWriterEst.image2geo(icol,irow,geox,geoy);
1848  double A=estForwardBuffer[icol];
1849  double B=estBackwardBuffer[icol];
1850  double C=uncertForwardBuffer[icol]*uncertForwardBuffer[icol];
1851  double D=uncertBackwardBuffer[icol]*uncertBackwardBuffer[icol];
1852  double uncertObs=uncertObs_opt[0];
1853 
1854  // if(update){//check for nodata in observation
1855  // if(imgReaderObs.isNoData(estWriteBuffer[icol]))
1856  // uncertObs=uncertNodata_opt[0];
1857  // else if(uncertObsLineBuffer.size()>icol)
1858  // uncertObs=uncertObsLineBuffer[icol];
1859  // }
1860 
1861  double noemer=(C+D);
1862  //todo: consistently check for division by zero...
1863  if(imgReaderForward.isNoData(A)&&imgReaderBackward.isNoData(B)){
1864  estWriteBuffer[icol]=obsnodata_opt[0];
1865  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1866  }
1867  else if(imgReaderForward.isNoData(A)){
1868  estWriteBuffer[icol]=B;
1869  uncertWriteBuffer[icol]=uncertBackwardBuffer[icol];
1870  }
1871  else if(imgReaderForward.isNoData(B)){
1872  estWriteBuffer[icol]=A;
1873  uncertWriteBuffer[icol]=uncertForwardBuffer[icol];
1874  }
1875  else{
1876  if(noemer<eps_opt[0]){//simple average if both uncertainties are ~>0
1877  estWriteBuffer[icol]=0.5*(A+B);
1878  uncertWriteBuffer[icol]=uncertObs;
1879  }
1880  else{
1881  estWriteBuffer[icol]=(A*D+B*C)/noemer;
1882  if(obsmin_opt.size()){
1883  if(estWriteBuffer[icol]<obsmin_opt[0])
1884  estWriteBuffer[icol]=obsnodata_opt[0];
1885  }
1886  if(obsmax_opt.size()){
1887  if(estWriteBuffer[icol]>obsmax_opt[0])
1888  estWriteBuffer[icol]=obsnodata_opt[0];
1889  }
1890  double P=0;
1891  if(C>eps_opt[0])
1892  P+=1.0/C;
1893  if(D>eps_opt[0])
1894  P+=1.0/D;
1895  if(uncertObs*uncertObs>eps_opt[0])
1896  P-=1.0/uncertObs/uncertObs;
1897  if(P>eps_opt[0])
1898  P=sqrt(1.0/P);
1899  else
1900  P=0;
1901  uncertWriteBuffer[icol]=P;
1902  }
1903  }
1904  //test
1905  if(!imgReaderObs.isNoData(estWriteBuffer[icol])){
1906  if(obsmin_opt.size())
1907  assert(estWriteBuffer[icol]>=obsmin_opt[0]);
1908  if(obsmax_opt.size())
1909  assert(estWriteBuffer[icol]<=obsmax_opt[0]);
1910  }
1911  }
1912  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
1913  imgWriterEst.writeData(uncertWriteBuffer,GDT_Float64,irow,1);
1914  progress=static_cast<float>((irow+1.0)/imgWriterEst.nrOfRow());
1915  pfnProgress(progress,pszMessage,pProgressArg);
1916  }
1917 
1918  imgWriterEst.close();
1919  imgReaderForward.close();
1920  imgReaderBackward.close();
1921  if(update){
1922  imgReaderObs.close();
1923  ++obsindex;
1924  }
1925  }
1926  }
1927  // if(mask_opt.size())
1928  // maskReader.close();
1929 }
1930 
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract__coll__graph.map0000644000113200011300000000013312616110567026046 00000000000000 pktools-2.6.6/doc/html/dir_2676862852e3d558e3597542a81ecc63_dep.md50000644000113200011300000000004012616110567017757 0000000000000020b99824965ea0ddc79ad9ccbf211999pktools-2.6.6/doc/html/classQMatrix__inherit__graph.map0000644000113200011300000000072012616110567020153 00000000000000 pktools-2.6.6/doc/html/inherit_graph_28.png0000644000113200011300000001726412647437044015523 00000000000000‰PNG  IHDR8‹õV…bKGDÿÿÿ ½§“iIDATxœíÝ{T”õ¾?ð70( †2¨ÜHÔ–J[¥Žˆiž~E‰JHZ™æñR¨•‰‡Ê4×bí–î}´­§¶ÉV‘Fý‘©\œ,QÒ4¹yaP@À —¹}ÎnFa†á6\fü¼Öšµxnßïgžù>žçûç3""0Ƙ 2ïëc¬§p‚cŒ™,NpŒ1“Å Ž1f²}c=éæÍ›X¾|9û:ÖK—.Åœ9s V'8fÒ233ñÓO?!<<¼¯Caí8{ö,9Á1ÖY‰‰‰}kÇܹs ^&÷Á1ÆL'8ƘÉâÇ3Yœàc&‹c:Ô××#&&,õÕ—œœŒ;v`ÿþýH$¡P???œ9s¨®®Ö_wTVV"//¥¥¥?~¼f°¢/q‚c¬• 6àöíÛ ÁñãÇ!•JqèÐ!Lš4 ®®®X¶l™fÝ÷ß8þ<>ùä,X°@³¬yòq–––˜7oV­Z…¢¢"äææbýúõˆŒŒìPlúê4h|}}±nÝ:¼÷Þ{hllD`` $ Äb1®]»,^¼.\èÆzD­V#%%aaa !##ûöíÓÙØë zÁËX?ÓÙ>¸fuuuôÑGQ@@ÙØØ¿¿?}ñÅÔÐÐ@Dú§víÚEäèèH+W®$™LF …‚¦L™B¶¶¶-Ömvÿþ}ŠŠŠ"rqq¡Õ«W“L&#"Òô¹5C«>8]õµ._&“‘ÅÆÆj½¯ªª*Š'OOO*..Ö»:Ò—””DAAA”@MMMúwj;z¢ÎŒˆU‹™®ÄÄDÌ›7†næðöö6x¹½UŸZ­†Z­†@н¯Â* }…]Ñü¸$C>ÚŠ¿èËØÈÜÜ\o__G*¹õîƒc¬ žzê),]ºÔdë3œàë'''ìØ±Ãdë3œàc&‹cÌdq‚cŒ™,NpŒ1“Å_aO„o¿ý¶ÍeMMj ÈÿëûZaa!FŽiÐ29Á1“æêê ‹_±03³À€®8p$¬¬FÀÜÜ••;A¤ÒSë /¼ð‚AËã;Ø¡¶¶§N]Czúeœ˜>Ý!!~6Ì®o‚g¬q‚3r••°|ùÈ̼µºírð`+Œ!äöDáKT#––öp ¡¾^®7¹ Xºô|øá‹½c}ÿ…!¹\‰õëaáÂ]¨­m„R©ÿçîT*22 z):Æú>ƒ327nÜÃ’%ßãòå2:ÒÁ@œ?_„†9llô|Œõ:Üõë×QRRÒÛ±°øè£4”—×ÌÌÌ`nnóŸ‡=üZˆZ­ø”J~û-/¾ÐË÷­ŒŒ L›6 r¹¼¯Caƒ¯¿þÚ`åéLpxê©§ðôÓO¬"f»v¹¢¬¬µµhlTB&“£®® 2™ Ô×?œnhP ¡¡ ÕÕ¨«k€JEhhxòò²²2Èår$&&öu(¬ñññ(..6h™m^¢8B¡Ð •±î …7®sÛäååüýý{ "ãÞ×!°vЬsºzL™ZíñWXXGGÇž®¦Ëz3¾W^yååå(//Ç™3g@3]^^Þ/F9ëë› _À‚ß" `=jjú:¤^ŽŠŠ ÍçÓìâÅ‹())Áœ9sº\vwÛZMM ¢¢¢ ‰0tèPDFFâÞ½{].Och£Ñãw2¨Õjƒ†Ô›ñY[[ÃÚÚPWW6¬ïM¤P¨ ‘\ARÒHIɃB¡`"BM vv6}b¯qvvFHH1eÊÍ|±XŒàà`¸¸¸t¹ìî¶µùó磱±‰Ë—/DzeË ú¿þÚF»Ê`gpÉÉÉ3f ¬¬¬0räHüðÀ   v’J¥ÂÖ­[áããƒÁƒcòäÉøý÷ß5å´>µ~|úÕW_Ň~¨YÖÔÔ{{{=z P(ggg899!&& …J¥±±±pww‡P(Ä›o¾‰êêjñ@uu5-ZGGG¸¹¹!::šXÒÓÓáîîŽÓ§OëÜwîÜACC÷Ï| UŽ. … ©©yx÷Ýïáí½o¿ý¿8q"r¹RsGÄ“*""IIIP©Ýã+‹1oÞ<Íto·5‰D‚””ÄÅÅÁ×מžžˆ‹‹ÃñãÇÛ=¦t1†6j¤Cnn.åææêZ¤S]] 8vìØAååå´{÷nTWWGR©”¯&>>žœœœH,Ó­[·èèÑ£$‰4ëTWWÓ?þñÍúOïß¿ŸÜÝÝI­VÑ‘#GH$‘B¡ "¢-[¶Ð믿N7oÞ¤ììl?~<­[·Ž¶nÝJþþþ”M9994iÒ$ŠŽŽ&"ÒŠˆ(22’BBBèúõë”M´qãFͺ³fÍ¢“'OR]]]‹íÎ;G .$¡PH·nÝÒ»ÏtÕÛZjj*999QLL ê]WŸæÏS¥RÓ¯¿^£+~ OϵäⲚÜÜ>$—Ú|ݸq·Ëõöhw?·VUUE¤S§NÑ•+WÈÜÜœ***4ëôv[«©©!©TªiëDD›7o¦ÀÀÀv©Çõ×6JDNáááÝ*£5σëì7ß«ªªàì쌯¾ú ï¼óìììP__ÂÛÛ[sFàëë‹O>ù .Ôl¿gÏ,\¸°Ý³†††899A"‘`„ ˆˆˆÀˆ#°iÓ&ÀèÑ£!‘H4ÿ!ÓÒÒ™L†¯¾ú aaa€+W®àêÕ« CAAA‹ø ¬­­‘••¥yÿ‡š5kpìØ1x{{#;;Ï<ó €‡·µþøcÌš5KkÝ’’Œ;¶Å¼1cÆt¨¼òÊ+HJJ‚ŸŸ’““ñçŸj–kõ‘ØÙÙ¡©© ÞÞÙ=zôhŒ=Zg•••P©TðôôÔÌóòòBii©fzÔ¨Q6êÈÈHÌš5 Û¶mÄ  >,‰°qãF|úé§8|ø0>ÿüs¬\¹iii¾Wø·ßаwï£ýÔÑä›7ÿÜé˜ûÀ¾ÓÛDDD`åÊ•øæ›o ‹±dÉ’Ë{»­5Û·obbb0sæLœ?B¡Pï1e,m´§$ÁÉd2¨Õj•˜˜ˆyóþÚéífÏž·ß~ ÈÊÊÒœ‘5ëí¶<¼}ÇŽHNNƸÇnHÖwLKí)d033ÃŒ3ðã?âÁƒËå°´´„ͣѷæ™÷Þ{1118rä***püøqlذA³^MM víÚÕæôŒ3PUU…ØØX¼ýöÛ-âxíµ×ðñÇãÆÈÎÎÆÌ™3ñ·¿ý QQQøôÓO‘››‹ÜÜ\¬X±7nÜh±ms|–––˜7oV­Z…¢¢"äææbýúõˆŒŒÔzßH$‹Å¸ví|||°xñb\¸p¡{óµZ””„……!((D„ŒŒ ìÛ·¯Ó_7pv¶ÅâÅÁHÖB"Y‹•+§ÃÕÕþßï™ Øš ^}õU|ðÁ˜6mšÖƒ'z»­ÕÔÔà³Ï>C\\¬­­qõêUÍKß1eLm´Gèê˜ëì ÑÃÎ\OOO0`5ŠŽ9BDD …‚¦L™B¶¶¶DD¤T*iëÖ­äååEƒ ¢çž{Ž2335™­;6uut.Y²„lmmµ:ùú>Ϭ¬›´~½˜üü>!—´žÄA†f?ÿü3 ]»vi-ëí¶vúôi óÕÞ1õ¸þÚF‰úñ kI­VC­VC èÞ™‘B¡hq‰ÒUù<›š”HO¿ ±øRSó P¨‰\¢Î{¢¿ö¢Kk£@?d`-™››wzIC5œŽ8P€—^ƒ—^ƒÚÚF;–ƒ‹‹ùçM”1¶Ñ®àÇ´ l…¹s'`îÜ } cÝÒ/n¶gŒ±žÀ Ž1f²8Á1ÆL'8ƘÉâA%—?üIÁêjŠŠîC©Tcøð& 4°¯Cc¬×´™àjjj••Õ›±°HN¾Š¢¢û¨¯W@&S@&Sj~U.W¡±Q‰¦&%Ôjíï}mÜ,Yò|ïÝ„††öu¬9996h™:œ“““A+a†óçŸå8{öFû+ê0aÂGÓÿMš4 óçÏoñl7Ö?k¾ìk(:ïd`ý!!!ë׋¡V”ÊŽ¸C‡Ú"''î‰øí Æšñ ƒ‘133ÂÏáĉ0|¸#‚ö?BÀ¡¡þœÜ؇œ‘òõ†ÔÔh¼ùæd€¹yÛÉK¥RÃÚZ€ìì¾'“=QøÕ?žƒ÷ß߇ÆF9 íKV sˆDCPRrÎÎOaÚ4?„„ŒÆóÏûò¨*3iœàLÄ;µX¾|/Μ‘¶A533CP'~üq9nÞ¼‡_ÍGjjNº•J W„†ú!4ÔÏ<ãÆ—±Ì¤p‚3!D„Ý»Ãÿ÷/Ms¬_ÿÿ´¾"“ÉñÇÅHIÉÃÏ?g£¼¼Bá`<ÿ¼/BCýñÿ1¶¶|vÇŒ'8”™yË–íÁÝ»õP©T8uj¼½õnsíZÒÒò’’‡ Šaii‰G"4Ô3g>7·žyÌ5c=‰œ‰ª©i@tt"¤ÒJüòËÚNm{ÿ~=22¤HM}˜ð<ÁÃÃÓ§ûcÆ yÂÒÒ¢‡"gÌp8Á1½T*5.\(Fjêeüö[>²³K0dˆ ¦NõÁÔ©>˜1#NNƒû:LÆtâÇ:…*˜1áǺŒ*XÇ Ž T°þ†ëŬ'q‚cýJ[ÁÁ>˜9óxzòÃXYÇq‚cýT°îâÇŒT°®àÇŒT°ŽàÇŒT°¶p‚c&§y â×_óqöl,,Ìy â Å Ž™4¨x²q‚cFáäÉ“(((èVJ%¡¨¨RiòóëP]­€­­ÞÞ¶˜={î³3VVVV˜?> Ðb>'8f,--¡T* Z¦@à+«Q]}Ü e³Þ÷ã?âµ×^k1Oç/Û3Öß(•J8pÀà¿|ÎLƒ™™™Î€ü»¨Œ1“Å Ž1f²8Á1ÆL'8ƘÉâÇLÎöíÛáêê µZÝb>ÁÃÃÛ¶më£È:§  À`·›u·,}Û2NCãÇLNxx8***pæÌ™ó/^¼ˆ’’Ì™3§ËeÂÑѱËÛ×ÔÔ ** "‘C‡Edd$îÝ»×åò˜~œà˜ÉqvvFHH[̋ņ‹‹K—ËV«ÕÝJHóçÏGii)$ Ο?{÷îaÙ²e].éÇ Ž™¤ˆˆ$%%A¥Riæ‰ÅbÌ›7O3­P(ggg899!&& …J¥±±±pww‡P(Ä›o¾‰êêj@PP`ذašrª««±hÑ"8::ÂÍÍ ÑÑÑhllÔ\º¥§§ÃÝ݉)))ˆ‹‹ƒ¯¯/<==‡ãÇC¥RaëÖ­ðññÁàÁƒ1yòdüþûïzßã;wÐÐР5¿½²Ú‹·™®KÏ„„xzzB(bÙ²e:ëok¿v4~ƒ"ÆŒ:pà@‡×¯ªª¢Ò©S§ˆˆèÊ•+dnnNšu¶lÙB¯¿þ:ݼy“²³³iüøñ´nÝ:Úºu+ùûûSvv6åääФI“(::šˆˆ¤R)µ>l"##)$$„®_¿NÙÙÙ@7nÔ¬;kÖ,:yò$ÕÔÔT*%…B¡ÙvóæÍHñññäääDb±˜nݺEG%‘H¤UѹsçháÂ…$ éÖ­[ZËÛ+«½x›=>Ýü÷´iÓ(??Ÿ233ÉËˋ֭[§µ][ûµµÔÔTrrr¢˜˜*,,lÿCÕ£­öÁ Ž…Î&8"¢°°0Z¾|9}ùå—4mÚ´ËGEåååšéÔÔT;v,ùúú’X,ÖÌ¿|ù²fºõÁ,—ËÉ‚rss5óÄb1yyyiÖÍÎÎÖŠ­¦¦†Ö®]KtñâEòññ¡ï¿ÿ¾Å:ÿüç?5uÉd2Ú³gMœ8‘ÆG;wî¤ÚÚZï[_Y‰·™®÷ø{9pà1Bk»¶ö«.eeeKnnnôòË/Ó‰'H¥Ré\WNp̨u%Á%&&’³³3)•JzöÙgiçÎ-–[YY€/;;;²²²¢œœe¶>˜KJJÉd2ͼììl²²²Ò¬+—Ë[”ñ¯ý‹\]]éwÞ¡Û·o‘µµ5]ºt©Åzþù'Мé,\¸~ÿýwR«Õzß·¾²:o³üü|­÷øvYYY:·kk¿ê#—Ë)11‘¦L™B>>>tóæM½ë·ÖVûà>8f²fÏžúúz$$$ ++ aaa-–;::B*•‚þ£GUU233!‰P\\¬YïÒ¥KøòË/uÖáìì jæ]¿~®®®šiKKKÍßñññˆErr2víÚ¡P>|8²²²Z”—— …ðóóÙ3g‘‘¡él‹¾²:oó=eeeZeK¥RÍßùùùðððÐZ§­ýªOee%òòòPZZŠñãÇÃÚÚZïúÖ©4ÉXAÎàˆˆ,X@ööö4cÆ ­e«V­¢9sæPqq1eeeѤI“hÅŠKcÆŒ¡œœÊÉɡɓ'Ó»ï¾KDÎd¿<|ã7($$„ )''‡üýýiÆ Zg6ÕÕÕdccCûöí£+W®´x}óÍ7äääD‡¦òòr:vì9²Åö999´téRrtt¤wÞy‡þøãï¹½²ÚŠ÷Î;€vïÞM555¦uJR©”Î;GÞÞÞôÕW_i½Ï¶ökk*•ŠNœ8A¯¾ú*¹ººÒ† ¨¬¬¬3¯F[íƒ3 ]Mp?ÿü3 ]»vi-{ðà½õÖ[dooO´dɪ¯¯§ÆÆFŠŽŽ&‘HDvvvAUUUDD¤P(hÊ”)dkk«)çþýûEäââB«W¯&™L¦uàŸ>}ZëÒ­ù¥T*iëÖ­äååEƒ ¢çž{Ž233u2TUUQ|||8999ÑG}DMMMZï³­ýÚZRRQBB555uèólK[탟ÇŒ‚™™?.©µZ µZ À8Ÿz¦P(Z\¾wG[íÃ8÷ c æææ077ÞntC%7}Œwï0ÆX;8Á1ÆL'8ƘÉâÇ3Yœàc&‹cÌdq‚cŒ™,þ¢/3  Å³Ýkø™­“'O¢²²²¯Ã`ý”……^zé%­ù|Ç3YÜÇ3Yœàc&‹cÌd ìë c¬'ü»~À±ˆÐØ IEND®B`‚pktools-2.6.6/doc/html/classONE__CLASS__Q__inherit__graph.md50000644000113200011300000000004012616110566020614 000000000000003cc848b1d60d5cb3df39d11225084950pktools-2.6.6/doc/html/classImgUpdaterGdal-members.html0000644000113200011300000010561612647637662020065 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ImgUpdaterGdal Member List

This is the complete list of members for ImgUpdaterGdal, including all inherited members.

close(void) (defined in ImgUpdaterGdal)ImgUpdaterGdalvirtual
close(void) (defined in ImgUpdaterGdal)ImgUpdaterGdalvirtual
copyGeoTransform(const ImgReaderGdal &imgSrc) (defined in ImgWriterGdal)ImgWriterGdal
covers(double x, double y) const (defined in ImgRasterGdal)ImgRasterGdal
covers(double ulx, double uly, double lrx, double lry) const (defined in ImgRasterGdal)ImgRasterGdal
GDALSetNoDataValue(double noDataValue, int band=0) (defined in ImgRasterGdal)ImgRasterGdalinline
geo2image(double x, double y, double &i, double &j) const (defined in ImgRasterGdal)ImgRasterGdal
getBoundingBox(double &ulx, double &uly, double &lrx, double &lry) const (defined in ImgRasterGdal)ImgRasterGdal
getCenterPos(double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
getColorTable(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getCompression() const (defined in ImgRasterGdal)ImgRasterGdal
getDataset() (defined in ImgRasterGdal)ImgRasterGdalinline
getDataType(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getDeltaX(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDeltaY(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getDriverDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getFileName() const (defined in ImgRasterGdal)ImgRasterGdalinline
getGeoTransform() const (defined in ImgRasterGdal)ImgRasterGdal
getGeoTransform(double *gt) const (defined in ImgRasterGdal)ImgRasterGdal
getHistogram(std::vector< double > &histvector, double &min, double &max, unsigned int &nbin, int theBand=0, bool kde=false) (defined in ImgReaderGdal)ImgReaderGdal
getImageDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getImageType() const (defined in ImgRasterGdal)ImgRasterGdalinline
getInterleave() const (defined in ImgRasterGdal)ImgRasterGdal
getLrx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getLry() const (defined in ImgRasterGdal)ImgRasterGdalinline
getMax(int &col, int &row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getMetadata() (defined in ImgRasterGdal)ImgRasterGdal
getMetadata() const (defined in ImgRasterGdal)ImgRasterGdal
getMetadata(std::list< std::string > &metadata) const (defined in ImgRasterGdal)ImgRasterGdal
getMetadataItem() const (defined in ImgRasterGdal)ImgRasterGdal
getMin(int &col, int &row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getMinMax(int startCol, int endCol, int startRow, int endRow, int band, double &minValue, double &maxValue) const (defined in ImgReaderGdal)ImgReaderGdal
getMinMax(double &minValue, double &maxValue, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getNoDataValues(std::vector< double > &noDataValues) const (defined in ImgRasterGdal)ImgRasterGdal
getNvalid(int band) const (defined in ImgReaderGdal)ImgReaderGdal
getProjection(void) const (defined in ImgRasterGdal)ImgRasterGdal
getProjectionRef(void) const (defined in ImgRasterGdal)ImgRasterGdal
getRange(std::vector< short > &range, int Band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getRasterBand(int band=0) (defined in ImgRasterGdal)ImgRasterGdal
getRefPix(double &refX, double &refY, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getUlx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getUly() const (defined in ImgRasterGdal)ImgRasterGdalinline
image2geo(double i, double j, double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdal
ImgReaderGdal(void) (defined in ImgReaderGdal)ImgReaderGdal
ImgReaderGdal(const std::string &filename, const GDALAccess &readMode=GA_ReadOnly) (defined in ImgReaderGdal)ImgReaderGdalinline
ImgUpdaterGdal(void) (defined in ImgUpdaterGdal)ImgUpdaterGdal
ImgUpdaterGdal(const std::string &filename) (defined in ImgUpdaterGdal)ImgUpdaterGdalinline
ImgUpdaterGdal(void) (defined in ImgUpdaterGdal)ImgUpdaterGdal
ImgUpdaterGdal(const std::string &filename, const GDALAccess &readMode=GA_Update) (defined in ImgUpdaterGdal)ImgUpdaterGdal
ImgWriterGdal(void) (defined in ImgWriterGdal)ImgWriterGdal
isGeoRef() const (defined in ImgRasterGdal)ImgRasterGdalinline
isNoData(double value) const (defined in ImgRasterGdal)ImgRasterGdalinline
m_filename (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_gds (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_gt (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_nband (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_ncol (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_noDataValues (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_nrow (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_offset (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
m_options (defined in ImgWriterGdal)ImgWriterGdalprotected
m_scale (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
nrOfBand(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfCol(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfRow(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
open(const std::string &filename) (defined in ImgUpdaterGdal)ImgUpdaterGdal
open(const std::string &filename, const GDALAccess &readMode=GA_Update) (defined in ImgUpdaterGdal)ImgUpdaterGdal
open(const std::string &filename, const ImgReaderGdal &imgSrc, const std::vector< std::string > &options=std::vector< std::string >()) (defined in ImgWriterGdal)ImgWriterGdal
open(const std::string &filename, int ncol, int nrow, int nband, const GDALDataType &dataType, const std::string &imageType, const std::vector< std::string > &options=std::vector< std::string >()) (defined in ImgWriterGdal)ImgWriterGdal
pushNoDataValue(double noDataValue) (defined in ImgRasterGdal)ImgRasterGdal
rasterizeOgr(ImgReaderOgr &ogrReader, const std::vector< double > &burnValues=std::vector< double >(), const std::vector< std::string > &layernames=std::vector< std::string >()) (defined in ImgWriterGdal)ImgWriterGdal
readData(T &value, const GDALDataType &dataType, int col, int row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, double row, int band=0, RESAMPLE resample=NEAR) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, double row, int band=0, RESAMPLE resample=NEAR) const (defined in ImgReaderGdal)ImgReaderGdal
readDataBlock(Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readDataBlock(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
setCodec() (defined in ImgUpdaterGdal)ImgUpdaterGdalprotected
setCodec(const GDALAccess &readMode=GA_ReadOnly) (defined in ImgReaderGdal)ImgReaderGdalprotected
setCodec(const GDALDataType &dataType, const std::string &imageType) (defined in ImgWriterGdal)ImgWriterGdalprotected
setCodec(const ImgReaderGdal &ImgSrc) (defined in ImgWriterGdal)ImgWriterGdalprotected
setColorTable(const std::string &filename, int band=0) (defined in ImgWriterGdal)ImgWriterGdal
setColorTable(GDALColorTable *colorTable, int band=0) (defined in ImgWriterGdal)ImgWriterGdal
setGeoTransform(double *gt) (defined in ImgWriterGdal)ImgWriterGdal
setImageDescription(const std::string &imageDescription) (defined in ImgWriterGdal)ImgWriterGdalinline
setMetadata(char **metadata) (defined in ImgWriterGdal)ImgWriterGdal
setNoData(const std::vector< double > nodata) (defined in ImgRasterGdal)ImgRasterGdalinline
setOffset(double theOffset, int band=0) (defined in ImgReaderGdal)ImgReaderGdalinline
setProjection(const std::string &projection) (defined in ImgWriterGdal)ImgWriterGdal
setProjectionProj4(const std::string &projection) (defined in ImgWriterGdal)ImgWriterGdal
setScale(double theScale, int band=0) (defined in ImgReaderGdal)ImgReaderGdalinline
writeData(T &value, const GDALDataType &dataType, int col, int row, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeData(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeData(std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeData(void *pdata, const GDALDataType &dataType, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeDataBlock(Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
~ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdalinlinevirtual
~ImgReaderGdal(void) (defined in ImgReaderGdal)ImgReaderGdal
~ImgUpdaterGdal(void) (defined in ImgUpdaterGdal)ImgUpdaterGdal
~ImgUpdaterGdal(void) (defined in ImgUpdaterGdal)ImgUpdaterGdal
~ImgWriterGdal(void) (defined in ImgWriterGdal)ImgWriterGdal
pktools-2.6.6/doc/html/pksieve_8cc_source.html0000644000113200011300000005520212647637662016334 00000000000000 pktools: /home/kempenep/pktools/src/apps/pksieve.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksieve.cc
1 /**********************************************************************
2 pksieve.cc: program to sieve filter raster image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "cpl_string.h"
21 #include "gdal_priv.h"
22 #include "gdal.h"
23 #include "imageclasses/ImgReaderGdal.h"
24 #include "imageclasses/ImgWriterGdal.h"
25 // #include "imageclasses/ImgWriterOgr.h"
26 #include "base/Optionpk.h"
27 #include "ogrsf_frmts.h"
28 extern "C" {
29 #include "gdal_alg.h"
30 #include "ogr_api.h"
31 }
32 /******************************************************************************/
72 using namespace std;
73 
74 int main(int argc,char **argv) {
75  Optionpk<string> input_opt("i", "input", "Input image file");
76  Optionpk<string> mask_opt("m", "mask", "Use the first band of the specified file as a validity mask (zero is invalid, non-zero is valid).");
77  Optionpk<string> output_opt("o", "output", "Output image file");
78  Optionpk<int> band_opt("b", "band", "the band to be used from input file", 0);
79  Optionpk<int> connect_opt("c", "connect", "the connectedness: 4 directions or 8 directions", 8);
80  Optionpk<int> size_opt("s", "size", "raster polygons with sizes smaller than this will be merged into their largest neighbour. No sieve is performed if size = 0", 0);
81  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", "");
82  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
83  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
84  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
85 
86  bool doProcess;//stop process when program was invoked with help option (-h --help)
87  try{
88  doProcess=input_opt.retrieveOption(argc,argv);
89  size_opt.retrieveOption(argc,argv);
90  output_opt.retrieveOption(argc,argv);
91  connect_opt.retrieveOption(argc,argv);
92  band_opt.retrieveOption(argc,argv);
93  mask_opt.retrieveOption(argc,argv);
94  otype_opt.retrieveOption(argc,argv);
95  option_opt.retrieveOption(argc,argv);
96  colorTable_opt.retrieveOption(argc,argv);
97  verbose_opt.retrieveOption(argc,argv);
98  }
99  catch(string predefinedString){
100  std::cout << predefinedString << std::endl;
101  exit(0);
102  }
103  if(!doProcess){
104  cout << endl;
105  cout << "Usage: pksieve -i input [-s size] -o output" << endl;
106  cout << endl;
107  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
108  exit(0);//help was invoked, stop processing
109  }
110 
111  GDALAllRegister();
112 
113  double dfComplete=0.0;
114  const char* pszMessage;
115  void* pProgressArg=NULL;
116  GDALProgressFunc pfnProgress=GDALTermProgress;
117  pfnProgress(dfComplete,pszMessage,pProgressArg);
118 
119  ImgReaderGdal maskReader;
120  GDALRasterBand *maskBand=NULL;
121  if(mask_opt.size()){
122  if(verbose_opt[0])
123  cout << "opening mask file " << mask_opt[0] << endl;
124  maskReader.open(mask_opt[0]);
125  maskBand = maskReader.getRasterBand(0);
126  }
127 
128  assert(input_opt.size());
129  assert(output_opt.size());
130  ImgReaderGdal inputReader(input_opt[0]);
131  GDALRasterBand *inputBand;
132  inputBand=inputReader.getRasterBand(band_opt[0]);
133 
134  ImgWriterGdal outputWriter;
135  GDALRasterBand *outputBand=NULL;
136  if(verbose_opt[0])
137  cout << "opening output file " << output_opt[0] << endl;
138  outputWriter.open(output_opt[0],inputReader);
139  if(colorTable_opt.size()){
140  if(colorTable_opt[0]!="none")
141  outputWriter.setColorTable(colorTable_opt[0]);
142  }
143  else if (inputReader.getColorTable()!=NULL)//copy colorTable from input image
144  outputWriter.setColorTable(inputReader.getColorTable());
145  outputBand = outputWriter.getRasterBand(0);
146  //sieve filter to remove small raster elements (overwrite input band)
147  if(size_opt[0]){
148  if(GDALSieveFilter((GDALRasterBandH)inputBand, (GDALRasterBandH)maskBand, (GDALRasterBandH)outputBand, size_opt[0], connect_opt[0],NULL,pfnProgress,pProgressArg)!=CE_None)
149  cerr << CPLGetLastErrorMsg() << endl;
150  else{
151  dfComplete=1.0;
152  pfnProgress(dfComplete,pszMessage,pProgressArg);
153  }
154  }
155  inputReader.close();
156  if(mask_opt.size())
157  maskReader.close();
158  outputWriter.close();
159 }
160 
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__grid_1_1pkextract__grid.html0000644000113200011300000002633512647637662026107 00000000000000 pktools: qgis.pktools.pkextract_grid.pkextract_grid Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkextract_grid.pkextract_grid Class Reference
Inheritance diagram for qgis.pktools.pkextract_grid.pkextract_grid:
Collaboration diagram for qgis.pktools.pkextract_grid.pkextract_grid:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
 
string RULE = "RULE"
 
string POLYGON = "POLYGON"
 
string BUFFER = "BUFFER"
 
string GRID = "GRID"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string EXTRA = 'EXTRA'
 
string FORMAT = "FORMAT"
 

Detailed Description

Definition at line 87 of file pkextract_grid.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_27.map0000644000113200011300000000026712647437044015506 00000000000000 pktools-2.6.6/doc/html/tab_s.png0000644000113200011300000000027012647637661013453 00000000000000‰PNG  IHDR$ÇÇ[IDATxíÝ ‚@@Ñ£?Q…¤"š¢%¦I‘—Šf–6[´HÃäQƒ<Þâõþ]ždr Í’s?ˆO=Ñññw'ÌF‡Ž íðö-~rÃ[œèŠ­ì¬mƒÖ¬ƒݯнŠÕF)Yº% §`nÌ,9B ™’©!ÑŒ\ý<Å#üîî•IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass.html0000644000113200011300000002557612647637662021475 00000000000000 pktools: qgis.pkreclass.pkreclass Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pkreclass.pkreclass:
Collaboration diagram for qgis.pkreclass.pkreclass:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string CLASS = "CLASS"
 
string BAND = "BAND"
 
string RECLASS = "RECLASS"
 
string MASK = "MASK"
 
string MSKNODATA = "MSKNODATA"
 
string NODATA = "NODATA"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkreclass.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask.html0000644000113200011300000002614512647637662023570 00000000000000 pktools: qgis.pktools.pksetmask.pksetmask Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pksetmask.pksetmask Class Reference
Inheritance diagram for qgis.pktools.pksetmask.pksetmask:
Collaboration diagram for qgis.pktools.pksetmask.pksetmask:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string MASK = "MASK"
 
string MSKNODATA = "MSKNODATA"
 
string MSKBAND = "MSKBAND"
 
list OPERATOR_OPTIONS = ["=","<",">","!"]
 
string OPERATOR = "OPERATOR"
 
string NODATA = "NODATA"
 
string OUTPUT = "OUTPUT"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pksetmask.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classOptionpk__inherit__graph.png0000644000113200011300000000640612616110567020407 00000000000000‰PNG  IHDR}p¼|è¬bKGDÿÿÿ ½§“ »IDATxœímLS×ÀO[´EP@ HéÆKqâŒÓ4‘€Y– Áé&/ld ÆÈ`qY´sËœ×ÅÍ) nŽ9@^:‘)alÀ (¶bP ã”†5k+ }¹çÿálM-¥®-z¬Þßsïé¹ÏyÎÏÓsï%½÷P „€ä‰CÅÀs é¤w<ÞñàbºÓ××799‰+•g*•Ê`0ÐîCÞ¥Ré¢E‹èt:ŽÄžqär¹ŸŸŸeï6›íëëûijzöinn6Ý%çw<Þñ@zÇé×{?…By¬MÌ!åååKtwwÏy[sà]"‘0™LÇã`o7>>^&“Éd²ÖÖV€ì_ÂÃÃç°„ùu¤ñ÷ß;{»®®®®®®µZ X²dÉ7Ãæñ^[[»bÅ ƒôã?Ö®] þÍÒ`0p¹Ü… FEEµ··££L'ãvBBBnn.*œžžöòòºté@§Óåççûùùùúúæççët:½^Ïçó9ŽOZZšJ¥2k R©vìØÁd2Ùlv^^ÞÔÔjè÷ßçp8---f‘ËåvÜœÛw”  MMMcccpvÔj5N/,,”ÉdgΜqqqQ«Õ}}}Æ8À××W(ŽŽŽ^ºt‰Åb¡T*Õ©S§Pãvyy9‡Ã!BXSSÃb±t:„ðÈ‘#[·n‰D«V­Ú·o_AAAxx¸H$‹Å‘‘‘yyyBÓv!„)))111"‘hùòåŸ|ò ªðÚk¯566ªÕjcÍŽŽŽôôtŸÑÑQ‹Ý4‹lJCC ‰ÄЍ™˜¹µÍ»B¡˜7oÞÑ£G•J%A<0 ¦Yr¹Ü³gÏëÿðóuB811áææÖÑÑ!LLLüè£PùÒ¥Ke2™±Ÿ+W®  …¨äÎ;hÛ´]­VK£Ñnß¾v…BaHHª ‰P¡F£)))‰ˆˆxå•WŠŠŠŸ¿bÅ ±X,‹£¢¢Þ}÷]ã¨4NÉÉÉ111‰D,‡‡‡8p`æ°‹ÅYYYL&sçγuÓÊx7 õõõ J¥Vt™âèï¦ÒT*¥ººc>öá|Þ««;Mû§×MM½ããŒ)Ù“yW(&®\¹g0ÿI&ú,QYYi|‡÷Lñ\ÙÆç6›ç‡?þøÃʧäüŽÒ;Hïx ½ãaž×žšš:{öìõë×e2‡ÃÙ°aCbb"F{äR©ôwÞijjr0»ã466~öÙg3ËO:â`VÖqÔûäädvv¶——WVV‹ÅúóÏ?Ïœ9ÓÙÙùå—_Z|«½L&ÛµkWMM ÀÝÝ=))ÉÁ!**ªººeµgÏ´ X´h‘ÕãæG½—””xzz d™Íf¯Y³†ÇãÕÕÕ½þúë3ë1>>޶=<<233LÀèt:z‡©F£,^¼ø‰5íèüÞÐЖ–f:´ FbbbCCƒT*ŽŽ¾víZjjê–-[¾ùæN·{÷nÀ›o¾ @ÐQjµúðáÃññño½õÖÉ“'µZ- ::ú·ß~KOOß¼ysyy¹ñ³˜Æ¦!„'OžÌÈȸß»hT*Õôô´­´ï¨GâwµZ­P(fN…!!!CCChûÂ… _|ñÅ¡C‡ÚÛÛKKKOœ8 …f‡;vL.—9räúõëeee¨¼¥¥åÛo¿ÍÊÊB+ŒYŒ‰ !„EEE7nܦÁ{{{>ÌãñЂ‡6100˜˜XTT$“Él=Ö åz†B¡Ä?¯ËÎÎf³Ù/½ôRFFFCCƒÅúz½¾±±ñ½÷Þó÷÷ âñxÆš îîú*À8AYŒY\\|þüy>ŸoœµZí¯¿þš-–/_^ZZêíímk_V¯^}úôi:ž““óñÇ£UŸl 2‡¼»»»/^¼¸¿¿ß¬¼¿¿ŸËå¢m6›68Ž\.·­ö‡Qk¢VÍVû±óîÝ»+W®er@IEND®B`‚pktools-2.6.6/doc/html/Egcs_8cc_source.html0000644000113200011300000007762112647637661015557 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Egcs.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
Egcs.cc
1 /**********************************************************************
2 Egcs.cc: Conversions from and to european grid coding system
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "Egcs.h"
21 #include <iostream>
22 #include <sstream>
23 #include <iomanip>
24 #include <assert.h>
25 
26 Egcs::Egcs(){
27 }
28 
29 // Egcs::Egcs(unsigned short level)
30 // : m_level(level){
31 // }
32 
33 
34 Egcs::Egcs(unsigned short level)
35 {
36  m_level=level;
37 }
38 
39 unsigned short Egcs::cell2level(const std::string& cellCode) const{
40  size_t pos=cellCode.find("-");
41  std::string TILE=cellCode.substr(0,pos);
42  unsigned short level=0;
43  int base_level=19-(TILE.size()/2-1)*3;
44  int quad_level=0;
45  if(pos!=std::string::npos)
46  quad_level=cellCode.size()-pos-1;
47  if(quad_level>1)
48  level=base_level-2;
49  else if(quad_level>0)
50  level=base_level-1;
51  else
52  level=base_level;
53  return level;
54 }
55 
56 Egcs::~Egcs(){
57 }
58 
59 unsigned short Egcs::res2level(double resolution) const{
60  double base=pow(10,log(resolution*4.0)/log(10.0));
61  double diff=base/(2*resolution);
62  return 0.5+(log(base)/log(10.0)*3+1-diff);
63 }
64 
65 double Egcs::getResolution() const{
66  unsigned short exponent=(m_level+1)/3;
67  double base=pow(10.0,exponent);
68  if((m_level)%3==2)
69  return(base/4);
70  else if((m_level)%3==0)
71  return(base/2);
72  else
73  return(base);
74 }
75 
76 void Egcs::force2grid(double& ulx, double& uly, double& lrx, double &lry) const{
77  double dx=getResolution();
78  double dy=dx;
79  //ulx
80  ulx=floor(ulx);
81  ulx-=static_cast<int>(ulx)%(static_cast<int>(dx));
82  //uly
83  uly=ceil(uly);
84  if(static_cast<int>(uly)%static_cast<int>(dy))
85  uly+=dy;
86  uly-=static_cast<int>(uly)%(static_cast<int>(dy));
87  //lrx
88  lrx=ceil(lrx);
89  if(static_cast<int>(lrx)%static_cast<int>(dx))
90  lrx+=dx;
91  lrx-=static_cast<int>(lrx)%(static_cast<int>(dx));
92  //lry
93  lry=floor(lry);
94  lry-=static_cast<int>(lry)%(static_cast<int>(dy));
95 }
96 
97 void Egcs::cell2bb(const std::string& cellCode, int &ulx, int &uly, int &lrx, int &lry) const{
98  size_t pos=cellCode.find("-");
99  std::string TILE=cellCode.substr(0,pos);
100  std::string TILEX=TILE.substr(0,TILE.size()/2);
101  std::string TILEY=TILE.substr(TILE.size()/2);
102  std::string QUAD;
103  char QUAD1,QUAD2;
104  std::istringstream stilex(TILEX);
105  std::istringstream stiley(TILEY);
106  int llx,lly;
107  stilex >> llx;
108  stiley >> lly;
109  llx*=getBaseSize();
110  lly*=getBaseSize();
111  switch((19-m_level)%3){
112  case(0)://there should be no QUAD
113  assert(pos==std::string::npos);
114  break;
115  case(2)://there is a QUAD2
116  assert(pos+1!=std::string::npos);
117  QUAD=cellCode.substr(pos+1);
118  QUAD2=QUAD.substr(1,1).c_str()[0];
119  switch(QUAD2){
120  case('A'):
121  break;
122  case('C'):
123  lly+=getBaseSize()/4;
124  break;
125  case('D'):
126  lly+=getBaseSize()/4;
127  case('B'):
128  llx+=getBaseSize()/4;
129  break;
130  }
131  case(1)://QUAD1: deliberate fall through from case(2)!
132  if(!QUAD.size()){
133  assert(pos+1!=std::string::npos);
134  QUAD=cellCode.substr(pos+1);
135  }
136  QUAD1=QUAD.substr(0,1).c_str()[0];
137  switch(QUAD1){
138  case('A'):
139  break;
140  case('C'):
141  lly+=getBaseSize()/2;
142  break;
143  case('D'):
144  lly+=getBaseSize()/2;
145  case('B'):
146  llx+=getBaseSize()/2;
147  break;
148  }
149  break;
150  }
151  ulx=llx;
152  uly=static_cast<int>(lly+getSize());
153  lrx=static_cast<int>(llx+getSize());
154  lry=lly;
155 }
156 
157 void Egcs::cell2mid(const std::string& cellCode, double& midX, double& midY) const{
158  int ulx,uly,lrx,lry;
159  cell2bb(cellCode,ulx,uly,lrx,lry);
160  midX=(ulx+lrx)/2.0;
161  midY=(lry+uly)/2.0;
162 }
163 
164 std::string Egcs::geo2cell(double geoX, double geoY) const{
165  int ndgts=7-(m_level+1)/3;
166  double xcel=static_cast<int>(geoX)/getBaseSize();
167  double ycel=static_cast<int>(geoY)/getBaseSize();
168  std::ostringstream osx;
169  std::ostringstream osy, osxy;
170  // osx << setprecision(ndgts) << xcel;
171  // osy << setprecision(ndgts) << ycel;
172  // osx << setprecision(0) << fixed << geoX;
173  // osy << setprecision(0) << fixed << geoY;
174  osx << std::fixed << geoX;
175  osy << std::fixed << geoY;
176  std::string quad1="";
177  std::string quad2="";
178  switch((19-m_level)%3){
179  case(2):
180  if(static_cast<int>(geoX)%(getBaseSize()/2)>=getBaseSize()/2.0){
181  if(static_cast<int>(geoY)%(getBaseSize()/2)>=getBaseSize()/2.0)
182  quad2="D";
183  else
184  quad2="B";
185  }
186  else if(static_cast<int>(geoY)%getBaseSize()>=getBaseSize()/4.0)
187  quad2="C";
188  else
189  quad2="A";
190  case(1)://deliberate fall through!
191  if(static_cast<int>(geoX)%getBaseSize()>=getBaseSize()/2.0){
192  if(static_cast<int>(geoY)%getBaseSize()>=getBaseSize()/2.0)
193  quad1="-D";
194  else
195  quad1="-B";
196  }
197  else if(static_cast<int>(geoY)%getBaseSize()>=getBaseSize()/2.0)
198  quad1="-C";
199  else
200  quad1="-A";
201  break;
202  default:
203  break;
204  }
205  osxy << osx.str().substr(0,ndgts) << osy.str().substr(0,ndgts) << quad1 << quad2;
206  return osxy.str();
207 }
208 
pktools-2.6.6/doc/html/classImgRasterGdal__inherit__graph.md50000644000113200011300000000004012647437043021163 000000000000006107fee37f4417b85195e24e883a7da3pktools-2.6.6/doc/html/pkkalman.html0000644000113200011300000002213012647637662014341 00000000000000 pktools: pkkalman
pktools  2.6.6
Processing Kernel for geospatial data
pkkalman

produce kalman filtered raster time series

SYNOPSIS

Usage: pkkalman -mod modelinput.tif -obs obsinput.tif [-direction [forward|backward|smooth]]* -ofw output_fc.tif -obw output_bw.tif -ofb output_fb.tif

Options[-tmod time]* [-tobs time]* [-modnodata value]* [-obsnodata value]* [-modmask mask.tif] [-obsmask mask.tif] [-msknodata value]* [-mskband] [-u_ofw uncert_fw.tif] [-u_obw uncert_bw.tif] [-u_ofb uncert_fb.tif]

Advanced options (see table)

Description

The utilty pkkalman will complement a time series of observations (option -obs) at fine spatial resolution. A data assimilation technique based on a Kalman filter is hereby used. The data at fine spatial resolution are assimilated with coarse spatial resolution time series at a finer temporal resolution, referred to as a model (option -mod). The time series for both observation and model can either be provided as multi-band raster datasets or as multiple single band datasets. Missing data in the observations are predicted by the algorithm. The model must cover at least the spatial coverage of the observation. The missing data must be provided either as nodata values in the input (using option -obsnodata) or as an external mask (using option -obsmask). The time sequence for the model and observation should be provided via the options -tmod and -tobs. Tuning parameters for the algorithm are process noise (option -q) and the weights for uncertainty of valid observations (-uo) and the model (-um).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    dir direction std::string forward direction to run model (forward|backward|smooth)
    mod model std::string coarse spatial resolution input datasets(s) used as model. Use either multi-band input (-model multiband_model.tif) or multiple single-band inputs (-mod model1 -mod model2 etc.)
    modmaskmodmask std::string model mask datasets(s). Must have same dimension as model input. Use either multi-band input or multiple single-band inputs
    obs observation std::string fine spatial resolution input dataset(s) used as observation. Use either multi-band input (-obs multiband_obs.tif) or multiple single-band inputs (-obs obs1 -obs obs2 etc.)
    obsmaskobsmask std::string observation mask dataset(s). Must have same dimension as observation input (use multi-band input or multiple single-band inputs
    tmod tmodel int time sequence of model input. Sequence must have exact same length as model input. Leave empty to have default sequence 0,1,2,etc.
    tobs tobservation int time sequence of observation input. Sequence must have exact same length as observation input
    a_srs a_srs std::string Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid
    ofw outputfw std::string Output raster dataset for forward model
    u_ofw u_outputfw std::string Uncertainty output raster dataset for forward model
    obw outputbw std::string Output raster dataset for backward model
    u_obw u_outputbw std::string Uncertainty output raster dataset for backward model
    ofb outputfb std::string Output raster dataset for smooth model
    u_ofb u_outputfb std::string Uncertainty output raster dataset for smooth model
    modnodata modnodata double 0 invalid value for model input
    obsnodata obsnodata double 0 invalid value for observation input
    msknodata msknodata float 0 Mask value not to consider
    mskband mskband short 0 Mask band to read (0 indexed)
    obsmin obsmin double Minimum value for observation data
    obsmax obsmax double Maximum value for observation data
    eps eps double 1e-05 epsilon for non zero division
    um uncertmodel double 1 Uncertainty of the model
    uo uncertobs double 1 Uncertainty of valid observations
    unodata uncertnodata double 100 Uncertainty in case of no-data values in observation
    q q double 1 Process noise: expresses instability (variance) of proportions of fine res pixels within a moderate resolution pixel
    down down int Downsampling factor for reading model data to calculate regression (default is ratio between coarse (model) and fine (obs) resolution raster datasets)
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate).
    co co std::string Creation option for output file. Multiple options can be specified.
    v verbose short 0 verbose mode when positive

    Examples

Some examples how to use pkcrop can be found here

pktools-2.6.6/doc/html/FileReaderAscii_8cc_source.html0000644000113200011300000011217712647637662017646 00000000000000 pktools: /home/kempenep/pktools/src/fileclasses/FileReaderAscii.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
FileReaderAscii.cc
1 /**********************************************************************
2 FileReaderAscii.cc: class to read ASCII files using (colum based)
3 Copyright (C) 2008-2013 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #include <iostream>
22 #include "FileReaderAscii.h"
23 
24 FileReaderAscii::FileReaderAscii(void)
25  : m_min(0),m_max(0),m_minRow(0),m_maxRow(0),m_fs(' '),m_comment('#'){
26 }
27 
28 FileReaderAscii::FileReaderAscii(const std::string& filename)
29  : m_min(0),m_max(0),m_minRow(0),m_maxRow(0),m_fs(' '),m_comment('#'){
30  open(filename);
31 }
32 
33 FileReaderAscii::FileReaderAscii(const std::string& filename, const char& fieldseparator)
34  : m_min(0),m_max(0),m_minRow(0),m_maxRow(0),m_fs(fieldseparator),m_comment('#'){
35  open(filename);
36 }
37 
38 FileReaderAscii::~FileReaderAscii(void)
39 {
40 }
41 
42 void FileReaderAscii::open(const std::string& filename){
43  m_filename=filename;
44  m_ifstream.open(filename.c_str(),std::ios_base::in);
45  if(!(m_ifstream)){
46  std::string errorString;
47  errorString="Error: could not open file ";
48  errorString+=filename;
49  throw(errorString);
50  }
51 }
52 
53 void FileReaderAscii::close(){
54  m_ifstream.close();
55  // m_ifstream.clear();
56 }
57 
58 unsigned int FileReaderAscii::nrOfCol(bool checkCols, bool verbose){
59  reset();
60  unsigned int totalCol=0;
61  unsigned int nrow=0;
62  if(m_fs>' '&&m_fs<='~'){//field separator is a regular character (minimum ASCII code is space, maximum ASCII code is tilde)
63  if(verbose)
64  std::cout << "reading csv file " << m_filename << std::endl;
65  std::string csvRecord;
66  while(getline(m_ifstream,csvRecord)){//read a line
67  std::istringstream csvstream(csvRecord);
68  std::string item;
69  unsigned int ncol=0;
70  bool isComment=false;
71  while(getline(csvstream,item,m_fs)){//read a column
72  if(verbose)
73  std::cout << item << " ";
74  size_t pos=item.find(m_comment);
75  if(pos!=std::string::npos){
76  if(pos>0)
77  item=item.substr(0,pos-1);
78  else
79  break;
80  if(verbose)
81  std::cout << "comment found, string is " << item << std::endl;
82  isComment=true;
83  }
84  ++ncol;
85  if(isComment)
86  break;
87  }
88  if(verbose)
89  std::cout << std::endl << "number of columns: " << ncol << std::endl;
90  if(!totalCol)
91  totalCol=ncol;
92  else if(checkCols){
93  if(totalCol!=ncol){
94  std::ostringstream ess;
95  ess << "Error: different number of cols found in line " << nrow << " (" << ncol << "!=" << totalCol << ")" << std::endl;
96  throw(ess.str());
97  }
98  ++nrow;
99  }
100  else
101  break;
102  }
103  }
104  else{//space or tab delimited fields
105  if(verbose)
106  std::cout << "space or tab delimited fields" << std::endl;
107  std::string spaceRecord;
108  while(!getline(m_ifstream, spaceRecord).eof()){
109  if(verbose>1)
110  std::cout << spaceRecord << std::endl;
111  std::istringstream lineStream(spaceRecord);
112  std::string item;
113  unsigned int ncol=0;
114  bool isComment=false;
115  while(lineStream >> item){
116  if(verbose)
117  std::cout << item << " ";
118  size_t pos=item.find(m_comment);
119  if(pos!=std::string::npos){
120  if(pos>0)
121  item=item.substr(0,pos-1);
122  else
123  break;
124  if(verbose)
125  std::cout << "comment found, string is " << item << std::endl;
126  isComment=true;
127  }
128  ++ncol;
129  if(isComment)
130  break;
131  }
132  if(verbose)
133  std::cout << std::endl << "number of columns: " << ncol << std::endl;
134  if(!totalCol)
135  totalCol=ncol;
136  else if(checkCols){
137  if(totalCol!=ncol){
138  std::ostringstream ess;
139  ess << "Error: different number of cols found in line " << nrow << " (" << ncol << "!=" << totalCol << ")" << std::endl;
140  throw(ess.str());
141  }
142  }
143  else
144  break;
145  ++nrow;
146  }
147  }
148  return totalCol;
149 }
150 
151 unsigned int FileReaderAscii::nrOfRow(bool checkCols, bool verbose){
152  reset();
153  unsigned int totalCol=0;
154  unsigned int nrow=0;
155  unsigned int ncomment=0;
156  if(m_fs>' '&&m_fs<='~'){//field separator is a regular character (minimum ASCII code is space, maximum ASCII code is tilde)
157  if(verbose)
158  std::cout << "reading csv file " << m_filename << std::endl;
159  std::string csvRecord;
160  while(getline(m_ifstream,csvRecord)){//read a line
161  std::istringstream csvstream(csvRecord);
162  std::string item;
163  unsigned int ncol=0;
164  bool isComment=false;
165  while(getline(csvstream,item,m_fs)){//read a column
166  if(verbose)
167  std::cout << item << " ";
168  size_t pos=item.find(m_comment);
169  if(pos!=std::string::npos){
170  if(pos>0){
171  if(verbose)
172  std::cout << "comment found, string is " << item << std::endl;
173  isComment=true;
174  }
175  else{
176  ++ncomment;
177  break;
178  }
179  }
180  ++ncol;
181  if(isComment)
182  break;
183  }
184  if(verbose)
185  std::cout << std::endl;
186  if(checkCols){
187  if(totalCol!=ncol){
188  std::ostringstream ess;
189  ess << "Error: different number of cols found in line " << nrow << " (" << ncol << "!=" << totalCol << ")" << std::endl;
190  throw(ess.str());
191  }
192  }
193  ++nrow;
194  }
195  }
196  else{//space or tab delimited fields
197  if(verbose)
198  std::cout << "space or tab delimited fields" << std::endl;
199  std::string spaceRecord;
200  int totalCol=0;
201  while(!getline(m_ifstream, spaceRecord).eof()){
202  if(verbose>1)
203  std::cout << spaceRecord << std::endl;
204  std::istringstream lineStream(spaceRecord);
205  std::string item;
206  unsigned int ncol=0;
207  bool isComment=false;
208  while(lineStream >> item){
209  if(verbose)
210  std::cout << item << " ";
211  size_t pos=item.find(m_comment);
212  if(pos!=std::string::npos){
213  if(pos>0){
214  if(verbose)
215  std::cout << "comment found, string is " << item << std::endl;
216  isComment=true;
217  }
218  else{
219  ++ncomment;
220  break;
221  }
222  }
223  ++ncol;
224  if(isComment)
225  break;
226  }
227  if(verbose)
228  std::cout << std::endl << "number of columns: " << ncol << std::endl;
229  if(checkCols){
230  if(totalCol!=ncol){
231  std::ostringstream ess;
232  ess << "Error: different number of cols found in line " << nrow << " (" << ncol << "!=" << totalCol << ")" << std::endl;
233  throw(ess.str());
234  }
235  }
236  ++nrow;
237  }
238  }
239  return nrow;
240 }
241 
pktools-2.6.6/doc/html/OptFactory_8h_source.html0000644000113200011300000010322512647637661016620 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/OptFactory.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
OptFactory.h
1 /**********************************************************************
2 OptFactory.h: factory class for nlopt::opt (selecting algorithm via string)
3 Copyright (C) 2008-2013 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _OPTFACTORY_H_
21 #define _OPTFACTORY_H_
22 
23 #include <map>
24 
26 {
27 private:
28  static void initMap(std::map<std::string, nlopt::algorithm>& m_algMap){
29  //initialize selMap
30  m_algMap["GN_DIRECT"]=nlopt::GN_DIRECT;
31  m_algMap["GN_DIRECT_L"]=nlopt::GN_DIRECT_L;
32  m_algMap["GN_DIRECT_L_RAND"]=nlopt::GN_DIRECT_L_RAND;
33  m_algMap["GN_DIRECT_NOSCAL"]=nlopt::GN_DIRECT_NOSCAL;
34  m_algMap["GN_DIRECT_L_NOSCAL"]=nlopt::GN_DIRECT_L_NOSCAL;
35  m_algMap["GN_DIRECT_L_RAND_NOSCAL"]=nlopt::GN_DIRECT_L_RAND_NOSCAL;
36  m_algMap["GN_ORIG_DIRECT"]=nlopt::GN_ORIG_DIRECT;
37  m_algMap["GN_ORIG_DIRECT_L"]=nlopt::GN_ORIG_DIRECT_L;
38  m_algMap["GD_STOGO"]=nlopt::GD_STOGO;
39  m_algMap["GD_STOGO_RAND"]=nlopt::GD_STOGO_RAND;
40  m_algMap["LD_LBFGS_NOCEDAL"]=nlopt::LD_LBFGS_NOCEDAL;
41  m_algMap["LD_LBFGS"]=nlopt::LD_LBFGS;
42  m_algMap["LN_PRAXIS"]=nlopt::LN_PRAXIS;
43  m_algMap["LD_VAR1"]=nlopt::LD_VAR1;
44  m_algMap["LD_VAR2"]=nlopt::LD_VAR2;
45  m_algMap["LD_TNEWTON"]=nlopt::LD_TNEWTON;
46  m_algMap["LD_TNEWTON_RESTART"]=nlopt::LD_TNEWTON_RESTART;
47  m_algMap["LD_TNEWTON_PRECOND"]=nlopt::LD_TNEWTON_PRECOND;
48  m_algMap["LD_TNEWTON_PRECOND_RESTART"]=nlopt::LD_TNEWTON_PRECOND_RESTART;
49  m_algMap["GN_CRS2_LM"]=nlopt::GN_CRS2_LM;
50  m_algMap["GN_MLSL"]=nlopt::GN_MLSL;
51  m_algMap["GD_MLSL"]=nlopt::GD_MLSL;
52  m_algMap["GN_MLSL_LDS"]=nlopt::GN_MLSL_LDS;
53  m_algMap["GD_MLSL_LDS"]=nlopt::GD_MLSL_LDS;
54  m_algMap["LD_MMA"]=nlopt::LD_MMA;
55  m_algMap["LN_COBYLA"]=nlopt::LN_COBYLA;
56  m_algMap["LN_NEWUOA"]=nlopt::LN_NEWUOA;
57  m_algMap["LN_NEWUOA_BOUND"]=nlopt::LN_NEWUOA_BOUND;
58  m_algMap["LN_NELDERMEAD"]=nlopt::LN_NELDERMEAD;
59  m_algMap["LN_SBPLX"]=nlopt::LN_SBPLX;
60  m_algMap["LN_AUGLAG"]=nlopt::LN_AUGLAG;
61  m_algMap["LD_AUGLAG"]=nlopt::LD_AUGLAG;
62  m_algMap["LN_AUGLAG_EQ"]=nlopt::LN_AUGLAG_EQ;
63  m_algMap["LD_AUGLAG_EQ"]=nlopt::LD_AUGLAG_EQ;
64  m_algMap["LN_BOBYQA"]=nlopt::LN_BOBYQA;
65  m_algMap["GN_ISRES"]=nlopt::GN_ISRES;
66  m_algMap["AUGLAG"]=nlopt::AUGLAG;
67  m_algMap["AUGLAG_EQ"]=nlopt::AUGLAG_EQ;
68  m_algMap["G_MLSL"]=nlopt::G_MLSL;
69  m_algMap["G_MLSL_LDS"]=nlopt::G_MLSL_LDS;
70  m_algMap["LD_SLSQP "]=nlopt::LD_SLSQP;
71  }
72 public:
73  OptFactory(){
74  };
75  ~OptFactory(){};
76  static nlopt::opt getOptimizer(const std::string& algorithmString, unsigned int npar){
77  std::map<std::string, nlopt::algorithm> m_algMap;
78  initMap(m_algMap);
79  switch(m_algMap[algorithmString]){
80  case(nlopt::GN_DIRECT):{
81  nlopt::opt theOptimizer(nlopt::GN_DIRECT,npar);
82  return(theOptimizer);
83  break;
84  }
85  case(nlopt::GN_DIRECT_L):{
86  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L,npar);
87  return(theOptimizer);
88  break;
89  }
90  case(nlopt::GN_DIRECT_L_RAND):{
91  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L_RAND,npar);
92  return(theOptimizer);
93  break;
94  }
95  case(nlopt::GN_DIRECT_NOSCAL):{
96  nlopt::opt theOptimizer(nlopt::GN_DIRECT_NOSCAL,npar);
97  return(theOptimizer);
98  break;
99  }
100  case(nlopt::GN_DIRECT_L_NOSCAL):{
101  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L_NOSCAL,npar);
102  return(theOptimizer);
103  break;
104  }
105  case(nlopt::GN_DIRECT_L_RAND_NOSCAL):{
106  nlopt::opt theOptimizer(nlopt::GN_DIRECT_L_RAND_NOSCAL,npar);
107  return(theOptimizer);
108  break;
109  }
110  case(nlopt::GN_ORIG_DIRECT):{
111  nlopt::opt theOptimizer(nlopt::GN_ORIG_DIRECT,npar);
112  return(theOptimizer);
113  break;
114  }
115  case(nlopt::GN_ORIG_DIRECT_L):{
116  nlopt::opt theOptimizer(nlopt::GN_ORIG_DIRECT_L,npar);
117  return(theOptimizer);
118  break;
119  }
120  case(nlopt::LN_PRAXIS):{
121  nlopt::opt theOptimizer(nlopt::LN_PRAXIS,npar);
122  return(theOptimizer);
123  break;
124  }
125  case(nlopt::GN_CRS2_LM):{
126  nlopt::opt theOptimizer(nlopt::GN_CRS2_LM,npar);
127  return(theOptimizer);
128  break;
129  }
130  case(nlopt::GN_MLSL):{
131  nlopt::opt theOptimizer(nlopt::GN_MLSL,npar);
132  return(theOptimizer);
133  break;
134  }
135  case(nlopt::GN_MLSL_LDS):{
136  nlopt::opt theOptimizer(nlopt::GN_MLSL_LDS,npar);
137  return(theOptimizer);
138  break;
139  }
140  case(nlopt::LN_COBYLA):{
141  nlopt::opt theOptimizer(nlopt::LN_COBYLA,npar);
142  return(theOptimizer);
143  break;
144  }
145  case(nlopt::LN_NEWUOA):{
146  nlopt::opt theOptimizer(nlopt::LN_NEWUOA,npar);
147  return(theOptimizer);
148  break;
149  }
150  case(nlopt::LN_NEWUOA_BOUND):{
151  nlopt::opt theOptimizer(nlopt::LN_NEWUOA_BOUND,npar);
152  return(theOptimizer);
153  break;
154  }
155  case(nlopt::LN_NELDERMEAD):{
156  nlopt::opt theOptimizer(nlopt::LN_NELDERMEAD,npar);
157  return(theOptimizer);
158  break;
159  }
160  case(nlopt::LN_SBPLX):{
161  nlopt::opt theOptimizer(nlopt::LN_SBPLX,npar);
162  return(theOptimizer);
163  break;
164  }
165  case(nlopt::LN_AUGLAG):{
166  nlopt::opt theOptimizer(nlopt::LN_AUGLAG,npar);
167  return(theOptimizer);
168  break;
169  }
170  case(nlopt::LN_AUGLAG_EQ):{
171  nlopt::opt theOptimizer(nlopt::LN_AUGLAG_EQ,npar);
172  return(theOptimizer);
173  break;
174  }
175  case(nlopt::LN_BOBYQA):{
176  nlopt::opt theOptimizer(nlopt::LN_BOBYQA,npar);
177  return(theOptimizer);
178  break;
179  }
180  case(nlopt::GN_ISRES):{
181  nlopt::opt theOptimizer(nlopt::GN_ISRES,npar);
182  return(theOptimizer);
183  break;
184  }
185  case(nlopt::G_MLSL_LDS):
186  case(nlopt::AUGLAG):
187  case(nlopt::AUGLAG_EQ):
188  case(nlopt::G_MLSL):
189  case(nlopt::GD_MLSL):
190  case(nlopt::GD_MLSL_LDS):
191  case(nlopt::GD_STOGO):
192  case(nlopt::GD_STOGO_RAND):
193  case(nlopt::LD_LBFGS_NOCEDAL):
194  case(nlopt::LD_LBFGS):
195  case(nlopt::LD_VAR1):
196  case(nlopt::LD_VAR2):
197  case(nlopt::LD_TNEWTON):
198  case(nlopt::LD_TNEWTON_RESTART):
199  case(nlopt::LD_TNEWTON_PRECOND):
200  case(nlopt::LD_TNEWTON_PRECOND_RESTART):
201  case(nlopt::LD_MMA):
202  case(nlopt::LD_AUGLAG):
203  case(nlopt::LD_AUGLAG_EQ):
204  case(nlopt::LD_SLSQP):
205  default:{
206  std::string errorString="Error: derivative optimization algorithm ";
207  errorString+= algorithmString;
208  errorString+= " not supported, select derivative-free algorithm ([GL]N_*])";
209  throw(errorString);
210  break;
211  }
212  }
213  };
214 };
215 #endif /* _OPTFACTORY_H_ */
pktools-2.6.6/doc/html/inherit_graph_17.map0000644000113200011300000000030112616110570015456 00000000000000 pktools-2.6.6/doc/html/dir_53adf0b982dc8545998aae3f283a5a58_dep.png0000644000113200011300000000521312616110567020435 00000000000000‰PNG  IHDRõ”Ä{øÍbKGDÿÿÿ ½§“ @IDATxœíÝkP“WÇñópI"+f BeAYFTv™‘íÌê0(£€ ¢´\”ªU`U(Òa¼R)‚;õ‚ ¢ãµétµ¨€:¢VÛY…DE ÎÖ€&öE\-¶Ds¿¿Ï«pžää<™¯Ì“®»»›ecí˜úÊÐ7P†¾2ô ”¡o  }eè(Cß@úÊÐ7P†¾2ô ”¡o ÌΨ{>|xçÎfZ ÀòññÉÏÏïûý9£Þÿ-“É*+/Ž`üÂÞUSScmíU£Š5îû7clüø€mÛöû(€wwêÔ±ÚÚx£‚ý7P†¾2ô ”¡o  }eè(Cß@ú6‹3gä!!A>>¢)Sü-cŒÝ¿¯H„—. ò­©¹°uë—AA¾'z¥¤,nk{bíõ’…¾M¯££céÒ¸>ZðÃ7–,IIKKìèè0úúëÂÜÜí55åò»v••”œP*ë¶oßd݆¾MO§ÓêõzFÃçógÏž{ýºR ¥¥­ üGEÅ‘åË?=ú¯ÞÞ>ÙÙ…ãÇÿͺ & }›Þ!N%%'®_¿2iÒØ¨¨W®TÙØ¼x%/ÆXccƒ§§Ä02j”÷´i3¬¶Vêзéuuuéõú‚‚½×®)d²è„„¨ÖÖÃ!;;{Ƙ‹‹èáÆ‘Ÿ~ú±°ûsAߦÇq\LL¸\^¡V·kµ:;;»AƒzÞ!,,rÓ¦Ì;w~¾sçç5k>ûå—k-•<£ß?ˆÏççäìÈÎ^ÓÔÔøÁ#óówóùüžwX¼ø_šØØˆŽŽŽ)S¦¦¥­µÖRÉ3úýßï«8uêXRR¼QÅb”¡o  }eè(Cß@úÊÐ7P†¾2ô ”¡o  }eè(Cß@úÊÐ7P†¾2ô ”¡o ÌÄŸ¿\»ve}ý¿M;'¼?ø|ÁÚµ9nnÐÄ}ïÛ÷Õĉ#Fx˜vZxO?^>kVdÿí›1öé§ËfÍ’™|Zx…œi'Äþ(Cß@úÊÐ7P†¾2ô ”¡o  }e–¾>òêÕŸmÛ–cá'µ˜‘#ÿR[«°ö*àÿ,Ý÷ƒ÷—/_náçµ€ªªª-[¶X{ð +\ßÞÃÃC*•ZþyÍͨëRƒe`ÿ ”¡o  }eè(Cß@úÊÐ7P†¾2ô ”¡o  }eè(Cß@úÊÐ7P†¾ûª®®ŽãL|õ00·Ü·B¡pvv¶ö* _À}ëõúÇ[{ЯõǾ9Ž;xð P(ܸq£a°µµ566ÖÙÙÙÝÝ=%%¥««+0016|øð7ÍÓsGÑóvEE…ŸŸŸ@ ‹Åû÷ï7 êtºÔÔTWWW—ÔÔTN÷üùóœœoooGGÇI“&ÕÔÔ˜ñœÍà»ïNNžìïææ0fŒhëÖ/c EPÈ>}< `´··ËÊ•IOŸ>íu1&—Wù‰DqYÙ~kŸÍ[²Âç/ûâØ±cUUU‡NHHX°`P(\ºtissóåË—5Íܹs«««½¼¼š››šY£ÑH¥Ò¼¼¼™3gž>}:>>><<|ðàÁ[¶lQ*•W¯^5üCZµj•‹‹KnnnQQQ```mmmBB‚™NÖÔêö˜˜©4º´ôä… ç.ŒŽŽžo8´k×öÒÒ“­­ª… £‡ý³T:ï·ƒ‰‰)qqÒ¬¬¼™ß:11>44ÜÁa°UÏémôÇïߌ±%K–899ÅÄÄ0ÆT*•N§+--ÍËˋž¾¾ëÖ­;pàÀÛͬÕjõz½Z­qqq---ƒ bŒíÙ³§  ÀÃÃÃ××7;;[.—mܸ1,,L$…„„dee™ò ÍŒÇãWVÞÈÎÎwuþÜ@[Ûáõës%¯ þž‘ñEyù^ ¯’F£æósçÆ)•-Á «Ì;è§}»¹¹1Æìíí _>zôèùóç‰Äðå¨Q£>|hÔ„/?Ü>tèгgÏVWW»»»Ož<¹²²ÒÆÆ†1vïÞ=‘HÄqÇqS§NU*• ãÆ{9ƒŸŸß»Ÿ—Åðx¼ºº;³gøá„o¾ÙÛóDâe¸áå5¦±ña¯ƒNNCOœ8{åJõرî3fL®ªzñ* 8ýtѯ½š®®®¶¶¶ Å‹KçÔ××1¢S={öŒ1ÖØØhø²³³S¯×———«Tªùó燆†ªT*Ƙ³³óÝ»w»»»»»»[ZZª««===oܸñržÛ·o¿ûyYLWWg|¼,11õܹk¹¹Û{ª¯¿û¿wD"·^»º:õzýÞ½å …*:z~TThK‹Ê’ë7•~Ú÷kìíí###“’’”Jå­[·222æÍ›g8¤V«ßô('''ÆØ¾}ûÚÚÚòóó ƒÇM›6íÈ‘#mmmZ­ÖÞÞÞÁÁ1žžž~ÿþý›7o.Z´(55õøñãÍÍÍr¹|ÕªUæ?Q“yúô©V«åñx]]YY«cju»áPzz²BQW[{eýúÏe²è^9Ž ŸVQq¤½½M§ÓÚÙ½x•œ~úóåo$''ðx¼9s椧§ÛÙÙ‰D¢ööö^âì윙™¹bÅŠ 6lÞ¼ùèÑ£Œ1@P\\œ––ÖÐÐ ‹ËÊÊc,33399Ùßß߯Æ&""";;›ÏçkµÚ”””¦¦&??¿’’Ãol„!Cœ237}òÉ<‡ÁË–¥GDDI¥Áß~{‘1&•Î ûgG‡&""jÙ²tÃåµA>_°cGñš5i #GŠwï.ãóÖ>§·ÁuÕ%™L¦Ñh·mÛó¦;H$ÂÝ»Ë~çïKÅÅÉx}V¯GO:–”oT±cðvÌþä÷½é!¸&`OŽŽŠ]Ø—A2ˆôŽûbØ0—Í›‹ú2Hö'@úÊÐ7P†¾2ô ”¡o  }eè(Cß@úÊÐ7P†¾2ô ”¡o  }eè(³ôçlmmËËK©^ˆÕÖÖÖÚK€WXºïŒŒ/BCÃ-ü¤3l˜«µ—¯°tßžžbOO±…ŸÞ[Øeè(Cß@úÊÐ7P†¾2ô ”™þ÷ßçÏŸyò¤ÕäÓ¼÷-(.þª¸Ø´³ÂûÂÖÖvøp‘ '4qß.ühÚ Þöß@úÊÐ7P†¾2ô ”¡o  }eè(3úÿw._¾ôñÇaæX Àïûõ×ÿûãú–J¥Æ>€©¸¹¹LŸlÔCŒûûÜ öß@úÊÐ7P†¾2ô ”¡o  }eè(Cß@úÊÐ7P†¾2ô ”¡o ì¿ `¹WëZIEND®B`‚pktools-2.6.6/doc/html/ImgReaderOgr_8cc_source.html0000644000113200011300000020154712647637662017202 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgReaderOgr.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgReaderOgr.cc
1 /**********************************************************************
2 ImgReaderOgr.cc: class to read vector files using OGR API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <fstream>
22 #include "ImgReaderOgr.h"
23 #include "ImgWriterOgr.h"
24 #include "cpl_string.h"
25 //---------------------------------------------------------------------------
26 ImgReaderOgr::ImgReaderOgr(void)
27  : m_fs(' ')
28 {}
29 
30 ImgReaderOgr::ImgReaderOgr(const std::string& filename)
31 {
32  open(filename);
33 }
34 
35 ImgReaderOgr::~ImgReaderOgr(void)
36 {
37 }
38 
39 //---------------------------------------------------------------------------
40 
41 void ImgReaderOgr::open(const std::string& filename)
42 {
43  m_fs=' ';
44  m_filename = filename;
45  setCodec();
46 }
47 
48 //---------------------------------------------------------------------------
49 void ImgReaderOgr::close(void)
50 {
51 #if GDAL_VERSION_MAJOR < 2
52  OGRDataSource::DestroyDataSource(m_datasource);
53 #else
54  GDALClose(m_datasource);
55 #endif
56 }
57 
58 //---------------------------------------------------------------------------
59 void ImgReaderOgr::setCodec(void){
60 #if GDAL_VERSION_MAJOR < 2
61  //register the drivers
62  OGRRegisterAll();
63  //open the input OGR datasource. Datasources can be files, RDBMSes, directories full of files, or even remote web services depending on the driver being used. However, the datasource name is always a single string.
64  m_datasource = OGRSFDriverRegistrar::Open(m_filename.c_str(), FALSE);//FAlSE: do not update
65 #else
66  //register the drivers
67  GDALAllRegister();
68  //open the input OGR datasource. Datasources can be files, RDBMSes, directories full of files, or even remote web services depending on the driver being used. However, the datasource name is always a single string.
69  m_datasource = (GDALDataset*) GDALOpenEx(m_filename.c_str(), GDAL_OF_READONLY, NULL, NULL, NULL);
70 #endif
71  if( m_datasource == NULL ){
72  std::string errorString="Open failed";
73  throw(errorString);
74  }
75 }
76 
77 bool ImgReaderOgr::getExtent(double& ulx, double& uly, double& lrx, double& lry, int layer)
78 {
79  OGREnvelope oExt;
80  if(getLayer(layer)->GetExtent(&oExt,TRUE)==OGRERR_NONE){
81  ulx=oExt.MinX;
82  uly=oExt.MaxY;
83  lrx=oExt.MaxX;
84  lry=oExt.MinY;
85  return true;
86  }
87  else
88  return false;
89 }
90 
91 bool ImgReaderOgr::getExtent(double& ulx, double& uly, double& lrx, double& lry)
92 {
93  bool success=false;
94  OGREnvelope oExt;
95  for(int ilayer=0;ilayer<getLayerCount();++ilayer){
96  if(getLayer(ilayer)->GetExtent(&oExt,TRUE)==OGRERR_NONE){
97  if(!ilayer){
98  ulx=oExt.MinX;
99  uly=oExt.MaxY;
100  lrx=oExt.MaxX;
101  lry=oExt.MinY;
102  }
103  else{
104  if(ulx>oExt.MinX)
105  ulx=oExt.MinX;
106  if(uly<oExt.MaxY)
107  uly=oExt.MaxY;
108  if(lrx<oExt.MaxX)
109  lrx=oExt.MaxX;
110  if(lry>oExt.MinY)
111  lry=oExt.MinY;
112  }
113  success=true;
114  }
115  else
116  success=false;
117  }
118  return success;
119 }
120 
121 unsigned long int ImgReaderOgr::getFeatureCount(int layer) const
122 {
123  return(m_datasource->GetLayer(layer)->GetFeatureCount());
124 }
125 
126 int ImgReaderOgr::getFieldCount(int layer) const
127 {
128  if(layer<0)
129  layer=m_datasource->GetLayerCount()-1;
130  assert(m_datasource->GetLayerCount()>layer);
131  OGRLayer *poLayer;
132  if((poLayer = m_datasource->GetLayer(layer))==NULL){
133  std::string errorstring="Could not get layer";
134  throw(errorstring);
135  }
136  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
137  return(poFDefn->GetFieldCount());
138 }
139 
140 int ImgReaderOgr::getFields(std::vector<std::string>& fields, int layer) const
141 {
142  if(layer<0)
143  layer=m_datasource->GetLayerCount()-1;
144  assert(m_datasource->GetLayerCount()>layer);
145  OGRLayer *poLayer;
146  if((poLayer = m_datasource->GetLayer(layer))==NULL){
147  std::string errorstring="Could not get layer";
148  throw(errorstring);
149  }
150  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
151  fields.clear();
152  fields.resize(poFDefn->GetFieldCount());
153  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
154  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
155  fields[iField]=poFieldDefn->GetNameRef();
156  }
157  return(fields.size());
158 }
159 
160 int ImgReaderOgr::getFields(std::vector<OGRFieldDefn*>& fields, int layer) const
161 {
162  if(layer<0)
163  layer=m_datasource->GetLayerCount()-1;
164  assert(m_datasource->GetLayerCount()>layer);
165  OGRLayer *poLayer;
166  if((poLayer = m_datasource->GetLayer(layer))==NULL){
167  std::string errorstring="Could not get layer";
168  throw(errorstring);
169  }
170  OGRFeatureDefn *poFDefn = poLayer->GetLayerDefn();
171  fields.clear();
172  fields.resize(poFDefn->GetFieldCount());
173  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
174  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
175  fields[iField]=poFDefn->GetFieldDefn(iField);
176  }
177  assert(fields.size()==getFieldCount(layer));
178  return(fields.size());
179 }
180 
181 std::string ImgReaderOgr::getProjection(int layer) const
182 {
183  if(m_datasource->GetLayer(layer)->GetSpatialRef()){
184  char* ppszResult;
185  m_datasource->GetLayer(layer)->GetSpatialRef()->exportToWkt(&ppszResult);
186  return(ppszResult);
187  }
188  else
189  return "";
190 }
191 
192 OGRwkbGeometryType ImgReaderOgr::getGeometryType(int layer) const
193 {
194  return m_datasource->GetLayer(layer)->GetLayerDefn()->GetGeomType();
195 }
196 
197 std::ostream& operator<<(std::ostream& theOstream, ImgReaderOgr& theImageReader){
198  //An OGRDataSource can potentially have many layers associated with it. The number of layers available can be queried with OGRDataSource::GetLayerCount() and individual layers fetched by index using OGRDataSource::GetLayer(). However, we wil just fetch the layer by name.
199  //todo: try to open and catch if failure...
200  // ofstream fpoints(filename.c_str(),ios::out);
201 
202  int nlayerRead=theImageReader.getDataSource()->GetLayerCount();
203 
204  for(int ilayer=0;ilayer<nlayerRead;++ilayer){
205  OGRLayer *readLayer=theImageReader.getLayer(ilayer);
206  OGRFeatureDefn *poFDefn = readLayer->GetLayerDefn();
207 
208  theOstream << "#";
209  int iField=0;
210  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
211  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
212  std::string fieldname=poFieldDefn->GetNameRef();
213  theOstream << fieldname << theImageReader.getFieldSeparator();
214  }
215  theOstream << std::endl;
216 
217  readLayer->ResetReading();
218 
219  //start reading features from the layer
220  OGRFeature *poFeature;
221  unsigned long int ifeature=0;
222  while( (poFeature = readLayer->GetNextFeature()) != NULL ){
223  OGRGeometry *poGeometry;
224  poGeometry = poFeature->GetGeometryRef();
225  assert(poGeometry != NULL);
226  double x,y;
227  if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint){
228  OGRPoint *poPoint = (OGRPoint *) poGeometry;
229  x=poPoint->getX();
230  y=poPoint->getY();
231  }
232  std::vector<std::string> vfields(poFDefn->GetFieldCount());
233  std::string featurename;
234  std::vector<std::string>::iterator fit=vfields.begin();
235  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
236  *(fit++)=poFeature->GetFieldAsString(iField);
237  }
238  theOstream.precision(12);
239  if(wkbFlatten(poGeometry->getGeometryType()) == wkbPoint)
240  theOstream << x << theImageReader.getFieldSeparator() << y;
241  for(fit=vfields.begin();fit!=vfields.end();++fit)
242  theOstream << theImageReader.getFieldSeparator() << *fit;
243  theOstream << std::endl;
244  ++ifeature;
245  }
246  }
247  return(theOstream);
248 }
249 
250 // OGRLayer * ImgReaderOgr::executeSql(const std::string& output, const std::string& sqlStatement, OGRGeometry* spatialFilter)
251 // {
252 // OGRLayer *poResultSet;
253 // poResultSet = m_datasource->ExecuteSQL(sqlStatement.c_str(), spatialFilter,NULL );
254 
255 // if( poResultSet != NULL ){
256 // ImgWriterOgr imgWriter;
257 // imgWriter.open(output);
258 // imgWriter.copyLayer(poResultSet,output);
259 // m_datasource->ReleaseResultSet( poResultSet );
260 // imgWriter.close();
261 // }
262 // }
263 
264 unsigned int ImgReaderOgr::readDataImageOgr(std::map<std::string,Vector2d<float> > &mapPixels, //[classNr][pixelNr][bandNr],
265  std::vector<std::string>& fields,
266  const std::vector<unsigned short>& bands,
267  const std::string& label,
268  const std::vector<std::string>& layers,
269  int verbose)
270 {
271  mapPixels.clear();
272  int nsample=0;
273  int totalSamples=0;
274  int nband=0;
275  if(verbose)
276  std::cout << "reading OGR dataset " << m_filename << std::endl;
277  for(int ilayer=0;ilayer<getLayerCount();++ilayer){
278  std::string currentLayername=getLayer(ilayer)->GetName();
279  if(layers.size())
280  if(find(layers.begin(),layers.end(),currentLayername)==layers.end())
281  continue;
282  try{
283  //only retain bands in fields
284  getFields(fields,ilayer);
285  std::vector<std::string>::iterator fit=fields.begin();
286  if(verbose>1)
287  std::cout << "reading fields: ";
288  while(fit!=fields.end()){
289  if(verbose)
290  std::cout << *fit << " ";
291  // size_t pos=(*fit).find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ ");
292  if((*fit).substr(0,1)=="B"||(*fit).substr(0,1)=="b"){
293  // if((*fit).substr(1).find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ ")!=std::string::npos){
294  std::size_t digits=(*fit).substr(1,1).find_first_of("0123456789");
295  std::size_t digite=(*fit).substr(1).find_first_not_of("0123456789");
296  if((*fit)=="B" || (*fit)=="b" || (*fit)=="Band")//B is only band
297  ++fit;
298  else if(digits!=std::string::npos&&digite==std::string::npos){
299  std::string digitString=(*fit).substr(digits);
300  // int theBand=atoi((*fit).substr(1).c_str());
301  int theBand=atoi(digitString.c_str());
302  if(bands.size()){
303  bool validBand=false;
304  for(int iband=0;iband<bands.size();++iband){
305  if(theBand==bands[iband])
306  validBand=true;
307  }
308  if(validBand)
309  ++fit;
310  else
311  fields.erase(fit);
312  }
313  else
314  ++fit;
315  }
316  else
317  fields.erase(fit);
318  }
319  else
320  fields.erase(fit);
321  }
322  if(verbose)
323  std::cout << std::endl;
324  if(verbose){
325  std::cout << "fields:";
326  for(std::vector<std::string>::iterator fit=fields.begin();fit!=fields.end();++fit)
327  std::cout << " " << *fit;
328  std::cout << std::endl;
329  }
330  if(!nband){
331  if(verbose)
332  std::cout << "reading data" << std::endl;
333  nband=readData(mapPixels,OFTReal,fields,label,ilayer,true,verbose==2);
334  }
335  else{
336  assert(nband==readData(mapPixels,OFTReal,fields,label,ilayer,true,false));
337  }
338  nsample=getFeatureCount(ilayer);
339  totalSamples+=nsample;
340  if(verbose)
341  std::cout << ": " << nsample << " samples read with " << nband << " bands" << std::endl;
342  }
343  catch(std::string e){
344  std::ostringstream estr;
345  estr << e << " " << m_filename;
346  throw(estr.str());
347  }
348  }
349  if(verbose)
350  std::cout << "total number of samples read " << totalSamples << std::endl;
351  return totalSamples;
352 }
353 
354 unsigned int ImgReaderOgr::readDataImageOgr(std::map<std::string,Vector2d<float> > &mapPixels, //[classNr][pixelNr][bandNr],
355  std::vector<std::string>& fields,
356  double start,
357  double end,
358  const std::string& label,
359  const std::vector<std::string>& layers,
360  int verbose)
361 {
362  mapPixels.clear();
363  int nsample=0;
364  int totalSamples=0;
365  int nband=0;
366  if(verbose)
367  std::cout << "reading OGR dataset file " << m_filename << std::endl;
368  for(int ilayer=0;ilayer<getLayerCount();++ilayer){
369  std::string currentLayername=getLayer(ilayer)->GetName();
370  if(layers.size())
371  if(find(layers.begin(),layers.end(),currentLayername)==layers.end())
372  continue;
373  try{
374  //only retain bands in fields
375  getFields(fields,ilayer);
376  std::vector<std::string>::iterator fit=fields.begin();
377  if(verbose)
378  std::cout << "reading fields: ";
379  while(fit!=fields.end()){
380  if(verbose)
381  std::cout << *fit << " ";
382  if((*fit).substr(0,1)=="B"||(*fit).substr(0,1)=="b"){
383  // if((*fit).substr(1).find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ ")!=std::string::npos){
384  std::size_t digits=(*fit).substr(1,1).find_first_of("0123456789");
385  std::size_t digite=(*fit).substr(1).find_first_not_of("0123456789");
386  if(*fit=="B" || *fit=="b"|| *fit=="Band")
387  ++fit;
388  else if(digits!=std::string::npos&&digite==std::string::npos){
389  std::string digitString=(*fit).substr(digits);
390  int iband=atoi(digitString.c_str());
391  // int iband=atoi((*fit).substr(1).c_str());
392  if((start||end)&&(iband<start||iband>end))
393  fields.erase(fit);
394  else
395  ++fit;
396  }
397  else
398  fields.erase(fit);
399  }
400  else
401  fields.erase(fit);
402  }
403  if(verbose)
404  std::cout << std::endl;
405  if(verbose){
406  std::cout << "fields:";
407  for(std::vector<std::string>::iterator fit=fields.begin();fit!=fields.end();++fit)
408  std::cout << " " << *fit;
409  std::cout << std::endl;
410  }
411  if(!nband){
412  if(verbose)
413  std::cout << "reading data" << std::endl;
414  nband=readData(mapPixels,OFTReal,fields,label,ilayer,true,verbose==2);
415  }
416  else{
417  assert(nband==readData(mapPixels,OFTReal,fields,label,ilayer,true,false));
418  }
419  nsample=getFeatureCount(ilayer);
420  totalSamples+=nsample;
421  if(verbose)
422  std::cout << ": " << nsample << " samples read with " << nband << " bands" << std::endl;
423  }
424  catch(std::string e){
425  std::ostringstream estr;
426  estr << e << " " << m_filename;
427  throw(estr.str());
428  }
429  if(verbose)
430  std::cout << ": " << nsample << " samples read with " << nband << " bands" << std::endl;
431  }
432  if(verbose)
433  std::cout << "total number of samples read " << totalSamples << std::endl;
434  return totalSamples;
435 }
pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral__inherit__graph.md50000644000113200011300000000004012616110566030125 000000000000002a8400e38d6b76c1310fa9719dbc19a3pktools-2.6.6/doc/html/inherit_graph_16.png0000644000113200011300000000211412616110570015470 00000000000000‰PNG  IHDR{%bC–øbKGDÿÿÿ ½§“IDATxœí›9H3[ÇÿÑgña5‹.…J´0ÑN±¬QP l#ÑB +H!¢ Š˜ ‚ $ "JP4 #n‘$…BÆ%Ï«L&ÉsK4oîÜ{眹çäÏ̽3ddDD`H¿q?#z0±%[B0±%Ä?———èîîÆÓÓÓOäÃøŠŠŠ066&—îÆM&ÑÐеä߇ÃáÀöö6‚Ÿ;44DZ­–ŒF#©ÕjZZZ"§ÓI+++”™™)ÌåñxhjjJˆ ì ýý}º»»ó3ŸÏ÷ëjy¿VlFC.—K语­‘N§|ív»h>žçÉ`0Pnn.íííQaa!ÍÌÌøùÌÎξ»AÍl6Ç\-DáÅþÑG¯óósddd»ßªª*œ Ç5ŸÿŠ‹‹q}} ›Í†ÒÒR8èt:?¿’’’åÁqˆÈÏjkkc²–p„|7 ”J%¬V+òóón·[8ž ´F#&&&`6›QZZ*ŒçååáààZ­V;<<ŒBöþÄB-Q¿²ïïï…v]]úúúpqq»ÝŽêêjŒ‹bxžG?ñçÏ ÖÙÙ‰žž,//Ãívcuu~±ÓÓÓ!û±TË—ùÀ=?(ï]³}>UVV’\.|ooo©­­RRRH¡PP{{;=<<ˆÎ¹¹¹rm}~~¦ÑÑQÊÏϧÄÄD*//§íííˆîƪ–÷Ñ ãwñk7hŒèÂÄ–Ll ÁÄ–Ll ÁÄ–Ll òuéääd4ó`|»»»!‰ÄÎÊÊB||<:::"š#r¼þ‘$Ñ!Œÿ-ìûl)ÁÄ–Ll ÁÄ–ÿM· 3îjñ[IEND®B`‚pktools-2.6.6/doc/html/classUi_1_1MainWindow__coll__graph.md50000644000113200011300000000004012616110567020772 000000000000000ee01170730be0f29279620ebd50f876pktools-2.6.6/doc/html/pkfilter.html0000644000113200011300000004017412647637662014373 00000000000000 pktools: pkfilter
pktools  2.6.6
Processing Kernel for geospatial data
pkfilter

program to filter raster images

SYNOPSIS

Usage: pkfilter -i input -o ouptut [-f filter | -perc value | -srf file [-srf file]* -win wavelength [-win wavelength]* | -wout wavelength -fwhm value [-wout wavelength -fwhm value]* -win wavelength [-win wavelength]*]

Options: [-dx value [-dy value] | -dz value] [-nodata value]

Advanced options: check table

Description

This utility implements spatial and spectral filtering for raster data. In the spatial domain (X, Y), the filter typically involves a rectangular convolution kernel (moving window). To avoid image shifting, the size of the window should be odd (3, 5, 7, ...). You can set the window sizes in X and Y directions separately with the options -dx and -dy. A circular kernel (disc) is applied if option -circ is set. An overview of the supported filters (option -f|–filter) is given below. You can create customized filters by defining your own filter taps (multiplicative elements of the filter kernel) via an ascii file (option -tap). In the spectral/temporal domain (Z) you can filter multi-band raster inputs. The kernel filter size can be set with the option -dz (use odd values only).

Filters in spatial (dx, dy) and spectral/temporal (dz) domain

Implemented as moving window: choose dx, dy or dz > 1 and odd (3, 5, 7, etc.)

The number of output bands equals number of input bands

filterdescription
dilatemorphological dilation
erodemorphological erosion
closemorpholigical closing (dilate+erode)
openmorpholigical opening (erode+dilate)
smoothnodata valuessmooth nodata values (set nodata option!)

Example: "Smooth" (interpolate) nodata in spectral/temporal domain (-dz 1), using a linear interpolation

pkfilter -i input.tif -o smoothed.tif -dz 1 -f smoothnodata -interp linear

Example: Filter input.tif in spatial domain with morphological dilation filter with kernel size 3x3.

pkfilter -i input.tif -o dilated.tif -dx 3 -dy 3 -f dilate

Implemented as either moving window or statistical function in spectral/temporal domain (choose dz=1).

In case of moving window, the number of output bands equals number of input bands. In case dz=1, the single output band is calculated as the result of the statistical function applied to all bands.

filter description
nvalid report number of valid (not nodata) values in window
median perform a median filter in spatial (dx, dy) or spectral/temporal (dz) domain
var calculate variance in window
min calculate minimum in window
max calculate maximum in window
sum calculate sum in window
mean calculate mean in window
stdev calculate standard deviation in window
savgolay Savitzky-Golay filter (check examples page!)
percentile calculate percentile value in window
proportion calculate proportion in windoww

Example: Median filter in spatial domain

pkfilter -i input.tif -o median.tif -dx 3 -dy 3 -f median

Example: Calculate statistical variance in spectral/temporal domain (single output band)

pkfilter -i input.tif -o var.tif -dz 1 -f var

Wavelet filters

Wavelet filter in in spatial or spectral/temporal (set dz = 1) domain.

The number of output bands equals number of input bands

filter description
dwt discrete wavelet transform
dwti discrete inverse wavelet transform
dwt_cut discrete wavelet + inverse transform, using threshold option to cut percentile of coefficients

Example: Calculate discrete wavelet in spatial domain

pkfilter -i lena.tif -o lena_dwt.tif -f dwt

Example: Calculate discrete wavelet in spectral/temporal domain

pkfilter -i timeseries.tif -o dwt.tif -f dwt -dz 1

Wavelet filter implemented in spectral/temporal domain only.

The number of output bands equals number of input bands

filter description
dwt_cut_from discrete wavelet + inverse transform, setting all high frequence coefficients to zero (scale >= threshold)

Example: Calculate low frequency time series based on discrete wavelet + inverse transform in spectral/temporal domain, retaining only coefficients until scale 3

pkfilter -i timeseries.tif -o lowfrequency.tif -f dwt_cut_from -dz 1 -t 4

Filters in spatial domain only (dx, dy > 1 and odd).

The number of output bands equals number of input bands.

filter description
mrf Markov random field
ismin pixel is minimum?
ismax pixel is maximum?
shift perform a pixel shift in spatial window
scramble scramble pixels in a spatial window
mode (majority voting perform a majority voring (set class option)
sobelx horizontal edge detection
sobely vertical edge detection
sobelxy diagonal edge detection (NE-SW)
sobelyx diagonal edge detection (NW-SE)
countid count digital numbers in window
order rank pixels in order
density calculated the density
homog central pixel must be identical to all other pixels within window
heterog central pixel must be different than all other pixels within window

Example: Sobel edge detection in horizontal direction

pkfilter -i lena.tif -o sobelx.tif -f sobelx -dx 5 -dy 5

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image file
    o output std::string Output image file
    f filter std::string filter function (nvalid, median, var, min, max, sum, mean, dilate, erode, close, open, homog (central pixel must be identical to all other pixels within window), heterog (central pixel must be different than all other pixels within window), sobelx (horizontal edge detection), sobely (vertical edge detection), sobelxy (diagonal edge detection NE-SW),sobelyx (diagonal edge detection NW-SE), density, countid, mode (majority voting, only for classes), smoothnodata (smooth nodata values only) values, ismin, ismax, order (rank pixels in order), stdev, mrf, dwt, dwti, dwt_cut, dwt_cut_from, scramble, shift, savgolay, percentile, proportion)
    srf srf std::string list of ASCII files containing spectral response functions (two columns: wavelength response)
    fwhm fwhm double list of full width half to apply spectral filtering (-fwhm band1 -fwhm band2 ...)
    dx dx double 3 filter kernel size in x, use odd values only
    dy dy double 3 filter kernel size in y, use odd values only
    dz dz int filter kernel size in z (spectral/temporal dimension), must be odd (example: 3).. Set dz>0 if 1-D filter must be used in band domain
    nodata nodata double nodata value(s) (used for smoothnodata filter)
    r resampling-method std::string near Resampling method for shifting operation (near: nearest neighbour, bilinear: bi-linear interpolation).
    co co std::string Creation option for output file. Multiple options can be specified.
    wt wavelet std::string daubechies wavelet type: daubechies,daubechies_centered, haar, haar_centered, bspline, bspline_centered
    wf family int 4 wavelet family (vanishing moment, see also http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)
    nl nl int 2 Number of leftward (past) data points used in Savitzky-Golay filter)
    nr nr int 2 Number of rightward (future) data points used in Savitzky-Golay filter)
    ld ld int 0 order of the derivative desired in Savitzky-Golay filter (e.g., ld=0 for smoothed function)
    m m int 2 order of the smoothing polynomial in Savitzky-Golay filter, also equal to the highest conserved moment; usual values are m = 2 or m = 4)
    class class short class value(s) to use for density, erosion, dilation, openening and closing, thresholding
    t threshold double 0 threshold value(s) to use for threshold filter (one for each class), or threshold to cut for dwt_cut (use 0 to keep all) or dwt_cut_from, or sigma for shift
    tap tap std::string 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
    tapz tapz double taps used for spectral filtering
    pad pad std::string symmetric Padding method for filtering (how to handle edge effects). Choose between: symmetric, replicate, circular, zero (pad with 0).
    win wavelengthIn double list of wavelengths in input spectrum (-win band1 -win band2 ...)
    wout wavelengthOut double list of wavelengths in output spectrum (-wout band1 -wout band2 ...)
    d down short 1 down sampling factor. Use value 1 for no downsampling). Use value n>1 for downsampling (aggregation)
    beta beta std::string ASCII file with beta for each class transition in Markov Random Field
    interp interp std::string akima type of interpolation for spectral filtering (see http://www.gnu.org/software/gsl/manual/html_node/Interpolation-Types.html)
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate).
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table
    circ circular bool false circular disc kernel for dilation and erosion
    Usage: pkfilter -i input -o ouptut [-f filter | -perc value | -srf file [-srf file]* -win wavelength [-win wavelength]* | -wout wavelength -fwhm value [-wout wavelength -fwhm value]* -win wavelength [-win wavelength]*]

Examples

Some examples how to use pkfilter can be found here

pktools-2.6.6/doc/html/classSVC__Q.html0000644000113200011300000002156612647637662014657 00000000000000 pktools: SVC_Q Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for SVC_Q:
Collaboration diagram for SVC_Q:

Public Member Functions

 SVC_Q (const svm_problem &prob, const svm_parameter &param, const schar *y_)
 
Qfloat * get_Q (int i, int len) const
 
double * get_QD () const
 
void swap_index (int i, int j) const
 
- Public Member Functions inherited from Kernel
 Kernel (int l, svm_node *const *x, const svm_parameter &param)
 

Additional Inherited Members

- Static Public Member Functions inherited from Kernel
static double k_function (const svm_node *x, const svm_node *y, const svm_parameter &param)
 
- Protected Attributes inherited from Kernel
double(Kernel::* kernel_function )(int i, int j) const
 

Detailed Description

Definition at line 1273 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/classImgRasterGdal-members.html0000644000113200011300000004375312647637662017724 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ImgRasterGdal Member List

This is the complete list of members for ImgRasterGdal, including all inherited members.

close(void) (defined in ImgRasterGdal)ImgRasterGdalvirtual
covers(double x, double y) const (defined in ImgRasterGdal)ImgRasterGdal
covers(double ulx, double uly, double lrx, double lry) const (defined in ImgRasterGdal)ImgRasterGdal
GDALSetNoDataValue(double noDataValue, int band=0) (defined in ImgRasterGdal)ImgRasterGdalinline
geo2image(double x, double y, double &i, double &j) const (defined in ImgRasterGdal)ImgRasterGdal
getBoundingBox(double &ulx, double &uly, double &lrx, double &lry) const (defined in ImgRasterGdal)ImgRasterGdal
getCenterPos(double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
getColorTable(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getCompression() const (defined in ImgRasterGdal)ImgRasterGdal
getDataset() (defined in ImgRasterGdal)ImgRasterGdalinline
getDataType(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getDeltaX(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDeltaY(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getDriverDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getFileName() const (defined in ImgRasterGdal)ImgRasterGdalinline
getGeoTransform() const (defined in ImgRasterGdal)ImgRasterGdal
getGeoTransform(double *gt) const (defined in ImgRasterGdal)ImgRasterGdal
getImageDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getImageType() const (defined in ImgRasterGdal)ImgRasterGdalinline
getInterleave() const (defined in ImgRasterGdal)ImgRasterGdal
getLrx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getLry() const (defined in ImgRasterGdal)ImgRasterGdalinline
getMetadata() (defined in ImgRasterGdal)ImgRasterGdal
getMetadata() const (defined in ImgRasterGdal)ImgRasterGdal
getMetadata(std::list< std::string > &metadata) const (defined in ImgRasterGdal)ImgRasterGdal
getMetadataItem() const (defined in ImgRasterGdal)ImgRasterGdal
getNoDataValues(std::vector< double > &noDataValues) const (defined in ImgRasterGdal)ImgRasterGdal
getProjection(void) const (defined in ImgRasterGdal)ImgRasterGdal
getProjectionRef(void) const (defined in ImgRasterGdal)ImgRasterGdal
getRasterBand(int band=0) (defined in ImgRasterGdal)ImgRasterGdal
getUlx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getUly() const (defined in ImgRasterGdal)ImgRasterGdalinline
image2geo(double i, double j, double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdal
ImgReaderGdal (defined in ImgRasterGdal)ImgRasterGdalfriend
ImgWriterGdal (defined in ImgRasterGdal)ImgRasterGdalfriend
isGeoRef() const (defined in ImgRasterGdal)ImgRasterGdalinline
isNoData(double value) const (defined in ImgRasterGdal)ImgRasterGdalinline
m_filename (defined in ImgRasterGdal)ImgRasterGdalprotected
m_gds (defined in ImgRasterGdal)ImgRasterGdalprotected
m_gt (defined in ImgRasterGdal)ImgRasterGdalprotected
m_nband (defined in ImgRasterGdal)ImgRasterGdalprotected
m_ncol (defined in ImgRasterGdal)ImgRasterGdalprotected
m_noDataValues (defined in ImgRasterGdal)ImgRasterGdalprotected
m_nrow (defined in ImgRasterGdal)ImgRasterGdalprotected
nrOfBand(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfCol(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfRow(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
pushNoDataValue(double noDataValue) (defined in ImgRasterGdal)ImgRasterGdal
setNoData(const std::vector< double > nodata) (defined in ImgRasterGdal)ImgRasterGdalinline
~ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdalinlinevirtual
pktools-2.6.6/doc/html/Filter2d_8cc_source.html0000644000113200011300000060232612647637661016345 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Filter2d.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
Filter2d.cc
1 /**********************************************************************
2 Filter2d.cc: class for filtering images
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <sstream>
21 #include <iomanip>
22 #include <iostream>
23 #include <cmath>
24 #include "Filter2d.h"
25 #include "StatFactory.h"
26 // #include "imageclasses/ImgUtils.h"
27 
28 filter2d::Filter2d::Filter2d(void)
29 {
30 }
31 
32 filter2d::Filter2d::Filter2d(const Vector2d<double> &taps)
33  : m_taps(taps)
34 {
35 }
36 
37 int filter2d::Filter2d::pushNoDataValue(double noDataValue)
38 {
39  if(find(m_noDataValues.begin(),m_noDataValues.end(),noDataValue)==m_noDataValues.end())
40  m_noDataValues.push_back(noDataValue);
41  return(m_noDataValues.size());
42 }
43 
44 void filter2d::Filter2d::setTaps(const Vector2d<double> &taps)
45 {
46  m_taps=taps;
47 }
48 
49 void filter2d::Filter2d::smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output, int dim)
50 {
51  smoothNoData(input, output,dim,dim);
52 }
53 
54 void filter2d::Filter2d::smooth(const ImgReaderGdal& input, ImgWriterGdal& output, int dim)
55 {
56  smooth(input, output,dim,dim);
57 }
58 
59 void filter2d::Filter2d::smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY)
60 {
61  m_taps.resize(dimY);
62  for(int j=0;j<dimY;++j){
63  m_taps[j].resize(dimX);
64  for(int i=0;i<dimX;++i)
65  m_taps[j][i]=1.0;
66  }
67  filter(input,output,false,true,true);
68 }
69 
70 void filter2d::Filter2d::smooth(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY)
71 {
72  m_taps.resize(dimY);
73  for(int j=0;j<dimY;++j){
74  m_taps[j].resize(dimX);
75  for(int i=0;i<dimX;++i)
76  m_taps[j][i]=1.0;
77  }
78  filter(input,output,false,true,false);
79 }
80 
81 
82 void filter2d::Filter2d::filter(const ImgReaderGdal& input, ImgWriterGdal& output, bool absolute, bool normalize, bool noData)
83 {
84  int dimX=m_taps[0].size();//horizontal!!!
85  int dimY=m_taps.size();//vertical!!!
86  // byte* tmpbuf=new byte[input.rowSize()];
87  const char* pszMessage;
88  void* pProgressArg=NULL;
89  GDALProgressFunc pfnProgress=GDALTermProgress;
90  double progress=0;
91  pfnProgress(progress,pszMessage,pProgressArg);
92  for(int iband=0;iband<input.nrOfBand();++iband){
93  Vector2d<double> inBuffer(dimY,input.nrOfCol());
94  std::vector<double> outBuffer(input.nrOfCol());
95  int indexI=0;
96  int indexJ=0;
97  //initialize last half of inBuffer
98  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
99  try{
100  input.readData(inBuffer[indexJ],GDT_Float64,abs(j),iband);
101  }
102  catch(std::string errorstring){
103  std::cerr << errorstring << "in line " << indexJ << std::endl;
104  }
105  ++indexJ;
106  }
107 
108  for(int y=0;y<input.nrOfRow();++y){
109  if(y){//inBuffer already initialized for y=0
110  //erase first line from inBuffer
111  if(dimY>1)
112  inBuffer.erase(inBuffer.begin());
113  //read extra line and push back to inBuffer if not out of bounds
114  if(y+dimY/2<input.nrOfRow()){
115  //allocate buffer
116  if(dimY>1)
117  inBuffer.push_back(inBuffer.back());
118  try{
119  input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2,iband);
120  }
121  catch(std::string errorstring){
122  std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
123  }
124  }
125  else{
126  int over=y+dimY/2-input.nrOfRow();
127  int index=(inBuffer.size()-1)-over;
128  assert(index>=0);
129  assert(index<inBuffer.size());
130  inBuffer.push_back(inBuffer[index]);
131  }
132  }
133  for(int x=0;x<input.nrOfCol();++x){
134  outBuffer[x]=0;
135  double norm=0;
136  bool masked=false;
137  if(noData){//only filter noData values
138  for(int imask=0;imask<m_noDataValues.size();++imask){
139  if(inBuffer[(dimY-1)/2][x]==m_noDataValues[imask]){
140  masked=true;
141  break;
142  }
143  }
144  if(!masked){
145  outBuffer[x]=inBuffer[(dimY-1)/2][x];
146  continue;
147  }
148  }
149  assert(!noData||masked);
150  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
151  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
152  indexI=x+i;
153  indexJ=(dimY-1)/2+j;
154  //check if out of bounds
155  if(x<(dimX-1)/2)
156  indexI=x+abs(i);
157  else if(x>=input.nrOfCol()-(dimX-1)/2)
158  indexI=x-abs(i);
159  if(y<(dimY-1)/2)
160  indexJ=(dimY-1)/2+abs(j);
161  else if(y>=input.nrOfRow()-(dimY-1)/2)
162  indexJ=(dimY-1)/2-abs(j);
163  //do not take masked values into account
164  masked=false;
165  for(int imask=0;imask<m_noDataValues.size();++imask){
166  if(inBuffer[indexJ][indexI]==m_noDataValues[imask]){
167  masked=true;
168  break;
169  }
170  }
171  if(!masked){
172  outBuffer[x]+=(m_taps[(dimY-1)/2+j][(dimX-1)/2+i]*inBuffer[indexJ][indexI]);
173  norm+=m_taps[(dimY-1)/2+j][(dimX-1)/2+i];
174  }
175  }
176  }
177  if(absolute)
178  outBuffer[x]=(normalize&&norm)? abs(outBuffer[x])/norm : abs(outBuffer[x]);
179  else if(normalize&&norm!=0)
180  outBuffer[x]=outBuffer[x]/norm;
181  }
182  //write outBuffer to file
183  try{
184  output.writeData(outBuffer,GDT_Float64,y,iband);
185  }
186  catch(std::string errorstring){
187  std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
188  }
189  progress=(1.0+y);
190  progress+=(output.nrOfRow()*iband);
191  progress/=output.nrOfBand()*output.nrOfRow();
192  pfnProgress(progress,pszMessage,pProgressArg);
193  }
194  }
195 }
196 
197 
198 void filter2d::Filter2d::majorVoting(const std::string& inputFilename, const std::string& outputFilename,int dim,const std::vector<int> &prior)
199 {
200  const char* pszMessage;
201  void* pProgressArg=NULL;
202  GDALProgressFunc pfnProgress=GDALTermProgress;
203  double progress=0;
204  pfnProgress(progress,pszMessage,pProgressArg);
205 
206  bool usePriors=true;
207  if(prior.empty()){
208  std::cout << "no prior information" << std::endl;
209  usePriors=false;
210  }
211  else{
212  std::cout << "using priors ";
213  for(int iclass=0;iclass<prior.size();++iclass)
214  std::cout << " " << static_cast<short>(prior[iclass]);
215  std::cout << std::endl;
216  }
217 
218  ImgReaderGdal input;
219  ImgWriterGdal output;
220  input.open(inputFilename);
221  output.open(outputFilename,input);
222  int dimX=0;//horizontal!!!
223  int dimY=0;//vertical!!!
224  if(dim){
225  dimX=dim;
226  dimY=dim;
227  }
228  else{
229  dimX=m_taps[0].size();
230  dimY=m_taps.size();
231  }
232 
233  assert(dimX);
234  assert(dimY);
235 
236  Vector2d<double> inBuffer(dimY,input.nrOfCol());
237  std::vector<double> outBuffer(input.nrOfCol());
238  int indexI=0;
239  int indexJ=0;
240  //initialize last half of inBuffer
241  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
242  try{
243  input.readData(inBuffer[indexJ],GDT_Float64,abs(j));
244  }
245  catch(std::string errorstring){
246  std::cerr << errorstring << "in line " << indexJ << std::endl;
247  }
248  ++indexJ;
249  }
250 
251  for(int y=0;y<input.nrOfRow();++y){
252  if(y){//inBuffer already initialized for y=0
253  //erase first line from inBuffer
254  if(dimY>1)
255  inBuffer.erase(inBuffer.begin());
256  //read extra line and push back to inBuffer if not out of bounds
257  if(y+dimY/2<input.nrOfRow()){
258  //allocate buffer
259  if(dimY>1)
260  inBuffer.push_back(inBuffer.back());
261  try{
262  input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2);
263  }
264  catch(std::string errorstring){
265  std::cerr << errorstring << "in line" << y << std::endl;
266  }
267  }
268  else{
269  int over=y+dimY/2-input.nrOfRow();
270  int index=(inBuffer.size()-1)-over;
271  assert(index>=0);
272  assert(index<inBuffer.size());
273  inBuffer.push_back(inBuffer[index]);
274  }
275  }
276  for(int x=0;x<input.nrOfCol();++x){
277  outBuffer[x]=0;
278  std::map<int,int> occurrence;
279  int centre=dimX*(dimY-1)/2+(dimX-1)/2;
280  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
281  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
282  indexI=x+i;
283  //check if out of bounds
284  if(indexI<0)
285  indexI=-indexI;
286  else if(indexI>=input.nrOfCol())
287  indexI=input.nrOfCol()-i;
288  if(y+j<0)
289  indexJ=-j;
290  else if(y+j>=input.nrOfRow())
291  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
292  else
293  indexJ=(dimY-1)/2+j;
294 
295  // if(x<dimX/2)
296  // indexI=x+abs(i);
297  // else if(x>=input.nrOfCol()-dimX/2)
298  // indexI=x-abs(i);
299  // if(y<dimY/2)
300  // indexJ=dimY/2+abs(j);
301  // else if(y>=input.nrOfRow()-dimY/2)
302  // indexJ=dimY/2-abs(j);
303  if(usePriors){
304  occurrence[inBuffer[indexJ][indexI]]+=prior[inBuffer[indexJ][indexI]-1];
305  }
306  else
307  ++occurrence[inBuffer[indexJ][indexI]];
308  }
309  }
310  std::map<int,int>::const_iterator maxit=occurrence.begin();
311  for(std::map<int,int>::const_iterator mit=occurrence.begin();mit!=occurrence.end();++mit){
312  if(mit->second>maxit->second)
313  maxit=mit;
314  }
315  if(occurrence[inBuffer[(dimY-1)/2][x]]<maxit->second)//
316  outBuffer[x]=maxit->first;
317  else//favorize original value in case of ties
318  outBuffer[x]=inBuffer[(dimY-1)/2][x];
319  }
320  //write outBuffer to file
321  try{
322  output.writeData(outBuffer,GDT_Float64,y);
323  }
324  catch(std::string errorstring){
325  std::cerr << errorstring << "in line" << y << std::endl;
326  }
327  progress=(1.0+y)/output.nrOfRow();
328  pfnProgress(progress,pszMessage,pProgressArg);
329  }
330  input.close();
331  output.close();
332 }
333 
334 void filter2d::Filter2d::median(const std::string& inputFilename, const std::string& outputFilename,int dim, bool disc)
335 {
336  ImgReaderGdal input;
337  ImgWriterGdal output;
338  input.open(inputFilename);
339  output.open(outputFilename,input);
340  doit(input,output,"median",dim,disc);
341 }
342 
343 void filter2d::Filter2d::var(const std::string& inputFilename, const std::string& outputFilename,int dim, bool disc)
344 {
345  ImgReaderGdal input;
346  ImgWriterGdal output;
347  input.open(inputFilename);
348  output.open(outputFilename,input);
349  doit(input,output,"var",dim,disc);
350 }
351 
352 void filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short down, bool disc)
353 {
354  doit(input,output,method,dim,dim,down,disc);
355 }
356 
357 void filter2d::Filter2d::doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, short down, bool disc)
358 {
359  const char* pszMessage;
360  void* pProgressArg=NULL;
361  GDALProgressFunc pfnProgress=GDALTermProgress;
362  double progress=0;
363  pfnProgress(progress,pszMessage,pProgressArg);
364 
365  assert(dimX);
366  assert(dimY);
367 
369  for(int iband=0;iband<input.nrOfBand();++iband){
370  Vector2d<double> inBuffer(dimY,input.nrOfCol());
371  std::vector<double> outBuffer((input.nrOfCol()+down-1)/down);
372  int indexI=0;
373  int indexJ=0;
374  //initialize last half of inBuffer
375  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
376  try{
377  input.readData(inBuffer[indexJ],GDT_Float64,abs(j),iband);
378  }
379  catch(std::string errorstring){
380  std::cerr << errorstring << "in line " << indexJ << std::endl;
381  }
382  ++indexJ;
383  }
384  for(int y=0;y<input.nrOfRow();++y){
385  if(y){//inBuffer already initialized for y=0
386  //erase first line from inBuffer
387  if(dimY>1)
388  inBuffer.erase(inBuffer.begin());
389  //read extra line and push back to inBuffer if not out of bounds
390  if(y+dimY/2<input.nrOfRow()){
391  //allocate buffer
392  if(dimY>1)
393  inBuffer.push_back(inBuffer.back());
394  try{
395  input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2,iband);
396  }
397  catch(std::string errorstring){
398  std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
399  }
400  }
401  else{
402  int over=y+dimY/2-input.nrOfRow();
403  int index=(inBuffer.size()-1)-over;
404  assert(index>=0);
405  assert(index<inBuffer.size());
406  inBuffer.push_back(inBuffer[index]);
407  }
408  }
409  if((y+1+down/2)%down)
410  continue;
411  for(int x=0;x<input.nrOfCol();++x){
412  if((x+1+down/2)%down)
413  continue;
414  outBuffer[x/down]=0;
415  std::vector<double> windowBuffer;
416  std::map<long int,int> occurrence;
417  int centre=dimX*(dimY-1)/2+(dimX-1)/2;
418  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
419  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
420  double d2=i*i+j*j;//square distance
421  if(disc&&(d2>(dimX/2)*(dimY/2)))
422  continue;
423  indexI=x+i;
424  //check if out of bounds
425  if(indexI<0)
426  indexI=-indexI;
427  else if(indexI>=input.nrOfCol())
428  indexI=input.nrOfCol()-i;
429  if(y+j<0)
430  indexJ=-j;
431  else if(y+j>=input.nrOfRow())
432  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
433  else
434  indexJ=(dimY-1)/2+j;
435  bool masked=false;
436  for(int imask=0;imask<m_noDataValues.size();++imask){
437  if(inBuffer[indexJ][indexI]==m_noDataValues[imask]){
438  masked=true;
439  break;
440  }
441  }
442  if(!masked){
443  std::vector<short>::const_iterator vit=m_class.begin();
444  if(!m_class.size())
445  ++occurrence[inBuffer[indexJ][indexI]];
446  else{
447  while(vit!=m_class.end()){
448  if(inBuffer[indexJ][indexI]==*(vit++))
449  ++occurrence[inBuffer[indexJ][indexI]];
450  }
451  }
452  windowBuffer.push_back(inBuffer[indexJ][indexI]);
453  }
454  }
455  }
456  switch(getFilterType(method)){
457  case(filter2d::nvalid):
458  outBuffer[x/down]=stat.nvalid(windowBuffer);
459  break;
460  case(filter2d::median):
461  if(windowBuffer.empty())
462  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
463  else
464  outBuffer[x/down]=stat.median(windowBuffer);
465  break;
466  case(filter2d::var):{
467  if(windowBuffer.empty())
468  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
469  else
470  outBuffer[x/down]=stat.var(windowBuffer);
471  break;
472  }
473  case(filter2d::stdev):{
474  if(windowBuffer.empty())
475  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
476  else
477  outBuffer[x/down]=sqrt(stat.var(windowBuffer));
478  break;
479  }
480  case(filter2d::mean):{
481  if(windowBuffer.empty())
482  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
483  else
484  outBuffer[x/down]=stat.mean(windowBuffer);
485  break;
486  }
487  case(filter2d::min):{
488  if(windowBuffer.empty())
489  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
490  else
491  outBuffer[x/down]=stat.mymin(windowBuffer);
492  break;
493  }
494  case(filter2d::ismin):{
495  if(windowBuffer.empty())
496  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
497  else
498  outBuffer[x/down]=(stat.mymin(windowBuffer)==windowBuffer[centre])? 1:0;
499  break;
500  }
501  case(filter2d::minmax):{//is the same as homog?
502  double min=0;
503  double max=0;
504  if(windowBuffer.empty())
505  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
506  else{
507  stat.minmax(windowBuffer,windowBuffer.begin(),windowBuffer.end(),min,max);
508  if(min!=max)
509  outBuffer[x/down]=0;
510  else
511  outBuffer[x/down]=windowBuffer[centre];//centre pixels
512  }
513  break;
514  }
515  case(filter2d::max):{
516  if(windowBuffer.empty())
517  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
518  else
519  outBuffer[x/down]=stat.mymax(windowBuffer);
520  break;
521  }
522  case(filter2d::ismax):{
523  if(windowBuffer.empty())
524  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
525  else
526  outBuffer[x/down]=(stat.mymax(windowBuffer)==windowBuffer[centre])? 1:0;
527  break;
528  }
529  case(filter2d::order):{
530  if(windowBuffer.empty())
531  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
532  else{
533  double lbound=0;
534  double ubound=dimX*dimY;
535  double theMin=stat.mymin(windowBuffer);
536  double theMax=stat.mymax(windowBuffer);
537  double scale=(ubound-lbound)/(theMax-theMin);
538  outBuffer[x/down]=static_cast<short>(scale*(windowBuffer[centre]-theMin)+lbound);
539  }
540  break;
541  }
542  case(filter2d::sum):{
543  outBuffer[x/down]=stat.sum(windowBuffer);
544  break;
545  }
546  case(filter2d::percentile):{
547  assert(m_threshold.size());
548  outBuffer[x/down]=stat.percentile(windowBuffer,windowBuffer.begin(),windowBuffer.end(),m_threshold[0]);
549  break;
550  }
551  case(filter2d::proportion):{
552  if(windowBuffer.size()){
553  double sum=stat.sum(windowBuffer);
554  if(sum)
555  outBuffer[x/down]=100.0*windowBuffer[centre]/stat.sum(windowBuffer);
556  else
557  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
558  }
559  else
560  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
561  break;
562  }
563  case(filter2d::homog):
564  if(occurrence.size()==1)//all values in window are the same
565  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];
566  else
567  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
568  break;
569  case(filter2d::heterog):{
570  if(occurrence.size()==windowBuffer.size())
571  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];
572  else
573  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
574  // if(occurrence.size()==1)//all values in window are the same
575  // outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
576  // else
577  // outBuffer[x/down]=inBuffer[(dimY-1)/2][x];
578  // break;
579  // for(std::vector<double>::const_iterator wit=windowBuffer.begin();wit!=windowBuffer.end();++wit){
580  // if(wit==windowBuffer.begin()+windowBuffer.size()/2)
581  // continue;
582  // else if(*wit!=inBuffer[(dimY-1)/2][x]){
583  // outBuffer[x/down]=1;
584  // break;
585  // }
586  // else if(*wit==inBuffer[(dimY-1)/2][x]){//todo:wit mag niet central pixel zijn
587  // outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
588  // break;
589  // }
590  // }
591  // break;
592  }
593  case(filter2d::density):{
594  if(windowBuffer.size()){
595  std::vector<short>::const_iterator vit=m_class.begin();
596  while(vit!=m_class.end())
597  outBuffer[x/down]+=100.0*occurrence[*(vit++)]/windowBuffer.size();
598  }
599  else
600  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
601  break;
602  }
603  case(filter2d::countid):{
604  if(windowBuffer.size())
605  outBuffer[x/down]=occurrence.size();
606  else
607  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
608  break;
609  }
610  case(filter2d::mode):{
611  if(occurrence.size()){
612  std::map<long int,int>::const_iterator maxit=occurrence.begin();
613  for(std::map<long int,int>::const_iterator mit=occurrence.begin();mit!=occurrence.end();++mit){
614  if(mit->second>maxit->second)
615  maxit=mit;
616  }
617  if(occurrence[inBuffer[(dimY-1)/2][x]]<maxit->second)//
618  outBuffer[x/down]=maxit->first;
619  else//favorize original value in case of ties
620  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];
621  }
622  else
623  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
624  break;
625  }
626  case(filter2d::threshold):{
627  assert(m_class.size()==m_threshold.size());
628  if(windowBuffer.size()){
629  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];//initialize with original value (in case thresholds not met)
630  for(int iclass=0;iclass<m_class.size();++iclass){
631  if(100.0*(occurrence[m_class[iclass]])/windowBuffer.size()>m_threshold[iclass])
632  outBuffer[x/down]=m_class[iclass];
633  }
634  }
635  else
636  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
637  break;
638  }
639  case(filter2d::scramble):{//could be done more efficiently window by window with random shuffling entire buffer and assigning entire buffer at once to output image...
640  if(windowBuffer.size()){
641  int randomIndex=std::rand()%windowBuffer.size();
642  if(randomIndex>=windowBuffer.size())
643  outBuffer[x/down]=windowBuffer.back();
644  else if(randomIndex<0)
645  outBuffer[x/down]=windowBuffer[0];
646  else
647  outBuffer[x/down]=windowBuffer[randomIndex];
648  }
649  else
650  outBuffer[x/down]=(m_noDataValues.size())? m_noDataValues[0] : 0;
651  break;
652  }
653  case(filter2d::mixed):{
654  enum Type { BF=11, CF=12, MF=13, NF=20, W=30 };
655  double nBF=occurrence[BF];
656  double nCF=occurrence[CF];
657  double nMF=occurrence[MF];
658  double nNF=occurrence[NF];
659  double nW=occurrence[W];
660  if(windowBuffer.size()){
661  if((nBF+nCF+nMF)&&(nBF+nCF+nMF>=nNF+nW)){//forest
662  if(nBF/(nBF+nCF)>=0.75)
663  outBuffer[x/down]=BF;
664  else if(nCF/(nBF+nCF)>=0.75)
665  outBuffer[x/down]=CF;
666  else
667  outBuffer[x/down]=MF;
668  }
669  else{//non-forest
670  if(nW&&(nW>=nNF))
671  outBuffer[x/down]=W;
672  else
673  outBuffer[x/down]=NF;
674  }
675  }
676  else
677  outBuffer[x/down]=inBuffer[indexJ][indexI];
678  break;
679  }
680  default:{
681  std::ostringstream ess;
682  ess << "Error: filter method " << method << " not supported" << std::endl;
683  throw(ess.str());
684  break;
685  }
686  }
687  }
688  progress=(1.0+y/down);
689  progress+=(output.nrOfRow()*iband);
690  progress/=output.nrOfBand()*output.nrOfRow();
691  pfnProgress(progress,pszMessage,pProgressArg);
692  //write outBuffer to file
693  try{
694  output.writeData(outBuffer,GDT_Float64,y/down,iband);
695  }
696  catch(std::string errorstring){
697  std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
698  }
699  }
700  }
701  pfnProgress(1.0,pszMessage,pProgressArg);
702 }
703 
704 void filter2d::Filter2d::mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, double beta, bool eightConnectivity, short down, bool verbose){
705  assert(m_class.size()>1);
706  Vector2d<double> fullBeta(m_class.size(),m_class.size());
707  for(int iclass1=0;iclass1<m_class.size();++iclass1)
708  for(int iclass2=0;iclass2<m_class.size();++iclass2)
709  fullBeta[iclass1][iclass2]=beta;
710  mrf(input,output,dimX,dimY,fullBeta,eightConnectivity,down,verbose);
711 }
712 
713 //beta[classTo][classFrom]
714 void filter2d::Filter2d::mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, Vector2d<double> beta, bool eightConnectivity, short down, bool verbose)
715 {
716  const char* pszMessage;
717  void* pProgressArg=NULL;
718  GDALProgressFunc pfnProgress=GDALTermProgress;
719  double progress=0;
720  pfnProgress(progress,pszMessage,pProgressArg);
721 
722  assert(dimX);
723  assert(dimY);
724 
725  Vector2d<short> inBuffer(dimY,input.nrOfCol());
726  Vector2d<double> outBuffer(m_class.size(),(input.nrOfCol()+down-1)/down);
727  assert(input.nrOfBand()==1);
728  assert(output.nrOfBand()==m_class.size());
729  assert(m_class.size()>1);
730  assert(beta.size()==m_class.size());
731  int indexI=0;
732  int indexJ=0;
733  //initialize last half of inBuffer
734  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
735  try{
736  input.readData(inBuffer[indexJ],GDT_Int16,abs(j));
737  }
738  catch(std::string errorstring){
739  std::cerr << errorstring << "in line " << indexJ << std::endl;
740  }
741  ++indexJ;
742  }
743  for(int y=0;y<input.nrOfRow();++y){
744  if(y){//inBuffer already initialized for y=0
745  //erase first line from inBuffer
746  if(dimY>1)
747  inBuffer.erase(inBuffer.begin());
748  //read extra line and push back to inBuffer if not out of bounds
749  if(y+dimY/2<input.nrOfRow()){
750  //allocate buffer
751  if(dimY>1)
752  inBuffer.push_back(inBuffer.back());
753  try{
754  input.readData(inBuffer[inBuffer.size()-1],GDT_Int16,y+dimY/2);
755  }
756  catch(std::string errorstring){
757  std::cerr << errorstring << "in line " << y << std::endl;
758  }
759  }
760  else{
761  int over=y+dimY/2-input.nrOfRow();
762  int index=(inBuffer.size()-1)-over;
763  assert(index>=0);
764  assert(index<inBuffer.size());
765  inBuffer.push_back(inBuffer[index]);
766  }
767  }
768  if((y+1+down/2)%down)
769  continue;
770  for(int x=0;x<input.nrOfCol();++x){
771  if((x+1+down/2)%down)
772  continue;
773  std::vector<short> potential(m_class.size());
774  for(int iclass=0;iclass<m_class.size();++iclass){
775  potential[iclass]=0;
776  outBuffer[iclass][x/down]=0;
777  }
778  std::vector<double> windowBuffer;
779  int centre=dimX*(dimY-1)/2+(dimX-1)/2;
780  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
781  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
782  if(i!=0&&j!=0&&!eightConnectivity)
783  continue;
784  if(i==0&&j==0)
785  continue;
786  indexI=x+i;
787  //check if out of bounds
788  if(indexI<0)
789  indexI=-indexI;
790  else if(indexI>=input.nrOfCol())
791  indexI=input.nrOfCol()-i;
792  if(y+j<0)
793  indexJ=-j;
794  else if(y+j>=input.nrOfRow())
795  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
796  else
797  indexJ=(dimY-1)/2+j;
798  bool masked=false;
799  for(int imask=0;imask<m_noDataValues.size();++imask){
800  if(inBuffer[indexJ][indexI]==m_noDataValues[imask]){
801  masked=true;
802  break;
803  }
804  }
805  if(!masked){
806  for(int iclass=0;iclass<m_class.size();++iclass){
807  if(inBuffer[indexJ][indexI]==m_class[iclass])
808  potential[iclass]+=1;
809  }
810  }
811  }
812  }
813  double norm=0;
814  for(int iclass1=0;iclass1<m_class.size();++iclass1){
815  assert(beta[iclass1].size()==m_class.size());
816  double pot=0;
817  for(int iclass2=0;iclass2<m_class.size();++iclass2)
818  if(iclass2!=iclass1)
819  pot+=potential[iclass2]*beta[iclass1][iclass2];
820  double prior=exp(-pot);
821  outBuffer[iclass1][x/down]=prior;
822  norm+=prior;
823  }
824  if(norm){
825  for(int iclass1=0;iclass1<m_class.size();++iclass1)
826  outBuffer[iclass1][x/down]/=norm;
827  }
828  }
829  progress=(1.0+y/down)/output.nrOfRow();
830  pfnProgress(progress,pszMessage,pProgressArg);
831  //write outBuffer to file
832  assert(outBuffer.size()==m_class.size());
833  assert(y<output.nrOfRow());
834  for(int iclass=0;iclass<m_class.size();++iclass){
835  assert(outBuffer[iclass].size()==output.nrOfCol());
836  try{
837  output.writeData(outBuffer[iclass],GDT_Float64,y/down,iclass);
838  }
839  catch(std::string errorstring){
840  std::cerr << errorstring << "in class " << iclass << ", line " << y << std::endl;
841  }
842  }
843  }
844 }
845 
846 void filter2d::Filter2d::shift(const ImgReaderGdal& input, ImgWriterGdal& output, double offsetX, double offsetY, double randomSigma, RESAMPLE resample, bool verbose)
847 {
848  assert(input.nrOfCol()==output.nrOfCol());
849  assert(input.nrOfRow()==output.nrOfRow());
850  assert(input.nrOfBand()==output.nrOfBand());
851  const char* pszMessage;
852  void* pProgressArg=NULL;
853  GDALProgressFunc pfnProgress=GDALTermProgress;
854  double progress=0;
855  pfnProgress(progress,pszMessage,pProgressArg);
856  //process band per band in memory
857  Vector2d<double> inBuffer(input.nrOfRow(),output.nrOfCol());
858  Vector2d<double> outBuffer(input.nrOfRow(),output.nrOfCol());
859  for(int iband=0;iband<input.nrOfBand();++iband){
860  input.readDataBlock(inBuffer,GDT_Float64,0,inBuffer.nCols()-1,0,inBuffer.nRows()-1,iband);
861  shift(inBuffer,outBuffer,offsetX,offsetY,randomSigma,resample,verbose);
862  output.writeDataBlock(outBuffer,GDT_Float64,0,outBuffer.nCols()-1,0,outBuffer.nRows()-1,iband);
863  }
864 }
865 
866 //todo: re-implement without dependency of CImg and reg libraries
867 // void filter2d::Filter2d::dwt_texture(const std::string& inputFilename, const std::string& outputFilename,int dim, int scale, int down, int iband, bool verbose)
868 // {
869 // ImgReaderGdal input;
870 // ImgWriterGdal output;
871 // if(verbose)
872 // std::cout << "opening file " << inputFilename << std::endl;
873 // input.open(inputFilename);
874 // double magicX=1,magicY=1;
875 // output.open(outputFilename,(input.nrOfCol()+down-1)/down,(input.nrOfRow()+down-1)/down,scale*3,GDT_Float32,input.getImageType());
876 // if(input.isGeoRef()){
877 // output.setProjection(input.getProjection());
878 // output.copyGeoTransform(input);
879 // }
880 // if(verbose)
881 // std::cout << "Dimension texture (row x col x band) = " << (input.nrOfCol()+down-1)/down << " x " << (input.nrOfRow()+down-1)/down << " x " << scale*3 << std::endl;
882 // assert(dim%2);
883 // int dimX=dim;
884 // int dimY=dim;
885 // Vector2d<float> inBuffer(dimY,input.nrOfCol());
886 // Vector2d<float> outBuffer(scale*3,(input.nrOfCol()+down-1)/down);
887 // //initialize last half of inBuffer
888 // int indexI=0;
889 // int indexJ=0;
890 // for(int j=-dimY/2;j<(dimY+1)/2;++j){
891 // try{
892 // if(verbose)
893 // cout << "reading input line " << abs(j) << std::endl;
894 // input.readData(inBuffer[indexJ],GDT_Float32,abs(j),iband);
895 // ++indexJ;
896 // }
897 // catch(std::string errorstring){
898 // std::cerr << errorstring << "in band " << iband << ", line " << indexJ << std::endl;
899 // }
900 // }
901 // const char* pszMessage;
902 // void* pProgressArg=NULL;
903 // GDALProgressFunc pfnProgress=GDALTermProgress;
904 // double progress=0;
905 // pfnProgress(progress,pszMessage,pProgressArg);
906 // for(int y=0;y<input.nrOfRow();y+=down){
907 // if(verbose)
908 // std::cout << "calculating line " << y/down << std::endl;
909 // if(y){//inBuffer already initialized for y=0
910 // //erase first line from inBuffer
911 // inBuffer.erase(inBuffer.begin());
912 // //read extra line and push back to inBuffer if not out of bounds
913 // if(y+dimY/2<input.nrOfRow()){
914 // //allocate buffer
915 // inBuffer.push_back(inBuffer.back());
916 // try{
917 // if(verbose)
918 // std::cout << "reading input line " << y+dimY/2 << std::endl;
919 // input.readData(inBuffer[inBuffer.size()-1],GDT_Float32,y+dimY/2,iband);
920 // }
921 // catch(std::string errorstring){
922 // std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
923 // }
924 // }
925 // }
926 // for(int x=0;x<input.nrOfCol();x+=down){
927 // Vector2d<double> texture_feature(scale,3);
928 // CImg<> texture_in(dimX,dimY);
929 // int r=0;//index for row of texture_in
930 // for(int j=-dimY/2;j<(dimY+1)/2;++j){
931 // int c=0;
932 // for(int i=-dimX/2;i<(dimX+1)/2;++i){
933 // indexI=x+i;
934 // //check if out of bounds
935 // if(indexI<0)
936 // indexI=-indexI;
937 // else if(indexI>=input.nrOfCol())
938 // indexI=input.nrOfCol()-i;
939 // if(y+j<0)
940 // indexJ=-j;
941 // else if(y+j>=input.nrOfRow())
942 // indexJ=dimY/2-j;//indexJ=inBuffer.size()-1-j;
943 // else
944 // indexJ=dimY/2+j;
945 // assert(indexJ<inBuffer.size());
946 // assert(indexI<inBuffer[indexJ].size());
947 // texture_in(r,c)=inBuffer[indexJ][indexI];
948 // c++;
949 // }
950 // ++r;
951 // }
952 // texture_in.dwt_texture(texture_feature,scale);
953 // for(int v=0;v<scale*3;++v)
954 // outBuffer[v][x/down]=texture_feature[v/3][v%3];
955 // }
956 // //write outBuffer to file
957 // try{
958 // if(verbose)
959 // std::cout << "writing line " << y/down << std::endl;
960 // for(int v=0;v<scale*3;++v)
961 // output.writeData(outBuffer[v],GDT_Float32,y/down,v);
962 // }
963 // catch(std::string errorstring){
964 // std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
965 // }
966 // progress=(1.0+y)/output.nrOfRow();
967 // pfnProgress(progress,pszMessage,pProgressArg);
968 // }
969 // input.close();
970 // output.close();
971 // }
972 
973 void filter2d::Filter2d::morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, const std::vector<double> &angle, bool disc)
974 {
975  const char* pszMessage;
976  void* pProgressArg=NULL;
977  GDALProgressFunc pfnProgress=GDALTermProgress;
978  double progress=0;
979  pfnProgress(progress,pszMessage,pProgressArg);
980 
981  assert(dimX);
982  assert(dimY);
983 
985  for(int iband=0;iband<input.nrOfBand();++iband){
986  Vector2d<double> inBuffer(dimY,input.nrOfCol());
987  std::vector<double> outBuffer(input.nrOfCol());
988  int indexI=0;
989  int indexJ=0;
990  //initialize last half of inBuffer
991  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
992  try{
993  input.readData(inBuffer[indexJ],GDT_Float64,abs(j),iband);
994  ++indexJ;
995  }
996  catch(std::string errorstring){
997  std::cerr << errorstring << "in line " << indexJ << std::endl;
998  }
999  }
1000  for(int y=0;y<input.nrOfRow();++y){
1001  if(y){//inBuffer already initialized for y=0
1002  //erase first line from inBuffer
1003  if(dimY>1)
1004  inBuffer.erase(inBuffer.begin());
1005  //read extra line and push back to inBuffer if not out of bounds
1006  if(y+dimY/2<input.nrOfRow()){
1007  //allocate buffer
1008  if(dimY>1)
1009  inBuffer.push_back(inBuffer.back());
1010  try{
1011  input.readData(inBuffer[inBuffer.size()-1],GDT_Float64,y+dimY/2,iband);
1012  }
1013  catch(std::string errorstring){
1014  std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
1015  }
1016  }
1017  else{
1018  int over=y+dimY/2-input.nrOfRow();
1019  int index=(inBuffer.size()-1)-over;
1020  assert(index>=0);
1021  assert(index<inBuffer.size());
1022  inBuffer.push_back(inBuffer[index]);
1023  }
1024  }
1025  for(int x=0;x<input.nrOfCol();++x){
1026  double currentValue=inBuffer[(dimY-1)/2][x];
1027  outBuffer[x]=currentValue;
1028  std::vector<double> statBuffer;
1029  bool currentMasked=false;
1030  int centre=dimX*(dimY-1)/2+(dimX-1)/2;
1031  for(int imask=0;imask<m_noDataValues.size();++imask){
1032  if(currentValue==m_noDataValues[imask]){
1033  currentMasked=true;
1034  break;
1035  }
1036  }
1037  if(currentMasked){
1038  outBuffer[x]=currentValue;
1039  }
1040  else{
1041  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
1042  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
1043  double d2=i*i+j*j;//square distance
1044  if(disc&&(d2>(dimX/2)*(dimY/2)))
1045  continue;
1046  if(angle.size()){
1047  double theta;
1048  //use polar coordinates in radians
1049  if(i>0){
1050  if(j<0)
1051  theta=atan(static_cast<double>(-j)/(static_cast<double>(i)));
1052  else
1053  theta=-atan(static_cast<double>(j)/(static_cast<double>(i)));
1054  }
1055  else if(i<0){
1056  if(j<0)
1057  theta=PI-atan(static_cast<double>(-j)/(static_cast<double>(-i)));
1058  else
1059  theta=PI+atan(static_cast<double>(j)/(static_cast<double>(-i)));
1060  }
1061  else if(j<0)
1062  theta=PI/2.0;
1063  else if(j>0)
1064  theta=3.0*PI/2.0;
1065  //convert to North (0), East (90), South (180), West (270) in degrees
1066  theta=360-(theta/PI*180)+90;
1067  if(theta<0)
1068  theta+=360;
1069  while(theta>360)
1070  theta-=360;
1071  bool alligned=false;
1072  for(int iangle=0;iangle<angle.size();++iangle){
1073  if(sqrt((theta-angle[iangle])*(theta-angle[iangle]))<10){
1074  alligned=true;
1075  break;
1076  }
1077  }
1078  if(!alligned)
1079  continue;
1080  }
1081  indexI=x+i;
1082  //check if out of bounds
1083  if(indexI<0)
1084  indexI=-indexI;
1085  else if(indexI>=input.nrOfCol())
1086  indexI=input.nrOfCol()-i;
1087  if(y+j<0)
1088  indexJ=-j;
1089  else if(y+j>=input.nrOfRow())
1090  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
1091  else
1092  indexJ=(dimY-1)/2+j;
1093  //todo: introduce novalue as this: ?
1094  // if(inBuffer[indexJ][indexI]==(m_noDataValues.size())? m_noDataValues[0] : 0)
1095  // continue;
1096  bool masked=false;
1097  for(int imask=0;imask<m_noDataValues.size();++imask){
1098  if(inBuffer[indexJ][indexI]==m_noDataValues[imask]){
1099  masked=true;
1100  break;
1101  }
1102  }
1103  if(!masked){
1104  short binValue=0;
1105  for(int iclass=0;iclass<m_class.size();++iclass){
1106  if(inBuffer[indexJ][indexI]==m_class[iclass]){
1107  binValue=1;
1108  break;
1109  }
1110  }
1111  if(m_class.size())
1112  statBuffer.push_back(binValue);
1113  else
1114  statBuffer.push_back(inBuffer[indexJ][indexI]);
1115  }
1116  }
1117  }
1118  if(statBuffer.size()){
1119  switch(getFilterType(method)){
1120  case(filter2d::dilate):
1121  outBuffer[x]=stat.mymax(statBuffer);
1122  break;
1123  case(filter2d::erode):
1124  outBuffer[x]=stat.mymin(statBuffer);
1125  break;
1126  default:
1127  std::ostringstream ess;
1128  ess << "Error: morphology method " << method << " not supported, choose " << filter2d::dilate << " (dilate) or " << filter2d::erode << " (erode)" << std::endl;
1129  throw(ess.str());
1130  break;
1131  }
1132  }
1133  if(outBuffer[x]&&m_class.size())
1134  outBuffer[x]=m_class[0];
1135  }
1136  }
1137  //write outBuffer to file
1138  try{
1139  output.writeData(outBuffer,GDT_Float64,y,iband);
1140  }
1141  catch(std::string errorstring){
1142  std::cerr << errorstring << "in band " << iband << ", line " << y << std::endl;
1143  }
1144  progress=(1.0+y);
1145  progress+=(output.nrOfRow()*iband);
1146  progress/=output.nrOfBand()*output.nrOfRow();
1147  pfnProgress(progress,pszMessage,pProgressArg);
1148  }
1149  }
1150 }
1151 
1152 void filter2d::Filter2d::shadowDsm(const ImgReaderGdal& input, ImgWriterGdal& output, double sza, double saa, double pixelSize, short shadowFlag){
1153  Vector2d<float> inputBuffer;
1154  Vector2d<float> outputBuffer;
1155  input.readDataBlock(inputBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, 0);
1156  shadowDsm(inputBuffer, outputBuffer, sza, saa, pixelSize, shadowFlag);
1157  output.writeDataBlock(outputBuffer,GDT_Float32,0,output.nrOfCol()-1,0,output.nrOfRow()-1,0);
1158 }
1159 
1160 void filter2d::Filter2d::dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family){
1161  Vector2d<float> theBuffer;
1162  for(int iband=0;iband<input.nrOfBand();++iband){
1163  input.readDataBlock(theBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, iband);
1164  std::cout << "filtering band " << iband << std::endl << std::flush;
1165  dwtForward(theBuffer, wavelet_type, family);
1166  output.writeDataBlock(theBuffer,GDT_Float32,0,output.nrOfCol()-1,0,output.nrOfRow()-1,iband);
1167  }
1168 }
1169 
1170 void filter2d::Filter2d::dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family){
1171  Vector2d<float> theBuffer;
1172  for(int iband=0;iband<input.nrOfBand();++iband){
1173  input.readDataBlock(theBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, iband);
1174  std::cout << "filtering band " << iband << std::endl << std::flush;
1175  dwtInverse(theBuffer, wavelet_type, family);
1176  output.writeDataBlock(theBuffer,GDT_Float32,0,output.nrOfCol()-1,0,output.nrOfRow()-1,iband);
1177  }
1178 }
1179 
1180 void filter2d::Filter2d::dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut, bool verbose){
1181  Vector2d<float> theBuffer;
1182  for(int iband=0;iband<input.nrOfBand();++iband){
1183  input.readDataBlock(theBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, iband);
1184  std::cout << "filtering band " << iband << std::endl << std::flush;
1185  dwtCut(theBuffer, wavelet_type, family, cut);
1186  output.writeDataBlock(theBuffer,GDT_Float32,0,output.nrOfCol()-1,0,output.nrOfRow()-1,iband);
1187  }
1188 }
1189 
1190 void filter2d::Filter2d::linearFeature(const ImgReaderGdal& input, ImgWriterGdal& output, float angle, float angleStep, float maxDistance, float eps, bool l1, bool a1, bool l2, bool a2, int band, bool verbose){
1191  Vector2d<float> inputBuffer;
1192  std::vector< Vector2d<float> > outputBuffer;
1193  input.readDataBlock(inputBuffer, GDT_Float32, 0, input.nrOfCol()-1, 0, input.nrOfRow()-1, band);
1194  if(maxDistance<=0)
1195  maxDistance=sqrt(static_cast<float>(input.nrOfCol()*input.nrOfRow()));
1196  linearFeature(inputBuffer,outputBuffer,angle,angleStep,maxDistance,eps, l1, a1, l2, a2,verbose);
1197  for(int iband=0;iband<outputBuffer.size();++iband)
1198  output.writeDataBlock(outputBuffer[iband],GDT_Float32,0,output.nrOfCol()-1,0,output.nrOfRow()-1,iband);
1199 }
1200 
1201 void filter2d::Filter2d::linearFeature(const Vector2d<float>& input, std::vector< Vector2d<float> >& output, float angle, float angleStep, float maxDistance, float eps, bool l1, bool a1, bool l2, bool a2, bool verbose)
1202 {
1203  output.clear();
1204  int nband=0;//linear feature
1205  if(l1)
1206  ++nband;
1207  if(a1)
1208  ++nband;
1209  if(l2)
1210  ++nband;
1211  if(a2)
1212  ++nband;
1213  output.resize(nband);
1214  for(int iband=0;iband<output.size();++iband)
1215  output[iband].resize(input.nRows(),input.nCols());
1216  if(maxDistance<=0)
1217  maxDistance=sqrt(static_cast<float>(input.nRows()*input.nCols()));
1218  int indexI=0;
1219  int indexJ=0;
1220  const char* pszMessage;
1221  void* pProgressArg=NULL;
1222  GDALProgressFunc pfnProgress=GDALTermProgress;
1223  double progress=0;
1224  pfnProgress(progress,pszMessage,pProgressArg);
1225  for(int y=0;y<input.nRows();++y){
1226  for(int x=0;x<input.nCols();++x){
1227  float currentValue=input[y][x];
1228  //find values equal to current value with some error margin
1229  //todo: add distance for two opposite directions
1230  float lineDistance1=0;//longest line of object
1231  float lineDistance2=maxDistance;//shortest line of object
1232  float lineAngle1=0;//angle to longest line (North=0)
1233  float lineAngle2=0;//angle to shortest line (North=0)
1234  float northAngle=0;//rotating angle
1235  for(northAngle=0;northAngle<180;northAngle+=angleStep){
1236  if(angle<=360&&angle>=0&&angle!=northAngle)
1237  continue;
1238  //test
1239  if(verbose)
1240  std::cout << "northAngle: " << northAngle << std::endl;
1241  float currentDistance=0;
1242  float theDir=0;
1243  for(short side=0;side<=1;side+=1){
1244  theDir=PI/2.0-DEG2RAD(northAngle)+side*PI;//in radians
1245  //test
1246  if(verbose)
1247  std::cout << "theDir in deg: " << RAD2DEG(theDir) << std::endl;
1248  if(theDir<0)
1249  theDir+=2*PI;
1250  //test
1251  if(verbose)
1252  std::cout << "theDir in deg: " << RAD2DEG(theDir) << std::endl;
1253  float nextValue=currentValue;
1254  for(float currentRay=1;currentRay<maxDistance;++currentRay){
1255  indexI=x+currentRay*cos(theDir);
1256  indexJ=y-currentRay*sin(theDir);
1257  if(indexJ<0||indexJ>=input.size())
1258  break;
1259  if(indexI<0||indexI>=input[indexJ].size())
1260  break;
1261  nextValue=input[indexJ][indexI];
1262  if(verbose){
1263  std::cout << "x: " << x << std::endl;
1264  std::cout << "y: " << y << std::endl;
1265  std::cout << "currentValue: " << currentValue << std::endl;
1266  std::cout << "theDir in degrees: " << RAD2DEG(theDir) << std::endl;
1267  std::cout << "cos(theDir): " << cos(theDir) << std::endl;
1268  std::cout << "sin(theDir): " << sin(theDir) << std::endl;
1269  std::cout << "currentRay: " << currentRay << std::endl;
1270  std::cout << "currentDistance: " << currentDistance << std::endl;
1271  std::cout << "indexI: " << indexI << std::endl;
1272  std::cout << "indexJ: " << indexJ << std::endl;
1273  std::cout << "nextValue: " << nextValue << std::endl;
1274  }
1275  if(fabs(currentValue-nextValue)<=eps){
1276  ++currentDistance;
1277  //test
1278  if(verbose)
1279  std::cout << "currentDistance: " << currentDistance << ", continue" << std::endl;
1280  }
1281  else{
1282  if(verbose)
1283  std::cout << "currentDistance: " << currentDistance << ", break" << std::endl;
1284  break;
1285  }
1286  }
1287  }
1288  if(lineDistance1<currentDistance){
1289  lineDistance1=currentDistance;
1290  lineAngle1=northAngle;
1291  }
1292  if(lineDistance2>currentDistance){
1293  lineDistance2=currentDistance;
1294  lineAngle2=northAngle;
1295  }
1296  if(verbose){
1297  std::cout << "lineDistance1: " << lineDistance1 << std::endl;
1298  std::cout << "lineAngle1: " << lineAngle1 << std::endl;
1299  std::cout << "lineDistance2: " << lineDistance2 << std::endl;
1300  std::cout << "lineAngle2: " << lineAngle2 << std::endl;
1301  }
1302  }
1303  int iband=0;
1304  if(l1)
1305  output[iband++][y][x]=lineDistance1;
1306  if(a1)
1307  output[iband++][y][x]=lineAngle1;
1308  if(l2)
1309  output[iband++][y][x]=lineDistance2;
1310  if(a2)
1311  output[iband++][y][x]=lineAngle2;
1312  assert(iband==nband);
1313  }
1314  progress=(1.0+y);
1315  progress/=input.nRows();
1316  pfnProgress(progress,pszMessage,pProgressArg);
1317  }
1318 }
pktools-2.6.6/doc/html/dir_5785acc8d2e42f8795bdbe936856f26d_dep.png0000644000113200011300000000366212616110567020463 00000000000000‰PNG  IHDRÝeF?qUbKGDÿÿÿ ½§“gIDATxœíÝLSçÇñçP Ñ)% ?Ý­6ˆ ²Ü5” cKŒ/ EhwÃt—Ñèz¡KÁ‰#¦ûg\¹»ÓH S’±âî‚ÍFñÞ©ÁÜkqN(F¨`Áv4kÈÆ6OV8_àóúëô¡Ïñ9ïxJ•Êy<@L€Ð ˜ºŠÐ%P„."t ¡K ]Eè(B—@ºŠÐ%P„."t ¡K h¯g_¸p¡©©i–ËXbbâ©S§žýù¯©T*¿ùæŠ\žÆa°r ^»fåU¿?/cryÚ¹sŸò+ÙgŸ}Z\œÇk ^_Eè(B—@ºŠÐ%P„."t ¡K ˆ÷ûê¿/%å/÷îÝõï9) ê켜šú²Ð Y)üÜå½{w>œ–¶Üþ¢R©TþððЫXAüÜ%cL¡Päææúý´°¢àõ%P„."t ¡K ]Eè(B—@ºŠÐ%P„."t ¡K ]Eè(B—@¹.m6ÇqÔNµtÙí¶°°¥· 亜—ÝnzKÒsÏ­Óh*…^oK£K·Û=66&ô*–$‰$\¯oz¼ Ù¥÷>ÛÙÙ™Q^^þäÉßW=V«MIIU(Œ± 6x¿ôðáÃÂÂÂðððØØX­V;==ý[ƒ>f³999Y,K¥Ò–––E¼Êáv»?úètjjb\ÜšÌÌ´žKXçñxÎ3*[ãã×fgïúâ‹‹aaÜÜûø¥Kæôôä¨(ñ /HM&Ò›àÿŸïáëÌ™3/^t8jµZ"‘¨T*ƘÇ㩨¨èîîîîî–H$V«U&“ŒŒx§”••ŒŒ\½zÕét¬Y³F¯×ÿzÐ{*ƘÓéÌÍÍmllÌÎÎîêê*..ÎÉÉ ìšÿ´–– ï¾ÿ¾Q.Wܼùí¡CgŒµ¶~l0ÿàƒwìøk_ßõ·ß>4wÊãÇ΢¢Ü÷Þkܳ'ûË/»Þz«8++'$„è&7 2™,55µ¾¾¾µµÕ;¨Óé ƒÉd’H$¿xþÌÌL{{{cc£T*MJJ:vìXkk뼃¾).—ËívONNŠÅ⢢¢ñññÕ«W/Þ.€¦¦Sµµ'÷îý[ddÔ«¯î©©©gŒuu'wízM" ÏÈØ]Uulîï&8“ÁÁâ‚‚¢q±˜î&ߥL&ólÙ²ehhÈ{ÜÛÛ»sçÎ'Nüúù÷ïßúôé¦M›¼7oÞ<444ï oÊúõë-‹ÕjÍÈÈèéé þÂÿŒ»wíII)¾‡Û¶%3Æî$&n÷ &$l;eݺõŸnéíµnÛ»woÆ•+¤7Aø•ݾ}Û{Ðßßí=6›ÍF£±½½Ýb±üâù‘‘‘"‘Èn·{Þ¹s'&&fÞAß”©©)·Û}þüy‡ÃQRR’••åp8öªXttL_ß ßÃᄏŋ‹Ûè=ðêïÿÿÜ)ÓÓSn·û“OÎÛíµº$??k|œî&ߥF£±Ùl½½½GU«ÕÞÁÐÐЄ„NwðàAßw0“““Œ±ÀÀÀ¼¼¼òòò¾¾¾šš•J5ï ï—à8.33³££ãÑ£G.—+000$$dñ¯ÔTªb½þŸ]]?þ8ÒÝ}©®NÇ;pàz}…Åò‡cìë¯/74ÔÎ}û–㸜œL³¹cbâÑÌŒkÕ*Ò› ü÷=*•j÷îÝN§3??¿ªªjîýW§Óµµµ544ÔÔÔ¤§§GEEMLL0ÆNŸ>­ÑhäryPPÐþýû«ªªæôJ,777WVVJ¥R“É$‹¹X)+ÓÎÎÎVW}°ukR]ÝÉ7Þ(()ysvvV«}sllT.O««;©ÑðM øasmmåððàÆÒ³gMÁÁt7÷ÿGár±ßùÜÿ°0Îd2)•Êg9›Íf“Éd¼ ŽãΞ5íÛ÷L×µøìvÛ‹/ÊÚÚÌ11qÛ·ïðšÍÃñ¯¾úVص±Ÿ?÷Ÿ×o´ð÷qð—[·n––ªoÜøßÔÔãk׬õõï¼þú?žF’÷ñµk×––– ¸€e¦¼¼bjê±Z½otôÁóÏKÕêâÂÂ¥º½Bva4\À²!•nv8<Œ±êêãÕÕÇ…^Žà>¡K ]Eè(B—@ºŠÐ%P„."t ¡K ]Eè(B—@ºŠÐ%P„."?w)‰òòò¸e‡1& ÿ3z+‡Ÿ÷º³óòƒ÷ý{N D™™{„^Å âç._zéÿžV&¼¾ŠÐ%P„."t ¡K ]Eè(âýþå÷ßÛ››ÿµKåêúõÿòžãáãÈ‘# °lXþâããy•Æïó/^_Eè(B—@ºŠÐ%P„."t ¡K ]Eè(B—@ºŠÐ%P„.¢Ÿ:éŒ}ÂIEND®B`‚pktools-2.6.6/doc/html/dir_4dfaa1fe1382d1276d1c80b1d5035ade_dep.map0000644000113200011300000000067212616110567020526 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random__inherit__graph.md50000644000113200011300000000004012616110566027605 00000000000000e5c6a34fa04564968b7ad2a2a06e5c99pktools-2.6.6/doc/html/inherit_graph_31.map0000644000113200011300000000067412647437044015503 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop__coll__graph.md50000644000113200011300000000004012616110566024534 0000000000000034fa2dac6c0a33c03e1352b8cee4a33bpktools-2.6.6/doc/html/classONE__CLASS__Q__inherit__graph.map0000644000113200011300000000037312616110567020716 00000000000000 pktools-2.6.6/doc/html/dir_0af1587c8378955de40f48b4bd1869f0_dep.md50000644000113200011300000000004012616110567020174 0000000000000096b7fb30a67002c344e82c7fa8da9774pktools-2.6.6/doc/html/classOptionpk__inherit__graph.md50000644000113200011300000000004012616110566020273 0000000000000049ea1bb4062c4a395ab38ecda0ec44a8pktools-2.6.6/doc/html/dir_b6b6de371025fb67c6b8623f3d3cd2ce_dep.md50000644000113200011300000000004012616110567020446 000000000000000df09d64d163559c1642b0f59823fec9pktools-2.6.6/doc/html/pkstatogr_8cc_source.html0000644000113200011300000011201212647637662016675 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkstatogr.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkstatogr.cc
1 /**********************************************************************
2 pkstatogr.cc: program to calculate basic statistics from vector file
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <math.h>
21 #include <string>
22 #include <fstream>
23 #include <assert.h>
24 #include "base/Optionpk.h"
25 #include "imageclasses/ImgReaderOgr.h"
26 #include "algorithms/StatFactory.h"
27 /******************************************************************************/
75 using namespace std;
76 
77 int main(int argc, char *argv[])
78 {
79  Optionpk<string> input_opt("i", "input", "Input OGR vector file", "");
80  Optionpk<string> layer_opt("ln", "lname", "Layer name(s) in sample (leave empty to select all)");
81  Optionpk<string> fieldname_opt("n", "fname", "Fields on which to calculate statistics", "");
82  Optionpk<double> nodata_opt("nodata","nodata","Set nodata value(s)");
83  Optionpk<double> src_min_opt("src_min","src_min","Set minimum value for histogram");
84  Optionpk<double> src_max_opt("src_max","src_max","Set maximum value for histogram");
85  Optionpk<bool> size_opt("s","size","Sample size (number of points)",false);
86  Optionpk<bool> minmax_opt("mm","minmax","Calculate minimum and maximum value",false);
87  Optionpk<bool> min_opt("min","min","Calculate minimum value",0);
88  Optionpk<bool> max_opt("max","max","Calculate maximum value",0);
89  Optionpk<bool> mean_opt("mean","mean","Calculate mean value",false);
90  Optionpk<bool> median_opt("median","median","Calculate median value",false);
91  Optionpk<bool> stdev_opt("stdev","stdev","Calculate standard deviation",false);
92  Optionpk<bool> histogram_opt("hist","hist","Calculate histogram",false);
93  Optionpk<unsigned int> nbin_opt("nbin", "nbin", "Number of bins");
94  Optionpk<bool> relative_opt("rel","relative","Use percentiles for histogram to calculate histogram",false);
95  Optionpk<bool> kde_opt("kde","kde","Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb",false);
96  Optionpk<short> verbose_opt("v", "verbose", "Verbose level", 0,2);
97 
98  bool doProcess;//stop process when program was invoked with help option (-h --help)
99  try{
100  doProcess=input_opt.retrieveOption(argc,argv);
101  fieldname_opt.retrieveOption(argc,argv);
102  layer_opt.retrieveOption(argc,argv);
103  nodata_opt.retrieveOption(argc,argv);
104  src_min_opt.retrieveOption(argc,argv);
105  src_max_opt.retrieveOption(argc,argv);
106  size_opt.retrieveOption(argc,argv);
107  minmax_opt.retrieveOption(argc,argv);
108  min_opt.retrieveOption(argc,argv);
109  max_opt.retrieveOption(argc,argv);
110  mean_opt.retrieveOption(argc,argv);
111  median_opt.retrieveOption(argc,argv);
112  stdev_opt.retrieveOption(argc,argv);
113  histogram_opt.retrieveOption(argc,argv);
114  nbin_opt.retrieveOption(argc,argv);
115  relative_opt.retrieveOption(argc,argv);
116  kde_opt.retrieveOption(argc,argv);
117  verbose_opt.retrieveOption(argc,argv);
118  }
119  catch(string predefinedString){
120  cout << predefinedString << endl;
121  exit(0);
122  }
123  if(!doProcess){
124  cout << endl;
125  cout << "Usage: pkstatogr -i input [-n attribute]*" << endl;
126  cout << endl;
127  cout << "short option -h shows basic options only, use long option --help to show all options" << endl;
128  exit(0);//help was invoked, stop processing
129  }
130 
131  ImgReaderOgr imgReader;
132  try{
133  imgReader.open(input_opt[0]);
134  }
135  catch(string errorstring){
136  cerr << errorstring << endl;
137  }
138 
139  ImgReaderOgr inputReader(input_opt[0]);
140  vector<double> theData;
142  //todo: implement ALL
143 
144  stat.setNoDataValues(nodata_opt);
145 
146  //support multiple layers
147  int nlayerRead=inputReader.getDataSource()->GetLayerCount();
148  if(verbose_opt[0])
149  cout << "number of layers: " << nlayerRead << endl;
150 
151  for(int ilayer=0;ilayer<nlayerRead;++ilayer){
152  OGRLayer *readLayer=inputReader.getLayer(ilayer);
153  string currentLayername=readLayer->GetName();
154  if(layer_opt.size())
155  if(find(layer_opt.begin(),layer_opt.end(),currentLayername)==layer_opt.end())
156  continue;
157  if(verbose_opt[0])
158  cout << "processing layer " << currentLayername << endl;
159  if(layer_opt.size())
160  cout << " --lname " << currentLayername;
161 
162  for(int ifield=0;ifield<fieldname_opt.size();++ifield){
163  if(verbose_opt[0])
164  cout << "field: " << ifield << endl;
165  theData.clear();
166  inputReader.readData(theData,OFTReal,fieldname_opt[ifield],ilayer,verbose_opt[0]);
167  vector<double> binData;
168  double minValue=0;
169  double maxValue=0;
170  stat.minmax(theData,theData.begin(),theData.end(),minValue,maxValue);
171  if(src_min_opt.size())
172  minValue=src_min_opt[0];
173  if(src_max_opt.size())
174  maxValue=src_max_opt[0];
175  unsigned int nbin=(nbin_opt.size())? nbin_opt[0]:0;
176 
177  if(histogram_opt[0]){
178  double sigma=0;
179  if(kde_opt[0]){
180  // if(kde_opt[0]>0)
181  // sigma=kde_opt[0];
182  // else
183  sigma=1.06*sqrt(stat.var(theData))*pow(theData.size(),-0.2);
184  }
185  if(nbin<1)
186  nbin=(maxValue-minValue+1);
187  try{
188  stat.distribution(theData,theData.begin(),theData.end(),binData,nbin,minValue,maxValue,sigma);
189  }
190  catch(string theError){
191  cerr << "Warning: all identical values in data" << endl;
192  exit(1);
193  }
194  }
195  // int nbin=(nbin_opt[0]>1)? nbin_opt[0] : 2;
196  cout << " --fname " << fieldname_opt[ifield];
197  try{
198  double theMean=0;
199  double theVar=0;
200  stat.meanVar(theData,theMean,theVar);
201  if(mean_opt[0])
202  cout << " --mean " << theMean;
203  if(stdev_opt[0])
204  cout << " --stdev " << sqrt(theVar);
205  if(minmax_opt[0]||min_opt[0]||max_opt[0]){
206  if(minmax_opt[0])
207  cout << " --min " << minValue << " --max " << maxValue << " ";
208  else{
209  if(min_opt[0])
210  cout << " --min " << minValue << " ";
211  if(max_opt[0])
212  cout << " --max " << maxValue << " ";
213  }
214  }
215  if(median_opt[0])
216  cout << " -median " << stat.median(theData);
217  if(size_opt[0])
218  cout << " -size " << theData.size();
219  cout << endl;
220  if(histogram_opt[0]){
221  for(int ibin=0;ibin<nbin;++ibin){
222  double binValue=0;
223  if(nbin==maxValue-minValue+1)
224  binValue=minValue+ibin;
225  else
226  binValue=minValue+static_cast<double>(maxValue-minValue)*(ibin+0.5)/nbin;
227  cout << binValue << " ";
228  if(relative_opt[0]||kde_opt[0])
229  cout << 100.0*static_cast<double>(binData[ibin])/theData.size() << endl;
230  else
231  cout << binData[ibin] << endl;
232  }
233  }
234  }
235  catch(string theError){
236  if(mean_opt[0])
237  cout << " --mean " << theData.back();
238  if(stdev_opt[0])
239  cout << " --stdev " << "0";
240  if(min_opt[0])
241  cout << " -min " << theData.back();
242  if(max_opt[0])
243  cout << " -max " << theData.back();
244  if(median_opt[0])
245  cout << " -median " << theData.back();
246  if(size_opt[0])
247  cout << " -size " << theData.size();
248  cout << endl;
249  cerr << "Warning: all identical values in data" << endl;
250  }
251  }
252  }
253  imgReader.close();
254 }
255 
pktools-2.6.6/doc/html/Egcs_8h_source.html0000644000113200011300000003073512647637661015414 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Egcs.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
Egcs.h
1 /**********************************************************************
2 Egcs.h: Conversions from and to european grid coding system
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <math.h>
21 #include <string>
22 
23 #ifndef _EGCS_H_
24 #define _EGCS_H_
25 
26 class Egcs
27 {
28 public:
29  Egcs();
30  Egcs(unsigned short level);
31  /* Egcs(unsigned short level); */
32  ~Egcs();
33  unsigned short cell2level(const std::string& cellCode) const;
34  std::string geo2cell(double x, double y) const;
35  double getSize() const {return getBaseSize()*pow(2.0,(m_level-19)%3);};
36  void setLevel(unsigned short level){m_level=level;};
37  unsigned short getLevel() const{return m_level;};
38  unsigned short res2level(double resolution) const;
39  double getResolution() const;
40  void force2grid(double& ulx, double& uly, double& lrx, double &lry) const;
41  void cell2bb(const std::string& cellCode, int &ulx, int &uly, int &lrx, int &lry) const;
42  void cell2mid(const std::string& cellCode, double& midX, double& midY) const;
43 private:
44  int getBaseSize() const {return pow(10.0,(m_level+1)/3);};
45  unsigned short m_level;
46 // level square scheme example
47 // 19 1000km xy 32
48 // 18 500km xy-q 32-A
49 // 17 250km xy-qq 32-AB
50 // 16 100km xxyy 3320
51 // 5 25m xxxxxyyyyy-qq 3346720658-DC
52 // 1 1m xxxxxxxyyyyyyy 33467652065889
53 };
54 #endif // _EGCS_H_
55 
Definition: Egcs.h:26
pktools-2.6.6/doc/html/classSVR__Q__inherit__graph.png0000644000113200011300000000757012616110567017700 00000000000000‰PNG  IHDRM» ´bKGDÿÿÿ ½§“-IDATxœíkPWÇÿ!®}ᢩB[mËm´ŠSPë…âtúÅJÅÊà”ª-ÊØ*ÒÚ©*ÓªcµõþÚq¼$HAE[‡K4ÒAQß" "^mAI!çýà°ºlBÂ$«=¿™ŒæìÉÙgœsv7Ù}VB!` gð<¤QÀ¤QÀ¤QàÚ· %%ýõ—3b%îîîØ¾};¹2Iß½§D"Add$ ÉÉÉJ¥Â‡~È• z|ñżJÿf$‰ ŒÍi0i0i0i ‰´ÇcÕªU ƒ··7&OžŒüF£‘«#‘H s§ºsçÎ…D"A}}ý â¨¯¯7;q5ƒ–ÖÞÞŽI“&áìÙ³X·n*++ñÕW_!;;111èééáê644àâÅ‹¼Ï·¶¶B«ÕÚ´®ëׯÃ×××âr¹\Ž´´4º ¤ˆJ¥ê[l‘•+W’èèhb4yå$((ˆìÚµ‹k766–¬^½šW/33“Ì;— uuuý®«®®Ž˜ Ù®˜ó1èž–5kÖ@*•òʽ¼¼°jÕ*ìÛ·+‹‹‹ƒZ­æ ÑC‡aþüù¼Ï ""žžžP*•X·n 220jÔ(O‡cqq1‘™™É Ï#GŽ`ôèÑhmm8pãÆÃãǻɃëi­­­yðàÙåeeeD¡PpíÖÔÔQ£F‘ .Byøð!ñôô$ÿý7×ÓÚÚÚˆL&#IIIäöíÛ$;;› ÷ïßô´Þ÷sçÎ%%%%¤ªªŠ·<11‘,^¼˜Ü»wŒ9’œ={Ö¦í²æÃìÁ@±4ùBàâò´3K¥R|ðÁP«ÕGAAÞ~ûmøøøpuÜÜÜpñâEÀÃÃ;{ôè‘Åõ¯_¿!!!‚É/¿ü‚ÄÄÄ 99“'OÌfr jxÊårŒ5 UUUf—WUUaüøñ¼²¸¸8äää€bvhÊd2ÔÖÖ"66'NDff¦Õ8ú®ãÙø–-[†+W® 99Ù¶²[ºc¬X±‚LŸ>·#ˆ'û÷ï'dûöí\»uuuÄh4’‘#G­VK¼¼¼Hss3oygg'qss#‡&&“‰èt:n™¥áié}cc#ñ÷÷'ï¾û.IHH°y›¬ùôŽ`Íš5¸wïæÌ™ƒ'N ¶¶cÇŽÅG}½^%K–ðê÷ÑO?ý“'O†¿¿?oyWW d2t:¾ûî;Omzéèè°—ÉdBRR>ÿüs8pEEE8zôè`7÷ ¶˜µFGGY±byóÍ7‰»»;yõÕWÉ7ß|C¦OŸN,XÀµÛ{HqòäI€ë…}—oÚ´‰( @vìØA.\HüýýIww7‰ŠŠ"ÞÞÞ„þ{ÚÖ­[IXX1 „BòòòˆR©$---Ú6s>†Dš%ºººHYYÙ´å,Ìù°ë¹§L&㎭^$Ø ;LLLLLfOØ‹‹‹ñðáCGÇòüÐ÷`. €pòKBäòXâêªpz,R©””––òxí{ Ëh4á÷ß«¡ÓœQI{ü¸ 'N\†Ñøô·Ò®.# ÿçĨ„ˆJZ_aàâ"Ann…“"2¨¤åæV~Ù2MÐhjÐÖ¦sRTBD#­¥å1´ÚZôô1!8~¼Ú Q™G4Ò .Z\FANŽx†¨h¤:TnöŠ"0™Μ¹†æfË?;QH»{÷!Ο¿ “ÉòGR© ޵܉(¤=Zkwh=ÈÍÇî\Ë1X:; P*ÿÃ+ëèè‚»û0¸º>ý»:àz=ÛpòQ*—“Ç/8; ³ˆbx>o0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i4X»ê¯´´”Èd2‡ßœêæH\\<¾ÞÔÔT«WBZ½æöÎ;0 P«Õù[<—lÚ´ VëÙ|¡r\\Ü`ây.ÈÉɱ©›Ó(`Ò(`Ò(`Ò(°‹4s)¥ÓÓÓáëë‹K—.Ùc•ì™’Ú!·ùlܸ?ÿü3JJJâˆUÚ»KÛ±cÖ®]‹ÂÂBDDDØ{uÁ®sÚÞ½{‘––†cÇŽ óvww#55#GŽ„¿¿?RSSÑÝÝ-H-]ZZ ‰D‚}ûöa„ P(ذaƒÕvì‰Ý¤©Õj,]º¾¾¾,ß¼y3nÜ¸ŠŠ £¤¤kÖ¬á–ÿôÓOØ»w/×;óóóQVV† 6 -- ---6µc¬g©T*bC5Ȉ#HYYyã7Hrr² ÎøñãISS÷¾°°„‡‡siW«««yíi4B!ƒOÓ»Zkg ÄÅÅ‘¸¸8«õì6§©ÕjDFF"33S§Nżyó0{ölnyCC”J%ï3Ççþß7µôË/¿ 6l¯ÜZ;öÀnÃ3((0iÒ$¤¥¥!))‰—´Ü××uuu O2k¡µµgΜá–÷•ólâôg±ÖŽ=pÈÁí·ß~‹áÇãË/¿äÊæÍ›‡¯¿þ7oÞDuu5bcc±}ûö·=Tí ‡HsssCff&²²²püøq@FF^zé%DDD`æÌ™ ÃúõëÜöPµ3uë‹Z­Æ‚ ,¦x‘è}*›µïÙ¹'LLLLLL6Ÿ{Ι3Çžq0™\àââØ·—.]´iÓ¬Ö³*mÊ”)ˆç=ÐÞôôHpîœãƵÀÇGï°õN›6ͶÇ軡R#Jår²hÑŠYD9§=IC-Á©SWñèQ§³Ã :i´£´´O®GŽ1ÿÈ8g":iUÜOo„:Tî䈄ˆNšZ]Áå†4™**n¢©I\”•´ÆÆP]}‹—PS*uA~þ'F%DTÒ¾ÀË ==&ääˆkˆŠJZNN9º»ù´„ÔÔ4áÚµûNŠJˆh¤ÕÔ4¡¾þ>z÷šÏ2l˜ùù•ŽÊ¢‘–Ÿ_ ™Ìü Jww<çàˆ,# iO-*`0-Ö¹s§ÕÕ·•eD!­²ò&îÞíÿ°BLCTÒždˆ—@&sµøêé1!/O‡¢HC=cÆx¸ºJyeju9¦N} ®ÌÇÇÛÑ¡™ÇÉ_X„¥¡~Á`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(\ i0pðàAèõŽ»ÏÒEEE¸wϹWuÇÄÄpy“8ú^å—››ëðÔÏb~-\¸Pp%¤ §O.K×h4Vÿ /:éééœgasLLLCró…N§Cff&´Z-ZZZàçç‡Y³faÑ¢EÉdÈËËþ}û““ÃËrLA||<,X€yóæáwÞáµ+“ÉŒåË—ãµ×^³9½^½{÷âܹs¸{÷.‚‚‚…øøxH¥Rë XaH¤mÙ²ÍÍÍøþûïáçç‡ÆÆFlÙ²íííHIIÁŒ3°uëV\¾|™—Q¹®®<ÀôéÓ¹²mÛ¶q‰1;;;‘ôôtdeeÙ”Vº³³ÉÉÉËåX¶lF7n`Ïž=8þ<6nÜh1¿¤­ Éð,--ÅÒ¥K ¹\ŽÐÐP¤¤¤àÏ?ÿŒ1'NÄÉ“'yŸÓjµ …W&—Ë¡P( P(0fÌ|öÙg¸}û6/ gdeeA.—cóæÍ˜2e ÆŒƒèèhìÚµ MMM8vìØ ·wH¤yzz"??mmm\Yhh(T*÷~æÌ™8uêL¦§wŸ>}Z0$û"•Jáêê ///›b),,Dbb¢ 7¹»»#>>EEE6µÓC"-55•••˜?>RSS¡R©ÐÜÜÌ«¶¶6\¾|ÐØØˆ[·n rûèõzèt:èt:üóÏ?سgæÌ™#HájŽŽŽ´´´Xœÿ‚ƒƒqãÆ Ê­|ÊÌi“&M‚J¥ÂÕ«WQ^^Ž'N`÷îÝX½z5fÍšðööFdd$4 BCCqúôi„‡‡cĈ¼¶–,YÂ{ïáá;w(Ks!dÐó0=M¯×£¤¤0aÂ$&&bÏž=HHHÀ®]»xuŸ¢Z­3gδ— FFƒ?þøï¿ÿ>/Áyx{{C¡Pž…ÐK}}=¸…B-‚ŒŒ \¿~+“H$xë­·™°¦N ½^¢¢"\»v QQQý¶íææ†ØØX444Øœ2vöìÙÈÊÊâÍk×®Eqq1öïßÏõüÁ0hiˆ‰‰Azz:Μ9ƒ¦¦&\¹r;wîèææ†¨¨(lÛ¶ ËåVÛ÷òòBgg't:Mñ,^¼---X¹r%ÊËËqûöm(•JdddÀ`0à½÷Þ£ÚÎg’ÁªU«0{ölüúë¯øøã‘‘‘°°0,]ºTPwÖ¬Yhoo·º×ìÅÏÏžžž¼=sxzzb÷îÝÆÎ;ñÉ'Ÿ@£Ñ !!¯¼ò ~øá‡m›9•{3(¿ˆ_ FÔÖÖâõ×_·©~zz:üüü–ÿUçž®®®6 ë·!ˆÅ¡XÖŽ!Ï41Lÿªá9T0i0i0i0iöž½_ÛzÄþ¢/(œèõz?~Ü¡i§ÅÌĉ1vìX^™ÕÓ0„°9&&W¶=|œÁñÿ›,ßwIEND®B`‚pktools-2.6.6/doc/html/classCostFactorySVM__coll__graph.map0000644000113200011300000000075312616110567020711 00000000000000 pktools-2.6.6/doc/html/structPosValue.html0000644000113200011300000001107612647637662015555 00000000000000 pktools: PosValue Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
PosValue Struct Reference

Public Attributes

double posx
 
double posy
 
double value
 

Detailed Description

Definition at line 23 of file PosValue.h.


The documentation for this struct was generated from the following file:
pktools-2.6.6/doc/html/md_examples_pkextract.html0000644000113200011300000001615112647637662017134 00000000000000 pktools: examples_pkextract
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkextract

Examples of pkextract

Using vector samples

Extract all points for all layers read in points.sqlite from input.tif. Create a new point vector dataset named extracted.sqlite, where each point will contain an attribute for the individual input bands in input.tif. Notice that the default vector format is Spatialite (.sqlite).

pkextract -i input.tif -s points.sqlite -o extracted.sqlite

Same example as above, but only extract the points for the layer in points.sqlite named "valid"

pkextract -i input.tif -s points.sqlite -ln valid -o extracted.sqlite

Extract points and write output in ESRI Shapefile format

pkextract -i input.tif -s points.shp -f "ESRI Shapefile" -o extracted.shp

Extract the standard deviation for each input band in a 3 by 3 window, centered around the points in the sample vector dataset points.sqlite. The output vector dataset will contain polygon features defined by the buffered points (3x3 window). Use the option -circ to define a circular buffer.

pkextract -i input.tif -s points.sqlite -o extracted.sqlite -r stdev -buf 3 -polygon

Extract all pixels from input.tif covered by the polygons in locations.sqlite. Each polygon can thus result in multiple point features with attributes for each input band. Write the extracted points to a point vector dataset training.sqlite.

pkextract -i input.tif -s polygons.sqlite -o training.sqlite -r point

Extract the first band from input.tif at the centroids of the polygons in vector dataset polygons.sqlite. Assign the extracted point value to a new attribute of the polygon and write to the vector dataset extracted.sqlite.

pkextract -i input.tif -b 0 -s polygons.sqlite -r centroid -o extracted.sqlite -polygon

Extract the mean values for the second band in input.tif covered by each polygon in polygons.sqlite. The mean values are written to a copy of the polygons in output vector dataset extracted.sqlite

pkextract -i input.tif -b 1 -s polygons.sqlite -r mean -o extracted.sqlite -polygon

Extract the majority class in each polygon for the input land cover map. The land cover map contains five valid classes, labeled 1-5. Other class values (e.g., labeled as 0) are not taken into account in the voting.

pkextract -i landcover.tif -s polygons.sqlite -r maxvote -o majority.sqlite -polygon -c 1 -c 2 -c 3 -c 4 -c 5

Using random and grid samples

Extract 100 sample units following a simple random sampling design. For each sample unit, the median value is extracted from the input raster dataset in a window of 3 by 3 pixels and written to an attribute of the output vector dataset. The output vector dataset contains polygon features defined by the windows centered at the random selected sample units.

pkextract -i input.tif -o random.sqlite -rand 100 -r median -buf 3 -polygon

Extract points following a systematic grid with grid cell size of 100 m. Discard pixels that have a value 0 in the input raster dataset.

pkextract -i input.tif -o systematic.sqlite -grid 100 -srcnodata 0

Using raster samples

Typical use where pixels are extracted based on a land cover map (sample.tif). Extract all bands for a random sample of 10 percent of the pixels in the land cover map sample.tif where the land cover classes are either 1,2 or 3 (class values). Write output to the point vector dataset extracted.sqlite.

pkextract -i input.tif -s sample.tif -o extracted.sqlite -t 10 -c 1 -c 2 -c 3

Extract all bands for the first 5000 pixels encountered in sample.tif where pixels have a value equal to 1. Write output to point vector dataset extracted.sqlite.

pkextract -i input.tif -s sample.tif -o extracted.sqlite -t -5000 -c 1
pktools-2.6.6/doc/html/pkregann_8cc_source.html0000644000113200011300000017257312647637662016506 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkregann.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkregann.cc
1 /**********************************************************************
2 pkregann.cc: regression with artificial neural network (multi-layer perceptron)
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <vector>
21 #include <fstream>
22 #include "base/Optionpk.h"
23 #include "fileclasses/FileReaderAscii.h"
24 #include "floatfann.h"
25 #include "algorithms/myfann_cpp.h"
26 /******************************************************************************/
70 using namespace std;
71 
72 int main(int argc, char *argv[])
73 {
74  //--------------------------- command line options ------------------------------------
75  Optionpk<string> input_opt("i", "input", "input ASCII file");
76  Optionpk<string> output_opt("o", "output", "output ASCII file for result");
77  Optionpk<int> inputCols_opt("ic", "inputCols", "input columns (e.g., for three dimensional input data in first three columns use: -ic 0 -ic 1 -ic 2");
78  Optionpk<int> outputCols_opt("oc", "outputCols", "output columns (e.g., for two dimensional output in columns 3 and 4 (starting from 0) use: -oc 3 -oc 4");
79  Optionpk<string> training_opt("t", "training", "training ASCII file (each row represents one sampling unit. Input features should be provided as columns, followed by output)");
80  Optionpk<double> from_opt("from", "from", "start from this row in training file (start from 0)",0);
81  Optionpk<double> to_opt("to", "to", "read until this row in training file (start from 0 or set leave 0 as default to read until end of file)", 0);
82  Optionpk<double> offset_opt("\0", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
83  Optionpk<double> 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);
84  Optionpk<unsigned short> cv_opt("cv", "cv", "n-fold cross validation mode",0);
85  Optionpk<unsigned int> nneuron_opt("nn", "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);
86  Optionpk<float> connection_opt("\0", "connection", "connection reate (default: 1.0 for a fully connected network)", 1.0);
87  // Optionpk<float> 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);
88  Optionpk<float> learning_opt("l", "learning", "learning rate (default: 0.7)", 0.7);
89  Optionpk<unsigned int> maxit_opt("\0", "maxit", "number of maximum iterations (epoch) (default: 500)", 500);
90  Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0,2);
91 
92  offset_opt.setHide(1);
93  scale_opt.setHide(1);
94  connection_opt.setHide(1);
95  learning_opt.setHide(1);
96  maxit_opt.setHide(1);
97 
98  bool doProcess;//stop process when program was invoked with help option (-h --help)
99  try{
100  doProcess=input_opt.retrieveOption(argc,argv);
101  training_opt.retrieveOption(argc,argv);
102  inputCols_opt.retrieveOption(argc,argv);
103  outputCols_opt.retrieveOption(argc,argv);
104  output_opt.retrieveOption(argc,argv);
105  from_opt.retrieveOption(argc,argv);
106  to_opt.retrieveOption(argc,argv);
107  cv_opt.retrieveOption(argc,argv);
108  nneuron_opt.retrieveOption(argc,argv);
109  offset_opt.retrieveOption(argc,argv);
110  scale_opt.retrieveOption(argc,argv);
111  connection_opt.retrieveOption(argc,argv);
112  // weights_opt.retrieveOption(argc,argv);
113  learning_opt.retrieveOption(argc,argv);
114  maxit_opt.retrieveOption(argc,argv);
115  verbose_opt.retrieveOption(argc,argv);
116  }
117  catch(string predefinedString){
118  std::cout << predefinedString << std::endl;
119  exit(0);
120  }
121  if(!doProcess){
122  cout << endl;
123  cout << "Usage: pkregann -i input -t training [-ic col]* [-oc col]* -o output" << endl;
124  cout << endl;
125  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
126  exit(0);//help was invoked, stop processing
127  }
128 
129  unsigned int ninput=inputCols_opt.size();
130  unsigned int noutput=outputCols_opt.size();
131  assert(ninput);
132  assert(noutput);
133  vector< vector<float> > inputUnits;
134  vector< vector<float> > trainingUnits;
135  vector< vector<float> > trainingOutput;
136  FileReaderAscii inputFile;
137  unsigned int inputSize=0;
138  if(input_opt.size()){
139  inputFile.open(input_opt[0]);
140  inputFile.setMinRow(from_opt[0]);
141  inputFile.setMaxRow(to_opt[0]);
142  inputFile.setComment('#');
143  inputFile.readData(inputUnits,inputCols_opt,1,0,true,verbose_opt[0]);
144  inputFile.close();
145  inputSize=inputUnits.size();
146  }
147  FileReaderAscii trainingFile(training_opt[0]);
148  unsigned int sampleSize=0;
149  trainingFile.setMinRow(from_opt[0]);
150  trainingFile.setMaxRow(to_opt[0]);
151  trainingFile.setComment('#');
152  trainingFile.readData(trainingUnits,inputCols_opt,1,0,true,verbose_opt[0]);
153  trainingFile.readData(trainingOutput,outputCols_opt,1,0,true,verbose_opt[0]);
154  trainingFile.close();
155  sampleSize=trainingUnits.size();
156 
157  if(verbose_opt[0]>1){
158  std::cout << "sampleSize: " << sampleSize << std::endl;
159  std::cout << "ninput: " << ninput << std::endl;
160  std::cout << "noutput: " << noutput << std::endl;
161  std::cout << "trainingUnits[0].size(): " << trainingUnits[0].size() << std::endl;
162  std::cout << "trainingOutput[0].size(): " << trainingOutput[0].size() << std::endl;
163  std::cout << "trainingUnits.size(): " << trainingUnits.size() << std::endl;
164  std::cout << "trainingOutput.size(): " << trainingOutput.size() << std::endl;
165  }
166 
167  assert(ninput==trainingUnits[0].size());
168  assert(noutput==trainingOutput[0].size());
169  assert(trainingUnits.size()==trainingOutput.size());
170 
171  //set scale and offset
172  if(offset_opt.size()>1)
173  assert(offset_opt.size()==ninput);
174  if(scale_opt.size()>1)
175  assert(scale_opt.size()==ninput);
176 
177  std::vector<float> offset_input(ninput);
178  std::vector<float> scale_input(ninput);
179 
180  std::vector<float> offset_output(noutput);
181  std::vector<float> scale_output(noutput);
182 
183  for(int iinput=0;iinput<ninput;++iinput){
184  if(verbose_opt[0]>=1)
185  cout << "scaling for input feature" << iinput << endl;
186  offset_input[iinput]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iinput];
187  scale_input[iinput]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iinput];
188  //search for min and maximum
189  if(scale_input[iinput]<=0){
190  float theMin=trainingUnits[0][iinput];
191  float theMax=trainingUnits[0][iinput];
192  for(int isample=0;isample<trainingUnits.size();++isample){
193  if(theMin>trainingUnits[isample][iinput])
194  theMin=trainingUnits[isample][iinput];
195  if(theMax<trainingUnits[isample][iinput])
196  theMax=trainingUnits[isample][iinput];
197  }
198  offset_input[iinput]=theMin+(theMax-theMin)/2.0;
199  scale_input[iinput]=(theMax-theMin)/2.0;
200  if(verbose_opt[0]>=1){
201  std::cout << "Extreme image values for input feature " << iinput << ": [" << theMin << "," << theMax << "]" << std::endl;
202  std::cout << "Using offset, scale: " << offset_input[iinput] << ", " << scale_input[iinput] << std::endl;
203  std::cout << "scaled values for input feature " << iinput << ": [" << (theMin-offset_input[iinput])/scale_input[iinput] << "," << (theMax-offset_input[iinput])/scale_input[iinput] << "]" << std::endl;
204  }
205  }
206  }
207 
208  for(int ioutput=0;ioutput<noutput;++ioutput){
209  if(verbose_opt[0]>=1)
210  cout << "scaling for output feature" << ioutput << endl;
211  //search for min and maximum
212  float theMin=trainingOutput[0][ioutput];
213  float theMax=trainingOutput[0][ioutput];
214  for(int isample=0;isample<trainingOutput.size();++isample){
215  if(theMin>trainingOutput[isample][ioutput])
216  theMin=trainingOutput[isample][ioutput];
217  if(theMax<trainingOutput[isample][ioutput])
218  theMax=trainingOutput[isample][ioutput];
219  }
220  offset_output[ioutput]=theMin+(theMax-theMin)/2.0;
221  scale_output[ioutput]=(theMax-theMin)/2.0;
222  if(verbose_opt[0]>=1){
223  std::cout << "Extreme image values for output feature " << ioutput << ": [" << theMin << "," << theMax << "]" << std::endl;
224  std::cout << "Using offset, scale: " << offset_output[ioutput] << ", " << scale_output[ioutput] << std::endl;
225  std::cout << "scaled values for output feature " << ioutput << ": [" << (theMin-offset_output[ioutput])/scale_output[ioutput] << "," << (theMax-offset_output[ioutput])/scale_output[ioutput] << "]" << std::endl;
226  }
227  }
228 
229 
230 
231  FANN::neural_net net;//the neural network
232 
233  const unsigned int num_layers = nneuron_opt.size()+2;
234  const float desired_error = 0.0003;
235  const unsigned int iterations_between_reports = (verbose_opt[0])? maxit_opt[0]+1:0;
236  if(verbose_opt[0]>=1){
237  cout << "creating artificial neural network with " << nneuron_opt.size() << " hidden layer, having " << endl;
238  for(int ilayer=0;ilayer<nneuron_opt.size();++ilayer)
239  cout << nneuron_opt[ilayer] << " ";
240  cout << "neurons" << endl;
241  }
242 
243  switch(num_layers){
244  case(3):{
245  unsigned int layers[3];
246  layers[0]=ninput;
247  layers[1]=nneuron_opt[0];
248  layers[2]=noutput;
249  net.create_sparse_array(connection_opt[0],num_layers,layers);
250  // net.create_sparse(connection_opt[0],num_layers, ninput, nneuron_opt[0], noutput);
251  break;
252  }
253  case(4):{
254  unsigned int layers[3];
255  layers[0]=ninput;
256  layers[1]=nneuron_opt[0];
257  layers[2]=nneuron_opt[1];
258  layers[3]=noutput;
259  net.create_sparse_array(connection_opt[0],num_layers,layers);
260  // net.create_sparse(connection_opt[0],num_layers, ninput, nneuron_opt[0], nneuron_opt[1], noutput);
261  break;
262  }
263  default:
264  cerr << "Only 1 or 2 hidden layers are supported!" << endl;
265  exit(1);
266  break;
267  }
268  if(verbose_opt[0]>=1)
269  cout << "network created" << endl;
270 
271  net.set_learning_rate(learning_opt[0]);
272 
273  // net.set_activation_steepness_hidden(1.0);
274  // net.set_activation_steepness_output(1.0);
275 
276  net.set_activation_function_hidden(FANN::SIGMOID_SYMMETRIC_STEPWISE);
277  net.set_activation_function_output(FANN::SIGMOID_SYMMETRIC_STEPWISE);
278 
279  // Set additional properties such as the training algorithm
280  // net.set_training_algorithm(FANN::TRAIN_QUICKPROP);
281 
282  // Output network type and parameters
283  if(verbose_opt[0]>=1){
284  cout << endl << "Network Type : ";
285  switch (net.get_network_type())
286  {
287  case FANN::LAYER:
288  cout << "LAYER" << endl;
289  break;
290  case FANN::SHORTCUT:
291  cout << "SHORTCUT" << endl;
292  break;
293  default:
294  cout << "UNKNOWN" << endl;
295  break;
296  }
297  net.print_parameters();
298  }
299 
300  if(verbose_opt[0]>=1){
301  cout << "Max Epochs " << setw(8) << maxit_opt[0] << ". "
302  << "Desired Error: " << left << desired_error << right << endl;
303  }
304  bool initWeights=true;
305 
306  Vector2d<float> trainingFeatures(sampleSize,ninput);
307  for(unsigned int isample=0;isample<sampleSize;++isample){
308  for(unsigned int iinput=0;iinput<ninput;++iinput)
309  trainingFeatures[isample][iinput]=(trainingUnits[isample][iinput]-offset_input[iinput])/scale_input[iinput];
310  }
311 
312  Vector2d<float> scaledOutput(sampleSize,noutput);
313  for(unsigned int isample=0;isample<sampleSize;++isample){
314  for(unsigned int ioutput=0;ioutput<noutput;++ioutput)
315  scaledOutput[isample][ioutput]=(trainingOutput[isample][ioutput]-offset_output[ioutput])/scale_output[ioutput];
316  }
317 
318  if(cv_opt[0]){
319  if(verbose_opt[0])
320  std::cout << "cross validation" << std::endl;
321  std::vector< std::vector<float> > referenceVector;
322  std::vector< std::vector<float> > outputVector;
323  net.cross_validation(trainingFeatures,
324  scaledOutput,
325  cv_opt[0],
326  maxit_opt[0],
327  desired_error,
328  referenceVector,
329  outputVector);
330  assert(referenceVector.size()==outputVector.size());
331  vector<double> rmse(noutput);
332  for(int isample=0;isample<referenceVector.size();++isample){
333  std::cout << isample << " ";
334  for(int ioutput=0;ioutput<noutput;++ioutput){
335  if(!isample)
336  rmse[ioutput]=0;
337  double ref=scale_output[ioutput]*referenceVector[isample][ioutput]+offset_output[ioutput];
338  double val=scale_output[ioutput]*outputVector[isample][ioutput]+offset_output[ioutput];
339  rmse[ioutput]+=(ref-val)*(ref-val);
340  std::cout << ref << " " << val;
341  if(ioutput<noutput-1)
342  std::cout << " ";
343  else
344  std::cout << std::endl;
345  }
346  }
347  for(int ioutput=0;ioutput<noutput;++ioutput)
348  std::cout << "rmse output variable " << ioutput << ": " << sqrt(rmse[ioutput]/referenceVector.size()) << std::endl;
349  }
350 
351 
352  net.train_on_data(trainingFeatures,
353  scaledOutput,
354  initWeights,
355  maxit_opt[0],
356  iterations_between_reports,
357  desired_error);
358 
359 
360  if(verbose_opt[0]>=2){
361  net.print_connections();
362  vector<fann_connection> convector;
363  net.get_connection_array(convector);
364  for(int i_connection=0;i_connection<net.get_total_connections();++i_connection)
365  cout << "connection " << i_connection << ": " << convector[i_connection].weight << endl;
366  }
367  //end of training
368 
369  ofstream outputStream;
370  if(!output_opt.empty())
371  outputStream.open(output_opt[0].c_str(),ios::out);
372  for(unsigned int isample=0;isample<inputUnits.size();++isample){
373  std::vector<float> inputFeatures(ninput);
374  for(unsigned int iinput=0;iinput<ninput;++iinput)
375  inputFeatures[iinput]=(inputUnits[isample][iinput]-offset_input[iinput])/scale_input[iinput];
376  vector<float> result(noutput);
377  result=net.run(inputFeatures);
378 
379  if(!output_opt.empty())
380  outputStream << isample << " ";
381  else
382  std::cout << isample << " ";
383  if(verbose_opt[0]){
384  for(unsigned int iinput=0;iinput<ninput;++iinput){
385  if(output_opt.size())
386  outputStream << inputUnits[isample][iinput] << " ";
387  else
388  std::cout << inputUnits[isample][iinput] << " ";
389  }
390  }
391  for(unsigned int ioutput=0;ioutput<noutput;++ioutput){
392  result[ioutput]=scale_output[ioutput]*result[ioutput]+offset_output[ioutput];
393  if(output_opt.size()){
394  outputStream << result[ioutput];
395  if(ioutput<noutput-1)
396  outputStream << " ";
397  else
398  outputStream << std::endl;
399  }
400  else{
401  std::cout << result[ioutput];
402  if(ioutput<noutput-1)
403  std::cout << " ";
404  else
405  std::cout << std::endl;
406  }
407  }
408  }
409  if(!output_opt.empty())
410  outputStream.close();
411 }
pktools-2.6.6/doc/html/classImgWriterGdal__inherit__graph.md50000644000113200011300000000004012647437043021177 0000000000000062769723e73af2a47d848657257143fcpktools-2.6.6/doc/html/inherit_graph_42.map0000644000113200011300000000026512647437044015501 00000000000000 pktools-2.6.6/doc/html/dir_35acdce8930fac877097c845a64519e5.html0000644000113200011300000001060512647637663017731 00000000000000 pktools: /home/kempenep/pktools/qt/pkcrop_gui Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
pkcrop_gui Directory Reference
Directory dependency graph for pkcrop_gui:
/home/kempenep/pktools/qt/pkcrop_gui

Files

file  main.cc [code]
 
file  mainwindow.cc [code]
 
file  mainwindow.h [code]
 
pktools-2.6.6/doc/html/inherit_graph_2.png0000644000113200011300000000346012616110567015416 00000000000000‰PNG  IHDR%×Ý|™bKGDÿÿÿ ½§“åIDATxœíšHSÝÇÏuOÖÒ¹u×6KËmÍ Ó ¢61"¤m6í74!Ó[ôOº¨À²Q¤EJ8j¦¬$¤b`5 [?„mŽá–ËݦsÝï‡ï}nÓíÙ³öµïsŸûúës>÷ìs>Ÿû¾çœíÜ!8ŽÊ‘ô» ùŸ@ëJMh]© ­+5ùƒÜ©¨¨øþýûïʆ&nÊËËe2ÑüIW£Ñ¨×ëårù¼gEóK¼yóF«ÕFÔ¢Õjç1%š P(Â<ôþJMh]© ­+5¡u¥&qê:::ZZZš••µxñâ7vuu%6­„ƒ ˆÝn±³ÝnG$öàÍÍÍàÇ„ÇñÌÌ̦¦¦„ăxt˜˜ÈÏÏOIIéììÜ¿¿R©|öìY“û§ —Ë=Ïëׯ Édr¹\äóÌ¿sþ’ÚÚÚ‚‚‚ÖÖVØ\³fÇã¹víÚ®]»šÛ?.—+•JµZíöíÛ¡G§ÓíØ±ƒÇãý®”♯=:uêÙS[[ÛÖÖí¯_¿9r„Ãádddœ9sž^!rçΜœœ¥K—ÖÕÕÝ¿åÊ•©©©çÏŸÿ]—º»»W¯^¢hUUÕÔÔ@¯×Ã…ÇãÕÕÕ=Ÿ?¾bÅŠþþþ`0¨V«¹\.Š¢jµ: Æ’?‚ 999éééW¯^„B¡úúz±XÌd2·mÛ600{ÎŽßÓÓ#0 ŸïæÍ›€/_¾Øl6@QQ‘Õj5B¡P£Ñø|¾äääcÇŽ¹ÝîöövÀøø8ì¹{÷î/^øýþ+W®ìÛ·oddÄb±lذáܹs‘²Øl6–Éd†Ý¾}011ÑÐЀ¢¨N§}òä ŸÏ‡÷aÎø‡:|ø°Çãár¹ÄmY¸p¡Á`Àq|hh())Éãñà8¥ Ç #ÌŽ½.ˆ\.—Ëå?ÕKnÄ¢«×ë`6çÕééiƒñþý{ØÔétB¡ÞJ“É;„Ù6› –d±Xˆ4„BáÔÔÔÐÐßï…BƒaΞ‰dll Ú}}}yyy‘ÒÓõåË—äÄbñÝ»w‰Î÷î݃÷aÎø†eddäææÂG– ¸¸¸¢¢ÇñË—/ïܹ:£TGÖ5öº ³uýÛû+‹Åâr¹?~ܺu+á|ûöí‰' ƒ×ë …BÙÙÙÐ/ Ýn7´™L&`Á‚a6H$‚†D"q»ÝÉÉÉV«õøñã~¿???ŸÜS"‘@Ãét’÷°ÔÔÔ«€3’HÀåråååWsss£ÄOKKS©T.\èëë#ÇT*••••:N¥RAg”*ÂÀI\‰».‚xö×½{÷^¿~œG{{{0LIIár¹ Ãáp@ÿðð°@ ˆ1,|`V«•ÏçONN* µZm2™ZZZÈ= =81 1 31Ž•”ôSáYYYf³™h~øð!J|—ËÕÜÜ\XXX]]M²gÏž@ ÐÑÑa6›‹‹‹¡3J333€OŸ>ž¸ëúòäeÆq|||œÍf—••½zõÊl6k4€^¯‡WKKK¥R©Ãáx÷îÝÚµkkjjðYË`˜ -((°Ùlƒƒƒ"‘¨¦¦Ã0Az{{ÀÙ³g&“‰¼Xá8^UU%“ÉœN§ÙlÞ¼yóÉ“'#å=ÆÆFE?~<66ÖÛÛ»jÕ*8Êìø¡P¨°°ðâÅ‹^¯wÙ²e===äQ8Àb±ŠŠŠOô*>þ hkkûöí|þn]쯧Ó)“Éø|>“ÉÜ´i¹<¯×{ðàA6›ÍãñNŸ>=99ù—·ÖÙÚÚš™™Éáp*++á§ÒÓÓ—/_ÞÒÒ¢T*Q ÓÕçó=z”Åb±Ùl•J"%=™™™úúz¡P¸hÑ¢-[¶Àù1gü¦¦¦õë×OOOã8ÞÕÕÅãñÈ_!Ÿ>} !½ŠK—.¥¥¥eggwwwÎØë‚ÌÖÁIË©V«-))ÁçýŠv»]$Íÿ¸”¾§#¿`¥Ï‡©I<çM gÉ’%ååå éÜõß¶ü_芢è7êߦ_$èu˜šÐºRZWjBëJMæøÞtëÖ­ùσæWp8ðŒìOȇýýý ã7åFóKTWWG pktools: /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Release/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QGroupBox>
20 #include <QtGui/QHBoxLayout>
21 #include <QtGui/QHeaderView>
22 #include <QtGui/QLabel>
23 #include <QtGui/QLineEdit>
24 #include <QtGui/QListWidget>
25 #include <QtGui/QMainWindow>
26 #include <QtGui/QMenu>
27 #include <QtGui/QMenuBar>
28 #include <QtGui/QPlainTextEdit>
29 #include <QtGui/QSpacerItem>
30 #include <QtGui/QStatusBar>
31 #include <QtGui/QTabWidget>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput_image;
43  QAction *actionOutput_image;
44  QAction *actionQuit;
45  QAction *actionSelection_Info_file;
46  QAction *actionExtent;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab;
51  QVBoxLayout *verticalLayout_2;
52  QGridLayout *gridLayout_2;
53  QSpacerItem *horizontalSpacer_3;
54  QListWidget *listWidget_input;
55  QLabel *label;
56  QToolButton *toolButton_input;
57  QLineEdit *lry;
58  QLineEdit *uly;
59  QLabel *label_2;
60  QSpacerItem *horizontalSpacer_2;
61  QLineEdit *lrx;
62  QLineEdit *ulx;
63  QLabel *label_4;
64  QLineEdit *extent;
65  QToolButton *toolButton_extent;
66  QWidget *tab_2;
67  QGridLayout *gridLayout_4;
68  QSpacerItem *verticalSpacer_3;
69  QComboBox *resample;
70  QLabel *label_18;
71  QLabel *label_17;
72  QComboBox *crule;
73  QLabel *label_19;
74  QLineEdit *cband;
75  QGroupBox *groupBox;
76  QGridLayout *gridLayout_3;
77  QLabel *label_21;
78  QLineEdit *srcnodata;
79  QLabel *label_23;
80  QLabel *label_22;
81  QLineEdit *min;
82  QLineEdit *max;
83  QLabel *label_20;
84  QLineEdit *bndnodata;
85  QSpacerItem *horizontalSpacer_4;
86  QSpacerItem *horizontalSpacer_5;
87  QWidget *tab_3;
88  QVBoxLayout *verticalLayout_3;
89  QGridLayout *gridLayout;
90  QSpacerItem *horizontalSpacer_6;
91  QLabel *label_7;
92  QLabel *label_14;
93  QLineEdit *file;
94  QLabel *label_10;
95  QComboBox *oformat;
96  QComboBox *interleaved;
97  QLabel *label_9;
98  QLineEdit *dx;
99  QLabel *label_8;
100  QLabel *label_13;
101  QToolButton *toolButton_ct;
102  QComboBox *compressed;
103  QLabel *label_12;
104  QLineEdit *ct;
105  QLineEdit *output;
106  QToolButton *toolButton_output;
107  QLabel *label_6;
108  QLineEdit *a_srs;
109  QLabel *label_15;
110  QLineEdit *dy;
111  QLabel *label_5;
112  QCheckBox *tiled;
113  QComboBox *otype;
114  QLabel *label_11;
115  QLineEdit *dstnodata;
116  QToolButton *toolButton_file;
117  QLabel *label_3;
118  QWidget *tab_4;
119  QVBoxLayout *verticalLayout_5;
120  QVBoxLayout *verticalLayout_4;
121  QLabel *label_24;
122  QLineEdit *commandLineEdit;
123  QLabel *label_25;
124  QPlainTextEdit *consoleEdit;
125  QSpacerItem *verticalSpacer_2;
126  QHBoxLayout *horizontalLayout_2;
127  QToolButton *toolButton_Run;
128  QSpacerItem *horizontalSpacer;
129  QToolButton *toolButton_defaults;
130  QMenuBar *menuBar;
131  QMenu *menuFile;
132  QToolBar *mainToolBar;
133  QStatusBar *statusBar;
134 
135  void setupUi(QMainWindow *MainWindow)
136  {
137  if (MainWindow->objectName().isEmpty())
138  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
139  MainWindow->resize(798, 859);
140  actionInput_image = new QAction(MainWindow);
141  actionInput_image->setObjectName(QString::fromUtf8("actionInput_image"));
142  actionOutput_image = new QAction(MainWindow);
143  actionOutput_image->setObjectName(QString::fromUtf8("actionOutput_image"));
144  actionQuit = new QAction(MainWindow);
145  actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
146  actionSelection_Info_file = new QAction(MainWindow);
147  actionSelection_Info_file->setObjectName(QString::fromUtf8("actionSelection_Info_file"));
148  actionExtent = new QAction(MainWindow);
149  actionExtent->setObjectName(QString::fromUtf8("actionExtent"));
150  centralWidget = new QWidget(MainWindow);
151  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
152  verticalLayout = new QVBoxLayout(centralWidget);
153  verticalLayout->setSpacing(6);
154  verticalLayout->setContentsMargins(11, 11, 11, 11);
155  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
156  tabWidget = new QTabWidget(centralWidget);
157  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
158  tab = new QWidget();
159  tab->setObjectName(QString::fromUtf8("tab"));
160  verticalLayout_2 = new QVBoxLayout(tab);
161  verticalLayout_2->setSpacing(6);
162  verticalLayout_2->setContentsMargins(11, 11, 11, 11);
163  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
164  gridLayout_2 = new QGridLayout();
165  gridLayout_2->setSpacing(6);
166  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
167  horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
168 
169  gridLayout_2->addItem(horizontalSpacer_3, 1, 3, 1, 1);
170 
171  listWidget_input = new QListWidget(tab);
172  listWidget_input->setObjectName(QString::fromUtf8("listWidget_input"));
173 
174  gridLayout_2->addWidget(listWidget_input, 0, 2, 1, 1);
175 
176  label = new QLabel(tab);
177  label->setObjectName(QString::fromUtf8("label"));
178 
179  gridLayout_2->addWidget(label, 0, 0, 1, 1);
180 
181  toolButton_input = new QToolButton(tab);
182  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
183 
184  gridLayout_2->addWidget(toolButton_input, 0, 1, 1, 1);
185 
186  lry = new QLineEdit(tab);
187  lry->setObjectName(QString::fromUtf8("lry"));
188 
189  gridLayout_2->addWidget(lry, 3, 2, 1, 1);
190 
191  uly = new QLineEdit(tab);
192  uly->setObjectName(QString::fromUtf8("uly"));
193 
194  gridLayout_2->addWidget(uly, 1, 2, 1, 1);
195 
196  label_2 = new QLabel(tab);
197  label_2->setObjectName(QString::fromUtf8("label_2"));
198 
199  gridLayout_2->addWidget(label_2, 1, 0, 1, 1);
200 
201  horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
202 
203  gridLayout_2->addItem(horizontalSpacer_2, 1, 1, 1, 1);
204 
205  lrx = new QLineEdit(tab);
206  lrx->setObjectName(QString::fromUtf8("lrx"));
207 
208  gridLayout_2->addWidget(lrx, 2, 3, 1, 1);
209 
210  ulx = new QLineEdit(tab);
211  ulx->setObjectName(QString::fromUtf8("ulx"));
212 
213  gridLayout_2->addWidget(ulx, 2, 1, 1, 1);
214 
215  label_4 = new QLabel(tab);
216  label_4->setObjectName(QString::fromUtf8("label_4"));
217 
218  gridLayout_2->addWidget(label_4, 4, 0, 1, 1);
219 
220  extent = new QLineEdit(tab);
221  extent->setObjectName(QString::fromUtf8("extent"));
222 
223  gridLayout_2->addWidget(extent, 4, 1, 1, 1);
224 
225  toolButton_extent = new QToolButton(tab);
226  toolButton_extent->setObjectName(QString::fromUtf8("toolButton_extent"));
227 
228  gridLayout_2->addWidget(toolButton_extent, 4, 2, 1, 1);
229 
230 
231  verticalLayout_2->addLayout(gridLayout_2);
232 
233  tabWidget->addTab(tab, QString());
234  tab_2 = new QWidget();
235  tab_2->setObjectName(QString::fromUtf8("tab_2"));
236  gridLayout_4 = new QGridLayout(tab_2);
237  gridLayout_4->setSpacing(6);
238  gridLayout_4->setContentsMargins(11, 11, 11, 11);
239  gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
240  verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
241 
242  gridLayout_4->addItem(verticalSpacer_3, 2, 0, 1, 1);
243 
244  resample = new QComboBox(tab_2);
245  resample->setObjectName(QString::fromUtf8("resample"));
246 
247  gridLayout_4->addWidget(resample, 0, 1, 1, 1);
248 
249  label_18 = new QLabel(tab_2);
250  label_18->setObjectName(QString::fromUtf8("label_18"));
251 
252  gridLayout_4->addWidget(label_18, 1, 0, 1, 1);
253 
254  label_17 = new QLabel(tab_2);
255  label_17->setObjectName(QString::fromUtf8("label_17"));
256 
257  gridLayout_4->addWidget(label_17, 0, 0, 1, 1);
258 
259  crule = new QComboBox(tab_2);
260  crule->setObjectName(QString::fromUtf8("crule"));
261 
262  gridLayout_4->addWidget(crule, 1, 1, 1, 1);
263 
264  label_19 = new QLabel(tab_2);
265  label_19->setObjectName(QString::fromUtf8("label_19"));
266 
267  gridLayout_4->addWidget(label_19, 1, 3, 1, 1);
268 
269  cband = new QLineEdit(tab_2);
270  cband->setObjectName(QString::fromUtf8("cband"));
271 
272  gridLayout_4->addWidget(cband, 1, 4, 1, 1);
273 
274  groupBox = new QGroupBox(tab_2);
275  groupBox->setObjectName(QString::fromUtf8("groupBox"));
276  gridLayout_3 = new QGridLayout(groupBox);
277  gridLayout_3->setSpacing(6);
278  gridLayout_3->setContentsMargins(11, 11, 11, 11);
279  gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
280  label_21 = new QLabel(groupBox);
281  label_21->setObjectName(QString::fromUtf8("label_21"));
282 
283  gridLayout_3->addWidget(label_21, 1, 0, 1, 1);
284 
285  srcnodata = new QLineEdit(groupBox);
286  srcnodata->setObjectName(QString::fromUtf8("srcnodata"));
287 
288  gridLayout_3->addWidget(srcnodata, 1, 1, 1, 2);
289 
290  label_23 = new QLabel(groupBox);
291  label_23->setObjectName(QString::fromUtf8("label_23"));
292 
293  gridLayout_3->addWidget(label_23, 3, 0, 1, 1);
294 
295  label_22 = new QLabel(groupBox);
296  label_22->setObjectName(QString::fromUtf8("label_22"));
297 
298  gridLayout_3->addWidget(label_22, 2, 0, 1, 1);
299 
300  min = new QLineEdit(groupBox);
301  min->setObjectName(QString::fromUtf8("min"));
302 
303  gridLayout_3->addWidget(min, 2, 1, 1, 2);
304 
305  max = new QLineEdit(groupBox);
306  max->setObjectName(QString::fromUtf8("max"));
307 
308  gridLayout_3->addWidget(max, 3, 1, 1, 1);
309 
310  label_20 = new QLabel(groupBox);
311  label_20->setObjectName(QString::fromUtf8("label_20"));
312 
313  gridLayout_3->addWidget(label_20, 0, 0, 1, 1);
314 
315  bndnodata = new QLineEdit(groupBox);
316  bndnodata->setObjectName(QString::fromUtf8("bndnodata"));
317 
318  gridLayout_3->addWidget(bndnodata, 0, 1, 1, 1);
319 
320 
321  gridLayout_4->addWidget(groupBox, 3, 0, 1, 4);
322 
323  horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
324 
325  gridLayout_4->addItem(horizontalSpacer_4, 1, 5, 1, 1);
326 
327  horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
328 
329  gridLayout_4->addItem(horizontalSpacer_5, 1, 2, 1, 1);
330 
331  tabWidget->addTab(tab_2, QString());
332  tab_3 = new QWidget();
333  tab_3->setObjectName(QString::fromUtf8("tab_3"));
334  verticalLayout_3 = new QVBoxLayout(tab_3);
335  verticalLayout_3->setSpacing(6);
336  verticalLayout_3->setContentsMargins(11, 11, 11, 11);
337  verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
338  gridLayout = new QGridLayout();
339  gridLayout->setSpacing(6);
340  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
341  horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
342 
343  gridLayout->addItem(horizontalSpacer_6, 7, 3, 1, 1);
344 
345  label_7 = new QLabel(tab_3);
346  label_7->setObjectName(QString::fromUtf8("label_7"));
347 
348  gridLayout->addWidget(label_7, 4, 0, 1, 1);
349 
350  label_14 = new QLabel(tab_3);
351  label_14->setObjectName(QString::fromUtf8("label_14"));
352 
353  gridLayout->addWidget(label_14, 8, 0, 1, 1);
354 
355  file = new QLineEdit(tab_3);
356  file->setObjectName(QString::fromUtf8("file"));
357 
358  gridLayout->addWidget(file, 9, 1, 1, 1);
359 
360  label_10 = new QLabel(tab_3);
361  label_10->setObjectName(QString::fromUtf8("label_10"));
362 
363  gridLayout->addWidget(label_10, 6, 2, 1, 1);
364 
365  oformat = new QComboBox(tab_3);
366  oformat->setObjectName(QString::fromUtf8("oformat"));
367 
368  gridLayout->addWidget(oformat, 4, 1, 1, 1);
369 
370  interleaved = new QComboBox(tab_3);
371  interleaved->setObjectName(QString::fromUtf8("interleaved"));
372 
373  gridLayout->addWidget(interleaved, 7, 1, 1, 1);
374 
375  label_9 = new QLabel(tab_3);
376  label_9->setObjectName(QString::fromUtf8("label_9"));
377 
378  gridLayout->addWidget(label_9, 6, 0, 1, 1);
379 
380  dx = new QLineEdit(tab_3);
381  dx->setObjectName(QString::fromUtf8("dx"));
382 
383  gridLayout->addWidget(dx, 6, 1, 1, 1);
384 
385  label_8 = new QLabel(tab_3);
386  label_8->setObjectName(QString::fromUtf8("label_8"));
387 
388  gridLayout->addWidget(label_8, 5, 0, 1, 1);
389 
390  label_13 = new QLabel(tab_3);
391  label_13->setObjectName(QString::fromUtf8("label_13"));
392 
393  gridLayout->addWidget(label_13, 7, 4, 1, 1);
394 
395  toolButton_ct = new QToolButton(tab_3);
396  toolButton_ct->setObjectName(QString::fromUtf8("toolButton_ct"));
397 
398  gridLayout->addWidget(toolButton_ct, 5, 2, 1, 1);
399 
400  compressed = new QComboBox(tab_3);
401  compressed->setObjectName(QString::fromUtf8("compressed"));
402 
403  gridLayout->addWidget(compressed, 7, 5, 1, 1);
404 
405  label_12 = new QLabel(tab_3);
406  label_12->setObjectName(QString::fromUtf8("label_12"));
407 
408  gridLayout->addWidget(label_12, 7, 0, 1, 1);
409 
410  ct = new QLineEdit(tab_3);
411  ct->setObjectName(QString::fromUtf8("ct"));
412 
413  gridLayout->addWidget(ct, 5, 1, 1, 1);
414 
415  output = new QLineEdit(tab_3);
416  output->setObjectName(QString::fromUtf8("output"));
417 
418  gridLayout->addWidget(output, 1, 1, 1, 1);
419 
420  toolButton_output = new QToolButton(tab_3);
421  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
422 
423  gridLayout->addWidget(toolButton_output, 1, 2, 1, 1);
424 
425  label_6 = new QLabel(tab_3);
426  label_6->setObjectName(QString::fromUtf8("label_6"));
427 
428  gridLayout->addWidget(label_6, 3, 0, 1, 1);
429 
430  a_srs = new QLineEdit(tab_3);
431  a_srs->setObjectName(QString::fromUtf8("a_srs"));
432 
433  gridLayout->addWidget(a_srs, 2, 1, 1, 1);
434 
435  label_15 = new QLabel(tab_3);
436  label_15->setObjectName(QString::fromUtf8("label_15"));
437 
438  gridLayout->addWidget(label_15, 9, 0, 1, 1);
439 
440  dy = new QLineEdit(tab_3);
441  dy->setObjectName(QString::fromUtf8("dy"));
442 
443  gridLayout->addWidget(dy, 6, 4, 1, 1);
444 
445  label_5 = new QLabel(tab_3);
446  label_5->setObjectName(QString::fromUtf8("label_5"));
447 
448  gridLayout->addWidget(label_5, 2, 0, 1, 1);
449 
450  tiled = new QCheckBox(tab_3);
451  tiled->setObjectName(QString::fromUtf8("tiled"));
452 
453  gridLayout->addWidget(tiled, 7, 2, 1, 1);
454 
455  otype = new QComboBox(tab_3);
456  otype->setObjectName(QString::fromUtf8("otype"));
457 
458  gridLayout->addWidget(otype, 3, 1, 1, 1);
459 
460  label_11 = new QLabel(tab_3);
461  label_11->setObjectName(QString::fromUtf8("label_11"));
462 
463  gridLayout->addWidget(label_11, 6, 5, 1, 1);
464 
465  dstnodata = new QLineEdit(tab_3);
466  dstnodata->setObjectName(QString::fromUtf8("dstnodata"));
467 
468  gridLayout->addWidget(dstnodata, 8, 1, 1, 1);
469 
470  toolButton_file = new QToolButton(tab_3);
471  toolButton_file->setObjectName(QString::fromUtf8("toolButton_file"));
472 
473  gridLayout->addWidget(toolButton_file, 9, 2, 1, 1);
474 
475  label_3 = new QLabel(tab_3);
476  label_3->setObjectName(QString::fromUtf8("label_3"));
477 
478  gridLayout->addWidget(label_3, 1, 0, 1, 1);
479 
480 
481  verticalLayout_3->addLayout(gridLayout);
482 
483  tabWidget->addTab(tab_3, QString());
484  tab_4 = new QWidget();
485  tab_4->setObjectName(QString::fromUtf8("tab_4"));
486  verticalLayout_5 = new QVBoxLayout(tab_4);
487  verticalLayout_5->setSpacing(6);
488  verticalLayout_5->setContentsMargins(11, 11, 11, 11);
489  verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
490  verticalLayout_4 = new QVBoxLayout();
491  verticalLayout_4->setSpacing(6);
492  verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
493  label_24 = new QLabel(tab_4);
494  label_24->setObjectName(QString::fromUtf8("label_24"));
495 
496  verticalLayout_4->addWidget(label_24);
497 
498  commandLineEdit = new QLineEdit(tab_4);
499  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
500 
501  verticalLayout_4->addWidget(commandLineEdit);
502 
503  label_25 = new QLabel(tab_4);
504  label_25->setObjectName(QString::fromUtf8("label_25"));
505 
506  verticalLayout_4->addWidget(label_25);
507 
508  consoleEdit = new QPlainTextEdit(tab_4);
509  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
510 
511  verticalLayout_4->addWidget(consoleEdit);
512 
513 
514  verticalLayout_5->addLayout(verticalLayout_4);
515 
516  tabWidget->addTab(tab_4, QString());
517 
518  verticalLayout->addWidget(tabWidget);
519 
520  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
521 
522  verticalLayout->addItem(verticalSpacer_2);
523 
524  horizontalLayout_2 = new QHBoxLayout();
525  horizontalLayout_2->setSpacing(6);
526  horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
527  toolButton_Run = new QToolButton(centralWidget);
528  toolButton_Run->setObjectName(QString::fromUtf8("toolButton_Run"));
529 
530  horizontalLayout_2->addWidget(toolButton_Run);
531 
532  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
533 
534  horizontalLayout_2->addItem(horizontalSpacer);
535 
536  toolButton_defaults = new QToolButton(centralWidget);
537  toolButton_defaults->setObjectName(QString::fromUtf8("toolButton_defaults"));
538 
539  horizontalLayout_2->addWidget(toolButton_defaults);
540 
541 
542  verticalLayout->addLayout(horizontalLayout_2);
543 
544  MainWindow->setCentralWidget(centralWidget);
545  menuBar = new QMenuBar(MainWindow);
546  menuBar->setObjectName(QString::fromUtf8("menuBar"));
547  menuBar->setGeometry(QRect(0, 0, 798, 25));
548  menuFile = new QMenu(menuBar);
549  menuFile->setObjectName(QString::fromUtf8("menuFile"));
550  MainWindow->setMenuBar(menuBar);
551  mainToolBar = new QToolBar(MainWindow);
552  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
553  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
554  statusBar = new QStatusBar(MainWindow);
555  statusBar->setObjectName(QString::fromUtf8("statusBar"));
556  MainWindow->setStatusBar(statusBar);
557  QWidget::setTabOrder(toolButton_input, uly);
558  QWidget::setTabOrder(uly, ulx);
559  QWidget::setTabOrder(ulx, lrx);
560  QWidget::setTabOrder(lrx, lry);
561  QWidget::setTabOrder(lry, extent);
562  QWidget::setTabOrder(extent, toolButton_extent);
563  QWidget::setTabOrder(toolButton_extent, resample);
564  QWidget::setTabOrder(resample, crule);
565  QWidget::setTabOrder(crule, cband);
566  QWidget::setTabOrder(cband, bndnodata);
567  QWidget::setTabOrder(bndnodata, srcnodata);
568  QWidget::setTabOrder(srcnodata, min);
569  QWidget::setTabOrder(min, max);
570  QWidget::setTabOrder(max, output);
571  QWidget::setTabOrder(output, toolButton_output);
572  QWidget::setTabOrder(toolButton_output, a_srs);
573  QWidget::setTabOrder(a_srs, otype);
574  QWidget::setTabOrder(otype, oformat);
575  QWidget::setTabOrder(oformat, ct);
576  QWidget::setTabOrder(ct, toolButton_ct);
577  QWidget::setTabOrder(toolButton_ct, dx);
578  QWidget::setTabOrder(dx, dy);
579  QWidget::setTabOrder(dy, interleaved);
580  QWidget::setTabOrder(interleaved, tiled);
581  QWidget::setTabOrder(tiled, compressed);
582  QWidget::setTabOrder(compressed, dstnodata);
583  QWidget::setTabOrder(dstnodata, file);
584  QWidget::setTabOrder(file, toolButton_file);
585  QWidget::setTabOrder(toolButton_file, toolButton_Run);
586  QWidget::setTabOrder(toolButton_Run, toolButton_defaults);
587  QWidget::setTabOrder(toolButton_defaults, commandLineEdit);
588  QWidget::setTabOrder(commandLineEdit, consoleEdit);
589  QWidget::setTabOrder(consoleEdit, listWidget_input);
590  QWidget::setTabOrder(listWidget_input, tabWidget);
591 
592  menuBar->addAction(menuFile->menuAction());
593  menuFile->addAction(actionInput_image);
594  menuFile->addAction(actionExtent);
595  menuFile->addAction(actionOutput_image);
596  menuFile->addAction(actionSelection_Info_file);
597  menuFile->addAction(actionQuit);
598 
599  retranslateUi(MainWindow);
600 
601  tabWidget->setCurrentIndex(3);
602 
603 
604  QMetaObject::connectSlotsByName(MainWindow);
605  } // setupUi
606 
607  void retranslateUi(QMainWindow *MainWindow)
608  {
609  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkcomposite_gui", 0, QApplication::UnicodeUTF8));
610  actionInput_image->setText(QApplication::translate("MainWindow", "Input image(s)", 0, QApplication::UnicodeUTF8));
611  actionInput_image->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
612  actionOutput_image->setText(QApplication::translate("MainWindow", "Output image", 0, QApplication::UnicodeUTF8));
613  actionOutput_image->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
614  actionQuit->setText(QApplication::translate("MainWindow", "Quit", 0, QApplication::UnicodeUTF8));
615  actionQuit->setShortcut(QApplication::translate("MainWindow", "Alt+Q", 0, QApplication::UnicodeUTF8));
616  actionSelection_Info_file->setText(QApplication::translate("MainWindow", "Selection Info file", 0, QApplication::UnicodeUTF8));
617  actionSelection_Info_file->setShortcut(QApplication::translate("MainWindow", "Alt+F", 0, QApplication::UnicodeUTF8));
618  actionExtent->setText(QApplication::translate("MainWindow", "Extent", 0, QApplication::UnicodeUTF8));
619  actionExtent->setShortcut(QApplication::translate("MainWindow", "Alt+E", 0, QApplication::UnicodeUTF8));
620 #ifndef QT_NO_TOOLTIP
621  label->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input raster images</p></body></html>", 0, QApplication::UnicodeUTF8));
622 #endif // QT_NO_TOOLTIP
623  label->setText(QApplication::translate("MainWindow", "Input images", 0, QApplication::UnicodeUTF8));
624  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
625 #ifndef QT_NO_TOOLTIP
626  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Provide geographical extent to crop in coordinate reference system of input data</p></body></html>", 0, QApplication::UnicodeUTF8));
627 #endif // QT_NO_TOOLTIP
628  label_2->setText(QApplication::translate("MainWindow", "Geographical extent", 0, QApplication::UnicodeUTF8));
629 #ifndef QT_NO_TOOLTIP
630  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Use an external OGR vector file to define the geographical extent to crop. Coordinate reference systems of input and vector must be identical</p></body></html>", 0, QApplication::UnicodeUTF8));
631 #endif // QT_NO_TOOLTIP
632  label_4->setText(QApplication::translate("MainWindow", "Extent via vector:", 0, QApplication::UnicodeUTF8));
633  toolButton_extent->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
634  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
635 #ifndef QT_NO_TOOLTIP
636  label_18->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Composite rule for mosaic. Default is overwrite</p></body></html>", 0, QApplication::UnicodeUTF8));
637 #endif // QT_NO_TOOLTIP
638  label_18->setText(QApplication::translate("MainWindow", "Composit rule", 0, QApplication::UnicodeUTF8));
639  label_17->setText(QApplication::translate("MainWindow", "Resample method", 0, QApplication::UnicodeUTF8));
640  label_19->setText(QApplication::translate("MainWindow", "Band used for composit rule", 0, QApplication::UnicodeUTF8));
641  groupBox->setTitle(QApplication::translate("MainWindow", "nodata values in input", 0, QApplication::UnicodeUTF8));
642 #ifndef QT_NO_TOOLTIP
643  label_21->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>invalid value for input image</p></body></html>", 0, QApplication::UnicodeUTF8));
644 #endif // QT_NO_TOOLTIP
645  label_21->setText(QApplication::translate("MainWindow", "nodata value", 0, QApplication::UnicodeUTF8));
646 #ifndef QT_NO_TOOLTIP
647  label_23->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>flag values larger or equal to this value as invalid</p></body></html>", 0, QApplication::UnicodeUTF8));
648 #endif // QT_NO_TOOLTIP
649  label_23->setText(QApplication::translate("MainWindow", "max value", 0, QApplication::UnicodeUTF8));
650 #ifndef QT_NO_TOOLTIP
651  label_22->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>flag values smaller or equal to this value as invalid</p></body></html>", 0, QApplication::UnicodeUTF8));
652 #endif // QT_NO_TOOLTIP
653  label_22->setText(QApplication::translate("MainWindow", "min value", 0, QApplication::UnicodeUTF8));
654 #ifndef QT_NO_TOOLTIP
655  label_20->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Band in input image to check if pixel is valid (used for srcnodata, min and max options)</p></body></html>", 0, QApplication::UnicodeUTF8));
656 #endif // QT_NO_TOOLTIP
657  label_20->setText(QApplication::translate("MainWindow", "band", 0, QApplication::UnicodeUTF8));
658  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Composit", 0, QApplication::UnicodeUTF8));
659  label_7->setText(QApplication::translate("MainWindow", "Output image format", 0, QApplication::UnicodeUTF8));
660 #ifndef QT_NO_TOOLTIP
661  label_14->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Nodata value to put in image if out of bounds or if no valid pixel value is found in input images</p></body></html>", 0, QApplication::UnicodeUTF8));
662 #endif // QT_NO_TOOLTIP
663  label_14->setText(QApplication::translate("MainWindow", "Output nodata value", 0, QApplication::UnicodeUTF8));
664  label_10->setText(QApplication::translate("MainWindow", "dx", 0, QApplication::UnicodeUTF8));
665 #ifndef QT_NO_TOOLTIP
666  label_9->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output resolution in x and y distance measure (e.g., meter). Leave empty to read from input data</p></body></html>", 0, QApplication::UnicodeUTF8));
667 #endif // QT_NO_TOOLTIP
668  label_9->setText(QApplication::translate("MainWindow", "Output resolution", 0, QApplication::UnicodeUTF8));
669 #ifndef QT_NO_TOOLTIP
670  label_8->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Color table must be provided as ASCII text file with five (space delimited) columns:</p><p>value red green blue alpha</p></body></html>", 0, QApplication::UnicodeUTF8));
671 #endif // QT_NO_TOOLTIP
672  label_8->setText(QApplication::translate("MainWindow", "Color table (ASCII)", 0, QApplication::UnicodeUTF8));
673  label_13->setText(QApplication::translate("MainWindow", "compressed", 0, QApplication::UnicodeUTF8));
674  toolButton_ct->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
675  label_12->setText(QApplication::translate("MainWindow", "Interleaved", 0, QApplication::UnicodeUTF8));
676  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
677  label_6->setText(QApplication::translate("MainWindow", "Output data type", 0, QApplication::UnicodeUTF8));
678 #ifndef QT_NO_TOOLTIP
679  label_15->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Create extra raster file containing information on the selected input file for each pixel</p></body></html>", 0, QApplication::UnicodeUTF8));
680 #endif // QT_NO_TOOLTIP
681  label_15->setText(QApplication::translate("MainWindow", "Ouput info on selected pixels", 0, QApplication::UnicodeUTF8));
682 #ifndef QT_NO_TOOLTIP
683  label_5->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Assign projection (e.g., epsg:3035). Notice this will not re-project the image. Use gdalwarp instead.</p></body></html>", 0, QApplication::UnicodeUTF8));
684 #endif // QT_NO_TOOLTIP
685  label_5->setText(QApplication::translate("MainWindow", "Assign projection (EPSG:code)", 0, QApplication::UnicodeUTF8));
686  tiled->setText(QApplication::translate("MainWindow", "Tiled", 0, QApplication::UnicodeUTF8));
687  label_11->setText(QApplication::translate("MainWindow", "dy", 0, QApplication::UnicodeUTF8));
688  toolButton_file->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
689  label_3->setText(QApplication::translate("MainWindow", "Output image", 0, QApplication::UnicodeUTF8));
690  tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
691  label_24->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
692  label_25->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
693  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
694  toolButton_Run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
695  toolButton_defaults->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
696  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
697  } // retranslateUi
698 
699 };
700 
701 namespace Ui {
702  class MainWindow: public Ui_MainWindow {};
703 } // namespace Ui
704 
705 QT_END_NAMESPACE
706 
707 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract__inherit__graph.map0000644000113200011300000000011312616110567024501 00000000000000 pktools-2.6.6/doc/html/dir_41d189c72498e24f979b227eb8e138b1.html0000644000113200011300000001051412647637663017572 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkextract_gui-gcc-Release Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkextract_gui-gcc-Release Directory Reference
Directory dependency graph for build-pkextract_gui-gcc-Release:
/home/kempenep/pktools/qt/build-pkextract_gui-gcc-Release

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/pkcrop.html0000644000113200011300000002236612647637662014054 00000000000000 pktools: pkcrop
pktools  2.6.6
Processing Kernel for geospatial data
pkcrop

perform raster data operations on image such as crop, extract and stack bands

SYNOPSIS

Usage: pkcrop -i input -o output

Options: [-of out_format] [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}] [-b band]* [-ulx ULX -uly ULY -lrx LRX -lry LRY] [-dx xres] [-dy yres] [-r resampling_method] [-a_srs epsg:number] [-nodata value]

Advanced options: [-e vector [-cut]] [-sband band -eband band]* [-co NAME=VALUE]* [-x center_x -y center_y] [-nx size_x -ny size_y] [-ns nsample -nl nlines] [-as min -as max] [-scale value]* [-off offset]* [-ct colortable] [-d description] [-align]

Description

The utility pkcrop can subset and stack raster images. In the spatial domain it can crop a bounding box from a larger image. The output bounding box is selected by setting the new corner coordinates using the options -ulx -uly -lrx -lry. Alternatively you can set the new image center (-x -y) and size. This can be done either in projected coordinates (using the options -nx -ny) or in image coordinates (using the options -ns -nl). You can also use a vector file to set the new bounding box (option -e). In the spectral domain, pkcrop allows you to select individual bands from one or more input image(s). Bands are stored in the same order as provided on the command line, using the option -b. Band numbers start with index 0 (indicating the first band). The default is to select all input bands. If more input images are provided, the bands are stacked into a multi-band image. If the bounding boxes or spatial resolution are not identical for all input images, you should explicitly set them via the options. The pkcrop utility is not suitable to mosaic or composite images. Consider the utility pkcomposite instead.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image file(s). If input contains multiple images, a multi-band output is created
    o output std::string Output image file
    a_srs a_srs std::string Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid
    ulx ulx double 0 Upper left x value bounding box
    uly uly double 0 Upper left y value bounding box
    lrx lrx double 0 Lower right x value bounding box
    lry lry double 0 Lower right y value bounding box
    b band unsigned short band index to crop (leave empty to retain all bands)
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    as autoscale double scale output to min and max, e.g., –autoscale 0 –autoscale 255
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate)
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    dx dx double Output resolution in x (in meter) (empty: keep original resolution)
    dy dy double Output resolution in y (in meter) (empty: keep original resolution)
    r resampling-method std::string near Resampling method (near: nearest neighbor, bilinear: bi-linear interpolation).
    e extent std::string get boundary from extent from polygons in vector file
    cut crop_to_cutline bool false Crop the extent of the target dataset to the extent of the cutline
    m mask std::string Use the specified file as a validity mask (0 is nodata)
    msknodata msknodata float 0 Mask value not to consider for crop
    msknodata msknodata float 0 Mask value not to consider for crop
    mskband mskband short 0 Mask band to read (0 indexed). Provide band for each mask.
    co co std::string Creation option for output file. Multiple options can be specified.
    x x double x-coordinate of image center to crop (in meter)
    y y double y-coordinate of image center to crop (in meter)
    nx nx double image size in x to crop (in meter)
    ny ny double image size in y to crop (in meter)
    ns ns int number of samples to crop (in pixels)
    nl nl int number of lines to crop (in pixels)
    scale scale double output=scale*input+offset
    off offset double output=scale*input+offset
    nodata nodata float Nodata value to put in image if out of bounds.
    align align bool Align output bounding box to input image
    d description std::string Set image description

    Examples

Some examples how to use pkcrop can be found here

pktools-2.6.6/doc/html/classFileReaderAscii__coll__graph.md50000644000113200011300000000004012616110566020732 000000000000006d09dc6d3271ce3d2cfd407777da371epktools-2.6.6/doc/html/nav_f.png0000644000113200011300000000023112647637661013451 00000000000000‰PNG  IHDR8³»`IDATxíÝK€ EÑ–·[†øBÑmkâÄÂH—prÓ¼.‚Žó‚ꎤR6Z VI±E‚5j³„lóš›iI˜¬ÞêçJ0ŒÑÑ/Žû›™uøñóÞ¿6sH ÝõyIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass__inherit__graph.md50000644000113200011300000000004012616110566024353 0000000000000000293936f75bf36c5fc69d4acd9d76a7pktools-2.6.6/doc/html/classImgRasterGdal__inherit__graph.map0000644000113200011300000000062412647437044021264 00000000000000 pktools-2.6.6/doc/html/build-pksvm__gui-gcc-Release_2ui__mainwindow_8h_source.html0000644000113200011300000032010112647637661025242 00000000000000 pktools: /home/kempenep/pktools/qt/build-pksvm_gui-gcc-Release/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QComboBox>
17 #include <QtGui/QCommandLinkButton>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QHBoxLayout>
20 #include <QtGui/QHeaderView>
21 #include <QtGui/QLabel>
22 #include <QtGui/QLineEdit>
23 #include <QtGui/QMainWindow>
24 #include <QtGui/QMenu>
25 #include <QtGui/QMenuBar>
26 #include <QtGui/QPlainTextEdit>
27 #include <QtGui/QPushButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStatusBar>
30 #include <QtGui/QTabWidget>
31 #include <QtGui/QTableView>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput;
43  QAction *actionTraining;
44  QAction *actionMask;
45  QAction *actionOutput;
46  QAction *actionColor_table;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab;
51  QVBoxLayout *verticalLayout_3;
52  QGridLayout *gridLayout;
53  QLabel *label_2;
54  QToolButton *toolButton_training;
55  QLabel *label_4;
56  QSpacerItem *horizontalSpacer_4;
57  QLineEdit *training;
58  QLineEdit *nclass;
59  QLabel *label_20;
60  QLineEdit *label;
61  QSpacerItem *horizontalSpacer_3;
62  QLabel *label_21;
63  QLineEdit *tln;
64  QSpacerItem *horizontalSpacer_2;
65  QCommandLinkButton *commandLinkButtonPrepareTable;
66  QVBoxLayout *verticalLayout_2;
67  QLabel *label_17;
68  QTableView *tableView_labels;
69  QWidget *tab_2;
70  QVBoxLayout *verticalLayout_4;
71  QGridLayout *gridLayout_2;
72  QLineEdit *nodata;
73  QLabel *label_14;
74  QToolButton *toolButton_input;
75  QLabel *label_16;
76  QLabel *label_13;
77  QToolButton *toolButton_mask;
78  QLabel *label_15;
79  QLineEdit *mask;
80  QLineEdit *msknodata;
81  QSpacerItem *horizontalSpacer_15;
82  QLineEdit *output;
83  QToolButton *toolButton_output;
84  QLineEdit *input;
85  QLabel *label_3;
86  QLabel *label_22;
87  QLineEdit *ct;
88  QToolButton *toolButton_ct;
89  QSpacerItem *verticalSpacer;
90  QWidget *tab_3;
91  QVBoxLayout *verticalLayout_5;
92  QGridLayout *gridLayout_3;
93  QLineEdit *cv;
94  QLineEdit *ccost;
95  QLabel *label_5;
96  QLabel *label_10;
97  QLabel *label_11;
98  QLabel *label_6;
99  QComboBox *svmtype;
100  QLineEdit *gamma;
101  QLabel *label_7;
102  QLineEdit *coef0;
103  QLabel *label_9;
104  QLineEdit *nu;
105  QLineEdit *kd;
106  QLabel *label_12;
107  QSpacerItem *verticalSpacer_3;
108  QComboBox *kerneltype;
109  QLabel *label_8;
110  QSpacerItem *horizontalSpacer_5;
111  QSpacerItem *verticalSpacer_2;
112  QWidget *tab_4;
113  QVBoxLayout *verticalLayout_6;
114  QLabel *label_18;
115  QLineEdit *commandLineEdit;
116  QLabel *label_19;
117  QPlainTextEdit *consoleEdit;
118  QHBoxLayout *horizontalLayout;
119  QPushButton *pushButton_run;
120  QSpacerItem *horizontalSpacer;
121  QPushButton *pushButton_restore;
122  QMenuBar *menuBar;
123  QMenu *menuFile;
124  QToolBar *mainToolBar;
125  QStatusBar *statusBar;
126 
127  void setupUi(QMainWindow *MainWindow)
128  {
129  if (MainWindow->objectName().isEmpty())
130  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
131  MainWindow->resize(628, 614);
132  actionInput = new QAction(MainWindow);
133  actionInput->setObjectName(QString::fromUtf8("actionInput"));
134  actionTraining = new QAction(MainWindow);
135  actionTraining->setObjectName(QString::fromUtf8("actionTraining"));
136  actionMask = new QAction(MainWindow);
137  actionMask->setObjectName(QString::fromUtf8("actionMask"));
138  actionOutput = new QAction(MainWindow);
139  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
140  actionColor_table = new QAction(MainWindow);
141  actionColor_table->setObjectName(QString::fromUtf8("actionColor_table"));
142  centralWidget = new QWidget(MainWindow);
143  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
144  verticalLayout = new QVBoxLayout(centralWidget);
145  verticalLayout->setSpacing(6);
146  verticalLayout->setContentsMargins(11, 11, 11, 11);
147  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
148  tabWidget = new QTabWidget(centralWidget);
149  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
150  tab = new QWidget();
151  tab->setObjectName(QString::fromUtf8("tab"));
152  verticalLayout_3 = new QVBoxLayout(tab);
153  verticalLayout_3->setSpacing(6);
154  verticalLayout_3->setContentsMargins(11, 11, 11, 11);
155  verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
156  gridLayout = new QGridLayout();
157  gridLayout->setSpacing(6);
158  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
159  label_2 = new QLabel(tab);
160  label_2->setObjectName(QString::fromUtf8("label_2"));
161 
162  gridLayout->addWidget(label_2, 2, 0, 1, 1);
163 
164  toolButton_training = new QToolButton(tab);
165  toolButton_training->setObjectName(QString::fromUtf8("toolButton_training"));
166 
167  gridLayout->addWidget(toolButton_training, 0, 2, 1, 1);
168 
169  label_4 = new QLabel(tab);
170  label_4->setObjectName(QString::fromUtf8("label_4"));
171 
172  gridLayout->addWidget(label_4, 0, 0, 1, 1);
173 
174  horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
175 
176  gridLayout->addItem(horizontalSpacer_4, 3, 2, 1, 1);
177 
178  training = new QLineEdit(tab);
179  training->setObjectName(QString::fromUtf8("training"));
180 
181  gridLayout->addWidget(training, 0, 1, 1, 1);
182 
183  nclass = new QLineEdit(tab);
184  nclass->setObjectName(QString::fromUtf8("nclass"));
185 
186  gridLayout->addWidget(nclass, 3, 1, 1, 1);
187 
188  label_20 = new QLabel(tab);
189  label_20->setObjectName(QString::fromUtf8("label_20"));
190 
191  gridLayout->addWidget(label_20, 3, 0, 1, 1);
192 
193  label = new QLineEdit(tab);
194  label->setObjectName(QString::fromUtf8("label"));
195 
196  gridLayout->addWidget(label, 2, 1, 1, 1);
197 
198  horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
199 
200  gridLayout->addItem(horizontalSpacer_3, 2, 2, 1, 1);
201 
202  label_21 = new QLabel(tab);
203  label_21->setObjectName(QString::fromUtf8("label_21"));
204 
205  gridLayout->addWidget(label_21, 1, 0, 1, 1);
206 
207  tln = new QLineEdit(tab);
208  tln->setObjectName(QString::fromUtf8("tln"));
209 
210  gridLayout->addWidget(tln, 1, 1, 1, 1);
211 
212  horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
213 
214  gridLayout->addItem(horizontalSpacer_2, 1, 2, 1, 1);
215 
216 
217  verticalLayout_3->addLayout(gridLayout);
218 
219  commandLinkButtonPrepareTable = new QCommandLinkButton(tab);
220  commandLinkButtonPrepareTable->setObjectName(QString::fromUtf8("commandLinkButtonPrepareTable"));
221 
222  verticalLayout_3->addWidget(commandLinkButtonPrepareTable);
223 
224  verticalLayout_2 = new QVBoxLayout();
225  verticalLayout_2->setSpacing(6);
226  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
227  label_17 = new QLabel(tab);
228  label_17->setObjectName(QString::fromUtf8("label_17"));
229 
230  verticalLayout_2->addWidget(label_17);
231 
232  tableView_labels = new QTableView(tab);
233  tableView_labels->setObjectName(QString::fromUtf8("tableView_labels"));
234 
235  verticalLayout_2->addWidget(tableView_labels);
236 
237 
238  verticalLayout_3->addLayout(verticalLayout_2);
239 
240  tabWidget->addTab(tab, QString());
241  tab_2 = new QWidget();
242  tab_2->setObjectName(QString::fromUtf8("tab_2"));
243  verticalLayout_4 = new QVBoxLayout(tab_2);
244  verticalLayout_4->setSpacing(6);
245  verticalLayout_4->setContentsMargins(11, 11, 11, 11);
246  verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
247  gridLayout_2 = new QGridLayout();
248  gridLayout_2->setSpacing(6);
249  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
250  nodata = new QLineEdit(tab_2);
251  nodata->setObjectName(QString::fromUtf8("nodata"));
252 
253  gridLayout_2->addWidget(nodata, 2, 5, 1, 1);
254 
255  label_14 = new QLabel(tab_2);
256  label_14->setObjectName(QString::fromUtf8("label_14"));
257 
258  gridLayout_2->addWidget(label_14, 1, 4, 1, 1);
259 
260  toolButton_input = new QToolButton(tab_2);
261  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
262 
263  gridLayout_2->addWidget(toolButton_input, 0, 2, 1, 1);
264 
265  label_16 = new QLabel(tab_2);
266  label_16->setObjectName(QString::fromUtf8("label_16"));
267 
268  gridLayout_2->addWidget(label_16, 2, 4, 1, 1);
269 
270  label_13 = new QLabel(tab_2);
271  label_13->setObjectName(QString::fromUtf8("label_13"));
272 
273  gridLayout_2->addWidget(label_13, 1, 0, 1, 1);
274 
275  toolButton_mask = new QToolButton(tab_2);
276  toolButton_mask->setObjectName(QString::fromUtf8("toolButton_mask"));
277 
278  gridLayout_2->addWidget(toolButton_mask, 1, 2, 1, 1);
279 
280  label_15 = new QLabel(tab_2);
281  label_15->setObjectName(QString::fromUtf8("label_15"));
282 
283  gridLayout_2->addWidget(label_15, 2, 0, 1, 1);
284 
285  mask = new QLineEdit(tab_2);
286  mask->setObjectName(QString::fromUtf8("mask"));
287 
288  gridLayout_2->addWidget(mask, 1, 1, 1, 1);
289 
290  msknodata = new QLineEdit(tab_2);
291  msknodata->setObjectName(QString::fromUtf8("msknodata"));
292 
293  gridLayout_2->addWidget(msknodata, 1, 5, 1, 1);
294 
295  horizontalSpacer_15 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
296 
297  gridLayout_2->addItem(horizontalSpacer_15, 1, 3, 1, 1);
298 
299  output = new QLineEdit(tab_2);
300  output->setObjectName(QString::fromUtf8("output"));
301 
302  gridLayout_2->addWidget(output, 2, 1, 1, 1);
303 
304  toolButton_output = new QToolButton(tab_2);
305  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
306 
307  gridLayout_2->addWidget(toolButton_output, 2, 2, 1, 1);
308 
309  input = new QLineEdit(tab_2);
310  input->setObjectName(QString::fromUtf8("input"));
311 
312  gridLayout_2->addWidget(input, 0, 1, 1, 1);
313 
314  label_3 = new QLabel(tab_2);
315  label_3->setObjectName(QString::fromUtf8("label_3"));
316 
317  gridLayout_2->addWidget(label_3, 0, 0, 1, 1);
318 
319  label_22 = new QLabel(tab_2);
320  label_22->setObjectName(QString::fromUtf8("label_22"));
321 
322  gridLayout_2->addWidget(label_22, 3, 0, 1, 1);
323 
324  ct = new QLineEdit(tab_2);
325  ct->setObjectName(QString::fromUtf8("ct"));
326 
327  gridLayout_2->addWidget(ct, 3, 1, 1, 1);
328 
329  toolButton_ct = new QToolButton(tab_2);
330  toolButton_ct->setObjectName(QString::fromUtf8("toolButton_ct"));
331 
332  gridLayout_2->addWidget(toolButton_ct, 3, 2, 1, 1);
333 
334 
335  verticalLayout_4->addLayout(gridLayout_2);
336 
337  verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
338 
339  verticalLayout_4->addItem(verticalSpacer);
340 
341  tabWidget->addTab(tab_2, QString());
342  tab_3 = new QWidget();
343  tab_3->setObjectName(QString::fromUtf8("tab_3"));
344  verticalLayout_5 = new QVBoxLayout(tab_3);
345  verticalLayout_5->setSpacing(6);
346  verticalLayout_5->setContentsMargins(11, 11, 11, 11);
347  verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
348  gridLayout_3 = new QGridLayout();
349  gridLayout_3->setSpacing(6);
350  gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
351  cv = new QLineEdit(tab_3);
352  cv->setObjectName(QString::fromUtf8("cv"));
353 
354  gridLayout_3->addWidget(cv, 3, 1, 1, 1);
355 
356  ccost = new QLineEdit(tab_3);
357  ccost->setObjectName(QString::fromUtf8("ccost"));
358 
359  gridLayout_3->addWidget(ccost, 2, 4, 1, 1);
360 
361  label_5 = new QLabel(tab_3);
362  label_5->setObjectName(QString::fromUtf8("label_5"));
363 
364  gridLayout_3->addWidget(label_5, 3, 0, 1, 1);
365 
366  label_10 = new QLabel(tab_3);
367  label_10->setObjectName(QString::fromUtf8("label_10"));
368 
369  gridLayout_3->addWidget(label_10, 2, 3, 1, 1);
370 
371  label_11 = new QLabel(tab_3);
372  label_11->setObjectName(QString::fromUtf8("label_11"));
373 
374  gridLayout_3->addWidget(label_11, 0, 3, 1, 1);
375 
376  label_6 = new QLabel(tab_3);
377  label_6->setObjectName(QString::fromUtf8("label_6"));
378 
379  gridLayout_3->addWidget(label_6, 0, 0, 1, 1);
380 
381  svmtype = new QComboBox(tab_3);
382  svmtype->setObjectName(QString::fromUtf8("svmtype"));
383 
384  gridLayout_3->addWidget(svmtype, 0, 1, 1, 1);
385 
386  gamma = new QLineEdit(tab_3);
387  gamma->setObjectName(QString::fromUtf8("gamma"));
388 
389  gridLayout_3->addWidget(gamma, 2, 1, 1, 1);
390 
391  label_7 = new QLabel(tab_3);
392  label_7->setObjectName(QString::fromUtf8("label_7"));
393 
394  gridLayout_3->addWidget(label_7, 1, 0, 1, 1);
395 
396  coef0 = new QLineEdit(tab_3);
397  coef0->setObjectName(QString::fromUtf8("coef0"));
398 
399  gridLayout_3->addWidget(coef0, 0, 4, 1, 1);
400 
401  label_9 = new QLabel(tab_3);
402  label_9->setObjectName(QString::fromUtf8("label_9"));
403 
404  gridLayout_3->addWidget(label_9, 2, 0, 1, 1);
405 
406  nu = new QLineEdit(tab_3);
407  nu->setObjectName(QString::fromUtf8("nu"));
408 
409  gridLayout_3->addWidget(nu, 0, 7, 1, 1);
410 
411  kd = new QLineEdit(tab_3);
412  kd->setObjectName(QString::fromUtf8("kd"));
413 
414  gridLayout_3->addWidget(kd, 1, 4, 1, 1);
415 
416  label_12 = new QLabel(tab_3);
417  label_12->setObjectName(QString::fromUtf8("label_12"));
418 
419  gridLayout_3->addWidget(label_12, 0, 6, 1, 1);
420 
421  verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
422 
423  gridLayout_3->addItem(verticalSpacer_3, 0, 2, 1, 1);
424 
425  kerneltype = new QComboBox(tab_3);
426  kerneltype->setObjectName(QString::fromUtf8("kerneltype"));
427 
428  gridLayout_3->addWidget(kerneltype, 1, 1, 1, 1);
429 
430  label_8 = new QLabel(tab_3);
431  label_8->setObjectName(QString::fromUtf8("label_8"));
432 
433  gridLayout_3->addWidget(label_8, 1, 3, 1, 1);
434 
435  horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
436 
437  gridLayout_3->addItem(horizontalSpacer_5, 0, 5, 1, 1);
438 
439 
440  verticalLayout_5->addLayout(gridLayout_3);
441 
442  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
443 
444  verticalLayout_5->addItem(verticalSpacer_2);
445 
446  tabWidget->addTab(tab_3, QString());
447  tab_4 = new QWidget();
448  tab_4->setObjectName(QString::fromUtf8("tab_4"));
449  verticalLayout_6 = new QVBoxLayout(tab_4);
450  verticalLayout_6->setSpacing(6);
451  verticalLayout_6->setContentsMargins(11, 11, 11, 11);
452  verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6"));
453  label_18 = new QLabel(tab_4);
454  label_18->setObjectName(QString::fromUtf8("label_18"));
455 
456  verticalLayout_6->addWidget(label_18);
457 
458  commandLineEdit = new QLineEdit(tab_4);
459  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
460 
461  verticalLayout_6->addWidget(commandLineEdit);
462 
463  label_19 = new QLabel(tab_4);
464  label_19->setObjectName(QString::fromUtf8("label_19"));
465 
466  verticalLayout_6->addWidget(label_19);
467 
468  consoleEdit = new QPlainTextEdit(tab_4);
469  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
470 
471  verticalLayout_6->addWidget(consoleEdit);
472 
473  tabWidget->addTab(tab_4, QString());
474 
475  verticalLayout->addWidget(tabWidget);
476 
477  horizontalLayout = new QHBoxLayout();
478  horizontalLayout->setSpacing(6);
479  horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
480  pushButton_run = new QPushButton(centralWidget);
481  pushButton_run->setObjectName(QString::fromUtf8("pushButton_run"));
482 
483  horizontalLayout->addWidget(pushButton_run);
484 
485  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
486 
487  horizontalLayout->addItem(horizontalSpacer);
488 
489  pushButton_restore = new QPushButton(centralWidget);
490  pushButton_restore->setObjectName(QString::fromUtf8("pushButton_restore"));
491 
492  horizontalLayout->addWidget(pushButton_restore);
493 
494 
495  verticalLayout->addLayout(horizontalLayout);
496 
497  MainWindow->setCentralWidget(centralWidget);
498  menuBar = new QMenuBar(MainWindow);
499  menuBar->setObjectName(QString::fromUtf8("menuBar"));
500  menuBar->setGeometry(QRect(0, 0, 628, 25));
501  menuFile = new QMenu(menuBar);
502  menuFile->setObjectName(QString::fromUtf8("menuFile"));
503  MainWindow->setMenuBar(menuBar);
504  mainToolBar = new QToolBar(MainWindow);
505  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
506  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
507  statusBar = new QStatusBar(MainWindow);
508  statusBar->setObjectName(QString::fromUtf8("statusBar"));
509  MainWindow->setStatusBar(statusBar);
510  QWidget::setTabOrder(tabWidget, training);
511  QWidget::setTabOrder(training, toolButton_training);
512  QWidget::setTabOrder(toolButton_training, tln);
513  QWidget::setTabOrder(tln, label);
514  QWidget::setTabOrder(label, nclass);
515  QWidget::setTabOrder(nclass, input);
516  QWidget::setTabOrder(input, toolButton_input);
517  QWidget::setTabOrder(toolButton_input, mask);
518  QWidget::setTabOrder(mask, toolButton_mask);
519  QWidget::setTabOrder(toolButton_mask, msknodata);
520  QWidget::setTabOrder(msknodata, output);
521  QWidget::setTabOrder(output, toolButton_output);
522  QWidget::setTabOrder(toolButton_output, nodata);
523  QWidget::setTabOrder(nodata, ct);
524  QWidget::setTabOrder(ct, toolButton_ct);
525  QWidget::setTabOrder(toolButton_ct, svmtype);
526  QWidget::setTabOrder(svmtype, coef0);
527  QWidget::setTabOrder(coef0, nu);
528  QWidget::setTabOrder(nu, kerneltype);
529  QWidget::setTabOrder(kerneltype, kd);
530  QWidget::setTabOrder(kd, gamma);
531  QWidget::setTabOrder(gamma, ccost);
532  QWidget::setTabOrder(ccost, cv);
533  QWidget::setTabOrder(cv, commandLineEdit);
534  QWidget::setTabOrder(commandLineEdit, consoleEdit);
535  QWidget::setTabOrder(consoleEdit, tableView_labels);
536  QWidget::setTabOrder(tableView_labels, commandLinkButtonPrepareTable);
537  QWidget::setTabOrder(commandLinkButtonPrepareTable, pushButton_run);
538  QWidget::setTabOrder(pushButton_run, pushButton_restore);
539 
540  menuBar->addAction(menuFile->menuAction());
541  menuFile->addAction(actionInput);
542  menuFile->addAction(actionTraining);
543  menuFile->addAction(actionMask);
544  menuFile->addAction(actionOutput);
545  menuFile->addAction(actionColor_table);
546 
547  retranslateUi(MainWindow);
548 
549  tabWidget->setCurrentIndex(0);
550 
551 
552  QMetaObject::connectSlotsByName(MainWindow);
553  } // setupUi
554 
555  void retranslateUi(QMainWindow *MainWindow)
556  {
557  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pksvm_gui", 0, QApplication::UnicodeUTF8));
558  actionInput->setText(QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
559  actionInput->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
560  actionTraining->setText(QApplication::translate("MainWindow", "Training", 0, QApplication::UnicodeUTF8));
561  actionTraining->setShortcut(QApplication::translate("MainWindow", "Alt+T", 0, QApplication::UnicodeUTF8));
562  actionMask->setText(QApplication::translate("MainWindow", "Mask", 0, QApplication::UnicodeUTF8));
563  actionMask->setShortcut(QApplication::translate("MainWindow", "Alt+M", 0, QApplication::UnicodeUTF8));
564  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
565  actionOutput->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
566  actionColor_table->setText(QApplication::translate("MainWindow", "Color table", 0, QApplication::UnicodeUTF8));
567  actionColor_table->setShortcut(QApplication::translate("MainWindow", "Alt+C", 0, QApplication::UnicodeUTF8));
568 #ifndef QT_NO_TOOLTIP
569  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Attribute name of the class label in the training vector file (default is label)</p></body></html>", 0, QApplication::UnicodeUTF8));
570 #endif // QT_NO_TOOLTIP
571  label_2->setText(QApplication::translate("MainWindow", "attribute name for class label", 0, QApplication::UnicodeUTF8));
572  toolButton_training->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
573 #ifndef QT_NO_TOOLTIP
574  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>OGR supported vector file. Features must contain labels and band information. You can use pkextract to prepare training vector files</p></body></html>", 0, QApplication::UnicodeUTF8));
575 #endif // QT_NO_TOOLTIP
576  label_4->setText(QApplication::translate("MainWindow", "Training vectorfile", 0, QApplication::UnicodeUTF8));
577 #ifndef QT_NO_TOOLTIP
578  label_20->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Provide number of classes in training file here to prepare class name-value pairs (push button prepare table). This is mandatory if labels in training vector are provided as text (instead of Integer values). The table also provide priors and balance classes in training sample.</p></body></html>", 0, QApplication::UnicodeUTF8));
579 #endif // QT_NO_TOOLTIP
580  label_20->setText(QApplication::translate("MainWindow", "number of classes to prepare table", 0, QApplication::UnicodeUTF8));
581 #ifndef QT_NO_TOOLTIP
582  label_21->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Name of the training layer (optional). If not provided, all layers will be read per default.</p></body></html>", 0, QApplication::UnicodeUTF8));
583 #endif // QT_NO_TOOLTIP
584  label_21->setText(QApplication::translate("MainWindow", "Training layername (optional)", 0, QApplication::UnicodeUTF8));
585  commandLinkButtonPrepareTable->setText(QApplication::translate("MainWindow", "prepare table", 0, QApplication::UnicodeUTF8));
586  label_17->setText(QApplication::translate("MainWindow", "class name-value pairs", 0, QApplication::UnicodeUTF8));
587  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Training", 0, QApplication::UnicodeUTF8));
588  label_14->setText(QApplication::translate("MainWindow", "msknodata", 0, QApplication::UnicodeUTF8));
589  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
590  label_16->setText(QApplication::translate("MainWindow", "nodata", 0, QApplication::UnicodeUTF8));
591 #ifndef QT_NO_TOOLTIP
592  label_13->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Dimensions of mask image must correspond to input image. Pixels in mask with values=masknodata are not classified and get nodata value.</p></body></html>", 0, QApplication::UnicodeUTF8));
593 #endif // QT_NO_TOOLTIP
594  label_13->setText(QApplication::translate("MainWindow", "Mask image", 0, QApplication::UnicodeUTF8));
595  toolButton_mask->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
596 #ifndef QT_NO_TOOLTIP
597  label_15->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output image (classified map). Can be OGR vector or GDAL raster, depending on input data.</p></body></html>", 0, QApplication::UnicodeUTF8));
598 #endif // QT_NO_TOOLTIP
599  label_15->setText(QApplication::translate("MainWindow", "Output data", 0, QApplication::UnicodeUTF8));
600  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
601 #ifndef QT_NO_TOOLTIP
602  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input image. Both OGR vectors and GDAL rasters are supported. Number of bands must match those in training sample.</p></body></html>", 0, QApplication::UnicodeUTF8));
603 #endif // QT_NO_TOOLTIP
604  label_3->setText(QApplication::translate("MainWindow", "Input data", 0, QApplication::UnicodeUTF8));
605 #ifndef QT_NO_TOOLTIP
606  label_22->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Color table must be provided as ASCII text file with five (space delimited) columns:</p><p>value red green blue alpha<br/></p></body></html>", 0, QApplication::UnicodeUTF8));
607 #endif // QT_NO_TOOLTIP
608  label_22->setText(QApplication::translate("MainWindow", "color table", 0, QApplication::UnicodeUTF8));
609  toolButton_ct->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
610  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Input/Output", 0, QApplication::UnicodeUTF8));
611 #ifndef QT_NO_TOOLTIP
612  label_5->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Leave empty to skip cross validation. Enter 2 for a two-fold cross validation</p></body></html>", 0, QApplication::UnicodeUTF8));
613 #endif // QT_NO_TOOLTIP
614  label_5->setText(QApplication::translate("MainWindow", "n-fold cross validation", 0, QApplication::UnicodeUTF8));
615 #ifndef QT_NO_TOOLTIP
616  label_10->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>the parameter C of C_SVC, epsilon_SVR, and nu_SVR (default is 1)</p></body></html>", 0, QApplication::UnicodeUTF8));
617 #endif // QT_NO_TOOLTIP
618  label_10->setText(QApplication::translate("MainWindow", "CCost", 0, QApplication::UnicodeUTF8));
619 #ifndef QT_NO_TOOLTIP
620  label_11->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Coef0 in the kernel function (default is 0)</p></body></html>", 0, QApplication::UnicodeUTF8));
621 #endif // QT_NO_TOOLTIP
622  label_11->setText(QApplication::translate("MainWindow", "Coef 0", 0, QApplication::UnicodeUTF8));
623 #ifndef QT_NO_TOOLTIP
624  label_6->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Type of the support vector machine</p></body></html>", 0, QApplication::UnicodeUTF8));
625 #endif // QT_NO_TOOLTIP
626  label_6->setText(QApplication::translate("MainWindow", "SVM type", 0, QApplication::UnicodeUTF8));
627 #ifndef QT_NO_TOOLTIP
628  label_7->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>type of kernel function (default is radial)</p></body></html>", 0, QApplication::UnicodeUTF8));
629 #endif // QT_NO_TOOLTIP
630  label_7->setText(QApplication::translate("MainWindow", "Kernel type", 0, QApplication::UnicodeUTF8));
631 #ifndef QT_NO_TOOLTIP
632  label_9->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>gamma in kernel function (default is 0)</p></body></html>", 0, QApplication::UnicodeUTF8));
633 #endif // QT_NO_TOOLTIP
634  label_9->setText(QApplication::translate("MainWindow", "Gamma", 0, QApplication::UnicodeUTF8));
635 #ifndef QT_NO_TOOLTIP
636  label_12->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>the parameter nu of nu_SVC, one_class SVM, and nu_SVR (default is 0.5)</p></body></html>", 0, QApplication::UnicodeUTF8));
637 #endif // QT_NO_TOOLTIP
638  label_12->setText(QApplication::translate("MainWindow", "nu", 0, QApplication::UnicodeUTF8));
639 #ifndef QT_NO_TOOLTIP
640  label_8->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>degree in kernel function (default is 3)</p></body></html>", 0, QApplication::UnicodeUTF8));
641 #endif // QT_NO_TOOLTIP
642  label_8->setText(QApplication::translate("MainWindow", "Kernel degree", 0, QApplication::UnicodeUTF8));
643  tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Classifier", 0, QApplication::UnicodeUTF8));
644  label_18->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
645  label_19->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
646  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
647 #ifndef QT_NO_TOOLTIP
648  pushButton_run->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Classify with current settings (check Console for output)</p></body></html>", 0, QApplication::UnicodeUTF8));
649 #endif // QT_NO_TOOLTIP
650  pushButton_run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
651 #ifndef QT_NO_TOOLTIP
652  pushButton_restore->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>reset all parameters to default</p></body></html>", 0, QApplication::UnicodeUTF8));
653 #endif // QT_NO_TOOLTIP
654  pushButton_restore->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
655  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
656  } // retranslateUi
657 
658 };
659 
660 namespace Ui {
661  class MainWindow: public Ui_MainWindow {};
662 } // namespace Ui
663 
664 QT_END_NAMESPACE
665 
666 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem__coll__graph.map0000644000113200011300000000014312616110567026651 00000000000000 pktools-2.6.6/doc/html/dir_5785acc8d2e42f8795bdbe936856f26d_dep.map0000644000113200011300000000047512616110567020453 00000000000000 pktools-2.6.6/doc/html/pkgetmask_8py_source.html0000644000113200011300000010071312647637661016714 00000000000000 pktools: /home/kempenep/pktools/qgis/pkgetmask.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkgetmask.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkgetmask.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkgetmask(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  BAND = "BAND"
42  MIN = "MIN"
43  MAX = "MAX"
44  OPERATOR_OPTIONS = ["OR", "AND"]
45  OPERATOR = "OPERATOR"
46  DATA = "DATA"
47  NODATA = "NODATA"
48  OUTPUT = "OUTPUT"
49  RTYPE = 'RTYPE'
50  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
51  EXTRA = 'EXTRA'
52 
53  def cliName(self):
54  return "pkgetmask"
55 
56  def defineCharacteristics(self):
57  self.name = "create mask from raster dataset"
58  self.group = "[pktools] raster"
59  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
60  self.addParameter(ParameterString(self.BAND, "Band(s) used for mask (e.g., 0;1)","0"))
61  self.addParameter(ParameterString(self.MIN, "Minimum valid value (one value per band)","none"))
62  self.addParameter(ParameterString(self.MAX, "Maximum valid value (one value per band)","none"))
63  self.addParameter(ParameterSelection(self.OPERATOR,"getmask rule",self.OPERATOR_OPTIONS, 0))
64  self.addParameter(ParameterString(self.DATA, "write value(s) for valid pixels (e.g., 0;255)","1"))
65  self.addParameter(ParameterString(self.NODATA, "write value(s) for invalid pixels","0"))
66  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
67  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
68  self.addParameter(ParameterString(self.EXTRA,
69  'Additional parameters', '-of GTiff', optional=True))
70 
71  def processAlgorithm(self, progress):
72  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
73  commands = [cliPath]
74 
75  input=self.getParameterValue(self.INPUT)
76  commands.append('-i')
77  commands.append('"' + input + '"')
78 
79  band=self.getParameterValue(self.BAND)
80  bandValues = band.split(';')
81  for bandValue in bandValues:
82  commands.append('-band')
83  commands.append(bandValue)
84  min=self.getParameterValue(self.MIN)
85  if min != "none":
86  minValues = min.split(';')
87  for minValue in minValues:
88  commands.append('-min')
89  commands.append(minValue)
90  max=self.getParameterValue(self.MAX)
91  if max != "none":
92  maxValues = max.split(';')
93  for maxValue in maxValues:
94  commands.append('-max')
95  commands.append(maxValue)
96  commands.append("-p")
97  commands.append(self.OPERATOR_OPTIONS[self.getParameterValue(self.OPERATOR)])
98  data=self.getParameterValue(self.DATA)
99  if data != "none":
100  dataValues = data.split(';')
101  for dataValue in dataValues:
102  commands.append('-data')
103  commands.append(dataValue)
104  nodata=self.getParameterValue(self.NODATA)
105  if nodata != "none":
106  nodataValues = nodata.split(';')
107  for nodataValue in nodataValues:
108  commands.append('-nodata')
109  commands.append(nodataValue)
110  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
111  commands.append('-ot')
112  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
113  output=self.getOutputValue(self.OUTPUT)
114  if output != "":
115  commands.append("-o")
116  commands.append('"' + output + '"')
117 
118  data=self.getParameterValue(self.DATA)
119 
120  extra = str(self.getParameterValue(self.EXTRA))
121  if len(extra) > 0:
122  commands.append(extra)
123 
124  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/pktools_2pkfilter__spectral_8py_source.html0000644000113200011300000010126412647637661022441 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkfilter_spectral.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilter_spectral.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkfilter_spectral.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkfilter_spectral(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "smooth", "density", "smoothnodata values", "threshold local filtering", "stdev", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "savgolay", "percentile"]
43  METHOD = "METHOD"
44  DZ = "DZ"
45  NODATA = "NODATA"
46  PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
47  PADDING = "PADDING"
48  RTYPE = 'RTYPE'
49  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
50  EXTRA = 'EXTRA'
51 
52  def cliName(self):
53  return "pkfilter"
54 
55  def defineCharacteristics(self):
56  self.name = "spectral/temporal filter"
57  self.group = "[pktools] filter"
58  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
59  self.addParameter(ParameterSelection(self.METHOD,"filter rule",self.METHOD_OPTIONS, 0))
60  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
61  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
62  self.addParameter(ParameterNumber(self.DZ, "Filter kernel size",0.0,None,1.0))
63  #for smooth nodata:
64  self.addParameter(ParameterString(self.NODATA, "nodata value to smooth(e.g., 0;255)","none"))
65  self.addParameter(ParameterSelection(self.PADDING,"Padding (edge effects)",self.PADDING_OPTIONS, 0))
66  self.addParameter(ParameterString(self.EXTRA,
67  'Additional parameters', '-of GTiff', optional=True))
68 
69  def processAlgorithm(self, progress):
70  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
71  commands = [cliPath]
72 
73  input=self.getParameterValue(self.INPUT)
74  if input != "":
75  commands.append('-i')
76  commands.append('"' + input + '"')
77 
78  method=self.METHOD_OPTIONS[self.getParameterValue(self.METHOD)]
79  if method != "none":
80  commands.append("-f")
81  commands.append(method)
82  commands.append("-pad")
83  commands.append(self.PADDING_OPTIONS[self.getParameterValue(self.PADDING)])
84 
85  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
86  commands.append('-ot')
87  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
88  output=self.getOutputValue(self.OUTPUT)
89  if output != "":
90  commands.append("-o")
91  commands.append('"' + output + '"')
92 
93  if self.getParameterValue(self.DZ) != 0:
94  commands.append("-dz")
95  commands.append(str(self.getParameterValue(self.DZ)))
96  nodata=self.getParameterValue(self.NODATA)
97  if nodata != "none":
98  nodataValues = nodata.split(';')
99  for nodataValue in nodataValues:
100  commands.append('-nodata')
101  commands.append(nodataValue)
102  extra = str(self.getParameterValue(self.EXTRA))
103  if len(extra) > 0:
104  commands.append(extra)
105 
106  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite.html0000644000113200011300000003365512647637662024462 00000000000000 pktools: qgis.pktools.pkcomposite.pkcomposite Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkcomposite.pkcomposite Class Reference
Inheritance diagram for qgis.pktools.pkcomposite.pkcomposite:
Collaboration diagram for qgis.pktools.pkcomposite.pkcomposite:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list CRULE_OPTIONS = ["overwrite", "maxndvi", "maxband", "minband", "validband", "mean", "mode", "median", "sum", "minallbands", "maxallbands","stdev"]
 
string CRULE = "CRULE"
 
string DX = "DX"
 
string DY = "DY"
 
string PROJWIN = 'PROJWIN'
 
string CB = "CB"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string DSTNODATA = "DSTNODATA"
 
string MINGUI = "MINGUI"
 
string MAXGUI = "MAXGUI"
 
list RESAMPLE_OPTIONS = ['near', 'bilinear']
 
string RESAMPLE = "RESAMPLE"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkcomposite.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask.html0000644000113200011300000002640312647637662021461 00000000000000 pktools: qgis.pkgetmask.pkgetmask Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pkgetmask.pkgetmask:
Collaboration diagram for qgis.pkgetmask.pkgetmask:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string BAND = "BAND"
 
string MIN = "MIN"
 
string MAX = "MAX"
 
list OPERATOR_OPTIONS = ["OR", "AND"]
 
string OPERATOR = "OPERATOR"
 
string DATA = "DATA"
 
string NODATA = "NODATA"
 
string OUTPUT = "OUTPUT"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkgetmask.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/dir_ed1df9621940d6aa1183c365ad1750d2_dep.md50000644000113200011300000000004012616110567020214 000000000000007f040b78278908d2e6cbd34fe75f5551pktools-2.6.6/doc/html/dir_35acdce8930fac877097c845a64519e5_dep.md50000644000113200011300000000004012616110567020253 0000000000000012f089a77d3c4c4dc49c29d3db07f16apktools-2.6.6/doc/html/pkdumpimg_8cc_source.html0000644000113200011300000016215212647637661016665 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkdumpimg.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdumpimg.cc
1 /**********************************************************************
2 pkdumpimg.cc: program to dump image content to ascii or std out
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <string>
21 #include <fstream>
22 #include <vector>
23 #include <iostream>
24 #include <assert.h>
25 #include "base/Optionpk.h"
26 #include "imageclasses/ImgReaderOgr.h"
27 #include "imageclasses/ImgWriterGdal.h"
28 // #include "imageclasses/ImgWriterOgr.h"
29 
30 #ifdef HAVE_CONFIG_H
31 #include <config.h>
32 #endif
33 
34 /******************************************************************************/
84 using namespace std;
85 
86 int main(int argc, char *argv[])
87 {
88  Optionpk<std::string> input_opt("i","input","input image file","");
89  Optionpk<string> output_opt("o", "output", "Output ascii file (Default is empty: use stdout", "");
90  Optionpk<string> oformat_opt("of", "oformat", "Output format (matrix form or list (x,y,z) form. Default is matrix form", "matrix");
91  Optionpk<int> band_opt("b", "band", "band index to crop");
92  Optionpk<string> extent_opt("e", "extent", "get boundary from extent from polygons in vector file", "");
93  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box (in geocoordinates if georef is true)",0.0);
94  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box (in geocoordinates if georef is true)",0.0);
95  Optionpk<double> lrx_opt("lrx", "lrx", "Lower left x value bounding box (in geocoordinates if georef is true)",0.0);
96  Optionpk<double> lry_opt("lry", "lry", "Lower left y value bounding box (in geocoordinates if georef is true)",0.0);
97  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter) (0.0: keep original resolution)",0.0);
98  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter) (0.0: keep original resolution)",0.0);
99  Optionpk<string> resample_opt("r", "resampling-method", "Resampling method (near: nearest neighbour, bilinear: bi-linear interpolation).", "near");
100  Optionpk<short> dstnodata_opt("dstnodata", "dstnodata", "nodata value for output if out of bounds.", 0);
101  Optionpk<double> srcnodata_opt("srcnodata", "srcnodata", "set no data value(s) for input image");
102  Optionpk<short> verbose_opt("v", "verbose", "verbose (Default: 0)", 0,2);
103 
104  dx_opt.setHide(1);
105  dy_opt.setHide(1);
106  resample_opt.setHide(1);
107  srcnodata_opt.setHide(1);
108  dstnodata_opt.setHide(1);
109 
110  bool doProcess;//stop process when program was invoked with help option (-h --help)
111  try{
112  doProcess=input_opt.retrieveOption(argc,argv);
113  output_opt.retrieveOption(argc,argv);
114  oformat_opt.retrieveOption(argc,argv);
115  band_opt.retrieveOption(argc,argv);
116  extent_opt.retrieveOption(argc,argv);
117  ulx_opt.retrieveOption(argc,argv);
118  uly_opt.retrieveOption(argc,argv);
119  lrx_opt.retrieveOption(argc,argv);
120  lry_opt.retrieveOption(argc,argv);
121  dx_opt.retrieveOption(argc,argv);
122  dy_opt.retrieveOption(argc,argv);
123  resample_opt.retrieveOption(argc,argv);
124  srcnodata_opt.retrieveOption(argc,argv);
125  dstnodata_opt.retrieveOption(argc,argv);
126  verbose_opt.retrieveOption(argc,argv);
127  }
128  catch(string predefinedString){
129  std::cout << predefinedString << std::endl;
130  exit(0);
131  }
132  if(!doProcess){
133  cout << endl;
134  cout << "Usage: pkdumpimg -i input.txt [-o output]" << endl;
135  cout << endl;
136  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
137  exit(0);//help was invoked, stop processing
138  }
139 
140  ofstream outputStream;
141  if(!output_opt.empty())
142  outputStream.open(output_opt[0].c_str());
143 
144  RESAMPLE theResample;
145  if(resample_opt[0]=="near"){
146  theResample=NEAR;
147  if(verbose_opt[0])
148  cout << "resampling: nearest neighbour" << endl;
149  }
150  else if(resample_opt[0]=="bilinear"){
151  theResample=BILINEAR;
152  if(verbose_opt[0])
153  cout << "resampling: bilinear interpolation" << endl;
154  }
155  else{
156  std::cout << "Error: resampling method " << resample_opt[0] << " not supported" << std::endl;
157  exit(1);
158  }
159 
160  // ImgWriterGdal imgWriter;
161  GDALDataType theType;
162 
163  if(input_opt.empty()){
164  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
165  exit(0);
166  }
167 
168  ImgReaderGdal imgReader(input_opt[0]);
169  for(int inodata=0;inodata<srcnodata_opt.size();++inodata)
170  imgReader.pushNoDataValue(srcnodata_opt[inodata]);
171 
172  // ImgWriterGdal virtualWriter;//only for coordinate conversion (no output file defined)
173 
174  int nband=imgReader.nrOfBand();
175  //get number of lines
176  int nrow=imgReader.nrOfRow();
177  int ncol=imgReader.nrOfCol();
178  int ncropcol=0;
179  int ncroprow=0;
180  double dx=dx_opt[0];
181  double dy=dy_opt[0];
182  if(!dx||!dy){
183  dx=imgReader.getDeltaX();
184  dy=imgReader.getDeltaY();
185  }
186  //bounding box of cropped image
187  double cropulx=ulx_opt[0];
188  double cropuly=uly_opt[0];
189  double croplrx=lrx_opt[0];
190  double croplry=lry_opt[0];
191  //get bounding box from extentReader if defined
192  ImgReaderOgr extentReader;
193  if(extent_opt[0]!=""){
194  for(int iextent=0;iextent<extent_opt.size();++iextent){
195  extentReader.open(extent_opt[iextent]);
196  if(!(extentReader.getExtent(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))){
197  cerr << "Error: could not get extent from " << extent_opt[0] << endl;
198  exit(1);
199  }
200  if(!iextent){
201  cropulx=ulx_opt[0];
202  cropuly=uly_opt[0];
203  croplry=lry_opt[0];
204  croplrx=lrx_opt[0];
205  }
206  else{
207  if(ulx_opt[0]<cropulx)
208  cropulx=ulx_opt[0];
209  if(uly_opt[0]>cropuly)
210  cropuly=uly_opt[0];
211  if(lry_opt[0]<croplry)
212  croplry=lry_opt[0];
213  if(lrx_opt[0]>croplrx)
214  croplrx=lrx_opt[0];
215  }
216  extentReader.close();
217  }
218  }
219  double uli,ulj,lri,lrj;//image coordinates
220  double magicX=1,magicY=1;
221  if(ulx_opt[0]>=lrx_opt[0]){//default bounding box: no cropping
222  uli=0;
223  lri=imgReader.nrOfCol()-1;
224  ulj=0;
225  lrj=imgReader.nrOfRow()-1;
226  ncropcol=imgReader.nrOfCol();
227  ncroprow=imgReader.nrOfRow();
228  imgReader.getBoundingBox(cropulx,cropuly,croplrx,croplry);
229  imgReader.geo2image(cropulx+(magicX-1.0)*imgReader.getDeltaX(),cropuly-(magicY-1.0)*imgReader.getDeltaY(),uli,ulj);
230  imgReader.geo2image(croplrx+(magicX-2.0)*imgReader.getDeltaX(),croplry-(magicY-2.0)*imgReader.getDeltaY(),lri,lrj);
231  ncropcol=abs(static_cast<int>(ceil((croplrx-cropulx)/dx)));
232  ncroprow=abs(static_cast<int>(ceil((cropuly-croplry)/dy)));
233  }
234  else{
235  imgReader.geo2image(cropulx+(magicX-1.0)*imgReader.getDeltaX(),cropuly-(magicY-1.0)*imgReader.getDeltaY(),uli,ulj);
236  imgReader.geo2image(croplrx+(magicX-2.0)*imgReader.getDeltaX(),croplry-(magicY-2.0)*imgReader.getDeltaY(),lri,lrj);
237 
238  ncropcol=abs(static_cast<int>(ceil((croplrx-cropulx)/dx)));
239  ncroprow=abs(static_cast<int>(ceil((cropuly-croplry)/dy)));
240  uli=floor(uli);
241  ulj=floor(ulj);
242  lri=floor(lri);
243  lrj=floor(lrj);
244  }
245  double startCol=uli;
246  double endCol=lri;
247  double dcropcol=0;
248  double dcroprow=0;
249  double deltaX=imgReader.getDeltaX();
250  double deltaY=imgReader.getDeltaY();
251  dcropcol=(lri-uli+1)/(dx/deltaX);
252  dcroprow=(lrj-ulj+1)/(dy/deltaY);
253  if(verbose_opt[0]){
254  cout << "cropulx: " << cropulx << endl;
255  cout << "cropuly: " << cropuly << endl;
256  cout << "croplrx: " << croplrx << endl;
257  cout << "croplry: " << croplry << endl;
258  cout << "ncropcol: " << ncropcol << endl;
259  cout << "ncroprow: " << ncroprow << endl;
260  cout << "cropulx+ncropcol*dx: " << cropulx+ncropcol*dx << endl;
261  cout << "cropuly-ncroprow*dy: " << cropuly-ncroprow*dy << endl;
262  cout << "selected upper left column in input image: " << uli << endl;
263  cout << "selected upper left row of input image: " << ulj << endl;
264  cout << "selected lower right column in input image: " << lri << endl;
265  cout << "selected lower right row in input image: " << lrj << endl;
266  }
267  double gt[6];
268  imgReader.getGeoTransform(gt);
269  // imgWriter.setGeoTransform(gt);
270  // imgWriter.setProjection(imgReader.getProjection());
271 
272  double readRow=0;
273  double readCol=0;
274  double lowerCol=0;
275  double upperCol=0;
276  int readncol=endCol-startCol+1;
277  //test
278  // vector<double> readBuffer(readncol);
279  vector<double> readBuffer(readncol+1);
280  // assert(imgWriter.isGeoRef());
281  if(band_opt.empty()){
282  for(int iband=0;iband<imgReader.nrOfBand();++iband)
283  band_opt.push_back(iband);
284  }
285  for(int iband=0;iband<band_opt.size();++iband){
286  assert(band_opt[iband]>=0);
287  assert(band_opt[iband]<imgReader.nrOfBand());
288  for(int irow=0;irow<ncroprow;++irow){
289  if(verbose_opt[0])
290  std::cout << irow << std::endl;
291  double x=0;
292  double y=0;
293  //convert irow to geo
294  // imgWriter.image2geo(0,irow,x,y);
295  imgReader.image2geo(0,irow,x,y);
296  //lookup corresponding row for irow in this file
297  imgReader.geo2image(x,y,readCol,readRow);
298  if(readRow<0||readRow>=imgReader.nrOfRow()){
299  if(verbose_opt[0]>1)
300  std::cout << "skipping row " << readRow << std::endl;
301  continue;
302  }
303  try{
304  //test
305  // imgReader.readData(readBuffer,GDT_Float64,startCol,endCol,readRow,band_opt[0],theResample);
306  if(endCol<imgReader.nrOfCol()-1)
307  imgReader.readData(readBuffer,GDT_Float64,startCol,endCol+1,readRow,band_opt[iband],theResample);
308  else
309  imgReader.readData(readBuffer,GDT_Float64,startCol,endCol,readRow,band_opt[iband],theResample);
310  for(int ib=0;ib<ncropcol;++ib){
311  // assert(imgWriter.image2geo(ib,irow,x,y));
312  assert(imgReader.image2geo(ib,irow,x,y));
313  //lookup corresponding row for irow in this file
314  imgReader.geo2image(x,y,readCol,readRow);
315  if(readCol<0||readCol>=imgReader.nrOfCol()){
316  if(oformat_opt[0]=="matrix"){
317  if(output_opt[0].empty())
318  std::cout << dstnodata_opt[0] << " ";
319  else
320  outputStream << dstnodata_opt[0] << " ";
321  }
322  else{
323  if(output_opt[0].empty())
324  std::cout << x << " " << y << " " << dstnodata_opt[0] << endl;
325  else
326  outputStream << x << " " << y << " " << dstnodata_opt[0] << endl;
327  }
328  }
329  else{
330  switch(theResample){
331  case(BILINEAR):
332  lowerCol=readCol-0.5;
333  lowerCol=static_cast<int>(lowerCol);
334  upperCol=readCol+0.5;
335  upperCol=static_cast<int>(upperCol);
336  if(lowerCol<0)
337  lowerCol=0;
338  if(upperCol>=imgReader.nrOfCol())
339  upperCol=imgReader.nrOfCol()-1;
340  if(oformat_opt[0]=="matrix"){
341  if(output_opt[0].empty())
342  std::cout << (readCol-0.5-lowerCol)*readBuffer[upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[lowerCol-startCol] << " ";
343  else
344  outputStream << (readCol-0.5-lowerCol)*readBuffer[upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[lowerCol-startCol] << " ";
345  }
346  else if(!imgReader.isNoData(readBuffer[upperCol-startCol])&&!imgReader.isNoData(readBuffer[lowerCol-startCol])){
347  if(output_opt[0].empty())
348  std::cout << x << " " << y << " " << (readCol-0.5-lowerCol)*readBuffer[upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[lowerCol-startCol] << " " << endl;
349  else
350  outputStream << x << " " << y << " " << (readCol-0.5-lowerCol)*readBuffer[upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[lowerCol-startCol] << " " << endl;
351  }
352  break;
353  default:
354  readCol=static_cast<int>(readCol);
355  readCol-=startCol;//we only start reading from startCol
356  assert(readCol>=0);
357  if(readCol>=readBuffer.size())
358  std::cout << "Error: " << readCol << " >= " << readBuffer.size() << std::endl;
359  assert(readCol<readBuffer.size());
360  if(oformat_opt[0]=="matrix"){
361  if(output_opt[0].empty())
362  std::cout << readBuffer[readCol] << " ";
363  else
364  outputStream << readBuffer[readCol] << " ";
365  }
366  else if(!imgReader.isNoData(readBuffer[readCol])){
367  if(output_opt[0].empty())
368  std::cout << x << " " << y << " " << readBuffer[readCol] << std::endl;
369  else
370  outputStream << x << " " << y << " " << readBuffer[readCol] << std::endl;
371  }
372  break;
373  }
374  }
375  }
376  }
377  catch(string errorstring){
378  cout << errorstring << endl;
379  exit(1);
380  }
381  if(oformat_opt[0]=="matrix"){
382  if(output_opt[0].empty())
383  std::cout << std::endl;
384  else
385  outputStream << std::endl;
386  }
387  }
388  }
389  if(extent_opt[0]!=""){
390  extentReader.close();
391  }
392  imgReader.close();
393  if(!output_opt[0].empty())
394  outputStream.close();
395 }
pktools-2.6.6/doc/html/ftv2vertline.png0000644000113200011300000000012612647637661015015 00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚pktools-2.6.6/doc/html/classUi_1_1MainWindow__inherit__graph.map0000644000113200011300000000025212616110567021600 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask__inherit__graph.png0000644000113200011300000000676112616110567024521 00000000000000‰PNG  IHDRÀpÇtè%bKGDÿÿÿ ½§“ ¦IDATxœíÝTSuðï`“ÃD”†"RO¿ÎÉ£ #ˆÜç¹Ï¸.l?¯¿îýr¿ßïç o £á8Žø»\]XØ @€ (¡Ûs2¹\>11aÏïC¡¡¡v›Î®R*•ÞÞÞîîîöœô¾299©T*m€Bl6ÛÏÏÏΓÞ?~ÿý÷¾¾>{Î÷@€ (J@€nÞ¼I£Ñì9ÔG}D£Ñ:4W5XëN£ÑnÞ¼ù·‡u @) ‹5#ã8.‘H¥Ré\¹téÒ ù,ÛQj€0 ûã?æcäÞÞÞëׯWTTtww÷÷÷Ïɘ,‹8ŸÍ_ÙŽâ\"NõuuukÖ¬ñóóÛ·oßää$ùQdz³³###GFFžxâ „¿¿?ñ¡ÑÑÑ]»v±X,6›­Óé¬5’êëë~øaƒ"‹Év‰D²qãÆÍ›7‡……M? á8^RRîííýôÓOŸ9s†¸6MŸ‹XKsss``àñãljÃÌÊF555q¹\Ÿ‚‚¢…F£UVV®]»vÙ²e‡‹ÅÁÁÁL&óàÁƒsö‰žC¸Éd²áááËå¡èèèþþþööv.—+ ‰F ÃÈôG’“’’¢¢¢zzz"""„B¡ÅF²×øø¸»»{IIÉÐÐPEENÇqðàà`‘H„ãøûï¿¿nÝ:ÓÂp/++ 8{ö¬J¥:þ<—Ë%Ú­Í{ñâÅîînâ0³²BÏ?ÿ¼F£©­­EKC%&&j4šòòr„жmÛ4H$"˜Áðð°L&³ù C3¨§§‡Ø•J¥\.—hÌÉÉAݸqÃôHb{jjÊÕÕõ‡~ vO:Åår-6’½Ôjõ’%K>|çÎ ÃÆÆÆŒF#Žãííít:ø:]¹r!ÔÛÛk:]DDÄ—_~I\UU…ša.b-d÷éjiiÁqÜh4"„är9ÑØÕÕE¬Ël›8`ös]Âä¯r‰íï¿ÿ~Ó¦MùùùÓ6‡Øår¹ƒƒƒÉ.>>>2™¬½½ÍfoܸñÛo¿uqqAI$ƒÁÀb±h4ÚúõëBfW±ˆˆr7<<ÜZäf^ìÊ•+BÄì$///„Ð’%K̶3ˆø6Eõ÷÷Ÿ_„P}}}II‰D"‘ÉdfÇ/_¾ÜÕÕU¡P»É.Z­ðêêjµZššºe˵Zm4¥RiaaáØÿdeeI¥RÜä©ß   ü‘ܽ~ýºµˆíY¿ðsõ …ÃØótw—0'—Ë;::BCCsssMOûyyy«W¯ÖjµDãØØÑ.¢¢¢ Eooïºuërss-6’CiµZƒQSS£R©JKK †V«•Éd®®®¦vvv"„ºººÈŽGŽa³ÙçÎinn^³f F›y.|Ú%Œ,™\•É%lz£Ù¶5p$G•——±X¬×_Ì q€V«]½zu^^ž^¯ê©§<==‰vµZ’’âëë»bÅŠýû÷kµZ‹¦CI¥R‡ãææVWW‡ãxFFFtt´i=†q8œFcQQ‡Ãa2™111uuuË–-›u.rÛ¬lmî1@v«ço¨¯¯ïîî&wkjj"##X¸‰vv===ÉÉÉ]]]íííLKKstQŽdïÊfæíí‘‘áè*f’““311ÁçóU*UHHÈ«¯¾êäÏ7nÇ?,lii ‡'çñDâ¦M›ì6#\Â% @ P”Øû§°ÑÑQƒÁ`çIïãããvžÑ®rww¿}û¶=g¤èÂ…_B›7¯rp¶`0öœÎ®?Æ/,F#öä!„zzþéâ²Àå9oàȪ¶¶›jõ]µz¼µua?÷>¯ @VUWwÒé.K–¸TWïèZœÈ2NßÐpÍ`0êõXCÃ5Nï芜Ȳ‹¯“¡Ñéô/^wl=N dYmm'ù¬ F«­ítl=N dF£»p¡ÏhĈ]£»p¡O£ÑÍÜëþ²àìÙ^ ûË«†Ÿ;×ë¨zœÈ‚ššN³WÇp¯©«˜ s*ÕXk«Ã0ÓF Ã[[å*Õ˜£ªrZ sgÎt[|Ý™F£9sÍþõ89¹ÿ»Ó숀a¼¢8è/”Ê;==·¬]»vëöíQûWåÌœë¡z‡_¹r)yD¼–È`ü÷¯K]\\FFÆV®\ê°úœü6~&ÿB‰D;]ˆó‚K (J @€ (J @€ (J @€ (J @€ (J @€ (J @€ (J @€ (J @€ 7äèrœ ΢ÓYŽ®Â¹¬ZµÊ43ùw4mëÖ­ááá¬8³¾¾¾êêjÓ̘ÿ“Íððp{¾m=XèàP”@€% @É|H©Tòx·œ|-ó &“™žž>OƒÏ Ã0Fã¨Ùç–“¯Å¶á8þÕW_íܹó¹çžÛ»wïÕ«Wy<Žã_ýõ®]»âââ²²²ÚÚÚx<žé²µµ5555::Z 455™Iyùòå”””øøø#GŽèõzÓ‹‹‹ÓÒÒþüóOkC †’’’øøøøøø’’ƒÁðÚk¯!„^|ñEâ×ØØ¸sçN>Ÿ_UUÕÔÔ”˜˜WYYIÐÖÖ¶{÷˜„„„ªªªYË6«jQ®åÙ †††'N¤¥¥‰Åâ;v „¾ùæ±X¼wïÞªªª¤¤¤£GšvÑétB¡ÏçK$’”””O?ýT§³ðîµ§OŸ.((ÈÏÏÿî»ïÈeã8.‰ººº ™L¦µ¡jjj†††D"ÑgŸ}ÖÕÕuìØ±/¾ø!têÔ)rü+W®§§§—••µµµUTTdffŠÅbF311‘››zòäÉÌÌ̲²²ÑÑÑÊ6«jq¯eV¶¨¶¶vÏž=6lðõõ}üñÇÓÒÒÈÆG}”Éd®_¿þ•W^1í¢×ëq×jµnnn111õõõîîîÓGÎÌÌd³Ùk×®MKK;þ<ÑXZZ*•Jóòò¼½½gª±±ñ7Þðóó ÉÈÈèèè˜>þöíÛ=<<¢££BÀÃÃ#&&!466æææVQQ±oß>___???„ÐÝ»wg(Û¬ªÅ½–YÙ ¡¡!.—K„ „nß¾L6®ZµÊ´‹——WQQQ__ßÖ­[ß|óÍžžòýØM±Ùlb#00P¥RÛ7n܈ŒŒùä“z½¾±±ÑZÙ«š>àbZˬl;ÅÆÆ_¾|Y­Vwtt”––"„ø|¾H$êììÔh4W¯^=~ü¸é9†F£½ýöÛ—.]"Î¥t:8644ܽ{—<ìóÏ?W*•?ýôSyyù3ÏqâDFFBˆÏçoÛ¶­¨¨H H$’={ö˜Þ޹¹¹½ûî»"‘襗^ª®®ÎËËsssC>|xtôÿï?ºyóæ·ÞzëwÞyì±Ç’’’L'¡ªª*kC¥¦¦zxxìÞ½{ÿþý'##Ãßßÿ¡‡JHH¸—Eyzzfff~üñÇ;vìð÷÷ŠŠÊÉɱ6×ôªÙZleþ
pktools-2.6.6/doc/html/myfann__cpp_8h_source.html0000644000113200011300000216455112647637661017032 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/myfann_cpp.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
myfann_cpp.h
1 #ifndef FANN_CPP_H_INCLUDED
2 #define FANN_CPP_H_INCLUDED
3 
4 /*
5  *
6  * Fast Artificial Neural Network (fann) C++ Wrapper
7  * Copyright (C) 2004-2006 created by freegoldbar (at) yahoo dot com
8  *
9  * This wrapper is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This wrapper is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  *
23  */
24 
25 /*
26  * Title: FANN Wrapper for C++
27  *
28  * Overview:
29  *
30  * The Fann Wrapper for C++ provides two classes: <neural_net>
31  * and <training_data>. To use the wrapper include
32  * doublefann.h, floatfann.h or fixedfann.h before the
33  * fann_cpp.h header file. To get started see xor_sample.cpp
34  * in the examples directory. The license is LGPL. Copyright (C)
35  * 2004-2006 created by <freegoldbar@yahoo.com>.
36  *
37  * Note: Notes and differences from C API
38  *
39  * - The Fann Wrapper for C++ is a minimal wrapper without use of
40  * templates or exception handling for efficient use in any environment.
41  * Benefits include stricter type checking, simpler memory
42  * management and possibly code completion in program editor.
43  * - Method names are the same as the function names in the C
44  * API except the fann_ prefix has been removed. Enums in the
45  * namespace are similarly defined without the FANN_ prefix.
46  * - The arguments to the methods are the same as the C API
47  * except that the struct fann *ann/struct fann_train_data *data
48  * arguments are encapsulated so they are not present in the
49  * method signatures or are translated into class references.
50  * - The various create methods return a boolean set to true to
51  * indicate that the neural network was created, false otherwise.
52  * The same goes for the read_train_from_file method.
53  * - The neural network and training data is automatically cleaned
54  * up in the destructors and create/read methods.
55  * - To make the destructors virtual define USE_VIRTUAL_DESTRUCTOR
56  * before including the header file.
57  * - Additional methods are available on the training_data class to
58  * give access to the underlying training data. They are get_input,
59  * get_output and set_train_data. Finally fann_duplicate_train_data
60  * has been replaced by a copy constructor.
61  *
62  * Note: Changes
63  *
64  * Version 2.1.0:
65  * - General update to fann C library 2.1.0 with support for new functionality
66  * - Due to changes in the C API the C++ API is not fully backward compatible:
67  * The create methods have changed names and parameters.
68  * The training callback function has different parameters and a set_callback.
69  * Some <training_data> methods have updated names.
70  * Get activation function and steepness is available for neurons, not layers.
71  * - Extensions are now part of fann so there is no fann_extensions.h
72  *
73  * Version 1.2.0:
74  * - Changed char pointers to const std::string references
75  * - Added const_casts where the C API required it
76  * - Initialized enums from the C enums instead of numeric constants
77  * - Added a method set_train_data that copies and allocates training
78  * - data in a way that is compatible with the way the C API deallocates
79  * - the data thus making it possible to change training data.
80  * - The get_rprop_increase_factor method did not return its value
81  *
82  * Version 1.0.0:
83  * - Initial version
84  *
85  */
86 
87 #include <iostream>
88 #include <stdarg.h>
89 #include <string>
90 #include <vector>
91 #include <cassert>
92 #include "base/Vector2d.h"
93 
94 /* Namespace: FANN
95  The FANN namespace groups the C++ wrapper definitions */
96 namespace FANN
97 {
98  /* Enum: error_function_enum
99  Error function used during training.
100 
101  ERRORFUNC_LINEAR - Standard linear error function.
102  ERRORFUNC_TANH - Tanh error function, usually better
103  but can require a lower learning rate. This error function agressively targets outputs that
104  differ much from the desired, while not targetting outputs that only differ a little that much.
105  This activation function is not recommended for cascade training and incremental training.
106 
107  See also:
108  <neural_net::set_train_error_function>, <neural_net::get_train_error_function>
109  */
110  enum error_function_enum {
111  ERRORFUNC_LINEAR = FANN_ERRORFUNC_LINEAR,
112  ERRORFUNC_TANH
113  };
114 
115  /* Enum: stop_function_enum
116  Stop criteria used during training.
117 
118  STOPFUNC_MSE - Stop criteria is Mean Square Error (MSE) value.
119  STOPFUNC_BIT - Stop criteria is number of bits that fail. The number of bits; means the
120  number of output neurons which differ more than the bit fail limit
121  (see <neural_net::get_bit_fail_limit>, <neural_net::set_bit_fail_limit>).
122  The bits are counted in all of the training data, so this number can be higher than
123  the number of training data.
124 
125  See also:
126  <neural_net::set_train_stop_function>, <neural_net::get_train_stop_function>
127  */
128  enum stop_function_enum
129  {
130  STOPFUNC_MSE = FANN_STOPFUNC_MSE,
131  STOPFUNC_BIT
132  };
133 
134  /* Enum: training_algorithm_enum
135  The Training algorithms used when training on <training_data> with functions like
136  <neural_net::train_on_data> or <neural_net::train_on_file>. The incremental training
137  looks alters the weights after each time it is presented an input pattern, while batch
138  only alters the weights once after it has been presented to all the patterns.
139 
140  TRAIN_INCREMENTAL - Standard backpropagation algorithm, where the weights are
141  updated after each training pattern. This means that the weights are updated many
142  times during a single epoch. For this reason some problems, will train very fast with
143  this algorithm, while other more advanced problems will not train very well.
144  TRAIN_BATCH - Standard backpropagation algorithm, where the weights are updated after
145  calculating the mean square error for the whole training set. This means that the weights
146  are only updated once during a epoch. For this reason some problems, will train slower with
147  this algorithm. But since the mean square error is calculated more correctly than in
148  incremental training, some problems will reach a better solutions with this algorithm.
149  TRAIN_RPROP - A more advanced batch training algorithm which achieves good results
150  for many problems. The RPROP training algorithm is adaptive, and does therefore not
151  use the learning_rate. Some other parameters can however be set to change the way the
152  RPROP algorithm works, but it is only recommended for users with insight in how the RPROP
153  training algorithm works. The RPROP training algorithm is described by
154  [Riedmiller and Braun, 1993], but the actual learning algorithm used here is the
155  iRPROP- training algorithm which is described by [Igel and Husken, 2000] which
156  is an variety of the standard RPROP training algorithm.
157  TRAIN_QUICKPROP - A more advanced batch training algorithm which achieves good results
158  for many problems. The quickprop training algorithm uses the learning_rate parameter
159  along with other more advanced parameters, but it is only recommended to change these
160  advanced parameters, for users with insight in how the quickprop training algorithm works.
161  The quickprop training algorithm is described by [Fahlman, 1988].
162 
163  See also:
164  <neural_net::set_training_algorithm>, <neural_net::get_training_algorithm>
165  */
166  enum training_algorithm_enum {
167  TRAIN_INCREMENTAL = FANN_TRAIN_INCREMENTAL,
168  TRAIN_BATCH,
169  TRAIN_RPROP,
170  TRAIN_QUICKPROP
171  };
172 
173  /* Enum: activation_function_enum
174 
175  The activation functions used for the neurons during training. The activation functions
176  can either be defined for a group of neurons by <neural_net::set_activation_function_hidden>
177  and <neural_net::set_activation_function_output> or it can be defined for a single neuron by
178  <neural_net::set_activation_function>.
179 
180  The steepness of an activation function is defined in the same way by
181  <neural_net::set_activation_steepness_hidden>, <neural_net::set_activation_steepness_output>
182  and <neural_net::set_activation_steepness>.
183 
184  The functions are described with functions where:
185  * x is the input to the activation function,
186  * y is the output,
187  * s is the steepness and
188  * d is the derivation.
189 
190  FANN_LINEAR - Linear activation function.
191  * span: -inf < y < inf
192  * y = x*s, d = 1*s
193  * Can NOT be used in fixed point.
194 
195  FANN_THRESHOLD - Threshold activation function.
196  * x < 0 -> y = 0, x >= 0 -> y = 1
197  * Can NOT be used during training.
198 
199  FANN_THRESHOLD_SYMMETRIC - Threshold activation function.
200  * x < 0 -> y = 0, x >= 0 -> y = 1
201  * Can NOT be used during training.
202 
203  FANN_SIGMOID - Sigmoid activation function.
204  * One of the most used activation functions.
205  * span: 0 < y < 1
206  * y = 1/(1 + exp(-2*s*x))
207  * d = 2*s*y*(1 - y)
208 
209  FANN_SIGMOID_STEPWISE - Stepwise linear approximation to sigmoid.
210  * Faster than sigmoid but a bit less precise.
211 
212  FANN_SIGMOID_SYMMETRIC - Symmetric sigmoid activation function, aka. tanh.
213  * One of the most used activation functions.
214  * span: -1 < y < 1
215  * y = tanh(s*x) = 2/(1 + exp(-2*s*x)) - 1
216  * d = s*(1-(y*y))
217 
218  FANN_SIGMOID_SYMMETRIC - Stepwise linear approximation to symmetric sigmoid.
219  * Faster than symmetric sigmoid but a bit less precise.
220 
221  FANN_GAUSSIAN - Gaussian activation function.
222  * 0 when x = -inf, 1 when x = 0 and 0 when x = inf
223  * span: 0 < y < 1
224  * y = exp(-x*s*x*s)
225  * d = -2*x*s*y*s
226 
227  FANN_GAUSSIAN_SYMMETRIC - Symmetric gaussian activation function.
228  * -1 when x = -inf, 1 when x = 0 and 0 when x = inf
229  * span: -1 < y < 1
230  * y = exp(-x*s*x*s)*2-1
231  * d = -2*x*s*(y+1)*s
232 
233  FANN_ELLIOT - Fast (sigmoid like) activation function defined by David Elliott
234  * span: 0 < y < 1
235  * y = ((x*s) / 2) / (1 + |x*s|) + 0.5
236  * d = s*1/(2*(1+|x*s|)*(1+|x*s|))
237 
238  FANN_ELLIOT_SYMMETRIC - Fast (symmetric sigmoid like) activation function defined by David Elliott
239  * span: -1 < y < 1
240  * y = (x*s) / (1 + |x*s|)
241  * d = s*1/((1+|x*s|)*(1+|x*s|))
242 
243  FANN_LINEAR_PIECE - Bounded linear activation function.
244  * span: 0 < y < 1
245  * y = x*s, d = 1*s
246 
247  FANN_LINEAR_PIECE_SYMMETRIC - Bounded Linear activation function.
248  * span: -1 < y < 1
249  * y = x*s, d = 1*s
250 
251  FANN_SIN_SYMMETRIC - Periodical sinus activation function.
252  * span: -1 <= y <= 1
253  * y = sin(x*s)
254  * d = s*cos(x*s)
255 
256  FANN_COS_SYMMETRIC - Periodical cosinus activation function.
257  * span: -1 <= y <= 1
258  * y = cos(x*s)
259  * d = s*-sin(x*s)
260 
261  See also:
262  <neural_net::set_activation_function_hidden>,
263  <neural_net::set_activation_function_output>
264  */
265  enum activation_function_enum {
266  LINEAR = FANN_LINEAR,
267  THRESHOLD,
268  THRESHOLD_SYMMETRIC,
269  SIGMOID,
270  SIGMOID_STEPWISE,
271  SIGMOID_SYMMETRIC,
272  SIGMOID_SYMMETRIC_STEPWISE,
273  GAUSSIAN,
274  GAUSSIAN_SYMMETRIC,
275  GAUSSIAN_STEPWISE,
276  ELLIOT,
277  ELLIOT_SYMMETRIC,
278  LINEAR_PIECE,
279  LINEAR_PIECE_SYMMETRIC,
280  SIN_SYMMETRIC,
281  COS_SYMMETRIC
282  };
283 
284  /* Enum: network_type_enum
285 
286  Definition of network types used by <neural_net::get_network_type>
287 
288  LAYER - Each layer only has connections to the next layer
289  SHORTCUT - Each layer has connections to all following layers
290 
291  See Also:
292  <neural_net::get_network_type>, <fann_get_network_type>
293 
294  This enumeration appears in FANN >= 2.1.0
295  */
296  enum network_type_enum
297  {
298  LAYER = FANN_NETTYPE_LAYER,
299  SHORTCUT
300  };
301 
302  /* Type: connection
303 
304  Describes a connection between two neurons and its weight
305 
306  from_neuron - Unique number used to identify source neuron
307  to_neuron - Unique number used to identify destination neuron
308  weight - The numerical value of the weight
309 
310  See Also:
311  <neural_net::get_connection_array>, <neural_net::set_weight_array>
312 
313  This structure appears in FANN >= 2.1.0
314  */
315  typedef struct fann_connection connection;
316 
317  /* Forward declaration of class neural_net and training_data */
318  class neural_net;
319  class training_data;
320 
321  /* Type: callback_type
322  This callback function can be called during training when using <neural_net::train_on_data>,
323  <neural_net::train_on_file> or <neural_net::cascadetrain_on_data>.
324 
325  >typedef int (*callback_type) (neural_net &net, training_data &train,
326  > unsigned int max_epochs, unsigned int epochs_between_reports,
327  > float desired_error, unsigned int epochs, void *user_data);
328 
329  The callback can be set by using <neural_net::set_callback> and is very usefull for doing custom
330  things during training. It is recommended to use this function when implementing custom
331  training procedures, or when visualizing the training in a GUI etc. The parameters which the
332  callback function takes is the parameters given to the <neural_net::train_on_data>, plus an epochs
333  parameter which tells how many epochs the training have taken so far.
334 
335  The callback function should return an integer, if the callback function returns -1, the training
336  will terminate.
337 
338  Example of a callback function that prints information to cout:
339  >int print_callback(FANN::neural_net &net, FANN::training_data &train,
340  > unsigned int max_epochs, unsigned int epochs_between_reports,
341  > float desired_error, unsigned int epochs, void *user_data)
342  >{
343  > cout << "Epochs " << setw(8) << epochs << ". "
344  > << "Current Error: " << left << net.get_MSE() << right << endl;
345  > return 0;
346  >}
347 
348  See also:
349  <neural_net::set_callback>, <fann_callback_type>
350  */
351  typedef int (*callback_type) (neural_net &net, training_data &train,
352  unsigned int max_epochs, unsigned int epochs_between_reports,
353  float desired_error, unsigned int epochs, void *user_data);
354 
355  /*************************************************************************/
356 
357  /* Class: training_data
358 
359  Encapsulation of a training data set <struct fann_train_data> and
360  associated C API functions.
361  */
363  {
364  public:
365  /* Constructor: training_data
366 
367  Default constructor creates an empty neural net.
368  Use <read_train_from_file>, <set_train_data> or <create_train_from_callback> to initialize.
369  */
370  training_data() : train_data(NULL)
371  {
372  }
373 
374  /* Constructor: training_data
375 
376  Copy constructor constructs a copy of the training data.
377  Corresponds to the C API <fann_duplicate_train_data> function.
378  */
379  training_data(const training_data &data)
380  {
381  destroy_train();
382  if (data.train_data != NULL)
383  {
384  train_data = fann_duplicate_train_data(data.train_data);
385  }
386  }
387 
388  /* Destructor: ~training_data
389 
390  Provides automatic cleanup of data.
391  Define USE_VIRTUAL_DESTRUCTOR if you need the destructor to be virtual.
392 
393  See also:
394  <destroy>
395  */
396 #ifdef USE_VIRTUAL_DESTRUCTOR
397  virtual
398 #endif
399  ~training_data()
400  {
401  destroy_train();
402  }
403 
404  /* Method: destroy
405 
406  Destructs the training data. Called automatically by the destructor.
407 
408  See also:
409  <~training_data>
410  */
411  void destroy_train()
412  {
413  if (train_data != NULL)
414  {
415  fann_destroy_train(train_data);
416  train_data = NULL;
417  }
418  }
419 
420  /* Method: read_train_from_file
421  Reads a file that stores training data.
422 
423  The file must be formatted like:
424  >num_train_data num_input num_output
425  >inputdata seperated by space
426  >outputdata seperated by space
427  >
428  >.
429  >.
430  >.
431  >
432  >inputdata seperated by space
433  >outputdata seperated by space
434 
435  See also:
436  <neural_net::train_on_data>, <save_train>, <fann_read_train_from_file>
437 
438  This function appears in FANN >= 1.0.0
439  */
440  bool read_train_from_file(const std::string &filename)
441  {
442  destroy_train();
443  train_data = fann_read_train_from_file(filename.c_str());
444  return (train_data != NULL);
445  }
446 
447  /* Method: save_train
448 
449  Save the training structure to a file, with the format as specified in <read_train_from_file>
450 
451  Return:
452  The function returns true on success and false on failure.
453 
454  See also:
455  <read_train_from_file>, <save_train_to_fixed>, <fann_save_train>
456 
457  This function appears in FANN >= 1.0.0.
458  */
459  bool save_train(const std::string &filename)
460  {
461  if (train_data == NULL)
462  {
463  return false;
464  }
465  if (fann_save_train(train_data, filename.c_str()) == -1)
466  {
467  return false;
468  }
469  return true;
470  }
471 
472  /* Method: save_train_to_fixed
473 
474  Saves the training structure to a fixed point data file.
475 
476  This function is very usefull for testing the quality of a fixed point network.
477 
478  Return:
479  The function returns true on success and false on failure.
480 
481  See also:
482  <save_train>, <fann_save_train_to_fixed>
483 
484  This function appears in FANN >= 1.0.0.
485  */
486  bool save_train_to_fixed(const std::string &filename, unsigned int decimal_point)
487  {
488  if (train_data == NULL)
489  {
490  return false;
491  }
492  if (fann_save_train_to_fixed(train_data, filename.c_str(), decimal_point) == -1)
493  {
494  return false;
495  }
496  return true;
497  }
498 
499  /* Method: shuffle_train_data
500 
501  Shuffles training data, randomizing the order.
502  This is recommended for incremental training, while it have no influence during batch training.
503 
504  This function appears in FANN >= 1.1.0.
505  */
506  void shuffle_train_data()
507  {
508  if (train_data != NULL)
509  {
510  fann_shuffle_train_data(train_data);
511  }
512  }
513 
514  /* Method: merge_train_data
515 
516  Merges the data into the data contained in the <training_data>.
517 
518  This function appears in FANN >= 1.1.0.
519  */
520  void merge_train_data(const training_data &data)
521  {
522  fann_train_data *new_data = fann_merge_train_data(train_data, data.train_data);
523  if (new_data != NULL)
524  {
525  destroy_train();
526  train_data = new_data;
527  }
528  }
529 
530  /* Method: length_train_data
531 
532  Returns the number of training patterns in the <training_data>.
533 
534  See also:
535  <num_input_train_data>, <num_output_train_data>, <fann_length_train_data>
536 
537  This function appears in FANN >= 2.0.0.
538  */
539  unsigned int length_train_data()
540  {
541  if (train_data == NULL)
542  {
543  return 0;
544  }
545  else
546  {
547  return fann_length_train_data(train_data);
548  }
549  }
550 
551  /* Method: num_input_train_data
552 
553  Returns the number of inputs in each of the training patterns in the <training_data>.
554 
555  See also:
556  <num_output_train_data>, <length_train_data>, <fann_num_input_train_data>
557 
558  This function appears in FANN >= 2.0.0.
559  */
560  unsigned int num_input_train_data()
561  {
562  if (train_data == NULL)
563  {
564  return 0;
565  }
566  else
567  {
568  return fann_num_input_train_data(train_data);
569  }
570  }
571 
572  /* Method: num_output_train_data
573 
574  Returns the number of outputs in each of the training patterns in the <struct fann_train_data>.
575 
576  See also:
577  <num_input_train_data>, <length_train_data>, <fann_num_output_train_data>
578 
579  This function appears in FANN >= 2.0.0.
580  */
581  unsigned int num_output_train_data()
582  {
583  if (train_data == NULL)
584  {
585  return 0;
586  }
587  else
588  {
589  return fann_num_output_train_data(train_data);
590  }
591  }
592 
593  /* Grant access to the encapsulated data since many situations
594  and applications creates the data from sources other than files
595  or uses the training data for testing and related functions */
596 
597  /* Method: get_input
598 
599  Returns:
600  A pointer to the array of input training data
601 
602  See also:
603  <get_output>, <set_train_data>
604  */
605  fann_type **get_input()
606  {
607  if (train_data == NULL)
608  {
609  return NULL;
610  }
611  else
612  {
613  return train_data->input;
614  }
615  }
616 
617  /* Method: get_output
618 
619  Returns:
620  A pointer to the array of output training data
621 
622  See also:
623  <get_input>, <set_train_data>
624  */
625  fann_type **get_output()
626  {
627  if (train_data == NULL)
628  {
629  return NULL;
630  }
631  else
632  {
633  return train_data->output;
634  }
635  }
636 
637  /* Method: set_train_data
638 
639  Set the training data to the input and output data provided.
640 
641  A copy of the data is made so there are no restrictions on the
642  allocation of the input/output data and the caller is responsible
643  for the deallocation of the data pointed to by input and output.
644 
645  Parameters:
646  num_data - The number of training data
647  num_input - The number of inputs per training data
648  num_output - The number of outputs per training data
649  input - The set of inputs (a pointer to an array of pointers to arrays of floating point data)
650  output - The set of desired outputs (a pointer to an array of pointers to arrays of floating point data)
651 
652  See also:
653  <get_input>, <get_output>
654  */
655  void set_train_data(unsigned int num_data,
656  unsigned int num_input, fann_type **input,
657  unsigned int num_output, fann_type **output)
658  {
659  // Uses the allocation method used in fann
660  struct fann_train_data *data =
661  (struct fann_train_data *)malloc(sizeof(struct fann_train_data));
662  data->input = (fann_type **)calloc(num_data, sizeof(fann_type *));
663  data->output = (fann_type **)calloc(num_data, sizeof(fann_type *));
664 
665  data->num_data = num_data;
666  data->num_input = num_input;
667  data->num_output = num_output;
668 
669  fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type));
670  fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type));
671 
672  for (unsigned int i = 0; i < num_data; ++i)
673  {
674  data->input[i] = data_input;
675  data_input += num_input;
676  for (unsigned int j = 0; j < num_input; ++j)
677  {
678  data->input[i][j] = input[i][j];
679  }
680  data->output[i] = data_output;
681  data_output += num_output;
682  for (unsigned int j = 0; j < num_output; ++j)
683  {
684  data->output[i][j] = output[i][j];
685  }
686  }
687  set_train_data(data);
688  }
689 
690 
691 
692  void set_train_data(const std::vector< std::vector<fann_type> >& input,
693  const std::vector< std::vector<fann_type> >& output)
694  {
695  unsigned int num_data=input.size();
696  assert(num_data);
697  assert(input.size()==output.size());
698  unsigned int num_input=input[0].size();
699  unsigned int num_output=output[0].size();
700 
701  // Uses the allocation method used in fann
702  struct fann_train_data *data =
703  (struct fann_train_data *)malloc(sizeof(struct fann_train_data));
704  data->input = (fann_type **)calloc(num_data, sizeof(fann_type *));
705  data->output = (fann_type **)calloc(num_data, sizeof(fann_type *));
706 
707  data->num_data = num_data;
708  data->num_input = num_input;
709  data->num_output = num_output;
710 
711  fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type));
712  fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type));
713 
714  for (unsigned int i = 0; i < num_data; ++i)
715  {
716  data->input[i] = data_input;
717  data_input += num_input;
718  for (unsigned int j = 0; j < num_input; ++j)
719  {
720  data->input[i][j] = input[i][j];
721  }
722  data->output[i] = data_output;
723  data_output += num_output;
724  for (unsigned int j = 0; j < num_output; ++j)
725  {
726  data->output[i][j] = output[i][j];
727  }
728  }
729  set_train_data(data);
730  }
731 
732  void set_train_data(const std::vector< std::vector< std::vector<fann_type> > >& input, unsigned int num_data)
733  {
734  assert(num_data);
735  assert(input.size());
736  unsigned int num_class=input.size();
737  assert(input[0].size());
738  unsigned int num_input=input[0][0].size();
739  unsigned int num_output=num_class;
740  //test
741 // unsigned int num_output=1;
742 
743  // Uses the allocation method used in fann
744  struct fann_train_data *data =
745  (struct fann_train_data *)malloc(sizeof(struct fann_train_data));
746  data->input = (fann_type **)calloc(num_data, sizeof(fann_type *));
747  data->output = (fann_type **)calloc(num_data, sizeof(fann_type *));
748 
749  data->num_data = num_data;
750  data->num_input = num_input;
751  data->num_output = num_output;
752 
753  fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type));
754  fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type));
755 
756  unsigned int isample=0;
757  for(int iclass=0;iclass<num_class;++iclass){
758  for(int csample=0;csample<input[iclass].size();++csample){
759  data->input[isample] = data_input;
760  data_input += num_input;
761  for(int iband=0;iband<input[iclass][csample].size();++iband){
762  assert(input[iclass][csample].size()==num_input);
763  data->input[isample][iband] = input[iclass][csample][iband];
764  }
765  data->output[isample] = data_output;
766  data_output += num_output;
767  for(int ic=0;ic<num_output;++ic){
768  //for single neuron output:
769 // data->output[isample][ic]=2.0/(num_class-1)*(iclass-(num_class-1)/2.0);
770  if(ic==iclass)
771  data->output[isample][ic] = 1;
772  else
773  data->output[isample][ic] = -1;
774  }
775  ++isample;
776  }
777  }
778  set_train_data(data);
779  }
780 
781  void set_train_data(const std::vector< Vector2d<fann_type> >& input, unsigned int num_data)
782  {
783  assert(num_data);
784  assert(input.size());
785  unsigned int num_class=input.size();
786  assert(input[0].size());
787  unsigned int num_input=input[0][0].size();
788  unsigned int num_output=num_class;
789  //test
790 // unsigned int num_output=1;
791 
792  // Uses the allocation method used in fann
793  struct fann_train_data *data =
794  (struct fann_train_data *)malloc(sizeof(struct fann_train_data));
795  data->input = (fann_type **)calloc(num_data, sizeof(fann_type *));
796  data->output = (fann_type **)calloc(num_data, sizeof(fann_type *));
797 
798  data->num_data = num_data;
799  data->num_input = num_input;
800  data->num_output = num_output;
801 
802  fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type));
803  fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type));
804 
805  unsigned int isample=0;
806  for(int iclass=0;iclass<num_class;++iclass){
807  for(int csample=0;csample<input[iclass].size();++csample){
808  data->input[isample] = data_input;
809  data_input += num_input;
810  for(int iband=0;iband<input[iclass][csample].size();++iband){
811  assert(input[iclass][csample].size()==num_input);
812  data->input[isample][iband] = input[iclass][csample][iband];
813  }
814  data->output[isample] = data_output;
815  data_output += num_output;
816  for(int ic=0;ic<num_output;++ic){
817  //for single neuron output:
818 // data->output[isample][ic]=2.0/(num_class-1)*(iclass-(num_class-1)/2.0);
819  if(ic==iclass)
820  data->output[isample][ic] = 1;
821  else
822  data->output[isample][ic] = -1;
823  }
824  ++isample;
825  }
826  }
827  set_train_data(data);
828  }
829 
830 
831 private:
832  /* Set the training data to the struct fann_training_data pointer.
833  The struct has to be allocated with malloc to be compatible
834  with fann_destroy. */
835  void set_train_data(struct fann_train_data *data)
836  {
837  destroy_train();
838  train_data = data;
839  }
840 
841 public:
842  /*********************************************************************/
843 
844  /* Method: create_train_from_callback
845  Creates the training data struct from a user supplied function.
846  As the training data are numerable (data 1, data 2...), the user must write
847  a function that receives the number of the training data set (input,output)
848  and returns the set.
849 
850  Parameters:
851  num_data - The number of training data
852  num_input - The number of inputs per training data
853  num_output - The number of outputs per training data
854  user_function - The user suplied function
855 
856  Parameters for the user function:
857  num - The number of the training data set
858  num_input - The number of inputs per training data
859  num_output - The number of outputs per training data
860  input - The set of inputs
861  output - The set of desired outputs
862 
863  See also:
864  <training_data::read_train_from_file>, <neural_net::train_on_data>,
865  <fann_create_train_from_callback>
866 
867  This function appears in FANN >= 2.1.0
868  */
869  void create_train_from_callback(unsigned int num_data,
870  unsigned int num_input,
871  unsigned int num_output,
872  void (FANN_API *user_function)( unsigned int,
873  unsigned int,
874  unsigned int,
875  fann_type * ,
876  fann_type * ))
877  {
878  destroy_train();
879  train_data = fann_create_train_from_callback(num_data, num_input, num_output, user_function);
880  }
881 
882  /* Method: scale_input_train_data
883 
884  Scales the inputs in the training data to the specified range.
885 
886  See also:
887  <scale_output_train_data>, <scale_train_data>, <fann_scale_input_train_data>
888 
889  This function appears in FANN >= 2.0.0.
890  */
891  void scale_input_train_data(fann_type new_min, fann_type new_max)
892  {
893  if (train_data != NULL)
894  {
895  fann_scale_input_train_data(train_data, new_min, new_max);
896  }
897  }
898 
899  /* Method: scale_output_train_data
900 
901  Scales the outputs in the training data to the specified range.
902 
903  See also:
904  <scale_input_train_data>, <scale_train_data>, <fann_scale_output_train_data>
905 
906  This function appears in FANN >= 2.0.0.
907  */
908  void scale_output_train_data(fann_type new_min, fann_type new_max)
909  {
910  if (train_data != NULL)
911  {
912  fann_scale_output_train_data(train_data, new_min, new_max);
913  }
914  }
915 
916  /* Method: scale_train_data
917 
918  Scales the inputs and outputs in the training data to the specified range.
919 
920  See also:
921  <scale_output_train_data>, <scale_input_train_data>, <fann_scale_train_data>
922 
923  This function appears in FANN >= 2.0.0.
924  */
925  void scale_train_data(fann_type new_min, fann_type new_max)
926  {
927  if (train_data != NULL)
928  {
929  fann_scale_train_data(train_data, new_min, new_max);
930  }
931  }
932 
933  /* Method: subset_train_data
934 
935  Changes the training data to a subset, starting at position *pos*
936  and *length* elements forward. Use the copy constructor to work
937  on a new copy of the training data.
938 
939  >FANN::training_data full_data_set;
940  >full_data_set.read_train_from_file("somefile.train");
941  >FANN::training_data *small_data_set = new FANN::training_data(full_data_set);
942  >small_data_set->subset_train_data(0, 2); // Only use first two
943  >// Use small_data_set ...
944  >delete small_data_set;
945 
946  See also:
947  <fann_subset_train_data>
948 
949  This function appears in FANN >= 2.0.0.
950  */
951  void subset_train_data(unsigned int pos, unsigned int length)
952  {
953  if (train_data != NULL)
954  {
955  struct fann_train_data *temp = fann_subset_train_data(train_data, pos, length);
956  destroy_train();
957  train_data = temp;
958  }
959  }
960 
961  /*********************************************************************/
962 
963  protected:
964  /* The neural_net class has direct access to the training data */
965  friend class neural_net;
966 
967  /* Pointer to the encapsulated training data */
968  struct fann_train_data* train_data;
969  };
970 
971  /*************************************************************************/
972 
973  /* Class: neural_net
974 
975  Encapsulation of a neural network <struct fann> and
976  associated C API functions.
977  */
979  {
980  public:
981  /* Constructor: neural_net
982 
983  Default constructor creates an empty neural net.
984  Use one of the create functions to create the neural network.
985 
986  See also:
987  <create_standard>, <create_sparse>, <create_shortcut>,
988  <create_standard_array>, <create_sparse_array>, <create_shortcut_array>
989  */
990  neural_net() : ann(NULL)
991  {
992  }
993 
994  /* Destructor: ~neural_net
995 
996  Provides automatic cleanup of data.
997  Define USE_VIRTUAL_DESTRUCTOR if you need the destructor to be virtual.
998 
999  See also:
1000  <destroy>
1001  */
1002 #ifdef USE_VIRTUAL_DESTRUCTOR
1003  virtual
1004 #endif
1005  ~neural_net()
1006  {
1007  destroy();
1008  }
1009 
1010  /* Method: destroy
1011 
1012  Destructs the entire network. Called automatically by the destructor.
1013 
1014  See also:
1015  <~neural_net>
1016  */
1017  void destroy()
1018  {
1019  if (ann != NULL)
1020  {
1021  user_context *user_data = static_cast<user_context *>(fann_get_user_data(ann));
1022  if (user_data != NULL)
1023  delete user_data;
1024 
1025  fann_destroy(ann);
1026  ann = NULL;
1027  }
1028  }
1029 
1030  /* Method: create_standard
1031 
1032  Creates a standard fully connected backpropagation neural network.
1033 
1034  There will be a bias neuron in each layer (except the output layer),
1035  and this bias neuron will be connected to all neurons in the next layer.
1036  When running the network, the bias nodes always emits 1.
1037 
1038  Parameters:
1039  num_layers - The total number of layers including the input and the output layer.
1040  ... - Integer values determining the number of neurons in each layer starting with the
1041  input layer and ending with the output layer.
1042 
1043  Returns:
1044  Boolean true if the network was created, false otherwise.
1045 
1046  Example:
1047  >const unsigned int num_layers = 3;
1048  >const unsigned int num_input = 2;
1049  >const unsigned int num_hidden = 3;
1050  >const unsigned int num_output = 1;
1051  >
1052  >FANN::neural_net net;
1053  >net.create_standard(num_layers, num_input, num_hidden, num_output);
1054 
1055  See also:
1056  <create_standard_array>, <create_sparse>, <create_shortcut>,
1057  <fann_create_standard_array>
1058 
1059  This function appears in FANN >= 2.0.0.
1060  */
1061  bool create_standard(unsigned int num_layers, ...)
1062  {
1063  va_list layers;
1064  std::vector<unsigned int> arr(num_layers);//pk
1065  //unsigned int arr[num_layers];
1066 
1067  va_start(layers, num_layers);
1068  /* bool status = create_standard_array(num_layers, */
1069  /* reinterpret_cast<const unsigned int *>(layers)); */
1070  for (unsigned int ii = 0; ii < num_layers; ii++)
1071  arr[ii] = va_arg(layers, unsigned int);
1072  bool status = create_standard_array(num_layers, &(arr[0]));//pk
1073  //bool status = create_standard_array(num_layers, arr);
1074  va_end(layers);
1075  return status;
1076  }
1077 
1078  /* Method: create_standard_array
1079 
1080  Just like <create_standard>, but with an array of layer sizes
1081  instead of individual parameters.
1082 
1083  See also:
1084  <create_standard>, <create_sparse>, <create_shortcut>,
1085  <fann_create_standard>
1086 
1087  This function appears in FANN >= 2.0.0.
1088  */
1089  bool create_standard_array(unsigned int num_layers, const unsigned int * layers)
1090  {
1091  destroy();
1092  ann = fann_create_standard_array(num_layers, layers);
1093  return (ann != NULL);
1094  }
1095 
1096  /* Method: create_sparse
1097 
1098  Creates a standard backpropagation neural network, which is not fully connected.
1099 
1100  Parameters:
1101  connection_rate - The connection rate controls how many connections there will be in the
1102  network. If the connection rate is set to 1, the network will be fully
1103  connected, but if it is set to 0.5 only half of the connections will be set.
1104  A connection rate of 1 will yield the same result as <fann_create_standard>
1105  num_layers - The total number of layers including the input and the output layer.
1106  ... - Integer values determining the number of neurons in each layer starting with the
1107  input layer and ending with the output layer.
1108 
1109  Returns:
1110  Boolean true if the network was created, false otherwise.
1111 
1112  See also:
1113  <create_standard>, <create_sparse_array>, <create_shortcut>,
1114  <fann_create_sparse>
1115 
1116  This function appears in FANN >= 2.0.0.
1117  */
1118  bool create_sparse(float connection_rate, unsigned int num_layers, ...)
1119  {
1120  va_list layers;
1121  std::vector<unsigned int> arr(num_layers);//pk
1122  //unsigned int arr[num_layers];
1123 
1124  va_start(layers, num_layers);
1125  /* bool status = create_sparse_array(connection_rate, num_layers, */
1126  /* reinterpret_cast<const unsigned int *>(layers)); */
1127 
1128  for (unsigned int ii = 0; ii < num_layers; ii++)
1129  arr[ii] = va_arg(layers, unsigned int);
1130  bool status = create_sparse_array(connection_rate, num_layers, &(arr[0]));//pk
1131  //bool status = create_sparse_array(connection_rate, num_layers, arr);
1132 
1133  va_end(layers);
1134  return status;
1135  }
1136 
1137  /* Method: create_sparse_array
1138  Just like <create_sparse>, but with an array of layer sizes
1139  instead of individual parameters.
1140 
1141  See <create_sparse> for a description of the parameters.
1142 
1143  See also:
1144  <create_standard>, <create_sparse>, <create_shortcut>,
1145  <fann_create_sparse_array>
1146 
1147  This function appears in FANN >= 2.0.0.
1148  */
1149  bool create_sparse_array(float connection_rate,
1150  unsigned int num_layers, const unsigned int * layers)
1151  {
1152  destroy();
1153  ann = fann_create_sparse_array(connection_rate, num_layers, layers);
1154  return (ann != NULL);
1155  }
1156 
1157  /* Method: create_shortcut
1158 
1159  Creates a standard backpropagation neural network, which is not fully connected and which
1160  also has shortcut connections.
1161 
1162  Shortcut connections are connections that skip layers. A fully connected network with shortcut
1163  connections, is a network where all neurons are connected to all neurons in later layers.
1164  Including direct connections from the input layer to the output layer.
1165 
1166  See <create_standard> for a description of the parameters.
1167 
1168  See also:
1169  <create_standard>, <create_sparse>, <create_shortcut_array>,
1170  <fann_create_shortcut>
1171 
1172  This function appears in FANN >= 2.0.0.
1173  */
1174  bool create_shortcut(unsigned int num_layers, ...)
1175  {
1176  va_list layers;
1177  std::vector<unsigned int> arr(num_layers);//pk
1178  //unsigned int arr[num_layers];
1179 
1180  va_start(layers, num_layers);
1181  /* bool status = create_shortcut_array(num_layers, */
1182  /* reinterpret_cast<const unsigned int *>(layers)); */
1183  for (unsigned int ii = 0; ii < num_layers; ii++)
1184  arr[ii] = va_arg(layers, unsigned int);
1185  bool status = create_shortcut_array(num_layers, &(arr[0]));//
1186  //bool status = create_shortcut_array(num_layers, arr);
1187 
1188  va_end(layers);
1189  return status;
1190  }
1191 
1192  /* Method: create_shortcut_array
1193 
1194  Just like <create_shortcut>, but with an array of layer sizes
1195  instead of individual parameters.
1196 
1197  See <create_standard_array> for a description of the parameters.
1198 
1199  See also:
1200  <create_standard>, <create_sparse>, <create_shortcut>,
1201  <fann_create_shortcut_array>
1202 
1203  This function appears in FANN >= 2.0.0.
1204  */
1205  bool create_shortcut_array(unsigned int num_layers,
1206  const unsigned int * layers)
1207  {
1208  destroy();
1209  ann = fann_create_shortcut_array(num_layers, layers);
1210  return (ann != NULL);
1211  }
1212 
1213  /* Method: run
1214 
1215  Will run input through the neural network, returning an array of outputs, the number of which being
1216  equal to the number of neurons in the output layer.
1217 
1218  See also:
1219  <test>, <fann_run>
1220 
1221  This function appears in FANN >= 1.0.0.
1222  */
1223  fann_type* run(fann_type *input)
1224  {
1225  if (ann == NULL)
1226  {
1227  return NULL;
1228  }
1229 // for(int iband=0;iband<get_num_input();++iband)
1230 // std::cout << (input)[iband] << " ";
1231 // std::cout << std::endl;
1232  return fann_run(ann, input);
1233  }
1234 
1235  std::vector<fann_type> run(std::vector<fann_type> input)
1236  {
1237  std::vector<fann_type> vresult;
1238  if (ann == NULL)
1239  {
1240  return vresult;
1241  }
1242  vresult.resize(get_num_output());
1243  fann_type* result;
1244  result=fann_run(ann,&(input[0]));
1245  for(int iout=0;iout<get_num_output();++iout)
1246  vresult[iout]=*(result++);
1247  return vresult;
1248  }
1249 
1250  /* Method: randomize_weights
1251 
1252  Give each connection a random weight between *min_weight* and *max_weight*
1253 
1254  From the beginning the weights are random between -0.1 and 0.1.
1255 
1256  See also:
1257  <init_weights>, <fann_randomize_weights>
1258 
1259  This function appears in FANN >= 1.0.0.
1260  */
1261  void randomize_weights(fann_type min_weight, fann_type max_weight)
1262  {
1263  if (ann != NULL)
1264  {
1265  fann_randomize_weights(ann, min_weight, max_weight);
1266  }
1267  }
1268 
1269  /* Method: init_weights
1270 
1271  Initialize the weights using Widrow + Nguyen's algorithm.
1272 
1273  This function behaves similarly to fann_randomize_weights. It will use the algorithm developed
1274  by Derrick Nguyen and Bernard Widrow to set the weights in such a way
1275  as to speed up training. This technique is not always successful, and in some cases can be less
1276  efficient than a purely random initialization.
1277 
1278  The algorithm requires access to the range of the input data (ie, largest and smallest input),
1279  and therefore accepts a second argument, data, which is the training data that will be used to
1280  train the network.
1281 
1282  See also:
1283  <randomize_weights>, <training_data::read_train_from_file>,
1284  <fann_init_weights>
1285 
1286  This function appears in FANN >= 1.1.0.
1287  */
1288  void init_weights(const training_data &data)
1289  {
1290  if ((ann != NULL) && (data.train_data != NULL))
1291  {
1292  fann_init_weights(ann, data.train_data);
1293  }
1294  }
1295 
1296  /* Method: print_connections
1297 
1298  Will print the connections of the ann in a compact matrix, for easy viewing of the internals
1299  of the ann.
1300 
1301  The output from fann_print_connections on a small (2 2 1) network trained on the xor problem
1302  >Layer / Neuron 012345
1303  >L 1 / N 3 BBa...
1304  >L 1 / N 4 BBA...
1305  >L 1 / N 5 ......
1306  >L 2 / N 6 ...BBA
1307  >L 2 / N 7 ......
1308 
1309  This network have five real neurons and two bias neurons. This gives a total of seven neurons
1310  named from 0 to 6. The connections between these neurons can be seen in the matrix. "." is a
1311  place where there is no connection, while a character tells how strong the connection is on a
1312  scale from a-z. The two real neurons in the hidden layer (neuron 3 and 4 in layer 1) has
1313  connection from the three neurons in the previous layer as is visible in the first two lines.
1314  The output neuron (6) has connections form the three neurons in the hidden layer 3 - 5 as is
1315  visible in the fourth line.
1316 
1317  To simplify the matrix output neurons is not visible as neurons that connections can come from,
1318  and input and bias neurons are not visible as neurons that connections can go to.
1319 
1320  This function appears in FANN >= 1.2.0.
1321  */
1322  void print_connections()
1323  {
1324  if (ann != NULL)
1325  {
1326  fann_print_connections(ann);
1327  }
1328  }
1329 
1330  /* Method: create_from_file
1331 
1332  Constructs a backpropagation neural network from a configuration file,
1333  which have been saved by <save>.
1334 
1335  See also:
1336  <save>, <save_to_fixed>, <fann_create_from_file>
1337 
1338  This function appears in FANN >= 1.0.0.
1339  */
1340  bool create_from_file(const std::string &configuration_file)
1341  {
1342  destroy();
1343  ann = fann_create_from_file(configuration_file.c_str());
1344  return (ann != NULL);
1345  }
1346 
1347  /* Method: save
1348 
1349  Save the entire network to a configuration file.
1350 
1351  The configuration file contains all information about the neural network and enables
1352  <create_from_file> to create an exact copy of the neural network and all of the
1353  parameters associated with the neural network.
1354 
1355  These two parameters (<set_callback>, <set_error_log>) are *NOT* saved
1356  to the file because they cannot safely be ported to a different location. Also temporary
1357  parameters generated during training like <get_MSE> is not saved.
1358 
1359  Return:
1360  The function returns 0 on success and -1 on failure.
1361 
1362  See also:
1363  <create_from_file>, <save_to_fixed>, <fann_save>
1364 
1365  This function appears in FANN >= 1.0.0.
1366  */
1367  bool save(const std::string &configuration_file)
1368  {
1369  if (ann == NULL)
1370  {
1371  return false;
1372  }
1373  if (fann_save(ann, configuration_file.c_str()) == -1)
1374  {
1375  return false;
1376  }
1377  return true;
1378  }
1379 
1380  /* Method: save_to_fixed
1381 
1382  Saves the entire network to a configuration file.
1383  But it is saved in fixed point format no matter which
1384  format it is currently in.
1385 
1386  This is usefull for training a network in floating points,
1387  and then later executing it in fixed point.
1388 
1389  The function returns the bit position of the fix point, which
1390  can be used to find out how accurate the fixed point network will be.
1391  A high value indicates high precision, and a low value indicates low
1392  precision.
1393 
1394  A negative value indicates very low precision, and a very
1395  strong possibility for overflow.
1396  (the actual fix point will be set to 0, since a negative
1397  fix point does not make sence).
1398 
1399  Generally, a fix point lower than 6 is bad, and should be avoided.
1400  The best way to avoid this, is to have less connections to each neuron,
1401  or just less neurons in each layer.
1402 
1403  The fixed point use of this network is only intended for use on machines that
1404  have no floating point processor, like an iPAQ. On normal computers the floating
1405  point version is actually faster.
1406 
1407  See also:
1408  <create_from_file>, <save>, <fann_save_to_fixed>
1409 
1410  This function appears in FANN >= 1.0.0.
1411  */
1412  int save_to_fixed(const std::string &configuration_file)
1413  {
1414  int fixpoint = 0;
1415  if (ann != NULL)
1416  {
1417  fixpoint = fann_save_to_fixed(ann, configuration_file.c_str());
1418  }
1419  return fixpoint;
1420  }
1421 
1422 #ifndef FIXEDFANN
1423  /* Method: train
1424 
1425  Train one iteration with a set of inputs, and a set of desired outputs.
1426  This training is always incremental training (see <FANN::training_algorithm_enum>),
1427  since only one pattern is presented.
1428 
1429  Parameters:
1430  ann - The neural network structure
1431  input - an array of inputs. This array must be exactly <fann_get_num_input> long.
1432  desired_output - an array of desired outputs. This array must be exactly <fann_get_num_output> long.
1433 
1434  See also:
1435  <train_on_data>, <train_epoch>, <fann_train>
1436 
1437  This function appears in FANN >= 1.0.0.
1438  */
1439  void train(fann_type *input, fann_type *desired_output)
1440  {
1441  if (ann != NULL)
1442  {
1443  fann_train(ann, input, desired_output);
1444  }
1445  }
1446 
1447  /* Method: train_epoch
1448  Train one epoch with a set of training data.
1449 
1450  Train one epoch with the training data stored in data. One epoch is where all of
1451  the training data is considered exactly once.
1452 
1453  This function returns the MSE error as it is calculated either before or during
1454  the actual training. This is not the actual MSE after the training epoch, but since
1455  calculating this will require to go through the entire training set once more, it is
1456  more than adequate to use this value during training.
1457 
1458  The training algorithm used by this function is chosen by the <fann_set_training_algorithm>
1459  function.
1460 
1461  See also:
1462  <train_on_data>, <test_data>, <fann_train_epoch>
1463 
1464  This function appears in FANN >= 1.2.0.
1465  */
1466  float train_epoch(const training_data &data)
1467  {
1468  float mse = 0.0f;
1469  if ((ann != NULL) && (data.train_data != NULL))
1470  {
1471  mse = fann_train_epoch(ann, data.train_data);
1472  }
1473  return mse;
1474  }
1475 
1476  /* Method: train_on_data
1477 
1478  Trains on an entire dataset, for a period of time.
1479 
1480  This training uses the training algorithm chosen by <set_training_algorithm>,
1481  and the parameters set for these training algorithms.
1482 
1483  Parameters:
1484  ann - The neural network
1485  data - The data, which should be used during training
1486  max_epochs - The maximum number of epochs the training should continue
1487  epochs_between_reports - The number of epochs between printing a status report to stdout.
1488  A value of zero means no reports should be printed.
1489  desired_error - The desired <get_MSE> or <get_bit_fail>, depending on which stop function
1490  is chosen by <set_train_stop_function>.
1491 
1492  Instead of printing out reports every epochs_between_reports, a callback function can be called
1493  (see <set_callback>).
1494 
1495  See also:
1496  <train_on_file>, <train_epoch>, <fann_train_on_data>
1497 
1498  This function appears in FANN >= 1.0.0.
1499  */
1500  void train_on_data(const training_data &data, unsigned int max_epochs,
1501  unsigned int epochs_between_reports, float desired_error)
1502  {
1503  if ((ann != NULL) && (data.train_data != NULL))
1504  {
1505  fann_train_on_data(ann, data.train_data, max_epochs,
1506  epochs_between_reports, desired_error);
1507  }
1508  }
1509 
1510 
1511 
1512  void train_on_data(const std::vector< std::vector<fann_type> >& input,
1513  const std::vector< std::vector<fann_type> >& output,
1514  bool initWeights,
1515  unsigned int max_epochs,
1516  unsigned int epochs_between_reports,
1517  float desired_error)
1518  {
1519  if ((ann != NULL))
1520  {
1521  training_data data;
1522  data.set_train_data(input,output);
1523  if(data.train_data != NULL){
1524  if(initWeights)
1525  init_weights(data);
1526  fann_train_on_data(ann, data.train_data, max_epochs,
1527  epochs_between_reports, desired_error);
1528  }
1529  }
1530  }
1531 
1532  void train_on_data(const std::vector< Vector2d<fann_type> >& input,
1533  unsigned int num_data,
1534  bool initWeights,
1535  unsigned int max_epochs,
1536  unsigned int epochs_between_reports,
1537  float desired_error)
1538  {
1539  if ((ann != NULL))
1540  {
1541  training_data data;
1542  data.set_train_data(input,num_data);
1543  if(data.train_data != NULL){
1544  if(initWeights)
1545  init_weights(data);
1546  fann_train_on_data(ann, data.train_data, max_epochs,
1547  epochs_between_reports, desired_error);
1548  }
1549  }
1550  }
1551 
1552  //cross validation for classification
1553  float cross_validation(std::vector< Vector2d<fann_type> >& trainingFeatures,
1554  unsigned int ntraining,
1555  unsigned short cv,
1556  unsigned int max_epochs,
1557  float desired_error,
1558  std::vector<unsigned short>& referenceVector,
1559  std::vector<unsigned short>& outputVector,
1560  short verbose=0)
1561  {
1562  referenceVector.clear();
1563  outputVector.clear();
1564  assert(cv<ntraining);
1565  float rmse=0;
1566  int nclass=trainingFeatures.size();
1567  std::vector< Vector2d<float> > testFeatures(nclass);
1568  int testclass=0;//class to leave out
1569  int testsample=0;//sample to leave out
1570  int nrun=(cv>1)? cv : ntraining;
1571  if(nrun>ntraining)
1572  nrun=ntraining;
1573  for(int irun=0;irun<nrun;++irun){
1574  if(verbose>1)
1575  std::cout << "run " << irun << std::endl;
1576  //reset training sample from last run
1577  if(verbose>1)
1578  std::cout << "reset training sample from last run" << std::endl;
1579  for(int iclass=0;iclass<nclass;++iclass){
1580  while(testFeatures[iclass].size()){
1581  trainingFeatures[iclass].push_back(testFeatures[iclass].back());
1582  testFeatures[iclass].pop_back();
1583  }
1584  if(verbose>1){
1585  std::cout << "training size " << iclass << ": " << trainingFeatures[iclass].size() << std::endl;
1586  std::cout << "test size " << iclass << ": " << testFeatures[iclass].size() << std::endl;
1587  }
1588  assert(trainingFeatures[iclass].size());
1589  }
1590  //create test sample
1591  if(verbose>1)
1592  std::cout << "create test sample" << std::endl;
1593  unsigned int nsample=0;
1594  int ntest=(cv>1)? ntraining/cv : 1; //n-fold cross validation or leave-one-out
1595  while(nsample<ntest){
1596  // if(index>=trainingFeatures[testclass].size()){
1597  // index=0;
1598  // }
1599  testFeatures[testclass].push_back(trainingFeatures[testclass][0]);
1600  trainingFeatures[testclass].erase(trainingFeatures[testclass].begin());
1601  if(!trainingFeatures[testclass].size())
1602  std::cout << "Error: testclass " << testclass << " has no training" << std::endl;
1603  assert(trainingFeatures[testclass].size());
1604  ++nsample;
1605  if(static_cast<float>(trainingFeatures[testclass].size())/static_cast<float>(testFeatures[testclass].size())<=(cv-1)){
1606  if(verbose>1){
1607  std::cout << "training size " << testclass << ": " << trainingFeatures[testclass].size() << std::endl;
1608  std::cout << "test size " << testclass << ": " << testFeatures[testclass].size() << std::endl;
1609  }
1610  testclass=(testclass+1)%nclass;
1611  }
1612  }
1613  assert(nsample==ntest);
1614  //training with left out training set
1615  if(verbose>1)
1616  std::cout << std::endl << "Set training data" << std::endl;
1617  bool initWeights=true;
1618  unsigned int epochs_between_reports=0;
1619  train_on_data(trainingFeatures,ntraining-ntest,initWeights, max_epochs,
1620  epochs_between_reports, desired_error);
1621  //cross validation with testFeatures
1622  if(verbose>1)
1623  std::cout << std::endl << "Cross validation" << std::endl;
1624 
1625  std::vector<float> result(nclass);
1626  int maxClass=-1;
1627  for(int iclass=0;iclass<testFeatures.size();++iclass){
1628  assert(trainingFeatures[iclass].size());
1629  for(int isample=0;isample<testFeatures[iclass].size();++isample){
1630  result=run(testFeatures[iclass][isample]);
1631  //search class with maximum posterior probability
1632  float maxP=-1;
1633  for(int ic=0;ic<nclass;++ic){
1634  float pv=(result[ic]+1.0)/2.0;//bring back to scale [0,1]
1635  if(pv>maxP){
1636  maxP=pv;
1637  maxClass=ic;
1638  }
1639  }
1640  assert(maxP>=0);
1641  referenceVector.push_back(iclass);
1642  outputVector.push_back(maxClass);
1643  }
1644  }
1645 
1646  // rmse+=test_data(testFeatures,ntest);
1647  // if(verbose>1)
1648  // std::cout << std::endl << "rmse: " << rmse << std::endl;
1649  }
1650  // rmse/=nrun;
1651  //reset from very last run
1652  for(int iclass=0;iclass<nclass;++iclass){
1653  while(testFeatures[iclass].size()){
1654  trainingFeatures[iclass].push_back(testFeatures[iclass].back());
1655  testFeatures[iclass].pop_back();
1656  }
1657  }
1658  // return(rmse);
1659  return 0;
1660  }
1661 
1662  //cross validation for regresssion
1663  float cross_validation(std::vector< std::vector<fann_type> >& input,
1664  std::vector< std::vector<fann_type> >& output,
1665  unsigned short cv,
1666  unsigned int max_epochs,
1667  float desired_error,
1668  std::vector< std::vector<fann_type> >& referenceVector,
1669  std::vector< std::vector<fann_type> >& outputVector,
1670  short verbose=0)
1671  {
1672  assert(input.size());
1673  assert(output.size()==input.size());
1674  unsigned int ntraining=input.size();
1675  unsigned int noutput=output[0].size();
1676  referenceVector.clear();
1677  outputVector.clear();
1678  assert(cv<ntraining);
1679  float rmse=0;
1680  std::vector< std::vector<fann_type> > testInput;
1681  std::vector< std::vector<fann_type> > testOutput;
1682  int testsample=0;//sample to leave out
1683  int nrun=(cv>1)? cv : ntraining;
1684  if(nrun>ntraining)
1685  nrun=ntraining;
1686  for(int irun=0;irun<nrun;++irun){
1687  if(verbose>1)
1688  std::cout << "run " << irun << std::endl;
1689  //reset training sample from last run
1690  if(verbose>1)
1691  std::cout << "reset training sample from last run" << std::endl;
1692  while(testInput.size()){
1693  input.push_back(testInput.back());
1694  testInput.pop_back();
1695  }
1696  while(testOutput.size()){
1697  output.push_back(testOutput.back());
1698  testOutput.pop_back();
1699  }
1700  assert(testInput.size()==testOutput.size());
1701  if(verbose>1){
1702  std::cout << "training size: " << input.size() << std::endl;
1703  std::cout << "test size: " << testInput.size() << std::endl;
1704  }
1705  assert(input.size());
1706  //create test sample
1707  if(verbose>1)
1708  std::cout << "create test sample" << std::endl;
1709  unsigned int nsample=0;
1710  int ntest=(cv>1)? ntraining/cv : 1; //n-fold cross validation or leave-one-out
1711  while(nsample<ntest){
1712  testInput.push_back(input[0]);
1713  testOutput.push_back(output[0]);
1714  input.erase(input.begin());
1715  output.erase(output.begin());
1716  assert(input.size());
1717  assert(output.size());
1718  assert(input.size()==output.size());
1719  ++nsample;
1720  }
1721  assert(nsample==ntest);
1722  assert(testInput.size()==testOutput.size());
1723  //training with left out training set
1724  if(verbose>1)
1725  std::cout << std::endl << "Set training data" << std::endl;
1726  bool initWeights=true;
1727  unsigned int epochs_between_reports=0;
1728 
1729  train_on_data(input,output,initWeights, max_epochs,
1730  epochs_between_reports, desired_error);
1731  //cross validation with testFeatures
1732  if(verbose>1)
1733  std::cout << std::endl << "Cross validation" << std::endl;
1734 
1735  std::vector<fann_type> result(noutput);
1736  for(int isample=0;isample<testInput.size();++isample){
1737  result=run(testInput[isample]);
1738  referenceVector.push_back(testOutput[isample]);
1739  outputVector.push_back(result);
1740  }
1741  }
1742  //reset from very last run
1743  while(testInput.size()){
1744  input.push_back(testInput.back());
1745  testInput.pop_back();
1746  }
1747  while(testOutput.size()){
1748  output.push_back(testOutput.back());
1749  testOutput.pop_back();
1750  }
1751  return 0;
1752  }
1753 
1754  /* Method: train_on_file
1755 
1756  Does the same as <train_on_data>, but reads the training data directly from a file.
1757 
1758  See also:
1759  <train_on_data>, <fann_train_on_file>
1760 
1761  This function appears in FANN >= 1.0.0.
1762  */
1763  void train_on_file(const std::string &filename, unsigned int max_epochs,
1764  unsigned int epochs_between_reports, float desired_error)
1765  {
1766  if (ann != NULL)
1767  {
1768  fann_train_on_file(ann, filename.c_str(),
1769  max_epochs, epochs_between_reports, desired_error);
1770  }
1771  }
1772 #endif /* NOT FIXEDFANN */
1773 
1774  /* Method: test
1775 
1776  Test with a set of inputs, and a set of desired outputs.
1777  This operation updates the mean square error, but does not
1778  change the network in any way.
1779 
1780  See also:
1781  <test_data>, <train>, <fann_test>
1782 
1783  This function appears in FANN >= 1.0.0.
1784  */
1785  fann_type * test(fann_type *input, fann_type *desired_output)
1786  {
1787  fann_type * output = NULL;
1788  if (ann != NULL)
1789  {
1790  output = fann_test(ann, input, desired_output);
1791  }
1792  return output;
1793  }
1794 
1795  /* Method: test_data
1796 
1797  Test a set of training data and calculates the MSE for the training data.
1798 
1799  This function updates the MSE and the bit fail values.
1800 
1801  See also:
1802  <test>, <get_MSE>, <get_bit_fail>, <fann_test_data>
1803 
1804  This function appears in FANN >= 1.2.0.
1805  */
1806  float test_data(const training_data &data)
1807  {
1808  float mse = 0.0f;
1809  if ((ann != NULL) && (data.train_data != NULL))
1810  {
1811  mse = fann_test_data(ann, data.train_data);
1812  }
1813  return mse;
1814  }
1815 
1816  float test_data(const std::vector< Vector2d<fann_type> >& input, unsigned int num_data)
1817  {
1818  assert(num_data);
1819  assert(input.size());
1820  unsigned int num_class=input.size();
1821  assert(input[0].size());
1822  unsigned int num_input=input[0][0].size();
1823  unsigned int num_output=num_class;
1824  struct fann_train_data *data =
1825  (struct fann_train_data *)malloc(sizeof(struct fann_train_data));
1826  data->input = (fann_type **)calloc(num_data, sizeof(fann_type *));
1827  data->output = (fann_type **)calloc(num_data, sizeof(fann_type *));
1828 
1829  data->num_data = num_data;
1830  data->num_input = num_input;
1831  data->num_output = num_output;
1832 
1833  fann_type *data_input = (fann_type *)calloc(num_input*num_data, sizeof(fann_type));
1834  fann_type *data_output = (fann_type *)calloc(num_output*num_data, sizeof(fann_type));
1835 
1836  unsigned int isample=0;
1837  for(int iclass=0;iclass<num_class;++iclass){
1838  for(int csample=0;csample<input[iclass].size();++csample){
1839  data->input[isample] = data_input;
1840  data_input += num_input;
1841  for(int iband=0;iband<input[iclass][csample].size();++iband){
1842  assert(input[iclass][csample].size()==num_input);
1843  data->input[isample][iband] = input[iclass][csample][iband];
1844  }
1845  data->output[isample] = data_output;
1846  data_output += num_output;
1847  for(int ic=0;ic<num_output;++ic){
1848  //for single neuron output:
1849 // data->output[isample][ic]=2.0/(num_class-1)*(iclass-(num_class-1)/2.0);
1850  if(ic==iclass)
1851  data->output[isample][ic] = 1;
1852  else
1853  data->output[isample][ic] = -1;
1854  }
1855  ++isample;
1856  }
1857  }
1858  FANN::training_data trainingData;
1859  trainingData.train_data = data;
1860  return test_data(trainingData);
1861  }
1862 
1863 
1864  /* Method: get_MSE
1865  Reads the mean square error from the network.
1866 
1867  Reads the mean square error from the network. This value is calculated during
1868  training or testing, and can therefore sometimes be a bit off if the weights
1869  have been changed since the last calculation of the value.
1870 
1871  See also:
1872  <test_data>, <fann_get_MSE>
1873 
1874  This function appears in FANN >= 1.1.0.
1875  */
1876  float get_MSE()
1877  {
1878  float mse = 0.0f;
1879  if (ann != NULL)
1880  {
1881  mse = fann_get_MSE(ann);
1882  }
1883  return mse;
1884  }
1885 
1886  /* Method: reset_MSE
1887 
1888  Resets the mean square error from the network.
1889 
1890  This function also resets the number of bits that fail.
1891 
1892  See also:
1893  <get_MSE>, <get_bit_fail_limit>, <fann_reset_MSE>
1894 
1895  This function appears in FANN >= 1.1.0
1896  */
1897  void reset_MSE()
1898  {
1899  if (ann != NULL)
1900  {
1901  fann_reset_MSE(ann);
1902  }
1903  }
1904 
1905  /* Method: set_callback
1906 
1907  Sets the callback function for use during training. The user_data is passed to
1908  the callback. It can point to arbitrary data that the callback might require and
1909  can be NULL if it is not used.
1910 
1911  See <FANN::callback_type> for more information about the callback function.
1912 
1913  The default callback function simply prints out some status information.
1914 
1915  This function appears in FANN >= 2.0.0.
1916  */
1917  void set_callback(callback_type callback, void *user_data)
1918  {
1919  if (ann != NULL)
1920  {
1921  // Allocated data is also deleted in the destroy method called by the destructor
1922  user_context *user_instance = static_cast<user_context *>(fann_get_user_data(ann));
1923  if (user_instance != NULL)
1924  delete user_instance;
1925 
1926  user_instance = new user_context();
1927  user_instance->user_callback = callback;
1928  user_instance->user_data = user_data;
1929  user_instance->net = this;
1930  fann_set_user_data(ann, user_instance);
1931 
1932  if (callback != NULL)
1933  fann_set_callback(ann, &FANN::neural_net::internal_callback);
1934  else
1935  fann_set_callback(ann, NULL);
1936  }
1937  }
1938 
1939  /* Method: print_parameters
1940 
1941  Prints all of the parameters and options of the neural network
1942 
1943  See also:
1944  <fann_print_parameters>
1945 
1946  This function appears in FANN >= 1.2.0.
1947  */
1948  void print_parameters()
1949  {
1950  if (ann != NULL)
1951  {
1952  fann_print_parameters(ann);
1953  }
1954  }
1955 
1956  /* Method: get_training_algorithm
1957 
1958  Return the training algorithm as described by <FANN::training_algorithm_enum>.
1959  This training algorithm is used by <train_on_data> and associated functions.
1960 
1961  Note that this algorithm is also used during <cascadetrain_on_data>, although only
1962  FANN::TRAIN_RPROP and FANN::TRAIN_QUICKPROP is allowed during cascade training.
1963 
1964  The default training algorithm is FANN::TRAIN_RPROP.
1965 
1966  See also:
1967  <set_training_algorithm>, <FANN::training_algorithm_enum>,
1968  <fann_get_training_algorithm>
1969 
1970  This function appears in FANN >= 1.0.0.
1971  */
1972  training_algorithm_enum get_training_algorithm()
1973  {
1974  fann_train_enum training_algorithm = FANN_TRAIN_INCREMENTAL;
1975  if (ann != NULL)
1976  {
1977  training_algorithm = fann_get_training_algorithm(ann);
1978  }
1979  return static_cast<training_algorithm_enum>(training_algorithm);
1980  }
1981 
1982  /* Method: set_training_algorithm
1983 
1984  Set the training algorithm.
1985 
1986  More info available in <get_training_algorithm>
1987 
1988  This function appears in FANN >= 1.0.0.
1989  */
1990  void set_training_algorithm(training_algorithm_enum training_algorithm)
1991  {
1992  if (ann != NULL)
1993  {
1994  fann_set_training_algorithm(ann,
1995  static_cast<fann_train_enum>(training_algorithm));
1996  }
1997  }
1998 
1999  /* Method: get_learning_rate
2000 
2001  Return the learning rate.
2002 
2003  The learning rate is used to determine how aggressive training should be for some of the
2004  training algorithms (FANN::TRAIN_INCREMENTAL, FANN::TRAIN_BATCH, FANN::TRAIN_QUICKPROP).
2005  Do however note that it is not used in FANN::TRAIN_RPROP.
2006 
2007  The default learning rate is 0.7.
2008 
2009  See also:
2010  <set_learning_rate>, <set_training_algorithm>,
2011  <fann_get_learning_rate>
2012 
2013  This function appears in FANN >= 1.0.0.
2014  */
2015  float get_learning_rate()
2016  {
2017  float learning_rate = 0.0f;
2018  if (ann != NULL)
2019  {
2020  learning_rate = fann_get_learning_rate(ann);
2021  }
2022  return learning_rate;
2023  }
2024 
2025  /* Method: set_learning_rate
2026 
2027  Set the learning rate.
2028 
2029  More info available in <get_learning_rate>
2030 
2031  This function appears in FANN >= 1.0.0.
2032  */
2033  void set_learning_rate(float learning_rate)
2034  {
2035  if (ann != NULL)
2036  {
2037  fann_set_learning_rate(ann, learning_rate);
2038  }
2039  }
2040 
2041  /*************************************************************************************************************/
2042 
2043  /* Method: get_activation_function
2044 
2045  Get the activation function for neuron number *neuron* in layer number *layer*,
2046  counting the input layer as layer 0.
2047 
2048  It is not possible to get activation functions for the neurons in the input layer.
2049 
2050  Information about the individual activation functions is available at <FANN::activation_function_enum>.
2051 
2052  Returns:
2053  The activation function for the neuron or -1 if the neuron is not defined in the neural network.
2054 
2055  See also:
2056  <set_activation_function_layer>, <set_activation_function_hidden>,
2057  <set_activation_function_output>, <set_activation_steepness>,
2058  <set_activation_function>, <fann_get_activation_function>
2059 
2060  This function appears in FANN >= 2.1.0
2061  */
2062  activation_function_enum get_activation_function(int layer, int neuron)
2063  {
2064  unsigned int activation_function = 0;
2065  if (ann != NULL)
2066  {
2067  activation_function = fann_get_activation_function(ann, layer, neuron);
2068  }
2069  return static_cast<activation_function_enum>(activation_function);
2070  }
2071 
2072  /* Method: set_activation_function
2073 
2074  Set the activation function for neuron number *neuron* in layer number *layer*,
2075  counting the input layer as layer 0.
2076 
2077  It is not possible to set activation functions for the neurons in the input layer.
2078 
2079  When choosing an activation function it is important to note that the activation
2080  functions have different range. FANN::SIGMOID is e.g. in the 0 - 1 range while
2081  FANN::SIGMOID_SYMMETRIC is in the -1 - 1 range and FANN::LINEAR is unbound.
2082 
2083  Information about the individual activation functions is available at <FANN::activation_function_enum>.
2084 
2085  The default activation function is FANN::SIGMOID_STEPWISE.
2086 
2087  See also:
2088  <set_activation_function_layer>, <set_activation_function_hidden>,
2089  <set_activation_function_output>, <set_activation_steepness>,
2090  <get_activation_function>, <fann_set_activation_function>
2091 
2092  This function appears in FANN >= 2.0.0.
2093  */
2094  void set_activation_function(activation_function_enum activation_function, int layer, int neuron)
2095  {
2096  if (ann != NULL)
2097  {
2098  fann_set_activation_function(ann,
2099  static_cast<fann_activationfunc_enum>(activation_function), layer, neuron);
2100  }
2101  }
2102 
2103  /* Method: set_activation_function_layer
2104 
2105  Set the activation function for all the neurons in the layer number *layer*,
2106  counting the input layer as layer 0.
2107 
2108  It is not possible to set activation functions for the neurons in the input layer.
2109 
2110  See also:
2111  <set_activation_function>, <set_activation_function_hidden>,
2112  <set_activation_function_output>, <set_activation_steepness_layer>,
2113  <fann_set_activation_function_layer>
2114 
2115  This function appears in FANN >= 2.0.0.
2116  */
2117  void set_activation_function_layer(activation_function_enum activation_function, int layer)
2118  {
2119  if (ann != NULL)
2120  {
2121  fann_set_activation_function_layer(ann,
2122  static_cast<fann_activationfunc_enum>(activation_function), layer);
2123  }
2124  }
2125 
2126  /* Method: set_activation_function_hidden
2127 
2128  Set the activation function for all of the hidden layers.
2129 
2130  See also:
2131  <set_activation_function>, <set_activation_function_layer>,
2132  <set_activation_function_output>, <set_activation_steepness_hidden>,
2133  <fann_set_activation_function_hidden>
2134 
2135  This function appears in FANN >= 1.0.0.
2136  */
2137  void set_activation_function_hidden(activation_function_enum activation_function)
2138  {
2139  if (ann != NULL)
2140  {
2141  fann_set_activation_function_hidden(ann,
2142  static_cast<fann_activationfunc_enum>(activation_function));
2143  }
2144  }
2145 
2146  /* Method: set_activation_function_output
2147 
2148  Set the activation function for the output layer.
2149 
2150  See also:
2151  <set_activation_function>, <set_activation_function_layer>,
2152  <set_activation_function_hidden>, <set_activation_steepness_output>,
2153  <fann_set_activation_function_output>
2154 
2155  This function appears in FANN >= 1.0.0.
2156  */
2157  void set_activation_function_output(activation_function_enum activation_function)
2158  {
2159  if (ann != NULL)
2160  {
2161  fann_set_activation_function_output(ann,
2162  static_cast<fann_activationfunc_enum>(activation_function));
2163  }
2164  }
2165 
2166  /* Method: get_activation_steepness
2167 
2168  Get the activation steepness for neuron number *neuron* in layer number *layer*,
2169  counting the input layer as layer 0.
2170 
2171  It is not possible to get activation steepness for the neurons in the input layer.
2172 
2173  The steepness of an activation function says something about how fast the activation function
2174  goes from the minimum to the maximum. A high value for the activation function will also
2175  give a more agressive training.
2176 
2177  When training neural networks where the output values should be at the extremes (usually 0 and 1,
2178  depending on the activation function), a steep activation function can be used (e.g. 1.0).
2179 
2180  The default activation steepness is 0.5.
2181 
2182  Returns:
2183  The activation steepness for the neuron or -1 if the neuron is not defined in the neural network.
2184 
2185  See also:
2186  <set_activation_steepness_layer>, <set_activation_steepness_hidden>,
2187  <set_activation_steepness_output>, <set_activation_function>,
2188  <set_activation_steepness>, <fann_get_activation_steepness>
2189 
2190  This function appears in FANN >= 2.1.0
2191  */
2192  fann_type get_activation_steepness(int layer, int neuron)
2193  {
2194  fann_type activation_steepness = 0;
2195  if (ann != NULL)
2196  {
2197  activation_steepness = fann_get_activation_steepness(ann, layer, neuron);
2198  }
2199  return activation_steepness;
2200  }
2201 
2202  /* Method: set_activation_steepness
2203 
2204  Set the activation steepness for neuron number *neuron* in layer number *layer*,
2205  counting the input layer as layer 0.
2206 
2207  It is not possible to set activation steepness for the neurons in the input layer.
2208 
2209  The steepness of an activation function says something about how fast the activation function
2210  goes from the minimum to the maximum. A high value for the activation function will also
2211  give a more agressive training.
2212 
2213  When training neural networks where the output values should be at the extremes (usually 0 and 1,
2214  depending on the activation function), a steep activation function can be used (e.g. 1.0).
2215 
2216  The default activation steepness is 0.5.
2217 
2218  See also:
2219  <set_activation_steepness_layer>, <set_activation_steepness_hidden>,
2220  <set_activation_steepness_output>, <set_activation_function>,
2221  <get_activation_steepness>, <fann_set_activation_steepness>
2222 
2223  This function appears in FANN >= 2.0.0.
2224  */
2225  void set_activation_steepness(fann_type steepness, int layer, int neuron)
2226  {
2227  if (ann != NULL)
2228  {
2229  fann_set_activation_steepness(ann, steepness, layer, neuron);
2230  }
2231  }
2232 
2233  /* Method: set_activation_steepness_layer
2234 
2235  Set the activation steepness all of the neurons in layer number *layer*,
2236  counting the input layer as layer 0.
2237 
2238  It is not possible to set activation steepness for the neurons in the input layer.
2239 
2240  See also:
2241  <set_activation_steepness>, <set_activation_steepness_hidden>,
2242  <set_activation_steepness_output>, <set_activation_function_layer>,
2243  <fann_set_activation_steepness_layer>
2244 
2245  This function appears in FANN >= 2.0.0.
2246  */
2247  void set_activation_steepness_layer(fann_type steepness, int layer)
2248  {
2249  if (ann != NULL)
2250  {
2251  fann_set_activation_steepness_layer(ann, steepness, layer);
2252  }
2253  }
2254 
2255  /* Method: set_activation_steepness_hidden
2256 
2257  Set the steepness of the activation steepness in all of the hidden layers.
2258 
2259  See also:
2260  <set_activation_steepness>, <set_activation_steepness_layer>,
2261  <set_activation_steepness_output>, <set_activation_function_hidden>,
2262  <fann_set_activation_steepness_hidden>
2263 
2264  This function appears in FANN >= 1.2.0.
2265  */
2266  void set_activation_steepness_hidden(fann_type steepness)
2267  {
2268  if (ann != NULL)
2269  {
2270  fann_set_activation_steepness_hidden(ann, steepness);
2271  }
2272  }
2273 
2274  /* Method: set_activation_steepness_output
2275 
2276  Set the steepness of the activation steepness in the output layer.
2277 
2278  See also:
2279  <set_activation_steepness>, <set_activation_steepness_layer>,
2280  <set_activation_steepness_hidden>, <set_activation_function_output>,
2281  <fann_set_activation_steepness_output>
2282 
2283  This function appears in FANN >= 1.2.0.
2284  */
2285  void set_activation_steepness_output(fann_type steepness)
2286  {
2287  if (ann != NULL)
2288  {
2289  fann_set_activation_steepness_output(ann, steepness);
2290  }
2291  }
2292 
2293  /*************************************************************************************************************/
2294 
2295  /* Method: get_train_error_function
2296 
2297  Returns the error function used during training.
2298 
2299  The error functions is described further in <FANN::error_function_enum>
2300 
2301  The default error function is FANN::ERRORFUNC_TANH
2302 
2303  See also:
2304  <set_train_error_function>, <fann_get_train_error_function>
2305 
2306  This function appears in FANN >= 1.2.0.
2307  */
2308  error_function_enum get_train_error_function()
2309  {
2310  fann_errorfunc_enum train_error_function = FANN_ERRORFUNC_LINEAR;
2311  if (ann != NULL)
2312  {
2313  train_error_function = fann_get_train_error_function(ann);
2314  }
2315  return static_cast<error_function_enum>(train_error_function);
2316  }
2317 
2318  /* Method: set_train_error_function
2319 
2320  Set the error function used during training.
2321 
2322  The error functions is described further in <FANN::error_function_enum>
2323 
2324  See also:
2325  <get_train_error_function>, <fann_set_train_error_function>
2326 
2327  This function appears in FANN >= 1.2.0.
2328  */
2329  void set_train_error_function(error_function_enum train_error_function)
2330  {
2331  if (ann != NULL)
2332  {
2333  fann_set_train_error_function(ann,
2334  static_cast<fann_errorfunc_enum>(train_error_function));
2335  }
2336  }
2337 
2338  /* Method: get_quickprop_decay
2339 
2340  The decay is a small negative valued number which is the factor that the weights
2341  should become smaller in each iteration during quickprop training. This is used
2342  to make sure that the weights do not become too high during training.
2343 
2344  The default decay is -0.0001.
2345 
2346  See also:
2347  <set_quickprop_decay>, <fann_get_quickprop_decay>
2348 
2349  This function appears in FANN >= 1.2.0.
2350  */
2351  float get_quickprop_decay()
2352  {
2353  float quickprop_decay = 0.0f;
2354  if (ann != NULL)
2355  {
2356  quickprop_decay = fann_get_quickprop_decay(ann);
2357  }
2358  return quickprop_decay;
2359  }
2360 
2361  /* Method: set_quickprop_decay
2362 
2363  Sets the quickprop decay factor.
2364 
2365  See also:
2366  <get_quickprop_decay>, <fann_set_quickprop_decay>
2367 
2368  This function appears in FANN >= 1.2.0.
2369  */
2370  void set_quickprop_decay(float quickprop_decay)
2371  {
2372  if (ann != NULL)
2373  {
2374  fann_set_quickprop_decay(ann, quickprop_decay);
2375  }
2376  }
2377 
2378  /* Method: get_quickprop_mu
2379 
2380  The mu factor is used to increase and decrease the step-size during quickprop training.
2381  The mu factor should always be above 1, since it would otherwise decrease the step-size
2382  when it was suppose to increase it.
2383 
2384  The default mu factor is 1.75.
2385 
2386  See also:
2387  <set_quickprop_mu>, <fann_get_quickprop_mu>
2388 
2389  This function appears in FANN >= 1.2.0.
2390  */
2391  float get_quickprop_mu()
2392  {
2393  float quickprop_mu = 0.0f;
2394  if (ann != NULL)
2395  {
2396  quickprop_mu = fann_get_quickprop_mu(ann);
2397  }
2398  return quickprop_mu;
2399  }
2400 
2401  /* Method: set_quickprop_mu
2402 
2403  Sets the quickprop mu factor.
2404 
2405  See also:
2406  <get_quickprop_mu>, <fann_set_quickprop_mu>
2407 
2408  This function appears in FANN >= 1.2.0.
2409  */
2410  void set_quickprop_mu(float quickprop_mu)
2411  {
2412  if (ann != NULL)
2413  {
2414  fann_set_quickprop_mu(ann, quickprop_mu);
2415  }
2416  }
2417 
2418  /* Method: get_rprop_increase_factor
2419 
2420  The increase factor is a value larger than 1, which is used to
2421  increase the step-size during RPROP training.
2422 
2423  The default increase factor is 1.2.
2424 
2425  See also:
2426  <set_rprop_increase_factor>, <fann_get_rprop_increase_factor>
2427 
2428  This function appears in FANN >= 1.2.0.
2429  */
2430  float get_rprop_increase_factor()
2431  {
2432  float factor = 0.0f;
2433  if (ann != NULL)
2434  {
2435  factor = fann_get_rprop_increase_factor(ann);
2436  }
2437  return factor;
2438  }
2439 
2440  /* Method: set_rprop_increase_factor
2441 
2442  The increase factor used during RPROP training.
2443 
2444  See also:
2445  <get_rprop_increase_factor>, <fann_set_rprop_increase_factor>
2446 
2447  This function appears in FANN >= 1.2.0.
2448  */
2449  void set_rprop_increase_factor(float rprop_increase_factor)
2450  {
2451  if (ann != NULL)
2452  {
2453  fann_set_rprop_increase_factor(ann, rprop_increase_factor);
2454  }
2455  }
2456 
2457  /* Method: get_rprop_decrease_factor
2458 
2459  The decrease factor is a value smaller than 1, which is used to decrease the step-size during RPROP training.
2460 
2461  The default decrease factor is 0.5.
2462 
2463  See also:
2464  <set_rprop_decrease_factor>, <fann_get_rprop_decrease_factor>
2465 
2466  This function appears in FANN >= 1.2.0.
2467  */
2468  float get_rprop_decrease_factor()
2469  {
2470  float factor = 0.0f;
2471  if (ann != NULL)
2472  {
2473  factor = fann_get_rprop_decrease_factor(ann);
2474  }
2475  return factor;
2476  }
2477 
2478  /* Method: set_rprop_decrease_factor
2479 
2480  The decrease factor is a value smaller than 1, which is used to decrease the step-size during RPROP training.
2481 
2482  See also:
2483  <get_rprop_decrease_factor>, <fann_set_rprop_decrease_factor>
2484 
2485  This function appears in FANN >= 1.2.0.
2486  */
2487  void set_rprop_decrease_factor(float rprop_decrease_factor)
2488  {
2489  if (ann != NULL)
2490  {
2491  fann_set_rprop_decrease_factor(ann, rprop_decrease_factor);
2492  }
2493  }
2494 
2495  /* Method: get_rprop_delta_min
2496 
2497  The minimum step-size is a small positive number determining how small the minimum step-size may be.
2498 
2499  The default value delta min is 0.0.
2500 
2501  See also:
2502  <set_rprop_delta_min>, <fann_get_rprop_delta_min>
2503 
2504  This function appears in FANN >= 1.2.0.
2505  */
2506  float get_rprop_delta_min()
2507  {
2508  float delta = 0.0f;
2509  if (ann != NULL)
2510  {
2511  delta = fann_get_rprop_delta_min(ann);
2512  }
2513  return delta;
2514  }
2515 
2516  /* Method: set_rprop_delta_min
2517 
2518  The minimum step-size is a small positive number determining how small the minimum step-size may be.
2519 
2520  See also:
2521  <get_rprop_delta_min>, <fann_set_rprop_delta_min>
2522 
2523  This function appears in FANN >= 1.2.0.
2524  */
2525  void set_rprop_delta_min(float rprop_delta_min)
2526  {
2527  if (ann != NULL)
2528  {
2529  fann_set_rprop_delta_min(ann, rprop_delta_min);
2530  }
2531  }
2532 
2533  /* Method: get_rprop_delta_max
2534 
2535  The maximum step-size is a positive number determining how large the maximum step-size may be.
2536 
2537  The default delta max is 50.0.
2538 
2539  See also:
2540  <set_rprop_delta_max>, <get_rprop_delta_min>, <fann_get_rprop_delta_max>
2541 
2542  This function appears in FANN >= 1.2.0.
2543  */
2544  float get_rprop_delta_max()
2545  {
2546  float delta = 0.0f;
2547  if (ann != NULL)
2548  {
2549  delta = fann_get_rprop_delta_max(ann);
2550  }
2551  return delta;
2552  }
2553 
2554  /* Method: set_rprop_delta_max
2555 
2556  The maximum step-size is a positive number determining how large the maximum step-size may be.
2557 
2558  See also:
2559  <get_rprop_delta_max>, <get_rprop_delta_min>, <fann_set_rprop_delta_max>
2560 
2561  This function appears in FANN >= 1.2.0.
2562  */
2563  void set_rprop_delta_max(float rprop_delta_max)
2564  {
2565  if (ann != NULL)
2566  {
2567  fann_set_rprop_delta_max(ann, rprop_delta_max);
2568  }
2569  }
2570 
2571  /* Method: get_num_input
2572 
2573  Get the number of input neurons.
2574 
2575  This function appears in FANN >= 1.0.0.
2576  */
2577  unsigned int get_num_input()
2578  {
2579  unsigned int num_input = 0;
2580  if (ann != NULL)
2581  {
2582  num_input = fann_get_num_input(ann);
2583  }
2584  return num_input;
2585  }
2586 
2587  /* Method: get_num_output
2588 
2589  Get the number of output neurons.
2590 
2591  This function appears in FANN >= 1.0.0.
2592  */
2593  unsigned int get_num_output()
2594  {
2595  unsigned int num_output = 0;
2596  if (ann != NULL)
2597  {
2598  num_output = fann_get_num_output(ann);
2599  }
2600  return num_output;
2601  }
2602 
2603  /* Method: get_total_neurons
2604 
2605  Get the total number of neurons in the entire network. This number does also include the
2606  bias neurons, so a 2-4-2 network has 2+4+2 +2(bias) = 10 neurons.
2607 
2608  This function appears in FANN >= 1.0.0.
2609  */
2610  unsigned int get_total_neurons()
2611  {
2612  if (ann == NULL)
2613  {
2614  return 0;
2615  }
2616  return fann_get_total_neurons(ann);
2617  }
2618 
2619  /* Method: get_total_connections
2620 
2621  Get the total number of connections in the entire network.
2622 
2623  This function appears in FANN >= 1.0.0.
2624  */
2625  unsigned int get_total_connections()
2626  {
2627  if (ann == NULL)
2628  {
2629  return 0;
2630  }
2631  return fann_get_total_connections(ann);
2632  }
2633 
2634 #ifdef FIXEDFANN
2635  /* Method: get_decimal_point
2636 
2637  Returns the position of the decimal point in the ann.
2638 
2639  This function is only available when the ANN is in fixed point mode.
2640 
2641  The decimal point is described in greater detail in the tutorial <Fixed Point Usage>.
2642 
2643  See also:
2644  <Fixed Point Usage>, <get_multiplier>, <save_to_fixed>,
2645  <training_data::save_train_to_fixed>, <fann_get_decimal_point>
2646 
2647  This function appears in FANN >= 1.0.0.
2648  */
2649  unsigned int get_decimal_point()
2650  {
2651  if (ann == NULL)
2652  {
2653  return 0;
2654  }
2655  return fann_get_decimal_point(ann);
2656  }
2657 
2658  /* Method: get_multiplier
2659 
2660  Returns the multiplier that fix point data is multiplied with.
2661 
2662  This function is only available when the ANN is in fixed point mode.
2663 
2664  The multiplier is the used to convert between floating point and fixed point notation.
2665  A floating point number is multiplied with the multiplier in order to get the fixed point
2666  number and visa versa.
2667 
2668  The multiplier is described in greater detail in the tutorial <Fixed Point Usage>.
2669 
2670  See also:
2671  <Fixed Point Usage>, <get_decimal_point>, <save_to_fixed>,
2672  <training_data::save_train_to_fixed>, <fann_get_multiplier>
2673 
2674  This function appears in FANN >= 1.0.0.
2675  */
2676  unsigned int get_multiplier()
2677  {
2678  if (ann == NULL)
2679  {
2680  return 0;
2681  }
2682  return fann_get_multiplier(ann);
2683  }
2684 #endif /* FIXEDFANN */
2685 
2686  /*********************************************************************/
2687 
2688  /* Method: get_network_type
2689 
2690  Get the type of neural network it was created as.
2691 
2692  Returns:
2693  The neural network type from enum <FANN::network_type_enum>
2694 
2695  See Also:
2696  <fann_get_network_type>
2697 
2698  This function appears in FANN >= 2.1.0
2699  */
2700  network_type_enum get_network_type()
2701  {
2702  fann_nettype_enum network_type = FANN_NETTYPE_LAYER;
2703  if (ann != NULL)
2704  {
2705  network_type = fann_get_network_type(ann);
2706  }
2707  return static_cast<network_type_enum>(network_type);
2708  }
2709 
2710  /* Method: get_connection_rate
2711 
2712  Get the connection rate used when the network was created
2713 
2714  Returns:
2715  The connection rate
2716 
2717  See also:
2718  <fann_get_connection_rate>
2719 
2720  This function appears in FANN >= 2.1.0
2721  */
2722  float get_connection_rate()
2723  {
2724  if (ann == NULL)
2725  {
2726  return 0;
2727  }
2728  return fann_get_connection_rate(ann);
2729  }
2730 
2731  /* Method: get_num_layers
2732 
2733  Get the number of layers in the network
2734 
2735  Returns:
2736  The number of layers in the neural network
2737 
2738  See also:
2739  <fann_get_num_layers>
2740 
2741  This function appears in FANN >= 2.1.0
2742  */
2743  unsigned int get_num_layers()
2744  {
2745  if (ann == NULL)
2746  {
2747  return 0;
2748  }
2749  return fann_get_num_layers(ann);
2750  }
2751 
2752  /* Method: get_layer_array
2753 
2754  Get the number of neurons in each layer in the network.
2755 
2756  Bias is not included so the layers match the create methods.
2757 
2758  The layers array must be preallocated to at least
2759  sizeof(unsigned int) * get_num_layers() long.
2760 
2761  See also:
2762  <fann_get_layer_array>
2763 
2764  This function appears in FANN >= 2.1.0
2765  */
2766  void get_layer_array(unsigned int *layers)
2767  {
2768  if (ann != NULL)
2769  {
2770  fann_get_layer_array(ann, layers);
2771  }
2772  }
2773 
2774  void get_layer_array(std::vector<unsigned int> vlayers)
2775  {
2776  vlayers.clear();
2777  if (ann != NULL){
2778  vlayers.resize(get_num_layers());
2779  unsigned int* layers=(unsigned int *)calloc(get_num_layers(),sizeof(unsigned int));
2780  fann_get_layer_array(ann, layers);
2781  for(int ilayer=0;ilayer<get_num_layers();++ilayer)
2782  vlayers[ilayer]=*(layers++);
2783  }
2784  }
2785 
2786  /* Method: get_bias_array
2787 
2788  Get the number of bias in each layer in the network.
2789 
2790  The bias array must be preallocated to at least
2791  sizeof(unsigned int) * get_num_layers() long.
2792 
2793  See also:
2794  <fann_get_bias_array>
2795 
2796  This function appears in FANN >= 2.1.0
2797  */
2798  void get_bias_array(unsigned int *bias)
2799  {
2800  if (ann != NULL)
2801  {
2802  fann_get_bias_array(ann, bias);
2803  }
2804  }
2805 
2806  /* Method: get_connection_array
2807 
2808  Get the connections in the network.
2809 
2810  The connections array must be preallocated to at least
2811  sizeof(struct fann_connection) * get_total_connections() long.
2812 
2813  See also:
2814  <fann_get_connection_array>
2815 
2816  This function appears in FANN >= 2.1.0
2817  */
2818  void get_connection_array(connection *connections)
2819  {
2820  if (ann != NULL)
2821  {
2822  fann_get_connection_array(ann, connections);
2823  }
2824  }
2825 
2826  void get_connection_array(std::vector<connection>& convector)
2827  {
2828  convector.clear();
2829  if (ann != NULL)
2830  {
2831  convector.resize(get_total_connections());
2832  connection* connections=(connection*)calloc(get_total_connections(),sizeof(connection));
2833  fann_get_connection_array(ann, connections);
2834  for(int icon=0;icon<get_total_connections();++icon)
2835  convector[icon]=*(connections++);
2836  }
2837  }
2838 
2839  /* Method: set_weight_array
2840 
2841  Set connections in the network.
2842 
2843  Only the weights can be changed, connections and weights are ignored
2844  if they do not already exist in the network.
2845 
2846  The array must have sizeof(struct fann_connection) * num_connections size.
2847 
2848  See also:
2849  <fann_set_weight_array>
2850 
2851  This function appears in FANN >= 2.1.0
2852  */
2853  void set_weight_array(connection *connections, unsigned int num_connections)
2854  {
2855  if (ann != NULL)
2856  {
2857  fann_set_weight_array(ann, connections, num_connections);
2858  }
2859  }
2860 
2861  void set_weight_array(std::vector<connection> convector)
2862  {
2863  if (ann != NULL)
2864  {
2865  unsigned int num_connections=convector.size();
2866  connection* connections=(connection*)calloc(num_connections,sizeof(connection));
2867  connections=&(convector[0]);
2868  fann_set_weight_array(ann, connections, num_connections);
2869  }
2870  }
2871 
2872  /* Method: set_weight
2873 
2874  Set a connection in the network.
2875 
2876  Only the weights can be changed. The connection/weight is
2877  ignored if it does not already exist in the network.
2878 
2879  See also:
2880  <fann_set_weight>
2881 
2882  This function appears in FANN >= 2.1.0
2883  */
2884  void set_weight(unsigned int from_neuron, unsigned int to_neuron, fann_type weight)
2885  {
2886  if (ann != NULL)
2887  {
2888  fann_set_weight(ann, from_neuron, to_neuron, weight);
2889  }
2890  }
2891 
2892  /*********************************************************************/
2893 
2894  /* Method: get_learning_momentum
2895 
2896  Get the learning momentum.
2897 
2898  The learning momentum can be used to speed up FANN::TRAIN_INCREMENTAL training.
2899  A too high momentum will however not benefit training. Setting momentum to 0 will
2900  be the same as not using the momentum parameter. The recommended value of this parameter
2901  is between 0.0 and 1.0.
2902 
2903  The default momentum is 0.
2904 
2905  See also:
2906  <set_learning_momentum>, <set_training_algorithm>
2907 
2908  This function appears in FANN >= 2.0.0.
2909  */
2910  float get_learning_momentum()
2911  {
2912  float learning_momentum = 0.0f;
2913  if (ann != NULL)
2914  {
2915  learning_momentum = fann_get_learning_momentum(ann);
2916  }
2917  return learning_momentum;
2918  }
2919 
2920  /* Method: set_learning_momentum
2921 
2922  Set the learning momentum.
2923 
2924  More info available in <get_learning_momentum>
2925 
2926  This function appears in FANN >= 2.0.0.
2927  */
2928  void set_learning_momentum(float learning_momentum)
2929  {
2930  if (ann != NULL)
2931  {
2932  fann_set_learning_momentum(ann, learning_momentum);
2933  }
2934  }
2935 
2936  /* Method: get_train_stop_function
2937 
2938  Returns the the stop function used during training.
2939 
2940  The stop function is described further in <FANN::stop_function_enum>
2941 
2942  The default stop function is FANN::STOPFUNC_MSE
2943 
2944  See also:
2945  <get_train_stop_function>, <get_bit_fail_limit>
2946 
2947  This function appears in FANN >= 2.0.0.
2948  */
2949  stop_function_enum get_train_stop_function()
2950  {
2951  enum fann_stopfunc_enum stopfunc = FANN_STOPFUNC_MSE;
2952  if (ann != NULL)
2953  {
2954  stopfunc = fann_get_train_stop_function(ann);
2955  }
2956  return static_cast<stop_function_enum>(stopfunc);
2957  }
2958 
2959  /* Method: set_train_stop_function
2960 
2961  Set the stop function used during training.
2962 
2963  The stop function is described further in <FANN::stop_function_enum>
2964 
2965  See also:
2966  <get_train_stop_function>
2967 
2968  This function appears in FANN >= 2.0.0.
2969  */
2970  void set_train_stop_function(stop_function_enum train_stop_function)
2971  {
2972  if (ann != NULL)
2973  {
2974  fann_set_train_stop_function(ann,
2975  static_cast<enum fann_stopfunc_enum>(train_stop_function));
2976  }
2977  }
2978 
2979  /* Method: get_bit_fail_limit
2980 
2981  Returns the bit fail limit used during training.
2982 
2983  The bit fail limit is used during training when the <FANN::stop_function_enum> is set to FANN_STOPFUNC_BIT.
2984 
2985  The limit is the maximum accepted difference between the desired output and the actual output during
2986  training. Each output that diverges more than this limit is counted as an error bit.
2987  This difference is divided by two when dealing with symmetric activation functions,
2988  so that symmetric and not symmetric activation functions can use the same limit.
2989 
2990  The default bit fail limit is 0.35.
2991 
2992  See also:
2993  <set_bit_fail_limit>
2994 
2995  This function appears in FANN >= 2.0.0.
2996  */
2997  fann_type get_bit_fail_limit()
2998  {
2999  fann_type bit_fail_limit = 0.0f;
3000 
3001  if (ann != NULL)
3002  {
3003  bit_fail_limit = fann_get_bit_fail_limit(ann);
3004  }
3005  return bit_fail_limit;
3006  }
3007 
3008  /* Method: set_bit_fail_limit
3009 
3010  Set the bit fail limit used during training.
3011 
3012  See also:
3013  <get_bit_fail_limit>
3014 
3015  This function appears in FANN >= 2.0.0.
3016  */
3017  void set_bit_fail_limit(fann_type bit_fail_limit)
3018  {
3019  if (ann != NULL)
3020  {
3021  fann_set_bit_fail_limit(ann, bit_fail_limit);
3022  }
3023  }
3024 
3025  /* Method: get_bit_fail
3026 
3027  The number of fail bits; means the number of output neurons which differ more
3028  than the bit fail limit (see <get_bit_fail_limit>, <set_bit_fail_limit>).
3029  The bits are counted in all of the training data, so this number can be higher than
3030  the number of training data.
3031 
3032  This value is reset by <reset_MSE> and updated by all the same functions which also
3033  updates the MSE value (e.g. <test_data>, <train_epoch>)
3034 
3035  See also:
3036  <FANN::stop_function_enum>, <get_MSE>
3037 
3038  This function appears in FANN >= 2.0.0
3039  */
3040  unsigned int get_bit_fail()
3041  {
3042  unsigned int bit_fail = 0;
3043  if (ann != NULL)
3044  {
3045  bit_fail = fann_get_bit_fail(ann);
3046  }
3047  return bit_fail;
3048  }
3049 
3050  /*********************************************************************/
3051 
3052  /* Method: cascadetrain_on_data
3053 
3054  Trains on an entire dataset, for a period of time using the Cascade2 training algorithm.
3055  This algorithm adds neurons to the neural network while training, which means that it
3056  needs to start with an ANN without any hidden layers. The neural network should also use
3057  shortcut connections, so <create_shortcut> should be used to create the ANN like this:
3058  >net.create_shortcut(2, train_data.num_input_train_data(), train_data.num_output_train_data());
3059 
3060  This training uses the parameters set using the set_cascade_..., but it also uses another
3061  training algorithm as it's internal training algorithm. This algorithm can be set to either
3062  FANN::TRAIN_RPROP or FANN::TRAIN_QUICKPROP by <set_training_algorithm>, and the parameters
3063  set for these training algorithms will also affect the cascade training.
3064 
3065  Parameters:
3066  data - The data, which should be used during training
3067  max_neuron - The maximum number of neurons to be added to neural network
3068  neurons_between_reports - The number of neurons between printing a status report to stdout.
3069  A value of zero means no reports should be printed.
3070  desired_error - The desired <fann_get_MSE> or <fann_get_bit_fail>, depending on which stop function
3071  is chosen by <fann_set_train_stop_function>.
3072 
3073  Instead of printing out reports every neurons_between_reports, a callback function can be called
3074  (see <set_callback>).
3075 
3076  See also:
3077  <train_on_data>, <cascadetrain_on_file>, <fann_cascadetrain_on_data>
3078 
3079  This function appears in FANN >= 2.0.0.
3080  */
3081  void cascadetrain_on_data(const training_data &data, unsigned int max_neurons,
3082  unsigned int neurons_between_reports, float desired_error)
3083  {
3084  if ((ann != NULL) && (data.train_data != NULL))
3085  {
3086  fann_cascadetrain_on_data(ann, data.train_data, max_neurons,
3087  neurons_between_reports, desired_error);
3088  }
3089  }
3090 
3091  /* Method: cascadetrain_on_file
3092 
3093  Does the same as <cascadetrain_on_data>, but reads the training data directly from a file.
3094 
3095  See also:
3096  <fann_cascadetrain_on_data>, <fann_cascadetrain_on_file>
3097 
3098  This function appears in FANN >= 2.0.0.
3099  */
3100  void cascadetrain_on_file(const std::string &filename, unsigned int max_neurons,
3101  unsigned int neurons_between_reports, float desired_error)
3102  {
3103  if (ann != NULL)
3104  {
3105  fann_cascadetrain_on_file(ann, filename.c_str(),
3106  max_neurons, neurons_between_reports, desired_error);
3107  }
3108  }
3109 
3110  /* Method: get_cascade_output_change_fraction
3111 
3112  The cascade output change fraction is a number between 0 and 1 determining how large a fraction
3113  the <get_MSE> value should change within <get_cascade_output_stagnation_epochs> during
3114  training of the output connections, in order for the training not to stagnate. If the training
3115  stagnates, the training of the output connections will be ended and new candidates will be prepared.
3116 
3117  This means:
3118  If the MSE does not change by a fraction of <get_cascade_output_change_fraction> during a
3119  period of <get_cascade_output_stagnation_epochs>, the training of the output connections
3120  is stopped because the training has stagnated.
3121 
3122  If the cascade output change fraction is low, the output connections will be trained more and if the
3123  fraction is high they will be trained less.
3124 
3125  The default cascade output change fraction is 0.01, which is equalent to a 1% change in MSE.
3126 
3127  See also:
3128  <set_cascade_output_change_fraction>, <get_MSE>,
3129  <get_cascade_output_stagnation_epochs>, <fann_get_cascade_output_change_fraction>
3130 
3131  This function appears in FANN >= 2.0.0.
3132  */
3133  float get_cascade_output_change_fraction()
3134  {
3135  float change_fraction = 0.0f;
3136  if (ann != NULL)
3137  {
3138  change_fraction = fann_get_cascade_output_change_fraction(ann);
3139  }
3140  return change_fraction;
3141  }
3142 
3143  /* Method: set_cascade_output_change_fraction
3144 
3145  Sets the cascade output change fraction.
3146 
3147  See also:
3148  <get_cascade_output_change_fraction>, <fann_set_cascade_output_change_fraction>
3149 
3150  This function appears in FANN >= 2.0.0.
3151  */
3152  void set_cascade_output_change_fraction(float cascade_output_change_fraction)
3153  {
3154  if (ann != NULL)
3155  {
3156  fann_set_cascade_output_change_fraction(ann, cascade_output_change_fraction);
3157  }
3158  }
3159 
3160  /* Method: get_cascade_output_stagnation_epochs
3161 
3162  The number of cascade output stagnation epochs determines the number of epochs training is allowed to
3163  continue without changing the MSE by a fraction of <get_cascade_output_change_fraction>.
3164 
3165  See more info about this parameter in <get_cascade_output_change_fraction>.
3166 
3167  The default number of cascade output stagnation epochs is 12.
3168 
3169  See also:
3170  <set_cascade_output_stagnation_epochs>, <get_cascade_output_change_fraction>,
3171  <fann_get_cascade_output_stagnation_epochs>
3172 
3173  This function appears in FANN >= 2.0.0.
3174  */
3175  unsigned int get_cascade_output_stagnation_epochs()
3176  {
3177  unsigned int stagnation_epochs = 0;
3178  if (ann != NULL)
3179  {
3180  stagnation_epochs = fann_get_cascade_output_stagnation_epochs(ann);
3181  }
3182  return stagnation_epochs;
3183  }
3184 
3185  /* Method: set_cascade_output_stagnation_epochs
3186 
3187  Sets the number of cascade output stagnation epochs.
3188 
3189  See also:
3190  <get_cascade_output_stagnation_epochs>, <fann_set_cascade_output_stagnation_epochs>
3191 
3192  This function appears in FANN >= 2.0.0.
3193  */
3194  void set_cascade_output_stagnation_epochs(unsigned int cascade_output_stagnation_epochs)
3195  {
3196  if (ann != NULL)
3197  {
3198  fann_set_cascade_output_stagnation_epochs(ann, cascade_output_stagnation_epochs);
3199  }
3200  }
3201 
3202  /* Method: get_cascade_candidate_change_fraction
3203 
3204  The cascade candidate change fraction is a number between 0 and 1 determining how large a fraction
3205  the <get_MSE> value should change within <get_cascade_candidate_stagnation_epochs> during
3206  training of the candidate neurons, in order for the training not to stagnate. If the training
3207  stagnates, the training of the candidate neurons will be ended and the best candidate will be selected.
3208 
3209  This means:
3210  If the MSE does not change by a fraction of <get_cascade_candidate_change_fraction> during a
3211  period of <get_cascade_candidate_stagnation_epochs>, the training of the candidate neurons
3212  is stopped because the training has stagnated.
3213 
3214  If the cascade candidate change fraction is low, the candidate neurons will be trained more and if the
3215  fraction is high they will be trained less.
3216 
3217  The default cascade candidate change fraction is 0.01, which is equalent to a 1% change in MSE.
3218 
3219  See also:
3220  <set_cascade_candidate_change_fraction>, <get_MSE>,
3221  <get_cascade_candidate_stagnation_epochs>, <fann_get_cascade_candidate_change_fraction>
3222 
3223  This function appears in FANN >= 2.0.0.
3224  */
3225  float get_cascade_candidate_change_fraction()
3226  {
3227  float change_fraction = 0.0f;
3228  if (ann != NULL)
3229  {
3230  change_fraction = fann_get_cascade_candidate_change_fraction(ann);
3231  }
3232  return change_fraction;
3233  }
3234 
3235  /* Method: set_cascade_candidate_change_fraction
3236 
3237  Sets the cascade candidate change fraction.
3238 
3239  See also:
3240  <get_cascade_candidate_change_fraction>,
3241  <fann_set_cascade_candidate_change_fraction>
3242 
3243  This function appears in FANN >= 2.0.0.
3244  */
3245  void set_cascade_candidate_change_fraction(float cascade_candidate_change_fraction)
3246  {
3247  if (ann != NULL)
3248  {
3249  fann_set_cascade_candidate_change_fraction(ann, cascade_candidate_change_fraction);
3250  }
3251  }
3252 
3253  /* Method: get_cascade_candidate_stagnation_epochs
3254 
3255  The number of cascade candidate stagnation epochs determines the number of epochs training is allowed to
3256  continue without changing the MSE by a fraction of <get_cascade_candidate_change_fraction>.
3257 
3258  See more info about this parameter in <get_cascade_candidate_change_fraction>.
3259 
3260  The default number of cascade candidate stagnation epochs is 12.
3261 
3262  See also:
3263  <set_cascade_candidate_stagnation_epochs>, <get_cascade_candidate_change_fraction>,
3264  <fann_get_cascade_candidate_stagnation_epochs>
3265 
3266  This function appears in FANN >= 2.0.0.
3267  */
3268  unsigned int get_cascade_candidate_stagnation_epochs()
3269  {
3270  unsigned int stagnation_epochs = 0;
3271  if (ann != NULL)
3272  {
3273  stagnation_epochs = fann_get_cascade_candidate_stagnation_epochs(ann);
3274  }
3275  return stagnation_epochs;
3276  }
3277 
3278  /* Method: set_cascade_candidate_stagnation_epochs
3279 
3280  Sets the number of cascade candidate stagnation epochs.
3281 
3282  See also:
3283  <get_cascade_candidate_stagnation_epochs>,
3284  <fann_set_cascade_candidate_stagnation_epochs>
3285 
3286  This function appears in FANN >= 2.0.0.
3287  */
3288  void set_cascade_candidate_stagnation_epochs(unsigned int cascade_candidate_stagnation_epochs)
3289  {
3290  if (ann != NULL)
3291  {
3292  fann_set_cascade_candidate_stagnation_epochs(ann, cascade_candidate_stagnation_epochs);
3293  }
3294  }
3295 
3296  /* Method: get_cascade_weight_multiplier
3297 
3298  The weight multiplier is a parameter which is used to multiply the weights from the candidate neuron
3299  before adding the neuron to the neural network. This parameter is usually between 0 and 1, and is used
3300  to make the training a bit less aggressive.
3301 
3302  The default weight multiplier is 0.4
3303 
3304  See also:
3305  <set_cascade_weight_multiplier>, <fann_get_cascade_weight_multiplier>
3306 
3307  This function appears in FANN >= 2.0.0.
3308  */
3309  fann_type get_cascade_weight_multiplier()
3310  {
3311  fann_type weight_multiplier = 0;
3312  if (ann != NULL)
3313  {
3314  weight_multiplier = fann_get_cascade_weight_multiplier(ann);
3315  }
3316  return weight_multiplier;
3317  }
3318 
3319  /* Method: set_cascade_weight_multiplier
3320 
3321  Sets the weight multiplier.
3322 
3323  See also:
3324  <get_cascade_weight_multiplier>, <fann_set_cascade_weight_multiplier>
3325 
3326  This function appears in FANN >= 2.0.0.
3327  */
3328  void set_cascade_weight_multiplier(fann_type cascade_weight_multiplier)
3329  {
3330  if (ann != NULL)
3331  {
3332  fann_set_cascade_weight_multiplier(ann, cascade_weight_multiplier);
3333  }
3334  }
3335 
3336  /* Method: get_cascade_candidate_limit
3337 
3338  The candidate limit is a limit for how much the candidate neuron may be trained.
3339  The limit is a limit on the proportion between the MSE and candidate score.
3340 
3341  Set this to a lower value to avoid overfitting and to a higher if overfitting is
3342  not a problem.
3343 
3344  The default candidate limit is 1000.0
3345 
3346  See also:
3347  <set_cascade_candidate_limit>, <fann_get_cascade_candidate_limit>
3348 
3349  This function appears in FANN >= 2.0.0.
3350  */
3351  fann_type get_cascade_candidate_limit()
3352  {
3353  fann_type candidate_limit = 0;
3354  if (ann != NULL)
3355  {
3356  candidate_limit = fann_get_cascade_candidate_limit(ann);
3357  }
3358  return candidate_limit;
3359  }
3360 
3361  /* Method: set_cascade_candidate_limit
3362 
3363  Sets the candidate limit.
3364 
3365  See also:
3366  <get_cascade_candidate_limit>, <fann_set_cascade_candidate_limit>
3367 
3368  This function appears in FANN >= 2.0.0.
3369  */
3370  void set_cascade_candidate_limit(fann_type cascade_candidate_limit)
3371  {
3372  if (ann != NULL)
3373  {
3374  fann_set_cascade_candidate_limit(ann, cascade_candidate_limit);
3375  }
3376  }
3377 
3378  /* Method: get_cascade_max_out_epochs
3379 
3380  The maximum out epochs determines the maximum number of epochs the output connections
3381  may be trained after adding a new candidate neuron.
3382 
3383  The default max out epochs is 150
3384 
3385  See also:
3386  <set_cascade_max_out_epochs>, <fann_get_cascade_max_out_epochs>
3387 
3388  This function appears in FANN >= 2.0.0.
3389  */
3390  unsigned int get_cascade_max_out_epochs()
3391  {
3392  unsigned int max_out_epochs = 0;
3393  if (ann != NULL)
3394  {
3395  max_out_epochs = fann_get_cascade_max_out_epochs(ann);
3396  }
3397  return max_out_epochs;
3398  }
3399 
3400  /* Method: set_cascade_max_out_epochs
3401 
3402  Sets the maximum out epochs.
3403 
3404  See also:
3405  <get_cascade_max_out_epochs>, <fann_set_cascade_max_out_epochs>
3406 
3407  This function appears in FANN >= 2.0.0.
3408  */
3409  void set_cascade_max_out_epochs(unsigned int cascade_max_out_epochs)
3410  {
3411  if (ann != NULL)
3412  {
3413  fann_set_cascade_max_out_epochs(ann, cascade_max_out_epochs);
3414  }
3415  }
3416 
3417  /* Method: get_cascade_max_cand_epochs
3418 
3419  The maximum candidate epochs determines the maximum number of epochs the input
3420  connections to the candidates may be trained before adding a new candidate neuron.
3421 
3422  The default max candidate epochs is 150
3423 
3424  See also:
3425  <set_cascade_max_cand_epochs>, <fann_get_cascade_max_cand_epochs>
3426 
3427  This function appears in FANN >= 2.0.0.
3428  */
3429  unsigned int get_cascade_max_cand_epochs()
3430  {
3431  unsigned int max_cand_epochs = 0;
3432  if (ann != NULL)
3433  {
3434  max_cand_epochs = fann_get_cascade_max_cand_epochs(ann);
3435  }
3436  return max_cand_epochs;
3437  }
3438 
3439  /* Method: set_cascade_max_cand_epochs
3440 
3441  Sets the max candidate epochs.
3442 
3443  See also:
3444  <get_cascade_max_cand_epochs>, <fann_set_cascade_max_cand_epochs>
3445 
3446  This function appears in FANN >= 2.0.0.
3447  */
3448  void set_cascade_max_cand_epochs(unsigned int cascade_max_cand_epochs)
3449  {
3450  if (ann != NULL)
3451  {
3452  fann_set_cascade_max_cand_epochs(ann, cascade_max_cand_epochs);
3453  }
3454  }
3455 
3456  /* Method: get_cascade_num_candidates
3457 
3458  The number of candidates used during training (calculated by multiplying <get_cascade_activation_functions_count>,
3459  <get_cascade_activation_steepnesses_count> and <get_cascade_num_candidate_groups>).
3460 
3461  The actual candidates is defined by the <get_cascade_activation_functions> and
3462  <get_cascade_activation_steepnesses> arrays. These arrays define the activation functions
3463  and activation steepnesses used for the candidate neurons. If there are 2 activation functions
3464  in the activation function array and 3 steepnesses in the steepness array, then there will be
3465  2x3=6 different candidates which will be trained. These 6 different candidates can be copied into
3466  several candidate groups, where the only difference between these groups is the initial weights.
3467  If the number of groups is set to 2, then the number of candidate neurons will be 2x3x2=12. The
3468  number of candidate groups is defined by <set_cascade_num_candidate_groups>.
3469 
3470  The default number of candidates is 6x4x2 = 48
3471 
3472  See also:
3473  <get_cascade_activation_functions>, <get_cascade_activation_functions_count>,
3474  <get_cascade_activation_steepnesses>, <get_cascade_activation_steepnesses_count>,
3475  <get_cascade_num_candidate_groups>, <fann_get_cascade_num_candidates>
3476 
3477  This function appears in FANN >= 2.0.0.
3478  */
3479  unsigned int get_cascade_num_candidates()
3480  {
3481  unsigned int num_candidates = 0;
3482  if (ann != NULL)
3483  {
3484  num_candidates = fann_get_cascade_num_candidates(ann);
3485  }
3486  return num_candidates;
3487  }
3488 
3489  /* Method: get_cascade_activation_functions_count
3490 
3491  The number of activation functions in the <get_cascade_activation_functions> array.
3492 
3493  The default number of activation functions is 6.
3494 
3495  See also:
3496  <get_cascade_activation_functions>, <set_cascade_activation_functions>,
3497  <fann_get_cascade_activation_functions_count>
3498 
3499  This function appears in FANN >= 2.0.0.
3500  */
3501  unsigned int get_cascade_activation_functions_count()
3502  {
3503  unsigned int activation_functions_count = 0;
3504  if (ann != NULL)
3505  {
3506  activation_functions_count = fann_get_cascade_activation_functions_count(ann);
3507  }
3508  return activation_functions_count;
3509  }
3510 
3511  /* Method: get_cascade_activation_functions
3512 
3513  The cascade activation functions array is an array of the different activation functions used by
3514  the candidates.
3515 
3516  See <get_cascade_num_candidates> for a description of which candidate neurons will be
3517  generated by this array.
3518 
3519  See also:
3520  <get_cascade_activation_functions_count>, <set_cascade_activation_functions>,
3521  <FANN::activation_function_enum>
3522 
3523  This function appears in FANN >= 2.0.0.
3524  */
3525  activation_function_enum * get_cascade_activation_functions()
3526  {
3527  enum fann_activationfunc_enum *activation_functions = NULL;
3528  if (ann != NULL)
3529  {
3530  activation_functions = fann_get_cascade_activation_functions(ann);
3531  }
3532  return reinterpret_cast<activation_function_enum *>(activation_functions);
3533  }
3534 
3535  /* Method: set_cascade_activation_functions
3536 
3537  Sets the array of cascade candidate activation functions. The array must be just as long
3538  as defined by the count.
3539 
3540  See <get_cascade_num_candidates> for a description of which candidate neurons will be
3541  generated by this array.
3542 
3543  See also:
3544  <get_cascade_activation_steepnesses_count>, <get_cascade_activation_steepnesses>,
3545  <fann_set_cascade_activation_functions>
3546 
3547  This function appears in FANN >= 2.0.0.
3548  */
3549  void set_cascade_activation_functions(activation_function_enum *cascade_activation_functions,
3550  unsigned int cascade_activation_functions_count)
3551  {
3552  if (ann != NULL)
3553  {
3554  fann_set_cascade_activation_functions(ann,
3555  reinterpret_cast<enum fann_activationfunc_enum *>(cascade_activation_functions),
3556  cascade_activation_functions_count);
3557  }
3558  }
3559 
3560  /* Method: get_cascade_activation_steepnesses_count
3561 
3562  The number of activation steepnesses in the <get_cascade_activation_functions> array.
3563 
3564  The default number of activation steepnesses is 4.
3565 
3566  See also:
3567  <get_cascade_activation_steepnesses>, <set_cascade_activation_functions>,
3568  <fann_get_cascade_activation_steepnesses_count>
3569 
3570  This function appears in FANN >= 2.0.0.
3571  */
3572  unsigned int get_cascade_activation_steepnesses_count()
3573  {
3574  unsigned int activation_steepness_count = 0;
3575  if (ann != NULL)
3576  {
3577  activation_steepness_count = fann_get_cascade_activation_steepnesses_count(ann);
3578  }
3579  return activation_steepness_count;
3580  }
3581 
3582  /* Method: get_cascade_activation_steepnesses
3583 
3584  The cascade activation steepnesses array is an array of the different activation functions used by
3585  the candidates.
3586 
3587  See <get_cascade_num_candidates> for a description of which candidate neurons will be
3588  generated by this array.
3589 
3590  The default activation steepnesses is {0.25, 0.50, 0.75, 1.00}
3591 
3592  See also:
3593  <set_cascade_activation_steepnesses>, <get_cascade_activation_steepnesses_count>,
3594  <fann_get_cascade_activation_steepnesses>
3595 
3596  This function appears in FANN >= 2.0.0.
3597  */
3598  fann_type *get_cascade_activation_steepnesses()
3599  {
3600  fann_type *activation_steepnesses = NULL;
3601  if (ann != NULL)
3602  {
3603  activation_steepnesses = fann_get_cascade_activation_steepnesses(ann);
3604  }
3605  return activation_steepnesses;
3606  }
3607 
3608  /* Method: set_cascade_activation_steepnesses
3609 
3610  Sets the array of cascade candidate activation steepnesses. The array must be just as long
3611  as defined by the count.
3612 
3613  See <get_cascade_num_candidates> for a description of which candidate neurons will be
3614  generated by this array.
3615 
3616  See also:
3617  <get_cascade_activation_steepnesses>, <get_cascade_activation_steepnesses_count>,
3618  <fann_set_cascade_activation_steepnesses>
3619 
3620  This function appears in FANN >= 2.0.0.
3621  */
3622  void set_cascade_activation_steepnesses(fann_type *cascade_activation_steepnesses,
3623  unsigned int cascade_activation_steepnesses_count)
3624  {
3625  if (ann != NULL)
3626  {
3627  fann_set_cascade_activation_steepnesses(ann,
3628  cascade_activation_steepnesses, cascade_activation_steepnesses_count);
3629  }
3630  }
3631 
3632  /* Method: get_cascade_num_candidate_groups
3633 
3634  The number of candidate groups is the number of groups of identical candidates which will be used
3635  during training.
3636 
3637  This number can be used to have more candidates without having to define new parameters for the candidates.
3638 
3639  See <get_cascade_num_candidates> for a description of which candidate neurons will be
3640  generated by this parameter.
3641 
3642  The default number of candidate groups is 2
3643 
3644  See also:
3645  <set_cascade_num_candidate_groups>, <fann_get_cascade_num_candidate_groups>
3646 
3647  This function appears in FANN >= 2.0.0.
3648  */
3649  unsigned int get_cascade_num_candidate_groups()
3650  {
3651  unsigned int num_candidate_groups = 0;
3652  if (ann != NULL)
3653  {
3654  num_candidate_groups = fann_get_cascade_num_candidate_groups(ann);
3655  }
3656  return num_candidate_groups;
3657  }
3658 
3659  /* Method: set_cascade_num_candidate_groups
3660 
3661  Sets the number of candidate groups.
3662 
3663  See also:
3664  <get_cascade_num_candidate_groups>, <fann_set_cascade_num_candidate_groups>
3665 
3666  This function appears in FANN >= 2.0.0.
3667  */
3668  void set_cascade_num_candidate_groups(unsigned int cascade_num_candidate_groups)
3669  {
3670  if (ann != NULL)
3671  {
3672  fann_set_cascade_num_candidate_groups(ann, cascade_num_candidate_groups);
3673  }
3674  }
3675 
3676  /*********************************************************************/
3677 
3678 #ifndef FIXEDFANN
3679  /* Method: scale_train
3680 
3681  Scale input and output data based on previously calculated parameters.
3682 
3683  See also:
3684  <descale_train>, <fann_scale_train>
3685 
3686  This function appears in FANN >= 2.1.0.
3687  */
3688  void scale_train(training_data &data)
3689  {
3690  if (ann != NULL)
3691  {
3692  fann_scale_train(ann, data.train_data);
3693  }
3694  }
3695 
3696  /* Method: descale_train
3697 
3698  Descale input and output data based on previously calculated parameters.
3699 
3700  See also:
3701  <scale_train>, <fann_descale_train>
3702 
3703  This function appears in FANN >= 2.1.0.
3704  */
3705  void descale_train(training_data &data)
3706  {
3707  if (ann != NULL)
3708  {
3709  fann_descale_train(ann, data.train_data);
3710  }
3711  }
3712 
3713  /* Method: set_input_scaling_params
3714 
3715  Calculate scaling parameters for future use based on training data.
3716 
3717  See also:
3718  <set_output_scaling_params>, <fann_set_input_scaling_params>
3719 
3720  This function appears in FANN >= 2.1.0.
3721  */
3722  bool set_input_scaling_params(const training_data &data, float new_input_min, float new_input_max)
3723  {
3724  bool status = false;
3725  if (ann != NULL)
3726  {
3727  status = (fann_set_input_scaling_params(ann, data.train_data, new_input_min, new_input_max) != -1);
3728  }
3729  return status;
3730  }
3731 
3732  /* Method: set_output_scaling_params
3733 
3734  Calculate scaling parameters for future use based on training data.
3735 
3736  See also:
3737  <set_input_scaling_params>, <fann_set_output_scaling_params>
3738 
3739  This function appears in FANN >= 2.1.0.
3740  */
3741  bool set_output_scaling_params(const training_data &data, float new_output_min, float new_output_max)
3742  {
3743  bool status = false;
3744  if (ann != NULL)
3745  {
3746  status = (fann_set_output_scaling_params(ann, data.train_data, new_output_min, new_output_max) != -1);
3747  }
3748  return status;
3749  }
3750 
3751  /* Method: set_scaling_params
3752 
3753  Calculate scaling parameters for future use based on training data.
3754 
3755  See also:
3756  <clear_scaling_params>, <fann_set_scaling_params>
3757 
3758  This function appears in FANN >= 2.1.0.
3759  */
3760  bool set_scaling_params(const training_data &data,
3761  float new_input_min, float new_input_max, float new_output_min, float new_output_max)
3762  {
3763  bool status = false;
3764  if (ann != NULL)
3765  {
3766  status = (fann_set_scaling_params(ann, data.train_data,
3767  new_input_min, new_input_max, new_output_min, new_output_max) != -1);
3768  }
3769  return status;
3770  }
3771 
3772  /* Method: clear_scaling_params
3773 
3774  Clears scaling parameters.
3775 
3776  See also:
3777  <set_scaling_params>, <fann_clear_scaling_params>
3778 
3779  This function appears in FANN >= 2.1.0.
3780  */
3781  bool clear_scaling_params()
3782  {
3783  bool status = false;
3784  if (ann != NULL)
3785  {
3786  status = (fann_clear_scaling_params(ann) != -1);
3787  }
3788  return status;
3789  }
3790 
3791  /* Method: scale_input
3792 
3793  Scale data in input vector before feed it to ann based on previously calculated parameters.
3794 
3795  See also:
3796  <descale_input>, <scale_output>, <fann_scale_input>
3797 
3798  This function appears in FANN >= 2.1.0.
3799  */
3800  void scale_input(fann_type *input_vector)
3801  {
3802  if (ann != NULL)
3803  {
3804  fann_scale_input(ann, input_vector );
3805  }
3806  }
3807 
3808  /* Method: scale_output
3809 
3810  Scale data in output vector before feed it to ann based on previously calculated parameters.
3811 
3812  See also:
3813  <descale_output>, <scale_input>, <fann_scale_output>
3814 
3815  This function appears in FANN >= 2.1.0.
3816  */
3817  void scale_output(fann_type *output_vector)
3818  {
3819  if (ann != NULL)
3820  {
3821  fann_scale_output(ann, output_vector );
3822  }
3823  }
3824 
3825  /* Method: descale_input
3826 
3827  Scale data in input vector after get it from ann based on previously calculated parameters.
3828 
3829  See also:
3830  <scale_input>, <descale_output>, <fann_descale_input>
3831 
3832  This function appears in FANN >= 2.1.0.
3833  */
3834  void descale_input(fann_type *input_vector)
3835  {
3836  if (ann != NULL)
3837  {
3838  fann_descale_input(ann, input_vector );
3839  }
3840  }
3841 
3842  /* Method: descale_output
3843 
3844  Scale data in output vector after get it from ann based on previously calculated parameters.
3845 
3846  See also:
3847  <scale_output>, <descale_input>, <fann_descale_output>
3848 
3849  This function appears in FANN >= 2.1.0.
3850  */
3851  void descale_output(fann_type *output_vector)
3852  {
3853  if (ann != NULL)
3854  {
3855  fann_descale_output(ann, output_vector );
3856  }
3857  }
3858 
3859 #endif /* FIXEDFANN */
3860 
3861  /*********************************************************************/
3862 
3863  /* Method: set_error_log
3864 
3865  Change where errors are logged to.
3866 
3867  If log_file is NULL, no errors will be printed.
3868 
3869  If neural_net is empty i.e. ann is NULL, the default log will be set.
3870  The default log is the log used when creating a neural_net.
3871  This default log will also be the default for all new structs
3872  that are created.
3873 
3874  The default behavior is to log them to stderr.
3875 
3876  See also:
3877  <struct fann_error>, <fann_set_error_log>
3878 
3879  This function appears in FANN >= 1.1.0.
3880  */
3881  void set_error_log(FILE *log_file)
3882  {
3883  fann_set_error_log(reinterpret_cast<struct fann_error *>(ann), log_file);
3884  }
3885 
3886  /* Method: get_errno
3887 
3888  Returns the last error number.
3889 
3890  See also:
3891  <fann_errno_enum>, <fann_reset_errno>, <fann_get_errno>
3892 
3893  This function appears in FANN >= 1.1.0.
3894  */
3895  unsigned int get_errno()
3896  {
3897  return fann_get_errno(reinterpret_cast<struct fann_error *>(ann));
3898  }
3899 
3900  /* Method: reset_errno
3901 
3902  Resets the last error number.
3903 
3904  This function appears in FANN >= 1.1.0.
3905  */
3906  void reset_errno()
3907  {
3908  fann_reset_errno(reinterpret_cast<struct fann_error *>(ann));
3909  }
3910 
3911  /* Method: reset_errstr
3912 
3913  Resets the last error string.
3914 
3915  This function appears in FANN >= 1.1.0.
3916  */
3917  void reset_errstr()
3918  {
3919  fann_reset_errstr(reinterpret_cast<struct fann_error *>(ann));
3920  }
3921 
3922  /* Method: get_errstr
3923 
3924  Returns the last errstr.
3925 
3926  This function calls <fann_reset_errno> and <fann_reset_errstr>
3927 
3928  This function appears in FANN >= 1.1.0.
3929  */
3930  std::string get_errstr()
3931  {
3932  return std::string(fann_get_errstr(reinterpret_cast<struct fann_error *>(ann)));
3933  }
3934 
3935  /* Method: print_error
3936 
3937  Prints the last error to stderr.
3938 
3939  This function appears in FANN >= 1.1.0.
3940  */
3941  void print_error()
3942  {
3943  fann_print_error(reinterpret_cast<struct fann_error *>(ann));
3944  }
3945 
3946  /*********************************************************************/
3947 
3948  private:
3949  // Structure used by set_callback to hold information about a user callback
3950  typedef struct user_context_type
3951  {
3952  callback_type user_callback; // Pointer to user callback function
3953  void *user_data; // Arbitrary data pointer passed to the callback
3954  neural_net *net; // This pointer for the neural network
3955  } user_context;
3956 
3957  // Internal callback used to convert from pointers to class references
3958  static int FANN_API internal_callback(struct fann *ann, struct fann_train_data *train,
3959  unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, unsigned int epochs)
3960  {
3961  user_context *user_data = static_cast<user_context *>(fann_get_user_data(ann));
3962  if (user_data != NULL)
3963  {
3964  FANN::training_data data;
3965  data.train_data = train;
3966 
3967  int result = (*user_data->user_callback)(*user_data->net,
3968  data, max_epochs, epochs_between_reports, desired_error, epochs, user_data);
3969 
3970  data.train_data = NULL; // Prevent automatic cleanup
3971  return result;
3972  }
3973  else
3974  {
3975  return -1; // This should not occur except if out of memory
3976  }
3977  }
3978  protected:
3979  // Pointer the encapsulated fann neural net structure
3980  struct fann *ann;
3981  };
3982 
3983  /*************************************************************************/
3984 };
3985 
3986 #endif /* FANN_CPP_H_INCLUDED */
pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial-members.html0000644000113200011300000002276612647637662026335 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkfilter_spatial.pkfilter_spatial Member List

This is the complete list of members for qgis.pkfilter_spatial.pkfilter_spatial, including all inherited members.

cliName (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatial
defineCharacteristics (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatial
DIM (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
EXTRA (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
group (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatial
INPUT (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
METHOD (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
METHOD_OPTIONS (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
name (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatial
NODATA (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
OUTPUT (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
PADDING (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
PADDING_OPTIONS (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
processAlgorithm (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatial
RTYPE (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
TYPE (defined in qgis.pkfilter_spatial.pkfilter_spatial)qgis.pkfilter_spatial.pkfilter_spatialstatic
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm-members.html0000644000113200011300000001110512647637662030106 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pktoolsAlgorithm.pktoolsAlgorithm Member List
pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem__coll__graph.map0000644000113200011300000000012312616110567024573 00000000000000 pktools-2.6.6/doc/html/pkextract__random_8py_source.html0000644000113200011300000011630012647637661020431 00000000000000 pktools: /home/kempenep/pktools/qgis/pkextract_random.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract_random.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkextract_random.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterRaster
30 from processing.core.parameters import ParameterVector
31 from processing.core.outputs import OutputVector
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 FORMATS = [
39  'ESRI Shapefile',
40  'GeoJSON',
41  'GeoRSS',
42  'SQLite',
43  'GMT',
44  'MapInfo File',
45  'INTERLIS 1',
46  'INTERLIS 2',
47  'GML',
48  'Geoconcept',
49  'DXF',
50  'DGN',
51  'CSV',
52  'BNA',
53  'S57',
54  'KML',
55  'GPX',
56  'PGDump',
57  'GPSTrackMaker',
58  'ODS',
59  'XLSX',
60  'PDF',
61 ]
62 EXTS = [
63  '.shp',
64  '.geojson',
65  '.xml',
66  '.sqlite',
67  '.gmt',
68  '.tab',
69  '.ili',
70  '.ili',
71  '.gml',
72  '.txt',
73  '.dxf',
74  '.dgn',
75  '.csv',
76  '.bna',
77  '.000',
78  '.kml',
79  '.gpx',
80  '.pgdump',
81  '.gtm',
82  '.ods',
83  '.xlsx',
84  '.pdf',
85 ]
86 
87 class pkextract_random(pktoolsAlgorithm):
88 
89  INPUT = "INPUT"
90  OUTPUT = "OUTPUT"
91 
92  RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
93 
94  RULE = "RULE"
95  POLYGON = "POLYGON"
96  BUFFER = "BUFFER"
97  RANDOM = "RANDOM"
98  SRCNODATA = "SRCNODATA"
99  BNDNODATA = "BNDNODATA"
100  EXTRA = 'EXTRA'
101 
102  FORMAT = "FORMAT"
103 
104  def cliName(self):
105  return "pkextract"
106 
107  def defineCharacteristics(self):
108  self.name = "extract random points"
109  self.group = "[pktools] raster/vector"
110  self.addParameter(ParameterRaster(self.INPUT, 'Input raster data set'))
111  self.addParameter(ParameterSelection(self.RULE,"extraction rule",self.RULE_OPTIONS, 0))
112 
113  self.addOutput(OutputVector(self.OUTPUT, 'Output vector data set'))
114  self.addParameter(ParameterSelection(self.FORMAT,
115  'Destination Format', FORMATS))
116 
117  self.addParameter(ParameterBoolean(self.POLYGON, "Create OGRPolygon as geometry instead of OGRPoint",False))
118  self.addParameter(ParameterNumber(self.BUFFER, "Buffer for calculating statistics for point features",1,25,1))
119  self.addParameter(ParameterNumber(self.RANDOM, "Number of random points to generate",0,1000000,100))
120 
121  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
122  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
123  self.addParameter(ParameterString(self.EXTRA,
124  'Additional parameters', '', optional=True))
125 
126  def processAlgorithm(self, progress):
127  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
128  commands = [cliPath]
129 
130  input=self.getParameterValue(self.INPUT)
131  commands.append('-i')
132  commands.append('"' + input + '"')
133 
134  commands.append("-r")
135  commands.append(self.RULE_OPTIONS[self.getParameterValue(self.RULE)])
136 
137  output = self.getOutputFromName(self.OUTPUT)
138  outFile = output.value
139  formatIdx = self.getParameterValue(self.FORMAT)
140  outFormat = '"' + FORMATS[formatIdx] + '"'
141  commands.append('-f')
142  commands.append(outFormat)
143  ext = EXTS[formatIdx]
144  if not outFile.endswith(ext):
145  outFile += ext
146  output.value = outFile
147  commands.append('-o')
148  commands.append('"' + outFile + '"')
149 
150  if self.getParameterValue(self.POLYGON):
151  commands.append("-polygon")
152  buffer=self.getParameterValue(self.BUFFER)
153  if buffer > 1:
154  commands.append("-buf")
155  commands.append(str(buffer))
156 
157  if self.getParameterValue(self.RANDOM) > 0:
158  commands.append("-rand")
159  commands.append(str(self.getParameterValue(self.RANDOM)))
160 
161  srcnodata=self.getParameterValue(self.SRCNODATA)
162  if srcnodata != "none":
163  srcnodataValues = srcnodata.split(';')
164  for srcnodataValue in srcnodataValues:
165  commands.append('-srcnodata')
166  commands.append(srcnodataValue)
167  bndnodata=self.getParameterValue(self.BNDNODATA)
168  bndnodataValues = bndnodata.split(';')
169  for bndnodataValue in bndnodataValues:
170  commands.append('-bndnodata')
171  commands.append(bndnodataValue)
172 
173  extra = str(self.getParameterValue(self.EXTRA))
174  if len(extra) > 0:
175  commands.append(extra)
176 
177 
178  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/inherit_graph_7.png0000644000113200011300000000250612616110567015423 00000000000000‰PNG  IHDR…%㤽…bKGDÿÿÿ ½§“ûIDAThíš_({oÇŸcö%²1Ã,ÉæÏ"É ¢\ˆÜ¸ðg$"…"%[ˆpAar¡”Hù“ “ÕB)» Ì3n0›?6Í´eÎ÷âùu¾ÇØÂö›#çuõyžÏó|zŸ½÷<ÏÎ9CP$„Áﻼ‚ôƒX~ Òbáo\]]µµµY,–ïRó iii©¨¨Àš¯üËå›››|>ßçª~)ûûûb±Ø¥±XìCI¿šÊÊJ§òü ¤Ä‚ôƒX~ Oý8??GÄ[ã?[Í(ŠÖÖÖ†„„x^ ·ä¹Á×ëƒF£uww-ûq´ZíÊÊÊéé©ç¥T*ƒÁ€±·ä¹Á×~0ŒÑÑѯe?ŽÙlÄÅÅy^Êáp<<<ÀØ[òÜði?ìv»H$JJJ ÍÍÍ=88€ýV«U(FEE1™L¡PhµZm6Ûàà`\\\ddd}}ýãã#x½ä766ÒÓÓ–——² ƒÍf øÔA••>>>îJdvv6 ::Ú©&>~[ê]Á®Jy"Ï(ŽÕÕU§ž·LNN2™L‰D¢Õj·¶¶X,œ266V^^~uu¥P(233{zzD"QjjªB¡8>>ÎÊÊ(ŠžÁñ&“) `ffF§ÓÍÏÏûûû›L&,‹¢hMMMAAÁÅÅ…B¡HKK‚¯j*** ÃÜÜàááá]‘ø:®â·¥Ü vŠ=‘‡Áçóù|>¾çÓ~$%%-,,`ÍÅÅE8%%%E§ÓÁÎŒŒŒääd‰D{NOOaŒ]’^¯§R©ƒÁáp<==Ùív,ûòòB¡P”J%œ.‘H¸\.¼`™LÎÎÎÞùA?œJ¹Œ=”‡ñÖOïW×××X3==jµ:&&AA ///5Mbb"Ìòx¼ÒÒR|:.“Éär9›ÍÎÏÏßÝÝõóû'æþþÞn·s8Øär¹7770†+’J¥~V9}ý2Ô©”{Áxþ'yà çG||üÑÑÖ<99ƒÁÀ¾ƒA.—³X,µZ ³‡‡‡###ø:f³Ùáp¬­­éõú¦¦¦’’½^e£¢¢(ŠJ¥‚Í‹‹‹ØØØÿû}å7ˆÍfÜÞÞâ;J¹ŒÇëòþIúì„ÖÖV¡P(•Jïîî¶··`YYYoo¯F£Q(ÅÅÅÓÓÓuuu}}}J¥R©T¶··k4|AŠŠŠÖ××FãËË •J ²T*µªªª££ãòòR©Tö÷÷×ÔÔ|í i4`iiÉh4NMM¹éF°ÉdÂô¢êgáêÒ]å?Þú¹»‚ܯˆé± ý ¤Äâó|vvÖ÷:~'*•*!!áUþæpooB¡|“¶_JWW—Ëûs’o‡Ýçó)þè¡»Ÿ~úw¾üú<‡§zRaðw}*=âņ²ØP@JÈbC Yl( ‹ %d±¡€,6”ņ²ØP@JÈbC Yl( ËÝzôÚµko»í¶M€RX¼xñ…^XüãSaÿ膆†?üá™3ΘÝý‰PÏ?ÿÌœ9³W¯^]üSº÷ %AœqÆì»ïîÆ PA 6t÷)}J1ª— %d±¡€,6”ņ²ØP@JÈbC YŽˆv¸3NxýõÑŽY]®¸bé¿þëz?βe×Þ|óòÞ“ãÆð?ÿ³£÷ã$ªæ‚•Hâ÷쳘;÷¬–––H¦DQµ ‡ŒÞ‹ª;õ¢°~ýú­_ÿ›™3çô~(a£œD—ØN*ÅÚ“R°F&>¬‘)¨Îåô=ª…õ µ*ªóXŠñ†’×_ßyÕUWÍž=;Úa«ÅM7ÝU?}ýõ³fͺúê«#­†=óÌ3+V¬ˆd¨äÔ\P£UüßliiY½zu€Û…CF/EÛ‡“|êE—ߌd(a£œD—ØN*ÂÚ“R°F&>¬‘)›¨Îåô=ª…õ 5)ÂóXŠñ†’ fÍš5o޼ȇ­ kÖ¬‰pOê˜1c[Éâ…aáh ©¹ F%Úø%¶Œeíñ 2z!Ú>œäS/ÊLبR¢Kl 'E²ö¤¬‘‰kdª”¤‘4,1ùy,]êSé /6”ņ²ØP@JÈbC Yl( ‹ %d±¡€,6”ņ²ØP@JÈbC Yl( K,6”üùÏN¥R•žE^1Ÿ^{U4Õ.UË{)fžéÇd†áÅ_½Œ˜Ï³lÓ‹gŠŸUæ‘ùžRäPñ¬CF¦—jç#ùÈœ9s6oÞ\Ù)Å(vPæ(Ž?þ’K.Ù³gOe§TÂÖšd‰nohª%ÏpÖÌòVWÌGðz?NzZ·YÛ¸]¥ˆbZ_é[µt­XƒÍIæ;¨ÕÌ'ª““‹ %17xðào|㕞E9ìØ±cèС•!£öÊžyGo½õÖ<ðòË/w¸ÕøôžbF"SÆ;CáªRÕ>ÿ"•çm>ýôÓ[¶l™øàƒ&LX±bE©_´ŠÄ$l <õÕ${It;ÓTc¢üá¬å­®ØK‚×3zZ—bò[j]ü‰b„´¾Â’¶Ú¸V¬Áö†Ì—è…JJ'D[[[SS ÃP:åÞP’þ–›õë×O:µ¾¾þÊ+¯½ÿþ&L¸ï¾û‚ ¸à‚ ®¾úêôƒ:4dÈG}4‚T*u×]wxâ‰uuu7Þxã}÷Ýw ' 4è†nÈ7“0 o½õÖ“N:éØc=묳yä‘ö_žñK•Õ­J>|xéҥÆ «¯¯_ºtéáÇ~øáQ£FíÝ»7‚_þò—S¦L9xðà¬Y³‚ >|xfü'žxbìØ±¿ÿýïyä‘~ô£G}ôˆ#ÒéÃ?\¶lÙØ±cëêê.¹ä’ôN´ö#äTÕe/¾æ­­­Ë—/Ÿ2eÊ1Ç3gΜgŸ}6h÷ŽÚW©¶+–V|Ýr†ªCß{ï½K/½tèС£G^²dÉ|Pxüöªº˜½,cKtÕ<ó½hΡ:w윙ru¤œo¹ªWÆ<0qâĺººË/¿üý÷ß/rþ9{H{5óašóé93œ/Øyä‘ýúõ4hPúÇÂÁËyoçϾœõìrð8Å F1•J}õ«_M¿µ ZŠ9F9çÙåÊ,a«™S_M²œD·½8G7iM5ˆA8ã³¼ÕËIð ?]O뱊G+æ—ž4º²E­¯lâ¶ y׊5ز‘ù$d>i¼gÚÚÚn¿ý§3gž8fÌ1ç7û©§ž<î¸ÔyçÍ ‚`êÔ¼‹—ø »cÞ¼ysçÎkj óý ‚`ÕªUFؾ}{çwÞ¶mÛ6nÜ8iÒ¤oûÛé¿lkkËüƒÃðÀGuÔ­·ÞÚØØxçwqÄX¹r娱cÛÚÚÂ0\¿~ýÈ‘#>œþ"© ìÛ·ïŽ;î‚ ¡¡aß¾}·Ýv[éÑ:»ýöÛGõ«_ýjÏž=?þø¤I“‚ HϤýTÛßè}}Šÿ3wî¼yóæERÉ0 øÃ~ö³Ÿ}ýõ×·lÙrÚi§]wÝua^rÉ%_üâÿò—¿ 6ìÙgŸíðNÓ·?ùÉOþæ7¿illìׯߢE‹vïÞ}ÿý÷AðÎ;ï,_¾üä“OÞ²eËÖ­[gΜ¹dÉ’bjyÙW­ZAÜj~ÓM7Õ×ׯ[·î­·ÞzôÑGGŽÙþmæ|¿e«XXÞ v«nB•Žâ.ºè¢³Ï>ûÕW_ݲeË)§œ’ªÃøå)fTñ»ë®U]¾\/ˆaçÒ…]5Ï|µíiÒ¤ô_^{íµAüéOJßÕÔÔtä‘GþøÇ?Þ»wo[[Ûþýû[[[<8`À€çž{. ÃÏ}îs×_ýÿA°iÓ¦0 [ZZ:ÜîñŒSN9åÈüø‹_ü¢[ÿ{VŸeñ• ÃpÚ´iéÛ?þøŒ3Â0Ü»wïèÑ£§OŸž9ïìüöÓã:tè•W^9pà@kkëï~÷»t¡¦Nºnݺôƒ_~ùåôí.kyÙË¿¡¤˜šO™2åž{îÉ<ñÞ{ï zzá£ÚƒÚ­ºUúé---}ûö}ñÅÓY·n]f¨ã—§˜å¿¨×ã2æ,]ØUóÌù¢9‡ÊÙ±óÕ3gGê,¶Ç«Ç‡ì„N(ò:g)ñ‰ïÿûé‡ òä“OnܸqôèÑÿøÇŸzê©>}ú}ôÑsçÎ]»víÁƒ7lذpáÂ̘ÇsLGyd‡Ûù¼úê«§œrJæÇ“N:©ÃÂNŸ 1TL%ƒ عsçˆ#R©T*•:÷Üs_{íµ |Ùe—½ôÒK—_~y¾ñ§M›A¿~ý¶mÛvþùçŸ~úé÷ÜsOú®]»ve^ýÄOüÌg>SÌ„k ìÅÔü7Þ˜1cFæ)Ó§OïñËÕ@ÅÒŠ©[P¥£øöÛo·¶¶Nœ81ý—“&MÊ •süj ˜=.cÒuÙ<;¼hΡrvì|ï"gGꬎW]½ÆÆÆöw˜¾’ú»ÎƒWׇiæä|zÎ çëj’9¯=xðàâÅ‹-Z”¼pð:ß›ó³/_Ô‹Lu‰b™£ØÁöíÛ3m3_ZŠ9F]¾Í8¨xØ‚ê?õÕ$+BtÛ‹[t;HTS bΊ/ouÅŠ<=­D*­x^zÒèÊOµ¾²‰gØ’s­Xƒ-?™¯ÕÌw¨NÞ3;wîø§úGªO>¹ç+š8¨Ì†’ôΣ ¶mÛ–þæ¢ 6lØpë­·®\¹òÉ'Ÿ ‚ ¹¹¹­­mÍš5MMM_úÒ—>ýéO755A°`Á‚µk×>üðçŸ~z&‹=0nܸ—^z)óã+¯¼’¹ýá‡Aðæ›oöxð²)¦’A :4óñ¶wïÞ7AðÆoüô§?=çœs®¹æš|ã§ûfsssCCÃÒ¥K7mÚtË-·¤ï9räÎ;Ó·7oÞü½ï}¯˜ ×@Ù‹©ùøñã_xá…ÌSÚ¿å¥S·¡JGqذa}ûöݱcGú/_}õÕQ£F¿ƒ(fËX tÝ}ÑœCåëØ9åìHÕÀñ ²«7nܸôí.矯‡dvƒv¼º>L3o$çÓsf8_èP“Œ£>úÒK/}饗2w^ç{s~öå«g‘©® Q¬TÓwýìg?ûÔ§>•þ1_ZŠ9FÞf|TH^'#G½øâ?RýÇ?ö|E awDõ+oÎ<óÌíÛ·?÷Üs“'OþÖ·¾Õþ[n–-[6eÊ”ææææææþýû¯]»vÏž=?ÿùÏû÷ïßÜ܆á¡C‡† 2yòäö_´Û˜ïv7ß|óèÑ£ýë_¿ûî»O<ñÄÔ©SS©Ôž={‚ ¸óÎ;ÿö·¿¥7a…y¾,¨gõ‰ðÛfНd†W^yå…^¸sçÎ^xaæÌ™_ÿú×[[[Ï9çœï|ç;MMMÇøá‡3cîß¿¿Ã»Þ»wo*•zì±Ç<˜þò¨M›6-[¶lúôé[·nݺuëœ9s¾ò•¯t¡6pàÀÎïú¦›n:î¸ãÆŒsË-·,X° ¾¾þƒ>X²dÉÈ‘# ´`Á‚½{÷†aØ~„ò”½üJŠ©ù‡~¸|ùòI“& 0`öìÙéíx=»ðQíAíVÝr†ªÃûjjjú¾püñÇ1⪫®Ê Õaüò³üõz\Æœ¥ ‹;aê\ÛœCuîØ™éuè ;Ru¯n²•+WŽ?¾¾¾þšk®9tèPáùgnäì!=ËCÎC“‡ÓœOÏ™á|Án¯Ã<[[[=öØ×^{-ýcçൟRÎXvþìËWÏ"SQþ‹e¢Xæ(fŒ3梋.zûí·3÷æ‹b1Ç(ßÛ, üâ¶š9õMl“ EWt³ÃŸ¦&2œñYÞ&¹+–í)x…Ÿ^=-™kä˜_zJl£Kà9iQŒOë‹ê\®Úû^˜¼kʼnm° \¿È|§×F'«dCÉÛo·\ýÿ7qÆìÛoÿEï¼sxÖ¬ 0°²s«š %ÝzÑÙ°aÃæÍ›3?®]»vÆŒ½³üJz9áò‹¼ìåßPÒ›Ùö@µ5,}ÝŠ?¶ñ+~Ò›Ùö@eûLlW‘‡¬¤âóÐËÃTŠWÊy±¬¤D±Ìz0Ïr^8(©ø„­[’ÌRÝÊJHt{6Oáì„D«ʹö,)Á+ÌÓ¹ã'$o‘³FŽ|ü„D±‚käšï{ñyÑŒ„¤:rÖ/U÷¢ É|ÏæYJ:üI7Iŧ‘þÓƒ %}‚¤Ú²eËÅ_¼iÓ¦÷ßãÆ7Üp׿üåJOªö){w©X„³º8^U¡—‡ÉQ&* ‰bµÌ“Œ„$“Ú“èVËìÔ‹Âúôé{Þyÿû¨£ú÷~(a£œD—ØN*ÅÚ“R°F&>¬‘)¨Îåô=ª…õ µ*ªóØdZ¸°¡_¿`õê¼û=:‹xC ±Òƒ %}J7ª‘ %d±¡€,6”ņ²ØP@JÈrDwŸ°k׎{ïýy)¦@ävíÚ1yò„n=¥{JÆŒ³f͚͛wëYTÐÙg¢[O…aXš™P•úTzÄ‹ %d±¡€,6”ņ²ØP@JÈbC Yl( ‹ %d±¡€,6”ņ²ØP@–ÿè¿RŒÃé%IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithmProvider_1_1pktoolsAlgorithmProvider.html0000644000113200011300000005152112647637662027636 00000000000000 pktools: qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider Class Reference
Inheritance diagram for qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider:
Collaboration diagram for qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider:

Public Member Functions

def __init__
 
def initializeSettings
 
def unload
 
def getName
 
def getDescription
 
def getIcon
 

Public Attributes

 activate
 
 alglist
 
 algs
 

Static Public Attributes

string MY_DUMMY_SETTING = "MY_DUMMY_SETTING"
 

Detailed Description

Definition at line 55 of file pktoolsAlgorithmProvider.py.

Member Function Documentation

def qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider.getDescription (   self)
This is the provired full name.

Definition at line 100 of file pktoolsAlgorithmProvider.py.

101  def getDescription(self):
102  '''This is the provired full name.
103  '''
104  return "Utilities for remote sensing image processing"
def qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider.getName (   self)
This is the name that will appear on the toolbox group.
It is also used to create the command line name of all the algorithms
from this provider

Definition at line 93 of file pktoolsAlgorithmProvider.py.

93 
94  def getName(self):
95  '''This is the name that will appear on the toolbox group.
96  It is also used to create the command line name of all the algorithms
97  from this provider
98  '''
99  return "pktools"
def qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider.initializeSettings (   self)
In this method we add settings needed to configure our provider.
Do not forget to call the parent method, since it takes care or
automatically adding a setting for activating or deactivating the
algorithms in the provider

Definition at line 73 of file pktoolsAlgorithmProvider.py.

73 
74  def initializeSettings(self):
75  '''In this method we add settings needed to configure our provider.
76  Do not forget to call the parent method, since it takes care or
77  automatically adding a setting for activating or deactivating the
78  algorithms in the provider
79  '''
80  AlgorithmProvider.initializeSettings(self)
81  ProcessingConfig.addSetting(Setting(self.getDescription(), pktoolsUtils.PKTOOLS_FOLDER, "pktools folder", pktoolsUtils.pktoolsPath()))
82 
# ProcessingConfig.addSetting(Setting("Example algorithms", pktoolsAlgorithmProvider.MY_DUMMY_SETTING, "Example setting", "Default value"))
def qgis.pktoolsAlgorithmProvider.pktoolsAlgorithmProvider.unload (   self)
Setting should be removed here, so they do not appear anymore
when the plugin is unloaded

Definition at line 87 of file pktoolsAlgorithmProvider.py.

87 
88  def unload(self):
89  '''Setting should be removed here, so they do not appear anymore
90  when the plugin is unloaded'''
91  AlgorithmProvider.unload(self)
92  ProcessingConfig.removeSetting(pktoolsAlgorithmProvider.MY_DUMMY_SETTING)

The documentation for this class was generated from the following file: pktools-2.6.6/doc/html/dir_b8eb6544d8d9ffceba16909a7b9d17d7_dep.md50000644000113200011300000000004012616110567020556 00000000000000c7488fe8bb5008f9b47e1a3ee2ffd393pktools-2.6.6/doc/html/dir_0f63d6441a2c250919e1e8723011eb2f.html0000644000113200011300000002477012647637663017537 00000000000000 pktools: /home/kempenep/pktools/qt Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
qt Directory Reference
Directory dependency graph for qt:
/home/kempenep/pktools/qt

Directories

directory  build-pkcomposite_gui-gcc-Debug
 
directory  build-pkcomposite_gui-gcc-Release
 
directory  build-pkcrop_gui-gcc-Debug
 
directory  build-pkcrop_gui-gcc-Release
 
directory  build-pkdiff_gui-gcc-Debug
 
directory  build-pkdiff_gui-gcc-Release
 
directory  build-pkextract_gui-gcc-Debug
 
directory  build-pkextract_gui-gcc-Release
 
directory  build-pksvm_gui-gcc-Debug
 
directory  build-pksvm_gui-gcc-Release
 
directory  pkcomposite_gui
 
directory  pkcrop_gui
 
directory  pkdiff_gui
 
directory  pkextract_gui
 
directory  pksvm_gui
 
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem__inherit__graph.map0000644000113200011300000000014312616110567027362 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask.html0000644000113200011300000002567512647637662021523 00000000000000 pktools: qgis.pksetmask.pksetmask Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pksetmask.pksetmask:
Collaboration diagram for qgis.pksetmask.pksetmask:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string MASK = "MASK"
 
string MSKNODATA = "MSKNODATA"
 
string MSKBAND = "MSKBAND"
 
list OPERATOR_OPTIONS = ["=","<",">","!"]
 
string OPERATOR = "OPERATOR"
 
string NODATA = "NODATA"
 
string OUTPUT = "OUTPUT"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pksetmask.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/graph_legend.png0000644000113200011300000004663712616110567015006 00000000000000‰PNG  IHDR«ÛJ¦ØbKGDÿÿÿ ½§“ IDATxœìÝy\TåþðÏ ²*  ‹("ˆš»¸€f@êÕ[Zbj–vÝZÔ,—ÌÊnéÏ53KÓ›v]s+—R PÄAEPYdg˜åûûƒ˜+² 8Ùïûõâ¥gæÌ9ßsž³|ç™ç<ˆˆŒ1ÆcŒéžÃb¡#`Œ1Æc¬6œ¬2ÆcŒ1ÅÉ*cŒ1ÆÓYœ¬2ÆcŒ1e¨Ö\?ÿ lÛ¦åPš©V­€Í›gg¡#aŒ1ÖÍ›7·oß:ŒÁÓÓ›6m:ŒfG¤VoÀÅ‹À AMR3sø0pð`Å>dŒ1Æš˜H$‚··7œœœ„¥YKKKCTT¸“%;¬^Í*P‘¨:¤ÅXš)‘HècŒµp ,@ WšhÕ¡C‡0qâD¡Ãh–¸Í*cŒ1ÆÓYœ¬2ÆcŒ1ÅÉ*cŒ1ÆÓYœ¬2ÆcŒ1¥ñdõÀ‰Dµþ]¿~]Ó«lR‰‰‰ñCSŒ1Æš!]¸‡?Ë}Vâgš§~ojz饗‘‘HNNÆàÁƒUÓжm[M¯²A’’’0`Àdgg cŒ1¦ktý^}ŸÕLãɪ‰‰ LLLEEE€öíÛkz5¦T*‘““#tŒ1ƘÎÑõ{x}ô=~V³&o³ZY½ gggìܹ³JuÿÓÕÿ"‘ûö탧§'Ú´iƒµk×är9–/_gggØÚÚâ7ÞÀãÇUŸ;qâz÷î SSSØÛÛcõêÕoooU^™L†E‹¡]»v°³³Ã¢E‹ “É P(°nÝ:¸»»ÃÜÜC† Á¥K—´ºcŒ1]VÛ=¨¸gÿøãðôô„­­-V¯^={öÀÕÕ–––øôÓOüï^„®]»ÂÎÎóæÍƒT*U+†G¡¤¤ä™·ESËaÚ%ØV_}õvíÚ…Þ½{×;ïÑ£GqñâE¬]»K–,Ann.6n܈_~ù'OžÄ¹sç•+W ñÊ+¯ OŸ>HHHÀúõë±téRû ›6mÂúõë±fÍÄÇÇcÙ²eX¼x±vvcŒ1¦j»gV ÁåË—±zõj,]º'Nœ@LL Ö­[‡+VTùusË–-8qâŽ?Žßÿ]U±T›+W®`Ú´iðòòB~~þ3oË7àêêŠÅ‹#99ù™—Ç´„Ô1aBÅ_%$$ÐÓ«¨|-&&¦Æyžž@çÎ#"¢òòr@ ÔµkW:räˆj¾[·n©¦¥R)ݾ}›ŠŠŠH¡PPXX˜ês5ÅäááAªéàà`êÕ«¹»»ÓÎ;«Ì»k×®jŸ¯@tð úó3Æc€6â>TÓý’¨ö{f庢££‰è÷ì§§Ÿ¼WæDD$77·jë---¥Ý»wÓ€¨wïÞ´mÛ6*,,ltüO»ÿ>-_¾œiìØ±túôiR(õ~îilX~ÀÔuHãmVÕåááQãëTغ‰D¢z-55]ºtQM{zzÂÓÓ`dd„øøxÌœ9EEEõÖÞ¦¤¤ÀÞÞ¾Êk–––(//G¯^½ª¼Þ³gÏ:—ÅcŒ5gµÝ3+™››øß=ûéé'=y÷ðð@zzz•÷CBB0eÊŒ5 ß~û-ú÷ï¯ñyðùçŸcÙ²e8zô(¾üòKÌ;!!!prrÒèºXãÖ àéƒV.—îß¿_m^±¸z˜HIIQM_¿~]Õ  ´´X´h¢££±eË–:c±±±ABBˆD„¼¼Æc¬9ªížÙ ªÿÇÇÇ«*§*ÙÚÚ¢[·nˆŒŒÄ… ª<›¢i™™™ˆ‹‹Czz:úôé£zP‹ OðA¬¬¬»wïFAA6mÚ¤Öç¦NŠeË–!66±±±xï½÷šš J¥(//‡‘‘JKK±|ùrmY+U>%ãÇÇÒ¥K‘ššŠ˜˜Œ9›7oÆœ9s°hÑ"ááÇ8uêT•v9Œ1ÆXKSÛ=³1æÏŸÄÄD\¹rü1^ýõ*ï?÷Üs8wîŽ9‚;wîÀÝÝ3fÌÀµk×4±)P*•8sæ Æooo.\¸€ýû÷ÃÆÆF#ë` Vk-´Y}ÒŠ+ÈÊÊŠ:wîLAAAÕÚ¬&$$T›.++£… ’ƒƒYZZÒ¤I“(//O5߆ ¨M›6äääD[¶l¡I“&‘Éd2:t(™™™©æ-(( éÓ§“µµ5µmÛ–fÍšEÅÅÅ$—ËiݺuäææF­[·¦AƒQTT·YeŒ1¦7 á6«µÝ3+×UÓ=ûééÊeoß¾\\\ÈÆÆ†æÎK¥¥¥u¶5ÍËË£ 6PçÎ)%%¥Qñ?éçŸ&oooÚ·oI¥Ò:ç­·YÕšC"¢‰>-0°âßC‡4+7"pðàÿö!cŒ1Ö„D"<ˆ@º%&&¢K—.5>§¢¥R ¥R CÃg{ôF&“ÕØ–¶1:„‰'6z›X­ ö€cŒ1ÆXcˆÅâŸgi(M%ªL»o³ÊcŒ±–ųgÏ: ¦'8YeŒ1ÆX“²³³ÃÖ­[…ƒé NVcŒ1ƘÎâd•1ÆcŒé,NVcŒ1ƘÎâd•1ÆcŒé,õ»®JJþó-†Ò8D„ìbl͸.Æc¬&¡¡¡ZªTÓ$")@FÆG¢>MªÅªS/Ãsrt°›‰ “®Xhé‡èÌí° ©ÐáTg`tè tŒ1ÆZ('''üG+›êô!^Ú t$ ãìì,tÍ’z#Xé°W_Ý‚ÈȬ_?“'{ cŒ1ÆžEYpÄÿ0¶:"&¬ÃzÝf5'§—.%B$~ù…«ßcŒ1½—þkE¢ iG …é½NV uæ cŒ1ÆžEÒNJ€”ÿŸµtz¬>|JeE+1Ž».pDŒ1Æk´â û@€€ì¨Š×X‹¦·ÉjjjnÞ¼Ê&· …‡_8*ÆcŒ5Zê!@üijßbCàÞaáâa:Ao“Õ  ?ah(RMââî#)é‘€Q1Æc¬Ñ’wJÙÿ¦•2 i—pñ0 ·Éê— “)«¼&‘üÝŽ•1Æcz%?È¿UËëqMÓz™¬Þ¾ý))ÙÕ^—ÉÜ€1ÆÓG©±Qõ×ÅF@êÁ¦‡é ½LVý5‰A復æ 6ö~GÄcŒ±Æ£ŠŸû•åÕßR–ÿÝ+€^w ÏžÞ%«D„C‡®@&SÔø>7`Œ1ÆôLΠ$­ö÷KÒ€œ«MÓ)z—¬^»–‚¬¬‚Z߯l PÙ¥cŒ1Æt\êþš›TUÌÃZ$½KVýõOÖÜ Ò£G…¸|9©‰"bŒ1ÆX£‘HÚSs€JÊr yOż¬ÅÑ»dõøñ?¡TŒŒ kýDøí·¡CeŒ1ÆX}²/å9€HˆkþIivÅ ¬Å1¬ݲté?›[¬š¾w/çÏ'`òdï*ó Щ©CcŒ1ÆXCYx½VW}-3´âßv/<5oצ‰‰éU¥§Ž»Ž9sváÁƒ¯……1Æcšp>°âß¡‡„ƒé‚Ãz× €1ÆcŒµœ¬2ÆcŒ1ÅÉ*cŒ1ÆÓYœ¬2ÆcŒ1ÅÉ*cŒ1ÆÓYœ¬2ÆcŒ1¥wý¬2Æc¬™ëþ©Ð0ÂÉ*cŒ1Æt‹U¡#`:„›0ÆcŒ1ÅÉ*cŒ1ÆÓYœ¬2ÆcLï%&&B$ ÓNVcŒ1¦÷¬¬¬°dÉ’zçKJJ‚MDÄ4…“UÆcŒé=¬^½ºÞù”J%rrrš "¦)œ¬2ÆcLoÿüs$%%aêÔ©øòË/áé鉴´´-‡i'«Œ1ÆÓ9¶VÆèÖ­"##qáÂ<~ü¸ÁË‹Ÿ-ÍÉÌÌD\\ÒÓÓѧO˜˜˜<ÓòXãp²ÊcŒ1óœ›Î;‡#GŽàÎ;pwwÇŒ3píÚ5,¿¨¨¨Æ×•J%Μ9ƒqãÆÁÛÛD„ .`ÿþýÜå•@8YeŒ1ƘÎêÞ½;¶nÝŠ„„xyyaâĉHMMmôò:v숡C‡ÖÚîõ×_ÅòåË1aÂ$%%áßÿþ·ª9†ˆˆHè žÅ±c×1gÎ.Ó'''tîÜYkË_¼x1Ö­[§µåk['»Š“²DÂò ´yþë{ùÖ¦¶ü¨Z²zÿþ}”——ãСCMXKsñâE|ýõ×Z]—¡~ Äýû÷µºŽ””,X°ƒ ÒêzØÿlذAë_ÊÊÊ`aa'''­®‡iVZZÊÊÊ´ºŽ””x{{ãƒ>ÐêzXÍ´}þ7Çò­+?ªµÍê„ ´PKFDM¶..Cö$ooo>&šÐáÇ›d=ÆÆÆ°µµm’u1ÍÈÊÊj’õ899ñ9/¦8ÿ›[ùÖ•q›UÆcŒ1¦³8YeŒ1Æc:‹“UÆcŒ1¦³8YeŒ1Æc:K#ɪH$ªògii‰1cÆ 99¹ÞÏ&&&B$ª¹kŠ'ß«k¾úâ±¶¶F`` =z¤þFµ0ÏR†ºêÉc†‰†ièñÐóS[1r™ÖO$!11Qí×Õ!DÙë’æ²ý¨vN=ùwýúu­Çð,û²¹”ƒ6iãü¯‹&ËDc5«‘‘‘ÈÈÈÀƒ¥R‰×_]S‹‡••–,YÒ¨x‚ƒƒ‘žžŽ¹sçj,žæHSe˜””›gŽGSË©ÄÇDÃ4äxhèùY“Æ”7—){Vš¾Îè«—^z ÈÈÈ@dd$¨¦322àåå%p„uS÷Äå­Ÿ46ܪ­­-Ú·o°··Ç?üGGGÀÂÂâ™—occƒÕ«W7:ž5kÖ`ìØ±ÏGs¦©2T*•ÈÉÉyæx4µœJ|L4LCއ†žŸ5iLys™²g¥é댾211‰‰  ¨¨Tç–>P÷Äå­Ÿ´ÖfÕÀÀ —Ë«U×T5¼oß>tîܶ¶¶xûí·QRRRåý'?#—˱|ùr8;;ÃÖÖo¼ñ?~\o|8}ñÅDDTPP@FFFôÖ[oQzz:íÝ»—PVV‘±±1mݺ•222hÇŽdhhHEEEDD´fÍzå•WèÞ½{C}úô¡>úHí}Õ˜ýÛPÚ,ÃQ£FÑÙ³g©¨¨ˆ¦L™B/¼ðݽ{—bbb¨{÷îôùçŸW+o¢Ú÷[]eÙålذìììèÈ‘#ôàÁ:yò$988¨>¯ËÇ:xð`ƒÊ«¡ºŽ†ׯ_Wíë³³3)•J"" "’Éduî熔wM1êR™M˜0&L˜Ð Ï4Tll,ÅÆÆª=?JHH¨÷uôꫯR^^ýðÀrrrê=Ïj»&4ä<zMš4‰ hûö퀩  €¶mÛF(;;›ˆê?^jÚ&M^gÔÕÐrkŒg9þjÚ'Dõï_uÊ©rÙUîùµÝ;*]¾|™Þ|óM²µµ¥ÔsCÊûIÁÁÁdggG‹-¢¤¤¤†î:mŸÿY¾:çc¯š87êÈ]i,Y}òO"‘аaÃT¯N²S%WW×Z“Õ®]»Ò‘#GTóߺu«ÊôÓñ U÷ùçŸcÙ²e8zô(¾üòKÌ;!!!prrjвtM}çc¯Ú>7š´ŸU¹\¸ÿ~µ÷Tÿ‡‹‹K­Ëqpp@JJŠjúúõëX¹re­ó›ššbæÌ™HKKCVVJKKˆE‹!::[¶lQÍ[ZZ ¥R‰Ã‡#77ÿú׿0vìXäææ¨hÄ"!//QQQjï}WyÒ·k×HJJR½w÷î]tèСÆÏÕ¶ßZ–µ-§cÇŽ¸qãF•yãââj]šQÛM`Ò¤IøùçŸqìØ1ôíÛWucªk?פ!û–Ë´~ÎÎÎÕº¨¹}û6 «Ý„Åâê·‡ºÎ³º® êœçuÝÔU_¹Õ´M YNC¯3Í&Ï‹§ïù•‰e%[[[tëÖ ‘‘‘¸páB½Ï¥ÔDÝò®Mff&âââžžŽ>}ú¨@ÓWêœÿ½6jûÜh’dÕÊÊ °{÷n`Ó¦MÕæùðј˜ˆ+W®àã?Æ´iÓj]ÞÔ©S±lÙ2ÄÆÆ"66ï½÷RSS«ÌóèÑ#<|ø>Ľ{÷°fÍ899ÁÖÖR©ååå022Bii)–/_(,,„H$B@@~ùå ¼¼‰¦¦¦€ñãÇcéÒ¥HMMELL FŽ‰Í›7khOé‰D‚‰'bÞ¼yHNNFll,>ùäL™2E5Oå¥@íûM²Tg9sæÌÁ¢E‹„‡âÔ©Søì³Ïª,‡‰¦€¼¼<,_¾o½õ–êõºös%uÊ»—iÃL›6 sçÎʼn'œœŒÐÐP¼þúëxã7`ll\ïçë:Ïêº&Ôuž«sP׳”›¦®3Í™&Ï‹ùóçW¹ç?Ý-ÞsÏ=‡sçÎáÈ‘#¸sçÜÝÝ1cÆ \»vM›R¥¼Ÿ¤T*qæÌŒ7ÞÞÞ "\¸pû÷ï×û.¯Ô9ÿ{mÔú¹Ñ€6µB-í ž´bÅ ²²²¢Î;SPPPµ¶¨ Ž;’}øá‡$•Jkm³ZVVF .$²´´¤I“&Q^^^•xžü‹ÅÔ³gOŠŠŠRͳaÃjÓ¦ 999Ñ–-[hÒ¤Idgg§Ú;w&###òðð    Õç húôédmmMmÛ¶¥Y³fQqq±ÚûJ—Û¬ÖU†5µóÉÍÍ¥©S§RÛ¶mÉÞÞž,X@¥¥¥$“ÉhèСdff¦š·¶ýVWY6d9r¹œÖ­[GnnnÔºuk4hEEEÕÚfU—Ž èh›Õ†5³fÍ"333UÃüJµí熔weŒºZ¦DºÙfU&“ÑÚµk©k×®ÔªU+êÔ©-[¶¬Ú¶=]þ•Óõgµ]ê»f×v¨+–š¦ë;^júœ&¯3êÒ×6«Ù¿OOW.{ûöíäââB6664wî\*--­³=i^^mذ:wîL)))õÆÜò~ÒÏ?ÿLÞÞÞ´oß>’J¥õì©Úéb›UuÏÿÆ\5qnÔÕfUDTµÁ¡C‡0qâÄZÛ1±gÓû—ËP¿ˆD"tèÖÖQù3›®wØÎªjŠrkŠã¯1Ñ¥K—Fߟ”J%”J% 5öÈM2™¬Ám\k¢íý¯«åû,êÈ]k§´cŒ1Æ4L,?s[Ôºh"Qeš×¤X1Æc¬å²°°ÀìÙ³…ƒéNVcŒ1Ö$ììì°uëV¡Ã`z†›0ÆcŒ  $[…T ‰™ $bHL¹±&œ¬2ÆcŒ5±Ò\9~u¤¬úº¡±b‰†¦04ÃÐXcK¶Cbb#3xdûã®õya'«Œ1ÆcM̤!LÛJPüHVåu¹T Hò"E­Ÿmoà…TË+ÚQgp²ª#ÊËåÈÏ/EaaÙßÿ–"?¿Ý»w€««­Ðá1ÆcLÃ:XãÖ¡GPÈÔëÊK$Áq9ö<ø2ƒR-G§;jMVýýý›2Žf­¸¸5ŠŠÌ¡PˆQR"C›6¯ à+” °° EERÈd5ƒzùå>زej£ÖËeØpii‘Ærc+*þŒF¡acRë¢+Và‡~: Áéñc<°°€ÜÀ@èpª¸yó&|}}µ¾žüüüjÃê:™LààD æŠÖ­„§ÉÃÒÒRëë ×È}@.—@¡0€L&\n¹ÜffEhÕªLQ6Oêžÿξ–¸¹/«ÞùD÷ ïÐý5;ü8±Tcå«+233k}¯Z²:pà@¼öÚkP(j¯~f SP`ìls€H±±éõ~ÎÀ@ŒAƒ:7x}\†£)qÁìJÅU¿­ŠH#2‚ ™ÀTi S¥)LȤâOi‚VÊV0%SRã~¨xíµ×0pà@MlB­>øà¤¥¥iuB0”Ëáù×_pËÉA¢»; › P—¯¯¯Öa°³³Óêòµ!))+W†âÞ½|¸»ÛÁÃÃTèšœ¥¥¥ÖËn„ õÎ#“ ´ÔååÉ P^.†T*†Lf©´âu…B¢ê_Ö--ÃÚºX¡7 êœÿJ9A© ¶C^¦¬u>±¡­í$ð÷{G3 IDAT[Û 6žç‹:å«o¬­­kM¾«`Å´ã·ßb°`Á”••×Z‹ú4‘H„«W?ƒ½½•–£c•’³“á³Æ™™+å5Îch`‘”¤„LQÑÖH$áâÒ‹èªÝ¤“U·gäHdÞ¼ ‘H„~³gcèGÁ€;öÖ9 …ßkÖü…B KKÄÆ®€?ý,”—_þ—/'$ˆÅ"ÈåJ(µ'N"‘Ë–Á;ïŒhª0›•òBÒ. 5ü1Ò" P^¨€™½JÉ ”WMÇDHtÙ>;Abª[¿5¡Ã|•h"£G÷ÄùóK1dHˆÅêý¤Ü©“-'ªMÌÕÆ‘K#ÑÁºŒ kþyR®C*—ªUˆkSkôèУ #e•ºŒ±D"µ~À‡GæÍ›B‡ÅžpûöŒ±V•¨J$9²''ª3æ9ÕhP2™R©¼ÖDU$ªHTW¬ljjÉ¥JÄîÏÂÉ9 Øãƒ?>OAÙcúÍqÀ¤Ý1p~<]7"6ÁÀX„áŸwĈ[r¢ €hR¶¶æØ·oV¯ž##Ã:/Ô‰ˆûö]ă›0JæÜÆ——]F'›NÔ_Cg 2Àâ‘‹ajÔò~ÎÔ®#F@)«øâ T(PžŽ½£G#ò«¯@ÜFPJ%aóæPŒ¹ÉÉÙªDH.WàÅ½ŽŽM™â ssãz牱X„-[¦bútŸ&ˆ¬y1ˆ<m:›`ä&7¼öFoqƒ×k¶0³7‚ã` ˆžÈEÅ"Xvl…ñû=ÑeLá×!Ü @ ññ1gÎ.$&fA.¯ù›lÿþqëVŠ‹¥èÚµ=FŒðÄóÏ{`À€N02⎴íQá#<¿þyÄgÆÿ¯µf­Ìpí}X˜X4atL…›{öDinn•—E"Ú=÷ÆnÙK‚k¹RR²ñÞ{{qýú=(•Uo3‰nßþ?˜š¶¼‡«tÍW_Â7ß„@.¯ù‹X ˆÅرc:üýù †¶œœŒkE /Ù`Ð"G¶âúÄ¿q3¡¸»·ÇéÓ 1ožD"‘꧘J­ZIðóÏïáÎU8uê¼új?ÄÆÞÇäÉÛàæ¶/½´ ›7‡"&& ü}C;lÍmq~ÉytïнÖV‰Þ¼ëLf™–‰Dpó÷‡Ø°ê8"BVl,vúùáÖ/¿\Ë´wïEøù­CLLZµDU,aРΜ¨ê©T33ãZ›¦‰Å"ˆñßÿ¾Å‰j òS¥ˆÙ“‰ã3â‘úGþ3-«ó‹m`hb€V¹ÂçSgNTŸÂ5«:àüù¼÷Þäå•@&S@,ãùç=°gÏÌjóæåãüùDDÄ#8ø23óagg_ß®ð÷÷°a°°h%ÀV4_ù¥ùxá«p#ý䊪 ‹$˜·2‡T.ÅŒ¡3ðaÀ‡pjã$P¤-WüÉ“86{6PÓåL$ˆà>z4Ö¯G+ê1 ¹ÉÌ,À‚ûöQ_¤ ÄøòËñ˜6mHÓÈ—`çÎóøñÇI1xpgDD$TyøW,ÁÈÈ{÷ÎÂàÁnF«;HIÈŒ)FjX>RÃò‘ŸZ†VV†pj‰n¶°õz†¦`(dJq’ZƒÃœ¬êˆœœ",XpgÏÞ|ùå8µÚݹó!!qGTÔ](•/¯ð÷ï/ôèá‘HÿûZ‘´£6ŽÂ¥äKªZT##Ìô‰ pàʬúmâ3ã1ºÇh|:æS p pÔ-‡´ ßyy”u<Å,ÃÜÞ/mߎv={6at-Ãիɘ>ýGäç—ÔÚ´©Ò¥KŸÂɉÛâ5µøø‡øî»Pý‰¶mÍðÎ;#0qâäåcÈ•P(*Ò±Xcc öïŸ: µnH*À¹e)({,‡¥K+¸ ³„Ë0K´ëÙ"5šfÆÉª®Ù·ï"¾þú ŽGGë}¶¸XŠÈÈDÇ!4ô622ÃÆÆ ƒ¹Áϯ¼`iÉ5V~i>ü¿öÇ{7P®(‡X$ÆwàfWQë $%NÆœÄÊ“+q)ù†¸ Á’‘K0ö¹±GÞ2ìùe<¸zµÞf1Ý'NÄÈ š(ª–cÆÓX¿þT½ó¹¹Ù!<|iDÄ*]¾œ„Í›Ï"4ôÜÜÚáÝwGàå—û@"ùßS=Ó§ïÀ¹s·¡T$ìÛ7ÞÞ ï绹*Î,ÇÝ3ypñµ‚¥Ký¥1âdµ9KMÍApp‚ƒãªÔºúø¸Ãß¿úõsU»-V¡°¬/n|ï^D`¿@œ}°ÆùÎ'žÇšß×àDÌ ôvî÷ýÞÇ”S` nÙÝhÓ•­[±j”òêý㊠*z×üþûðž?¿ZûV¦Ç_Ç‚ “ÉkìOZ"1À»ï¾€Å‹G ]Ë¢P(qäÈ5ìØ˜˜4øø¸cÆ _øùu«ñ×¶k×R0vì7hݺœƒ>}ZÖC‰“Ë`åÊMèt'«-EII9®]KÁ™3q8uê&îßÏCÛ¶f<ØíïäÕ íÚñÓìê(–cÉ/K0wÄ\tmßµÎy¯§]Ç†à øéÒOèØ¶#æ¾0³}g£•„/Šš–ÿ>ÿ|µ×ņ†0iÓÿؼ΃ YË’––‹Ù³w!66½Ææ'O.@ïÞÎDÖ2”•ɰwïEüøcÒÒr1n\̘ዞ=ëoK¿iSüüº¡[7‡&ˆTXJ!#º°¢ýix>Š–cÒ‰î0kÏþé NV[ªÔÔœ¿ÒŠCXØÈå tïîwøúºcÐ 7rCoMIz”„oB¿ÁÂÿKKÌ6ïû½+SôA“¶öí‹¢‡+&þ~°ªm—.è9e úάþÀ"ÓŽ;"pâÄŸ¸|9"T=X[›âæÍü‹Ž<~\‚;±k×I1eÊ Ì˜á —¶B‡¦3гdHÍýˆ|<ü³¤ Ø÷3ƒ³%\|-aÞÞ×Qœ¬2 ´´W¯¦ <<§OßDbb¬­[cèÐ.ðñq‡Ÿ_7´oÏOPkBfA&¾ÿã{|ú ”¤Ä´ÁÓðѨ`oi/thÍBðGáæþý±†þ9Š>Äåï¿Çë'O¶[7#lþ¢£S1nÜ·øàƒÑ­›æÎ݇ÒÒrÆï‡' b³’žž‡mÛþÀ—`ddˆ·ÞŠiÓ†¢m[3¡CÓ9ç>IArhìû˜ÃexE‚ÚºפêNVYu•µ®ñ8{ö6Š‹¥pwo/øúºÃÛ»s•†ù¬á J ðßÈÿbí©µÈ)ÊA`ÿ@|:æSt±ë"thzínH~}óMØxx`ìÖ­hÛ¥ ”r9Œia!¦þþ; [q m),,Ë/~GÇ68p`Äb23óñöÛ{•ˆíÛ§côhî‰Aþüó6n<ƒÐÐ[pq±ÁÛo?ñãûrÿµu(Î’ÁÈLÜâ‡.ÕCœ¬²º••ÉpåJ2ÂÃ+’ט˜4´nmŒÁƒÝàïï…#<áàÀ?e7–T.ÅÁ+±òäJ$f%btÑX>v9úuì'thz‰”J$üþ;:À@ò¿òSS±ëÅÑ=0#¾øBÀ›·ùóBhè-„„,ªòkŒRI »__÷:‡™fu#"„„ÜÂwß…âÊ•dôéã‚ùóýñ ÝZtÓ y™÷£ Q^¬@—p—hÍ'«¬až¬uýã¿PXX—¶ðóóB@€׺6Re·W_œøWS®r·WZwø0~_°ãvîDg??¡Ãiv~ùå*æÍû {öÌĈžB‡Ó¬Èd =­[ÿÀ_eÀϯÞ}wD‹îµ$[†{ó?¸\…L —áVð_×r÷I3ÆÉ*k<¹\‰èèßBDDzL±ƒ×DþÒêàd•5½ÊZ׈ˆxœ9‡k×R`ddˆþý]áë[‘¼ª3ÚJK•]”ïÎ~‡ïÎ}‡2Yþ5ô_X°NmxŸ©K)—cÿ¸q•”àõß~ƒ¡1Qj¨¬¬Bøù­ÅÐ¡îØ²eªÐá膇ڜ(Ê × ‘úGE‚ZœY³öFpöµ„ûض°íf*tˆL·p²Ê„—“S„ÈÈÄ¿“×XdeÂÙ¹­*q>܃«A±´ÛÏodž3‘Ÿ×¼†F~„nÜñ½:òSS±+ ='OÆðåË…G¯¦Lù’’áÌ™…°°àóS]5 ‡:sæ0ôèá(thMâáõ"œš{²Rlñ¾…ÌÌ|ØÙ™Ã×·«ª‡ ¡ÃÔ D„1'°ú÷Õˆ¼©ê«uLÏ1œÜ×áÄ;ïà^d$¦ÃÔ–ÛÊÕçÉáTçÏ÷:—œüß¿þÝì‡C%%!+¶íz´ø’Ã4‡“U¦_îÜyˆ8„‡Ç#*ê.”J‚—Wøûwƒ¿¿׺þ­²¯Ö“7O¢G‡ø0àCL8†bîVèiÒ‚ìò÷‡—^þñG¡ÃÑi5 §Êjöäp¨;Ú`Μæ9ª¼T‰ô‹H Ïǽóù(Ë“cüOžhÛ•+˜Æp²ÊôWq±‘‘= „†ÞFFÆcØØ˜aÐ 7øùuC@€,-[v;¨˜ô¬?³û/í‡S'Ì÷›Y¾³`"áÉ“Ò/]ÂÁ àÿÿ‡ž¯¿.t8:«¶áTY…–2jqÖ£G])„RNh÷\k¸øZÂe˜%,]¸ 3Ó(NVYó‘ššów×XqUj]+%è†~ý\›Õ £!RrRðuðר±fÆfx{øÛ˜ï7Ö¦<ÂX¥ˆU«½c¦ž:…6nnB‡£sx8ÕÚµ´áP/m¼„“¹p^1rT‡æ0l¥ó'&&¢K—.¨L}ý1<Ú·ìò§¦bw@z½ñ|—-:P9œªB¡ÄÉ“<œ*Ð|‡C•(v!%Ù2ôœÚ©w  ÖécÇŽQ=ÈØØ˜\]]i÷îݪ÷ÊËËiáÂ…dggG¶¶¶´páB*//'¹\Nk×®¥.]º™™ <˜öîÝ«Znûöí)22²Z,………”ššZcǧ^½z‘‰‰ µoßžV­Z¥VŒu½Çêuˆ“UÖ⥤dÓž=‘4kÖNrs[BööïÓ°a«iÅŠã~‡ÊËåB‡¨u ¥‚Ž]?FW$Ì Y=„Ž]?&tX‚9>g}ß§•äæ Š þøã/êÐaíÛwQèP~‡ÞxãêÐa ¶šº¬ß×%Ñ•Í÷éð„8úOŸk´kø :ûI2Ý Î%iQ÷ Mš4‰ hûö퀩  €¶mÛF(;;»ÎeÔ•¬‘±±1mݺ•222hÇŽdhhHEEEDD´fÍzå•WèÞ½{C}úô¡>úˆ6lØ@vvvtäÈzðà9B))uÿt­KäR%¥„=¦ð©ôÓè›tuëƒ&[7žª9­oº&•5˜2™ŒˆˆÎ;§ªÑ,))¡ððp"ª¨Ýܹs'PNN9::VY~^^ݾ}›<==i×®]UÖód›Õ™3gÒøñã«Õ–Ï›7ž{î¹*qUÆallLAAA¤T*©´´TµmuÅX_ü¬^‡ø±NÆÔdh(Æ€T}'fe",ì/„„ÜÂúõ¿ã³Ï~…‹K[U×XÆumONw²í„o^ûþßÿñ=¾ ý_‡|iƒ§á£QÁÞÒ^èµfè’%H‹ŒÄÉ÷ÞÃäcÇZDwVÑÑ©Xµê,@ïÞÎB‡£u•á9r ÆÆ½UV¢@zd!R##-¢eùr˜µ7‚ÓP 8zëWÏVVV€Ý»wãÕW_ŦM›Tï‰D"`ïÞ½6lÊËË!‘H`jZ1èËøñã±téR¬_¿ùùù˜5kú÷ï9sæ`Ñ¢E°´´ÄÀqýúu|öÙgªå®\¹žžž˜:u*Þy瘙™á×_ŦM›pâĉj1J¥R”——ÃÈÈ¥¥¥ø÷¿ÿ (,,¬7ƺÞcj:]f¬9ËtãÆ=Z¿þwU­k§Nµ®ß}Ò¬ž¤.(- !Éa¡Ï1¦©;¦R|f¼ÐaiM^r2mìÒ…ÂW¯:­+((¥AƒVЄ [H¡hm3kªzhjÈ•´gO$K…KmÙÓïhú¡_4Mû‹þÜ‘AÙwJ‰¨Y%"Z±bYYYQçÎ)((¨JÖƒRçÎÉÈȈ<<<(((Hõ^AAMŸ>¬­­©mÛ¶4kÖ,*..&¹\NëÖ­#777jݺ5 4ˆ¢¢¢ª,7%%…^}õUrpp sss0`;ö¿‡KŸnK»aÃjÓ¦ 999Ñ–-[hÒ¤IdggWoŒu½ÇêuˆûYeL ²³‹pñbâß#jÝB~~‰ªÖÕÇÇÏ?ï 33c¡Ã|&R¹¯ÄÊ“+‘˜•ˆÑ=FcùØåè×±ŸÐ¡i\ÌÞ½^º„óàÁB‡£5ï¿ÿBBšïpªÔŒ†CUÊ Igòà8Ø­¬ôÿÆêÀƒ0¦m …qq÷3gâpíZ ŒŒ Ñ¿¿+|}+’מ=„³Ñ”¤Äɘ“øâĸšrC܆`ÉÈ%ûÜX¡CÓ¨ã³gãÁµkx3$­þþɲ9iÎéêÛp¨ŠrBƵBØ÷5ƒ?„ÃZ ‡Z–/GÚù¤†?Fzd!d¥ Œù;ìûè~ÛYuÕד§#¬œ¬2&$¥’›Žˆˆx„‡ÇãâÅD@ïÞ.ð‚;zôpÔ›îr*Eß‹ÆÆøéÒOð´÷Ä¢aÒ€Iè÷J©øyòdŒüúkx½úªÐáhDsNU_†C-¼_Žäsy¸–‡×‹!6Á¡¿\|­àìk‰Övú}¾0¦!œ¬2¦KòòŠqþ|""â| ™™ù°³3‡¯oWU&B‡©¶Ä¬D|{ö[l Û†ö–í±Àf ÖÆ­…­Ñþøâ ÜØ»oœ> kWW¡Ãyf+VÇÿ{§N}€.]ô{<øøø‡øî»Pý s¼ýöó˜8q€ÎþRqcW&âfÁõyk8ûZ¢}ïÖü³?cÕq²Ê˜.»sç!BB⨨»P* ^^àïß þþ^zSëú0ÿ!6†lÄw羃‰Äï>ÿ.掘‹¶fm…­ÁååØ7v,Ɔ˜±¡þÖD†‡ßÁäÉÛ°fÍL™2Hèp-""Û·‡#$äºti‡wß—_î‰Ä@èÐê$—*a A¤gw1ÖÄ8YeL_KYÑÃ@hèmdd<† rƒŸ_7xÁÒR·ûíË.ÊÆwg¿Ãwç¾C™¬ ÿú/, X§6úõ€YNBöŽ…~sæ`ÈÂ…B‡Ó(YY…ðó[‹¡CݱeËT¡Ãi0…B‰#G®aÇŽÄĤÁÇÇ3føÂϯ›à_àòî–!5â1 ÓËáóIóï«–1-ãd•1}•ššów×XqUj]+%è†~ý\u¶;žbi1¶ŸßŽ g6 #?¯ x üݺ šÚ®ïÞÐeËxèœéW­$aÊ”ÿ )éΜùP¯š–”•ɰwïEüøcÒÒr1n\Ìœ9 =z8 “RAxøgî…ç#5,éR˜¶•Ày˜%†.uâšSÆž '«Œ5%%å¸v-gÎÄáÔ©›¸?mÛšað`7ÕˆZíÚYf52… û/ïÇÚSkq+ãþÑãøxôÇÔY?’¿£o½…Ì›7+º³²ÔŸ~I·ný«VÀÑ£óôf”ª¼¼büøcvî¼€’’rLžì3|áâ"lS’ˆ•÷’imÜLàìk —a–°íÖÍ  Æt'«Œ5G©©9?¤‡°°;ËèÞÝ>>îðõuÇ An04Ô;)áDÌ ¬þ}5"ïFªújÓsŒà?éÖ¥47;_x.>>ýÄðº,::ãÆ}‹ ðþûB‡S/]5z{ŒZÀÅ× æŒ„‡±æˆ“UÆš»ÒÒr\½š‚ððxœ>}‰‰Y°¶å}´) ·ßžý2… Ó‡LÇâ‘‹ÑÁªƒ ñ<-'>{FÂÀ¹s1èý÷…§ŠÊáT`åJÝiªP9êž=‘ÈË+d8Ô¼¤2ü<áZYÂi¨\|­à8ÈSÝiÓÍX ÇÉ*c¬fr¹ÑÑ)¾…ˆˆxܼ™ úöí/ŒÙŽŽM_»Y$-ÂŽó;°þôzdfabÿ‰øxôÇðhïÑä±<íÏ;qnùr¼väúö:µ–ÿüç7Ëug8U]5óF1ìz˜rSŒé&NVcêÉÊ*DXØ_ ¹…°°¿PPPQëZÙ5Ö°a]›4*——ãÀ•XõÛ*ÄgÆctÑødÌ'è:°Éb¨†¿NŸŽìøx¼yú4ŒÌ…‹^—†SmêáPó’Êþ/Ù •µðI:c¬Q8YeŒ5œB¡D\Üý¿%¸…›7ÓѪ•ýúu„¯¯;º7Yb¤$%NÆœÄÊ“+q)ù’ªÛ«±Ïm’õ?­$'»üüà:|8F~ýµ 1TÒ•áTŸÕݽÞyG;á*„ÌëEH «Ú9¿ß:W´{N7ººbŒ5'«Œ±g—]„‹UÉk~~‰ªÖÕÇÇÏ?ï 33c­Çñd·WÏ9>‡þ 0eàˆ›¶mJX~ž2c¾û/¿Ü¤ë®$ôpªM9jæ"Ü:œ´ ÈaÝÙ.¾–pÎó3Ö p²ÊÓ¬ÊZ׈ˆxœ9‡k×R`ddˆþý]áë[‘¼öì©Ýî®§]Ç†à øéÒOpië‚y/ÌÃlßÙh%ÑÎÏÍ59ûÙgˆ;|oñi‡­NõîÝ,/lÒáT+‡Cݱ#ééyM2jÂÉ\ÄÏË0K¸øZ¼ƒö¿1Æš '«Œ1íÊÉ)BddâßÉk,²² áìÜV•¸6‹I’ðMè7ø!üX˜X`ΰ9xßï}X™j¿;.Ey9öþã067ÇÄÇ›´;«mÛþÀÿý_Ó§ª«Ã¡2Æô'«Œ±¦£TbcÓððx\¼˜èÝÛ^ðñqGŽÿ™8«0 [ÎmÁ7¡ß@IJL< KF.ƒ•v»Hʾs{GÆ ÷ßÇÀ¹sµº®JM=œª¶†C}²sþ¢‡åüÅ à‡õk‰8YeŒ '/¯çÏ' ""ÁÁ·™™[[s ÖUÕÀ&Â.,+Ä~ÄÚSk‘S”ƒÀþøäŸÀ½»ÆÖñ´è;ðÇ_`ÒÑ£°ïÝ[këšv8ÕèèT|óM°F‡C-H“V<žÌëEö}Íá2Üãl 6àlõÿÛ»·˜¨ï4ŒãÏPè”Ê–Ö(©P“µº±(`1€‰]Q$ˆembOÙ¦!^TYÒxÕMªÁØMŒGqqŲ£‚¢Tšl£®Y¬%àìâGfa/”‰t¥âœ¿òý\‘ÿ̼óÎ\'¿™y_`"¬0ŽK—Údµž×ñã—uúôõôô*66B))1JI‰uÛ©«ÍnÓî3»µáïÔx£Qs'ÏUÁ¼M7Í ¯âWz{õ·?Vû?êOUUä¹_¥{zª'סV®jÔϧ;åo~b8ÿŒò 0Þ60/a€1Ý»gÓ©S& 9rQ­­¿(44Hqq”œ£ÔÔX™Í.=Gߨ«/~©3Íg<6öªoœUdr²æ|õ•[k÷ñä:Õ±µùØ/nöUøïÎàI„U/‡«WÛÆ:ßïÔõÑR‚M›6Þ¥Ó½¾±WÿyPïyOk’׸uìÕ¿SENŽþ¸m›ÞIKsKÍ>žZ§úôu¨³5iÒïž«Îí¦Ro¯‚£^ÜT¯ Â*€—Ïýûuî\³ªªÎëðáÔÒr[o¼¨™3':6j=Ò©Ú ?5h³u³ÊêÊ4>t¼VÏ^­å³–k¸¯ëãŽ|ñ….TTh‰Õª‘.ד<³NÕÕu¨ŽáüÇç¿fSô¼ÍúËX—{0äV¼ü®^mü#­óª©¹$»ý¿z÷Ý·”­ÄÄhÅÅM¯ïóM†o¼Ñ¨¯~­’š9ZŸ¥~¦Oâ?Qàð@§û´ÛlÚõá‡n6+ÓbqË8« jÇŽª¬ü³¢£Ã]ªõ´u¨YYÓµÐÁþ G?Õ> §×jû†óûklâë;ˬ°X†óp aÀ«¥«ë¡ÎžmÖñã—õÝw?¨±ñ†‚ƒÿèÔ599æ¹~|ÔöŸ6×k³u³ü|ü´*i•>ý©B‚œ›Ú7ÎjæçŸë+V8U£»Ö©ºcjW‡]–çõVÜHI0ëí™#åìú)/€!° àÕÖwêzâÄe=zQ÷îÙ®””X%&Fëý÷£äçç£ææfUUU X§³»SÖ6«jnÖè5ÓkZôö"Å…:m'Oªûûï¸b…K§«ee×d2IYYÎMIèîîÑ·ßþ¬¦¦{zóM͘¢˜˜~÷755UãÆ¸Þýùp| À­«†ŽÎΪ­½¬cÇþ¥£GM ¡>xG.üCVë_Ÿ]d˜¤I’®Kjs®“¤a&“l.þû5™|%ù¨·×æt#fÈf»¦‡¯=ó¾ÙÙÙ*++sú¹À „UCד§®uu§|YÞnË &‹ÅâíV -{ø¼À5vlˆ>ú(N%%K}ÛÛíž‚° Ã"¬À°«0,Â*8)))I---n¿ï@ZZZ”””äR OÔO"¬ÀK"((HÙÙÙ’¤ÖÖVÍŸ?ßË€çVà%a6›•››+IêééQgg§—;Ï#¬€›$%%ÉjµjÉ’%JKKSyyy¿ÛÏž=«Å‹kÞ¼yÚµk—ãºÝnWqq±ÒÓÓ•žž®ââbÙívÇGõ ÊÌÌÔáÇݯ\¹R’´páÂgÖéééQyy¹rrr4wî\­^½Z/^|︎° nT[[«­[·*//O%%%ºsçŽã¶ºº:•––*??_Û·owœŒîÝ»W­­­*))ÑÆÕÐРo¾ùÆñ8‹Å¢µk×jâĉŽkÛ¶m“$íÛ·Ïqm :Ú½{·rssµsçNåä䨸¸ØÓo¸aÜhÁ‚ Òœ9s$©ßGõ™™™ P||¼$9‚lee¥Ö¬Y£Q£F)22Ryyyª¯¯w<.77WS¦L‘¿¿ÿo>÷@u8 åË—+!!A!!!š>}ºãë`t¾Þn^%¡¡¡’$_ßÿÿ÷"I2™Lý®·µµ)##£ßµÀÀ@ÇßcÆŒÔsTÇn·k„ ý®GFFª&xaÜè×At0·™ÍfmÚ´I’¤»w画£ÃqûÓ‚ïóÔY¿~½®\¹¢¨¨(Ç}›››U¼¯€—%$$¨´´Tׯ_WSS“òóóµÿþA=¶««ë™uÒÒÒTTT¤“'Oª££CõõõÚ±c‡§^¸'«àeK—.Õ–-[´lÙ2™L&%&&*//O·nÝð1áááš pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Egcs Member List

This is the complete list of members for Egcs, including all inherited members.

cell2bb(const std::string &cellCode, int &ulx, int &uly, int &lrx, int &lry) const (defined in Egcs)Egcs
cell2level(const std::string &cellCode) const (defined in Egcs)Egcs
cell2mid(const std::string &cellCode, double &midX, double &midY) const (defined in Egcs)Egcs
Egcs() (defined in Egcs)Egcs
Egcs(unsigned short level) (defined in Egcs)Egcs
force2grid(double &ulx, double &uly, double &lrx, double &lry) const (defined in Egcs)Egcs
geo2cell(double x, double y) const (defined in Egcs)Egcs
getLevel() const (defined in Egcs)Egcsinline
getResolution() const (defined in Egcs)Egcs
getSize() const (defined in Egcs)Egcsinline
res2level(double resolution) const (defined in Egcs)Egcs
setLevel(unsigned short level) (defined in Egcs)Egcsinline
~Egcs() (defined in Egcs)Egcs
pktools-2.6.6/doc/html/classFANN_1_1training__data-members.html0000644000113200011300000003026212647637662021274 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
FANN::training_data Member List

This is the complete list of members for FANN::training_data, including all inherited members.

create_train_from_callback(unsigned int num_data, unsigned int num_input, unsigned int num_output, void(FANN_API *user_function)(unsigned int, unsigned int, unsigned int, fann_type *, fann_type *)) (defined in FANN::training_data)FANN::training_datainline
destroy_train() (defined in FANN::training_data)FANN::training_datainline
get_input() (defined in FANN::training_data)FANN::training_datainline
get_output() (defined in FANN::training_data)FANN::training_datainline
length_train_data() (defined in FANN::training_data)FANN::training_datainline
merge_train_data(const training_data &data) (defined in FANN::training_data)FANN::training_datainline
neural_net (defined in FANN::training_data)FANN::training_datafriend
num_input_train_data() (defined in FANN::training_data)FANN::training_datainline
num_output_train_data() (defined in FANN::training_data)FANN::training_datainline
read_train_from_file(const std::string &filename) (defined in FANN::training_data)FANN::training_datainline
save_train(const std::string &filename) (defined in FANN::training_data)FANN::training_datainline
save_train_to_fixed(const std::string &filename, unsigned int decimal_point) (defined in FANN::training_data)FANN::training_datainline
scale_input_train_data(fann_type new_min, fann_type new_max) (defined in FANN::training_data)FANN::training_datainline
scale_output_train_data(fann_type new_min, fann_type new_max) (defined in FANN::training_data)FANN::training_datainline
scale_train_data(fann_type new_min, fann_type new_max) (defined in FANN::training_data)FANN::training_datainline
set_train_data(unsigned int num_data, unsigned int num_input, fann_type **input, unsigned int num_output, fann_type **output) (defined in FANN::training_data)FANN::training_datainline
set_train_data(const std::vector< std::vector< fann_type > > &input, const std::vector< std::vector< fann_type > > &output) (defined in FANN::training_data)FANN::training_datainline
set_train_data(const std::vector< std::vector< std::vector< fann_type > > > &input, unsigned int num_data) (defined in FANN::training_data)FANN::training_datainline
set_train_data(const std::vector< Vector2d< fann_type > > &input, unsigned int num_data) (defined in FANN::training_data)FANN::training_datainline
shuffle_train_data() (defined in FANN::training_data)FANN::training_datainline
subset_train_data(unsigned int pos, unsigned int length) (defined in FANN::training_data)FANN::training_datainline
train_data (defined in FANN::training_data)FANN::training_dataprotected
training_data() (defined in FANN::training_data)FANN::training_datainline
training_data(const training_data &data) (defined in FANN::training_data)FANN::training_datainline
~training_data() (defined in FANN::training_data)FANN::training_datainline
pktools-2.6.6/doc/html/classUi__MainWindow__inherit__graph.png0000644000113200011300000002553112616110567021454 00000000000000‰PNG  IHDR®p‡8K±bKGDÿÿÿ ½§“ IDATxœígXWÇÿ³ŽRQ„€¦bTPT¢FƒÆê{5ÆØK5 ‰F£¢±{‹½7, "‚ Š ]AémÛ}?¬lXÙ]fv ‘dÏÃfæœ{gæÌ¹ç¶³!„@ƒ†¦ÅjÖ?] TAc¸š$ÃÕÐ$Ñ®†& §1 »rå BBB ‹³X 3­[·ÆŽ;Àá4ž9Q9ª0{ölìÙ³...U¤†¿™ââbÄÅÅ!''UìêFõ¸`mmåË—7v±þ&×èåjb\ Májh’h WC“Dc¸š$¼ázyy!;;[éñììlxyyÑÖyƒ) .TX^mè–÷믿bÆŒ2Ç8///äääH½~ý^^^ˆ‹‹ct/ªÖëßÀo¸tÐ××ǘ1ch_Ÿ——‡ÔÔT™c¥¥¥ˆoÐòœñüùsTWWK=xðE!&&FzìñãÇàp8prrb|/ÿUþ†Û¬Y3L:•öõnnn¸qã†Ì±»wïÂÙÙ¹AËëÒ¥ „B!RRRÕÕÕHHHÀÀ뮣£#´´´ßË•…á2m"ûöí‹7nÈ„ 7oÞDŸ>}d®‹ŒŒÄ”)S0pà@øûûcÿþýrËóòò•+W0a :ÁÊÊ III€ÄÄD˜™™aðàÁˆ…H$$%%¡K—.Œt‹ÅbfΜ‰#GŽ´2ÞÞÞ •ê2d¢¢¢h?ËŠ…á2¥cÇŽ¨¬¬”† åååˆEÏž=¥×TTT`Ù²ehß¾=ÂÃÃ1cÆ lß¾EEEruÞ¾}›7oÆ´iÓ°mÛ6”––„ 5†WWW888€¢($''C  %%Ej¸tu;v ‡ÂÔ©S±wï^bëÖ­R™ 6 ??[·nÅÚµkqÿþ}8pÝ»wGll,àÑ£GÐÑÑ‘N <þ|>¿IÌlþ' —ÅbÁÓÓS.DFF¢S§N044”^Ããñ°sçNÌž=&&&033 1ry 6 úúú0` ¤¤€$\HLL!<€››Øl6\]]ƒgÏžA,£C‡ ë+O÷©S§0}útôîÝ&&&èÞ½»4Ä …¸ví‚‚‚`aaüïÿÃåË—áááøøx…B<|øÇGZZÊÊÊhii©÷€&a¸ï4ÄòŠÚႼ0Ãá ++ ,ÀÔ©SqáÂ¥úLMM¥rµéÒ¥ ŠŠŠœœŒÔÔT©7ëÚµ+bbb””èèè0ÒŸŸ;;;™ëlll………‹ÅhÕª•ô\ëÖ­‘ŸŸöíÛC[[ÉÉÉHHH@Ïž=agg'ºíÑ£‡ÒûüPøà ×Ì̬ÎðTFFØl¶Ô ªB§NPQQG!&&½zõ’9_]]+V`ôèÑøý÷ß1wî\¥ú(Š’{ÜØØ–––Ø»w/lmm¥^ÝÍÍ ?FLLŒÒ0A‘î–-[ÖIOO ‰­Y,rss¥çrrr`jj Š¢àááÛ·o#33íÛ·—zÿ„„xxx(­Ë‡Âo¸ÄƉÜÜ\ÄÆÆbÕªUðõõ—ËUYoM¸°nÝ:8::¢yóæ2ç„B!8ø|>þøã’Ø—)ÎÎθ{÷.ÜÜܤÇ,,,`aaèèhÚ£µ:t(BCCqçμ}ûÑÑÑØµk‰göòòÂÆ‘››‹´´4ìܹýúõtïÞ'Ož„““8\]]qᘛ›ÃÜÜœq]þ }uSÆ„††âÕ«W011ÔÖíåå…“'ObøðáuÎéëëcÆŒX¹r%ttt0vìXøøø`Á‚Ø´i£rœqúôiÃwwwdgg£cÇŽŒë>lØ0„††âÍ›7°µµÅÒ¥Kñå—_æÌ™ƒM›6aúôéàr¹ðööƸqã¤åòù|©§ïر#A“ñ¶À?°7""¿þúkc©áo&!!sæÌiôõ¸|¨ Aƒ<>øP)õMD\¿~½‘j¢áïä_g¸Ãüo  44I4†«¡I¢1\ M’F3Ü‚‚2äåQ‹µ«H „–V[<}ú ¨ÑÊü[Æq+*øxô( qqˆ‹KÇýûéÈË+°XO1z´â%5Ôä a1ü´D"€ÍfZã/ª>¡€Ã‘?]›ÌÌDD˜€¢8àñ8prj…®]ÛÁÅ¥-œÛÂÚÚT…Z×Ëjµ W$#%å>|‰2pï^*ÒÓó!°X,B¤‹bLL8HJÚB õ±XºÐÕí==gTU¥¢¸ø íºèé9ÃÀ Þ¾ý|~m9]Ý.`±x(+»O[ zA ÈCUÕsRŒŒ¡¬ì>‚|ÚRl¶ }PRr"‘üjò06öEñP\|B¡ü%™ïÃbéÁÜ|ª«³P^‹êêt¥×›šº€Çë+}Ï "‘„Úpvn‹nÝÚÁÙ¹-\\¬`l¬G»þ Pm"=½+WžÆÐ¡`g·>>Á˜?ÿŠBjêkˆD’‹Å „€ËeÃÈHçÏ/XÌ—sí¿„„LÌšµ­ZM‡ÁÇ`±tpìØ¹×¾ÿ—]ˆááa_°X\dg?¡%GÁŸÆ¢ysoøúާ-CÁ£GY00èŠ1c3’{ö,ÚÚöð÷ÿ‘Üýû¡­mƒ^½–¢´´Š¶\PPx_ˆ%KŽbôèP¼zU\¯Ü?~önUAfæ[,_þ'œœ– ((OŸæÖ¹~þüðõíG~\"ý•/.7·§O?ĪU§!ª–GN%à üvvf`³é‰oÞ€®]ÛIÿÏÍ-ªUgàⲋAJÊ+¾ ‘ˆ`Ù²¡JuæåcÔ¨PÌž½••|…b°Ùl Ü™V’’²° b±EÁÐ~§16ö%®\y (((•Æïtˆ‹{ .—‡…Õ«ÏЖÓÓ“,î&„ 2ò9fÎ ‡X\”×£‡- $÷&DE½@Ïž«ëõv..mÑ¿©! …"bœ>oï`|òɯ8}ú¡Ô )ŠBhèxtèÐJ¡ñ¾ÏŠÃÀá¨6> ’‡ÃBpðçõ>8‹BP† ‘,Û‹‰IÔ)aèÖíGüþû WB,þ+–èfcàÀNèÒÅR¡ÞãÇ wú®¹’ Eèß¿þŽ_vv!FÞ >_±˜€ÃaI ƒ!!ç¥/‡¢€¸¸ Ú²ÑÑiD Ÿ{÷9¢¢Rëdê'‰qî\<Ö¬9[¯›Í‚#¸\I}**X¸ð0ƌ٪Ôû.]:„ÈzD>_xô( Ó§ï‡ÇJlÞ|ÅÅÐÒâ ,l2ŒŒt•:5‡ 77k|þy×z믕‡Ã<¼%ï¹×F,&ˆŽNÃÕ«Oäž÷óë,Ó*IZ1 v¸xqììo÷×ÕåaöìþÒÎ8EQX¸Ð;v|ÈÈç »£PÖÊÊçÎ}'§VuÎ æŠE‹>Apðy\º”¨ôþjCËp7l¸„G²6¹N J—mÛn    ¿ü2ææ†8|øK4k¦B$³.t:Gññ™R#¥(¼‹©)tîܶNóVÞ=Sðõ×Ñ¢…!( àråß²¢fÖ¯¿Xï‚“§Os•ÎfÅÇg* e‰s¸w/Mé hvÇ〢(ôéã€Ý»'cà@ù»†}|œ¤uäñØÐÑááÓO‘˜˜¥ð£¬Íĉ=af&É 1eŠ'fÏî77+L™â‰ààó()©¬W‡wî°X6n¤¿ ê}Ö® cc=̘±‡ÖG¤tÏ™H$Æ’%GáëÛ£GwW¹R;wF@K‹ƒÉ“eã'GG üòË(Z:’’²‘šú7Jr~ŒîÝm°víy îV´Ä@ì„5kÎaüøžÐÓÓ¾}QÒ±KEßÈH7o.‹¯‘‘ño‘‚¼¼"ðù"TUýµÒíÉ“\têÔFaýkB…š)f@ _ß°µmKK´mkŒZ+¼==-"‘ws³ÆøñcîÜèÞÝ––Æõ>‡…9súA aÖ¬~Ò!®>}pêÔCøû»×«ÃÇÇ©ÎCCm|ù¥Ö­»„Y³|¶~ÊÐÑáá·ßÆaÈ øóÏØúëB”°wï]Ò®Ý7$7·HÙeJ©ª'§oɺuUÖA!kÖœ%îîß±X¬V],-ç‘“'ã!„TW ÈñãÈ¢EGŸ/¤­gÑ¢#dĈM„BòóKɃéäìÙxòöm™B™{÷RɵkOÈóç¯Huµ€Ü¿ÿ‚XXÌeôloÜxJV¬ø“¤¤äIy{“•+OÓÖ!ƒï+«ù¤¤¤ReÕ䣖-[®©U—%KŽw÷ïIuµ@Ùe«zÜÊJ>~ùå"zH›wU8w.eeU7N½dj7n{ö B¡XÚIàñ8>ÜÇ»2ÒSYÉ—Ž©ššêÓZÖ­›Ìÿ5ò••|Úåöéã€>}dŽ99µÂÓ§9 $èQûFE¥ÒZë!üýݰwï]LŸÞWå÷4gŽ/ŠFXØLÚGáu cÜsçðömfά;¶Ê„S§âàåå33•u”•U#11=zØÕ±ž>Í…–GíUù••ÚSÄŠøËp/ª§ƒƒCK$'ç©¥ÃÔT-qïÞ µôŒÕ ééHJRýC233Àرøã[JGaîÑ£1è×Ï ææ†Š.©>_ˆ[·R0`€j_q ¾„H$F×®ÖjéÉÈxƒ¶mMT^JWƒÄ㪞pøkú¶¢¢ºž+•cmmŠœœ"Ze¸»[3^[ü>:µA›6FŒ†µäø1^¾|£t„Eî|ýº·o?£ÕéQFLL:**øðôt¨ÿb%<}šSS}XX4¯ÿb%”¢E Õ= µCUi(Û¢…Äb‚7oèoç‘GÇŽmÔ9ÀÓÓ7o&«¥£}{s8:¶Â‰± ¯‘k¸QQÏÁbQðñ‘?¨O—‡3`aÑ­[Õ±RS_ÃÎNýô—e01¡·;B áq™Ç¸ò¨‰¯ JÕÒÓ¾½9JJªh£*ÂÝ݉‰Ù*/ž©aÀ€Ž¸u+Eáy¹†›˜˜ ;;3µ½JrržÜ%ŠLÉÊz ++µõ”ÑÞÖ£Œ†ˆqµ´8`³Yj{ÜšQ]íy¾™™oÔÒÓ¾}KTVò‘‘¡žžÎÛ =½ååòC)¹†ûäIœœ'Ò%-­66-ÔÖ“Ÿß0žòÍ›²†ØaŠÊJ>´µÕó¸ ­ÍUÛã6k¦‡¥v¨Pó\Þ¾UO¤ãûò¥z†ëäÔ b1ÁÓ§ò;žr 7'§ˆÖ€v}””TÂȈù`ôûU4ˆ@¤pyª«…ÐÒRßpy<ª«ë.ˆaEQàr9j'ãÐÖæB[›‹ÂBæ×kÓ¬™.X, ÅŪMÿÖ`ii Š¢“#a’\Õ¼`õ³j”•UAOOýÌ5ˆö¼Æ &o€ºˆD"¥ëèB‘»Û€)<[î²M&°Xôô´PVV¥–žšu¾Š–b*1\õ=“dzRm5Žú/qƒ|Ãýp4E5Ì/#ñxŠ[¹†««ËCi©z_ 4o®Ó z¸Ü†1”š QŸ†È“%6ŒÇÆAðù"¹#™ ”•UË][Í@²DÑè\õ±1Cjêkµ $ËðÔuÀÈHWíØ ì‡kˆ&^âqÕ×#É¡~ÞA±˜¨­§¢‚ª*Ú}‰ÒRIÊÉ¢sÕÉÈx‘H [[ùk„åÞ­µµ)ÒÒ Ô*Úµ3ųg¯ÔÖcl¬‡7oäoIa‚‰‰~ƒèiˆ f«“º·¸¸HíÑ’šÑccõFož?—8ä>5ooG°Ù,\¼¨Þœs‡­ñæM²²äiÐÅÖÖ¬AúÈBíÎâÙ³ñ8Pñ¹†«§§[µ ·[·vÐ××ÂåËêé±·o‰¢¢ ääÐK“©‰áªïq¹Ü†ð¸yuG JÁá°Ôž<É©7 P}ˆÅ—/'*ÜÿG—§Os‘ž^€~ý'=TØNùû»ãòå$¤§«ër¹lôêek×äoÞ£‹»»5¸\6í<[а°hŽÜ\õWR5Ä€?Ÿß07+«-Z*ݾO‡»wŸ£GÅy)艂‚2ZY6•±}{¬¬Làîn­ð…†;|¸+¬­Mo~Ÿ!Cœqóf2£Œ†ï£­ÍEçÎm­ÞzÑZ¡ªJ öˆ‰¶Úì5òL²DÊãÑ£,tì¨Þô|~~)^¼È—ɨ© ‡E£]»èСîn^ºdd¼Á‘#ј;×WéH‰Â3l6 Ó§÷ÅñãÔšw2Ħ¦ؽ[ñöe:ôïßçÏ?RkÕ‘½}Kp¹l<~¬Þò=CCõ‡ùj:¾††ê =~œ£¶á^¸ðúúZèÕ«½Ê:Š‹+pøð}LžÜ[­øvÓ¦«07o†Ï>S¾¤Vi—öóÏ»ÁÎÎLå49€¤×}úôqÀر*é8z4ëÖ]ÄêÕ#êl½WíÏÌÐP{öLAvv!WÉp:w¶ÄäÉžøá‡“xòDqº"eL›Ö|¾»vÕŸB^>>NjnÁ©³?KâqUŸíºy3,¥òFÔÒÒ*üþû ôPyòbÙ²?ñömÖ¬©’üÑ£1˜7ïfÌðB@³¼ŒÚKKcœ>=ÙÙE<øW•f²/ +Œ»U%y}Ìœéß~»‚ìlÕ¦’}|‘‘ñ‰‰ª­£055‹E©56—W¢Öú‚3gâáîn-“î• !!ç!õSIþ—_.âÈ‘hlÛ6­Z1ß}½eË5Ì™³ ú)Íò©Æ¥¥1š@„#63^CÀá°°uëxèèð0iÒ.””0÷Ü5Éó–.=ÁXd•qt´@XØm•ä¹\6,,š«<¾MÁË—°¶V­S••Uˆ‹1~|O•ä³vß}7FF̽퉱X¿þ"¾ýv£æL ŸÇÁz¦¡ IDATÊ•§ñõ×TN8£RDniiŒ'‚``  ?¿õ8u*Ž‘¼‘‘öœ"Œ·qØÁãq°víç¸t)‡©6<ð1Nœˆ•ûƒth×ÎTåéðüü2TTðae¥ÚÒ¿C‡îÁÔÔ@a2keTU 0kV8ºu³Q)‘á©S1gÎ>LœØ Ó¦õe$[TTñã·cÓ¦+X¹ò3Ì›7€qùRÔIP&ˆÈÏ?Ÿ'­[E‚‚ÂIe%Ÿ‘|rr.éÜy)2d).fžpíÇO;»…äŋ׌eKK«ˆ½ý"²kWcYBùæ›CdäÈÍ*ÉFGKÞee½e,Ëç ‰³ó2²ví9•Ê^¼øùè£%$;»±ìÉ“qÄÒrY¼øãäƒ÷ï¿ ..ËI+I||ã²ßc•Z†[ÃÉ“qÄÞ~é×/„%=z¬|ײÝR+Eì{4œáÖpøp4qrú–8;/#DÑ6¦òòjòÅ;‰¥å<òóÏa||±³[H‚‚‰HÄìáüôÓòÑGK”æ¶•G^^1±°˜KnÝJa$G!#Fl"sçîg,·aÃebo¿ˆ”2’‹Ï ‹É´iaŒŒ'99—x{{ûEäÊ•$ÚréédÚ´ÝÄÂb.?~;ÉÉa–ÔCÃ.!’dÇsæì#­[E<="çÎ%Ðz`b±˜lÛvƒXYÍ'ÆmdtÃwï>'¶¶ È’%ÇÕµ¸¸‚89}«RräΗ’ÐÐëŒå—íÛ™yù7oʈƒÃbòóÏÌLfÏž‡""Bõ¥¯ Y­~6 þ4†«¡I¢1\ Májh’|ІKQž?¯»S¡öñçÏŸ3Ú@QÚ·o/wóç Aƒ–YºeΜ9Ý»Ë.dY»v-(ŠBjê_9"233AQ®_¿Îø~T©×¿Úpéмys,\¸‘Lzz:âããeŽÒîÓ-³oß¾ˆ‹‹Ceå_+¯\¹‹…Ë—ÿÊW •îç¿H“7\SSS¬Y³†‘L¿~ýpäˆìÞ·S§N¡Oz›ýè–ééé @€*++qëÖ-L˜0AÆp£¢¢Ð­[7èèè¨t?ÿEš¼á¾ß<Ö÷?Œ9‡– Ž=Š#FÈ\wæÌ¸¸¸@WWRƒz_'EQØ·oallŒàà`€¹¹9)ÙcwçÎXZZbêÔ©¸zõ*„BÉNãÈÈHéGCW·H$BHHìíía``€ž={âÞ½{R¹¢¢"Lœ8¦¦¦hÓ¦ æÏŸªª*ôèÑëׯ¼}û, óçÏ—ê422ÂÙ³gé¿€Š¿s^®6ÉÉÉ¡-€<{VwµXíãÏž=#µo£¨¨ˆlß¾]áÿÈÓ§OIË–-I\\œô]]]RPP Õ]RRBx<ùâ‹/HVV 'Èë×¯ë” €Œ1‚’íÛ·äÍɲÃ3faÆBY°`™6m¤yóæ$22’TUUG.]º$÷~é^·n133#Ç'999äìÙ³¤U«VRÙqãÆ’ššJHÇŽÉŠ+È?ü@>ùäB!'Ož$†††ÄÕÕ•BHLL ÑÖÖ&ååå´ß!„‘Þ½{3’Q“¿w­BmËpéêœ9s&Y¼x1!„ððpÒ¿™óÕÕÕäÉ“'¤¬¬ŒˆD"róæMé9yÆuýúuB!|>_¦~$fffD,WWWräˆdI¢¿¿?ùþûïIdd$a³Ù¤´´Tîý(ÒmooOÂÂÂdîm÷îÝáóù„Íf“ÄÄDé¹ãÇ;;;Côõõ ŸÏ'óæÍ#K–,!\.—’âççGûYÖðOî*÷zÿïÿ¯*#GŽÄ‘#G@‘&ðx<¤¤¤`àÀpssCXX˜R}­ZIÒ q¹²¿YЧO¼~ý÷ïßG||<¼¼$[Á}}}qùòeDFFÂÝÝúúŠóÒÊÓ™™ ggÙì3;K¶ò¼zõ "‘¶¶e_´³³CVV\\\ §§‡û÷ï#""C‡…‹‹ """pýúu|òÉ'JïóCáƒ6ܶmÛÖšzòä 8,--ÕÒÝ«W/”––âöíÛ¸|ù2† &s¾²²Ÿþ9¾ùæÄÆÆbË–-Jõ±XòeË–-áàà€•+W¢K—.01‘lìß¿?¢¢¢péÒ¥z;…òt[[[×IJJ ‰­Ùl6^¼ø+»ejj*Z·n ‹???œ~ýþÚ Þ®];´k×.\ =šQ›éÓ§ã›o¾ÁÉ“'‘——‡ .`Ù²e$žyÔ¨Q˜={6ÒÒÒ˜˜ˆï¾ûãÆøùùaË–-èÞ½;¸\.|||+++XYY1®Ë?Bc%ªÄ¸€¢­­MlllÈ·ß~+Óyx?&¬ïÔŠ?oܸAÍ›7Ë=¿nÝ:bllL,--É–-[Ș1cˆ™™™Ròþ?pà@.^¼(s3gÎ$,‹Ѫoíÿ…B! !vvvDOOôèуDEEIeß¾}K‰‰‰ ±°° _}õ©¬”ìË+**"‡¬\¹’BHyy9áñxdÁ‚JÞ†bþ‰W³¬QƒÚh–5jÐ@ájh’h WC“Dc¸š$ÃÕÐ$Ñ®†&‰Æp54ITÿ} 5j”ÂY/ M“äädX[[7j™f¸NNN@uuuc©¡‘ððð€¯¯o£–Ùh3g44 š™3 Májh’h WC“Dc¸š$ÿZæqwTô+IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_0.md50000644000113200011300000000004012616110567015304 00000000000000bbbf3c99db2603d6aa3dc4f84e081907pktools-2.6.6/doc/html/classImgWriterGdal__coll__graph.md50000644000113200011300000000004012647437043020466 000000000000007ddb964c1097b77b2b96ff507bfe5907pktools-2.6.6/doc/html/classSVR__Q__coll__graph.png0000644000113200011300000000757012616110567017167 00000000000000‰PNG  IHDRM» ´bKGDÿÿÿ ½§“-IDATxœíkPWÇÿ!®}ᢩB[mËm´ŠSPë…âtúÅJÅÊà”ª-ÊØ*ÒÚ©*ÓªcµõþÚq¼$HAE[‡K4ÒAQß" "^mAI!çýà°ºlBÂ$«=¿™ŒæìÉÙgœsv7Ù}VB!` gð<¤QÀ¤QÀ¤QàÚ· %%ýõ—3b%îîîØ¾};¹2Iß½§D"Add$ ÉÉÉJ¥Â‡~È• z|ñżJÿf$‰ ŒÍi0i0i0i ‰´ÇcÕªU ƒ··7&OžŒüF£‘«#‘H s§ºsçÎ…D"A}}ý â¨¯¯7;q5ƒ–ÖÞÞŽI“&áìÙ³X·n*++ñÕW_!;;111èééáê644àâÅ‹¼Ï·¶¶B«ÕÚ´®ëׯÃ×××âr¹\Ž´´4º ¤ˆJ¥ê[l‘•+W’èèhb4yå$((ˆìÚµ‹k766–¬^½šW/33“Ì;— uuuý®«®®Ž˜ Ù®˜ó1èž–5kÖ@*•òʽ¼¼°jÕ*ìÛ·+‹‹‹ƒZ­æ ÑC‡aþüù¼Ï ""žžžP*•X·n 220jÔ(O‡cqq1‘™™É Ï#GŽ`ôèÑhmm8pãÆÃãǻɃëi­­­yðàÙåeeeD¡PpíÖÔÔQ£F‘ .Byøð!ñôô$ÿý7×ÓÚÚÚˆL&#IIIäöíÛ$;;› ÷ïßô´Þ÷sçÎ%%%%¤ªªŠ·<11‘,^¼˜Ü»wŒ9’œ={Ö¦í²æÃìÁ@±4ùBàâò´3K¥R|ðÁP«ÕGAAÞ~ûmøøøpuÜÜÜpñâEÀÃÃ;{ôè‘Åõ¯_¿!!!‚É/¿ü‚ÄÄÄ 99“'OÌfr jxÊårŒ5 UUUf—WUUaüøñ¼²¸¸8äää€bvhÊd2ÔÖÖ"66'NDff¦Õ8ú®ãÙø–-[†+W® 99Ù¶²[ºc¬X±‚LŸ>·#ˆ'û÷ï'dûöí\»uuuÄh4’‘#G­VK¼¼¼Hss3oygg'qss#‡&&“‰èt:n™¥áié}cc#ñ÷÷'ï¾û.IHH°y›¬ùôŽ`Íš5¸wïæÌ™ƒ'N ¶¶cÇŽÅG}½^%K–ðê÷ÑO?ý“'O†¿¿?oyWW d2t:¾ûî;Omzéèè°—ÉdBRR>ÿüs8pEEE8zôè`7÷ ¶˜µFGGY±byóÍ7‰»»;yõÕWÉ7ß|C¦OŸN,XÀµÛ{HqòäI€ë…}—oÚ´‰( @vìØA.\HüýýIww7‰ŠŠ"ÞÞÞ„þ{ÚÖ­[IXX1 „BòòòˆR©$---Ú6s>†Dš%ºººHYYÙ´å,Ìù°ë¹§L&㎭^$Ø ;LLLLLfOØ‹‹‹ñðáCGÇòüÐ÷`. €pòKBäòXâêªpz,R©””––òxí{ Ëh4á÷ß«¡ÓœQI{ü¸ 'N\†Ñøô·Ò®.# ÿçĨ„ˆJZ_aàâ"Ann…“"2¨¤åæV~Ù2MÐhjÐÖ¦sRTBD#­¥å1´ÚZôô1!8~¼Ú Q™G4Ò .Z\FANŽx†¨h¤:TnöŠ"0™Μ¹†æfË?;QH»{÷!Ο¿ “ÉòGR© ޵܉(¤=Zkwh=ÈÍÇî\Ë1X:; P*ÿÃ+ëèè‚»û0¸º>ý»:àz=ÛpòQ*—“Ç/8; ³ˆbx>o0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i4X»ê¯´´”Èd2‡ßœêæH\\<¾ÞÔÔT«WBZ½æöÎ;0 P«Õù[<—lÚ´ VëÙ|¡r\\Ü`ây.ÈÉɱ©›Ó(`Ò(`Ò(`Ò(°‹4s)¥ÓÓÓáëë‹K—.Ùc•ì™’Ú!·ùlܸ?ÿü3JJJâˆUÚ»KÛ±cÖ®]‹ÂÂBDDDØ{uÁ®sÚÞ½{‘––†cÇŽ óvww#55#GŽ„¿¿?RSSÑÝÝ-H-]ZZ ‰D‚}ûöa„ P(ذaƒÕvì‰Ý¤©Õj,]º¾¾¾,ß¼y3nÜ¸ŠŠ £¤¤kÖ¬á–ÿôÓOØ»w/×;óóóQVV† 6 -- ---6µc¬g©T*bC5Ȉ#HYYyã7Hrr² ÎøñãISS÷¾°°„‡‡siW«««yíi4B!ƒOÓ»Zkg ÄÅÅ‘¸¸8«õì6§©ÕjDFF"33S§Nżyó0{ölnyCC”J%ï3Ççþß7µôË/¿ 6l¯ÜZ;öÀnÃ3((0iÒ$¤¥¥!))‰—´Ü××uuu O2k¡µµgΜá–÷•ólâôg±ÖŽ=pÈÁí·ß~‹áÇãË/¿äÊæÍ›‡¯¿þ7oÞDuu5bcc±}ûö·=Tí ‡HsssCff&²²²püøq@FF^zé%DDD`æÌ™ ÃúõëÜöPµ3uë‹Z­Æ‚ ,¦x‘è}*›µïÙ¹'LLLLLL6Ÿ{Ι3Çžq0™\àââØ·—.]´iÓ¬Ö³*mÊ”)ˆç=ÐÞôôHpîœãƵÀÇGï°õN›6ͶÇ軡R#Jår²hÑŠYD9§=IC-Á©SWñèQ§³Ã :i´£´´O®GŽ1ÿÈ8g":iUÜOo„:Tî䈄ˆNšZ]Áå†4™**n¢©I\”•´ÆÆP]}‹—PS*uA~þ'F%DTÒ¾ÀË ==&ääˆkˆŠJZNN9º»ù´„ÔÔ4áÚµûNŠJˆh¤ÕÔ4¡¾þ>z÷šÏ2l˜ùù•ŽÊ¢‘–Ÿ_ ™Ìü Jww<çàˆ,# iO-*`0-Ö¹s§ÕÕ·•eD!­²ò&îÞíÿ°BLCTÒždˆ—@&sµøêé1!/O‡¢HC=cÆx¸ºJyeju9¦N} ®ÌÇÇÛÑ¡™ÇÉ_X„¥¡~Á`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(`Ò(\ i0pðàAèõŽ»ÏÒEEE¸wϹWuÇÄÄpy“8ú^å—››ëðÔÏb~-\¸Pp%¤ §O.K×h4Vÿ /:éééœgasLLLCró…N§Cff&´Z-ZZZàçç‡Y³faÑ¢EÉdÈËËþ}û““ÃËrLA||<,X€yóæáwÞáµ+“ÉŒåË—ãµ×^³9½^½{÷âܹs¸{÷.‚‚‚…øøxH¥Rë XaH¤mÙ²ÍÍÍøþûïáçç‡ÆÆFlÙ²íííHIIÁŒ3°uëV\¾|™—Q¹®®<ÀôéÓ¹²mÛ¶q‰1;;;‘ôôtdeeÙ”Vº³³ÉÉÉËåX¶lF7n`Ïž=8þ<6nÜh1¿¤­ Éð,--ÅÒ¥K ¹\ŽÐÐP¤¤¤àÏ?ÿŒ1'NÄÉ“'yŸÓjµ …W&—Ë¡P( P(0fÌ|öÙg¸}û6/ gdeeA.—cóæÍ˜2e ÆŒƒèèhìÚµ MMM8vìØ ·wH¤yzz"??mmm\Yhh(T*÷~æÌ™8uêL¦§wŸ>}Z0$û"•Jáêê ///›b),,Dbb¢ 7¹»»#>>EEE6µÓC"-55•••˜?>RSS¡R©ÐÜÜÌ«¶¶6\¾|ÐØØˆ[·n rûèõzèt:èt:üóÏ?سgæÌ™#HájŽŽŽ´´´Xœÿ‚ƒƒqãÆ Ê­|ÊÌi“&M‚J¥ÂÕ«WQ^^Ž'N`÷îÝX½z5fÍšðööFdd$4 BCCqúôi„‡‡cĈ¼¶–,YÂ{ïáá;w(Ks!dÐó0=M¯×£¤¤0aÂ$&&bÏž=HHHÀ®]»xuŸ¢Z­3gδ— FFƒ?þøï¿ÿ>/Áyx{{C¡Pž…ÐK}}=¸…B-‚ŒŒ \¿~+“H$xë­·™°¦N ½^¢¢"\»v QQQý¶íææ†ØØX444Øœ2vöìÙÈÊÊâÍk×®Eqq1öïßÏõüÁ0hiˆ‰‰Azz:Μ9ƒ¦¦&\¹r;wîèææ†¨¨(lÛ¶ ËåVÛ÷òòBgg't:Mñ,^¼---X¹r%ÊËËqûöm(•JdddÀ`0à½÷Þ£ÚÎg’ÁªU«0{ölüúë¯øøã‘‘‘°°0,]ºTPwÖ¬Yhoo·º×ìÅÏÏžžž¼=sxzzb÷îÝÆÎ;ñÉ'Ÿ@£Ñ !!¯¼ò ~øá‡m›9•{3(¿ˆ_ FÔÖÖâõ×_·©~zz:üüü–ÿUçž®®®6 ë·!ˆÅ¡XÖŽ!Ï41Lÿªá9T0i0i0i0iöž½_ÛzÄþ¢/(œèõz?~Ü¡i§ÅÌĉ1vìX^™ÕÓ0„°9&&W¶=|œÁñÿ›,ßwIEND®B`‚pktools-2.6.6/doc/html/pktools_2pklas2img_8py_source.html0000644000113200011300000011243612647637661020461 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pklas2img.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pklas2img.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pklas2img.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.parameters import ParameterFile
32 from processing.core.outputs import OutputRaster
33 from processing.core.parameters import ParameterSelection
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterBoolean
37 from processing.core.parameters import ParameterExtent
38 
39 class pklas2img(pktoolsAlgorithm):
40 
41  INPUT = "INPUT"
42  OUTPUT = "OUTPUT"
43  ATTRIBUTE_OPTIONS = ["z","intensity", "return", "nreturn"]
44  COMPOSITE_OPTIONS = ["last", "min", "max", "median", "mean", "sum", "first", "profile" "percentile", "height", "values", "percentile", "number"]
45  FILTER_OPTIONS = ["all","first","last","single","multiple"]
46 
47  ATTRIBUTE = "ATTRIBUTE"
48  COMPOSITE = "COMPOSITE"
49  FILTER = "FILTER"
50 
51  PERCENTILE = "PERCENTILE"
52  DX = "DX"
53  DY = "DY"
54 # PROJWIN = 'PROJWIN'
55  NODATA = "NODATA"
56  RTYPE = 'RTYPE'
57  TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
58  EXTRA = 'EXTRA'
59 
60  def cliName(self):
61  return "pklas2img"
62 
63  def defineCharacteristics(self):
64  self.name = "(Linux only) Create raster dataset from LAS(Z) data point cloud(s)"
65  self.group = "[pktools] LiDAR"
66 
67  self.addParameter(ParameterFile(self.INPUT, "Input LAS(Z) data set(s)", False, False))
68 
69  self.addParameter(ParameterSelection(self.ATTRIBUTE,"name of the point attribute to select",self.ATTRIBUTE_OPTIONS, 0))
70  self.addParameter(ParameterSelection(self.COMPOSITE,"composite for multiple points in cell",self.COMPOSITE_OPTIONS, 0))
71  self.addParameter(ParameterSelection(self.FILTER,"filter las points",self.FILTER_OPTIONS, 0))
72  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
73  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type', self.TYPE, 0))
74  self.addParameter(ParameterNumber(self.PERCENTILE, "Percentile value used for rule percentile",0.0,100.0,95))
75  self.addParameter(ParameterNumber(self.DX, "Output resolution in x",0.0,None,1.0))
76  self.addParameter(ParameterNumber(self.DY, "Output resolution in y",0.0,None,1.0))
77  # self.addParameter(ParameterExtent(self.PROJWIN,
78  # 'Georeferenced boundingbox'))
79  self.addParameter(ParameterNumber(self.NODATA, "nodata value to put in image",0,None,0))
80  self.addParameter(ParameterString(self.EXTRA,
81  'Additional parameters', '-of GTiff', optional=True))
82 
83  def processAlgorithm(self, progress):
84  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
85  commands = [cliPath]
86 
87  input=self.getParameterValue(self.INPUT)
88  inputFiles = input.split(';')
89  for inputFile in inputFiles:
90  commands.append('-i')
91  commands.append('"' + inputFile + '"')
92 
93  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
94  commands.append('-ot')
95  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
96 
97  output=self.getOutputValue(self.OUTPUT)
98  if output != "":
99  commands.append("-o")
100  commands.append('"' + output + '"')
101 
102  commands.append("-n")
103  commands.append(self.ATTRIBUTE_OPTIONS[self.getParameterValue(self.ATTRIBUTE)])
104  commands.append("-comp")
105  commands.append(self.COMPOSITE_OPTIONS[self.getParameterValue(self.COMPOSITE)])
106  commands.append("-fir")
107  commands.append(self.FILTER_OPTIONS[self.getParameterValue(self.FILTER)])
108  if self.getParameterValue(self.DX) != 0:
109  commands.append("-dx")
110  commands.append(str(self.getParameterValue(self.DX)))
111  if self.getParameterValue(self.DY) != 0:
112  commands.append("-dy")
113  commands.append(str(self.getParameterValue(self.DY)))
114  #projwin = str(self.getParameterValue(self.PROJWIN))
115  # regionCoords = projwin.split(',')
116  # commands.append('-ulx')
117  # commands.append(regionCoords[0])
118  # commands.append('-uly')
119  # commands.append(regionCoords[3])
120  # commands.append('-lrx')
121  # commands.append(regionCoords[1])
122  # commands.append('-lry')
123  # commands.append(regionCoords[2])
124  commands.append('-nodata')
125  commands.append(str(self.getParameterValue(self.NODATA)))
126 
127  extra = str(self.getParameterValue(self.EXTRA))
128  if len(extra) > 0:
129  commands.append(extra)
130 
131  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/inherit_graph_36.png0000644000113200011300000000443612647437044015517 00000000000000‰PNG  IHDRÓ3 C=[bKGDÿÿÿ ½§“ÓIDATxœíœHÿÇŸ×ZIYjþÊ©åOdDPB`…AAY–¡FYTPÁ4£B‰ úAXô#3…a(¹¢![«uj˜êÔi*êöúþóõ>›Þn;½¹Yïxï×ö¾×ûy÷º{ß›=刈À`0¦KÙwgÀ`ü-°bb0d‚ƒ!s…[ZZP]]=Ó¹0——2220oÞ¼ÉA ##ƒ°mlØÊËË…Êæ™à“Él6#==Ïž= 3ÿ,ÇallL0ÆÞ™ ™`ÅÄ`È+&C&X112áÖbjllÇqSú.Çq6›¶mÛ†ææf™³”ŸéŒÛGÈu1¤c&ò‰1ÛíÅäëë‹Ó§OOùûïß¿GGGÚÛÛñæÍX,deeɘ¡k˜î¸­™ªƒ²ä WŸ39µ•ŒÐ‚yzz:¥§§ …<ÔÐÐ`ÓÖÖÖF¨¯¯ÏMYÍ,Ž4hhh ;§X4&)ýL'_O•–– …žÉòd²X,¸uëâââ°hÑ"$''C«Õ‚ã8ŠŠŠÅ‹cãÆxñâ8Ž›ôH®¬¬DRR¼¼¼‰ÇKÊC¡PÆÆÆø¾_½z…ˆˆ¼{÷½½½8pàµZááaŒ¡   ÄþýûÑÛÛË÷;::ŠÜÜ\#((¹¹¹u˜³½ØÄqs‡’’ÄÅÅaÉ’%¸zõ*ˆjçŒÖÔj5T*ººº°nÝ:ÀÒ¥KùÏØÓÇQÌ©çÐ^¾5²Þ—rMÙÓÖ%•˜Ô'Ó;w(((ˆ***¨½½^¾|Iááည‹‹),,Œªªª¨³³“jjj(::š¿K§000@óçϧ¢¢"êèè û÷ïÓܹsi``À¾žúûûÉd2Qcc#¥¥¥Ñš5kˆè¿;æÖ­[©¶¶–(33“6mÚDMMM¤Óé(11‘ éÚµk”@:Ž>þLk×®%µZÍëÊ•+´k×.úñãét:Z½z5åçç‹æ,›x@»w咽ž*..&ÔÝÝ-ª , ©ÕjR©TÔÕÕe³Æž>b1)çÐÙ|…ò³ÞwöšÓvª@äÉ$K1%$$ЃlÚ>|H(11‘JJJlbOž<™4p£ÑHJ¥’®_¿N===d±X¨¿¿ŸÌf³ÝAYoJ¥’RRRøiÄxß:ŽˆˆFFFH¡P^¯çû¨¨¨ èèhЉ‰¡ŠŠ ¾ýëׯ6û±±±ÔÑÑÁï×ÔÔJ¥ÍY,&tµZ-Ÿç¸6bÚIÑ //Ð÷ïßù~&æ ¦XLÊ9t6_¡ü¬÷½¦Ä´*bÅ$Ë4Ï`0@¥RÙ´%%%ššš˜˜h‹ŸÔ‡ŸŸ´Z-êêꎔ”¼}ûsæØO±¡¡D"ÂÈÈ^¿~èèh›ÏÄÆÆ~ÿþ ³ÙŒ¨¨(>¶¶6´¶¶båÊ•|{\\vîÜÉï·´´ $$„_…Ú¼y3š››Es–:žÐÐP€R©äÛœÑÎ >|ø€ 6àòåËvµÓG,f3cv&_!ÈÊÃêì55޶®@–b çOŸlÚ¾|ùX¾|9ÿ÷8ß¾}›ÔÇÐÐ, ÊÊÊ`4qèÐ!lß¾F£qZ¹  …BƒÁÀÇššš†ÐÐP´´´ðíõõõ¸té¿`sôôô ®®N4g©ã*2gµsDee%ŠŠŠðôéShµZÁψé#³Æçpü]êçÏŸ|›T]ÄnÈr"ËQrrr›› Fƒ_¿~¡ªª ùùù€ãÇ#//ÕÕÕèîîFmm- '½Ds‡-[¶ ¼¼&“ ###P*•X°`àÞ½{èëë›rŽJ¥{÷îÅÉ“'ÑÜÜ ½^sçÎ!33ÙÙÙ8{ö,ôz=ôz=Nœ8ÖÖVþ»iii8sæ Z[[¡ÓéššŠÛ·o‹æìh<Îà¬vŽX¸p!bbbŸŸcÇŽÙ, 8ÔG,fcÇ××ðèÑ#˜L&ܼySv]¦{MMBhò'õidd„.\¸@+V¬ oooJNNæç°f³™nܸAQQQäããC©©©¤Ñh(00pÒü¶´´”¢¢¢hÞ¼yKÆf®j=׸?¡l£ÑHÙÙÙäïïO!!!têÔ)¢ááaR«ÕJ>>>´oß>êééá¿g2™èàÁƒäççGþþþtäÈúóçÜíÅ„æõBcÓn* ѪU«¨  €FGGiýúõäíííP±ØtΡ£|/^¼H¾¾¾E†I¹¦Ä®GùW/@1>¨ÊÊJª¯¯·‰=þœT*Õ´úÿ`Ú ãN]ÄŠÉå“IN‡¬¬,|üøƒƒƒ¨««ÃùóçqøðaWzÖôÆSu4ÊI^^±cÇtvv"229998zô¨«=ëaÚ ã©ºpÿtÙ°gÏ`N[cÇ¡´´”¯+ØÿÍc0äÂcЉY*˜¥bºù¸)&€Y*f©˜ˆ[-RZãs‡ÌRÁ,³¸si|:0K³T¸ÕR!¡sד‰Y*˜¥b¦-R;~!0K³TèâjK…TÄŠÉ£¦yÌRÁ,öt±f¦,Rñ¨brf©`–Š™²THÅ3³rf©`– Chòç)KãÖ0K³Tˆi;S`6,@ü 0K…0³I±bšµÓ¼Ùˆ§ZÜÍߢ‹Ë-ŒÿðT뀻ù[ta CÌ‚Á`̬˜ ™`ÅÄ`È+&C&ì®æ ܽ{w&sa0f5‚Å´lÙ2”••ͺ¥IÃÕ(ŠI¿aGpiœÁ`H†-3rÁЉÁ VL †LÌPæî$Œ¿€ºÿ¯Ð" oD”IEND®B`‚pktools-2.6.6/doc/html/classSolver__NU__coll__graph.png0000644000113200011300000001030612616110567020100 00000000000000‰PNG  IHDR`ÍÈxâ_bKGDÿÿÿ ½§“{IDATxœí{TÇ¿ÀgBxx òG#Ž´¾ ¶£€=‡ÓZ •‡ÏV¨÷¨Ê«§UÔ¶·p<ÞV´€bÜS”‚TðôR  ‚"©<”–G@Z „`0 ÙûÇò[c'‰Iv½w>‡?²³“Ýï|ؙݙìÎb8ŽÄì0¨€î A H#5óž:uJ¯¡’èèèÍ›7«“Só,Z__ÿÆo<_`´€(HAA:™Õ=‚êo”愆†ªŸµA H$‚îMLL$&&zyyÍ™3ÇÇÇç믿–ËåÄ* Ã\]]UΛ7nÄ0¬««K£½tuua¦³ gGÇ‚ÆÇÇW®\yíÚµÔÔT>ŸŸœœœ››055Edèíímnn&óŒŒ\¹råÖÖÖO§[XX$%%é6øѱ #GŽÌŸ?¿ªªjãÆnnnï½÷Þõë×{zzΜ9CdX¿~ý… Èü%%%~~~ÏØ B¡¸ÿþÓéÖÖÖ©©©º ~Ft,(77÷àÁƒL&“L177OLLûÌÝÝ}Û¶mÊÙBCCÛÛÛUFd,,,Ž;±xñb‡ÄápÞzë-{{ûÙö˜‘‘144”””dii™™™Mœ+t…ãAí†;¤R)ŸÏ'NØt@£²¢/fllL;š‚:« H$ ‚ AgU œ>}Z¡€Œ ¬)½îD ¸¸¸¨›[Í.ɾ}ûôó4ÿ±è›_ô_ØÑþýûÕ,¸ºWÒ@2,?Ø 0ù‹‡‰…îÇa´ƒFmPoõ(†áà½U£TÇò ê(½+®¥3 BS]ß•¶Mà88µNŒß•RÑ4t$¨a0§ÇjFXϯº²xè"¨³ì¾B>}ºPÈð¿J‡©‡„‚Fº'G“Ê)£ÉH÷älù -uÿ2Ìd=ñ[“… ~¡E-£ t–OÉž¸›’á¥÷ .Ѩ4t{B,šáœ%I‡n?4|<*P/¨ëF¬îÓ`°°îrê›jŠá ¼ëò°B6C]RÈðÎËø‚âjF± QËÄä9Ãc°ªFØä¨|°U§w"hÅ}B މOŒ¹Øß8pðþ72eÞË&„¥Å‚L,Œ¼vØ’‹÷Ú”S(‡úFšæ A H$Fƒö€á. à¥WL©ä1ôDCPƒ€Ax=ãé@÷6h||œ¸699yÑ¢Emmm°µµ­¨¨P~àA¨ù5UÄÇÇûúú’7^ã8.‹9NVV–a » ;;»ŠŠ •ÄŒŒ ___Ã@¯6ˆFÈ?#$GGG–.]ª’mÙ²e·nÝ2LHt¹‰‚`¤s†ßžýtŒ¾¡×¤‚šOÇèZ DDD|ñÅäaaayyy©©©aaa† €î‚Ôy:F¯Ð]šOÇèz](V&õ¸i ŸÍOÇÐýšC>C¯#½x¼UÌ A H$^‚TƃèÀ 0D-ô:‚h ‚€A@‚ Aè5ÜÆƒ^,,¬°°°¤¤dÅŠ®®®D¢µµugg'ôÈÈHCC‘Îb±ôT„Ç%Ñ FÛ¾}»››[YYYwww]]ݪU«>ùäbUxx8—Ë­­­¯½öÚÁƒ• ¢mvuuÍÉÉ!·»yófâw¯¿þúǬþ‰ŽU Çq¹\~èÐ!OOOSSS‡“””DV«ááá­[·ZYYÙÛÛïÝ»W"‘¨”6**jΜ9ÊMïØØØÎ;---­¬¬¢¢¢&&&^xAôŽmÐÿ H$ ‚€AÐþw1[[Ï)*•²0 c±tüJ‘HÔÚÚª]IµQÜ·oÑçÔ-ÍÍó^^CºÝ¬¥¥å† ´û.nâìéZ½ú?1 »zõ³—_¶¢:œihÔ]¾ÜbdÄd0°²2ÕÙL(„F‚Οo˜šR(Šs税å1ttûöÝÞÞ{8Žã8èí½×Þ~—ꈦ¡‹ ¢">‹5=i‹Å,*âS -á8~áB£L6=IL6UPÐH“³-56ö Ž)§ ŽÝ¸ÑKQ8O@ AÅÅë‹eT\L‹ZF½ ™lª¨ˆOÖ¯%Ê/^l’ËTEEB½ ÚÚÎf¸©áÁƒÉÚÚÃÇ£õ‚ŠŠšX3½º†Åb5>($‘H/_n–Éf¨J2ÙTYYóä¤ÌðQ)C± ÆÆ‰dV‰¬±±Çñ< ÅÕGä••·§¦¦ Ó§kQQ~Ä"“Éàr_e³©|€F½y@tôNÚNu ¡¾‘¦9H$ ‚€A@‚ A H$ ‚€A@‚ A H$ ‚€A@‚ A H$ ‚€A@‚ A H$Â÷(ÆÆÆ¶··SÍÝ»Ž€ þ¡0ww÷ôôtrñ A†½úê«666TF oß¾­ìDõ[·víZƒE'~ûí·Ã‡+§ 6 ‚€AÐXD"ÉÌÌ ŒŒŒ<{ö¬T:ëLýýýþþþÏá øûû:tHù\£¼#ÿþþ~•ü*)ê£ñs"ééé"‘èÈ‘#óçÏïëëKOOÕn÷ZSSSS]]½nÝ:}ïHã#¨¶¶v÷îÝ®®®žžž±±±uuuúˆìÙûí·ÃÃÃúÞ‘Æ‚ÌÌÌŠ‹‹ÇƦRöôô$昈ÅâÔÔÔwÞy‡Çãeff*W½Ï?ÿ<##ƒø,“É‚ƒƒ‰™"åryVVÖ¦M›6mÚ”••%—ˉÊÂçóßÿ}ržÊ§áñxÎÎÎÇŽÓ÷ÓJ JHHàóù›7oNHHÈÏωDäªãÇ eee¥¥¥566æåå‘«¸\nMM Q˜ÆÆF6›ííí (,, …§N:vìŸÏ?{ö,‘¿   99™œ†s†¸Œää䦦¦òòrM‹  Z¹re~~þñãÇ=<<ÊËËÃÃÃ+++r¹¼ªª*&&ÆÞÞÞÅÅeçÎä·Þ|óͱ±±¿þú PYYÄd2?ÿüs\\œ‹‹Kttôõë׉üQQQË–-S™¿UGGǨ¨¨'N jZ õѬ‘žœœ¼zõêÚµkÝÝÝÝÝÝ·nÝš“““••ÅårGFF Å‚ ˆœCC§b³Ù«W¯®©©áp8W¯^ÍÎÎ&ÒBBBÈlæææÄggguâÙ´iÓ•+WŽ=§œ®\ïž³jvá8þå—_’óÔbæíí=55°´´d0Báô»îÞ½kmm­ü]¢–ÕÕÕ¹¹¹9::‰óæÍËÍÍ­®®®®®.--%Û)##µþs†%%%µµµ•••‘‰666Ê'õ¾¾>&“©u\3A¦¦¦‡nhh …·nÝÊÌÌär¹###ÿôôt¡PØÓÓóý÷߯_¿^ù»ÞÞÞb±8''çí·ß&}}}³³³E"‘@ HLL,..Ö´ööö{öì)(( S‚‚‚ÒÓÓëëë…B!ŸÏÿꫯ´ž4Xãë ÄÄÄ~ø!;;»¿¿ßÒÒÒßßÇŽΏ¸¸“'O~ôÑG,kݺuʵÌÈÈÈÏϯ²²ÒÏÏLüàƒNž<¹{÷n ÃÖ¬Y}ïÞ=MC þý÷ßoܸA,nÛ¶ÍÔÔ433S$YYYq¹ÜÈÈHM·I¢:”’’‚†;” ¾z½¡N…ÙúqÕÕÕ‹Ö‚ )b6Pƒ€A@‚ AT馦&±XLI(t€èN?òÈ.Òÿgœœœ”Ðkz‚Ú H$á,Ô×¹Áá«!IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem__coll__graph.png0000644000113200011300000000700712616110567024612 00000000000000‰PNG  IHDRÀpÇtè%bKGDÿÿÿ ½§“ ¼IDATxœíÝTSõÿð÷… ;(L›ˆ@}ðx:öG¦„HÖÈSÄ´ Ðìlj íBß>>nËBnnn+V¬°Ùt6 R©ôððpuuµå¤•‰‰ ¥R9o„âp8ÞÞÞ6žôáqëÖ­îîn[Î÷@€ hZæ@€®_¿Ža˜-‡úì³Ï0 ;pàÀLÕ0Uw î_¿þ¯‡us @) 6›=#QQQáïï/‘HfjÌÅ‹ïÙ³ÍfÙö2W„ãøðððlŒÜÕÕÕÓÓSZZÚÑÑÑÛÛ;#c²Ùlò|6{eÛ‹cˆ<Õ×ÖÖ®\¹ÒÛÛûwÞ™˜˜ ^%b÷îÝCCCO<ñBÈÇLJ|idddûöíl6›ÃáìÞ½[§ÓMÕH©««{ì±Ç˜LfPPX,¦Ú+**Ö¯_¿qãÆÉ'!‚ „Bahh¨‡‡ÇÓO?}òäIòÚ4y.r-MMMþþþÇŽ#3+!ÔÐÐÀãñ<==óòòÈ ÃÊÊÊV­ZµdÉ’ˆÅâÀÀ@‹•••5c_èDØT*œæ¹\ŽŠŽŽîíímmmåñx999d#ŽãTz¨#©ŽIIIQQQ}}}ááá999©^ccc®®®B¡p`` ´´”Á`Œãx`` H$"âã? 3-Œ ˆââb??¿3gΨTªsçÎñx<²}ª¹bccÏŸ?ßÑÑAfV6Bè¹çžÓh4ÕÕÕ!ri¡ÄÄDFSRR‚zùå—5H$¢˜Æàà T*µúCƒ#¨³³“Ü•H$<lÌÌÌD]»vÍôHrûÞ½{ÎÎοþú+¹{âÄ g±‘ê¥V«,XpðàÁÛ·oã8>::j4 ‚hmme0ä÷éòåË¡®®.ÓéÂÃÿÿþ{ªàòòr„Ð4s‘k¡ºOPss3AF£!$—ËÉF™LF®Ël›<`¶c]ÂHÔ¯rBBBúûûÉí_~ùeÆ ¹¹¹“4\.—Üåñxýýý©.žžžR©´µµ•Ãá¬_¿þ§Ÿ~rrrBUTT 6›aØš5kBfW±¾¾¾ððpj744tª¨%L¿X___„9;ÅÝÝ!´`Á³mäˆ"ÿ™"„z{{ɯ/B¨®®N(VTTH¥R³ã—.]êìì¬P(Èݾ¾>???‹T­V‹ãxee¥Z­NIIÙ¼y³Z­6‰$??ôÿdddH$Âä©ß€€€ß~ûÚíé陪rû¾ßø™z‡Ânlyº{ÀKXdd¤\.okk[±bž}ûLOûÙÙÙÁÁÁZ­–l%ÛATT”B¡èêê Û·oŸÅFj(­VËd2«ªªT*UQQ“ÉÔjµR©ÔÙÙÙ´Âööv„L&£::tˆÃáœ={vhh¨©©iåÊ•†M?1éF•L®JÈä6¹Ñl{*p$G•””°Ùì·ß~›Ê y€V« ÎÎÎÖëõO>ùä¢E‹ÈvµZœœìååµlÙ²÷Þ{O«ÕZl4J"‘p¹\—ÚÚZ‚ ÒÓÓ£££MëÁqœËåîÙ³‡êh4 ¸\.‹ÅЉ‰©­­]²dÉ}碶ÍʆYçd³zþ…ºººŽŽj·ªª*""ÂŽõ˜›hG×ÙÙ¹uëV™L6>>ÞÚÚš•••ššjï¢ìÉÖ”MÏÃÃ#==ÝÞUL'33s||œÏç«Tª   ×_ÝÁ žmaÃ?,lnn …'gùD↠l6#\Â- @ дØú§°‘‘ƒÁ`ãIccc6žÑ¦ruu½yó¦-g¤©±ñO„ÐÆËí\‡5˜L¦-§³éñs‹Ñˆÿç?Ù¡ÎÎÿqršã¿òœ5p4¥K—®«ÕwÕê±––¹ýÜû¬‚M©²²ÁpZ°À©²ò{×⸠@–étúúú«ƒQ¯Çëë¯êtz{Wä  @–?ßC…F§ÓŸ?ßcßzȲêêvêYA ê«Ûí[ÂY Ñè»FœÜ5ñÆÆnF7}¯‡È‚3gºpüïnà8qöl—½êqd ªªÚÍÞ#¢ª ®b@€Ì©T£--rÇMqœhi‘«T£öªÊaA€Ì<Ùañ}g ÃNž¼jûzÈÜñãíf7@$ÇáÅÉ @ÿ TÞîì¼1E€ÐÕ«7nÞ±}UŽÌ±ª·»¡¡1_ßÅÔ ù^"“ù¿]êää444êë»Ønõ9ømütÒÓ¿A‰DÛì]ˆã‚K hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ ‡0`ïr ƒÁf0Øö®Â±,_¾Ü43ÿø/î0 {饗BCCíXpdÝÝÝ•••¦™1ÿO6CCCmù±õ`®ƒ{ @ д@€-³ ¥R9³Ý ‚Ø¿ll¬é4'šfº™2ŸÖ2ÙlhÑ¢E‰‰‰3;æððpccã7ß|cqü^xafgœ=óf-³ ‹•––6³cNLL „¼½½-Žã¸F£™ÙgϼY‹u"â‡~ضmÛ¦M›víÚuåÊ•ÈÈH‚ ~üñÇíÛ·ÇÅÅedd\ºt)22ÒôDÚÒÒ’’’-ÌÆ$¼xñbrrr||ü¡C‡ôz½éŒ………©©©wîÜyóÍ7B/¾ø"²t¢6}!d0„Ba|||||¼P(4 d™L–põêÕŠŠŠäääM›6½õÖ[===SõBEFFž>}zÛ¶m|>¿¼¼¼¡¡!111..®¬¬l¯åY úúúo¿ý655U,¿úê«yyy¡S§N‰Åâ]»v•——'%%9rÄ´‹N§ËÉÉáóùä"¿øâ Χ×ÖÔÔäåååææþüóÏåååd#A"‘H&“åçç³X¬¯¿þ!tâÄ ‹µ™½ZUU500 ‰¾úê+™LvôèQ²ýøñã{÷îíìì”H$iiib±899Y(NßëòåË………iiiÅÅÅ—.]*--ݹs§X,¶xž˜Ok¹/ëT]]½cÇŽuëÖyyy­]»655•j|üñÇY,Öš5k^{í5Ó.z½ž ­VëââSWWçêê:yä;wr8œU«V¥¦¦ž;wŽl,**’H$ÙÙÙÖ.ìôéÓï¾û®··wPPPzzz[[Ùž––¶zõꆆÓ…PW©z%$$¸¹¹EGG#„››[LL BhtÔ‡`ΧµÜ—uŸ600Àãñ¨Ý   „ÐÍ›7©ÆåË—›vqww/((¨ªª:zôhpp°@ X»víä‘9¹áïï¯R©Èík×®EDD|÷Ýw{÷N„Ðßÿ½eËjwáÂ…Ôø!•J5y!ÓôrssC1 ³m‹æÓZî˺žl6»¯¯Ëå’»þù'BhéÒ¥üñU÷_ýeÚebbÇñœœƒÁÐÔÔôÑGÕÔÔ¸»»›ÜßßOŽpãÆ ///²177W¥R¥¤¤<û쳫W¯¶ªT‹UPPàçç‡S«Õd;ùÅòññ™¼izYe>­å¾¬»„ÅÆÆ^¼xQ­V·µµ!„ø|¾H$joo×h4W®\9vì†ýÿ‡ÖböÁ\¸páîÝ»z½žÁ`—°úúú»wïR‡>|X©Tþþûï%%%Ï<ó ÙÈd2yä@ŸŸïÞ½©P«Õ’ëÖ­+..T(™™™555¦‡=ÿüó¦ ¡n!§ï5•ù´kYwJHH0GŽ!¯¬Ÿþ9ŸÏ7wîÜ Û±cÇ—_~IuqqqùðÃE"Ñ­[·|}}³³³]\\BŒˆˆ Î«7n|ÿý÷u:]TTTRRuæG ‚¦¦¦òòrê›a‘Ï£>ºeË–S§N!„RRR>üÆo`öÔSO¥§§ Qóù|½^_XX8<<Ìår³²²È|&÷z/Ë|Z‹µÌŸÊÎÎ~ðÇ9”JåÖ­[sss½½½©Sè… Äbqqq±UƒH¥RkÊvPói-577ú駦™™7 ÅþýûårùÄÄDwwwYYY\\ýaÁœ0ŸÚüÊ+¯ètºO>ùddddÙ²e±±±›7o~ðî .´êxG6ŸÖò€h]ÂÀÃfV.aàa´@€- @‹ùMtPP§§§ ŽìöíÛ …bÊ¿ ËÈȸqã†Í«s ŸÏ7ÝýÇkÁ= hZ @€–ÿ•¬ÜÎæ£¸)IEND®B`‚pktools-2.6.6/doc/html/ftv2folderclosed.png0000644000113200011300000000115012647637661015630 00000000000000‰PNG  IHDRÚ}\ˆ/IDATxí]MOÔ@~ÚúuØlp]ö¿#›Å]PYECˆ\9ù¼yÑß`ÖÄÿàÿÀÉxóâ¢C &=qÐÄ£—vZçv¶3m؃‡vžLûNç}Þ÷}Þ½ZA@n° OäNp ’xóþK°ññ€xÜj”°8sÑ€“ “€œ_¼[Âíæ§ïD'‚•yye+ø¼û 7#rNŸlïük* ¾0Ь_d«_(àñÖ±àôz=ñxõv§÷h©‰z¹€šØP-äóä’̪uý¼$»\DãJc—B4¯ãÝÖ.:£Ï-ÑÏß}µŠLEíºþ #—ûáºÀÏgN;BŠ€6ïýñ䬜…ö@’Ðåñp&™h>p9¤™EEά¨ÎÊ‘" u¥n€$R"?{¹<˜…ë…%PNtâ$‰ß¶±úá+^<é"§2 ªDq”q´\¬«Ò™a–Œ‘©Aÿ€"Ôµ ™êŸèP£}#Eàz{û.8i îp³ê(ADwD¦E<ê¬cE¦$ HdÊÄ ”.:Ù GŽ-`ŒL‚ý¾'¢‰Ä<¤CIª½;ÙÇTZd±i};>èôß‚z×;K×§8t ¤Ž q”:uvÿv•Ý›¬²ÙvEân{„M·FXg¼ÌfZÖ¨°¹‰*›ßÌß©±ù©:›j–YqèÜë#3çÏSøWøÿÿÑr'ø Ôùù‚ ©¡IEND®B`‚pktools-2.6.6/doc/html/pksetmask_8py_source.html0000644000113200011300000007420512647637661016736 00000000000000 pktools: /home/kempenep/pktools/qgis/pksetmask.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksetmask.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pksetmask.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pksetmask(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  MASK = "MASK"
42  MSKNODATA = "MSKNODATA"
43  MSKBAND = "MSKBAND"
44  OPERATOR_OPTIONS = ["=","<",">","!"]
45  OPERATOR = "OPERATOR"
46  NODATA = "NODATA"
47  OUTPUT = "OUTPUT"
48  RTYPE = 'RTYPE'
49  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
50  EXTRA = 'EXTRA'
51 
52  def cliName(self):
53  return "pksetmask"
54 
55  def defineCharacteristics(self):
56  self.name = "apply mask to raster dataset"
57  self.group = "[pktools] raster"
58  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
59  self.addParameter(ParameterMultipleInput(self.MASK, 'Mask(s) to apply',ParameterMultipleInput.TYPE_RASTER))
60  self.addParameter(ParameterString(self.MSKNODATA, "Mask value(s), provide value for each mask (e.g., 250;255)","1"))
61  self.addParameter(ParameterString(self.MSKBAND, "Mask band(s) to read, provide band for each mask (e.g., 0;1)","0"))
62  self.addParameter(ParameterSelection(self.OPERATOR,"setmask rule",self.OPERATOR_OPTIONS, 0))
63  self.addParameter(ParameterString(self.NODATA, "nodata value to put in image if not valid","0"))
64  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
65  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
66  self.addParameter(ParameterString(self.EXTRA,
67  'Additional parameters', '-of GTiff', optional=True))
68 
69  def processAlgorithm(self, progress):
70  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
71  commands = [cliPath]
72 
73  input=self.getParameterValue(self.INPUT)
74  commands.append('-i')
75  commands.append('"' + input + '"')
76 
77  mask=self.getParameterValue(self.MASK)
78  maskFiles = mask.split(';')
79  for maskFile in maskFiles:
80  commands.append('-m')
81  commands.append(maskFile)
82 
83  commands.append(str(self.getParameterValue(self.MSKBAND)))
84  mskband=self.getParameterValue(self.MSKBAND)
85  mskbandValues = mskband.split(';')
86  for mskbandValue in mskbandValues:
87  commands.append('-mskband')
88  commands.append(mskbandValue)
89  commands.append(str(self.getParameterValue(self.MSKNODATA)))
90  msknodata=self.getParameterValue(self.MSKNODATA)
91  msknodataValues = msknodata.split(';')
92  for msknodataValue in msknodataValues:
93  commands.append('-msknodata')
94  commands.append(msknodataValue)
95 
96  commands.append("-p")
97  commands.append(self.OPERATOR_OPTIONS[self.getParameterValue(self.OPERATOR)])
98  nodata=self.getParameterValue(self.NODATA)
99  commands.append('-nodata')
100  commands.append(nodata)
101  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
102  commands.append('-ot')
103  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
104  output=self.getOutputValue(self.OUTPUT)
105  if output != "":
106  commands.append("-o")
107  commands.append('"' + output + '"')
108 
109  extra = str(self.getParameterValue(self.EXTRA))
110  if len(extra) > 0:
111  commands.append(extra)
112 
113  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/inherit_graph_46.map0000644000113200011300000000046612616110570015474 00000000000000 pktools-2.6.6/doc/html/inherit_graph_40.png0000644000113200011300000000327112647437044015506 00000000000000‰PNG  IHDR«%=R±bKGDÿÿÿ ½§“nIDATxœíœ_HSoÇŸýæ6Wƒ i-Ç$³¨ÐÂ"èF)Š‚º.Ʋc´›"+ˆAÿ Œ.Œ"*#B‘Zk$ý¡±‹4æ² ÉÊ…BåVÛÁÍmîû»ˆp;›Ó9·ïÎÅyÏó¼>ï÷|Ï»÷¼ŽÉ€ŒÜçáÙ®€ÁHfV†d`feHfV†dÈ‹m¦ÚÚZ Ù¨‡Á µk×RSSS\»,v7Àjµ’Ñh¤½{÷Î[q F—ËE===$²Iõ0nfbµZ3[ƒ!Bt²ƒ­Y’™•!˜Y’™•!rÖ¬hÿþý¤Ñh²]ʬáyž, •””Z­¦U«VQ]]Ýœm Êd²„Ç¿HFÍ:44D³Š¡ÖÖV˜·æšcÇŽQoo/µ··Óðð0577“Íf£S§N͸¶D±ÝÝÝ4::wÌ–lê5 ·®æ‚H$Bccc³ŠõûýDDT\\@DLx_rM¯THâ?kÚfåy*• 7oÞÄèè(š››‘——žçãnž×ë…R©„ÙlÆ÷ïßÑÒÒ"Â?¦½ñÉrQVV‡Ãþþ~lÞ¼‹E´¨®®ÆöíÛñùóg8”——£¾¾^ˆÝµk^½z…ÎÎNhµZ„B!@KK ÊÊʉD¿ÿÆíÛ·…~cÏŸ?½^•J…;v ±±_¿~ÕÅÆADøðá|>ß”# å¤^©Q³ºÝn( \¹r‘H>Ÿ“““qŸ˜˜À§OŸÀó<&''ñæÍav˜Î¬ÉrW¯^ŽŽ!v``@8í' B.—Ãét mX¹r¥ëp8áp:/_¾ìÞ½—/_NY›h===hhh@yy9är9Z[[g<ÆDf;ìv»dõʨY «« {öìÁÂ… QUU…ÎÎNâO©ÍfCee%***pðàÁ”Íš,7??ýýý¢µÅöãr¹@DðûýB›Ãá@~~¾ …kGŽAmm-~þü ¥R —Ë•’&<Ï£­­ ápXh‹D"8þ<ôz}ÚúÓ/¤¤W”Œšu||oß¾ðwf¸wïär9ÆÆÆâ>>>•J›Í†H$¿ßŸ²Y“å®X±v»]ˆíëëÃÅ‹Eû‰Î?~Ú=z„ÒÒRQC¼~ýEEE¸~ý:¶mÛ–².>Ÿ2™ }}}SÚ»ºº„õ`:úÉÍ*5½¢$3kÚ[W2™ŒvîÜIíííäõz) ’B¡  1<ÏÑÄăAR*•ä÷û©®®Žˆˆ|>_\l,Ér9Ž£³gÏ’Óé$§ÓIG¥oß¾MÉö«P(Èh4ÒñãÇéË—/ät:éܹsT]]-úw«ªª(SCCq7åÚŸ?èÎ;¢ç†jjjÈh4ÒÓ§Oihhˆº»»Éb±Éd­-}¤ WÚÌÀÙIŸ†ÒÒR(•J¬Y³6› Àß·ÎÊÊJh4!öêÕ«X¼x1 nܸ“É„%K–ÄÅŠ=µ‰r, ŠŠŠ°hÑ"˜L&áíV¬·Û Žã Õj±lÙ2œ8qbÊÛm,‡†Z­†×ëÒ>ݧA8F}}=Ö¯_µZåË—ãôéÓÂGj:úÓ/rM¯TÈøšõ_çÌ™3Ø·o_¶Ë éè•̬ý§€Ô 422BwïÞ¥¶¶¶l—“ódZ¯œýn@.ðîÝ;Ú´i™ÍfÚºuk¶ËÉy2­›Y“°eËr»ÝÙ.C2dZ/6³2$3+C20³2$3+C2$|ÁºuëÖ|ÖÁ`Ñû÷ï^‹3«^¯'¹\N‡ÊhQ F"}á>îYŒ…ý>+C:0³2$3+C20³2$ÃÿúŽVn†MqIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid__coll__graph.png0000644000113200011300000000757312616110567026330 00000000000000‰PNG  IHDRåpn ±bKGDÿÿÿ ½§“0IDATxœíÝ{P×ð³­Htx¨@¡$QQ°C‡éètjÁBß‚vDy´TQ´V­Ѫ:µàX„éT4ÛP† A0¢^ˆÅŠT%p‘úàÙŽ ! !Ù½ì½;)„ ½ÁpÒßçÎîaÏÙß9|›CEQL˜»Æò py8¼œ°Œ]ÀØ”Je}}=I’Æ.ÄÄ999988»Š1`W¹\ÞÕÕ5ù—kr¹¼££cò/2y¥yzz»SöÛo¿»„ûW€È+À äàò pbÊymhh âeõõ×_qôèQCÕ0Zw‚ þö°ø2å¼êÔÔÔdoo?#S•““ãêê*‰ 5æ´iÓöïß&²l¼üãòJ’dWW×DŒ|ïÞ½œ9s¦ººº®®Î cÚÛÛÓÖW6^L$¯ôófaaáܹswíÚ588È|•¢¨˜˜ooï?ÿüsÑ¢E¡™3gÒ_êé鉌Œ´··wqq‰‰‰Q*•£52$Éo¼ammÍáp„B!Óž““ãëëàáá1ò!–¢(>Ÿ?þ|[[Û÷Þ{ïÒ¥KôýÈ{Ñs)))quu=wî}Ù°²BÅÅÅ<oúôéIIIt AgÏž7ožƒƒÃÑ£G…B¡»»;›ÍŽ‹‹3ØB5éµ··K¥Rý×Ô××#„ëêê***x<^BBÝH’$VæJ¦cXX˜¿¿cccMM——WBB‚ÎF¦W__Ÿ••ŸÏokk;sæ ‹Åêëë£(Š$Iwww@@QÔ¡C‡<==µ £(*==ÝÙÙùêÕ«×®]ãñxtûh÷Z¶lYiiiuu5}Ù°²B+W®”Ëåb±!DO !´qãF¹\ž‘‘Z¿~½\.ÌzÔÖÖÖÖÖŽïc &•ךšúT$ñx<º166!ôèÑ#í+éc•JennÎ|Ÿòóóy<žÎF¦Www·……Errò³gÏH’|þü¹F£¡(ª¢¢‚Åbѱ¨¬¬DÝ»wOûv^^^?ýôSpvv6BHϽè¹0ÝGæõúõëEi4„P}}=Ý(“Éèy ;¦/З¼šÈ~€6{ölúÀÃ㥥…>¾s玟Ÿ_bbâÈëÛÛÛ5 —Ë¥Oy<^KK‹ÎF¦ËôéÓ¥RiEE…‹‹‹¯¯ï7ÌÌÌB999jµÚÞÞž „а-Acc£——s:þüÑ `¦ ²NNN!úS§"„,,,†› “Ê+ý „ª««£¿!‰DÂçósrr¤Ré°ëg̘annÞÔÔDŸ666:;;ëldº( ’$ÏŸ?ßÝݽyóæU«Vuwwk4‘H”’’òüöîÝ+‰(­Ï¹¹¹iÿŒþÁƒ£@™3C½T‡“ÊëîÝ»îܹsðàÁððpºqÊ”)sçÎ=pàÀ¶mÛ˜9õõõ!„,,,BBBvíÚÕÜÜ\[[{øðá°°0Ì-‚ ‹År¹\¥RYXX¼úê«7nÜèèè ³ùŸÐÐÐúúzz÷IÛ±cGlllqqqWWWiiiBBAúï5]ö?š±7$c{ñýkFF†›››½½ýÎ; …öžO¡PÌ™3'>>~hhèwÞ±±±¡Û»»»#""ìììfÍšµgÏ…B¡³Q{(‘HÄår---=<< )ŠŠŽŽ Ô®‡$I.—»ÿ~¦£F£IMMår¹l6{éÒ¥………cÞ‹9V6ÒÚ’"­ýëÈÆaÇ£ÁeÿjRy})åüM‰¤ººš9ÍËËóöö6b=Ãà’W“ÚLf555ááá2™l`` ¢¢"...**ÊØEá›÷këgkkmì*ô‰ êììäp8›6mšäON5é_FGGÇýû÷ýüüŒ]ˆ)£_»˜üâ€ýÀ äàò py8Áæõ'Ož»S¦T*­­­]ÅØ0È«••A†zôK@’ÔÉ“•ÁÁs§»–q˜6mš±Kye³Ù¾¾¾Æ®b**ËË/ÎË ó3v-¦ö¯†wáB%ý_µ~ç—A^ L¥RççW!„z{ÊÊ»Sy5°ë× "„ÌÍÍòó+]Ž©¼˜X\inn†R«É+Wj •±+2)WCêïü׿jÕj }:8¨¾ví¾qK21WCÒ+BÈÌŒ‹ï±Óy5$±ø®öǪÔjR*}(—+ŒX’‰¼LwwYYFó—×°(Šº|¹ÆX%™È«Á\ºôï‘E?[ƒ¼L^Þ‘o~'Iª¢¢±½½×(%™È«aãÎkQQÑ?þ% ?üðä¤$„ÐåË—…BáŽ;²³³ÃÂÂÒÒÒ´»(•Ê„„„   ºâcÇŽ)•Ê‘#$%%%&&þúë¯ô""„(Š2™,%%…Íf#„òòòÚÚÚÁñãÇe2YffæÛo¿íãã“––öìÙ³´´´C‡Y[[Ÿ}Z$ÅÇÇÛÚþ÷¯µ_¹re÷îÝŽŽŽ'::úöíÛ¡;wÊd²˜˜˜5kÖxxxè¬|ëÖ­o¾ù¦­­í™3gvíÚeggçèèˆêïï/**Ú´i‡Ãqwwß¿¿§§ç‹/…ÎYÓ÷²¶¶¦O/^¼¨½h£=E ŒIÇÏcõkkkãñxÌ)‡ÃA=yòÄÝÝi|ýõ×µ»L:5555///33sΜ9¡¡¡ .9²‹‹ }àêêÚÙÙI?zôÈÛÛ;++ëÀtËÓ§O×­[Çôš2e BÈÆÆfåÊ•?üðÃñãÇG«ÜÕÕ!Äb±ZZZ’““ ó{{;sw77777·Y =³¦ïÅèìì¹h#Á ŒiܯöööÌ)ýv„3f4773üñ‡v—ÁÁA’$$ÉòåË>>ô©N,‹.&!!aÆ §OŸþì³Ïè/ÙÙÙ=}ú”>nhh Ÿ ǤgÖô½3gιh#Á ŒiÜy]¶lÙ©S§nÞ¼ÙÝÝ}ûöíÓ§O#„‚‚‚ÁÝ»wåryUUÕ¹sç‚`º±oß¾²²²þþþ¡¡!‹EŠúûû™ËNœ8ÑÚÚúðáÃŒŒŒ÷ߟn´¶¶~íµ×BCCSRRT*BhñâÅéééíííMMM±±±E;vlíÚµqqq•••ååå̘ …bXýCCCjµšÅb©TªÌÌL„ÐÀÀ@```FFFsssssówß}×ÞÞ®g†þYk[½zµö¢={–n‡¯qïBBB4MZZZOO½:räHPPF£IMMíííõôôܶmÛ·ß~Ët±´´üâ‹/AGG‡““S||<ý.Ûäädoooúé !ðùçŸ+•Jÿ°°0æ !ZRR’¹yóæ'NlÙ²… ˆwß}7::º   §§gãÆ,kÏž=))) ,˜9sæ‚ Ö­[wùòeíúmll¶oß~äÈ‘W^y%44Ôßß?66677W©TîÛ·O©T.Z´(::!4Ú ý³våÐÐЩS§ººº¸\n\\ýOoXñ"(ŠbNrssCBB¤Ré‹÷omm OLLtttär¹tcYY™P(LOO× ãºïdpëÖ­ÿgÖÚ`túꫯrss™Ãü¼ ©©é›o¾©¯¯¼ÿþÙ³gW¬Xa‘'³欵½ü÷~@§ 6(•ÊÇ÷ôôÌš5kÙ²e«V­zñîS¦L×õ/ßh?ìÿÛ³Ö+ð‚þßýg¢ö¼W€È+À äàDÇë111/¿Fjjj ÐnùK^.\¸aÃFór«@7‡³~ýzí–¿¼žÀ$ûW€È+À äàò pòûÝ‹ßáf±SIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_45.md50000644000113200011300000000004012647437044015403 0000000000000062ce278189506cc1c0752d729480526epktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img__coll__graph.png0000644000113200011300000000746212616110567025641 00000000000000‰PNG  IHDRåpn ±bKGDÿÿÿ ½§“çIDATxœíÝyPS×ðKY† ²ˆ%ÄÝv˜qZ;Ódj‹µŠD©bÐR­Õ’V§Z[+2¥e@Kãö`‹U©Èò¢²¶¯,#”²‘Üûþ¸¯wÒ$€ô%„“þ>0÷î9ç—Ãw’C`$‰À„™± ` ¯'W€È+À ÓØLO&“µ··aìBLœ«««³³³±«˜y‹ÅCCCs)±&‹æþ"cWÊêÕ«]‚)ûå—_Œ]ÂSý+À äàò py81å¼vtt0ŒÙêØ±c ãøñãúªa²î £££ão‹/SΫN]]],Ë#“$YTTäááQ\\¬¯1’’’!ËÆË?.¯A bäû÷ï?xð 77·©©©­­M/c²X,êÞÚpeãÅDòJ=n–——/_¾|Á‚qqqr¹œþ.I’ ÞÞÞüñÇK/½„Z´hõ­ááá]»v±X,ww÷„„™L6Y#M(>ÿüóÖÖÖl6»  €n/**òññ X±b…ö],I’`ÕªUvvvëׯ¿téõ@¯=u[®_¿îáᑟŸO]¦Q6B¨¢¢‚Ãá8::¦§§S- #//oåÊ•ÎÎÎÇ/((ðôô´··?zô¨ÞÚèÈ9ïñãÇÕÕÕS_ÓÞÞŽ lkk«­­åp8|>Ÿj$‚+}%Ý1<<Üßß¿³³³¹¹yÍš5|>_g#ÝkllÌÊÊJ ô÷÷çææ2™Ì±±1’$ ‚ðôôÌÊÊ"Iò£>Z½zµza$Iž;wÎÍÍíÚµkƒƒƒ•••‡jŸl®7VUU555Q—i”zýõ×Åbqii)Bˆºi¡;vˆÅ✜„жmÛÄbqVV}ÁZZZZZZföƒ1“Êkss3uZ\\Ìáp¨F‡zôè‘ú•Ô±B¡077§NeeeGg#ÝK$YXXœA5Λ7oùòå|ðALL ý›ÓØØBÈÂÂ",,,..®»»»¥¥åÈ‘#ááá:é) F```ii©X,V(6667oÞ·ý—Ëmoo§vŸ”ðx¼ŠŠŠ¡¡¡ªª*>ŸÏ`0¦žKUö?š±7$Ó{úýkNNÎ’%KX,Vll¬T*UßóI¥ÒeË–%''OLL¼òÊ+¶¶¶T»H$Ú¹s§“““‹‹Ë{ï½'•Ju6ªU\\ìååeii¹bÅŠòòr’$÷íÛ¨^A^^^IIItG•J•‘‘áååeooT^^îìì<í\ô±FÙHmKŠÔö¯ÚÇ“ÁeÿjRy•rþ&¡PØÔÔDŸ^¸pÁÛÛÛˆõhÀ%¯&µ˜Ëš››#""$ImmíÑ£G£££]~°y¿öÔìììöíÛgì*¦Âãñ$Ihhèàà ›ÍÞ½{÷/xnbsþïe ´¶¶úúú»SF=w1÷?Äû€È+À äàò p‚Íó}}}Æ.Á”Éd2kkkcW1= òjeeÅ`0ôõèY@äÙ³õ›7/ws›oìZfÀÁÁÁØ%Lƒ¼ÚÛÛûøø»Š¨­í¼}û‡åËÙáá¾Æ®ÅÔÀþUÿ.^¬§¾*•ð7¿ô òªg …²¬¬!42"©©ydìrL äUÏnÜx(‘ÈBææfeeõÆ.ÇÔ@^õ¬´´ÞÜÜ !¤TW¯6K¥ cWdR ¯ú4>.ÿ׿Z”Ju*—+++[[’‰¼ê“zXBffŒÒÒ{F¬Çô@^õ©´ôžúǪ”J¢ºú¡X,5bI&òª7"ÑxMM›Jõ—ç°H’¼r¥ÙX%™È«Þ\ºôoíF’$KJ`K 7W½¹p¡NûÍïAÖÖv>~.Åk3àÿã´µµÝ±c‡~Çìï)//×ï°³f||üôéÓ …âÅ_Œ‹‹3Ä*È\(Þ€÷¯ööö{÷îÕï˜AˆÅbýŽ9›>ýôÓÁÁÁŒŒ @ ‹322 ±J2ŠŸq^I’¼xñbdddppðýüüH’üá‡víÚçÎ???õ‹Û·oïÙ³'00ËåVTThŒI]yëÖ­;wnÞ¼ùË/¿œ˜˜PŸ1333::zddäÝwßE½õÖ[Ô·ÆÆÆŽ?þæ›onݺ533S¡PLÖHÓW%ê½îܹóÎ;ïmÙ²¥°°p²‰”Je]]]TTÔâÅ‹]]]wïÞ}÷î]õUòóó»zõjdddhhhaaaEEÅŽ;BBBòòò¨ÙµÙdŠJ3Þ\¾|ù›o¾‰_µjUGGGzz:BèÊ•+<oÙ²eê]d2ŸÏ}ùå—þùçÏ>ûìµ×^³¶¶Öùûï¿OOOMMMµ³³  ngVVVCCéS§ìììΞ=QVVFu9}ú´H$R©4%%ÅÆÆ&22R»‘J¿•ŒQK$’?þxÆ éééMMM©©©ÁÁÁÖÖÖÚYZZ,Z´ˆêØØØèââ¢1u}}}ffæ7Nœ8áëë›››[UUõù矿ýöÛ7oÞœb‘M£øiÍøþµ´´4&&æÕW_urrZ·n]tt4ÝøÂ /ØÛÛ¯]»6**J½ËÄÄI’R©ÔÒÒ2((H(ZYYi¼ÿ~ww÷•+WFGGWVVRÙÙÙÅÅÅÉÉÉvvv×+•ʪªªØØX6›UYY©³Ñ •XZZæææÆÅÅ999-X°!4>>®s"333777sss‰D’]^^ž””¤1uXX˜M`` BˆËåÚØØ!„FGG§^dÓ(~Z3Îk?‡Ã¡OÙl6B¨¯¯ÏÓÓ“n|öÙgջ̟??##£µµuëÖ­‡jnnf0Ú#»»»SƒƒƒÔñ£G¼½½¿ýö[íëŸ_(>|xttT{äžžêà÷ßwrr¢ŽÓÒÒâã㫪ª5®wtt433ëïï§NûúúX,–ÎFƒV"—Ëù|þöíÛ³³³:4õD%%%ùùùiii‰‰‰ÚSOaêE6â§5ã¼nܸ133óÖ­["‘èîÝ»ÙÙÙ¡ÐÐЬ¬¬{÷î‰ÅâÆÆÆüü|õû-ƒ‘˜˜XSSC=Ö0™LêQøòåËãããôegΜéíí}øðaNNΆ ¨FkkëÅ‹s¹ÜS§NÑ¿9I¥R„“Éôóóûâ‹/úûû»»»ssst6®„ÐÄÄ„R©d2™ …â믿FI$çææFEEYYYýçOO¿ò“-2ÖÅÏÔŒß S©T_}õÕðð0›ÍÞ·o_JJJhh¨J¥ÊÈÈY½zuLL̉'è.–––~øaVVÖÀÀ€««krr2õ.Û“'Oz{{Ï›7º, àý÷ß—Édþþþáááêã\.÷úõë………;wî|î¹ç¶lÙråÊ„ÐÁƒÏœ9caa±~ýúððpôPz¬„Ž‚­­íþýûSRRžyæ.—ëïïÏãñ.^¼¨=Q[[›\.?vì˜úzêÜêè4Ù"c]üL1H’¤OΟ?V]]ýôý{{{#""ÒÒÒ,XàååE5ÖÔÔœ;wnFƒÌh^™;•h»sçÎÔ‹Œuñ:}òÉ'ÎÎÎçÏŸ§[ôózAWWWjjj{{»\.ommÍËË ÑËÈ€†õ"ë«xý¼»}ûv™LväÈ‘ááa—7nÚ´éé»Ï›7oF×ÎÜ©DÛ´‹ŒuñOéÿÝ`8†Ú0; ¯'W€È+À‰Žçf¿´uuu©¿<‰4òºnݺíÛ·«TªÙ­ ÝØlö¶mÛÔ[þò|sì_N ¯'W€È+ÀÉõ¢ú6ÚwRIEND®B`‚pktools-2.6.6/doc/html/build-pkextract__gui-gcc-Debug_2ui__mainwindow_8h_source.html0000644000113200011300000024455412647637661025576 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkextract_gui-gcc-Debug/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QHBoxLayout>
20 #include <QtGui/QHeaderView>
21 #include <QtGui/QLabel>
22 #include <QtGui/QLineEdit>
23 #include <QtGui/QMainWindow>
24 #include <QtGui/QMenu>
25 #include <QtGui/QMenuBar>
26 #include <QtGui/QPlainTextEdit>
27 #include <QtGui/QPushButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStatusBar>
30 #include <QtGui/QTabWidget>
31 #include <QtGui/QTableView>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput;
43  QAction *actionSample;
44  QAction *actionMask;
45  QAction *actionOutput;
46  QWidget *centralWidget;
47  QGridLayout *gridLayout_5;
48  QHBoxLayout *horizontalLayout_3;
49  QTabWidget *tabWidget;
50  QWidget *tab_2;
51  QHBoxLayout *horizontalLayout_4;
52  QGridLayout *gridLayout;
53  QLabel *label_14;
54  QLineEdit *bndnodata;
55  QLabel *label_13;
56  QLineEdit *output;
57  QLineEdit *input;
58  QToolButton *toolButton_input;
59  QComboBox *f;
60  QLabel *label_16;
61  QLabel *label_15;
62  QLabel *label_3;
63  QLineEdit *sample;
64  QLabel *label_23;
65  QLineEdit *srcnodata;
66  QToolButton *toolButton_output;
67  QToolButton *toolButton_sample;
68  QCheckBox *polygon;
69  QWidget *tab;
70  QHBoxLayout *horizontalLayout_5;
71  QGridLayout *gridLayout_4;
72  QLineEdit *bname;
73  QLabel *label_20;
74  QComboBox *rule;
75  QLabel *label_4;
76  QLineEdit *nclass;
77  QLabel *label_21;
78  QToolButton *toolButton_createTable;
79  QLabel *label_2;
80  QLabel *label;
81  QLineEdit *threshold;
82  QSpacerItem *verticalSpacer_2;
83  QLabel *label_5;
84  QLineEdit *cname;
85  QVBoxLayout *verticalLayout_2;
86  QLabel *label_17;
87  QTableView *tableView_labels;
88  QLabel *label_22;
89  QWidget *tab_4;
90  QHBoxLayout *horizontalLayout_6;
91  QVBoxLayout *verticalLayout;
92  QLabel *label_18;
93  QLineEdit *commandLineEdit;
94  QLabel *label_19;
95  QPlainTextEdit *consoleEdit;
96  QHBoxLayout *horizontalLayout;
97  QPushButton *pushButton_run;
98  QSpacerItem *horizontalSpacer;
99  QPushButton *pushButton_restore;
100  QMenuBar *menuBar;
101  QMenu *menuFile;
102  QToolBar *mainToolBar;
103  QStatusBar *statusBar;
104 
105  void setupUi(QMainWindow *MainWindow)
106  {
107  if (MainWindow->objectName().isEmpty())
108  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
109  MainWindow->resize(703, 706);
110  actionInput = new QAction(MainWindow);
111  actionInput->setObjectName(QString::fromUtf8("actionInput"));
112  actionSample = new QAction(MainWindow);
113  actionSample->setObjectName(QString::fromUtf8("actionSample"));
114  actionMask = new QAction(MainWindow);
115  actionMask->setObjectName(QString::fromUtf8("actionMask"));
116  actionOutput = new QAction(MainWindow);
117  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
118  centralWidget = new QWidget(MainWindow);
119  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
120  centralWidget->setMinimumSize(QSize(423, 392));
121  gridLayout_5 = new QGridLayout(centralWidget);
122  gridLayout_5->setSpacing(6);
123  gridLayout_5->setContentsMargins(11, 11, 11, 11);
124  gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
125  horizontalLayout_3 = new QHBoxLayout();
126  horizontalLayout_3->setSpacing(6);
127  horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
128  tabWidget = new QTabWidget(centralWidget);
129  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
130  tab_2 = new QWidget();
131  tab_2->setObjectName(QString::fromUtf8("tab_2"));
132  horizontalLayout_4 = new QHBoxLayout(tab_2);
133  horizontalLayout_4->setSpacing(6);
134  horizontalLayout_4->setContentsMargins(11, 11, 11, 11);
135  horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
136  gridLayout = new QGridLayout();
137  gridLayout->setSpacing(6);
138  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
139  label_14 = new QLabel(tab_2);
140  label_14->setObjectName(QString::fromUtf8("label_14"));
141 
142  gridLayout->addWidget(label_14, 1, 3, 1, 1);
143 
144  bndnodata = new QLineEdit(tab_2);
145  bndnodata->setObjectName(QString::fromUtf8("bndnodata"));
146 
147  gridLayout->addWidget(bndnodata, 1, 1, 1, 1);
148 
149  label_13 = new QLabel(tab_2);
150  label_13->setObjectName(QString::fromUtf8("label_13"));
151 
152  gridLayout->addWidget(label_13, 1, 0, 1, 1);
153 
154  output = new QLineEdit(tab_2);
155  output->setObjectName(QString::fromUtf8("output"));
156 
157  gridLayout->addWidget(output, 3, 1, 1, 1);
158 
159  input = new QLineEdit(tab_2);
160  input->setObjectName(QString::fromUtf8("input"));
161 
162  gridLayout->addWidget(input, 0, 1, 1, 1);
163 
164  toolButton_input = new QToolButton(tab_2);
165  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
166 
167  gridLayout->addWidget(toolButton_input, 0, 2, 1, 1);
168 
169  f = new QComboBox(tab_2);
170  f->setObjectName(QString::fromUtf8("f"));
171 
172  gridLayout->addWidget(f, 3, 4, 1, 1);
173 
174  label_16 = new QLabel(tab_2);
175  label_16->setObjectName(QString::fromUtf8("label_16"));
176 
177  gridLayout->addWidget(label_16, 3, 3, 1, 1);
178 
179  label_15 = new QLabel(tab_2);
180  label_15->setObjectName(QString::fromUtf8("label_15"));
181 
182  gridLayout->addWidget(label_15, 3, 0, 1, 1);
183 
184  label_3 = new QLabel(tab_2);
185  label_3->setObjectName(QString::fromUtf8("label_3"));
186 
187  gridLayout->addWidget(label_3, 0, 0, 1, 1);
188 
189  sample = new QLineEdit(tab_2);
190  sample->setObjectName(QString::fromUtf8("sample"));
191 
192  gridLayout->addWidget(sample, 2, 1, 1, 1);
193 
194  label_23 = new QLabel(tab_2);
195  label_23->setObjectName(QString::fromUtf8("label_23"));
196 
197  gridLayout->addWidget(label_23, 2, 0, 1, 1);
198 
199  srcnodata = new QLineEdit(tab_2);
200  srcnodata->setObjectName(QString::fromUtf8("srcnodata"));
201 
202  gridLayout->addWidget(srcnodata, 1, 4, 1, 1);
203 
204  toolButton_output = new QToolButton(tab_2);
205  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
206 
207  gridLayout->addWidget(toolButton_output, 3, 2, 1, 1);
208 
209  toolButton_sample = new QToolButton(tab_2);
210  toolButton_sample->setObjectName(QString::fromUtf8("toolButton_sample"));
211 
212  gridLayout->addWidget(toolButton_sample, 2, 2, 1, 1);
213 
214  polygon = new QCheckBox(tab_2);
215  polygon->setObjectName(QString::fromUtf8("polygon"));
216 
217  gridLayout->addWidget(polygon, 4, 3, 1, 1);
218 
219 
220  horizontalLayout_4->addLayout(gridLayout);
221 
222  tabWidget->addTab(tab_2, QString());
223  tab = new QWidget();
224  tab->setObjectName(QString::fromUtf8("tab"));
225  horizontalLayout_5 = new QHBoxLayout(tab);
226  horizontalLayout_5->setSpacing(6);
227  horizontalLayout_5->setContentsMargins(11, 11, 11, 11);
228  horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
229  gridLayout_4 = new QGridLayout();
230  gridLayout_4->setSpacing(6);
231  gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
232  bname = new QLineEdit(tab);
233  bname->setObjectName(QString::fromUtf8("bname"));
234 
235  gridLayout_4->addWidget(bname, 1, 1, 1, 1);
236 
237  label_20 = new QLabel(tab);
238  label_20->setObjectName(QString::fromUtf8("label_20"));
239 
240  gridLayout_4->addWidget(label_20, 4, 0, 1, 1);
241 
242  rule = new QComboBox(tab);
243  rule->setObjectName(QString::fromUtf8("rule"));
244 
245  gridLayout_4->addWidget(rule, 0, 1, 1, 1);
246 
247  label_4 = new QLabel(tab);
248  label_4->setObjectName(QString::fromUtf8("label_4"));
249 
250  gridLayout_4->addWidget(label_4, 0, 0, 1, 1);
251 
252  nclass = new QLineEdit(tab);
253  nclass->setObjectName(QString::fromUtf8("nclass"));
254  QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
255  sizePolicy.setHorizontalStretch(10);
256  sizePolicy.setVerticalStretch(0);
257  sizePolicy.setHeightForWidth(nclass->sizePolicy().hasHeightForWidth());
258  nclass->setSizePolicy(sizePolicy);
259 
260  gridLayout_4->addWidget(nclass, 4, 1, 1, 1);
261 
262  label_21 = new QLabel(tab);
263  label_21->setObjectName(QString::fromUtf8("label_21"));
264 
265  gridLayout_4->addWidget(label_21, 3, 1, 1, 1);
266 
267  toolButton_createTable = new QToolButton(tab);
268  toolButton_createTable->setObjectName(QString::fromUtf8("toolButton_createTable"));
269 
270  gridLayout_4->addWidget(toolButton_createTable, 4, 2, 1, 1);
271 
272  label_2 = new QLabel(tab);
273  label_2->setObjectName(QString::fromUtf8("label_2"));
274 
275  gridLayout_4->addWidget(label_2, 1, 0, 1, 1);
276 
277  label = new QLabel(tab);
278  label->setObjectName(QString::fromUtf8("label"));
279 
280  gridLayout_4->addWidget(label, 5, 0, 1, 1);
281 
282  threshold = new QLineEdit(tab);
283  threshold->setObjectName(QString::fromUtf8("threshold"));
284 
285  gridLayout_4->addWidget(threshold, 5, 1, 1, 1);
286 
287  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
288 
289  gridLayout_4->addItem(verticalSpacer_2, 6, 0, 1, 1);
290 
291  label_5 = new QLabel(tab);
292  label_5->setObjectName(QString::fromUtf8("label_5"));
293 
294  gridLayout_4->addWidget(label_5, 2, 0, 1, 1);
295 
296  cname = new QLineEdit(tab);
297  cname->setObjectName(QString::fromUtf8("cname"));
298 
299  gridLayout_4->addWidget(cname, 2, 1, 1, 1);
300 
301 
302  horizontalLayout_5->addLayout(gridLayout_4);
303 
304  verticalLayout_2 = new QVBoxLayout();
305  verticalLayout_2->setSpacing(6);
306  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
307  label_17 = new QLabel(tab);
308  label_17->setObjectName(QString::fromUtf8("label_17"));
309 
310  verticalLayout_2->addWidget(label_17);
311 
312  tableView_labels = new QTableView(tab);
313  tableView_labels->setObjectName(QString::fromUtf8("tableView_labels"));
314 
315  verticalLayout_2->addWidget(tableView_labels);
316 
317  label_22 = new QLabel(tab);
318  label_22->setObjectName(QString::fromUtf8("label_22"));
319 
320  verticalLayout_2->addWidget(label_22, 0, Qt::AlignHCenter);
321 
322 
323  horizontalLayout_5->addLayout(verticalLayout_2);
324 
325  tabWidget->addTab(tab, QString());
326  tab_4 = new QWidget();
327  tab_4->setObjectName(QString::fromUtf8("tab_4"));
328  horizontalLayout_6 = new QHBoxLayout(tab_4);
329  horizontalLayout_6->setSpacing(6);
330  horizontalLayout_6->setContentsMargins(11, 11, 11, 11);
331  horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
332  verticalLayout = new QVBoxLayout();
333  verticalLayout->setSpacing(6);
334  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
335  label_18 = new QLabel(tab_4);
336  label_18->setObjectName(QString::fromUtf8("label_18"));
337 
338  verticalLayout->addWidget(label_18);
339 
340  commandLineEdit = new QLineEdit(tab_4);
341  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
342 
343  verticalLayout->addWidget(commandLineEdit);
344 
345  label_19 = new QLabel(tab_4);
346  label_19->setObjectName(QString::fromUtf8("label_19"));
347 
348  verticalLayout->addWidget(label_19);
349 
350  consoleEdit = new QPlainTextEdit(tab_4);
351  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
352 
353  verticalLayout->addWidget(consoleEdit);
354 
355 
356  horizontalLayout_6->addLayout(verticalLayout);
357 
358  tabWidget->addTab(tab_4, QString());
359 
360  horizontalLayout_3->addWidget(tabWidget);
361 
362 
363  gridLayout_5->addLayout(horizontalLayout_3, 0, 0, 1, 1);
364 
365  horizontalLayout = new QHBoxLayout();
366  horizontalLayout->setSpacing(6);
367  horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
368  pushButton_run = new QPushButton(centralWidget);
369  pushButton_run->setObjectName(QString::fromUtf8("pushButton_run"));
370 
371  horizontalLayout->addWidget(pushButton_run);
372 
373  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
374 
375  horizontalLayout->addItem(horizontalSpacer);
376 
377  pushButton_restore = new QPushButton(centralWidget);
378  pushButton_restore->setObjectName(QString::fromUtf8("pushButton_restore"));
379 
380  horizontalLayout->addWidget(pushButton_restore);
381 
382 
383  gridLayout_5->addLayout(horizontalLayout, 1, 0, 1, 1);
384 
385  MainWindow->setCentralWidget(centralWidget);
386  menuBar = new QMenuBar(MainWindow);
387  menuBar->setObjectName(QString::fromUtf8("menuBar"));
388  menuBar->setGeometry(QRect(0, 0, 703, 27));
389  menuFile = new QMenu(menuBar);
390  menuFile->setObjectName(QString::fromUtf8("menuFile"));
391  MainWindow->setMenuBar(menuBar);
392  mainToolBar = new QToolBar(MainWindow);
393  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
394  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
395  statusBar = new QStatusBar(MainWindow);
396  statusBar->setObjectName(QString::fromUtf8("statusBar"));
397  MainWindow->setStatusBar(statusBar);
398  QWidget::setTabOrder(input, toolButton_input);
399  QWidget::setTabOrder(toolButton_input, bndnodata);
400  QWidget::setTabOrder(bndnodata, srcnodata);
401  QWidget::setTabOrder(srcnodata, sample);
402  QWidget::setTabOrder(sample, toolButton_sample);
403  QWidget::setTabOrder(toolButton_sample, output);
404  QWidget::setTabOrder(output, toolButton_output);
405  QWidget::setTabOrder(toolButton_output, f);
406  QWidget::setTabOrder(f, polygon);
407  QWidget::setTabOrder(polygon, rule);
408  QWidget::setTabOrder(rule, bname);
409  QWidget::setTabOrder(bname, cname);
410  QWidget::setTabOrder(cname, nclass);
411  QWidget::setTabOrder(nclass, toolButton_createTable);
412  QWidget::setTabOrder(toolButton_createTable, threshold);
413  QWidget::setTabOrder(threshold, pushButton_run);
414  QWidget::setTabOrder(pushButton_run, pushButton_restore);
415  QWidget::setTabOrder(pushButton_restore, tabWidget);
416  QWidget::setTabOrder(tabWidget, tableView_labels);
417  QWidget::setTabOrder(tableView_labels, commandLineEdit);
418  QWidget::setTabOrder(commandLineEdit, consoleEdit);
419 
420  menuBar->addAction(menuFile->menuAction());
421  menuFile->addAction(actionInput);
422  menuFile->addAction(actionMask);
423  menuFile->addAction(actionSample);
424  menuFile->addAction(actionOutput);
425 
426  retranslateUi(MainWindow);
427 
428  tabWidget->setCurrentIndex(0);
429 
430 
431  QMetaObject::connectSlotsByName(MainWindow);
432  } // setupUi
433 
434  void retranslateUi(QMainWindow *MainWindow)
435  {
436  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkextract_gui", 0, QApplication::UnicodeUTF8));
437  actionInput->setText(QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
438  actionSample->setText(QApplication::translate("MainWindow", "Sample", 0, QApplication::UnicodeUTF8));
439  actionMask->setText(QApplication::translate("MainWindow", "Mask", 0, QApplication::UnicodeUTF8));
440  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
441 #ifndef QT_NO_TOOLTIP
442  label_14->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>invalid value(s) for input image</p></body></html>", 0, QApplication::UnicodeUTF8));
443 #endif // QT_NO_TOOLTIP
444  label_14->setText(QApplication::translate("MainWindow", "srcnodata", 0, QApplication::UnicodeUTF8));
445 #ifndef QT_NO_TOOLTIP
446  label_13->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Band(s) in input image to check if pixel is valid (used for srcnodata)</p></body></html>", 0, QApplication::UnicodeUTF8));
447 #endif // QT_NO_TOOLTIP
448  label_13->setText(QApplication::translate("MainWindow", "bndnodata", 0, QApplication::UnicodeUTF8));
449  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
450 #ifndef QT_NO_TOOLTIP
451  label_16->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>OGR supported vector format</p></body></html>", 0, QApplication::UnicodeUTF8));
452 #endif // QT_NO_TOOLTIP
453  label_16->setText(QApplication::translate("MainWindow", "format", 0, QApplication::UnicodeUTF8));
454 #ifndef QT_NO_TOOLTIP
455  label_15->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output will contain sample features with input band information included</p></body></html>", 0, QApplication::UnicodeUTF8));
456 #endif // QT_NO_TOOLTIP
457  label_15->setText(QApplication::translate("MainWindow", "Output data", 0, QApplication::UnicodeUTF8));
458 #ifndef QT_NO_TOOLTIP
459  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Raster input dataset containing band information</p></body></html>", 0, QApplication::UnicodeUTF8));
460 #endif // QT_NO_TOOLTIP
461  label_3->setText(QApplication::translate("MainWindow", "Input data", 0, QApplication::UnicodeUTF8));
462 #ifndef QT_NO_TOOLTIP
463  label_23->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>OGR vector file with features to be extracted from input data. Output will contain features with input band information included. Sample image can also be GDAL raster dataset.</p></body></html>", 0, QApplication::UnicodeUTF8));
464 #endif // QT_NO_TOOLTIP
465  label_23->setText(QApplication::translate("MainWindow", "Sample image", 0, QApplication::UnicodeUTF8));
466  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
467  toolButton_sample->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
468 #ifndef QT_NO_TOOLTIP
469  polygon->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Keep output features as polygons (only if input vector are polygons as well)</p></body></html>", 0, QApplication::UnicodeUTF8));
470 #endif // QT_NO_TOOLTIP
471  polygon->setText(QApplication::translate("MainWindow", "polygons", 0, QApplication::UnicodeUTF8));
472  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Input/Output", 0, QApplication::UnicodeUTF8));
473 #ifndef QT_NO_TOOLTIP
474  label_20->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Prepare a table with class names. To prepare the table, first enter the number of classes and then press the button '-&gt;'. </p><p>Prepare a class table only in two cases:</p><p>1) The sample is a raster file and you want to select a subset of classes, with each a defined threshold (in percentage). A threshold of 50 means you want half of the pixels to be selected.</p><p>2) The sample is a vector file and the extraction rule is either 'proportion' or 'maxvote'. For 'proportion', define only the clas(ses) for which you want to calculate the proportion (e.g. proportion with respect to remaining classes). For 'maxvote', define all the (e.g. land cover) classes in the input raster map</p><p>In all other cases, do NOT prepare a class table</p></body></html>", 0, QApplication::UnicodeUTF8));
475 #endif // QT_NO_TOOLTIP
476  label_20->setText(QApplication::translate("MainWindow", "prepare table ", 0, QApplication::UnicodeUTF8));
477 #ifndef QT_NO_TOOLTIP
478  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Rule how to extract the features from the input data</p></body></html>", 0, QApplication::UnicodeUTF8));
479 #endif // QT_NO_TOOLTIP
480  label_4->setText(QApplication::translate("MainWindow", "extraction rule", 0, QApplication::UnicodeUTF8));
481  label_21->setText(QApplication::translate("MainWindow", "# classes", 0, QApplication::UnicodeUTF8));
482 #ifndef QT_NO_TOOLTIP
483  toolButton_createTable->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Prepare a table with class names. To prepare the table, first enter the number of classes and then press the button '-&gt;'. </p><p>Prepare a class table only in two cases:</p><p>1) The sample is a raster file and you want to select a subset of classes, with each a defined threshold (in percentage). A threshold of 50 means you want half of the pixels to be selected.</p><p>2) The sample is a vector file and the extraction rule is either 'proportion' or 'maxvote'. For 'proportion', define only the clas(ses) for which you want to calculate the proportion (e.g. proportion with respect to remaining classes). For 'maxvote', define all the (e.g. land cover) classes in the input raster map</p><p>In all other cases, do NOT prepare a class table</p></body></html>", 0, QApplication::UnicodeUTF8));
484 #endif // QT_NO_TOOLTIP
485  toolButton_createTable->setText(QApplication::translate("MainWindow", "->", 0, QApplication::UnicodeUTF8));
486 #ifndef QT_NO_TOOLTIP
487  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>For single band input data, this extra attribute name will correspond to the raster values. For multi-band input data, multiple attributes with this prefix will be added (e.g. B0, B1, B2, etc.)</p></body></html>", 0, QApplication::UnicodeUTF8));
488 #endif // QT_NO_TOOLTIP
489  label_2->setText(QApplication::translate("MainWindow", "attribute (prefix) name for raster info", 0, QApplication::UnicodeUTF8));
490 #ifndef QT_NO_TOOLTIP
491  label->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Threshold value for selection process. Select this percentage of the raster pixels (if sample is a raster dataset) or this percentage of the features in the vector file (if sample is a vector file). In case the sample is a land cover raster dataset, you can also define a threshold for each land cover class individually by preparing the table on the right.</p></body></html>", 0, QApplication::UnicodeUTF8));
492 #endif // QT_NO_TOOLTIP
493  label->setText(QApplication::translate("MainWindow", "Single threshold", 0, QApplication::UnicodeUTF8));
494  label_5->setText(QApplication::translate("MainWindow", "attribute for class output", 0, QApplication::UnicodeUTF8));
495  label_17->setText(QApplication::translate("MainWindow", "class name-threshold (%) pairs", 0, QApplication::UnicodeUTF8));
496  label_22->setText(QApplication::translate("MainWindow", "replace label names with\n"
497 " the labels in your training\n"
498 " vector file", 0, QApplication::UnicodeUTF8));
499  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Extract", 0, QApplication::UnicodeUTF8));
500  label_18->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
501  label_19->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
502  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
503  pushButton_run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
504  pushButton_restore->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
505  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
506  } // retranslateUi
507 
508 };
509 
510 namespace Ui {
511  class MainWindow: public Ui_MainWindow {};
512 } // namespace Ui
513 
514 QT_END_NAMESPACE
515 
516 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/classLastReturnFilter__coll__graph.png0000644000113200011300000000521612616110567021342 00000000000000‰PNG  IHDR}p¼|è¬bKGDÿÿÿ ½§“ CIDATxœíkLÙÇOi™b…J+¬ŠJAIŒÆGâ#Ñ>«Q#`D]ßUã V‚‰1jP¾(– j´䵺%ë‹ 6qázu/²øˆµŠPÚék:s?ÌÍܱ-Ð)-Ǻç÷œžÎ9ç?¿¡‡é0EQ1ìÀðy‡òäNKwuu}üøÑGQü‘Hëþòܼwvvâ8>jÔ(Ž©~p,‹V«õ¡wÀ¨Q£¦M›ÆµÕMggçË—/95Aó;w8 ïp@Þáà}ïmmm<ÏeÁåb^犸Ùm[[›·B²á¼?ã>¡¡¡Gõ]ÿ444Lž<™]#´··Ï;÷óçÏÖª?|è=<<üÔ©S¾ë߉DáPé€$É/_¾ [¤ðáüîðé¾qã†L&“H$ééé8޳—¬®®ž5k–H$ŠŒŒdLUUU͘1#(((::úúõëÎ}:{8/0þ|³yl6›R©;v¬T*U*•6›nòàÁƒ¨¨¨úúú!­ÿÀP\hiiiiix™×¯_ÓÝ:–,YÒÚÚªÑhbbb233™wõz=†a»wïþðáƒZ­tvv ¡P¨R©t:]qq±@ 0 EõôôѱˀgÏžõ±°Ùlý%a¢ž>}:99ùýû÷ÍÍͳgÏfR­ZµêáǃðúõëAµtttÔÖÖr29|Þ›››énݺ5yòdæ]‹ÅòêÕ+ƒÁ`·Û=zD¯jwww```^^Þׯ_I’ìëë³Ûí­†UUUƒz‹‹ÓéttùÞ½{3gÎtˆê;ï÷ɾ ×–©Ç0¬µµU.—Ï™3çêÕ«teXXXmm­F£?~üâÅ‹?~0HTAkÖ¬4ÒÛ·o###éŸåË—¿yó†IèÁ rbø¼Ó¿J€ÖÖÖ‰'2õ&“iãÆJ¥²©©©  €©$I²¬¬¬»»[¡P¬]»¶»»Ûë‘ÂÃÙ­õõëWFC×z},†Ï{FFF[[ÛÓ§O³³³wîÜÉÔ[,«ÕŠa˜ÉdÊÉÉôõõñx¼+VTTTèõz«Õ(‰½½½—.]¢²Ëœ 'n@RRRVVÖ»wïš››årù… †¸Žà4+ e~/))™4i’T*ÍÈȰX,ì©öܹsb±x„ ›7o–J¥EݺuK&“awç·ÎÊÀÕDìœÄf³-\¸088˜^@¯×ïÚµ+,,l̘1©©©F£Ñá€Ënñ`~çQ\Î'xñâv€>ï~t|È;w8 ïp@ÞြÃy‡çãïf³ºäóØ}¸y êêêêëëã:Œ×!Iª  11qê¸q!°³@PP§å¹y—Éd2™ŒS¡ÑüÝÐðëÔ©Ñ?ÿ;‹'øëüþË/ôO‚ agñ¿ônµ••ÿôöâuuÿÇüÒûü…ãŸPYÙ;Ž'ø¥÷ŠŠF>?@dMM³Éd…ˆ3þçÝh´üþ{ AØé— qï·sq¿üÏ;[: €WQñ'Ä<žáÞ+*þdŸCdmí_z½ b$ð3ïÝÝÆººV»ý›}GŠ¢~û­V$Ïð3ïÕÕÿv®¤(ª¬ÌϦ?ó^^þÔùÂ$Ii4wtôB‰äþäýãÇžÆÆw$éâñ|~@U•‹Âw‹?y¯ªzÖßÉa¯¨ð§/P><Ûëà¸52òÿ—p –  @à¿:Þ»ˆa8àvþÌwÅO?R©v¬[7vOð§yæGy‡òäÈ;w8 ïp@ÞြÃy‡òäÈ;w8 ïp@ÞြÃy‡òäÈ;w8 ïp@ÞြÃy‡òäÈ;w8 ïp@ÞြC‚}óÔúúz Ã`'r¡0* @;…»(•J¶êo®oÒjµV«•¾92‹”••½}û–]ãâº2N÷¹E¸ý<6h~‡òäÈ;<¹^;!!A­V7nèÃ'$$0e Ãbcc<3ôžÝ”A­Voݺµ¶¶V«ÕÒŸfîëäu:ݾ}ûîܹÃÔœ?>22€ã¸Z­>~üøµk×ú{ –ssÏ`eàóù›7oöÅX.nï$IêõzvMhh¨X,ˆÅâ}ûö%&&ööö†††ºÙÜ3˜AÙ¤¦¦úb,—xm~òäÉÞ½{åryrròÍ›7éʆ†…B±bÅŠ-[¶Ü½{°ÿ~@RR’ËNø|¾@ 9r$ý’ •J•˜˜˜˜˜¨R©‚`7×jµÌŒÁ”éBSSSJJÊóçÏîß¿¿cÇŽuëÖ•”” ŸÝCTç0cqÒåï8Ž;v,66V­V§§§õôô˜ÍæÜÜÜõë×—””lÛ¶íÌ™3f³™~BSee%ÓÖl6›L&“ÉôåË—âââåË—3O*//×ét………gÏžmjjºråŠss—”––fffÒOꪯ¯¿páBZZZaa!sgcfP»Ýî܉ÃXÎaœÇrïÌ3†K¥R¡P(•JF£‘ÏçSe2™0 “ËåñññB¡Ð¹íž={˜òˆ#.^¼È¼¬©©ÉÏÏ‹ÅR©4--M¥R­^½Ú<©©©ÑÑÑtyýúõÁÁÁ+W®ÌËËÓëõ!!!ƒNž<5pŸý…aå>Þñ.>|ø——g2™˜-’ŸŸ_^^~åÊ•)S¦lÙ²eÞ¼yÎm™]#‹Årùòå3gÎ0ϯúôéSrr2³$3ÿ8ãp7¶Äððp:¡ËA´ZíÀëØ_˜A7˜K¼ãÝb±äæææææ.X°Àf³ÕÔÔЕ$IæææñàÁƒìììÛ·oЉP(”ËåÕÕÕEÑû3£GÎÏϧ —гÛí|>ßáQ¶lËÞzªqa¶¨›x8¿÷ôôt³°ÙlA«ÕJO|8Žóx<¥RYWWg4m6›@ `æ“ÉõíGމã8óî¢E‹ŠŠŠ:::ÚÛÛ9Âl6zàà`ÀÝ»wqtÆ÷˜AÃx†‡Þ8Ì"888==ýĉÛ·oˆˆXºté‘#G0 ËÊÊ*,,ܰaCYYYNN†aÓ§Og`ÙH$‘HÄì½) ‘H´wïÞC‡Éd²´´4vóÑ£G+Š‚‚z?ʳ‡¨Îa†Òù7÷¹*--MIIñõWµ Ç—H$¥¥¥L :>äÈ;w8 ïp@ÞြÃÁÅwÜÇŽ›öööeË–±k¾ñ>oÞ¼M›6¹<(Š ÑÑÑ7nd×øñ}™ý4¿Ãy‡òäÿ3v©Â9»ÅIEND®B`‚pktools-2.6.6/doc/html/classONE__CLASS__Q-members.html0000644000113200011300000001377112647637662017360 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ONE_CLASS_Q Member List

This is the complete list of members for ONE_CLASS_Q, including all inherited members.

get_Q(int i, int len) const (defined in ONE_CLASS_Q)ONE_CLASS_Qinlinevirtual
get_QD() const (defined in ONE_CLASS_Q)ONE_CLASS_Qinlinevirtual
k_function(const svm_node *x, const svm_node *y, const svm_parameter &param) (defined in Kernel)Kernelstatic
Kernel(int l, svm_node *const *x, const svm_parameter &param) (defined in Kernel)Kernel
kernel_function (defined in Kernel)Kernelprotected
ONE_CLASS_Q(const svm_problem &prob, const svm_parameter &param) (defined in ONE_CLASS_Q)ONE_CLASS_Qinline
swap_index(int i, int j) const (defined in ONE_CLASS_Q)ONE_CLASS_Qinlinevirtual
~Kernel() (defined in Kernel)Kernelvirtual
~ONE_CLASS_Q() (defined in ONE_CLASS_Q)ONE_CLASS_Qinline
~QMatrix() (defined in QMatrix)QMatrixinlinevirtual
pktools-2.6.6/doc/html/ImgReaderGdal_8cc_source.html0000644000113200011300000016070312647637662017320 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgReaderGdal.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgReaderGdal.cc
1 /**********************************************************************
2 ImgReaderGdal.cc: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "ImgReaderGdal.h"
21 #include <assert.h>
22 #include <sstream>
23 #include <iostream>
24 #include <gsl/gsl_cdf.h>
25 
26 ImgReaderGdal::ImgReaderGdal(void){};
27 
28 ImgReaderGdal::~ImgReaderGdal(void)
29 {
30  // delete m_gds;
31 // GDALDumpOpenDatasets(stderr);
32 // GDALDestroyDriverManager();//could be used by other objects...
33 }
34 
35 //--------------------------------------------------------------------------
36 void ImgReaderGdal::open(const std::string& filename, const GDALAccess& readMode)
37 {
38  m_filename = filename;
39  setCodec(readMode);
40 }
41 
42 void ImgReaderGdal::close(void)
43 {
44  ImgRasterGdal::close();
45 }
46 
47 void ImgReaderGdal::setCodec(const GDALAccess& readMode)
48 {
49  GDALAllRegister();
50  m_gds = (GDALDataset *) GDALOpen(m_filename.c_str(), readMode );
51  if(m_gds == NULL){
52  std::string errorString="FileOpenError";
53  throw(errorString);
54  }
55  m_ncol= m_gds->GetRasterXSize();
56  m_nrow= m_gds->GetRasterYSize();
57  m_nband= m_gds->GetRasterCount();
58  // m_isGeoRef=( static_cast<std::string>(m_gds->GetProjectionRef()) != "" );
59  // m_magic_x=magicX;
60  // m_magic_y=magicY;
61  double adfGeoTransform[6];
62  m_gds->GetGeoTransform( adfGeoTransform );
63  // if( m_gds->GetGeoTransform( adfGeoTransform ) == CE_None ){
64  m_gt[0]=adfGeoTransform[0];
65  m_gt[1]=adfGeoTransform[1];
66  m_gt[2]=adfGeoTransform[2];
67  m_gt[3]=adfGeoTransform[3];
68  m_gt[4]=adfGeoTransform[4];
69  m_gt[5]=adfGeoTransform[5];
70  // }
71  // else{
72  // m_gt[0]=0;
73  // m_gt[1]=1;
74  // m_gt[2]=0;
75  // m_gt[3]=0;
76  // m_gt[4]=0;
77  // m_gt[5]=1;
78  // }
79 }
80 
81 
82 double ImgReaderGdal::getMin(int& x, int& y, int band) const{
83  double minValue=0;
84  std::vector<double> lineBuffer(nrOfCol());
85  bool isValid=false;
86  for(int irow=0;irow<nrOfRow();++irow){
87  readData(lineBuffer,GDT_Float64,irow,band);
88  for(int icol=0;icol<nrOfCol();++icol){
89  if(isNoData(lineBuffer[icol]))
90  continue;
91  if(isValid){
92  if(lineBuffer[icol]<minValue){
93  y=irow;
94  x=icol;
95  minValue=lineBuffer[icol];
96  }
97  }
98  else{
99  y=irow;
100  x=icol;
101  minValue=lineBuffer[icol];
102  isValid=true;
103  }
104  }
105  }
106  if(isValid)
107  return minValue;
108  else
109  throw(static_cast<std::string>("Warning: not initialized"));
110 }
111 
112 double ImgReaderGdal::getMax(int& x, int& y, int band) const{
113  double maxValue=0;
114  std::vector<double> lineBuffer(nrOfCol());
115  bool isValid=false;
116  for(int irow=0;irow<nrOfRow();++irow){
117  readData(lineBuffer,GDT_Float64,irow,band);
118  for(int icol=0;icol<nrOfCol();++icol){
119  if(isNoData(lineBuffer[icol]))
120  continue;
121  if(isValid){
122  if(lineBuffer[icol]>maxValue){
123  y=irow;
124  x=icol;
125  maxValue=lineBuffer[icol];
126  }
127  }
128  else{
129  y=irow;
130  x=icol;
131  maxValue=lineBuffer[icol];
132  isValid=true;
133  }
134  }
135  }
136  if(isValid)
137  return maxValue;
138  else
139  throw(static_cast<std::string>("Warning: not initialized"));
140 }
141 
142 void ImgReaderGdal::getMinMax(int startCol, int endCol, int startRow, int endRow, int band, double& minValue, double& maxValue) const
143 {
144  bool isConstraint=(maxValue>minValue);
145  double minConstraint=minValue;
146  double maxConstraint=maxValue;
147  std::vector<double> lineBuffer(endCol-startCol+1);
148  bool isValid=false;
149  assert(endRow<nrOfRow());
150  for(int irow=startCol;irow<endRow+1;++irow){
151  readData(lineBuffer,GDT_Float64,startCol,endCol,irow,band);
152  for(int icol=0;icol<lineBuffer.size();++icol){
153  if(isNoData(lineBuffer[icol]))
154  continue;
155  if(isValid){
156  if(isConstraint){
157  if(lineBuffer[icol]<minConstraint)
158  continue;
159  if(lineBuffer[icol]>maxConstraint)
160  continue;
161  }
162  if(lineBuffer[icol]<minValue)
163  minValue=lineBuffer[icol];
164  if(lineBuffer[icol]>maxValue)
165  maxValue=lineBuffer[icol];
166  }
167  else{
168  if(isConstraint){
169  if(lineBuffer[icol]<minConstraint)
170  continue;
171  if(lineBuffer[icol]>maxConstraint)
172  continue;
173  }
174  minValue=lineBuffer[icol];
175  maxValue=lineBuffer[icol];
176  isValid=true;
177  }
178  }
179  }
180  if(!isValid)
181  throw(static_cast<std::string>("Warning: not initialized"));
182 }
183 
184 void ImgReaderGdal::getMinMax(double& minValue, double& maxValue, int band) const
185 {
186  bool isConstraint=(maxValue>minValue);
187  double minConstraint=minValue;
188  double maxConstraint=maxValue;
189  std::vector<double> lineBuffer(nrOfCol());
190  bool isValid=false;
191  for(int irow=0;irow<nrOfRow();++irow){
192  readData(lineBuffer,GDT_Float64,irow,band);
193  for(int icol=0;icol<nrOfCol();++icol){
194  if(isNoData(lineBuffer[icol]))
195  continue;
196  if(isValid){
197  if(isConstraint){
198  if(lineBuffer[icol]<minConstraint)
199  continue;
200  if(lineBuffer[icol]>maxConstraint)
201  continue;
202  }
203  if(lineBuffer[icol]<minValue)
204  minValue=lineBuffer[icol];
205  if(lineBuffer[icol]>maxValue)
206  maxValue=lineBuffer[icol];
207  }
208  else{
209  if(isConstraint){
210  if(lineBuffer[icol]<minConstraint)
211  continue;
212  if(lineBuffer[icol]>maxConstraint)
213  continue;
214  }
215  minValue=lineBuffer[icol];
216  maxValue=lineBuffer[icol];
217  isValid=true;
218  }
219  }
220  }
221  if(!isValid)
222  throw(static_cast<std::string>("Warning: not initialized"));
223 }
224 
225 double ImgReaderGdal::getHistogram(std::vector<double>& histvector, double& min, double& max, unsigned int& nbin, int theBand, bool kde){
226  double minValue=0;
227  double maxValue=0;
228 
229  if(min>=max)
230  getMinMax(minValue,maxValue,theBand);
231  else{
232  minValue=min;
233  maxValue=max;
234  }
235  if(min<max&&min>minValue)
236  minValue=min;
237  if(min<max&&max<maxValue)
238  maxValue=max;
239  min=minValue;
240  max=maxValue;
241 
242  double sigma=0;
243  if(kde){
244  double meanValue=0;
245  double stdDev=0;
246  GDALProgressFunc pfnProgress;
247  void* pProgressData;
248  GDALRasterBand* rasterBand;
249  rasterBand=getRasterBand(theBand);
250  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev,pfnProgress,pProgressData);
251  //rest minvalue and MaxValue as ComputeStatistics does not account for nodata, scale and offset
252  minValue=min;
253  maxValue=max;
254 
255  if(m_scale.size()>theBand){
256  stdDev*=m_scale[theBand];
257  }
258  sigma=1.06*stdDev*pow(getNvalid(theBand),-0.2);
259  }
260 
261  double scale=0;
262  if(maxValue>minValue){
263  if(nbin==0)
264  nbin=maxValue-minValue+1;
265  scale=static_cast<double>(nbin-1)/(maxValue-minValue);
266  }
267  else
268  nbin=1;
269  assert(nbin>0);
270  if(histvector.size()!=nbin){
271  histvector.resize(nbin);
272  for(int i=0;i<nbin;histvector[i++]=0);
273  }
274  double nvalid=0;
275  unsigned long int nsample=0;
276  unsigned long int ninvalid=0;
277  std::vector<double> lineBuffer(nrOfCol());
278  for(int irow=0;irow<nrOfRow();++irow){
279  readData(lineBuffer,GDT_Float64,irow,theBand);
280  for(int icol=0;icol<nrOfCol();++icol){
281  if(isNoData(lineBuffer[icol]))
282  ++ninvalid;
283  else if(lineBuffer[icol]>maxValue)
284  ++ninvalid;
285  else if(lineBuffer[icol]<minValue)
286  ++ninvalid;
287  else if(nbin==1)
288  ++histvector[0];
289  else{//scale to [0:nbin]
290  if(sigma>0){
291  //create kde for Gaussian basis function
292  //todo: speed up by calculating first and last bin with non-zero contriubtion...
293  //todo: calculate real surface below pdf by using gsl_cdf_gaussian_P(x-mean+binsize,sigma)-gsl_cdf_gaussian_P(x-mean,sigma)
294  //hiero
295  for(int ibin=0;ibin<nbin;++ibin){
296  double icenter=minValue+static_cast<double>(maxValue-minValue)*(ibin+0.5)/nbin;
297  double thePdf=gsl_ran_gaussian_pdf(lineBuffer[icol]-icenter, sigma);
298  histvector[ibin]+=thePdf;
299  nvalid+=thePdf;
300  }
301  }
302  else{
303  int theBin=static_cast<unsigned long int>(scale*(lineBuffer[icol]-minValue));
304  assert(theBin>=0);
305  assert(theBin<nbin);
306  ++histvector[theBin];
307  ++nvalid;
308  }
309  // else if(lineBuffer[icol]==maxValue)
310  // ++histvector[nbin-1];
311  // else
312  // ++histvector[static_cast<int>(static_cast<double>(lineBuffer[icol]-minValue)/(maxValue-minValue)*(nbin-1))];
313  }
314  }
315  }
316  // unsigned long int nvalid=nrOfCol()*nrOfRow()-ninvalid;
317  return nvalid;
318 }
319 
320 void ImgReaderGdal::getRange(std::vector<short>& range, int band) const
321 {
322  std::vector<short> lineBuffer(nrOfCol());
323  range.clear();
324  for(int irow=0;irow<nrOfRow();++irow){
325  readData(lineBuffer,GDT_Int16,irow,band);
326  for(int icol=0;icol<nrOfCol();++icol){
327  if(find(range.begin(),range.end(),lineBuffer[icol])==range.end())
328  range.push_back(lineBuffer[icol]);
329  }
330  }
331  sort(range.begin(),range.end());
332 }
333 
334 unsigned long int ImgReaderGdal::getNvalid(int band) const
335 {
336  unsigned long int nvalid=0;
337  if(m_noDataValues.size()){
338  std::vector<double> lineBuffer(nrOfCol());
339  for(int irow=0;irow<nrOfRow();++irow){
340  readData(lineBuffer,GDT_Float64,irow,band);
341  for(int icol=0;icol<nrOfCol();++icol){
342  if(isNoData(lineBuffer[icol]))
343  continue;
344  else
345  ++nvalid;
346  }
347  }
348  return nvalid;
349  }
350  else
351  return(nrOfCol()*nrOfRow());
352 }
353 
354 
355 void ImgReaderGdal::getRefPix(double& refX, double &refY, int band) const
356 {
357  std::vector<double> lineBuffer(nrOfCol());
358  double validCol=0;
359  double validRow=0;
360  int nvalidCol=0;
361  int nvalidRow=0;
362  for(int irow=0;irow<nrOfRow();++irow){
363  readData(lineBuffer,GDT_Float64,irow,band);
364  for(int icol=0;icol<nrOfCol();++icol){
365  // bool valid=(find(m_noDataValues.begin(),m_noDataValues.end(),lineBuffer[icol])==m_noDataValues.end());
366  // if(valid){
367  if(!isNoData(lineBuffer[icol])){
368  validCol+=icol+1;
369  ++nvalidCol;
370  validRow+=irow+1;
371  ++nvalidRow;
372  }
373  }
374  }
375  if(isGeoRef()){
376  //reference coordinate is lower left corner of pixel in center of gravity
377  //we need geo coordinates for exactly this location: validCol(Row)/nvalidCol(Row)-0.5
378  double cgravi=validCol/nvalidCol-0.5;
379  double cgravj=validRow/nvalidRow-0.5;
380  double refpixeli=floor(cgravi);
381  double refpixelj=ceil(cgravj-1);
382  //but image2geo provides location at center of pixel (shifted half pixel right down)
383  image2geo(refpixeli,refpixelj,refX,refY);
384  //refX and refY now refer to center of gravity pixel
385  refX-=0.5*getDeltaX();//shift to left corner
386  refY-=0.5*getDeltaY();//shift to lower left corner
387  }
388  else{
389  refX=floor(validCol/nvalidCol-0.5);//left corner
390  refY=floor(validRow/nvalidRow-0.5);//upper corner
391  //shift to lower left corner of pixel
392  refY+=1;
393 
394  }
395 }
pktools-2.6.6/doc/html/inherit_graph_41.md50000644000113200011300000000004012647437044015377 000000000000007b410ece4435bb5898273f794141ca12pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop__coll__graph.png0000644000113200011300000000642112616110567022571 00000000000000‰PNG  IHDRp¬0d5bKGDÿÿÿ ½§“ ÆIDATxœí}LSWÇÏ¥¥4¾´Šè`´åE ‹Y4ÙVþLÐøF„ea›ÂÞ´˜)é ›nPgVgèÜ”@ ›®S(<àP¡ÀŒ+hå¥Ú{Ÿ?Ξ›Z°Ð‡–rëùüAÎùõw~÷{ûåž{˽ô`AÄ‚ÇÍÙ³ùD OÔùD èÖ_6 8ŽÏšg___ooo+ 3ø¤Óé?~l½bŽètºþþþ9ù ·“$Ä4üùçŸ3æ ó5@>Qä5@>QGù¤V«1 ›ÏRŸþ9†a¹¹¹öÒð´á†©Õêÿ»ìÿǼO]]]Ç• ‚(--õ÷÷—Édöª¹lÙ²ÌÌLàHÙ³g^}ÂqüñãÇŽ¨ÜÚÚzçÎ’’’æææööv»Ôäp8ðètœìÙcŸàüPYY²|ùò÷Þ{o||œ|• ˆDFF>zôhÍš5€çž{¾488¸k×.‡Ãår8`0ž$‘Ëå/¾ø"“ÉäñxR©”Œ—––FEEÅÄÄ„††N=¤‚(,, c±Xëׯ¯ªª‚ÚÔmÁ}©­­õ÷÷?{ö,L³ ¸zõª@ ðôôÌÉÉ ÃΜ9³råJooïÜÜ\©TÈf³:4÷wøß}°‚F£Q(Ös:::±±±íííJ¥R deeÁ Žã¤Id&90999::º³³³¥¥%"""++kÚ 9jddÄÃã°°°¯¯¯¤¤„N§ŒŒãx`` D"!âÓO? 7FÄéÓ§ýüü~ùå—šš@ãOÛV\\\]]]ss3L³ xã7t:]yy9î`Û¶m:®¸¸°uëVN'‘HÈ+ܾ}ûöíÛÖsìæSKK ìÊd2@ƒ€{÷î™gÂöÄÄF#õUTT‚iƒä(­Vëîî~âĉþùÇñááa“ÉD„R©¤Óéðíhll´¶¶šo.""â‡~ Ÿ?`e[p_ÈáS}ºvíA&“ ÐÑу*• î—E&Xa6>Ùíü¡¡¡>„í[·n­[·.;;{j¾F£1™L|>vÁǧ ’C<== …R©är¹QQQ¿þú«›› ´´Ôh4r8 ÃV­Z°˜ú:;;#""ÈnXXØÓ»`}g}}}pë$K—.¸»»[´í‚Ý|‚¿t€ööv¸¹\^XXXZZªP(,òW¬XA£Ñººº`·³³ÓÏÏoÚ 9D¯×ã8~á­V»wïÞÍ›7kµZ“É$“Éòòò†ÿ‡H$’Éd„ÙóæC»sçÎÓÀöŒï¯½>rØ€õÃmöóžP(ìèè¸yófPPÐáÇÍç ±X¬×ëapxxÆ“’’¢££»ººZ[[ÃÃÃ>88X,ONN¾úê«K–,q­V»cÇ///Ÿýû÷ëõúiƒæ¥d2ŸÏg0¡¡¡•••A¤¦¦ÆÆÆšëÁqœÏçgff’M&S~~>ŸÏg³Ù6l¨¬¬ôööžq[dÛB6µ}²žã\äryss3Ù-++‹ŒŒt¢ æõ:b!ÓÒÒ²}ûv•J566¦T*:”’’âlQ¶1«û„Öa±X©©©s¯ã8222ÆÆÆâããx<Þž={¸à©`„Õç,ûûûÛÚÚÖ­[7_zžE൨õ›æÏļç Ÿ¨ò‰ Ÿ¨Á¬®÷z{{­ãYÆ`00™Lë93øäááa˜½î¼Í8N|ûmã–-!~~K­Å–-[f=aŸØlvTT”ýô8¥²óÆK!!¼ääuÎÖbO\íütñb#üi4ºÔ3ñ.åÓÄ„±¢¢ 044V_ÏÙrì‰KùtíÚݱ±qæVQÑèl9öÄ¥|*/o¤ÑÜF#þóÏ-zý„³Ù ×ñittüÊ•ÛF£ vÇÇ55mΕdG\Ç's“nnXyyƒõØ×ñ©¼¼Áü±£W(îêtz'J²#.â“V;Z_ßn2=q-NÄåË-Î’d_\ħªªÿL qá‚‹L}.âSYÙ­©7ðÚá9§366áãÃ"»##ãL¦;þï¯àü?ºêfxŽ…Šøúî/,Üù曑ÎbO\aÞ{@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>QäE0ÿÒù€€g˱þnn‹œ­b®0Œß~û´æ‰ÿϽÿ~BB\vá\Ž9ÒÓÓCv-ÿ:,, }«üBàÈ‘#æ]t~¢È'j€|¢È'jà(Ÿzzz„B¡³†Ï§ °ÀQ>-Y²dÛ¶m*þ â(ŸØlö¾}ûTüÄ6Ÿ‚¸xñâÎ;7nÜøî»ï655 …B‚ .]º´k×®M›6‰D¢ßÿ](šÏ7nÜØ»wolllRRÒÕ«W-jÂÌë×¯ïØ±cË–-'Ožœœœ4ßbAAAJJÊÐÐÉdúî»ïãããsrrFFFÈá*•*11±µµudd$77÷­·ÞJHH(((˜˜˜°^!˜ ¶}_Xuuõ÷ß/‰ÂÂÂÔj5\ÝüòåËR©4###88X­Vççç›1 YYYéé鯼òÊüñÅ_¼öÚkS—ýøé§Ÿrrr†‡‡;Æb±bbbà{$‘HT*U^^‹Å’Édõõõ999†?~üܹsiiipø?þøÑG}ùå—Z­¶°°P¯×=ztÑ¢E°”Eý;w.4Ö±íx*//OKK[»v­——×êÕ«ájŒ0øòË/³ÙìU«VíÞ½Û|Èää$Az½žÁ`lذA.—{xxL­üÎ;ïp¹Ü•+W¦¤¤ÔÔÔÀ`QQ‘L&‹Å, P]]½gϘ™™i¾Pܾ}û^zé%:^WW—žžîããÃãñvïÞM–š¶þ‚`Û|êë냋ØCx< ··700 ¾ð æC–.]šŸŸßÖÖ–ðÁ´´´L»˜3—Ë… ÿؾwï^ddä¹sç`W£Ñik×®%‡ûûûàºïäjØ~~~d©ië/(Ö±Í'‡ÓÙÙIvÿúë/ÀŠ+º»»Éàýû÷͇Œã8ž••%—Ë7nÜøÉ'Ÿ O­L®­þàÁ///ØÎÎΉDuuuMMM//¯¿ÿþ¾¤V«É·@§Óžžžnnn}}}0ØÛÛËáp¬Ô_P¬c›Oqqqׯ_×jµ7oÞ,**ÄÇÇK$’††N×ÔÔtöìYó#ðƒÖ×׎ŽNNNÒét8ïUWWŽŽ’i§Nêéé¹{÷nqqñ믿ƒL&óùçŸOJJÊËË›˜˜ˆ-..îîîîîîþꫯ4…<:. ¿þúë¾¾¾îîî’’xn˜¶¾ÓØ„m׉‰‰&“é›o¾äñx©©©G‡ s …‡‡§¥¥?~œÂ`0>þøc‰DÒßßïëë+‹ àĉ‘‘‘‹/†i111~ø¡Á`ˆŽŽNNN6Ÿ’’’jkkÏŸ?Ÿœœl0ôññ‰‹‹Û¼yóì‡/^¼Ø¦|[™±¾Ó̆9Í{Çaÿy1 Ÿ¨ò‰ Ÿ¨åõžT*­ªªrŠ„žðI$=xðÀYRæ­^½šìºà:(. :?Qä5@>Qä5ø/çW†IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask__coll__graph.md50000644000113200011300000000004012616110566025714 0000000000000049725e4acafdaf74f1676a3e738250f2pktools-2.6.6/doc/html/inherit_graph_20.map0000644000113200011300000000033612616110570015460 00000000000000 pktools-2.6.6/doc/html/inherit_graph_45.map0000644000113200011300000000046612647437044015507 00000000000000 pktools-2.6.6/doc/html/pksetmask.html0000644000113200011300000001303412647637662014550 00000000000000 pktools: pksetmask
pktools  2.6.6
Processing Kernel for geospatial data
pksetmask

program to apply mask image (set invalid values) to raster image

SYNOPSIS

Usage: pksetmask -i input -m mask [-m mask]* -o output

Options: [-mskband value]* [-msknodata value -nodata value]*

Advanced options: [–operator '<'|'='|'<'] [-ot type] [-of format] [-co option]* [-ct table]

Description

The utility pksetmask sets a mask provided with option -m to an input raster dataset. The default operator is '='. Values in the input raster data where the mask has a nodata value (set with the option -msknodata) will then be set to nodata (set with -nodata). Other operators are less than (–operator '<') and larger than (–operator '>').

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image
    m mask std::string Mask image(s)
    msknodata msknodata int 1 Mask value(s) where image has nodata. Use one value for each mask, or multiple values for a single mask.
    mskband mskband short 0 Mask band to read (0 indexed). Provide band for each mask.
    o output std::string Output mask file
    nodata nodata int 0 nodata value to put in image if not valid
    p operator char = Operator: < = > !. Use operator for each msknodata option
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate)
    co co std::string Creation option for output file. Multiple options can be specified.
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    Usage: pksetmask -i input -m mask [-m mask]* [-msknodata value -nodata value]* -o output

Examples

Some examples how to use pksetmask can be found here

FAQ

Frequently asked questions on pksetmask can be found here

pktools-2.6.6/doc/html/inherit_graph_5.map0000644000113200011300000000064612616110570015407 00000000000000 pktools-2.6.6/doc/html/md_examples_pkkalman.html0000644000113200011300000001327212647637662016726 00000000000000 pktools: examples_pkkalman
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkkalman

Examples of pkkalman

Assimilate fine spatial resolution NDVI time series acquired at (100 m) with median spatial resolution NDVI time series (300 m). Both time series consist of ten acquisitions in time (provided as a multi-band raster dataset), but fine spatial resolution data are sparse due to cloud coverage. Missing data are characterized by the option -obsnodata. Coarse spatial resolution data have occasional cloud cover too (-modnodata 255). The spatial coverage of the model must be at least the spatial coverage of the observation. Here, we run the kalman filter in forward mode only.

pkkalman -obs fine_10band.tif -mod coarse_10band.tif -obsnodata 255 -modnodata 255 -dir forward -ofw fine_filled.tif

Same as above, but run in forward, backward and smooth mode. Here we provide output filenames for the uncertainties of the predicted time series.

pkkalman -obs fine_10band.tif -mod coarse_10band.tif -obsnodata 255 -modnodata 255 -dir forward -ofw fine_forward_10band.tif -u_ofw fine_forward_uncert_10band.tif -dir backward -ofb fine_backward_10band.tif -u_obw fine_backward_uncert_10band.tif -dir smooth -ofw fine_smooth_10band.tif -u_ofb fine_smooth_uncert_10band.tif

If the observation time series is not complete, i.e., has less acquisitions than the model, we must explicitly provide the time sequence. Here, the observation at fine spatial resolution is based on two acquisitions only (at times 3 and 8). The model at coarse spatial resolution is based on ten acquisitions (at times 1-10).

pkkalman -obs fine_2band.tif -mod coarse_10band.tif -obsnodata 255 -modnodata 255 -dir forward -ofw fine_forward_10band.tif -tmod 1 -tmod 2 -tmod 3 -tmod 4 -tmod 5 -tmod 6 -tmod 7 -tmod 8 -tmod 9 -tmod 10 -tobs 3 -tobs 8

In the following example the missing data are not coded within the observations, but read from an external mask:

pkkalman -obs fine_10band.tif -mod coarse_10band.tif -obsmask finemask_10band.tif -modmask coarsemask_10band.tif -msknodata 1 -mskband 0 -dir forward -ofw fine_forward_10band.tif

The observations and model can be provided as multiple single-band raster datasets. The time sequence for the two observations and ten model inputs are explicitly provided via the options -tobs and tmod.

pkkalman -obs fine_1.tif -obs fine_2.tif -obsmask finemask_1.tif -obs finemask_2.tif -mod coarse_1.tif -mod coarse_2.tif -mod coarse_3.tif -mod coarse_4.tif -mod coarse_5.tif -mod coarse_6.tif -mod coarse_7.tif -mod coarse_8.tif -mod coarse_9.tif -mod coarse_10.tif -modmask coarsemask_1.tif -modmask coarsemask_2.tif -modmask coarsemask_3.tif -modmask coarsemask_4.tif -modmask coarsemask_5.tif -modmask coarsemask_6.tif -modmask coarsemask_7.tif -modmask coarsemask_8.tif -modmask coarsemask_9.tif -modmask coarsemask_10.tif -mskband 0 -msknodata 1 -dir forward -ofw fine_forward.tif -tmod 1 -tmod 2 -tmod 3 -tmod 4 -tmod 5 -tmod 6 -tmod 7 -tmod 8 -tmod 9 -tmod 10 -tobs 3 -tobs 8
pktools-2.6.6/doc/html/classSVR__Q-members.html0000644000113200011300000001353012647637662016316 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
SVR_Q Member List

This is the complete list of members for SVR_Q, including all inherited members.

get_Q(int i, int len) const (defined in SVR_Q)SVR_Qinlinevirtual
get_QD() const (defined in SVR_Q)SVR_Qinlinevirtual
k_function(const svm_node *x, const svm_node *y, const svm_parameter &param) (defined in Kernel)Kernelstatic
Kernel(int l, svm_node *const *x, const svm_parameter &param) (defined in Kernel)Kernel
kernel_function (defined in Kernel)Kernelprotected
SVR_Q(const svm_problem &prob, const svm_parameter &param) (defined in SVR_Q)SVR_Qinline
swap_index(int i, int j) const (defined in SVR_Q)SVR_Qinlinevirtual
~Kernel() (defined in Kernel)Kernelvirtual
~QMatrix() (defined in QMatrix)QMatrixinlinevirtual
~SVR_Q() (defined in SVR_Q)SVR_Qinline
pktools-2.6.6/doc/html/inherit_graph_36.map0000644000113200011300000000042412647437044015501 00000000000000 pktools-2.6.6/doc/html/pkcreatect.html0000644000113200011300000001163312647637662014676 00000000000000 pktools: pkcreatect
pktools  2.6.6
Processing Kernel for geospatial data
pkcreatect

program to create and import colour table to GTiff image

SYNOPSIS

Usage: pkcreatect -i input.txt -o output [-ct colortable | -min value -max value]

Options: [–grey] [-of GDALformat] [-co option]* [-d description]

Advanced options: [–legend filename [–dim cols –dim rows]]

Description

Utility to include a color table to a raster dataset. You can either define an existing color table (ASCII text file) with the option -ct or define a minimum (-min) and maximum (-max) value.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image file
    o output std::string Output image file
    l legend std::string Create legend as png file
    dim dim short 100 number of columns and rows in legend.
    min min double 0 minimum value
    max max double 100 maximum value
    g grey bool false grey scale
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    d description std::string Set image description
    of oformat std::string GTiff Output image format (see also gdal_translate).
    co co std::string Creation option for output file. Multiple options can be specified.
    Usage: pkcreatect -i input.txt -o output [-ct colortable | -min value -max value]

Examples

Some examples how to use pkcreatect can be found here

pktools-2.6.6/doc/html/inherit_graph_33.md50000644000113200011300000000004012647437044015400 000000000000004fe4b1e5d89e7090871b53cf53608b74pktools-2.6.6/doc/html/structsvm__problem__coll__graph.md50000644000113200011300000000004012616110566020662 0000000000000060b7301611be9431fad7f64c0d76eab8pktools-2.6.6/doc/html/ftv2doc.png0000644000113200011300000000135212647637661013734 00000000000000‰PNG  IHDRÚ}\ˆ±IDATxíMOS[…Ÿžsúa?-XZ(PD4‚ AWbu`b 77wäHFÆCËÔÂÿà/`vo„ˆAPòq‹P @ ­ûÝè980 îà¤+»§Ýy×^ïZï9SW¹\83g‰3'°Nâçl¹¸_b¯p ïåûÆVÜÖ¡€Ÿ×"¬Ö†X€d]Ðà3“ÉÃÄÌ™xŸ ßMàœ[<çSPkvc—hÈ'…™˜^Åm™hØ7 `Û™¦ èÀåráq›‘œ¾!daeKŸþÆÕ˜:Ì*³_דâèi?I–eP*B7Ÿ¿åô!¹Ýgr6Ër6oKbëþãðôrI”ËTˆüªŒ¨xóö=›ù¢&‰(e+ßóÄkýÇ`ëÁÜb.“¸ÐW×w0¥°jÑzN™¬|©WEãµ¢a¯6[öX†AkÓù*/œ¨‰€ÉY­ ÿV’§–u²jÂ>1W *½·°PGŽzÿ¨/Eg{ ŸÇâaoŠÁVú:è¿™¤1$ôR§W,–ªà¨@ŠË56¾ÀÔÜ-¾,mê¸Î/æè¹– òr5¥T*S(Vf8ö9u’ Õ£w›ùóa=Í<{Ò¡UŒ÷r¯+ÉådDÏF$è°…£é¿`zþ»ÎúöN‘µÜ®0Q3£~_^Ëóâ¯N=ˆvpTà±LžT}ˆîkq†Òm<¼ÎÓ?Zh¿X£ï_þÝ¥[)ƒ `gêÃa_Ô*äÔ2`'=õ´Fÿ2EâÁPú ÷»›l=8‹Wv°%THqÉ¿<"¤ïG¾ÆxH{#ÆÖ«aÔJÕÞ‡—m‹„ çñKsÿàñVŠØ¡°·MâÒ^ TÁ– Ý›r¥ß½ømüÿ_™?ªWİ÷#uIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass__coll__graph.map0000644000113200011300000000011312616110567023734 00000000000000 pktools-2.6.6/doc/html/pksensormodel_8h_source.html0000644000113200011300000004211212647637662017411 00000000000000 pktools: /home/kempenep/pktools/src/apps/pksensormodel.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksensormodel.h
1 /**********************************************************************
2 pksensormodel.h: program to calculate geometric position based on row (sensor), col (sensor), roll, pitch, yaw and lens coordinates
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _PKSENSORMODEL_H_
21 #define _PKSENSORMODEL_H_
22 #include <vector>
23 // #include <gslwrap/matrix_double.h>
24 #include <armadillo>
25 #include "models/SensorModel.h"
26 
27 double objFunction(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data);
28 
29 class DataModel{
30  public:
31  DataModel() : m_threshold(0){};
32  DataModel(const SensorModel::SensorModel& theModel) : m_model(theModel), m_threshold(0){};
33  ~DataModel(){};
34  void setModel(const SensorModel::SensorModel& theModel){m_model=theModel;};
35  const SensorModel::SensorModel& getModel() const {return m_model;};
36  int getSize() const{return m_posGCP.size();};
37  void setThreshold(double theThreshold){m_threshold=theThreshold;};
38  double getThreshold(){return m_threshold;};
39  int erase(int index){
40  m_attPlatform.erase(m_attPlatform.begin()+index);
41  m_posPlatform.erase(m_posPlatform.begin()+index);
42  m_posGCP.erase(m_posGCP.begin()+index);
43  m_row.erase(m_row.begin()+index);
44  m_col.erase(m_col.begin()+index);
45  };
46  int pushAttPlatform(const arma::vec& atp){m_attPlatform.push_back(atp); return m_attPlatform.size();};
47  int pushPosPlatform(const arma::vec& ppl){m_posPlatform.push_back(ppl); return m_posPlatform.size();};
48  int pushPosGCP(const arma::vec& pgcp){m_posGCP.push_back(pgcp); return m_posGCP.size();};
49  int pushRow(int r){m_row.push_back(r); return m_row.size();};
50  int pushCol(int c){m_col.push_back(c); return m_col.size();};
51  arma::vec getPosPlatform(int index) const{assert(index>=0);assert(index<m_posPlatform.size());return(m_posPlatform[index]);};
52  arma::vec getAttPlatform(int index) const{assert(index>=0);assert(index<m_attPlatform.size());return(m_attPlatform[index]);};
53  arma::vec getPosGCP(int index) const{assert(index>=0);assert(index<m_posGCP.size());return(m_posGCP[index]);};
54  arma::vec getPos(int index) const{
55  assert(index>=0);
56  assert(index<m_posPlatform.size());
57  assert(index<m_attPlatform.size());
58  assert(index<m_row.size());
59  assert(index<m_col.size());
60  assert(index<m_posGCP.size());
61  return(m_model.getPos(m_posPlatform[index],m_attPlatform[index],m_row[index],m_col[index],m_posGCP[index][2]));
62  };
63  double getDistGeo(int index) const{assert(index>=0);assert(index<m_posGCP.size());return(m_model.getDistGeo(m_posGCP[index],getPos(index)));};
64  int getRow(int index) const{assert(index>=0);assert(index<m_row.size());return(m_row[index]);};
65  int getCol(int index) const{assert(index>=0);assert(index<m_col.size());return(m_col[index]);};
66  double getHeight(int index) const{assert(index>=0);assert(index<m_posGCP.size());return(m_posGCP[index][2]);};
67  void setBoresightAtt(const arma::vec& bc_att){
68  m_model.setBoresightAtt(bc_att);
69  // for(int index=0;index<m_attPlatform.size();++index)
70  // m_attPlatform[index]+=bc_att;
71  };
72  private:
73  SensorModel::SensorModel m_model;
74  vector<arma::vec> m_posPlatform;
75  vector<arma::vec> m_posGCP;
76  vector<arma::vec> m_attPlatform;
77  vector<int> m_row;
78  vector<int> m_col;
79  double m_threshold;
80 };
81 
82 #endif //_PKSENSORMODEL_H_
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract__inherit__graph.png0000644000113200011300000001042712616110567026575 00000000000000‰PNG  IHDRÛp—XmbKGDÿÿÿ ½§“ÌIDATxœíÝyLTWûðïQ„FA—¶ö%–¦©Qª%®ÔвX¬A«E¤.…¦¬Qˆm© V(Á¢mƒ¯@µ*u^µnlmdG² Ë̜߆ûc`†Eä0Ï'™„{Ͻçî;wpÿþ}ÄÄÄ   =Ðñ„B!÷T]sŽ42líˤ³gÏbÊ”)011Á¶mÛÐÒÒ¢pc ~~~˜9s&ž={†wÞy0nÜ8î˜ÚÚZ¬[·B¡ðóóCsssmeddà7Þ€¾¾>¬­­§Ðž˜˜ˆ9sæ`þüù°³³SùÓ1†ˆˆL›6 †††xÿý÷qîÜ9nI¨ªžöçãâÅ‹˜8q"Nž<É£lΙ™ ‘H„1cÆ $$„Û/pâÄ L:cÇŽÅÁƒ+++aÿþý=¿@ÃîÞ½ËîÞ½Ûëã æääÄ=zÄrss™H$bAAA\›\.g~~~læÌ™ìÙ³g çuäîîÎæÍ›ÇŠ‹‹ÙíÛ·ÙŒ3XPPP·mûihh`zzz,""‚UVV²˜˜¦££ÃcŒÉårfeeÅ"##cŒíÝ»—MŸ>½Ë\c,**Š™››³ß~û‰ÅbváÂ&‰¸öžêY¸p!ËÊÊbÜ9Êæ €-Y²„ÕÕÕ±ÔÔT€{ް5kÖ°ºº:ͰU«V±ºº:©plodgg³ªªª^?ˆÖè°Ý¾}›Û—””ÄD"׿ïïϰ‡v9¯]kk+ÓÖÖVûÌ™3L$uÛÖ±Ÿêêj6bÄvøðaVSSÃär9«¯¯g2™Œ1ÆXnn.ÓÑÑá¾AoݺŰ;wît©iÆŒìÇT˜kBBЫzÚŸŽ}ª [NNcŒ1™LưÂÂB®-//{~”m·ÛÃ)l¹ŒlgkkË}mgg‡²²2nûƘ;w.‚ƒƒUž_UU™LnŸH$BYYY·m3ÙÙÙÈÍÍ………æÌ™ƒË—/CKëÅK“˜˜©T ¡P@{{{Pº”,..ÆŒ3öM›6­ÇZ;>½5~üxàêìhôèÑ€#F(ÝÖT¶ÂÂBîëGqß@À‹ë¨ˆˆ$&&";;[éù¦¦¦ÐÖÖFII ·¯¸¸æææÝ¶u$‘H —Ë‘œœŒêêjlܸK—.Euu5d2’’’Šúúzî±sçN$%%uúD KKKüõ×_ ûîß¿ßc­íú†þõÈp¤ÑaÛ¾};ŠŠŠpãÆ ìÙ³\Û¨Q£0eÊÀÇÇGáÆFCC€ßœ®®®Ø¶mJKKq÷î]ìÛ·îîîݶu$àää„ÔÔTÔÕÕ¡µµ#FŒÀÈ‘#qùòe<}úîîî000ànnn(,,DAAB_[·n…¿¿?233ñüùsdee!(( ×õ¨Ò>gÒê^Ⱦ /{ÍÍ,--™P(d¾¾¾L"‘t¹F‘H$lòäÉ,00µµµ±÷Þ{píÕÕÕÌÓÓ“3333¶cÇ&‘Hºmëþø?ñþD@===u—ñJ ‹[ÿšdÏž38yò2ÒÒ|áà`­îrHïÑ­ÿ¡D*•#-í& -í–š«!}EaB~ÿýêê$€ÔÔ<´µÉÔ\é ÛræL´µµMM-ÈÉy æŠH_P؆ˆ¦¦VüòËÿ •¾øi¦­-@j*-%‡ Ûñßÿþ¥°l”Jåøí·;hlléæ,2˜P؆ˆ””›è|§_*•!3ó/å'A‡Â6ÔÖ6!;û^|UG¤¦ÞTKM¤ï(lCÀ¯¿ÞVº_.—ã÷ߢ¦¦‘çŠÈË ° ÉÉ7!—«~ïÁ¹sÿã±ò²(lƒÜ“'ÿâÏ?KT~^ c ))7x®Š¼ Û —‘QmmÕ/“\Îpóæ?¨¬¬å±*ò2(lƒ\jê-îwkª0ddÐRr°ïúδ´33#n[*•£¹¹ Šï„§ß· ~ô®ÿ!æçŸ àãó**ÂÔ] éz×?!|¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !|aüñÇLWW— Ç |hidzzÕ^=T?&MšÔ9VŒ1vºËÿÔ.//Gkk+;7BzpïÞ=$''+mSùìçÎ;Põ¢‘èšžPØá …žPØá‰ÚÂV^^GGÇAß'cðQ÷` )óTEma300Àš5kx¯²²Ë–-ãmþøcÀòå˹cpðàA,[¶ ~ø!Ž;†ÖÖÖÛ:èº@*•"""...pqqADD¤R)®^½Š•+W¢¾¾pñâExzz¢¹¹¹Ë|ÛÇÏË˃««+îܹƒk×®aÓ¦MX°`V¬X„„€L&Cll,\]]áììŒ444€ÒçQçù2ú¶óçÏãÔ©SðòòB\\Ö®]‹À/¿ü‚¸¸8lݺ pwwGxxx—>š››ggg$&&ÂÓÓ‡Bss³ÊqÓÓÓ‚àà`üùçŸÜ¼x!###‘——‡ÐÐPáûᅵ9s†;îèÑ£‹ÅˆˆˆÀ×_7nà§Ÿ~ê±Ïº %%•••ˆŒŒÄ‘#G——‡ØØX¼ûî»°··Gxx8jjj޽{÷B___é|àôéÓ€¹¹9>ÿüsØÚÚ">>[¶lATTjkk‘’’‚K—.!$$aaaxüø1âãã@e¿š:ϾèwØRSSáããƒÙ³gÃØØðòòRh›5kŒŒŒ`ooõë×w飭­ Œ1H$èêêbÁ‚ÈÈÈ€žžžÊq·lÙ L:^^^¸pá×vüøq$%%!00†††JÏ—J¥ÈÊÊ‚¯¯/ÌÌÌ`mmõë×ãÂ… ݶ©£î_ýÛ·o‡‰‰ ¬­­áííëׯ|}}‘——???,[¶ vvv*ǀ͛7ã­·Þ‚¡¡!bbb°mÛ6ÃÄÄÐØØˆóçÏcÆ °¶¶†••vïÞéÓ§wÛ¯¦Î³/T¾]«·*++!‰öY[[***`ee¥Ð6iÒ¤.}Œ=aaaHIIAll,&Ož 777888¨ׂûzâĉ‹ÅÜöÇ1sæLÄÇÇ# @éù555Ëå?~<·ÏÜÜb±¸Û6uÔýäɬX±B¡ŸQ£Fxq£iÉ’%øá‡päÈ•ãvtttPVV†Ã‡C"‘ÀÖÖ–;¦ªªJ¡NKKKXZZöØ·&γ/úý“M(¢¸¸Xaßßÿ 055Eii©BÛ?ÿüÓ¥––Èår!##‹-ž={¸5º2eeeÜ×?†±±1·Œ;w"++ ùùùJÏ3f ´´´PYYÉí«¨¨€P(ì¶Mu!>>ÙÙÙÈÎÎFFF·Ìyúô)ÒÒÒ`ooÏí뎎ŽW{PPV¯^ãÇã“O>áŽ166Æ“'O¸í¢¢"nyÕ[š2ϾèwØ.\ˆcÇŽáÊ•+¨®®Æõë×qüøq€³³3"##qóæMÔÕÕ!??'Ož„@ PèC `×®]¸téÑÖÖn9vþüy466*œóÝwß¡¼¼<@tt4>øà®M__&L€››BCCnlH$/^ GGG|óÍ7¨¬¬Dii)bbb0þünÛÔQ÷ìÙ³…ªª*”””Àßßééé`ŒáСCX¾|9öïß[·náêÕ« ãµÏ·³¶¶6H¥Rèèè µµ±±±€¦¦&899!::¥¥¥(--ÅÑ£GQUU¥²_M™gõ;l®®®pqqAxx8<<>>صkfÍšÅõÓ]ŸuÀÆ1räHlÚ´ ;vì€ ¼½½‘žžŽÚÚZ¬Y³£GÆŽ;Šúúz¥óíÈÀÀ[¶lÁ°víZŒ7óæÍƒ¿¿?ÜÝÝ1kÖ,ìÚµ ¾¾¾055å^SeýjÊ<ûKÀcwœ>}®®®ÈÎÎ~éNËËËáááàà`˜˜˜ÀÆÆ†k»téâââÕ¯¾ûSŸ: ÕºûJSæ©JNN¾øâ tŠ$è/µKJJðÕW_¡°°---¸wïNœ8ŋ䰄 Jý¾ÙÕ«W£¹¹ûöíCmm-ÌḬ̀páB,]ºô¥û5jT¿ÎW—¡Zw_iÊ<_Æ€,# ÑTj[FBþ…žPØá …ž¨¼éççÇg„ 555*Ûº„ÍÁÁ«W¯†L&Т®œ•îïrëŸ2 èÖ?!|¡°Â !<¡°“ÿêó®Üóü‘IEND®B`‚pktools-2.6.6/doc/html/classconfusionmatrix_1_1ConfusionMatrix-members.html0000644000113200011300000004336312647637662024175 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
confusionmatrix::ConfusionMatrix Member List

This is the complete list of members for confusionmatrix::ConfusionMatrix, including all inherited members.

clearResults() (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
ConfusionMatrix() (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
ConfusionMatrix(short nclass) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
ConfusionMatrix(const std::vector< std::string > &classNames) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
ConfusionMatrix(const ConfusionMatrix &cm) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
getClass(int iclass) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
getClassIndex(std::string className) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
getClassNames() const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
getFormat() const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
getFormat(const std::string theFormat) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinlinestatic
incrementResult(const std::string &theRef, const std::string &theClass, double theIncrement) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
kappa() const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
nClasses() const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
nClassified(const std::string &theRef) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
nReference(const std::string &theRef) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
nReference() const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
oa(double *se95=NULL) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
oa_pct(double *se95=NULL) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
operator*(double weight) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
operator*=(double weight) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
operator+(const ConfusionMatrix &cm) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
operator+=(const ConfusionMatrix &cm) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
operator<< (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixfriend
operator=(const ConfusionMatrix &cm) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
pa(const std::string &theClass, double *se95=NULL) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
pa_pct(const std::string &theClass, double *se95=NULL) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
pushBackClassName(const std::string &className, bool doSort=false) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
reportSE95(bool doReport) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
resize(short nclass) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
setClassNames(const std::vector< std::string > &classNames, bool doSort=false) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
setFormat(const CM_FORMAT &theFormat) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
setFormat(const std::string theFormat) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
setResult(const std::string &theRef, const std::string &theClass, double theResult) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
setResults(const Vector2d< double > &theResults) (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
size() const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrixinline
sortClassNames() (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
ua(const std::string &theClass, double *se95=NULL) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
ua_pct(const std::string &theClass, double *se95=NULL) const (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
~ConfusionMatrix() (defined in confusionmatrix::ConfusionMatrix)confusionmatrix::ConfusionMatrix
pktools-2.6.6/doc/html/classImgWriterGdal__coll__graph.map0000644000113200011300000000051512647437044020566 00000000000000 pktools-2.6.6/doc/html/classImgWriterGdal__inherit__graph.map0000644000113200011300000000043412647437044021277 00000000000000 pktools-2.6.6/doc/html/inherit_graph_22.md50000644000113200011300000000004012647437044015376 00000000000000d6e93105bd541f3f440ea5342855f537pktools-2.6.6/doc/html/classBadConversion__inherit__graph.map0000644000113200011300000000032612616110567021324 00000000000000 pktools-2.6.6/doc/html/ImgUpdaterGdal_8h_source.html0000644000113200011300000002334512647637662017364 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgUpdaterGdal.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgUpdaterGdal.h
1 /**********************************************************************
2 ImgUpdaterGdal.h: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGUPDATERGDAL_H_
21 #define _IMGUPDATERGDAL_H_
22 
23 #include "ImgReaderGdal.h"
24 #include "ImgWriterGdal.h"
25 
26 //--------------------------------------------------------------------------
27 class ImgUpdaterGdal : public ImgReaderGdal, public ImgWriterGdal
28 {
29 public:
30  ImgUpdaterGdal(void);
31  ImgUpdaterGdal(const std::string& filename, const GDALAccess& readMode=GA_Update);
32  ~ImgUpdaterGdal(void);
33  void open(const std::string& filename, const GDALAccess& readMode=GA_Update);
34  void close(void);
35 
36 protected:
37 };
38 
39 #endif // _IMGUPDATERGDAL_H_
pktools-2.6.6/doc/html/classMainWindow__inherit__graph.map0000644000113200011300000000005712616110567020645 00000000000000 pktools-2.6.6/doc/html/pkfilterascii.html0000644000113200011300000001426712647637662015410 00000000000000 pktools: pkfilterascii
pktools  2.6.6
Processing Kernel for geospatial data
pkfilterascii

program to filter data in an ASCII file

SYNOPSIS

Usage: pkfilterascii -i input.txt [-ic column]*

Options: [-f filter] [-dz value] [-t]

Advanced options: [-tapz value]* [-fwhm value]* [-srf filename]* [-win col] [-wout value]* [-interp type] [-wt type] [-wf family] [-cut threshold]

Description

The utility pkfilterascii filters the columns defined by the option -ic. A varietey of filters can be selected from with the option -f. The kernel size is defined with the option -dz. Alternatively, you can define your own filter tap values (use the option -tapz for each tap). In case of spectral filtering, define the full width half max values (-fwhm value) or spectral response functions in ASCII files (-srf filename).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input ASCII file
    o output std::string Output ASCII file
    ic inputCols int input columns (e.g., for three dimensional input data in first three columns use: -ic 0 -ic 1 -ic 2
    f filter std::string filter function (to be implemented: dwt, dwti,dwt_cut)
    dz dz int 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
    tapz tapz double taps used for spectral filtering
    fwhm fwhm double list of full width half to apply spectral filtering (-fwhm band1 -fwhm band2 ...)
    srf srf std::string list of ASCII files containing spectral response functions (two columns: wavelength response)
    win wavelengthIn int column number of input ASCII file containing wavelengths
    wout wavelengthOut double list of wavelengths in output spectrum (-wout band1 -wout band2 ...)
    interp interp std::string akima type of interpolation for spectral filtering (see http://www.gnu.org/software/gsl/manual/html_node/Interpolation-Types.html)
    t transpose bool false transpose output with samples in rows and wavelengths in cols
    wt wavelet std::string daubechies wavelet type: daubechies,daubechies_centered, haar, haar_centered, bspline, bspline_centered
    wf family int 4 wavelet family (vanishing moment, see also http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)
    cut cut double 0 threshold to cut dwt coefficients. Use 0 to keep all.
    Usage: pkfilterascii -i input.txt [-ic column]*
pktools-2.6.6/doc/html/inherit_graph_12.map0000644000113200011300000000031512616110570015456 00000000000000 pktools-2.6.6/doc/html/classOptFactory-members.html0000644000113200011300000000755412647637662017330 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
OptFactory Member List

This is the complete list of members for OptFactory, including all inherited members.

getOptimizer(const std::string &algorithmString, unsigned int npar) (defined in OptFactory)OptFactoryinlinestatic
OptFactory() (defined in OptFactory)OptFactoryinline
~OptFactory() (defined in OptFactory)OptFactoryinline
pktools-2.6.6/doc/html/inherit_graph_23.md50000644000113200011300000000004012647437044015377 000000000000003abc167c2529f40a3c3946792c422224pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random.html0000644000113200011300000002615712647637662024723 00000000000000 pktools: qgis.pkextract_random.pkextract_random Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkextract_random.pkextract_random Class Reference
Inheritance diagram for qgis.pkextract_random.pkextract_random:
Collaboration diagram for qgis.pkextract_random.pkextract_random:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
 
string RULE = "RULE"
 
string POLYGON = "POLYGON"
 
string BUFFER = "BUFFER"
 
string RANDOM = "RANDOM"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string EXTRA = 'EXTRA'
 
string FORMAT = "FORMAT"
 

Detailed Description

Definition at line 87 of file pkextract_random.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/pksvm.html0000644000113200011300000002644012647637662013713 00000000000000 pktools: pksvm
pktools  2.6.6
Processing Kernel for geospatial data
pksvm

classify raster image using Support Vector Machine

SYNOPSIS

Usage: pksvm -t training [-i input -o output] [-cv value]

Options: [-tln layer]* [-c name -r value]* [-of GDALformat|-f OGRformat] [-co NAME=VALUE]* [-ct filename] [-label attribute] [-prior value]* [-g gamma] [-cc cost] [-m filename [-msknodata value]*] [-nodata value]

Advanced options: [-b band] [-sband band -eband band]* [-bal size]* [-min] [-bag value] [-bs value] [-comb rule] [-cb filename] [-prob filename] [-pim priorimage] [–offset value] [–scale value] [-svmt type] [-kt type] [-kd value] [-c0 value] [-nu value] [-eloss value] [-cache value] [-etol value] [-shrink]

Description

The utility pksvm implements a support vector machine (SVM) to solve a supervised classification problem. The implementation is based on the open source C++ library libSVM (http://www.csie.ntu.edu.tw/~cjlin/libsvm). Both raster and vector files are supported as input. The output will contain the classification result, either in raster or vector format, corresponding to the format of the input. A training sample must be provided as an OGR vector dataset that contains the class labels and the features for each training point. The point locations are not considered in the training step. You can use the same training sample for classifying different images, provided the number of bands of the images are identical. Use the utility pkextract to create a suitable training sample, based on a sample of points or polygons. For raster output maps you can attach a color table using the option -ct.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    t training std::string Training vector file. A single vector 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)
    i input std::string input image
    o output std::string Output classification image
    cv cv unsigned short 0 N-fold cross validation mode
    cmf cmf std::string ascii Format for confusion matrix (ascii or latex)
    tln tln std::string Training layer name(s)
    c class std::string List of class names.
    r reclass short List of class values (use same order as in class opt).
    of oformat std::string GTiff Output image format (see also gdal_translate).
    f f std::string SQLite Output ogr format for active training sample
    co co std::string Creation option for output file. Multiple options can be specified.
    ct ct std::string Color table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)
    label label std::string label Attribute name for class label in training vector file.
    prior prior double 0 Prior probabilities for each class (e.g., -p 0.3 -p 0.3 -p 0.2 ). Used for input only (ignored for cross validation)
    g gamma float 1 Gamma in kernel function
    cc ccost float 1000 The parameter C of C_SVC, epsilon_SVR, and nu_SVR
    m mask std::string Only classify within specified mask (vector or raster). For raster mask, set nodata values with the option msknodata.
    msknodata msknodata short 0 Mask value(s) not to consider for classification. Values will be taken over in classification image.
    nodata nodata unsigned short 0 Nodata value to put where image is masked as nodata
    b band short Band index (starting from 0, either use band option or use start to end)
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    bal balance unsigned int 0 Balance the input data to this number of samples for each class
    min min int 0 If number of training pixels is less then min, do not take this class into account (0: consider all classes)
    bag bag unsigned short 1 Number of bootstrap aggregations
    bagsize bagsize int 100 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
    comb comb unsigned short 0 How to combine bootstrap aggregation classifiers (0: sum rule, 1: product rule, 2: max rule). Also used to aggregate classes with rc option.
    cb classbag std::string Output for each individual bootstrap aggregation
    prob prob std::string Probability image.
    pim priorimg std::string Prior probability image (multi-band img with band for each class
    offset offset double 0 Offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]
    scale scale double 0 Scale value for each spectral band input features: refl=(DN[band]-offset[band])/scaleband
    svmt svmtype std::string C_SVC Type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)
    kt kerneltype std::string radial Type of kernel function (linear,polynomial,radial,sigmoid)
    kd kd unsigned short 3 Degree in kernel function
    c0 coef0 float 0 Coef0 in kernel function
    nu nu float 0.5 The parameter nu of nu_SVC, one_class SVM, and nu_SVR
    eloss eloss float 0.1 The epsilon in loss function of epsilon_SVR
    cache cache int 100 Cache memory size in MB
    etol etol float 0.001 The tolerance of termination criterion
    shrink shrink bool false Whether to use the shrinking heuristics
    pe probest bool true Whether to train a SVC or SVR model for probability estimates
    entropy entropy std::string Entropy image (measure for uncertainty of classifier output
    active active std::string Ogr output for active training sample.
    na nactive unsigned int 1 Number of active training points
    random random bool true Randomize training data for balancing and bagging
    Usage: pksvm -t training [-i input -o output] [-cv value]

Examples

Some examples how to use pksvm can be found here

pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask__inherit__graph.map0000644000113200011300000000011312616110567024473 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass__inherit__graph.png0000644000113200011300000000674212616110567024472 00000000000000‰PNG  IHDR°p1=m½bKGDÿÿÿ ½§“ —IDATxœíLçÇŸƒRºEF­d…l,f™Ë¦Â@:ˆÙ˜£`1‹KÆØ¡û(™„fÑÅ–âw8B& ™?&–°L"l0)”mRË*B¡…¶wß?n»ôÊa_ŽãÇóúëîáy>ÏûŽw×öÊ!†älèYZ@! $ P E•Jåøø8•!O>ù¤ŸŸß‚—¥DµZÍf³ííí©(LLL¨Õêe#ÀÃÃËåRTòàÁƒÎÎN**Ãk („B !±„„èééAd1K}þùç‚äää,T†™†#ÒÓÓó¯Ë.&KHˆiQ©T‡ŠÊ†•••yzzÊåò…ª¹fÍšÔÔT@elªYêB (ú×_QQ¹£££«««¨¨¨­­­»»{Ajr8üxC]lª¡GüÐZ]]½qãF.—ûþûïOLL?Å0ìÈ‘#ÁÁÁCCC›7o<ýôÓø†‡‡8Àáp<<<Ž9b0fj$¨©©yî¹çX,–OII Ñ^VV¶mÛ¶ððð€€€© äR)ŸÏg³Ù¯½öÚ… ðsÁÔ¹ðm©««óôô}úÙgŸ]»vmNNNII‰···³³ó±cÇlGÿ 0 P(ƒƒƒ³tP*•€ˆˆˆîîîææf'‰ðFE ˆžÄÀ½{÷†……õöö¶··‰D¢i‰Q:ÎÞÞ^*• 1 N‡aŠ¢ÞÞÞ2™ ðO>ù$00Ð2†aîîî—.]Òh4?üðÇÃÛgš+**êÚµkmmmx7«Ø€7Þxcdd¤²²€o`Ïž=###………€·ÞzkddD&“fappP¡PÌû3袽½_•Ëå<oLIIܹsDz'¾<99ikkûË/¿à«ß~û-Ç›¶‘¥Õjíììrss>|ˆ¢èèè¨ÙlÆ0¬¹¹™Á`àûýçŸtttXNôÍ7ßKKK³Ì…o 1|ªõõõ†™Íf€R©Ä[[[ñí²ZÆ;ÌuBÐy A¼Ðßß/ß¼y3$$$;;{jÿÁÁA³Ùìë닯òx¼þþþi‰!... …¢¹¹ÙÃÃcÛ¶m?þø£  ¬¬Ìd2q8A6mÚ°:kôöö«|>¦Ä&̾±nnn|v'''€Õ2Ð)þgèîîÆ÷ ¦¦F*•–••) «þëÖ­³µµU©Tøjoo¯»»û´Ä½^¢hyy¹V«ßµk—V«5›Ír¹v.bÙ*6bNBP1õBQSSÓÖÖF¬VTTӘNJ•yQ¹”ioo‹‹kmmonn>vìXBBÝ¡ªn™6›- i™zޤ¤¤ŒGGGk4Ÿwß}w‰^(Œ‚/êÔ××óù|xÇuàwL…„„,xexÊ€€B@H@! $ T½Ê6™L‡èt:Š*S"„½½ý½{÷¨¨LW¯þß@sŽùÀb±¨(KÉËÎå…ÙŒ>ÿ| ½ý?66Ëä#(Ê€× ©©G«ÓjuËã>XJB€òòÃÆÎΦ¼ü&ÝYègµ a0kko›Lf£­­½m0éND3«]ˆk׺ ãµk]ôæ¡Õ.Dee q/‚ ••-ôæ¡U-ÄȈáêÕN³ÅWÍfôêÕΑÃì£V6«ZˆK—:P”ôªE±Ë—;èʳXÕBTT´X½ ƒaXEŪ>k¬^!4šÑÆF%Š¢–(Š56*5šQºRÑÎêâÂ…¶iß—DäÂ…Û‹Ÿg‰°z…8w®ÅêEÑÕüÕ*B­~ØÞ~w!ÀíÛwïÝ^üTKzn²¥¡!›ÛâoŠÅúûÛW666CC£nnkhËGðÓN ÿ ÉöÓ„~Vé)2P („B !…€€B@H@! $ P („B !…€€B@H@! $ P („B !…€€B@H@! $ P („B !…€€B@H@! $ 2–Ouõòò¢;=0ƒCw zذaƒ¥¤)„ È›o¾ÉçóiÌYL:;;ËËË-°þ§c|>ŸŠÇƒB– ðB !…€€B@HP%„Z­ ¥k8E¥m¢EË<ª„pttܳgEÅ!ÔA•ÎÎΤ¨8„:æ'†açÏŸß¿ÿŽ;Þ{ï½[·n…††böÝwß8p`çÎÉÉÉMMM¡¡¡–½ÆÆÆøøøˆˆ@påÊ«šxÏëׯïÛ·/&&æÄ‰F£ÑrÆS§N%$$ngOOOsss\\œe‘H$‰^~ùe£ÑxñâÅ™â1™Ì•šù±Ìï¢2**êÔ©Sׯ_×jµ7nÜÈÏÏDGGËd²–––‘‘‘[·n9s†xV.A£G644ŒFƒÊjkkÇÆÆˆn'OžT«Õ¿ýö[aaáöíÛñF‹õÌ3Ï‚¼¼¼ÉÉI«0[¶l)((T©T)))UUU………}}}}}}_~ùåàà e£Ñh2™ Æäädqq1`|||Úx+)ó|™ß"66Öl6õÕWÃÃÃ>>>B¡0333::Úl6K$’G&%%?~œÂd2?úè#™LöàÁ77·ŒŒ &“ ÈÍÍ vppÀ»…‡‡øá‡ƒ!,,lïÞ½Ä êêêJKK‰ŽòäÉÄÄDA¶nÝ* mll ÃÑ£G ÃæÍ›…B¡eGGÇC‡eff>ñÄ ,,,%%åüùóÓÆ[1™ç‹õýsÿø[­VÇÅÅeggs¹\â<ÒÐÐPRRRPP0¯" …b>±if9fž–úúúÏ>ûÌÒxcJ¥Reee)•ʉ‰‰ÎÎÎÓ§Oïܹóÿ/ ¡…x*ßÛo¿m0>ýôÓáááõë×GEEíÚµkîÃæÕ)°3Ï‘ÿë”YîPrÊ€¬$ P („„õE¥‹‹ ‹ÉÇU*ÕŒßËHNN¾{÷‚ÐItt´å*|<„¼†€€B@H@! $ ÿ'êM§ÖYàÑIEND®B`‚pktools-2.6.6/doc/html/tab_b.png0000644000113200011300000000025112647637661013431 00000000000000‰PNG  IHDR$ÇÇ[pIDATxíÝMƒ EáÇ»ÐÔ¸¸u`âÀ´V0РÆ}:t]DÁ²s¿ä®‚¶ýËu¥ø|’xùî½À>ÿ1»& mÄ8ÜSÙÑxÜLÀUûšÞ²ÄiE–ŠåOs„¢’nxàÒêÓKN²~jIEND®B`‚pktools-2.6.6/doc/html/pkstatprofile.html0000644000113200011300000001227712647637662015445 00000000000000 pktools: pkstatprofile
pktools  2.6.6
Processing Kernel for geospatial data
pkstatprofile

program to calculate statistics in temporal or spectral profile

SYNOPSIS

Usage: pkstatprofile -i input -o output [-f function]*

Options: [-nodata value]

Advanced options: check table

Description

This utility calculates statistics for a temporal (time series) or spectral profile

function description
mean calculate mean in window
median perform a median filter in spatial (dx, dy) or spectral/temporal (dz) domain
var calculate variance in window
stdev calculate standard deviation in window
min calculate minimum in window
max calculate maximum in window
sum calculate sum in window
mode calculate mode of all values
ismin 1 if value is minimum, else 0
ismax 1 if value is maximum, else 0
per calculate percentile in time series (provide percentage value as argument)
prop calculate proportion
nvalid report number of valid observations

Example: Calculate min and max NDVI in time series

pkstatprofile -i modis_ndvi_2010.tif -o modis_stats_2010.tif -f min -f max

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image file
    o output std::string Output image file
    f function std::string statistics function (see table)
    perc percentile double percentile value(s) for percentile function
    class class std::string class value(s) to use for mode, proportion
    nodata nodata double nodata value(s)
    Usage: pkstatprofile -i input -o ouptut [-f function]*
pktools-2.6.6/doc/html/classQMatrix__inherit__graph.md50000644000113200011300000000004012616110566020055 0000000000000016f1983d166214f64c8d7731777e3899pktools-2.6.6/doc/html/pktools_2pkgetmask_8py_source.html0000644000113200011300000010300612647637661020547 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkgetmask.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkgetmask.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkgetmask.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkgetmask(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  BAND = "BAND"
42  MIN = "MIN"
43  MAX = "MAX"
44  OPERATOR_OPTIONS = ["OR", "AND"]
45  OPERATOR = "OPERATOR"
46  DATA = "DATA"
47  NODATA = "NODATA"
48  OUTPUT = "OUTPUT"
49  RTYPE = 'RTYPE'
50  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
51  EXTRA = 'EXTRA'
52 
53  def cliName(self):
54  return "pkgetmask"
55 
56  def defineCharacteristics(self):
57  self.name = "create mask from raster dataset"
58  self.group = "[pktools] raster"
59  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
60  self.addParameter(ParameterString(self.BAND, "Band(s) used for mask (e.g., 0;1)","0"))
61  self.addParameter(ParameterString(self.MIN, "Minimum valid value (one value per band)","none"))
62  self.addParameter(ParameterString(self.MAX, "Maximum valid value (one value per band)","none"))
63  self.addParameter(ParameterSelection(self.OPERATOR,"getmask rule",self.OPERATOR_OPTIONS, 0))
64  self.addParameter(ParameterString(self.DATA, "write value(s) for valid pixels (e.g., 0;255)","1"))
65  self.addParameter(ParameterString(self.NODATA, "write value(s) for invalid pixels","0"))
66  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
67  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
68  self.addParameter(ParameterString(self.EXTRA,
69  'Additional parameters', '-of GTiff', optional=True))
70 
71  def processAlgorithm(self, progress):
72  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
73  commands = [cliPath]
74 
75  input=self.getParameterValue(self.INPUT)
76  commands.append('-i')
77  commands.append('"' + input + '"')
78 
79  band=self.getParameterValue(self.BAND)
80  bandValues = band.split(';')
81  for bandValue in bandValues:
82  commands.append('-band')
83  commands.append(bandValue)
84  min=self.getParameterValue(self.MIN)
85  if min != "none":
86  minValues = min.split(';')
87  for minValue in minValues:
88  commands.append('-min')
89  commands.append(minValue)
90  max=self.getParameterValue(self.MAX)
91  if max != "none":
92  maxValues = max.split(';')
93  for maxValue in maxValues:
94  commands.append('-max')
95  commands.append(maxValue)
96  commands.append("-p")
97  commands.append(self.OPERATOR_OPTIONS[self.getParameterValue(self.OPERATOR)])
98  data=self.getParameterValue(self.DATA)
99  if data != "none":
100  dataValues = data.split(';')
101  for dataValue in dataValues:
102  commands.append('-data')
103  commands.append(dataValue)
104  nodata=self.getParameterValue(self.NODATA)
105  if nodata != "none":
106  nodataValues = nodata.split(';')
107  for nodataValue in nodataValues:
108  commands.append('-nodata')
109  commands.append(nodataValue)
110  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
111  commands.append('-ot')
112  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
113  output=self.getOutputValue(self.OUTPUT)
114  if output != "":
115  commands.append("-o")
116  commands.append('"' + output + '"')
117 
118  data=self.getParameterValue(self.DATA)
119 
120  extra = str(self.getParameterValue(self.EXTRA))
121  if len(extra) > 0:
122  commands.append(extra)
123 
124  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/dir_e6df591b0639d4c4807ef64d058833e2_dep.md50000644000113200011300000000004012616110567020170 0000000000000024830e296d23aedfdd82882d134b036apktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm__coll__graph.png0000644000113200011300000000625312616110567022300 00000000000000‰PNG  IHDRp¬0d5bKGDÿÿÿ ½§“ `IDATxœí}LSWÇÏ¥µmP©†¢:´¼d!1Äe/ÁGxKýCE&›D4fËdN³M-fšÍàN¡¼…¬i#è°¨R«l`§¼=àP¨°h奅¶÷>œ=7µ”Jn©·žÏæœ_çw¿·ßÞso½—Œ €xîññ´Ä‚@>Ñä=@>Ѧó—M&“N§Ãq|iÔ¼°8Ix†OƒáÉ“'ÎK ‰Á`Y”OØØXŠ$!ðçŸ>3Ÿèò‰ Ÿèò‰¸Ë§{÷îa¶”¥¾þúk ÃŽ?N•†ù†cvïÞ½ÿ»ìÿÇ’O<Ï• ‚P(!!!J¥’ªš«V­:xð p§ì…³¤>á8þäÉwTîîî¾sçNEEEggg__%5y<<:Ý'{áPàœêêꢢ¢Ö¬YóÉ'ŸÌÌ̯±ÿþøøøÇ¿öÚk€—^z ¾466–““Ããñø|þþýûM&Ó|A•Jõꫯr8œððp¹\NÆ Ebbâ¦M›¢££çRA”””ÄÄÄøùù½ýöÛõõõpB›»-¸/jµ:$$¤ªª ¦ÙÉ444…ÂÕ«W;v F0 «¬¬\·n]@@ÀñãÇåryXX—Ë=|øðâßá÷Á ÃÃÃÆyŽN§$''÷õõiµZ¡PXPPƒ8Ž“&‘™äÀ¬¬¬¤¤¤þþþ®®®¸¸¸‚‚‡ArÔää$›Í.))yôèQEE“Éœœœ$Çñ°°0™LFÄW_}k+Œ ˆ²²²ààà_ýutt´±±Q(Âø|ÛJMM½zõjgg'L³“ x÷Ýw Cmm-î 33Ó`0”——¶nÝj0d2™à„Û·oß¾}Ûye>uuuÁ®R© …0xàÀ@oo¯m&lÏÎÎ2 Rß¹sç„B¡Ã 9J¯×/[¶ìĉÿüóŽãV«• ­VËd2áÛÑÖÖèîî¶Ý\\\ÜÏ?ÿL ®®®8ÙÜrø\Ÿ®]»F„Õjèt:loo‡ûe׆ NXˆO”Ÿ"""`#::úáǰ}ëÖ­7ÎͶZ­v…BáÇÉ!«W¯Öh4Z­–Ïç'&&þöÛo>>>…Ba±Xx<†aëׯØM}ýýýqqqd7&&f>ä.8ßÙ   Ü:ÉÊ•+Ë–-³kSe>Á ¯¯î@¥R•””( Fc—¿víZƒ100»ýýýÁÁÁƒä£ÑˆãøÙ³gõzýÎ;322ôz½ÕjU*•EEEÿ#??_©T6Ï„††ÚþÚ;wæÛÏ|©úÊáη…Ï{"‘H§Óݼy3""âÈ‘#¶s…T*ŒŒ40811ã‰$))i`` »»;66öÈ‘#ƒd)£ÑÈápjjjFGGKKK9ŽÑhÔh4 cxx˜ÔÓÚÚ hoo'ž:uŠÏç_¹råñãÇjµ:** Ã0çÛ"æÌ{¤l`3•›yonЮ=Kz~*// åñxü1i L0‘‘‘R©Ôl6¿ùæ›+V¬€q½^Ÿíïï¸oß>£Ñè0h[J©T ‹]WWGD^^^rr²­ÇÁÁƒÉV«õäÉ“€Ë妤¤ÔÕÕ«õ©kq‚ .]êò”$jñŸêëÿ37HÄÙ³^2õy‰O55·æÞðÄqB«í÷ˆ$jñŸ††ÆÚÚî㸃Ó †JåàP£Þà“JÕ9ß˵¶Ö¾ðRð‹Ç™žž ô#»““3Î2&óßàÒ?ºêžñ  ÚWR²ã½÷â=-„J¼aÞ{@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>ÑäM°ýÑùÐÐPOË¡6;ÄÇÇ×Ó* ‹Åúý÷ßIkžúûÜû÷ïoÙ².»ƒð,G$»öGƒ~UþyàèÑ£¶]t~¢È'z€|¢È'zà.ŸE"‘§†/ °Ã]>­X±"33ÓMÅ_@Üå—Ëݵk—›Š¿€¸æAçÏŸß±cGZZÚÞ½{;::D"A.\ÈÉÉIOOÏÏÏ¿qã†H$²7ZZZvîÜ™œœ,‘HìjÂÌæææìììÍ›7Ÿ:uÊl6Ûn±¸¸877w||Üa©C‡9s&›Í挌 ­V ‰D—/_Þ±c‡X,®®®nhhÈÌÌLOO¯¬¬|Þ,×|ºxñâ?þ˜››+—Ë?øà¸ºù¥K—ärùÞ½{«««³²²NŸ>m;Äd2ˆÅb…B‘ýÝwßÙ-Ùùå—_Ž;VXXøÇÀõ¢AÈd²ööö¢¢".—ë°TRRÒõë×á¯iݺu‹Íf'$$ÀámmmÅÅÅ»ví*++»qãFEEÅž={är¹Á`x8Ç5ŸjkkwïÞýÖ[oùûûoذ®Æƒ \.wýúõ~ø¡í³ÙL„Ñhd±X)))*•ŠÍfÏ­¼gÏ>Ÿ¿nݺÜÜÜÆÆF,--U*•R©ÔÏÏo¾R¯¿þºÁ`èíí¨Õê””ƒ‡oÛ¶Í××799 ‘H|}}SRRÏ¡ç¸æÓ£Gà"öððpÀÐÐPXX|å•Wl‡¬\¹òäÉ“===[¶lùôÓO»ºº.æÌçóa#$$dtt¶{{{ãããúé''¥Ølöo¼qýúu“ÉÔÒÒ߈¯¯/€ÉdÚµâqÎqÍ'×ßßOvÿþûoÀÚµkÿúë/2xÿþ}Û!3338ލTª´´´/¿üÒᧉ\[ýÁƒþþþ°]XX˜ŸŸõêÕŽŽ'¥àÌÓÜÜI¾Ý®âqÎqͧÔÔÔâââææf½^óæÍÒÒR€X,–Éd­­­ƒ¡£££ªªÊöˆÁ0ìóÏ?ojjššš2›ÍL&Î{/^œšš"Ó~øá‡ÁÁÁ»wï–——¿óÎ;0Èáp^~ùe‰DRTT4;;;_©„„„ÉÉɪªª´´´…ï‹Ç¸„k‡á¶mÛ¬VëéÓ§ÇÆÆÂÃÃóòò¾ùæ±X æݽ{÷÷ßOa±X_|ñ…L& ’J¥, pâĉøøøå˗ôM›6}öÙg𴜕•EÎ<‰D¢V««««srr–b2™‰‰‰jµÚ¥¥ª<.À%žúÝQ äRéÂïk nß¾½°°pÍš5›ššäryYY™KE4+²©Äã"‰”JåÖ­[a—‚ï¹ß~û­N§›™™éé马¬LOO_|Y„-üÞòûï¿o2™:466˜ššš‘‘±ðáË—/w)Ÿr<.`!,jÞC¸êç=Ä€|¢È'z€|¢ö×{r¹¼¾¾Þ#RNxʧüüüxJ –ˆˆˆ 6]/\Å+Aç'z€|¢È'z€|¢ÿT¾™oÉoIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_7.map0000644000113200011300000000031012616110570015375 00000000000000 pktools-2.6.6/doc/html/inherit_graph_35.png0000644000113200011300000000357312647437044015517 00000000000000‰PNG  IHDR°37“‚(bKGDÿÿÿ ½§“0IDATxœíœ_HSïÇß§ùçfEk¥[YÛt¦CÖ]‚ÐAº ºé¿…­ ‹0†Bå”.$"è¢.–$Q¸Rį(ñ¢›Qe…ätI®)mºšmŸïÍÏós›ÎéæÙž8çó9Ïó¼ÏÇ7ç<œóLŽˆ †HY–l F<03D 30CÔd„|>ÚÛÛñçÏŸdèa0f…çy:tYYYÁ ¡³³“°mKnëìì µ+…Ýÿýû`/'K Žão΄Í¢†˜!j˜¢†˜!j’fàÁÁAp·äûŒg Žã0888çxhÿéP£xIšW¯^úúú„çp8 •J6Þ\ Õ•èºDÓ"’f`©TŠË—/'l¼@ €_¿~%l¼¹ª+Ñu‰¦E Ämà@ €7n`ëÖ­X¹r%ÊËËÑÛÛ Žã@D0™L())Ann.vïÞîîná:ó1cµZQVVžç¡T*q÷îÝYÇ›ng±X Ñh “ÉpöìYüýû7è<"‚Á`€N§ƒÓéÄöíÛ6lÎGMM ¤R)  ƒð2Zn&sÕ‰P]Ñ¿éZ£¨„~Ù0›Í4K8"7oÞ$™LF]]]ôýûwzüø1) @­­­$—ËééÓ§4::JÏŸ?'µZMÈn· ãx<ÊÎÎ&“ÉD###tûömÊÈÈ Ç6Þt»ªª* ›ÍFjµšššš„\  ƒÁ@:ŽœNgP»™=z”*++ihhˆúúúH«ÕRSSSÔ\,º§¯3”™ñP]3Ó¡Fs™Íæðxh V—––Ò;w‚bmmm€´Z-Ý»w/(wÿþý0»\.ÊÌ̤«W¯ÒØØr»Ýä÷ûÃÆ›n××פY­V ¹ºº:@Ÿ>} k7Ïç#‰DB>|b]]]¤V«£æbѽNÕÍ•HŽ{ áp8 Óé‚beee€¡¡!hµÚ \IIIXkÖ¬Aoo/l6 vìØ—/_bÙ²Èò …ýââb  ǯ_¿ÆÎ;ÑÜܱýÏŸ?á÷û¡R©„˜Z­ÆððpÔ\¬º)ä“|èñ\IåÅCܽÈår¼{÷.(öñãG@AA°?MX^¯@>„ËåÂÉ“'±wï^¸\®ˆãÚíva``ùùù±Õj…ÉdB{{;z{{gm¿~ýzH$8!644¹\5‹îM›6…½.ëïïGFF6nÜñÚf#Uk7¡·äX§ÍÍÍ$“ÉèÑ£G422BOž<æÀׯ_'…BAÏž=#§ÓI===¤Ñhˆã¸ ÇŒ×ë%žç©££ƒFGG©¥¥…xž'¯×KDD­­­4>>NDÿÌíÚµ‹ìv;½zõŠ Éh4†=©¨¨ˆ¼^¯s»ÝBþÈ‘#TYYI‡ƒÞ¿O¥¥¥d4£æbÑm4I¥R‘Õj%‡ÃA/^¼ mÛ¶‘^¯4„êŠ4…HÕÍ,ÖØçóÑ¥K—hË–-”““CåååÂ<×ï÷Óµk×H¥RѪU«hÏž=d±Xhݺua…4›Í¤R©(++‹Š‹‹Éb±‰3Þºu‹ H*•RmmmÐ`¯×KEEEÔØØHSSSTQQA999BÞårѱcÇhíÚµ”——GçÎ )‹î©©)ºrå i4âyž”J%]¸p&&&‚Ι©+’SµFseÑ <Ó`µZéíÛ·A¹ŽŽÒétq÷͈L*Ö(’õCF__ª««ñæÍLNNÂf³¡¡¡§NZÌaiDØ‚ö…¤®®“““Ø·oFGG¡T*¡×ëqúôéy÷™››Wût jÄýïö,ðàÁŸ™™™X±bÅb^Bʱ¨k!R††äääÀ`0àëׯÈÏÏÇáÇqþüyáœÍ›7£¢¢yyyp»Ýûâymmm¨¯¯Ç·oß T*a6›Áó|".%e`k!¢€­…`¤$ÌÀ Qà Ì5ÌÀ Qà Ì5ÌÀ Qà Ì5?d´´´$Rƒ1/ ,—Ë!‘HÒæW­ q ‘HÂþm0Ë—8CL°90CÔ03D 30CÔdx˜l Æ|ùC'º4c×óIEND®B`‚pktools-2.6.6/doc/html/classSolver__inherit__graph.md50000644000113200011300000000004012616110566017742 000000000000006cc560af3cdb31cb392a6c822559375epktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask__inherit__graph.map0000644000113200011300000000013312616110567026551 00000000000000 pktools-2.6.6/doc/html/classImgReaderGdal__inherit__graph.map0000644000113200011300000000043412647437044021225 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid__inherit__graph.map0000644000113200011300000000013712616110567027017 00000000000000 pktools-2.6.6/doc/html/classSolver__NU__coll__graph.map0000644000113200011300000000036712616110567020077 00000000000000 pktools-2.6.6/doc/html/inherit_graph_32.map0000644000113200011300000000077412647437044015505 00000000000000 pktools-2.6.6/doc/html/pkcrop__gui_2main_8cc_source.html0000644000113200011300000001666612647637661020267 00000000000000 pktools: /home/kempenep/pktools/qt/pkcrop_gui/main.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
main.cc
1 /**********************************************************************
2 main.cc: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #include "mainwindow.h"
22 #include <QApplication>
23 
24 int main(int argc, char *argv[])
25 {
26  QApplication a(argc, argv);
27  MainWindow w;
28  w.show();
29 
30  return a.exec();
31 }
pktools-2.6.6/doc/html/classstatfactory_1_1StatFactory-members.html0000644000113200011300000011367512647637662022427 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
statfactory::StatFactory Member List

This is the complete list of members for statfactory::StatFactory, including all inherited members.

absmax(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
absmin(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
akima enum value (defined in statfactory::StatFactory)statfactory::StatFactory
akima_periodic enum value (defined in statfactory::StatFactory)statfactory::StatFactory
allocAcc(gsl_interp_accel *&acc) (defined in statfactory::StatFactory)statfactory::StatFactoryinlinestatic
cmoment(const std::vector< T > &v, int n) const (defined in statfactory::StatFactory)statfactory::StatFactory
correlation(const std::vector< T > &x, const std::vector< T > &y, int delay=0) const (defined in statfactory::StatFactory)statfactory::StatFactory
cross_correlation(const std::vector< T > &x, const std::vector< T > &y, int maxdelay, std::vector< T > &z) const (defined in statfactory::StatFactory)statfactory::StatFactory
cspline enum value (defined in statfactory::StatFactory)statfactory::StatFactory
cspline_periodic enum value (defined in statfactory::StatFactory)statfactory::StatFactory
cumulative(const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, std::vector< int > &output, int nbin, T &minimum, T &maximum) const (defined in statfactory::StatFactory)statfactory::StatFactory
cvrmse(const std::vector< T > &x, const std::vector< T > &y) const (defined in statfactory::StatFactory)statfactory::StatFactory
distribution(const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, std::vector< double > &output, int nbin, T &minimum, T &maximum, double sigma=0, const std::string &filename="") const (defined in statfactory::StatFactory)statfactory::StatFactory
distribution(const std::vector< T > &input, std::vector< double > &output, int nbin, double sigma=0, const std::string &filename="") const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
distribution2d(const std::vector< T > &inputX, const std::vector< T > &inputY, std::vector< std::vector< double > > &output, int nbin, T &minX, T &maxX, T &minY, T &maxY, double sigma=0, const std::string &filename="") const (defined in statfactory::StatFactory)statfactory::StatFactory
DISTRIBUTION_TYPE enum name (defined in statfactory::StatFactory)statfactory::StatFactory
eraseNoData(std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
evalSpline(gsl_spline *spline, double x, gsl_interp_accel *acc) (defined in statfactory::StatFactory)statfactory::StatFactoryinlinestatic
gaussian enum value (defined in statfactory::StatFactory)statfactory::StatFactory
getDistributionType(const std::string distributionType) (defined in statfactory::StatFactory)statfactory::StatFactoryinline
getInterpolationType(const std::string interpolationType) (defined in statfactory::StatFactory)statfactory::StatFactoryinline
getNodataValues(std::vector< double > &nodatav) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
getRandomGenerator(unsigned long int theSeed) (defined in statfactory::StatFactory)statfactory::StatFactoryinlinestatic
getRandomValue(const gsl_rng *r, const std::string type, double a=0, double b=1) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
getSpline(const std::string type, int size, gsl_spline *&spline) (defined in statfactory::StatFactory)statfactory::StatFactoryinlinestatic
gsl_covariance(const std::vector< T > &x, const std::vector< T > &y) const (defined in statfactory::StatFactory)statfactory::StatFactory
initSpline(gsl_spline *spline, const double *x, const double *y, int size) (defined in statfactory::StatFactory)statfactory::StatFactoryinlinestatic
interpolateDown(const std::vector< T > &input, std::vector< T > &output, int nbin) const (defined in statfactory::StatFactory)statfactory::StatFactory
interpolateDown(double *input, int dim, std::vector< T > &output, int nbin) (defined in statfactory::StatFactory)statfactory::StatFactory
interpolateNoData(const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::string &type, std::vector< T > &output, bool verbose=false) const (defined in statfactory::StatFactory)statfactory::StatFactory
interpolateUp(const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::vector< double > &wavelengthOut, const std::string &type, std::vector< T > &output, bool verbose=false) const (defined in statfactory::StatFactory)statfactory::StatFactory
interpolateUp(const std::vector< double > &wavelengthIn, const std::vector< std::vector< T > > &input, const std::vector< double > &wavelengthOut, const std::string &type, std::vector< std::vector< T > > &output, bool verbose=false) const (defined in statfactory::StatFactory)statfactory::StatFactory
interpolateUp(const std::vector< T > &input, std::vector< T > &output, int nbin) const (defined in statfactory::StatFactory)statfactory::StatFactory
interpolateUp(double *input, int dim, std::vector< T > &output, int nbin) (defined in statfactory::StatFactory)statfactory::StatFactory
INTERPOLATION_TYPE enum name (defined in statfactory::StatFactory)statfactory::StatFactory
isNoData(double value) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
kurtosis(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
linear enum value (defined in statfactory::StatFactory)statfactory::StatFactory
linear_regression(const std::vector< T > &x, const std::vector< T > &y, double &c0, double &c1) const (defined in statfactory::StatFactory)statfactory::StatFactory
linear_regression_err(const std::vector< T > &x, const std::vector< T > &y, double &c0, double &c1) const (defined in statfactory::StatFactory)statfactory::StatFactory
mean(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
meanVar(const std::vector< T > &v, double &m1, double &v1) const (defined in statfactory::StatFactory)statfactory::StatFactory
median(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
minmax(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T &theMin, T &theMax) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
moment(const std::vector< T > &v, int n) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymax(const typename std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymax(const typename std::vector< T > &v, T maxConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymax(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymax(const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymax(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T maxConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymax(const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end, T maxConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymax(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymax(const std::vector< T > &v, T maxConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymin(const typename std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymin(const typename std::vector< T > &v, T minConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymin(const typename std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymin(const typename std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymin(const typename std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T minConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymin(const typename std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end, T minConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactory
mymin(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymin(const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymin(const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T minConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymin(const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end, T minConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymin(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
mymin(const std::vector< T > &v, T minConstraint) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
nearUp(const std::vector< T > &input, std::vector< T > &output) const (defined in statfactory::StatFactory)statfactory::StatFactory
normalize(const std::vector< T > &input, std::vector< double > &output) const (defined in statfactory::StatFactory)statfactory::StatFactory
normalize_pct(std::vector< T > &input) const (defined in statfactory::StatFactory)statfactory::StatFactory
nrmse(const std::vector< T > &x, const std::vector< T > &y) const (defined in statfactory::StatFactory)statfactory::StatFactory
nvalid(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
percentile(const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, double percent, T minimum=0, T maximum=0) const (defined in statfactory::StatFactory)statfactory::StatFactory
percentiles(const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, std::vector< T > &output, int nbin, T &minimum, T &maximum, const std::string &filename="") const (defined in statfactory::StatFactory)statfactory::StatFactory
polynomial enum value (defined in statfactory::StatFactory)statfactory::StatFactory
pushNodDataValue(double noDataValue) (defined in statfactory::StatFactory)statfactory::StatFactoryinline
rmse(const std::vector< T > &x, const std::vector< T > &y) const (defined in statfactory::StatFactory)statfactory::StatFactory
scale2byte(const std::vector< T1 > &input, std::vector< T2 > &output, unsigned char lbound=0, unsigned char ubound=255) const (defined in statfactory::StatFactory)statfactory::StatFactory
setNoDataValues(std::vector< double > vnodata) (defined in statfactory::StatFactory)statfactory::StatFactoryinline
signature(const std::vector< T > &input, double &k, double &alpha, double &beta, double e) const (defined in statfactory::StatFactory)statfactory::StatFactory
signature(double m1, double m2, double &k, double &alpha, double &beta, double e) const (defined in statfactory::StatFactory)statfactory::StatFactory
skewness(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
StatFactory(void) (defined in statfactory::StatFactory)statfactory::StatFactoryinline
sum(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactoryinline
undefined enum value (defined in statfactory::StatFactory)statfactory::StatFactory
uniform enum value (defined in statfactory::StatFactory)statfactory::StatFactory
var(const std::vector< T > &v) const (defined in statfactory::StatFactory)statfactory::StatFactory
~StatFactory(void) (defined in statfactory::StatFactory)statfactory::StatFactoryinlinevirtual
pktools-2.6.6/doc/html/pksvm__gui_2mainwindow_8h_source.html0000644000113200011300000003266412647637661021217 00000000000000 pktools: /home/kempenep/pktools/qt/pksvm_gui/mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.h
1 /**********************************************************************
2 mainwindow.h: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef MAINWINDOW_H
21 #define MAINWINDOW_H
22 
23 #include <QMainWindow>
24 
25 namespace Ui {
26 class MainWindow;
27 }
28 
29 class MainWindow : public QMainWindow
30 {
31  Q_OBJECT
32 
33 public:
34  explicit MainWindow(QWidget *parent = 0);
35  ~MainWindow();
36 
37 private slots:
38  void on_actionInput_triggered();
39 
40  void on_actionTraining_triggered();
41 
42  void on_actionMask_triggered();
43 
44  void on_actionOutput_triggered();
45 
46  void on_toolButton_input_clicked();
47 
48  void on_toolButton_mask_clicked();
49 
50  void on_toolButton_output_clicked();
51 
52  void on_toolButton_training_clicked();
53 
54  void on_training_returnPressed();
55 
56  void on_pushButton_run_clicked();
57 
58  void on_pushButton_restore_clicked();
59 
60  void on_commandLinkButtonPrepareTable_clicked();
61 
62  void on_actionColor_table_triggered();
63 
64  void on_toolButton_ct_clicked();
65 
66 private:
67  void setClassTable(const QStringList &labels);
68  void setDefaults();
69 
70  Ui::MainWindow *ui;
71 // QString m_input;
72 // QString m_training;
73 // QString m_mask;
74 // QString m_output;
75 };
76 
77 #endif // MAINWINDOW_H
pktools-2.6.6/doc/html/classCostFactoryANN__inherit__graph.md50000644000113200011300000000004012616110566021265 0000000000000014378ff104c000911bb9b98090600132pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy__coll__graph.map0000644000113200011300000000014312616110567026511 00000000000000 pktools-2.6.6/doc/html/pkcrop_8py_source.html0000644000113200011300000010067612647637661016234 00000000000000 pktools: /home/kempenep/pktools/qgis/pkcrop.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcrop.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkcrop.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkcrop(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  DX = "DX"
43  DY = "DY"
44  PROJWIN = 'PROJWIN'
45  BAND = "BAND"
46  NODATA = "NODATA"
47  RESAMPLE_OPTIONS = ['near', 'bilinear']
48  RESAMPLE = "RESAMPLE"
49  RTYPE = 'RTYPE'
50  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
51  EXTRA = 'EXTRA'
52 
53  def cliName(self):
54  return "pkcrop"
55 
56  def defineCharacteristics(self):
57  self.name = "crop raster datasets"
58  self.group = "[pktools] raster"
59  self.addParameter(ParameterMultipleInput(self.INPUT, 'Input layer raster data set',ParameterMultipleInput.TYPE_RASTER))
60  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
61  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
62  self.addParameter(ParameterNumber(self.DX, "Output resolution in x (leave 0 for no change)",0.0,None,0.0))
63  self.addParameter(ParameterNumber(self.DY, "Output resolution in y (leave 0 for no change)",0.0,None,0.0))
64  self.addParameter(ParameterExtent(self.PROJWIN,
65  'Georeferenced boundingbox'))
66  self.addParameter(ParameterString(self.NODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
67  self.addParameter(ParameterString(self.BAND, "Band(s) in input image to crop, e.g., 0;1;2 (leave empty to retain all bands)",'', optional=True))
68  self.addParameter(ParameterSelection(self.RESAMPLE,"resampling method",self.RESAMPLE_OPTIONS, 0))
69  self.addParameter(ParameterString(self.EXTRA,
70  'Additional parameters', '-of GTiff', optional=True))
71 
72  def processAlgorithm(self, progress):
73  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
74  commands = [cliPath]
75 
76  input=self.getParameterValue(self.INPUT)
77  inputFiles = input.split(';')
78  for inputFile in inputFiles:
79  commands.append('-i')
80  commands.append('"' + inputFile + '"')
81 
82  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
83  commands.append('-ot')
84  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
85  output=self.getOutputValue(self.OUTPUT)
86  if output != "":
87  commands.append("-o")
88  commands.append('"' + output + '"')
89  if self.getParameterValue(self.DX) != 0:
90  commands.append("-dx")
91  commands.append(str(self.getParameterValue(self.DX)))
92  if self.getParameterValue(self.DY) != 0:
93  commands.append("-dy")
94  commands.append(str(self.getParameterValue(self.DY)))
95 
96  projwin = str(self.getParameterValue(self.PROJWIN))
97  if(str(projwin).find(',')>0):
98  regionCoords = projwin.split(',')
99  commands.append('-ulx')
100  commands.append(regionCoords[0])
101  commands.append('-uly')
102  commands.append(regionCoords[3])
103  commands.append('-lrx')
104  commands.append(regionCoords[1])
105  commands.append('-lry')
106  commands.append(regionCoords[2])
107 
108  nodata=self.getParameterValue(self.NODATA)
109  if nodata != "none":
110  nodataValues = nodata.split(';')
111  for nodataValue in nodataValues:
112  commands.append('-nodata')
113  commands.append(nodataValue)
114 
115  band=self.getParameterValue(self.BAND)
116  if band != '':
117  bandValues = band.split(';')
118  for bandValue in bandValues:
119  commands.append('-b')
120  commands.append(bandValue)
121  commands.append("-r")
122  commands.append(self.RESAMPLE_OPTIONS[self.getParameterValue(self.RESAMPLE)])
123 
124  extra = str(self.getParameterValue(self.EXTRA))
125  if len(extra) > 0:
126  commands.append(extra)
127 
128  pktoolsUtils.runpktools(commands, progress)
string PROJWIN
Definition: pkcrop.py:44
string RESAMPLE
Definition: pkcrop.py:48
list RESAMPLE_OPTIONS
Definition: pkcrop.py:47
string OUTPUT
Definition: pkcrop.py:41
string INPUT
Definition: pkcrop.py:40
string EXTRA
Definition: pkcrop.py:51
string RTYPE
Definition: pkcrop.py:49
string NODATA
Definition: pkcrop.py:46
pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__coll__graph.md50000644000113200011300000000004012616110566026570 00000000000000ee118d8207204db98eaa40ce89a69fd0pktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img__inherit__graph.png0000644000113200011300000000700512616110567024267 00000000000000‰PNG  IHDRµpצùbKGDÿÿÿ ½§“ ºIDATxœí{L“WÇOi-rÑPP.€rÈÂb6·ìÈ@æ‚ÙÔQ5ˆ0Ñ,’Éd¡N3Íâ6 3ëFhñŠÁœÂP./8Tn›¯ jz¶ÏûÇãžÕGûއù}þ çü8çw¾§ýrÎÓrÚ‡A€)°±´Àª8Àð€ƒE_jFÓÙÙi0è@¹»»»¸¸Ð”œF(•ʇÒ'@)•ÊYé’º‡˜Ëüþûï´æ‡ëøÀþp€?Öè®®.ƒ1“©öìÙÃ`0öíÛ7]¦êÎ`0ºººþï´35úcRzzz¸\.™ ‚(//÷òò’J¥Ó•sÁ‚™™™ˆNÙ3ìñ‡Á`xøð!™ÛÚÚnÞ¼YRRÒÒÒÒÑÑ1-9¹\.¹Ñ'{f°°?Èu¸²²200ÐÕÕ5--M«ÕR¿%bçÎaaaL63‘ª®®æñx .ÌËË## £´´téÒ¥...ûöí“H$>>>NNN»víš¶úÿ† þþ~™L†oÓÙÙ‰ŠŽŽîè訯¯çñxB¡  ÊTKªãúõë###»»»[[[CCC…Bá¤Aª×ÈȈ­­­X,¾ÿ~II ‹Å!Â`0øøøñÅ_„„„ #âСCçΓËå.\àñxd|ª±bcc/^¼ØÒÒB63‘zçw”JeEEBˆœB(!!A©T#„Ö®]«T* ©nܸqãÆ óžs° ´¶¶’U©TÊãñÈ`FFBèöíÛÆ-ÉòØØ“ɤ—cÇŽñx¼IƒT/…B1oÞ¼üõ×_ƒaxxX¯×Q__Ïb±È§¡±±!ÔÖÖf<\hhè/¿üB .++CaÆ"çBuŸèK—.¡×ëBd°©©‰œ—I™l€nXÅõ‡¿¿?Y êíí%Ë×®]‹ˆˆÈÍÍØ¾¿¿_¯×ûùù‘U×ÛÛ;iê²páB™LV__ïéé~ùòe„Pyy¹N§ãr¹ cÙ²e!“-¦»»;44”ªO%€š~²îîî!rt „мyóLÊÇ*üAþ‘!„:::ȇ!TUU%‹ËËËe2™IûE‹1™Ìžž²ÚÝÝíáá1iê¢V« Ñ#G ErròªU« …^¯—J¥ùùùÓžž.•J £3—ÞÞÞÆÿã¸yóæTÈòŸ×ézé>Cз4=ýþÂçó;;;üýý³²²Œ×äìì쀀µZM‡‡‡É¸@ ˆŒŒìééikk ÉÊÊš4H¥R«ÕçèÑ£r¹¼¨¨ˆÃá¨Õj™LÆd2ûûû)=ׯ_G555Q<èééyþüùÔÔÔ2 üXÄ„ý…’Œ¶ d´¿L š”§bN\{{{s¹ÜíÛ·SV ¨Õꀀ€ìììñññ×_ÝÞÞžŒ+Š7:;;»¹¹íرC­VO4N%•JýüüØlvPPPee%A©©©ÑÑÑÆz ƒŸŸ_ff&ÕQ¯×‹D"???''§˜˜˜ÊÊJ—'ŽE•Mdƒ?þáéýAŸ†OUUUKK U=zôhXX˜õ˜0'®O­™ÖÖÖ 6455©Tªúúú]»v¥¤¤XZÔÌAûù <ŽŽŽ©©©–Õ€'##C¥RÅÇÇËår__ßÍ›7[¹àé…AÐöù¨öööˆˆšòèïócôÒƒýÀþp€?àí¯_îÝ»G÷sFÃápèËO£?lmm Æt¸™ â‡W¯ôðp°´3X°`}Éiô‡““Sxx8}ù§úúî«WOú®_ai-Ö\üÃñãäO>3üðÇ#ÆÆtÇŽ5#„††Tµµ·--ÇZ<âÒ¥[*•!ÄdÚ;Öhi9ÖøãL¦ BH§3œ=ÛªVYZ‘Uþ@¡ÑQíùó7t:=YÕju.´[V’•þ@!cs „ll×-¨Çz „PEÅuãc¡:A&»¥Tª-(ÉJ …b´¶¶C¯ì5-AgδZJ’õþ@§Nýgb ˆ#G`‹ tô赉‡¤ ¢¾¾»¿È"’¬‡¹î{÷ï “¢c2mªª&YZæsÝUU-S°Ôéôsý2 ŸO¶8*Õ˜››#UÑr8óX¬G6³ë£nt@ãùäÙˆ»û±8ñÝwÃ,-ÄZ˜ëû €üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€ÅøfÉÞÞÞ––calm½llì,­Â’°Ùì_ý•²Äcß?vçÎ5kÖ[J`qvïÞÝ××GUM¿Ÿ.88îh<—Ù½{·q®?àøÀþpÐå¾¾>>Ÿ?½ÝÿeÎiÏcVþÙ"Þº¾_ÛÞÞ>!!¦äf1::úí·ß655½üòËiiiÖ£í‰X\<]뇓“Ó–-[hJn_}õ•\.‰Db±X©TŠD"ëÑöD,.Þ<qüøñÄÄÄ•+W~ôÑGÍÍÍ|>Ÿ ˆ“'OnÚ´)...==½®®ŽÏç/ƒW¯^MNNŽŽŽÕÕÕ&9É–W®\Ù¸qãêÕ«<8>>n|Øx…`0Ÿ~úimm-¹Š²X,r9}úôèè(Õì»ï¾ëëë»uëVqqñŠ+È ‡ÃY²d‰@ ÈÏÏûç†çããã:ŽÅbýøã!•J5é@£££%%%III¶¶¶ÿý›§ŸïTS›Õâͼõcݺuz½þûï¿ôõõMMMÝ»wo||¼^¯‰DCCC!!![·nÝ¿?Õ…ÍföÙg………îîîÙÙÙl6!tàÀ°°°ùóç“Í¢¢¢>ùäF¹~ýzj•F ‚ššš²²2ê¡···ß¶mÛÞ½{Ÿ{î9@™‘‘qüøñ‰utthµÚ={öÏbâš?SMmV‹7‹Çî/Æ`0²³³Ÿþÿû}}}6lÈÍÍuuu¥6ÚÚZ‰DrèÐ!³’Èd2sdÏuuuø©Íjñ“Âçó¥RéÚµkÉê4¼?ÖÓÓ“““ÓÙÙ©ÕjÛÛÛKKKãââþ}Zk`VOmZÄOÃûë|ðF£ùòË/ÝÜÜbccW­ZõôÝçÏŸoVû™ä‰S›Õ⟆µ¿ÏÓ¿¿Ï0àøÀþp˜¾~‘H$§N²ˆÀ yÌéééwïÞµ”Àð÷÷_¾|9U}ìõ-˜×ð€üà8þqê­I«ÒyýIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_12.md50000644000113200011300000000004012616110567015367 00000000000000335156a1751dfab19b1fec8c3a082454pktools-2.6.6/doc/html/classCostFactorySVM.html0000644000113200011300000003701212647637662016424 00000000000000 pktools: CostFactorySVM Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
CostFactorySVM Class Reference
Inheritance diagram for CostFactorySVM:
Collaboration diagram for CostFactorySVM:

Public Member Functions

 CostFactorySVM (std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose)
 
double getCost (const std::vector< Vector2d< float > > &trainingFeatures)
 
- Public Member Functions inherited from CostFactory
 CostFactory (unsigned short cv, short verbose)
 
void setCv (unsigned short cv)
 
void setClassValueMap (const std::string &classname, short classvalue)
 
std::map< std::string, short > getClassValueMap ()
 
std::vector< std::string > getNameVector ()
 
void setNameVector (std::vector< std::string > &nameVector)
 
int getClassIndex (std::string classname) const
 
void pushBackClassName (std::string classname)
 
void pushBackName (std::string classname)
 
void setNcTraining (const std::vector< unsigned int > nctraining)
 
void setNcTest (const std::vector< unsigned int > nctest)
 

Additional Inherited Members

- Protected Attributes inherited from CostFactory
confusionmatrix::ConfusionMatrix m_cm
 
std::map< std::string, short > m_classValueMap
 
std::vector< std::string > m_nameVector
 
std::vector< unsigned int > m_nctraining
 
std::vector< unsigned int > m_nctest
 
unsigned short m_cv
 
short m_classvalue
 
short m_verbose
 

Detailed Description

Definition at line 34 of file CostFactorySVM.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/structdecision__function.html0000644000113200011300000001035712647637662017661 00000000000000 pktools: decision_function Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
decision_function Struct Reference

Public Attributes

double * alpha
 
double rho
 

Detailed Description

Definition at line 1652 of file svm.cpp.


The documentation for this struct was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/pkpolygonize.html0000644000113200011300000001101312647637662015273 00000000000000 pktools: pkpolygonize
pktools  2.6.6
Processing Kernel for geospatial data
pkpolygonize

program to make vector file from raster image

SYNOPSIS

Usage: pkpolygonize -i input [-m mask] -o output

Options: [-f format] [-b band] [-n fieldname] [-nodata value]

Description

The utility pkpolygonize converts a raster to a vector dataset. All pixels in the mask band with a value other than zero will be considered suitable for collection as polygons. Use the same input file as mask to remove the background polygon (recommended).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image file
    m mask std::string All pixels in the mask band with a value other than zero will be considered suitable for collection as polygons. Use input file as mask to remove background polygon!
    o output std::string Output vector file
    f f std::string SQLite Output OGR file format
    b band int 0 the band to be used from input file
    nodata nodata double Disgard this nodata value when creating polygons.
    n name std::string DN the field name of the output layer
    Usage: pkpolygonize -i input [-m mask] -o output

Examples

Some examples how to use pkpolygonize can be found here

pktools-2.6.6/doc/html/pktoolsUtils_8py_source.html0000644000113200011300000004172112647637661017445 00000000000000 pktools: /home/kempenep/pktools/qgis/pktoolsUtils.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktoolsUtils.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pktoolsUtils.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 from PyQt4.QtCore import *
27 from PyQt4.QtGui import *
28 import os
29 import subprocess
30 from qgis.core import QgsApplication
31 from processing.core.ProcessingLog import ProcessingLog
32 from processing.core.ProcessingConfig import ProcessingConfig
33 from processing.tools.system import isWindows, isMac, userFolder
34 
35 class pktoolsUtils():
36 
37  PKTOOLS_FOLDER = "PKTOOLS_FOLDER"
38 
39  @staticmethod
40  def pktoolsPath():
41  folder = ProcessingConfig.getSetting(pktoolsUtils.PKTOOLS_FOLDER)
42 
43  if folder is None or folder == '':
44  if isWindows():
45  testfolder = os.path.join(os.path.dirname(QgsApplication.prefixPath()), 'pktools')
46  testfolder = os.path.join(testfolder, 'bin')
47  if os.path.exists(os.path.join(testfolder, 'pkinfo')):
48  folder = testfolder
49  folder = testfolder
50  else:
51  testfolder = "/usr/bin"
52  if os.path.exists(os.path.join(testfolder, "pkinfo")):
53  folder = testfolder
54  else:
55  testfolder = "/usr/local/bin"
56  if os.path.exists(os.path.join(testfolder, "pkinfo")):
57  folder = testfolder
58  folder = testfolder
59  return folder
60 
61  @staticmethod
62  def runpktools(commands, progress):
63  settings = QSettings()#from gdal
64  loglines = []
65  loglines.append("pktools execution console output")
66  loglines.append(commands)
67  progress.setInfo('pktools command:')
68  commandline = " ".join(commands)
69  progress.setCommand(commandline)
70  proc = subprocess.Popen(
71  commandline,
72  shell=True,
73  stdout=subprocess.PIPE,
74  stdin=open(os.devnull),
75  stderr=subprocess.STDOUT,
76  universal_newlines=True,
77  ).stdout
78  progress.setInfo('pktools command output:')
79 
80  for line in iter(proc.readline, ""):
81  progress.setConsoleInfo(line)
82  loglines.append(line)
83  ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
84 
85  ProcessingLog.addToLog(ProcessingLog.LOG_INFO, commandline)
86  pktoolsUtils.consoleOutput = loglines
87 
88 # @staticmethod
89 # def getConsoleOutput():
90 # return pktoolsUtils.consoleOutput
pktools-2.6.6/doc/html/dir_4dfaa1fe1382d1276d1c80b1d5035ade.html0000644000113200011300000001045612647637663020105 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Release Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkdiff_gui-gcc-Release Directory Reference
Directory dependency graph for build-pkdiff_gui-gcc-Release:
/home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Release

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/inherit_graph_10.md50000644000113200011300000000004012616110567015365 00000000000000cf51d7512e9b125e1bf883b69eb17331pktools-2.6.6/doc/html/classImgReaderOgr__coll__graph.map0000644000113200011300000000032412616110567020364 00000000000000 pktools-2.6.6/doc/html/inherit_graph_27.md50000644000113200011300000000004012647437044015403 00000000000000c41cbe92df868fb422aa68de81c75529pktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img__inherit__graph.md50000644000113200011300000000004012616110566024157 000000000000003d928e691b28993511fa3bf891620dccpktools-2.6.6/doc/html/classBadConversion-members.html0000644000113200011300000000640512647637662017764 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
BadConversion Member List

This is the complete list of members for BadConversion, including all inherited members.

BadConversion(std::string const &s) (defined in BadConversion)BadConversioninline
pktools-2.6.6/doc/html/inherit_graph_36.md50000644000113200011300000000004012647437044015403 00000000000000cff7ac1ee5a5232d6e7b82f41627ab2apktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial__coll__graph.map0000644000113200011300000000014712616110567027155 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask__inherit__graph.map0000644000113200011300000000011312616110567024443 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm__inherit__graph.png0000644000113200011300000000625312616110567023011 00000000000000‰PNG  IHDRp¬0d5bKGDÿÿÿ ½§“ `IDATxœí}LSWÇÏ¥µmP©†¢:´¼d!1Äe/ÁGxKýCE&›D4fËdN³M-fšÍàN¡¼…¬i#è°¨R«l`§¼=àP¨°h奅¶÷>œ=7µ”Jn©·žÏæœ_çw¿·ßÞso½—Œ €xîññ´Ä‚@>Ñä=@>Ѧó—M&“N§Ãq|iÔ¼°8Ix†OƒáÉ“'ÎK ‰Á`Y”OØØXŠ$!ðçŸ>3Ÿèò‰ Ÿèò‰¸Ë§{÷îa¶”¥¾þúk ÃŽ?N•†ù†cvïÞ½ÿ»ìÿÇ’O<Ï• ‚P(!!!J¥’ªš«V­:xð p§ì…³¤>á8þäÉwTîîî¾sçNEEEggg__%5y<<:Ý'{áPàœêêꢢ¢Ö¬YóÉ'ŸÌÌ̯±ÿþøøøÇ¿öÚk€—^z ¾466–““Ããñø|þþýûM&Ó|A•Jõꫯr8œððp¹\NÆ Ebbâ¦M›¢££çRA”””ÄÄÄøùù½ýöÛõõõpB›»-¸/jµ:$$¤ªª ¦ÙÉ444…ÂÕ«W;v F0 «¬¬\·n]@@ÀñãÇåryXX—Ë=|øðâßá÷Á ÃÃÃÆyŽN§$''÷õõiµZ¡PXPPƒ8Ž“&‘™äÀ¬¬¬¤¤¤þþþ®®®¸¸¸‚‚‡ArÔää$›Í.))yôèQEE“Éœœœ$Çñ°°0™LFÄW_}k+Œ ˆ²²²ààà_ýutt´±±Q(Âø|ÛJMM½zõjgg'L³“ x÷Ýw Cmm-î 33Ó`0”——¶nÝj0d2™à„Û·oß¾}Ûye>uuuÁ®R© …0xàÀ@oo¯m&lÏÎÎ2 Rß¹sç„B¡Ã 9J¯×/[¶ìĉÿüóŽãV«• ­VËd2áÛÑÖÖèîî¶Ý\\\ÜÏ?ÿL ®®®8ÙÜrø\Ÿ®]»F„Õjèt:loo‡ûe׆ NXˆO”Ÿ"""`#::úáǰ}ëÖ­7ÎͶZ­v…BáÇÉ!«W¯Öh4Z­–Ïç'&&þöÛo>>>…Ba±Xx<†aëׯØM}ýýýqqqd7&&f>ä.8ßÙ   Ü:ÉÊ•+Ë–-³kSe>Á ¯¯î@¥R•””( Fc—¿víZƒ100»ýýýÁÁÁƒä£ÑˆãøÙ³gõzýÎ;322ôz½ÕjU*•EEEÿ#??_©T6Ï„††ÚþÚ;wæÛÏ|©úÊáη…Ï{"‘H§Óݼy3""âÈ‘#¶s…T*ŒŒ40811ã‰$))i`` »»;66öÈ‘#ƒd)£ÑÈápjjjFGGKKK9ŽÑhÔh4 cxx˜ÔÓÚÚ hoo'ž:uŠÏç_¹råñãÇjµ:** Ã0çÛ"æÌ{¤l`3•›yonЮ=Kz~*// åñxü1i L0‘‘‘R©Ôl6¿ùæ›+V¬€q½^Ÿíïï¸oß>£Ñè0h[J©T ‹]WWGD^^^rr²­ÇÁÁƒÉV«õäÉ“€Ë妤¤ÔÕÕ«õ©kq‚ .]êò”$jñŸêëÿ37HÄÙ³^2õy‰O55·æÞðÄqB«í÷ˆ$jñŸ††ÆÚÚî㸃Ó †JåàP£Þà“JÕ9ß˵¶Ö¾ðRð‹Ç™žž ô#»““3Î2&óßàÒ?ºêžñ  ÚWR²ã½÷â=-„J¼aÞ{@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>Ñä=@>ÑäM°ýÑùÐÐPOË¡6;ÄÇÇ×Ó* ‹Åúý÷ßIkžúûÜû÷ïoÙ².»ƒð,G$»öGƒ~UþyàèÑ£¶]t~¢È'z€|¢È'zà.ŸE"‘§†/ °Ã]>­X±"33ÓMÅ_@Üå—Ëݵk—›Š¿€¸æAçÏŸß±cGZZÚÞ½{;::D"A.\ÈÉÉIOOÏÏÏ¿qã†H$²7ZZZvîÜ™œœ,‘HìjÂÌæææìììÍ›7Ÿ:uÊl6Ûn±¸¸877w||Üa©C‡9s&›Í挌 ­V ‰D—/_Þ±c‡X,®®®nhhÈÌÌLOO¯¬¬|Þ,×|ºxñâ?þ˜››+—Ë?øà¸ºù¥K—ärùÞ½{«««³²²NŸ>m;Äd2ˆÅb…B‘ýÝwßÙ-Ùùå—_Ž;VXXøÇÀõ¢AÈd²ööö¢¢".—ë°TRRÒõë×á¯iݺu‹Íf'$$ÀámmmÅÅÅ»ví*++»qãFEEÅž={är¹Á`x8Ç5ŸjkkwïÞýÖ[oùûûoذ®Æƒ \.wýúõ~ø¡í³ÙL„Ñhd±X)))*•ŠÍfÏ­¼gÏ>Ÿ¿nݺÜÜÜÆÆF,--U*•R©ÔÏÏo¾R¯¿þºÁ`èíí¨Õê””ƒ‡oÛ¶Í××799 ‘H|}}SRRÏ¡ç¸æÓ£Gà"öððpÀÐÐPXX|å•Wl‡¬\¹òäÉ“===[¶lùôÓO»ºº.æÌçóa#$$dtt¶{{{ãããúé''¥Ølöo¼qýúu“ÉÔÒÒ߈¯¯/€ÉdÚµâqÎqÍ'×ßßOvÿþûoÀÚµkÿúë/2xÿþ}Û!3338ލTª´´´/¿üÒᧉ\[ýÁƒþþþ°]XX˜ŸŸõêÕŽŽ'¥àÌÓÜÜI¾Ý®âqÎqͧÔÔÔâââææf½^óæÍÒÒR€X,–Éd­­­ƒ¡£££ªªÊöˆÁ0ìóÏ?ojjššš2›ÍL&Î{/^œšš"Ó~øá‡ÁÁÁ»wï–——¿óÎ;0Èáp^~ùe‰DRTT4;;;_©„„„ÉÉɪªª´´´…ï‹Ç¸„k‡á¶mÛ¬VëéÓ§ÇÆÆÂÃÃóòò¾ùæ±X æݽ{÷÷ßOa±X_|ñ…L& ’J¥, pâĉøøøå˗ôM›6}öÙg𴜕•EÎ<‰D¢V««««srr–b2™‰‰‰jµÚ¥¥ª<.À%žúÝQ äRéÂïk nß¾½°°pÍš5›ššäryYY™KE4+²©Äã"‰”JåÖ­[a—‚ï¹ß~û­N§›™™éé马¬LOO_|Y„-üÞòûï¿o2™:466˜ššš‘‘±ðáË—/w)Ÿr<.`!,jÞC¸êç=Ä€|¢È'z€|¢ö×{r¹¼¾¾Þ#RNxʧüüüxJ –ˆˆˆ 6]/\Å+Aç'z€|¢È'z€|¢ÿT¾™oÉoIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial__coll__graph.png0000644000113200011300000001030012616110567027154 00000000000000‰PNG  IHDR»€S-bKGDÿÿÿ ½§“uIDATxœíÝyPSWûðo$,$:l.¨•÷¶8Nk;¿:jµTªN¥v´&hmAÑ:Õq)R«%NÇʼS­  VÔa÷Ñ*¾:*n HëÂb}e)D£E$@–óû£Ã-!!D0÷ùÌd†Ü“{Ïs_“C<cŒ®/£›­+ ÄZ(ì„7(ì„7(ì„7„¶. *++m]±€nݺ!00nnn¶.Å>Â^SSƒúúzxzzÚºòŠ) øùùQØ[òôôĈ#l]yÅÎ;gë8´f'¼Aa'¼Aa'¼Aa'¼ÑåÂ^RR@`w}üøãØ´iS§¯Õžö®)PRRòJût].즔••ÁÛÛÛêý2ÆššŠ --ÍâýõìÙ«V­`»1Û#^…]§ÓáÉ“'Vï÷öíÛ¸sç’““qóæMÜ¿ߢýy{{s¯ ¶³=rȰ7¿Lçää`È!ðõõÅ’%KÐØØ¨÷8ÆV®\‰   <~üï¾û. wïÞÜcž={†yóæÁÛÛþþþX¹r%ÚmkéÈ‘#xóÍ7áææ†€€¤¤¤èµ§¦¦bܸq˜4i†Úæ³;c ñññ>|8<==ñÁàèѣܒ¤­zšçãÌ™30`öìÙÃclÌpêÔ)H$ôêÕ 7näŽ ìÚµ Æ ƒ6mÚ„”” 4"‘k×®mÿd¯˜(**bEEEf?¾¸¸˜`ÁÁÁìþýû,//I$&—˹6NÇV®\É‚‚‚ØãÇõÎkI&“±‰'²ÒÒRVXXÈFŽÉär¹É¶–ש««c®®®,>>žUUU±ääd& Y]]cŒ1NÇ ÄcŒ}ÿý÷lĈcaŒ±ÄÄDÖ¯_?vòäI¦P(ØéÓ§™D"áÚÛ«'$$„={–ݼy“;ÇØ˜°©S§²ÚÚZ–™™Éps€Íž=›ÕÖÖ²¤¤$€Íœ9“ÕÖÖ²„„½Çš#77—UWW›ýx Jwè°rÇÒÒÒ˜D"áÚ¢¢¢vïÞ=ƒóš5551'''½¾³²²˜D"1ÙÖò:J¥’9;;³-[¶°§OŸ2NÇž?δZ-cŒ±¼¼<& ¹€Ü¸qƒ`·oß6¨iäÈ‘lÿþýzc=pà`V=ÍóÑòšm…ýܹsŒ1Æ´Z-ÀŠ‹‹¹¶üü|n~ŒÝo~¬9ì)칌iÈ}=tèP”——s÷¯]»†ñãÇ#66¶Íó«««¡Õj!‹¹c‰ååå&ÛZêÕ«rss‘——Œ7.\@·nÿLmjj*4 ¼½½!0zôh0º”)--ÅÈ‘#õŽ >¼ÝZ[ιúöí \-õèÑàììlô¾£rè°s_ß¿Ÿûÿ¬£ãã㑚šŠÜÜ\£çûùùÁÉÉ eeeܱÒÒRôë×Ïd[K*• :P*•Ç´iÓ T*¡Õj‘––†­[·âùóçÜmùòåHKKkõ‘Äï¿ÿ®wìÎ;íÖÚìeÂhé·gí‘C‡}éÒ¥())Áµk×°zõj„……qmîîî2d¢££±páB½,ëêêüŽY³faÉ’%xðàŠŠŠ°fÍÈd2“m- #33µµµhjj‚³³3ºwïŽ . ¦¦2™ ÜM*•¢¸¸7oÞÔ»ÖâÅ‹…S§NáÉ“'8{ö,är9Ùõ´¥y̼fë…c_³'%%±2oooöÍ7ß0•Je°FU©TlðàÁ,&&†©Õjöþûï3®]©T²9sæ0///Ö§O¶lÙ2¦R©L¶µî#--‰Åbæââ†ÊrrrcŒEFF²àà`ƒúu:‹ÅlÕªUz×Òjµ,..މÅb&‰ØäÉ“YNNóññy©zZÞ76f´Zw£Õš½­6c÷ÛcOkvc¶ÿëÍ/Ýænñ-))A`` Á2ÀÑ=zýû÷Ç[o½ÅËÌÌÄúõëQPP`ÃÊ:îܹs>|8|}}m] ýu{RXXˆ°°0äç磾¾yyyX»v-"""l]Z—`7¿¼ñ2<==ië2^¹¨¨(Ô××cúôéP(ÀW_}Õ%Çj ¹Œ!Žƒ–1„Ø…ð…ð…ð†Ý¼ÓÐÐÀ‹?”ÄCMMüüzغÞ±‹°»¹¹A¡Pàùóç¶.Åâþûßÿa×®[ؾý#xx¸Øº‹puuµuì$ìb±Xo7_W÷¨Õ:<~쎩SÿÏÖåð ­Ù­¨ºúo\¿þ•uÝÖåð…ÝŠ²²òÑ­›Œ7n<Ä£GJ[—Ä+v+Êȸ­Vprê†Ã‡ss—£¢°[Iii îÞ­âîk4:¤§_³aEüCa·’ìì|8;·œn†ââjÜ»÷—Íjâ »•¤¦^…Z­Ó;&:!'‡–2ÖBa·‚[·¡¢â©ÁqF‹ôô«]î—Pì…Ý ²³ó!:m«¬|†‚‚ÿY¹"~¢°[˜V«CFÆuh4Z£íB¡²³ó­\?QØ-ìÊ•2(•mÿf¿F£Efæuî-Ib9v ;tèF›K˜fOŸÖãÒ%þý ik£°[Øñã…Ðju :ÁÉÉ NNݸûÍÿNž,²q¥]Ÿ]lëÊ6ož‰§Oë¹û·n=Âþý—±yóL½Ç °vi¼Ca·°)SÞÒ»ïéùöᅩ°°÷lTÑ2†ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð†Á'oœ={%%ôaV–RTT عs§+éÚ‚ƒƒñúë¯ëd­…B€nº ÎÌÉIdó:ºúmöìÙ­£nðÌ®ÑhƒñãÇ·n"Ä!¬[·Æà8­Ù oPØ oPØ oPØ oØ$ì˜0a‚ծɯ bðXKÔb 掣£ãí ók“°{xx`öìÙVëïÉ“'øí·ßð믿šì¿ªª Ÿ|ò‰ÕêêŒÖµZ{N[r”ùµIØE",X`µþ¾¾¾&û×ét¨­­µZ]ѺVkÏiKŽ2¿ ;c ‡Â_|?þ‹/FAA&L˜Æ>ŒyóæaÊ”)X¾|9._¾Œ &¼´]ºt ááá†T*Å©S§Œö×|ÞÅ‹1g΄††â矆Z­6¨kÇŽˆˆˆÀßÿ¯¿þðé§Ÿê]§µÖþù‡øøx„††"44ñññÐh4Ü5òóó1kÖ,ܾ}Ûä\µ5ÆöÆtùòeÌŸ?“'OÆŒ3pàÀ£µ¶S[ç™âÈókŽN…ýرcØ»w/"""’’‚¹sçbãÆ€ãÇ#%%‹/Æ “ɰ}ûvƒk444@.—cúôéHMMÅœ9s°yóf444´Ùovv66nÜˆØØX\¹rEïÉCBBòóó±uëVˆD"üòË/€¬¬,“ã1ö¸ƒ¢ªª øé§ŸŸŸÝ»wsíéé鈎ŽF```›×5gŒÆÆT__~øØ·o-Z„ÄÄD<{öÌä˜LgG›_su*ì™™™X¸p!ÆŽ ///Œ3zmo¿ý6D"F/¿üÒàjµŒ1¨T*¸¸¸`òäÉ8rä\]]ÛìwÑ¢Eð÷÷ǰaÃÓ§Osm;wîDZZbbbàééÙ™áNœ8¥K—Â×׈ŒŒÄÕ«W¹ö `Ô¨QpsskóæŒÑؘ\\\œœŒ%K–ÀËË‹[&¼xñÂdÍ=ÏT-Íìq~Íe°]àeTUUA"‘è TVVbРAzmsôèÑqqq8xð vïÞÁƒC*•b̘1möëïïÏ}=`À( îþ½{÷„}ûö!::º#ÃÒó×_aÆŒzÇÜÝÝõúo9c46&¡PˆòòrlÙ²*•Êìg·Žžgª–fö8¿æêTؽ½½QZZ ±XÌûóÏ?~~~xðà~xøð¡Á5¡Óé —Ë¡ÑhpæÌ¬^½ÙÙÙèÑ£‡Ñ~ËË˹ë>zô^^^\[ll, ÂÃÃñÑGaÔ¨Q"D"âââЯ_?@]]”J%×.¶?…¦ÆhjLËåËåxï½÷ V«qâÄ ³úëÈy¦jifók®N-cBBB°cÇ\¼xJ¥W¯^å¶®NŸ> ¸~ý:jkkQPP€={ö@ è]C àÛo¿ÅùóçñâÅ ¨Õj…Bî%þرc/¿Û¶mCEEîÞ½‹¤¤$|øá‡\›››ú÷ï©TŠ­[·¢©©é¥Ç¥R©¸¯ÇŽ‹ÄÄDTWW£¬¬ QQQz!5G{clkLjµB¡MMMÜZ¶¾¾Þh­ÍÌ9¯YW˜_su*ì³fÍBhh(¶oߎ°°0ìÝ»‘‘‘þ ûÌ™3©TŠÔÔT,\¸"‘Hï...øî»ï€Ï>û ˆ‰‰‹‹ `Ë–-?XMš4 +V¬@tt4ÞyçÈd2ƒÚ¤R)˜õ.D³Þ½{ã7ÞÐ{Y G÷îÝ1þ|,[¶ b±˜£¹Úc[còððÀ¢E‹°~ýzÌ;½{÷ÆÄ‰e´Öf¦Îk­+̯¹Œ1¦w@ èÔßŠŠ „……!66¾¾¾zKœóçÏ#%%‰‰‰ºvnnn‡Î·Gö4&{ª¥3Ö­[¤§§·<œa±ÿT*++Æ P\\ŒÆÆFüñÇصk¦L™b©. 1éÕ­þ[ùüóÏÑÐЀ5kÖàÙ³gèÓ§BBB0mÚ´_ÓÝݽSç[R{û?Úz¶´§1ÙS-–ðÊ—1„ØšÕ—1„Ø »³ô¶]¾¡°Û{Ú¶ÛQØíˆ=mÛíŠ(ìàÛvÉ¿(ìähÛv‰ßgïêŒmÛ?~¼Ñm»¤¤$Èd2$''Ã××®®®/½m÷eÏ#ÿ¢°w£mÛ%ös´m»„ÖìfÏÛv‰qôÌÞA-·íÖÔÔ oß¾mnÛmhhÀĉ!“ÉàââÂm¿}íµ× •J¹í·ä¶À?~\¯¿–Ûv[Ÿ·mÛ6kß!ÑÞ è*[eí!¼G˺¶]ò/ » ]†ôìÙË—/ÅÕ΢e á ;á ;á ;á £? Þ¸quuuÖ®…W¢²²>>>† ­?,ÒßßßæŸaI7ºuö¶bÅŠö?õÑ£G­Ò%Кð…ð…ð…ð…ðÆÿ®ïÓ`œ¡IEND®B`‚pktools-2.6.6/doc/html/pktools_2pktoolsAlgorithm_8py_source.html0000644000113200011300000003036112647637661022126 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pktoolsAlgorithm.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktoolsAlgorithm.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pktoolsAlgorithm.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 from processing.core.GeoAlgorithm import GeoAlgorithm
27 
28 import os
29 from PyQt4 import QtGui
30 from pktools.pktoolsUtils import pktoolsUtils
31 
32 from processing.core.parameters import ParameterFile
33 from processing.core.parameters import ParameterBoolean
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterSelection
37 from processing.core.outputs import OutputFile
38 from processing.core.outputs import OutputRaster
39 from processing.core.outputs import OutputVector
40 
41 class pktoolsAlgorithm(GeoAlgorithm):
42 
43  def getIcon(self):
44  filepath = os.path.dirname(__file__) + "/logo.png"
45  return QtGui.QIcon(filepath)
46 
47  def checkBeforeOpeningParametersDialog(self):
48  path = pktoolsUtils.pktoolsPath()
49  if path == "":
50  return "pktools folder is not configured.\nPlease configure it before running pktools algorithms."
51 
52  def help(self):
53 
54  #utilityName=self.__class__.__name__
55 
56  helpUrl = 'http://pktools.nongnu.org/html/md_{}.html'.format(self.cliName())
57  return False, helpUrl
pktools-2.6.6/doc/html/dir_5f1e10fd305b434def78aaf73fd56d60_dep.md50000644000113200011300000000004012616110567020447 00000000000000016a5f9d193cc948d4dc0ce95705fa52pktools-2.6.6/doc/html/pkinfo_8cc_source.html0000644000113200011300000021400212647637662016147 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkinfo.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkinfo.cc
1 /**********************************************************************
2 pkinfo.cc: Report basic information from raster datasets (similar to gdalinfo)
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <sstream>
21 #include <list>
22 #include "base/Optionpk.h"
23 #include "algorithms/Egcs.h"
24 #include "imageclasses/ImgReaderGdal.h"
25 #include "imageclasses/ImgReaderOgr.h"
26 
27 /******************************************************************************/
90 using namespace std;
91 
92 int main(int argc, char *argv[])
93 {
94  Optionpk<std::string> input_opt("i","input","Input image file");
95  Optionpk<bool> bbox_opt("bb", "bbox", "Shows bounding box ", false,0);
96  Optionpk<bool> bbox_te_opt("te", "te", "Shows bounding box in GDAL format: xmin ymin xmax ymax ", false,0);
97  Optionpk<bool> center_opt("c", "center", "Image center in projected X,Y coordinates ", false,0);
98  Optionpk<bool> colorTable_opt("ct", "colortable", "Shows colour table ", false,0);
99  Optionpk<bool> samples_opt("ns", "nsample", "Number of samples in image ", false,0);
100  Optionpk<bool> lines_opt("nl", "nline", "Number of lines in image ", false,0);
101  Optionpk<bool> nband_opt("nb", "nband", "Show number of bands in image", false,0);
102  Optionpk<short> band_opt("b", "band", "Band specific information", 0,0);
103  Optionpk<bool> dx_opt("dx", "dx", "Gets resolution in x (in m)", false,0);
104  Optionpk<bool> dy_opt("dy", "dy", "Gets resolution in y (in m)", false,0);
105  Optionpk<bool> minmax_opt("mm", "minmax", "Shows min and max value of the image ", false,0);
106  Optionpk<bool> min_opt("min", "minimum", "Shows min value of the image ", false,0);
107  Optionpk<bool> max_opt("max", "maximum", "Shows max value of the image ", false,0);
108  Optionpk<bool> stat_opt("stats", "statistics", "Shows statistics (min,max, mean and stdDev of the image)", false,0);
109  Optionpk<bool> projection_opt("a_srs", "a_srs", "Shows projection of the image ", false,0);
110  Optionpk<bool> geo_opt("geo", "geo", "Gets geotransform ", false,0);
111  Optionpk<bool> interleave_opt("il", "interleave", "Shows interleave ", false,0);
112  Optionpk<bool> filename_opt("f", "filename", "Shows image filename ", false,0);
113  Optionpk<bool> cover_opt("cover", "cover", "Print filename to stdout if current image covers the provided coordinates via bounding box, (x y) coordinates or extent of vector file", false,0);
114  Optionpk<double> x_opt("x", "xpos", "x pos");
115  Optionpk<double> y_opt("y", "ypos", "y pos");
116  Optionpk<bool> read_opt("r", "read", "Reads row y (in projected coordinates if geo option is set, otherwise in image coordinates, 0 based)",false,0);
117  Optionpk<bool> refpixel_opt("ref", "reference", "Gets reference pixel (lower left corner of center of gravity pixel)", false,0);
118  Optionpk<bool> driver_opt("of", "oformat", "Gets driver description ", false,0);
119  Optionpk<std::string> extent_opt("e", "extent", "Gets boundary from vector file");
120  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box");
121  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box");
122  Optionpk<double> lrx_opt("lrx", "lrx", "Lower right x value bounding box");
123  Optionpk<double> lry_opt("lry", "lry", "Lower right y value bounding box");
124  Optionpk<bool> type_opt("ot", "otype", "Returns data type", false,0);
125  Optionpk<bool> description_opt("d", "description", "Returns image description", false,0);
126  Optionpk<bool> metadata_opt("meta", "meta", "Shows meta data ", false,0);
127  Optionpk<double> nodata_opt("nodata", "nodata", "Sets no data value(s) for calculations (nodata values in input image)");
128 
129  bool doProcess;//stop process when program was invoked with help option (-h --help)
130  try{
131  doProcess=input_opt.retrieveOption(argc,argv);
132  bbox_opt.retrieveOption(argc,argv);
133  bbox_te_opt.retrieveOption(argc,argv);
134  center_opt.retrieveOption(argc,argv);
135  colorTable_opt.retrieveOption(argc,argv);
136  samples_opt.retrieveOption(argc,argv);
137  lines_opt.retrieveOption(argc,argv);
138  nband_opt.retrieveOption(argc,argv);
139  band_opt.retrieveOption(argc,argv);
140  dx_opt.retrieveOption(argc,argv);
141  dy_opt.retrieveOption(argc,argv);
142  minmax_opt.retrieveOption(argc,argv);
143  min_opt.retrieveOption(argc,argv);
144  max_opt.retrieveOption(argc,argv);
145  stat_opt.retrieveOption(argc,argv);
146  projection_opt.retrieveOption(argc,argv);
147  geo_opt.retrieveOption(argc,argv);
148  interleave_opt.retrieveOption(argc,argv);
149  filename_opt.retrieveOption(argc,argv);
150  cover_opt.retrieveOption(argc,argv);
151  x_opt.retrieveOption(argc,argv);
152  y_opt.retrieveOption(argc,argv);
153  read_opt.retrieveOption(argc,argv);
154  refpixel_opt.retrieveOption(argc,argv);
155  driver_opt.retrieveOption(argc,argv);
156  extent_opt.retrieveOption(argc,argv);
157  ulx_opt.retrieveOption(argc,argv);
158  uly_opt.retrieveOption(argc,argv);
159  lrx_opt.retrieveOption(argc,argv);
160  lry_opt.retrieveOption(argc,argv);
161  type_opt.retrieveOption(argc,argv);
162  description_opt.retrieveOption(argc,argv);
163  metadata_opt.retrieveOption(argc,argv);
164  nodata_opt.retrieveOption(argc,argv);
165  }
166  catch(std::string predefinedString){
167  std::cout << predefinedString << std::endl;
168  exit(0);
169  }
170  if(!doProcess){
171  cout << endl;
172  cout << "Usage: pkinfo -i input [options]" << endl;
173  cout << endl;
174  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
175  exit(0);//help was invoked, stop processing
176  }
177  //for union
178  double maxLRX=0;
179  double maxULY=0;
180  double minULX=0;
181  double minLRY=0;
182 
183  //for intersect
184  double minLRX=0;
185  double minULY=0;
186  double maxULX=0;
187  double maxLRY=0;
188 
189  double theULX, theULY, theLRX, theLRY;
190  //get bounding box from extentReader if defined
191  ImgReaderOgr extentReader;
192  if(extent_opt.size()){
193  extentReader.open(extent_opt[0]);
194  if(!(extentReader.getExtent(theULX,theULY, theLRX, theLRY))){
195  std::cerr << "Error: could not get extent from " << extent_opt[0] << std::endl;
196  exit(1);
197  }
198  ulx_opt.push_back(theULX);
199  uly_opt.push_back(theULY);
200  lrx_opt.push_back(theLRX);
201  lry_opt.push_back(theLRY);
202  if(input_opt.empty()){//report bounding box from extent file instead
203  if(bbox_te_opt[0])
204  std::cout << std::setprecision(12) << "-te " << theULX << " " << theLRY << " " << theLRX << " " << theULY;
205  else
206  std::cout << std::setprecision(12) << "--ulx=" << theULX << " --uly=" << theULY << " --lrx=" << theLRX << " --lry=" << theLRY << " ";
207  }
208  }
209 
210  ImgReaderGdal imgReader;
211  for(int ifile=0;ifile<input_opt.size();++ifile){
212  imgReader.open(input_opt[ifile]);
213  for(int inodata=0;inodata<nodata_opt.size();++inodata){
214  if(!inodata)
215  imgReader.GDALSetNoDataValue(nodata_opt[0],band_opt[0]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
216  imgReader.pushNoDataValue(nodata_opt[inodata]);
217  }
218  if(filename_opt[0])
219  std::cout << " --input " << input_opt[ifile] << " ";
220  if(center_opt[0]){
221  double theX, theY;
222  imgReader.getCenterPos(theX,theY);
223  std::cout << std::setprecision(12) << " -x " << theX << " -y " << theY << " ";
224  }
225  if(refpixel_opt[0]){
226  assert(band_opt[0]<imgReader.nrOfBand());
227  Egcs egcs;
228  double refX,refY;
229  //get center of reference (center of gravity) pixel in image
230  imgReader.getRefPix(refX,refY,band_opt[0]);
231  std::cout << std::setprecision(12) << "-x " << refX << " -y " << refY << std::endl;
232  egcs.setLevel(egcs.res2level(imgReader.getDeltaX()));
233  // unsigned short theLevel=egcs.getLevel(imgReader.getDeltaX());
234  // egcs.setLevel(theLevel);
235  //cout << "cell code at level " << egcs.getLevel() << " (resolution is " << egcs.getResolution() << "): " << egcs.geo2cell(refX,refY) << endl;
236  }
237  if(bbox_opt[0]||bbox_te_opt[0]){
238  imgReader.getBoundingBox(theULX,theULY,theLRX,theLRY);
239  if(bbox_te_opt[0])
240  std::cout << std::setprecision(12) << "-te " << theULX << " " << theLRY << " " << theLRX << " " << theULY;
241  else
242  std::cout << std::setprecision(12) << "--ulx=" << theULX << " --uly=" << theULY << " --lrx=" << theLRX << " --lry=" << theLRY << " ";
243  if(!ifile){
244  maxLRX=theLRX;
245  maxULY=theULY;
246  minULX=theULX;
247  minLRY=theLRY;
248 
249  minLRX=theLRX;
250  minULY=theULY;
251  maxULX=theULX;
252  maxLRY=theLRY;
253  }
254  else{
255  maxLRX=(theLRX>maxLRX)?theLRX:maxLRX;
256  maxULY=(theULY>maxULY)?theULY:maxULY;
257  minULX=(theULX<minULX)?theULX:minULX;
258  minLRY=(theLRY<minLRY)?theLRY:minLRY;
259 
260  minLRX=(theLRX<minLRX)?theLRX:minLRX;
261  minULY=(theULY<minULY)?theULY:minULY;
262  maxULX=(theULX>maxULX)?theULX:maxULX;
263  maxLRY=(theLRY>maxLRY)?theLRY:maxLRY;
264  }
265  }
266  if(dx_opt[0])
267  std::cout << "--dx " << imgReader.getDeltaX() << " ";
268  if(dy_opt[0])
269  std::cout << "--dy " << imgReader.getDeltaY() << " ";
270  if(cover_opt[0]){
271  if(ulx_opt.size()&&uly_opt.size()&&lrx_opt.size()&&lry_opt.size()){
272  if(imgReader.covers(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))
273  std::cout << " -i " << input_opt[ifile] << " ";
274  }
275  else if(x_opt.size()&&y_opt.size()){
276  if(imgReader.covers(x_opt[0],y_opt[0]))
277  std::cout << " -i " << input_opt[ifile] << " ";
278  }
279  else{
280  std::cerr << "Error: failing extent (-e), bounding box or x and y position to define coverage" << std::endl;
281  exit(1);
282  }
283  }
284  else if(ulx_opt.size()||uly_opt.size()||lrx_opt.size()||lry_opt.size()){
285  double ulx,uly,lrx,lry;
286  imgReader.getBoundingBox(ulx,uly,lrx,lry);
287  if(ulx_opt.size())
288  std::cout << " --ulx=" << std::fixed << ulx << " ";
289  if(uly_opt.size())
290  std::cout << " --uly=" << std::fixed << uly << " ";
291  if(lrx_opt.size())
292  std::cout << " --lrx=" << std::fixed << lrx << " ";
293  if(lry_opt.size())
294  std::cout << " --lry=" << std::fixed << lry << " ";
295  }
296  if(colorTable_opt[0]){
297  GDALColorTable* colorTable=imgReader.getColorTable();
298  if(colorTable!=NULL){
299  for(int index=0;index<colorTable->GetColorEntryCount();++index){
300  GDALColorEntry sEntry=*(colorTable->GetColorEntry(index));
301  std::cout << index << " " << sEntry.c1 << " " << sEntry.c2 << " " << sEntry.c3 << " " << sEntry.c4 << std::endl;
302  }
303  }
304  else
305  std::cout << "-ct none ";
306  }
307  if(samples_opt[0])
308  std::cout << "--nsample " << imgReader.nrOfCol() << " ";
309  if(lines_opt[0])
310  std::cout << "--nline " << imgReader.nrOfRow() << " ";
311  if(nband_opt[0])
312  std::cout << "--nband " << imgReader.nrOfBand() << " ";
313  double minValue=0;
314  double maxValue=0;
315  double meanValue=0;
316  double stdDev=0;
317  int nband=band_opt.size();
318  if(band_opt[0]<0)
319  nband=imgReader.nrOfBand();
320  for(int iband=0;iband<nband;++iband){
321  unsigned short theBand=(band_opt[0]<0)? iband : band_opt[iband];
322  if(stat_opt[0]){
323  assert(theBand<imgReader.nrOfBand());
324  GDALProgressFunc pfnProgress;
325  void* pProgressData;
326  GDALRasterBand* rasterBand;
327  rasterBand=imgReader.getRasterBand(theBand);
328  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev,pfnProgress,pProgressData);
329  std::cout << "-min " << minValue << " -max " << maxValue << " --mean " << meanValue << " --stdDev " << stdDev << " ";
330  }
331 
332  if(minmax_opt[0]||min_opt[0]||max_opt[0]){
333  assert(theBand<imgReader.nrOfBand());
334  if((ulx_opt.size()||uly_opt.size()||lrx_opt.size()||lry_opt.size())&&(imgReader.covers(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))){
335  double uli,ulj,lri,lrj;
336  imgReader.geo2image(ulx_opt[0],uly_opt[0],uli,ulj);
337  imgReader.geo2image(lrx_opt[0],lry_opt[0],lri,lrj);
338  imgReader.getMinMax(static_cast<int>(uli),static_cast<int>(lri),static_cast<int>(ulj),static_cast<int>(lrj),theBand,minValue,maxValue);
339  }
340  else
341  imgReader.getMinMax(minValue,maxValue,theBand);
342  if(minmax_opt[0])
343  std::cout << "-min " << minValue << " -max " << maxValue << " ";
344  else{
345  if(min_opt[0])
346  std::cout << "-min " << minValue << " ";
347  if(max_opt[0])
348  std::cout << "-max " << maxValue << " ";
349  }
350  }
351  }
352  if(projection_opt[0]){
353  if(imgReader.isGeoRef())
354  std::cout << " -a_srs " << imgReader.getProjection() << " ";
355  else
356  std::cout << " -a_srs none" << " ";
357  }
358  if(geo_opt[0]&&!read_opt[0]){
359  std::cout << " -geo " << std::setprecision(12) << imgReader.getGeoTransform();
360  }
361  if(interleave_opt[0]){
362  std::cout << " --interleave " << imgReader.getInterleave() << " ";
363  }
364  if(type_opt[0]){
365  std::cout << "--otype " << GDALGetDataTypeName(imgReader.getDataType(band_opt[0])) << " ";
366  // std::cout << " -ot " << GDALGetDataTypeName(imgReader.getDataType(band_opt[0])) << " (" << static_cast<short>(imgReader.getDataType(band_opt[0])) << ")" << std::endl;
367  }
368  if(description_opt[0]){
369  // try{
370  // std::cout << "image description: " << imgReader.getImageDescription() << std::endl;
371  // }
372  // catch(...){
373  // std::cout << "caught" << std::endl;
374  // }
375  std::list<std::string> metaData;
376  imgReader.getMetadata(metaData);
377  std::list<std::string>::const_iterator lit=metaData.begin();
378  std::cout << " --description ";
379  while(lit!=metaData.end())
380  std::cout << *(lit++) << " ";
381  }
382  if(metadata_opt[0]){
383  std::cout << "Metadata: " << std::endl;
384  std::list<std::string> lmeta;
385  imgReader.getMetadata(lmeta);
386  std::list<std::string>::const_iterator lit=lmeta.begin();
387  while(lit!=lmeta.end()){
388  std::cout << *lit << std::endl;
389  ++lit;
390  }
391 // char** cmetadata=imgReader.getMetadata();
392 // while(*cmetadata!=NULL){
393 // std::cout << *(cmetadata) << std::endl;
394 // ++cmetadata;
395 // }
396  }
397  if(read_opt[0]){
398  // int nband=band_opt.size();
399  // if(band_opt[0]<0)
400  // nband=imgReader.nrOfBand();
401  std::cout.precision(12);
402  for(int iband=0;iband<nband;++iband){
403  unsigned short theBand=(band_opt[0]<0)? iband : band_opt[iband];
404  std::vector<float> rowBuffer;//buffer will be resized in readdata
405  for(int iy=0;iy<y_opt.size();++iy){
406  double theRow=y_opt[iy];
407  int ncol=(x_opt.size())? x_opt.size() : imgReader.nrOfCol();
408  for(int ix=0;ix<ncol;++ix){
409  double theCol=ix;
410  if(x_opt.size()){
411  if(geo_opt[0])
412  imgReader.geo2image(x_opt[ix],y_opt[iy],theCol,theRow);
413  else
414  theCol=x_opt[ix];
415  }
416  assert(theRow>=0);
417  assert(theRow<imgReader.nrOfRow());
418  imgReader.readData(rowBuffer,GDT_Float32, static_cast<int>(theRow), theBand);
419  assert(theCol<rowBuffer.size());
420  std::cout << rowBuffer[static_cast<int>(theCol)] << " ";
421  }
422  std::cout << std::endl;
423  }
424  }
425  }
426  if(driver_opt[0])
427  std::cout << " --oformat " << imgReader.getDriverDescription() << " ";
428  imgReader.close();
429  }
430  if((bbox_opt[0]||bbox_te_opt[0])&&input_opt.size()>1){
431  if(bbox_te_opt[0])
432  std::cout << std::setprecision(12) << "-te " << minULX << " " << minLRY << " " << maxLRX << " " << maxULY;
433  else
434  std::cout << "union bounding box: " << std::setprecision(12) << "--ulx=" << minULX << " --uly=" << maxULY << " --lrx=" << maxLRX << " --lry=" << minLRY << std::endl;
435  if(maxULX<minLRX&&minULY>maxLRY){
436  if(bbox_te_opt[0])
437  std::cout << "intersect bounding box: " << std::setprecision(12) << "-te " << maxULX << " " << maxLRY << " " << minLRX << " --lry=" << minULY << std::endl;
438  else
439  std::cout << "intersect bounding box: " << std::setprecision(12) << "--ulx=" << maxULX << " --uly=" << minULY << " --lrx=" << minLRX << " --lry=" << maxLRY << std::endl;
440  }
441  else
442  std::cout << "no intersect" << std::endl;
443  }
444  if(!read_opt[0])
445  std::cout << std::endl;
446 }
Definition: Egcs.h:26
pktools-2.6.6/doc/html/classconfusionmatrix_1_1ConfusionMatrix.html0000644000113200011300000004677512647637662022557 00000000000000 pktools: confusionmatrix::ConfusionMatrix Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
confusionmatrix::ConfusionMatrix Class Reference

Public Member Functions

 ConfusionMatrix (short nclass)
 
 ConfusionMatrix (const std::vector< std::string > &classNames)
 
 ConfusionMatrix (const ConfusionMatrix &cm)
 
ConfusionMatrixoperator= (const ConfusionMatrix &cm)
 
short size () const
 
void resize (short nclass)
 
void setClassNames (const std::vector< std::string > &classNames, bool doSort=false)
 
void pushBackClassName (const std::string &className, bool doSort=false)
 
void setResults (const Vector2d< double > &theResults)
 
void setResult (const std::string &theRef, const std::string &theClass, double theResult)
 
void incrementResult (const std::string &theRef, const std::string &theClass, double theIncrement)
 
void clearResults ()
 
double nReference (const std::string &theRef) const
 
double nReference () const
 
double nClassified (const std::string &theRef) const
 
int nClasses () const
 
std::string getClass (int iclass) const
 
int getClassIndex (std::string className) const
 
std::vector< std::string > getClassNames () const
 
double pa (const std::string &theClass, double *se95=NULL) const
 
double ua (const std::string &theClass, double *se95=NULL) const
 
double oa (double *se95=NULL) const
 
int pa_pct (const std::string &theClass, double *se95=NULL) const
 
int ua_pct (const std::string &theClass, double *se95=NULL) const
 
int oa_pct (double *se95=NULL) const
 
double kappa () const
 
ConfusionMatrixoperator*= (double weight)
 
ConfusionMatrix operator* (double weight)
 
ConfusionMatrixoperator+= (const ConfusionMatrix &cm)
 
ConfusionMatrix operator+ (const ConfusionMatrix &cm)
 
void sortClassNames ()
 
void reportSE95 (bool doReport)
 
void setFormat (const CM_FORMAT &theFormat)
 
void setFormat (const std::string theFormat)
 
CM_FORMAT getFormat () const
 

Static Public Member Functions

static const CM_FORMAT getFormat (const std::string theFormat)
 

Friends

std::ostream & operator<< (std::ostream &os, const ConfusionMatrix &cm)
 

Detailed Description

Definition at line 32 of file ConfusionMatrix.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/inherit_graph_37.png0000644000113200011300000002036312647437044015515 00000000000000‰PNG  IHDRc‹´¢øºbKGDÿÿÿ ½§“ IDATxœíÝyXS×ö7ðo@FAQ¨\)êÅ, ލ°V¬ÅûZ-×zyj-ƒC•Ö¡bì,­Z¯¢ $ NXµ”ZüUT„”AÀ*È­‚Šˆ$Èd¿ Ñ”)Q$ ¬ÏóäröÙY'‡¬œ¬³Ï>Æ!„UJÐRu„BJÆ„¢(Bˆ dL!j ‡ª „ÈKLLÄÎ;Uyôõõ±cÇX[[7[Fɘ5ÃçóqíÚ5Œ7NÕ¡–€E‹Q2&DSŒ7|>_ÕaÆápZ]F5cBQ”Œ !D P2&„5@ɘBÔ%cBº‘H„ÐÐPØÛÛÃØØÎÎÎøì³Ï ‹em8¸\.þ>%Í7äN.q8œVŠºsçüýýacc###8;;ãðáÃrm8nܸÑf?›6m‡ÃAddd³eB¡!!!8p `kk‹ˆˆÔÖÖ*Õ¦="‘aaa°··‡‘‘\\\°uëV¹÷öeQ2&¤ ¨®®†““.]º„mÛ¶!;;kÖ¬A\\ÜÝÝ!‘HdmÁãñÚí3##wïÞmöPDEEahh‡ÌÌL,X°~~~8}ú´ÂÛÅC||<¬­­[Œ988III¸}û6öìÙƒ£G"44T©6mizo/^¼ˆÈÈH¬^½±±±ððð{o_ #„¨.—˸\®Rë„„„°I“&1±X,÷¼P(d666l÷îÝŒ1ư   Ö»wov÷î]Y»¢¢"ö|:ÀŠŠŠ^xV¬XÁ|}}[Œsúôé ¿Nnn.ãp8,55•`ׯ_—[njjÊ.\¸ ÷\zz:³¶¶VªM[Ú{oøá…úa¬q{y<^K‹ø”Œ Q3/’Œ---Yjjj‹ËvìØÁÜÜÜcÉàÚµklüøñÌËË‹I¥RÆXÇ'cKKK–‘‘ÑìùêêjVRR¢ðë¬Y³†M™2…1ÆØ°aÃØÆå–[[[³ÀÀ@öàÁƒVûP¤M[Úzo£££Ù¤I“î«­dLe B4Ü£GPVV‡—;88àÚµk²¿µµµ±oß>üòË/ˆ‰‰iµ_‘H¡PØì¡h<Æ k¶ÌÈȨūÏZž–(üüüóçÏoVªØ½{7ÒÒÒ`eeDEE¡¤¤Dé6ímKkï­££# ê«=”Œ éâ´´´šÕ5mmm‰>ø¥¥¥-®çààccãfö°§'•9Ù×’ÌÌL”––bþüù€yóæ¡  —/_–µñðð@II ÒÓÓ1iÒ$ÄÄÄ`ðàÁ8xð RmÚÓÚ¶0Æ ¥Õ1i”’1!ÎÔÔ–––ÈÉÉiqyNNÞxãfÏÿç?ÿ££#–.]Últ1ÖìÑ333XXXàÊ•+Í–]ºt ÎÎΨ©©i·ŸøøxˆÅb˜››ƒÃáȶ¡éèX$!>>0vìX¬_¿yyyX»v-ÂÂÂnÓEÞÛ–~¼JÆ„tظqc³#`‘H„mÛ¶aÆŒÍÖÑÒÒÂÞ½{qîÜ9ìÚµ«Cã™={6¶oßÞ,yÇÆÆ¢¡¡†††m®/‘HÀãñðÅ_ ººZöXµjx<žì‹Áßßùùù²õ8<==eCÎiÓž€€lÚ´Iî½õóóáC‡)+£¼4…+Ï„Nñ"'𪪪ØÐ¡C™››;yò$+,,dÉÉÉläÈ‘l„ ¬¶¶–1Öò ³ï¿ÿžq8œf'ð222ØÝ»w›=qïÞ=Ö§OÀÎ;ÇrssÙ'Ÿ|°”””v_çÌ™3L[[›•——Ëõ›••Å0@ÀclñâÅlÈ!,%%…ýùçŸìܹsÌÕÕ•­\¹R¶Ž"myo§NÊN:Å®_¿ÎÖ®]˰~ýú±ºº:…úiÚ^MAˆ†x‘dÌXãP«>úˆÙÙÙ1CCC6räH¶yófVSS#kÓR2–J¥ÌÝݽY2ní¡¨ââbæííÍú÷ïÏŒ™‹‹ ;vì˜\›Ö^#((ˆyxx4ëS*•²Áƒ³ððpÆcb±˜}òÉ'lôèÑÌÀÀ€ÙØØ°ððpöäÉÙ:Š´iÏóï­¾¾>~ÝšB^”®®®Â‰¸=4¹Þ?Äb)$i‹m$ؼy–,™ÔÉÑÒˆf§&]c QQ'±té^ÔÕIZMÄ ¥¤¥]íÄè‘×b2 ‡Ã¡Çs°°°ÎÞ7jàÀ*;ë1hÐ ÔÖ6à½÷bðÕW©OëÃmWã$†³g¯áÞ½êÎÙ!j€>çÏzzz8wîœJ÷G‹eŠââb¸ººbÕªUZúâ‹/P\\¬ê0^Jqq1>üðCŒ7NÕ¡¼RçÏŸÇ×_Ÿï‘} Êœ‘H€£GX¶ÌíÕ¨FèsþŒþúë/•ÆÐjÍxÀ€àr¹‹ÚJHHPuÂÕÕµËïSÆöí+BVÖ-…×10Ж–ªªž¼ºàÔ}ÎÕÀ#]ÎãÇgðÛoч­êôõ{@__`` KsGµBÿ¤Ë‘HD46˜hMA!j€’1!„¨MÆ"‘aaa°··‡‘‘\\\°uëVˆÅbY‡[[[´táß[o½‡ƒ7n¼T7n܇£ø”ˆ¤¹–öçŸ~ sssäççwJ ´ÕP(DHHØÚÚ"""µµµ€ï¾ûVVVJåÇt3Æðúë¯ãÛo¿•=wçÎøûûÃÆÆFFFpvvÆáÇ•ŠG‘œ£):,WWWÃÉÉ /^Ddd$V¯^ØØXxxx@"yv jqq1rssåÖ¯¬¬ÄÙ³gz­›7oÂÜܼÕ妦¦oy®WM$ªCrr6.Ü;»QY)RI-** _}õRSS1jÔ(U‡ÓaÊË«°{w:fÌØ/¯¯UŽÚ †@ @RRnß¾={öàèÑ£ p¹\”••!##Cn=@€ÒÒRx{{***àèèCCCðxhÖDDöìÙ£P,ÊäMÐ!ÉøÑ£G(++“;Ò}ž££# dO˜0B¡PVª¨ªªÂ¯¿þŠwÞyGÖ¦ººóçÏǘ1cPTT„¨¨(¬Y³÷ïßÇ… eeer¯³}ûvÄÄÄȽ͞=Ó§OLJ~ˆòòr|øá‡ˆEÏžÊI¥ ÿ÷…ŽÅðáë°xñœ:•úz ¤R††ÍúYÔ>ŸeË–ÁÜܼÅ}ûå—_âÖ­[ÈÊÊBZZ~ýõWlذA¶üïûãÈ‘#8þ<>ÿüs„‡‡ãáÇ õó¢jjê‘p îÂÈ‘#<<¹¹¥`¬1w•/Ìδ{÷n¤¥¥ÁÊÊ ˆŠŠ’KÄ0wî\<|øPvyñµk×PXXˆyóæx–/† Ö¬###X[[·‡²9Gtè8ãÖN¶0Æž^áÔH[[óçϟχƒƒRRR0aÂôéÓGÖFOO¹¹¹0` 0`@ã¸ÑªªªV_Û¶m5jT³O_ý5F,_¾¼Ù^{Äb-ܹcgç¸{÷zôЂXÜx‚B"iû}ôèèÓÇH©×{´µ•¿E|TTΞ=‹¥K—",, ÑÑÑrË÷îÝ‹3gÎÀÒÒ À¶mÛŠwß}À³ýÑdÅŠ055ÅâÅ‹±lÙ2<|ø½{÷n·eõèÑáá 8rD€êê:hi5~‘mï/±X‚ØØó/ôšš¨²RffuJ­ãáá’’deeáçŸFLL V¯^ýû÷Ãßß@ã9›™3g‚ÏçcòäÉHNNÆ”)S`aaàٯƎ89«hÎÑ’ŒMMMaii‰œœ¼ùæ›Í–çää4ûär¹Xºt)¶lÙÒb‰BWW………X¶l„B¡BµÊ–¾i›â{ï½÷ðé§Ÿ"55U‰-kôà>nß6ðd‰XÛ¶ý¤ôë½ ::J¯ÃçóáêêŠ}ûöaܸq˜7o¦OŸ.[^\\,«6éÕëÙ0þ¾?ú÷ïÿ4¹çÛëGYFF.8pàÙ $©‚»«®®aaü~]MÓ»·‘RÉX$áøñãàr¹;v,ÆŽ‹?þ “%c ±TŒ¯¿þÉÉÉxï½÷dËÌÌÌ`aa+W®`üxù{^ºt ï¿ÿ>ÒÓÓahhØj,/’sÔ]‡`Ó¦M˜2eЬ†ãçç‡Ù³g#22²Ù膉'¢ºº¿ÿþ;RSS±sçN¹åOž<ø|>¼¼¼PWW‡½{÷¶Ãß?äMJKKñÝwßaúôéøè£pàÀ¥¶ÍÒ²ffuðòZޏ¸ó¸~½L6y{22ÖÁƦõ‘…ÃùJéulllNNNÇ’%KŸŸ/K”æææ8sæ þùÏxöÓ±Éß÷GkG*íõ£¬GNáÂ…½HLÌB|üETT¡£Óãé‰ÕÖõì©[·6½ðëj¥Ú3ÆàïïaÆÉÊžžžØµk—\Û·ß~K–,A\\rss1wî\¹å³gÏÆöíÛ1nÜ8¹£ÛØØX444´™ˆ›(›sÔ]‡ÇoذeeepwwÇéÓ§QXXˆAƒÁßßµµµXºt©\û¦REPP\\\Я_?¹åuuu¨¯¯‡®®.žýôS|óÍ7زe‹Bñ(›sÔ]‡ýWš˜˜ ;;cÆŒAHHìííÁãñ°nÝ: >ÍÖñññÁÕ«W›•(€ÆŸ!Û·oG@@† øùùaÆŒ°±±Áĉ›ý´mItt4îß¿ððp˜™™áûï¿GPPltÅ‹:Ô}4—.mÀ©S«8ffßäÚÚ]󃮧§‡}ûöaÿþýøé§ÆÒËæÍ›all GGGL›6 öööضm›Ò}wT?-ÑÒâÀÅe6ož‹¼¼MØ·o)fÏv„ž^p8hiÑE%ÊØ³güýý±víZØÙÙ! nnnغuk³¶þþþ¨¬¬lñ¼oß¾ÈÎÎF]]¸\.&NœˆŸ~ú ÇŽÃÛo¿­P,/’sÔY‹÷ÀkzóøüŽ©ŸÕ××C Ȇ¤iEÞº:1ÒÒ®àðáì§c‡K©O™‚§ôOSMÃçóáëëÛîH‰ÊJŽÏERR²²ŠÁЧOOäçw¿2EG}ÎÕ‰²9G >s<]]]MÄŠÒÓë™3GcæÌѨ®®ÅÉ“ùŠñÚk¦ª´À̬'Ç#0p<îÜy„£GÿPèÑ š˜sº~±SŒõáãã gU‡Bп¿)–/Ÿªê0Èß´7ô­«§dLQK]-Ù¶§kžm"„ CɘBÔ•)H—£¯o‹-[R4Þ¯gO]€žžÎs÷ÀÓ‘ÝÏÈH_6öxĈþjqù:é~(“.GG§/vìH‡ÃŽÎ³½žŸM¯µ‰‚üý]åÛìyB^µV“ñÙ³gáîîÞ™±¨­üü|Lž¾ür+""Ž@,–È& jÓ§x¥ñ©úœ«“1—Ëíì8ÔÚäÉ“5þb‰U«V¡´´TÕa¼rfffpwwÇ»ïNƨQÿ@`਩©Shr§Þ½ 1}úÈNˆR=Ðçü™ `ìØ±*¡Å+ðé*Š‹Àß'JK>D¾e=zhaÙ27¬_?»£#D&FS.ÍÆÆ?ÿ‚I“lÛœ7D,–âñãZüùç½NŒŽgèȘt ‰6ÁÞ½¿ãï·Xâp“vMM=ÊËÃÉi |}áåå}ÕLº›JƤ[‰=5k!•2Ùh mm-lÜ8‹O@VÖ-$&fáðaêëŘ2e¼½0cÆ(¹‘„t0JƤûIM-À¿ÿƒúz $)´µµ›»QîîÐÕÕµ8u*‰‰Yøý÷"ôêe€Y³ì±xñŒi¥ÂèIEɘtOW¯ÞÅÂ…;q÷nfÌ…ÿþwI«mÿú«GŽpàÀyܾ]!C,Áå:aÁ‚±té(”ŒI÷õàáá X¾| œœ¶Û^*e²2Frr6Äb)Ü܆ÂÛÛ o½5šî B^%cB^Äãǵ8}úY£_?cÌšå?¿±1¢¿ªÃ#š‡’1!/ëÏ?ïáÈx¼Lüï•=z¼½0þ03ëÙ~„P2&¤ãH¥ çÎ!!áNœÈƒD"…§§¼½0uêp*c¶P2&äUxü¸ÇŽý„„K¸té,,zÁÛÛ ~~c1hPßö; Ý %cB^µ7îÇËDBB&îÝ«–•1¼½`jj¨êðˆz dLHg‘H¤Èȸ„„KHIÉc eŒiÓ†·y¹6éò(¢ ?Á±c9²2†¥e/ÌŸï„€WØØ˜«:<Òù(¢j……eHHÈŸŸ‰û÷Ë ŽÃœ9c`d¤§êðHç dLˆºh*cÄÆžÇ©SùÐÒâÀÃà ŽÃĉ¶íÞºžh4JÆ„¨£ªª?ž‹2Ÿÿ?ôïoйsß 2F×Eɘuwýz³Àã]ÄÇ"¼ñ† ¸\gÌ;={R£‹ dLˆ¦hhà·ß®!11 §NåC__žžvàr©Œ¡ù(¢‰=ªAJJ.bbΡ à/XY™aΜ1X´h¬­û¨:<¢_ÕᨇÃǃªBH i¢é†llÌabR¯ê0Ès(Bˆ dL!j€’1!„¨JÆ„… …B„„„`àÀ000€­­-"""P[[ øî»ï`ee©T*·c ¯¿þ:¾ýö['Ìž`„ ÈÉÉQ*‘H„°°0ØÛÛÃÈÈ...غu+ÄbqÇlp'¢dLQXpp0’’’pûömìÙ³GEhh(€Ë墬¬ rë ”––ÂÛÛ[ö\FFîÞ½‹»wï"//¶¶¶ðõõ…¢¼ª««áää„‹/"22«W¯Fll,<<< ‘H:nÃ;#„tK\.—q¹\¥Ö155e.\{.==Y[[ËþvwwgÁÁÁrmÖ®]ËÜÜÜd`EEErmÊËËV^^®P,!!!lÒ¤IL,Ë=/ ™ ûá‡ê§)§pûW€OGÆ„…™˜˜ ::²ç&OžŒ’’Ùß~~~HLL”;2MNN†¯¯o›}ëèè@WW½zõR(–ØØXlذÚÚÚrÏ÷ìÙaaaˆ‹‹S¨uAɘ¢°Ý»w#-- VVVððð@TT”\"€¹sçâáÇ8wîàÚµk(,,lvu›H$‚P(„P(Ä;wðñÇ# zzíO˜ÿèÑ#”••ÁÁÁ¡Å厎Ž(((xÁ­T JÆ„…yxx ¤¤ééé˜4ibbb0xð`äáTÁ±ŽŒcU@|´X†  ˆZEJ¥ Á+j[E0 ˆI lö÷Çö·ÆRØÂ&ÈùŒÜ=¹÷œ³—/÷n¸Ç„ ( d˜;dD‚ºAØ€ºAØ€ºAØÀç&ŒJ¥’Éd†›p£GGG{{{q¤…BÑÚÚÊÍ-Z Essó+¥.Ã6þøãÎbáó ÂÔ ÂÔ ÂÔ ÂS×Mmm-A\ºúî»ï‚صk×PåÐßp‚ jkkY»5.¦®½Ô××ÛÙÙ ‡gŠ¢233%ÉPù7n\tt4 gÚÜ3"u£ÑhZ[[‡ÃsuuuMMÍ‘#GnÞ¼yïÞ½!ñiggG¯^×6÷˜nèõ<77wêÔ©6lèîîf^¥(jË–-^^^Ož<™;w.Lœ8‘~©½½}õêÕvvvNNN[¶lQ©TýòòòfΜiee% ÓÓÓ{ff¦··÷¢E‹¦M›ÖwÉ¡(*99yÆŒ666ï¾ûî¹sçè ¨o,ú^ ?NwÓIòóóE"Ñøñãi AG>}º½½ý®]»ÒÓÓ]]]ALLÌMô@q‚\./**2ÜG&“€X,¾wï^YY™H$Ч† Ó“ìããSWWWUUåéé¯×ÈŒêìì´´´LNNnjj:räŸÏïìì¤(J£Ñ¸ºº¦¤¤Põí·ßzxxh'FQÔáÇ'Ož|ñâÅ–––Ë—/‹D"ÚÞ_,??¿+W®Ü¼y“6,]ºT¡Pdgg}k¨P(ÒÒÒàã?V()))LܺuëÖ­[ƒûÁ°ÅätSUUE_J$‘HD£¢¢àîÝ»Ú=évOOÇcæ+''G$é52£ÚÚÚÌÍÍ÷ìÙóôéSFÓÑÑA’$EQeee|>ŸþñTTT@uuµv8OOÏŸþ™I8## Ä¢ï…ÞW7W¯^¥(Š$IÉd´Q*•Ò÷¥Ó¦;€KݘÐ>EãîîN7¦M›ÖÐÐ@·oܸ±`Á‚„„„¾ýår9I’nnnô¥H$jhhÐkd†Œ?¾¨¨¨¬¬ÌÉÉÉÛÛ»¤¤ÄÌÌ 233{{{íì삘3gèlUuuužžžÌåŒ3úK€¹Ã7ëèètt†±cÇ€¹¹¹NÛ¤09Ýп”pïÞ=zZ ///99933³¨¨H§ÿ„ x<^}}=}YWW7yòd½FfˆR©Ôh4'Ožlkk ]¶lY[[I’‰dïÞ½ÿgÓ¦M‰„Òª£uqqÑ>ª©©é/ºý?ï¡úƒàfYø>µpáB™Lvýúuww÷ØØXíµ=..nÊ”)J¥’6vttÐö   ŸúúúêêjØØX½FÆ•R©´²²:uêTKKKjjª•••R©,**âñxr¹œÉ§¼¼¤R)3pÿþýNNN—.]zòäIaaáÔ©S ‚0‹ê³O1iƒÖÖZûT_£N»?FõóMZZš‹‹‹Ý_|ÁH„î T*§L™§V«ßyçkkkÚÞÖÖbkk;iÒ¤/¿üR©Tê5j»’H$nnnÓ¦MËÍÍ¥(*""B,kç£ÑhÜÜÜ¢££™$I&%%¹¹¹ __ßÜÜ\{{ûŒÅ´uÒFÝü3× 'é°$//ïæÍ›Ìå©S§¼¼¼Œ˜£ú¹Ø”©ªªZ¹r¥T*íêê*++‹‰‰ 3vRÆÓº-ÃØØØDDD; CDEEuuuùûû·´´…Â5kÖ˜xÂÃAqòÿîš››oß¾½`ÁbZè÷zÜUâ>…°uƒ°uƒ°uƒ°Ó÷S\†û—ÈåÖ#è(@¥RYYYq‹#ÝXZZ1T•PÐÙÙy)4Ôkþü×Ë 7n78Ò@ ðööæ&ÖpìØ¯jµF*}bì\L|¾ÑONNA@yùŸr¹Âع˜"¨=<|Ø&•þEQ@ÄéÓRc§cŠ nô›[Éã™IjNž¼aìtLÔ²²nôöþý‘+55uuÍÆÍÇAÝèrçNSm­àïc;ss³3g*›’ ‚ºÑ%7·’Ïç1—j5nUz@ݼEQ'OÞèí%µ´VU=4VJ¦ êæ%¤Òí:F>Ÿwæ ¾«z ÔÍKœ9#57çé{{ɬ¬r’Ä'|êæ$©ÉÉ)W«É¾/µµu^¿~Ÿû”LÔÍ JKeOŸvé}‰Ï7;}º‚ã|LÔÍ .]º|>þÇã™ñx·I’ºp¡ÊØ š&T—ntçNŸîÈ\FEeÿwÖ¬¿ÏÃÇÿ‘ò2E8ªK‰8:~™œüÉòå^ÆNÄÁ} aêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaêaÃKŸÓÖÓÓ“™™©R©Œ•©QPPðøñucgaˆÅâ7ÞxãÅ5¥Evv¶Ñò2=x<A˜; S!00P[*/­7½½½PTTd¤Üeûöí´6ðùaêaêaêaÃ0êæÑ£G .Öát¦'EQ;wîôóóÓi¿’w~†ñsö­­­‡Ïß@­­­‰D§=ÊŽùÆõF „‡‡Ÿÿ¾º»»ÀÁÁA§=ÊŽù´n(Š:}úô'Ÿ|²xñâÈÈÈÊÊÊ… RuöìÙÕ«W/Y²dÓ¦M×®]Ó^à·ß~ ‹ÅAAAùùù:>鞥¥¥!!!ï¿ÿþþýûÕjµvÄC‡………={öL£Ñdff†„„,^¼øóÏ?¯©©­û³Ï>€>ø@§Ý×®][»v­¯¯ï‡~˜‘‘$I;v, Àßß?11±³³³?£öÝ1mº!•Jª««èÿþý»wï¦])•J___™Lf óc€Aëæüùó?ýôSXXXzzúªU«àÂ… ééé‘‘‘ÁÁÁТR©âããýýýé[Ú½{·Þ£Œ3gÎ$&&&$$üþûïô,EQ)))R©tïÞ½ ;;["‘„‡‡§§§‡„„$''k{8xð äääè´õÒÕÕëîî~âĉõë×>|¸½½ýÔ©SÅÅʼn‰‰III>¿ªª Äb1AFŸà Z7MMMÚ¿ B¡]]]ãK`cÇŽMJJº}ûöG}´qãÆªª*½óâääD7œ[ZZèöÝ»w½¼¼˜_ñ–––¾ÑÙÁçó¢¢¢ÂÃÃ/^¼Hår9“†‹‹Ë¼yóú3j£ó]LÎÎ΃òoff6oÞ¼âââgÏžUTT,Z´HoÂÏa­;;»ºº:æòÏ?ÿ€ &Ü¿ÿâë'ÿúë/í!ÝÝÝ&>>>//oñâÅß|óMGGG_Ï tãáǶ¶¶t;!!aÓ¦MW®\©¬¬€‰'öÎŽîîîøøø+V¤¦¦nܸ‘6ÚÚÚ>~ü˜n×ÖÖÒ?½Fzsyò䉶g>Ÿ?(ÿ°`Á‚’’’«W¯¾ùæ›ööözæx~ 3hÝøùù:t¨´´´­­íúõë©©©àï’R^^®P(*++?®½¢±uëÖâââçÏŸ«Õj>ŸOïSçÏŸþü9Óí‡~xôèÑ;wÒÒÒÞ{ï=Úheeõúë¯íÝ»·§§gùòåÚÑ=ÊúÎÕjuoo/ŸÏïéé9vìtuu‰Åâ´´´û÷ï߿߾}r¹ô­­­ ??¿««KïSÂÀýÀÌ™3I’üñÇÅb1ãÁ¸óc˜Aÿý& €$É´·· …ˆˆˆ;vøûû“$™””ôìÙ3uëÖ}ÿý÷Ì ‹¯¿þ:%%¥¹¹ÙÑÑ1..ÎÂÂöìÙãåå5f̺ۢE‹6oÞ¬R©|||‚ƒƒ™¥‚‚‚ 322V­Z¥V«:ÔÚÚêææC¿/`µµõúõëwìØñÚk¯ùøøDEEeee©Tª­[·ªTª¹sçFDD@ppp_£@  =xðà‰'"##KJJXû33³ùóç_ºtiþüùŒãÎa^úžÄ¬¬¬€€€AÕQzôè’%K†Äóh §§§©©é—_~Yºt©±s(CsΰbÅ •JµmÛ¶öööI“&ùùù-[¶làÃÇŒ3¨þƒ¥¿sYájjjbbb–/_îå¥ÿ;`‡{~Xðo÷)d40\û2Ú@Ý l@Ý l@Ý lxeu3Rj$F(¯¦nF\ĈcëD]#áàà`ii©]ðvíZúˆ8::úÁƒ ×h€ððp¡PØÛÛ;@ÿLÄìÙ³ ÔHŒ8^MÝÐ5 {öìQ*•îîî´Q§†ÁÅÅ¥?£6j$⟩‘ …›7oŽûåžWsŸq5#ŽWs½Ñ®a8~ü8hÕ0Lœ8öíÛG—é525ÞÞÞÿX#aØ?hÕHpS¥Ï ¯¦nL¿Fb¤ƒçS\` FbD€çS\3k$ˆߧFzÄeÄëÆDôѳfÍ:{ö¬±³zpŸBØ€ºAØ€ºAØ€ºAØ ç¹øÜ¹sÜç˜2º'$ÚJû믿òx<#冘4›7oÖ– ¡sÞ‹ Ÿo6 n6 n6 n6 n6ü˜¿¯^âûw;IEND®B`‚pktools-2.6.6/doc/html/pages.html0000644000113200011300000003612012647637663013647 00000000000000 pktools: Related Pages
pktools  2.6.6
Processing Kernel for geospatial data
Related Pages
pktools-2.6.6/doc/html/dir_0f38b5d14ac73b43e2a48a75f9e70be8_dep.map0000644000113200011300000000066412616110567020476 00000000000000 pktools-2.6.6/doc/html/tabs.css0000644000113200011300000000221312647637661013317 00000000000000.tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #283A5D; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm.html0000644000113200011300000001373112647637662026465 00000000000000 pktools: qgis.pktools.pktoolsAlgorithm.pktoolsAlgorithm Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pktoolsAlgorithm.pktoolsAlgorithm Class Reference
Inheritance diagram for qgis.pktools.pktoolsAlgorithm.pktoolsAlgorithm:
Collaboration diagram for qgis.pktools.pktoolsAlgorithm.pktoolsAlgorithm:

Public Member Functions

def getIcon
 
def checkBeforeOpeningParametersDialog
 
def help
 

Detailed Description

Definition at line 41 of file pktoolsAlgorithm.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/pkfsann.html0000644000113200011300000001732712647637662014217 00000000000000 pktools: pkfsann
pktools  2.6.6
Processing Kernel for geospatial data
pkfsann

feature selection for artificial neural network classifier pkann

SYNOPSIS

Usage: pkfsann -t training -n number

Options:

Advanced options:

Description

Classification problems dealing with high dimensional input data can be challenging due to the Hughes phenomenon. Hyperspectral data, for instance, can have hundreds of spectral bands and require special attention when being classified. In particular when limited training data are available, the classification of such data can be problematic without reducing the dimension.

The utility pkfsann implements a number of feature selection techniques, among which a sequential floating forward search (SFFS). Also consider the SVM classifier implemented in pksvm, which has been shown to be more robust to this type of problem than others.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input test set (leave empty to perform a cross validation based on training only)
    t training std::string training vector file. A single vector 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)
    n nf unsigned short 0 number of features to select (0 to select optimal number, see also ecost option)
    tln tln std::string training layer name(s)
    label label std::string label identifier for class label in training vector file.
    balance unsigned int 0 balance the input data to this number of samples for each class
    random random bool true in case of balance, randomize input data
    min min int 0 if number of training pixels is less then min, do not take this class into account
    b band unsigned short band index (starting from 0, either use band option or use start to end)
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    offset offset double 0 offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]
    scale scale double 0 scale value for each spectral band input features: refl=(DN[band]-offset[band])/scaleband
    a aggreg unsigned short 0 how to combine aggregated classifiers, see also rc option (0: no aggregation, 1: sum rule, 2: max rule).
    sm sm std::string sffs feature selection method (sffs=sequential floating forward search,sfs=sequential forward search, sbs, sequential backward search ,bfs=brute force search)
    ecost ecost float 0.001 epsilon for stopping criterion in cost function to determine optimal number of features
    cv cv unsigned short 2 n-fold cross validation mode
    c class std::string list of class names.
    r reclass short list of class values (use same order as in classname opt.
    n nneuron unsigned int 5 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)
    connection float 1 connection reate (default: 1.0 for a fully connected network)
    w weights float 0 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)
    l learning float 0.7 learning rate (default: 0.7)
    maxit unsigned int 500 number of maximum iterations (epoch) (default: 500)
    Usage: pkfsann -t training -n number
pktools-2.6.6/doc/html/inherit_graph_44.map0000644000113200011300000000027412647437044015503 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral__inherit__graph.map0000644000113200011300000000015312616110567030223 00000000000000 pktools-2.6.6/doc/html/inherit_graph_5.png0000644000113200011300000001111212616110567015412 00000000000000‰PNG  IHDRXT=ô³bKGDÿÿÿ ½§“ÿIDATxœíyPSWßÇÏMH)j5@Â*ÈjQª—Qª€[µ£ÈV´ÅZ¬h[[ÔQ«¡ú8õQë<ÝhõñmQ Š<( u¥ ¶¢K"ÐBÂ$Á@rsïûÇyšÆ$@rU–p>ݳäÜï ùr–œó F’$@ ”  µbƒüƒ@Pù òA›¡€ NcccJJJOOÏP E$''GEEé’È?#˜²²²‚‚‚èèè¡2Zøõ×_srr¬Šœœœ¡–0ZX½zµAšÿ ÔAþA ¨ƒüƒ@Pù òϨ ©©)>>ÞÓÓÓÞÞ~ÆŒyyyÏØ fŠç"ÕRöíÛ‡aØ äEGGëïí¼ÿ¾Naÿ¥ücý´··OŸ>Íf ‚[·nÅÆÆÆÅÅYÔˆD"qppÐÏ)--m~šgi$Ifgg{xxƒ¢sçÎgšYj™Ä~¬–’’£Ÿ“ššaѽÄb±þ½b±Ø¢úi2•••†]¾|P[[«//99y„ ÍÍÍÆwì¿´¢££aÇ¥õ?ÖOnnî‡~¨ŸÃçó322àuggçÛo¿íàààææ–šš w3\¼x1((ˆÅbMš4éÇÌž=Àãñú¿WAAìëœá˜ Çq>Ÿïáááèè¸fÍšÎÎNãÖŒ5ÀÕÕ«W=<<^{íµuëÖÁšJ¥’Ífß¹s&³³³ÃÂÂ""" ú“-[¶¼÷Þ{¤©:ý—ZÀ³ÿ@ æô?r¹ÐÑÑÑW…„„„ðð𺺺ªªª)S¦¤¥¥)•J[[Ûï¿ÿ¾¹¹9##ÃÆÆF©T÷?wïÞUè¡Ñhººº˜LfRRÒ£G²²²---‡ ¬ªª …³fÍJMM%þßk€–,YríÚµK—.q8FC’dVVV`` A$IáååuôèQ’$wíÚ¨/O,‹D";;»ÌÌLÒ¨ÿé§´Œû䟌9þéèèÈår“¥jµšN§WWWÃäùóç}||::: ÆáÇår9A …B«ÕûÇ€‹/öööÞ»wO©TjµÚââbø1õ÷÷?þ<|UMM ¼ÖoͤX¡ªªŠ$IÇy<ÞÕ«WI’\ºté`Ͳ²2›¶¶6’$oß¾  …:ypxùå—_Ž;¶±±ÑØ?}•ö¿:ÆÏårkjjô3ûí·3f>><<\"‘…ÂÀÀÀ={ö¨T*‹uîܹÖÖÖcÇŽ±X,•JG8 …¾ ˜Z“Ëå†vwwoÛ¶ PQQÁç󃂂„B¡P(œ3gÎúõëÉ¿ÆoºÖŒ5 ¨pwrrâr¹pºB’äõë×étºL&ÓÕùý÷ßáå}÷Ýwðë“â Jûͬ 3ýC’d}}}TT”‹‹Ë˜1cfΜyáÂ]QGGGbb"‡ÃqvvÞ²e‹J¥‚-{{{3™Ì€€€üü|’$5Mhh¨½½=|•Iÿ$yäÈ‘ &¸»»§§§ÇÅÅ999õôô¤¦¦º¸¸Œ7...ÎÄ Z3Ö` ¢ ÖÐ ý£Õj£££QH>“`†ã¸.IäéÓe‡¶·+ ‚ÔË'Äb¼~òD]]ýH$‚†‘66¶ÿù§Ç :æííäïÏ‹Š ñóãùùñ¼¼˜LˆÓsæÌÑ׃|Ðü‡"7oŠ÷ìɉ¤í¨ú­–(/¯KNþ?‘H*‘´j4Z€«ëx__îâÅS}}¹~~\__®þH 1BAþ±˜šš¦Ý»ó~ýõ>†éw;ú47?öõ冇¿²a×ߟçãõ··dˆAùÇh4ÖÙ³’O>)‡É¾ÌèíÅÿùÏÕϸ‡þ oß,€ÍžVR"Ój >@¸0‘H:8ªCuÿXqH¾¾P*Ëvïžž™¹î£¾ñÆ«^^ŽÐEt:ÍÎŽ©ï(ƒ®[B@X1Ço0$ßòåËÁ˜1c ãââòóó-Zd~#‰dæÌ™mmmºœÒÒR///j’Œ[{p8¬E‹¦,Z4&Õj¼¶Vzï^smmsUÕ£{÷š::º¶®®å…*A (ú‡ÏçÏŸ?ÿøñã0ùÊ+¯H¥ÒÇ[ä‚ ÚÛÛõsŒ0f~kƒ“i3uªÛÔ©nºœŽŽîšš&‘Húê«îƒ,1 xBÕ$<¯´´T?G¡P444Àk¹\¾víZ‡ãêêúÉ'ŸÀ#Á.\˜:uª­­­——×?ü@’$‡Ãp¹\“§ju\¼xqÚ´ivvv<ïóÏ?'IR£ÑìÙ³ÇÝÝÝÁÁ!11 6hÍX<|åÊww÷éÓ§'%%é”ÛÙÙÁsóý€*ÿXqH¾Þ,äÄÓPñ‡äàÍBþA< •õ7+ɇ@XÅõk« ɇ@X Eÿìß¿¿¸¸811±´´´ªªê³Ï>ûꫯàç˜Á`ÄÄÄ|ðÁ<¨®®þôÓO0 [¸pannnWW—Z­f0löÿv)•Ê~nÔÛÛ«V«™L¦J¥âóù…B‘˜˜¸k×®êêêêêêM›6544èêÃÖLj0hyîܹ8ŽïÝ»711‘Ú›€@P\#­1$߀4ÿA|8fýú°Ï>ûϵ&£ ¸¸¼Ìb1®^­ù÷¿‹õã‡øûóPükù‡"þþ¼Ó§7üò‹h÷î<±X Àßß¤ÙØÐgÍòþ⋘”ÉëâWÕÔ4åæþÞÖ¦ŒËòôt„¡Þ`+w÷ 4Úð:r‹èCÿÐéôìììávpzø`cóÔ;6w®ßµkÛþûßJ>ÿ?­­ ¸G£ýÅ.w—;nî\?]ÎãÇO`üDhªŸ®miQ˜LOOžŸ:ÊÇljNïsŒ]RR²`ÁµZýüŸÑ[·n=xð .i¸ÿ@"‘ܾ}{ÐU ètúÒ¥KY,1AaüÞï¿¿N„Z­ýá‡õ}Å5‰ÎQ í0(iCC;€Á {y9ê5q"' ÀYfþ~ã(Ù,28r䈻»»þŽ~ÿôy2hñãá pktools: qgis.pktools.pksvm.pksvm Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pktools.pksvm.pksvm:
Collaboration diagram for qgis.pktools.pksvm.pksvm:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string TRAINING = "TRAINING"
 
string ITERATE = "ITERATE"
 
string LABEL = "LABEL"
 
string GAMMA = "GAMMA"
 
string COST = "COST"
 
string OUTPUT = "OUTPUT"
 
string MASK = "MASK"
 
string MSKNODATA = "MSKNODATA"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 39 of file pksvm.py.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/qgis/pktools/pksvm.py
pktools-2.6.6/doc/html/inherit_graph_28.map0000644000113200011300000000101012647437044015472 00000000000000 pktools-2.6.6/doc/html/inherit_graph_35.md50000644000113200011300000000004012647437044015402 00000000000000193a7f60a5ea0dd260be1bdb91bbdc88pktools-2.6.6/doc/html/md_installation_plugins.html0000644000113200011300000000576312647637662017502 00000000000000 pktools: installation_plugins
pktools  2.6.6
Processing Kernel for geospatial data
installation_plugins

QGIS plugin

A selection of the pktools utiltities can be run from within QGIS, via the Processing Toolbox.

Make sure pktools is installed on your system first. Then, you can install the pktools Plugin via the QGIS menu:

Plugins, Manage and Install Plugins...

Then set the appropriate path of the pktools bin folder via Processing Options, Providers, pktools, pktools folder.

Click OK and open the Processing Toolbox. The pktools utilities should appear when the Advanced interface is selected.

pktools-2.6.6/doc/html/ftv2mo.png0000644000113200011300000000062312647637661013602 00000000000000‰PNG  IHDRÚ}\ˆZIDATxí1Kû@ÆiƒØB…Ò¡(h¬"EÄI'ÁoàªèÚ©ßÀáâä 8ùçR-‚â B«TPˆï]z¥B’3 _Þã’»ç}ŸË]VÇ÷}€ÌÈdIæ®i쟯JØ–b¸šÍÃõ+º™|KÂ…°,[Pï\ʘMÆ¢#€ä…F`JݤìÛk³úA±àþè?ØY4ck6"¹Z)ê¸0SHM¨@ï㋺WÖmo¼4èHJ¨Àÿö+…QobŒút ¤ú’*Ð~êè8_+3Y-ñðÜå½÷ ˜PwA¶+^ý}ºì£+xìhÏ•MAE]€TD~EÞߴ^R)`ÖAùŸÏ9©pÔq-Û¾õÛ3tÝÊÆ›ˆÃTÐHÈ)€ ½Š’ICªxëd#1ôú§é€ m@Vüý?Zæßgo_½3-³\IEND®B`‚pktools-2.6.6/doc/html/ImgWriterOgr_8h_source.html0000644000113200011300000005315212647637662017113 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgWriterOgr.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgWriterOgr.h
1 /**********************************************************************
2 ImgWriterOgr.h: class to write vector files using OGR API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGWRITEROGR_H_
21 #define _IMGWRITEROGR_H_
22 
23 #include <assert.h>
24 #include <fstream>
25 #include <string>
26 #include <sstream>
27 #include <map>
28 #include <vector>
29 #include "ogrsf_frmts.h"
30 #include "ImgReaderGdal.h"
31 #include "ImgWriterGdal.h"
32 #include "ImgReaderOgr.h"
33 
34 //--------------------------------------------------------------------------
36 {
37 public:
38  ImgWriterOgr(void);
39  ImgWriterOgr(const std::string& filename, const std::string& imageType="ESRI Shapefile");
40  ImgWriterOgr(const std::string& filename, ImgReaderOgr& imgReaderOgr);
41  ImgWriterOgr(const std::string& filename, ImgReaderOgr& imgReaderOgr, bool copyData);
42  ~ImgWriterOgr(void);
43  void open(const std::string& filename, ImgReaderOgr& imgReaderOgr);
44  void open(const std::string& filename, const std::string& imageType="ESRI Shapefile");
45  void close(void);
46  int ascii2ogr(const std::string& filename, const std::string &layername, const std::vector<std::string>& fieldName, const std::vector<OGRFieldType>& fieldType, short colX=1, short colY=2, const std::string& theProjection="", const OGRwkbGeometryType& eGType=wkbPoint, const char fs=' ');
47  OGRLayer* createLayer(const std::string& layername="New layer", const std::string& theProjection="", const OGRwkbGeometryType& eGType=wkbUnknown, char** papszOptions=NULL);
48  OGRLayer* copyLayer(OGRLayer* poSrcLayer, const std::string& layername, char** papszOptions=NULL);
49  void createField(const std::string& fieldname, const OGRFieldType& fieldType, int theLayer=0);//default: get back layer
50  OGRLayer* getLayer(int layer=0) const {return m_datasource->GetLayer(layer);};
51  std::string getLayerName(int layer=0){return m_datasource->GetLayer(layer)->GetLayerDefn()->GetName();};
52  int getFields(std::vector<std::string>& fields, int layer=0) const;
53  int getFields(std::vector<OGRFieldDefn*>& fields, int layer=0) const;
54  void copyFields(const ImgReaderOgr& imgReaderOgr, int srcLayer=0, int targetLayer=0);//default: get back layer
55  void addLineString(std::vector<OGRPoint*>& points, const std::string& fieldName, const std::string& theId, int layer=0);
56  void addRing(std::vector<OGRPoint*>& points, const std::string& fieldName, int theId, int layer=0);
57  void addLineString(std::vector<OGRPoint*>& points, const std::string& fieldName, int theId, int layer=0);
58  void addPoint(double x, double y, const std::map<std::string,double>& pointAttributes, std::string fieldName, const std::string& theId, int layer=0);
59  void addPoint(double x, double y, const std::map<std::string,double>& pointAttributes, std::string fieldName, int theId, int layer=0);
60  int addData(const ImgReaderGdal& imgReader, int layer=0, bool verbose=false);
61  OGRFeature* createFeature(int layer=0);
62  OGRErr createFeature(OGRFeature* theFeature, int layer=0);
63  int getFieldCount(int layer=0) const;
64  int getFeatureCount(int layer=0) const;
65 #if GDAL_VERSION_MAJOR < 2
66  OGRDataSource* getDataSource(void) {return m_datasource;};
67  OGRSFDriver* getDriver(void) const {return m_datasource->GetDriver();};
68 #else
69  GDALDataset* getDataSource(void) {return m_datasource;};
70  GDALDriver* getDriver(void) const {return m_datasource->GetDriver();};
71 #endif
72 
73 protected:
74  void setCodec(const std::string& imageType);
75 #if GDAL_VERSION_MAJOR < 2
76  void setCodec(OGRSFDriver *poDriver);
77 #else
78  void setCodec(GDALDriver *poDriver);
79 #endif
80 
81 // OGRLayer* getLayer(int layer=0);
82 
83  std::string m_filename;
84 #if GDAL_VERSION_MAJOR < 2
85  OGRDataSource *m_datasource;
86 #else
87  GDALDataset *m_datasource;
88 #endif
89 // vector<OGRLayer*> m_layers;
90 };
91 
92 #endif // _IMGWRITEROGR_H_
pktools-2.6.6/doc/html/pkascii2img_8cc_source.html0000644000113200011300000007156212647637661017076 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkascii2img.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkascii2img.cc
1 /**********************************************************************
2 pkascii2img.cc: program to create raster image based on ascii file
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <string>
21 #include <fstream>
22 #include "base/Optionpk.h"
23 #include <assert.h>
24 #include "imageclasses/ImgWriterGdal.h"
25 
26 /******************************************************************************/
72 using namespace std;
73 
74 int main(int argc, char *argv[])
75 {
76  Optionpk<std::string> input_opt("i","input","input ASCII file");
77  Optionpk<string> output_opt("o", "output", "Output image file");
78  Optionpk<string> dataType_opt("ot", "otype", "Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image","Byte");
79  Optionpk<string> imageType_opt("of", "oformat", "image type string (see also gdal_translate)", "GTiff");
80  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
81  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box (in geocoordinates if georef is true)", 0.0);
82  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box (in geocoordinates if georef is true)", 0.0);
83  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter)");
84  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter)");
85  Optionpk<string> projection_opt("a_srs", "a_srs", "Override the projection for the output file");
86  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
87  Optionpk<string> description_opt("d", "description", "Set image description");
88  Optionpk<bool> verbose_opt("v", "verbose", "verbose", false,2);
89 
90  bool doProcess;//stop process when program was invoked with help option (-h --help)
91  try{
92  doProcess=input_opt.retrieveOption(argc,argv);
93  output_opt.retrieveOption(argc,argv);
94  dataType_opt.retrieveOption(argc,argv);
95  imageType_opt.retrieveOption(argc,argv);
96  option_opt.retrieveOption(argc,argv);
97  ulx_opt.retrieveOption(argc,argv);
98  uly_opt.retrieveOption(argc,argv);
99  dx_opt.retrieveOption(argc,argv);
100  dy_opt.retrieveOption(argc,argv);
101  colorTable_opt.retrieveOption(argc,argv);
102  projection_opt.retrieveOption(argc,argv);
103  description_opt.retrieveOption(argc,argv);
104  verbose_opt.retrieveOption(argc,argv);
105  }
106  catch(string predefinedString){
107  std::cout << predefinedString << std::endl;
108  exit(0);
109  }
110  if(!doProcess){
111  cout << endl;
112  cout << "Usage: pkascii2img -i input.txt -o output" << endl;
113  cout << endl;
114  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
115  exit(0);//help was invoked, stop processing
116  }
117 
118  assert(input_opt.size());
119  assert(output_opt.size());
120  ImgWriterGdal imgWriter;
121  ifstream ifile(input_opt[0].c_str(),ios::in);
122  //get number of lines
123  string line;
124  int nrow=0;
125  int ncol=0;
126  int irow=0;
127  string interleave="BAND";
128  vector< vector<double> > data;
129  vector<double> row;
130  double value;
131  try{
132  while(getline(ifile,line)){
133  row.clear();
134  //read data from ascii file
135  istringstream ist(line);
136  while(ist>>value)
137  row.push_back(value);
138  if(!ncol){
139  ncol=row.size();
140  data.push_back(row);
141  }
142  else
143  data.push_back(row);
144  if(verbose_opt[0]){
145  for(int icol=0;icol<row.size();++icol)
146  cout << row[icol] << " ";
147  cout << endl;
148  }
149  ++irow;
150  }
151  nrow=irow;
152  assert(ncol);
153  assert(nrow);
154  if(verbose_opt[0]){
155  cout << "nrow: " << nrow << endl;
156  cout << "ncol: " << ncol << endl;
157  }
158  }
159  catch(string theError){
160  cout << theError << endl;
161  }
162 
163  GDALDataType dataType=GDT_Unknown;
164  if(verbose_opt[0])
165  cout << "possible output data types: ";
166  for(int iType = 0; iType < GDT_TypeCount; ++iType){
167  if(verbose_opt[0])
168  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
169  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
170  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
171  dataType_opt[0].c_str()))
172  dataType=(GDALDataType) iType;
173  }
174  if(verbose_opt[0])
175  cout << endl;
176  if(verbose_opt[0]){
177  if(dataType==GDT_Unknown)
178  cout << "Unknown output pixel type: " << dataType_opt[0] << endl;
179  else
180  cout << "Output pixel type: " << GDALGetDataTypeName(dataType) << endl;
181  }
182 
183  imgWriter.open(output_opt[0],ncol,nrow,1,dataType,imageType_opt[0],option_opt);
184  if(description_opt.size())
185  imgWriter.setImageDescription(description_opt[0]);
186  if(projection_opt.size()){
187  assert(dx_opt.size());
188  assert(dy_opt.size());
189  if(verbose_opt[0])
190  cout << output_opt[0] << " is georeferenced." << endl;
191  double gt[6];
192  gt[0]=ulx_opt[0];
193  gt[1]=dx_opt[0];
194  gt[2]=0;
195  gt[3]=uly_opt[0];
196  gt[4]=0;
197  gt[5]=-dy_opt[0];
198  imgWriter.setGeoTransform(gt);
199  imgWriter.setProjectionProj4(projection_opt[0]);
200  }
201  else{
202  if(verbose_opt[0])
203  cout << output_opt[0] << " is not georeferenced." << endl;
204  assert(!imgWriter.isGeoRef());
205  }
206  if(colorTable_opt.size()){
207  assert(imgWriter.getDataType()==GDT_Byte);
208  imgWriter.setColorTable(colorTable_opt[0]);
209  }
210  assert(data.size()==nrow);
211  for(irow=0;irow<nrow;++irow)
212  imgWriter.writeData(data[irow],GDT_Float64,irow);
213  imgWriter.close();
214 }
215 
pktools-2.6.6/doc/html/md_examples_pkcrop.html0000644000113200011300000001003412647637662016417 00000000000000 pktools: examples_pkcrop
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkcrop

Examples of pkcrop

Crop the input image to the given bounding box

pkcrop -i input.tif -ulx 100 -uly 1000 -lrx 600 -lry 100 -o output.tif

Crop the input image to the envelop of the given polygon and mask all pixels outside polygon as 0 (using gdal_rasterize)

pkcrop -i input.tif -e extent.shp -o output.tif
gdal_rasterize -i -burn 0 -l extent extent.shp output.tif

Extract bands 3,2,1 (starting from 0) in that order from multi-band raster image input.tif

pkcrop -i input.tif -b 3 -b 2 -b 1 -o output.tif

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)

pkcrop -i fimage.tif -s 100 -ot Byte -o bimage.tif -ct colortable.txt

Automatically scale raster floating point image fimage.tif to [0:100] and write the output as a single byte image with the given colourtable

pkcrop -i fimage.tif -as 0 -as 100 -ot Byte -o bimage.tif -ct colortable.txt

Crop raster image large.tif to the bounding box of raster image small.tif and use the same pixel size.

pkcrop -i large.tif $(pkinfo -i small.tif -bb -dx -dy) -o output.tif
pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__inherit__graph.map0000644000113200011300000000014712616110567027402 00000000000000 pktools-2.6.6/doc/html/ImgUpdaterGdal_8cc_source.html0000644000113200011300000002213312647637662017514 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgUpdaterGdal.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgUpdaterGdal.cc
1 /**********************************************************************
2 ImgUpdaterGdal.cc: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include "ImgUpdaterGdal.h"
22 
23 ImgUpdaterGdal::ImgUpdaterGdal(void){};
24 
25 ImgUpdaterGdal::ImgUpdaterGdal(const std::string& filename, const GDALAccess& readMode){
26  open(filename,readMode);
27 }
28 
29 ImgUpdaterGdal::~ImgUpdaterGdal(void)
30 {
31  // delete m_gds;
32 // GDALDumpOpenDatasets(stderr);
33 // GDALDestroyDriverManager();//could be used by other objects...
34 }
35 
36 //--------------------------------------------------------------------------
37 
38 void ImgUpdaterGdal::open(const std::string& filename, const GDALAccess& readMode)
39 {
40  ImgReaderGdal::open(filename,readMode);
41 }
42 void ImgUpdaterGdal::close(void)
43 {
44  ImgRasterGdal::close();
45 }
pktools-2.6.6/doc/html/dir_53adf0b982dc8545998aae3f283a5a58.html0000644000113200011300000003461312647637663020012 00000000000000 pktools: /home/kempenep/pktools/src/apps Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
apps Directory Reference
Directory dependency graph for apps:
/home/kempenep/pktools/src/apps

Directories

directory  not_used
 

Files

file  pkann.cc [code]
 
file  pkascii2img.cc [code]
 
file  pkascii2ogr.cc [code]
 
file  pkcomposite.cc [code]
 
file  pkcreatect.cc [code]
 
file  pkcrop.cc [code]
 
file  pkdiff.cc [code]
 
file  pkdsm2shadow.cc [code]
 
file  pkdumpimg.cc [code]
 
file  pkdumpogr.cc [code]
 
file  pkdumpogr.h [code]
 
file  pkegcs.cc [code]
 
file  pkextract.cc [code]
 
file  pkfillnodata.cc [code]
 
file  pkfilter.cc [code]
 
file  pkfilterascii.cc [code]
 
file  pkfilterdem.cc [code]
 
file  pkfsann.cc [code]
 
file  pkfsann.h [code]
 
file  pkfssvm.cc [code]
 
file  pkgetmask.cc [code]
 
file  pkinfo.cc [code]
 
file  pkkalman.cc [code]
 
file  pklas2img.cc [code]
 
file  pkoptsvm.cc [code]
 
file  pkpolygonize.cc [code]
 
file  pkreclass.cc [code]
 
file  pkregann.cc [code]
 
file  pksensormodel.h [code]
 
file  pksetmask.cc [code]
 
file  pksieve.cc [code]
 
file  pkstat.cc [code]
 
file  pkstatascii.cc [code]
 
file  pkstatogr.cc [code]
 
file  pkstatprofile.cc [code]
 
file  pksvm.cc [code]
 
pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm.html0000644000113200011300000001346112647637662024411 00000000000000 pktools: qgis.pktoolsAlgorithm.pktoolsAlgorithm Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktoolsAlgorithm.pktoolsAlgorithm Class Reference
Inheritance diagram for qgis.pktoolsAlgorithm.pktoolsAlgorithm:
Collaboration diagram for qgis.pktoolsAlgorithm.pktoolsAlgorithm:

Public Member Functions

def getIcon
 
def checkBeforeOpeningParametersDialog
 
def help
 

Detailed Description

Definition at line 41 of file pktoolsAlgorithm.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classImgReaderOgr__coll__graph.png0000644000113200011300000001331112616110567020373 00000000000000‰PNG  IHDR‘Ý4 cbKGDÿÿÿ ½§“~IDATxœí}TWþÿ?!By(I" è±RÏVÝÖõiëA\wq}¤ÕÚõ Üöt÷g º =«§* çìv–¢(b‹<œE±*(Ðe­ˆJ¾%AL!MIf~Lw6„äé†ûúëÎ̽Ÿû™ygî½ó¹“;EQ€A k;€3X3ôÀš¡Ö =°fèÁÒÞ¨®®V*•Öre’ãìì¼páBcrÑL©Túûû{xx˜Ç+ŒAúúúÚÛÛÌÌÒÙž:u*—Ë5µK˜QÓS2îÏÐk†X3ôÀš¡‡y5 …AŒïèOsÛ7&Ь¹¹ÙÇÇgâvÆŠ§§ç¾}û&nÇÿ¦²orL I’"‘hâvÆŠÏ‘#G&nÇÿ¦²orƬÙåË—çÎëì윓“ôÓû´iÓ@£Ñ¤¤¤„††º»»¿ùæ›wîÜ¡Ki·3:mNnnnHH—Ëݳg\.€’’’ÈÈH‡ãëëË\µáõ2vÔjuRRR@@—Ë}ï½÷z{{Çí?móæÍ›ÙÙÙŒŸAäææ†‡‡{{{;v (ŠJOOˆˆ˜:uêòåËKJJô6¤===ôI™J‹ŠŠŠ®®.Ê02™lÊ”)éééYYY,K&“ ÆNjj*Ç+**êèè¸r功Ÿ}¨··733“Îäé‚Ë—/ojjª®®æóùû÷ï—J¥l6{ûöííííçÏŸ€îîî‘ëMII™={v}}ýÇ,XðÉ'ŸŒÛ:½jÕªòòòºº:f?¬_¿^"‘dff€H$ÊÌÌœ>}úµk×zzzÊÊÊø|¾ÎŬ©©Ù¶m—Ëíèèá’ÒtuuUTTŒšíGg´7FÕL,;99?~\"‘$Ùß߯Ñh´Ï9444;;›ÉöìY3ц.X__OoæååÍœ9s`` ±±Q&“i4šo¾ùÁÈõþä'?)**¢4440éqø¯í’ö~ ¯éàà íÒœ9srssË.\ 3+ŠsçνñÆ‘‘‘ýýý#\O†1i6¶¶ÑËË«¢¢¢ººÚßßÉ’%UUUC,´µµÍ›7Ùœ;wî¨6gÍšE'ÂÂÂ:;;ÙlvSSSTTÔüùó³³³©·µµ•1¾víÚqûÏx2|'Ýf899Ñ›Ož<™3gs4""nܸxóæÍ¿ÿýï÷ïßß½{·››Û¨W`¬ŒM3…BA’d~~¾X,Þ±cÇš5kÄb±v†   0›?Õ&ýs€¦¦¦ÀÀ@…B±qãÆ„„„ÚÚÚ“'OS¯ŸŸ_KK ®««;|øð¸ý§a„ÑFGÝÀÀ@í³kll.—ñí·ßÞºukänu"ŒM3‚ V®\YXX(•Jœœ8}H&“@|||BBBqqñ‹/®]»vðàAúh__ß_|1< ü±P(¼{÷îŸþô§÷ß```ppÍf+Ф¤$èïï¡^غuëŸÿüçG=zôèÃ?lmm·ÿÆóÁ$&&–––ŠD¢òòòääd‚ ^{íµŠŠŠ¢¢¢ï¿ÿ>44tçÎ÷ïß“Y£Ðn(GíÏ(ŠÊËË a³ÙaaaÅÅÅE©Tª·ÞzËÍÍ¢(µZ’’Âçó]]]-ZT]]MW1¼Ï`_}õUPPÇûøã(ŠJMMõööž1cÆÉ“'cccy<žÞz;J¥ò“O>ñóóóððˆ•H$ãö_¯ŸE€@ ÐNk4š´´´¨¨¨ââb.—«]‘D"IMM iii¥ƒ2ëÃpùò庺:f³  `Þ¼yói4•J5ª53ŽA0 õõõ[¶l©­­•ËåÕÕÕعsçðl,–î$å1±9ÛÁP¨2Ñ;¸‰‰‰r¹<&&¦§§'88xûöíqqq&±<*v«™©´1‹Å:tèСC‡ÌZ‹^Ðk ‚ …Ööš §k†¶«ÙÑúÒÒR>ŸïååõÙgŸÑ{†OhGèÿóŸÿ0eÍh·0Ú›z>3­€_þò—R©´°°^¾|©w*@;B/“ɳeee</!!¡¹¹ÙJg¦;y¦6­€ÊÊJŠ¢4 ½S:“Ú<þ<))ÉßßÍš5ׯ_×h4;)CØÉ3õÑz:ÄÎmõNЊÐ'''777oݺõ¯ýkxxx[[›™ÎÂØ®f#Dëuž—õNÐèÐÓtuu=~ü¸½½ýõ×_wqq1¥ëfÆv53>Z¯w*ÀPf’$KKK×®]»páBŠ¢nݺõå—_Zå¤ñ£ÝPÚTf(ZÃB씾©í¨¼6 .ÌÍÍ¥çl„1õg¥㩬¬ŒˆˆàñxÖúY•J5Bƒi-º»»–.]jLfÛmÍ„ 6V&fvÖ =°fè5C¬z`ÍÐk†CÞ!¢¡¡¡¡¡ÁZÞL„üüFbÃ=Aa$0þÿ‰Câ ½½½*•Ê<.™—õ’%iDUÕÿsrr´¶;ãÁÉÉÉÓÓÓ˜œCî3#ËØ ׯ?R*ÕÔ£G/W®œ3z”±“þìâÅÂÁÁ!?ÿžµ}1;ö ™Tª¼q£A£!5²´ô‘TjçKvÙƒfׯ?$É{e’¤JKY×scšÜcFREØyóˆ¼f==ýß~+оÏnÝjêé18Om ¯YIÉ'‚ ®\©·–?yÍòóï’$©½‡$©üü»ÖòÇ ­Ù³g¢Ú†J$IÕÕ=kkÓóGiûmÍ.]ªc±ôœ‹åpéÒw–÷Ç2 ­ÙÅ‹wU*rø~µZsñ¢Ý6k&t …]zþHQôÑnË{eþŸ'EQ?ûŸy2{úô%ÌœùãÛ¥1$ümOØÏ‰ÅÅ€ŒŒmÖvÄì Ü6NZ°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z`ÍÐk†X3ôÀš¡Ö =°fè5C¬z˜~Ý¥R)[a :::,_µ···³³³Åª3ýº ÝÝö¹0‡!x<^DD„Ū3ý}FQ—Ë={¶É-Û&?¶ðz¸?C¬z`ÍÐk†hh& ÿ4‡ÅLY Ò¬¹¹Ù„ß6dÍÓÓsß¾}¦ªÅ*Øf$IŠD"s[óññ9r䈩j± VÓìòåËsçÎuvvÎÉÉ€… À´iÓ@£Ñ¤¤¤„††º»»¿ùæ›wîÜ¡Ki·lÚé‘­Ñ9o޼͔""777<<ÜÛÛûرc@QTzzzDDÄÔ©S—/_^RRb‹ ©©¿ŽMÑ_n9L&›2eJzzzgggVV‹Å’ÉdÚ_OMMåñxEEEW®\ñóó£õööfffÒy˜ô¨ÖèôªU«ÊËËëêê˜ý°~ýz‰D’™™ "‘(33súôé×®]ëéé)++ãóù£^"cÎ×´XG3±Xìäätüøq‰DB’d¿F£Ñ¾Ê¡¡¡ÙÙÙLþ³gÏŽpíFµF§ëëë™4½误€@ ˜3gNnn.cùÂ… 6¨™uÚF//¯ŠŠŠêêjÿ%K–TUU98 ñ¤­­mÞ¼yÌæÜ¹s'b&,LÏçìè;˜ùÐø“'OæÌùß§¸,E4ëh¦P(H’ÌÏÏ‹Å;vìX³fÎT@PPЃ˜ÍÇOÄÞ/À먨]Wcc£‘gdI¬£A+W®,,,”J¥ƒƒƒNNN‡>$“É >>>!!¡¸¸øÅ‹×®];xð }´¯¯ï‹/¾ÐIjÍx>øàƒÄÄÄÒÒR‘HT^^žœœŒÇ ÿ#///$$„Íf‡……S¥R©Þzë-777Š¢ÔjuJJ ŸÏwuu]´hQuu5íêð^Êk†J€@ ÐNk4š´´´¨¨¨ââb.—k’ó5!VÓÌ6¹|ùr]]³YPP0oÞ¼‘‹L–1ˆÍR__¿eË–ÚÚZ¹\^]]}àÀ;wZÛ)]þ&‚9HLL”Ëå111===ÁÁÁÛ·o‹‹³¶Sº˜þÝzÜ5©æ©Á²ç‹ÛFôÀš¡Ö =°fè5CÓõ ‚èî¬4¹å‘‘T°¯¥ƒ®x<ž%«3ýX_¡PŒ5Ê7qH uuc°*ÏÏÁÑÒB777‹UgúûÌÅÅÅ’'@ÓvKª’“0Øì<ãgS-\»…±“þLP"vpGBPb·Ÿ8f°ÍTr²¥RBªTS-µBÏ—tí {ÐìYUŸFýc¯¬QSϪú¬ë¹±Í_‹øï«T@¾6Ù w¶ òš)ûÔí·û)òÇûŒ"©¶oû•}jëzeV׬¥¼—úYq¨–Š^kùc×LP"&‡>aRØ÷èmÍ~èRu=QClj ]u²ºUVrÊì ­Ys™„pÔóbáH4—I¬àE@[3A‰ˆÔ艽‘JPb·£G„5“¶ˆ„ ýáR D…´}ÀÒ>Y„ßáQÉIo¾ £™Z®Ç‘Þ$°×€ˆéãúÖâæ¾§°âèLk;bvn'-X3ôÀš¡Ö =°fè5C„ŸÏt˜¾ÀÝÚ.Xûy>›<à¶=°fè5C¬Ù(ŠÚ²e‹››h­ÍdkKÑÙϸÑ$tttäææ¶¶¶‚ ¯@‡ÇC …³fÍÒ¹&zwZûiŸßé~§_{A§OŸçr¹GŽÉÉÉ™9s¦‡‡Ç ¾N•J•ðꫯòx¼„„•JúÖ§€’’’ÈÈH‡ãëëˬ>8ªKzíëbÉ…-ÌÊÄæ‰ÍÚ{ 66V*•ÒËõlܸQ*•fddÀË—/õÑ»ú‹öΣG®[·îÙ³gõõõ¯¿þúþýû)}ëÓI¥R6›½}ûööööóçÏ@ww·1.鵯ƒkV[[KýwÙ8í4³üŽ£jÖÙÙI§ËÊÊè_`Øút2™L£Ñ|óÍ7L£º¤×¾v>qww‡ÿ®N¦7---¾¾¾Ì¦‡‡ÐYŸŽÍf755íÚµK&“EFFï’!ûÚØOf|||˜{T"‘Ð qÁ°õé ÅÆjkkOž<9qûÚ`ÍÆÆo~ó›?þñ­­­õõõQQQÿøÇ?ôfd³Ù …")) úûûõæ‡}¬ÙØ8tè»»{ddäòåË_{íµ£GêÍæééyâĉwß}7,,,(((666**ÊTöíçùlò¼we?c<fÿ !Úþ™¼š¡ ƒ Ö =°fè5C¬zØfÃçÏìûy¦þ¿¢—09ž¬íç>›<`ÍÐk†X3ôÀš¡Ö =ìg¬?Fù4x.=pÛˆX3ôÀš¡Ö =°fè5CûÑ ÏŸ¡ž?ÃØ.cˆƒ|ôÑGfõf"F@+û;k;bððð¿ýío·3Í‚ˆˆˆ°ð7õì†îî“D ÇÖŸmذaéÒ¥¯uRYYùé§ŸšÄîÏÐk†X3ôÀ𡇉Ÿ©—-[vþüùéÓ§OÄ“f³Ù³fÍúÃþÀçó'âÕóçÏ·lÙRQQaLf¥R™}÷îÝÎÎ΀€€Å‹oÞ¼ÙÑÑq"˜[Œƒ|þùçôr¹üüùóŸ~úé¹sç,³²›\.ß³g——W\\œŸŸßÓ§O³²²îÝ»wâÄ Õ$¬ˆ­ø¡§§§······¿¿|||{{{_Ÿ…>«zîÜ9OOÏÔÔÔ7ÞxÃßßñâÅééé/^¼¸zõªe03j¶lÙ²«W¯nÛ¶-&&æÂ… ¥¥¥±±±«W¯>}ú4PuéÒ¥÷ßõêÕ{÷î½}û¶v«ÈàèèÈb±\]]éMµZžž¾víÚµkצ§§«Õj¸}ûö®]»¢¢¢Ö­[wá Iò«¯¾Úºukttô‡~È„o†þüù²eËjkk7mÚôðáò²²÷Þ{Oû–rvvÞ¼ysYY™^‡uŠ›ïbjcÞ¶ñþýû§Nª¬¬LIIYºtiVVVyyù‰'Ö¯__UU•“““˜˜* ÓÒÒ˜RJ¥R¡P€\.ÏÉÉyûí·™Õ… :;;322d2Ù‘#GΜ9óî»ï]VV–——·wïÞˆˆ¡P˜’’b¨xtt4\¼xqÿþý¾¾¾b±xxßÉçóÏž=ûõ×_r˜.>kÖ,³^Ló¶›6mâp8+W®€wÞy‡ÃáÐK›ô÷÷ÆÇÇÿô§?õðð˜?þoû[¦ÔÎ;££££££×¯__ZZºiÓ&æÐÕ«Wÿûßóx¼ààุ¸šš6›••õÑG½òÊ+t\í‡~¸téR||üâÅ‹_yå• ìÞ½ÛPqzÿîÝ»###õžA$IŽàðÈÅMŽyï3‡,K' 3gþoý•   &ÍŒ<NŸ>}ìØ1f ¡/^¬[·ŽÉéêêÊb±ÚÛÛ?®P(˜_zOOöíl¨8777ooo¡P8þ|í³ …¡¡¡õõõ†¦‹[ «_}õÕ§OŸ2W“^NV‡)S¦DEE•””PE=<<ÒÒÒhEe2™X,HNNNNN^´h‘J¥¢ Ó¦M{òäIHHm§¥¥…N /Nïg~I¿øÅ/Î;ÉtiJ¥òË/¿\·n]WW—!‡™â–ÁjãÆ˜˜˜ŒŒŒ{÷îI¥Òï¾û.;;[ïhÞÕÕU.—ÓÝ,^¼833³«««¹¹911ñ_ÿú—J¥R«Õ,kppðÌ™3 —Ëõ«_:uêÖ­[b±¸¦¦†õè-®SݶmÛ$ÉÞ½{kjjÚÛÛ«ªªöìÙãããóë_ÿÚH‡-€Õ˜F“––Ö××7{öìøøxf¤  —Ëåp8R©”nZwìØñùçŸïÚµ‹ ˆŸÿüçqqqS¦LÙ³gÏ¡C‡\\\Þyç+V$&&ªTªS§N‰D¢üîw¿Ó[üåË—ÚÕq8œþóŸgΜIOOïèèðõõ]±bņ œœœŒtØŒmþ,))ÉTs1·oßæñxLóõïÿ;''‡^Ö6™ Ãô\ŒIæÏ¬Ö6677>|˜^¶¡¡áôéÓ«W¯¶–3Æ`;[­mܼy³R©üË_þÒÛÛëëë»jÕª5kÖXËc°‡­Ö6N6ì¡mÄŒ¬z`ÍÐk†c7Þ¿_&“™Éûæûï¿7™-c>ëAãïïo²Z'%3fÌ0þjþ
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass__coll__graph.md50000644000113200011300000000004012616110566025716 00000000000000734d838e268dc55de60fb9356326c2d9pktools-2.6.6/doc/html/build-pksvm__gui-gcc-Debug_2moc__mainwindow_8cpp_source.html0000644000113200011300000005532712647637661025423 00000000000000 pktools: /home/kempenep/pktools/qt/build-pksvm_gui-gcc-Debug/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pksvm_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  14, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  69, 11, 11, 11, 0x08,
36  95, 11, 11, 11, 0x08,
37  123, 11, 11, 11, 0x08,
38  153, 11, 11, 11, 0x08,
39  182, 11, 11, 11, 0x08,
40  213, 11, 11, 11, 0x08,
41  246, 11, 11, 11, 0x08,
42  274, 11, 11, 11, 0x08,
43  302, 11, 11, 11, 0x08,
44  334, 11, 11, 11, 0x08,
45  377, 11, 11, 11, 0x08,
46  410, 11, 11, 11, 0x08,
47 
48  0 // eod
49 };
50 
51 static const char qt_meta_stringdata_MainWindow[] = {
52  "MainWindow\0\0on_actionInput_triggered()\0"
53  "on_actionTraining_triggered()\0"
54  "on_actionMask_triggered()\0"
55  "on_actionOutput_triggered()\0"
56  "on_toolButton_input_clicked()\0"
57  "on_toolButton_mask_clicked()\0"
58  "on_toolButton_output_clicked()\0"
59  "on_toolButton_training_clicked()\0"
60  "on_training_returnPressed()\0"
61  "on_pushButton_run_clicked()\0"
62  "on_pushButton_restore_clicked()\0"
63  "on_commandLinkButtonPrepareTable_clicked()\0"
64  "on_actionColor_table_triggered()\0"
65  "on_toolButton_ct_clicked()\0"
66 };
67 
68 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
69 {
70  if (_c == QMetaObject::InvokeMetaMethod) {
71  Q_ASSERT(staticMetaObject.cast(_o));
72  MainWindow *_t = static_cast<MainWindow *>(_o);
73  switch (_id) {
74  case 0: _t->on_actionInput_triggered(); break;
75  case 1: _t->on_actionTraining_triggered(); break;
76  case 2: _t->on_actionMask_triggered(); break;
77  case 3: _t->on_actionOutput_triggered(); break;
78  case 4: _t->on_toolButton_input_clicked(); break;
79  case 5: _t->on_toolButton_mask_clicked(); break;
80  case 6: _t->on_toolButton_output_clicked(); break;
81  case 7: _t->on_toolButton_training_clicked(); break;
82  case 8: _t->on_training_returnPressed(); break;
83  case 9: _t->on_pushButton_run_clicked(); break;
84  case 10: _t->on_pushButton_restore_clicked(); break;
85  case 11: _t->on_commandLinkButtonPrepareTable_clicked(); break;
86  case 12: _t->on_actionColor_table_triggered(); break;
87  case 13: _t->on_toolButton_ct_clicked(); break;
88  default: ;
89  }
90  }
91  Q_UNUSED(_a);
92 }
93 
94 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
95  0, qt_static_metacall
96 };
97 
98 const QMetaObject MainWindow::staticMetaObject = {
99  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
100  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
101 };
102 
103 #ifdef Q_NO_DATA_RELOCATION
104 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
105 #endif //Q_NO_DATA_RELOCATION
106 
107 const QMetaObject *MainWindow::metaObject() const
108 {
109  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
110 }
111 
112 void *MainWindow::qt_metacast(const char *_clname)
113 {
114  if (!_clname) return 0;
115  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
116  return static_cast<void*>(const_cast< MainWindow*>(this));
117  return QMainWindow::qt_metacast(_clname);
118 }
119 
120 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
121 {
122  _id = QMainWindow::qt_metacall(_c, _id, _a);
123  if (_id < 0)
124  return _id;
125  if (_c == QMetaObject::InvokeMetaMethod) {
126  if (_id < 14)
127  qt_static_metacall(this, _c, _id, _a);
128  _id -= 14;
129  }
130  return _id;
131 }
132 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/dir_e6df591b0639d4c4807ef64d058833e2.html0000644000113200011300000002236612647637663017655 00000000000000 pktools: /home/kempenep/pktools/src/algorithms Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
algorithms Directory Reference
Directory dependency graph for algorithms:
/home/kempenep/pktools/src/algorithms

Files

file  ConfusionMatrix.cc [code]
 
file  ConfusionMatrix.h [code]
 
file  CostFactory.h [code]
 
file  CostFactorySVM.cc [code]
 
file  CostFactorySVM.h [code]
 
file  Egcs.cc [code]
 
file  Egcs.h [code]
 
file  FeatureSelector.h [code]
 
file  Filter.cc [code]
 
file  Filter.h [code]
 
file  Filter2d.cc [code]
 
file  Filter2d.h [code]
 
file  Filter_old.h [code]
 
file  ImgRegression.cc [code]
 
file  ImgRegression.h [code]
 
file  myfann_cpp.h [code]
 
file  OptFactory.h [code]
 
file  StatFactory.h [code]
 
file  svm.cpp [code]
 
file  svm.h [code]
 
pktools-2.6.6/doc/html/classCache.html0000644000113200011300000001126012647637662014576 00000000000000 pktools: Cache Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Public Member Functions

 Cache (int l, long int size)
 
int get_data (const int index, Qfloat **data, int len)
 
void swap_index (int i, int j)
 

Detailed Description

Definition at line 69 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/dir_e28b2035b152bb51229fe7a0fca4e376_dep.md50000644000113200011300000000004012616110567020271 0000000000000054c1058bdf7998f40b4f8f8f0441c774pktools-2.6.6/doc/html/inherit_graph_29.md50000644000113200011300000000004012647437044015405 000000000000000a770de7198bd9b8e8a2468ccef64e90pktools-2.6.6/doc/html/classFileReaderLas__coll__graph.png0000644000113200011300000005177712616110567020550 00000000000000‰PNG  IHDR«åKCÓqbKGDÿÿÿ ½§“ IDATxœìÝ}\Tuþ7þ×p'"(3 ¢‚ ’wme7¿µlsm7Û¬]‹5ˬ¯[W}w¯V±û°oue«ÙïÚ®üÚ¥öµÔ-S)RwÍ;ôkº¨yGˆˆ  ·ÃÌûúƒeb`€æœa^ÏÇÃǃsæÌç¼Ïá8/æœÏùˆˆˆˆÔk«—Òõ„aEDDªÇ°"""ÕcX‘êù(]@^^êëë•.ƒþÅËË ãLJ¿¿¿Ò¥Y(V?þø#†ŠAƒ)] ¨¨¨Àˆ#VD¤*ЇDFFB§Ó)]8xð Ò%uÂkVDD¤z +""R=†©ʈˆTÏ£Â*??ÆiËõwDDÔjÀ„UAAœÒVpp0žþy§´EDD}7`ÂÊl6£²²Ò)m………aùòåNi‹ˆˆúÎíÂjÇŽ˜8q"üýý1nÜ8lܸ0mÚ4ÀÈ‘#&“ +V¬@\\‚‚‚pÛm·áرc–v:žŠk?Ýñµêêj,X°aaaˆŒŒÄ’%KÐØØØm=öؼy3bbb ÕjñôÓO[Fòعs'¦L™‚€€„‡‡[gwë3HIIÁˆ# Óé’’£Ñhw=DDª% ËÈȲ²2»–5 2hÐ Y³f”––ÊúõëÅÇÇG ƒäååIûÍYµj•èt:IKK“’’Ùµk—DDDX–©®®–µk×Z–o?ݱ­yóæÉ]wÝ%.\¬¬,IJJ’eË–u[OwÚÚŸ1c†äææJff¦ÄÆÆÊ /¼ 555âçç' .”ââbÙ´i“òòò×÷Î;ïȃ>(—.]’¬¬,™:uª¼ð öý"þőߑ‹|îVaUUU%¾¾¾²råJÑëõb6›¥¶¶VL&S§€‰‹‹“ 6X½ÿã?{ò¹}[ÍÍÍâíí-ÙÙÙ–×ÓÒÒ$66¶Ûzìi?++Ë2oË–--MMMrþüy1 b2™äСC@òòòz\_||¼”––ZÚÜ»w¯Lž<¹ÇímaED*ô¹[ AFF233‰éÓ§ãðáÃðòê¼—/_ÆäÉ“­æMœ8Ñáu–••Ád2!&&Æ2/66ÅÅÅÕcËøñã-?ÇÇÇ£´´~~~ÈÍÍŬY³pà 7`Æ –ezZ_aa!ÂÃáÑh Ñhp÷ÝwãâÅ‹o3‘Ú¸UX544Àl6cëÖ­¨ªªÂO<Ù³g£ªªªÓ²QQQ8{ö¬Õ¼sçÎ9¼Î#FÀÛÛ–y.\À¨Q£ªÇ–¼¼<ËϹ¹¹;v,0wî\¤¤¤àÔ©SX½zµe™žÖ†¼¼<ˆDz½™™™o3‘Ú¸UXi4Ìœ9Û·oGMM š››áëë‹€€Ë2ƒðÔSO!%%ééé¸rå vïÞ×^{Ͳܵk×°nݺ.§Ûøúú⡇ÂÿøG\¼xÙÙÙxå•W0oÞ<»êéÎâÅ‹‘ŸŸ'Nॗ^‚ ÐÔÔ„ææføùù¡¡¡©©©€ÚÚÚ×÷ÀàÅ_DQQ²²²0kÖ,|ðÁŽïh""µQúD¤£×H¶lÙ"111âçç'ñññ’žž.""F£Qn¿ýv ‘––Y±b…ÄÆÆÊ!Cä–[n‘ÌÌL˵¨Ž×¸ÚOw|­ªªJæÏŸ/¡¡¡.Ï=÷œ444t[OwÚÚÿì³Ï$**Jt:,^¼XšššD¤µsÈðáÃeôèѲzõjINNN×ãújjjäñÇ— •E‹I]]ÝûV„׬ˆH•>׈ˆ(–Dbb"¢ü}‘ mu«Ó€DDä™TñðŨ§±ÿþBKDäVVý„aDDä<< HDDªÇ°"""ÕcX‘ê1¬ˆˆHõTÑÁ¢ºº---J—ADD*¥xX 4%%%J—Ñ'ÍÍ&,]š'ž˜ˆë¯wï›i5  ¤tDDV«[n¹EéúìË/O¡¼¼§Oðïÿ>Wérˆˆ^³r‚/¾88p C“ÂÕ < «>Òëë‘qÐÒbÆ®]g{x9ŠaÕG»ve¡m° FƒmÛ¾U¶ "¢ˆaÕG­áÔšV&“ÿüg>ÊËk•-Šˆh€aXõAii5Nœ¸“é§q5 vì8­`UDDêÒÓÏÀÛÛztuá©@""'cXõÁ¶m'`6[®n6 ²²ŠQTT©PUDDê—.\(GNNI§°oo/¤§óT ‘³0¬zéË/OÁ××Ûæk&“ [¶sqEDDê—¶l9£Ñdó5àâÅ«8¾ÔÅU L «^ÈʺŒâb}·ËøúzãË/O¹¨""¢aÕ ;vô­;š81³gO¶šwòd!ÆÓ"$dˆe^DD°«K#"4"Ò¹;9,"â9¬Yóî»orÏ ‘#¶ò4 ©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªçÓq†ÙlFyy9Ìf³õ¸5½^’’¥Ëp+LJ¿¿¿Òe‘ÊiDDÚϨ¨¨À¹s甪ÇmegW`ôè¡6lÒ¥¸N‡ÄÄD¥Ë "uÛÚé›U[vÝqÇ®.Æ­qw9îܹsèð·‘M¼fEDDªÇ°"""ÕcX‘ê1¬ˆˆHõ«üü|h4§-×ëîï6z«¤¤¿ÿýï…ÀÀ@Üxãøâ‹/¬–Ñh4ÈÏÏW¤>""gé×°*((@XXX®¢O‚ƒƒñüóÏ+ÞFoTVVbÊ”)À–-[püøq<üðÃHNNÆ×_íòzˆˆúS§®ëÎd6›QYYÙŸ«è“°°0,_¾\ñ6z#55wÞy'Ö­[g™—˜˜ˆ+W®`åÊ•øå/éòšˆˆú‹S¾YíØ±'N„¿¿?Ƈ7¦M›9r$Àd2aÅŠˆ‹‹CPPn»í6;vÌÒNÇSj¶N±mÞ¼111Ðjµxúé§Q__عs§å›Fxx¸U€tU_ûö[ZZššŠ1cÆ@«ÕâÑGEuuuÛÞ±Æêêj,X°aaaˆŒŒÄ’%KÐØØØm]©¨¨°l_GÛ·oÇŸþô§NóSSS±~ýz«y{öìAll,BBBðöÛo[æwµÏÚ¶iÿþý3f ¾ùæ»ë""êÒAYY™dddtœÝ%ƒÁ ƒ ’5kÖHii©¬_¿^|||Ä`0H^^ž´_ŪU«D§ÓIZZš”””È®]»$""²Luuµ¬]»Ö²|ûé¶¶f̘!¹¹¹’™™)±±±ò /HMMøùùÉÂ… ¥¸¸X6mÚ$¤¼¼ÜîúV¬X!&L¬¬,ùî»ïäæ›o–%K–ô¸ý·qÞ¼yr×]wÉ… $++K’’’dÙ²eÝÖÑÑñãÇå±Ç­V+%%%^×ëõ@ªªªz¬€Ü{ï½RSS#Û·orõêÕn÷YÛ6ÝsÏ=ràÀN5îÝ»Wt:¤¤¤HAAA5t%;;[²³³{ý~"òŸ÷9¬ªªªÄ××WV®\)z½^Ìf³ÔÖÖŠÉdêôA'6l°zÿÇ,62³“¶¶²²²,ó¶lÙ"ÑÑÑÒÔÔ$çÏŸƒÁ &“I:$$//Ïîú®»î:IKK³´““c5ÝS]""ÍÍÍâíímõœ––&±±±ÝÖ!"ÒÐÐ Ÿ|ò‰ÜtÓM2eÊùðÃ¥¶¶Öæ:«ªª€èõúë “ÉdÙ/Ýí3[ûº£üQRSS%22RfÏž-_ýµe[ìŰ"";}ÞçÓ€!!!ÈÈÈ@ff&"##1}út>|^^›¾|ù2&Ožl5oâĉ­oüøñ–ŸãããQZZ ???äææbÖ¬Y¸á†°aÇë+**²j;!!sæÌq¨¶²²2˜L&ÄÄÄXæÅÆÆ¢¸¸¸Û:öíÛ‡±cÇbÿþýxÿý÷qòäI,Z´6ׂ#F ''§Ók'NœÀ7Þhuš.""¬¶¹»}Ö&>>¾ËmˆˆÀ²eËPPP€ùóçã7Þ@BB._¾Üã~""rTŸÃª¡¡f³[·nEUUžxâ Ìž=UUU–ŠŠÂÙ³g­æ9:hn^^žåçÜÜ\Œ; ˜;w.RRRpêÔ)¬^½Úáú"""PXXh™>sæ Þzë-‡j1b¼½½QPP`™wáÂŒ5ªÛ:´Z-qôèQ9rÄ®ke÷ÝwÞ}÷ÝNcëmÚ´ F£–y¶ºÖw·ÏÚøúúöXGYYÎ;‡ââbL:ƒîñ=DDŽêsXi4Ìœ9Û·oGMM š››áëëkõai0O=õRRRžžŽ+W®`÷îÝxíµ×,Ë]»vͪw[ÇiX¼x1òóóqâÄ ¼ôÒKX°`šššÐÜÜ ???444 55P[[kW}0þ|¼üòËÈÎÎFvv6ž}öY9´/|}}ñÐCáü#.^¼ˆììl¼òÊ+˜7o^·uLš4 HKKÃ?ü€¸¸8<ùä“8yòd—ëzë­·pèÐ!ÌŸ?GEVV^ýuüõ¯µ+d»Ûg=1›ÍسgæÌ™ƒiÓ¦ADpäÈ|ú駪¾UˆÜXǃŽ^³i½v#~~~/ééé""b4åöÛo—ÀÀ@iii‘+VHll¬ 2Dn¹åÉÌÌ´\óéx«ýtÛÏŸ}ö™DEE‰N§“Å‹KSS“ˆ´vÞ>|¸Œ=ZV¯^-ÉÉÉ¢Ó麭¯}û²dɉˆˆaÆIrr²]ׄ:Ö\UU%óçÏ—ÐÐP —çž{Nº­£#½^/«V­’˜˜),,ìrÝ………òÛßþV"""$((Hnºé&ùꫯ¬–Á¿®CÙšîjŸuܦ޶mÛ&Ó¦M“Í›7[öoðšÙéóNϳ*//GNN¢f³f³>>ýz;œÃŒF£]§{Òv x„ }n‹ˆ´Îϳ"õðòò²ÙQEiÎ*""G0¬ìÐÓØÂõ+†•FDDÊRß9&""¢VDD¤z +""R=†©ʈˆT¯SoÀ¶nÚtu-nËl¬X‘‰‡NÄØ±Ã”.Ç­èt:¥K "7Ð)¬BCC9¢€ƒŽ+Äٳ刅_ýêV¥Ëq+],ODÔ^§°òòò‚V«U¢·µoß>h4Àž=ç±jÕ<øúz+]Ñ€ÂkV}ÔØhÄŽ§! M8pà¼Ò% 8 «>Ú·/MM-Z¿•nßÞõc=ˆˆ¨wV}´}û·–N)&“ {öd£®®I᪈ˆ†UÔÔ4àÀó0™Ì–y--&ìÞý‚U < «>øÇ?¾ƒÉd=È­F£Áöíß*TÑÀİꃭ[¿`V&“‡硪ªN™¢ˆˆ †U/•—×"33f³íLJìÜyÖÅ \ «^Ú±ãt—elÛvÂÅ \ «^ÚºõÌf³Í×Ìf3Nž,Bq±ÞÅU L «^(*ªÄwßýˆ® ¬¾úê´+Ë""°V½°sç™n‚ª•Ñhb¯@""'é46 õÌÛÛññ#­æ]¹r ÁÁð÷÷µÌÓ醺º4"¢I#ÒÓw²GDÄsX³æ1Üwßd¥K!"h¶ò4 ©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕóqF#¨ªªrFSn+(ÈÃ5”””(]Šb¬tD4iDDúÚHNNÊËËQ¹1FƒéÓ§+] <[òÍJD Õj1aÂg4Gn¨¼¼999J—AD¯Y‘ê1¬ˆˆHõVDD¤z +""R=· «üü|h4§-×ëîï6ˆˆ<‰êª  aaaJ—Ñ¥àà`<ÿüó.iCíû‚ˆÈUTVf³•••J—Ñ¥°°0,_¾Ü%m¨}_¹ŠbaµcÇLœ8þþþ7n6nܘ6m`äÈ‘“É„+V ..AAA¸í¶ÛpìØ1K;O©Ù:ŶyófÄÄÄ@«Õâé§ŸF}}=`çΘ2e n ]Õ×¾ý––¤¦¦b̘1ÐjµxôÑGQ]]Ýã¶w¬ÑÞ}Ñö¾ýû÷c̘1øæ›o`4‘’’‚#F@§Ó!%%F£±ÇíÓh4øè£­V‹åË—cãÆˆŽŽÆ°aÃðꫯö¸DD.#N-ÙÙÙv/o0dРA²fÍ)--•õë׋ ÉËË“öe­ZµJt:¤¥¥III‰ìÚµK""",ËTWWËÚµk-Ë·ŸnkkÆŒ’››+™™™+/¼ð‚ÔÔÔˆŸŸŸ,\¸PŠ‹‹eÓ¦M@ÊËËí®oÅŠ2aÂÉÊÊ’ï¾ûNn¾ùfY²dIÛß¾ GöEÛô=÷Ü#ƒÁ ï¼óŽ<øàƒréÒ%ÉÊÊ’©S§ö¸}""$99Yjjjdݺu@æÎ+555òᇠ¹zõªÝ¿Ó²²2ÉÈȰ{y""|®HXUUU‰¯¯¯¬\¹Rôz½˜Íf©­­“ÉÔé:..N6lØ`õþ?þXìÉÙ¶¶²²²,ó¶lÙ"ÑÑÑÒÔÔ$çÏŸƒÁ &“I:$$//Ïîú®»î:IKK³´““c5ÝS]Žî [Û/¥¥¥–é½{÷ÊäÉ“»Ý>‘Ö°:uꔈˆ477Ûœn[Ö +"êGŸ+r0$$ÈÌÌDdd$¦OŸŽÃ‡ÃË«s9—/_ÆäÉ“­æMœ8Ñ¡õ?Þòs||sæ Þzë-‡jsd_´i&aaaÈË˃ˆ@D ×ë‘™™Ùíö¹EÂJ£Ñ`æÌ™Ø¾};jjjÐÜÜ ___X–1 €§žz )))HOOÇ•+W°{÷n¼öÚk–å®]»†uëÖu9 ‹/F~~>Nœ8—^z ,@SSš››áç燆†¤¦¦jkkíªæÏŸ—_~ÙÙÙÈÎÎÆ³Ï>‹¢¢¢~Û¶<ðÀxñÅQTT„¬¬,Ìš5 |ðA·ÛGDävœq2ÑÑkV"­×ŽbbbÄÏÏOâãã%==]DDŒF£Ü~ûí(""---²bÅ ‰•!C†È-·Ü"™™™–k9]]×iÿógŸ}&QQQ¢ÓédñâÅÒÔÔ$"­7†.£G–Õ«WKrr²ètºnëkß~cc£,Y²D"""dذa’œœ,z½¾ÇmïX³½û¢ãûDDjjjäñÇ— •E‹I]]]Û‡פzšî ¯YQ?úÜ)ϳj;-ÇG„x®¶G„ÜqÇJ—BDÏVÕÝLDDÔ‘S¾Hõ4öŸ¾Ðy †U?a9O‘ê1¬ºPRR‚ßÿþ÷ˆŠŠB`` n¼ñF|ñÅVËh4äçç+T!‘ç`XÙPYYivË–-8~ü8~øa$''ã믿Vº<""ÃkV6¤¦¦âÎ;ï´º¹811W®\ÁÊ•+ñË_þRÁꈈ<Ç~³ª¨¨°<*¤£íÛ·ãOúS§ù©©©X¿~½Õ¼={ö 66!!!xûí·-ó»z<‡­Ç|Ø[‘§ò¸°:qâ,X€ &àÚµk^¯®®Æ•+W¬‹mˆ1cÆXÍûÇ?þÓ§Ocýúõx饗PYY‰ÚÚZ<øàƒ˜:u*òòò°råJ¼øâ‹¨¨¨°¼ïÝwßÅÇŒ)S¦XµwöìYDGGcéÒ¥¸xñ¢“¶šˆÈ½yDX566bãÆ¸ùæ›ñ‡?ü·Þz+ ÞiÙ¶.ç=Ý'ÕfÉ’% Âý÷ßÐëõ4hΞ=‹¿þõ¯ÇèÑ£À*ßyçÜyç2dˆU{¿øÅ/púôiàç?ÿ9î»ï>ìÙ³f³¹WÛND4 ø°Ú·oÆŽ‹ýû÷ãý÷ßÇÉ“'±hÑ"Ú\>$$#FŒ@NNN§×Nœ8o¼Ñê4]DDX=ÒÞÇsØúæÖ¾ÍeË–¡  óçÏÇo¼„„\¾|ÙÞÍ&"P|XiµZ$&&âèÑ£8räˆ]¿ï¾ûðî»ïvº±wÓ¦M0V#¢ÛúfÏã9ìyfTYYÎ;‡ââbL:ƒîñ=DDÑ€«I“&!##iiiøá‡‡'Ÿ|'Ožìò=o½õ:„ùóçãèÑ£ÈÊÊÂë¯¿Ž¿þõ¯v=¯ª/ç0›ÍسgæÌ™ƒiÓ¦ADpäÈ|úé§ ³ɈVm’’’°fÍäååa„ x衇º|ö”V«ÅÉ“'ÑÔÔ„ßýîw¸ýöÛñ÷¿ÿ_}õ~ýë_÷¸®àà`¼û7oâãã…äädÌš5«Ç÷~ñÅHMMÅï~÷;àõ×_·œj$"òTûˆ³Ù ³Ù uÝjf4Ýò±ò|Dõ£­êú¤v!///«NjáŽAEDÔßÔ÷iMDDÔʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõœÖu½±±%%%ÎjÎ픕ÕB§ ´{ÜÆ`0(] `N +TTTØ5œÐ@d04ã™g¾ÆOLÆÏ>Zérãïï¯t D4@9%¬bbb㌦ÜÒý×70Í8uJ×^›¯t9DD¯Y9AZÚIh4À·ß¢¬¬Férˆˆ†U]¾\…S§Š Òú¸/¾8¥tIDDêÒÓOÃÛ»u7šLflÝzBኈˆ†U}þù ´´üôÈùóçKpáB¹‚ < «>øþûRäç—øé)+¾¾^øòËÓÊED41¬ú =ý4||¼­æ<HDäl «^lÝz--¦N¯]ºT‰¬¬Ë TED401¬zéÔ©K()©¶ùš7¾ü’½‰ˆœ…aÕK_~y ¾¾Þ6_ki1áóÏ¿…Éd¶ù:9†aÕ &“iißÂhì| °MU•Ç_taUDDêŽɃ^_ßí2>>^øâ‹“.ªˆˆh`cXõÂ×_gh½6ÕöÏÛÛÛjÚdüýïY WJD408í!ž$9y"¬æ-]ú9æÍ»“&ý4êzHH€«K#"4""=/F=‰ˆxkÖ<†ût)DDÍVž$""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=†©ʈˆTaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R=Ÿ¾¼ùÂ… ¸|ù²³jqk³gǵk—pð`µÒ¥(ÎßßÓ¦Më·öyÜy.///Lš4 Æ Sºr±>…Ucc#†ŠÑ£G;«·õæ›”.A®]»†âââ~];ÏuîÜ9455)]) Oaƒ ‚V«uF-4ˆˆKÖÃãŽÈ³ðš©ʈˆTaEDDªÇ°"""Õs«°ÊÏχF£qÚrý±n{Û<òÈ# tFyÔÜý¸sçõµQMX ,,Lé2ºŒçŸÞim”””`óæÍÈÉÉéñ}jß7îLíûÖÇ]wzÚþþ^?‘½TVf³•••J—Ñ¥°°0,_¾Üim444ÆŒÓãûÔ¾oÜ™Ú÷­3Ž»îô´ýý½~"{¹<¬vZšý IDATìØ‰'ÂßßãÆÃÆÀ2âÁÈ‘#&“ +V¬@\\‚‚‚pÛm·áرc–v:žž°uºbóæÍˆ‰‰V«ÅÓO?úúzÀÎ;1eÊ <<Üê?cWõµo¿¥¥©©©3f ´Z-}ôQTW÷’’’dóæÍVëýÛßþfyoCCƒ|òÉ'rÓM7É”)SäÃ?”ÚÚÚkïˆaå±>wéiÀddd 33‘‘‘˜>}:> /¯Îe\¾|“'O¶š7qâD‡Ö7~üxËÏñññ(--…ŸŸrss1kÖ,Üpà ذaƒÃõYµ€9sæ8T[GŽì›öÛÔ¦°°áááÐh4Ðh4¸ûî»qñâÅn··MPPÀ××׿´»óô㮯ÇVG¬ . ))Éj¹ÄÄDÀ¾}û0vìXìß¿ï¿ÿ>Nž<‰E‹±',9Ä¥aÕÐгٌ­[·¢ªª O<ñfÏžªªªNËFEEáìÙ³VóÎ;çÐúòòò,?çææbìØ±hhhÀܹs‘’’‚S§NaõêÕ×ÂÂBËô™3gðÖ[o9T[GŽì›6í?,——ˆ@¯×#33³Ûíõž~ÜõõØêÈVÈ;¶Ó~:þ<@«Õ"11GÅ‘#Gì¾ÎFÔžKÃJ£Ñ`æÌ™Ø¾};jjjÐÜÜ ___X–1 €§žz )))HOOÇ•+W°{÷n¼öÚk–å®]»†uëÖu9 ‹/F~~>Nœ8—^z ,@SSš››áç燆†¤¦¦jkkíªæÏŸ—_~ÙÙÙÈÎÎÆ³Ï>‹¢¢"—í[xà¼øâ‹(**BVVfÍš…>ø Ûíõž~ÜõõزÇ3Ï<ƒ¥K—bÏž=¨¬¬Ä°lÙ2h4Lš4 HKKÃ?ü€¸¸8<ùä“8yòdŸÖI¦/'½v Òz?&&Füüü$>>^ÒÓÓEDÄh4Êí·ß.""ÒÒÒ"+V¬ØØX2dˆÜrË-’™™Ùå5[׃>ûì3‰ŠŠN'‹/–¦¦&i½ˆ>|øp=z´¬^½Z’““E§Óu[_ûöeÉ’%!Æ “äädÑëõ=n{w׬Ù7¶Þ[SS#?þ¸„„„Hhh¨,Z´HêêêzÜ^t¸&ÕÓtOÔxÍJij;G¶¿»íéúø0™LòÞ{ïILLŒ 6LfÍš%ééé¢Õj;Õ¢×ëeÕªU#………vÕ߆׬<Öç‘Þ?Ó¡íkÿ„ |–µ*//GNNî¸ãŽ~[;õÙ¹s'FI“&Yæmß¾o¾ù&NŸ>mó=f³f³>>ö?©èàÁƒHLL„N§ësÍäV¶ªæ¦`"r_YYYxä‘GpêÔ)Ô××#33¯¾ú*ž|òÉ.ßãåååPP‘gã‘âd=£Ö‡/²D]Rú¸[ºt)êëëqÿý÷£¢¢ãÆÃÂ… ñ‡?ü¡_×Kžƒaåd #R‚ÒÇÞ|óM¼ù曊ÖAOö’F£A~~¾ÒeÐÄc‹¨3†©ʈˆTÏãê«‘ŸíázÏž=ˆEHHÞ~ûmËü®F×¶5Zº=µÐÀÂc‹¨úr—VonÎT‹žF~îi„krï½÷JMMlß¾Ý2:yw£kÛ-½½½{÷ŠN§“””)((è÷}ÐÔzS°šðØê=Þì±\;êºÒù¹§®ÈÁƒEDÄd2Yîäïntm[£rwôã?JjjªDFFÊìÙ³å믿“Éä¤=ÐÿV=ã±Õ{ +åÚQוäèÈÏöŒpÝ6útû=íå¼§­—-[†‚‚ÌŸ?o¼ñpùòeG6—TŒÇ‘ã<&¬ùÙž®m݈iÏ(çöýôS„……9¶Á¤Z<¶ˆz¡/'ÝùÚAO#?÷4Â5º¼«Ñµm–ÞÞ¶mÛdÚ´i²yófËHÝî†×¬zÆc«÷xÍÊcqÔõÞŒüÜ_ŒF£Û?—£®«Ó@8¶ŽºîÁ¶*ÿ ­0//¯nïíJáÄԉǹ;u|JuƒaEDDªÇ°"""ÕcX‘ê1¬ˆˆHõVDD¤z +""R½>Ýg¥ÑhP^^Žƒ:©œ!;»_}•‡çŸ¿ÞÞÇxèlkçìö=ñ¸Û¸ñ;„†àW¿ŠQºEõ÷ñEêÔ§°ŠŽŽ†V«uV-Æ‘]Ó§ëðØc7+]ŽËõ÷ ¨žxÜ]¹Rƒ¯¿þ ‘‘ÁHI¹Oérªt ¤€>…ÕàÁƒ9b³ %%h4Àš5‡±`Á ³ýêO<îÖ®=ÁåËÕ0›ý0bÄ0¥K"r)^³êß_ Àh4á7¾RºrsõõÍøè£o Òz ìàÁ”.‰ÈåVNf2™qéR€Ö°Ú¶í[œ>}IáªÈmÛö-ÈÈø^ኈ\aåd%%Õhi1Y¦½½5xé¥mèÃàöäÁD|°ßrü˜LføïÿÎuaEDÊbX9QQÑÕ»¨k4@jê—.ªˆÜ‘ÉdÆš50™Ì].ÓÜÜ‚}ûr\X‘²VNÔÚmݺw…—広··QQaøÙÏ¢¨ŽÜEff®\¹oøúzwê°Ó&/¯ UUu®-ŽH!}¬µvžhýfåãã…˜ŒF¢¢Âðç?ÿ‰‰ð÷ïßA^ÉýMœ‰×_¿••TW×£ººÿüçˆ4 jkÑØh„ˆàÒ¥J >Dé’‰úF8´‚Óüø£ß|“‡„„p$$DÀ×׋oAaa¶oVéòÈýò—ïâç?¿/¿|/€Ö Í:Ô³ô%µ•߬œhÔ¨<ôÐMVó’’FaçÎ3–¿Š‰zC¯¯CHH€eÚ××¾¾ *ò¼fÕÏ®¿~jk-ƒÛõ†^_oVDž†aÕÏGÁËKƒììb¥K!7e4šPWׄ^›"ÏŰêg~ˆŽÖ";ûG¥K!7¥××Ê<ÃÊ’’Fñ›õš^ßÚ==8˜§És1¬\àúë#ùÍŠz­-¬øÍŠ<ÃÊ’’F¡¬¬ååµJ—BnH¯¯‡F£a òh +¸þúHÀ¹süvEŽÓëë0dˆ|};?'ÈS0¬\ $dÂÃyÝŠz¥ººž§Éã1¬\¤µ“¿Y‘㪪êVäñV.rýõ‘øî;~³"Çñ†`"†•Ë$%BQQ%jj•.…ÜŒ^_ÇnëäñV.’” Áùó%J—Bn¦ººž#«“ÇcX¹Hdd‚ƒØÉ‚Ö:ˆ-Ê<ÃÊ…ØÉ‚z£ãˆëDžˆaåB&0¬È1"½¾ž×¬Èã1¬\()irs¯ ¹¹EéRÈMÔÕ5Ãh4ñ4 y<†• %%EÂh4!7·LéRÈMp\@¢V +ŠÕað`?v² »ýV< HžaåBÞÞ^ˆ‰ï¾ãu+²Ouu볬Øu<ÃÊÅ’’"ùÍŠì¦××ÃÇÇ AAþJ—B¤(†•‹%%BNN ÌfQºrUUu:t04Ò¥)ŠaåbII‘¨«kBaáU¥K!7À‚‰Z1¬\,!!>>^<HváãAˆZ1¬\Ìßß11:v² »pÄu¢V +°“ÙK¯¯cO@"0¬Á1É^¨ÃJII‘¨¬4àÊ•kJ—B*×:. ¿Y1¬pýõ£ Ñhøä`ê¯YµbX)`èÐÁˆŒ á©@ê–ÉdFmm{a¥˜ÖëVüfE]»v­f³0¬ˆÀ°RLk@~³¢®q[¢Ÿ0¬’”4 ÅÅzË@¥D1¬ˆ~°RHRÒ(ˆÎ+QºR)½¾õž$bX)&<<¡¡8wާɶªª:øûûÂßßWéRˆǰRЄ ìdA]㸀D?aX)ˆ#YPw8zÑO|”.À“]}$þïÿ=ˆÆF#OõP'ž|Cpcc#òòò`6›•.…­Vk5a¥ ¤¤Qhi1ãûïK1yò¥Ë!•ñägYÕÔÔ ²²²Ó |555(//gX©It´C† Bvö +ꤺºÑÑžýa=aÂ¥K ;wîœÍù¼f¥ // "ØÉ‚lªªâ5+¢6 +…]=;Ym­×¬<ó4 QG +…%%BNN ZZx!™¬éõuæ7+"€a¥¸¤¤H46QPP®t)¤"F46ù”`¢p,ôz=”.ÃnAA‚ÈÈ`äæ!0н¿] 88Xé2ì¢ö㤺º11aÐhšPR¢¾!¹¼¼¼ Óéàå50þÞÍÏÏÇøñã!"J—Ò¯ÚogW?w÷% ¸°ÊÊÊR|§:ê/™ ¹¹¹J—Ò'Ó§OWº »¸ÃqòÆ·¨AnnÒ¥Øäííí]Ë pÓM7áêÕ«J—b“RõãùçŸwé:ûbÀ…•ˆ 11:NéR4Íéûï¿þóŸ-¯555!$$»víF¤¤¤`ĈÐétHIIÑhDKK RSS1fÌhµZ<ú裨®®¶YTWWcÁ‚ Cdd$–,Y‚ÆÆFK-û÷ïǘ1cðÍ7ߨܨ¯ïþñC·6oÞŒ˜˜hµZ<ýôÓ6ÛØ¹s'¦L™‚€€„‡‡[^W¿§&##CÊÊÊ”.Ã㔕•IFF†ÒeØÇIßô÷þsôx2 2hÐ Y³f”––ÊúõëÅÇÇG ƒäååIûºU«V‰N§“´´4)))‘]»vIDD„e™êêjY»v­eùöÓŸ}ö™Œ3FÌf³ˆˆ¤§§KDD„FyçwäÁ”K—.IVV–L:U^xáY±b…L˜0A²²²ä»ï¾“›o¾Y–,Y""Ò©>‘yóæÉ]wÝ%.\¬¬,IJJ’eË–Y–½çž{äÀb0¬Þwüøqyì±ÇD«ÕJIII§ýÔ~]¶~ž1c†äææJff¦ÄÆÆÊ /¼`µ\MMøùùÉÂ… ¥¸¸X6mÚ$¤¼¼¼Ûß#²³³%;;»ãìÏVä +Ï¢¶°ªªª___Y¹r¥èõz1›ÍR[[+&“©SÄÅÅɆ ¬ÞÿñÇw [êêêdÈ!rüøqyøá‡åÅ_´¼/¥¥¥–é½{÷ÊäÉ“åºë®“´´4ËüœœËtÇúš››ÅÛÛÛê;--Mbcc-ËfeeY^khhO>ùDnºé&™2eŠ|øá‡R[[k³þžÂª}»[¶l‘èèh«åšššäüùób0Äd2É¡C‡€äååuû;pDWaÅÓ€DäöBBB‘‘ÌÌLDFFbúôé8|ø°ÍÞŠ—/_ÆäÉ“­æMœ8Ñ®õà7¿ù ¶mÛ†ºº:ìØ±?þ¸åõÂÂB„‡‡C£Ñ@£Ñàî»ïÆÅ‹QTT„ñãÇ[–KHHÀœ9sl®£¬¬ &“ 111–y±±±(.þi¤›øøxÀ¾}û0vìXìß¿ï¿ÿ>Nž<‰E‹!00Юíé¨}ñññ(--µzÝÏϹ¹¹˜5kn¸álذÁòš#¿ƒÞ`Xõ­s¾=-'"xä‘Gz}0‘û±÷8Qû:Ô¬¡¡f³[·nEUUžxâ Ìž=UUU–ŠŠÂÙ³g­æu5-ÉÉÉØ¶m¾úê+Üpà VðaaaÈË˃ˆ@D ×ë‘™™‰ˆˆZ–;sæ Þzë-›í1ÞÞÞ(((°Ì»páFe™öõm}JƒV«Ebb"Ž=Š#GŽX®ƒõV^^žåçÜÜ\Œ;Öêõ††Ì;)))8uêV¯^mõš½¿ƒÞ`Xu¡  aaaNi«}Ñ’’lÞ¼Ù®žsάú‡«~G=­Çݺ!;›F£ÁÌ™3±}ûvÔÔÔ ¹¹¾¾¾øiƒÁxê©§’’‚ôôt\¹r»wïÆk¯½fYîÚµkX·n]—Ó3g΄^¯Gjj*.\hUÇ<€_|EEEÈÊʬY³ðÁ`þüùxùå—‘ììl<ûì³(**²zo[}¾¾¾x衇ðÇ?þ/^Dvv6^yåÌ›7¯ÓvOš4 HKKÃ?ü€¸¸8<ùä“8yòd¯öãâÅ‹‘ŸŸ'Nॗ^‚ ¬^ojjBss3üüüÐÐЀÔÔT@mm­]¿ƒ>qèd¢pÖ¹t[={³L_ÞÓ›ö•â©×¬úë8é6œIm׬DZ¯±ÄÄĈŸŸŸÄÇÇKzzºˆˆF¹ýöÛ%00PDDZZZdÅŠ+C† ‘[n¹E233m^˱5-"²hÑ" ìÔy ¦¦Füq ‘ÐÐPY´h‘ÔÕÕIcc£,Y²D"""dذa’œœ,z½Þf}"­×àæÏŸ/¡¡¡.Ï=÷œ444ôxèõzYµj•ÄÄÄHaaa§×{ºfõÙgŸITT”èt:Y¼x±455Ùì 2|øp=z´¬^½Z’““E§Óuû;p;Xt᫯¾’믿^ $ÑÑÑòÉ'ŸˆˆHhh¨#FˆHëþ—¿üEÆ/rë­·Zzˆt€·ÿ¹c»ŽÔÐÖξ}ûdôèÑrøðainn–%K–ˆN§­V+K–,‘ææfÙ±c‡Lž‘¨¨(:t¨¼òÊ+í÷V®8NYOÇcá¿þ뿬Ú ›6m’øøx ‘wÞyGDDÌf³üçþ§$$$HPPÜyç²cLJƒPaE?1™L–Šî†aeƒ«º»v\ŽÖ`«ÛjW]e»ëb*Òúa–œœ,555²nÝ: sçΕššùðÀ\½zÕîýîn.j"%ytX¹²»«3j°¥«®²Ýu1%Ǹê8éë±`gžyK—.Åž={PYY‰`Ù²e}Vo´É°õ¯ý=oμÿ­ãz† †{ï½/^tJûªçú3’ýËÑsé®èîÚÝ5+Gj°õÞ®ºÊŠtßÅ®Iõ4Ýw»Æ ÆãÄ‘õôÔNW¿O“É$ï½÷žÄÄÄȰaÃdÖ¬Y’žž.Z­Öî}!ÂkVäèÑ£RZZÚé_EE…<ÿüó"bý{¹pá‚„††:e%%%rúôi¹çž{äÖ[ouJûjÁÔ¯ÔþáÒ‘§';vì3gÎXÍÛ¶m›Lž<Ù¡vVöý1×Óª}]gqq±k×®©î^¼Þb "BVVyäœ:u õõõÈÌÌÄ«¯¾Š'Ÿ|RéÒT¥»Ç„8úÞ6¶ÒÕ#Eì}ˆ··7 ¥¥¥Sû=µaÏcDÔ„aEäA–.]Šßüæ7¸ÿþûŠ'žx .Äþð¥KS­V‹µk×v9 uuu0 VÿZZZºl333påÊ˼÷Þ{/^Ä·ß~‹ýû÷ãÀV×8ß}÷]|üñǘ2eŠÕ:kkkqáÂ<óÌ3øÙÏ~†áÇÛlßVmΞ=‹èèh,]ºÔ=®{)ñ5¯?yê饩ý´MG}ºåÔ =÷evôã?JjjªDFFÊìÙ³å믿vø‘ÎÆÓ€DDNÔþ–‘¶÷Þ{¯CmtuŸd›Ž÷ѵ_gss3<ˆØØØn×ÑÓ½xË–-CAAæÏŸ7Þx ¸|ù²CÛá +""…tuŸdgÜ oOeee8w‹1uêT <¸Ïëu6†Q½½oÒíï•ëê>Igµß³ÙŒ={ö`Μ9˜6mDGŽÁ§Ÿ~ªÊG1¬ˆˆ:¨¨¨À¿ýÛ¿u9ÝQQQ¸ýöÛn™÷æ›o"((S¦LÁŒ30iÒ$¼óÎ;Nk¿;_|ñRSSñ»ßýxýõ×-Ct©‘Ò©Mll,D¤Ëéö?w÷Þö?ûøøàðáÃVËá£>ÂG}Ôíú{Z§­ömµÑÞ}÷݇|°Û6ÕdÀ…•F£ANNŽ]Oâu7-Õ^¸üÿAðÿ׌à;š ñVº"kî4dšiÑàòÿ€vN#3)]N—Üé÷M¹Û€Õ.¬&Mš£Ñ¨týÂl›JpõïƒÐ˜5Sþçp„& Rº, w:øÕ|œ”|Ó€ü’«ï´˜0;TérºªÞÚhàpa¬t ý*öWøþ‹«¨+iÁá”rÄÍÅ´çFaÐÐ÷«ìWj>NÎþ³Pv¬!A¡ðñç¥e"þ/p3q÷†BL€˜ÿ÷*üí×ÙÈþ´bîþœ6©_³Á„¢CצfAaFµÂ©ÃÊÍ讂 p?Ë´¹EÐRoÆ?W#mÞ÷¨ÈqŸ±¾¨³ÂŒêŸþèðòwuý,+"O°rCãï …—O‡‹Ûf úBÒûÿüK1ŒõfeŠ£>ÉkNbŠ×¢±ºëñæˆ<ÃÊ ÿõp˜[:Ÿò3›1 r¶U`Ëo²qq?O!¹“†*#J¿5´žâm#ÀÅ}ü=ñª¼:z†Ç†þB£Íû(Ì&A£Þ„}K 0nfîü(xù²›±Ú쩆ÆK í{« ·« ¿U߈®pöìY¥Kè3³ðòÀÿ‚v©««Ã°aÃ:ÍgX¹©¸Ù¡8öþ@gˆD^Þ@ÙLF3¼|UvSu’·«bÒ uPíV"‚òïêPWÖŒ!#üº~ó3tèPètºo„U5ÊšPø© cöÆÈü?haÆA§ÓušÏ°rS±¿ŽcÿûÇ._×xkykî|+¾üO¢vµ?6£â|c¼4¸°G‰óG¸¶(ùûû#11Qé2z­¶¤ cÉœIDAT‡R Qzª pý1ÐM¢pUî׬ÜÔàá>ˆøY ¼:æ¦õßÄù:Ì\¿! *wpáë*xywqžÈ,ÈÛÁ^nA€œÏ+°õ·çpål`p¨/ƒÊ øÍÊ¿7%'j-Ó^>h4@`¸Æÿj84^öö,.À¯>ˆe×u6Æã~b5ïêùz„ACºæèÂÿ®ja6 ¾]S‚¬OÊXß÷/^>^ˆ™ÂS€N¢·îJÝ©ü¡;žÌŸ»Cðóׯ*]9`í §p×òhŒ»;¤ç…É¥®]jÂ/¢ò‡zôôéùëÇ#âgA®)l`ÛÊÓ€Xèu¸kù8äí¬ÂéõW”.‡h@ÈÛY‰«ß÷Tƒ†z#|j kŠò «nômCqóŸGap(O!9ÃÏžŽÀ-K"¡ñÖ@ÓÅí­§Ù#×™ø æ’î|78õ’HJÖ!ôºìK)@“ÁéбÂÜbf/@'ã7+"¢^ŸˆI F¨4>Iý‚¼ñ3žt&†Q/\:| Çÿú#&<† ë  ñj½8êŽ`žt2ž$"rPU~¼TˆØ{B0åÉpÀÈI8”Zc£Ñ¿à)@gc×u"ú>í*FÝ„ Qƒ”.…:h¨jAúcß#0Ü¿ú`¼Õ=Œ×.5áû/®âÆÿÁ{k+Ãʃåÿ£ {õøÅ_Æu~ò0ubjüýé<Ô_5â7_ÿ`žœrÞgåÉBãpåtö--èrU"úÉ7o]BU~f¾àr1†• ‰ñÇ/VD£øŸ58úÎånR%òtbxùiðóׯrô{ð4 ¡0£û_¸ˆ k1í¹H¥Ë!"ꈧ ˆº33ß‹AÎçøçÊb¥Ë!"ê„aE€Ñ·Å¯GáÜ– œû¬Bérˆˆ¬ð !YŒ›o?/„%(] ‘~³"+cï†!:_¥Ëðx‡ßº„«çë•.ƒH5VD*ô}ÚUÔ7)]†G2Ö›ñõÿ¼€Šþ± &< HDô/- füã™<ÔUÆ3 j°""`6 ö¿xÕ…M˜½>ާÃU†§É.f£ ÷«JÞ8L“GÞ¾ŒÕâî•ѼéW…Vd—Šœ:þ_—ðÍÛ— f¥«é,??Mëø†"‚Gy|ž-÷Oû}×þgOòÏ•ÅÈÝQ‰oG!ü† ~]÷ï0¬È.#&bæªäý½ ^¼S³º¾bãù矔””`óæÍÈÉÉéñ} ëïòT¥ãþi¿ï<щ÷K³µ3ÞŠFÔýÿh{÷¿'›ÝaX‘ÝFß:³×Å¡ôT-vþ[.¯µ(]’EXX–/_hhhŒ3¦Ç÷™ÍfTVVökmjÓqÿ´ßwž(òÖ Üù¿¢\ö *{÷¿'›ÝaX‘CÂâð› ס±º;ŸÌE]™±Ïmj4|ôÑGHHH€V«Åòå˱qãFDGGcذaxõÕW{l£ýé“iÓ¦FŽiy}ÇŽ˜8q"üýý1nÜ8lÜ¸Ñæ²míìß¿cÆŒÁ7ß|£Ñˆ””Œ1:)))0[·{çΘòÿÚ»ÿ ¦Ï<àï˜_ŒB4`À ŠXl{k­³×s·*ÔÕKݱ-âéAug[T´uæ:ÛÑjoZ`ê¶§+eçN "mEWùÑZÏwì¶\ëÙz¶e[ÔjeüÅòC†@òÜ8Tò“¼_3Ì<Ïçùø$¿ß|óûL˜L&±sçN‘šš*êêêDMMxì±ÇĶmÛ„Ñh …B¼ð ¢¾¾^”–– ¢¥¥Åmãòt®†Ê³±÷ŲråJÑÞÞ.ŠŠŠÑÖÖæÖ¼¸êß¼™ÿ»'„ó|Ü=o›››ÎùUÆbE#fn³Šê¢&!£k€¨®®BaµZ½][[ë² W/rƒÁ är¹Ø½{·hoo‡CtvvŠÞÞ^§o555ý÷%&&Ц¦¦þÛŸ|ò‰xôÑGEOO¸xñ¢0™L¢··W|þùçwÄêŽqy:WCåÎÙØûb©ªªº§owæÅUÿ¾àÍüV¬œåãîyëjΨ2ž¤ ÕÈ1wÝÀ /©Õ?]%—˽=¨ªªÂ™3g0uêT,Z´§N¸qΧbbbÿïׯ_‡N§ƒD"D"Á’%KpíÚ5( \¾|z½óæÍÃ{ï½ç•qy2Wws6ö>ÑÑÑ÷ôíμ Õ¿/x3ÿw*}óv$sÞßnäDÃd±Xàp8P^^ƒÁ€ŒŒ ,_¾ƒÁés¾ñLž<µµµB@öövœ9s‹«V­Â–-[P]]wß}×Ãñ*gcï3Ø›Ÿ;ó2TÿÃÕÝnÇÅŠÖÇá/†ÊG߼ɜ÷w,V4æI$,]º•••0°Z­ËåP©þÿ“Éäôù+V¬ÀöíÛqãÆ ÔÔÔ@¯×cïÞ½èééÕj…B¡€ÅbAVV ³³ÓãcògcwÅyIÿw»]׃û#j4Ãjê½ï|màÜn>†3ç ‹yŒ¿|y8$$ï¿ÿ>^}õUÄÄÄàwÞÁ‘#G‚¸¸8<ñÄÐétNŸ¿cǨÕjÌ;O>ù$æÌ™ƒ;w"<<¹¹¹xî¹ç˜˜ˆ¸¸8¤¥¥A¯×{qtžål쮸3/#é ¦o;qô7—%dz¡/½ï|e°¹9Ü|¸šóŠÛÚ“Gt\ëÆÉW®bQV,¢æ„ù: B×þÒÿ~ã:¦ÎŸ€äßÇAÂÿ›0nkOž%ǤCñŸë.ãÛÂ&¿9Ê ÜÏjä„CàëÿhÄ_¶]Åì•“ñ«?Lg¡ø/H!WI±øíéxbûø®ä&N¾rÖÎÑ}^Ðw”³Ÿ±d´ûYS®îö]I3ÎjARvþáwS!çýñsþ=…[„G%®˜Œ‰±J|¶ý:Že\ÆâùŠÖzî®ü¹Ý×!Ñ&WI}Z¨È3X¬È+T“åøuAþnM$"fîIDä< H^3N&ÁÏ_ŠöuD€xdED¥×êÀ·…M£º…¬ˆ(`´œëÂç97ÐÕlŤ„PL˜ªôuHä%<²"¿a3;pjGÌ·Ü»_Q r¶ŸU°²™{qê÷uøøù>=«Ž>Œ¸'½³Y"ù®`A~£ãZ7þü/WÐc´cþï¦bÖòInYÑ[ÃÙNœzól~¹íao”HcJ9‹ù»Å¯÷4âBY t©ñ‹­Sêë°ÈGÎlÁÿþ±±‹ÂñËm@5ÙóÛp_b±"ÿtë‚_þáohýÁŒ‡þI‹yuP¨gRrÖ‹ftÜèÆL½Æ×¡o±X‘Àåãm8ûïPNbeùCðSV¢`ÄbEþÏjêEû•n®ÞN¼¸ê:ù?Åx) Õe3;Ð~¥Û×aPà÷¬ˆÈ넨ý¯6|½·aÚŸ6F$r…GV𺚭øî½›°[ÆÎ¦Ycy?«ºÿ¹£¿¹„SoÖ!váD,ýc¼¯C¢À#+ x-çÍøë¾›8ð͈ÂìZHý­K¶"æïÕcjõðÆo:ñõžF´œïB좉H~3áÓ¹¨1 ‹¼é‹ÃýóGpþO·ðÍÞ&üußMülMI×BªàÉp®´gòê1mÁD¤HSE˜¼ƒÅŠÆåæeêðà3“P]Ô„oÞmÄÇZ1/33–Dð’w‹ÿÇL™íüP†F†/aSÆOQ`áë±XYþ´‡áû÷›}Piå,T4*<²¢1ib¬ÉoÆA8ª¼@8‡]üg…ä¿ø2¦1M2ŽožžÔkøñã6T¬úçò(–<‡GVÔ~(»…ØEá‹â©÷Ãb°á‡òV\¬¸…îŽ^L_ޏdnÙAžÃå–(huwØñaú%XÚlˆ×Gàgk£ ™é+¼_ú°1«¡Žñ¯Í›¿7á»’füíôm¨´r<¼*³žÖ TÃbOŵ)¸ ÇO_Rý¾ä&škº5g<æü6 ± &r/­»8lŸ:‡Pü³3—i á' ä,VDÔŸ1¢æƒf4œíÄäÙ*Ìe*¦ÌïëÈüŠ©ÉŠñ:…¯Ã àÃbE­®®/½ôº»Ý·jDo ´,DmÈi´ÉêÜÖ.™™™X¹r¥¯Ã ÀÃbE­¬¬ «W¯FRR’¯C¡!\¸pIII(++óu(xÊy5 YYY¾†““ãë(€ñÓQ""ò{,VDDä÷X¬ˆˆÈï±X‘ßãt’““þ­´´kÖ¬AUUú¿ß6 ðòË/cæÌ™£Žùn÷Û@ÉÉÉ(--ELLŒÛc"ò$+ J{öìN§»ç~©TŠ´´´Q·i6›QZZŠœœ|ðÁH¸Ñh°XQP ‡F£ôo6lu›7nDJJ nß¾ðp.òJ4üÌŠh€††§§ ív; ’’‚””Àn·;mK*•B&“!,,lXm|õÕWX¿~=ôz=RSSqèÐ!€ÃáÀáDZvíZ,[¶ ›7oÆÅ‹‡l³o,ÕÕÕX½z5Î;çrìÎú€/¿üXºt)ÒÓÓqòäÉ¡“IäF,V”º»»a±XîøéííuùœŠŠ 455¡°°¹¹¹¨®®FIIÉ m¶µµ¡¸¸K–,\.² ³ÙŒ7Þx (--ŦM›PTT„ŽŽTVVâÈ‘#ذa8€µk×¢  `Øq•••aÛ¶mHHHp:6Wýwww#;;Ï>ûlÑܵk—[—¸" ORPZ·nÝ=÷½õÖ[˜6mšÓçœ8qyyyÐh4ˆŒŒDff& °~ýúAÛ E~~þ°ÚxþùçQ\\ŒÈÈH(•JDFFºººpìØ1lܸ ,Lš4 6lÀÛo¿í²ÍeË–øé´æŒ3\æC¡P8í_*•B‹Å…B½^¤¤$(•þµ} m,V”œ]×ÐÐàô97oÞDjjê÷ <Å7°Ížžìß¿»víÂÞ½{‡lC&“¡¾¾»wï†Åb¹ã(èÖ­[÷\Q8°ø —«ÜÇUÿjµyyy¨¨¨@II fÍš…ôôt<þøãC¶Kä.,VDÃ4qâDäååõ$“ɃÁ0èc•J%ôz=Ž?!DÿÕ€ÎÚèééAvv6²³³1þ|Øl6œ8q0eÊ\¹rñññýí_¿~}ØqÉdC¿Ì]õßÓÓ‡ÃììlØív|úé§xíµ×pôèQ¨Õêá¦hTø™Ñ0-X°EEEhnnÆÕ«W±uëV=zÔéãÃÂÂ`6›a±X†lÃf³Án·C&“Ájµöæd6›ñôÓO#??§OŸ†Á`ÀÙ³g±ÿþÇÕÑуÁpÇ«þ% ¶lÙ‚/¾ø]]]°ÙlÉd< H^Å#+¢aÊÈÈÀž={°~ýzH$,\¸™™™N¯Õj¡R©`4¡R©\¶¡T*±iÓ&ìØ±¡¡¡HOOÇâÅ‹±uëVTVVÂf³!??mmmˆÇ믿Ž_|Ñe›­­­ƒÆµyóæ{ªrÚÿG}„íÛ·£°°---ˆŽŽFVV nÂHÞÃý¬( õígu¿+9÷åää@«Õr?+‰rž$""¿ÇbEDD~ÅŠˆˆü‹ù=+""ò{,VDDä÷X¬ˆˆÈïñKÁ4&?~Ü×!СÕj}(+ h111J¥ÈÍÍõu(4 Ë—/÷u ¸‚ù;®`ADDþÅŠˆˆü‹ù=+""ò{ÿØbF³ñJ;IEND®B`‚pktools-2.6.6/doc/html/dir_2676862852e3d558e3597542a81ecc63_dep.png0000644000113200011300000000466112616110567020073 00000000000000‰PNG  IHDR˜ƒ bKGDÿÿÿ ½§“ fIDATxœíÝP”uÀñ7§Ò ±¦9 ,p¢¢Î™Q^v*Õd§‘ÆY jર²Š"XþÀ°Ãð<ÓñWþânÆÆ\™aŠ(’u7 Q‰Š{8íÈ",ßÝÅ>¯¿Ø‡g¿ß/ϾgŸ‡e;£ÑhDE~c툛&”’À„R˜PJJI`B) L(% ¥$0¡”&”’À„R˜PJJI`B©žæÜùý÷ßgýúõ]µaƒââ∊ŠêôýíÌy?XLL ååÿ&88´Ó ¶ëĉ£Œó'Š‹‹;=†YÏ`ÁÁ¡¬YShî0Â%$¼dör &”’À„R˜PJJI`B) ¬jk/2ÈÚËè$°Nhii¡¡¡ÞÚËè$°6´´´°iÓ߉ˆI` QQ9RŽ·· ‘‘Œ©µò*mŸÙ/´>¨Š‹ÿÉÚµ9 ¹…òå—Ÿ“’2 €;ö1vìp>ýô++¯ÒöÉ3X6n\Ojjèׯ?ááO0gÎk/«Û‘ÀÚP[{ÿÀVÛ´Ú?Xi5Ý—Ö†þýÝ8}ú‹VÛΞ=m¥Õt_r Ö†èèÈÊJÇѱC‡§²ò$ÙÙúVû\»ÖˆƒCo+­°{ÀÚ0sfD]ÝnݺŢEsÑjûãëÛE‹ærëÖ->üp7î44|Àöí[ õåÚµF""F Õþ¾Õü‡•èÉ‘#ÿ¢´t/aaÃpssÀÏÏ•·Þºý 677³lY:žøø<̬Yåûïî÷^ŒF#……ùŒ€§g&NKié^\\ìî: Þy[N‘fذa[·îeË–=|òɇ¦n? ééó8|¸Œ;ËÐhnŸŠÞ~ûMjjγÿ1vî,£¼|?YY‹?þ/„‡C§Kæòåÿ1~2ë×oÆÁ¡7ûö૯þÛjþ¼¼\Ö­û^^ƒ˜6m C†süøY23sX¼8+W.“Ÿÿ»wo§¨èvï>@UÕrs—´9î/Ù¼y99–.}“ŠŠjfÏžN—Ü%ÇÑšl:°Ì̼½} É‚Kضm³ész}*k׿ðî»E¸¸hLÛß{¯+ÖâîîA@@ Ë)+û€¬¬U:TFdd±±³qÏù32–3fÌc8;»P^þË—¯¦WÜÝ=øá‡ïÙ´©€ùó3 Äß0yy…ŒñÇ­ùù«Ðë³;öI4𾄅#-mq‡Ç±56ý¯d¼½}LûøøqéÒצÛG=:œ•+—’—·Ñ´ýâÅ øù¹¶§O'àöñ´i¯­gÇŽÛßÇÇ{{{ªªÎ˜8“ÆÆ« 2Ì´OmmM«uúúúãëëß±/8þþþƒ[mÓj~q_£ÑØáñ­Å¦ŸÁÎ;{ÇÇgpuu3ÝÞ²e+Wæ³cÇVÊ˘¶k4}9vì,õõFêëœ?ÿ|ûTuéR-k ÇÂ…)íÎß«W/nܸNll s9xð99ëLû¸ººqñâÓí“'ÿc:Ev„‡Ç#œ>}ªÕ¶3g*[ÝnnnàÛo/ux|k±éÀÒÒ©®®¢¢â(™™ó‰‰™júœƒCo Ò’””ÊìÙ3ýÖø3ÏD²xqµµ5œ:õ9QQOQPGKK ññ±Ìœ™@AÁü„>ÚÓj¾ÆÆ«¿¸Ž¦¦&nÞ¼‰½½=7n\'++€«WäÙg_Ä`ÐQYù••_0o^<µµ5÷5îfÌxôôy8°úú:ÞϲeØÙÙáää @QÑ&~üñÞygõýD+³éÀ¢£_`òäqÄÄü™ÇŠää´»öIJJ0} Óptt$,l'Žeðà¡dd,gÆuÔÕ]&1ñ œGnîÛ$'ÇÑÐðžž5jô]§ÖŸ999c0äòÊ+/0b„žž™2åy¢£Ÿ"))Ç‹`Ê”'?~4x¢×g´;î^~ùU^{-…9s^%8Ø›5kV ×g£ÑôE£é‹Ng`Á‚ÂÃyþùé<¢–gg4ã„CcãMÖ¬)¼ç~|°“×_¥¾þþ¦ª®®bøpŸûÞÿAPZºwwjÚ¶gÏvrr :TÑ¥s¹¸Ø±zõ»<ýô¤{î—ð½{ÛS\ÜùßÈ·ég°_“S§>'.n*Ÿ}v‚ëׯqìØ–,YÈ‹/ΰöÒÌb“ßE::öaúô8k/£Ëµ÷‚hJŠŽ©S'qåÊeôbêÔØnl2°‡îÇÊ•ùÖ^F—»ŸS¾Ng°ÀJ,GN‘B) L(% ¥$0¡”&”’À„R˜PJJI`B) L(% ¥$0¡”&”’À„R˜PJJYô ‡“'?aÉé„ °H`AA!L˜IKËO–˜N´c„H‚‚B,2—Esw÷`ÕªKL%lŒ\ƒ ¥$0¡”&”’À„R˜PJJI`B) L(eÖ ­=zô ¤d%%.]µacž{î9³îoÖß«®®æøñãf-@ض¼¼¼:}³¢=r &”’À„R˜PJJI`B) L(% ¥$0¡”&”’À„R˜PJJI`B©žÀ6k/B<¸þS|ÂÙùÔÌIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsUtils_1_1pktoolsUtils-members.html0000644000113200011300000001103112647637662026430 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pktoolsUtils.pktoolsUtils Member List
pktools-2.6.6/doc/html/classBadConversion__inherit__graph.png0000644000113200011300000001314112616110567021332 00000000000000‰PNG  IHDR…»Kª]ábKGDÿÿÿ ½§“IDATxœíÝ{XS÷ýðwH X¹J rñR@ÄÚÇÚn}ÔQç,-cúèju³Šhí/s«Î*ÝÚ=*®[,XuÚÉ]‘ÖvC‹:ê°T«;•‹"å&% 1HB>¿?øqfø‚Dn›ïëyxä›óý~Ïçä¼=ç@Ž„ˆw± à ŽÁCÁ1x(8†¬§‹‹‹ÑÔÔÔ—µp}ÈÁÁcÇŽ…³³óCíq(*++áææ¹\ÞÓ)¸~TWWooï øûûC©Töf ®Ÿœ9s¦Çcù5Çà¡à<ƒ‡‚c<¡())D"»Œ^y”¶AôP”••A¡Pˆ]FŸë¸]xã7D¬Èv¢‡Âb± ¾¾^ì2ú\ÇíR(ؾ}»ˆÙnÀB‘““ƒ‰'ÂÙÙ8|ø0`Ê”)€#FZ[[àà`¸ºº"44.\æéxîØ6™Lˆ…··7”J%bcca2™pâÄ øùùA£ÑŽ=Šàà`466Âl6cÛ¶m5j†Ž%K–@«Õv;gûº³³³1nÜ8(•J¬Y³---Ìvu¬S«ÕâÕW_…B¡€¿¿?Ö¯_ææf€D"ÁG}„ñãÇcذaعsgßí[PåååQmm­M}õz=ÉårJLL¤êêjÚ¿?Éd2ÒëõT\\L÷—ñî»ï’R©¤¬¬,ªªª¢O>ù„|}}…>Z­–’’’„þÛ;vì yóæÑ;wH¥RÑ3ÏÍŸ?Ÿ†JÓ¦M£“'Oû?hÈ!tùòe«±_ýµÍ¡pvv&V_îîîÂò?üá$•J­jwvv¦«W¯>ôœíµ ¡ï•+WÈÙÙù¡¨¨¨`Æ©T*rvv&¢¶PܸqCX6Сk ƒÁ‹Å‚ôôt¨ÕjDGGcöìÙP«ÕLß1cÆàÊ•+V]»vÍæu) ƒÚFƒ‚‚@EEöìÙƒ^x¿ûÝï„1¾¾¾¸}û¶Ð¾|ù2Þyç›æÚÞ1nwóæMøúú>°FoooH¥R”•• •––ÂÏÏOh;8ˆ÷3À€¬Y"‘ <<™™™Ðét0pttÄc=&ôÑëõ€•+W"66ÙÙÙ¨©©ÁgŸ}†­[· ýœœÜeûå—_ƦM›P^^•J…ˆˆìÝ»‹¿úÕ¯°zõj=z§NBNN ** ¿ÿýïQTT„¢¢"¬Zµ åååÝÎÙníÚµ())Aaa!6oތŋ3Ûu?GGG,X°kÖ¬Á­[·PTT„-[¶ 22²7OsßéÑñ¥‡§ÔÔT $''' ¡ììl""2™LôÜsÏ‘‹‹ ™ÍfЧ   :t(M:• „Cowp:Ž–-[FžžžäååE111ÔØØHûÛßè©§ž"£ÑHDDÇŽ#R«ÕÔÜÜLëׯ'___rww§… ’F£évÎöu'''ÓèÑ£I¡PÐêÕ«É`00ÛÕ±NµZMQQQäååE>>>´nÝ:át‚§‹Žm[ôæô!ùÿ•>´3gÎà‰'ž°ë·ÎKJJ0vìXôð)ìW½Ù?¢¿xÅ ><½àææ†+Vˆ]FŸã¡è¥R‰ÄÄD±Ëès<ƒ‡‚cðPp  ŽÑ«_ñ×jµ0›Í}U 7Hô8r¹UUU}Y‹h,Âûï_Äܹãàçç*v9}B"‘ôøµzŠ©S§ötè SPPŠóçO`ܸDFþDìrDǯ);vQø×l¶ˆ\øì>F£YY_špîÜ ‘+ŸÝ‡âÌ™ëhjjH¥Èʺ(rEâ³ûPdf^„TÚö4˜Í|ú© ƒQäªÄeסhllÁ?ÿY³¹Ux¬¥ÅŒÜÜoD¬J|vŠŽ 23¿©¢ÁÁ®C‘™ùó§|f³yyסÓDªJ|v µºçÎÝDk+û#(áäI•U vŠ?¾Òå2"BzºýžBì6…]þn¥ÅB(((EmmÃW58Øe(ªª´¸x±K׿p+•: '§ë£É÷™]†"'ç2ºûl³¹™™öùBV¯Þ:T55áããfõ˜^ßggGÈdÿûòˆ|ÆHŸëñß}|ßøú®CbâRÌ™3IìRDg—§îÁx(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à<ƒ‡‚cðPp  ŽÁCÁ1˜O²)((@ss³Xõˆ¦¨¨#GºÁݽg7NyT988à©§ž‚»»»ðó™WÍÍÍð÷÷·êd&L»q\»v ---VuúAhnnn>|ø€Å >üš‚cðPp  ŽÁCÁ1D EII s¿ {Zÿ`Õo¡(++ƒB¡è¯é{¤cMxã7D¬hpê·PX,Ô××÷×ô=Ò±&…BíÛ·‹XÑàÔëPäää`âĉpvvF@@> ˜2e `Ĉ€ÖÖVÄÇÇ#88®®® Å… „y:Êïo·úôiŒ5 ì²/ÐvKç>úãÇǰaðsçÎNkêl܇~ˆñãÇcøðáØ¾};>ŒÇîîîxóÍ7…¾&“ ±±±ðöö†R©Dll,L&S·ÏWWãºÚÆöv~~>´Z-^}õU( øûûcýúõhnnfÆæççÛ²ëºFäååQmmmLJ;¥×ëI.—Sbb"UWWÓþýûI&“‘^¯§ââbºúwß}—”J%eeeQUU}òÉ'äëë+ôÑjµ”””$ô¿¿Ý>×Ï~ö3úüóÏéòåËVsw\š?>i4JJJ"T__ÏôëlÜÂ… I§ÓQrr2 _þò—¤Óéhß¾}€¾ûî;""Ú±cÍ›7îܹC*•ŠžyæÚ¸qc·ÏYWãºÚÆö¶^¯§ÈÈH £ÒÒRR©Tôä“OR\\3V¯×Û´ÿˆ:ßß½ …Z­&GGGÚµki4²X,tïÞ=jmmežðàà`:xð ÕøC‡Q'¹d´Ï¥R©¬Ú— P^^F@ÅÅÅ6»té’Õ¸Žíââb"" ¡êêjalnn.Mš4©Ûméj\WÛØÞ6$•J©¨¨H›••EAAAL߇ÑÙþîÕéÃÓÓyyy(((€¿¿?¦OŸŽÿûßpp`§­¨¨À¤IÖ·M˜8qâC­/$$¤ÓÇ©“»Søúúj®®®Vã:¶Ûݾ}>>>H$H$xñÅqëÖ­nçïn\Çmlo×ÖÖ¢µµ²   |ûí·]Ží©^…Â`0Àb± ==jµÑÑј={6Ôj5Ów̘1¸rÅúöK×®]{¨õuÜ1f³PYYÉôí,˜}I¡P ¸¸Ôv´…F£AAAA¯ÇuÜÆö¶··7¤R)ÊÊÊ„e¥¥¥ðóóërlOõꙓH$Gff&t:ŒF#ñØc }ôz=`åÊ•ˆEvv6jjjðÙgŸaëÖ­B¿††$''wÙ¾Ÿ‡‡àïÿ;t:vïÞýPu·×Ô/¿ü26mÚ„òòr¨T*DDD`ïÞ½ý6ÎÑÑ ,Àš5kpëÖ-aË–-ˆŒŒìõ¶0l9ÇÚØËË 111ؼys¯ç=pàž~úiÄÆÆ =jµ©©©xöÙg{½Žþäî˜±ËèÔ€_SH¥Rxzz íÿüç?xíµ×yóæáÿøÀb± %%QQQ˜9s&V­Z…ÿþ÷¿Â¸sçÎaÞ¼yÌüK—.ņ „¶^¯ÇöíÛñóŸÿ¿øÅ/£Ñ íôvêÔ),]ºsæÌAJJ `Ë–-xÿý÷…9L&fÏž‚‚m¯Ù$&&bîܹ˜;w.a6›QYY‰3fàÒ¥KX°`®^½ŠóçÏ#::áááX´hþõ¯€Ð·7uö—~Ess3 šššPQQääd¼øâ‹€¦¦&lݺcÇŽÅ‘#Gðúë¯#)) Z­™™™HMMELL >Œ¨¨($&&h{Õj5FŬoÈ!P*•Bû½÷ÞC]]±cÇâèÑ£Âòüü|ìÝ»+V¬À¾}ûpïÞ=„……áìÙ³hÿØòÂÂBÈåráè“‘‘êêjìÛ·þóŸqéÒ%8p@˜3-- 7nÄÈ‘#‡—^zIøÎ;;}« 'uö—~ÅòåË1sæLÌš5 K–,ÁÍ›7prrÂþýû±fÍxyy ;³±±'NœÀÊ•+1mÚ4xyyaòäÉÂá¶}gµßO´+f³Ÿþ9V¯^ `Ù²eÈÍÍú¼ôÒKpqqÁOúSm×*?úÑ ÓépãÆ ÀéÓ§©´í“ÿ?ýôS¬]»J¥X±b¾üòï™ÄÄÄàé§Ÿ†T*Á`0ÀÉÉ ÈÉÉ\.ï“:ûK¿_S9r~~~€––dddà·¿ý-RRR “Éðí·ßb×®]0 ;v¬0®®®AAAVs\]]áéé‰òòrL˜0ÁªÏõë×ñ׿þï½÷t:, |}}…å~~~¨««Ú … “ýï©Ëå ÅÙ³g1fÌœ?IIIÂòššæÔ5tèPáûö#˜««+þò—¿ ##@pp0-Z„É“'[Õh4=ª³¿ è5…\.ǬY³p÷î]hµZ´´´ ..¯¼ò >øàüæ7¿úŽ1¥¥¥Vãoß¾-|ŠÔÔTá¨Ñ.77f³r¹žžžppp@uuµ°¼ªªJx‚®6í§/¾øÁÁÁð÷÷–¹»»ãÈ‘#ÈËËC^^rrr¬®AÚw\KK , âââ““ƒ™3gbóæÍÌ¡¿7uö‡~…V«…Z­†Z­ÆÝ»wqôèQ(•JxxxÀd2Ál6C&“Áh4 ç妦&Ì™3 øâ‹/ V«ñå—_âÃ?掎ƕ+Wð§?ý ×®]CYY:„¬¬,,_¾@ÛΙ1cvïÞêêjܺu û÷ïÇ /¼ÐmÝÏ>û,ôz=<ˆ™3gZ-›6m’’’P[[‹²²2lذÇgæH$ˆÅ¹sçÐØØ“É™LÆœ>zSgè÷cѪU«„ï% üqÄÅÅA"‘ÀÅů¿þ:Þ~ûm 2‹-BXX6lØ€ÌÌL˜L&$$$ ¾¾xóÍ7ñë_ÿ@Ûº|ð°mÛ6 Œ5 ï¼ó¦L™"¬síڵسgV®\ GGG<ÿü󈌌ì¶n™L†éÓ§ãôéÓ˜>}ºÕ²èèhìÙ³¯½ö$ ~üãcÅŠøî»ï¬ú999aÓ¦MØ·oîÞ½ ___lÛ¶ NNNÌúzZg°ùÎ@iiiX°`Á |Ž{°·Þz ÇGZZšMýù{ƒ‡‚cðPp  ŽÁCÁ1x(8Çà¡à6¿¢ÙþaÇ_±ã ¯¼òŠÍ}m~E³¹¹'OžDkkk ãÄóƒü@x—¹;6‡‚³üš‚cðPp  Ž!.vÜàòú½,~ðüIEND®B`‚pktools-2.6.6/doc/html/pklas2img_8py_source.html0000644000113200011300000011003712647637661016617 00000000000000 pktools: /home/kempenep/pktools/qgis/pklas2img.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pklas2img.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pklas2img.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.parameters import ParameterFile
32 from processing.core.outputs import OutputRaster
33 from processing.core.parameters import ParameterSelection
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterBoolean
37 from processing.core.parameters import ParameterExtent
38 
39 class pklas2img(pktoolsAlgorithm):
40 
41  INPUT = "INPUT"
42  OUTPUT = "OUTPUT"
43  ATTRIBUTE_OPTIONS = ["z","intensity", "return", "nreturn"]
44  COMPOSITE_OPTIONS = ["last", "min", "max", "median", "mean", "sum", "first", "profile" "percentile", "height", "values", "percentile", "number"]
45  FILTER_OPTIONS = ["all","first","last","single","multiple"]
46 
47  ATTRIBUTE = "ATTRIBUTE"
48  COMPOSITE = "COMPOSITE"
49  FILTER = "FILTER"
50 
51  PERCENTILE = "PERCENTILE"
52  DX = "DX"
53  DY = "DY"
54 # PROJWIN = 'PROJWIN'
55  NODATA = "NODATA"
56  RTYPE = 'RTYPE'
57  TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
58  EXTRA = 'EXTRA'
59 
60  def cliName(self):
61  return "pklas2img"
62 
63  def defineCharacteristics(self):
64  self.name = "Create raster dataset from LAS(Z) data point cloud(s)"
65  self.group = "[pktools] LiDAR"
66 
67  self.addParameter(ParameterFile(self.INPUT, "Input LAS(Z) data set(s)", False, False))
68 
69  self.addParameter(ParameterSelection(self.ATTRIBUTE,"name of the point attribute to select",self.ATTRIBUTE_OPTIONS, 0))
70  self.addParameter(ParameterSelection(self.COMPOSITE,"composite for multiple points in cell",self.COMPOSITE_OPTIONS, 0))
71  self.addParameter(ParameterSelection(self.FILTER,"filter las points",self.FILTER_OPTIONS, 0))
72  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
73  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type', self.TYPE, 0))
74  self.addParameter(ParameterNumber(self.PERCENTILE, "Percentile value used for rule percentile",0.0,100.0,95))
75  self.addParameter(ParameterNumber(self.DX, "Output resolution in x",0.0,None,1.0))
76  self.addParameter(ParameterNumber(self.DY, "Output resolution in y",0.0,None,1.0))
77  # self.addParameter(ParameterExtent(self.PROJWIN,
78  # 'Georeferenced boundingbox'))
79  self.addParameter(ParameterNumber(self.NODATA, "nodata value to put in image",0,None,0))
80  self.addParameter(ParameterString(self.EXTRA,
81  'Additional parameters', '-of GTiff', optional=True))
82 
83  def processAlgorithm(self, progress):
84  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
85  commands = [cliPath]
86 
87  input=self.getParameterValue(self.INPUT)
88  inputFiles = input.split(';')
89  for inputFile in inputFiles:
90  commands.append('-i')
91  commands.append('"' + inputFile + '"')
92 
93  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
94  commands.append('-ot')
95  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
96 
97  output=self.getOutputValue(self.OUTPUT)
98  if output != "":
99  commands.append("-o")
100  commands.append('"' + output + '"')
101 
102  commands.append("-n")
103  commands.append(self.ATTRIBUTE_OPTIONS[self.getParameterValue(self.ATTRIBUTE)])
104  commands.append("-comp")
105  commands.append(self.COMPOSITE_OPTIONS[self.getParameterValue(self.COMPOSITE)])
106  commands.append("-fir")
107  commands.append(self.FILTER_OPTIONS[self.getParameterValue(self.FILTER)])
108  if self.getParameterValue(self.DX) != 0:
109  commands.append("-dx")
110  commands.append(str(self.getParameterValue(self.DX)))
111  if self.getParameterValue(self.DY) != 0:
112  commands.append("-dy")
113  commands.append(str(self.getParameterValue(self.DY)))
114  #projwin = str(self.getParameterValue(self.PROJWIN))
115  # regionCoords = projwin.split(',')
116  # commands.append('-ulx')
117  # commands.append(regionCoords[0])
118  # commands.append('-uly')
119  # commands.append(regionCoords[3])
120  # commands.append('-lrx')
121  # commands.append(regionCoords[1])
122  # commands.append('-lry')
123  # commands.append(regionCoords[2])
124  commands.append('-nodata')
125  commands.append(str(self.getParameterValue(self.NODATA)))
126 
127  extra = str(self.getParameterValue(self.EXTRA))
128  if len(extra) > 0:
129  commands.append(extra)
130 
131  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass__coll__graph.md50000644000113200011300000000004012616110566023642 0000000000000000293936f75bf36c5fc69d4acd9d76a7pktools-2.6.6/doc/html/dir_b66e135988e27fdc966ddddb8708f514.html0000644000113200011300000001057712647637663020033 00000000000000 pktools: /home/kempenep/pktools/qt/pksvm_gui Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
pksvm_gui Directory Reference
Directory dependency graph for pksvm_gui:
/home/kempenep/pktools/qt/pksvm_gui

Files

file  main.cpp [code]
 
file  mainwindow.cpp [code]
 
file  mainwindow.h [code]
 
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem__inherit__graph.png0000644000113200011300000000740312616110567027377 00000000000000‰PNG  IHDRíp}×`EbKGDÿÿÿ ½§“¸IDATxœíÝTÓÕÿðû†ñã 0=LäW0‘:x<û#ƒ)hêÈ£$ƒÔ ÀL9‘¡™ð”@ep*•M­±”ðGð`*‰ !‰‚`‚É„‰lÀö~ÿx>ïïc2Ýš»½xÞï»{ïûu·çÙ.cC‚¢(€…³2wäàr p98`™»Ã(•ÊŽŽ’$Í]æÜÝÝgÍšeî* `a9–Ëå–u[¹\ÞßßoYw²…å˜6þ|s—€³?þøÃÜ% öÇc€È1Àäààß’ã›7oñONõñÇ‘m¬&NÄÍ›7{Z<ü[r¬SWW‡Ã1ÅÌE{yyI$cÍ9cÆŒíÛ·#S–m¹þÕ9&Ir``À3_½zµ­­­   ¹¹¹½½Ý(sr8úÙÝte[. sL¿þ–——ûûû»¸¸lݺutt”¹•¢¨mÛ¶ß»wïÅ_D¹ººÒ7 nذÃáxzznÛ¶M©TNÖȨ¨¨xþùçííí}}}Åb1Ó^\\0ñ)™¢(¡Pèää´dÉ’“'OÒ†‰×¢×R]]íååuôèQº›VÙ¡ÊÊJ.—;sæÌ¬¬,º… ˆÂÂÂyóæÍš5+;;[,ûøø°ÙìÝ»wíŽ~ªP¥¯¯¯¶¶VŸŽŽ„Pxxx{{{}}=—ËÍÈÈ I’dBÌôd ‚¥K—vvv¶´´eddèldF ÛÙÙ …ÂÞÞÞ‚‚‹5<>>"‘ˆ¢¨>úhþüùš…Q•ŸŸïááñóÏ?K¥Òªª*.—K·Ov­ÈÈÈšššææfº›VÙ¡×^{M.——––"„è¥!„Ö­['—Ë>ŒZ»v­\.‰DL=Z[[[[[ {`Ì Û·´´Ð§‰„ËåÒiii¡7nhö¤ÇÆÆ¬­­™Ç¯¬¬ŒËåêldFÉd2›}ûöÝ¿Ÿ$ɨÕjŠ¢êëëY,—ÆÆF„ÐÕ«W5/ôý÷ß3!„ô\‹^ 3|bŽÏž=KQ”Z­FuttÐMMMôº´ŽézXbŽ1ÜWÐæÌ™Cܽ{—>nhh ÍÌ̜ؿ¯¯O­Vûùùѧ\.÷îÝ»:™!3gά­­­¯¯÷ôô 9w•B¨¸¸X¥Rq8‚ .\ˆÒÚZtvv1§“À,AÿbÝÝÝBôÕŽŽŽ!­c,a›cúI !ÔÞÞN?Ì¡ŠŠ ¡PX\\\[[«ÕöìÙÖÖÖ]]]ôigg§‡‡‡ÎFfˆB¡ Iòرc2™,>>~ÅŠ2™L­VK$’œœœÿ“šš*‘H(ïy{{k~†¡­­m²èãGæÏXo)Z.lsœ’’róæÍ†††;wÆÆÆÒÓ¦Mó÷÷ß±cGrr2óÛðð0BÈÆÆ&::zëÖ­·nÝjmmݵk—@ ÐÙÈ\‚ ˆðððÒÒR¹\>66fccãààpîܹþþ~@0ýbbb:::èÝ-móæÍiii•••555Aè¿ÖDtÙà¿Ì½±1ÌÔ÷LJöööæp8[¶lQ(š{J…B1wîÜôôôñññ—^ziúôét»L&‹‹‹svvvss{ï½÷ …ÎFÍ©$‰ŸŸŸ­­m@@@yy9EQIIIááášõ$éçç·}ûvf Z­ÎÍÍõóóc³Ùååå³fÍz䵘c­²‘Æ–iì'6jOÆ÷ÇØæø)ç1UTT4773§%%%ÁÁÁf¬G‹%æÛ}ÅÓ¬¥¥%66¶©©idd¤¾¾~÷îÝ æ.ʲYäçèõsrrJJJ2wú¤¥¥ŒŒðù|©TêëëûÖ[o=å?ýÊ¢þKÿµk×BCCÍ]Îè÷R,ëK7°¯8€@Ž Çù~EOO¹KÀ™R©´··7w†±°ÛÙÙa¬O¦ÿH’:x°1*ÊßÃÃÑܵ`ÆŒæ.Á0–c6›bî* P_ßyáÂOþþ¾A¨¹kÁìMëøñFú_• þ& AŽMhlLUVv!444RWwÃÜåà rlBgÏ^EY[[••5š»œAŽM¨´´ÑÚÚ !¤R‘gδ(cæ®[cSyøpô?ÿiU©Ôôé訪ªêšyKÂäØT4CŒ²²"JK/›±¼AŽM¥´ô²æ×æT*²¶öº\®0cIƒ›„Lö°®®]­þÛ{mE>Ýb®’ð96‰“'ŸØHQÔ±c°µ0 ȱI””4Lü‚IRõõ}}Cf) ocãëéll¼M’:¾hcmmUQ¡ã© ûœEsssbN‡‡GíímX¬ÿ>eüëÿôIXØ÷L-‘»û{Báú•+ƒÍ]Î`_p98€@Ž Çc€È1Àäàr p98€@Ž Çc€È1Àäàr p98€@Ž Çc€È1Àäàr p98€@Ž Çc€È1Àäàr °@iðöö6w9²³ó²²r0w¸±µµýõ×_™èþíÿ¹}ûöš5kÍUS´gÏžîînæTûÿ¹ ýG+Àp{öìÑ<…ý1Àäàr p980UŽ»»»y<ž¹†›ºŠ¢öîÝ©ÙÁ(5qáSœÜB×¢ÅT9ž>}úºuëŒ;gooïªU«Œ;çãøå—_¾ùæ¤k¥OOSÇZL•c6›˜˜hÜ9I’”ËåÆóñŒŽŽ"„\\\®•>=uNk1,ÇE?~|ýúõË–-Û¼yó•+Wx<EQ?ýôÓ† –/_žššzñâE§ùšráÂ…øøøðð𘘘ÊÊJ­9éžçÏŸ‹‹‹ŠŠúúë¯ÇÇÇ5¯˜———044ôÎ;ï „^ýuú¦áááìììU«V­Y³&//olll²F†)*™øê©U§J¥ …QQQQQQB¡P¥RÑCššš¢££ÿý÷ââ⸸¸eË–½ûî»mmm“Bñx¼3gά_¿žÏçUVV®[·nùòå………¯e* Ëñ©S§¾ýöÛ„„±Xüæ›ofee!„NŸ>-‹7oÞ\TT$8 9D©Tfddðù|z…Ÿ}ö™R©œ8ó‰'²²²233ûí·¢¢"º‘¢(‘HÔÔÔ”““Ãf³<ˆ*++£oýòË/¥R©P(üôÓO~øá‡ÉM]‰­[KJJz{{E"Ñ_|ÑÔÔtäȺýÇܱcGKK‹D"ILL‹ÅqqqB¡Pÿ¨ÆÆÆ¼¼¼ÄÄÄüüü‹/lÚ´I,ë|ÖÄi-ú–ãÒÒÒäääÅ‹;;;/Z´(!!i|á…ØlöÂ… 7nܨ9d||œ¢(…BakkQQQagg7qæM›6yzzΛ7/!!¡ªªŠnÙ¨èèh‡ððp„PLLŒƒƒCDDBèÁƒx¯E?íßKë×ÛÛËår™S___„POOÓøì³ÏjqttÌÍÍ-))9räÈܹscbb-Z4qfOOOúÀËËK*•ÒÇ7nÜþî»ïvìØ¡Õÿþýû$Iº»»Ó§R©Tg£©+y¤¿þúkõêÕÌé´iÓ˜ùBR©tâ]ªg”ƒƒBˆÅbië„ÓZô3l‡Ãéììôóó£OÿüóO„ÐìÙ³oݺÅ}ûömÍ!£££$Ifdd¨Tªêêê;wž8qÂÑÑQkæ»wïÒ3ܹsÇÙÙ™nÌÌÌ”J¥ñññ¯¾úê‚ 4ûÏœ9ÓÊʪ··—þŒ^OO‡ÃÑÙhêJ‰Ífçææzxx „†‡‡e2ÝN?f®®®ïR=£ ‚ÓZô3l_™——wþüy™LvéÒ¥C‡!„ø|¾H$º|ù²\.¿råÊÑ£G ‚`†ñÁÔÕÕ=|øp||œÅbѯæ§Nzøð!ÓmÿþýÝÝÝׯ_?|øð+¯¼B7ÚÛÛ?óÌ3111999ÌOl …!Äb±x<ÞW_}ÕÛÛ{ëÖ­‚‚‚°°0¦«D?ºN„ÐâÅ‹óóóûúúºººÒÒÒNœ8¡ÙmåÊ•šw)óSŽþQ“Ái-1ìù8::Z­V8p`ppÞë|òÉ'|>_­Vçææ ÍŸ??99ùóÏ?g†ØÚÚ~øá‡"‘¨¿¿ßÝÝ===ÝÖÖ!´oß¾àà`æ%&,,ìý÷ßW*•K—.šû˜˜˜êêꢢ¢¸¸¸çž{nõêÕ§OŸF¥¤¤ìß¿?99ÙÆÆfÉ’%@g#3•+a2¡“«««fñññû÷ïûí· ‚xùå—“’’îÝ»Çtæóùãããyyy~~~»wï¦ß"˜8j*Nk1AQÔÿŸDzzúÔ?·ÙÝÝ›™™éâ⼚ÔÕÕ‰Åâüü|ƒ&©­­5¤l“xz*yr8­E''‘HÖ®]KŸá÷ ]]]{÷îíèè½víZaaáòåËŸ|Z¦î1<ÔôÆo(•Ê]»v º¹¹EFF®X±bêçM›fPÓyz*yr8­e*žh_€¹_€ÙAŽ Çc€í÷+ÄbñÉ“'ÍR ío9NMM½s玹J`êæÌ™£ù1¯¿½ï€…‚ý1Àäàr p98ø?’:ÃpïEIEND®B`‚pktools-2.6.6/doc/html/pkextract__gui_2mainwindow_8cpp_source.html0000644000113200011300000007440212647637661022413 00000000000000 pktools: /home/kempenep/pktools/qt/pkextract_gui/mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.cpp
1 #include "mainwindow.h"
2 #include "ui_mainwindow.h"
3 #include <QFileDialog>
4 #include <QStandardItemModel>
5 #include <QMessageBox>
6 #include <QProcess>
7 
8 MainWindow::MainWindow(QWidget *parent) :
9  QMainWindow(parent),
10  ui(new Ui::MainWindow)
11 {
12  ui->setupUi(this);
13  QStringList rulelist;
14  rulelist << "point" << "pointOnSurface" << "centroid" << "mean" << "stdev" << "median" << "proportion" << "min" << "max" << "mode" << "sum";
15  ui->rule->addItems(rulelist);
16  QStringList formatlist;
17  formatlist << "SQLite" << "ESRI Shapefile";
18  ui->f->addItems(formatlist);
19 
20  setDefaults();
21 }
22 
23 MainWindow::~MainWindow()
24 {
25  delete ui;
26 }
27 
28 void MainWindow::setDefaults()
29 {
30  //tab input/output
31  ui->input->clear();
32  ui->sample->clear();
33  ui->bndnodata->clear();
34  ui->srcnodata->clear();
35  ui->polygon->setChecked(false);
36  ui->f->setCurrentIndex(0);
37  ui->output->clear();
38  //tab extract
39  ui->bname->setText("b");
40  ui->cname->setText("label");
41  ui->rule->setCurrentIndex(0);
42  ui->nclass->clear();
43  QStringList labels;
44  setClassTable(labels);
45  ui->threshold->clear();
46 }
47 
48 void MainWindow::on_actionInput_triggered()
49 {
50  QString qsinput = QFileDialog::getOpenFileName(this, "Input");
51  ui->input->setText(qsinput);
52 }
53 
54 void MainWindow::on_actionSample_triggered()
55 {
56  QString qssample = QFileDialog::getOpenFileName(this, "Sample");
57  ui->sample->setText(qssample);
58 }
59 
60 void MainWindow::on_actionOutput_triggered()
61 {
62  QString qsoutput = QFileDialog::getSaveFileName(this,"Output image","","*.*");
63  ui->output->setText(qsoutput);
64 }
65 
66 void MainWindow::on_toolButton_input_clicked()
67 {
68  on_actionInput_triggered();
69 }
70 
71 void MainWindow::on_toolButton_sample_clicked()
72 {
73  on_actionSample_triggered();
74 }
75 
76 void MainWindow::on_toolButton_output_clicked()
77 {
78  on_actionOutput_triggered();
79 }
80 
81 void MainWindow::setClassTable(const QStringList &labels)
82 {
83  QStandardItemModel *model = new QStandardItemModel(labels.size(),2,this); //2 Rows and 3 Columns
84  model->setHorizontalHeaderItem(0, new QStandardItem(QString("label name")));
85  model->setHorizontalHeaderItem(1, new QStandardItem(QString("select(%)")));
86  for(int ilabel=0;ilabel<labels.size();++ilabel){
87  QStandardItem *firstCol = new QStandardItem(QString(labels[ilabel]));
88  model->setItem(ilabel,0,firstCol);
89  QStandardItem *secondCol = new QStandardItem(QString::number(100));
90  model->setItem(ilabel,1,secondCol);
91  }
92  ui->tableView_labels->setModel(model);
93 }
94 
95 void MainWindow::on_pushButton_run_clicked()
96 {
97  try{
98  ui->commandLineEdit->clear();
99  ui->consoleEdit->clear();
100 
101  QString program = "pkextract";
102  if(ui->sample->text().isEmpty())
103  MainWindow::on_actionSample_triggered();
104  if(ui->sample->text().isEmpty()){
105  QString qsError="No sample image file selected";
106  throw(qsError);
107  }
108 
109  if(ui->input->text().isEmpty())
110  MainWindow::on_actionInput_triggered();
111  if(ui->input->text().isEmpty()){
112  QString qsError="No input image file selected";
113  throw(qsError);
114  }
115 
116  if(ui->output->text().isEmpty())
117  MainWindow::on_actionOutput_triggered();
118  if(ui->output->text().isEmpty()){
119  QString qsError="No output image file selected";
120  throw(qsError);
121  }
122 
123  program+=" --f "+ui->f->currentText();
124 
125  if(ui->polygon->isChecked())
126  program+=" --polygon";
127 
128  program+=" --rule "+ui->rule->currentText();
129 // QList<QComboBox*> qcomboBoxList = this->findChildren<QComboBox *>();
130 
131 // for(QList<QComboBox*>::ConstIterator qcbit=qcomboBoxList.begin();qcbit!=qcomboBoxList.end();++qcbit){
132 // QString qsOption;
133 // qsOption+=" --";
134 // qsOption+=(*qcbit)->objectName();
135 // program+=qsOption;
136 // program+=" ";
137 // program+=QString::number((*qcbit)->currentIndex());
138 // }
139 
140  QList<QLineEdit*> qlineEditList = this->findChildren<QLineEdit *>();
141 
142  for(QList<QLineEdit*>::ConstIterator qlbit=qlineEditList.begin();qlbit!=qlineEditList.end();++qlbit){
143  if(!((*qlbit)->text().isEmpty())){
144  QString qsOption;
145  qsOption+=" --";
146  qsOption+=(*qlbit)->objectName();
147  qsOption+=" ";
148  qsOption+=(*qlbit)->text();
149  program+=qsOption;
150  }
151  }
152 
153  //class table
154  for(int irow=0;irow<ui->tableView_labels->model()->rowCount();++irow){
155  QString qsOption;
156  qsOption+=" --class ";
157  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,0)).toString();
158  qsOption+=" --threshold ";
159  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,1)).toString();
160  program+=qsOption;
161  }
162 
163  ui->commandLineEdit->insert(program);
164 
165 // QProcess *myProcess = new QProcess(parent);
166  QProcess *myProcess = new QProcess(this);
167  myProcess->start(program);
168  myProcess->setProcessChannelMode(QProcess::MergedChannels);
169  this->setCursor(Qt::WaitCursor);
170  myProcess->waitForFinished(-1);
171  this->setCursor(Qt::ArrowCursor);
172 // QString p_stderr = myProcess->readyReadStandardError();
173 // if(!p_stderr.isEmpty()){
174 // QMessageBox msgBox;
175 // msgBox.setText(p_stderr);
176 // msgBox.exec();
177 // }
178  QString p_stdout = myProcess->readAll();
179  ui->consoleEdit->insertPlainText(p_stdout);
180  delete myProcess;
181  }
182  catch(QString qsError){
183  QMessageBox msgBox;
184  msgBox.setText(qsError);
185  msgBox.exec();
186  }
187 }
188 
189 void MainWindow::on_toolButton_createTable_clicked()
190 {
191  int nclass=ui->nclass->text().toInt();
192  QStringList labels;
193  for(int iclass=1;iclass<=nclass;++iclass){
194  QString lstring="label";
195  lstring+=QString::number(iclass);
196  labels << lstring;
197  }
198  setClassTable(labels);
199 }
200 
201 void MainWindow::on_pushButton_restore_clicked()
202 {
203  setDefaults();
204 }
205 
pktools-2.6.6/doc/html/md_mainpage.html0000644000113200011300000000463012647637662015011 00000000000000 pktools: mainpage
pktools  2.6.6
Processing Kernel for geospatial data
mainpage
pktools-2.6.6/doc/html/Optionpk_8h_source.html0000644000113200011300000022444612647637662016343 00000000000000 pktools: /home/kempenep/pktools/src/base/Optionpk.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
Optionpk.h
1 /**********************************************************************
2 Optionpk.h: class to handle command line options (inherits from stl vector class)
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _OPTIONPK_H_
21 #define _OPTIONPK_H_
22 
23 #include <vector>
24 #include <string>
25 #include <cstdlib>
26 #include <assert.h>
27 #include <stdexcept>
28 #include <iostream>
29 #include <iomanip>
30 #include <sstream>
31 #include <typeinfo>
32 #ifndef WIN32
33 #include <cxxabi.h>
34 #define mytypeid(T) abi::__cxa_demangle(typeid(T).name(),0,0,&status)
35 #else
36 #define mytypeid(T) typeid(T).name()
37 #endif
38 #include "ogr_feature.h"
39 
40 #ifdef HAVE_CONFIG_H
41 #include <config.h>
42 #endif
43 
45 class BadConversion : public std::runtime_error {
46  public:
47  BadConversion(std::string const& s)
48  : runtime_error(s)
49  { }
50 };
51 
53 template<typename T> inline T string2type(std::string const& s){
54  std::istringstream i(s);
55  T x;
56  if (!(i >> x) )
57  throw BadConversion(s);
58  return x;
59 }
60 
62 template<typename T> inline T string2type(std::string const& s,bool failIfLeftoverChars){
63  std::istringstream i(s);
64  char c;
65  T x;
66  if (!(i >> x) || (failIfLeftoverChars && i.get(c)))
67  throw BadConversion(s);
68  return x;
69 }
70 
72 template<typename T> inline std::string type2string(T const& value){
73  std::ostringstream oss;
74  oss << value;
75  return oss.str();
76 }
77 
106 template<class T> class Optionpk : public std::vector <T>
107 {
108 public:
110  Optionpk();
112  Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo);
114  Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const T& defaultValue, short hide=0);
116  ~Optionpk();
118  void setHelp(const std::string& helpInfo){m_help=helpInfo;};
120  void setHide(short hide){m_hide=hide;};
122  bool retrieveOption(int argc, char ** argv);
124  template<class T1> friend std::ostream& operator<<(std::ostream & os, const Optionpk<T1>& theOption);
126  void setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo);
128  void setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const T& defaultValue, short hide);
130  void setDefault(const T& defaultValue);
131  std::string getDefaultValue() const {return m_defaultValue;};
133  void setShortName(const std::string& shortName);
135  void setLongName(const std::string& longName);
137  std::string getShortName() const {return m_shortName;};
139  std::string getLongName() const {return m_longName;};
141  std::string getHelp() const {return m_help;};
143  static std::string getGPLv3License(){
144  return static_cast<std::string>("\n\
145  This program is free software: you can redistribute it and/or modify\n\
146  it under the terms of the GNU General Public License as published by\n\
147  the Free Software Foundation, either version 3 of the License, or\n\
148  (at your option) any later version.\n\
149  \n\
150  This program is distributed in the hope that it will be useful,\n\
151  but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
152  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
153  GNU General Public License for more details.\n\
154  \n\
155  You should have received a copy of the GNU General Public License\n\
156  along with this program. If not, see <http://www.gnu.org/licenses/>.\n");};
157 
160  typename std::vector<T>::const_iterator findSubstring(const T& argument) const {std::string errorString="Error: findSubstring only defined for options of type std::string"; throw(errorString);};
161 
162  private:
164  bool hasArgument() const {return m_hasArgument;};
166  bool hasShortOption() const {return m_shortName.compare("\0");};
168  bool hasLongOption() const {return m_longName.compare("\0");};
170  std::string usage() const;
172  std::string usageDoxygen() const;
174  std::string m_shortName;
176  std::string m_longName;
178  std::string m_help;
180  bool m_hasArgument;
182  T m_defaultValue;
184  bool m_hasDefault;
186  short m_hide;
187 };
188 
189 template<class T1> std::ostream& operator<<(std::ostream& os, const Optionpk<T1>& theOption)
190 {
191  os << theOption.getLongName() << ": ";
192  for(int index=0;index<theOption.size();++index)
193  os << type2string<T1>(theOption[index]) << " ";
194  os << std::endl;
195  return os;
196 }
197 
198 template<class T> inline Optionpk<T>::Optionpk()
199 : m_hasDefault(false)
200 {
201 }
202 
209 template<class T> inline Optionpk<T>::Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo)
210 : m_hasDefault(false)
211 {
212  setAll(shortName,longName,helpInfo);
213 }
214 
225 template<class T> inline Optionpk<T>::Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const T& defaultValue, short hide)
226 {
227  setAll(shortName,longName,helpInfo,defaultValue, hide);
228 }
229 
230 template<class T> inline std::string Optionpk<T>::usage() const
231 {
232  std::ostringstream helpss;
233  std::string shortOption=m_shortName;
234  std::string longOption=m_longName;
235  shortOption.insert(0,"-");
236  longOption.insert(0,"--");
237  if(hasShortOption())
238  helpss << " " << std::setiosflags(std::ios::left) << std::setw(4) << shortOption;
239  else
240  helpss << " " << std::setiosflags(std::ios::left) << std::setw(4) << " ";
241  if(hasLongOption())
242  helpss << " " << std::setiosflags(std::ios::left) << std::setw(20) << longOption;
243  else
244  helpss << " " << std::setiosflags(std::ios::left) << std::setw(20) << " ";
245  helpss << " " << m_help;
246  if(m_hasDefault)
247  helpss << " (default: " << type2string<T>(m_defaultValue) << ")";
248  return helpss.str();
249 }
250 
251 template<class T> inline std::string Optionpk<T>::usageDoxygen() const
252 {
253  std::ostringstream helpss;
254  std::string shortOption=m_shortName;
255  std::string longOption=m_longName;
256 
257  if(hasShortOption())
258  helpss << " | " << std::setiosflags(std::ios::left) << std::setw(6) << shortOption << " | ";
259  else
260  helpss << " | " << std::setiosflags(std::ios::left) << " | ";
261  if(hasLongOption())
262  helpss << std::setiosflags(std::ios::left) << std::setw(20) << longOption << " | ";
263  else
264  helpss << std::setiosflags(std::ios::left) << " | ";
265  int status;
266  helpss << std::setiosflags(std::ios::left) << std::setw(4) << mytypeid(T) << " | ";
267  //helpss << std::setiosflags(std::ios::left) << std::setw(4) << abi::__cxa_demangle(typeid(T).name(),0,0,&status) << " | ";
268  if(m_hasDefault)
269  helpss <<std::setiosflags(std::ios::left) << std::setw(5) << type2string<T>(m_defaultValue) << " |";
270  else
271  helpss << " |";
272  helpss << m_help << " | ";
273 
274  return helpss.str();
275 }
276 
277 template<class T> inline void Optionpk<T>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo)
278 {
279  m_shortName=shortName;
280  m_longName=longName;
281  m_hasArgument=true;
282  m_help=helpInfo;
283  m_hide=0;
284 }
285 
286 template<class T> inline void Optionpk<T>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const T& defaultValue, short hide)
287 {
288  m_shortName=shortName;
289  m_longName=longName;
290  m_hasArgument=true;
291  m_help=helpInfo;
292  m_defaultValue=defaultValue;
293  m_hasDefault=true;
294  m_hide=hide;
295 }
296 
297 
298 template<class T> inline Optionpk<T>::~Optionpk()
299 {
300 }
301 
305 template<class T> inline bool Optionpk<T>::retrieveOption(int argc, char **argv){
306  bool noHelp=true;//return value, alert main program that hard coded option (help, version, license, doxygen) was invoked
307  std::string helpStringShort="-h";//short option for help (hard coded)
308  std::string helpStringLong="--help";//long option for help (hard coded)
309  std::string helpStringDoxygen="--doxygen";//option to create table of options ready to use for doxygen
310  std::string versionString="--version";//option to show current version
311  std::string licenseString="--license";//option to show current version
312  for(int i = 1; i < argc; ++i ){
313  std::string currentArgument;
314  std::string currentOption=argv[i];
315  std::string shortOption=m_shortName;
316  std::string longOption=m_longName;
317  shortOption.insert(0,"-");
318  longOption.insert(0,"--");
319  size_t foundEqual=currentOption.rfind("=");
320  if(foundEqual!=std::string::npos){
321  currentArgument=currentOption.substr(foundEqual+1);
322  currentOption=currentOption.substr(0,foundEqual);
323  }
324  if(!helpStringShort.compare(currentOption)){
325  if(m_hide<1)
326  std::cout << usage() << std::endl;
327  noHelp=false;
328  }
329  else if(!helpStringLong.compare(currentOption)){
330  if(m_hide<2)
331  std::cout << usage() << std::endl;
332  noHelp=false;
333  }
334  else if(!helpStringDoxygen.compare(currentOption)){
335  if(m_hide<2)
336  std::cout << usageDoxygen() << std::endl;
337  noHelp=false;
338  }
339  else if(!versionString.compare(currentOption)){
340  std::string theVersion="version ";
341  theVersion+=VERSION;
342  theVersion+=", Copyright (C) Pieter Kempeneers.\n\
343  This program comes with ABSOLUTELY NO WARRANTY; for details type use option -h.\n \
344  This is free software, and you are welcome to redistribute it\n \
345  under certain conditions; use option --license for details.";
346  throw(theVersion);//no need to continue registering (break prevents from multiplication of version info)
347  }
348  else if(!licenseString.compare(currentOption)){
349  throw(getGPLv3License());
350  }
351  if(hasShortOption()&&!(shortOption.compare(currentOption))){//for -option
352  if(foundEqual!=std::string::npos)
353  this->push_back(string2type<T>(currentArgument));
354  else if(m_hasArgument && i < argc-1)
355  this->push_back(string2type<T>(argv[++i]));
356  else
357  this->push_back(string2type<T>("1"));
358  }
359  else if(hasLongOption()&&!(longOption.compare(currentOption))){//for --option
360  if(foundEqual!=std::string::npos)
361  this->push_back(string2type<T>(currentArgument));
362  else if(m_hasArgument && i < argc-1)
363  this->push_back(string2type<T>(argv[++i]));
364  else
365  this->push_back(string2type<T>("1"));
366  }
367  }
368  if(!(this->size())&&m_hasDefault)//only set default value if no options were given
369  this->push_back(m_defaultValue);
370  return(noHelp);
371 }
372 
373 //template<class T> typename std::vector<T>::const_iterator Optionpk<T>::findSubstring(const T& argument) const {std::string errorString="Error: findSubstring only defined for options of type std::string"; throw(errorString);}
374 
375 //todo: to be put in .cc file
377 
379 template<> inline std::string string2type(std::string const& s){
380  return s;
381 }
382 
383 template<> inline double string2type(std::string const& s){
384  std::istringstream i;
385  i.precision(12);
386  i.str(s);
387  double x;
388  if (!(i >> std::setprecision(12) >> x) )
389  throw BadConversion(s);
390  return x;
391 }
392 
393 template<> inline float string2type(std::string const& s){
394  std::istringstream i;
395  i.precision(12);
396  i.str(s);
397  float x;
398  if (!(i >> std::setprecision(12) >> x) )
399  throw BadConversion(s);
400  return x;
401 }
402 
404 template<> inline OGRFieldType string2type(std::string const& s){
405  OGRFieldType ftype;
406  int ogr_typecount=11;//hard coded for now!
407  for(int iType = 0; iType < ogr_typecount; ++iType){
408  if( OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType) != NULL
409  && EQUAL(OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType),s.c_str()))
410  ftype=(OGRFieldType) iType;
411  }
412  return ftype;
413 }
414 
416 template<> inline std::string type2string(bool const& value){
417  if(value)
418  return("true");
419  else
420  return("false");
421 }
422 
424 template<> inline std::string type2string(std::string const& value){
425  // if(value.empty())
426  // return("<empty string>");
427  // else
428  return(value);
429 }
430 
432 template<> inline std::string type2string(float const& value){
433  std::ostringstream oss;
434  // oss.precision(1);
435  // oss.setf(ios::fixed);
436  oss << value;
437  return oss.str();
438 }
439 
441 template<> inline std::string type2string(double const& value){
442  std::ostringstream oss;
443  // oss.precision(1);
444  // oss.setf(ios::fixed);
445  oss << value;
446  return oss.str();
447 }
448 
450 template<> inline void Optionpk<bool>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo)
451 {
452  m_shortName=shortName;
453  m_longName=longName;
454  m_hasArgument=false;
455  m_help=helpInfo;
456  m_hide=0;
457 }
458 
460 template<> inline void Optionpk<bool>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const bool& defaultValue, short hide)
461 {
462  m_shortName=shortName;
463  m_longName=longName;
464  m_hasArgument=false;
465  m_help=helpInfo;
466  m_defaultValue=defaultValue;
467  m_hasDefault=true;
468  m_hide=hide;
469 }
470 
472 template<> inline Optionpk<bool>::Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo)
473 {
474  setAll(shortName,longName,helpInfo);
475 }
476 
478 template<> inline Optionpk<bool>::Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const bool& defaultValue, short hide)
479 {
480  setAll(shortName,longName,helpInfo,defaultValue, hide);
481 }
482 
483 //specialization (only makes sense for T=std::string), generic function throws exception
484 //find a substring in string option (e.g., option is of type -co INTERLEAVE=BAND)
485 template<> inline std::vector<std::string>::const_iterator Optionpk<std::string>::findSubstring(const std::string& argument) const{
486  std::vector<std::string>::const_iterator opit=this->begin();
487  while(opit!=this->end()){
488  if(opit->find(argument)!=std::string::npos)
489  break;
490  ++opit;
491  }
492  return opit;
493 }
494 
495 #endif
throw this class when syntax error in command line option
Definition: Optionpk.h:45
std::string getShortName() const
get the short name to be used as -shortName
Definition: Optionpk.h:137
Optionpk()
default constructor
Definition: Optionpk.h:198
~Optionpk()
default destructor
Definition: Optionpk.h:298
std::string getHelp() const
get help info stored in m_help
Definition: Optionpk.h:141
void setDefault(const T &defaultValue)
set a default value for the option
void setHelp(const std::string &helpInfo)
set help information
Definition: Optionpk.h:118
std::vector< T >::const_iterator findSubstring(const T &argument) const
Definition: Optionpk.h:160
static std::string getGPLv3License()
get license info
Definition: Optionpk.h:143
void setLongName(const std::string &longName)
set the long name to be used as –longName
std::string getLongName() const
get the long name to be used as –longName
Definition: Optionpk.h:139
void setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo)
set all attributes of the option, except default and hide
Definition: Optionpk.h:277
void setShortName(const std::string &shortName)
set the short name to be used as -shortName
void setHide(short hide)
hide option from short help -h (1) or make invisible to short and long help –help (2) ...
Definition: Optionpk.h:120
bool retrieveOption(int argc, char **argv)
read option from command line (use for all options!)
Definition: Optionpk.h:305
pktools-2.6.6/doc/html/pktools_2pkcrop_8py_source.html0000644000113200011300000010300412647637661020055 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkcrop.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcrop.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkcrop.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkcrop(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  DX = "DX"
43  DY = "DY"
44  PROJWIN = 'PROJWIN'
45  BAND = "BAND"
46  NODATA = "NODATA"
47  RESAMPLE_OPTIONS = ['near', 'bilinear']
48  RESAMPLE = "RESAMPLE"
49  RTYPE = 'RTYPE'
50  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
51  EXTRA = 'EXTRA'
52 
53  def cliName(self):
54  return "pkcrop"
55 
56  def defineCharacteristics(self):
57  self.name = "crop raster datasets"
58  self.group = "[pktools] raster"
59  self.addParameter(ParameterMultipleInput(self.INPUT, 'Input layer raster data set',ParameterMultipleInput.TYPE_RASTER))
60  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
61  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
62  self.addParameter(ParameterNumber(self.DX, "Output resolution in x (leave 0 for no change)",0.0,None,0.0))
63  self.addParameter(ParameterNumber(self.DY, "Output resolution in y (leave 0 for no change)",0.0,None,0.0))
64  self.addParameter(ParameterExtent(self.PROJWIN,
65  'Georeferenced boundingbox'))
66  self.addParameter(ParameterString(self.NODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
67  self.addParameter(ParameterString(self.BAND, "Band(s) in input image to crop, e.g., 0;1;2 (leave empty to retain all bands)",'', optional=True))
68  self.addParameter(ParameterSelection(self.RESAMPLE,"resampling method",self.RESAMPLE_OPTIONS, 0))
69  self.addParameter(ParameterString(self.EXTRA,
70  'Additional parameters', '-of GTiff', optional=True))
71 
72  def processAlgorithm(self, progress):
73  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
74  commands = [cliPath]
75 
76  input=self.getParameterValue(self.INPUT)
77  inputFiles = input.split(';')
78  for inputFile in inputFiles:
79  commands.append('-i')
80  commands.append('"' + inputFile + '"')
81 
82  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
83  commands.append('-ot')
84  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
85  output=self.getOutputValue(self.OUTPUT)
86  if output != "":
87  commands.append("-o")
88  commands.append('"' + output + '"')
89  if self.getParameterValue(self.DX) != 0:
90  commands.append("-dx")
91  commands.append(str(self.getParameterValue(self.DX)))
92  if self.getParameterValue(self.DY) != 0:
93  commands.append("-dy")
94  commands.append(str(self.getParameterValue(self.DY)))
95 
96  projwin = str(self.getParameterValue(self.PROJWIN))
97  if(str(projwin).find(',')>0):
98  regionCoords = projwin.split(',')
99  commands.append('-ulx')
100  commands.append(regionCoords[0])
101  commands.append('-uly')
102  commands.append(regionCoords[3])
103  commands.append('-lrx')
104  commands.append(regionCoords[1])
105  commands.append('-lry')
106  commands.append(regionCoords[2])
107 
108  nodata=self.getParameterValue(self.NODATA)
109  if nodata != "none":
110  nodataValues = nodata.split(';')
111  for nodataValue in nodataValues:
112  commands.append('-nodata')
113  commands.append(nodataValue)
114 
115  band=self.getParameterValue(self.BAND)
116  if band != '':
117  bandValues = band.split(';')
118  for bandValue in bandValues:
119  commands.append('-b')
120  commands.append(bandValue)
121  commands.append("-r")
122  commands.append(self.RESAMPLE_OPTIONS[self.getParameterValue(self.RESAMPLE)])
123 
124  extra = str(self.getParameterValue(self.EXTRA))
125  if len(extra) > 0:
126  commands.append(extra)
127 
128  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classUi_1_1MainWindow.html0000644000113200011300000025643512647637663016625 00000000000000 pktools: Ui::MainWindow Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Ui::MainWindow Class Reference
Inheritance diagram for Ui::MainWindow:
Collaboration diagram for Ui::MainWindow:

Additional Inherited Members

- Public Member Functions inherited from Ui_MainWindow
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
- Public Attributes inherited from Ui_MainWindow
QAction * actionInput_image
 
QAction * actionOutput_image
 
QAction * actionQuit
 
QAction * actionSelection_Info_file
 
QAction * actionExtent
 
QWidget * centralWidget
 
QVBoxLayout * verticalLayout
 
QTabWidget * tabWidget
 
QWidget * tab
 
QVBoxLayout * verticalLayout_2
 
QGridLayout * gridLayout_2
 
QSpacerItem * horizontalSpacer_3
 
QListWidget * listWidget_input
 
QLabel * label
 
QToolButton * toolButton_input
 
QLineEdit * lry
 
QLineEdit * uly
 
QLabel * label_2
 
QSpacerItem * horizontalSpacer_2
 
QLineEdit * lrx
 
QLineEdit * ulx
 
QLabel * label_4
 
QLineEdit * extent
 
QToolButton * toolButton_extent
 
QWidget * tab_2
 
QGridLayout * gridLayout_4
 
QSpacerItem * verticalSpacer_3
 
QComboBox * resample
 
QLabel * label_18
 
QLabel * label_17
 
QComboBox * crule
 
QLabel * label_19
 
QLineEdit * cband
 
QGroupBox * groupBox
 
QGridLayout * gridLayout_3
 
QLabel * label_21
 
QLineEdit * srcnodata
 
QLabel * label_23
 
QLabel * label_22
 
QLineEdit * min
 
QLineEdit * max
 
QLabel * label_20
 
QLineEdit * bndnodata
 
QSpacerItem * horizontalSpacer_4
 
QSpacerItem * horizontalSpacer_5
 
QWidget * tab_3
 
QVBoxLayout * verticalLayout_3
 
QGridLayout * gridLayout
 
QSpacerItem * horizontalSpacer_6
 
QLabel * label_7
 
QLabel * label_14
 
QLineEdit * file
 
QLabel * label_10
 
QComboBox * oformat
 
QComboBox * interleaved
 
QLabel * label_9
 
QLineEdit * dx
 
QLabel * label_8
 
QLabel * label_13
 
QToolButton * toolButton_ct
 
QComboBox * compressed
 
QLabel * label_12
 
QLineEdit * ct
 
QLineEdit * output
 
QToolButton * toolButton_output
 
QLabel * label_6
 
QLineEdit * a_srs
 
QLabel * label_15
 
QLineEdit * dy
 
QLabel * label_5
 
QCheckBox * tiled
 
QComboBox * otype
 
QLabel * label_11
 
QLineEdit * dstnodata
 
QToolButton * toolButton_file
 
QLabel * label_3
 
QWidget * tab_4
 
QVBoxLayout * verticalLayout_5
 
QVBoxLayout * verticalLayout_4
 
QLabel * label_24
 
QLineEdit * commandLineEdit
 
QLabel * label_25
 
QPlainTextEdit * consoleEdit
 
QSpacerItem * verticalSpacer_2
 
QHBoxLayout * horizontalLayout_2
 
QToolButton * toolButton_Run
 
QSpacerItem * horizontalSpacer
 
QToolButton * toolButton_defaults
 
QMenuBar * menuBar
 
QMenu * menuFile
 
QToolBar * mainToolBar
 
QStatusBar * statusBar
 
QAction * actionInput
 
QAction * actionOutput
 
QListWidget * listWidget_band
 
QLabel * label_16
 
QToolButton * toolButton
 
QSpacerItem * horizontalSpacer_9
 
QSpacerItem * verticalSpacer
 
QSpacerItem * horizontalSpacer_8
 
QRadioButton * autoscale
 
QLineEdit * offset
 
QRadioButton * manual
 
QRadioButton * noscale
 
QLineEdit * scale
 
QLineEdit * as_from
 
QLineEdit * as_to
 
QSpacerItem * horizontalSpacer_11
 
QSpacerItem * horizontalSpacer_10
 
QLineEdit * nodata
 
QSpacerItem * horizontalSpacer_7
 
QButtonGroup * buttonGroup
 
QAction * actionReference
 
QAction * actionMask
 
QAction * actionColor_table
 
QWidget * layoutWidget
 
QLineEdit * lclass
 
QLineEdit * input
 
QCheckBox * confusion
 
QLineEdit * mask
 
QToolButton * toolButton_mask
 
QLineEdit * msknodata
 
QSpacerItem * horizontalSpacer_15
 
QLineEdit * nclass
 
QLineEdit * lref
 
QLabel * label_reference
 
QLineEdit * reference
 
QToolButton * toolButton_reference
 
QComboBox * f
 
QWidget * widget
 
QToolButton * commandLinkButtonPrepareTable
 
QTableView * tableView_labels
 
QVBoxLayout * verticalLayout_6
 
QHBoxLayout * horizontalLayout
 
QPushButton * pushButton_run
 
QPushButton * pushButton_restore
 
QAction * actionSample
 
QGridLayout * gridLayout_5
 
QHBoxLayout * horizontalLayout_3
 
QHBoxLayout * horizontalLayout_4
 
QLineEdit * sample
 
QToolButton * toolButton_sample
 
QCheckBox * polygon
 
QHBoxLayout * horizontalLayout_5
 
QLineEdit * bname
 
QComboBox * rule
 
QToolButton * toolButton_createTable
 
QLineEdit * threshold
 
QLineEdit * cname
 
QHBoxLayout * horizontalLayout_6
 
QAction * actionTraining
 
QToolButton * toolButton_training
 
QLineEdit * training
 
QLineEdit * label
 
QLineEdit * tln
 
QCommandLinkButton * commandLinkButtonPrepareTable
 
QLineEdit * cv
 
QLineEdit * ccost
 
QComboBox * svmtype
 
QLineEdit * gamma
 
QLineEdit * coef0
 
QLineEdit * nu
 
QLineEdit * kd
 
QComboBox * kerneltype
 

Detailed Description

Definition at line 702 of file ui_mainwindow.h.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Debug/ui_mainwindow.h
pktools-2.6.6/doc/html/pkann_8cc_source.html0000644000113200011300000061776712647637661016020 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkann.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkann.cc
1 /**********************************************************************
2 pkann.cc: classify raster image using Artificial Neural Network
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <stdlib.h>
21 #include <vector>
22 #include <map>
23 #include <algorithm>
24 #include "imageclasses/ImgReaderGdal.h"
25 #include "imageclasses/ImgWriterGdal.h"
26 #include "imageclasses/ImgReaderOgr.h"
27 #include "imageclasses/ImgWriterOgr.h"
28 #include "base/Optionpk.h"
29 #include "base/PosValue.h"
30 #include "algorithms/ConfusionMatrix.h"
31 #include "floatfann.h"
32 #include "algorithms/myfann_cpp.h"
33 
34 /******************************************************************************/
108 using namespace std;
109 
110 int main(int argc, char *argv[])
111 {
112  vector<double> priors;
113 
114  //--------------------------- command line options ------------------------------------
115  Optionpk<string> input_opt("i", "input", "input image");
116  Optionpk<string> training_opt("t", "training", "training vector file. A single vector 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)");
117  Optionpk<string> tlayer_opt("tln", "tln", "training layer name(s)");
118  Optionpk<string> label_opt("label", "label", "identifier for class label in training vector file.","label");
119  Optionpk<unsigned int> balance_opt("bal", "balance", "balance the input data to this number of samples for each class", 0);
120  Optionpk<bool> random_opt("random", "random", "in case of balance, randomize input data", true,2);
121  Optionpk<int> 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);
122  Optionpk<unsigned short> band_opt("b", "band", "band index (starting from 0, either use band option or use start to end)");
123  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
124  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
125  Optionpk<double> offset_opt("offset", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
126  Optionpk<double> scale_opt("scale", "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);
127  Optionpk<unsigned short> aggreg_opt("a", "aggreg", "how to combine aggregated classifiers, see also rc option (1: sum rule, 2: max rule).",1);
128  Optionpk<double> priors_opt("prior", "prior", "prior probabilities for each class (e.g., -p 0.3 -p 0.3 -p 0.2 )", 0.0);
129  Optionpk<string> priorimg_opt("pim", "priorimg", "prior probability image (multi-band img with band for each class","",2);
130  Optionpk<unsigned short> cv_opt("cv", "cv", "n-fold cross validation mode",0);
131  Optionpk<string> cmformat_opt("cmf","cmf","Format for confusion matrix (ascii or latex)","ascii");
132  Optionpk<unsigned int> nneuron_opt("nn", "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);
133  Optionpk<float> connection_opt("\0", "connection", "connection reate (default: 1.0 for a fully connected network)", 1.0);
134  Optionpk<float> learning_opt("l", "learning", "learning rate (default: 0.7)", 0.7);
135  Optionpk<float> 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);
136  Optionpk<unsigned int> maxit_opt("\0", "maxit", "number of maximum iterations (epoch) (default: 500)", 500);
137  Optionpk<unsigned short> comb_opt("comb", "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);
138  Optionpk<unsigned short> bag_opt("bag", "bag", "Number of bootstrap aggregations (default is no bagging: 1)", 1);
139  Optionpk<int> bagSize_opt("bs", "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);
140  Optionpk<string> classBag_opt("cb", "classbag", "output for each individual bootstrap aggregation (default is blank)");
141  Optionpk<string> mask_opt("m", "mask", "Only classify within specified mask (vector or raster). For raster mask, set nodata values with the option msknodata.");
142  Optionpk<short> msknodata_opt("msknodata", "msknodata", "mask value(s) not to consider for classification. Values will be taken over in classification image. Default is 0", 0);
143  Optionpk<unsigned short> nodata_opt("nodata", "nodata", "nodata value to put where image is masked as nodata", 0);
144  Optionpk<string> output_opt("o", "output", "output classification image");
145  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");
146  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
147  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
148  Optionpk<string> colorTable_opt("ct", "ct", "colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)");
149  Optionpk<string> prob_opt("\0", "prob", "probability image. Default is no probability image");
150  Optionpk<string> entropy_opt("entropy", "entropy", "entropy image (measure for uncertainty of classifier output","",2);
151  Optionpk<string> active_opt("active", "active", "ogr output for active training sample.","",2);
152  Optionpk<string> ogrformat_opt("f", "f", "Output ogr format for active training sample","SQLite");
153  Optionpk<unsigned int> nactive_opt("na", "nactive", "number of active training points",1);
154  Optionpk<string> classname_opt("c", "class", "list of class names.");
155  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in class opt).");
156  Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0,2);
157 
158  option_opt.setHide(1);
159  oformat_opt.setHide(1);
160  band_opt.setHide(1);
161  bstart_opt.setHide(1);
162  bend_opt.setHide(1);
163  balance_opt.setHide(1);
164  minSize_opt.setHide(1);
165  bag_opt.setHide(1);
166  bagSize_opt.setHide(1);
167  comb_opt.setHide(1);
168  classBag_opt.setHide(1);
169  minSize_opt.setHide(1);
170  prob_opt.setHide(1);
171  priorimg_opt.setHide(1);
172  minSize_opt.setHide(1);
173  offset_opt.setHide(1);
174  scale_opt.setHide(1);
175  connection_opt.setHide(1);
176  weights_opt.setHide(1);
177  maxit_opt.setHide(1);
178  learning_opt.setHide(1);
179 
180  verbose_opt.setHide(2);
181 
182  bool doProcess;//stop process when program was invoked with help option (-h --help)
183  try{
184  doProcess=input_opt.retrieveOption(argc,argv);
185  training_opt.retrieveOption(argc,argv);
186  tlayer_opt.retrieveOption(argc,argv);
187  label_opt.retrieveOption(argc,argv);
188  balance_opt.retrieveOption(argc,argv);
189  random_opt.retrieveOption(argc,argv);
190  minSize_opt.retrieveOption(argc,argv);
191  band_opt.retrieveOption(argc,argv);
192  bstart_opt.retrieveOption(argc,argv);
193  bend_opt.retrieveOption(argc,argv);
194  offset_opt.retrieveOption(argc,argv);
195  scale_opt.retrieveOption(argc,argv);
196  aggreg_opt.retrieveOption(argc,argv);
197  priors_opt.retrieveOption(argc,argv);
198  priorimg_opt.retrieveOption(argc,argv);
199  cv_opt.retrieveOption(argc,argv);
200  cmformat_opt.retrieveOption(argc,argv);
201  nneuron_opt.retrieveOption(argc,argv);
202  connection_opt.retrieveOption(argc,argv);
203  weights_opt.retrieveOption(argc,argv);
204  learning_opt.retrieveOption(argc,argv);
205  maxit_opt.retrieveOption(argc,argv);
206  comb_opt.retrieveOption(argc,argv);
207  bag_opt.retrieveOption(argc,argv);
208  bagSize_opt.retrieveOption(argc,argv);
209  classBag_opt.retrieveOption(argc,argv);
210  mask_opt.retrieveOption(argc,argv);
211  msknodata_opt.retrieveOption(argc,argv);
212  nodata_opt.retrieveOption(argc,argv);
213  output_opt.retrieveOption(argc,argv);
214  otype_opt.retrieveOption(argc,argv);
215  oformat_opt.retrieveOption(argc,argv);
216  colorTable_opt.retrieveOption(argc,argv);
217  option_opt.retrieveOption(argc,argv);
218  prob_opt.retrieveOption(argc,argv);
219  entropy_opt.retrieveOption(argc,argv);
220  active_opt.retrieveOption(argc,argv);
221  ogrformat_opt.retrieveOption(argc,argv);
222  nactive_opt.retrieveOption(argc,argv);
223  classname_opt.retrieveOption(argc,argv);
224  classvalue_opt.retrieveOption(argc,argv);
225  verbose_opt.retrieveOption(argc,argv);
226  }
227  catch(string predefinedString){
228  std::cout << predefinedString << std::endl;
229  exit(0);
230  }
231  if(!doProcess){
232  cout << endl;
233  cout << "Usage: pkann -t training [-i input -o output] [-cv value]" << endl;
234  cout << endl;
235  cout << "short option -h shows basic options only, use long option --help to show all options" << endl;
236  exit(0);//help was invoked, stop processing
237  }
238 
239  if(entropy_opt[0]=="")
240  entropy_opt.clear();
241  if(active_opt[0]=="")
242  active_opt.clear();
243  if(priorimg_opt[0]=="")
244  priorimg_opt.clear();
245 
246  if(verbose_opt[0]>=1){
247  if(input_opt.size())
248  cout << "image filename: " << input_opt[0] << endl;
249  if(mask_opt.size())
250  cout << "mask filename: " << mask_opt[0] << endl;
251  if(training_opt.size()){
252  cout << "training vector file: " << endl;
253  for(int ifile=0;ifile<training_opt.size();++ifile)
254  cout << training_opt[ifile] << endl;
255  }
256  else
257  cerr << "no training file set!" << endl;
258  cout << "verbose: " << verbose_opt[0] << endl;
259  }
260  unsigned short nbag=(training_opt.size()>1)?training_opt.size():bag_opt[0];
261  if(verbose_opt[0]>=1)
262  cout << "number of bootstrap aggregations: " << nbag << endl;
263 
264  ImgReaderOgr extentReader;
265  OGRLayer *readLayer;
266 
267  double ulx=0;
268  double uly=0;
269  double lrx=0;
270  double lry=0;
271 
272  bool maskIsVector=false;
273  if(mask_opt.size()){
274  try{
275  extentReader.open(mask_opt[0]);
276  maskIsVector=true;
277  readLayer = extentReader.getDataSource()->GetLayer(0);
278  if(!(extentReader.getExtent(ulx,uly,lrx,lry))){
279  cerr << "Error: could not get extent from " << mask_opt[0] << endl;
280  exit(1);
281  }
282  }
283  catch(string errorString){
284  maskIsVector=false;
285  }
286  }
287 
288  ImgWriterOgr activeWriter;
289  if(active_opt.size()){
290  ImgReaderOgr trainingReader(training_opt[0]);
291  activeWriter.open(active_opt[0],ogrformat_opt[0]);
292  activeWriter.createLayer(active_opt[0],trainingReader.getProjection(),wkbPoint,NULL);
293  activeWriter.copyFields(trainingReader);
294  }
295  vector<PosValue> activePoints(nactive_opt[0]);
296  for(int iactive=0;iactive<activePoints.size();++iactive){
297  activePoints[iactive].value=1.0;
298  activePoints[iactive].posx=0.0;
299  activePoints[iactive].posy=0.0;
300  }
301 
302  unsigned int totalSamples=0;
303  unsigned int nactive=0;
304  vector<FANN::neural_net> net(nbag);//the neural network
305 
306  unsigned int nclass=0;
307  int nband=0;
308  int startBand=2;//first two bands represent X and Y pos
309 
310  if(priors_opt.size()>1){//priors from argument list
311  priors.resize(priors_opt.size());
312  double normPrior=0;
313  for(int iclass=0;iclass<priors_opt.size();++iclass){
314  priors[iclass]=priors_opt[iclass];
315  normPrior+=priors[iclass];
316  }
317  //normalize
318  for(int iclass=0;iclass<priors_opt.size();++iclass)
319  priors[iclass]/=normPrior;
320  }
321 
322  //convert start and end band options to vector of band indexes
323  try{
324  if(bstart_opt.size()){
325  if(bend_opt.size()!=bstart_opt.size()){
326  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
327  throw(errorstring);
328  }
329  band_opt.clear();
330  for(int ipair=0;ipair<bstart_opt.size();++ipair){
331  if(bend_opt[ipair]<=bstart_opt[ipair]){
332  string errorstring="Error: index for end band must be smaller then start band";
333  throw(errorstring);
334  }
335  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
336  band_opt.push_back(iband);
337  }
338  }
339  }
340  catch(string error){
341  cerr << error << std::endl;
342  exit(1);
343  }
344  //sort bands
345  if(band_opt.size())
346  std::sort(band_opt.begin(),band_opt.end());
347 
348  map<string,short> classValueMap;
349  vector<std::string> nameVector;
350  if(classname_opt.size()){
351  assert(classname_opt.size()==classvalue_opt.size());
352  for(int iclass=0;iclass<classname_opt.size();++iclass)
353  classValueMap[classname_opt[iclass]]=classvalue_opt[iclass];
354  }
355  //----------------------------------- Training -------------------------------
357  vector< vector<double> > offset(nbag);
358  vector< vector<double> > scale(nbag);
359  map<string,Vector2d<float> > trainingMap;
360  vector< Vector2d<float> > trainingPixels;//[class][sample][band]
361  vector<string> fields;
362  for(int ibag=0;ibag<nbag;++ibag){
363  //organize training data
364  if(ibag<training_opt.size()){//if bag contains new training pixels
365  trainingMap.clear();
366  trainingPixels.clear();
367  if(verbose_opt[0]>=1)
368  cout << "reading imageVector file " << training_opt[0] << endl;
369  try{
370  ImgReaderOgr trainingReaderBag(training_opt[ibag]);
371  if(band_opt.size())
372  totalSamples=trainingReaderBag.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt);
373  else
374  totalSamples=trainingReaderBag.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt);
375  if(trainingMap.size()<2){
376  string errorstring="Error: could not read at least two classes from training file, did you provide class labels in training sample (see option label)?";
377  throw(errorstring);
378  }
379  trainingReaderBag.close();
380  }
381  catch(string error){
382  cerr << error << std::endl;
383  exit(1);
384  }
385  catch(...){
386  cerr << "error caught" << std::endl;
387  exit(1);
388  }
389  //delete class 0 ?
390  // if(verbose_opt[0]>=1)
391  // std::cout << "erasing class 0 from training set (" << trainingMap[0].size() << " from " << totalSamples << ") samples" << std::endl;
392  // totalSamples-=trainingMap[0].size();
393  // trainingMap.erase(0);
394  //convert map to vector
395  if(verbose_opt[0]>1)
396  std::cout << "training pixels: " << std::endl;
397  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
398  while(mapit!=trainingMap.end()){
399  //delete small classes
400  if((mapit->second).size()<minSize_opt[0]){
401  trainingMap.erase(mapit);
402  continue;
403  }
404  trainingPixels.push_back(mapit->second);
405  if(verbose_opt[0]>1)
406  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
407  ++mapit;
408  }
409  if(!ibag){
410  nclass=trainingPixels.size();
411  if(classname_opt.size())
412  assert(nclass==classname_opt.size());
413  nband=(training_opt.size())?trainingPixels[0][0].size()-2:trainingPixels[0][0].size();//X and Y
414  }
415  else{
416  assert(nclass==trainingPixels.size());
417  assert(nband==(training_opt.size())?trainingPixels[0][0].size()-2:trainingPixels[0][0].size());
418  }
419 
420  //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp
421  //balance training data
422  if(balance_opt[0]>0){
423  while(balance_opt.size()<nclass)
424  balance_opt.push_back(balance_opt.back());
425  if(random_opt[0])
426  srand(time(NULL));
427  totalSamples=0;
428  for(int iclass=0;iclass<nclass;++iclass){
429  if(trainingPixels[iclass].size()>balance_opt[iclass]){
430  while(trainingPixels[iclass].size()>balance_opt[iclass]){
431  int index=rand()%trainingPixels[iclass].size();
432  trainingPixels[iclass].erase(trainingPixels[iclass].begin()+index);
433  }
434  }
435  else{
436  int oldsize=trainingPixels[iclass].size();
437  for(int isample=trainingPixels[iclass].size();isample<balance_opt[iclass];++isample){
438  int index = rand()%oldsize;
439  trainingPixels[iclass].push_back(trainingPixels[iclass][index]);
440  }
441  }
442  totalSamples+=trainingPixels[iclass].size();
443  }
444  }
445 
446  //set scale and offset
447  offset[ibag].resize(nband);
448  scale[ibag].resize(nband);
449  if(offset_opt.size()>1)
450  assert(offset_opt.size()==nband);
451  if(scale_opt.size()>1)
452  assert(scale_opt.size()==nband);
453  for(int iband=0;iband<nband;++iband){
454  if(verbose_opt[0]>=1)
455  cout << "scaling for band" << iband << endl;
456  offset[ibag][iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband];
457  scale[ibag][iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband];
458  //search for min and maximum
459  if(scale[ibag][iband]<=0){
460  float theMin=trainingPixels[0][0][iband+startBand];
461  float theMax=trainingPixels[0][0][iband+startBand];
462  for(int iclass=0;iclass<nclass;++iclass){
463  for(int isample=0;isample<trainingPixels[iclass].size();++isample){
464  if(theMin>trainingPixels[iclass][isample][iband+startBand])
465  theMin=trainingPixels[iclass][isample][iband+startBand];
466  if(theMax<trainingPixels[iclass][isample][iband+startBand])
467  theMax=trainingPixels[iclass][isample][iband+startBand];
468  }
469  }
470  offset[ibag][iband]=theMin+(theMax-theMin)/2.0;
471  scale[ibag][iband]=(theMax-theMin)/2.0;
472  if(verbose_opt[0]>=1){
473  std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl;
474  std::cout << "Using offset, scale: " << offset[ibag][iband] << ", " << scale[ibag][iband] << std::endl;
475  std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[ibag][iband])/scale[ibag][iband] << "," << (theMax-offset[ibag][iband])/scale[ibag][iband] << "]" << std::endl;
476  }
477  }
478  }
479  }
480  else{//use same offset and scale
481  offset[ibag].resize(nband);
482  scale[ibag].resize(nband);
483  for(int iband=0;iband<nband;++iband){
484  offset[ibag][iband]=offset[0][iband];
485  scale[ibag][iband]=scale[0][iband];
486  }
487  }
488 
489  if(!ibag){
490  if(priors_opt.size()==1){//default: equal priors for each class
491  priors.resize(nclass);
492  for(int iclass=0;iclass<nclass;++iclass)
493  priors[iclass]=1.0/nclass;
494  }
495  assert(priors_opt.size()==1||priors_opt.size()==nclass);
496 
497  //set bagsize for each class if not done already via command line
498  while(bagSize_opt.size()<nclass)
499  bagSize_opt.push_back(bagSize_opt.back());
500 
501  if(verbose_opt[0]>=1){
502  std::cout << "number of bands: " << nband << std::endl;
503  std::cout << "number of classes: " << nclass << std::endl;
504  std::cout << "priors:";
505  if(priorimg_opt.empty()){
506  for(int iclass=0;iclass<nclass;++iclass)
507  std::cout << " " << priors[iclass];
508  std::cout << std::endl;
509  }
510  }
511  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
512  bool doSort=true;
513  while(mapit!=trainingMap.end()){
514  nameVector.push_back(mapit->first);
515  if(classValueMap.size()){
516  //check if name in training is covered by classname_opt (values can not be 0)
517  if(classValueMap[mapit->first]>0){
518  if(cm.getClassIndex(type2string<short>(classValueMap[mapit->first]))<0)
519  cm.pushBackClassName(type2string<short>(classValueMap[mapit->first]),doSort);
520  }
521  else{
522  std::cerr << "Error: names in classname option are not complete, please check names in training vector and make sure classvalue is > 0" << std::endl;
523  exit(1);
524  }
525  }
526  else
527  cm.pushBackClassName(mapit->first,doSort);
528  ++mapit;
529  }
530  if(classname_opt.empty()){
531  //std::cerr << "Warning: no class name and value pair provided for all " << nclass << " classes, using string2type<int> instead!" << std::endl;
532  for(int iclass=0;iclass<nclass;++iclass){
533  if(verbose_opt[0])
534  std::cout << iclass << " " << cm.getClass(iclass) << " -> " << string2type<short>(cm.getClass(iclass)) << std::endl;
535  classValueMap[cm.getClass(iclass)]=string2type<short>(cm.getClass(iclass));
536  }
537  }
538  if(priors_opt.size()==nameVector.size()){
539  std::cerr << "Warning: please check if priors are provided in correct order!!!" << std::endl;
540  for(int iclass=0;iclass<nameVector.size();++iclass)
541  std::cerr << nameVector[iclass] << " " << priors_opt[iclass] << std::endl;
542  }
543  }//if(!ibag)
544 
545  //Calculate features of training set
546  vector< Vector2d<float> > trainingFeatures(nclass);
547  for(int iclass=0;iclass<nclass;++iclass){
548  int nctraining=0;
549  if(verbose_opt[0]>=1)
550  cout << "calculating features for class " << iclass << endl;
551  if(random_opt[0])
552  srand(time(NULL));
553  nctraining=(bagSize_opt[iclass]<100)? trainingPixels[iclass].size()/100.0*bagSize_opt[iclass] : trainingPixels[iclass].size();//bagSize_opt[iclass] given in % of training size
554  if(nctraining<=0)
555  nctraining=1;
556  assert(nctraining<=trainingPixels[iclass].size());
557  int index=0;
558  if(bagSize_opt[iclass]<100)
559  random_shuffle(trainingPixels[iclass].begin(),trainingPixels[iclass].end());
560 
561  trainingFeatures[iclass].resize(nctraining);
562  for(int isample=0;isample<nctraining;++isample){
563  //scale pixel values according to scale and offset!!!
564  for(int iband=0;iband<nband;++iband){
565  float value=trainingPixels[iclass][isample][iband+startBand];
566  trainingFeatures[iclass][isample].push_back((value-offset[ibag][iband])/scale[ibag][iband]);
567  }
568  }
569  assert(trainingFeatures[iclass].size()==nctraining);
570  }
571 
572  unsigned int nFeatures=trainingFeatures[0][0].size();
573  unsigned int ntraining=0;
574  for(int iclass=0;iclass<nclass;++iclass)
575  ntraining+=trainingFeatures[iclass].size();
576 
577  const unsigned int num_layers = nneuron_opt.size()+2;
578  const float desired_error = 0.0003;
579  const unsigned int iterations_between_reports = (verbose_opt[0])? maxit_opt[0]+1:0;
580  if(verbose_opt[0]>=1){
581  cout << "number of features: " << nFeatures << endl;
582  cout << "creating artificial neural network with " << nneuron_opt.size() << " hidden layer, having " << endl;
583  for(int ilayer=0;ilayer<nneuron_opt.size();++ilayer)
584  cout << nneuron_opt[ilayer] << " ";
585  cout << "neurons" << endl;
586  cout << "connection_opt[0]: " << connection_opt[0] << std::endl;
587  cout << "num_layers: " << num_layers << std::endl;
588  cout << "nFeatures: " << nFeatures << std::endl;
589  cout << "nneuron_opt[0]: " << nneuron_opt[0] << std::endl;
590  cout << "number of classes (nclass): " << nclass << std::endl;
591  }
592  switch(num_layers){
593  case(3):{
594  // net[ibag].create_sparse(connection_opt[0],num_layers, nFeatures, nneuron_opt[0], nclass);//replace all create_sparse with create_sparse_array due to bug in FANN!
595  unsigned int layers[3];
596  layers[0]=nFeatures;
597  layers[1]=nneuron_opt[0];
598  layers[2]=nclass;
599  net[ibag].create_sparse_array(connection_opt[0],num_layers,layers);
600  break;
601  }
602  case(4):{
603  unsigned int layers[4];
604  layers[0]=nFeatures;
605  layers[1]=nneuron_opt[0];
606  layers[2]=nneuron_opt[1];
607  layers[3]=nclass;
608  // layers.push_back(nFeatures);
609  // for(int ihidden=0;ihidden<nneuron_opt.size();++ihidden)
610  // layers.push_back(nneuron_opt[ihidden]);
611  // layers.push_back(nclass);
612  net[ibag].create_sparse_array(connection_opt[0],num_layers,layers);
613  break;
614  }
615  default:
616  cerr << "Only 1 or 2 hidden layers are supported!" << endl;
617  exit(1);
618  break;
619  }
620  if(verbose_opt[0]>=1)
621  cout << "network created" << endl;
622 
623  net[ibag].set_learning_rate(learning_opt[0]);
624 
625  // net.set_activation_steepness_hidden(1.0);
626  // net.set_activation_steepness_output(1.0);
627 
628  net[ibag].set_activation_function_hidden(FANN::SIGMOID_SYMMETRIC_STEPWISE);
629  net[ibag].set_activation_function_output(FANN::SIGMOID_SYMMETRIC_STEPWISE);
630 
631  // Set additional properties such as the training algorithm
632  // net.set_training_algorithm(FANN::TRAIN_QUICKPROP);
633 
634  // Output network type and parameters
635  if(verbose_opt[0]>=1){
636  cout << endl << "Network Type : ";
637  switch (net[ibag].get_network_type())
638  {
639  case FANN::LAYER:
640  cout << "LAYER" << endl;
641  break;
642  case FANN::SHORTCUT:
643  cout << "SHORTCUT" << endl;
644  break;
645  default:
646  cout << "UNKNOWN" << endl;
647  break;
648  }
649  net[ibag].print_parameters();
650  }
651 
652  if(cv_opt[0]>1){
653  if(verbose_opt[0])
654  std::cout << "cross validation" << std::endl;
655  vector<unsigned short> referenceVector;
656  vector<unsigned short> outputVector;
657  float rmse=net[ibag].cross_validation(trainingFeatures,
658  ntraining,
659  cv_opt[0],
660  maxit_opt[0],
661  desired_error,
662  referenceVector,
663  outputVector,
664  verbose_opt[0]);
665  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
666  for(int isample=0;isample<referenceVector.size();++isample){
667  string refClassName=nameVector[referenceVector[isample]];
668  string className=nameVector[outputVector[isample]];
669  if(classValueMap.size())
670  cm.incrementResult(type2string<short>(classValueMap[refClassName]),type2string<short>(classValueMap[className]),1.0/nbag);
671  else
672  cm.incrementResult(cm.getClass(referenceVector[isample]),cm.getClass(outputVector[isample]),1.0/nbag);
673  }
674  }
675 
676  if(verbose_opt[0]>=1)
677  cout << endl << "Set training data" << endl;
678 
679  if(verbose_opt[0]>=1)
680  cout << endl << "Training network" << endl;
681 
682  if(verbose_opt[0]>=1){
683  cout << "Max Epochs " << setw(8) << maxit_opt[0] << ". "
684  << "Desired Error: " << left << desired_error << right << endl;
685  }
686  if(weights_opt.size()==net[ibag].get_total_connections()){//no new training needed (same training sample)
687  vector<fann_connection> convector;
688  net[ibag].get_connection_array(convector);
689  for(int i_connection=0;i_connection<net[ibag].get_total_connections();++i_connection)
690  convector[i_connection].weight=weights_opt[i_connection];
691  net[ibag].set_weight_array(convector);
692  }
693  else{
694  bool initWeights=true;
695  net[ibag].train_on_data(trainingFeatures,ntraining,initWeights, maxit_opt[0],
696  iterations_between_reports, desired_error);
697  }
698 
699 
700  if(verbose_opt[0]>=2){
701  net[ibag].print_connections();
702  vector<fann_connection> convector;
703  net[ibag].get_connection_array(convector);
704  for(int i_connection=0;i_connection<net[ibag].get_total_connections();++i_connection)
705  cout << "connection " << i_connection << ": " << convector[i_connection].weight << endl;
706 
707  }
708  }//for ibag
709  if(cv_opt[0]>1){
710  assert(cm.nReference());
711  cm.setFormat(cmformat_opt[0]);
712  cm.reportSE95(false);
713  std::cout << cm << std::endl;
714  cout << "class #samples userAcc prodAcc" << endl;
715  double se95_ua=0;
716  double se95_pa=0;
717  double se95_oa=0;
718  double dua=0;
719  double dpa=0;
720  double doa=0;
721  for(int iclass=0;iclass<cm.nClasses();++iclass){
722  dua=cm.ua_pct(cm.getClass(iclass),&se95_ua);
723  dpa=cm.pa_pct(cm.getClass(iclass),&se95_pa);
724  cout << cm.getClass(iclass) << " " << cm.nReference(cm.getClass(iclass)) << " " << dua << " (" << se95_ua << ")" << " " << dpa << " (" << se95_pa << ")" << endl;
725  }
726  std::cout << "Kappa: " << cm.kappa() << std::endl;
727  doa=cm.oa_pct(&se95_oa);
728  std::cout << "Overall Accuracy: " << doa << " (" << se95_oa << ")" << std::endl;
729  }
730  //--------------------------------- end of training -----------------------------------
731  if(input_opt.empty())
732  exit(0);
733 
734  const char* pszMessage;
735  void* pProgressArg=NULL;
736  GDALProgressFunc pfnProgress=GDALTermProgress;
737  float progress=0;
738  //-------------------------------- open image file ------------------------------------
739  bool inputIsRaster=false;
740  ImgReaderOgr imgReaderOgr;
741  try{
742  imgReaderOgr.open(input_opt[0]);
743  imgReaderOgr.close();
744  }
745  catch(string errorString){
746  inputIsRaster=true;
747  }
748  if(inputIsRaster){
749  // if(input_opt[0].find(".shp")==string::npos){
750  ImgReaderGdal testImage;
751  try{
752  if(verbose_opt[0]>=1)
753  cout << "opening image " << input_opt[0] << endl;
754  testImage.open(input_opt[0]);
755  }
756  catch(string error){
757  cerr << error << endl;
758  exit(2);
759  }
760  ImgReaderGdal priorReader;
761  if(priorimg_opt.size()){
762  try{
763  if(verbose_opt[0]>=1)
764  std::cout << "opening prior image " << priorimg_opt[0] << std::endl;
765  priorReader.open(priorimg_opt[0]);
766  assert(priorReader.nrOfCol()==testImage.nrOfCol());
767  assert(priorReader.nrOfRow()==testImage.nrOfRow());
768  }
769  catch(string error){
770  cerr << error << std::endl;
771  exit(2);
772  }
773  catch(...){
774  cerr << "error caught" << std::endl;
775  exit(1);
776  }
777  }
778 
779  int nrow=testImage.nrOfRow();
780  int ncol=testImage.nrOfCol();
781  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
782  string theInterleave="INTERLEAVE=";
783  theInterleave+=testImage.getInterleave();
784  option_opt.push_back(theInterleave);
785  }
786  vector<char> classOut(ncol);//classified line for writing to image file
787 
788  // assert(nband==testImage.nrOfBand());
789  ImgWriterGdal classImageBag;
790  ImgWriterGdal classImageOut;
791  ImgWriterGdal probImage;
792  ImgWriterGdal entropyImage;
793 
794  string imageType;//testImage.getImageType();
795  if(oformat_opt.size())//default
796  imageType=oformat_opt[0];
797  try{
798 
799  if(verbose_opt[0]>=1)
800  cout << "opening class image for writing output " << output_opt[0] << endl;
801  if(classBag_opt.size()){
802  classImageBag.open(classBag_opt[0],ncol,nrow,nbag,GDT_Byte,imageType,option_opt);
803  classImageBag.GDALSetNoDataValue(nodata_opt[0]);
804  classImageBag.copyGeoTransform(testImage);
805  classImageBag.setProjection(testImage.getProjection());
806  }
807  classImageOut.open(output_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt);
808  classImageOut.GDALSetNoDataValue(nodata_opt[0]);
809  classImageOut.copyGeoTransform(testImage);
810  classImageOut.setProjection(testImage.getProjection());
811  if(colorTable_opt.size())
812  classImageOut.setColorTable(colorTable_opt[0],0);
813  if(prob_opt.size()){
814  probImage.open(prob_opt[0],ncol,nrow,nclass,GDT_Byte,imageType,option_opt);
815  probImage.GDALSetNoDataValue(nodata_opt[0]);
816  probImage.copyGeoTransform(testImage);
817  probImage.setProjection(testImage.getProjection());
818  }
819  if(entropy_opt.size()){
820  entropyImage.open(entropy_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt);
821  entropyImage.GDALSetNoDataValue(nodata_opt[0]);
822  entropyImage.copyGeoTransform(testImage);
823  entropyImage.setProjection(testImage.getProjection());
824  }
825  }
826  catch(string error){
827  cerr << error << endl;
828  }
829 
830  ImgWriterGdal maskWriter;
831 
832  if(maskIsVector){
833  try{
834  maskWriter.open("/vsimem/mask.tif",ncol,nrow,1,GDT_Float32,imageType,option_opt);
835  maskWriter.GDALSetNoDataValue(nodata_opt[0]);
836  maskWriter.copyGeoTransform(testImage);
837  maskWriter.setProjection(testImage.getProjection());
838  vector<double> burnValues(1,1);//burn value is 1 (single band)
839  maskWriter.rasterizeOgr(extentReader,burnValues);
840  extentReader.close();
841  maskWriter.close();
842  }
843  catch(string error){
844  cerr << error << std::endl;
845  exit(2);
846  }
847  catch(...){
848  cerr << "error caught" << std::endl;
849  exit(1);
850  }
851  mask_opt.clear();
852  mask_opt.push_back("/vsimem/mask.tif");
853  }
854  ImgReaderGdal maskReader;
855  if(mask_opt.size()){
856  try{
857  if(verbose_opt[0]>=1)
858  std::cout << "opening mask image file " << mask_opt[0] << std::endl;
859  maskReader.open(mask_opt[0]);
860  }
861  catch(string error){
862  cerr << error << std::endl;
863  exit(2);
864  }
865  catch(...){
866  cerr << "error caught" << std::endl;
867  exit(1);
868  }
869  }
870 
871  for(int iline=0;iline<nrow;++iline){
872  vector<float> buffer(ncol);
873  vector<short> lineMask;
874  if(mask_opt.size())
875  lineMask.resize(maskReader.nrOfCol());
876  Vector2d<float> linePrior;
877  if(priorimg_opt.size())
878  linePrior.resize(nclass,ncol);//prior prob for each class
879  Vector2d<float> hpixel(ncol);
880  Vector2d<float> fpixel(ncol);
881  Vector2d<float> probOut(nclass,ncol);//posterior prob for each (internal) class
882  vector<float> entropy(ncol);
883  Vector2d<char> classBag;//classified line for writing to image file
884  if(classBag_opt.size())
885  classBag.resize(nbag,ncol);
886  //read all bands of all pixels in this line in hline
887  try{
888  if(band_opt.size()){
889  for(int iband=0;iband<band_opt.size();++iband){
890  if(verbose_opt[0]==2)
891  std::cout << "reading band " << band_opt[iband] << std::endl;
892  assert(band_opt[iband]>=0);
893  assert(band_opt[iband]<testImage.nrOfBand());
894  testImage.readData(buffer,GDT_Float32,iline,band_opt[iband]);
895  for(int icol=0;icol<ncol;++icol)
896  hpixel[icol].push_back(buffer[icol]);
897  }
898  }
899  else{
900  for(int iband=0;iband<nband;++iband){
901  if(verbose_opt[0]==2)
902  std::cout << "reading band " << iband << std::endl;
903  assert(iband>=0);
904  assert(iband<testImage.nrOfBand());
905  testImage.readData(buffer,GDT_Float32,iline,iband);
906  for(int icol=0;icol<ncol;++icol)
907  hpixel[icol].push_back(buffer[icol]);
908  }
909  }
910  }
911  catch(string theError){
912  cerr << "Error reading " << input_opt[0] << ": " << theError << std::endl;
913  exit(3);
914  }
915  catch(...){
916  cerr << "error caught" << std::endl;
917  exit(3);
918  }
919  assert(nband==hpixel[0].size());
920  if(verbose_opt[0]==2)
921  cout << "used bands: " << nband << endl;
922  //read prior
923  if(priorimg_opt.size()){
924  try{
925  for(short iclass=0;iclass<nclass;++iclass){
926  if(verbose_opt.size()>1)
927  std::cout << "Reading " << priorimg_opt[0] << " band " << iclass << " line " << iline << std::endl;
928  priorReader.readData(linePrior[iclass],GDT_Float32,iline,iclass);
929  }
930  }
931  catch(string theError){
932  std::cerr << "Error reading " << priorimg_opt[0] << ": " << theError << std::endl;
933  exit(3);
934  }
935  catch(...){
936  cerr << "error caught" << std::endl;
937  exit(3);
938  }
939  }
940  double oldRowMask=-1;//keep track of row mask to optimize number of line readings
941  //process per pixel
942  for(int icol=0;icol<ncol;++icol){
943  assert(hpixel[icol].size()==nband);
944  bool doClassify=true;
945  bool masked=false;
946  double geox=0;
947  double geoy=0;
948  if(maskIsVector){
949  doClassify=false;
950  testImage.image2geo(icol,iline,geox,geoy);
951  //check enveloppe first
952  if(uly>=geoy&&lry<=geoy&&ulx<=geox&&lrx>=geox){
953  doClassify=true;
954  }
955  }
956  if(mask_opt.size()){
957  //read mask
958  double colMask=0;
959  double rowMask=0;
960 
961  testImage.image2geo(icol,iline,geox,geoy);
962  maskReader.geo2image(geox,geoy,colMask,rowMask);
963  colMask=static_cast<int>(colMask);
964  rowMask=static_cast<int>(rowMask);
965  if(rowMask>=0&&rowMask<maskReader.nrOfRow()&&colMask>=0&&colMask<maskReader.nrOfCol()){
966  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask)){
967  assert(rowMask>=0&&rowMask<maskReader.nrOfRow());
968  try{
969  // maskReader.readData(lineMask[imask],GDT_Int32,static_cast<int>(rowMask));
970  maskReader.readData(lineMask,GDT_Int16,static_cast<int>(rowMask));
971  }
972  catch(string errorstring){
973  cerr << errorstring << endl;
974  exit(1);
975  }
976  catch(...){
977  cerr << "error caught" << std::endl;
978  exit(3);
979  }
980  oldRowMask=rowMask;
981  }
982  short theMask=0;
983  for(short ivalue=0;ivalue<msknodata_opt.size();++ivalue){
984  // if(msknodata_opt[ivalue]>=0){//values set in msknodata_opt are invalid
985  if(lineMask[colMask]==msknodata_opt[ivalue]){
986  theMask=lineMask[colMask];
987  masked=true;
988  break;
989  }
990  // }
991  // else{//only values set in msknodata_opt are valid
992  // if(lineMask[colMask]!=-msknodata_opt[ivalue]){
993  // theMask=lineMask[colMask];
994  // masked=true;
995  // }
996  // else{
997  // masked=false;
998  // break;
999  // }
1000  // }
1001  }
1002  if(masked){
1003  if(classBag_opt.size())
1004  for(int ibag=0;ibag<nbag;++ibag)
1005  classBag[ibag][icol]=theMask;
1006  classOut[icol]=theMask;
1007  continue;
1008  }
1009  }
1010  bool valid=false;
1011  for(int iband=0;iband<hpixel[icol].size();++iband){
1012  if(hpixel[icol][iband]){
1013  valid=true;
1014  break;
1015  }
1016  }
1017  if(!valid)
1018  doClassify=false;
1019 
1020  }
1021  for(short iclass=0;iclass<nclass;++iclass)
1022  probOut[iclass][icol]=0;
1023  if(!doClassify){
1024  if(classBag_opt.size())
1025  for(int ibag=0;ibag<nbag;++ibag)
1026  classBag[ibag][icol]=nodata_opt[0];
1027  classOut[icol]=nodata_opt[0];
1028  continue;//next column
1029  }
1030  if(verbose_opt[0]>1)
1031  std::cout << "begin classification " << std::endl;
1032  //----------------------------------- classification -------------------
1033  for(int ibag=0;ibag<nbag;++ibag){
1034  //calculate image features
1035  fpixel[icol].clear();
1036  for(int iband=0;iband<nband;++iband)
1037  fpixel[icol].push_back((hpixel[icol][iband]-offset[ibag][iband])/scale[ibag][iband]);
1038  vector<float> result(nclass);
1039  result=net[ibag].run(fpixel[icol]);
1040  int maxClass=0;
1041  vector<float> prValues(nclass);
1042  float maxP=0;
1043 
1044  //calculate posterior prob of bag
1045  if(classBag_opt.size()){
1046  //search for max prob within bag
1047  maxP=0;
1048  classBag[ibag][icol]=0;
1049  }
1050  double normPrior=0;
1051  if(priorimg_opt.size()){
1052  for(short iclass=0;iclass<nclass;++iclass)
1053  normPrior+=linePrior[iclass][icol];
1054  }
1055  for(int iclass=0;iclass<nclass;++iclass){
1056  result[iclass]=(result[iclass]+1.0)/2.0;//bring back to scale [0,1]
1057  if(priorimg_opt.size())
1058  priors[iclass]=linePrior[iclass][icol]/normPrior;//todo: check if correct for all cases... (automatic classValueMap and manual input for names and values)
1059  switch(comb_opt[0]){
1060  default:
1061  case(0)://sum rule
1062  probOut[iclass][icol]+=result[iclass]*priors[iclass];//add probabilities for each bag
1063  break;
1064  case(1)://product rule
1065  probOut[iclass][icol]*=pow(static_cast<float>(priors[iclass]),static_cast<float>(1.0-nbag)/nbag)*result[iclass];//multiply probabilities for each bag
1066  break;
1067  case(2)://max rule
1068  if(priors[iclass]*result[iclass]>probOut[iclass][icol])
1069  probOut[iclass][icol]=priors[iclass]*result[iclass];
1070  break;
1071  }
1072  if(classBag_opt.size()){
1073  //search for max prob within bag
1074  // if(prValues[iclass]>maxP){
1075  // maxP=prValues[iclass];
1076  // classBag[ibag][icol]=vcode[iclass];
1077  // }
1078  if(result[iclass]>maxP){
1079  maxP=result[iclass];
1080  classBag[ibag][icol]=iclass;
1081  }
1082  }
1083  }
1084  }//ibag
1085 
1086  //search for max class prob
1087  float maxBag1=0;//max probability
1088  float maxBag2=0;//second max probability
1089  float normBag=0;
1090  for(short iclass=0;iclass<nclass;++iclass){
1091  if(probOut[iclass][icol]>maxBag1){
1092  maxBag1=probOut[iclass][icol];
1093  classOut[icol]=classValueMap[nameVector[iclass]];
1094  }
1095  else if(probOut[iclass][icol]>maxBag2)
1096  maxBag2=probOut[iclass][icol];
1097  normBag+=probOut[iclass][icol];
1098  }
1099  //normalize probOut and convert to percentage
1100  entropy[icol]=0;
1101  for(short iclass=0;iclass<nclass;++iclass){
1102  float prv=probOut[iclass][icol];
1103  prv/=normBag;
1104  entropy[icol]-=prv*log(prv)/log(2.0);
1105  prv*=100.0;
1106 
1107  probOut[iclass][icol]=static_cast<short>(prv+0.5);
1108  // assert(classValueMap[nameVector[iclass]]<probOut.size());
1109  // assert(classValueMap[nameVector[iclass]]>=0);
1110  // probOut[classValueMap[nameVector[iclass]]][icol]=static_cast<short>(prv+0.5);
1111  }
1112  entropy[icol]/=log(static_cast<double>(nclass))/log(2.0);
1113  entropy[icol]=static_cast<short>(100*entropy[icol]+0.5);
1114  if(active_opt.size()){
1115  if(entropy[icol]>activePoints.back().value){
1116  activePoints.back().value=entropy[icol];//replace largest value (last)
1117  activePoints.back().posx=icol;
1118  activePoints.back().posy=iline;
1119  std::sort(activePoints.begin(),activePoints.end(),Decrease_PosValue());//sort in descending order (largest first, smallest last)
1120  if(verbose_opt[0])
1121  std::cout << activePoints.back().posx << " " << activePoints.back().posy << " " << activePoints.back().value << std::endl;
1122  }
1123  }
1124  }//icol
1125  //----------------------------------- write output ------------------------------------------
1126  if(classBag_opt.size())
1127  for(int ibag=0;ibag<nbag;++ibag)
1128  classImageBag.writeData(classBag[ibag],GDT_Byte,iline,ibag);
1129  if(prob_opt.size()){
1130  for(int iclass=0;iclass<nclass;++iclass)
1131  probImage.writeData(probOut[iclass],GDT_Float32,iline,iclass);
1132  }
1133  if(entropy_opt.size()){
1134  entropyImage.writeData(entropy,GDT_Float32,iline);
1135  }
1136  classImageOut.writeData(classOut,GDT_Byte,iline);
1137  if(!verbose_opt[0]){
1138  progress=static_cast<float>(iline+1.0)/classImageOut.nrOfRow();
1139  pfnProgress(progress,pszMessage,pProgressArg);
1140  }
1141  }
1142  //write active learning points
1143  if(active_opt.size()){
1144  for(int iactive=0;iactive<activePoints.size();++iactive){
1145  std::map<string,double> pointMap;
1146  for(int iband=0;iband<testImage.nrOfBand();++iband){
1147  double value;
1148  testImage.readData(value,GDT_Float64,static_cast<int>(activePoints[iactive].posx),static_cast<int>(activePoints[iactive].posy),iband);
1149  ostringstream fs;
1150  fs << "B" << iband;
1151  pointMap[fs.str()]=value;
1152  }
1153  pointMap[label_opt[0]]=0;
1154  double x, y;
1155  testImage.image2geo(activePoints[iactive].posx,activePoints[iactive].posy,x,y);
1156  std::string fieldname="id";//number of the point
1157  activeWriter.addPoint(x,y,pointMap,fieldname,++nactive);
1158  }
1159  }
1160 
1161  testImage.close();
1162  if(mask_opt.size())
1163  maskReader.close();
1164  if(priorimg_opt.size())
1165  priorReader.close();
1166  if(prob_opt.size())
1167  probImage.close();
1168  if(entropy_opt.size())
1169  entropyImage.close();
1170  if(classBag_opt.size())
1171  classImageBag.close();
1172  classImageOut.close();
1173  }
1174  else{//classify vector file
1175  cm.clearResults();
1176  //notice that fields have already been set by readDataImageOgr (taking into account appropriate bands)
1177  for(int ivalidation=0;ivalidation<input_opt.size();++ivalidation){
1178  if(output_opt.size())
1179  assert(output_opt.size()==input_opt.size());
1180  if(verbose_opt[0])
1181  cout << "opening img reader " << input_opt[ivalidation] << endl;
1182  imgReaderOgr.open(input_opt[ivalidation]);
1183  ImgWriterOgr imgWriterOgr;
1184 
1185  if(output_opt.size()){
1186  if(verbose_opt[0])
1187  std::cout << "opening img writer and copying fields from img reader" << output_opt[ivalidation] << std::endl;
1188  imgWriterOgr.open(output_opt[ivalidation],imgReaderOgr);
1189  }
1190  if(verbose_opt[0])
1191  cout << "number of layers in input ogr file: " << imgReaderOgr.getLayerCount() << endl;
1192  for(int ilayer=0;ilayer<imgReaderOgr.getLayerCount();++ilayer){
1193  if(verbose_opt[0])
1194  cout << "processing input layer " << ilayer << endl;
1195  if(output_opt.size()){
1196  if(verbose_opt[0])
1197  std::cout << "creating field class" << std::endl;
1198  if(classValueMap.size())
1199  imgWriterOgr.createField("class",OFTInteger,ilayer);
1200  else
1201  imgWriterOgr.createField("class",OFTString,ilayer);
1202  }
1203  unsigned int nFeatures=imgReaderOgr.getFeatureCount(ilayer);
1204  unsigned int ifeature=0;
1205  progress=0;
1206  pfnProgress(progress,pszMessage,pProgressArg);
1207  OGRFeature *poFeature;
1208  while( (poFeature = imgReaderOgr.getLayer(ilayer)->GetNextFeature()) != NULL ){
1209  if(verbose_opt[0]>1)
1210  cout << "feature " << ifeature << endl;
1211  if( poFeature == NULL ){
1212  cout << "Warning: could not read feature " << ifeature << " in layer " << imgReaderOgr.getLayerName(ilayer) << endl;
1213  continue;
1214  }
1215  OGRFeature *poDstFeature = NULL;
1216  if(output_opt.size()){
1217  poDstFeature=imgWriterOgr.createFeature(ilayer);
1218  if( poDstFeature->SetFrom( poFeature, TRUE ) != OGRERR_NONE ){
1219  CPLError( CE_Failure, CPLE_AppDefined,
1220  "Unable to translate feature %d from layer %s.\n",
1221  poFeature->GetFID(), imgWriterOgr.getLayerName(ilayer).c_str() );
1222  OGRFeature::DestroyFeature( poFeature );
1223  OGRFeature::DestroyFeature( poDstFeature );
1224  }
1225  }
1226  vector<float> validationPixel;
1227  vector<float> validationFeature;
1228 
1229  imgReaderOgr.readData(validationPixel,OFTReal,fields,poFeature,ilayer);
1230  assert(validationPixel.size()==nband);
1231  vector<float> probOut(nclass);//posterior prob for each class
1232  for(int iclass=0;iclass<nclass;++iclass)
1233  probOut[iclass]=0;
1234  for(int ibag=0;ibag<nbag;++ibag){
1235  for(int iband=0;iband<nband;++iband){
1236  validationFeature.push_back((validationPixel[iband]-offset[ibag][iband])/scale[ibag][iband]);
1237  if(verbose_opt[0]==2)
1238  std:: cout << " " << validationFeature.back();
1239  }
1240  if(verbose_opt[0]==2)
1241  std::cout << std:: endl;
1242  vector<float> result(nclass);
1243  result=net[ibag].run(validationFeature);
1244 
1245  if(verbose_opt[0]>1){
1246  for(int iclass=0;iclass<result.size();++iclass)
1247  std::cout << result[iclass] << " ";
1248  std::cout << std::endl;
1249  }
1250  //calculate posterior prob of bag
1251  for(int iclass=0;iclass<nclass;++iclass){
1252  result[iclass]=(result[iclass]+1.0)/2.0;//bring back to scale [0,1]
1253  switch(comb_opt[0]){
1254  default:
1255  case(0)://sum rule
1256  probOut[iclass]+=result[iclass]*priors[iclass];//add probabilities for each bag
1257  break;
1258  case(1)://product rule
1259  probOut[iclass]*=pow(static_cast<float>(priors[iclass]),static_cast<float>(1.0-nbag)/nbag)*result[iclass];//multiply probabilities for each bag
1260  break;
1261  case(2)://max rule
1262  if(priors[iclass]*result[iclass]>probOut[iclass])
1263  probOut[iclass]=priors[iclass]*result[iclass];
1264  break;
1265  }
1266  }
1267  }//for ibag
1268  //search for max class prob
1269  float maxBag=0;
1270  float normBag=0;
1271  string classOut="Unclassified";
1272  for(int iclass=0;iclass<nclass;++iclass){
1273  if(verbose_opt[0]>1)
1274  std::cout << probOut[iclass] << " ";
1275  if(probOut[iclass]>maxBag){
1276  maxBag=probOut[iclass];
1277  classOut=nameVector[iclass];
1278  }
1279  }
1280  //look for class name
1281  if(verbose_opt[0]>1){
1282  if(classValueMap.size())
1283  std::cout << "->" << classValueMap[classOut] << std::endl;
1284  else
1285  std::cout << "->" << classOut << std::endl;
1286  }
1287  if(output_opt.size()){
1288  if(classValueMap.size())
1289  poDstFeature->SetField("class",classValueMap[classOut]);
1290  else
1291  poDstFeature->SetField("class",classOut.c_str());
1292  poDstFeature->SetFID( poFeature->GetFID() );
1293  }
1294  int labelIndex=poFeature->GetFieldIndex(label_opt[0].c_str());
1295  if(labelIndex>=0){
1296  string classRef=poFeature->GetFieldAsString(labelIndex);
1297  if(classRef!="0"){
1298  if(classValueMap.size())
1299  cm.incrementResult(type2string<short>(classValueMap[classRef]),type2string<short>(classValueMap[classOut]),1);
1300  else
1301  cm.incrementResult(classRef,classOut,1);
1302  }
1303  }
1304  CPLErrorReset();
1305  if(output_opt.size()){
1306  if(imgWriterOgr.createFeature(poDstFeature,ilayer) != OGRERR_NONE){
1307  CPLError( CE_Failure, CPLE_AppDefined,
1308  "Unable to translate feature %d from layer %s.\n",
1309  poFeature->GetFID(), imgWriterOgr.getLayerName(ilayer).c_str() );
1310  OGRFeature::DestroyFeature( poDstFeature );
1311  OGRFeature::DestroyFeature( poDstFeature );
1312  }
1313  }
1314  ++ifeature;
1315  if(!verbose_opt[0]){
1316  progress=static_cast<float>(ifeature+1.0)/nFeatures;
1317  pfnProgress(progress,pszMessage,pProgressArg);
1318  }
1319  OGRFeature::DestroyFeature( poFeature );
1320  OGRFeature::DestroyFeature( poDstFeature );
1321  }//get next feature
1322  }//next layer
1323  imgReaderOgr.close();
1324  if(output_opt.size())
1325  imgWriterOgr.close();
1326  }
1327  if(cm.nReference()){
1328  std::cout << cm << std::endl;
1329  // cout << "class #samples userAcc prodAcc" << endl;
1330  // double se95_ua=0;
1331  // double se95_pa=0;
1332  // double se95_oa=0;
1333  // double dua=0;
1334  // double dpa=0;
1335  // double doa=0;
1336  // for(short iclass=0;iclass<cm.nClasses();++iclass){
1337  // dua=cm.ua_pct(cm.getClass(iclass),&se95_ua);
1338  // dpa=cm.pa_pct(cm.getClass(iclass),&se95_pa);
1339  // cout << cm.getClass(iclass) << " " << cm.nReference(cm.getClass(iclass)) << " " << dua << " (" << se95_ua << ")" << " " << dpa << " (" << se95_pa << ")" << endl;
1340  // }
1341  // std::cout << "Kappa: " << cm.kappa() << std::endl;
1342  // doa=cm.oa_pct(&se95_oa);
1343  // std::cout << "Overall Accuracy: " << doa << " (" << se95_oa << ")" << std::endl;
1344  }
1345  }
1346  try{
1347  if(active_opt.size())
1348  activeWriter.close();
1349  }
1350  catch(string errorString){
1351  std::cerr << "Error: errorString" << std::endl;
1352  }
1353  return 0;
1354 }
pktools-2.6.6/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html0000644000113200011300000001361412647637663020222 00000000000000 pktools: /home/kempenep/pktools/src Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
src Directory Reference
Directory dependency graph for src:
/home/kempenep/pktools/src

Directories

directory  algorithms
 
directory  apps
 
directory  base
 
directory  fileclasses
 
directory  imageclasses
 
directory  lasclasses
 
pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem__inherit__graph.png0000644000113200011300000000700712616110567025323 00000000000000‰PNG  IHDRÀpÇtè%bKGDÿÿÿ ½§“ ¼IDATxœíÝTSõÿð÷… ;(L›ˆ@}ðx:öG¦„HÖÈSÄ´ Ðìlj íBß>>nËBnnn+V¬°Ùt6 R©ôððpuuµå¤•‰‰ ¥R9o„âp8ÞÞÞ6žôáqëÖ­îîn[Î÷@€ hZæ@€®_¿Ža˜-‡úì³Ï0 ;pàÀLÕ0Uw î_¿þ¯‡us @) 6›=#QQQáïï/‘HfjÌÅ‹ïÙ³ÍfÙö2W„ãøðððlŒÜÕÕÕÓÓSZZÚÑÑÑÛÛ;#c²Ùlò|6{eÛ‹cˆ<Õ×ÖÖ®\¹ÒÛÛûwÞ™˜˜ ^%b÷îÝCCCO<ñBÈÇLJ|idddûöíl6›ÃáìÞ½[§ÓMÕH©««{ì±Ç˜LfPPX,¦Ú+**Ö¯_¿qãÆÉ'!‚ „Bahh¨‡‡ÇÓO?}òäIòÚ4y.r-MMMþþþÇŽ#3+!ÔÐÐÀãñ<==óòòÈ ÃÊÊÊV­ZµdÉ’ˆÅâÀÀ@‹•••5c_èDØT*œæ¹\ŽŠŽŽîíímmmåñx999d#ŽãTz¨#©ŽIIIQQQ}}}ááá999©^ccc®®®B¡p`` ´´”Á`Œãx`` H$"âã? 3-Œ ˆââb??¿3gΨTªsçÎñx<²}ª¹bccÏŸ?ßÑÑAfV6Bè¹çžÓh4ÕÕÕ!ri¡ÄÄDFSRR‚zùå—5H$¢˜Æàà T*µúCƒ#¨³³“Ü•H$<lÌÌÌD]»vÍôHrûÞ½{ÎÎοþú+¹{âÄ g±‘ê¥V«,XpðàÁÛ·oã8>::j4 ‚hmme0ä÷éòåË¡®®.ÓéÂÃÿÿþ{ªàòòr„Ð4s‘k¡ºOPss3AF£!$—ËÉF™LF®Ël›<`¶c]ÂHÔ¯rBBBúûûÉí_~ùeÆ ¹¹¹“4\.—Üåñxýýý©.žžžR©´µµ•Ãá¬_¿þ§Ÿ~rrrBUTT 6›aØš5kBfW±¾¾¾ððpj744tª¨%L¿X___„9;ÅÝÝ!´`Á³mäˆ"ÿ™"„z{{ɯ/B¨®®N(VTTH¥R³ã—.]êìì¬P(Èݾ¾>???‹T­V‹ãxee¥Z­NIIÙ¼y³Z­6‰$??ôÿdddH$Âä©ß€€€ß~ûÚíé陪rû¾ßø™z‡Ânlyº{ÀKXdd¤\.okk[±bž}ûLOûÙÙÙÁÁÁZ­–l%ÛATT”B¡èêê Û·oŸÅFj(­VËd2«ªªT*UQQ“ÉÔjµR©ÔÙÙÙ´Âööv„L&£::tˆÃáœ={vhh¨©©iåÊ•†M?1éF•L®JÈä6¹Ñl{*p$G•””°Ùì·ß~›Ê y€V« ÎÎÎÖëõO>ùä¢E‹ÈvµZœœìååµlÙ²÷Þ{O«ÕZl4J"‘p¹\—ÚÚZ‚ ÒÓÓ£££MëÁqœËåîÙ³‡êh4 ¸\.‹ÅЉ‰©­­]²dÉ}碶ÍʆYçd³zþ…ºººŽŽj·ªª*""ÂŽõ˜›hG×ÙÙ¹uëV™L6>>ÞÚÚš•••ššjï¢ìÉÖ”MÏÃÃ#==ÝÞUL'33s||œÏç«Tª   ×_ÝÁ žmaÃ?,lnn …'gùD↠l6#\Â- @ дØú§°‘‘ƒÁ`ãIccc6žÑ¦ruu½yó¦-g¤©±ñO„ÐÆËí\‡5˜L¦-§³éñs‹Ñˆÿç?Ù¡ÎÎÿqršã¿òœ5p4¥K—®«ÕwÕê±––¹ýÜû¬‚M©²²ÁpZ°À©²ò{×⸠@–étúúú«ƒQ¯Çëë¯êtz{Wä  @–?ßC…F§ÓŸ?ßcßzȲêêvêYA ê«Ûí[ÂY Ñè»FœÜ5ñÆÆnF7}¯‡È‚3gºpüïnà8qöl—½êqd ªªÚÍÞ#¢ª ®b@€Ì©T£--rÇMqœhi‘«T£öªÊaA€Ì<Ùañ}g ÃNž¼jûzÈÜñãíf7@$ÇáÅÉ @ÿ TÞîì¼1E€ÐÕ«7nÞ±}UŽÌ±ª·»¡¡1_ßÅÔ ù^"“ù¿]êää444êë»Ønõ9ømütÒÓ¿A‰DÛì]ˆã‚K hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ hZ @€ ‡0`ïr ƒÁf0Øö®Â±,_¾Ü43ÿø/î0 {饗BCCíXpdÝÝÝ•••¦™1ÿO6CCCmù±õ`®ƒ{ @ д@€-³ ¥R9³Ý ‚Ø¿ll¬é4'šfº™2ŸÖ2ÙlhÑ¢E‰‰‰3;æððpccã7ß|cqü^xafgœ=óf-³ ‹•––6³cNLL „¼½½-Žã¸F£™ÙgϼY‹u"â‡~ضmÛ¦M›víÚuåÊ•ÈÈH‚ ~üñÇíÛ·ÇÅÅedd\ºt)22ÒôDÚÒÒ’’’-ÌÆ$¼xñbrrr||ü¡C‡ôz½éŒ………©©©wîÜyóÍ7B/¾ø"²t¢6}!d0„Ba|||||¼P(4 d™L–põêÕŠŠŠäääM›6½õÖ[===SõBEFFž>}zÛ¶m|>¿¼¼¼¡¡!111..®¬¬l¯åY úúúo¿ý655U,¿úê«yyy¡S§N‰Åâ]»v•——'%%9rÄ´‹N§ËÉÉáóùä"¿øâ Χ×ÖÔÔäåååææþüóÏåååd#A"‘H&“åçç³X¬¯¿þ!tâÄ ‹µ™½ZUU500 ‰¾úê+™LvôèQ²ýøñã{÷îíìì”H$iiib±899Y(NßëòåË………iiiÅÅÅ—.]*--ݹs§X,¶xž˜Ok¹/ëT]]½cÇŽuëÖyyy­]»655•j|üñÇY,Öš5k^{í5Ó.z½ž ­VëââSWWçêê:yä;wr8œU«V¥¦¦ž;wŽl,**’H$ÙÙÙÖ.ìôéÓï¾û®··wPPPzzz[[Ùž––¶zõꆆÓ…PW©z%$$¸¹¹EGG#„››[LL BhtÔ‡`ΧµÜ—uŸ600Àãñ¨Ý   „ÐÍ›7©ÆåË—›vqww/((¨ªª:zôhpp°@ X»víä‘9¹áïï¯R©Èík×®EDD|÷Ýw{÷N„Ðßÿ½eËjwáÂ…Ôø!•J5y!ÓôrssC1 ³m‹æÓZî˺žl6»¯¯Ëå’»þù'BhéÒ¥üñU÷_ýeÚebbÇñœœƒÁÐÔÔôÑGÕÔÔ¸»»›ÜßßOŽpãÆ ///²177W¥R¥¤¤<û쳫W¯¶ªT‹UPPàçç‡S«Õd;ùÅòññ™¼izYe>­å¾¬»„ÅÆÆ^¼xQ­V·µµ!„ø|¾H$joo×h4W®\9vì†ýÿ‡ÖböÁ\¸páîÝ»z½žÁ`—°úúú»wïR‡>|X©Tþþûï%%%Ï<ó ÙÈd2yä@ŸŸïÞ½©P«Õ’ëÖ­+..T(™™™555¦‡=ÿüó¦ ¡n!§ï5•ù´kYwJHH0GŽ!¯¬Ÿþ9ŸÏ7wîÜ Û±cÇ—_~IuqqqùðÃE"Ñ­[·|}}³³³]\\BŒˆˆ Î«7n|ÿý÷u:]TTTRRuæG ‚¦¦¦òòrê›a‘Ï£>ºeË–S§N!„RRR>üÆo`öÔSO¥§§ Qóù|½^_XX8<<Ìår³²²È|&÷z/Ë|Z‹µÌŸÊÎÎ~ðÇ9”JåÖ­[sss½½½©Sè… Äbqqq±UƒH¥RkÊvPói-577ú駦™™7 ÅþýûårùÄÄDwwwYYY\\ýaÁœ0ŸÚüÊ+¯ètºO>ùddddÙ²e±±±›7o~ðî .´êxG6ŸÖò€h]ÂÀÃfV.aàa´@€- @‹ùMtPP§§§ ŽìöíÛ …bÊ¿ ËÈȸqã†Í«s ŸÏ7ÝýÇkÁ= hZ @€–ÿ•¬ÜÎæ£¸)IEND®B`‚pktools-2.6.6/doc/html/classOptionpk.html0000644000113200011300000012456012647637662015406 00000000000000 pktools: Optionpk< T > Class Template Reference
pktools  2.6.6
Processing Kernel for geospatial data

#include <Optionpk.h>

Inheritance diagram for Optionpk< T >:
Collaboration diagram for Optionpk< T >:

Public Member Functions

 Optionpk ()
 default constructor
 
 Optionpk (const std::string &shortName, const std::string &longName, const std::string &helpInfo)
 constructor for option without default value More...
 
 Optionpk (const std::string &shortName, const std::string &longName, const std::string &helpInfo, const T &defaultValue, short hide=0)
 constructor for option with default value. Option can be hidden for help info More...
 
 ~Optionpk ()
 default destructor
 
void setHelp (const std::string &helpInfo)
 set help information
 
void setHide (short hide)
 hide option from short help -h (1) or make invisible to short and long help –help (2)
 
bool retrieveOption (int argc, char **argv)
 read option from command line (use for all options!) More...
 
void setAll (const std::string &shortName, const std::string &longName, const std::string &helpInfo)
 set all attributes of the option, except default and hide
 
void setAll (const std::string &shortName, const std::string &longName, const std::string &helpInfo, const T &defaultValue, short hide)
 set all attributes of the option
 
void setDefault (const T &defaultValue)
 set a default value for the option
 
std::string getDefaultValue () const
 
void setShortName (const std::string &shortName)
 set the short name to be used as -shortName
 
void setLongName (const std::string &longName)
 set the long name to be used as –longName
 
std::string getShortName () const
 get the short name to be used as -shortName
 
std::string getLongName () const
 get the long name to be used as –longName
 
std::string getHelp () const
 get help info stored in m_help
 
std::vector< T >::const_iterator findSubstring (const T &argument) const
 
template<>
void setAll (const std::string &shortName, const std::string &longName, const std::string &helpInfo)
 
template<>
void setAll (const std::string &shortName, const std::string &longName, const std::string &helpInfo, const bool &defaultValue, short hide)
 
template<>
 Optionpk (const std::string &shortName, const std::string &longName, const std::string &helpInfo)
 
template<>
 Optionpk (const std::string &shortName, const std::string &longName, const std::string &helpInfo, const bool &defaultValue, short hide)
 
template<>
std::vector< std::string >
::const_iterator 
findSubstring (const std::string &argument) const
 

Static Public Member Functions

static std::string getGPLv3License ()
 get license info
 

Friends

template<class T1 >
std::ostream & operator<< (std::ostream &os, const Optionpk< T1 > &theOption)
 print values for this option
 

Detailed Description

template<class T>
class Optionpk< T >

Class to implement command line options. With the constructor you can define an option, in both short - and long -- format, of a specific type, help information and a default value.
This class inherits from std::vector, so the option variable is a vector, supporting multiple inputs for the same option (e.g., –input file1 [–input file2 ...]. Several command line option formats are supported:

  • -shortOption value
  • -shortOption=value
  • --longOption value
  • --longOption=value
  • -shortOption (no value for boolean options, which are automatically set by invoking the option)
  • --longOption (no value for boolean options, which are automatically set by invoking the option)

Option names should have regular characters and no white space in them. Some names are reserved and can not be used either:

  • short option h or long option help: shows usage
  • long option help shows long help info
  • long option license: shows license info
  • long option version: shows current version of pktools
  • long option doxygen: shows help info in table format, ready to be included in doxygen

A call to member function retrieveOption reads the command line arguments and initializes the object (vector). Make sure to call this member function before using the option object in your main program (or a segmentation error due to an un-initialized vector will occur).

All calls to retrieveOption should reside in a try{} block. If one of the reserved options

  • license
  • version is used, an exception of type std::string is thrown. This can be caught with a catch(string predefinedString) right after the try block, where the message can be sent to stdout and the program can be ended.

Similarly, if help is invoked with the short option -h or long option --help, the main program is informed by the return value false of retrieveOption (for any option). An example how to use Optionpk is shown in pktestOption.cc

Definition at line 106 of file Optionpk.h.

Constructor & Destructor Documentation

template<class T >
Optionpk< T >::Optionpk ( const std::string &  shortName,
const std::string &  longName,
const std::string &  helpInfo 
)
inline

constructor for option without default value

constructor without default value
shortName is option invoked with -
longName is option invoked with --
helpInfo is the help message that is shown when option -h or –help is invoked

Definition at line 209 of file Optionpk.h.

210 : m_hasDefault(false)
211 {
212  setAll(shortName,longName,helpInfo);
213 }
void setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo)
set all attributes of the option, except default and hide
Definition: Optionpk.h:277
template<class T >
Optionpk< T >::Optionpk ( const std::string &  shortName,
const std::string &  longName,
const std::string &  helpInfo,
const T &  defaultValue,
short  hide = 0 
)
inline

constructor for option with default value. Option can be hidden for help info

constructor with default value.
shortName is option invoked with -
longName is option invoked with --
helpInfo is the help message that is shown when option -h or –help is invoked
defaultValue is default value of the option (first value of vector: option[0])
hide=0 : option is visible for in both short (-h). Typical use: mandatory options
hide=1 : option is only visible in long help (--help). Typical use: expert options
hide=2 : option is hidden for user. Typical use: Easter eggs or options only known to author

Definition at line 225 of file Optionpk.h.

226 {
227  setAll(shortName,longName,helpInfo,defaultValue, hide);
228 }
void setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo)
set all attributes of the option, except default and hide
Definition: Optionpk.h:277

Member Function Documentation

template<class T>
std::vector<T>::const_iterator Optionpk< T >::findSubstring ( const T &  argument) const
inline

find substring in options of type string (e.g., -co INTERLEAVE=BAND) this template function only makes sense for T=std::string (implemented via a specialization)

Definition at line 160 of file Optionpk.h.

160 {std::string errorString="Error: findSubstring only defined for options of type std::string"; throw(errorString);};
template<class T >
bool Optionpk< T >::retrieveOption ( int  argc,
char **  argv 
)
inline

read option from command line (use for all options!)

make sure to call this function first before using the option in main program (or segmentation fault will occur...)

Definition at line 305 of file Optionpk.h.

305  {
306  bool noHelp=true;//return value, alert main program that hard coded option (help, version, license, doxygen) was invoked
307  std::string helpStringShort="-h";//short option for help (hard coded)
308  std::string helpStringLong="--help";//long option for help (hard coded)
309  std::string helpStringDoxygen="--doxygen";//option to create table of options ready to use for doxygen
310  std::string versionString="--version";//option to show current version
311  std::string licenseString="--license";//option to show current version
312  for(int i = 1; i < argc; ++i ){
313  std::string currentArgument;
314  std::string currentOption=argv[i];
315  std::string shortOption=m_shortName;
316  std::string longOption=m_longName;
317  shortOption.insert(0,"-");
318  longOption.insert(0,"--");
319  size_t foundEqual=currentOption.rfind("=");
320  if(foundEqual!=std::string::npos){
321  currentArgument=currentOption.substr(foundEqual+1);
322  currentOption=currentOption.substr(0,foundEqual);
323  }
324  if(!helpStringShort.compare(currentOption)){
325  if(m_hide<1)
326  std::cout << usage() << std::endl;
327  noHelp=false;
328  }
329  else if(!helpStringLong.compare(currentOption)){
330  if(m_hide<2)
331  std::cout << usage() << std::endl;
332  noHelp=false;
333  }
334  else if(!helpStringDoxygen.compare(currentOption)){
335  if(m_hide<2)
336  std::cout << usageDoxygen() << std::endl;
337  noHelp=false;
338  }
339  else if(!versionString.compare(currentOption)){
340  std::string theVersion="version ";
341  theVersion+=VERSION;
342  theVersion+=", Copyright (C) Pieter Kempeneers.\n\
343  This program comes with ABSOLUTELY NO WARRANTY; for details type use option -h.\n \
344  This is free software, and you are welcome to redistribute it\n \
345  under certain conditions; use option --license for details.";
346  throw(theVersion);//no need to continue registering (break prevents from multiplication of version info)
347  }
348  else if(!licenseString.compare(currentOption)){
349  throw(getGPLv3License());
350  }
351  if(hasShortOption()&&!(shortOption.compare(currentOption))){//for -option
352  if(foundEqual!=std::string::npos)
353  this->push_back(string2type<T>(currentArgument));
354  else if(m_hasArgument && i < argc-1)
355  this->push_back(string2type<T>(argv[++i]));
356  else
357  this->push_back(string2type<T>("1"));
358  }
359  else if(hasLongOption()&&!(longOption.compare(currentOption))){//for --option
360  if(foundEqual!=std::string::npos)
361  this->push_back(string2type<T>(currentArgument));
362  else if(m_hasArgument && i < argc-1)
363  this->push_back(string2type<T>(argv[++i]));
364  else
365  this->push_back(string2type<T>("1"));
366  }
367  }
368  if(!(this->size())&&m_hasDefault)//only set default value if no options were given
369  this->push_back(m_defaultValue);
370  return(noHelp);
371 }
static std::string getGPLv3License()
get license info
Definition: Optionpk.h:143

The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/build-pkcrop__gui-gcc-Debug_2moc__mainwindow_8cpp_source.html0000644000113200011300000005547112647637661025561 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Debug/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkcrop_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  15, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  69, 11, 11, 11, 0x08,
36  100, 11, 11, 11, 0x08,
37  131, 11, 11, 11, 0x08,
38  158, 11, 11, 11, 0x08,
39  186, 11, 11, 11, 0x08,
40  219, 11, 11, 11, 0x08,
41  245, 11, 11, 11, 0x08,
42  273, 11, 11, 11, 0x08,
43  296, 11, 11, 11, 0x08,
44  324, 11, 11, 11, 0x08,
45  344, 11, 11, 11, 0x08,
46  365, 11, 11, 11, 0x08,
47  378, 11, 11, 11, 0x08,
48 
49  0 // eod
50 };
51 
52 static const char qt_meta_stringdata_MainWindow[] = {
53  "MainWindow\0\0on_actionInput_triggered()\0"
54  "on_toolButton_input_clicked()\0"
55  "on_toolButton_extent_clicked()\0"
56  "on_toolButton_output_clicked()\0"
57  "on_toolButton_ct_clicked()\0"
58  "on_toolButton_Run_clicked()\0"
59  "on_toolButton_defaults_clicked()\0"
60  "on_actionQuit_triggered()\0"
61  "on_actionOutput_triggered()\0"
62  "on_autoscale_clicked()\0"
63  "on_actionExtent_triggered()\0"
64  "on_manual_clicked()\0on_noscale_clicked()\0"
65  "deleteItem()\0on_toolButton_clicked()\0"
66 };
67 
68 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
69 {
70  if (_c == QMetaObject::InvokeMetaMethod) {
71  Q_ASSERT(staticMetaObject.cast(_o));
72  MainWindow *_t = static_cast<MainWindow *>(_o);
73  switch (_id) {
74  case 0: _t->on_actionInput_triggered(); break;
75  case 1: _t->on_toolButton_input_clicked(); break;
76  case 2: _t->on_toolButton_extent_clicked(); break;
77  case 3: _t->on_toolButton_output_clicked(); break;
78  case 4: _t->on_toolButton_ct_clicked(); break;
79  case 5: _t->on_toolButton_Run_clicked(); break;
80  case 6: _t->on_toolButton_defaults_clicked(); break;
81  case 7: _t->on_actionQuit_triggered(); break;
82  case 8: _t->on_actionOutput_triggered(); break;
83  case 9: _t->on_autoscale_clicked(); break;
84  case 10: _t->on_actionExtent_triggered(); break;
85  case 11: _t->on_manual_clicked(); break;
86  case 12: _t->on_noscale_clicked(); break;
87  case 13: _t->deleteItem(); break;
88  case 14: _t->on_toolButton_clicked(); break;
89  default: ;
90  }
91  }
92  Q_UNUSED(_a);
93 }
94 
95 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
96  0, qt_static_metacall
97 };
98 
99 const QMetaObject MainWindow::staticMetaObject = {
100  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
101  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
102 };
103 
104 #ifdef Q_NO_DATA_RELOCATION
105 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
106 #endif //Q_NO_DATA_RELOCATION
107 
108 const QMetaObject *MainWindow::metaObject() const
109 {
110  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
111 }
112 
113 void *MainWindow::qt_metacast(const char *_clname)
114 {
115  if (!_clname) return 0;
116  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
117  return static_cast<void*>(const_cast< MainWindow*>(this));
118  return QMainWindow::qt_metacast(_clname);
119 }
120 
121 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
122 {
123  _id = QMainWindow::qt_metacall(_c, _id, _a);
124  if (_id < 0)
125  return _id;
126  if (_c == QMetaObject::InvokeMetaMethod) {
127  if (_id < 15)
128  qt_static_metacall(this, _c, _id, _a);
129  _id -= 15;
130  }
131  return _id;
132 }
133 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/dir_457de909e3893805a4d2d0b8c0742bd8_dep.map0000644000113200011300000000050612616110567020261 00000000000000 pktools-2.6.6/doc/html/CostFactorySVM_8cc_source.html0000644000113200011300000007462712647637661017527 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/CostFactorySVM.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
CostFactorySVM.cc
1 /**********************************************************************
2 CostFactorySVM.cc: select features, typical use: feature selection for classification
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "CostFactorySVM.h"
21 #include "svm.h"
22 
23 #define Malloc(type,n) (type *)malloc((n)*sizeof(type))
24 
25 CostFactorySVM::CostFactorySVM()
26  : CostFactory(2,0), m_svm_type("C_SVC"), m_kernel_type("radial"), m_kernel_degree(3), m_gamma(1.0), m_coef0(0), m_ccost(1000), m_nu(0.5), m_epsilon_loss(100), m_cache(100), m_epsilon_tol(0.001), m_shrinking(false), m_prob_est(true){
27 }
28 
29 CostFactorySVM::~CostFactorySVM(){
30 }
31 
32 CostFactorySVM::CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose)
33  : CostFactory(cv,verbose), m_svm_type(svm_type), m_kernel_type(kernel_type), m_kernel_degree(kernel_degree), m_gamma(gamma), m_coef0(coef0), m_ccost(ccost), m_nu(nu), m_epsilon_loss(epsilon_loss), m_cache(cache), m_epsilon_tol(epsilon_tol), m_shrinking(shrinking), m_prob_est(prob_est){};
34 
35 double CostFactorySVM::getCost(const std::vector<Vector2d<float> > &trainingFeatures){
36  std::map<std::string, svm::SVM_TYPE> svmMap;
37 
38  svmMap["C_SVC"]=svm::C_SVC;
39  svmMap["nu_SVC"]=svm::nu_SVC;
40  svmMap["one_class"]=svm::one_class;
41  svmMap["epsilon_SVR"]=svm::epsilon_SVR;
42  svmMap["nu_SVR"]=svm::nu_SVR;
43 
44  std::map<std::string, svm::KERNEL_TYPE> kernelMap;
45 
46  kernelMap["linear"]=svm::linear;
47  kernelMap["polynomial"]=svm::polynomial;
48  kernelMap["radial"]=svm::radial;
49  kernelMap["sigmoid;"]=svm::sigmoid;
50 
51  unsigned short nclass=trainingFeatures.size();
52  unsigned int ntraining=0;
53  unsigned int ntest=0;
54  for(int iclass=0;iclass<nclass;++iclass){
55  ntraining+=m_nctraining[iclass];
56  ntest+=m_nctest[iclass];
57  }
58  if(ntest)
59  assert(!m_cv);
60  if(!m_cv)
61  assert(ntest);
62  unsigned short nFeatures=trainingFeatures[0][0].size();
63 
64  struct svm_parameter param;
65  param.svm_type = svmMap[m_svm_type];
66  param.kernel_type = kernelMap[m_kernel_type];
67  param.degree = m_kernel_degree;
68  param.gamma = (m_gamma>0)? m_gamma : 1.0/nFeatures;
69  param.coef0 = m_coef0;
70  param.nu = m_nu;
71  param.cache_size = m_cache;
72  param.C = m_ccost;
73  param.eps = m_epsilon_tol;
74  param.p = m_epsilon_loss;
75  param.shrinking = (m_shrinking)? 1 : 0;
76  param.probability = (m_prob_est)? 1 : 0;
77  param.nr_weight = 0;//not used: I use priors and balancing
78  param.weight_label = NULL;
79  param.weight = NULL;
80  param.verbose=(m_verbose>1)? true:false;
81  struct svm_model* svm;
82  struct svm_problem prob;
83  struct svm_node* x_space;
84 
85  prob.l=ntraining;
86  prob.y = Malloc(double,prob.l);
87  prob.x = Malloc(struct svm_node *,prob.l);
88  x_space = Malloc(struct svm_node,(nFeatures+1)*ntraining);
89  unsigned long int spaceIndex=0;
90  int lIndex=0;
91  for(int iclass=0;iclass<nclass;++iclass){
92  // for(int isample=0;isample<trainingFeatures[iclass].size();++isample){
93  for(int isample=0;isample<m_nctraining[iclass];++isample){
94  prob.x[lIndex]=&(x_space[spaceIndex]);
95  for(int ifeature=0;ifeature<nFeatures;++ifeature){
96  x_space[spaceIndex].index=ifeature+1;
97  x_space[spaceIndex].value=trainingFeatures[iclass][isample][ifeature];
98  ++spaceIndex;
99  }
100  x_space[spaceIndex++].index=-1;
101  prob.y[lIndex]=iclass;
102  ++lIndex;
103  }
104  }
105 
106  assert(lIndex==prob.l);
107  if(m_verbose>2)
108  std::cout << "checking parameters" << std::endl;
109  svm_check_parameter(&prob,&param);
110  if(m_verbose>2)
111  std::cout << "parameters ok, training" << std::endl;
112  svm=svm_train(&prob,&param);
113  if(m_verbose>2)
114  std::cout << "SVM is now trained" << std::endl;
115 
116  m_cm.clearResults();
117  if(m_cv>1){
118  double *target = Malloc(double,prob.l);
119  svm_cross_validation(&prob,&param,m_cv,target);
120  assert(param.svm_type != EPSILON_SVR&&param.svm_type != NU_SVR);//only for regression
121  for(int i=0;i<prob.l;i++){
122  std::string refClassName=m_nameVector[prob.y[i]];
123  std::string className=m_nameVector[target[i]];
124  if(m_classValueMap.size())
125  m_cm.incrementResult(type2string<short>(m_classValueMap[refClassName]),type2string<short>(m_classValueMap[className]),1.0);
126  else
127  m_cm.incrementResult(m_cm.getClass(prob.y[i]),m_cm.getClass(target[i]),1.0);
128  }
129  free(target);
130  }
131  else{
132  struct svm_node *x_test;
133  std::vector<double> result(nclass);
134  x_test = Malloc(struct svm_node,(nFeatures+1));
135  for(int iclass=0;iclass<nclass;++iclass){
136  for(int isample=0;isample<m_nctest[iclass];++isample){
137  for(int ifeature=0;ifeature<nFeatures;++ifeature){
138  x_test[ifeature].index=ifeature+1;
139  x_test[ifeature].value=trainingFeatures[iclass][m_nctraining[iclass]+isample][ifeature];
140  }
141  x_test[nFeatures].index=-1;
142  double predict_label=0;
143  assert(svm_check_probability_model(svm));
144  predict_label = svm_predict_probability(svm,x_test,&(result[0]));
145  // predict_label = svm_predict(svm,x_test);
146  std::string refClassName=m_nameVector[iclass];
147  std::string className=m_nameVector[static_cast<short>(predict_label)];
148  if(m_classValueMap.size())
149  m_cm.incrementResult(type2string<short>(m_classValueMap[refClassName]),type2string<short>(m_classValueMap[className]),1.0);
150  else
151  m_cm.incrementResult(refClassName,className,1.0);
152  }
153  }
154  free(x_test);
155  }
156  if(m_verbose>1)
157  std::cout << m_cm << std::endl;
158  assert(m_cm.nReference());
159  // if(m_verbose)
160 
161  // std::cout << m_cm << std::endl;
162  // std::cout << "Kappa: " << m_cm.kappa() << std::endl;
163  // double se95_oa=0;
164  // double doa=0;
165  // doa=m_cm.oa_pct(&se95_oa);
166  // std::cout << "Overall Accuracy: " << doa << " (" << se95_oa << ")" << std::endl;
167 
168  // *NOTE* Because svm_model contains pointers to svm_problem, you can
169  // not free the memory used by svm_problem if you are still using the
170  // svm_model produced by svm_train().
171  // however, we will re-train the svm later on after the feature selection
172  free(prob.y);
173  free(prob.x);
174  free(x_space);
175  svm_free_and_destroy_model(&(svm));
176 
177  return(m_cm.kappa());
178 }
Definition: svm.h:53
Definition: svm.h:12
pktools-2.6.6/doc/html/pkascii2img.html0000644000113200011300000001270012647637662014747 00000000000000 pktools: pkascii2img
pktools  2.6.6
Processing Kernel for geospatial data
pkascii2img

program to create raster image based on ascii file

SYNOPSIS

Usage: pkascii2img -i input.txt -o output

Options: [-ot type] [-of GDALformat] [-co NAME=VALUE]* [-dx value] [-dy value] [-ulx value] [-uly value] [-ct filename] [-a_srs EPSG:number] [-d description]

Description

The utility pkascii2img creates a raster dataset from an ASCII textfile. The textfile is in matrix format (rows and columns). The dimensions in x and y are defined by the number of columns and rows respectively. The georeferencing can be defined by providing the options for cell size (-dx -dy), upper left position (-ulx -uly) and the projection (-a_srs). Some dataset formats can also store a description (-d) and a color table (-ct).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input ASCII file
    o output std::string Output image file
    ot otype std::string Byte Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff image type string (see also gdal_translate)
    co co std::string Creation option for output file. Multiple options can be specified.
    ulx ulx double 0 Upper left x value bounding box (in geocoordinates if georef is true)
    uly uly double 0 Upper left y value bounding box (in geocoordinates if georef is true)
    dx dx double Output resolution in x (in meter)
    dy dy double Output resolution in y (in meter)
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    a_srs a_srs std::string Override the projection for the output file
    d description std::string Set image description
    Usage: pkascii2img -i input.txt -o output

Examples

Some examples how to use pkascii2img can be found here

pktools-2.6.6/doc/html/inherit_graph_13.map0000644000113200011300000000030212616110570015453 00000000000000 pktools-2.6.6/doc/html/classUi_1_1MainWindow__coll__graph.map0000644000113200011300000000025212616110567021067 00000000000000 pktools-2.6.6/doc/html/inherit_graph_16.md50000644000113200011300000000004012616110567015373 000000000000007eb174f715b0c5488a80017bef290745pktools-2.6.6/doc/html/structsvm__node-members.html0000644000113200011300000000661512647637662017423 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
svm_node Member List

This is the complete list of members for svm_node, including all inherited members.

index (defined in svm_node)svm_node
value (defined in svm_node)svm_node
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop__inherit__graph.md50000644000113200011300000000004012616110566023171 0000000000000096897278b3ac460a3a4a246c00581d44pktools-2.6.6/doc/html/ftv2plastnode.png0000644000113200011300000000034512647637661015161 00000000000000‰PNG  IHDRɪ|¬IDATxí=QF‘Ø¥D«ÔkÄ:‰F©PK؃=V@§Õ³ Õ8SHxñÌ0bnrróŠ{ò½¿¾’$ ÀÏTŠP  ö¼X¬OÛd6êìòð"°²S´±O¥B€(¡àQé)š+YĈ ÒªËRÉÐ>VtÉsˆm9(ê„䜥k‚-@ȧ-Ü$ó b Ò[he ¿Kp-ôl|CùÿApRG'rÍ­aIEND®B`‚pktools-2.6.6/doc/html/build-pkcrop__gui-gcc-Release_2ui__mainwindow_8h_source.html0000644000113200011300000033321712647637661025414 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Release/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QGroupBox>
20 #include <QtGui/QHBoxLayout>
21 #include <QtGui/QHeaderView>
22 #include <QtGui/QLabel>
23 #include <QtGui/QLineEdit>
24 #include <QtGui/QListWidget>
25 #include <QtGui/QMainWindow>
26 #include <QtGui/QMenu>
27 #include <QtGui/QMenuBar>
28 #include <QtGui/QPlainTextEdit>
29 #include <QtGui/QRadioButton>
30 #include <QtGui/QSpacerItem>
31 #include <QtGui/QStatusBar>
32 #include <QtGui/QTabWidget>
33 #include <QtGui/QToolBar>
34 #include <QtGui/QToolButton>
35 #include <QtGui/QVBoxLayout>
36 #include <QtGui/QWidget>
37 
38 QT_BEGIN_NAMESPACE
39 
40 class Ui_MainWindow
41 {
42 public:
43  QAction *actionInput;
44  QAction *actionExtent;
45  QAction *actionOutput;
46  QAction *actionQuit;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab;
51  QVBoxLayout *verticalLayout_2;
52  QGridLayout *gridLayout_2;
53  QLineEdit *uly;
54  QToolButton *toolButton_extent;
55  QSpacerItem *horizontalSpacer_2;
56  QLineEdit *lrx;
57  QLineEdit *lry;
58  QListWidget *listWidget_band;
59  QListWidget *listWidget_input;
60  QSpacerItem *horizontalSpacer_3;
61  QLineEdit *extent;
62  QToolButton *toolButton_input;
63  QLabel *label_2;
64  QLabel *label_4;
65  QLineEdit *ulx;
66  QLabel *label_16;
67  QLabel *label;
68  QToolButton *toolButton;
69  QWidget *tab_2;
70  QGridLayout *gridLayout_4;
71  QSpacerItem *horizontalSpacer_9;
72  QComboBox *resample;
73  QSpacerItem *verticalSpacer;
74  QLineEdit *dy;
75  QSpacerItem *verticalSpacer_3;
76  QLabel *label_9;
77  QSpacerItem *horizontalSpacer_8;
78  QGroupBox *groupBox;
79  QGridLayout *gridLayout_3;
80  QRadioButton *autoscale;
81  QLineEdit *offset;
82  QRadioButton *manual;
83  QLabel *label_21;
84  QLabel *label_20;
85  QRadioButton *noscale;
86  QLineEdit *scale;
87  QSpacerItem *horizontalSpacer_4;
88  QLabel *label_10;
89  QLineEdit *as_from;
90  QLabel *label_11;
91  QLineEdit *as_to;
92  QSpacerItem *horizontalSpacer_11;
93  QLabel *label_15;
94  QLineEdit *dx;
95  QLabel *label_18;
96  QLabel *label_17;
97  QSpacerItem *horizontalSpacer_5;
98  QSpacerItem *horizontalSpacer_10;
99  QWidget *tab_3;
100  QVBoxLayout *verticalLayout_3;
101  QGridLayout *gridLayout;
102  QComboBox *otype;
103  QComboBox *compressed;
104  QLabel *label_6;
105  QLabel *label_5;
106  QToolButton *toolButton_output;
107  QLabel *label_3;
108  QToolButton *toolButton_ct;
109  QLineEdit *output;
110  QCheckBox *tiled;
111  QLabel *label_13;
112  QLineEdit *a_srs;
113  QLabel *label_7;
114  QLabel *label_14;
115  QLineEdit *nodata;
116  QComboBox *oformat;
117  QLineEdit *ct;
118  QLabel *label_12;
119  QComboBox *interleaved;
120  QLabel *label_8;
121  QSpacerItem *horizontalSpacer_6;
122  QWidget *tab_4;
123  QVBoxLayout *verticalLayout_5;
124  QVBoxLayout *verticalLayout_4;
125  QLabel *label_24;
126  QLineEdit *commandLineEdit;
127  QLabel *label_25;
128  QPlainTextEdit *consoleEdit;
129  QSpacerItem *verticalSpacer_2;
130  QSpacerItem *horizontalSpacer;
131  QHBoxLayout *horizontalLayout_2;
132  QToolButton *toolButton_Run;
133  QSpacerItem *horizontalSpacer_7;
134  QToolButton *toolButton_defaults;
135  QMenuBar *menuBar;
136  QMenu *menuFile;
137  QToolBar *mainToolBar;
138  QStatusBar *statusBar;
139  QButtonGroup *buttonGroup;
140 
141  void setupUi(QMainWindow *MainWindow)
142  {
143  if (MainWindow->objectName().isEmpty())
144  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
145  MainWindow->resize(821, 701);
146  actionInput = new QAction(MainWindow);
147  actionInput->setObjectName(QString::fromUtf8("actionInput"));
148  actionExtent = new QAction(MainWindow);
149  actionExtent->setObjectName(QString::fromUtf8("actionExtent"));
150  actionOutput = new QAction(MainWindow);
151  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
152  actionQuit = new QAction(MainWindow);
153  actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
154  centralWidget = new QWidget(MainWindow);
155  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
156  verticalLayout = new QVBoxLayout(centralWidget);
157  verticalLayout->setSpacing(6);
158  verticalLayout->setContentsMargins(11, 11, 11, 11);
159  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
160  tabWidget = new QTabWidget(centralWidget);
161  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
162  tab = new QWidget();
163  tab->setObjectName(QString::fromUtf8("tab"));
164  verticalLayout_2 = new QVBoxLayout(tab);
165  verticalLayout_2->setSpacing(6);
166  verticalLayout_2->setContentsMargins(11, 11, 11, 11);
167  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
168  gridLayout_2 = new QGridLayout();
169  gridLayout_2->setSpacing(6);
170  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
171  uly = new QLineEdit(tab);
172  uly->setObjectName(QString::fromUtf8("uly"));
173 
174  gridLayout_2->addWidget(uly, 1, 2, 1, 1);
175 
176  toolButton_extent = new QToolButton(tab);
177  toolButton_extent->setObjectName(QString::fromUtf8("toolButton_extent"));
178 
179  gridLayout_2->addWidget(toolButton_extent, 4, 2, 1, 1);
180 
181  horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
182 
183  gridLayout_2->addItem(horizontalSpacer_2, 1, 1, 1, 1);
184 
185  lrx = new QLineEdit(tab);
186  lrx->setObjectName(QString::fromUtf8("lrx"));
187 
188  gridLayout_2->addWidget(lrx, 2, 4, 1, 1);
189 
190  lry = new QLineEdit(tab);
191  lry->setObjectName(QString::fromUtf8("lry"));
192 
193  gridLayout_2->addWidget(lry, 3, 2, 1, 1);
194 
195  listWidget_band = new QListWidget(tab);
196  listWidget_band->setObjectName(QString::fromUtf8("listWidget_band"));
197 
198  gridLayout_2->addWidget(listWidget_band, 6, 1, 1, 1);
199 
200  listWidget_input = new QListWidget(tab);
201  listWidget_input->setObjectName(QString::fromUtf8("listWidget_input"));
202 
203  gridLayout_2->addWidget(listWidget_input, 0, 1, 1, 1);
204 
205  horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
206 
207  gridLayout_2->addItem(horizontalSpacer_3, 1, 4, 1, 1);
208 
209  extent = new QLineEdit(tab);
210  extent->setObjectName(QString::fromUtf8("extent"));
211 
212  gridLayout_2->addWidget(extent, 4, 1, 1, 1);
213 
214  toolButton_input = new QToolButton(tab);
215  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
216 
217  gridLayout_2->addWidget(toolButton_input, 0, 2, 1, 1);
218 
219  label_2 = new QLabel(tab);
220  label_2->setObjectName(QString::fromUtf8("label_2"));
221 
222  gridLayout_2->addWidget(label_2, 1, 0, 1, 1);
223 
224  label_4 = new QLabel(tab);
225  label_4->setObjectName(QString::fromUtf8("label_4"));
226 
227  gridLayout_2->addWidget(label_4, 4, 0, 1, 1);
228 
229  ulx = new QLineEdit(tab);
230  ulx->setObjectName(QString::fromUtf8("ulx"));
231 
232  gridLayout_2->addWidget(ulx, 2, 1, 1, 1);
233 
234  label_16 = new QLabel(tab);
235  label_16->setObjectName(QString::fromUtf8("label_16"));
236 
237  gridLayout_2->addWidget(label_16, 6, 0, 1, 1);
238 
239  label = new QLabel(tab);
240  label->setObjectName(QString::fromUtf8("label"));
241 
242  gridLayout_2->addWidget(label, 0, 0, 1, 1);
243 
244  toolButton = new QToolButton(tab);
245  toolButton->setObjectName(QString::fromUtf8("toolButton"));
246 
247  gridLayout_2->addWidget(toolButton, 0, 3, 1, 1);
248 
249 
250  verticalLayout_2->addLayout(gridLayout_2);
251 
252  tabWidget->addTab(tab, QString());
253  tab_2 = new QWidget();
254  tab_2->setObjectName(QString::fromUtf8("tab_2"));
255  gridLayout_4 = new QGridLayout(tab_2);
256  gridLayout_4->setSpacing(6);
257  gridLayout_4->setContentsMargins(11, 11, 11, 11);
258  gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
259  horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
260 
261  gridLayout_4->addItem(horizontalSpacer_9, 1, 9, 1, 1);
262 
263  resample = new QComboBox(tab_2);
264  resample->setObjectName(QString::fromUtf8("resample"));
265 
266  gridLayout_4->addWidget(resample, 0, 1, 1, 1);
267 
268  verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
269 
270  gridLayout_4->addItem(verticalSpacer, 2, 4, 1, 1);
271 
272  dy = new QLineEdit(tab_2);
273  dy->setObjectName(QString::fromUtf8("dy"));
274 
275  gridLayout_4->addWidget(dy, 1, 4, 1, 1);
276 
277  verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
278 
279  gridLayout_4->addItem(verticalSpacer_3, 4, 0, 1, 1);
280 
281  label_9 = new QLabel(tab_2);
282  label_9->setObjectName(QString::fromUtf8("label_9"));
283 
284  gridLayout_4->addWidget(label_9, 1, 0, 1, 1);
285 
286  horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
287 
288  gridLayout_4->addItem(horizontalSpacer_8, 1, 3, 1, 1);
289 
290  groupBox = new QGroupBox(tab_2);
291  groupBox->setObjectName(QString::fromUtf8("groupBox"));
292  gridLayout_3 = new QGridLayout(groupBox);
293  gridLayout_3->setSpacing(6);
294  gridLayout_3->setContentsMargins(11, 11, 11, 11);
295  gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
296  autoscale = new QRadioButton(groupBox);
297  buttonGroup = new QButtonGroup(MainWindow);
298  buttonGroup->setObjectName(QString::fromUtf8("buttonGroup"));
299  buttonGroup->addButton(autoscale);
300  autoscale->setObjectName(QString::fromUtf8("autoscale"));
301 
302  gridLayout_3->addWidget(autoscale, 1, 0, 1, 1);
303 
304  offset = new QLineEdit(groupBox);
305  offset->setObjectName(QString::fromUtf8("offset"));
306 
307  gridLayout_3->addWidget(offset, 2, 4, 1, 1);
308 
309  manual = new QRadioButton(groupBox);
310  buttonGroup->addButton(manual);
311  manual->setObjectName(QString::fromUtf8("manual"));
312 
313  gridLayout_3->addWidget(manual, 2, 0, 1, 1);
314 
315  label_21 = new QLabel(groupBox);
316  label_21->setObjectName(QString::fromUtf8("label_21"));
317 
318  gridLayout_3->addWidget(label_21, 2, 3, 1, 1);
319 
320  label_20 = new QLabel(groupBox);
321  label_20->setObjectName(QString::fromUtf8("label_20"));
322 
323  gridLayout_3->addWidget(label_20, 2, 1, 1, 1);
324 
325  noscale = new QRadioButton(groupBox);
326  buttonGroup->addButton(noscale);
327  noscale->setObjectName(QString::fromUtf8("noscale"));
328 
329  gridLayout_3->addWidget(noscale, 0, 0, 1, 1);
330 
331  scale = new QLineEdit(groupBox);
332  scale->setObjectName(QString::fromUtf8("scale"));
333 
334  gridLayout_3->addWidget(scale, 2, 2, 1, 1);
335 
336  horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
337 
338  gridLayout_3->addItem(horizontalSpacer_4, 2, 5, 1, 1);
339 
340  label_10 = new QLabel(groupBox);
341  label_10->setObjectName(QString::fromUtf8("label_10"));
342 
343  gridLayout_3->addWidget(label_10, 1, 1, 1, 1);
344 
345  as_from = new QLineEdit(groupBox);
346  as_from->setObjectName(QString::fromUtf8("as_from"));
347 
348  gridLayout_3->addWidget(as_from, 1, 2, 1, 1);
349 
350  label_11 = new QLabel(groupBox);
351  label_11->setObjectName(QString::fromUtf8("label_11"));
352 
353  gridLayout_3->addWidget(label_11, 1, 3, 1, 1);
354 
355  as_to = new QLineEdit(groupBox);
356  as_to->setObjectName(QString::fromUtf8("as_to"));
357 
358  gridLayout_3->addWidget(as_to, 1, 4, 1, 1);
359 
360  horizontalSpacer_11 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
361 
362  gridLayout_3->addItem(horizontalSpacer_11, 1, 5, 1, 1);
363 
364 
365  gridLayout_4->addWidget(groupBox, 3, 0, 1, 8);
366 
367  label_15 = new QLabel(tab_2);
368  label_15->setObjectName(QString::fromUtf8("label_15"));
369 
370  gridLayout_4->addWidget(label_15, 1, 2, 1, 1);
371 
372  dx = new QLineEdit(tab_2);
373  dx->setObjectName(QString::fromUtf8("dx"));
374 
375  gridLayout_4->addWidget(dx, 1, 1, 1, 1);
376 
377  label_18 = new QLabel(tab_2);
378  label_18->setObjectName(QString::fromUtf8("label_18"));
379 
380  gridLayout_4->addWidget(label_18, 1, 5, 1, 1);
381 
382  label_17 = new QLabel(tab_2);
383  label_17->setObjectName(QString::fromUtf8("label_17"));
384 
385  gridLayout_4->addWidget(label_17, 0, 0, 1, 1);
386 
387  horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
388 
389  gridLayout_4->addItem(horizontalSpacer_5, 1, 6, 1, 1);
390 
391  horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
392 
393  gridLayout_4->addItem(horizontalSpacer_10, 0, 3, 1, 1);
394 
395  tabWidget->addTab(tab_2, QString());
396  tab_3 = new QWidget();
397  tab_3->setObjectName(QString::fromUtf8("tab_3"));
398  verticalLayout_3 = new QVBoxLayout(tab_3);
399  verticalLayout_3->setSpacing(6);
400  verticalLayout_3->setContentsMargins(11, 11, 11, 11);
401  verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
402  gridLayout = new QGridLayout();
403  gridLayout->setSpacing(6);
404  gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
405  otype = new QComboBox(tab_3);
406  otype->setObjectName(QString::fromUtf8("otype"));
407 
408  gridLayout->addWidget(otype, 3, 1, 1, 1);
409 
410  compressed = new QComboBox(tab_3);
411  compressed->setObjectName(QString::fromUtf8("compressed"));
412 
413  gridLayout->addWidget(compressed, 6, 5, 1, 1);
414 
415  label_6 = new QLabel(tab_3);
416  label_6->setObjectName(QString::fromUtf8("label_6"));
417 
418  gridLayout->addWidget(label_6, 3, 0, 1, 1);
419 
420  label_5 = new QLabel(tab_3);
421  label_5->setObjectName(QString::fromUtf8("label_5"));
422 
423  gridLayout->addWidget(label_5, 2, 0, 1, 1);
424 
425  toolButton_output = new QToolButton(tab_3);
426  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
427 
428  gridLayout->addWidget(toolButton_output, 1, 2, 1, 1);
429 
430  label_3 = new QLabel(tab_3);
431  label_3->setObjectName(QString::fromUtf8("label_3"));
432 
433  gridLayout->addWidget(label_3, 1, 0, 1, 1);
434 
435  toolButton_ct = new QToolButton(tab_3);
436  toolButton_ct->setObjectName(QString::fromUtf8("toolButton_ct"));
437 
438  gridLayout->addWidget(toolButton_ct, 5, 2, 1, 1);
439 
440  output = new QLineEdit(tab_3);
441  output->setObjectName(QString::fromUtf8("output"));
442 
443  gridLayout->addWidget(output, 1, 1, 1, 1);
444 
445  tiled = new QCheckBox(tab_3);
446  tiled->setObjectName(QString::fromUtf8("tiled"));
447 
448  gridLayout->addWidget(tiled, 6, 2, 1, 1);
449 
450  label_13 = new QLabel(tab_3);
451  label_13->setObjectName(QString::fromUtf8("label_13"));
452 
453  gridLayout->addWidget(label_13, 6, 4, 1, 1);
454 
455  a_srs = new QLineEdit(tab_3);
456  a_srs->setObjectName(QString::fromUtf8("a_srs"));
457 
458  gridLayout->addWidget(a_srs, 2, 1, 1, 1);
459 
460  label_7 = new QLabel(tab_3);
461  label_7->setObjectName(QString::fromUtf8("label_7"));
462 
463  gridLayout->addWidget(label_7, 4, 0, 1, 1);
464 
465  label_14 = new QLabel(tab_3);
466  label_14->setObjectName(QString::fromUtf8("label_14"));
467 
468  gridLayout->addWidget(label_14, 7, 0, 1, 1);
469 
470  nodata = new QLineEdit(tab_3);
471  nodata->setObjectName(QString::fromUtf8("nodata"));
472 
473  gridLayout->addWidget(nodata, 7, 1, 1, 1);
474 
475  oformat = new QComboBox(tab_3);
476  oformat->setObjectName(QString::fromUtf8("oformat"));
477 
478  gridLayout->addWidget(oformat, 4, 1, 1, 1);
479 
480  ct = new QLineEdit(tab_3);
481  ct->setObjectName(QString::fromUtf8("ct"));
482 
483  gridLayout->addWidget(ct, 5, 1, 1, 1);
484 
485  label_12 = new QLabel(tab_3);
486  label_12->setObjectName(QString::fromUtf8("label_12"));
487 
488  gridLayout->addWidget(label_12, 6, 0, 1, 1);
489 
490  interleaved = new QComboBox(tab_3);
491  interleaved->setObjectName(QString::fromUtf8("interleaved"));
492 
493  gridLayout->addWidget(interleaved, 6, 1, 1, 1);
494 
495  label_8 = new QLabel(tab_3);
496  label_8->setObjectName(QString::fromUtf8("label_8"));
497 
498  gridLayout->addWidget(label_8, 5, 0, 1, 1);
499 
500  horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
501 
502  gridLayout->addItem(horizontalSpacer_6, 6, 3, 1, 1);
503 
504 
505  verticalLayout_3->addLayout(gridLayout);
506 
507  tabWidget->addTab(tab_3, QString());
508  tab_4 = new QWidget();
509  tab_4->setObjectName(QString::fromUtf8("tab_4"));
510  verticalLayout_5 = new QVBoxLayout(tab_4);
511  verticalLayout_5->setSpacing(6);
512  verticalLayout_5->setContentsMargins(11, 11, 11, 11);
513  verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
514  verticalLayout_4 = new QVBoxLayout();
515  verticalLayout_4->setSpacing(6);
516  verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
517  label_24 = new QLabel(tab_4);
518  label_24->setObjectName(QString::fromUtf8("label_24"));
519 
520  verticalLayout_4->addWidget(label_24);
521 
522  commandLineEdit = new QLineEdit(tab_4);
523  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
524 
525  verticalLayout_4->addWidget(commandLineEdit);
526 
527  label_25 = new QLabel(tab_4);
528  label_25->setObjectName(QString::fromUtf8("label_25"));
529 
530  verticalLayout_4->addWidget(label_25);
531 
532  consoleEdit = new QPlainTextEdit(tab_4);
533  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
534 
535  verticalLayout_4->addWidget(consoleEdit);
536 
537 
538  verticalLayout_5->addLayout(verticalLayout_4);
539 
540  tabWidget->addTab(tab_4, QString());
541 
542  verticalLayout->addWidget(tabWidget);
543 
544  verticalSpacer_2 = new QSpacerItem(20, 112, QSizePolicy::Minimum, QSizePolicy::Expanding);
545 
546  verticalLayout->addItem(verticalSpacer_2);
547 
548  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
549 
550  verticalLayout->addItem(horizontalSpacer);
551 
552  horizontalLayout_2 = new QHBoxLayout();
553  horizontalLayout_2->setSpacing(6);
554  horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
555  toolButton_Run = new QToolButton(centralWidget);
556  toolButton_Run->setObjectName(QString::fromUtf8("toolButton_Run"));
557 
558  horizontalLayout_2->addWidget(toolButton_Run);
559 
560  horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
561 
562  horizontalLayout_2->addItem(horizontalSpacer_7);
563 
564  toolButton_defaults = new QToolButton(centralWidget);
565  toolButton_defaults->setObjectName(QString::fromUtf8("toolButton_defaults"));
566 
567  horizontalLayout_2->addWidget(toolButton_defaults);
568 
569 
570  verticalLayout->addLayout(horizontalLayout_2);
571 
572  MainWindow->setCentralWidget(centralWidget);
573  menuBar = new QMenuBar(MainWindow);
574  menuBar->setObjectName(QString::fromUtf8("menuBar"));
575  menuBar->setGeometry(QRect(0, 0, 821, 25));
576  menuFile = new QMenu(menuBar);
577  menuFile->setObjectName(QString::fromUtf8("menuFile"));
578  MainWindow->setMenuBar(menuBar);
579  mainToolBar = new QToolBar(MainWindow);
580  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
581  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
582  statusBar = new QStatusBar(MainWindow);
583  statusBar->setObjectName(QString::fromUtf8("statusBar"));
584  MainWindow->setStatusBar(statusBar);
585  QWidget::setTabOrder(toolButton_input, uly);
586  QWidget::setTabOrder(uly, ulx);
587  QWidget::setTabOrder(ulx, lrx);
588  QWidget::setTabOrder(lrx, lry);
589  QWidget::setTabOrder(lry, extent);
590  QWidget::setTabOrder(extent, toolButton_extent);
591  QWidget::setTabOrder(toolButton_extent, listWidget_band);
592  QWidget::setTabOrder(listWidget_band, resample);
593  QWidget::setTabOrder(resample, dx);
594  QWidget::setTabOrder(dx, dy);
595  QWidget::setTabOrder(dy, noscale);
596  QWidget::setTabOrder(noscale, autoscale);
597  QWidget::setTabOrder(autoscale, scale);
598  QWidget::setTabOrder(scale, offset);
599  QWidget::setTabOrder(offset, output);
600  QWidget::setTabOrder(output, toolButton_output);
601  QWidget::setTabOrder(toolButton_output, a_srs);
602  QWidget::setTabOrder(a_srs, otype);
603  QWidget::setTabOrder(otype, oformat);
604  QWidget::setTabOrder(oformat, ct);
605  QWidget::setTabOrder(ct, toolButton_ct);
606  QWidget::setTabOrder(toolButton_ct, interleaved);
607  QWidget::setTabOrder(interleaved, tiled);
608  QWidget::setTabOrder(tiled, compressed);
609  QWidget::setTabOrder(compressed, nodata);
610  QWidget::setTabOrder(nodata, toolButton_Run);
611  QWidget::setTabOrder(toolButton_Run, toolButton_defaults);
612  QWidget::setTabOrder(toolButton_defaults, manual);
613  QWidget::setTabOrder(manual, consoleEdit);
614  QWidget::setTabOrder(consoleEdit, commandLineEdit);
615  QWidget::setTabOrder(commandLineEdit, listWidget_input);
616  QWidget::setTabOrder(listWidget_input, tabWidget);
617 
618  menuBar->addAction(menuFile->menuAction());
619  menuFile->addAction(actionInput);
620  menuFile->addAction(actionExtent);
621  menuFile->addAction(actionOutput);
622  menuFile->addAction(actionQuit);
623 
624  retranslateUi(MainWindow);
625 
626  tabWidget->setCurrentIndex(0);
627 
628 
629  QMetaObject::connectSlotsByName(MainWindow);
630  } // setupUi
631 
632  void retranslateUi(QMainWindow *MainWindow)
633  {
634  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkcrop_gui", 0, QApplication::UnicodeUTF8));
635  actionInput->setText(QApplication::translate("MainWindow", "Input(s)", 0, QApplication::UnicodeUTF8));
636  actionInput->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
637  actionExtent->setText(QApplication::translate("MainWindow", "Extent", 0, QApplication::UnicodeUTF8));
638  actionExtent->setShortcut(QApplication::translate("MainWindow", "Alt+E", 0, QApplication::UnicodeUTF8));
639  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
640  actionOutput->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
641  actionQuit->setText(QApplication::translate("MainWindow", "Quit", 0, QApplication::UnicodeUTF8));
642  actionQuit->setShortcut(QApplication::translate("MainWindow", "Alt+Q", 0, QApplication::UnicodeUTF8));
643  toolButton_extent->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
644  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
645 #ifndef QT_NO_TOOLTIP
646  label_2->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Provide geographical extent to crop in coordinate reference system of input data</p></body></html>", 0, QApplication::UnicodeUTF8));
647 #endif // QT_NO_TOOLTIP
648  label_2->setText(QApplication::translate("MainWindow", "Geographical extent", 0, QApplication::UnicodeUTF8));
649 #ifndef QT_NO_TOOLTIP
650  label_4->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Use an external OGR vector file to define the geographical extent to crop. Coordinate reference systems of input and vector must be identical</p></body></html>", 0, QApplication::UnicodeUTF8));
651 #endif // QT_NO_TOOLTIP
652  label_4->setText(QApplication::translate("MainWindow", "Extent via vector:", 0, QApplication::UnicodeUTF8));
653 #ifndef QT_NO_WHATSTHIS
654  label_16->setWhatsThis(QApplication::translate("MainWindow", "<html><head/><body><p>First select input image. Then select bands by clicking in the table (use Ctrl and Shift to select multiple bands)</p></body></html>", 0, QApplication::UnicodeUTF8));
655 #endif // QT_NO_WHATSTHIS
656  label_16->setText(QApplication::translate("MainWindow", "Select bands", 0, QApplication::UnicodeUTF8));
657 #ifndef QT_NO_TOOLTIP
658  label->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input image(s)</p></body></html>", 0, QApplication::UnicodeUTF8));
659 #endif // QT_NO_TOOLTIP
660  label->setText(QApplication::translate("MainWindow", "Input image(s)", 0, QApplication::UnicodeUTF8));
661  toolButton->setText(QApplication::translate("MainWindow", "clear", 0, QApplication::UnicodeUTF8));
662  tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
663 #ifndef QT_NO_TOOLTIP
664  label_9->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output resolution in x and y distance measure (e.g., meter). Leave empty to read from input data</p></body></html>", 0, QApplication::UnicodeUTF8));
665 #endif // QT_NO_TOOLTIP
666  label_9->setText(QApplication::translate("MainWindow", "Output resolution", 0, QApplication::UnicodeUTF8));
667  groupBox->setTitle(QApplication::translate("MainWindow", "Scale data", 0, QApplication::UnicodeUTF8));
668 #ifndef QT_NO_TOOLTIP
669  autoscale->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Auto scale input data from to (e.g., use from=0 and to=255 for Byte type image)</p></body></html>", 0, QApplication::UnicodeUTF8));
670 #endif // QT_NO_TOOLTIP
671  autoscale->setText(QApplication::translate("MainWindow", "autoscale", 0, QApplication::UnicodeUTF8));
672 #ifndef QT_NO_TOOLTIP
673  manual->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Manually scale data using scale and offset: output=scale*input+offset</p></body></html>", 0, QApplication::UnicodeUTF8));
674 #endif // QT_NO_TOOLTIP
675  manual->setText(QApplication::translate("MainWindow", "manual", 0, QApplication::UnicodeUTF8));
676  label_21->setText(QApplication::translate("MainWindow", "offset", 0, QApplication::UnicodeUTF8));
677  label_20->setText(QApplication::translate("MainWindow", "scale", 0, QApplication::UnicodeUTF8));
678 #ifndef QT_NO_TOOLTIP
679  noscale->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Do not scale the data</p></body></html>", 0, QApplication::UnicodeUTF8));
680 #endif // QT_NO_TOOLTIP
681  noscale->setText(QApplication::translate("MainWindow", "no scaling", 0, QApplication::UnicodeUTF8));
682  label_10->setText(QApplication::translate("MainWindow", "from", 0, QApplication::UnicodeUTF8));
683  label_11->setText(QApplication::translate("MainWindow", "to", 0, QApplication::UnicodeUTF8));
684  label_15->setText(QApplication::translate("MainWindow", "dx", 0, QApplication::UnicodeUTF8));
685  label_18->setText(QApplication::translate("MainWindow", "dy", 0, QApplication::UnicodeUTF8));
686  label_17->setText(QApplication::translate("MainWindow", "Resample method", 0, QApplication::UnicodeUTF8));
687  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Scaling", 0, QApplication::UnicodeUTF8));
688  label_6->setText(QApplication::translate("MainWindow", "Output data type", 0, QApplication::UnicodeUTF8));
689 #ifndef QT_NO_TOOLTIP
690  label_5->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Assign projection (e.g., epsg:3035). Notice this will not re-project the image. Use gdalwarp instead.</p></body></html>", 0, QApplication::UnicodeUTF8));
691 #endif // QT_NO_TOOLTIP
692  label_5->setText(QApplication::translate("MainWindow", "Assign projection (EPSG:code)", 0, QApplication::UnicodeUTF8));
693  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
694 #ifndef QT_NO_TOOLTIP
695  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Output raster image</p></body></html>", 0, QApplication::UnicodeUTF8));
696 #endif // QT_NO_TOOLTIP
697  label_3->setText(QApplication::translate("MainWindow", "Output image", 0, QApplication::UnicodeUTF8));
698  toolButton_ct->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
699  tiled->setText(QApplication::translate("MainWindow", "Tiled", 0, QApplication::UnicodeUTF8));
700  label_13->setText(QApplication::translate("MainWindow", "compressed", 0, QApplication::UnicodeUTF8));
701  label_7->setText(QApplication::translate("MainWindow", "Output image format", 0, QApplication::UnicodeUTF8));
702 #ifndef QT_NO_TOOLTIP
703  label_14->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Nodata value to put in image if out of bounds</p></body></html>", 0, QApplication::UnicodeUTF8));
704 #endif // QT_NO_TOOLTIP
705  label_14->setText(QApplication::translate("MainWindow", "Output nodata value", 0, QApplication::UnicodeUTF8));
706  label_12->setText(QApplication::translate("MainWindow", "Interleaved", 0, QApplication::UnicodeUTF8));
707 #ifndef QT_NO_TOOLTIP
708  label_8->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Color table must be provided as ASCII text file with five (space delimited) columns:</p><p>value red green blue alpha</p></body></html>", 0, QApplication::UnicodeUTF8));
709 #endif // QT_NO_TOOLTIP
710  label_8->setText(QApplication::translate("MainWindow", "Color table (ASCII)", 0, QApplication::UnicodeUTF8));
711  tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
712  label_24->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
713  label_25->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
714  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
715  toolButton_Run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
716  toolButton_defaults->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
717  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
718  } // retranslateUi
719 
720 };
721 
722 namespace Ui {
723  class MainWindow: public Ui_MainWindow {};
724 } // namespace Ui
725 
726 QT_END_NAMESPACE
727 
728 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm-members.html0000644000113200011300000001720412647637662021434 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pksvm.pksvm Member List

This is the complete list of members for qgis.pksvm.pksvm, including all inherited members.

cliName (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvm
COST (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
defineCharacteristics (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvm
EXTRA (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
GAMMA (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
group (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvm
INPUT (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
ITERATE (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
LABEL (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
MASK (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
MSKNODATA (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
name (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvm
OUTPUT (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
processAlgorithm (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvm
TRAINING (defined in qgis.pksvm.pksvm)qgis.pksvm.pksvmstatic
pktools-2.6.6/doc/html/ImgReaderGdal_8h_source.html0000644000113200011300000013341012647637662017155 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgReaderGdal.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgReaderGdal.h
1 /**********************************************************************
2 ImgReaderGdal.h: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGREADERGDAL_H_
21 #define _IMGREADERGDAL_H_
22 
23 #include "ImgRasterGdal.h"
24 #include <assert.h>
25 #include <fstream>
26 #include <string>
27 #include <sstream>
28 #include "gdal_priv.h"
29 #include "base/Vector2d.h"
30 
31 //--------------------------------------------------------------------------
32 class ImgReaderGdal : public virtual ImgRasterGdal
33 {
34 public:
35  ImgReaderGdal(void);
36  ImgReaderGdal(const std::string& filename, const GDALAccess& readMode=GA_ReadOnly){open(filename, readMode);};
37  ~ImgReaderGdal(void);
38  void open(const std::string& filename, const GDALAccess& readMode=GA_ReadOnly);
39  void close(void);
40 
41  void setScale(double theScale, int band=0){
42  /* if(getRasterBand(band)->SetScale(theScale)==CE_Failure){ */
43  if(m_scale.size()!=nrOfBand()){//initialize
44  m_scale.resize(nrOfBand());
45  for(int iband=0;iband<nrOfBand();++iband)
46  m_scale[iband]=1.0;
47  }
48  m_scale[band]=theScale;
49  /* }; */
50  }
51  void setOffset(double theOffset, int band=0){
52  /* if(getRasterBand(band)->SetOffset(theOffset)==CE_Failure){ */
53  if(m_offset.size()!=nrOfBand()){
54  m_offset.resize(nrOfBand());
55  for(int iband=0;iband<nrOfBand();++iband)
56  m_offset[iband]=0.0;
57  }
58  m_offset[band]=theOffset;
59  /* }; */
60  }
61  template<typename T> void readData(T& value, const GDALDataType& dataType, int col, int row, int band=0) const;
62  template<typename T> void readData(std::vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int row, int band=0) const;
63  template<typename T> void readData(std::vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, double row, int band=0, RESAMPLE resample=NEAR) const;
64  template<typename T> void readDataBlock(Vector2d<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band=0) const;
65  template<typename T> void readDataBlock(std::vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band=0) const;
66  template<typename T> void readData(std::vector<T>& buffer, const GDALDataType& dataType, int row, int band=0) const;
67  template<typename T> void readData(std::vector<T>& buffer, const GDALDataType& dataType, double row, int band=0, RESAMPLE resample=NEAR) const;
68  void getMinMax(int startCol, int endCol, int startRow, int endRow, int band, double& minValue, double& maxValue) const;
69  void getMinMax(double& minValue, double& maxValue, int band=0) const;
70  double getMin(int& col, int& row, int band=0) const;
71  double getHistogram(std::vector<double>& histvector, double& min, double& max,unsigned int& nbin, int theBand=0, bool kde=false);
72  double getMax(int& col, int& row, int band=0) const;
73  void getRefPix(double& refX, double &refY, int band=0) const;
74  void getRange(std::vector<short>& range, int Band=0) const;
75  unsigned long int getNvalid(int band) const;
76 
77 protected:
78  void setCodec(const GDALAccess& readMode=GA_ReadOnly);
79 
80  std::vector<double> m_scale;
81  std::vector<double> m_offset;
82 };
83 
84 // adfGeoTransform[0] /* top left x */
85 // adfGeoTransform[1] /* w-e pixel resolution */
86 // adfGeoTransform[2] /* rotation, 0 if image is "north up" */
87 // adfGeoTransform[3] /* top left y */
88 // adfGeoTransform[4] /* rotation, 0 if image is "north up" */
89 // adfGeoTransform[5] /* n-s pixel resolution */
90 
91 template<typename T> void ImgReaderGdal::readData(T& value, const GDALDataType& dataType, int col, int row, int band) const
92 {
93  //fetch raster band
94  GDALRasterBand *poBand;
95  assert(band<nrOfBand()+1);
96  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
97  assert(col<nrOfCol());
98  assert(col>=0);
99  assert(row<nrOfRow());
100  assert(row>=0);
101  poBand->RasterIO(GF_Read,col,row,1,1,&value,1,1,dataType,0,0);
102  if(m_scale.size()>band)
103  value=static_cast<double>(value)*m_scale[band];
104  if(m_offset.size()>band)
105  value=static_cast<double>(value)+m_offset[band];
106 }
107 
108 template<typename T> void ImgReaderGdal::readData(std::vector<T>& buffer, const GDALDataType& dataType, int minCol, int maxCol, int row, int band) const
109 {
110  //fetch raster band
111  GDALRasterBand *poBand;
112  assert(band<nrOfBand()+1);
113  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
114  assert(minCol<nrOfCol());
115  assert(minCol>=0);
116  assert(maxCol<nrOfCol());
117  assert(minCol<=maxCol);
118  assert(row<nrOfRow());
119  assert(row>=0);
120  if(buffer.size()!=maxCol-minCol+1)
121  buffer.resize(maxCol-minCol+1);
122  poBand->RasterIO(GF_Read,minCol,row,buffer.size(),1,&(buffer[0]),buffer.size(),1,dataType,0,0);
123  if(m_scale.size()>band||m_offset.size()>band){
124  double theScale=1;
125  double theOffset=0;
126  if(m_scale.size()>band)
127  theScale=m_scale[band];
128  if(m_offset.size()>band)
129  theOffset=m_offset[band];
130  for(int index=0;index<buffer.size();++index)
131  buffer[index]=theScale*static_cast<double>(buffer[index])+theOffset;
132  }
133 }
134 
135 template<typename T> void ImgReaderGdal::readData(std::vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, double row, int band, RESAMPLE resample) const
136 {
137  //todo: make upper and lower row depend on isGeo...
138  std::vector<T> readBuffer_upper;
139  std::vector<T> readBuffer_lower;
140  if(buffer.size()!=maxCol-minCol+1)
141  buffer.resize(maxCol-minCol+1);
142  double upperRow=row-0.5;
143  upperRow=static_cast<int>(upperRow);
144  double lowerRow=row+0.5;
145  lowerRow=static_cast<int>(lowerRow);
146  switch(resample){
147  case(BILINEAR):
148  if(lowerRow>=nrOfRow())
149  lowerRow=nrOfRow()-1;
150  if(upperRow<0)
151  upperRow=0;
152  readData(readBuffer_upper,GDT_Float64,minCol,maxCol,static_cast<int>(upperRow),band);
153  readData(readBuffer_lower,GDT_Float64,minCol,maxCol,static_cast<int>(lowerRow),band);
154  //do interpolation in y
155  for(int icol=0;icol<maxCol-minCol+1;++icol){
156  buffer[icol]=(lowerRow-row+0.5)*readBuffer_upper[icol]+(1-lowerRow+row-0.5)*readBuffer_lower[icol];
157  }
158  break;
159  default:
160  readData(buffer,GDT_Float64,minCol,maxCol,static_cast<int>(row),band);
161  break;
162  }
163 }
164 
165 template<typename T> void ImgReaderGdal::readDataBlock(Vector2d<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band) const
166 {
167  buffer.resize(maxRow-minRow+1);
168  for(int irow=minRow;irow<=maxRow;++irow){
169  buffer[irow-minRow].resize(maxCol-minCol+1);
170  readData(buffer[irow-minRow],dataType,minCol,maxCol,irow,band);
171  }
172 }
173 
174 template<typename T> void ImgReaderGdal::readDataBlock(std::vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band) const
175 {
176  double theScale=1;
177  double theOffset=0;
178  if(m_scale.size()>band)
179  theScale=m_scale[band];
180  if(m_offset.size()>band)
181  theOffset=m_offset[band];
182  //fetch raster band
183  GDALRasterBand *poBand;
184  assert(band<nrOfBand()+1);
185  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
186  if(minCol>=nrOfCol() ||
187  (minCol<0) ||
188  (maxCol>=nrOfCol()) ||
189  (minCol>maxCol) ||
190  (minRow>=nrOfRow()) ||
191  (minRow<0) ||
192  (maxRow>=nrOfRow()) ||
193  (minRow>maxRow)){
194  std::string errorString="block not within image boundaries";
195  throw(errorString);
196  }
197  /* assert(minCol<nrOfCol()); */
198  /* assert(minCol>=0); */
199  /* assert(maxCol<nrOfCol()); */
200  /* assert(minCol<=maxCol); */
201  /* assert(minRow<nrOfRow()); */
202  /* assert(minRow>=0); */
203  /* assert(maxRow<nrOfRow()); */
204  /* assert(minRow<=maxRow); */
205  if(buffer.size()!=(maxRow-minRow+1)*(maxCol-minCol+1))
206  buffer.resize((maxRow-minRow+1)*(maxCol-minCol+1));
207  poBand->RasterIO(GF_Read,minCol,minRow,maxCol-minCol+1,maxRow-minRow+1,&(buffer[0]),(maxCol-minCol+1),(maxRow-minRow+1),dataType,0,0);
208  if(m_scale.size()>band||m_offset.size()>band){
209  for(int index=0;index<buffer.size();++index)
210  buffer[index]=theScale*buffer[index]+theOffset;
211  }
212 }
213 
214 // template<typename T> void ImgReaderGdal::readDataBlock(vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band) const
215 // {
216 // assert(band<nrOfBand()+1);
217 // assert(minCol<nrOfCol());
218 // assert(minCol>=0);
219 // assert(maxCol<nrOfCol());
220 // assert(minCol<=maxCol);
221 // assert(minRow<nrOfRow());
222 // assert(minRow>=0);
223 // assert(maxRow<nrOfRow());
224 // assert(minRow<=maxRow);
225 // if(buffer.size()!=(maxRow-minRow+1)*(maxCol-minCol+1))
226 // buffer.resize((maxRow-minRow+1)*(maxCol-minCol+1));
227 // //fetch raster band
228 // GDALRasterBand *poBand;
229 // assert(band<nrOfBand()+1);
230 // poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
231 // for(int irow=0;irow<maxRow-minRow+1;++irow)
232 // poBand->RasterIO(GF_Read,minCol,minRow+irow,maxCol-minCol+1,1,&(buffer[irow*(maxCol-minCol+1)]),maxCol-minCol+1,1,dataType,0,0);
233 // }
234 
235 template<typename T> void ImgReaderGdal::readData(std::vector<T>& buffer, const GDALDataType& dataType, int row, int band) const
236 {
237  readData(buffer,dataType,0,nrOfCol()-1,row,band);
238 }
239 
240 template<typename T> void ImgReaderGdal::readData(std::vector<T>& buffer, const GDALDataType& dataType, double row, int band, RESAMPLE resample) const
241 {
242  readData(buffer,dataType,0,nrOfCol()-1,row,band,resample);
243 }
244 
245 
246 #endif // _IMGREADERGDAL_H_
247 
248 // //fetch raster band
249 // GDALRasterBand *poBand;
250 // assert(band<nrOfBand()+1);
251 // poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
252 // buffer.resize(maxCol-minCol+1);
253 // assert(minCol<nrOfCol());
254 // assert(row<nrOfRow());
255 // poBand->RasterIO(GF_Read,minCol,row,buffer.size(),1,&(buffer[0]),buffer.size(),1,GDT_Int16,0,0);
pktools-2.6.6/doc/html/md_examples_pksieve.html0000644000113200011300000000534212647637662016575 00000000000000 pktools: examples_pksieve
pktools  2.6.6
Processing Kernel for geospatial data
examples_pksieve

Examples of pksieve

pksieve -i input.tif -c 8 -s 5 -o ouput.shp

merge all patches smaller than 5 pixels into bigger classes, using 8 connectivity (horizontal, vertical and diagonal)

pktools-2.6.6/doc/html/classSolver__coll__graph.md50000644000113200011300000000004012616110566017231 00000000000000262789c6a3eb0d883423648adb1331a6pktools-2.6.6/doc/html/inherit_graph_20.png0000644000113200011300000000321412616110570015465 00000000000000‰PNG  IHDRÓ%ØÌÜÝbKGDÿÿÿ ½§“AIDATxœíÜ]HSÿð÷qΖԖù0̇¨-˜c„t']EaÝT*a‚V$Aö@ ^ö] Ú¬1˜³@ì"’ô¢ˆ]É8hs®¢Vn¶ÍŒùù]üÿ¶y¶|8óa~^0ð{¾žÏÎ÷=?ììxT "cl¥ìYk}Œe n&ÆÂÍĘB¸™SH¶Üƾ¾>tvv®ö±0¶îi4´··£¼¼|Áœl3õööâÓ§O¨ªªJûÁ1¶‘Øív444,¾™ ªª ½½½i=0Æ6A’Îñg&ÆÂÍĘB¸™S7c Q¤™ÆÇÇS~0Ët«µ~A0>>ž–º±­[·âàÁƒp:Š?W:¬—Ÿ?EšiÇŽ¸qㆥ6¤LXÿû÷ïáõzáõz!Š"öíÛ‡ºº:l„û ×Kþ‚Ü]ãµµµÀ—Æ×Aàr¹`4Ó^÷ÇÐëõ˜œœDQQ‘¢Ï·‘ ‚›Í&õH eîO|›OŸ>EEE q÷î]twwcÏž=Ðéthmm:::`6›¡Õjqøða¼|ùR:oÞ¼Ayy9Þ½{‡H$‚––èõz¡¥¥‘HD±:000€ýû÷C£Ñ`ïÞ½èîî–Ö•l.qýÓÓÓhllDAAJKKqíÚ5üýûWʦ§§عs'îß¿Ÿ4Ǿ(‘s2jµ999ÐétÒ¶LÏÅHFMM ÕÔÔÈMÉr¹\[ 9s†uuuª­­¥@ @€~ýúEV«•JJJèÕ«WôóçO$£ÑH¤šÇ§¡¡! …BtïÞ=:uê}ýú•DQ¤ÐÍ›7« …hË–-ÔÑÑA^¯—ž©Õjzøð!ùý~𛛣`0HÑh4å\ìúÃá0©T*•ê¿xñ‚ŒF£”Íððð‚,C®™Všó|ÄǶmÛèÇqûlöüç÷OÖLi»4¾}ûvÿ;]€Ûí†Åb‰ÛÏl6ÇM&“ôõçÏŸQ\\,]u:zô(<buòòò0<< ‡ÃÒÒR:toß¾EVVVʹX“““ˆF£0 Ò6£Ñˆoß¾Iã]»v-Èb¹”ÊÙårˆ@D˜™™Ass3Î;÷=œjkú{¦Ý»wcll,nÛÇãÆ± .((ˆ{Ñý~?‡bufgg177»ÝŸÏ‡óçÏãĉðù|)çbéõz¨T*LLLHÛÜn7JJJ¤qâ@º-&ŸX¹¹¹hllÄØØXÜÕ<Î?µ5m¦Ë—/ãúõëxýú5¦¦¦044„¶¶¶¤ŒOž<‰[·náË—/EÕÕÕhooW¬Ž 8vìž?Ž@ €p8 µZÜÜÜ”s±Ôj5êêêpåÊx<ŒŽŽâÎ;¨¯¯ÿg¿ÿFWWWÒñr-5Ðjµƒ…BÒ¶LÏÅäNþ”øÌ”xn/7ŽF£ôèÑ#2 ¤Ó騺ºšúûû©°°pAM"¢@ @MMM”——GùùùtñâEš™™Q¬‘Íf#ƒÁ@999d2™¨¿¿_Ú/Ù\âsø|>jhh üü|*..¦«W¯Òììì?³I¬³Ü\—’³Ü~DDÑh”´Z-y<žM“ÿb Ý –k``€œNgܶ¾¾>ª¬¬\“:™*Ýùl¦üS5Óšžæ‰¢ˆ³gÏbddþüÃá@kk+.\¸°&u2UºóáüÿO®ÅVë)‰ÐíÛ·©¬¬Œ4 ™ÍfzðàE"‘5©“©ÒÏfÊ)Þ™øv"Æ– í·1Æøï™S 7c áfbL!IÿÕ×ÄÄ?~¼šÇÂØ†&ÛLeee°Ûíhnn^íãal]S©Tq÷ùÅ’½4Î[2¾4ΘR¸™S7c áfbL!ÿæ‹y¹Ô¢IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask__inherit__graph.map0000644000113200011300000000013312616110567026521 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial__coll__graph.md50000644000113200011300000000004012616110566027054 00000000000000bfd647e27b6d070eafc25fff7acac190pktools-2.6.6/doc/html/inherit_graph_5.md50000644000113200011300000000004012616110567015311 000000000000000d50b1bf6d0bd3f74522048e96a7f8a2pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite__inherit__graph.png0000644000113200011300000000737112616110567027461 00000000000000‰PNG  IHDRp~E9DbKGDÿÿÿ ½§“®IDATxœíÝ{P×ð³ 2”G¥„´"Ø^fœNý£T¢”©#Ô ú€ –QZÊ£µ:ÐÛhkal±$òÐ[,+EÔ‹J,ŽHEÑbåiGB4b@ ìÞ?öv›†Â½ «9¿Ï_»'gÏùíš/œÍ Š¢¸2b»ØXƒ¬AÖ8l K?f» gnnþÜsϱ]…ÎTúúú,--MMMÙ.Ä`÷õõAž\NNNvvvlWa°†††ÚÚÚØ®B—à` °Xƒ¬APgg'Aó9Ô'Ÿ|BDff¦®j˜ép‚ :;;ÿçaqЬ»»›ËåêcdŠ¢JJJ–-[VZZª«1/^œ’’‚ôY¶¡‚hF’äýû÷õ1òõë×oÞ¼YPPÐÒÒÒÞÞ®“1¹\.ýûDe*¼@/*++—/_ngg·k×®ññqæQŠ¢===ïÝ»·zõj„ÐÒ¥K釆‡‡·lÙÂårœœ ÅLŒªªª_|ÑÌÌŒÇã1í%%%kÖ¬ñññqss›þK€¢(‘Häîînii¹víÚ'NÐk›ésÑçrîܹeË–>|˜î¦V6B¨¦¦†Ïç[[[gddÐ-A®X±ÂÖÖ633³¨¨ÈÅÅÅÊÊjïÞ½:»ÐOÊ€H$’ÁÁA-:::B¾¾¾ííí |>?--n$I’yö3=™…Báºu뺺ºZ[[W®\™––¦±‘9jttÔÔÔT$ p8œÑÑQŠ¢H’tqq‹ÅE}ôÑGª…Q•——çèèxúôi©TzæÌ>ŸO·Ï4—¿¿mmmKK ÝM­l„Ð믿.—Ë+**Bô©!„ÂÂÂäry~~>B($$D.—‹Åb¦ƒƒƒƒ‰dÎÿ0O0ÐÚÚJï–––òù|º199!tëÖ-ÕžôöÄÄÄ‚ nܸAï;vŒÏçkldŽ’ÉdÆÆÆûöí{ðàI’###J¥’¢¨††‡C?Ï®^½Šº~ýºêt+W®üþû‹‹‹BZæ¢Ï…9|zΟ?OQ”R©DuttÐMMMôy©mÓ´0¼àµ¢1eqssëíí¥·½½½ÓÓÓ§÷T*•®®®ô.ŸÏïííÕØÈbmm-‘HœœœÖ¬YsáÂ###„PIIÉÔÔ—Ë%bÕªU!µUPWW×Ê•+™]ww÷™ `NAûÉ:88 „èÙ‹-B«mcÇÐ?&Bíííôó!TUU%‰JJJ$‰Zÿ%K–,X° »»›ÞíêêrttÔØÈ266F’dYY™L&‹ŠŠÚ°aƒL&S*•¥¥¥YYY#HHH(--¥T¾•êììü믿2»7oÞœ©zûoŸ¸ºz…×Pá€øøøÎÎÎÆÆÆÝ»wGDDÐË—/ÿàƒbcc™ÛÙÑÑQ„±±qhhè®]»zzznܸ±gÏ¡P¨±‘™‚ __ßŠŠ ¹\>11alllnn~áÂ…¡¡!¡P¸ðáááô ž—œœ\SSsÿþýÚÚÚ´´4‚ ´Ï5]6˜¶×`º4Ë{€üü|ggg.—»sçα±1ÕuóØØØóÏ?Ÿšš:99ùÊ+¯,\¸n—Éd‘‘‘666öööï½÷ÞØØ˜ÆFÕ¡JKK]]]MLLÜÜÜ*++)ŠŠ‰‰ñõõU­‡$IWW×””æ@¥R™íêêjeeåççWYYikkû·s1Ûje#•e=R¹˜Þ¨¶=ûÀ1óVÏÿ ªªª¥¥…Ù-//÷ôôd±5†—@O²ÖÖÖˆˆˆ¦¦¦Ç744ìÝ»7::ší¢ ™¡}!F;KK˘˜¶«Ð&99ùñãÇR©”ÇãmÛ¶í /øiGPô‡±ÎŸ?ïîîßÓúaÞÞÞl¢3°Xƒ¬AÖ k†ö*ÐðððÔÔÛU,Ã{Ù `jjÚßßÏvspöìm„ϳ,×1fffl— Kõ2èÓE©$ÿñT„Pkë?Œà#kì€{Ö\ºÔ)“=’ÉFëëá{묰¦¬ì ‡cdllTVÖÈv-ø‚°C¡˜¬®¾65¥œœ$««¯)“lW„);jko2Oz…b²¶ö&»õ` ÀŽŠŠ+Ìwµ‚¨¨¸Ân=Ø‚°@.Wœ=Û¦T’ô®RIž=Û&—+´ôÀ‚Ó§¯“ä_^}&Iêßÿ¾ÎV=8ƒ° ¼üŠÚ»/E•—Ã*ˆ€ù&•ŽÔ×w$©ÚH’T}}‡T:ÂVU؂̷'Z4¾ïKĉ׿¿ÌAæÛÑ£WÔnh$IÂ;bó0¯úú´¶Þ™!èÚµ;ýýÃó_Î êÓ O¾{÷F37ô{affÿýënFFF÷î88,f­>üÀ§AÙó/„X¼™íBðK €5À` °Xƒ¬AÖ k€5À` °Xƒ¬AÖ k€5À` °Xƒ¬AÖ k€5À` °Xƒ¬AÖ k€7êIIIlׂ‡ËápÙ®;IIIÌÓþÏÿ#ìöíÛîîîÁÁÁ,V€¾•••ݾ}›ÙýË’gggçíí=Ï0Ÿ~þùgÕ]¸Xƒ¬AÖ kú @__Ÿ@ `ëð'³}xr.”¾é©<}`áÂ…aaaºs```ãÆºóiÇ\gƒ¿8z:S}ÀÊÊjûöíº“$I¹\®Û1ŸvÌu6ø‹£§3[(ŠúñÇ7oÞ¼~ýú¸¸¸ææf@@QÔO?ý´eË–€€€„„„K—. Õ_XõõõQQQ¾¾¾ááá555jcÒ=/^¼ôÍ7ßLNNªÎ˜››ýðáÃwÞy!ôÆoÐŽŽfffnܸ188877wbbb¦F†®*Q*•‡ ÌÈÈÕR’@ 8uêÔæÍ›‹‹‹kjj µLªq¨éõ3×YíâLMM‰D¢      ‘H455…ç™þ­¹ ººú»ï¾‹ŽŽ.**zë­·222B'Ož,**Š‹‹+.. …P=D¡P¤¥¥–””DFF~ñÅ …búÈÇÏÈÈHOOÿå—_Š‹‹éFŠ¢ÄbqSSSVV–••Õ·ß~‹:vìýèþýû¥R©H$úüóÏøá‡™u^Iyyy]]]FFFvvö;wŽ9¢¥$„ÐÕ«Wsss·oßž——wéÒ¥‚‚‚;v1?ɦO:}(íõ«]œòòò±XüÕW_555:tç3Õbn¨¨¨ˆõòò²±±yùå—£££™Æ—^zÉÊÊjÕªU[·nU=drr’¢¨±±1??¿ªª*SSÓé#ïØ±ÃÉÉiÅŠÑÑÑgΜ¡<44ÔÜÜÜ××!nnnîçç‡Ñ8©Æ¡fY?íÔ©Sñññvvv</&&æòåË8Ÿ©s ÀÀÀŸÏgvy<B¨¿¿ßÅÅ…i|öÙgUY´hQvvv[[[ppð»ï¾ÛÚÚJÄô‘œœèeË–I¥RzûÖ­[žžžÌOU< IÒÁÁÞutt”J¥õQÉàà ÓÍÙÙÙËËk¦’èmsss„‡ÃQÛžiRCͲ~ÚÝ»w7mÚ$AbbâÀÀÎgªÅÜÀår»ºº˜]úCEK–,éééaÿýwÕCÆÇÇI’LKK«ªªZ¿~ýîÝ»™ªz{{é;wîØØØÐÛééé µµµÍÍÍjý­­­ŒŒ˜³íïïçr¹õQ‰ÍÝ»wé‡:;;é§‹öÙµS›TãP³¬ŸfeeuäȉD"‘Hªªªèe¶gªÅÜàï›{ñâE™Lvùòåƒ"„Åbñ•+WäryssóáÇUóJDRRR]]Ý£G&''9ý묺ºúÑ£GL·œœœ¾¾¾ß~û-??ÿµ×^£ÍÌÌžyæ™ððð¬¬,ævvll !ÄápÁ×_=00ÐÓÓSPPàã㣱Q•øúúæçç÷ôôôôôìß¿ppp¦’fyaÕ&Õ8ÔLõ«¢/BÈËË+//opp°»»;99ùøñãXéìqþ¾‹ŠÐÐP¥RyàÀááazÉõé§Ÿ*•Êììì‡zxxÄÆÆ~ùå—Ì!&&&~ø¡X,rppHMM511AíÛ·ÏÓÓÓ‚îæããóþûï+ŠuëÖ …BÕ¥Kxxø¹s犋‹###_xá…M›6>ÞÖÖVXXðÿ À<˜ÛH£7ß|S¡PìÙ³gxxØÞÞÞß߯ ³?ÜÂÂbNýõ‡•J`Rvý_K ž:º_ðô‚¬AÖ kyèÚµk‰‰‰l•À<èîîV}ßúÏÀŸÄ8àñx!!!ÌîŸ/ƒ€!¸Xƒ¬AÖ kÿúùÛ¯­`SIEND®B`‚pktools-2.6.6/doc/html/classCostFactoryANN-members.html0000644000113200011300000002511212647637662020021 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
CostFactoryANN Member List

This is the complete list of members for CostFactoryANN, including all inherited members.

CostFactory(void) (defined in CostFactory)CostFactoryinline
CostFactory(unsigned short cv, short verbose) (defined in CostFactory)CostFactoryinline
CostFactoryANN() (defined in CostFactoryANN)CostFactoryANN
CostFactoryANN(const std::vector< unsigned int > &nneuron, float connection, const std::vector< float > weights, float learning, unsigned int maxit, unsigned short cv, bool verbose) (defined in CostFactoryANN)CostFactoryANN
getClassIndex(std::string classname) const (defined in CostFactory)CostFactoryinline
getClassValueMap() (defined in CostFactory)CostFactoryinline
getCost(const std::vector< Vector2d< float > > &trainingFeatures) (defined in CostFactoryANN)CostFactoryANNvirtual
getNameVector() (defined in CostFactory)CostFactoryinline
m_classvalue (defined in CostFactory)CostFactoryprotected
m_classValueMap (defined in CostFactory)CostFactoryprotected
m_cm (defined in CostFactory)CostFactoryprotected
m_cv (defined in CostFactory)CostFactoryprotected
m_nameVector (defined in CostFactory)CostFactoryprotected
m_nctest (defined in CostFactory)CostFactoryprotected
m_nctraining (defined in CostFactory)CostFactoryprotected
m_verbose (defined in CostFactory)CostFactoryprotected
pushBackClassName(std::string classname) (defined in CostFactory)CostFactoryinline
pushBackName(std::string classname) (defined in CostFactory)CostFactoryinline
setClassValueMap(const std::string &classname, short classvalue) (defined in CostFactory)CostFactoryinline
setCv(unsigned short cv) (defined in CostFactory)CostFactoryinline
setNameVector(std::vector< std::string > &nameVector) (defined in CostFactory)CostFactoryinline
setNcTest(const std::vector< unsigned int > nctest) (defined in CostFactory)CostFactoryinline
setNcTraining(const std::vector< unsigned int > nctraining) (defined in CostFactory)CostFactoryinline
~CostFactory(void) (defined in CostFactory)CostFactoryinlinevirtual
~CostFactoryANN() (defined in CostFactoryANN)CostFactoryANN
pktools-2.6.6/doc/html/classVector2d.html0000644000113200011300000003673112647637662015275 00000000000000 pktools: Vector2d< T > Class Template Reference
pktools  2.6.6
Processing Kernel for geospatial data
Vector2d< T > Class Template Reference
Inheritance diagram for Vector2d< T >:
Collaboration diagram for Vector2d< T >:

Public Member Functions

 Vector2d (const Vector2d< T > &v1)
 
 Vector2d (int nrow)
 
 Vector2d (int nrow, int ncol)
 
 Vector2d (int nrow, int ncol, const T &value)
 
 Vector2d (const gsl_matrix *gsl_m)
 
void resize (int nrow)
 
void resize (int nrow, int ncol)
 
int nRows () const
 
int nCols () const
 
void selectCol (int col, std::vector< T > &output) const
 
void selectCol (int col, T *output) const
 
std::vector< T > selectCol (int col)
 
void selectCols (const std::list< int > &cols, Vector2d< T > &output) const
 
void setMask (const Vector2d< T > &mask, T msknodata, T nodata=0)
 
void transpose (Vector2d< T > &output) const
 
void selectCols (const std::list< int > &cols)
 
void sort (Vector2d< T > &output)
 
void scale (const std::vector< double > &scaleVector, const std::vector< double > &offsetVector, Vector2d< T > &scaledOutput)
 
void scale (const T lbound, const T ubound, std::vector< double > &scaleVector, std::vector< double > &offsetVector, Vector2d< T > &scaledOutput)
 
Vector2d< T > operator= (const Vector2d< T > &v1)
 
Vector2d< T > operator+= (const Vector2d< T > &v1)
 
Vector2d< T > sum (const Vector2d< T > &v1, const Vector2d< T > &v2) const
 
mymax (int &x, int &y, double maxValue) const
 
sum () const
 

Friends

template<class T1 >
std::ostream & operator<< (std::ostream &os, const Vector2d< T1 > &v)
 

Detailed Description

template<class T>
class Vector2d< T >

Definition at line 31 of file Vector2d.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_30.md50000644000113200011300000000004012647437044015375 000000000000009954b2c568caef583bc28869e631b0ddpktools-2.6.6/doc/html/classSolver__NU-members.html0000644000113200011300000002570612647637662017250 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Solver_NU Member List

This is the complete list of members for Solver_NU, including all inherited members.

active_set (defined in Solver)Solverprotected
active_size (defined in Solver)Solverprotected
alpha (defined in Solver)Solverprotected
alpha_status (defined in Solver)Solverprotected
Cn (defined in Solver)Solverprotected
Cp (defined in Solver)Solverprotected
eps (defined in Solver)Solverprotected
FREE enum value (defined in Solver)Solverprotected
G (defined in Solver)Solverprotected
G_bar (defined in Solver)Solverprotected
get_C(int i) (defined in Solver)Solverinlineprotected
is_free(int i) (defined in Solver)Solverinlineprotected
is_lower_bound(int i) (defined in Solver)Solverinlineprotected
is_upper_bound(int i) (defined in Solver)Solverinlineprotected
l (defined in Solver)Solverprotected
LOWER_BOUND enum value (defined in Solver)Solverprotected
p (defined in Solver)Solverprotected
Q (defined in Solver)Solverprotected
QD (defined in Solver)Solverprotected
reconstruct_gradient() (defined in Solver)Solverprotected
Solve(int l, const QMatrix &Q, const double *p, const schar *y, double *alpha, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking, bool verbose=false) (defined in Solver_NU)Solver_NUinline
Solver() (defined in Solver)Solverinline
Solver_NU() (defined in Solver_NU)Solver_NUinline
swap_index(int i, int j) (defined in Solver)Solverprotected
unshrink (defined in Solver)Solverprotected
update_alpha_status(int i) (defined in Solver)Solverinlineprotected
UPPER_BOUND enum value (defined in Solver)Solverprotected
y (defined in Solver)Solverprotected
~Solver() (defined in Solver)Solverinlinevirtual
pktools-2.6.6/doc/html/classCompare__PosValue.html0000644000113200011300000001005312647637662017135 00000000000000 pktools: Compare_PosValue Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Compare_PosValue Class Reference

Public Member Functions

int operator() (const PosValue &pv1, const PosValue &pv2) const
 

Detailed Description

Definition at line 28 of file PosValue.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite__inherit__graph.md50000644000113200011300000000004012616110566027343 000000000000002da4461a4e6b277d95fe960fcbe8e840pktools-2.6.6/doc/html/inherit_graph_9.md50000644000113200011300000000004012616110567015315 000000000000009f2f1fd6246cfc788f69061dc3962600pktools-2.6.6/doc/html/classstatfactory_1_1StatFactory.html0000644000113200011300000013574012647637662020774 00000000000000 pktools: statfactory::StatFactory Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Public Types

enum  INTERPOLATION_TYPE {
  undefined =0, linear =1, polynomial =2, cspline =3,
  cspline_periodic =4, akima =5, akima_periodic =6
}
 
enum  DISTRIBUTION_TYPE { uniform =1, gaussian =2 }
 

Public Member Functions

INTERPOLATION_TYPE getInterpolationType (const std::string interpolationType)
 
DISTRIBUTION_TYPE getDistributionType (const std::string distributionType)
 
void getNodataValues (std::vector< double > &nodatav) const
 
bool isNoData (double value) const
 
unsigned int pushNodDataValue (double noDataValue)
 
unsigned int setNoDataValues (std::vector< double > vnodata)
 
double getRandomValue (const gsl_rng *r, const std::string type, double a=0, double b=1) const
 
template<class T >
mymin (const typename std::vector< T > &v) const
 
template<class T >
mymax (const typename std::vector< T > &v) const
 
template<class T >
mymin (const typename std::vector< T > &v, T minConstraint) const
 
template<class T >
mymax (const typename std::vector< T > &v, T maxConstraint) const
 
template<class T >
std::vector< T >::const_iterator mymin (const typename std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const
 
template<class T >
std::vector< T >::iterator mymin (const typename std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end) const
 
template<class T >
std::vector< T >::const_iterator mymin (const typename std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T minConstraint) const
 
template<class T >
std::vector< T >::iterator mymin (const typename std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end, T minConstraint) const
 
template<class T >
std::vector< T >::const_iterator mymax (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const
 
template<class T >
std::vector< T >::iterator mymax (const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end) const
 
template<class T >
std::vector< T >::const_iterator mymax (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T maxConstraint) const
 
template<class T >
std::vector< T >::iterator mymax (const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end, T maxConstraint) const
 
template<class T >
std::vector< T >::const_iterator absmin (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const
 
template<class T >
std::vector< T >::const_iterator absmax (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const
 
template<class T >
void minmax (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T &theMin, T &theMax) const
 
template<class T >
sum (const std::vector< T > &v) const
 
template<class T >
double mean (const std::vector< T > &v) const
 
template<class T >
void eraseNoData (std::vector< T > &v) const
 
template<class T >
unsigned int nvalid (const std::vector< T > &v) const
 
template<class T >
median (const std::vector< T > &v) const
 
template<class T >
double var (const std::vector< T > &v) const
 
template<class T >
double moment (const std::vector< T > &v, int n) const
 
template<class T >
double cmoment (const std::vector< T > &v, int n) const
 
template<class T >
double skewness (const std::vector< T > &v) const
 
template<class T >
double kurtosis (const std::vector< T > &v) const
 
template<class T >
void meanVar (const std::vector< T > &v, double &m1, double &v1) const
 
template<class T1 , class T2 >
void scale2byte (const std::vector< T1 > &input, std::vector< T2 > &output, unsigned char lbound=0, unsigned char ubound=255) const
 
template<class T >
void distribution (const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, std::vector< double > &output, int nbin, T &minimum, T &maximum, double sigma=0, const std::string &filename="") const
 
template<class T >
void distribution (const std::vector< T > &input, std::vector< double > &output, int nbin, double sigma=0, const std::string &filename="") const
 
template<class T >
void distribution2d (const std::vector< T > &inputX, const std::vector< T > &inputY, std::vector< std::vector< double > > &output, int nbin, T &minX, T &maxX, T &minY, T &maxY, double sigma=0, const std::string &filename="") const
 
template<class T >
void cumulative (const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, std::vector< int > &output, int nbin, T &minimum, T &maximum) const
 
template<class T >
void percentiles (const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, std::vector< T > &output, int nbin, T &minimum, T &maximum, const std::string &filename="") const
 
template<class T >
percentile (const std::vector< T > &input, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, double percent, T minimum=0, T maximum=0) const
 
template<class T >
void signature (const std::vector< T > &input, double &k, double &alpha, double &beta, double e) const
 
void signature (double m1, double m2, double &k, double &alpha, double &beta, double e) const
 
template<class T >
void normalize (const std::vector< T > &input, std::vector< double > &output) const
 
template<class T >
void normalize_pct (std::vector< T > &input) const
 
template<class T >
double rmse (const std::vector< T > &x, const std::vector< T > &y) const
 
template<class T >
double nrmse (const std::vector< T > &x, const std::vector< T > &y) const
 
template<class T >
double cvrmse (const std::vector< T > &x, const std::vector< T > &y) const
 
template<class T >
double correlation (const std::vector< T > &x, const std::vector< T > &y, int delay=0) const
 
template<class T >
double gsl_covariance (const std::vector< T > &x, const std::vector< T > &y) const
 
template<class T >
double cross_correlation (const std::vector< T > &x, const std::vector< T > &y, int maxdelay, std::vector< T > &z) const
 
template<class T >
double linear_regression (const std::vector< T > &x, const std::vector< T > &y, double &c0, double &c1) const
 
template<class T >
double linear_regression_err (const std::vector< T > &x, const std::vector< T > &y, double &c0, double &c1) const
 
template<class T >
void interpolateNoData (const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::string &type, std::vector< T > &output, bool verbose=false) const
 
template<class T >
void interpolateUp (const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::vector< double > &wavelengthOut, const std::string &type, std::vector< T > &output, bool verbose=false) const
 
template<class T >
void interpolateUp (const std::vector< double > &wavelengthIn, const std::vector< std::vector< T > > &input, const std::vector< double > &wavelengthOut, const std::string &type, std::vector< std::vector< T > > &output, bool verbose=false) const
 
template<class T >
void interpolateUp (const std::vector< T > &input, std::vector< T > &output, int nbin) const
 
template<class T >
void nearUp (const std::vector< T > &input, std::vector< T > &output) const
 
template<class T >
void interpolateUp (double *input, int dim, std::vector< T > &output, int nbin)
 
template<class T >
void interpolateDown (const std::vector< T > &input, std::vector< T > &output, int nbin) const
 
template<class T >
void interpolateDown (double *input, int dim, std::vector< T > &output, int nbin)
 
template<class T >
std::vector< T >::const_iterator mymin (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end) const
 
template<class T >
std::vector< T >::iterator mymin (const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end) const
 
template<class T >
std::vector< T >::const_iterator mymin (const std::vector< T > &v, typename std::vector< T >::const_iterator begin, typename std::vector< T >::const_iterator end, T minConstraint) const
 
template<class T >
std::vector< T >::iterator mymin (const std::vector< T > &v, typename std::vector< T >::iterator begin, typename std::vector< T >::iterator end, T minConstraint) const
 
template<class T >
mymin (const std::vector< T > &v) const
 
template<class T >
mymin (const std::vector< T > &v, T minConstraint) const
 
template<class T >
mymax (const std::vector< T > &v) const
 
template<class T >
mymax (const std::vector< T > &v, T maxConstraint) const
 

Static Public Member Functions

static void allocAcc (gsl_interp_accel *&acc)
 
static void getSpline (const std::string type, int size, gsl_spline *&spline)
 
static int initSpline (gsl_spline *spline, const double *x, const double *y, int size)
 
static double evalSpline (gsl_spline *spline, double x, gsl_interp_accel *acc)
 
static gsl_rng * getRandomGenerator (unsigned long int theSeed)
 

Detailed Description

Definition at line 43 of file StatFactory.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classUi_1_1MainWindow__coll__graph.png0000644000113200011300000002560012616110567021102 00000000000000‰PNG  IHDR®p‡8K±bKGDÿÿÿ ½§“ IDATxœígXWÇÿ³ŽR¤¨ˆ"BÀF±¾QQT,Ñ ÑD%&ö(jŒ=±$Q£`4šØbLÐØkì½¢‚ˆ *"Št¥·mçý°²Šì.³»„H²¿çá3sν3{æÜsÛ†ˆ:tÔ/VpþéèС :ÃÕQ/Ñ®Žz‰ÎpuÔKxuYØ…  ©TZ—Åêø›iÒ¤ ~ûí7ðxugNL]Ž*LŸ>{öì··w]©ão&77—/_FFFlmmëªØuêqÀÅÅû÷ï¯ëbuüM„††âòåËu^®.ÆÕQ/Ñ®Žz‰ÎpuÔKt†«£^òÎ.Ã0xüø±Êã?Ã0¬õµjÕ ŠSú÷ﯴ¼7a[ÞÔ©Sѹsç*ÇV­Z†a””$?–šš †apùòeµîEÓzýxç — 6ļyóX_ŸœœŒ˜˜˜*ÇòòòpíÚµZ-¯gÏžˆŽŽFYY™üØ… Àáppþüyù±°°0téÒEí{ù¯ò¯0\KKK¬\¹’õõ½{÷ƪ;vìzôèQ«åyyyA$áÎ;€²²2„††âÓO?­b¸áááèÔ© Ô¾—ÿ*ÿ ÃU·‰>|8öïß_%\8xð † Våº'NÀÝ݆††°µµ•ÔÛå1 ƒ]»vÁÅÅæææ X[[ÃÅÅaaa€7nÀÎÎ'NÄÅ‹!‹ÈLŽŽŽIÆÆÆ$ iÖ¬Y´páBâóù”——GÁÁÁäççÇê9VòOn½è­€·ÿׄáÇãÀ "…a‚@ À£GЯ_?xzz"$$D¥¾Æø|~•ã=zô@vv6nß¾˜˜ù: ___œ?aaaèСŒÕÒšš 77·*×µk×ðüùsH$´lÙR~ÎÑÑiiipww‡‘‘nß¾k×®aðàÁpwwǵk×pùòe 0@å}¾+¼ó†Û¬Y³jÃS<ǃÆz»u놢¢"\¿~çÏŸÇ!Cªœ/++ÃG}„9sæ ** 7nT©ÃQü(mllàììŒeË–¡}ûö°°°ôéÓááá8wî\BEº›7o^md$>>€,¶ær¹xòä‰ü\RRš4i‡???=z=‚‡‡zõê…óçÏãÚµk:í-ÆŽ‹ÀÀ@œ8qOŸ>ÅÅ‹1zôh@OOOc½\.þþþ˜4i:uê++«*ç+**  !PVV†%K–ŠŠŠÔ.«gÏž8~ü8z÷î-?Ö¢E ´hÑgΜa=šñ&“'OÆœ9spôèQdeeáÌ™3X¼x1™g1b¦OŸŽ§OŸ"..ß|ó FðóóÃÆѹsgðù|øøø $$ööö°··W».ÿu˜hãŠD" "gggÒ××'úú믫t 4‰q‰ˆ®\¹BhÆ ϯY³†ÌÍÍÉÎÎŽ6nÜHü1YYY)ŒCߌÃßþÏž=€Îž=[¥.S§N%‡CùùùJïE™n±XLÁÁÁäèèHFFFÔµkW —˾|ù’ÆŒCdkkK_~ù%•••‘¬3ÊãñhÙ²eDDTRRB€æÎËê¾É?ãÖùzÜ»wï²è×ñî //¯:_û· :t(¢Î’ÿÝÔ4Q‡ ŒŽ¿‘áê ó¿.TÐQ/Ñ®Žz‰ÎpuÔKêÌpss‹‘•Å@,ÔU‘:ê=½fxøð9D"I•ù·Œã–– qï^¢£SŒÛ·“‘•Uàóñõ׃kÔ!•Ê:Z\®z+úÅb÷ߨÀ±˜ÀåÖ<Úò6"‘|~Í~-!á1vï.Ãð ðàêÚ;¶€»{3¸¹5Cóæ–šV]+´6\‰DŠGžãîÝg¸s'·n%!99 Ãဈä=} âã×H¤T‡cCö02rCyy .°®‹‘‘LLºáåË¿ ¦±–34lG€ââÛ¬eÀĤD¢,”—«ÞêSffýQ\|"Qk).צ¦>(,¼‰¤„µœ¹¹?F€‚‚Ó‹óYÉp8F°¶‡ŠŠ4””D¡¢"Yåõ––îzÊg‰D "ÀÄDnnÍЩS ¸¹5ƒ»»=ÌÍX×_ šM@$'çbÙ²ã>®5ÖåСHxyý€Èȧ` ];;XZ*_"ø&aaI Ü"‚‰‰+™J‚‚Nˆ™¬–ÜÝ»)\½š€¨¨g¬åŒŒd}ƒÄÄçøüóßYÇ“½{·…b,\x#GnÂóç5Ê}ÿý‡¯Â BjêK,Yò\]"0p'>̬výìÙýàëÛ<W¡>‰äu¾¸ÌÌ?~Ë—‡X¬Y9 w̘ÿÁÑÑ \.;ñ F£cÇòÿ33ó±|ù ¸»/ÁüùðèÑsÿ añbÕqpVVFŒØ„éÓw£¬L±X .—‹Û±ªS||:FÞ©T †a`jªÏJ¢¢žáÂ…û€ÜÜ"yüΆèègàó9àñ8X±âk9##ÙJ8"BXØcLºRiÍQ^×®-ab"»7©”þï¿¿¢FoçîÞ }ú´–¢X,H$Åñã1èÕ+ü„ãÇïÊ ’alÚ€Ö­+5Þ·Yºtx<ÍÆ4’âñ8 ú¨ÆÇá0 ôÁ A²Ï‘‘O1aB:uú¿þzeJ_ÇÀ2Ý\ôë×íÛ+_k{øðtïþÂÂ’^5W²ãb±}ú´®±þééy9r3„B ¤RÇ‘‚ƒOˆ¢£SXËFD<…H$X,ÅÍ›žT³P¥~‰§NÅ`åÊš÷†q¹øø¸€Ï—ÕW$’ ´T„yóöãã7«ô¾‹ QU(ÊöÉÝ»—†É“w K—eذá" J¡§ÇCHÈx˜™ªtj<žžÍñÑGk¬¿24ëÒ¥%l¯ôíâr9ðók‡yóü›Š!CÖcðàõ8{ö$©Ò¦N*•bîÜþ Ïåç—b„îzåe«êhÒÄ NN6*ë]PPŠ#6¡  ì oÖ†õ W¯&ÈËæóy¯šÿš ÅUšY™8ÃJöíúI¥„ .á?Bk”íÛ·m•¦½ìaaIèÙ3§OßS(ײ¥>øÀ|~õ•b±DÞ¿øá‡SèÐá;¬\y––ÆØ¹sâ+ÃU<’!•J±jÕp­r@hl¸yy%HK˃¢…ÿ<°víÇ`ááOñTÆ4<þþžpv®n|.ÜG÷î+pî\ˆ¨š·¸èß¿­Ê: …b|úéoHM}YÅ膻ñå  SUš7‘HÂ:ÎϨb@b±ááì¼.ŸÏUèÅ-:‚3g^%ÞÞ. D(£¨¨ ãÆýމCPPPZíš¹sûטÏX*•¢´´Û·ß@E…mÛ6Å/¿Œ†"»är906ÖGllªJ5¡‘á>z”…þý×¢°° “'{Wy(\.cc=ìÚ5Iî%&LðÂ'Ÿt©ñ ãp8X¸p`•c¥¥BÌ»Ÿ~úòòÊ”zj¡P__åaaúô]¸sçY5Dìüð˜šêãàÁ©˜=»¿¼£Æ0 †ƒ;ªŽ 0 ƒU«†ÃϯҽY\.ãÇ{ÁÚºA•ã?ýt;w†½ò²Êß|CC:wn©ôüªU§pâDÌ[M¦ ©”ä½vU¬^}VahTZ*ÄÓ§5ÉFG§V[½&óºOV³×UÔ*H¥‰DŠÑ£UY_ß6*'sÄb)ž?/Ä'ŸlA~~UÏ;}zŠ2 ƒ={&ÁÅ¥êBò9súÁϯÝ-aéÒ!˜6Í+WCHÈu|õÕ^Vô©e¸Ïž½À¨Q[в¥škkSðx,_îÿjÀ™°lÙ‡èСE5Y.—ƒÇ eËF ›<}ª;¶<=›Wys߆Çã gÏ÷ä·ùãëX¿þ‚Ò·["‘Öèq#"žàúõGÕâj@Ö eÓA‹ˆHRøâðx×ìu ×Q"‘¢¤¤#FlFnn±Âk|}[צqÁãq°dÉ`4lhX圹¹¦NõQð»1`à‡†ÁÓ³y5 ÃàÇGÊgÏÚ·oO²‘©-[>Å¡C‘øþûcJë¥ Ö†ûüy!FŒØ›†Øµk’|ˆºuk…±c»á‹/z! àJuDG?CRR6llL«x.‡Á´i>hÐÀ°šLãÆ qìØt,]:\.G¡ÑK¥??ÅÃ`×®%`ñâ#PÖQdMnM†|FiO™ËåÔØA+,,CjjžÂsl½®ªVA,–"++ãÇÿ.ïù¿‰ƒC#¥Ó¯ƒ–-­péÒ\Œç¥ðšI“z¢A¼ùhÔȇG)õš&&úعs"ÜÜšaõêUÂ?¿vX¿~~ýõ*Ö­;¯P^¬ W,–bâĶocãê?òŠþøæ›AJu”– 1cÆnôèáŒ'¾„­mðù\0 `jj€qãº+•eãÇ{aïÞÉ00T3 †zõrQ(»|ù‰W!†êæ¨26SÄ­[OpãF¢Bo È:h·o?U©?6¶z˜ð&²XWõð–¢çþ&R)!"â).^| ð¼Ÿ_»*­’¬cÐ¥‹#ΞGG+…r€ìùLŸÞGÞgóæùá·ß>GXØc„„ÜP*kooS§¾„«kãjç† ñÀüùtçÎÅ©¼¿7ae¸ëÖý{i _-eË–-W›[Œ kkSìßÿ40‘lÖ…Mç(&&Un¤ ƒW15ƒvíšUkÞ*Ù±c¾úª52Ã@éÂeÍ0¬]{¶Æ…;fªœÍЉIUÊ2çpëÖS•/€²Ù=€†aУ‡3¶o~ýÚ(¼ÎÇÇU^G€ >øÀ qqiJ_Ê7;ö}XY™u¸§Oï OO{L˜à…  Ó(,,«Aƒb¦Mó¿¿'¾újž?/d%S£á^¿žˆµkÏaÅ ÿjÁ7[rrаqã%|ñE/ØØÈ ßÞÞûö}?î‚1c”‡o²gÏ-|ø¡'¶o•+‡ƒÏ炈àç§|ÌÚÚ³fõETÔlÛö9š6µxeÀUHY3œ—W‚ÐÐÄW«Î¸¯:)ÕX$’(œ ­$**EaŒÉår påMè¡C‘Ju˜˜èˇ˜xv©Ìã›™áêÕùxò$))/‘’ò×®=BVV>„B ÊË_¯t{ð mÛ6UZÿÊP¡rŠY$’Â×·5Z¶l;; 4kfŽÖ­›(½##=Éä==›# à˜9s:wv€yÏ€Çã`ƌމ$˜6­·|ˆ«Gg;vþþjÔáããZm ‰©©>¾øÂk֜ôi>J[?UðóÏ£0hÐ:üõWTÍu©–já þüó&µh1‡23óU]¦’òr¹º~MkÖœ­ùb¬\y’:tø–¤R©Vu±³›EGʲ4VTˆèðá;4þ ŬõÌŸ€† û…ˆˆrrŠèÎd:y2†^¾,V*sëV]ºô€?~N"º}û ÙÚÎTëÙ^¹ò–.ý‹=Ê’ëÕ+ˆ–-;ÎZ‡"öî½Eöö³©°°Lc¥¥ôÞ{ iãÆKZÕeáƒԡ÷TQ!RuÙr¥·¬Lˆ<‹Ñ£»Ê›wM8u*ÅÅå5ª«Æ:àÊ•‡èÝÛU«iÂÄÄç‹¥òN‚@ÀÃС:ÔC-=eeBù˜ª¥¥1«Õh:9Tù¿R¾¬LȺÜ=œÑ£‡s•c®®ñðakЍŒ}ÃÓX­õP„þþžøóÏ›˜<¹§Æ¿ÓŒ¾Ø·/!!70q¢òÔTJcÜS§bñòe1¦N­>¶ªÇŽEÃÛÛVV&ë(.®@\\:ºvuÔª.fBO§õªü²2ë)be¼6\å‹êÙàìlƒ„„,­tXZÃÙÙ·n=©ùbŒÑ Éɹˆ×üE²²2Á'ŸtÁ„ª…Qj¸F¢woWX[›j\ ¡PŒÐÐGèÛW³·¸’»wŸA"‘¢cÇæZéIIyfÍ,4^JW‰Ìãòk¾P•ò¥¥ZéiÞÜù¬:4ªèС¹Úk‹ß¦mÛ¦hÚÔL­a-EŒó?<{öBå‹Â_0;»ׯ'²êô¨"22¥¥Bxy9×|± >Ì‚¥¥1lmj¥'7·iîù+y3TДÚò¸™@*%¼xÁ~;"Ú´iªuÈ^^θz5A+­ZYÃÅ¥1މRzBà  ‡âA}¶Ü½›[Û†hÒĬæ‹U”” GGk­t²ÆìvG¨¢´´6<®ú1®"*ãëÜ\õÓŸ¾I«VÖ(,,g=ŽªŒš#..]ãÅ3•ôíÛ¡¡”žWh¸qqépt´ÒÚ«$$d)\¢¨.ii/aoo¡µžÜÜbÖÛzTQ1®ž\.Gk[ù"jk¸•Ï75õ…VzZµ²AY™))Úéi×®)’“sQR¢8”Rh¸dÀÕUùx"[ž>Í…ƒC#­õääÔŽ§|ñ¢¸6v˜¢¬L}}í<.èëóµö¸ €Çãh*T>——/µÓãà ëø>{¦áºº6†TJxøPqÇS¡áfdä³Ю‰ÂÂ2˜™©?ý6ùù¥µ¢G$’(]ž§bèéio¸ÕĨÃ0àóyZ'ãÐ×çC_Ÿ¼¼ê‹ÉÕ¡ACp8 4›þ­ÄÎÎ à #CñÂ$…†+ûÙmxSEqq9ŒŒØoBT†H$a½¯.¨Ì -‰Dåú¶‘ÂÝê"p.ÛT‡‘‘Š‹ËµÒS¹ÎWÙRL†«½g’MOj­æƒÇÓþdÙbjã…”î»ó ¦vÒ½ Ê[…†kh(@Q‘vo 4lhP+zøüÚ1”ʵQŸÚÈ“%׎ÇjÇA……#ÕA*%W(\[­"‘lˆ²Ñ…†ëà`…¤¤l­ dËð´uÀÌÌPëØ í‡«&^æqµ×#Ë¡}ÞA©”´ÖSZ*Dy¹Hë¾DQ‘,å€lѹ椤¼€D"EË–Š×+¼ÛæÍ-ñôi®V@‹–HL|®µss#¼x¡xKŠ:XX׊žÚh*·:iëq J!I´-©M07×nôæñc™ÃÓvZ=99 àY3Åà ·]»¦HHȬ¶iN]\\#>>]+€ì!Aœ2¬¬L‘“£Ýx'€Wí ·Òck;ýœ“#{5Ò|j’“eÏWÛñòû÷3`b¢_-Ý–º„‡?ƒC#¥»>>µ^½\Àårpö¬vsέ[7Á‹ÅHKS<¤Á––-­jÅs7jd‚ìlíf†Y¨ i*TÆÈÚzÜÊûÑv*ûñã4lh¨õÍÝ»©xï=[­;‹'OÆ _?宑‘ºti©µávêÔÆÆz8^;=NN6ÈÏ/EF»4™Ê®ö—ϯ +“×vT!7·<GëPáÁƒŒ³Õ„TJ8>Néþ?¶<|˜‰ää\ôî­<é¡ÒvÊß¿ΟGr²æ±.ŸÏE·nN¸tIñæ=¶tèÐ|>—už-eØÚ6Df¦ö+©jcÀ_(¬›––‡FLUnßgÃ͛ѵ«ò¼lˆMEnn1«,›ªØºõìí-СCs¥×(5Ü¡C=м¹¥ÚÛ†ßfÐ 7\½š VF÷Ñ×ç£]»¦ˆˆÐn½hëÖQ^.ÒzÄÄÄD_ëöJyu²D*âÞ½4´i£Ýô|NNž<É©’QSöí‹@‹кuõݼlIIy"0s¦¯Ê‘¥g¸\&Oî‰Ã‡ïh5ïüPõ’Z•]Ú>êGG+Óä²^ó'ŸtÁîÝá(-Õ|AI¿~m“SÄ:3¢"ø|.Zµ²Öj…> [Ø¢éVìJ*嵨/+âÉ“…ù Ôáܹ8ôèá¬ÕléÞ½àrøûkž:ôæÍÇØ½; ¬1„Ri¸|>›6àÎdlݪù‡£'Nì ‰DŠ .j¬ÃÉÉ..¶Ø¿?Bc€lÕуÚ®‰‰¾Ö·  ìU^^Í—G&$dA"‘ªÜ\ÏŸàÚµGòÆš—W‚µkÏaÊ”^‡>……e˜6m'lÏj`ƒˆNN6øâ‹^ :¥q+Û¾Ü [·^Õju̘÷±ÿm­Æ—;vlˆˆ' Ó±ÅÌÌH뙼—/KР¡VÍêõ뉰¶6Õjì5$äÌÍÑ¿?»LîŠØ°áôôx˜0AùæFU¾ùæ0**ÄøþûYɰýž9ÓžžÍñé§¿i<œ4nœ,-M0oÞäàÃ=À0 vï×X‡¯ok””qó¦:_Ê©Š)òòJªäTP—ììByVM9>½zi¾ó¹¬LˆÝ»Ã1lX'BbcS±uëUÌ›çWcŠ(e¬Ysý…ǰfU[>Ÿ‹­[?ƒ±±>ûì7~0==6oÀÅ‹÷5þÚJeޱ .i¼xÇÚº\\låßpЄJƒÓf2#+«@«¨yy%ˆŠz†^½ÞÓXǶm¡(+bÊoäKJ*0yòôèáŒO>é¢‘Žƒ#±fÍY¬X1¬ÚÖ{U°~ÍLMõ±cǤ§ça̘_52œvíì0~¼¾ûî(>®Zn¥Ái³?Kæq5Ÿíºz5£ñFÔ¢¢rüúëŒÝUãɋŋÿÂË—ÅX¹r¸FòFbÖ¬=˜2Å£G«—wC­öÁÎÎÇÏDzz>üI£™¬ ÂÝÝŸ|²Y#y cLÚ ?ÿ|ééšM%ûø¸ %åââ4[Gaii‡Ñjl:+«P«õ'NÄ C‡æUÒ½ªCpðiH$„ÀÀÞÉÿøãY8-[Æ¢qcõw_oÜx 3fìÆ¼y~*³|*CíÀÆÎÎûöMH$Á°aÔ^CÀãq°ys 22‘û )IDAT7îwªï¹+“ç-ZtDmY@–UÆÅÅ!!×5’çó¹°µm¨ñø6áÙ³\4o®Y§*--gÏÆ! à}äãâÒrß|3ffê{Û#G¢°víY|ýõ µšw@6-tË–ÇW_õÕ8áŒF¹9Ž „‰‰>üüÖâØ±hµäÍÌŒð矑‘Q£¶¨v<¬Zõ΋þ}š ý?9¥ðƒlhÑÂRãéðœœb”– ao¯ÙÒ¿}ûnÁÒÒDi2kU”—‹0mÚNtêä Q"ÃcÇîbÆŒ];¶&Mê©–l~~)¶â—_.`Ù²1kV_µË—£M‚2‘HB«WŸ¦&M¾¤ÀÀTV&TK>!!“Úµ[Dƒ­£‚õ®}ÿý1rtœGOžd«-[TTNNNóé÷߯©-KD4gÎ>>|ƒF²²„wii/Õ– Åäæ¶˜V­:¥QÙ  ÷Þ[HééyjË=Mvv³hÁ‚j'¼}û ¹»/¡®]—QLLŠÚe¿År­ ·’£G£ÉÉi>õîLwî$«%›Inn‹ÉËëzú4G-Y¡PL¬¥=Vj”ipöì}Ô½û ‰$jËþòËêØñ[µåˆˆöí‹ {ûÙ$«_î‘#w¨iÓY”’òBmÙ½{oQãÆ_Ò‰wÕ–ýùç Ԥɗ´pá!µŒ¶¼\DAA§ÈÞ~6µ…^¼PžÑR jÇp‰ˆž=Ë¥‘#7Q“&_Ò‚¨  ”µlzzõéL®®_Ó‰j•›••OîîKh̘_Õ6„ÌÌ|rp˜K¿ývU-9"¢‹ï“­íL~ˆ%KޝïjµåJK+ÈÝ} -Xp@mÙ[·’ÈÞ~6ŸVK®¼\D;©iÓY´e˵d¯^}H]».{Õ²…j•"ö-jÏp+Ù¿?‚\]¿&7·Å´gO8kc*)© Ï?ßFvv³hõê3jaLL 9:ΣÀÀ$‘¨÷p~øá½÷ÞB•¹m‘•U@¶¶3)4ô‘ZrDDÆýB3gîV[nݺóää4Ÿrs‹Ô’‹‰I!gç4iRˆZÆ“I½z‘“Ó|ºp!žµ\rr.Mš´lmgR@ÀVÊÈP?,©Ú7\"Y²ã3vQ“&_’—×têT,«&•JiË–+do?›† Y¯Ö ß¼ù˜Z¶œK R«®¥äêúµFɑ۵[D›6]V[ÎÅe!mݪž—ñ¢˜œÐêÕêyÌää\rqYH[ÕJ^½{w98Ì¥þý×°á²³ iáÂCÔ¬ÙWÔ±ã·òÚáVòða&}þù6jÜøKòñùŒŒ, ²ÏߨüãñÌÉŸ8CV×Wþ v$ت%€ôõ‰ÏgW··å¸ÜjÊ1¤¯ï@<^C5å8ddäA ÃW»<™W-9cãÎdbÒ…†ÕõÞÞãÉÑqµk·ˆ¶m»VSFqmYÎÕF¦Õܽ›‚àà#ؽûK|õÕ,kŸLÇ»ÃéÓ§!Yá³Ïf`Ü8/•ŸÞª%VhŸ®†nnÍ0y²vï&tíÚÚg^ÔñîpïÞ=dggk< § Úg£Ð¡ã@g¸:ê%:ÃÕQ/Ñ®ŽzÉ;m¸ÞÞÞHO¯¾ôðÍãéééðöf¿ÚÛÛ£GV¸ùsÞ¼yJË|¶eþôÓO˜2eJ•c{öì··722^oƒÊÎΆ··7¢££Õ¾Mêõoà6\6ãã?VK&++ IIU“‹!&&¦VËtssÃãÇQQñú;wîÜÃ0ˆŒ|ýÍÞû÷ïƒÇãÁÕÕU£ûù/Rï ·Aƒ˜8q¢Z2žžž¸råJ•c7oÞ„›»®lËlß¾=Äb1=’}=¦¢¢±±±èׯ_5ÃuqqžžžF÷ó_¤ÞîÛÍcMÿ@Ïž=qåÊ•*áÂÕ«WÑ£GÕ]ªaaa˜0aúõëìÞ½[¡Nooo\¸pŸ~ú)Œ½{÷ÌÌÌ`ooøøx@\\¬¬¬0pà@DEEA"‘¥aŠGûöíÕÒ-•J±wï^Œ3~~~˜6m””$÷f;vDdd$âããáìì å9ÄéÎÉÉ£cÕr;8ȾО——©TŠÆ_§fjÒ¤ rrrЪU+èëë#!!±±±xÿý÷áèèˆØØXDGG£kWí¾r_W¼Ó†keeUmh*%%\.Wî5¥mÛ¶(--Ž{÷‰nݺU9_QQ¥K—bäÈ‘øõ×_1sæL•ú”%å077‡þüóO´lÙRîÕ===qÿþ}DFFª ”é¶±±©62’œœ @[s8df¾N‘‘KKK0 ƒ.]ºàúõëHMME«V­äÞ?66]ºh–¡®y§ ·_¿~X¿~=™™‰¨¨(,_¾¾¾¾à󥤤'OžTú%•áš5kàâ₆ «n±‰D‹Åàñx …øã?Èb_uqssÃÍ›7áéù:¡­­-lmmÁz4ãMŒM›6áÆxùò%"""ðûï¿yfooo¬_¿™™™xúô)¶mÛ†Þ½e‹`:wGÂÕÕ<8sæ ¬­­am­ý7“ë‚wÚp0hÐ lÚ´ cÇŽÅêիѹsg̘1C©L~~>V¯^­ôÿ7ñööƳgϪ… €l¬vÊ”)X¶l`ccÌ;Wíû¨4Ì7 :tè†aЦMµu2#GŽÄ¦M›0jÔ(ìØ±‹-’ŸŸ1c,--1yòdÌ™3;vĨQ£äå …B¹§oÓ¦ D"Q½ñ¶P'ëq 44^^^8xð nY㿌ŸþÙÙÙ Õ<»š¬x§=®ÊЮŽz‰ÎpuÔKt†«£^¢3\õáꨗè WG½¤N¶§¿Éwß}§tÖKGý$55NNNuZf®««+F]e7€Žðõõ­Ó2ëlæL‡ŽZD7s¦£~¢3\õáꨗè WG½äÿjƒõÉ4¸†IEND®B`‚pktools-2.6.6/doc/html/functions_func.html0000644000113200011300000001446012647637663015576 00000000000000 pktools: Class Members - Functions pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask__inherit__graph.md50000644000113200011300000000004012616110566026425 0000000000000049725e4acafdaf74f1676a3e738250f2pktools-2.6.6/doc/html/Filter__old_8h_source.html0000644000113200011300000042216512647637661016757 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Filter_old.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
Filter_old.h
1 /**********************************************************************
2 Filter.h: class for filtering
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _MYFILTER_H_
21 #define _MYFILTER_H_
22 
23 #include <vector>
24 #include <iostream>
25 extern "C" {
26 #include <gsl/gsl_sort.h>
27 #include <gsl/gsl_wavelet.h>
28 }
29 #include "StatFactory.h"
30 #include "imageclasses/ImgReaderGdal.h"
31 #include "imageclasses/ImgWriterGdal.h"
32 
33 namespace filter
34 {
35 
36  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, dwt=26, dwti=27, dwt_cut=28, dwt_cut_from=29};
37 
38  enum PADDING { symmetric=0, replicate=1, circular=2, constant=3};
39 
40 class Filter
41 {
42 public:
43  Filter(void);
44  Filter(const std::vector<double> &taps);
45  virtual ~Filter(){};
46  static PADDING getPadding(const std::string& padString){
47  std::map<std::string, PADDING> padMap;
48  padMap["constant"]=filter::constant;
49  padMap["symmetric"]=filter::symmetric;
50  padMap["replicate"]=filter::replicate;
51  padMap["circular"]=filter::circular;
52  return(padMap[padString]);
53  };
54 
55  static const gsl_wavelet_type* getWaveletType(const std::string waveletType){
56  if(waveletType=="daubechies") return(gsl_wavelet_daubechies);
57  if(waveletType=="daubechies_centered") return(gsl_wavelet_daubechies_centered);
58  if(waveletType=="haar") return(gsl_wavelet_haar);
59  if(waveletType=="haar_centered") return(gsl_wavelet_haar_centered);
60  if(waveletType=="bspline") return(gsl_wavelet_bspline);
61  if(waveletType=="bspline_centered") return(gsl_wavelet_bspline_centered);
62  }
63  static FILTER_TYPE getFilterType(const std::string filterType){
64  std::map<std::string, FILTER_TYPE> m_filterMap;
65  initFilterMap(m_filterMap);
66  return m_filterMap[filterType];
67  };
68  void setTaps(const std::vector<double> &taps, bool normalize=true);
69  void pushClass(short theClass=1){m_class.push_back(theClass);};
70  void pushMask(short theMask=0){m_mask.push_back(theMask);};
71  template<class T> void filter(const std::vector<T>& input, std::vector<T>& output);
72  template<class T> void filter(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim);
73  template<class T> void smooth(const std::vector<T>& input, std::vector<T>& output, short dim);
74  template<class T> void filter(T* input, int inputSize, std::vector<T>& output);
75  template<class T> void smooth(T* input, int inputSize, std::vector<T>& output, short dim);
76  template<class T> void morphology(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim, bool verbose=false);
77  void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short verbose=0);
78  void filter(const ImgReaderGdal& input, ImgWriterGdal& output);
79  void stat(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method);
80  void filter(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim);
81  void smooth(const ImgReaderGdal& input, ImgWriterGdal& output, short dim);
82  double getCentreWavelength(const std::vector<double> &wavelengthIn, const Vector2d<double>& srf, const std::string& interpolationType, double delta=1.0, bool verbose=false);
83  template<class T> double applySrf(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, T& output, double delta=1.0, bool normalize=false, bool verbose=false);
84  template<class T> double applySrf(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, std::vector<T>& output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false);
85 
86  template<class T> void applyFwhm(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, std::vector<T>& output, bool verbose=false);
87  template<class T> void applyFwhm(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, Vector2d<T>& output, int down=1, bool verbose=false);
88  void dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family);
89  void dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family);
90  void dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut);
91  void dwtForward(std::vector<double>& data, const std::string& wavelet_type, int family);
92  void dwtInverse(std::vector<double>& data, const std::string& wavelet_type, int family);
93  void dwtCut(std::vector<double>& data, const std::string& wavelet_type, int family, double cut);
94  void dwtCutFrom(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, int band);
95 
96 private:
97 
98  static void initFilterMap(std::map<std::string, FILTER_TYPE>& m_filterMap){
99  //initialize Map
100  m_filterMap["dwt"]=filter::dwt;
101  m_filterMap["dwti"]=filter::dwti;
102  m_filterMap["dwt_cut"]=filter::dwt_cut;
103  m_filterMap["dwt_cut_from"]=filter::dwt_cut_from;
104  m_filterMap["stdev"]=filter::stdev;
105  m_filterMap["var"]=filter::var;
106  m_filterMap["min"]=filter::min;
107  m_filterMap["max"]=filter::max;
108  m_filterMap["sum"]=filter::sum;
109  m_filterMap["mean"]=filter::mean;
110  m_filterMap["minmax"]=filter::minmax;
111  m_filterMap["dilate"]=filter::dilate;
112  m_filterMap["erode"]=filter::erode;
113  m_filterMap["close"]=filter::close;
114  m_filterMap["open"]=filter::open;
115  m_filterMap["homog"]=filter::homog;
116  m_filterMap["sobelx"]=filter::sobelx;
117  m_filterMap["sobely"]=filter::sobely;
118  m_filterMap["sobelxy"]=filter::sobelxy;
119  m_filterMap["sobelyx"]=filter::sobelyx;
120  m_filterMap["smooth"]=filter::smooth;
121  m_filterMap["density"]=filter::density;
122  m_filterMap["majority"]=filter::majority;
123  m_filterMap["mixed"]=filter::mixed;
124  m_filterMap["smoothnodata"]=filter::smoothnodata;
125  m_filterMap["threshold"]=filter::threshold;
126  m_filterMap["ismin"]=filter::ismin;
127  m_filterMap["ismax"]=filter::ismax;
128  m_filterMap["heterog"]=filter::heterog;
129  m_filterMap["order"]=filter::order;
130  m_filterMap["median"]=filter::median;
131  }
132 
133  std::vector<double> m_taps;
134  std::vector<short> m_class;
135  std::vector<short> m_mask;
136  std::string m_padding;
137 };
138 
139 //input[band], output
140 //returns wavelength for which srf is maximum
141  template<class T> double Filter::applySrf(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, T& output, double delta, bool normalize, bool verbose)
142 {
143  assert(srf.size()==2);//[0]: wavelength, [1]: response function
144  int nband=srf[0].size();
145  double start=floor(wavelengthIn[0]);
146  double end=ceil(wavelengthIn.back());
147  if(verbose)
148  std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush;
149 
151 
152  gsl_interp_accel *acc;
153  stat.allocAcc(acc);
154  gsl_spline *spline;
155  stat.getSpline(interpolationType,nband,spline);
156  stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
157  if(verbose)
158  std::cout << "calculating norm of srf" << std::endl << std::flush;
159  double norm=0;
160  norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc);
161  if(verbose)
162  std::cout << "norm of srf: " << norm << std::endl << std::flush;
163  gsl_spline_free(spline);
164  gsl_interp_accel_free(acc);
165  //interpolate input and srf to delta
166 
167  std::vector<double> wavelength_fine;
168  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
169  wavelength_fine.push_back(win);
170 
171  if(verbose)
172  std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl;
173  std::vector<double> srf_fine;//spectral response function, interpolated for wavelength_fine
174 
175  stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose);
176  assert(srf_fine.size()==wavelength_fine.size());
177 
178  gsl_interp_accel *accOut;
179  stat.allocAcc(accOut);
180  gsl_spline *splineOut;
181  stat.getSpline(interpolationType,wavelength_fine.size(),splineOut);
182  assert(splineOut);
183 
184  assert(wavelengthIn.size()==input.size());
185  std::vector<double> input_fine;
186  std::vector<double> product(wavelength_fine.size());
187  std::vector<double> wavelengthOut(wavelength_fine.size());
188  stat.interpolateUp(wavelengthIn,input,wavelength_fine,interpolationType,input_fine,verbose);
189 
190  if(verbose)
191  std::cout << "input_fine.size(): " << input_fine.size() << std::endl;
192  for(int iband=0;iband<input_fine.size();++iband){
193  product[iband]=input_fine[iband]*srf_fine[iband];
194  wavelengthOut[iband]=wavelength_fine[iband]*srf_fine[iband];
195  }
196 
197  assert(input_fine.size()==srf_fine.size());
198  assert(input_fine.size()==wavelength_fine.size());
199  stat.initSpline(splineOut,&(wavelength_fine[0]),&(product[0]),wavelength_fine.size());
200  if(normalize)
201  output=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
202  else
203  output=gsl_spline_eval_integ(splineOut,start,end,accOut);
204 
205  stat.initSpline(splineOut,&(wavelength_fine[0]),&(wavelengthOut[0]),wavelength_fine.size());
206  double centreWavelength=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
207 
208  gsl_spline_free(splineOut);
209  gsl_interp_accel_free(accOut);
210 
211  // double maxResponse=0;
212  // int maxIndex=0;
213  // for(int index=0;index<srf[1].size();++index){
214  // if(maxResponse<srf[1][index]){
215  // maxResponse=srf[1][index];
216  // maxIndex=index;
217  // }
218  // }
219  // return(srf[0][maxIndex]);
220  return(centreWavelength);
221 }
222 
223 //input[band][sample], output[sample] (if !transposeInput)
224 //returns wavelength for which srf is maximum
225  template<class T> double Filter::applySrf(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const Vector2d<double>& srf, const std::string& interpolationType, std::vector<T>& output, double delta, bool normalize, int down, bool transposeInput, bool verbose)
226 {
227  assert(srf.size()==2);//[0]: wavelength, [1]: response function
228  int nband=srf[0].size();
229  unsigned int nsample=(transposeInput)? input.size():input[0].size();
230  output.resize((nsample+down-1)/down);
231  double start=floor(wavelengthIn[0]);
232  double end=ceil(wavelengthIn.back());
233  if(verbose)
234  std::cout << "wavelengths in [" << start << "," << end << "]" << std::endl << std::flush;
235 
237 
238  gsl_interp_accel *acc;
239  stat.allocAcc(acc);
240  gsl_spline *spline;
241  stat.getSpline(interpolationType,nband,spline);
242  stat.initSpline(spline,&(srf[0][0]),&(srf[1][0]),nband);
243  if(verbose)
244  std::cout << "calculating norm of srf" << std::endl << std::flush;
245  double norm=0;
246  norm=gsl_spline_eval_integ(spline,srf[0].front(),srf[0].back(),acc);
247  if(verbose)
248  std::cout << "norm of srf: " << norm << std::endl << std::flush;
249  gsl_spline_free(spline);
250  gsl_interp_accel_free(acc);
251  //interpolate input and srf to delta
252 
253  std::vector<double> wavelength_fine;
254  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
255  wavelength_fine.push_back(win);
256 
257  if(verbose)
258  std::cout << "interpolate wavelengths to " << wavelength_fine.size() << " entries " << std::endl;
259  std::vector<double> srf_fine;//spectral response function, interpolated for wavelength_fine
260 
261  stat.interpolateUp(srf[0],srf[1],wavelength_fine,interpolationType,srf_fine,verbose);
262  assert(srf_fine.size()==wavelength_fine.size());
263 
264  gsl_interp_accel *accOut;
265  stat.allocAcc(accOut);
266  gsl_spline *splineOut;
267  stat.getSpline(interpolationType,wavelength_fine.size(),splineOut);
268  assert(splineOut);
269 
270  std::vector<double> wavelengthOut;
271  double centreWavelength=0;
272  for(int isample=0;isample<nsample;++isample){
273  if((isample+1+down/2)%down)
274  continue;
275  std::vector<T> inputValues;
276  if(transposeInput)
277  inputValues=input[isample];
278  else
279  input.selectCol(isample,inputValues);
280  assert(wavelengthIn.size()==inputValues.size());
281  std::vector<double> input_fine;
282  std::vector<double> product(wavelength_fine.size());
283  stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose);
284 
285  for(int iband=0;iband<input_fine.size();++iband){
286  product[iband]=input_fine[iband]*srf_fine[iband];
287  if(wavelengthOut.size()<input_fine.size())
288  wavelengthOut.push_back(wavelength_fine[iband]*srf_fine[iband]);
289  }
290 
291  assert(input_fine.size()==srf_fine.size());
292  assert(input_fine.size()==wavelength_fine.size());
293  stat.initSpline(splineOut,&(wavelength_fine[0]),&(product[0]),wavelength_fine.size());
294  if(normalize)
295  output[isample/down]=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
296  else
297  output[isample/down]=gsl_spline_eval_integ(splineOut,start,end,accOut);
298 
299  stat.initSpline(splineOut,&(wavelength_fine[0]),&(wavelengthOut[0]),wavelength_fine.size());
300  if(centreWavelength>0);
301  else
302  centreWavelength=gsl_spline_eval_integ(splineOut,start,end,accOut)/norm;
303  }
304  gsl_spline_free(splineOut);
305  gsl_interp_accel_free(accOut);
306 
307  // double maxResponse=0;
308  // int maxIndex=0;
309  // for(int index=0;index<srf[1].size();++index){
310  // if(maxResponse<srf[1][index]){
311  // maxResponse=srf[1][index];
312  // maxIndex=index;
313  // }
314  // }
315  // return(srf[0][maxIndex]);
316  return(centreWavelength);
317 }
318 
319 template<class T> void Filter::applyFwhm(const std::vector<double> &wavelengthIn, const std::vector<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, std::vector<T>& output, bool verbose){
320  double delta=1;//1 nm resolution
321  std::vector<double> stddev(fwhm.size());
322  for(int index=0;index<fwhm.size();++index)
323  stddev[index]=fwhm[index]/2.0/sqrt(2*log(2.0));//http://mathworld.wolfram.com/FullWidthatHalfMaximum.html
324  assert(wavelengthOut.size()==fwhm.size());
325  assert(wavelengthIn.size()==input.size());
326  assert(wavelengthIn[0]<=wavelengthOut[0]);
327  assert(wavelengthIn.back()>=wavelengthOut.back());
329  std::vector<double> input_fine;
330  std::vector<double> wavelength_fine;
331  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
332  wavelength_fine.push_back(win);
333  if(verbose){
334  for(int index=0;index<wavelength_fine.size();++index)
335  std::cout << " " << wavelength_fine[index];
336  std::cout << std::endl;
337  std::cout << "interpolate input wavelength to " << delta << " nm resolution (size=" << wavelength_fine.size() << ")" << std::endl;
338  }
339  stat.interpolateUp(wavelengthIn,input,wavelength_fine,interpolationType,input_fine,verbose);
340  int nbandIn=wavelength_fine.size();
341 
342  int nbandOut=wavelengthOut.size();
343  output.resize(nbandOut);
344  Vector2d<double> tf(nbandIn,nbandOut);
345  for(int indexOut=0;indexOut<nbandOut;++indexOut){
346  double norm=0;
347  for(int indexIn=0;indexIn<nbandIn;++indexIn){
348  // tf(indexIn,indexOut)=
349  tf[indexIn][indexOut]=
350  exp((wavelengthOut[indexOut]-wavelength_fine[indexIn])
351  *(wavelength_fine[indexIn]-wavelengthOut[indexOut])
352  /2.0/stddev[indexOut]
353  /stddev[indexOut]);
354  tf[indexIn][indexOut]/=sqrt(2.0*M_PI);
355  tf[indexIn][indexOut]/=stddev[indexOut];
356  norm+=tf[indexIn][indexOut];
357  }
358  output[indexOut]=0;
359  for(int indexIn=0;indexIn<nbandIn;++indexIn)
360  output[indexOut]+=input_fine[indexIn]*tf[indexIn][indexOut]/norm;
361  }
362 }
363 
364 
365  //input[inBand][sample], output[outBand][sample]
366  template<class T> void Filter::applyFwhm(const std::vector<double> &wavelengthIn, const Vector2d<T>& input, const std::vector<double> &wavelengthOut, const std::vector<double> &fwhm, const std::string& interpolationType, Vector2d<T>& output, int down, bool verbose){
367  double delta=1;//1 nm resolution
368  std::vector<double> stddev(fwhm.size());
369  for(int index=0;index<fwhm.size();++index)
370  stddev[index]=fwhm[index]/2.0/sqrt(2*log(2.0));//http://mathworld.wolfram.com/FullWidthatHalfMaximum.html
372  std::vector<double> wavelength_fine;
373  for(double win=floor(wavelengthIn[0]);win<=ceil(wavelengthIn.back());win+=delta)
374  wavelength_fine.push_back(win);
375  assert(wavelengthOut.size()==fwhm.size());
376  assert(wavelengthIn[0]<=wavelengthOut[0]);
377  assert(wavelengthIn.back()>=wavelengthOut.back());
378  if(verbose){
379  for(int index=0;index<wavelength_fine.size();++index)
380  std::cout << " " << wavelength_fine[index];
381  std::cout << std::endl;
382  std::cout << "interpolate input wavelength to " << delta << " nm resolution (size=" << wavelength_fine.size() << ")" << std::endl;
383  }
384  int nbandIn=wavelength_fine.size();
385  int nbandOut=wavelengthOut.size();
386  output.resize(nbandOut,(input[0].size()+down-1)/down);
387 
388  Vector2d<double> tf(nbandIn,nbandOut);
389  std::vector<double> norm(nbandOut);
390  for(int indexOut=0;indexOut<nbandOut;++indexOut){
391  norm[indexOut]=0;
392  for(int indexIn=0;indexIn<nbandIn;++indexIn){
393  tf[indexIn][indexOut]=
394  exp((wavelengthOut[indexOut]-wavelength_fine[indexIn])
395  *(wavelength_fine[indexIn]-wavelengthOut[indexOut])
396  /2.0/stddev[indexOut]
397  /stddev[indexOut]);
398  tf[indexIn][indexOut]/=sqrt(2.0*M_PI);
399  tf[indexIn][indexOut]/=stddev[indexOut];
400  norm[indexOut]+=tf[indexIn][indexOut];
401  }
402  }
403 
404  for(int isample=0;isample<input[0].size();++isample){
405  if((isample+1+down/2)%down)
406  continue;
407  std::vector<T> inputValues;
408  input.selectCol(isample,inputValues);
409  assert(wavelengthIn.size()==inputValues.size());
410  for(int indexOut=0;indexOut<nbandOut;++indexOut){
411  std::vector<double> input_fine;
412  stat.interpolateUp(wavelengthIn,inputValues,wavelength_fine,interpolationType,input_fine,verbose);
413  output[indexOut][(isample+down-1)/down]=0;
414  for(int indexIn=0;indexIn<nbandIn;++indexIn){
415  output[indexOut][(isample+down-1)/down]+=input_fine[indexIn]*tf[indexIn][indexOut]/norm[indexOut];
416  }
417  }
418  }
419 }
420 
421  template<class T> void Filter::smooth(const std::vector<T>& input, std::vector<T>& output, short dim)
422 {
423  assert(dim>0);
424  m_taps.resize(dim);
425  for(int itap=0;itap<dim;++itap)
426  m_taps[itap]=1.0/dim;
427  filter(input,output);
428  }
429 
430 template<class T> void Filter::filter(const std::vector<T>& input, std::vector<T>& output)
431 {
432  assert(input.size()>m_taps.size());
433  output.resize(input.size());
434  int i=0;
435  //start: extend input with mirrored version of itself
436  for(i=0;i<m_taps.size()/2;++i){
437  //todo:introduce nodata
438  output[i]=m_taps[m_taps.size()/2]*input[i];
439  for(int t=1;t<=m_taps.size()/2;++t){
440  output[i]+=m_taps[m_taps.size()/2+t]*input[i+t];
441  if(i>=t)
442  output[i]+=m_taps[m_taps.size()/2-t]*input[i-t];
443  else{
444  switch(getPadding(m_padding)){
445  case(replicate):
446  output[i]+=m_taps[m_taps.size()/2-t]*input[0];
447  break;
448  case(circular):
449  output[i]+=m_taps[m_taps.size()/2-t]*input[input.size()+i-t];
450  break;
451  case(constant):
452  output[i]+=m_taps[m_taps.size()/2-t]*0;
453  break;
454  case(symmetric):
455  default:
456  output[i]+=m_taps[m_taps.size()/2-t]*input[t-i];
457  break;
458  }
459  }
460  //output[i]+=(m_taps[m_taps.size()/2+t]+m_taps[m_taps.size()/2-t])*input[i+t];
461  }
462  }
463  //main
464  for(i=m_taps.size()/2;i<input.size()-m_taps.size()/2;++i){
465  //todo:introduce nodata
466  T leaveOut=(*(m_taps.begin()))*input[i-m_taps.size()/2];
467  T include=(m_taps.back())*input[i+m_taps.size()/2];
468  output[i]=0;
469  for(int t=0;t<m_taps.size();++t)
470  output[i]+=input[i-m_taps.size()/2+t]*m_taps[t];
471  }
472  //end: extend input with mirrored version of itself
473  for(i=input.size()-m_taps.size()/2;i<input.size();++i){
474  //todo:introduce nodata
475  output[i]=m_taps[m_taps.size()/2]*input[i];
476  //todo:introduce nodata
477  for(int t=1;t<=m_taps.size()/2;++t){
478  output[i]+=m_taps[m_taps.size()/2-t]*input[i-t];
479  if(i+t<input.size())
480  output[i]+=m_taps[m_taps.size()/2+t]*input[i+t];
481  else{
482  switch(getPadding(m_padding)){
483  case(replicate):
484  output[i]+=m_taps[m_taps.size()/2+t]*input.back();
485  break;
486  case(circular):
487  output[i]+=m_taps[m_taps.size()/2+t]*input[t-1];
488  break;
489  case(constant):
490  output[i]+=m_taps[m_taps.size()/2+t]*0;
491  break;
492  case(symmetric):
493  default:
494  output[i]+=m_taps[m_taps.size()/2+t]*input[i-t];
495  break;
496  }
497  }
498  //output[i]+=(m_taps[m_taps.size()/2+t]+m_taps[m_taps.size()/2-t])*input[i-t];
499  }
500  }
501 }
502 
503  template<class T> void Filter::filter(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim)
504 {
505  bool verbose=false;
506  assert(dim);
507  output.resize(input.size());
508  int i=0;
510  std::vector<T> statBuffer;
511  short binValue=0;
512  //start: extend input with mirrored version of itself
513  for(i=0;i<dim/2;++i){
514  binValue=0;
515  for(int iclass=0;iclass<m_class.size();++iclass){
516  if(input[i]==m_class[iclass]){
517  binValue=m_class[0];
518  break;
519  }
520  }
521  if(m_class.size())
522  statBuffer.push_back(binValue);
523  else
524  statBuffer.push_back(input[i]);
525 
526  for(int t=1;t<=dim/2;++t){
527  T theValue=input[i+t];
528  for(int iclass=0;iclass<m_class.size();++iclass){
529  if(theValue==m_class[iclass]){
530  binValue=m_class[0];
531  break;
532  }
533  }
534  if(m_class.size())
535  statBuffer.push_back(binValue);
536  else
537  statBuffer.push_back(theValue);
538 
539  if(i>=t){
540  theValue=input[i-t];
541  }
542  else{
543  switch(getPadding(m_padding)){
544  case(replicate):
545  theValue=input[0];
546  break;
547  case(circular):
548  theValue=input[input.size()+i-t];
549  break;
550  case(constant):
551  theValue=0;
552  break;
553  case(symmetric):
554  default:
555  theValue=input[t-i];
556  break;
557  }
558  }
559  for(int iclass=0;iclass<m_class.size();++iclass){
560  if(theValue==m_class[iclass]){
561  binValue=m_class[0];
562  break;
563  }
564  }
565  if(m_class.size())
566  statBuffer.push_back(binValue);
567  else
568  statBuffer.push_back(theValue);
569  }
570 
571  switch(getFilterType(method)){
572  case(filter::median):
573  output[i]=stat.median(statBuffer);
574  break;
575  case(filter::min):
576  output[i]=stat.mymin(statBuffer);
577  break;
578  case(filter::max):
579  output[i]=stat.mymax(statBuffer);
580  break;
581  case(filter::sum):
582  output[i]=sqrt(stat.sum(statBuffer));
583  break;
584  case(filter::var):
585  output[i]=stat.var(statBuffer);
586  break;
587  case(filter::mean):
588  output[i]=stat.mean(statBuffer);
589  break;
590  default:
591  std::string errorString="method not supported";
592  throw(errorString);
593  break;
594  }
595  }
596  //main
597  statBuffer.clear();
598  for(i=dim/2;i<input.size()-dim/2;++i){
599  binValue=0;
600  for(int t=0;t<dim;++t){
601  for(int iclass=0;iclass<m_class.size();++iclass){
602  if(input[i-dim/2+t]==m_class[iclass]){
603  binValue=m_class[0];
604  break;
605  }
606  }
607  if(m_class.size())
608  statBuffer.push_back(binValue);
609  else
610  statBuffer.push_back(input[i-dim/2+t]);
611  }
612  switch(getFilterType(method)){
613  case(filter::median):
614  output[i]=stat.median(statBuffer);
615  break;
616  case(filter::min):
617  output[i]=stat.mymin(statBuffer);
618  break;
619  case(filter::max):
620  output[i]=stat.mymax(statBuffer);
621  break;
622  case(filter::sum):
623  output[i]=sqrt(stat.sum(statBuffer));
624  break;
625  case(filter::var):
626  output[i]=stat.var(statBuffer);
627  break;
628  case(filter::mean):
629  output[i]=stat.mean(statBuffer);
630  break;
631  default:
632  std::string errorString="method not supported";
633  throw(errorString);
634  break;
635  }
636  statBuffer.clear();
637  }
638  //end: extend input with mirrored version of itself
639  for(i=input.size()-dim/2;i<input.size();++i){
640  binValue=0;
641  for(int iclass=0;iclass<m_class.size();++iclass){
642  if(input[i]==m_class[iclass]){
643  binValue=m_class[0];
644  break;
645  }
646  }
647  if(m_class.size())
648  statBuffer.push_back(binValue);
649  else
650  statBuffer.push_back(input[i]);
651 
652  for(int t=1;t<=dim/2;++t){
653  T theValue=input[i-t];
654  for(int iclass=0;iclass<m_class.size();++iclass){
655  if(theValue==m_class[iclass]){
656  binValue=m_class[0];
657  break;
658  }
659  }
660  if(m_class.size())
661  statBuffer.push_back(binValue);
662  else
663  statBuffer.push_back(theValue);
664  if(i+t<input.size())
665  theValue=input[i+t];
666  else{
667  switch(getPadding(m_padding)){
668  replicate:
669  theValue=input.back();
670  break;
671  circular:
672  theValue=input[t-1];
673  break;
674  constant:
675  theValue=0;
676  break;
677  symmetric:
678  default:
679  theValue=input[i-t];
680  break;
681  }
682  }
683  for(int iclass=0;iclass<m_class.size();++iclass){
684  if(theValue==m_class[iclass]){
685  binValue=m_class[0];
686  break;
687  }
688  }
689  if(m_class.size())
690  statBuffer.push_back(binValue);
691  else
692  statBuffer.push_back(theValue);
693  }
694  switch(getFilterType(method)){
695  case(filter::median):
696  output[i]=stat.median(statBuffer);
697  break;
698  case(filter::min):
699  output[i]=stat.mymin(statBuffer);
700  break;
701  case(filter::max):
702  output[i]=stat.mymax(statBuffer);
703  break;
704  case(filter::sum):
705  output[i]=sqrt(stat.sum(statBuffer));
706  break;
707  case(filter::var):
708  output[i]=stat.var(statBuffer);
709  break;
710  case(filter::mean):
711  output[i]=stat.mean(statBuffer);
712  break;
713  default:
714  std::string errorString="method not supported";
715  throw(errorString);
716  break;
717  }
718  }
719  }
720 
721 
722  //todo: this function is redundant, can be incorporated within filter
723  template<class T> void Filter::morphology(const std::vector<T>& input, std::vector<T>& output, const std::string& method, int dim, bool verbose)
724 {
725  assert(dim);
726  output.resize((input.size());
727  int i=0;
729  std::vector<T> statBuffer;
730  short binValue=0;
731  //start: extend input with mirrored version of itself
732  for(i=0;i<dim/2;++i){
733  binValue=0;
734  for(int iclass=0;iclass<m_class.size();++iclass){
735  if(input[i]==m_class[iclass]){
736  binValue=m_class[0];
737  break;
738  }
739  }
740  if(m_class.size())
741  statBuffer.push_back(binValue);
742  else
743  statBuffer.push_back(input[i]);
744  for(int t=1;t<=dim/2;++t){
745  binValue=0;
746  for(int iclass=0;iclass<m_class.size();++iclass){
747  if(input[i+t]==m_class[iclass]){
748  binValue=m_class[0];
749  break;
750  }
751  }
752  if(m_class.size()){
753  statBuffer.push_back(binValue);
754  statBuffer.push_back(binValue);
755  }
756  else{
757  statBuffer.push_back(input[i+t]);
758  statBuffer.push_back(input[i+t]);
759  }
760  }
761  /* assert(statBuffer.size()==dim); */
762  switch(getFilterType(method)){
763  case(filter::dilate):
764  output[i]=stat.mymax(statBuffer);
765  break;
766  case(filter::erode):
767  output[i]=stat.mymin(statBuffer);
768  break;
769  default:
770  std::string errorString="method not supported";
771  throw(errorString);
772  break;
773  }
774  if(verbose){
775  std::cout << "buffer: ";
776  for(int ibuf=0;ibuf<statBuffer.size();++ibuf)
777  std::cout << statBuffer[ibuf] << " ";
778  std::cout << "->" << output[i] << std::endl;
779  }
780  }
781  //main
782  statBuffer.clear();
783  for(i=dim/2;i<input.size()-dim/2;++i){
784  binValue=0;
785  for(int t=0;t<dim;++t){
786  for(int iclass=0;iclass<m_class.size();++iclass){
787  if(input[i-dim/2+t]==m_class[iclass]){
788  binValue=m_class[0];
789  break;
790  }
791  }
792  if(m_class.size())
793  statBuffer.push_back(binValue);
794  else
795  statBuffer.push_back(input[i-dim/2+t]);
796  }
797  /* assert(statBuffer.size()==dim); */
798  switch(getFilterType(method)){
799  case(filter::dilate):
800  output[i]=stat.mymax(statBuffer);
801  break;
802  case(filter::erode):
803  output[i]=stat.mymin(statBuffer);
804  break;
805  default:
806  std::string errorString="method not supported";
807  throw(errorString);
808  break;
809  }
810  if(verbose){
811  std::cout << "buffer: ";
812  for(int ibuf=0;ibuf<statBuffer.size();++ibuf)
813  std::cout << statBuffer[ibuf] << " ";
814  std::cout << "->" << output[i] << std::endl;
815  }
816  statBuffer.clear();
817  }
818  //end: extend input with mirrored version of itself
819  for(i=input.size()-dim/2;i<input.size();++i){
820  binValue=0;
821  for(int iclass=0;iclass<m_class.size();++iclass){
822  if(input[i]==m_class[iclass]){
823  binValue=m_class[0];
824  break;
825  }
826  }
827  if(m_class.size())
828  statBuffer.push_back(binValue);
829  else
830  statBuffer.push_back(input[i]);
831  for(int t=1;t<=dim/2;++t){
832  binValue=0;
833  for(int iclass=0;iclass<m_class.size();++iclass){
834  if(input[i-t]==m_class[iclass]){
835  binValue=m_class[0];
836  break;
837  }
838  }
839  if(m_class.size()){
840  statBuffer.push_back(binValue);
841  statBuffer.push_back(binValue);
842  }
843  else{
844  statBuffer.push_back(input[i-t]);
845  statBuffer.push_back(input[i-t]);
846  }
847  }
848  }
849  switch(getFilterType(method)){
850  case(filter::dilate):
851  output[i]=stat.mymax(statBuffer);
852  break;
853  case(filter::erode):
854  output[i]=stat.mymin(statBuffer);
855  break;
856  default:
857  std::string errorString="method not supported";
858  throw(errorString);
859  break;
860  }
861  if(verbose){
862  std::cout << "buffer: ";
863  for(int ibuf=0;ibuf<statBuffer.size();++ibuf)
864  std::cout << statBuffer[ibuf] << " ";
865  std::cout << "->" << output[i] << std::endl;
866  }
867  }
868 }
869 
870  template<class T> void Filter::smooth(T* input, int inputSize, std::vector<T>& output, short dim)
871 {
872  assert(dim>0);
873  m_taps.resize(dim);
874  for(int itap=0;itap<dim;++itap)
875  m_taps[itap]=1.0/dim;
876  filter(input,output);
877  }
878 
879 template<class T> void Filter::filter(T* input, int inputSize, std::vector<T>& output)
880 {
881  output.resize((inputSize);
882  int i=0;
883  //start: extend input with mirrored version of itself
884  for(i=0;i<m_taps.size()/2;++i){
885  output[i]=m_taps[m_taps.size()/2]*input[i];
886  for(int t=1;t<=m_taps.size()/2;++t)
887  output[i]+=(m_taps[m_taps.size()/2+t]+m_taps[m_taps.size()/2-t])*input[i+t];
888  }
889  //main
890  for(i=m_taps.size()/2;i<inputSize-m_taps.size()/2;++i){
891  T leaveOut=(*(m_taps.begin()))*input[i-m_taps.size()/2];
892  T include=(m_taps.back())*input[i+m_taps.size()/2];
893  output[i]=0;
894  for(int t=0;t<m_taps.size();++t)
895  output[i]+=input[i-m_taps.size()/2+t]*m_taps[t];
896  }
897  //end: extend input with mirrored version of itself
898  for(i=inputSize-m_taps.size()/2;i<inputSize;++i){
899  output[i]=m_taps[m_taps.size()/2]*input[i];
900  for(int t=1;t<=m_taps.size()/2;++t)
901  output[i]+=(m_taps[m_taps.size()/2+t]+m_taps[m_taps.size()/2-t])*input[i-t];
902  }
903 }
904 }
905 
906 #endif /* _MYFILTER_H_ */
pktools-2.6.6/doc/html/pktools_2pktoolsUtils_8py_source.html0000644000113200011300000004217112647637661021302 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pktoolsUtils.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktoolsUtils.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pktoolsUtils.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 from PyQt4.QtCore import *
27 from PyQt4.QtGui import *
28 import os
29 import subprocess
30 from qgis.core import QgsApplication
31 from processing.core.ProcessingLog import ProcessingLog
32 from processing.core.ProcessingConfig import ProcessingConfig
33 from processing.tools.system import isWindows, isMac, userFolder
34 
35 class pktoolsUtils():
36 
37  PKTOOLS_FOLDER = "PKTOOLS_FOLDER"
38 
39  @staticmethod
40  def pktoolsPath():
41  folder = ProcessingConfig.getSetting(pktoolsUtils.PKTOOLS_FOLDER)
42 
43  if folder is None or folder == '':
44  if isWindows():
45  testfolder = os.path.join(os.path.dirname(QgsApplication.prefixPath()), 'pktools')
46  testfolder = os.path.join(testfolder, 'bin')
47  if os.path.exists(os.path.join(testfolder, 'pkinfo')):
48  folder = testfolder
49  folder = testfolder
50  else:
51  testfolder = "/usr/bin"
52  if os.path.exists(os.path.join(testfolder, "pkinfo")):
53  folder = testfolder
54  else:
55  testfolder = "/usr/local/bin"
56  if os.path.exists(os.path.join(testfolder, "pkinfo")):
57  folder = testfolder
58  folder = testfolder
59  return folder
60 
61  @staticmethod
62  def runpktools(commands, progress):
63  settings = QSettings()#from gdal
64  loglines = []
65  loglines.append("pktools execution console output")
66  loglines.append(commands)
67  progress.setInfo('pktools command:')
68  commandline = " ".join(commands)
69  progress.setCommand(commandline)
70  proc = subprocess.Popen(
71  commandline,
72  shell=True,
73  stdout=subprocess.PIPE,
74  stdin=open(os.devnull),
75  stderr=subprocess.STDOUT,
76  universal_newlines=True,
77  ).stdout
78  progress.setInfo('pktools command output:')
79 
80  for line in iter(proc.readline, ""):
81  progress.setConsoleInfo(line)
82  loglines.append(line)
83  ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
84 
85  ProcessingLog.addToLog(ProcessingLog.LOG_INFO, commandline)
86  pktoolsUtils.consoleOutput = loglines
87 
88 # @staticmethod
89 # def getConsoleOutput():
90 # return pktoolsUtils.consoleOutput
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop__coll__graph.map0000644000113200011300000000011712616110567024632 00000000000000 pktools-2.6.6/doc/html/build-pkdiff__gui-gcc-Release_2ui__mainwindow_8h_source.html0000644000113200011300000021132112647637661025350 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Release/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QHBoxLayout>
20 #include <QtGui/QHeaderView>
21 #include <QtGui/QLabel>
22 #include <QtGui/QLineEdit>
23 #include <QtGui/QMainWindow>
24 #include <QtGui/QMenu>
25 #include <QtGui/QMenuBar>
26 #include <QtGui/QPlainTextEdit>
27 #include <QtGui/QPushButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStatusBar>
30 #include <QtGui/QTabWidget>
31 #include <QtGui/QTableView>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput;
43  QAction *actionReference;
44  QAction *actionMask;
45  QAction *actionOutput;
46  QAction *actionColor_table;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab_2;
51  QWidget *layoutWidget;
52  QGridLayout *gridLayout_2;
53  QLabel *label_2;
54  QToolButton *toolButton_output;
55  QLineEdit *lclass;
56  QLineEdit *output;
57  QLabel *label_6;
58  QLineEdit *input;
59  QCheckBox *confusion;
60  QLabel *label_14;
61  QToolButton *toolButton_input;
62  QLabel *label_13;
63  QLineEdit *mask;
64  QToolButton *toolButton_mask;
65  QLineEdit *msknodata;
66  QSpacerItem *horizontalSpacer_15;
67  QLabel *label_3;
68  QLineEdit *nclass;
69  QLabel *label_4;
70  QLabel *label_5;
71  QLineEdit *lref;
72  QLabel *label_reference;
73  QLineEdit *reference;
74  QToolButton *toolButton_reference;
75  QSpacerItem *verticalSpacer_2;
76  QComboBox *f;
77  QLabel *label_7;
78  QLineEdit *nodata;
79  QLabel *label;
80  QWidget *widget;
81  QVBoxLayout *verticalLayout_2;
82  QToolButton *commandLinkButtonPrepareTable;
83  QTableView *tableView_labels;
84  QWidget *tab_4;
85  QVBoxLayout *verticalLayout_6;
86  QLabel *label_18;
87  QLineEdit *commandLineEdit;
88  QLabel *label_19;
89  QPlainTextEdit *consoleEdit;
90  QHBoxLayout *horizontalLayout;
91  QPushButton *pushButton_run;
92  QSpacerItem *horizontalSpacer;
93  QPushButton *pushButton_restore;
94  QMenuBar *menuBar;
95  QMenu *menuFile;
96  QToolBar *mainToolBar;
97  QStatusBar *statusBar;
98 
99  void setupUi(QMainWindow *MainWindow)
100  {
101  if (MainWindow->objectName().isEmpty())
102  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
103  MainWindow->resize(810, 777);
104  actionInput = new QAction(MainWindow);
105  actionInput->setObjectName(QString::fromUtf8("actionInput"));
106  actionReference = new QAction(MainWindow);
107  actionReference->setObjectName(QString::fromUtf8("actionReference"));
108  actionMask = new QAction(MainWindow);
109  actionMask->setObjectName(QString::fromUtf8("actionMask"));
110  actionOutput = new QAction(MainWindow);
111  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
112  actionColor_table = new QAction(MainWindow);
113  actionColor_table->setObjectName(QString::fromUtf8("actionColor_table"));
114  centralWidget = new QWidget(MainWindow);
115  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
116  verticalLayout = new QVBoxLayout(centralWidget);
117  verticalLayout->setSpacing(6);
118  verticalLayout->setContentsMargins(11, 11, 11, 11);
119  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
120  tabWidget = new QTabWidget(centralWidget);
121  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
122  tab_2 = new QWidget();
123  tab_2->setObjectName(QString::fromUtf8("tab_2"));
124  layoutWidget = new QWidget(tab_2);
125  layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
126  layoutWidget->setGeometry(QRect(9, 9, 761, 264));
127  gridLayout_2 = new QGridLayout(layoutWidget);
128  gridLayout_2->setSpacing(6);
129  gridLayout_2->setContentsMargins(11, 11, 11, 11);
130  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
131  gridLayout_2->setContentsMargins(0, 0, 0, 0);
132  label_2 = new QLabel(layoutWidget);
133  label_2->setObjectName(QString::fromUtf8("label_2"));
134 
135  gridLayout_2->addWidget(label_2, 5, 5, 1, 1);
136 
137  toolButton_output = new QToolButton(layoutWidget);
138  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
139 
140  gridLayout_2->addWidget(toolButton_output, 4, 3, 1, 1);
141 
142  lclass = new QLineEdit(layoutWidget);
143  lclass->setObjectName(QString::fromUtf8("lclass"));
144 
145  gridLayout_2->addWidget(lclass, 4, 6, 1, 1);
146 
147  output = new QLineEdit(layoutWidget);
148  output->setObjectName(QString::fromUtf8("output"));
149 
150  gridLayout_2->addWidget(output, 4, 2, 1, 1);
151 
152  label_6 = new QLabel(layoutWidget);
153  label_6->setObjectName(QString::fromUtf8("label_6"));
154 
155  gridLayout_2->addWidget(label_6, 4, 5, 1, 1);
156 
157  input = new QLineEdit(layoutWidget);
158  input->setObjectName(QString::fromUtf8("input"));
159 
160  gridLayout_2->addWidget(input, 0, 2, 1, 1);
161 
162  confusion = new QCheckBox(layoutWidget);
163  confusion->setObjectName(QString::fromUtf8("confusion"));
164 
165  gridLayout_2->addWidget(confusion, 6, 0, 1, 1);
166 
167  label_14 = new QLabel(layoutWidget);
168  label_14->setObjectName(QString::fromUtf8("label_14"));
169 
170  gridLayout_2->addWidget(label_14, 3, 5, 1, 1);
171 
172  toolButton_input = new QToolButton(layoutWidget);
173  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
174 
175  gridLayout_2->addWidget(toolButton_input, 0, 3, 1, 1);
176 
177  label_13 = new QLabel(layoutWidget);
178  label_13->setObjectName(QString::fromUtf8("label_13"));
179 
180  gridLayout_2->addWidget(label_13, 3, 0, 1, 1);
181 
182  mask = new QLineEdit(layoutWidget);
183  mask->setObjectName(QString::fromUtf8("mask"));
184 
185  gridLayout_2->addWidget(mask, 3, 2, 1, 1);
186 
187  toolButton_mask = new QToolButton(layoutWidget);
188  toolButton_mask->setObjectName(QString::fromUtf8("toolButton_mask"));
189 
190  gridLayout_2->addWidget(toolButton_mask, 3, 3, 1, 1);
191 
192  msknodata = new QLineEdit(layoutWidget);
193  msknodata->setObjectName(QString::fromUtf8("msknodata"));
194 
195  gridLayout_2->addWidget(msknodata, 3, 6, 1, 1);
196 
197  horizontalSpacer_15 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
198 
199  gridLayout_2->addItem(horizontalSpacer_15, 3, 4, 1, 1);
200 
201  label_3 = new QLabel(layoutWidget);
202  label_3->setObjectName(QString::fromUtf8("label_3"));
203 
204  gridLayout_2->addWidget(label_3, 0, 0, 1, 1);
205 
206  nclass = new QLineEdit(layoutWidget);
207  nclass->setObjectName(QString::fromUtf8("nclass"));
208 
209  gridLayout_2->addWidget(nclass, 7, 2, 1, 1);
210 
211  label_4 = new QLabel(layoutWidget);
212  label_4->setObjectName(QString::fromUtf8("label_4"));
213 
214  gridLayout_2->addWidget(label_4, 4, 0, 1, 1);
215 
216  label_5 = new QLabel(layoutWidget);
217  label_5->setObjectName(QString::fromUtf8("label_5"));
218 
219  gridLayout_2->addWidget(label_5, 2, 5, 1, 1);
220 
221  lref = new QLineEdit(layoutWidget);
222  lref->setObjectName(QString::fromUtf8("lref"));
223 
224  gridLayout_2->addWidget(lref, 2, 6, 1, 1);
225 
226  label_reference = new QLabel(layoutWidget);
227  label_reference->setObjectName(QString::fromUtf8("label_reference"));
228 
229  gridLayout_2->addWidget(label_reference, 2, 0, 1, 1);
230 
231  reference = new QLineEdit(layoutWidget);
232  reference->setObjectName(QString::fromUtf8("reference"));
233 
234  gridLayout_2->addWidget(reference, 2, 2, 1, 1);
235 
236  toolButton_reference = new QToolButton(layoutWidget);
237  toolButton_reference->setObjectName(QString::fromUtf8("toolButton_reference"));
238 
239  gridLayout_2->addWidget(toolButton_reference, 2, 3, 1, 1);
240 
241  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
242 
243  gridLayout_2->addItem(verticalSpacer_2, 8, 0, 1, 1);
244 
245  f = new QComboBox(layoutWidget);
246  f->setObjectName(QString::fromUtf8("f"));
247 
248  gridLayout_2->addWidget(f, 5, 6, 1, 1);
249 
250  label_7 = new QLabel(layoutWidget);
251  label_7->setObjectName(QString::fromUtf8("label_7"));
252 
253  gridLayout_2->addWidget(label_7, 7, 0, 1, 1);
254 
255  nodata = new QLineEdit(layoutWidget);
256  nodata->setObjectName(QString::fromUtf8("nodata"));
257 
258  gridLayout_2->addWidget(nodata, 0, 6, 1, 1);
259 
260  label = new QLabel(layoutWidget);
261  label->setObjectName(QString::fromUtf8("label"));
262 
263  gridLayout_2->addWidget(label, 0, 5, 1, 1);
264 
265  widget = new QWidget(tab_2);
266  widget->setObjectName(QString::fromUtf8("widget"));
267  widget->setGeometry(QRect(11, 281, 391, 331));
268  verticalLayout_2 = new QVBoxLayout(widget);
269  verticalLayout_2->setSpacing(6);
270  verticalLayout_2->setContentsMargins(11, 11, 11, 11);
271  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
272  verticalLayout_2->setContentsMargins(0, 0, 0, 0);
273  commandLinkButtonPrepareTable = new QToolButton(widget);
274  commandLinkButtonPrepareTable->setObjectName(QString::fromUtf8("commandLinkButtonPrepareTable"));
275 
276  verticalLayout_2->addWidget(commandLinkButtonPrepareTable);
277 
278  tableView_labels = new QTableView(widget);
279  tableView_labels->setObjectName(QString::fromUtf8("tableView_labels"));
280 
281  verticalLayout_2->addWidget(tableView_labels);
282 
283  tabWidget->addTab(tab_2, QString());
284  tab_4 = new QWidget();
285  tab_4->setObjectName(QString::fromUtf8("tab_4"));
286  verticalLayout_6 = new QVBoxLayout(tab_4);
287  verticalLayout_6->setSpacing(6);
288  verticalLayout_6->setContentsMargins(11, 11, 11, 11);
289  verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6"));
290  label_18 = new QLabel(tab_4);
291  label_18->setObjectName(QString::fromUtf8("label_18"));
292 
293  verticalLayout_6->addWidget(label_18);
294 
295  commandLineEdit = new QLineEdit(tab_4);
296  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
297 
298  verticalLayout_6->addWidget(commandLineEdit);
299 
300  label_19 = new QLabel(tab_4);
301  label_19->setObjectName(QString::fromUtf8("label_19"));
302 
303  verticalLayout_6->addWidget(label_19);
304 
305  consoleEdit = new QPlainTextEdit(tab_4);
306  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
307 
308  verticalLayout_6->addWidget(consoleEdit);
309 
310  tabWidget->addTab(tab_4, QString());
311 
312  verticalLayout->addWidget(tabWidget);
313 
314  horizontalLayout = new QHBoxLayout();
315  horizontalLayout->setSpacing(6);
316  horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
317  pushButton_run = new QPushButton(centralWidget);
318  pushButton_run->setObjectName(QString::fromUtf8("pushButton_run"));
319 
320  horizontalLayout->addWidget(pushButton_run);
321 
322  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
323 
324  horizontalLayout->addItem(horizontalSpacer);
325 
326  pushButton_restore = new QPushButton(centralWidget);
327  pushButton_restore->setObjectName(QString::fromUtf8("pushButton_restore"));
328 
329  horizontalLayout->addWidget(pushButton_restore);
330 
331 
332  verticalLayout->addLayout(horizontalLayout);
333 
334  MainWindow->setCentralWidget(centralWidget);
335  menuBar = new QMenuBar(MainWindow);
336  menuBar->setObjectName(QString::fromUtf8("menuBar"));
337  menuBar->setGeometry(QRect(0, 0, 810, 27));
338  menuFile = new QMenu(menuBar);
339  menuFile->setObjectName(QString::fromUtf8("menuFile"));
340  MainWindow->setMenuBar(menuBar);
341  mainToolBar = new QToolBar(MainWindow);
342  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
343  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
344  statusBar = new QStatusBar(MainWindow);
345  statusBar->setObjectName(QString::fromUtf8("statusBar"));
346  MainWindow->setStatusBar(statusBar);
347  QWidget::setTabOrder(input, toolButton_input);
348  QWidget::setTabOrder(toolButton_input, nodata);
349  QWidget::setTabOrder(nodata, reference);
350  QWidget::setTabOrder(reference, toolButton_reference);
351  QWidget::setTabOrder(toolButton_reference, lref);
352  QWidget::setTabOrder(lref, mask);
353  QWidget::setTabOrder(mask, toolButton_mask);
354  QWidget::setTabOrder(toolButton_mask, msknodata);
355  QWidget::setTabOrder(msknodata, output);
356  QWidget::setTabOrder(output, toolButton_output);
357  QWidget::setTabOrder(toolButton_output, lclass);
358  QWidget::setTabOrder(lclass, f);
359  QWidget::setTabOrder(f, confusion);
360  QWidget::setTabOrder(confusion, nclass);
361  QWidget::setTabOrder(nclass, commandLinkButtonPrepareTable);
362  QWidget::setTabOrder(commandLinkButtonPrepareTable, tableView_labels);
363  QWidget::setTabOrder(tableView_labels, consoleEdit);
364  QWidget::setTabOrder(consoleEdit, pushButton_restore);
365  QWidget::setTabOrder(pushButton_restore, pushButton_run);
366  QWidget::setTabOrder(pushButton_run, commandLineEdit);
367  QWidget::setTabOrder(commandLineEdit, tabWidget);
368 
369  menuBar->addAction(menuFile->menuAction());
370  menuFile->addAction(actionInput);
371  menuFile->addAction(actionReference);
372  menuFile->addAction(actionMask);
373  menuFile->addAction(actionOutput);
374 
375  retranslateUi(MainWindow);
376 
377  tabWidget->setCurrentIndex(0);
378 
379 
380  QMetaObject::connectSlotsByName(MainWindow);
381  } // setupUi
382 
383  void retranslateUi(QMainWindow *MainWindow)
384  {
385  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkdiff_gui", 0, QApplication::UnicodeUTF8));
386  actionInput->setText(QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
387  actionInput->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
388  actionReference->setText(QApplication::translate("MainWindow", "Reference", 0, QApplication::UnicodeUTF8));
389  actionReference->setShortcut(QApplication::translate("MainWindow", "Alt+T", 0, QApplication::UnicodeUTF8));
390  actionMask->setText(QApplication::translate("MainWindow", "Mask", 0, QApplication::UnicodeUTF8));
391  actionMask->setShortcut(QApplication::translate("MainWindow", "Alt+M", 0, QApplication::UnicodeUTF8));
392  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
393  actionOutput->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
394  actionColor_table->setText(QApplication::translate("MainWindow", "Color table", 0, QApplication::UnicodeUTF8));
395  actionColor_table->setShortcut(QApplication::translate("MainWindow", "Alt+C", 0, QApplication::UnicodeUTF8));
396  label_2->setText(QApplication::translate("MainWindow", "OGR output format", 0, QApplication::UnicodeUTF8));
397  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
398  label_6->setText(QApplication::translate("MainWindow", "class label", 0, QApplication::UnicodeUTF8));
399  confusion->setText(QApplication::translate("MainWindow", "confusion matrix", 0, QApplication::UnicodeUTF8));
400  label_14->setText(QApplication::translate("MainWindow", "msknodata", 0, QApplication::UnicodeUTF8));
401  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
402 #ifndef QT_NO_TOOLTIP
403  label_13->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Dimensions of mask image must correspond to input image. Pixels in mask with values=masknodata are not classified and get nodata value.</p></body></html>", 0, QApplication::UnicodeUTF8));
404 #endif // QT_NO_TOOLTIP
405  label_13->setText(QApplication::translate("MainWindow", "Mask image", 0, QApplication::UnicodeUTF8));
406  toolButton_mask->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
407 #ifndef QT_NO_TOOLTIP
408  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input image. Both OGR vectors and GDAL rasters are supported. Number of bands must match those in training sample.</p></body></html>", 0, QApplication::UnicodeUTF8));
409 #endif // QT_NO_TOOLTIP
410  label_3->setText(QApplication::translate("MainWindow", "Input data", 0, QApplication::UnicodeUTF8));
411  label_4->setText(QApplication::translate("MainWindow", "Output data", 0, QApplication::UnicodeUTF8));
412  label_5->setText(QApplication::translate("MainWindow", "class label", 0, QApplication::UnicodeUTF8));
413  label_reference->setText(QApplication::translate("MainWindow", "Reference", 0, QApplication::UnicodeUTF8));
414  toolButton_reference->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
415  label_7->setText(QApplication::translate("MainWindow", "Number of classes to prepare table", 0, QApplication::UnicodeUTF8));
416  label->setText(QApplication::translate("MainWindow", "nodata", 0, QApplication::UnicodeUTF8));
417  commandLinkButtonPrepareTable->setText(QApplication::translate("MainWindow", "prepare table", 0, QApplication::UnicodeUTF8));
418  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Input/Output", 0, QApplication::UnicodeUTF8));
419  label_18->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
420  label_19->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
421  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
422 #ifndef QT_NO_TOOLTIP
423  pushButton_run->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Classify with current settings (check Console for output)</p></body></html>", 0, QApplication::UnicodeUTF8));
424 #endif // QT_NO_TOOLTIP
425  pushButton_run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
426 #ifndef QT_NO_TOOLTIP
427  pushButton_restore->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>reset all parameters to default</p></body></html>", 0, QApplication::UnicodeUTF8));
428 #endif // QT_NO_TOOLTIP
429  pushButton_restore->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
430  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
431  } // retranslateUi
432 
433 };
434 
435 namespace Ui {
436  class MainWindow: public Ui_MainWindow {};
437 } // namespace Ui
438 
439 QT_END_NAMESPACE
440 
441 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/inherit_graph_19.png0000644000113200011300000000276012616110570015502 00000000000000‰PNG  IHDRu%óè1bKGDÿÿÿ ½§“¥IDAThí™mHS_Ç÷ßßA³¹Rw7+ÓÌæÓ°Ù!{ˆ¡¾ÜR/tdBEoäJ¾Ðጤ'²h ‘¤É™`X[Dã:0ÁY>d š0¼{ÈÒËíÅùsÿ·mJ¶Ýr?¯Î9ûý~ç»ïÎ=;÷^Œaàþ¶€Žà/¿þò‹à/¿üËí,--]¹remmío©Ù466jµZ¶û‹¿‡Ãb±ètº„«Ú!Øív³Ù¼©¿³Ùœ@I; ½^6"ì¿ü"øË/‚¿ü"øË/â/†asss±ÌŠqؽ{·F£!I2–‚077‡aØoƒA‚ Ž;&‘HN:uóæÍD寭ßׯ_{<Çãr¹Ž=zîܹ„=iòûý'Ož|ûö­Ñh|÷î]KKKooïÙ³gišŽû\QÎg‰A&“) P(·nÝ’Ëå^¯ÇñLÝÞÞ.“Él6Û®]»@©TVTT¨Tªžžž‹/Æw®X×/†a?.((ÉdÏž=;|ø°T*mmm†aîÝ»WXX˜’’RVVf±X¢^ÂIII"‘H*•¢îúú:Ar¹Çq‚ Ö××Àb±”””ˆÅ⌌ŒŽŽ iº³³S©TJ$FóæÍ›ÍÒÑÖa³Ù:499i2™ÚÚÚ¹ˆääd‚ L&STÁaéÛ3ˆáÐßß6p»Ýl»¶¶–¢¨G€^¯§(êþýû°²²òðáÃŒŒŒx½Þ±±±ÜÜ\TH’ôûý~¿ÿóçÏ—/_®¯¯gëÆššš¥¥%—ËuüøñëׯS%‰ Ãòò²Éd€¯_¿vuuá8>88øåË—áááýû÷£â‘én·ªªªÆÇÇ———Àëõ†}©W¯^Éåò¨‚¹é@` gt:N§ûÅ«Øýu: Ãüøñ#¬ív»U*Uoo/›Ø××ÇúËeÏž=ïß¿gÃòóó=j©Õêïß¿ÏÌÌš¦'&&Pq¥RùäÉ6ëéÓ§¨xd:2Èår1 ãóù¢úk·ÛÓÓÓ£ æ¦oM¤¿qØ% $%%…µàÇ*•Š,,,dÛn·­ŽP(ÔÖÖf0ìv;úhaa!##ƒ”J¥"‘hvv¶¡¡!””” ñOŸ>©Õj6¬¸¸x³tÔÈÏÏ€½{÷* ’$ËË˹߂$É'N¼|ùr3Á(}»ð{~ÈÊÊšžžf»333‘1b±¸®®nzzš]×éééìõáóùÇ·oßôz=AN§³»»…eggOMM±u؉"ÓÑ8û«Ÿ?¾½½{ZƒF£±²²r Álúöà.æ?Û¶hß½{÷àÁƒ£££+++6›-//ð°H†a€¢(Ô½víšV«]XX˜šš:}úôÕ«W}>†aV«5 677€Óé¼sçŽãÏŸ?÷xôóúGž‡>Ïï›øÎÓ'MKC<D·ø™Úö0  Œ‚FA£ QÀ(H`$0  Œ‚FA£ !ÌŸƒ›šš°{÷n¥f!…$$$`×®]S>>ÄŸ÷Säç磥å#¬\i˜ò¤¬7zàvŸ‡?o“ñëJ+WPSsÀßÓBÞÿ(Üîý:ï)H`$0  Œ‚F1Aw÷HIYªöªbŒáæÍµÇPUPF166†úú½ÈÎNCRR žy&gδ ..kÖdÒÒô*O©¿_¼šŽÞ}÷/¨­­†Ã±ÉÉ|úiÌæ €#GN 33gÏ^QyJõå•âí·wÃjÝŠììÌŸ‰U«²`±”«=–feÝÝ_ !!ÉgŸ^Ÿ¨Ò4Ú”QDF.@GG»Ï¾k×:TšF{‚òž"/o-*+mŸƒ+RqùòETUÙ}38øfϾW¥ Õ”Q¬_oÂèèŽ2ô÷÷A¯_«ÕŽ’’õˆŽŽEjj:ÒÒÄÅ‹ÝjªŠ Œ",ìç0™6ÁdÚäÝwýz 44 .µFÓ„ ¼§ Ûc$0ŠÿZ´h :;ƒûåíqŒ‚FA£ QÀ(H`$0  Œ‚FA£ QÀ(H`$0 úv<»ÝŠÎÎàýÍTÍšuìö×°`At@Ö hõõ{ššŽ… c¹ì´×Ü܈ÜÜggfPT´¹¹ù^vZ‹ˆ èz¼§ QÀ(H`$0  Œ‚FA£ QÀ(H`$0  Œ‚„iEW×gwôƒñÇßzœÇãAa¡ÑÑ¿˜tûn¸Ó¹ÕToîÜûP\üG@oïWhlü+ÚÚ®Oº}·×ײiy¥˜*nl¶€¡¡!@ttì¤Ûw{}-Ólã—Z—«ƒ˖͇Õú û<Îãñ`Ë 22’Ñß߇ÑÑQÔÔ¼ƒabbÂñä“¿FkëYŸs@vv:@¯ÿå¤Û·ãñxpà@ÒÓ—#6vžz*|p\|7o °Ðˆûï×!/o-€ÿsl¶WpúôI=z:¼õÖŸQ[[;ë`0¤£­Íââõâ¼'NœAjj<®\étûv܇êjjjöaÅŠ´·âýjˆ™@³WŠqÛ¶U#..))i(/ßŽÆÆƒÞßÙíVÔÖVcÿþDDèû÷×aëÖ*ää¬Fdd²²~‹ŠŠJEgª«{v{23Ÿ€N7=ö8JKÿ¤èjÒ|qqñÞŸããDOÏ—Þm·ûydœÎW½ûzzº‘””ìsŽÄćéóÏ;‘ðÏ>½~ù¤õçë¥Õ¢ù(:;¯ÝòóUDE-ðn:t NgŽ9Œ––S€ØØÅho¿àsŽŽŽKŠÎ³HœóêÕË>Û###~üîñéFóQ”–£«ë3¸Ýç°mÛfä罿›=û^,]ªGI‰/¿ü†‡¿Ç /¼›m\®f|ýu/Nžü*++iݺßÃf{§NÀÀ@?NŸþ'vìØŠÌ{ ¡¡ß~û öìÙ¥èÚ ùͼ¼µX½úq ~‡§Ÿþ6n,õy €’+ššáõ×wÀbÙ‚~ø7**,èí½Äć±wïß••®ØLEÅR„þþ> ¿‚Ý^…ââuÐéæ¡¬Ìòr3œÎWáp8qüøß[;4…ÑX£±Àgß’%K10ðÓsõ¬Y÷àܹŸ>£j2Y`2Y|Žüø¿Ï1qûv>üÐ…Gý 6l(ñî;vì=DE-˜Íe0›ËÄÚw²†š4ÿô¡E—.µ¡°Ðˆ >ÆÐРΟ?ƒíÛ·à¹çÖ©=š"4{¥ŸƒçŸ/Tmýÿõ"“Ù\£1}}ÿÂâÅK`4¾¨ê¼JÒl<0Ngjëÿ?—ù²2G& <>}À(H`$0  Œ‚FA£ QÀ(H`$0  Œ‚FA£ !ào²©®vàwözYº¢  hZ~Bm99kœœ°õÅæÍ3óík3 ï)H`$0  Œ‚FA£ Qà׋W¡¡¡p¹šárE(5) 44Ô¯ãC<~üQ¦®®.´¶¶ú5)/22S>Þ¯(hfâ= Œ‚FA£ QÀ(H`$0  Œ‚FA£ Q Qí!H[þ,È¿aÔ{òIEND®B`‚pktools-2.6.6/doc/html/tab_a.png0000644000113200011300000000021612647637661013431 00000000000000‰PNG  IHDR$ÇÇ[UIDATxíK €0C'o¤(Šˆ[Žà%Üxÿ#Ù©­ç ùÁöó¦W¦e# 3t I 3+¼øEã~\D½9¯Ûàè’wM·¿öÿ}Yõ_êA4Yžã}IEND®B`‚pktools-2.6.6/doc/html/classSolver__NU__inherit__graph.map0000644000113200011300000000022012616110567020574 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask__coll__graph.map0000644000113200011300000000013312616110567026040 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm__coll__graph.md50000644000113200011300000000004012616110566024240 000000000000002ccee9e3c7ca2e8bb6385bb7d490defdpktools-2.6.6/doc/html/ImgWriterGdal_8h_source.html0000644000113200011300000011510712647637662017232 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgWriterGdal.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgWriterGdal.h
1 /**********************************************************************
2 ImgWriterGdal.h: class to write raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 n
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGWRITERGDAL_H_
21 #define _IMGWRITERGDAL_H_
22 
23 #include <assert.h>
24 #include <fstream>
25 #include <string>
26 #include <sstream>
27 #include "gdal_priv.h"
28 #include "ImgRasterGdal.h"
29 #include "ImgReaderGdal.h"
30 #include "ImgReaderOgr.h"
31 
32 //--------------------------------------------------------------------------
33 class ImgWriterGdal : public virtual ImgRasterGdal
34 {
35 public:
36  ImgWriterGdal(void);
37  ~ImgWriterGdal(void);
38  void open(const std::string& filename);
39  void open(const std::string& filename, const ImgReaderGdal& imgSrc, const std::vector<std::string>& options=std::vector<std::string>());
40  void open(const std::string& filename, int ncol, int nrow, int nband, const GDALDataType& dataType, const std::string& imageType, const std::vector<std::string>& options=std::vector<std::string>());
41  void close(void);
42 
43  void copyGeoTransform(const ImgReaderGdal& imgSrc);
44  void setProjection(const std::string& projection);
45  std::string setProjectionProj4(const std::string& projection);
46 
47  void setImageDescription(const std::string& imageDescription){m_gds->SetMetadataItem( "TIFFTAG_IMAGEDESCRIPTION",imageDescription.c_str());};
48  void setGeoTransform(double* gt);
49 
50  template<typename T> bool writeData(T& value, const GDALDataType& dataType, int col, int row, int band=0) const;
51  template<typename T> bool writeData(std::vector<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int row, int band=0) const;
52  template<typename T> bool writeData(std::vector<T>& buffer, const GDALDataType& dataType, int row, int band=0) const;
53  bool writeData(void* pdata, const GDALDataType& dataType, int band=0) const;
54  template<typename T> bool writeDataBlock(Vector2d<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band=0) const;
55  // std::string getInterleave(){return m_interleave;};
56  // std::string getCompression(){return m_compression;};
57  void setColorTable(const std::string& filename, int band=0);
58  void setColorTable(GDALColorTable* colorTable, int band=0);
59  void setMetadata(char** metadata);
60  void rasterizeOgr(ImgReaderOgr& ogrReader, const std::vector<double>& burnValues=std::vector<double>(), const std::vector<std::string>& layernames=std::vector<std::string>());
61 
62 protected:
63  void setCodec(const GDALDataType& dataType, const std::string& imageType);
64  void setCodec(const ImgReaderGdal& ImgSrc);
65 
66  /* double m_ulx; */
67  /* double m_uly; */
68  /* double m_delta_x; */
69  /* double m_delta_y; */
70  /* bool m_isGeoRef; */
71  // std::string m_interleave;
72  // std::string m_compression;
73  std::vector<std::string> m_options;
74 };
75 
76 template<typename T> bool ImgWriterGdal::writeData(T& value, const GDALDataType& dataType, int col, int row, int band) const
77 {
78  //fetch raster band
79  GDALRasterBand *poBand;
80  if(band>=nrOfBand()+1){
81  std::ostringstream s;
82  s << "band (" << band << ") exceeds nrOfBand (" << nrOfBand() << ")";
83  throw(s.str());
84  }
85  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
86  if(col>=nrOfCol()){
87  std::ostringstream s;
88  s << "col (" << col << ") exceeds nrOfCol (" << nrOfCol() << ")";
89  throw(s.str());
90  }
91  if(col<0){
92  std::ostringstream s;
93  s << "col (" << col << ") is negative";
94  throw(s.str());
95  }
96  if(row>=nrOfRow()){
97  std::ostringstream s;
98  s << "row (" << row << ") exceeds nrOfRow (" << nrOfRow() << ")";
99  throw(s.str());
100  }
101  if(row<0){
102  std::ostringstream s;
103  s << "row (" << row << ") is negative";
104  throw(s.str());
105  }
106  poBand->RasterIO(GF_Write,col,row,1,1,&value,1,1,dataType,0,0);
107  return true;
108 }
109 
110 template<typename T> bool ImgWriterGdal::writeData(std::vector<T>& buffer, const GDALDataType& dataType, int minCol, int maxCol, int row, int band) const
111 {
112  //fetch raster band
113  GDALRasterBand *poBand;
114  if(band>=nrOfBand()+1){
115  std::ostringstream s;
116  s << "band (" << band << ") exceeds nrOfBand (" << nrOfBand() << ")";
117  throw(s.str());
118  }
119  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
120  if(buffer.size()!=maxCol-minCol+1){
121  std::string errorstring="invalid buffer size";
122  throw(errorstring);
123  }
124  if(minCol>=nrOfCol()){
125  std::ostringstream s;
126  s << "minCol (" << minCol << ") exceeds nrOfCol (" << nrOfCol() << ")";
127  throw(s.str());
128  }
129  if(minCol<0){
130  std::ostringstream s;
131  s << "mincol (" << minCol << ") is negative";
132  throw(s.str());
133  }
134  if(maxCol>=nrOfCol()){
135  std::ostringstream s;
136  s << "maxCol (" << maxCol << ") exceeds nrOfCol (" << nrOfCol() << ")";
137  throw(s.str());
138  }
139  if(maxCol<minCol){
140  std::ostringstream s;
141  s << "maxCol (" << maxCol << ") is less than minCol (" << minCol << ")";
142  throw(s.str());
143  }
144 
145  if(row>=nrOfRow()){
146  std::ostringstream s;
147  s << "row (" << row << ") exceeds nrOfRow (" << nrOfRow() << ")";
148  throw(s.str());
149  }
150  if(row<0){
151  std::ostringstream s;
152  s << "row (" << row << ") is negative";
153  throw(s.str());
154  }
155  poBand->RasterIO(GF_Write,minCol,row,buffer.size(),1,&(buffer[0]),buffer.size(),1,dataType,0,0);
156  return true;
157 }
158 
159 template<typename T> bool ImgWriterGdal::writeData(std::vector<T>& buffer, const GDALDataType& dataType, int row, int band) const
160 {
161  //fetch raster band
162  GDALRasterBand *poBand;
163  if(band>=nrOfBand()+1){
164  std::ostringstream s;
165  s << "band (" << band << ") exceeds nrOfBand (" << nrOfBand() << ")";
166  throw(s.str());
167  }
168  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
169  if(buffer.size()!=nrOfCol()){
170  std::string errorstring="invalid buffer size";
171  throw(errorstring);
172  }
173  if(row>=nrOfRow()){
174  std::ostringstream s;
175  s << "row (" << row << ") exceeds nrOfRow (" << nrOfRow() << ")";
176  throw(s.str());
177  }
178  poBand->RasterIO(GF_Write,0,row,buffer.size(),1,&(buffer[0]),buffer.size(),1,dataType,0,0);
179  return true;
180 }
181 
182 template<typename T> bool ImgWriterGdal::writeDataBlock(Vector2d<T>& buffer, const GDALDataType& dataType , int minCol, int maxCol, int minRow, int maxRow, int band) const
183 {
184  //fetch raster band
185  GDALRasterBand *poBand;
186  if(band>=nrOfBand()+1){
187  std::ostringstream s;
188  s << "band (" << band << ") exceeds nrOfBand (" << nrOfBand() << ")";
189  throw(s.str());
190  }
191  poBand = m_gds->GetRasterBand(band+1);//GDAL uses 1 based index
192  assert(buffer.size()==maxRow-minRow+1);
193  for(int irow=minRow;irow<=maxRow;++irow)
194  writeData(buffer[irow-minRow], dataType, minCol, maxCol, irow, band);
195  return true;
196 }
197 
198 #endif // _IMGWRITERGDAL_H_
199 
200 
201 // adfGeoTransform[0] /* top left x */
202 // adfGeoTransform[1] /* w-e pixel resolution */
203 // adfGeoTransform[2] /* rotation, 0 if image is "north up" */
204 // adfGeoTransform[3] /* top left y */
205 // adfGeoTransform[4] /* rotation, 0 if image is "north up" */
206 // adfGeoTransform[5] /* n-s pixel resolution */
pktools-2.6.6/doc/html/inherit_graph_39.png0000644000113200011300000000270512647437044015517 00000000000000‰PNG  IHDR“%FvÛ}bKGDÿÿÿ ½§“zIDATxœí›MHT_ÆŸÛüCÅ¡fR²ŠœH’„tm$¤]‘QMF¶±…&š¹0%ÜT»‚IÐf(' ŒZDTCТ1ˆœüÀ\˜ÕÓ|ZD—fæÎ;vfÄ?ç.Î9ï¼ïsÆç¾÷ÌeF!IH$ÿ΃UË­@òÿAšI" i&‰0¤™$Âø/~bddøùóçr葬JKKqãÆ„y%þÓœ×ëÅÑ£GqäÈ‘¬‰“¬FGGáóù óàABgúƒ×ëͬ*ÉŠäO³ÑCž™$Âf’CšI" i&‰0„˜IUU´´´`ëÖ­ÈË˃ËåBgg§©Ç Á`Š¢ˆ‘Ë¡YÔ^EA0LGuuu°Z­ÿ\Ó I?Í¥ÃÙ³g1<<Œ‡bóæÍøôéš››155…›7oŠ(!œlh‡Ãسg¾~ý °Ùlhkk’Û _¾|ÇãÁððpv 2ŽÞÞ^êLb³Ùèóùbæ^¿~M§Ó™òµ@ íz"ȆæLí À²Ô7ð‡WÈmnÍš5¸uë&''µ¹}ûöÅ\333¨¯¯Gaa!Š‹‹ÑÒÒ’pK9xð .\¸ ççça·ÛñôéS@$Akk+ŠŠŠ°~ýz´¶¶"‰h·/^ÀétâÍ›7 ·”ø±(ÍFuªªª6lÐ5ʯ( <JKK±nÝ:\»v-éûŸ,6¾¾Ù=-™4œ—”gÏžÑáp0''‡û÷ïçõë×944sâÄ VWW3 Ñï÷³¬¬Œ]]]1WÏýû÷ét:¹¸¸H’ìïïç¦M›‰DH’W¯^åáÇ922B¿ßÏÝ»wóÒ¥KZŽðåË—TU•333ìééÑêÇEiŽ¿úÍ®å'wŸÚÚZNOO³§§‡899©­ýÝ™’Åêu&£šf0êLBÌD’Ñh”>ŸW®\aYY- =Iraa‹…?~Ôâ=zÄ’’’˜ ÏÎÎ2??ŸïÞ½#I;vŒíííÚkvìØÁññqmüüùs–——k9ü~Ö5/ÕLFùÉßyõê•û·ô̤_?UM3dÔLªªòÞ½{ŒF£ÚÜââ";::èp8H’£££À¹¹9-Æï÷3777aÃn·›/^¤ªªÌÏÏçàà ¶–››K1k×®Õr,,,d]s¼þÁÁASf2ÊOþ6ÈçÏŸµµTfÒ‹¯Ÿª¦2zf" ·ÛmNQÔÔÔ ŠŠŠ`±X‡µ˜P(‡Ã‘ïøñãèëëÃãÇQQQ—Ë¥­"€$Hbzz>ŸO[_½zõ²h ½nllÌ”3ùW­2ÿï1›îžÒ& ç%åÔ©Sܾ};Ÿ—ˆCšI" i&‰0¤™$ÂøÙ·OžUaŸtIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask-members.html0000644000113200011300000002302312647637662025160 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkgetmask.pkgetmask Member List

This is the complete list of members for qgis.pktools.pkgetmask.pkgetmask, including all inherited members.

BAND (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
cliName (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmask
DATA (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
defineCharacteristics (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmask
EXTRA (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
group (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmask
INPUT (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
MAX (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
MIN (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
name (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmask
NODATA (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
OPERATOR (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
OPERATOR_OPTIONS (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
OUTPUT (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
processAlgorithm (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmask
RTYPE (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
TYPE (defined in qgis.pktools.pkgetmask.pkgetmask)qgis.pktools.pkgetmask.pkgetmaskstatic
pktools-2.6.6/doc/html/classOptionpk__coll__graph.map0000644000113200011300000000022212616110567017655 00000000000000 pktools-2.6.6/doc/html/inherit_graph_41.map0000644000113200011300000000026712647437044015502 00000000000000 pktools-2.6.6/doc/html/classFileReaderAscii__coll__graph.map0000644000113200011300000000117312616110567021033 00000000000000 pktools-2.6.6/doc/html/dir_5f1e10fd305b434def78aaf73fd56d60_dep.png0000644000113200011300000000545312616110567020563 00000000000000‰PNG  IHDRå43bKGDÿÿÿ ½§“ àIDATxœíÝ{PT×ð/…NRSÁ²S ÃP ÃP ÃP ÃP ÃP0ç1nÜH{ƒ¬ÀP07oÞÄ·ß¶Û{d†Òݼyyyo!6v<"#ý1cF,ÊÊJìŽéÓcãLJÙy”d)«?<@ýïý÷ßEvv&ÒÓßÄØ±1øê«/‘”4°gÏaLžÏ>;cçQ’¥øNé€Þ~{’“W 6v*¼¼¼1iÒƒX´h¹½‡E6ÂP: ÆÆó4Øv·FC¶ÆP: oïa¨®>m°­¦¦ÚN£![ã3¥Š‹›‰µkµ<ØcÆD£ªêÖ¯O3ØçêÕ+4è.;¬ÁP: ^HÄHOOA[[+ÂÂ"œœ† ^€Ÿ_¢£'`üøQ8uªÑÞC% 0”ÈÅåçHL\ŒÄÄÅúm uggÛkhd|¦$†¡$†¡ †Bm-?^70”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂôÛϤ¥%£¶–?LŽéŽ;îDZZ† óëóZýʼ¼íˆŽž__ÿþ*Id3EE…˜6í‰J˜7ïUL›ߟ%‰lÂÝÝ©ßjñ™’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H‘¡¬«;gÑ÷׺gªKjôö˜÷ïzœR sæ$ÀÏï—Ý®÷KçÓ–ÜÝ –1c1wîShm½dÖñΡ¿ˆ ¥¥Ü܆à•W^³÷0nÓu\--ÿBaa>Êʾêv½¯ëÛÓ¡CGuu3*+¿Fvv.._þ“&Eá»ï¾µ÷ÐDP¡Ôh< Õ®³÷0nÓu\?¿€n×ûº¾=i4žðò _Üwßïñî»!00[·n´÷ÐDÊÂÂ|DE#$ÄIIsÑÑqõ¶ÛsnYoܸ͛3 ÿÁ˜2åw8yò³nkþØGqqbbÂê…ääù¸víšÁ~J)¼þú"Lœ8mm­FktWlì@XØÐn×QJ!77&D À>:‡¸íÙÜy1Õggg'Ö­Ó"22!!ž˜;÷)ý»š±6s999aöì—pøðAý¶ëׯ#5u1¼ê…ÔÔŸ~ýº¾½·×„±ó“Jt(óóu(,ü»wÀñ㟠#c•Eýlßž…ììLhµo ¼ü,’’R Õ.1zÌÎÅîݰk×~|òÉß°iÓOï4J)hµKpâD öî-FãavÇËgδt»nÌ{ïíDff:Ö¬ÙˆŠŠ:,\¸ ))¯š=½í3'göíû±oß1œ;wo¾¹Úd[o… ¾¾V¿¾uëF44ÔãèÑrìÝ[‚ÒÒ£X»6UßÞÛk¢/欯‰åš5›‚qãÆcùòÕøè£‹úÑér°bÅzLú¼½}ðàƒ!5u­ÑcV­Ê4¨]Xøž¾---ÙÙ™Ðé àî®±¸Foåäüiië1yò¡Ñxàþûÿ€¥KWöYŸyy;°lÙ*DDD"<|4¶lÉÅ=÷üÖd›5òós‘‘‘ __DDDbÅŠ7PRò±¾½·×D_ÌY_ë×_³ë­ààýëQhii¾m¥”É~šš9Ö`ÛÝwÿZÿºë­LyyM·µ›š¾Ö¯WT|Ž{ï„ Ö`Ë–·Íªa õõµm°-,,¢Û}ÍK×ó½óÎ_ôØgccƒÁ<„††#44ÜdÛ­5ÚÛ{K]] FŒÖ¯_¸p£Fùìãêê¦ÝÛk¢7s&…èwÊÚÚš.¯ÏÂ߸~½³³ÐÜÜd²Ÿ€€@œ>ý…Á¶êêJýëöv¥_zªíã3L¿¾k×~l؃={v£´ô˜Y5lÁßøm}ž=[e°nμt=_c}úø Ã… çõÛOú§þÕXÛ­5z¢”‚N·±±ë·i4(/¯Ñ[_ÿ Ž)Ó·÷öš0gΤÊåË“PWwŸcÕªexòÉgàæ6PP‡Ë—¿ÇöíY&û™=û%hµ‹Q\\„‹[PRò±ÁsJw–.}Å v||‚¾mР»0rd,HÆÂ…/áÚµ,ªÑ[Ï?ÿ2´Ú%8vì0ÚÛÛpâÄQ¬[·NNNÍ‹©>ŸxbÒÓSPUuUU§±dI"Àh[OÚÚ.áâÅ477áÓOcÖ¬ÇÐÐPyóê÷yä‘éX¹r)PYù%f̘‚;¶èÛ{{M;?±”âââÔC=ªjkÛM.”NW ÚÛ•É¥¼¼FP;wîVÊÓÓK½ür’ji¹¦ÚÛ•JIIWnnCÔˆÁ*?¿H08îÖ×—.uª•+3TPÐH5hÐ]*&æ7êÈ‘2}{wµ³²v(ÿáJ£ñP/¾øgÕÜÜaÐg{»RÍÍ*88T½öšÖhžÆÕݺ±¥µõ†Z½z£1"X¹ºº©˜¢ò󋔇‡§ÙóÒ›>››P‰‰‹ÔСÔ««›züñ?©úúoþî=·u·0X|}ýU\ÜLuæÌ¿ ö»pá{5sæl5dȯ”»»F=ýô‹ª©éŠÅׄ©93wùß5¡3yge锕±RNÊœ‡²ÄÇÇãÊ•ÿ`óæ\“û»C§+ÿ éuuçbô¶Ë^:__Œ=F¿mÿþ‘™™ŽãÇ+Äô)‰­ÎÏÝÝ YY:<üð4£û<¸óç?kÖß:z"úö• UV~‰9sðÅÿ@GÇU”——aõê×1kÖó¢ú”ÄÏOô__íað`W<óÌ»Õ7õÚII)HH˜†ÖÖK BB³Vwþü%èè¸jÓ>%qÄóc(oáéé… rìVßœÛæ””t›ÕsqqAJJºMû”ÄÏ·¯DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂ0”DÂôë—œ33ÓñÎ;oõgI"‡Óo¡|î¹yfýF+‘DS§NÇØ±ãú¥V¿…rÙ2Çù9"{â3%‘0 %‘0 %‘0 %‘0 %‘0 %‘0 %‘0 %‘0V}xÀÙÙÅÅE(.v·Õxˆž³³³UÇ[õÿSÖÕÕáäÉ“V €h ñööÆÄ‰->ÞªP‘íñ™’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H†’H…öýä¿°çÈ|?u6IEND®B`‚pktools-2.6.6/doc/html/classBadConversion__coll__graph.map0000644000113200011300000000032612616110567020613 00000000000000 pktools-2.6.6/doc/html/inherit_graph_10.png0000644000113200011300000000151412616110570015465 00000000000000‰PNG  IHDR@%}2x`bKGDÿÿÿ ½§“IDATX…í˜?H2aÇOœIÄXôç,*•¢Ih¡ … *p¨)Å%¢› Z­hJƒR±!hhÊ).£"±©áà ‹PŸw8;}Kž÷èÞ?“Ï—‡ç÷ýz~ÏãÆ”LƒÜþ•z¹Q|J´‡Ã»»»²X©—Ë533S® Ñ]Èn·ßÜÜLLLü®±šŒœœ”‹â+•›þìv{¥¨øÔÈâT)q- „*EY«Àõõu__Ÿ„VÈ @Ó´F£‘Ð wcì÷ûõz}[[ÛäääÙÙB(ŸÏ¯¯¯wwwÓ4ít:ßÞÞ„ÍÑhtdd¤¹¹™a˜ÃÃCò‘åØl6›Í†X–Í|c¼¿¿ßÙÙy~~ÎqÜÅÅE?lmm †x<~?>>îñx0ÆÙl¶©©Éï÷¿¾¾P•Íf¿ZÕy€ªß…Ñh ƒ¥mGGG088xzz*(ÂgžçU*Õööv:.‹™L¦P( ÿ ===U¦z~~6¥=z½^^^exxxzzÚÛÛ///c±XWW—Édºººjh 1#qzzzJËD"Z­6•J ˲›››ðþþ^,C¡Ïó V«•çy‚‰äw!ŽãZ[[ËF³´´äõz;::ÆÆÆîîî666B‡cuuµ··–——…Ë‚2›Í@Àd2}~~ªTª––Òv P(ìììèt:µZm±X"‘MÓG«ÕªÕêÙÙÙt:-r||¬Ó釆†"‘ÈC¥,ñ߈F£,Ë––ápxtt”ø4—¸*ñx|nnîöö6—ËÅb±µµµÅÅEiGˆ ï@U¼^o.—›ššâ8Ža˜ùùy—Ë%í (Êçóù|>iýÅ?N×ÈâT)q2™ÜÛÛû}+?’L&†«¢ÿ…••9¼ÕŠÛí¿™SŠï@=€Ü(>ÀæX+úùܽïIEND®B`‚pktools-2.6.6/doc/html/FileReaderLas_8cc_source.html0000644000113200011300000006715612647637662017343 00000000000000 pktools: /home/kempenep/pktools/src/lasclasses/FileReaderLas.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
FileReaderLas.cc
1 /**********************************************************************
2 FileReaderLas.cc: class to read LAS files using liblas API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <string>
21 #include <iostream>
22 #include <fstream>
23 #include "FileReaderLas.h"
24 //---------------------------------------------------------------------------
25 LastReturnFilter::LastReturnFilter( ) : liblas::FilterI(eInclusion) {}
26 
27 bool LastReturnFilter::filter(const liblas::Point& p)
28 {
29 
30  // If the GetReturnNumber equals the GetNumberOfReturns,
31  // we're a last return
32 
33  bool output = false;
34  if (p.GetReturnNumber() == p.GetNumberOfReturns())
35  {
36  output = true;
37  }
38 
39  // If the type is switched to eExclusion, we'll throw out all last returns.
40  if (GetType() == eExclusion && output == true)
41  {
42  output = false;
43  } else {
44  output = true;
45  }
46  return output;
47 }
48 
49 FileReaderLas::FileReaderLas(void)
50 {
51  m_reader=NULL;
52  m_ifstream=NULL;
53 }
54 
55 FileReaderLas::FileReaderLas(const std::string& filename)
56 {
57  open(filename);
58 }
59 
60 FileReaderLas::~FileReaderLas(void)
61 {
62  delete m_ifstream;
63  delete m_reader;
64 }
65 
66 //---------------------------------------------------------------------------
67 
68 void FileReaderLas::open(const std::string& filename)
69 {
70  m_filename = filename;
71  setCodec(filename);
72 }
73 
74 //---------------------------------------------------------------------------
75 void FileReaderLas::close(void)
76 {
77  m_ifstream->close();
78  m_ifstream=NULL;
79  m_reader=NULL;
80 }
81 
82 //---------------------------------------------------------------------------
83 void FileReaderLas::setCodec(const std::string& filename){
84  m_ifstream = new(std::ifstream);
85  m_ifstream->open(m_filename.c_str(),std::ios::in|std::ios::binary);
86  liblas::ReaderFactory f;
87  liblas::Reader reader = f.CreateWithStream(*m_ifstream);
88  m_reader=new liblas::Reader(reader);
89  // m_reader = new liblas::Reader(*m_ifstream);
90  //Note: It is possible to use the basic liblas::Reader constructor that takes in a std::istream, but it will not be able to account for the fact that the file might be compressed. Using the ReaderFactory will take care of all of this for you.
91  // m_reader=&rfactory.CreateWithStream(ifs);
92 }
93 
94 liblas::Header const& FileReaderLas::getHeader() const{
95  return(m_reader->GetHeader());
96 }
97 
98 bool FileReaderLas::isCompressed() const{
99  return getHeader().Compressed();
100 }
101 
102 unsigned long int FileReaderLas::getPointCount() const{
103  return getHeader().GetPointRecordsCount();
104 }
105 
106 void FileReaderLas::las2ascii(const std::string& filename, bool verbose) const{
107  std::ofstream fpoints(filename.c_str(),std::ios::out);
108  fpoints << "#";
109  fpoints << "X" << "," << "Y" << "," << "Z" << std::endl;
110  if(verbose)
111  std::cout << "reset reading" << std::endl;
112  m_reader->Reset();
113  if(verbose)
114  std::cout << "going through points" << std::endl;
115  while(m_reader->ReadNextPoint()){
116  liblas::Point const& thePoint=m_reader->GetPoint();
117  double x=thePoint.GetX();
118  double y=thePoint.GetY();
119  double z=thePoint.GetZ();
120  fpoints.precision(12);
121  fpoints << x << "," << y << "," << z << std::endl;
122  }
123  fpoints.close();
124 }
125 
126 void FileReaderLas::getExtent(double& ulx, double& uly, double& lrx, double& lry) const{
127  const liblas::Header& theHeader=getHeader();
128  ulx=theHeader.GetMinX();
129  uly=theHeader.GetMaxY();
130  lrx=theHeader.GetMaxX();
131  lry=theHeader.GetMinY();
132 }
133 
134 double FileReaderLas::getMinZ() const{
135  return(getHeader().GetMinZ());
136 }
137 
138 double FileReaderLas::getMaxZ() const{
139  return(getHeader().GetMaxZ());
140 }
141 
142 //todo: does not work ??
143 // void FileReaderLas::addBoundsFilter(double ulx, double uly, double lrx, double lry){
144 // liblas::Bounds<double> bounds = liblas::Bounds<double>(ulx,lry,lrx,uly);
145 // typedef liblas::BoundsFilter filter;
146 // filter* bounds_filter = new filter(bounds);
147 // bounds_filter->SetType(liblas::FilterI::eInclusion);
148 // m_filters.push_back(liblas::FilterPtr(bounds_filter));
149 // }
150 
151 void FileReaderLas::addReturnsFilter(std::vector<unsigned short> const& returns){
152  typedef liblas::ReturnFilter filter;
153  filter* return_filter;
154  std::vector<boost::uint16_t> returns_t;
155  if(returns[0]<0)
156  return_filter=new filter(returns_t,true);
157  else{
158  for(int index=0;index<returns.size();++index){
159  assert(returns[index]>0);
160  returns_t.push_back(returns[index]);
161  }
162  return_filter=new filter(returns_t,false);
163  }
164  m_filters.push_back(liblas::FilterPtr(return_filter));
165 }
166 
167 void FileReaderLas::addClassFilter(std::vector<unsigned short> const& classes){
168 
169  std::vector<liblas::FilterPtr> filters;
170  std::vector<liblas::Classification> theClasses;
171  for(int iclass=0;iclass<classes.size();++iclass){
172  liblas::Classification aClass(classes[iclass]);
173  theClasses.push_back(aClass);
174  }
175  liblas::FilterPtr class_filter = liblas::FilterPtr(new liblas::ClassificationFilter(theClasses));
176  // eInclusion means to keep the classes that match. eExclusion would
177  // throw out those that matched
178  class_filter->SetType(liblas::FilterI::eInclusion);
179  m_filters.push_back(class_filter);
180 }
181 
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop__inherit__graph.map0000644000113200011300000000007712616110567023274 00000000000000 pktools-2.6.6/doc/html/classVector2d__coll__graph.png0000644000113200011300000001147112616110567017561 00000000000000‰PNG  IHDR¨Ý Æ®‘bKGDÿÿÿ ½§“îIDATxœíkPWûÀÏBh¨€ˆ(QD­ÊŒ €÷:­3Ь·RE+hGeêêt,µ7µ* J5x¯hE(8Èûí« ‰P•K( SHŒ`Bvÿömb@ÂBžóû´{öœ=çðcŸ³Ù“œ%(ŠBx˜0Ý 3`ñ@Áâ‚Å…ÅtÞ—ŠŠŠ×¯_÷r¥#GŽìåJ{–~/¾®®nРAl6»×jlmm­««Ãâ™ÇÉɉÇãõZu/^¼(//ïµê ã‚Å‹ Xâ“’’ˆŽ())aºi½1ÜÕëO`` H$B …©S§ÒÛ!.—Ëh»–xssssss„Pss3BÈÞÞžé1¬Pрŋ ,(XGˆ233ÓÙî¼”£££NN 666¹¹¹wïÞurrš>}z^^ž‰IÏkÂâÿÅÖÖ–¾L)Š’H$wïÞÕÿhWÏÙ‰K¹\N’äÅ‹›ššÖ­[7þü¦¦žÿ½ÿ/‹/Þ±cÇ_ýUZZúñÇÿòË/úíÞ9u Y!bîܹ—.]’ÉdJ¥ÒÌÌÌÂÂâ}úÕ1=>xôÚñ2™,$$ÄÆÆ†Ë円†¶´´h½íR…þËß¶­g)•Jåïï?`À:199ÙÍÍíƒ>=ztzzº!ºw’æÚ6!Bhö^¦ 8ÔîçãŠõ@Áâ‚Å‹ ,(pÅçªË?TÇt+ÐïãuxõLùîLÆ Ü+8X¹~ýºöÐùùù«W¯¶³³«¯¯7¾ÞuHCC½l²†®‰ïpaeí&zxxœ>}Z“ÿ×_Eo_<³¥¥ÅÒÒ2??Ÿ¢¨åË—ïØ±ƒNo¿âó¨Q£RSSé”òòrz[»^¥RijjúðáCz755ÕÝÝÎPZZJ'Êåò3gÎLž REßõŒ9R;„nÙ²%((¨¦¦æÁƒ>>>›6mŠŽŽ?~¼@ ~~~ëׯ×\šˆ½råÊÙ³gWWW //¯o¾ùFg˜¤(J „……ÙÚÚ®[·îþýûFÖ»NèPß~aeí•—Õjõ¾}ûÜÝÝ---§L™B/ÏN½¸tZ:`ÀíÛ“ö+>+ŠˆˆGGG++«+VH$z)Šjjj ær¹_}õ•ÆYû.H$’˜˜77·ššãë]‡´ÿÆ|ü7àLË’$I’$‹âËgô´ìŒ34) ºÝ!&&&†xåGnσÅ‹Š1‹OJJ":¢¤¤„é¦11ßÜŠD"„P(œ:u*½âr¹Œ¶«O`ÌâÍÍÍÍÍÍÑ?¯õÒÌta1…ú§Y{¤T÷ÎÜÇ1ñkÖ¬ñòòzùòeWË>xðÀÅÅ%**Jç…¢]ÍÓïèÇâ Ebb¢OXXØÔ©S«««ºz’9sæ[XXL›6mÁ‚ÙÙÙ$Iv#OÿCûù­>ÏêûzN³ÒèóX[©T^¸pÁßßßÃã¶¶¶Ûyú&ï;-ÛwÐgšµK444”••={ölÒ¤Iô-a÷òôú«ø?ü077755õñãÇ_|ñEaaa7ÎC’dvvö¢E‹|}})ŠºsçÎùóçu¾ÞªOžþ‡öåßB½6L³ÒtêSRR|}}Ï;×ÚÚú¶óë“§cÌӲݛfU©Tïü‹>yú8Æ<-Û½iV}ŒöwëÒ_ÇxÌ{‚Å‹ ,(Xd¬_P ”ɦ¦&,–)‹eJó϶ÉË—rPÑÐ$L¦ÈÈ(Öìž=û_„ÐgŸMѤ,X0qÐ N%@âu û!”°šé†0 PÑ‹ ,(XŸ/“Ébccõ/«›Í @&“=|ø!T[[ûôéÓiӦчRRRD"QBBÂŠŠŠN:•’’rëÖ­Ý»wÇÆÆ>}úôìÙ³¡Ã‡#„4·qqqb±˜ÏçïÝ»·  àüùótú… ¶oß>jÔ¨ÄÄD///:±¸¸ØÁÁáÒ¥KÉÉÉ¡¡¡‰‰‰ÁÁÁ|>_§‘=Ú³gOHHHû·°¿“ªªªåË—'$$ˆD¢îü Ãâ àëë›››‹ÊËË›0a‚ }(+++<<œÇ㹺º†……åççgff®]»ÖÕÕÕÅÅeÛ¶mÔjõõë×7oÞìàààêê’““C 8q¢……ÅСCMMM_¿~}ôèÑôôômÛ¶eddlذ! €Ëåúøø„††ÒE”JevvöÆcbbÆŽûÛo¿ui ¢ñöö>~ü8›Íÿúë¯ïß¿ßGÞ Áüh4kÖ¬ƒnÞ¼ùÖ­[óçÏפ?þ|É’%š]KKK•JåääDï>|øðá:§’H$$I:::Ò»C‡‹ÿ÷Â`gggM¶k×®ñùüÉ“'óù|kkk±Xìîî®9êêêŠ*,,üá‡|||ÂÃÃGED·;Èår׬YóÙgŸÝ¾}ûÌ™3qqq`| ƒùÏñS¦LQ(W¯^­ªªò÷÷פ[YY={677777÷ò县r¹ÏŸ?§VVVÒ¡^MP­¯¯·µµ¥·57\/^<}úôO?ýIß”ÙÛÛWUUiNRSSƒ²¶¶1bDYY™@ èF„oD"©©©‹Ål6ûýOøž0ųÙlÿøøø‰'Ò&hŽ;¶qãÆ–––ýû÷=zîܹÇ···GÅÅÅ1B“Y.—›››³X¬™3g pktools: /home/kempenep/pktools/src/apps/pkstat.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkstat.cc
1 /**********************************************************************
2 pkstat.cc: program to calculate basic statistics from raster dataset
3 Copyright (C) 2008-2015 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <fstream>
22 #include <math.h>
23 #include "base/Optionpk.h"
24 #include "algorithms/StatFactory.h"
25 #include "algorithms/ImgRegression.h"
26 /******************************************************************************/
78 using namespace std;
79 
80 int main(int argc, char *argv[])
81 {
82  Optionpk<string> input_opt("i","input","name of the input raster dataset");
83  Optionpk<unsigned short> band_opt("b","band","band(s) on which to calculate statistics",0);
84  Optionpk<bool> filename_opt("f", "filename", "Shows image filename ", false);
85  Optionpk<bool> stat_opt("stats", "statistics", "Shows basic statistics (calculate in memory) (min,max, mean and stdDev of the raster datasets)", false);
86  Optionpk<bool> fstat_opt("fstats", "fstatistics", "Shows basic statistics using GDAL computeStatistics (min,max, mean and stdDev of the raster datasets)", false);
87  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box");
88  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box");
89  Optionpk<double> lrx_opt("lrx", "lrx", "Lower right x value bounding box");
90  Optionpk<double> lry_opt("lry", "lry", "Lower right y value bounding box");
91  Optionpk<double> nodata_opt("nodata","nodata","Set nodata value(s)");
92  Optionpk<short> down_opt("down", "down", "Down sampling factor (for raster sample datasets only). Can be used to create grid points", 1);
93  Optionpk<unsigned int> random_opt("rnd", "rnd", "generate random numbers", 0);
94  Optionpk<double> scale_opt("scale", "scale", "Scale(s) for reading input image(s)");
95  Optionpk<double> offset_opt("offset", "offset", "Offset(s) for reading input image(s)");
96 
97  // Optionpk<bool> transpose_opt("t","transpose","transpose output",false);
98  // Optionpk<std::string> randdist_opt("dist", "dist", "distribution for generating random numbers, see http://www.gn/software/gsl/manual/gsl-ref_toc.html#TOC320 (only uniform and Gaussian supported yet)", "gaussian");
99  // Optionpk<double> randa_opt("rnda", "rnda", "first parameter for random distribution (mean value in case of Gaussian)", 0);
100  // Optionpk<double> randb_opt("rndb", "rndb", "second parameter for random distribution (standard deviation in case of Gaussian)", 1);
101  Optionpk<bool> mean_opt("mean","mean","calculate mean",false);
102  Optionpk<bool> median_opt("median","median","calculate median",false);
103  Optionpk<bool> var_opt("var","var","calculate variance",false);
104  Optionpk<bool> skewness_opt("skew","skewness","calculate skewness",false);
105  Optionpk<bool> kurtosis_opt("kurt","kurtosis","calculate kurtosis",false);
106  Optionpk<bool> stdev_opt("stdev","stdev","calculate standard deviation",false);
107  Optionpk<bool> sum_opt("sum","sum","calculate sum of column",false);
108  Optionpk<bool> minmax_opt("mm","minmax","calculate minimum and maximum value",false);
109  Optionpk<bool> min_opt("min","min","calculate minimum value",false);
110  Optionpk<bool> max_opt("max","max","calculate maximum value",false);
111  Optionpk<double> src_min_opt("src_min","src_min","start reading source from this minimum value");
112  Optionpk<double> src_max_opt("src_max","src_max","stop reading source from this maximum value");
113  Optionpk<bool> histogram_opt("hist","hist","calculate histogram",false);
114  Optionpk<bool> histogram2d_opt("hist2d","hist2d","calculate 2-dimensional histogram based on two images",false);
115  Optionpk<short> nbin_opt("nbin","nbin","number of bins to calculate histogram");
116  Optionpk<bool> relative_opt("rel","relative","use percentiles for histogram to calculate histogram",false);
117  Optionpk<bool> kde_opt("kde","kde","Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb",false);
118  Optionpk<bool> rmse_opt("rmse","rmse","calculate root mean square error between two raster datasets",false);
119  Optionpk<bool> reg_opt("reg","regression","calculate linear regression between two raster datasets and get correlation coefficient",false);
120  Optionpk<bool> regerr_opt("regerr","regerr","calculate linear regression between two raster datasets and get root mean square error",false);
121  Optionpk<bool> preg_opt("preg","preg","calculate perpendicular regression between two raster datasets and get correlation coefficient",false);
122  Optionpk<short> verbose_opt("v", "verbose", "verbose mode when positive", 0,2);
123  fstat_opt.setHide(1);
124  ulx_opt.setHide(1);
125  uly_opt.setHide(1);
126  lrx_opt.setHide(1);
127  lry_opt.setHide(1);
128  down_opt.setHide(1);
129  random_opt.setHide(1);
130  scale_opt.setHide(1);
131  offset_opt.setHide(1);
132  src_min_opt.setHide(1);
133  src_max_opt.setHide(1);
134  kde_opt.setHide(1);
135 
136  // range_opt.setHide(1);
137  // transpose_opt.setHide(1);
138 
139  bool doProcess;//stop process when program was invoked with help option (-h --help)
140  try{
141  //mandatory options
142  doProcess=input_opt.retrieveOption(argc,argv);
143  //optional options
144  band_opt.retrieveOption(argc,argv);
145  filename_opt.retrieveOption(argc,argv);
146  stat_opt.retrieveOption(argc,argv);
147  fstat_opt.retrieveOption(argc,argv);
148  nodata_opt.retrieveOption(argc,argv);
149  mean_opt.retrieveOption(argc,argv);
150  median_opt.retrieveOption(argc,argv);
151  var_opt.retrieveOption(argc,argv);
152  stdev_opt.retrieveOption(argc,argv);
153  minmax_opt.retrieveOption(argc,argv);
154  min_opt.retrieveOption(argc,argv);
155  max_opt.retrieveOption(argc,argv);
156  histogram_opt.retrieveOption(argc,argv);
157  nbin_opt.retrieveOption(argc,argv);
158  relative_opt.retrieveOption(argc,argv);
159  histogram2d_opt.retrieveOption(argc,argv);
160  rmse_opt.retrieveOption(argc,argv);
161  reg_opt.retrieveOption(argc,argv);
162  regerr_opt.retrieveOption(argc,argv);
163  preg_opt.retrieveOption(argc,argv);
164  //advanced options
165  ulx_opt.retrieveOption(argc,argv);
166  uly_opt.retrieveOption(argc,argv);
167  lrx_opt.retrieveOption(argc,argv);
168  lry_opt.retrieveOption(argc,argv);
169  down_opt.retrieveOption(argc,argv);
170  random_opt.retrieveOption(argc,argv);
171  scale_opt.retrieveOption(argc,argv);
172  offset_opt.retrieveOption(argc,argv);
173  src_min_opt.retrieveOption(argc,argv);
174  src_max_opt.retrieveOption(argc,argv);
175  kde_opt.retrieveOption(argc,argv);
176  verbose_opt.retrieveOption(argc,argv);
177  }
178  catch(string predefinedString){
179  std::cout << predefinedString << std::endl;
180  exit(0);
181  }
182  if(!doProcess){
183  cout << endl;
184  cout << "Usage: pkstat -i input" << endl;
185  cout << endl;
186  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
187  exit(0);//help was invoked, stop processing
188  }
189 
190  if(src_min_opt.size()){
191  while(src_min_opt.size()<band_opt.size())
192  src_min_opt.push_back(src_min_opt[0]);
193  }
194  if(src_max_opt.size()){
195  while(src_max_opt.size()<band_opt.size())
196  src_max_opt.push_back(src_max_opt[0]);
197  }
198 
199  unsigned int nbin=0;
200  double minX=0;
201  double minY=0;
202  double maxX=0;
203  double maxY=0;
204  double minValue=(src_min_opt.size())? src_min_opt[0] : 0;
205  double maxValue=(src_max_opt.size())? src_max_opt[0] : 0;
206  double meanValue=0;
207  double medianValue=0;
208  double stdDev=0;
209 
210  const char* pszMessage;
211  void* pProgressArg=NULL;
212  GDALProgressFunc pfnProgress=GDALTermProgress;
213  double progress=0;
214  srand(time(NULL));
215 
218  std::vector<double> histogramOutput;
219  double nsample=0;
220 
221  ImgReaderGdal imgReader;
222 
223  if(scale_opt.size()){
224  while(scale_opt.size()<input_opt.size())
225  scale_opt.push_back(scale_opt[0]);
226  }
227  if(offset_opt.size()){
228  while(offset_opt.size()<input_opt.size())
229  offset_opt.push_back(offset_opt[0]);
230  }
231  if(input_opt.empty()){
232  std::cerr << "No image dataset provided (use option -i). Use --help for help information";
233  exit(0);
234  }
235  for(int ifile=0;ifile<input_opt.size();++ifile){
236  try{
237  imgReader.open(input_opt[ifile]);
238  }
239  catch(std::string errorstring){
240  std::cout << errorstring << std::endl;
241  exit(0);
242  }
243 
244  if(filename_opt[0])
245  std::cout << " --input " << input_opt[ifile] << " ";
246 
247  for(int inodata=0;inodata<nodata_opt.size();++inodata)
248  imgReader.pushNoDataValue(nodata_opt[inodata]);
249 
250  int nband=band_opt.size();
251  for(int iband=0;iband<nband;++iband){
252 
253  for(int inodata=0;inodata<nodata_opt.size();++inodata){
254  if(!inodata)
255  imgReader.GDALSetNoDataValue(nodata_opt[0],band_opt[iband]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
256  }
257 
258  if(offset_opt.size()>ifile)
259  imgReader.setOffset(offset_opt[ifile],band_opt[iband]);
260  if(scale_opt.size()>ifile)
261  imgReader.setScale(scale_opt[ifile],band_opt[iband]);
262 
263  if(stat_opt[0]||mean_opt[0]||median_opt[0]||var_opt[0]||stdev_opt[0]){//the hard way (in memory)
265  vector<double> readBuffer;
266  double varValue;
267  imgReader.readDataBlock(readBuffer, GDT_Float64, 0, imgReader.nrOfCol()-1, 0, imgReader.nrOfRow()-1, band_opt[0]);
268  stat.setNoDataValues(nodata_opt);
269  stat.meanVar(readBuffer,meanValue,varValue);
270  medianValue=stat.median(readBuffer);
271  stat.minmax(readBuffer,readBuffer.begin(),readBuffer.end(),minValue,maxValue);
272  if(mean_opt[0])
273  std::cout << "--mean " << meanValue << " ";
274  if(median_opt[0])
275  std::cout << "--median " << medianValue << " ";
276  if(stdev_opt[0])
277  std::cout << "--stdDev " << sqrt(varValue) << " ";
278  if(var_opt[0])
279  std::cout << "--var " << varValue << " ";
280  if(stat_opt[0])
281  std::cout << "-min " << minValue << " -max " << maxValue << " --mean " << meanValue << " --stdDev " << sqrt(varValue) << " ";
282  }
283 
284  if(fstat_opt[0]){//the fast way
285  assert(band_opt[iband]<imgReader.nrOfBand());
286  GDALProgressFunc pfnProgress;
287  void* pProgressData;
288  GDALRasterBand* rasterBand;
289  rasterBand=imgReader.getRasterBand(band_opt[iband]);
290  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev,pfnProgress,pProgressData);
291 
292  std::cout << "-min " << minValue << " -max " << maxValue << " --mean " << meanValue << " --stdDev " << stdDev << " ";
293  }
294 
295  if(minmax_opt[0]||min_opt[0]||max_opt[0]){
296  assert(band_opt[iband]<imgReader.nrOfBand());
297 
298  if((ulx_opt.size()||uly_opt.size()||lrx_opt.size()||lry_opt.size())&&(imgReader.covers(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))){
299  double uli,ulj,lri,lrj;
300  imgReader.geo2image(ulx_opt[0],uly_opt[0],uli,ulj);
301  imgReader.geo2image(lrx_opt[0],lry_opt[0],lri,lrj);
302  imgReader.getMinMax(static_cast<int>(uli),static_cast<int>(lri),static_cast<int>(ulj),static_cast<int>(lrj),band_opt[iband],minValue,maxValue);
303  }
304  else{
305  imgReader.getMinMax(minValue,maxValue,band_opt[iband]);
306  }
307  if(minmax_opt[0])
308  std::cout << "-min " << minValue << " -max " << maxValue << " ";
309  else{
310  if(min_opt[0])
311  std::cout << "-min " << minValue << " ";
312  if(max_opt[0])
313  std::cout << "-max " << maxValue << " ";
314  }
315  }
316  }
317  if(histogram_opt[0]){//aggregate results from multiple inputs, but only calculate for first selected band
318  assert(band_opt[0]<imgReader.nrOfBand());
319  nbin=(nbin_opt.size())? nbin_opt[0]:0;
320 
321  imgReader.getMinMax(minValue,maxValue,band_opt[0]);
322  if(src_min_opt.size())
323  minValue=src_min_opt[0];
324  if(src_max_opt.size())
325  maxValue=src_max_opt[0];
326  if(minValue>=maxValue)
327  imgReader.getMinMax(minValue,maxValue,band_opt[0]);
328 
329  if(verbose_opt[0])
330  cout << "number of valid pixels in image: " << imgReader.getNvalid(band_opt[0]) << endl;
331 
332  nsample+=imgReader.getHistogram(histogramOutput,minValue,maxValue,nbin,band_opt[0],kde_opt[0]);
333 
334  //only output for last input file
335  if(ifile==input_opt.size()-1){
336  std::cout.precision(10);
337  for(int bin=0;bin<nbin;++bin){
338  double binValue=0;
339  if(nbin==maxValue-minValue+1)
340  binValue=minValue+bin;
341  else
342  binValue=minValue+static_cast<double>(maxValue-minValue)*(bin+0.5)/nbin;
343  std::cout << binValue << " ";
344  if(relative_opt[0]||kde_opt[0])
345  std::cout << 100.0*static_cast<double>(histogramOutput[bin])/static_cast<double>(nsample) << std::endl;
346  else
347  std::cout << static_cast<double>(histogramOutput[bin]) << std::endl;
348  }
349  }
350  }
351  if(histogram2d_opt[0]&&input_opt.size()<2){
352  assert(band_opt.size()>1);
353  imgReader.getMinMax(minX,maxX,band_opt[0]);
354  imgReader.getMinMax(minY,maxY,band_opt[1]);
355  if(src_min_opt.size()){
356  minX=src_min_opt[0];
357  minY=src_min_opt[1];
358  }
359  if(src_max_opt.size()){
360  maxX=src_max_opt[0];
361  maxY=src_max_opt[1];
362  }
363  nbin=(nbin_opt.size())? nbin_opt[0]:0;
364  if(nbin<=1){
365  std::cerr << "Warning: number of bins not defined, calculating bins from min and max value" << std::endl;
366  if(minX>=maxX)
367  imgReader.getMinMax(minX,maxX,band_opt[0]);
368  if(minY>=maxY)
369  imgReader.getMinMax(minY,maxY,band_opt[1]);
370 
371  minValue=(minX<minY)? minX:minY;
372  maxValue=(maxX>maxY)? maxX:maxY;
373  if(verbose_opt[0])
374  std::cout << "min and max values: " << minValue << ", " << maxValue << std::endl;
375  nbin=maxValue-minValue+1;
376  }
377  assert(nbin>1);
378  double sigma=0;
379  //kernel density estimation as in http://en.wikipedia.org/wiki/Kernel_density_estimation
380  if(kde_opt[0]){
381  assert(band_opt[0]<imgReader.nrOfBand());
382  assert(band_opt[1]<imgReader.nrOfBand());
383  GDALProgressFunc pfnProgress;
384  void* pProgressData;
385  GDALRasterBand* rasterBand;
386  double stdDev1=0;
387  double stdDev2=0;
388  rasterBand=imgReader.getRasterBand(band_opt[0]);
389  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev1,pfnProgress,pProgressData);
390  rasterBand=imgReader.getRasterBand(band_opt[1]);
391  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev2,pfnProgress,pProgressData);
392 
393  double estimatedSize=1.0*imgReader.getNvalid(band_opt[0])/down_opt[0]/down_opt[0];
394  if(random_opt[0]>0)
395  estimatedSize*=random_opt[0]/100.0;
396  sigma=1.06*sqrt(stdDev1*stdDev2)*pow(estimatedSize,-0.2);
397  }
398  assert(nbin);
399  if(verbose_opt[0]){
400  if(sigma>0)
401  std::cout << "calculating 2d kernel density estimate with sigma " << sigma << " for bands " << band_opt[0] << " and " << band_opt[1] << std::endl;
402  else
403  std::cout << "calculating 2d histogram for bands " << band_opt[0] << " and " << band_opt[1] << std::endl;
404  std::cout << "nbin: " << nbin << std::endl;
405  }
406 
407 
408  vector< vector<double> > output;
409 
410  if(maxX<=minX)
411  imgReader.getMinMax(minX,maxX,band_opt[0]);
412  if(maxY<=minY)
413  imgReader.getMinMax(minY,maxY,band_opt[1]);
414 
415  if(maxX<=minX){
416  std::ostringstream s;
417  s<<"Error: could not calculate distribution (minX>=maxX)";
418  throw(s.str());
419  }
420  if(maxY<=minY){
421  std::ostringstream s;
422  s<<"Error: could not calculate distribution (minY>=maxY)";
423  throw(s.str());
424  }
425  output.resize(nbin);
426  for(int i=0;i<nbin;++i){
427  output[i].resize(nbin);
428  for(int j=0;j<nbin;++j)
429  output[i][j]=0;
430  }
431  int binX=0;
432  int binY=0;
433  vector<double> inputX(imgReader.nrOfCol());
434  vector<double> inputY(imgReader.nrOfCol());
435  unsigned long int nvalid=0;
436  for(int irow=0;irow<imgReader.nrOfRow();++irow){
437  if(irow%down_opt[0])
438  continue;
439  imgReader.readData(inputX,GDT_Float64,irow,band_opt[0]);
440  imgReader.readData(inputY,GDT_Float64,irow,band_opt[1]);
441  for(int icol=0;icol<imgReader.nrOfCol();++icol){
442  if(icol%down_opt[0])
443  continue;
444  if(random_opt[0]>0){
445  double p=static_cast<double>(rand())/(RAND_MAX);
446  p*=100.0;
447  if(p>random_opt[0])
448  continue;//do not select for now, go to next column
449  }
450  if(imgReader.isNoData(inputX[icol]))
451  continue;
452  if(imgReader.isNoData(inputY[icol]))
453  continue;
454  ++nvalid;
455  if(inputX[icol]>=maxX)
456  binX=nbin-1;
457  else if(inputX[icol]<=minX)
458  binX=0;
459  else
460  binX=static_cast<int>(static_cast<double>(inputX[icol]-minX)/(maxX-minX)*nbin);
461  if(inputY[icol]>=maxY)
462  binY=nbin-1;
463  else if(inputY[icol]<=minX)
464  binY=0;
465  else
466  binY=static_cast<int>(static_cast<double>(inputY[icol]-minY)/(maxY-minY)*nbin);
467  assert(binX>=0);
468  assert(binX<output.size());
469  assert(binY>=0);
470  assert(binY<output[binX].size());
471  if(sigma>0){
472  //create kde for Gaussian basis function
473  //todo: speed up by calculating first and last bin with non-zero contriubtion...
474  for(int ibinX=0;ibinX<nbin;++ibinX){
475  double centerX=minX+static_cast<double>(maxX-minX)*ibinX/nbin;
476  double pdfX=gsl_ran_gaussian_pdf(inputX[icol]-centerX, sigma);
477  for(int ibinY=0;ibinY<nbin;++ibinY){
478  //calculate \integral_ibinX^(ibinX+1)
479  double centerY=minY+static_cast<double>(maxY-minY)*ibinY/nbin;
480  double pdfY=gsl_ran_gaussian_pdf(inputY[icol]-centerY, sigma);
481  output[ibinX][binY]+=pdfX*pdfY;
482  }
483  }
484  }
485  else
486  ++output[binX][binY];
487  }
488  }
489  if(verbose_opt[0])
490  cout << "number of valid pixels: " << nvalid << endl;
491 
492  for(int binX=0;binX<nbin;++binX){
493  cout << endl;
494  for(int binY=0;binY<nbin;++binY){
495  double binValueX=0;
496  if(nbin==maxX-minX+1)
497  binValueX=minX+binX;
498  else
499  binValueX=minX+static_cast<double>(maxX-minX)*(binX+0.5)/nbin;
500  double binValueY=0;
501  if(nbin==maxY-minY+1)
502  binValueY=minY+binY;
503  else
504  binValueY=minY+static_cast<double>(maxY-minY)*(binY+0.5)/nbin;
505 
506  double value=static_cast<double>(output[binX][binY]);
507 
508  if(relative_opt[0])
509  value*=100.0/nvalid;
510 
511  cout << binValueX << " " << binValueY << " " << value << std::endl;
512  // double value=static_cast<double>(output[binX][binY])/nvalid;
513  // cout << (maxX-minX)*bin/(nbin-1)+minX << " " << (maxY-minY)*bin/(nbin-1)+minY << " " << value << std::endl;
514  }
515  }
516  }
517  if(reg_opt[0]&&input_opt.size()<2){
518  if(band_opt.size()<2)
519  continue;
520  imgreg.setDown(down_opt[0]);
521  imgreg.setThreshold(random_opt[0]);
522  double c0=0;//offset
523  double c1=1;//scale
524  double r2=imgreg.getR2(imgReader,band_opt[0],band_opt[1],c0,c1,verbose_opt[0]);
525  std::cout << "-c0 " << c0 << " -c1 " << c1 << " -r2 " << r2 << std::endl;
526  }
527  if(regerr_opt[0]&&input_opt.size()<2){
528  if(band_opt.size()<2)
529  continue;
530  imgreg.setDown(down_opt[0]);
531  imgreg.setThreshold(random_opt[0]);
532  double c0=0;//offset
533  double c1=1;//scale
534  double err=imgreg.getRMSE(imgReader,band_opt[0],band_opt[1],c0,c1,verbose_opt[0]);
535  std::cout << "-c0 " << c0 << " -c1 " << c1 << " -rmse " << err << std::endl;
536  }
537  if(rmse_opt[0]&&input_opt.size()<2){
538  if(band_opt.size()<2)
539  continue;
540  vector<double> xBuffer(imgReader.nrOfCol());
541  vector<double> yBuffer(imgReader.nrOfCol());
542  double mse=0;
543  double nValid=0;
544  double nPixel=imgReader.nrOfCol()/down_opt[0]*imgReader.nrOfRow()/down_opt[0];
545  for(int irow;irow<imgReader.nrOfRow();irow+=down_opt[0]){
546  imgReader.readData(xBuffer,GDT_Float64,irow,band_opt[0]);
547  imgReader.readData(yBuffer,GDT_Float64,irow,band_opt[1]);
548  for(int icol;icol<imgReader.nrOfCol();icol+=down_opt[0]){
549  double xValue=xBuffer[icol];
550  double yValue=yBuffer[icol];
551  if(imgReader.isNoData(xValue)||imgReader.isNoData(yValue)){
552  continue;
553  }
554  if(imgReader.isNoData(xValue)||imgReader.isNoData(yValue)){
555  continue;
556  }
557  if(xValue<src_min_opt[0]||xValue>src_max_opt[0]||yValue<src_min_opt[0]||yValue>src_max_opt[0])
558  continue;
559  ++nValid;
560  double e=xValue-yValue;
561  if(relative_opt[0])
562  e/=yValue;
563  mse+=e*e/nPixel;
564  }
565  }
566  double correctNorm=nValid;
567  correctNorm/=nPixel;
568  mse/=correctNorm;
569  std::cout << " -rmse " << sqrt(mse) << std::endl;
570  }
571  if(preg_opt[0]&&input_opt.size()<2){
572  if(band_opt.size()<2)
573  continue;
574  imgreg.setDown(down_opt[0]);
575  imgreg.setThreshold(random_opt[0]);
576  double c0=0;//offset
577  double c1=1;//scale
578  double r2=imgreg.pgetR2(imgReader,band_opt[0],band_opt[1],c0,c1,verbose_opt[0]);
579  std::cout << "-c0 " << c0 << " -c1 " << c1 << " -r2 " << r2 << std::endl;
580  }
581  imgReader.close();
582  }
583  // if(rmse_opt[0]&&(input_opt.size()>1)){
584  // while(band_opt.size()<input_opt.size())
585  // band_opt.push_back(band_opt[0]);
586  // if(src_min_opt.size()){
587  // while(src_min_opt.size()<input_opt.size())
588  // src_min_opt.push_back(src_min_opt[0]);
589  // }
590  // if(src_max_opt.size()){
591  // while(src_max_opt.size()<input_opt.size())
592  // src_max_opt.push_back(src_max_opt[0]);
593  // }
594  // ImgReaderGdal imgReader1(input_opt[0]);
595  // ImgReaderGdal imgReader2(input_opt[1]);
596 
597  // if(offset_opt.size())
598  // imgReader1.setOffset(offset_opt[0],band_opt[0]);
599  // if(scale_opt.size())
600  // imgReader1.setScale(scale_opt[0],band_opt[0]);
601  // if(offset_opt.size()>1)
602  // imgReader2.setOffset(offset_opt[1],band_opt[1]);
603  // if(scale_opt.size()>1)
604  // imgReader2.setScale(scale_opt[1],band_opt[1]);
605 
606  // for(int inodata=0;inodata<nodata_opt.size();++inodata){
607  // imgReader1.pushNoDataValue(nodata_opt[inodata]);
608  // imgReader2.pushNoDataValue(nodata_opt[inodata]);
609  // }
610  // vector<double> xBuffer(imgReader1.nrOfCol());
611  // vector<double> yBuffer(imgReader2.nrOfCol());
612  // double mse=0;
613  // double nValid=0;
614  // double nPixel=imgReader.nrOfCol()/imgReader.nrOfRow()/down_opt[0]/down_opt[0];
615  // for(int irow;irow<imgReader1.nrOfRow();irow+=down_opt[0]){
616  // double irow1=irow;
617  // double irow2=0;
618  // double icol1=0;
619  // double icol2=0;
620  // double geoX=0;
621  // double geoY=0;
622  // imgReader1.image2geo(icol1,irow1,geoX,geoY);
623  // imgReader2.geo2image(geoX,geoY,icol2,irow2);
624  // irow2=static_cast<int>(irow2);
625  // imgReader1.readData(xBuffer,GDT_Float64,irow1,band_opt[0]);
626  // imgReader2.readData(yBuffer,GDT_Float64,irow2,band_opt[1]);
627  // for(int icol;icol<imgReader.nrOfCol();icol+=down_opt[0]){
628  // icol1=icol;
629  // imgReader1.image2geo(icol1,irow1,geoX,geoY);
630  // imgReader2.geo2image(geoX,geoY,icol2,irow2);
631  // double xValue=xBuffer[icol1];
632  // double yValue=yBuffer[icol2];
633  // if(imgReader.isNoData(xValue)||imgReader.isNoData(yValue)){
634  // continue;
635  // }
636  // if(xValue<src_min_opt[0]||xValue>src_max_opt[0]||yValue<src_min_opt[1]||yValue>src_max_opt[1])
637  // continue;
638  // ++nValid;
639  // double e=xValue-yValue;
640  // if(relative_opt[0])
641  // e/=yValue;
642  // mse+=e*e/nPixel;
643  // }
644  // }
645  // double correctNorm=nValid;
646  // correctNorm/=nPixel;
647  // mse/=correctNorm;
648  // std::cout << " -rmse " << sqrt(mse) << std::endl;
649  // }
650  if(reg_opt[0]&&(input_opt.size()>1)){
651  imgreg.setDown(down_opt[0]);
652  imgreg.setThreshold(random_opt[0]);
653  double c0=0;//offset
654  double c1=1;//scale
655  while(band_opt.size()<input_opt.size())
656  band_opt.push_back(band_opt[0]);
657  if(src_min_opt.size()){
658  while(src_min_opt.size()<input_opt.size())
659  src_min_opt.push_back(src_min_opt[0]);
660  }
661  if(src_max_opt.size()){
662  while(src_max_opt.size()<input_opt.size())
663  src_max_opt.push_back(src_max_opt[0]);
664  }
665  ImgReaderGdal imgReader1(input_opt[0]);
666  ImgReaderGdal imgReader2(input_opt[1]);
667 
668  if(offset_opt.size())
669  imgReader1.setOffset(offset_opt[0],band_opt[0]);
670  if(scale_opt.size())
671  imgReader1.setScale(scale_opt[0],band_opt[0]);
672  if(offset_opt.size()>1)
673  imgReader2.setOffset(offset_opt[1],band_opt[1]);
674  if(scale_opt.size()>1)
675  imgReader2.setScale(scale_opt[1],band_opt[1]);
676 
677  for(int inodata=0;inodata<nodata_opt.size();++inodata){
678  if(!inodata){
679  imgReader1.GDALSetNoDataValue(nodata_opt[0],band_opt[0]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
680  imgReader2.GDALSetNoDataValue(nodata_opt[0]),band_opt[1];//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
681  }
682  imgReader1.pushNoDataValue(nodata_opt[inodata]);
683  imgReader2.pushNoDataValue(nodata_opt[inodata]);
684  }
685 
686  double r2=imgreg.getR2(imgReader1,imgReader2,c0,c1,band_opt[0],band_opt[1],verbose_opt[0]);
687  std::cout << "-c0 " << c0 << " -c1 " << c1 << " -r2 " << r2 << std::endl;
688  imgReader1.close();
689  imgReader2.close();
690  }
691  if(preg_opt[0]&&(input_opt.size()>1)){
692  imgreg.setDown(down_opt[0]);
693  imgreg.setThreshold(random_opt[0]);
694  double c0=0;//offset
695  double c1=1;//scale
696  while(band_opt.size()<input_opt.size())
697  band_opt.push_back(band_opt[0]);
698  if(src_min_opt.size()){
699  while(src_min_opt.size()<input_opt.size())
700  src_min_opt.push_back(src_min_opt[0]);
701  }
702  if(src_max_opt.size()){
703  while(src_max_opt.size()<input_opt.size())
704  src_max_opt.push_back(src_max_opt[0]);
705  }
706  ImgReaderGdal imgReader1(input_opt[0]);
707  ImgReaderGdal imgReader2(input_opt[1]);
708 
709  if(offset_opt.size())
710  imgReader1.setOffset(offset_opt[0],band_opt[0]);
711  if(scale_opt.size())
712  imgReader1.setScale(scale_opt[0],band_opt[0]);
713  if(offset_opt.size()>1)
714  imgReader2.setOffset(offset_opt[1],band_opt[1]);
715  if(scale_opt.size()>1)
716  imgReader2.setScale(scale_opt[1],band_opt[1]);
717 
718  for(int inodata=0;inodata<nodata_opt.size();++inodata){
719  if(!inodata){
720  imgReader1.GDALSetNoDataValue(nodata_opt[0],band_opt[0]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
721  imgReader2.GDALSetNoDataValue(nodata_opt[0]),band_opt[1];//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
722  }
723  imgReader1.pushNoDataValue(nodata_opt[inodata]);
724  imgReader2.pushNoDataValue(nodata_opt[inodata]);
725  }
726 
727  double r2=imgreg.pgetR2(imgReader1,imgReader2,c0,c1,band_opt[0],band_opt[1],verbose_opt[0]);
728  std::cout << "-c0 " << c0 << " -c1 " << c1 << " -r2 " << r2 << std::endl;
729  imgReader1.close();
730  imgReader2.close();
731  }
732  if(regerr_opt[0]&&(input_opt.size()>1)){
733  imgreg.setDown(down_opt[0]);
734  imgreg.setThreshold(random_opt[0]);
735  double c0=0;//offset
736  double c1=1;//scale
737  while(band_opt.size()<input_opt.size())
738  band_opt.push_back(band_opt[0]);
739  if(src_min_opt.size()){
740  while(src_min_opt.size()<input_opt.size())
741  src_min_opt.push_back(src_min_opt[0]);
742  }
743  if(src_max_opt.size()){
744  while(src_max_opt.size()<input_opt.size())
745  src_max_opt.push_back(src_max_opt[0]);
746  }
747  ImgReaderGdal imgReader1(input_opt[0]);
748  ImgReaderGdal imgReader2(input_opt[1]);
749 
750  if(offset_opt.size())
751  imgReader1.setOffset(offset_opt[0],band_opt[0]);
752  if(scale_opt.size())
753  imgReader1.setScale(scale_opt[0],band_opt[0]);
754  if(offset_opt.size()>1)
755  imgReader2.setOffset(offset_opt[1],band_opt[1]);
756  if(scale_opt.size()>1)
757  imgReader2.setScale(scale_opt[1],band_opt[1]);
758 
759  for(int inodata=0;inodata<nodata_opt.size();++inodata){
760  if(!inodata){
761  imgReader1.GDALSetNoDataValue(nodata_opt[0],band_opt[0]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
762  imgReader2.GDALSetNoDataValue(nodata_opt[0]),band_opt[1];//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
763  }
764  imgReader1.pushNoDataValue(nodata_opt[inodata]);
765  imgReader2.pushNoDataValue(nodata_opt[inodata]);
766  }
767 
768  double err=imgreg.getRMSE(imgReader1,imgReader2,c0,c1,band_opt[0],band_opt[1],verbose_opt[0]);
769  std::cout << "-c0 " << c0 << " -c1 " << c1 << " -rmse " << err << std::endl;
770  imgReader1.close();
771  imgReader2.close();
772  }
773  if(rmse_opt[0]&&(input_opt.size()>1)){
774  imgreg.setDown(down_opt[0]);
775  imgreg.setThreshold(random_opt[0]);
776  double c0=0;//offset
777  double c1=1;//scale
778  while(band_opt.size()<input_opt.size())
779  band_opt.push_back(band_opt[0]);
780  if(src_min_opt.size()){
781  while(src_min_opt.size()<input_opt.size())
782  src_min_opt.push_back(src_min_opt[0]);
783  }
784  if(src_max_opt.size()){
785  while(src_max_opt.size()<input_opt.size())
786  src_max_opt.push_back(src_max_opt[0]);
787  }
788  ImgReaderGdal imgReader1(input_opt[0]);
789  ImgReaderGdal imgReader2(input_opt[1]);
790 
791  if(offset_opt.size())
792  imgReader1.setOffset(offset_opt[0],band_opt[0]);
793  if(scale_opt.size())
794  imgReader1.setScale(scale_opt[0],band_opt[0]);
795  if(offset_opt.size()>1)
796  imgReader2.setOffset(offset_opt[1],band_opt[1]);
797  if(scale_opt.size()>1)
798  imgReader2.setScale(scale_opt[1],band_opt[1]);
799 
800  for(int inodata=0;inodata<nodata_opt.size();++inodata){
801  if(!inodata){
802  imgReader1.GDALSetNoDataValue(nodata_opt[0],band_opt[0]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
803  imgReader2.GDALSetNoDataValue(nodata_opt[0]),band_opt[1];//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
804  }
805  imgReader1.pushNoDataValue(nodata_opt[inodata]);
806  imgReader2.pushNoDataValue(nodata_opt[inodata]);
807  }
808 
809  double err=imgreg.getRMSE(imgReader1,imgReader2,c0,c1,band_opt[0],band_opt[1],verbose_opt[0]);
810  std::cout << "-rmse " << err << std::endl;
811  imgReader1.close();
812  imgReader2.close();
813  }
814  if(histogram2d_opt[0]&&(input_opt.size()>1)){
815  while(band_opt.size()<input_opt.size())
816  band_opt.push_back(band_opt[0]);
817  if(src_min_opt.size()){
818  while(src_min_opt.size()<input_opt.size())
819  src_min_opt.push_back(src_min_opt[0]);
820  }
821  if(src_max_opt.size()){
822  while(src_max_opt.size()<input_opt.size())
823  src_max_opt.push_back(src_max_opt[0]);
824  }
825  ImgReaderGdal imgReader1(input_opt[0]);
826  ImgReaderGdal imgReader2(input_opt[1]);
827 
828  if(offset_opt.size())
829  imgReader1.setOffset(offset_opt[0],band_opt[0]);
830  if(scale_opt.size())
831  imgReader1.setScale(scale_opt[0],band_opt[0]);
832  if(offset_opt.size()>1)
833  imgReader2.setOffset(offset_opt[1],band_opt[1]);
834  if(scale_opt.size()>1)
835  imgReader2.setScale(scale_opt[1],band_opt[1]);
836 
837  for(int inodata=0;inodata<nodata_opt.size();++inodata){
838  if(!inodata){
839  imgReader1.GDALSetNoDataValue(nodata_opt[0],band_opt[0]);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
840  imgReader2.GDALSetNoDataValue(nodata_opt[0]),band_opt[1];//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
841  }
842  imgReader1.pushNoDataValue(nodata_opt[inodata]);
843  imgReader2.pushNoDataValue(nodata_opt[inodata]);
844  }
845 
846  imgReader1.getMinMax(minX,maxX,band_opt[0]);
847  imgReader2.getMinMax(minY,maxY,band_opt[1]);
848 
849  if(verbose_opt[0]){
850  cout << "minX: " << minX << endl;
851  cout << "maxX: " << maxX << endl;
852  cout << "minY: " << minY << endl;
853  cout << "maxY: " << maxY << endl;
854  }
855 
856  if(src_min_opt.size()){
857  minX=src_min_opt[0];
858  minY=src_min_opt[1];
859  }
860  if(src_max_opt.size()){
861  maxX=src_max_opt[0];
862  maxY=src_max_opt[1];
863  }
864 
865  nbin=(nbin_opt.size())? nbin_opt[0]:0;
866  if(nbin<=1){
867  std::cerr << "Warning: number of bins not defined, calculating bins from min and max value" << std::endl;
868  // imgReader1.getMinMax(minX,maxX,band_opt[0]);
869  // imgReader2.getMinMax(minY,maxY,band_opt[0]);
870  if(minX>=maxX)
871  imgReader1.getMinMax(minX,maxX,band_opt[0]);
872  if(minY>=maxY)
873  imgReader2.getMinMax(minY,maxY,band_opt[1]);
874 
875  minValue=(minX<minY)? minX:minY;
876  maxValue=(maxX>maxY)? maxX:maxY;
877  if(verbose_opt[0])
878  std::cout << "min and max values: " << minValue << ", " << maxValue << std::endl;
879  nbin=maxValue-minValue+1;
880  }
881  assert(nbin>1);
882  double sigma=0;
883  //kernel density estimation as in http://en.wikipedia.org/wiki/Kernel_density_estimation
884  if(kde_opt[0]){
885  GDALProgressFunc pfnProgress;
886  void* pProgressData;
887  GDALRasterBand* rasterBand;
888  double stdDev1=0;
889  double stdDev2=0;
890  rasterBand=imgReader1.getRasterBand(band_opt[0]);
891  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev1,pfnProgress,pProgressData);
892  rasterBand=imgReader2.getRasterBand(band_opt[0]);
893  rasterBand->ComputeStatistics(0,&minValue,&maxValue,&meanValue,&stdDev2,pfnProgress,pProgressData);
894 
895  //todo: think of smarter way how to estimate size (nodata!)
896  double estimatedSize=1.0*imgReader.getNvalid(band_opt[0])/down_opt[0]/down_opt[0];
897  if(random_opt[0]>0)
898  estimatedSize*=random_opt[0]/100.0;
899  sigma=1.06*sqrt(stdDev1*stdDev2)*pow(estimatedSize,-0.2);
900  }
901  assert(nbin);
902  if(verbose_opt[0]){
903  if(sigma>0)
904  std::cout << "calculating 2d kernel density estimate with sigma " << sigma << " for datasets " << input_opt[0] << " and " << input_opt[1] << std::endl;
905  else
906  std::cout << "calculating 2d histogram for datasets " << input_opt[0] << " and " << input_opt[1] << std::endl;
907  std::cout << "nbin: " << nbin << std::endl;
908  }
909 
910  vector< vector<double> > output;
911 
912  if(maxX<=minX)
913  imgReader1.getMinMax(minX,maxX,band_opt[0]);
914  if(maxY<=minY)
915  imgReader2.getMinMax(minY,maxY,band_opt[1]);
916 
917  if(maxX<=minX){
918  std::ostringstream s;
919  s<<"Error: could not calculate distribution (minX>=maxX)";
920  throw(s.str());
921  }
922  if(maxY<=minY){
923  std::ostringstream s;
924  s<<"Error: could not calculate distribution (minY>=maxY)";
925  throw(s.str());
926  }
927  if(verbose_opt[0]){
928  cout << "minX: " << minX << endl;
929  cout << "maxX: " << maxX << endl;
930  cout << "minY: " << minY << endl;
931  cout << "maxY: " << maxY << endl;
932  }
933  output.resize(nbin);
934  for(int i=0;i<nbin;++i){
935  output[i].resize(nbin);
936  for(int j=0;j<nbin;++j)
937  output[i][j]=0;
938  }
939  int binX=0;
940  int binY=0;
941  vector<double> inputX(imgReader1.nrOfCol());
942  vector<double> inputY(imgReader2.nrOfCol());
943  double nvalid=0;
944  double geoX=0;
945  double geoY=0;
946  double icol1=0;
947  double irow1=0;
948  double icol2=0;
949  double irow2=0;
950  for(int irow=0;irow<imgReader1.nrOfRow();++irow){
951  if(irow%down_opt[0])
952  continue;
953  irow1=irow;
954  imgReader1.image2geo(icol1,irow1,geoX,geoY);
955  imgReader2.geo2image(geoX,geoY,icol2,irow2);
956  irow2=static_cast<int>(irow2);
957  imgReader1.readData(inputX,GDT_Float64,irow1,band_opt[0]);
958  imgReader2.readData(inputY,GDT_Float64,irow2,band_opt[1]);
959  for(int icol=0;icol<imgReader.nrOfCol();++icol){
960  if(icol%down_opt[0])
961  continue;
962  icol1=icol;
963  if(random_opt[0]>0){
964  double p=static_cast<double>(rand())/(RAND_MAX);
965  p*=100.0;
966  if(p>random_opt[0])
967  continue;//do not select for now, go to next column
968  }
969  if(imgReader1.isNoData(inputX[icol]))
970  continue;
971  imgReader1.image2geo(icol1,irow1,geoX,geoY);
972  imgReader2.geo2image(geoX,geoY,icol2,irow2);
973  icol2=static_cast<int>(icol2);
974  if(imgReader2.isNoData(inputY[icol2]))
975  continue;
976  // ++nvalid;
977  if(inputX[icol1]>=maxX)
978  binX=nbin-1;
979  else if(inputX[icol]<=minX)
980  binX=0;
981  else
982  binX=static_cast<int>(static_cast<double>(inputX[icol1]-minX)/(maxX-minX)*nbin);
983  if(inputY[icol2]>=maxY)
984  binY=nbin-1;
985  else if(inputY[icol2]<=minY)
986  binY=0;
987  else
988  binY=static_cast<int>(static_cast<double>(inputY[icol2]-minY)/(maxY-minY)*nbin);
989  assert(binX>=0);
990  assert(binX<output.size());
991  assert(binY>=0);
992  assert(binY<output[binX].size());
993  if(sigma>0){
994  //create kde for Gaussian basis function
995  //todo: speed up by calculating first and last bin with non-zero contriubtion...
996  for(int ibinX=0;ibinX<nbin;++ibinX){
997  double centerX=minX+static_cast<double>(maxX-minX)*ibinX/nbin;
998  double pdfX=gsl_ran_gaussian_pdf(inputX[icol1]-centerX, sigma);
999  for(int ibinY=0;ibinY<nbin;++ibinY){
1000  //calculate \integral_ibinX^(ibinX+1)
1001  double centerY=minY+static_cast<double>(maxY-minY)*ibinY/nbin;
1002  double pdfY=gsl_ran_gaussian_pdf(inputY[icol2]-centerY, sigma);
1003  output[ibinX][binY]+=pdfX*pdfY;
1004  nvalid+=pdfX*pdfY;
1005  }
1006  }
1007  }
1008  else{
1009  ++output[binX][binY];
1010  ++nvalid;
1011  }
1012  }
1013  }
1014  if(verbose_opt[0])
1015  cout << "number of valid pixels: " << nvalid << endl;
1016  for(int binX=0;binX<nbin;++binX){
1017  cout << endl;
1018  for(int binY=0;binY<nbin;++binY){
1019  double binValueX=0;
1020  if(nbin==maxX-minX+1)
1021  binValueX=minX+binX;
1022  else
1023  binValueX=minX+static_cast<double>(maxX-minX)*(binX+0.5)/nbin;
1024  double binValueY=0;
1025  if(nbin==maxY-minY+1)
1026  binValueY=minY+binY;
1027  else
1028  binValueY=minY+static_cast<double>(maxY-minY)*(binY+0.5)/nbin;
1029  double value=static_cast<double>(output[binX][binY]);
1030 
1031  if(relative_opt[0]||kde_opt[0])
1032  value*=100.0/nvalid;
1033 
1034  cout << binValueX << " " << binValueY << " " << value << std::endl;
1035  // double value=static_cast<double>(output[binX][binY])/nvalid;
1036  // cout << (maxX-minX)*bin/(nbin-1)+minX << " " << (maxY-minY)*bin/(nbin-1)+minY << " " << value << std::endl;
1037  }
1038  }
1039  imgReader1.close();
1040  imgReader2.close();
1041  }
1042 
1043  if(!histogram_opt[0]||histogram2d_opt[0])
1044  std::cout << std::endl;
1045 }
1046 
1047 // int nband=(band_opt.size()) ? band_opt.size() : imgReader.nrOfBand();
1048 
1049 // const char* pszMessage;
1050 // void* pProgressArg=NULL;
1051 // GDALProgressFunc pfnProgress=GDALTermProgress;
1052 // double progress=0;
1053 // srand(time(NULL));
1054 
1055 
1056 // statfactory::StatFactory stat;
1057 // imgregression::ImgRegression imgreg;
1058 
1059 // pfnProgress(progress,pszMessage,pProgressArg);
1060 // for(irow=0;irow<classReader.nrOfRow();++irow){
1061 // if(irow%down_opt[0])
1062 // continue;
1063 // // classReader.readData(classBuffer,GDT_Int32,irow);
1064 // classReader.readData(classBuffer,GDT_Float64,irow);
1065 // double x,y;//geo coordinates
1066 // double iimg,jimg;//image coordinates in img image
1067 // for(icol=0;icol<classReader.nrOfCol();++icol){
1068 // if(icol%down_opt[0])
1069  // continue;
1070 
1071 
1072  // if(rand_opt[0]>0){
1073  // gsl_rng* r=stat.getRandomGenerator(time(NULL));
1074  // //todo: init random number generator using time...
1075  // if(verbose_opt[0])
1076  // std::cout << "generating " << rand_opt[0] << " random numbers: " << std::endl;
1077  // for(unsigned int i=0;i<rand_opt[0];++i)
1078  // std::cout << i << " " << stat.getRandomValue(r,randdist_opt[0],randa_opt[0],randb_opt[0]) << std::endl;
1079  // }
1080 
1081  // imgreg.setDown(down_opt[0]);
1082  // imgreg.setThreshold(threshold_opt[0]);
1083  // double c0=0;//offset
1084  // double c1=1;//scale
1085  // double err=uncertNodata_opt[0];//start with high initial value in case we do not have first ob err=imgreg.getRMSE(imgReaderModel1,imgReader,c0,c1,verbose_opt[0]);
1086 
1087  // int nband=band_opt.size();
1088  // if(band_opt[0]<0)
1089  // nband=imgReader.nrOfBand();
1090  // for(int iband=0;iband<nband;++iband){
1091  // unsigned short band_opt[iband]=(band_opt[0]<0)? iband : band_opt[iband];
1092 
1093  // if(minmax_opt[0]||min_opt[0]||max_opt[0]){
1094  // assert(band_opt[iband]<imgReader.nrOfBand());
1095  // if((ulx_opt.size()||uly_opt.size()||lrx_opt.size()||lry_opt.size())&&(imgReader.covers(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))){
1096  // double uli,ulj,lri,lrj;
1097  // imgReader.geo2image(ulx_opt[0],uly_opt[0],uli,ulj);
1098  // imgReader.geo2image(lrx_opt[0],lry_opt[0],lri,lrj);
1099  // imgReader.getMinMax(static_cast<int>(uli),static_cast<int>(lri),static_cast<int>(ulj),static_cast<int>(lrj),band_opt[iband],minValue,maxValue);
1100  // }
1101  // else
1102  // imgReader.getMinMax(minValue,maxValue,band_opt[iband],true);
1103  // if(minmax_opt[0])
1104  // std::cout << "-min " << minValue << " -max " << maxValue << " ";
1105  // else{
1106  // if(min_opt[0])
1107  // std::cout << "-min " << minValue << " ";
1108  // if(max_opt[0])
1109  // std::cout << "-max " << maxValue << " ";
1110  // }
1111  // }
1112  // }
1113  // if(relative_opt[0])
1114  // hist_opt[0]=true;
1115  // if(hist_opt[0]){
1116  // assert(band_opt[0]<imgReader.nrOfBand());
1117  // unsigned int nbin=(nbin_opt.size())? nbin_opt[0]:0;
1118  // std::vector<unsigned long int> output;
1119  // minValue=0;
1120  // maxValue=0;
1121  // //todo: optimize such that getMinMax is only called once...
1122  // imgReader.getMinMax(minValue,maxValue,band_opt[0]);
1123 
1124  // if(src_min_opt.size())
1125  // minValue=src_min_opt[0];
1126  // if(src_max_opt.size())
1127  // maxValue=src_max_opt[0];
1128  // unsigned long int nsample=imgReader.getHistogram(output,minValue,maxValue,nbin,band_opt[0]);
1129  // std::cout.precision(10);
1130  // for(int bin=0;bin<nbin;++bin){
1131  // double binValue=0;
1132  // if(nbin==maxValue-minValue+1)
1133  // binValue=minValue+bin;
1134  // else
1135  // binValue=minValue+static_cast<double>(maxValue-minValue)*(bin+0.5)/nbin;
1136  // std::cout << binValue << " ";
1137  // if(relative_opt[0])
1138  // std::cout << 100.0*static_cast<double>(output[bin])/static_cast<double>(nsample) << std::endl;
1139  // else
1140  // std::cout << static_cast<double>(output[bin]) << std::endl;
1141  // }
1142  // }
pktools-2.6.6/doc/html/inherit_graph_25.map0000644000113200011300000000030612647437044015476 00000000000000 pktools-2.6.6/doc/html/classCostFactorySVM__coll__graph.png0000644000113200011300000007413312616110567020723 00000000000000‰PNG  IHDRÛé4Ó$çbKGDÿÿÿ ½§“ IDATxœìÝyX”åúðï ÌȾ+"‚ŠŠŠ¦YšK™içgš Ej‹k–Ëñ¸k¦•æ^ifvÜ“4À%·VwOfZ„™€+ˆ ; 3óüþ &Gvï纼ð]Ÿû˜÷~ŸM"„ """""""c‰š:""""""¢††É6‘‘1Ù&""""""22sS@DDæøñãHHH0uDFÕ¿øøø˜: ""¢Z“p€4"¢úM&“A£Ñ˜: "£ Á®]»LQmE°f›ˆ¨žÓh4 Cpp°©C!2Šàà`>@""¢z}¶‰ˆˆˆˆˆˆŒŒÉ6‘‘1Ù&""""""22&ÛDDDDDDDFÆd›ˆˆˆ£F‚Í'!!‰ÄHQÕ-cÇšœœŒW^y>>>°±±A×®]±ÿþ>oc|oˆˆˆL¶‰ˆè$''㫯¾ÂŸþù@ç±··Çœ9sŒÕƒ¹víœ+ÜnÌX322…B°°0œ?/¿ü2BBBðÃ?<йâ{CDDT_pžm"¢zN"‘˜tꯄ„øûû£!}<Ìkštè:tèKKKøúúbçÎåîW›XJ·mݺpqqÁòå˱sçN´hÑvvvX¸p¡~ßÇëk•=<<°|ùòJ¯éرcðööÆöíÛõ±>^ÜûuRÙ²R©bãÆâÎ;bË–-ÂÜÜ\(•Ê2ÇÕ&–Òm!!!"77WlÞ¼YÁÁÁ"77W|ñÅ€HOO¹¹¹B.—‹1cƈ¤¤$*ˆ»wïVx ÇQQQÛ_}õUñÚk¯‰””áææ&~ýõWý¶ììl±iÓ¦r—³²²‘™™Yå{×Þ›ê1b„1bDŽ!""zÄ„3Ù&"ªçj’l·nÝZìÛ·O¿üçŸê—Õjµ033±±±úíûöí~~~úrNœ8¡ß€ˆ¯QB—™™)d2™X½zµÈÊÊ:Näåå ­Vk°_mc)Ýi°íþåøøxQTT$._¾,”J¥ÐjµâÔ©SU^SLLL¹×˜••%š6m*:tè O:«#33SYYY•î×PÞ›êb²MDD @8›‘5"7oÞ„¿¿¿~9 /¾ø" 55Z­-[¶Ôo÷óóCRR’~ÙÓÓ “ɪ]¦¸§¿°ƒƒNœ8sçΡiÓ¦èÝ»7Μ9©ÔðëèAc±µµ5Øvÿ2ÈårÄÅÅaÀ€èÒ¥ ¶oß^åµ´iÓ¦Üõööö˜0a.]º„I“&UyžRpss+w³ . k×®(((hPï QcÁd›ˆ¨ñôôÄ7ôËQQQXºt)ÀÍÍ fff¸víš~ûÕ«Wáåå¥_¾?ñªŒF£ܾ}[¿N¥RA§Ó!""™™™;v, „ÌÌLƒcKyT*‚ƒƒ1kÖ,DFFbÆ USQò˜˜˜ˆõë×£_¿~˜1cFâxá…°fÍš2ƒ˜…††¢¸¸ …¢Ñ½7DDD ¿ ‰ˆ‘Ñ£GcÁ‚ˆEll,&OžŒ›7o(I$_zé%L:ׯ_Gll,ÞyçŒ9²FeØÛÛ¾üòKäææbݺuúm‰ýû÷ÇÞ½{‘›› µZ ™L…BapcÅR™¢¢"¨ÕjÈår¨T*,Z´——§ßG©TVyN‡1cÆ`Ê”)ؽ{7Ž=ŠC‡é·çää`óæÍ./]º§NÂèÑ£qöìYÄÄÄà½÷ÞúuëôBÛ{CDDÔ ˜¸;= Ô Ïvaa¡˜9s¦ðôôvvv"$$Ä ¿pff¦=z´prrbúôéB¥Ré˹·ï-*è,„K–,ööö¢eË–âÀÛÃÂÂDË–-…\.mÚ´B”íO\›XªÚvÿòG}$E³fÍĆ DHHˆpuuÅÅÅ¢gÏžÂÆÆ¦ÜØî]þôÓOEÇŽ…Z­B±ÿ~ááá¡ô¬ª~ÓBqãÆ 1|øpáéé)lmmE·nÝÄÁƒ öiïMu±Ï65áœg›ˆ¨ž3õ<ÛDÆÆy¶‰ˆ¨à<ÛDDDDDDDÆÆd›ˆˆˆˆˆˆÈȘl“m"""""""#c²MDD‚D"¿¿™ù¬`àÀH$HHHx 2 ‘HèDDDÔ00Ù&"¢FãÆˆŽŽ6X—••…Ó§OWëøk×®ÁÙÙ¹Âíööö˜3gÎÅHDDD “m""j4úõ뇈ˆƒuDïÞ½«u¼N§CFFF…Û±|ùòŠ‘ˆˆˆ&ÛDDÔhŒ1áááMÉ÷ìÙƒáÇìwøðaA¡PÀÃÃCŸ@wïÞàîîàŸfãÇŽƒ··7¶oß®oF~ðàAxyy!++ °{÷n´jÕ ùùùu~DDDdzL¶‰ˆ¨ÑèÑ£”J¥¾)yNNŽ?ŽÁƒë÷ÉËËðaÃйsgÄÇÇcõêÕ˜7oÒÒÒpîÜ9@JJŠÁy׬Yƒ;v ((H¿î…^@¿~ý0}út¤¦¦búôé …µµõC¸R"""25sS@DDô°˜™™aذaG§NpøðaôèÑNNNú},,,fÍšÁÊÊ Íš5P’˜WdÅŠ ,3ÀÚÚµkˆþýûcÒ¤IèÖ­[Ý\=rX³MDDʈ#!D¹MÈår9âââ0`ÀtéÒÛ·o¯òœmÚ´)w½½½=&L˜€K—.aÒ¤IÆŸˆˆˆê &ÛDDÔ¨ôìÙyyyøßÿþ‡Ÿ~ú C† 1Ø®R©ŒY³f!226l¨òœ2™¬Üõ‰‰‰X¿~=úõë‡3f%~"""ª˜lQ£RÚ”|âĉèÖ­\]] ¶A­VC.—C¥RaÑ¢EJúr—R*•U–£Óé0fÌL™2»wïÆÑ£GqèÐ!ã^ =²˜lQ£ŒË—/—iB”4ý^³f Fމ6mÚÀÇÇ!!!0`|||гgOxxxTYƆ ––†9sæÀÁÁŸþ9&Nœ¨œˆˆˆ6‰¸wþ""ªw$ ÂÂÂlêPˆŒ¢ô³nâHˆˆˆj-‚5ÛDDDDDDDFÆd›ˆˆˆè#‘H°uëVÀÅÅË—/ÇÎ;Ñ¢E ØÙÙaáÂ…UžC£Ñ`Ñ¢Eðöö†‹‹ ^}õUdggµ ""ª“m"""¢GÐÑ£Gqþüy,_¾óæÍÃáǃU«VaÉ’%ÈÈȨôøO>ù{÷îÅ‘#GpâÄ ÄÅÅaéÒ¥F-ƒˆˆ*Æ>ÛDDõûlSCSÛ>Ûê<-4E:(œËŸŠ­>‘H$ˆŒŒDPPŠ‹‹!—ËË,ÇÇÇÃÏϯÂs´iÓË–-Ë/¾¸|ù2þúë/ý²1Ê "¢ E˜›:"""¢ª¨25(H+Fþ]5”©j¤C™¢†òŽÊ”b¤©¡U @¼òm ¬]ëÂmkk àŸyÜï_®ÊÍ›7áïï¯_@@@€QË "¢Š1Ù&""¢Gй£uZ?xõ/(S‹Q˜­NóOC<‰T‰T@hûÛç™É%°râí xzzâÆhß¾= ** GŽÁ‚ LQãÀo#"""z´è¤°Wyãr7 €Ð•]/‘®í­!5“Ôq€õÃèÑ£±`Áøøø&OžŒ¶mÛš6("¢F„É6QpìØ1ƒQ†‰ê³¸›Bëû_,|qί» ¡ƒAÍvE$æx>fû"¬æÍ›‡üü|<÷ÜsÈÏÏÇóÏ?•+Wš:,"¢Fƒ¤ÕsÞÞÞHLL4uDF5cÆ ¬^½y·‹pfÉ-ܾW²¡Š»–ޝ»£ígظËë>H""¢ŠE0Ù&""¢GÞµ£Y8³ô4º k¹%ÀL.…¦H9<:ÛÀ=Èîl`ßÂò!GLDD“m"""ªŠrµøuÝm\ù&‰Bgx ãÔÊ ƒw´AÚ¥|$ÿ–‡;¿+q7&š"¬ÍñÌr_xt±1QôuC"©¼:oóˆˆL†É6Õ/w~WâÔ{7¡L)‚Ж¬“Ê$h;ÂOÌhj°¯®Xàî¥|ÜùM‰Öƒ pá”VDDôP0Ù&""¢ú§¸@‡ß6$ãÒ×i˜: ðÌrø>ëPësž~ÿ&ý¬àÑÅŽþVH056L¶‰ˆˆ¨þJ»T€SïÝ@ÖµBŒü.°Ö5ו§ßDòïy(ÌÒÀ¢‰܃làù˜-<ºØÀÑ_Á䛈ˆj‚É6Õo:­@öµB8ú[=øÉ™ Bò…<ܾ‡”ß•PçkáÒV!;Û<øù‰ˆ¨±`²MDDDT¡Hû³E9Z4ëÑÄÔáQýanꈈˆˆU©®í­«ÜïÚÑ,Üþ%^OØÂ«›-,šð‹ˆ¨±ã7ÑÒiÒ.àÊÁt¸´S i÷&húD¸´W@jVù]DDÔð°9‘‘fipû|nŸÏÅí_ó ¼£†ÜÖ ý×øÂ£‹­©Ã#"¢‡‡}¶‰ˆˆˆêJέ"Ü>Ÿ ßg`éÀ…DD“m""""S‹Ü|A¶pëh ©9›œ5 ˆˆˆÈ”T™\ý> ¿~r3x=n‹fOÚ¡é“M`íZ»yɈÈôX³MDDDôÈKV#él.Ïæàöù—Ï®¶hÞËÞ½í pb_o""ScÍ6Q=–›T„›§rpëtR.*!1<:Û¢y;4ïek7¹©C$"jŒØŒœˆˆˆ¨¡(ÊÕ"ñçÜ<•ƒ¤_rQ\ Å¨£`iÇÆŒDD“m"""¢†HW,~¥®í­M Qc!5uDDDDd|R™¤ÊD;7±—¾NC~jñCŠŠˆ¨ñ`Í6Q#uýX6N¿ê|-\Û[£ÅÓöhñŒ=l½,LQ}ÇfäDDDD™V-pû|.nÏÆÍ“9(ÌÑÀ©µ-ž¶‡ÿÿ9ÂÆ¬Õ“m""""*!t@Æ•Ü<ƒ«ßg¢ÇK†O_{¸u°$'."¢ú‚É6,,,àââbê0ˆ¨žÈ»£ÆÍÓ9ˆÙ™ 9|Ÿu€ß8µV˜:4"¢G“m""""ª1;o ïk‹Œ+¸úc®ý˜…˜/Sa×Ü-û;Âo #ìšsTs"j¼˜lQ­9µVÀ©µݦx!ëj!®ÍÂÕï3an)EÇ×ÝL‘É0Ù&""""£phi‰.-=Ðy¼´Å:S‡CDdR_’ˆˆˆˆŒJ"Ì-*¿Í¼öS ³4)""¢‡É6=t HçÐÅãÚóëKõƒ:_‹3ÜÂWÿÀO3®áæ©è4œ–ˆ&ÛDDdT×®]ƒ³³³©Ã0‰‡uíU•coo9sæÔyDµ%·6è£Ðo¥/¤æ} ;Ÿ‰Á™¥·¥4uxDDFÁ>ÛDDdT:¦Ã$ÖµWU޳³3–/_^çq=3¹Í{Ù¡y/;ä§#þ» $ÉÄ_ûÒ8Êݧ75uˆDD„5ÛDDT+‡B‡`ii ___ìܹн{w€»»;@«ÕbÕªUhÕªlmmÑ£Güúë¯úóÜßäùþe‰D‚­[·" ...X¾|9vî܉-ZÀÎÎ .Ôï{øðaA¡PÀÃÃCŸp–žóÀhݺ5\]]1uêTUx}iii(((0éµW·œÒãŽ;ooolß¾½ÌkøÕW_! ŽŽŽX¹r%@7¢mÛ¶hÒ¤ ž~úi>|˜MÐ顳v“¡ÓëîÑCv¶A«ÿs2uHDDNQ£+bcc«½¿R©bãÆâÎ;bË–-ÂÜÜ\(•J/îýzù裄«««Ø·oŸHNNGŽžžžú}²³³Å¦M›ôûß¿ @„„„ˆÜÜ\±yóf@‹ÜÜ\ñÅ_"==]äææ ¹\.ÆŒ#’’’Dhh¨ îÞ½«©ÿþ"..Nœ;wNøùù‰Å‹—¹¶óçÏ‹×^{M¸¸¸ˆääd“]{MÊ)]8p 8~ü¸ˆŠŠ2Ø@ >\dee‰M›6 "##ClÚ´Ixyy‰ï¿ÿ^¤¥¥‰Ÿ~úIøùù‰¹=8qâ„HMM­õñDDD D8“m""ªq²™™)d2™X½zµÈÊÊ:Näåå ­V[&lÕª•ؾ}»Áñ;vì¨vB@DFF !„P«Õå.ÇÇÇ‹¢¢"qùòe¡T*…V«§NÒo+)&&FÞ°°0áçç'„B¥R‰/¿üRtëÖM‰/¾øBäåå™ôÚkRÎý×wÿvâĉe^³öíÛ‹¯¾úÊ Ü]»v1Ù¦GšN«‡Æ]QÛRDAF±©Ã!"ªH8›‘Q988àĉ8wîš6mŠÞ½{ãÌ™3JË~­$&&¢S§Në:tèP£òlmm2™¬ÜeË刋‹Ã€Ð¥Klß¾½ÌyüýýõÿoÓ¦ ’’’pôèQ4oÞÇŽçŸ~Šßÿ&L€I¯½&åÜ{Mñôô`øš]½zíÛ·7دmÛ¶ÕŠÈTŠ tphi…¨m)Øý¯?p|Áu¤\ä jDôèa²MDD5¦R© ÓéÌÌLŒ;ƒ Bfff™}}||m°îÒ¥KuSpp0fÍš…ÈÈHlذ¡Ì>ñññúÿÇÅÅÁÓÓ...hÛ¶-Ξ=‹ŸþÙÙÙU–ó0®½&唺7‘¾_yIzóæÍËÄsùòåjÅGd*r3ô˜Û #¿D¹ÞÈKRãи8ì ¾Œ?ÃÓP\ 5uˆDD˜lQ-H$ôïß{÷îEnn.Ôj5d2 …~¥²¤¦éÍ7ßĬY³pàÀ¤¤¤àûï¿Ç»ï¾«ß/''›7o®p¹ºŠŠŠ V«!—Ë¡R©°hÑ"@^^ž~ŸiÓ¦!!!.\Àüùó1jÔ(tìØ'NœÀ¾}ûpåÊ´jÕ ãÆÃï¿ÿnÒk¯I9µõöÛocöìÙøñÇ‘‘‘ãÇcñâÅúÒ6oÞŒœœœ*ƒ¨®˜[IÑz°ïh¡»àÑÙÖ'#z{ª©C#"*aê†ìDDdz5í³-DIŸç–-[ ¹\.Ú´i#8 „¢¸¸XôìÙSØØØ!„Ðh4bÕªUÂÏÏOX[[‹'žxBœ;wNß/¸¢þÇ¥ðwÿâê,ôÑGÂÑÑQ4kÖLlذA„„„WWWý97oÞ,š7o.œÅ”)S„J¥*s]YYYâ£>-[¶7nÜ0éµW·œÚ¾†Z­V|üñÇ¢eË–ÂÎÎN 0@8p@¸¸¸”{\u°Ï6™R‘R#Šr5¦ƒˆH!Â%Ba‚Ÿˆˆ!¥M‰ÛµkgâHêFBBüýýQ“¯ŒfÍš¡cÇŽúu{÷îÅ’%KpñâEH$dddÀÑѱÚç¼ôÒKÕ*·ÔýMÊï_...ƬY³àææWWWÌš5 ÅÅÅúí#FŒ@xx¸A-ùž={0|øðj½¥å8p­[·†««+¦NŠ¢¢¢r_ËÚ[›¡ãënxùp;tÿ²oBfÅ[c"2" ƒNDd÷Nq¤ÓéÄŒ3DÇŽEZZšBµZ-fΜ)\]]…‹‹‹˜9s¦P«ÕbÊ”)b̘1úóäåå +++)„âàÁƒ"00PXXXˆ-Zˆ/¿üòá_ÜCT›©¿ÔbŠ«ûÝ?ÝVcU›©¿´Å:¡LU×QDÕ@„„„ˆÜÜ\±yóf@‹ÜÜ\ñÅ_"==½Òs¬ZµJ´k×NÄÄĈ?þøC<þøãbæÌ™BÃÏHnn®Ëåb̘1"))I„†† âîÝ»B©T ±qãFqçαeËann.”Je¥Û„(™ºÎÂÂBœ:uJ!ÄåË—…T*)))U–{o|UM'·bÅ 1lØ0qëÖ-#:wî,æÎ«ÿúë/áîî..^¼(„";;[( ‘žž®ÿ}«N,ýû÷qqqâܹsÂÏÏO,^¼øßg"¢‡$œïˆ¨AB`öìÙ8vìŽ;¦¯aüøãqýúuüöÛo8vìŽ?Žwß}ÇÇ Ñ” ŽsàÀøúú¢S§NÈÏÏLj#ðöÛoãÆxçw0fÌäçç›òéUV?þø#üüüààà€eË–é×gggãõ×_‡³³3š6mŠ™3g¢°°P_óvìØ1x{{Ãßßàîî^nùiii(((¨» ¬G4E:Üù=‘›îàÈ„8l* »ÿ‹âÓ=kÖ,ØÚÚâÕW_Ì;¶¶¶xã7”ô;®ÌæÍ›ñÁ 00í۷ǶmÛðä“O–ÙÏÂÂÑÑÑX·n<<<ЬY3@NNÔj5t:”J%,--ñÆo ++ VVV•n{{{<ÿüóú¦äûöíCŸ>}àææVe¹5±mÛ6¬_¿Íš5C`` V¬Xï¿ÿ^¿ÝÌÌ Ã† ÓÇqøðaôèÑNNNÕz J­^½þþþxüñDZtéR„††Ö(N""Sb²MD Âܹs±zõj„……ÜÌUtCØ£GÈd2œ>}°k×.Œ=‰¤Ê›Yªªóå»ï¾ÃÅ‹±eËÌŸ?€É“'#)) çÏŸÇwß}‡~ø+V¬Ð·fÍìØ±QQQ€”””rcˆŽŽF‹-0{öl\¿~½¯öÑS\ EâÙ\\ø,ߌ¾‚íOEãð„x\Üœ‚äߕЪKš›[ÖÝHÝÕekk Édå.WåæÍ›ú/€_|±Ì~r¹qqq0`ºté‚íÛ·ë·988àĉ8wîš6mŠÞ½{ãÌ™3J¥•n+uoSòû›WVneÄ}ƒ¦Ý¸qH$H$xöÙgË|®GŒˆˆ!ÊmB^Xî}-Û´iƒ¤¤¤jÅ[®ˆ:}º‰¨ú˜lQƒpáÂôéÓ~ø¡ÁúŠnÍÌÌ0tèPìÛ·ééé8zô(FŽ  ò]ªŸªóeæÌ™°µµÅ!C”Ô`ã믿ÆÚµkáëë‹ÀÀ@¼ÿþûµk+V¬@ß¾}amm]i ýúõÃÅ‹¡P(ЫW/¼ð øñÇËLÓÔ}›Í IDAT¨îj8g–Þ®±ØþT4~˜–€Ø]w‘ög>„¶$qÓiþIà,íÌ ‘š>Ù~Pžžž¸qã†~9** K—.-³ŸJ¥Bpp0fÍš…ÈÈHlذÁ`›N§CDD2331vìX 4™™™•n+õ¯ý ùùùøê«¯mìWVnyJ[ÿܾ}Û`½³³3âãã!„€YYY8wîœÁ>={öD^^þ÷¿ÿá§Ÿ~ÒÿnÕ$–øøxýÿãââàééYi¼u¥¸@‡_Ö$áëb½=•ótQµðΑˆ„C‡aãÆøúë¯qâÄ ýúÊnGŒýû÷#<<={öDÓ¦MT~£KõSu ”ÞÄß».55Z­-[¶Ô¯óóó3¨]kÓ¦MµãðôôÄâÅ‹qíÚ5Œ=|ð˜˜ø —÷HIÚ¨ÀO¯ßÁ©Å78ùwÕ¡C¥ Š•sØviôèÑX°`bcc‹É“'ãæÍ›eö+**‚Z­†\.‡J¥Â¢E‹yyyH$èß¿?öîÝ‹ÜÜ\¨ÕjÈd2(ŠJ·•R(2dþýïãé§Ÿ†‹‹KµÊ½—½½=àË/¿Dnn.Ö­[g°}èС˜7onÞ¼‰˜˜ 0Ÿ}ö™Á>¥MÉ'Nœˆnݺ•™®:±L›6 ¸páæÏŸQ£FUï02™BŠ—¶C·)^ˆÝ}»Ÿÿ;é.bÒMD3/oåÕ«WÔ?UŸT*EÇŽagggêPˆjÄÚÚ­[·ÆÜ¹sñæ›o"::–––úÂÕ«W#''&L@×®]ñé§Ÿâ©§ž‚F£Áûï¿o0oéÍlhh(z÷î]îÍ,Õ/÷>@Q«Õؽ{7 „»wïÂÑÑ FZ.åææ333\»v mÛ¶Pòéåå¥ß§ºÍ‹ï•ššŠK—.!)) Ý»woP]lÚk K•£(O@§­~"¢)ÒáRX¬]e°r’ÁÆM+G¤²úUÛ=oÞ<äççã¹çžC~~>žþy¬\¹²Ì~öööX³f FŽ kkkÌ›7!!!0`RSS±cÇÌ™3‰‰‰ðõõEXX,-- Òm¥^y儆†"88¸ÚåþüóÏúýœ±dÉ̘1~ø!>úè#ìß¿_¿}É’%˜6m‚‚‚ •J1lØ0ƒî¥‚ƒƒ±aÃLž<¹F¯Ai,#GŽD¿~ýŸŸÌ›7¯ï†qIÍ%h3Ô~q), QÛSp)ü.:ó@«ÁNšÕ¯Ï*Õ=‰¸¿€K—.¡¨¨H?P5—.]BÛ¶mË<}&zT%$$Àßß_ߟ°°°;vDHH/^Œ¼¼{¥ŸÅ¼¼<ØØØ”‰A§ÓáèÑ£øüóÏqáÂŒ;'N4Y³ØºròäI´i€‚?åˆÚ’‚Œ8$R t:ŠR©™2k)$R ³5Û¬Íaí&Ç‹¡ÕoA@õßýÛEªÌb\Ü’‚Ë{ÓÑÿ£–hödù_‰¨ÑŠ(·f(!òÞfGDD"???ƒ›1KKK\¹rE¿lkk‹­[·bëÖ­åïèèˆ_|Ñ ÑJjcî¯zÔ¥]*@ô—)ÈO)†2E‚ôæ¼µt0G«9U˜l7t–––Õª ,Ïúõë1mÚ4tíÚr¹/¿ü2æÍ›Wf &ôìÙešäÀþýû±zõjL™2aaaËåF»¾GÔ\ß~ðí瀔(%.nIAÒÙ\HÍ%ý´ÿ9@‚ö!®è<ÁZµ@Az1 ÒÔ(H× ?M]eÿØÂ ö ¿ …³9.r(œÍaí*‡•SÉO…‹ .mÙ2…ŒËÊQ†'g5CÇ×ÜaíÚ0ºA‘qU˜l5d………HNNÆÖ­[±{÷nS‡S†V- LQ—ÔL§¨¡¼£†…9Ú½TñCP‰¸w²§¶žrØzZÀÖSs+ÑQÙ”ûkÏî]vppÀ—_~Yæ˜ûô˜››ãÌ™3–ÿ /`ذa5 »ÞsïdƒŸú!ý¯üzW¿Ï‚ÄÌpp4è÷Ù6“KþþìVÿa„ÔL‚NcÜþNÒK6Ýý#ùiÅPçiaëe—VÜjC£Òáö…<(œd°v•ÁÒѼÒ&Áåu9¸×£\[_4iÒ'N4uÕÂD›ˆ*Âd›ˆ¥_ý/¾ø"&Mš„>}ú˜:@ÖµBœZ|ù)jdüS+m&—ÀÆ]Çl+9pn£@¿•¾u&ÕRmúv7$Îmè»Ä_sCôöT\û±$éÖ è´âH“Û˜¡}HùÝŸ4Eº*§kʹUˆ§_Õ/K¤%µ– g.28·V Ë$ýv&ÓuÏÕÕ7n4uDD„É65J½{÷®»ÑÅP^Œ¼d5òîA™¬F^²)Ðs¾w…‡YÚ›Á­ƒ5l8ÀÚMw¬ÝåP85î$G+ô]ꃮ“=ñGè]\Þ—­ZÀÚ¥n>çæR˜[T޲éµoœíU†éÅ(ÌÔ  £ªŒb¨²4¨°³ùß2âT8»" —t…³L?Ø›µ« r3#^Õ'Çæ^‡{ †9CjÎAÔˆ&ÛDDF¢ÊÔàи8(ïA«.©ù’šI`í&ƒ‡ý*ïlå(Ã3›>ŒP‰LÎÆCŽ'f5EÐw$ýœ ÇV¦‘ÝÜBZãæë¥Ìä8µ¶B~j1Ò.åC™ª†*S]qÉߦO4ÁÀõ~¯Î×¢àn1¬Ýd)˜”7$:€·ί½Kaix|šš÷æŒ/DÅ#‘lWwÄɺ™ÒÔ£]šºü†,-- ÉÉɦ£^óôôl”%fiJúI§–ô•V¦”ü+ÊÑâ_ý+<ÎÂÎ -ŸsÐß°ÛxXÀÚMÆé`ˆ*aig¿çMƱ÷±Ä“³ËÎà¢Ê,†*£êšñ¤³¹86÷:ÀÜR k7N2(\K~ºÙÀ§¯}]„NuLj.Ácoy¢ý+®¸¸)Gg]ƒS+tŸÞîAeg- ¢†¥Î“ík×®¡[·nHOO¯ë¢jÅÞÞsæÌ©³óWuýu]~cv÷î] I“Æ9úòƒÊÍÍÅÝ»wU²-tÀŽÞÑ(.ø§§¥ƒ9lÜå°q“ÃÑÏ :­¨0y–šIÐe¢G¹Ûˆ¨ñ±r,™+¼*Íz4ÁÐ]ÈOSCõ÷ì¥?S¢”0“I+M¶ScòqýX–áìÿäàˆµsüøq$$$÷¤v+v®ÏÚ¥Aô¸eÜ2ôíÛ×ÔaE|Žè‘TÑç¶Î“mN‡ŒŒŒº.¦Öœ±|ùò:;U×_×å7vMš4i°ó×µÒy—«+ñçÄìLC§7\áõ¸éphÕÊ;†}¥ïýÿðˆX4)ÿOŸD <õŽ7,íÍJúL{È«ìëIDô d 38µ¶‚SëÚ5¥W¥#5*ùiÙ(Ì*Öwc)=wà(×JjÕ3°Î=ž{î9h4šªw¬¥Nö} ¸a‹³_ª³2ê+sssW½c=Pן#ztTô¹5Z²}èÐ!,X°qqqðôôÄ{gѣG£{÷îwww¤¤¤@«Õâ£>¦M›pçÎtèÐo½õ–þ<÷7«.¯™õW_}…wß}¹¹¹>|8Ö¬Y…BÇcáÂ…¸rå ììì0mÚ4Ì;·Òøî=¿F£Á|€mÛ¶A¥RaàÀX·nìí«nºUÝë/-ïèÑ£xã7ðþûïã7ÞÐ_ŸD"Ahh(–,Y‚ÔÔTÌ;³gφ_|ñÖ­[‡¤¤$<öØcøÏþƒAƒUØ=-- ÖÖÖP(8·(ÕÜ8•ß6ÜAÖU Ü:*LšlG »„¼d5Àʱ¤VÚÚM—vÖhÑÏ¡Ê){Z>çð0Â$"2Ÿ§íáóô?÷*E¹Ú’ÁÝ2K|kÒÌ¢ÒãÿMÅoŸ'ÃÊA+g¬Kzû»»['k8ú™¶OýæÑhVátT7ÂÃÃñÒK/™: £Ñh4X´hÑ#3ë Õ“'Oâ½÷Þ+w›Q’íüü|Œ1k×®ÅàÁƒñí·ßb̘1:t(Î;¤¤¤Ö­[‡Õ«WcãÆèÞ½;.^¼ˆñãÇëÏåââ‚M›6U¸ [·nÅ÷ßÌÌLŒ5 |ðæÏŸaÆaÔ¨Q8|ø0Nž<‰Q£FaìØ±P(Æw¯O>ù{÷îÅ‘#G ‘H0nÜ8,]º«V­2Úõ—Z³f vìØGDzýÔ¾ùæüòË/سgÆqãÆaß¾}X²d ¶lÙ‚.]º ** “&M*7ž .à³Ï>÷ß~‹èèh&Ûdt:­@Ü DnNAÁ]õ?ý%}¢[[yÉjä%!?¥ywJ~êûO'«ñ¶Vpj]ñgºßJ_ÈRØxÈa&g­45>MÌ`ÑÄ ö-ª·‹~hÒÔéÅÈO+FAz1r“Š­DÁÝbtë^i²}'R‰œ…£±[9Ê áŸ`"j䌒l«Õjèt:(•JXZZâ7Þ@pp0¬¬ÊþaÞ¸q#V®\‰_|àááeË–áµ×^ØÙÙaܸqúýï_J’bÿ’AŠ–.]йsçâ½÷ÞCtt4š5k+++4kV2PINNÌÍÍ«ßæÍ›±lÙ2¶mÛ†¿þú˨×_jÅŠ ,·ÇÛo¿ {{{¼öÚk?~<233±víZ¬\¹Ï=÷ _¿~xÿý÷ñÊ+¯ õë×£¸¸o¾ù&Ö¯_¾AÆ£Uëpyo:b¾LEAZ1ˆ¿ÿ€N /©¨Âã ³40WT> Ïé÷n"ù·<˜É%°v•—ÔL»Ëàh k÷’›¸Ê8ðáRmH$ܽ{'Ož4u(ÔTÕ‚„-vÞ°ó®¼ö»2·ÍEì®»(.Ðé×I¤’’þã.2tëŸ>àˆ£$Û8qâ>ùä,Z´;wƼyó0pàÀ2û&&&¢S§Në:tèP£òJmhÓ¦ îܹ¹\ޏ¸8Œ?J¥AAA5ŽïæÍ›ç@@@@•ñÔäúï»"žžž™ìŸ¤âêÕ«hß¾½Á~mÛ¶=z#GŽÄÀñé§Ÿ¢k×®¼Ñ!£Òéð×¾tDoK…*SŠÆÏϹU„¸ÃúQ¼õ5ÓwÔÐéðì*_ƒæŽ÷ëõns˜YHJæ–æÇø¡iÑ¢E£ ê–“““©C ‡è±Ižxl’'4*òïªQ¡Aþ]5T䧪KþžWâ×µ·qçw%Îæ°v‘ÃêÞŸ®r4i*ç”hDT/%ÙV©TÐétˆˆˆ€Z­ÆîÝ»1hРܽ{·Ì¾>>>ˆŽŽFÇŽõëj:S||¼¾ö9..Í›7‡J¥Bpp0ÂÃÃ1hÐ aÛ¶m5ŠÏÓÓ7nÜÐ'µQQQ8rä,X`´ë/uo"}?©´l­_óæÍqéÒ%ƒ—/_PÒÔ¾mÛ¶8{ö,:vì88°ßéÃö0¦q{ØSÅéÔ@ôöTDïHZ©ƒÐU]nQŽÿ[z«d€±¿Gñví` ·’jç6•×<ÛzÕ|Ž[zpVVV•¶Æ!"ªŠ¹•vÍ-a×¼fǹZ:@•õwóõ(%T™¨²Š*Ò¦ÆäCW,`åd7ŽÀND£$Û‰ýû÷Ghh(z÷î µZ ™L…BÌÌL€R©„ Þ|óMÌš5 vvvxüñÇ…wß}W®œœDDD蛎߿ 3fÌÀ† ••…ùóçc̘1(**‚Z­†\.‡J¥ÒwRÏËË«V|0zôh,X°>>>€É“'ëkuýµõöÛocöìÙprrB—.]Å‹C"‘ cÇŽ8qâbcc±~ýz´jÕ ƒƤI“Ð¥K—Z—Y©©98p yy…˜1ã¹:-Ë”ÖvÒTqÙ±:Äo,Fqîí'ðÒ7í`íÆ¤™ˆˆªvÿo¥„N@•©Ü¶òZíß6$#ùBž~Y¦LƒÖé w8´´4zÜ÷KNNÆÌ™3qöìY¤§§# óçÏ×w4¦ÊZ0>¬òT7222ðùçŸ#66999hÞ¼9Fމ§žzÊèeU6ÅÚ‰'Œ^ÞƒR©Tؾ};NŸ>ÌÌL¸¸¸à™gžÁÈ‘#!—˱ÿ~|õÕWˆˆˆ0øBàå—_ÆK/½„¡C‡¢oß¾ðòòÂÎ;Ëü.Í™3çÏŸGhh(¼¼¼8f£$Û–––رcæÌ™ƒÄÄDøúú",, –––ðññAÏž=ááá¼¼<¼ýöÛP«Õ˜9s¦~4ò]»véGíNKKÓ VÞ2Œ;Ï>û, 0zôhüç?ÿ\.Çš5k0räHX[[cÞ¼y Á€ššZa|÷š7oòóóñÜsÏ!??Ï?ÿb®BNNމÁž=ðë¯×!`ccÑ “í‡5…Ý£4Uœ¶HÀL!&O@@j.ÐVïK\™¢f²MDDD"•@á\õ<åÏoð‡*³d`·‚4ßùiÅTÑý—5I(ÊÑÀÚE…‹ Öî2ؘ׬yFF‚‚‚0hÐ „……ÁÖÖß}÷BBBpàÀý˜;µQуø³gÏ¢E‹jŽ‚÷åÔ±±·Ñ¤‰%¼½ëw–ÜÜ\Œ7O>ù$-Z…B_ý|ð–.]Š®]»ÖúÜwîÜÁ›o¾‰¬_¿~=<<*žÐXåúuëššŠ÷ß...¸uëÖ­[‡¼¼]¿|ïhÝÅwï9-,,°jÕª*G/Ou¯¿²ëÊ&2¥Ë‡Fß¾}ñïÿ[¿mïÞ½å>q±··ÇôéÓ1mÚ4ètº2Ûk#33ûöýŽo¾‰ÄÅ‹·`f&N'aÙÏÏÏÇ‘#G0~üxýçbΜ9¸uëVãíׯ`„ ðõõ…N§ƒ¹¹9bbb„£G¢ÿþú×ä±ÇCXX®\¹‚ .à‡~Àÿû_ÌŸ?Ï<ó €’\Ý»wlj'СCœ9s:u*3S“T*E¯^½ôMÉùå¢IãÞË6Êd["‘ >>Þ >•xþù–pssÁ?ü‰¬¬XX˜£¨HSåq2™>ûlÔCˆ°ú²³+žz­<k ;SOGÆQßú¶•1b¦M›†³gÏ¢gÏžúõ‘‘‘HLLÄðáÃk}îÆø ÒÁÁnnnøóÏ?ñä“Ol»páÞzë-œ:u ™™™ÐjµhÙ²¥~»ŸŸ’’’jõ ¾²{Ù¸¸8Œ?J¥Ò  ÚÍ›7õý] åž#55µÂxK•V˜™™aèСطo:t耣Gâ‹/¾¨0öÊ4iÒ=öŠŠ4HðwËʪ+½þü3/½ôy­Ê¬+ÖÖÕŸÈÖÖ¸yó&Úµkg°í¯¿þÂ'Ÿ|‚µk×"77:N_Ù^^^HKKƒ­­->þøcìÙ³Û¶mC«V­ðÊ+¯àñǯ°ÜÊFÝNJJÂêÕ«¡R© >7©©©hÚ´©~¹yóæÈœ••Ua¼¥Jkó¥R)žzê)œ>}¾¾¾øý÷ß1cÆ %5ðgÏžEŸ>}ôŸÛÑ£GcûöíØ¸q£>ÙJš’¯[·S¦LÁéÓ§1hРrcëÓ§V­Z…±cÇÖIr ‘&ÛT1//[<ûìãX½úüöÛu<½{/ 'Gss³ Ÿ&š™I0hЃ72¦šÎßþ°¦°3õTqõAqq1æÏŸ/¿üB¼öÚkøð뽟L&ƒD"Á–-[°jÕ*¤§§cÆŒðòòÂ»ï¾µìŸ IDAT‹ÌÌLL:|ðAµÎSÞ t÷fT<ðÑ£ÄÍÍ Ï<ó ÂÃà ’í}ûö¡W¯^42qc}ù /`Íš5xâ‰' ¾kCCCQ\\ …B™L333\»vMßÚìêÕ«ðòòªÕƒøŠ¨T*#<<ƒ BQQ¶mÛ ¤5Ü7ô­ß¢¢¢päÈ,X° ÌyÜÜÜ*Œ·Ô½•#FŒÀÈ‘#Ѷm[ôìÙÓ {ÌÍÍ`o¯x¨eVEˆª+¬îÕ£G„……á½÷Þ3øýôÓOÐh4°°°€ƒƒ¤R)îܹ£Op“““áì쌢¢"èt:,^¼ÇŽÃüùóñÍ7ßÔ8ö¢¢",^¼‹/ÆO<ââb|÷Ýw'''¤¤¤èGÃOHHÀ¹sç0jTÙŠ·Êâ-uïS}úôÁ’%KàããƒÀÀ@¸¸¸(yè²dÉx{{ë2I$tíÚ‡2(³tÖ¦£GâêÕ«ç‚üñÇøí·ßô‰½11Ù¦rI¥tëæ‹nÝ|ñÞ{ƒqölÂÃÏãÛocPXX 33iƒê'<¼)ì•©âeü1®_¿Žß~ûM?8Ë»ï¾k0øJeû•öŸ?zô(Ο?ððpŒ7ÁÁÁˆ‰‰ÁîÝ»1qâDüûßÿ†““S•ç)„nÏž=ú÷ñܹsð÷÷×'Ú¥ýíÖ®]‹ÁƒãÛo¿Å˜1c0tèÐrûÚQýT“yU§¼y@ÉàV .Ä•+W`gg‡iÓ¦aîܹ5.¿²‰!!!øÿöî;<ª2íøw&“Iï=R ‚¯€¯(® ‚«.mшw »Ì‹\QXìDPA©J[WZð‡hDˆ!!@€ô>I¦Þ¿?²I2“!“òý\93Ï9çž3íÜsžç~,X€×^{ vvµscmݺO=õ”9Fkë+ ¼øâ‹øøãQ]]qãÆáÍ7ß„§§§Å"KKKñÌ3Ï`çÎpttÄ<€Å‹#''§ÞŒëׯ·zRÜѽôÒKæ+mO<ñ\]]ñå—_âÍ7ßÄÎ;Ô&¦÷ß?žzê)¬\¹Ï=÷¦NÚ¦?ÄkµZèt:¨ÕjTWWã…^P;­Q||<,X€°°0µc²3«ÛOSñZrë­·Â`0àŸÿüç5MSZ^žŒ‚‚ÝøöÛÓøê«£øúë4óUóöé€>˜vÕû½>üð-Ò8cÆ óûlüøñprrÂÁƒ±uëVó9‰J¥Âþð¼ùæ›æ‚u}ôF …B„„,X°ƒ ‚^¯‡J¥ª×¼ºººÉá uôz= T*t:Ö¬Y¨ªªÂ˜1c°jÕ*s1½7ÞxÃüšj¸Ÿ¦âµdàÀ0X»v-fΜi¾ÝÉÉ cÆŒÁ /¼€Y³f™«´¿÷Þ{õ®jµ3L1o¿ý6bccáéiy*¿º®ä+V¬@LLŒÕv×D,HOO—ôôtKwu z½^žþyéÙ³§øúúJ||¼”””˜ï ï¼óŽDDDˆ§§§¼üòËæûvìØ!ƒ''' ”W^yEDD222€ìÝ»Wzöì)¬·Ïüü|Ñh4íó¯£äädÉË˳zYYµ|ñÅ2eÊ»2Gzöü‡„„Ì‘¨¨ùíeËtö×ñµØ±c‡;v¬Þm›7o–Áƒ·x¶<~ÑÑÑrùòeóòž={dðàÁæ÷asíDjßçGŽNgq9##£EÛINNn´^ÃXŠ‹‹ÅÞÞ^–/_.%%%b2™¤¢¢BŒFc["²1'ååå²jÕ* S¦L‘òòrùàƒ€¶h;“'O–’’Y¹r¥¢¢")//µZ-Ó§O—œœùì³Ï€äçç·zÿ¯¾úªLš4IΟ?/iii2dÈyöÙgED¤¤¤DäÛo¿‘S§N‰R©”ÜÜ\sŒÖÖ_¶l™ôïß_ÒÒÒäøñã2lØ0™;w®ˆH£ÏF‘©S§Ê¨Q£$33SÒÒÒdÀ€²hÑ"sÛqãÆÉþýû¥²²òÚŸ 6@6lØÐªu²³³eòäÉ,nnn2tèPÙ¾}{½6ÅÅÅ/>>>$sæÌ‘êêjÙ°aƒDDDˆZ­–èèhÙ¶m›ˆÔž×Ž1B\]]ëÅW÷fÉŠ+ÄÛÛ[zöì)ï¾û®ÄÅʼn¿¿¿ÔÔÔÈܹs%88X<<<$..Î|Žli?Öâµô<‹ˆüõ¯''')//oÕ±«³aÆFÛ­®ÖÉöíGåÁ?=þ.!!s$$dŽ=Sïß´i«®jŸ×IJJ’äääÿûâ‹/däÈ‘âãã#ÎÎÎ-/½ôR½6Û·o—1cƈ»»»øøøÈŸÿügùæ›o$99Y’’’$88XT*•„††š×Ý»w¯Üpà âäädÞùì³Ï¬ÆòÄOˆ›››øûûË3Ï<#£FOOOÙ½{·Üÿýâãã#...2jÔ(Ù±c‡ÕýX‹·îó­á~ï»ï>qpp]»vÕ»}ß¾}òÈ#Hxx¸888H`` ÄÅÅ™û•ÿ–,Y"$!!¡Ñ}W>î×_]È3Ï<ÓâãÒð_RR’Å÷ƒˆlTü÷…PO]÷Û†ã:‹åË—cÍš5øüóÏ¡P(ðØcáÖ[o5ÏŸ­P(pÏ=÷`ýúõسg&Mš„ÂÂB¨Õjøúú⡇Â?ÿùO8p=ôòóóQVV†¨¨(Œ7 :th½«U{÷îÅÔ©S1mÚ4üío3w«èl8€~ýúÕ«xhMAAvì8†Í›†V«Ç¾}óš]§=uö×ñµxùå—ñùçŸcíÚµˆŽŽFZZ¦OŸŽY³faÖ¬Y-ÚÆÕ¿šJÏÕÀ-Ø.þÖÇ™7ÇÉÉÉ<JüüóÏõæ+·Ö®´´´Qm†¦–›ÛÎéӧѧOŸzë¨ P[5óõ×_Ç×_Ý¢ñvDÔù( 9r±±±ÐëõP«Õ–[RF¡P 99·ß~{½õBCC‘••e.nõÝwßaäÈ‘æm¶fÿ111HNN6_}Ú»w/ÌÓ1Mœ8ÁÁÁxûí·ñòË/cß¾}Ø·oŸ9FkëWWWã•W^Á„ ÔÖùõ×_1aœ9s¦Þg£^¯‡““RSSÍß'_~ù%æÍ›‡¯¿þQQQHKK«7'nG P(°aÃL™2ÅÖ¡t* ,@vv6Ö­[wUëoܸ÷ß¿ÕÂĹ¹eؾý6oþ ééaoo½¾vˆã˜1°fÍ ‹ëÙŠB¡@RRn¿ýv[‡Ò©¬Zµ ¹¹¹xî¹çlJ‹8p/¼ð‚¥×í¦.Ù¼%•çÎ 777Œ_Ûµ£¤¤¡¡¡V«7Ö©«ºØÐèÑ£qôèQ|øá‡¸í¶Û‹Ù³gcôèÑ Xu~~n˜>ýVLŸ~«­C¡æÍ›‡ªª*Œ?o³©âÄ$¨¸¤Civ JÏ֠쬅¿U¡ìœúªÚ/¼~SüpËüžW½___$''›OVë¦U¹Úv׺¿–¼‡›oçííÝꘈ¨ãrssðûxÕ†Ë-ei6 µZmµ¸Uk÷ŸÝhüµ‡‡‡ù︸8<ùä“xã7°uëÖz]6›Z_«Õ^—"[ÔyÕÔÔàÒ¥KX½zu½)ÚZ` fΉ™3GâìÙ|ùålÜxçÏC¥êšçÛ݉N§CQQ¾þúk,\¸ÐÖá´‰.ùª´Ti±î××:u_pWžD×}Á;7Þx£yl•š›‚iÑ¢EÈÊÊB||<^|ñEÄÄÄàÂ… ×øˆˆZ§nª¸óçÏ£ºº'NœÀܹsë hŽÍ92¿)Á/ï]Æž¹YØð§X}óQløÓ |ót&~zû"No/Dá©*s¢­T)àÑÓú-1qâD$&&âܹsHKKÃØ±cñÎ;ï\u»¶ÚŸ%•••~/°·eË”——×oGDd‰¥òêŠ[ÕÍ'[7gíÕðõõEFFD"‚’’ó\ÊðÇ?þëÖ­Cjjj£s%kë×ÙªsìØ1ó\Í ]Yd«NSE¶¨súñÇñ?ÿó?˜>}z»]ÅíÝÛÿû]HIYˆÝ»çâ¹ç,Wœ¦ÎãÔ©SxüñÇ1nܸ6™£½#è’ÉvK¾,UenÉ\K¾òòòpâÄ äää`È!-*B@ÔÑœÛh@êB=öÿßYû$產ù$&Ož µZÝn·-µ¦@ZG×Ù_ǶVwüz¸Fà§·/áìþR(í0›ÎºUNJ œÏpGx†9³·ìÔ]² uRbT\Ô¡ì| JÏjQv¾ýð‡Wxmo$H³æ ¤u6,Ö=t»iX¶l™¹úxCM]©š3gæÌ™c^þÛßþfu½+Ýwß}˜4iÒÕ†LÔayôrÄèeá¸x¸?,»€ÒìÀ¤€ÀÂûA8z¨páû2_Ÿ}• %àä¯ÞŽðìíˆAÀѳK~ôQvz[Î,CivMí°(}í÷˜£§ ½¡«04³"¢ÖáoaqŽ©®:&µ^MMM½ñÆ!CÝ0iC?œùw1R^˾Òcƒ¾åJ•wyaèSµ…o*s¯Z^z¶'5Í^åÎO×À5P g_¾§ˆ¨ó²TæJ]åÊ­‰ ÐäëPqQ ×@5ÜB¬è¬)5 l¤'‡%"²9&Óm¯à„9)¨*Уâ’å9:T^Ö¨«=ÖÞÁÀ‡¬®?hšõûˆˆ®‡.9f›®^W³M×_Ù9-RÞÈÁùoË ´WÀ¤L\Ÿ¾WY M€Ê<ÊÎkQ~¡ö_Ù…óß*G;<œ<°mÙLu±š<*ótpñ³‡_«mOl(À‰ pïá÷µW±ÝCàÖC ÷P9¶]}•J£ÑØfÛ»®*OØ+P¢o]a¼ÎÎÎÎC×èÒß^GÔ>¬¼n»æ˜m"j½p׊\ú¹ß/ËAù-<{_ÃTWŠß¯†‡ ­?€˜€šR}“«W\ÔaË'áâ·`5܂आ[°®Aµÿ8^œˆÈ6òkðë—…¨ÌÕ¡2WÊË:u&óýýðk2Ùî¿úßïgõþ¶´ÿþVWoK&4_Cál„k\÷Ðuz ØúuDíÇÚë–gDtÍ‚ÿÇ “>Au‰vêëÓÇ[¡œ¼›ÇmïªÄ°gz â¢—tÈO× kO ªŠj“t¿~Îÿiôu‰ˆ¨Û ªXª=4ùzhòu¨.0À5H¾ã}¬®¦ÓQyY—@5¹Â-H —5\íᨆʡãÌ\qÛm·Ùlßš<=výõ7¸:|/ .s†²íëˆ:&ÛDÔ&JÀÙǶEÍ=Tˆ™äÛèv£Î„ŠK:såYk.ÿR‰IÙ¿_VÃ-¤öo·`5œýí¡´ã€q"êž.ýTä…Ù¨)5˜?OJÀÉÇnAjô¸¥éú=†»·¸†GwUqI‡]ÿ•“w¿eóïU"º6L¶‰¨Ë³S+áÖ|÷v·5M @yŽ9:d'—¢â¢úªÚnŽawxâÎeá×;Ü6•™™‰ .Ø: ¢F”J% [‡ÒmTó}9ªŠô¨.Ò£ºØ€ªB=ª‹kÿö wÂ=FY]ß#Ôãk§ot RÃ5@ {(íù#d[¨¸¨ÃÎǃÚÅw¿'ož¦uv|ý—k ýþÜx<`u±å9:¨š>¡<ýUR^Ï1;7ŸŒÖ^õqïéØî'O555pwwGÏž=Ûu¿DÍ9qâ´Z­­Ãè´ÄT—èQSl€&¿6aV(ˆºÇÛê:U:|é½ìáâgGoÜC8ÈŽÞ*x„ZŸ6 \ìqÃTP½t#¾ž{g%ƽÉD›¨‹°øNV(ÈÏÏÇÚ9êš›”¨»qò¶ov¼8 vÁM³‚Q™«ƒ&W¢ÓÕ8÷mª ô“`àC6'ÄêúºJ# €ÚÍ®-ǃƒüüÚ§¨ÑõbКs¨ÁÃÜ viÛ÷HG¡Ó›|l—tØ37ÕET ¦ß‡ÆØ©•ðàÜd²íÓ×ÓˆmÓ˜©m¨]ì0`ª?ÂGyÁÑ‹‰6QWañÝÜ»wož˜uc>>Ö‹›‘užaŽ»«›Œ‚ª=”ª¦ÈJû4GWåB娄k`m÷Lg{¸ÔŽŠuƒWÄ5T{'ê„4yzœÜT€S›  ­0â¶…½š,ÂÕ‘é4F¤žm‰Õ¥µW¥«‹ ¨)5 ¦Ä'_ü÷ V×wð°CÏ›=àè­‚“ .~j8y«àìgµk×ü¢;é7™çÞD]ÅdÛÉÉ NNW9O.Õ£´SÀ5°ùj²1}0К=4yzhòt¨*УðT4yzÜø· &“í¼4 ª ôpöµ‡K€= ëP§–—Z‰ãëò‘\…¢öG+¥Jš2ÛÍ¿+& üB jJ ¨.©M«‹~O– :S“u àÌ¿‹áè©‚£— nÁð¿ÁŽ^*8zªàÔÌ{Víb‡›ž në‡EDD× û©u.êkšâå쾜ÜXXoÞÚ ;íÐ;žõÔ9ªMøõ«B¤žŠ‹:(í“ÀÜYZh˯=Ù6Ú2jJµÿ— -5BWiÄ Y“,FÁÆI'Q½³œ}U¿'Ë^ÍLOèl‡)[û_süDDÔ9𠌈¨‹>§†Ïéêb4y:Tæé[ÎJäÔñU\Ò!}]>NUƒN R›Í6š®OÚrc½› Z´¥ÆÚ„¹Ì€à›Ü¬ïH€OîH³˜°Û;+áà¡Bÿü¬ùPÚ+0q} =jl;5kœ‘u ©ûF#"¢.çĉ€þýÛçjÚ™3g~µ4­=ŽSG.$€Ÿ.vi‘ó}9*EãäºjçtvòQý7¹6ÂPcª×fÚÿÔd‘±ßvAíl<ìàè¡‚ƒgj'6À;ÒA76ñ£u›xe›ˆˆZ$++ C‡Eaa¡­C±¨£Ä×^q4·OOOÌŸ?ÿºÆp-.}䌌Sµ´ÒL¢Úf°sT |ŒÜTpp·ƒÚÝ®ÞßöNM ësOç,®F›˜€Ão\DÚº<ÜüL¶‰º &ÛDDÔ"&“ EEE¶êŽ_{ÅÑÜ~|}}±dÉ’ëÇÕr¹A…3JÕÃ$;%ŒZS³ë©œì0øÑÀvˆ¨mè4F웹G+qçòp„Ýîi눨(mu,;vìÀÀáèèˆððp|úé§€áÇk£ÑˆeË–¡OŸ>pssÃ-·Ü‚üѼ3gÎ@¡PX\?~<þþ÷¿›ïÓjµðòò®]»z½ €¿¿? ×ëa0””„ÐÐPøùùáá‡Fii©Åø ´´<ò|}}Ñ£GÌ;555æXöíÛ‡ÐÐP|÷ÝwEAAªªªlvœZ³Ÿ†iÍš5õ¶£P(°nÝ:ÄÄÄÀÛÛK—.ˆÞÿ}ôë×îîî¸ãŽ;°sçÎzë¶äx´–Ç0=ný—?¦}7w¿…q~ðŽrª½Ò­PX7ÝÒˆÚ‹&O3~CÑéjÜóam¢îFˆˆ¨ËJOO—ôôô·¯¬¬yÿý÷åòåËòÑG‰J¥’ÊÊJÉÈÈ+¿6V¬X!þþþ²uëV¹té’ìÚµK‚ƒƒÍmJKKeåÊ•æöW.ñÅ*&“IDD¶mÛ&ÁÁÁ¢×ëEDäÕW_•I“&Éùóç%--M† "Ï>û¬,[¶Lú÷ï/iiirüøq6l˜Ì;WD¤Q|""S§N•Q£FIff¦¤¥¥É€dÑ¢Eæ¶ãÆ“ýû÷Keee½õ>,Ó¦M???¹té’ÍŽSköÓð1;v¬ÞýdòäÉRRR"+W®RTT$+W®”ùÏþ#²gωŒŒlt,EDöìÙ#þþþ’ YYYîoäädÉËËkt{yNœÜ\ »ÿ‘)8*ùEVß|DVÞô‹|8äùxÄÑkÚ/Yféýs-íH¤ð×*Y76M6N:!å9Z[‡CDío#?-‰ˆº°Ö&ÛÅÅÅboo/Ë—/—’’1™LRQQ!F£±ÑIvŸ>}dÍš5õÖ_»vm‹NÄ5¸¸¸ÈáÇEDäÄÄDóýÑÑÑrùòeóòž={dðàÁÒ·o_Ùºu«ùö“'Oš—ƧÓéÄÎήÞãߺu«DFFšÛ¦¥¥™ï«®®–O>ùD†*±±±òÁHEE…MSköÓð15¼€$''› ÉÈÈȺuëêíwýúõVã»xñ¢$%%I=äÞ{ï•o¾ùFŒFc³¥!kÉö•Œ“ä«”Ÿß¿$_ÆŸ’•7‘UØl[“™™)>>>WµnAAÌŸ?¿ÍÚuw&£È¦?Ÿ¯¦ý*ÕÅz[‡CD¶±‘ÝȉˆÈÌËË ÉÉÉHIIA=0räH¼õÖ[øå—_0sæL¸ººZÜv{§Öì§ác²$88`oÿû|Й™™0`@½výúõkr‹-BVVâããñâ‹/"&&.´ý4sJ;¹àÆÇƒ0þ“h<œ<“7Ä´ù~ºŠk©ÐÒ1þ½@G¡Pw. Ç?ˆ‚£K$uWL¶‰ˆÈ¬ºº&“ ›6mBqq1f̘{ï½ÅÅÅÚ†……!55µÞmuSµD\\6oÞŒíÛ·ãÆo¬—Dûúú"##"µs.—”” %%ÁÁÁÈÎÎ6·;vì^zé%‹Û€²²²Ì·eff"$$ļ\—túùù¡_¿~øþûïqèÐ!ó8pkÚë8µf? “%–’ô^½z5ŠçÔ©SÍÆ–——‡'N ''C† ““S³ë\+µ›ýôSôîÝX¸pa‹·ciŒ}kêXªM°sçNÄÆÆÂÙÙAAAæÄ¹a­kûoi;iE-€®Ê£—#T<Õ&êÖl|iˆˆ®£Öv#¯®®GGGÙ¼y³ȇ~(ŽŽŽR]]mî–\×µú7ÞùꫯäòåËòõ×_Kxxx‹Æ"‹ˆhµZñòò’¨¨¨FݬŸzê)™‘|PF%YYYrüøqéß¿¿<ÿüóVÇ?~\üqñõõ•3fÈÏ?ÿlÓãÔšýXëV^ÿí6Þpù­·Þ’=zÈ7ß|#………²oß>éÛ·¯(ŠFÛh4Ê7ß|#ãÇ—yþùçåâÅ‹QsZÒ¼3 qqqR^^.«V­2eÊ)//—>ø@Haaa‹¶ciŒ}kê4ÇùòeQ«Õ2}útÉÉÉ‘Ï>ûLH~~¾Å׋¥ý·´]kjuQ³MDÔ•µ6ÙÙ°aƒDDDˆZ­–èèhÙ¶m›ˆˆèõz1b„¸ººŠˆˆÁ`eË–Idd¤¸¸¸ÈÍ7ß,)))æ“éæ’?‘™3gÞÆìIDATŠ««k£eåååò裊———øøøÈÌ™3E£ÑHMMÌ;W‚ƒƒÅÃÃCââ⤤¤Äb|"µcžãããÅÇÇG‚‚‚dΜ9õUkJJJdÅŠ!ÙÙÙ6=N-ÝÏÕ&ÛF£Q^{í5‰ˆˆ;v¬lÛ¶Müüü=æÍ›7ËðáÃeݺu¢Õ^[Á§®œl9rDD~ßpùÊç¡©íXcßšº ÇñkµZ9uê”TVVŠÑh”o¿ýּݖŽñ¿^µˆˆº  ‘¶½VNDDE]÷àþýûÛ8’ÎÉd2Ád2A¥êºc.wî܉ž={bРAæÛ¶lÙ‚Å‹ãèÑ£õÚêõú&»©·ÆЯ_?øûû·Éö: …BŒŒ DFF¶h¹©íœ>}}úô©·Þ 7Ü€Ÿ~ú©Ñ8{ ¶‹wTTêNíê–u:ùyÛ¾};–-[†ÊÊJÄÆÆâã?FFFÔ[×Úþ[ÚnàÀHII©WŸ 55ƒFW:õ¼|¤ƒ\ ´ë>Ý㉨Å6q ‘J¥²K'Ú––†‡zGŽAUURRR°páB<öØcÚ¶U¢M-ciŒ}kêÔ©{Þª««1eÊ$$$àÈ‘#x÷Ýw[½ÿ–¶»ÚZ…˜€_Þ¿Œ3Cöþ¦k<Q÷ÕµÏ ˆˆˆ¨IóæÍCUUÆ‚‚„‡‡cúôéxüñÇmY  ,, 0{öìFÕã+++-VÒ×jµÐétP«Õ¨®®Æ /¼¨¨¨€››[›Æ9kÖ,Ì›7>>>¸ñÆ‘ššŠE‹u‰i5e|ûü9䤔cDb(Âïô²uHDÔA1Ù&""êÆT*/^ŒÅ‹Û:jÄÄDh4Üu×]Ðh4¸ûî»ÍÀÃÂÂ0bÄ¡¢¢¢Ñºžžžø×¿þ…©S§ÂÅʼn‰‰ˆ‹‹ÃرcqèС6ó‰'ž€Á`ÀO<ÂÂBÜ|óÍXºt©ÅÉå#•H~î,îù0 ƒ,OHD³MDÔ…qÌ6uT]uÌ6ÕjM-€ÎÀ¤üøúE¤oÈGøh/ܺ0j;[‡EDÇlQÛjM-€Îàì¾RœÜT€¡³C0ê•ÞL´‰¨EØœˆˆˆ¨57v¹³w<ìjµ"îò‚g¸#|ú8Ù:"êDØœˆ¨ c7rê¨Øœˆˆº¸M¼²MDÔÅ•••!55ÕÖau+L¶‰ˆº0^5¤ŽÊßßîîÈLL€‚ÕŒˆ¨ ±9Q7••…¡C‡¢°°°Cl§#)8Q…o_ÈÆ3ƒÑ{´§­Ã!¢®Õȉˆˆˆº“É„¢¢¢³ŽÀd[‹í3NC娄g¸£­C"¢.„É6Q;Q(X½z5bbbàçç‡%K–àÓO?EïÞ½ááá… ¶x;ëÖ­CLL ¼½½±téR€Á`@RRBCCáç燇~¥¥¥€áÇÍÛÑëõHHH@@@üýý‘½^رcGGG„‡‡ãÓO?µºÎ¨ðT¶ÆýŠ£«sq˼ž¿6^L¶‰¨ 1Ù&"""jG{÷îÅáDZdÉ$&&bçÎHKKòe˰xñâ_5þꫯðÃ?`éÒ¥˜?>Š‹‹ñúë¯cË–-صk’““ñÛo¿á¥—^¤¤¤rssÍÛxíµ×pöìYüüóÏØ·oöïßçŸþóŸ1kÖ,dggã¹çžÃôéÓ¡Ñh,n§31ÇÖäbûôß`g¯ÀŸÖôEôD_ éÙØˆˆZc¶‰ˆˆˆÚ‰B¡À‘#G ½^µZÝh9##‘‘‘Ín'99·ß~{½õî¹ç¼òÊ+˜0aàÔ©Søõ×_1aœ9sQQQõæðމ‰Arr²ù*õÞ½{‘€ýû÷# ¯¼ò f̘h48;;#++«Ñv:“_¿ˆ“› ;#€RÅ,›ˆ® ŽÙ&"""jOnnn{{{‹Ë-Üh½sçÎ!**ʼcN¼-ÉÎÎFPP  î¼óNœ={^^^HNNFJJ zôè‘#GâàÁƒP*;ÿ©ãÀ‡ýñçÍý0xz m"º®:ÿ'&Q7d)ñ Fvv¶yùرcænä–øúú"##"AII RRRP]] “É„M›6¡¸¸3fÌÀ½÷Þ‹âââëñPÚ•“·=\ƒÔ¶ƒˆº&ÛDDDD]D||<,X€ôôt¤§§cöìÙ8wî\½6•••æ¿'NœˆÄÄDœ;wiii;v,Þyç( Œ3[¶lAyy9t:ìííáììlq;DDÔ˜ÊÖQÛHLL„F£Á]wÝFƒ»ï¾Û\©<,, #FŒ@PP***‹/ÆÓO?ØØX(•JLš4 ¯¾ú*±víZÌŸ?.\@xx86lØGGG‹Ûé(ÄœÝWC }îõ±u8DÔͱ@unœû¶ ?¿ %™Õˆ™è‡[{Ú:*"êÞ6ñÊ6uJbœû¶ ÇVç¢àTÂn÷ćÁ;ÒÉÖ¡±9QG£P4]%›ßváÈÊ\T^Ö"ô6Lø¿høÆ87¿"Q;a²MDDDÔÁ0™n^M™Á7¹b`|<ÃmQ#³MDDDDDDÔ¶6qê/""""êp 5&[‡@DtM˜lQÇ @î±Jx>ŸÝ™MžÎÖ]5ŽÙ&""""›*¿ EÆ¿‹qæëb”_Ð"`+ny6Ž^÷ø |Œ¼#l‘Í0Ù&"""¢«–\Š‹‡ËÑç„Ýá Ÿ¾L°‰ˆH#"êöjjj‘‘“ÉdëP¨‹pvvFTT”­Ã vb2 ”v¬"NDÔÀ&^Ù&"êæÊËËQTT???[‡B]€V«ÅÅ‹™lwr­ —®ÀùïÊa¨1adR/«m™hYÆd›ˆˆýû÷·uÔäççãäÉ“¶ƒ®Bù-.*Ç…Ce¸üK%Œz|cœÑk¤§­C#"ꔘlucblœpå9Z8¸«Ðãf7Œø¿Pôø_w8yóT‘ˆèjñ”ˆˆˆ¨S(ˆ0Gøp†BÉnáDDmÉ6QTv^‹¼´JäÕ z¢/üú;[mÛç>ŸvŒŒˆ¨{`²MDDDÔÉ™ô‚‚SUÈOÓ ÷h%òÒ4¨.ÖCi§€O_'hË ¶‘ˆ¨Ûa²MDDíêÌ™3ˆŠŠgžl=[;>_ñµ¹øå½ËP»ØÁ  úÝï‹ÀA®ðà•“ÒÖáuKL¶‰ˆ¨ÍdeeaèС(,,´u(uôøšãéé‰ùóçÛ: jg†´eF¸Ø[mÓ÷^_„ô„W„#Ç\uL¶‰ˆ¨Í˜L&Ù: «:z|ÍñõõÅ’%Kl]Gú*# ­FѯU(üµ …§ªPš­Eà`ܳ²Õõ\ì›LƉˆ¨ý±_µÚŽ;0pà@8::"<<Ÿ~ú)`øðá€ÀÀ@€ÑhIJeËЧO¸¹¹á–[nÁ?þhÞΙ3g P(,.?ÿûßÍ÷iµZxyya×®]½^„„Àßß Ðëõ0 HJJBhh(üüüððã´´Ôb|PZZŠGy¾¾¾èÑ£æÎ‹ššs,ûöíChh(¾ûî;‹Ç¢  UUUnoê±€B¡Àºuëooo,]º´Ùã{å6Dï¿ÿ>úõëwwwÜqÇعs§ùþ¦¶oíØ5÷|ÑõSqI‡ObíÈTìüËoøåƒËÐäéÑó=pÇËaøÃâ0[‡HDD­%DDÔ­åååIrrr‹ÛWVVŠƒƒƒ¼ÿþûrùòeùè£D¥RIee¥dddÈ•_-+V¬Ùºu«\ºtIvíÚ%ÁÁÁæ6¥¥¥²råJsû+—¿øâ “É$""Û¶m“àà`Ñëõ""òꫯʤI“äüùó’––&C† ‘gŸ}V–-[&ýû÷—´´49~ü¸ 6LæÎ+"Ò(>‘©S§Ê¨Q£$33SÒÒÒdÀ€²hÑ"sÛqãÆÉþýû¥²²²Þz‡–iÓ¦‰ŸŸŸ\ºt©Ñqj¸¯†ËdòäÉRRR"+W®RTTÔâã»råJ ‘ÿüç?RPP {öì‘ÈÈHóýÖ¶ßÔ±kîùj‰Ö¾žºm…AòOhšlcКäÇ7r$sw±”¯1µSpDDt½ld²MDÔ͵69*..{{{Y¾|¹”””ˆÉd’ŠŠ 1Ê>}úÈš5kê­¿víÚ%oF\\\äðáÃ""òÀHbb¢ùþèèh¹|ù²yyÏž=2xð`éÛ·¯lݺÕ|ûÉ“'ÍË ãÓétbgg'éééæÛ¶nÝ*‘‘‘æ¶iiiæûª««å“O>‘¡C‡Jll¬|ðÁRQQa1þ–$ÛuÇ]§Ó ÉÈÈhññ0`€¬[·®Þ>ׯ__/Ù¶´ý¦ŽÝµ<_uºs²­É×É¥ŸËåÔ—òã9òõ“gdýˇC~‘oüEt£­C$"¢ö³‘c¶‰ˆ¨U¼¼¼œœŒ×_III2d1nܸFm/\¸€Áƒ×»màÀ-Ú³³3þô§?aóæÍèׯvìØ£GšïÏÎÎFPPP½u<<< Õje¾-&&111÷‘——£Ñˆˆˆóm‘‘‘ÈÉÉ1/GGGöîÝ‹©S§bܸqxë­·pÓM7ÕëÞ±PÍ;88`oÿûXÛ–ßÌÌL 0 Þmýúõkvû€õc§Óé®úù"àËø_QU ‡ÊA ÷Px†9¢ïxxG8Á;Ò *GŽÞ#"êNø©ODD­R]] “É„M›6¡¸¸3fÌÀ½÷Þ‹âââFmÚšZï¶'N´x_qqqؼy3¶oߎo¼±^íë닌Œ ˆD%%%HIIApp0²³³ÍíŽ;†—^zÉâö`gg‡¬¬,óm™™™ 1/×%ª~~~èׯ¾ÿþ{:tÈ<¼9CíüÆ/^ltŸRÙøk¸¥Ç·W¯^Žå©S§šÝ>`ýØ]ëóu54y:üôÖ%|:ê8²ö”\×}µ”QgBIf ²”"í“<|é> ,@zz:ÒÓÓ1{ölœ;w®ÞºuñÙÛÛãþûïÇSO=…³gÏ"==Ï=÷¦NÚèq4ÉÉÉØºu+NŸ>>}úà±ÇÃ/¿übñ8yzz>ùä”——ãÍ7ßl³ã ³fͼyó°{÷naÿþýX´hQ‹®¶[;vÍ=_m)÷X%ö&dáó{N õ“ìÞ½&“©Ùu‰ˆˆ¨ëa²MDDÔ@pp0ÀÞÞ¾Õë-Z´YYYˆÇ‹/¾ˆ˜˜\¸páz„IDDD“m""¢”ÊkûzÌËËÉ'““ƒ!C†ÀÉÉ©"#""¢Î‚É6Q+TVVZ¼Ýd2a÷îݘ0a†Á¡C‡ðùçŸÃ××·£$"""[ãÔ_DDD-†#F ((îÿòË/±|ùr<ù䓨°aÔjµ ¢$""¢Ž‚É6uk‘‘‘óò•7\>xð ÕíÜwß}˜4iRÛHDDD»‘µÖS#""¢®É6Qc²MDDDDDDÔÆ˜lµ1&ÛDDDDDDDmŒÉ6Qc²MDDDDDDÔÆ8Ï6RSSmu:ÎÖ!uL¶‰ˆº9wwwøûûCDl u*• ÞÞÞ¶ƒˆˆÈæ³+""""""¢¶´‰c¶‰ˆˆˆˆˆˆÚ“m""""""¢6Æd›ˆˆˆˆˆˆ¨ý¸ƒÏ Ûã$TIEND®B`‚pktools-2.6.6/doc/html/dir_ab1bbd5a6b4bd6507847335527b029bb_dep.png0000644000113200011300000000512012616110567020375 00000000000000‰PNG  IHDR­YBgbKGDÿÿÿ ½§“ IDATxœíÝPÔuÇñ×¶0:é-(ˆÅBN$øÃ1\T†£à8Ò©M—’¢"¡¨ˆ®JJÄ ž¿ól3ME)Ì_‰W”ç¯À,àf^“¬šŠ Ÿû£¹ï¹.Æâî~Ö×c†¾ßýþxïúœõ;³?P !ˆ$ò˜½ ú£-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-IÇÅš?ùä¬[·®³f¡GDHHòóó;¼¿Êš÷Ó&&&¢´ôŸˆˆØáèÑråÊeTT”Ú·q[õL ±rå&kCˆýûw£¢b¢UÇà5-I‡Ñ’t-I‡Ñ’t-I‡Ñ>dFc-ž{.ÐÞc8Fûµ¶¶âúu“½Çp*Œ¶´¶¶¢°pbb¢ÖcÆÄ ¬¬ÄÇÇ¢¢´vžÒyXý⼫Vå@§{ááñç0kÖ[€]»`ذH|óÍ9;Oé<øLÛ 6o^‡ôô…ˆ‰‰EÏž^2䤦γ÷XN‹Ñv£±!!afë´ÚP;Mãüm'ðòòAUÕ³u.TÙiçÇkÚN0Ë–eÂÝýIôï‰ÊÊÓX¾<Ël›ÆÆ¸¹=n§ £ío¼‘Œ»w[ Óe ¾þ*´Úg‘žž…””7àëë‡ÈÈhDEãôi£½Gu Œ¶¸¸¸"9y6’“g+ëêê µÚz}±½FsJ¼¦%é0Z’£}HúôñGu5_¾}-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-I‡Ñ’t-IÇf·ÉÊJGu5¿°ÂYuéÒYY+àããûÐÏe³h ×#22½zõ¶Õ)ɆöìÙÑ£Ç:W´0eÊ ŒhËS’h4*›‹×´$FKÒa´$FKÒa´$FKÒa´$FKÒa´$FKÒa´$FKÒa´$FKÒa´$é¢5.Úô½›¶àH÷É‘f¹é¢uFݺuÇôéïjk  ôtˆY£užÈÌÌðÛ_47™êbGåÑþ│ââ=8P‹¾}{"=}šššÌ¶B`þüT Žúú«hiiAvv&ÂÂüÔo½õWܸq]ÙþÆë˜:u=ê‹ùóSÑÔtÀoÙ¶­QQ! ê¼¼lèõ[þ úô醥Kç?Ðl–ÎñùçE4èÏðöîŠü¡×o5;&ÄÄD´Ú§”¹›››±`Álhµ^èÛ·',˜ææf‹¡›6­Etô³ðó{£F CIÉ>h4ªß]Ü»ÌË+mÜøw|ôÑ>lß^„ƒ?C^ÞÿŸ„ÈÌLñc‡°{÷!xxxbíÚ<ìÝ»zý~ìÝ{/žÇ{ï-QöIKKÆO?ýˆƒ¿ÅŽŸáðáä彫Ü~ôèA:ô-23³±hÑ””ìÃñã§°hÑ ääèÌžï7ÛýÎÑØØ€×_OÀäÉSqòd-RSçáí·'¢±±Áì>8P8wîßʺ5kÞG]] .Çî݇PZzË–-°øØ}øáFääè°téû¨¨0`æÌ¹ÈȘÑ$¬ FŒ%ª«Míþza2‰vÊË/âøñSʺ‚½ð÷Tn›6-M'NœS¶ ÔŠÂÂ]ÊrYÙÊòÏ?ßjµZ|õÕåöÂÂ]Âß?P˜LBG~¯lÛÖryù‹³Y:‡Á`®®®bñâQSsMÔ×· £ñ¦¸zõ®rÌ{ïû½GPP°¨ªº¢,úé",,ÜâcÒO¬_¿Íl݆ ÿPîǽçhïüò@äç´ÛA~~°2;áÐÏ´AÊïAAÁ¸|ùGe¹¢â ‚ÜÜ¥Ê:£±ÎlŸ¾}Cøå—Ÿq÷î]<óL€r»¿ Ù1ŸxÂàêêÚær{³Y:G÷îÂÞ½GpâDBC}û<¾þº=Öþ?Á¥Kµö†F£‚F£B\Ü ¨««±¸OMM5BBú™­ÓjŸms[!D»38‡Ž¶ºúÂ=¿Ÿ‡··²¼}{rs×b×®PZzàííƒK—j•mNŸþ—ryУ‡Ôj5jk Êí55ÕðñéÕi³Y:ÇíÛ·ÐÚÚŠÍ›wÀ`0!)iƉk×Úÿyž(/¿“IÀd¨©¹†/¾(³¸OïÞ}PUuÖlÝùó•fË---€+W.·;ƒ#qèhçÌ™ƒá"**N`ñâ¹HLLRnss{Z¤¤¤cæÌ¿¡©é6ÆŽ} :]*+Ï ²ò ÒÒ’a4ÖøíÙ2.n,ÒÓ§¡®®••g°dÉ<$$Œï´Ù,C¥R!>>EE;qóæ¯hn¾W¸¹¹µyü††ÿ(¿E‹æÀh¬ÃÙ³§0fÌKøàƒÕç› pktools: qgis.pkfilter_spectral.pkfilter_spectral Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkfilter_spectral.pkfilter_spectral Class Reference
Inheritance diagram for qgis.pkfilter_spectral.pkfilter_spectral:
Collaboration diagram for qgis.pkfilter_spectral.pkfilter_spectral:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "smooth", "density", "smoothnodata values", "threshold local filtering", "stdev", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "savgolay", "percentile"]
 
string METHOD = "METHOD"
 
string DZ = "DZ"
 
string NODATA = "NODATA"
 
list PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
 
string PADDING = "PADDING"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkfilter_spectral.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classCostFactoryANN__coll__graph.md50000644000113200011300000000004012616110566020554 00000000000000529bf65d909c3f3b9209991505bd110bpktools-2.6.6/doc/html/dir_89a0bd85ecec8fbb2c320310670be290_dep.map0000644000113200011300000000054312616110567020453 00000000000000 pktools-2.6.6/doc/html/ImgRasterGdal_8h_source.html0000644000113200011300000005340412647637662017217 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgRasterGdal.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgRasterGdal.h
1 /**********************************************************************
2 ImgRasterGdal.h: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGRASTERGDAL_H_
21 #define _IMGRASTERGDAL_H_
22 
23 #include <fstream>
24 #include <sstream>
25 #include <string>
26 #include <vector>
27 #include <list>
28 #include <algorithm>
29 #include <assert.h>
30 #include "gdal_priv.h"
31 
32 enum RESAMPLE { NEAR = 0, BILINEAR = 1, BICUBIC = 2 };
33 
34 //--------------------------------------------------------------------------
36 {
37 public:
38  ImgRasterGdal(void);
39  virtual ~ImgRasterGdal(void){};
40 
41  virtual void close(void);
42  std::string getFileName() const {return m_filename;};
43  int nrOfCol(void) const { return m_ncol;};
44  int nrOfRow(void) const { return m_nrow;};
45  int nrOfBand(void) const { return m_nband;};
46  bool isGeoRef() const {double gt[6];getGeoTransform(gt);if(gt[5]<0) return true;else return false;};
47  std::string getProjection(void) const;
48  std::string getProjectionRef(void) const;
49  std::string getGeoTransform() const;
50  void getGeoTransform(double* gt) const;
51  bool getBoundingBox (double& ulx, double& uly, double& lrx, double& lry) const;
52  bool getCenterPos(double& x, double& y) const;
53  double getUlx() const {double ulx, uly, lrx,lry;getBoundingBox(ulx,uly,lrx,lry);return(ulx);};
54  double getUly() const {double ulx, uly, lrx,lry;getBoundingBox(ulx,uly,lrx,lry);return(uly);};
55  double getLrx() const {double ulx, uly, lrx,lry;getBoundingBox(ulx,uly,lrx,lry);return(lrx);};
56  double getLry() const {double ulx, uly, lrx,lry;getBoundingBox(ulx,uly,lrx,lry);return(lry);};
57 
58  int getNoDataValues(std::vector<double>& noDataValues) const;
59  bool isNoData(double value) const{if(m_noDataValues.empty()) return false;else return find(m_noDataValues.begin(),m_noDataValues.end(),value)!=m_noDataValues.end();};
60  int pushNoDataValue(double noDataValue);
61  int setNoData(const std::vector<double> nodata){m_noDataValues=nodata; return(m_noDataValues.size());};
62  CPLErr GDALSetNoDataValue(double noDataValue, int band=0) {return getRasterBand(band)->SetNoDataValue(noDataValue);};
63  bool covers(double x, double y) const;
64  bool covers(double ulx, double uly, double lrx, double lry) const;
65  bool geo2image(double x, double y, double& i, double& j) const;
66  bool image2geo(double i, double j, double& x, double& y) const;
67  double getDeltaX(void) const {double gt[6];getGeoTransform(gt);return gt[1];};
68  double getDeltaY(void) const {double gt[6];getGeoTransform(gt);return -gt[5];};
69 
70  GDALDataType getDataType(int band=0) const;
71  GDALRasterBand* getRasterBand(int band=0);
72  GDALColorTable* getColorTable(int band=0) const;
73  std::string getDriverDescription() const;
74  std::string getImageType() const{return getDriverDescription();};
75 // std::string getImageType() const{return "GTiff";};
76  std::string getInterleave() const;
77  std::string getCompression() const;
78  GDALDataset* getDataset(){return m_gds;};
79  char** getMetadata();
80  char** getMetadata() const;
81  void getMetadata(std::list<std::string>& metadata) const;
82 
83  std::string getDescription() const;
84  std::string getMetadataItem() const;
85  std::string getImageDescription() const;
86 
87  friend class ImgReaderGdal;
88  friend class ImgWriterGdal;
89 
90 protected:
91  std::string m_filename;
92  GDALDataset *m_gds;
93  int m_ncol;
94  int m_nrow;
95  int m_nband;
96  double m_gt[6];
97  std::vector<double> m_noDataValues;
98 };
99 
100 #endif // _IMGRASTERGDAL_H_
pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract__coll__graph.map0000644000113200011300000000011312616110567023770 00000000000000 pktools-2.6.6/doc/html/pkgetmask.html0000644000113200011300000001250112647637662014532 00000000000000 pktools: pkgetmask
pktools  2.6.6
Processing Kernel for geospatial data
pkgetmask

program to create mask image based on values in input raster image

SYNOPSIS

Usage: pkgetmask -i input -o output

Options: [-min value]* [-max value]* [-data value]* [-nodata value]*

Advanced options: [-b band]* [–operator AND|OR] [-ot type] [-of format] [-co option]* [-ct table]

Description

The utility pkgetmask creates a mask raster dataset from an input raster dataset. Values smaller than the minimum value (-min) or larger than the maximum value (-max) will result in a -nodata value in the mask.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image file
    o output std::string Output mask file
    min min double Values smaller than min threshold(s) are masked as invalid. Use one threshold for each band
    max max double Values greater than max threshold(s) are masked as invalid. Use one threshold for each band
    data data unsigned short 1 value(s) for valid pixels: between min and max
    nodata nodata unsigned short 0 value(s) for invalid pixels: not between min and max
    b band short 0 band(s) used for mask
    p operator std::string OR Operator: [AND,OR].
    ot otype std::string Byte Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    of oformat std::string GTiff Output image format (see also gdal_translate).
    co co std::string Creation option for output file. Multiple options can be specified.
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    Usage: pkgetmask -i input -o output

Examples

Some examples how to use pkgetmask can be found here

pktools-2.6.6/doc/html/bdwn.png0000644000113200011300000000022312647637661013313 00000000000000‰PNG  IHDR5åZIDATxíË € DŸP–1ñlžmÀ r±j².e è†D[ØÉ¾ÙÏÔ¼µ¦ã´Þ|陣6€Všë3´Å?Ls'(}¬>+ žKó÷¥¿ch`‚ ^׃ÞnIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_18.map0000644000113200011300000000103412647437044015477 00000000000000 pktools-2.6.6/doc/html/classCostFactorySVM__inherit__graph.map0000644000113200011300000000024512616110567021416 00000000000000 pktools-2.6.6/doc/html/dir_b8eb6544d8d9ffceba16909a7b9d17d7_dep.map0000644000113200011300000000071112616110567020653 00000000000000 pktools-2.6.6/doc/html/structsvm__problem__coll__graph.png0000644000113200011300000000572312616110567020777 00000000000000‰PNG  IHDRm€Ž@p]bKGDÿÿÿ ½§“ ˆIDATxœíPg‡¿›Ÿ^hª„dü§ÃP=Æi–R$Çè0B5P Ô"mk­S-­tlÁ™›ŠØ–iMDÔ–Q©Ä¢ÈX©‚ÜuNÅ€€! ’x!)„ìý±^ !”w£ï3ü±ûî»»Ÿ}&ïîæÍ²/A’$`¦ ‹îO Ø#°G4`hà8S©££ãý÷ß7›Í3†¤¤¤¬_¿~ÒjNy¬¯¯¯¨¨ËåÓNåb\¾|¹¤¤™GŠ’’’iDrIbbbœ¬‰ÏhÀÑ€=¢{DÃÓïñÎ;AÌô^ž~Oì (=ªTªÀÀÀY³fI¥Ò¢¢"ˆŠŠÚºu+µtppP$UVVA ˜7o^VVVQQÑ¢E‹fÏžýùçŸ;Ø>AGŽ ˜;wnvv6UøðáÃwÞyÇÃÃC"‘|üñÇf³yxxxÏž=þþþB¡påÊ• TM‹Å’––æåååéé™––f±X;NpüøñIkF>ŸŸ——§Õj 9ŽÑh>>‹…êñŒ‹‹3 €˜˜ƒÁŸŸ<˜h°~ýz½^_PP}}}$I&$$„……©Õêæææ^x!33ó›o¾ñôôúh``ÀjµîÙ³Ç×××ÍÍí¥—^¢>w$I †¤¤$‘Häîî®P(L&Ó¤Gäüù‘ ø½°¤¤$66Ö™šOT¿™3†ø> SèÇ}bLôu˜É ‚‰™ìk"p»Föˆì Ø#¦pÙ¿ÿÌåpÄfYaÆ»´Ç¡µµU*•:UÕ™›õºº:6›=ÙÇGÀ*ƒê‚E£eï°mÛ6dßghäæ?\üG‡Ï_…kò§ÛÇ1£0ýüx§J@h›Œf½•î,Ž`´GÓ}Kw“€¨ÖÓÇŒöØZ­'ØÃdKeÝqÁh-•}¶a€„ÞÿüÞ¯¢;Ñ„0×ãÛûnÀÿ¯‚l6¡®ÖÑšÈÌõ¨þYÇâþqÓ8ÁÏ ÅTº`ÁºãŒÃA€€ý<Ý)ÆÂãñêêêìêF½ë¡½½].—/]º”®p.ÄÎ;5}vì;3–.]úÚk¯=ÑD®ÉÎ;GÎâó#°G4`hÀÑð4xÔh4¡¡¡ÎÎOƒG&€=¢aÊ/]º”œœ,“Éâãã«««`ÇŽûöí£–Z,–ÈÈHjh±ÐÐЪªª 6DEE=z´ºº:..nÍš5œhãTcüõ×_£££÷îÝk±X¨Â¦¦¦ØØØk×®Ƭ¬¬µk×ÊåòÜÜ\jLH8wî\|||TTTNNÎàà¨w™Z­Ö¼¼¼èèèèèè¼¼<«Õúçâ9`jÍfsfffTTÔ±cdz³³ÍfsXXØ… ¨ßË®^½Êç󃃃©ú¹¹¹ …¢  àòåË………©©©EEEƒÁÁ^ÊÊÊvíÚõå—_644=z”*,))Ù¾}»ŸŸß·ß~ÛÛÛ›——·{÷î«W¯SNŸ>½k×®ÆÆÆüqäKKKµZm~~þ×_ÝÔÔtèСéÄ—©y¤Fgàñx*•ŠÏç¿üò˃áÖ­[PSSaÔ"66V Èd2ˆÐßßï`/©©©‰$ àÝwß={ö,U¨P(^|ñE‡sþüùÍ›7{{{K¥Ò¤¤${…>øÀ¾VmmíÈ VUUmÙ²ÅÓÓS*•¦¤¤\¹re:ñÆejïR …999¥¥¥‡ò÷÷_±bŸÏ_¹rå… .\xéÒ%j[ j(H‡3fÚ1‰„š˜?~oo¯}¨Ác©ÑI@,Û+Œ\«¯oÔËï»»»×­[gŸuss›N¼q™Újƒƒƒ6›-33ÓjµÖÔÔ|öÙgeeeB¡0,,lïÞ½ÔµöãùÓÜ»wõ¥³³ÓÝÝýQPD"‹ÅÒjµT×TWW—‡‡ÇãkyyyÜàìÙ³srrÄb1FjÀT´L­]‘––öË/¿˜L&‹ÅÂápø|>ÆÃ‡¯^½zú™”J¥F£¹yóæÂÃÃG.âp8¡¡¡ß}÷V«mkk+,,\µjµ(77×¾Õ<í¼òÊ+===­­­Ÿ|òIYYÙôCŽajŸG—žžžŸŸÿþ}ŸŒŒ '$$¤¦¦&$$dú™¨¬¦®` ö–K±eË¥R¹iÓ&.—ûúë¯Û+¬^½šG\&“ÅÄÄôôôØWINNV*•ï½÷A¯¾újJJÊôCŽaÔs)AdddÐØo¦ÑhÞzë­1W fzüøqjàRÀ÷ᨠíÝÇ}ùŒŒ|ÂI@›G—h¼ÎƒÛ5°G4`hÀÑ0ö:STTTQQAK—f”Ç­[·vvvÒŵðóó[±b…}?g|~Döˆì Ø#þ÷t£SÅN]åIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_1.map0000644000113200011300000000025512616110570015377 00000000000000 pktools-2.6.6/doc/html/IndexValue_8h_source.html0000644000113200011300000002650212647637662016575 00000000000000 pktools: /home/kempenep/pktools/src/base/IndexValue.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
IndexValue.h
1 /**********************************************************************
2 IndexValue.h: class to work with structs containing an index and a value
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _INDEXVALUE_H_
21 #define _INDEXVALUE_H_
22 
23 struct IndexValue{
24  int position;
25  double value;
26 };
28 public:
29  int operator() (const IndexValue& pv1, const IndexValue& pv2) const{
30  return pv1.value>pv2.value;//for decreasing order
31  }
32 };
34 public:
35  int operator() (const IndexValue& pv1, const IndexValue& pv2) const{
36  return pv1.value>pv2.value;//for decreasing order
37  }
38 };
40 public:
41  int operator() (const IndexValue& pv1, const IndexValue& pv2) const{
42  return pv1.value<pv2.value;//for increasing order
43  }
44 };
45 #endif /* _INDEXVALUE_H_ */
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkdiff__accuracy_1_1pkdiff__accuracy__coll__graph.md50000644000113200011300000000004012616110566030470 00000000000000cf65be9c6ad90b6aea751effcc659aedpktools-2.6.6/doc/html/dir_280a0ba2820d23d6529bf494f1ea3ddd_dep.md50000644000113200011300000000004012616110567020351 00000000000000bdbf2220911293af1ff4a33a748e52e8pktools-2.6.6/doc/html/classOptionpk__coll__graph.png0000644000113200011300000001053212616110567017671 00000000000000‰PNG  IHDR}Í(èbKGDÿÿÿ ½§“IDATxœíiPSW€OB(Aа5 ƒ€¸`­Õº´ê|2h—iªT«Èˆ ÖÖ)bGÇQjûÕb±tlµ²i-*""…Z´ˆB¿ADLJe—5)F" Yîù~Ü6Iˆ$Ï3þ¸ËYÞûxsîBò„`F:êžS°w4`ïhÀÞÑÀ@Û½\.ohh b„ûåp8l6{„;Õ±w‰DÒÝÝ= $É£Gžkï$~~~#Ù]MMÍHvg<¾£{GöŽì óžM3Duu5êÐLcTÜÏ ž   @xøðák¯½F.œ‘Æe2ónkkkkk J¥€I“&¡ŽÈL(6ÎŒ°w4`ïhÀÞÑ€½£{GöŽªz÷ññ¡ô7!¨êê`ïhÀÞÑ€½£{GöŽì £âý;ŸÏ7£VÚ†eh&W”ËåL&ÓŒ‡ÄÞmllh4Z}}½© íágö®kåã_VšÑ¯ƒƒƒµ†EŸújz|ã¿mœWÆ¿: u,æ@Õñ½ñŠš J*«PÇb”ôþä‘òÏ*)ÐAS‘u8æ@IïÍWÅ4+ªaCa7êpÌ’Þ » 5„úz;¨#2êyÿ«µ¿»^þ¹°²¢5]!Ȩ罩HD·þ÷¦]­† —°÷á§þ’ˆPjÝûBÐÓ*5ÊÐEdóþ¸¶¯—߯³‘nMkú•bw5óÞô«˜ÎЙPÂú_º¥žÿ¨ä ¡PD¨ ü­O¨ìâ=ù̆JÞÿ¼'•‰ ¿¡3hMETººRÉ{KI€nM×ÿ Øt•JCü¨x}zêÔ©,kß¾}Æk={væÌ™NNN_}õ`ñâÅ@+?È¥K—æÌ™Ãd2½¼¼NŸ>m VHY cëù•½Ú[:´fÍš¶¶6.—;o޼ݻw744hŽQ/„&‘H222k×®•H$©©©€Ç©"‹ÓÓÓÝÝÝÚI¥R›””@pâÄ ƒ!•Ju‚§°÷´yw›®Š´·Ì˜1C ËÅÅÅsçÎÕÖ¡¿B¨ªª‚* 円#µJKKµKjw$‰¬­­>,‹ ‚èííU«Õ:Á)ï:¿&`±XÚ:ô÷B5~Z¨V]]vIíŽ „eee!!!vvvË–-»|ù²~ðcj|wqqш‹Å·oßü^SÛ¤ÓT'“É‚¸pá‚H$Ú¼ys`` H¤û7÷1å}õêÕ{öìimmår¹o¾ùæ±cǿ׼6u ³oÑh´×_ýâÅ‹‰D¡PX[[7N·¨åŸwTè3‰$22ÒÑÑÑÙÙ9::úÉ“'Úý½pãÌ k)•Ê¥K—ÚÛÛ“ÏŸ?ïííý /̘1£  @?x ¿Ãׯ˜ …Ïwüþc2xœAöŽì Ø;°w4`ïh °÷ËÛw¥¨£0 {ï,ïèg7£ {§4Ø;°w4`ïhÀÞÑ€½£ÂïñûwŒÉàq Ø;°w4`ïhÀÞÑ€½£ÂÞñûw4à÷ï“yêyõöíÛr¹a4&ÑßaÅp"¬ÆQãy›N§¿ôÒK,‹\}*'—\.www×ìíø¡ÀjjjúûÿÍ8ª› m„ l6{dCzÁã;°w4`ïhÀÞÑ0¼ÞGm: ƒdggÓ Q]]=ä} wSSQ CÞoPP@ ·nÝþÁÏoèïX‡ §®©©(†Š!ï×ÖÖÖÖÖüó3TM’‡áÀäó]?Ó„v* µZ””äëë;~üø%K–”——“µ´Írppp\\¹±¿¿ßÑѱ°°J¡R©<<<ØlöÆ{zz€^ ŒžžžM›6¹¸¸¸»»ÇÇÇËår²£ëׯ{xx”••éˆP(ìëë3õðÍ«eí³–––vuuù©®ÁLÚ¿ÍMNNvuuÍËËãóù………‡ÜÕÓÓ“žžN–Ñ,ggg{xx!,((àp8J¥J‘””äççÇåry<Þ¢E‹âãã!„:)Ö¯_ÐÔÔÄårgÏžýé§Ÿ’Þzë­’’íŒl6›Ïç‘J¥vvvõõõäFýL&“ÇãéÔÕî·½½ “ÉÈU.—Ëd2É …þsžFDD”——“Ÿ0#÷N¢P(rrr–.]êëëÛÖÖf¼0ÔskÚøþÌLžžž÷ïß׬ÖÔÔo0,,,77÷矞?þ´iÏ,©ŸƒÃá´´´{«««¿øâ v&NœheeÕÜÜL®655¹¹¹‘ËÖÖÖ6›=kÖ¬[·nݼy“¼#/sBBÂ0„ô\pàÀ#{ñøŽì Ø;°w4 Á|r¹üÔ©SwîÜË–- µ²ÒÍ£Oggçûï¿_ZZjaf·SRRòùçŸëoOOO÷ññ±0*ãX꽯¯/66ÖÑÑ1&&†Ãá<|øðĉ•••_ýµÁYÁÖ­[ öööaaa` K–,¹xñ"ÕöíÛÉe€vBÙaÂRï™™™ÉÉɤeww÷ DFF^¹råí·ßÖ/O„Dò÷“‹ÅŠŽŽ¶0K°±±±±±Èd2€““Óˆuméø^\\¼qãFíS›Éd†††wvvúûûß¼ysÆ ï¾ûîwß}§T*·mÛX½z5€,@Ö’J¥‰‰‰AAAï½÷ÞñãÇ ÀßßÿÚµk«V­ÊÎÎÖTÑiSÓ5„ðøñãQQQýõ—~¨===Ú3ºój=‹¼K¥R‘H¤?úøø´µµ‘Ëùùù_~ùåÁƒËË˳²²¾ÿþ{@^^žN•#GŽ…”””C‡ݹsçܹsäö²²²cÇŽÅÄÄ3êl“Ü!LMM­ªªJNNf±XÚ×ÖÖ&&&FFF’|šDSSShhhjjêЦg–ûF¹ëîî>sæÌ¨¨¨ââbƒåU*UIIɇ~8yòd//¯ÈÈHMÉàà`{{û7Þx   ¶™––vþüù„„Íè¬P(®^½›œœ<{ö쬬,gggSeþüù666;vìØ»w/9Ë™©èc‘w{{{''§ÆÆFí¾¾¾ä²»»;¹àáá! ¶CÎnIN pssÓ”$gÖ™ÝÊ`›uuusçÎ=sæ ¹z÷îÝuëÖUUUíØ±#55õwÞ1g=ÎÎΛ6mÊÊÊZ¹reffæÆ=zd^S,=ßW¬X‘™™©9»r¹üܹs .$W;:þNÞÛÞÞ>ÐéæèèH§Ó5d>Ÿ¯™ÀÙàôÜÛ=%%%**êäÉ“‡Ö̧¶bÅŠ;wîÞ½{áÂ…ëׯŸ4iÒ‹/¾¸fÍvvìØáââ²uëÖ]»v-X°`ýúõF:ÕiS{Wxx8@s±:uj\\Ü™3g<==8ÐÕÕeêÞ¸qã‡~X¾|ù¹sç"##͸Bäïß-y˜ªÇÑ¡jBHÄ`¤µQ©T¦ÎHràÀ6›=Ðû÷çèý F3U:л¤ÃèÝÎÎ.00pô·‰„aôîàà7úÛDÂs4ÎŒ*°w4`ïhÀÞÑðŒ›¤_~ùedâ{ðù|6›=àîæ/++3ãn£ÍÎ;ÒKá<ä”ïhÀÞÑ€½£{GÃÿáˆxzÑIEND®B`‚pktools-2.6.6/doc/html/pktools_2pkfilter__spatial_8py_source.html0000644000113200011300000010435412647637661022264 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkfilter_spatial.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilter_spatial.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkfilter_spatial.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkfilter_spatial(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "homog ", "heterog ", "sobelx ", "sobely ", "sobelxy ", "sobelyx" , "smooth", "countid", "smoothnodata values", "threshold local filtering", "ismin", "ismax", "order ", "stdev", "mrf", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "scramble", "shift", "savgolay", "percentile"]
43  METHOD = "METHOD"
44 # RESAMPLE_OPTIONS = ['near', 'bilinear']
45 # RESAMPLE = "RESAMPLE"
46  DIM = "DIM"
47  NODATA = "NODATA"
48  PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
49  PADDING = "PADDING"
50  RTYPE = 'RTYPE'
51  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
52  EXTRA = 'EXTRA'
53 
54  def cliName(self):
55  return "pkfilter"
56 
57  def defineCharacteristics(self):
58  self.name = "spatial filter"
59  self.group = "[pktools] filter"
60 
61  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
62  self.addParameter(ParameterSelection(self.METHOD,"filter rule",self.METHOD_OPTIONS, 0))
63  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
64  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
65  self.addParameter(ParameterNumber(self.DIM, "Filter kernel size (odd value)",0.0,None,3.0))
66  #for smooth nodata:
67  self.addParameter(ParameterString(self.NODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
68  self.addParameter(ParameterSelection(self.PADDING,"Padding (edge effects)",self.PADDING_OPTIONS, 0))
69 # self.addParameter(ParameterSelection(self.RESAMPLE,"resampling method",self.RESAMPLE_OPTIONS, 0))
70  self.addParameter(ParameterString(self.EXTRA,
71  'Additional parameters', '-of GTiff', optional=True))
72 
73  def processAlgorithm(self, progress):
74  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
75  commands = [cliPath]
76 
77  input=self.getParameterValue(self.INPUT)
78  if input != "":
79  commands.append('-i')
80  commands.append('"' + input + '"')
81 
82  method=self.METHOD_OPTIONS[self.getParameterValue(self.METHOD)]
83  if method != "none":
84  commands.append("-f")
85  commands.append(method)
86  commands.append("-pad")
87  commands.append(self.PADDING_OPTIONS[self.getParameterValue(self.PADDING)])
88 
89  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
90  commands.append('-ot')
91  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
92  output=self.getOutputValue(self.OUTPUT)
93  if output != "":
94  commands.append("-o")
95  commands.append('"' + output + '"')
96 
97  if self.getParameterValue(self.DIM) != 0:
98  commands.append("-dx")
99  commands.append(str(self.getParameterValue(self.DIM)))
100  commands.append("-dy")
101  commands.append(str(self.getParameterValue(self.DIM)))
102  nodata=self.getParameterValue(self.NODATA)
103  if nodata != "none":
104  nodataValues = nodata.split(';')
105  for nodataValue in nodataValues:
106  commands.append('-nodata')
107  commands.append(nodataValue)
108  extra = str(self.getParameterValue(self.EXTRA))
109  if len(extra) > 0:
110  commands.append(extra)
111 
112  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/pktools_2pktoolsAlgorithmProvider_8py_source.html0000644000113200011300000007001512647637661023641 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pktoolsAlgorithmProvider.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktoolsAlgorithmProvider.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pktoolsAlgorithmProvider.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 
27 #from pktools.ExampleAlgorithm import ExampleAlgorithm
28 #raster utilities
29 from pktools.pkcomposite import pkcomposite
30 from pktools.pkcrop import pkcrop
31 from pktools.pkreclass import pkreclass
32 from pktools.pkgetmask import pkgetmask
33 from pktools.pksetmask import pksetmask
34 #raster/vector utilities
35 from pktools.pkextract import pkextract
36 from pktools.pkextract_grid import pkextract_grid
37 from pktools.pkextract_random import pkextract_random
38 #Supervised classification utilities
39 from pktools.pksvm import pksvm
40 from pktools.pkdiff_accuracy import pkdiff_accuracy
41 #LiDAR utilities
42 from pktools.pklas2img import pklas2img
43 from pktools.pkfilterdem import pkfilterdem
44 #filter utilities
45 from pktools.pkfilter_spectral import pkfilter_spectral
46 from pktools.pkfilter_spatial import pkfilter_spatial
47 
48 from processing.core.AlgorithmProvider import AlgorithmProvider
49 from processing.core.ProcessingConfig import Setting, ProcessingConfig
50 import os
51 from PyQt4 import QtGui
52 from pktools.pktoolsUtils import pktoolsUtils
53 
54 
55 class pktoolsAlgorithmProvider(AlgorithmProvider):
56 
57  MY_DUMMY_SETTING = "MY_DUMMY_SETTING"
58 
59  def __init__(self):
60  AlgorithmProvider.__init__(self)
61  # deactivate provider by default
62  self.activate = True
63  # load algorithms
64 # self.alglist = [pkinfo()]
65  self.alglist = [pkreclass(),pkcrop(),pkcomposite(),pkgetmask(),pksetmask(),pkextract(),pkextract_grid(),pkextract_random(),pksvm(),pkdiff_accuracy(),pklas2img(),pkfilterdem(),pkfilter_spectral(),pkfilter_spatial()]
66  # pktools = [pkinfo()]
67  # for alg in pktools:
68  # alg.group = "pktools"
69  # self.alglist.extend(pktools)
70  for alg in self.alglist:
71  alg.provider = self
72 
73  def initializeSettings(self):
74  '''In this method we add settings needed to configure our provider.
75  Do not forget to call the parent method, since it takes care or
76  automatically adding a setting for activating or deactivating the
77  algorithms in the provider
78  '''
79  AlgorithmProvider.initializeSettings(self)
80  ProcessingConfig.addSetting(Setting(self.getDescription(), pktoolsUtils.PKTOOLS_FOLDER, "pktools folder", pktoolsUtils.pktoolsPath()))
81 
82 # ProcessingConfig.addSetting(Setting("Example algorithms", pktoolsAlgorithmProvider.MY_DUMMY_SETTING, "Example setting", "Default value"))
83  # '''To get the parameter of a setting parameter, use
84 # ProcessingConfig.getSetting(name_of_parameter)
85 # '''
86 
87  def unload(self):
88  '''Setting should be removed here, so they do not appear anymore
89  when the plugin is unloaded'''
90  AlgorithmProvider.unload(self)
91  ProcessingConfig.removeSetting(pktoolsAlgorithmProvider.MY_DUMMY_SETTING)
92 
93  def getName(self):
94  '''This is the name that will appear on the toolbox group.
95  It is also used to create the command line name of all the algorithms
96  from this provider
97  '''
98  return "pktools"
99 
100  def getDescription(self):
101  '''This is the provired full name.
102  '''
103  return "Utilities for remote sensing image processing"
104 
105  def getIcon(self):
106  filepath = os.path.dirname(__file__) + "/logo.png"
107  return QtGui.QIcon(filepath)
108 
109  def _loadAlgorithms(self):
110  '''Here we fill the list of algorithms in self.algs.
111  This method is called whenever the list of algorithms should be updated.
112  If the list of algorithms can change
113  (for instance, if it contains algorithms from user-defined scripts and
114  a new script might have been added), you should create the list again
115  here.
116  In this case, since the list is always the same, we assign from the pre-made list.
117  This assignment has to be done in this method even if the list does not change,
118  since the self.algs list is cleared before calling this method
119  '''
120  self.algs = self.alglist
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask__coll__graph.map0000644000113200011300000000013312616110567026010 00000000000000 pktools-2.6.6/doc/html/pkfilter_8cc_source.html0000644000113200011300000044644012647637662016516 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfilter.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilter.cc
1 /**********************************************************************
2 pkfilter.cc: program to filter raster images: median, min/max, morphological, filtering
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <iostream>
22 #include <string>
23 #include <fstream>
24 #include <math.h>
25 #include <sys/types.h>
26 #include <stdio.h>
27 #include "base/Optionpk.h"
28 #include "base/Vector2d.h"
29 #include "algorithms/Filter2d.h"
30 #include "algorithms/Filter.h"
31 #include "fileclasses/FileReaderAscii.h"
32 #include "imageclasses/ImgReaderGdal.h"
33 #include "imageclasses/ImgWriterGdal.h"
34 //test
35 #include "algorithms/StatFactory.h"
36 
37 /******************************************************************************/
225 using namespace std;
226 /*------------------
227  Main procedure
228  ----------------*/
229 int main(int argc,char **argv) {
230  Optionpk<std::string> input_opt("i","input","input image file");
231  Optionpk<std::string> output_opt("o", "output", "Output image file");
232  // Optionpk<std::string> tmpdir_opt("tmp", "tmp", "Temporary directory","/tmp",2);
233  Optionpk<bool> disc_opt("circ", "circular", "circular disc kernel for dilation and erosion", false);
234  // Optionpk<double> angle_opt("a", "angle", "angle used for directional filtering in dilation (North=0, East=90, South=180, West=270).");
235  Optionpk<std::string> method_opt("f", "filter", "filter function (nvalid, median, var, min, max, sum, mean, dilate, erode, close, open, homog (central pixel must be identical to all other pixels within window), heterog (central pixel must be different than all other pixels within window), sobelx (horizontal edge detection), sobely (vertical edge detection), sobelxy (diagonal edge detection NE-SW),sobelyx (diagonal edge detection NW-SE), density, countid, mode (majority voting, only for classes), smoothnodata (smooth nodata values only) values, ismin, ismax, order (rank pixels in order), stdev, mrf, dwt, dwti, dwt_cut, dwt_cut_from, scramble, shift, savgolay, percentile, proportion)");
236  Optionpk<std::string> resample_opt("r", "resampling-method", "Resampling method for shifting operation (near: nearest neighbour, bilinear: bi-linear interpolation).", "near");
237  Optionpk<double> dimX_opt("dx", "dx", "filter kernel size in x, use odd values only", 3);
238  Optionpk<double> dimY_opt("dy", "dy", "filter kernel size in y, use odd values only", 3);
239  Optionpk<int> dimZ_opt("dz", "dz", "filter kernel size in z (spectral/temporal dimension), must be odd (example: 3).. Set dz>0 if 1-D filter must be used in band domain");
240  Optionpk<std::string> wavelet_type_opt("wt", "wavelet", "wavelet type: daubechies,daubechies_centered, haar, haar_centered, bspline, bspline_centered", "daubechies");
241  Optionpk<int> family_opt("wf", "family", "wavelet family (vanishing moment, see also http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)", 4);
242  Optionpk<int> savgolay_nl_opt("nl", "nl", "Number of leftward (past) data points used in Savitzky-Golay filter)", 2);
243  Optionpk<int> savgolay_nr_opt("nr", "nr", "Number of rightward (future) data points used in Savitzky-Golay filter)", 2);
244  Optionpk<int> savgolay_ld_opt("ld", "ld", "order of the derivative desired in Savitzky-Golay filter (e.g., ld=0 for smoothed function)", 0);
245  Optionpk<int> savgolay_m_opt("m", "m", "order of the smoothing polynomial in Savitzky-Golay filter, also equal to the highest conserved moment; usual values are m = 2 or m = 4)", 2);
246  Optionpk<short> class_opt("class", "class", "class value(s) to use for density, erosion, dilation, openening and closing, thresholding");
247  Optionpk<double> threshold_opt("t", "threshold", "threshold value(s) to use for threshold filter (one for each class), or threshold to cut for dwt_cut (use 0 to keep all) or dwt_cut_from, or sigma for shift", 0);
248  Optionpk<double> nodata_opt("nodata", "nodata", "nodata value(s) (used for smoothnodata filter)");
249  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");
250  Optionpk<double> tapz_opt("tapz", "tapz", "taps used for spectral filtering");
251  Optionpk<string> padding_opt("pad","pad", "Padding method for filtering (how to handle edge effects). Choose between: symmetric, replicate, circular, zero (pad with 0).", "symmetric");
252  Optionpk<double> fwhm_opt("fwhm", "fwhm", "list of full width half to apply spectral filtering (-fwhm band1 -fwhm band2 ...)");
253  Optionpk<std::string> srf_opt("srf", "srf", "list of ASCII files containing spectral response functions (two columns: wavelength response)");
254  Optionpk<double> wavelengthIn_opt("win", "wavelengthIn", "list of wavelengths in input spectrum (-win band1 -win band2 ...)");
255  Optionpk<double> wavelengthOut_opt("wout", "wavelengthOut", "list of wavelengths in output spectrum (-wout band1 -wout band2 ...)");
256  Optionpk<std::string> interpolationType_opt("interp", "interp", "type of interpolation for spectral filtering (see http://www.gnu.org/software/gsl/manual/html_node/Interpolation-Types.html)","akima");
257  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","");
258  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
259  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table");
260  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
261  Optionpk<short> down_opt("d", "down", "down sampling factor. Use value 1 for no downsampling). Use value n>1 for downsampling (aggregation)", 1);
262  Optionpk<string> beta_opt("beta", "beta", "ASCII file with beta for each class transition in Markov Random Field");
263  // Optionpk<double> eps_opt("eps","eps", "error marging for linear feature",0);
264  // Optionpk<bool> l1_opt("l1","l1", "obtain longest object length for linear feature",false);
265  // Optionpk<bool> l2_opt("l2","l2", "obtain shortest object length for linear feature",false,2);
266  // Optionpk<bool> a1_opt("a1","a1", "obtain angle found for longest object length for linear feature",false);
267  // Optionpk<bool> a2_opt("a2","a2", "obtain angle found for shortest object length for linear feature",false);
268  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
269 
270  resample_opt.setHide(1);
271  option_opt.setHide(1);
272  wavelet_type_opt.setHide(1);
273  family_opt.setHide(1);
274  savgolay_nl_opt.setHide(1);
275  savgolay_nr_opt.setHide(1);
276  savgolay_ld_opt.setHide(1);
277  savgolay_m_opt.setHide(1);
278  class_opt.setHide(1);
279  threshold_opt.setHide(1);
280  tap_opt.setHide(1);
281  tapz_opt.setHide(1);
282  padding_opt.setHide(1);
283  wavelengthIn_opt.setHide(1);
284  wavelengthOut_opt.setHide(1);
285  down_opt.setHide(1);
286  beta_opt.setHide(1);
287  // eps_opt.setHide(1);
288  // l1_opt.setHide(1);
289  // l2_opt.setHide(1);
290  // a1_opt.setHide(1);
291  // a2_opt.setHide(1);
292  interpolationType_opt.setHide(1);
293  otype_opt.setHide(1);
294  oformat_opt.setHide(1);
295  colorTable_opt.setHide(1);
296  disc_opt.setHide(1);
297 
298  bool doProcess;//stop process when program was invoked with help option (-h --help)
299  try{
300  doProcess=input_opt.retrieveOption(argc,argv);
301  output_opt.retrieveOption(argc,argv);
302  // tmpdir_opt.retrieveOption(argc,argv);
303  // angle_opt.retrieveOption(argc,argv);
304  method_opt.retrieveOption(argc,argv);
305  srf_opt.retrieveOption(argc,argv);
306  fwhm_opt.retrieveOption(argc,argv);
307  dimX_opt.retrieveOption(argc,argv);
308  dimY_opt.retrieveOption(argc,argv);
309  dimZ_opt.retrieveOption(argc,argv);
310  nodata_opt.retrieveOption(argc,argv);
311  resample_opt.retrieveOption(argc,argv);
312  option_opt.retrieveOption(argc,argv);
313  wavelet_type_opt.retrieveOption(argc,argv);
314  family_opt.retrieveOption(argc,argv);
315  savgolay_nl_opt.retrieveOption(argc,argv);
316  savgolay_nr_opt.retrieveOption(argc,argv);
317  savgolay_ld_opt.retrieveOption(argc,argv);
318  savgolay_m_opt.retrieveOption(argc,argv);
319  class_opt.retrieveOption(argc,argv);
320  threshold_opt.retrieveOption(argc,argv);
321  tap_opt.retrieveOption(argc,argv);
322  tapz_opt.retrieveOption(argc,argv);
323  padding_opt.retrieveOption(argc,argv);
324  wavelengthIn_opt.retrieveOption(argc,argv);
325  wavelengthOut_opt.retrieveOption(argc,argv);
326  down_opt.retrieveOption(argc,argv);
327  beta_opt.retrieveOption(argc,argv);
328  // eps_opt.retrieveOption(argc,argv);
329  // l1_opt.retrieveOption(argc,argv);
330  // l2_opt.retrieveOption(argc,argv);
331  // a1_opt.retrieveOption(argc,argv);
332  // a2_opt.retrieveOption(argc,argv);
333  interpolationType_opt.retrieveOption(argc,argv);
334  otype_opt.retrieveOption(argc,argv);
335  oformat_opt.retrieveOption(argc,argv);
336  colorTable_opt.retrieveOption(argc,argv);
337  disc_opt.retrieveOption(argc,argv);
338  verbose_opt.retrieveOption(argc,argv);
339  }
340  catch(string predefinedString){
341  std::cout << predefinedString << std::endl;
342  exit(0);
343  }
344  if(!doProcess){
345  cout << endl;
346  cout << "Usage: pkfilter -i input -o ouptut [-f filter | -perc value | -srf file [-srf file]* -win wavelength [-win wavelength]* | -wout wavelength -fwhm value [-wout wavelength -fwhm value]* -win wavelength [-win wavelength]*]" << endl;
347  cout << endl;
348  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
349  exit(0);//help was invoked, stop processing
350  }
351 
352  //not implemented yet, must debug first...
353  vector<double> angle_opt;
354 
355  ImgReaderGdal input;
356  ImgWriterGdal output;
357  if(input_opt.empty()){
358  cerr << "Error: no input file selected, use option -i" << endl;
359  exit(1);
360  }
361  if(output_opt.empty()){
362  cerr << "Error: no output file selected, use option -o" << endl;
363  exit(1);
364  }
365  input.open(input_opt[0]);
366  GDALDataType theType=GDT_Unknown;
367  if(verbose_opt[0])
368  cout << "possible output data types: ";
369  for(int iType = 0; iType < GDT_TypeCount; ++iType){
370  if(verbose_opt[0])
371  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
372  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
373  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
374  otype_opt[0].c_str()))
375  theType=(GDALDataType) iType;
376  }
377  if(theType==GDT_Unknown)
378  theType=input.getDataType();
379 
380  if(verbose_opt[0])
381  std::cout << std::endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
382 
383  string imageType;//=input.getImageType();
384  if(oformat_opt.size())
385  imageType=oformat_opt[0];
386 
387  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
388  string theInterleave="INTERLEAVE=";
389  theInterleave+=input.getInterleave();
390  option_opt.push_back(theInterleave);
391  }
392  try{
393  int nband=input.nrOfBand();
394 
395  if(fwhm_opt.size())
396  nband=fwhm_opt.size();
397  else if(srf_opt.size())
398  nband=srf_opt.size();
399  else if(tap_opt.size()||tapz_opt.size())
400  nband=input.nrOfBand();
401  else{
402  if(method_opt.empty()){
403  cerr << "Error: no filter selected, use option -f" << endl;
404  exit(1);
405  }
406  switch(filter2d::Filter2d::getFilterType(method_opt[0])){
407  case(filter2d::dilate):
408  case(filter2d::erode):
409  case(filter2d::close):
410  case(filter2d::open):
411  case(filter2d::smooth):
412  //implemented in spectral/temporal domain (dimZ>1) and spatial domain
413  if(dimZ_opt.size())
414  assert(dimZ_opt[0]>1);
415  nband=input.nrOfBand();
416  break;
417  case(filter2d::dwt):
418  case(filter2d::dwti):
419  case(filter2d::dwt_cut):
420  case(filter2d::smoothnodata):
421  //implemented in spectral/temporal/spatial domain and nband always input.nrOfBand()
422  nband=input.nrOfBand();
423  break;
424  case(filter2d::savgolay):
425  nband=input.nrOfBand();
426  if(dimZ_opt.empty())
427  dimZ_opt.push_back(1);
428  case(filter2d::dwt_cut_from):
429  //only implemented in spectral/temporal domain
430  if(dimZ_opt.size()){
431  nband=input.nrOfBand();
432  assert(threshold_opt.size());
433  }
434  else{
435  cerr << "filter not implemented in spatial domain" << endl;
436  exit(1);
437  }
438  break;
439  case(filter2d::mrf)://deliberate fall through
440  assert(class_opt.size()>1);
441  if(verbose_opt[0])
442  std::cout << "opening output image " << output_opt[0] << std::endl;
443  nband=class_opt.size();
444  case(filter2d::ismin):
445  case(filter2d::ismax):
446  case(filter2d::shift):
447  case(filter2d::scramble):
448  case(filter2d::mode):
449  case(filter2d::sobelx):
450  case(filter2d::sobely):
451  case(filter2d::sobelxy):
452  case(filter2d::countid):
453  case(filter2d::order):
454  case(filter2d::density):
455  case(filter2d::homog):
456  case(filter2d::heterog):
457  //only implemented in spatial domain
458  if(dimZ_opt.size()){
459  cerr << "filter not implemented in spectral/temporal domain" << endl;
460  exit(1);
461  }
462  break;
463  // case(filter2d::percentile):
464  // //implemented in spectral/temporal/spatial domain and nband 1 if dimZ>0
465  // if(dimZ_opt.size()){
466  // dimZ_opt[0]=1;
467  // nband=1;
468  // }
469  // else
470  // nband=input.nrOfBand();
471  // break;
472  case(filter2d::sum):
473  case(filter2d::mean):
474  case(filter2d::min):
475  case(filter2d::max):
476  case(filter2d::var):
477  case(filter2d::stdev):
478  case(filter2d::nvalid):
479  case(filter2d::median):
480  case(filter2d::percentile):
481  case(filter2d::proportion):
482  //implemented in spectral/temporal/spatial domain and nband 1 if dimZ==1
483  if(dimZ_opt.size()==1)
484  if(dimZ_opt[0]==1)
485  nband=1;
486  else
487  nband=input.nrOfBand();
488  break;
489  default:
490  cerr << "filter not implemented" << endl;
491  exit(1);
492  // if(dimZ_opt.size())
493  // nband=dimZ_opt[0];
494  // else
495  // nband=input.nrOfBand();
496  break;
497  }
498  }
499  std::cout << "opening output image " << output_opt[0] << " with " << nband << " bands" << std::endl;
500  output.open(output_opt[0],(input.nrOfCol()+down_opt[0]-1)/down_opt[0],(input.nrOfRow()+down_opt[0]-1)/down_opt[0],nband,theType,imageType,option_opt);
501  }
502  catch(string errorstring){
503  cout << errorstring << endl;
504  exit(4);
505  }
506  output.setProjection(input.getProjection());
507  double gt[6];
508  input.getGeoTransform(gt);
509  gt[1]*=down_opt[0];//dx
510  gt[5]*=down_opt[0];//dy
511  output.setGeoTransform(gt);
512 
513  if(colorTable_opt.size()){
514  if(colorTable_opt[0]!="none"){
515  if(verbose_opt[0])
516  cout << "set colortable " << colorTable_opt[0] << endl;
517  assert(output.getDataType()==GDT_Byte);
518  output.setColorTable(colorTable_opt[0]);
519  }
520  }
521  else if(input.getColorTable()!=NULL)
522  output.setColorTable(input.getColorTable());
523 
524  if(nodata_opt.size()){
525  for(int iband=0;iband<output.nrOfBand();++iband)
526  output.GDALSetNoDataValue(nodata_opt[0],iband);
527  }
528 
529  filter2d::Filter2d filter2d;
530  filter::Filter filter1d;
531  if(verbose_opt[0])
532  cout << "Set padding to " << padding_opt[0] << endl;
533  filter1d.setPadding(padding_opt[0]);
534  if(class_opt.size()){
535  if(verbose_opt[0])
536  std::cout<< "class values: ";
537  for(int iclass=0;iclass<class_opt.size();++iclass){
538  if(!dimZ_opt.size())
539  filter2d.pushClass(class_opt[iclass]);
540  else
541  filter1d.pushClass(class_opt[iclass]);
542  if(verbose_opt[0])
543  std::cout<< class_opt[iclass] << " ";
544  }
545  if(verbose_opt[0])
546  std::cout<< std::endl;
547  }
548 
549  if(nodata_opt.size()){
550  if(verbose_opt[0])
551  std::cout<< "mask values: ";
552  for(int imask=0;imask<nodata_opt.size();++imask){
553  if(verbose_opt[0])
554  std::cout<< nodata_opt[imask] << " ";
555  filter1d.pushNoDataValue(nodata_opt[imask]);
556  filter2d.pushNoDataValue(nodata_opt[imask]);
557  }
558  if(verbose_opt[0])
559  std::cout<< std::endl;
560  }
561  if(tap_opt.size()){
562  ifstream tapfile(tap_opt[0].c_str());
563  assert(tapfile);
564  Vector2d<double> taps(dimY_opt[0],dimX_opt[0]);
565 
566  for(int j=0;j<dimY_opt[0];++j){
567  for(int i=0;i<dimX_opt[0];++i){
568  tapfile >> taps[j][i];
569  }
570  }
571  if(verbose_opt[0]){
572  std::cout << "taps: ";
573  for(int j=0;j<dimY_opt[0];++j){
574  for(int i=0;i<dimX_opt[0];++i){
575  std::cout<< taps[j][i] << " ";
576  }
577  std::cout<< std::endl;
578  }
579  }
580  filter2d.setTaps(taps);
581  try{
582  filter2d.filter(input,output);
583  }
584  catch(string errorstring){
585  cerr << errorstring << endl;
586  }
587  tapfile.close();
588  }
589  else if(tapz_opt.size()){
590  if(verbose_opt[0]){
591  std::cout << "taps: ";
592  for(int itap=0;itap<tapz_opt.size();++itap)
593  std::cout<< tapz_opt[itap] << " ";
594  std::cout<< std::endl;
595  }
596  filter1d.setTaps(tapz_opt);
597  filter1d.filter(input,output);
598  }
599  else if(fwhm_opt.size()){
600  if(verbose_opt[0])
601  std::cout << "spectral filtering to " << fwhm_opt.size() << " bands with provided fwhm " << std::endl;
602  assert(wavelengthOut_opt.size()==fwhm_opt.size());
603  assert(wavelengthIn_opt.size());
604 
605  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
606  Vector2d<double> lineOutput(wavelengthOut_opt.size(),input.nrOfCol());
607  const char* pszMessage;
608  void* pProgressArg=NULL;
609  GDALProgressFunc pfnProgress=GDALTermProgress;
610  double progress=0;
611  pfnProgress(progress,pszMessage,pProgressArg);
612  for(int y=0;y<input.nrOfRow();++y){
613  if((y+1+down_opt[0]/2)%down_opt[0])
614  continue;
615  for(int iband=0;iband<input.nrOfBand();++iband)
616  input.readData(lineInput[iband],GDT_Float64,y,iband);
617  filter1d.applyFwhm<double>(wavelengthIn_opt,lineInput,wavelengthOut_opt,fwhm_opt, interpolationType_opt[0], lineOutput, down_opt[0], verbose_opt[0]);
618  for(int iband=0;iband<output.nrOfBand();++iband){
619  try{
620  output.writeData(lineOutput[iband],GDT_Float64,y/down_opt[0],iband);
621  }
622  catch(string errorstring){
623  cerr << errorstring << "in band " << iband << ", line " << y << endl;
624  }
625  }
626  progress=(1.0+y)/output.nrOfRow();
627  pfnProgress(progress,pszMessage,pProgressArg);
628  }
629  }
630  else if(srf_opt.size()){
631  if(verbose_opt[0])
632  std::cout << "spectral filtering to " << srf_opt.size() << " bands with provided SRF " << std::endl;
633  assert(wavelengthIn_opt.size());
634  vector< Vector2d<double> > srf(srf_opt.size());//[0] srf_nr, [1]: wavelength, [2]: response
635  ifstream srfFile;
636  for(int isrf=0;isrf<srf_opt.size();++isrf){
637  srf[isrf].resize(2);
638  srfFile.open(srf_opt[isrf].c_str());
639  double v;
640  //add 0 to make sure srf is 0 at boundaries after interpolation step
641  srf[isrf][0].push_back(0);
642  srf[isrf][1].push_back(0);
643  srf[isrf][0].push_back(1);
644  srf[isrf][1].push_back(0);
645  while(srfFile >> v){
646  srf[isrf][0].push_back(v);
647  srfFile >> v;
648  srf[isrf][1].push_back(v);
649  }
650  srfFile.close();
651  //add 0 to make sure srf[isrf] is 0 at boundaries after interpolation step
652  srf[isrf][0].push_back(srf[isrf][0].back()+1);
653  srf[isrf][1].push_back(0);
654  srf[isrf][0].push_back(srf[isrf][0].back()+1);
655  srf[isrf][1].push_back(0);
656  if(verbose_opt[0])
657  cout << "srf file details: " << srf[isrf][0].size() << " wavelengths defined" << endl;
658  }
659  assert(output.nrOfBand()==srf.size());
660  double centreWavelength=0;
661  Vector2d<double> lineInput(input.nrOfBand(),input.nrOfCol());
662  const char* pszMessage;
663  void* pProgressArg=NULL;
664  GDALProgressFunc pfnProgress=GDALTermProgress;
665  double progress=0;
666  pfnProgress(progress,pszMessage,pProgressArg);
667  for(int y=0;y<input.nrOfRow();++y){
668  if((y+1+down_opt[0]/2)%down_opt[0])
669  continue;
670  for(int iband=0;iband<input.nrOfBand();++iband)
671  input.readData(lineInput[iband],GDT_Float64,y,iband);
672  for(int isrf=0;isrf<srf.size();++isrf){
673  vector<double> lineOutput(output.nrOfCol());
674  double delta=1.0;
675  bool normalize=true;
676  centreWavelength=filter1d.applySrf<double>(wavelengthIn_opt,lineInput,srf[isrf], interpolationType_opt[0], lineOutput, delta, normalize);
677  if(verbose_opt[0])
678  std::cout << "centre wavelength srf " << isrf << ": " << centreWavelength << std::endl;
679  try{
680  output.writeData(lineOutput,GDT_Float64,y/down_opt[0],isrf);
681  }
682  catch(string errorstring){
683  cerr << errorstring << "in srf " << srf_opt[isrf] << ", line " << y << endl;
684  }
685 
686  }
687  progress=(1.0+y)/output.nrOfRow();
688  pfnProgress(progress,pszMessage,pProgressArg);
689  }
690 
691  }
692  else{
693  switch(filter2d::Filter2d::getFilterType(method_opt[0])){
694  case(filter2d::dilate):
695  if(down_opt[0]!=1){
696  std::cerr << "Error: down option not supported for morphological operator" << std::endl;
697  exit(1);
698  }
699  try{
700  if(dimZ_opt.size()){
701  if(verbose_opt[0])
702  std::cout<< "1-D filtering: dilate" << std::endl;
703  filter1d.morphology(input,output,"dilate",dimZ_opt[0],verbose_opt[0]);
704  }
705  else
706  filter2d.morphology(input,output,"dilate",dimX_opt[0],dimY_opt[0],angle_opt,disc_opt[0]);
707  }
708  catch(string errorstring){
709  cerr << errorstring << endl;
710  }
711  break;
712  case(filter2d::erode):
713  if(down_opt[0]!=1){
714  std::cerr << "Error: down option not supported for morphological operator" << std::endl;
715  exit(1);
716  }
717  try{
718  if(dimZ_opt.size()>0){
719  if(verbose_opt[0])
720  std::cout<< "1-D filtering: dilate" << std::endl;
721  filter1d.morphology(input,output,"erode",dimZ_opt[0]);
722  }
723  else{
724  filter2d.morphology(input,output,"erode",dimX_opt[0],dimY_opt[0],angle_opt,disc_opt[0]);
725  }
726  }
727  catch(string errorstring){
728  cerr << errorstring << endl;
729  }
730  break;
731  case(filter2d::close):{//closing
732  if(down_opt[0]!=1){
733  std::cerr << "Error: down option not supported for morphological operator" << std::endl;
734  exit(1);
735  }
736 
737  ImgWriterGdal tmpout;
738  tmpout.open("/vsimem/dilation.tif",input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),input.getDataType(),input.getImageType());
739  try{
740  if(dimZ_opt.size()){
741  filter1d.morphology(input,tmpout,"dilate",dimZ_opt[0]);
742  }
743  else{
744  filter2d.morphology(input,tmpout,"dilate",dimX_opt[0],dimY_opt[0],angle_opt,disc_opt[0]);
745  }
746  }
747  catch(std::string errorString){
748  std::cout<< errorString;
749  exit(1);
750  }
751  tmpout.close();
752  ImgReaderGdal tmpin;
753  tmpin.open("/vsimem/dilation.tif");
754  try{
755  if(dimZ_opt.size()){
756  filter1d.morphology(tmpin,output,"erode",dimZ_opt[0]);
757  }
758  else{
759  filter2d.morphology(tmpin,output,"erode",dimX_opt[0],dimY_opt[0],angle_opt,disc_opt[0]);
760  }
761  }
762  catch(string errorstring){
763  cerr << errorstring << endl;
764  }
765  tmpin.close();
766  break;
767  }
768  case(filter2d::open):{//opening
769  if(down_opt[0]!=1){
770  std::cerr << "Error: down option not supported for morphological operator" << std::endl;
771  exit(1);
772  }
773  ImgWriterGdal tmpout;
774  tmpout.open("/vsimem/erosion.tif",input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),input.getDataType(),input.getImageType());
775  try{
776  if(dimZ_opt.size()){
777  filter1d.morphology(input,tmpout,"erode",dimZ_opt[0]);
778  }
779  else{
780  filter2d.morphology(input,tmpout,"erode",dimX_opt[0],dimY_opt[0],angle_opt,disc_opt[0]);
781  }
782  }
783  catch(std::string errorString){
784  std::cout<< errorString;
785  exit(1);
786  }
787  tmpout.close();
788  ImgReaderGdal tmpin;
789  try{
790  tmpin.open("/vsimem/erosion.tif");
791  if(dimZ_opt.size()){
792  filter1d.morphology(tmpin,output,"dilate",dimZ_opt[0]);
793  }
794  else{
795  filter2d.morphology(tmpin,output,"dilate",dimX_opt[0],dimY_opt[0],angle_opt,disc_opt[0]);
796  }
797  tmpin.close();
798  tmpout.close();
799  }
800  catch(string errorstring){
801  cerr << errorstring << endl;
802  }
803  break;
804  }
805  case(filter2d::homog):{//spatially homogeneous
806  try{
807  filter2d.doit(input,output,"homog",dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
808  }
809  catch(string errorstring){
810  cerr << errorstring << endl;
811  }
812  break;
813  }
814  case(filter2d::heterog):{//spatially heterogeneous
815  try{
816  filter2d.doit(input,output,"heterog",dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
817  }
818  catch(string errorstring){
819  cerr << errorstring << endl;
820  }
821  break;
822  }
823  case(filter2d::shift):{//shift
824  if(down_opt[0]!=1){
825  std::cerr << "Error: down option not supported for shift operator" << std::endl;
826  exit(1);
827  }
828  assert(input.nrOfBand());
829  assert(input.nrOfCol());
830  assert(input.nrOfRow());
831  try{
832  filter2d.shift(input,output,dimX_opt[0],dimY_opt[0],threshold_opt[0],filter2d::Filter2d::getResampleType(resample_opt[0]));
833  }
834  catch(string errorstring){
835  cerr << errorstring << endl;
836  }
837  break;
838  }
839  // case(filter2d::linearfeature):{
840  // if(down_opt[0]!=1){
841  // std::cerr << "Error: down option not supported for linear feature" << std::endl;
842  // exit(1);
843  // }
844  // assert(input.nrOfBand());
845  // assert(input.nrOfCol());
846  // assert(input.nrOfRow());
847  // float theAngle=361;
848  // if(angle_opt.size())
849  // theAngle=angle_opt[0];
850  // if(verbose_opt[0])
851  // std::cout << "using angle " << theAngle << std::endl;
852  // try{
853  // //using an angle step of 5 degrees and no maximum distance
854  // filter2d.linearFeature(input,output,theAngle,5,0,eps_opt[0],l1_opt[0],a1_opt[0],l2_opt[0],a2_opt[0],0,verbose_opt[0]);
855  // }
856  // catch(string errorstring){
857  // cerr << errorstring << endl;
858  // }
859  // break;
860  // }
861  case(filter2d::mrf):{//Markov Random Field
862  if(verbose_opt[0])
863  std::cout << "Markov Random Field filtering" << std::endl;
864  try{
865  if(beta_opt.size()){
866  //in file: classFrom classTo
867  //in variable: beta[classTo][classFrom]
868  FileReaderAscii betaReader(beta_opt[0]);
869  Vector2d<double> beta(class_opt.size(),class_opt.size());
870  vector<int> cols(class_opt.size());
871  for(int iclass=0;iclass<class_opt.size();++iclass)
872  cols[iclass]=iclass;
873  betaReader.readData(beta,cols);
874  if(verbose_opt[0]){
875  std::cout << "using values for beta:" << std::endl;
876  for(int iclass1=0;iclass1<class_opt.size();++iclass1)
877  std::cout << " " << iclass1 << " (" << class_opt[iclass1] << ")";
878  std::cout << std::endl;
879  for(int iclass1=0;iclass1<class_opt.size();++iclass1){
880  std::cout << iclass1 << " (" << class_opt[iclass1] << ")";
881  for(int iclass2=0;iclass2<class_opt.size();++iclass2)
882  std::cout << " " << beta[iclass2][iclass1] << " (" << class_opt[iclass2] << ")";
883  std::cout << std::endl;
884  }
885  }
886  filter2d.mrf(input, output, dimX_opt[0], dimY_opt[0], beta, true, down_opt[0], verbose_opt[0]);
887  }
888  else
889  filter2d.mrf(input, output, dimX_opt[0], dimY_opt[0], 1, true, down_opt[0], verbose_opt[0]);
890  }
891  catch(string errorstring){
892  cerr << errorstring << endl;
893  }
894  break;
895  }
896  case(filter2d::sobelx):{//Sobel edge detection in X
897  if(down_opt[0]!=1){
898  std::cerr << "Error: down option not supported for sobel edge detection" << std::endl;
899  exit(1);
900  }
901  Vector2d<double> theTaps(3,3);
902  theTaps[0][0]=-1.0;
903  theTaps[0][1]=0.0;
904  theTaps[0][2]=1.0;
905  theTaps[1][0]=-2.0;
906  theTaps[1][1]=0.0;
907  theTaps[1][2]=2.0;
908  theTaps[2][0]=-1.0;
909  theTaps[2][1]=0.0;
910  theTaps[2][2]=1.0;
911  filter2d.setTaps(theTaps);
912  try{
913  filter2d.filter(input,output,true,true);//absolute and normalize
914  }
915  catch(string errorstring){
916  cerr << errorstring << endl;
917  }
918  break;
919  }
920  case(filter2d::sobely):{//Sobel edge detection in Y
921  if(down_opt[0]!=1){
922  std::cerr << "Error: down option not supported for sobel edge detection" << std::endl;
923  exit(1);
924  }
925  Vector2d<double> theTaps(3,3);
926  theTaps[0][0]=1.0;
927  theTaps[0][1]=2.0;
928  theTaps[0][2]=1.0;
929  theTaps[1][0]=0.0;
930  theTaps[1][1]=0.0;
931  theTaps[1][2]=0.0;
932  theTaps[2][0]=-1.0;
933  theTaps[2][1]=-2.0;
934  theTaps[2][2]=-1.0;
935  filter2d.setTaps(theTaps);
936  try{
937  filter2d.filter(input,output,true,true);//absolute and normalize
938  }
939  catch(string errorstring){
940  cerr << errorstring << endl;
941  }
942  break;
943  }
944  case(filter2d::sobelxy):{//Sobel edge detection in XY
945  if(down_opt[0]!=1){
946  std::cerr << "Error: down option not supported for sobel edge detection" << std::endl;
947  exit(1);
948  }
949  Vector2d<double> theTaps(3,3);
950  theTaps[0][0]=0.0;
951  theTaps[0][1]=1.0;
952  theTaps[0][2]=2.0;
953  theTaps[1][0]=-1.0;
954  theTaps[1][1]=0.0;
955  theTaps[1][2]=1.0;
956  theTaps[2][0]=-2.0;
957  theTaps[2][1]=-1.0;
958  theTaps[2][2]=0.0;
959  filter2d.setTaps(theTaps);
960  try{
961  filter2d.filter(input,output,true,true);//absolute and normalize
962  }
963  catch(string errorstring){
964  cerr << errorstring << endl;
965  }
966  break;
967  }
968  case(filter2d::sobelyx):{//Sobel edge detection in XY
969  if(down_opt[0]!=1){
970  std::cerr << "Error: down option not supported for sobel edge detection" << std::endl;
971  exit(1);
972  }
973  Vector2d<double> theTaps(3,3);
974  theTaps[0][0]=2.0;
975  theTaps[0][1]=1.0;
976  theTaps[0][2]=0.0;
977  theTaps[1][0]=1.0;
978  theTaps[1][1]=0.0;
979  theTaps[1][2]=-1.0;
980  theTaps[2][0]=0.0;
981  theTaps[2][1]=-1.0;
982  theTaps[2][2]=-2.0;
983  filter2d.setTaps(theTaps);
984  try{
985  filter2d.filter(input,output,true,true);//absolute and normalize
986  }
987  catch(string errorstring){
988  cerr << errorstring << endl;
989  }
990  break;
991  }
992  case(filter2d::smooth):{//Smoothing filter
993  if(down_opt[0]!=1){
994  std::cerr << "Error: down option not supported for this filter" << std::endl;
995  exit(1);
996  }
997  try{
998  if(dimZ_opt.size()){
999  if(verbose_opt[0])
1000  std::cout<< "1-D filtering: smooth" << std::endl;
1001  filter1d.smooth(input,output,dimZ_opt[0]);
1002  }
1003  else{
1004  filter2d.smooth(input,output,dimX_opt[0],dimY_opt[0]);
1005  }
1006  }
1007  catch(string errorstring){
1008  cerr << errorstring << endl;
1009  }
1010  break;
1011  }
1012  case(filter2d::smoothnodata):{//Smoothing filter
1013  if(down_opt[0]!=1){
1014  std::cerr << "Error: down option not supported for this filter" << std::endl;
1015  exit(1);
1016  }
1017  try{
1018  if(dimZ_opt.size()){
1019  if(verbose_opt[0])
1020  std::cout<< "1-D filtering: smooth" << std::endl;
1021  filter1d.smoothNoData(input,interpolationType_opt[0],output);
1022  }
1023  else{
1024  if(verbose_opt[0])
1025  std::cout<< "2-D filtering: smooth" << std::endl;
1026  filter2d.smoothNoData(input,output,dimX_opt[0],dimY_opt[0]);
1027  }
1028  }
1029  catch(string errorstring){
1030  cerr << errorstring << endl;
1031  }
1032  break;
1033  }
1034  case(filter2d::dwt):
1035  if(down_opt[0]!=1){
1036  std::cerr << "Error: down option not supported for this filter" << std::endl;
1037  exit(1);
1038  }
1039  try{
1040  if(dimZ_opt.size()){
1041  if(verbose_opt[0])
1042  std::cout<< "DWT in spectral domain" << std::endl;
1043  filter1d.dwtForward(input, output, wavelet_type_opt[0], family_opt[0]);
1044  }
1045  else
1046  filter2d.dwtForward(input, output, wavelet_type_opt[0], family_opt[0]);
1047  }
1048  catch(string errorstring){
1049  cerr << errorstring << endl;
1050  }
1051  break;
1052  case(filter2d::dwti):
1053  if(down_opt[0]!=1){
1054  std::cerr << "Error: down option not supported for this filter" << std::endl;
1055  exit(1);
1056  }
1057  try{
1058  if(dimZ_opt.size()){
1059  if(verbose_opt[0])
1060  std::cout<< "inverse DWT in spectral domain" << std::endl;
1061  filter1d.dwtInverse(input, output, wavelet_type_opt[0], family_opt[0]);
1062  }
1063  else
1064  filter2d.dwtInverse(input, output, wavelet_type_opt[0], family_opt[0]);
1065  }
1066  catch(string errorstring){
1067  cerr << errorstring << endl;
1068  }
1069  break;
1070  case(filter2d::dwt_cut):
1071  if(down_opt[0]!=1){
1072  std::cerr << "Error: down option not supported for this filter" << std::endl;
1073  exit(1);
1074  }
1075  if(dimZ_opt.size()){
1076  if(verbose_opt[0])
1077  std::cout<< "DWT approximation in spectral domain" << std::endl;
1078  filter1d.dwtCut(input, output, wavelet_type_opt[0], family_opt[0], threshold_opt[0]);
1079  }
1080  else
1081  filter2d.dwtCut(input, output, wavelet_type_opt[0], family_opt[0], threshold_opt[0]);
1082  break;
1083  case(filter2d::dwt_cut_from):
1084  if(down_opt[0]!=1){
1085  std::cerr << "Error: down option not supported for this filter" << std::endl;
1086  exit(1);
1087  }
1088  try{
1089  if(dimZ_opt.size()){
1090  if(verbose_opt[0])
1091  std::cout<< "DWT approximation in spectral domain" << std::endl;
1092  filter1d.dwtCutFrom(input, output, wavelet_type_opt[0], family_opt[0], static_cast<int>(threshold_opt[0]));
1093  }
1094  else{
1095  string errorString="Error: this filter is not supported in 2D";
1096  throw(errorString);
1097  }
1098  }
1099  catch(string errorstring){
1100  cerr << errorstring << endl;
1101  }
1102  break;
1103  case(filter2d::savgolay):{
1104  assert(savgolay_nl_opt.size());
1105  assert(savgolay_nr_opt.size());
1106  assert(savgolay_ld_opt.size());
1107  assert(savgolay_m_opt.size());
1108  if(verbose_opt[0])
1109  std::cout << "Calculating Savitzky-Golay coefficients: " << endl;
1110  filter1d.getSavGolayCoefficients(tapz_opt, input.nrOfBand(), savgolay_nl_opt[0], savgolay_nr_opt[0], savgolay_ld_opt[0], savgolay_m_opt[0]);
1111  if(verbose_opt[0]){
1112  std::cout << "taps (size is " << tapz_opt.size() << "): ";
1113  for(int itap=0;itap<tapz_opt.size();++itap)
1114  std::cout<< tapz_opt[itap] << " ";
1115  std::cout<< std::endl;
1116  }
1117  filter1d.setTaps(tapz_opt);
1118  filter1d.filter(input,output);
1119  break;
1120  }
1121  case(filter2d::percentile)://deliberate fall through
1122  case(filter2d::threshold)://deliberate fall through
1123  assert(threshold_opt.size());
1124  if(dimZ_opt.size())
1125  filter1d.setThresholds(threshold_opt);
1126  else
1127  filter2d.setThresholds(threshold_opt);
1128  case(filter2d::density)://deliberate fall through
1129  filter2d.setClasses(class_opt);
1130  if(verbose_opt[0])
1131  std::cout << "classes set" << std::endl;
1132  default:
1133  try{
1134  if(dimZ_opt.size()){
1135  if(dimZ_opt[0]==1)
1136  filter1d.stat(input,output,method_opt[0]);
1137  else{
1138  assert(down_opt[0]==1);//not implemented yet...
1139  filter1d.filter(input,output,method_opt[0],dimZ_opt[0]);
1140  }
1141  }
1142  else
1143  filter2d.doit(input,output,method_opt[0],dimX_opt[0],dimY_opt[0],down_opt[0],disc_opt[0]);
1144  }
1145  catch(string errorstring){
1146  cerr << errorstring << endl;
1147  }
1148  break;
1149  }
1150  }
1151  input.close();
1152  output.close();
1153  return 0;
1154 }
pktools-2.6.6/doc/html/md_examples_pkann.html0000644000113200011300000000646412647637662016244 00000000000000 pktools: examples_pkann
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkann

Examples of pkann

Classify input image input.tif with an Artificial Neural Network using one hidden layer with 5 neurons. A training sample that is provided as an OGR vector dataset. It contains all features (same dimensionality as input.tif) in its fields (please check 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).

pkann -i input.tif -t training.sqlite -o output.tif --nneuron 5 -cv 2

Same example as above, but use two hidden layers with 15 and 5 neurons respectively

pkann -i input.tif -t training.sqlite -o output.tif --nneuron 15 --neuron 5 -cv 2
pktools-2.6.6/doc/html/pkfillnodata_8cc_source.html0000644000113200011300000006332612647637661017343 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfillnodata.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfillnodata.cc
1 /**********************************************************************
2 pkfillnodata.cc: program to fill holes in raster image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "cpl_string.h"
21 #include "gdal_priv.h"
22 #include "gdal.h"
23 extern "C" {
24 #include "gdal_alg.h"
25 }
26 #include <string>
27 #include "base/Optionpk.h"
28 
29 /******************************************************************************/
66 using namespace std;
67 
68 int main(int argc,char **argv) {
69  Optionpk<std::string> input_opt("i", "input", "Input raster dataset");
70  Optionpk<int> band_opt("b", "band", "band(s) to process (Default is -1: process all bands)");
71  Optionpk<std::string> mask_opt("m", "mask", "Mask raster dataset indicating pixels to be interpolated (zero valued) ");
72  Optionpk<std::string> output_opt("o", "output", "Output image file");
73  Optionpk<double> distance_opt("d", "distance", "Maximum number of pixels to search in all directions to find values to interpolate from", 0);
74  Optionpk<int> iteration_opt("it", "iteration", "Number of 3x3 smoothing filter passes to run (default 0)", 0);
75  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0,2);
76 
77  distance_opt.setHide(1);
78  iteration_opt.setHide(1);
79 
80  bool doProcess;//stop process when program was invoked with help option (-h --help)
81  try{
82  doProcess=input_opt.retrieveOption(argc,argv);
83  band_opt.retrieveOption(argc,argv);
84  output_opt.retrieveOption(argc,argv);
85  mask_opt.retrieveOption(argc,argv);
86  distance_opt.retrieveOption(argc,argv);
87  iteration_opt.retrieveOption(argc,argv);
88  verbose_opt.retrieveOption(argc,argv);
89  }
90  catch(std::string predefinedString){
91  std::cout << predefinedString << std::endl;
92  exit(0);
93  }
94  if(!doProcess){
95  cout << endl;
96  cout << "Usage: pkfillnodata -i input.txt -m mask -o output" << endl;
97  cout << endl;
98  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
99  exit(0);//help was invoked, stop processing
100  }
101 
102  assert(input_opt.size());
103  assert(mask_opt.size());
104  assert(output_opt.size());
105  GDALAllRegister();
106  GDALDataset *gds_input;
107  if(verbose_opt[0])
108  std::cout << "opening input file " << input_opt[0] << std::endl;
109  gds_input = (GDALDataset *) GDALOpen(input_opt[0].c_str(), GA_ReadOnly);
110  if(gds_input == NULL){
111  std::string errorString="FileOpenError";
112  throw(errorString);
113  }
114 
115  GDALDataset *gds_mask;
116  if(verbose_opt[0])
117  std::cout << "opening mask file " << mask_opt[0] << std::endl;
118  gds_mask = (GDALDataset *) GDALOpen(mask_opt[0].c_str(), GA_ReadOnly );
119  if(gds_mask == NULL){
120  std::string errorString="FileOpenError";
121  throw(errorString);
122  }
123  GDALRasterBand *maskBand;
124  if(verbose_opt[0])
125  std::cout << "get mask raster band" << std::endl;
126  maskBand=gds_mask->GetRasterBand(1);
127 
128 
129  GDALDriver *poDriver;
130  poDriver = GetGDALDriverManager()->GetDriverByName(gds_input->GetDriver()->GetDescription());
131  if( poDriver == NULL ){
132  std::string errorString="FileOpenError";
133  throw(errorString);
134  }
135  if(verbose_opt[0])
136  std::cout << "copying input file to " << output_opt[0] << std::endl;
137  poDriver->CopyFiles(output_opt[0].c_str(),input_opt[0].c_str());
138  GDALDataset *gds_out;
139  gds_out=(GDALDataset *) GDALOpen(output_opt[0].c_str(), GA_Update);
140 
141  if(band_opt.empty()){
142  band_opt.clear();
143  for(int iband=0;iband<gds_input->GetRasterCount();++iband)
144  band_opt.push_back(iband);
145  }
146  GDALRasterBand *targetBand;
147  for(unsigned short iband=0;iband<band_opt.size();++iband){
148  targetBand=gds_out->GetRasterBand(band_opt[iband]+1);
149  if(verbose_opt[0])
150  std::cout << "copying input file to " << output_opt[0] << std::endl;
151  double dfComplete=0.0;
152  const char* pszMessage;
153  void* pProgressArg=NULL;
154  GDALProgressFunc pfnProgress=GDALTermProgress;
155  pfnProgress(dfComplete,pszMessage,pProgressArg);
156  if(GDALFillNodata(targetBand,maskBand,distance_opt[0],0,iteration_opt[0],NULL,pfnProgress,pProgressArg)!=CE_None){
157  std::cerr << CPLGetLastErrorMsg() << std::endl;
158  exit(1);
159  }
160  else{
161  dfComplete=1.0;
162  pfnProgress(dfComplete,pszMessage,pProgressArg);
163  }
164 
165  // gds_out=poDriver->CreateCopy(output_opt[0].c_str(),gds_input, FALSE,NULL,NULL,NULL);
166  // char **papszParmList=NULL;
167  // gds_out=poDriver->Create(output_opt[0].c_str(),targetBand->GetXSize(),targetBand->GetYSize(),1,targetBand->GetRasterDataType(),papszParmList);
168  // char **papszMetadata;
169  // papszMetadata = poDriver->GetMetadata();
170  // assert( CSLFetchBoolean( papszMetadata, GDAL_DCAP_CREATE, FALSE ));
171  // ostringstream compressList;
172  // gds_out->SetMetadataItem("INTERLEAVE",gds_input->GetMetadataItem( "INTERLEAVE", "IMAGE_STRUCTURE"),"IMAGE_STRUCTURE");
173  // gds_out->SetMetadataItem("COMPRESSION",gds_input->GetMetadataItem( "COMPRESSION", "IMAGE_STRUCTURE"),"IMAGE_STRUCTURE");
174  // if(gds_input->GetProjectionRef()!=NULL){
175  // gds_out->SetProjection(gds_input->GetProjectionRef());
176  // double adfGeoTransform[6];
177  // gds_input->GetGeoTransform(adfGeoTransform);
178  // gds_out->SetGeoTransform(adfGeoTransform);
179  // }
180  }
181  GDALClose(gds_input);
182  GDALClose(gds_mask);
183  GDALClose(gds_out);
184  GDALDumpOpenDatasets(stderr);
185  GDALDestroyDriverManager();
186 }
187 
pktools-2.6.6/doc/html/structPosValue-members.html0000644000113200011300000000717212647637662017207 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
PosValue Member List

This is the complete list of members for PosValue, including all inherited members.

posx (defined in PosValue)PosValue
posy (defined in PosValue)PosValue
value (defined in PosValue)PosValue
pktools-2.6.6/doc/html/pkkalman_8cc_source.html0000644000113200011300000106134212647637662016467 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkkalman.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkkalman.cc
1 /**********************************************************************
2 pkkalman.cc: produce kalman filtered raster time series
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <sstream>
21 #include <vector>
22 #include <algorithm>
23 #include "base/Optionpk.h"
24 #include "base/Vector2d.h"
25 #include "imageclasses/ImgReaderGdal.h"
26 #include "imageclasses/ImgWriterGdal.h"
27 #include "imageclasses/ImgUpdaterGdal.h"
28 #include "algorithms/StatFactory.h"
29 
30 /******************************************************************************/
91 using namespace std;
92 /*------------------
93  Main procedure
94  ----------------*/
95 int main(int argc,char **argv) {
96  Optionpk<string> direction_opt("dir","direction","direction to run model (forward|backward|smooth)","forward");
97  Optionpk<string> model_opt("mod","model","coarse spatial resolution input datasets(s) used as model. Use either multi-band input (-model multiband_model.tif) or multiple single-band inputs (-mod model1 -mod model2 etc.)");
98  Optionpk<string> modelmask_opt("modmask","modmask","model mask datasets(s). Must have same dimension as model input. Use either multi-band input or multiple single-band inputs");
99  Optionpk<string> observation_opt("obs","observation","fine spatial resolution input dataset(s) used as observation. Use either multi-band input (-obs multiband_obs.tif) or multiple single-band inputs (-obs obs1 -obs obs2 etc.)");
100  Optionpk<string> observationmask_opt("obsmask","obsmask","observation mask dataset(s). Must have same dimension as observation input (use multi-band input or multiple single-band inputs");
101  Optionpk<int> tmodel_opt("tmod","tmodel","time sequence of model input. Sequence must have exact same length as model input. Leave empty to have default sequence 0,1,2,etc.");
102  Optionpk<int> tobservation_opt("tobs","tobservation","time sequence of observation input. Sequence must have exact same length as observation input)");
103  Optionpk<string> projection_opt("a_srs", "a_srs", "Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid");
104  Optionpk<string> outputfw_opt("ofw", "outputfw", "Output raster dataset for forward model");
105  Optionpk<string> uncertfw_opt("u_ofw", "u_outputfw", "Uncertainty output raster dataset for forward model");
106  Optionpk<string> outputbw_opt("obw", "outputbw", "Output raster dataset for backward model");
107  Optionpk<string> uncertbw_opt("u_obw", "u_outputbw", "Uncertainty output raster dataset for backward model");
108  Optionpk<string> outputfb_opt("ofb", "outputfb", "Output raster dataset for smooth model");
109  Optionpk<string> uncertfb_opt("u_ofb", "u_outputfb", "Uncertainty output raster dataset for smooth model");
110  Optionpk<string> gain_opt("gain", "gain", "Output raster dataset for gain");
111  Optionpk<double> modnodata_opt("modnodata", "modnodata", "invalid value for model input", 0);
112  Optionpk<double> obsnodata_opt("obsnodata", "obsnodata", "invalid value for observation input", 0);
113  Optionpk<double> obsmin_opt("obsmin", "obsmin", "Minimum value for observation data");
114  Optionpk<double> obsmax_opt("obsmax", "obsmax", "Maximum value for observation data");
115  Optionpk<double> msknodata_opt("msknodata", "msknodata", "Mask value not to consider", 0);
116  Optionpk<short> mskband_opt("mskband", "mskband", "Mask band to read (0 indexed)", 0);
117  Optionpk<double> eps_opt("eps", "eps", "epsilon for non zero division", 0.00001);
118  Optionpk<double> uncertModel_opt("um", "uncertmodel", "Uncertainty of model",1);
119  Optionpk<double> uncertObs_opt("uo", "uncertobs", "Uncertainty of valid observations",1);
120  Optionpk<double> processNoise_opt("q", "q", "Process noise: expresses instability (variance) of proportions of fine res pixels within a moderate resolution pixel",1);
121  Optionpk<double> uncertNodata_opt("unodata", "uncertnodata", "Uncertainty in case of no-data values in observation", 100);
122  Optionpk<int> down_opt("down", "down", "Downsampling factor for reading model data to calculate regression");
123  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","");
124  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff",2);
125  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
126  Optionpk<short> verbose_opt("v", "verbose", "verbose mode when positive", 0);
127 
128  observationmask_opt.setHide(1);
129  modelmask_opt.setHide(1);
130  tmodel_opt.setHide(1);
131  tobservation_opt.setHide(1);
132  projection_opt.setHide(1);
133  uncertfw_opt.setHide(1);
134  uncertbw_opt.setHide(1);
135  uncertfb_opt.setHide(1);
136  obsmin_opt.setHide(1);
137  obsmax_opt.setHide(1);
138  msknodata_opt.setHide(1);
139  mskband_opt.setHide(1);
140  eps_opt.setHide(1);
141  uncertNodata_opt.setHide(1);
142  down_opt.setHide(1);
143  otype_opt.setHide(1);
144  oformat_opt.setHide(1);
145  option_opt.setHide(1);
146  verbose_opt.setHide(1);
147  gain_opt.setHide(2);
148 
149  bool doProcess;//stop process when program was invoked with help option (-h --help)
150  try{
151  doProcess=direction_opt.retrieveOption(argc,argv);
152  model_opt.retrieveOption(argc,argv);
153  modelmask_opt.retrieveOption(argc,argv);
154  observation_opt.retrieveOption(argc,argv);
155  observationmask_opt.retrieveOption(argc,argv);
156  tmodel_opt.retrieveOption(argc,argv);
157  tobservation_opt.retrieveOption(argc,argv);
158  projection_opt.retrieveOption(argc,argv);
159  outputfw_opt.retrieveOption(argc,argv);
160  uncertfw_opt.retrieveOption(argc,argv);
161  outputbw_opt.retrieveOption(argc,argv);
162  uncertbw_opt.retrieveOption(argc,argv);
163  outputfb_opt.retrieveOption(argc,argv);
164  uncertfb_opt.retrieveOption(argc,argv);
165  gain_opt.retrieveOption(argc,argv);
166  modnodata_opt.retrieveOption(argc,argv);
167  obsnodata_opt.retrieveOption(argc,argv);
168  obsmin_opt.retrieveOption(argc,argv);
169  obsmax_opt.retrieveOption(argc,argv);
170  msknodata_opt.retrieveOption(argc,argv);
171  mskband_opt.retrieveOption(argc,argv);
172  eps_opt.retrieveOption(argc,argv);
173  uncertModel_opt.retrieveOption(argc,argv);
174  uncertObs_opt.retrieveOption(argc,argv);
175  processNoise_opt.retrieveOption(argc,argv);
176  uncertNodata_opt.retrieveOption(argc,argv);
177  down_opt.retrieveOption(argc,argv);
178  otype_opt.retrieveOption(argc,argv);
179  oformat_opt.retrieveOption(argc,argv);
180  option_opt.retrieveOption(argc,argv);
181  verbose_opt.retrieveOption(argc,argv);
182  }
183  catch(string predefinedString){
184  std::cout << predefinedString << std::endl;
185  exit(0);
186  }
187  if(!doProcess){
188  std::cerr << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
189  exit(0);//help was invoked, stop processing
190  }
191 
192  try{
193  ostringstream errorStream;
194  if(model_opt.size()<1){
195  errorStream << "Error: no model dataset selected, use option -mod" << endl;
196  throw(errorStream.str());
197  }
198  if(observation_opt.size()<1){
199  errorStream << "Error: no observation dataset selected, use option -obs" << endl;
200  throw(errorStream.str());
201  }
202  if(find(direction_opt.begin(),direction_opt.end(),"forward")!=direction_opt.end()){
203  if(outputfw_opt.empty()){
204  errorStream << "Error: output forward datasets is not provided, use option -ofw" << endl;
205  throw(errorStream.str());
206  }
207  if(uncertfw_opt.empty()){
208  ostringstream uncertStream;
209  uncertStream << outputfw_opt[0] << "_uncert";
210  uncertfw_opt.push_back(uncertStream.str());
211  }
212  }
213  if(find(direction_opt.begin(),direction_opt.end(),"backward")!=direction_opt.end()){
214  if(outputbw_opt.empty()){
215  errorStream << "Error: output backward datasets is not provided, use option -obw" << endl;
216  throw(errorStream.str());
217  }
218  if(uncertbw_opt.empty()){
219  ostringstream uncertStream;
220  uncertStream << outputbw_opt[0] << "_uncert";
221  uncertbw_opt.push_back(uncertStream.str());
222  }
223  }
224  // if(model_opt.size()<observation_opt.size()){
225  // errorStream << "Error: sequence of models should be larger than observations" << endl;
226  // throw(errorStream.str());
227  // }
228  if(tmodel_opt.empty()){
229  cout << "Warning: model time sequence is not provided, self generating time sequence from model input" << endl;
230  }
231  if(tobservation_opt.empty()){
232  cout << "Warning: observation time sequence is not provided, self generating time sequence from observation input" << endl;
233  }
234  if(find(direction_opt.begin(),direction_opt.end(),"smooth")!=direction_opt.end()){
235  if(outputfw_opt.empty()){
236  errorStream << "Error: output forward dataset is not provided, use option -ofw" << endl;
237  throw(errorStream.str());
238  }
239  if(outputbw_opt.empty()){
240  errorStream << "Error: output backward datasets is not provided, use option -obw" << endl;
241  throw(errorStream.str());
242  }
243  if(outputfb_opt.empty()){
244  errorStream << "Error: output smooth datasets is not provided, use option -ofb" << endl;
245  throw(errorStream.str());
246  }
247  if(uncertfb_opt.empty()){
248  ostringstream uncertStream;
249  uncertStream << outputfb_opt[0] << "_uncert";
250  uncertfb_opt.push_back(uncertStream.str());
251  }
252  }
253  }
254  catch(string errorString){
255  std::cout << errorString << std::endl;
256  exit(1);
257  }
258 
260  stat.setNoDataValues(modnodata_opt);
261  ImgReaderGdal imgReaderModel1;
262  ImgReaderGdal imgReaderModel2;
263  ImgReaderGdal imgReaderModel1Mask;
264  ImgReaderGdal imgReaderModel2Mask;
265  ImgReaderGdal imgReaderObs;
266  ImgReaderGdal imgReaderObsMask;
267  //test
268  ImgWriterGdal imgWriterGain;
269 
270  imgReaderModel1.open(model_opt[0]);
271  imgReaderModel1.setNoData(modnodata_opt);
272  imgReaderObs.open(observation_opt[0]);
273  imgReaderObs.setNoData(obsnodata_opt);
274  // if(observationmask_opt.empty())
275  // observationmask_opt=observation_opt;
276  if(modelmask_opt.size()){
277  imgReaderModel1Mask.open(modelmask_opt[0]);
278  imgReaderModel1Mask.setNoData(msknodata_opt);
279  }
280  if(observationmask_opt.size()){
281  imgReaderObsMask.open(observationmask_opt[0]);
282  imgReaderObsMask.setNoData(msknodata_opt);
283  }
284 
285  unsigned int nobs=(observation_opt.size()>1)? observation_opt.size() : imgReaderObs.nrOfBand();
286  unsigned int nmodel=(model_opt.size()>1)? model_opt.size() : imgReaderModel1.nrOfBand();
287 
288  if(verbose_opt[0]){
289  cout << "number of observations: " << nobs << endl;
290  cout << "number of models: " << nmodel << endl;
291  }
292 
293  int ncol=imgReaderObs.nrOfCol();
294  int nrow=imgReaderObs.nrOfRow();
295  if(projection_opt.empty())
296  projection_opt.push_back(imgReaderObs.getProjection());
297  double geotransform[6];
298  imgReaderObs.getGeoTransform(geotransform);
299 
300  GDALDataType theType=GDT_Unknown;
301  if(verbose_opt[0])
302  cout << "possible output data types: ";
303  for(int iType = 0; iType < GDT_TypeCount; ++iType){
304  if(verbose_opt[0])
305  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
306  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
307  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
308  otype_opt[0].c_str()))
309  theType=(GDALDataType) iType;
310  }
311  if(theType==GDT_Unknown)
312  theType=imgReaderObs.getDataType();
313 
314  string imageType;//=imgReaderObs.getImageType();
315  if(oformat_opt.size())//default
316  imageType=oformat_opt[0];
317  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
318  string theInterleave="INTERLEAVE=";
319  theInterleave+=imgReaderObs.getInterleave();
320  option_opt.push_back(theInterleave);
321  }
322 
323  if(down_opt.empty()){
324  double resModel=imgReaderModel1.getDeltaX();
325  double resObs=imgReaderObs.getDeltaX();
326  int down=static_cast<int>(ceil(resModel/resObs));
327  if(!(down%2))
328  down+=1;
329  down_opt.push_back(down);
330  }
331 
332  int obsindex=0;
333 
334  const char* pszMessage;
335  void* pProgressArg=NULL;
336  GDALProgressFunc pfnProgress=GDALTermProgress;
337  double progress=0;
338 
339  double errObs=uncertNodata_opt[0];//start with high initial value in case we do not have first observation at time 0
340 
341  while(tmodel_opt.size()<nmodel)
342  tmodel_opt.push_back(tmodel_opt.size());
343  try{
344  if(tobservation_opt.size()<nobs){
345  if(nobs==nmodel){
346  while(tobservation_opt.size()<nobs)
347  tobservation_opt.push_back(tobservation_opt.size());
348  }
349  else{
350  ostringstream errorStream;
351  errorStream << "Error: please provide time sequence for observation using option tobs" << endl;
352  throw(errorStream.str());
353  }
354  }
355  }
356  catch(string errorString){
357  std::cout << errorString << std::endl;
358  exit(1);
359  }
360 
361  vector<int> relobsindex;
362 
363  for(int tindex=0;tindex<tobservation_opt.size();++tindex){
364  vector<int>::iterator modit;
365  modit=upper_bound(tmodel_opt.begin(),tmodel_opt.end(),tobservation_opt[tindex]);
366  int relpos=modit-tmodel_opt.begin()-1;
367  assert(relpos>=0);//todo: for now, we assume model is available at time before first measurement
368  relobsindex.push_back(relpos);
369  if(verbose_opt[0]){
370  cout << "observation " << tindex << ": " << "relative position in model time series is " << relpos << ", date of observation is (tobservation_opt[tindex]): " << tobservation_opt[tindex] << ", relobsindex.back(): " << relobsindex.back();
371  if(observation_opt.size()>tindex)
372  cout << ", filename observation: " << observation_opt[tindex];
373  else
374  cout << ", observation band index: " << tindex;
375  if(model_opt.size()>relpos)
376  cout << ", filename of corresponding model: " << model_opt[relpos] << endl;
377  else
378  cout << ", band index of corresponding model: " << relpos;
379  }
380  }
381 
382  int ndigit=log(1.0*tmodel_opt.back())/log(10.0)+1;
383 
384  double geox=0;
385  double geoy=0;
386 
387  if(model_opt.size()==nmodel)
388  imgReaderModel1.close();
389  if(modelmask_opt.size()==nmodel)
390  imgReaderModel1Mask.close();
391  if(observation_opt.size()==nobs)
392  imgReaderObs.close();
393  if(observationmask_opt.size()==nobs)
394  imgReaderObsMask.close();
395 
396  try{
397  if(find(direction_opt.begin(),direction_opt.end(),"forward")!=direction_opt.end()){
399  cout << "Running forward model" << endl;
400  obsindex=0;
401  if(verbose_opt[0])
402  cout << "Opening image " << outputfw_opt[0] << " for writing " << endl << flush;
403 
404  // imgWriterEst.open(theOutput,ncol,nrow,2,theType,imageType,option_opt);
405  ImgWriterGdal imgWriterEst;
406  ImgWriterGdal imgWriterUncert;
407  imgWriterEst.open(outputfw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt);
408  imgWriterEst.setProjectionProj4(projection_opt[0]);
409  imgWriterEst.setGeoTransform(geotransform);
410  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
411  imgWriterUncert.open(uncertfw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt);
412  imgWriterUncert.setProjectionProj4(projection_opt[0]);
413  imgWriterUncert.setGeoTransform(geotransform);
414 
415  try{
416  //test
417  if(gain_opt.size()){
418  imgWriterGain.open(gain_opt[0],ncol,nrow,nmodel,GDT_Float64,imageType,option_opt);
419  imgWriterGain.setProjectionProj4(projection_opt[0]);
420  imgWriterGain.setGeoTransform(geotransform);
421  imgWriterGain.GDALSetNoDataValue(obsnodata_opt[0]);
422  }
423 
424  if(verbose_opt[0]){
425  cout << "processing time " << tmodel_opt[0] << endl;
426  if(obsindex<relobsindex.size()){
427  assert(tmodel_opt.size()>relobsindex[obsindex]);
428  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
429  }
430  else
431  cout << "There is no next observation" << endl;
432  }
433  if(model_opt.size()==nmodel){
434  imgReaderModel1.open(model_opt[0]);
435  imgReaderModel1.setNoData(modnodata_opt);
436  }
437  if(modelmask_opt.size()==nmodel){
438  imgReaderModel1Mask.open(modelmask_opt[0]);
439  imgReaderModel1Mask.setNoData(msknodata_opt);
440  }
441  }
442  catch(string errorString){
443  cerr << errorString << endl;
444  }
445  catch(...){
446  cerr << "Error opening file " << model_opt[0] << endl;
447  }
448 
449  double modRow=0;
450  double modCol=0;
451  double lowerCol=0;
452  double upperCol=0;
453  RESAMPLE theResample=BILINEAR;
454 
455  if(relobsindex[0]>0){//initialize output_opt[0] as model[0]
456  //write first model as output
457  if(verbose_opt[0])
458  cout << "write first model as output" << endl;
459  for(int jrow=0;jrow<nrow;jrow+=down_opt[0]){
460  vector<double> estReadBuffer;
461  vector<double> lineModelMask;
462  vector<double> estWriteBuffer(ncol);
463  vector<double> uncertWriteBuffer(ncol);
464  //test
465  vector<double> gainWriteBuffer(ncol);
466  try{
467  for(int irow=jrow;irow<jrow+down_opt[0]&&irow<nrow;++irow){
468  imgWriterEst.image2geo(0,irow,geox,geoy);
469  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
470  if(modRow<0||modRow>=imgReaderModel1.nrOfRow()){
471  cerr << "Error: geo coordinates (" << geox << "," << geoy << ") not covered in model image " << imgReaderModel1.getFileName() << endl;
472  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
473  }
474  // imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow,0,theResample);
475 
476  int readModelBand=(model_opt.size()==nmodel)? 0:0;
477  int readModelMaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:0;
478  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow,readModelBand,theResample);
479  if(modelmask_opt.size())
480  imgReaderModel1Mask.readData(lineModelMask,GDT_Float64,modRow,readModelMaskBand,theResample);
481  for(int jcol=0;jcol<ncol;jcol+=down_opt[0]){
482  for(int icol=jcol;icol<jcol+down_opt[0]&&icol<ncol;++icol){
483  imgWriterEst.image2geo(icol,irow,geox,geoy);
484  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
485  if(modelmask_opt.size()){
486  if(imgReaderModel1Mask.isNoData(lineModelMask[modCol])){
487  estWriteBuffer[icol]=obsnodata_opt[0];
488  uncertWriteBuffer[icol]=uncertNodata_opt[0];
489  //test
490  gainWriteBuffer[icol]=obsnodata_opt[0];
491  continue;
492  }
493  }
494  lowerCol=modCol-0.5;
495  lowerCol=static_cast<int>(lowerCol);
496  upperCol=modCol+0.5;
497  upperCol=static_cast<int>(upperCol);
498  if(lowerCol<0)
499  lowerCol=0;
500  if(upperCol>=imgReaderModel1.nrOfCol())
501  upperCol=imgReaderModel1.nrOfCol()-1;
502  double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol];
503  // double modValue=estReadBuffer[modCol];
504  if(imgReaderModel1.isNoData(modValue)){
505  estWriteBuffer[icol]=obsnodata_opt[0];
506  uncertWriteBuffer[icol]=uncertNodata_opt[0];
507  //test
508  gainWriteBuffer[icol]=obsnodata_opt[0];
509  continue;
510  }
511  estWriteBuffer[icol]=modValue;
512  if(obsmin_opt.size()){
513  if(estWriteBuffer[icol]<obsmin_opt[0])
514  estWriteBuffer[icol]=obsmin_opt[0];
515  }
516  if(obsmax_opt.size()){
517  if(estWriteBuffer[icol]>obsmax_opt[0])
518  estWriteBuffer[icol]=obsmax_opt[0];
519  }
520  uncertWriteBuffer[icol]=uncertModel_opt[0];
521  //test
522  gainWriteBuffer[icol]=0;
523  }
524  }
525  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
526  imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,0);
527  //test
528  if(gain_opt.size())
529  imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0);
530  }
531  }
532  catch(string errorString){
533  cerr << errorString << endl;
534  }
535  catch(...){
536  cerr << "Error writing file " << imgWriterEst.getFileName() << endl;
537  }
538  }
539  }
540  else{//we have a measurement
541  if(verbose_opt[0])
542  cout << "we have a measurement at initial time" << endl;
543  if(observation_opt.size()==nobs){
544  imgReaderObs.open(observation_opt[0]);
545  imgReaderObs.setNoData(obsnodata_opt);
546  }
547  if(observationmask_opt.size()==nobs){
548  imgReaderObsMask.open(observationmask_opt[0]);
549  imgReaderObsMask.setNoData(msknodata_opt);
550  }
551  imgReaderObs.getGeoTransform(geotransform);
552 
553  vector< vector<double> > obsLineVector(down_opt[0]);
554  vector<double> obsLineBuffer;
555  vector<double> obsMaskLineBuffer;
556  vector<double> modelMaskLineBuffer;
557  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
558  vector<double> estReadBuffer;
559  vector<double> estWriteBuffer(ncol);
560  vector<double> uncertWriteBuffer(ncol);
561  vector<double> uncertObsLineBuffer;
562  //test
563  vector<double> gainWriteBuffer(ncol);
564 
565  if(verbose_opt[0])
566  cout << "initialize obsLineVector" << endl;
567  assert(down_opt[0]%2);//window size must be odd
568  int readObsBand=(observation_opt.size()==nobs)? 0:0;
569  int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:0;
570  int readModelBand=(model_opt.size()==nmodel)? 0:0;
571  int readModelMaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:0;
572  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
573  if(iline<0)//replicate line 0
574  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,0,readObsBand);
575  else
576  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,iline,readObsBand);
577  }
578  for(int jrow=0;jrow<nrow;jrow+=down_opt[0]){
579  for(int irow=jrow;irow<jrow+down_opt[0]&&irow<nrow;++irow){
580  imgWriterEst.image2geo(0,irow,geox,geoy);
581  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
582  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
583  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow,readModelBand,theResample);
584  if(modelmask_opt.size())
585  imgReaderModel1Mask.readData(modelMaskLineBuffer,GDT_Float64,modRow,readModelMaskBand);
586  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
587  obsLineVector.erase(obsLineVector.begin());
588  imgReaderObs.readData(obsLineBuffer,GDT_Float64,maxRow,readObsBand);
589  obsLineVector.push_back(obsLineBuffer);
590 
591  if(observationmask_opt.size())
592  imgReaderObsMask.readData(obsMaskLineBuffer,GDT_Float64,irow,readObsMaskBand);
593 
594  for(int jcol=0;jcol<ncol;jcol+=down_opt[0]){
595  for(int icol=jcol;icol<jcol+down_opt[0]&&icol<ncol;++icol){
596  imgWriterEst.image2geo(icol,irow,geox,geoy);
597  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
598  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
599  bool modelIsNoData=false;
600  if(modelmask_opt.size())
601  modelIsNoData=imgReaderModel1Mask.isNoData(modelMaskLineBuffer[modCol]);
602  lowerCol=modCol-0.5;
603  lowerCol=static_cast<int>(lowerCol);
604  upperCol=modCol+0.5;
605  upperCol=static_cast<int>(upperCol);
606  if(lowerCol<0)
607  lowerCol=0;
608  if(upperCol>=imgReaderModel1.nrOfCol())
609  upperCol=imgReaderModel1.nrOfCol()-1;
610  double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol];
611  // double modValue=estReadBuffer[modCol];
612  double errMod=uncertModel_opt[0];//*stdDev*stdDev;
613  modelIsNoData=modelIsNoData||imgReaderModel1.isNoData(modValue);
614  bool obsIsNoData=false;
615  if(observationmask_opt.size())
616  obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]);
617  obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]);
618  if(modelIsNoData){//model is nodata: retain observation
619  if(obsIsNoData){//both model and observation nodata
620  estWriteBuffer[icol]=obsnodata_opt[0];
621  uncertWriteBuffer[icol]=uncertNodata_opt[0];
622  //test
623  gainWriteBuffer[icol]=obsnodata_opt[0];
624  }
625  else{
626  estWriteBuffer[icol]=obsLineBuffer[icol];
627  if(obsmin_opt.size()){
628  if(estWriteBuffer[icol]<obsmin_opt[0])
629  estWriteBuffer[icol]=obsmin_opt[0];
630  }
631  if(obsmax_opt.size()){
632  if(estWriteBuffer[icol]>obsmax_opt[0])
633  estWriteBuffer[icol]=obsmax_opt[0];
634  }
635  uncertWriteBuffer[icol]=uncertObs_opt[0];
636  }
637  }
638  else{//model is valid: calculate estimate from model
639  estWriteBuffer[icol]=modValue;
640  uncertWriteBuffer[icol]=errMod;//in case observation is not valid
641  //test
642  gainWriteBuffer[icol]=0;
643  }
644  //measurement update
645  if(!obsIsNoData){
646  // estWriteBuffer[icol]=estReadBuffer[icol]*modValue1/modValue2
647  double kalmanGain=1;
648  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
649  int maxCol=(icol+down_opt[0]/2<imgReaderObs.nrOfCol()) ? icol+down_opt[0]/2 : imgReaderObs.nrOfCol()-1;
650  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
651  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
652  obsWindowBuffer.clear();
653  for(int iline=0;iline<obsLineVector.size();++iline){
654  for(int isample=minCol;isample<=maxCol;++isample){
655  assert(isample<obsLineVector[iline].size());
656  obsWindowBuffer.push_back(obsLineVector[iline][isample]);
657  }
658  }
659  if(!modelIsNoData){//model is valid
660  statfactory::StatFactory statobs;
661  statobs.setNoDataValues(obsnodata_opt);
662  double obsMeanValue=0;
663  double obsVarValue=0;
664  statobs.meanVar(obsWindowBuffer,obsMeanValue,obsVarValue);
665  double difference=0;
666  difference=obsMeanValue-modValue;
667  // errObs=uncertObs_opt[0]*sqrt(difference*difference);
668  errObs=uncertObs_opt[0]*difference*difference;//uncertainty of the observation (R in Kalman equations)
669  // double errorCovariance=errMod;
670  double errorCovariance=processNoise_opt[0]*obsVarValue;//assumed initial errorCovariance (P in Kalman equations)
671  if(errorCovariance+errObs>eps_opt[0])
672  kalmanGain=errorCovariance/(errorCovariance+errObs);
673  else
674  kalmanGain=1;
675  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
676  if(obsmin_opt.size()){
677  if(estWriteBuffer[icol]<obsmin_opt[0])
678  estWriteBuffer[icol]=obsmin_opt[0];
679  }
680  if(obsmax_opt.size()){
681  if(estWriteBuffer[icol]>obsmax_opt[0])
682  estWriteBuffer[icol]=obsmax_opt[0];
683  if(uncertWriteBuffer[icol]>obsmax_opt[0])
684  uncertWriteBuffer[icol]=obsmax_opt[0];
685  }
686  }
687  assert(kalmanGain<=1);
688  //test
689  gainWriteBuffer[icol]=kalmanGain;
690  }
691  }
692  }
693  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,0);
694  imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,0);
695  //test
696  if(gain_opt.size())
697  imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0);
698  }
699  }
700  if(observation_opt.size()==nobs)
701  imgReaderObs.close();
702  if(observationmask_opt.size()==nobs)
703  imgReaderObsMask.close();
704  ++obsindex;
705  }
706  if(model_opt.size()==nmodel)
707  imgReaderModel1.close();
708  if(modelmask_opt.size()==nmodel)
709  imgReaderModel1Mask.close();
710  imgWriterEst.close();
711  imgWriterUncert.close();
712 
713  ImgUpdaterGdal imgUpdaterEst;
714  ImgUpdaterGdal imgUpdaterUncert;
715  for(int modindex=1;modindex<nmodel;++modindex){
716  imgUpdaterEst.open(outputfw_opt[0]);
717  imgUpdaterEst.setNoData(obsnodata_opt);
718  imgUpdaterUncert.open(uncertfw_opt[0]);
719  if(verbose_opt[0]){
720  cout << "processing time " << tmodel_opt[modindex] << endl;
721  if(obsindex<relobsindex.size())
722  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
723  else
724  cout << "There is no next observation" << endl;
725  }
726 
727  //calculate regression between two subsequence model inputs
728  if(model_opt.size()==nmodel){
729  imgReaderModel1.open(model_opt[modindex-1]);
730  imgReaderModel1.setNoData(modnodata_opt);
731  imgReaderModel2.open(model_opt[modindex]);
732  imgReaderModel2.setNoData(modnodata_opt);
733  }
734  if(modelmask_opt.size()==nmodel){
735  imgReaderModel1Mask.open(modelmask_opt[modindex-1]);
736  imgReaderModel1Mask.setNoData(msknodata_opt);
737  imgReaderModel2Mask.open(modelmask_opt[modindex]);
738  imgReaderModel2Mask.setNoData(msknodata_opt);
739  }
740 
741  pfnProgress(progress,pszMessage,pProgressArg);
742 
743  bool update=false;
744  if(obsindex<relobsindex.size()){
745  update=(relobsindex[obsindex]==modindex);
746  }
747  if(update){
748  if(observation_opt.size()==nobs){
749  if(verbose_opt[0])
750  cout << "***update " << relobsindex[obsindex] << " = " << modindex << " " << observation_opt[obsindex] << " ***" << endl;
751  imgReaderObs.open(observation_opt[obsindex]);
752  imgReaderObs.getGeoTransform(geotransform);
753  imgReaderObs.setNoData(obsnodata_opt);
754  }
755  if(observationmask_opt.size()==nobs){
756  imgReaderObsMask.open(observationmask_opt[obsindex]);
757  imgReaderObsMask.setNoData(msknodata_opt);
758  }
759  }
760  //prediction (also to fill cloudy pixels in measurement update mode)
761  string input;
762  input=outputfw_opt[0];
763 
764  vector< vector<double> > obsLineVector(down_opt[0]);
765  vector<double> obsLineBuffer;
766  vector<double> obsMaskLineBuffer;
767  vector<double> model1MaskLineBuffer;
768  vector<double> model2MaskLineBuffer;
769  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
770  vector<double> model1LineBuffer;
771  vector<double> model2LineBuffer;
772  vector<double> model1buffer;//buffer for model 1 to calculate time regression based on window
773  vector<double> model2buffer;//buffer for model 2 to calculate time regression based on window
774  vector<double> uncertObsLineBuffer;
775  vector< vector<double> > estLineVector(down_opt[0]);
776  vector<double> estLineBuffer;
777  vector<double> estWindowBuffer;//buffer for estimate to calculate average corresponding to model pixel
778  vector<double> uncertReadBuffer;
779  vector<double> estWriteBuffer(ncol);
780  vector<double> uncertWriteBuffer(ncol);
781  //test
782  vector<double> gainWriteBuffer(ncol);
783 
784  int readObsBand=(observation_opt.size()==nobs)? 0:obsindex;
785  int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:obsindex;
786  int readModel1Band=(model_opt.size()==nmodel)? 0:modindex-1;
787  int readModel2Band=(model_opt.size()==nmodel)? 0:modindex;
788  int readModel1MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex-1;
789  int readModel2MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex;
790 
791  //initialize obsLineVector if update
792  if(update){
793  if(verbose_opt[0])
794  cout << "initialize obsLineVector" << endl;
795  assert(down_opt[0]%2);//window size must be odd
796  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
797  if(iline<0)//replicate line 0
798  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,0,readObsBand);
799  else
800  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,iline,readObsBand);
801  }
802  }
803  //initialize estLineVector
804  if(verbose_opt[0])
805  cout << "initialize estLineVector" << endl;
806  assert(down_opt[0]%2);//window size must be odd
807 
808  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
809  if(iline<0)//replicate line 0
810  imgUpdaterEst.readData(estLineVector[iline+down_opt[0]/2],GDT_Float64,0,modindex-1);
811  else
812  imgUpdaterEst.readData(estLineVector[iline+down_opt[0]/2],GDT_Float64,iline,modindex-1);
813  }
814  statfactory::StatFactory statobs;
815  statobs.setNoDataValues(obsnodata_opt);
816  for(int jrow=0;jrow<nrow;jrow+=down_opt[0]){
817  //todo: read entire window for uncertReadBuffer...
818  for(int irow=jrow;irow<jrow+down_opt[0]&&irow<nrow;++irow){
819  imgUpdaterUncert.readData(uncertReadBuffer,GDT_Float64,irow,modindex-1);
820  imgUpdaterUncert.image2geo(0,irow,geox,geoy);
821  if(model_opt.size()==nmodel){
822  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
823  assert(modRow>=0&&modRow<imgReaderModel2.nrOfRow());
824  imgReaderModel2.readData(model2LineBuffer,GDT_Float64,modRow,readModel2Band,theResample);
825  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
826  }
827  else{
828  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
829  imgReaderModel1.readData(model2LineBuffer,GDT_Float64,modRow,readModel2Band,theResample);
830  }
831  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
832  imgReaderModel1.readData(model1LineBuffer,GDT_Float64,modRow,readModel1Band,theResample);
833 
834  if(modelmask_opt.size()){
835  imgReaderModel1Mask.readData(model1MaskLineBuffer,GDT_Float64,modRow,readModel1MaskBand);
836  if(modelmask_opt.size()==nmodel)
837  imgReaderModel2Mask.readData(model2MaskLineBuffer,GDT_Float64,modRow,readModel2MaskBand);
838  else
839  imgReaderModel1Mask.readData(model2MaskLineBuffer,GDT_Float64,modRow,readModel2MaskBand);
840  }
841 
842  int maxRow=(irow+down_opt[0]/2<imgUpdaterEst.nrOfRow()) ? irow+down_opt[0]/2 : imgUpdaterEst.nrOfRow()-1;
843  estLineVector.erase(estLineVector.begin());
844  imgUpdaterEst.readData(estLineBuffer,GDT_Float64,maxRow,modindex-1);
845  estLineVector.push_back(estLineBuffer);
846  estLineBuffer=estLineVector[down_opt[0]/2];
847 
848  if(update){
849  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
850  obsLineVector.erase(obsLineVector.begin());
851  imgReaderObs.readData(obsLineBuffer,GDT_Float64,maxRow,readObsBand);
852  obsLineVector.push_back(obsLineBuffer);
853  obsLineBuffer=obsLineVector[down_opt[0]/2];
854 
855  if(observationmask_opt.size())
856  imgReaderObsMask.readData(obsMaskLineBuffer,GDT_Float64,irow,readObsMaskBand);
857  }
858 
859  for(int jcol=0;jcol<ncol;jcol+=down_opt[0]){
860  for(int icol=jcol;icol<jcol+down_opt[0]&&icol<ncol;++icol){
861  imgUpdaterEst.image2geo(icol,irow,geox,geoy);
862  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
863  int maxCol=(icol+down_opt[0]/2<imgUpdaterEst.nrOfCol()) ? icol+down_opt[0]/2 : imgUpdaterEst.nrOfCol()-1;
864  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
865  int maxRow=(irow+down_opt[0]/2<imgUpdaterEst.nrOfRow()) ? irow+down_opt[0]/2 : imgUpdaterEst.nrOfRow()-1;
866  estWindowBuffer.clear();
867  for(int iline=0;iline<estLineVector.size();++iline){
868  for(int isample=minCol;isample<=maxCol;++isample){
869  assert(isample<estLineVector[iline].size());
870  estWindowBuffer.push_back(estLineVector[iline][isample]);
871  }
872  }
873  if(update){
874  obsWindowBuffer.clear();
875  for(int iline=0;iline<obsLineVector.size();++iline){
876  for(int isample=minCol;isample<=maxCol;++isample){
877  assert(isample<obsLineVector[iline].size());
878  obsWindowBuffer.push_back(obsLineVector[iline][isample]);
879  }
880  }
881  }
882  double estValue=estLineBuffer[icol];
883  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
884  bool model1IsNoData=false;
885  if(modelmask_opt.size())
886  model1IsNoData=imgReaderModel1Mask.isNoData(model1MaskLineBuffer[modCol]);
887  lowerCol=modCol-0.5;
888  lowerCol=static_cast<int>(lowerCol);
889  upperCol=modCol+0.5;
890  upperCol=static_cast<int>(upperCol);
891  if(lowerCol<0)
892  lowerCol=0;
893  if(upperCol>=imgReaderModel1.nrOfCol())
894  upperCol=imgReaderModel1.nrOfCol()-1;
895  double modValue1=(modCol-0.5-lowerCol)*model1LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model1LineBuffer[lowerCol];
896  model1IsNoData=model1IsNoData||imgReaderModel1.isNoData(modValue1);
897  if(model_opt.size()==nmodel)
898  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
899  else
900  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
901  bool model2IsNoData=false;
902  if(modelmask_opt.size())
903  model2IsNoData=imgReaderModel1Mask.isNoData(model2MaskLineBuffer[modCol]);
904  lowerCol=modCol-0.5;
905  lowerCol=static_cast<int>(lowerCol);
906  upperCol=modCol+0.5;
907  upperCol=static_cast<int>(upperCol);
908  if(lowerCol<0)
909  lowerCol=0;
910  if(upperCol>=imgReaderModel1.nrOfCol())
911  upperCol=imgReaderModel1.nrOfCol()-1;
912  double modValue2=(modCol-0.5-lowerCol)*model2LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model2LineBuffer[lowerCol];
913  model2IsNoData=model2IsNoData||imgReaderModel1.isNoData(modValue2);
914  bool obsIsNoData=false;
915  if(observationmask_opt.size())
916  obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]);
917  obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]);
918 
919  if(imgUpdaterEst.isNoData(estValue)){
920  //we have not found any valid data yet, better here to take the current model value if valid
921  if(model2IsNoData){//if both estimate and model are no-data, set obs to nodata
922  estWriteBuffer[icol]=obsnodata_opt[0];
923  uncertWriteBuffer[icol]=uncertNodata_opt[0];
924  //test
925  gainWriteBuffer[icol]=0;
926  }
927  else{
928  estWriteBuffer[icol]=modValue2;
929  uncertWriteBuffer[icol]=uncertModel_opt[0];//*stdDev*stdDev;
930  if(obsmin_opt.size()){
931  if(estWriteBuffer[icol]<obsmin_opt[0])
932  estWriteBuffer[icol]=obsmin_opt[0];
933  }
934  if(obsmax_opt.size()){
935  if(estWriteBuffer[icol]>obsmax_opt[0])
936  estWriteBuffer[icol]=obsmax_opt[0];
937  if(uncertWriteBuffer[icol]>obsmax_opt[0])
938  uncertWriteBuffer[icol]=obsmax_opt[0];
939  }
940  //test
941  gainWriteBuffer[icol]=0;
942  }
943  }
944  else{//previous estimate is valid
945  double estMeanValue=0;
946  double estVarValue=0;
947  statobs.meanVar(estWindowBuffer,estMeanValue,estVarValue);
948  double nvalid=0;
949  //time update
950  double processNoiseVariance=processNoise_opt[0]*estVarValue;
951  //estimate stability of weight distribution from model (low resolution) data in a window mod1 -> mod2 and assume distribution holds at fine spatial resolution.
952 
953  if(model1IsNoData||model2IsNoData){
954  estWriteBuffer[icol]=estValue;
955  // uncertWriteBuffer[icol]=uncertReadBuffer[icol]+processNoiseVariance;
956  //todo: check following line if makes sense
957  uncertWriteBuffer[icol]=uncertReadBuffer[icol]+uncertObs_opt[0];
958  }
959  else{//model is good
960  double modRatio=modValue2/modValue1;//transition matrix A in Kalman equations
961  estWriteBuffer[icol]=estValue*modRatio;
962  uncertWriteBuffer[icol]=uncertReadBuffer[icol]*modRatio*modRatio+processNoiseVariance;
963  }
964  if(obsmin_opt.size()){
965  if(estWriteBuffer[icol]<obsmin_opt[0])
966  estWriteBuffer[icol]=obsmin_opt[0];
967  }
968  if(obsmax_opt.size()){
969  if(estWriteBuffer[icol]>obsmax_opt[0])
970  estWriteBuffer[icol]=obsmax_opt[0];
971  if(uncertWriteBuffer[icol]>obsmax_opt[0])
972  uncertWriteBuffer[icol]=obsmax_opt[0];
973  }
974  }
975  //measurement update
976  if(update&&!obsIsNoData){
977  double kalmanGain=1;
978  if(!model2IsNoData){//model is valid
979  statfactory::StatFactory statobs;
980  statobs.setNoDataValues(obsnodata_opt);
981  double obsMeanValue=0;
982  double obsVarValue=0;
983  double difference=0;
984  statobs.meanVar(obsWindowBuffer,obsMeanValue,obsVarValue);
985  difference=obsMeanValue-modValue2;
986  // errObs=uncertObs_opt[0]*sqrt(difference*difference);
987  errObs=uncertObs_opt[0]*difference*difference;//uncertainty of the observation (R in Kalman equations)
988 
989  if(errObs<eps_opt[0])
990  errObs=eps_opt[0];
991  double errorCovariance=uncertWriteBuffer[icol];//P in Kalman equations
992 
993  if(errorCovariance+errObs>eps_opt[0])
994  kalmanGain=errorCovariance/(errorCovariance+errObs);
995  else
996  kalmanGain=1;
997  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
998  uncertWriteBuffer[icol]*=(1-kalmanGain);
999  if(obsmin_opt.size()){
1000  if(estWriteBuffer[icol]<obsmin_opt[0])
1001  estWriteBuffer[icol]=obsmin_opt[0];
1002  }
1003  if(obsmax_opt.size()){
1004  if(estWriteBuffer[icol]>obsmax_opt[0])
1005  estWriteBuffer[icol]=obsmax_opt[0];
1006  if(uncertWriteBuffer[icol]>obsmax_opt[0])
1007  uncertWriteBuffer[icol]=obsmax_opt[0];
1008  }
1009  }
1010  assert(kalmanGain<=1);
1011  //test
1012  gainWriteBuffer[icol]=kalmanGain;
1013  }
1014  }
1015  }
1016 
1017  //test
1018  if(gain_opt.size())
1019  imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,modindex);
1020  imgUpdaterEst.writeData(estWriteBuffer,GDT_Float64,irow,modindex);
1021  imgUpdaterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,modindex);
1022  progress=static_cast<float>((irow+1.0)/imgUpdaterEst.nrOfRow());
1023  pfnProgress(progress,pszMessage,pProgressArg);
1024  }
1025  }
1026 
1027  //must close writers to ensure flush
1028  imgUpdaterEst.close();
1029  imgUpdaterUncert.close();
1030  // imgWriterEst.close();
1031  // imgReaderEst.close();
1032 
1033  if(update){
1034  if(observation_opt.size()==nobs)
1035  imgReaderObs.close();
1036  if(observationmask_opt.size()==nobs)
1037  imgReaderObsMask.close();
1038  ++obsindex;
1039  }
1040  if(model_opt.size()==nmodel){
1041  imgReaderModel1.close();
1042  imgReaderModel2.close();
1043  }
1044  if(modelmask_opt.size()==nmodel){
1045  imgReaderModel1Mask.close();
1046  imgReaderModel2Mask.close();
1047  }
1048  }
1049  //test
1050  if(gain_opt.size())
1051  imgWriterGain.close();
1052  }
1053  }
1054  catch(string errorString){
1055  cerr << errorString << endl;
1056  exit(1);
1057  }
1058  catch(...){
1059  cerr << "Error in forward direction " << endl;
1060  exit(2);
1061  }
1062  try{
1063  if(find(direction_opt.begin(),direction_opt.end(),"backward")!=direction_opt.end()){
1065  cout << "Running backward model" << endl;
1066  obsindex=relobsindex.size()-1;
1067  if(verbose_opt[0])
1068  cout << "Opening image " << outputbw_opt[0] << " for writing " << endl;
1069 
1070  // imgWriterEst.open(theOutput,ncol,nrow,2,theType,imageType,option_opt);
1071  ImgWriterGdal imgWriterEst;
1072  ImgWriterGdal imgWriterUncert;
1073  imgWriterEst.open(outputbw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt);
1074  imgWriterEst.setProjectionProj4(projection_opt[0]);
1075  imgWriterEst.setGeoTransform(geotransform);
1076  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
1077  imgWriterUncert.open(uncertbw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt);
1078  imgWriterUncert.setProjectionProj4(projection_opt[0]);
1079  imgWriterUncert.setGeoTransform(geotransform);
1080 
1081  try{
1082  // //test
1083  // if(gain_opt.size()){
1084  // imgWriterGain.open(gain_opt[0],ncol,nrow,nmodel,GDT_Float64,imageType,option_opt);
1085  // imgWriterGain.setProjectionProj4(projection_opt[0]);
1086  // imgWriterGain.setGeoTransform(geotransform);
1087  // imgWriterGain.GDALSetNoDataValue(obsnodata_opt[0]);
1088  // }
1089 
1090  if(verbose_opt[0]){
1091  cout << "processing time " << tmodel_opt.back() << endl;
1092  if(obsindex<relobsindex.size()){
1093  assert(tmodel_opt.size()>relobsindex[obsindex]);
1094  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
1095  }
1096  else
1097  cout << "There is no next observation" << endl;
1098  }
1099  if(model_opt.size()==nmodel){
1100  imgReaderModel1.open(model_opt.back());
1101  imgReaderModel1.setNoData(modnodata_opt);
1102  }
1103  if(modelmask_opt.size()==nmodel){
1104  imgReaderModel1Mask.open(modelmask_opt[0]);
1105  imgReaderModel1Mask.setNoData(msknodata_opt);
1106  }
1107  }
1108  catch(string errorString){
1109  cerr << errorString << endl;
1110  }
1111  catch(...){
1112  cerr << "Error opening file " << model_opt[0] << endl;
1113  }
1114 
1115  double modRow=0;
1116  double modCol=0;
1117  double lowerCol=0;
1118  double upperCol=0;
1119  RESAMPLE theResample=BILINEAR;
1120 
1121  if(relobsindex.back()<nmodel-1){//initialize output_opt.back() as last model
1122  //write last model as output
1123  if(verbose_opt[0])
1124  cout << "write last model as output" << endl;
1125  for(int jrow=0;jrow<nrow;jrow+=down_opt[0]){
1126  vector<double> estReadBuffer;
1127  vector<double> lineModelMask;
1128  vector<double> estWriteBuffer(ncol);
1129  vector<double> uncertWriteBuffer(ncol);
1130  // //test
1131  // vector<double> gainWriteBuffer(ncol);
1132  try{
1133  for(int irow=jrow;irow<jrow+down_opt[0]&&irow<nrow;++irow){
1134  imgWriterEst.image2geo(0,irow,geox,geoy);
1135  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1136  if(modRow<0||modRow>=imgReaderModel1.nrOfRow()){
1137  cerr << "Error: geo coordinates (" << geox << "," << geoy << ") not covered in model image " << imgReaderModel1.getFileName() << endl;
1138  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1139  }
1140  // imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow,0,theResample);
1141  int readModelBand=(model_opt.size()==nmodel)? 0:nmodel-1;
1142  int readModelMaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:0;
1143  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow,readModelBand,theResample);
1144  if(modelmask_opt.size())
1145  imgReaderModel1Mask.readData(lineModelMask,GDT_Float64,modRow,readModelMaskBand,theResample);
1146  for(int jcol=0;jcol<ncol;jcol+=down_opt[0]){
1147  for(int icol=jcol;icol<jcol+down_opt[0]&&icol<ncol;++icol){
1148  imgWriterEst.image2geo(icol,irow,geox,geoy);
1149  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1150  if(lineModelMask.size()>modCol){
1151  if(imgReaderModel1Mask.isNoData(lineModelMask[modCol])){
1152  estWriteBuffer[icol]=obsnodata_opt[0];
1153  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1154  //test
1155  // gainWriteBuffer[icol]=obsnodata_opt[0];
1156  continue;
1157  }
1158  }
1159  lowerCol=modCol-0.5;
1160  lowerCol=static_cast<int>(lowerCol);
1161  upperCol=modCol+0.5;
1162  upperCol=static_cast<int>(upperCol);
1163  if(lowerCol<0)
1164  lowerCol=0;
1165  if(upperCol>=imgReaderModel1.nrOfCol())
1166  upperCol=imgReaderModel1.nrOfCol()-1;
1167  double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol];
1168  // double modValue=estReadBuffer[modCol];
1169  if(imgReaderModel1.isNoData(modValue)){
1170  estWriteBuffer[icol]=obsnodata_opt[0];
1171  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1172  //test
1173  // gainWriteBuffer[icol]=obsnodata_opt[0];
1174  continue;
1175  }
1176  estWriteBuffer[icol]=modValue;
1177  if(obsmin_opt.size()){
1178  if(estWriteBuffer[icol]<obsmin_opt[0])
1179  estWriteBuffer[icol]=obsmin_opt[0];
1180  }
1181  if(obsmax_opt.size()){
1182  if(estWriteBuffer[icol]>obsmax_opt[0])
1183  estWriteBuffer[icol]=obsmax_opt[0];
1184  }
1185  uncertWriteBuffer[icol]=uncertModel_opt[0];//*stdDev*stdDev;
1186  //test
1187  // gainWriteBuffer[icol]=0;
1188  }
1189  }
1190  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,nmodel-1);
1191  imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,nmodel-1);
1192  // //test
1193  // if(gain_opt.size())
1194  // imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0);
1195  }
1196  }
1197  catch(string errorString){
1198  cerr << errorString << endl;
1199  }
1200  catch(...){
1201  cerr << "Error writing file " << imgWriterEst.getFileName() << endl;
1202  }
1203  }
1204  }
1205  else{//we have a measurement at end time
1206  if(verbose_opt[0])
1207  cout << "we have a measurement at end time" << endl;
1208  if(observation_opt.size()==nobs){
1209  imgReaderObs.open(observation_opt.back());
1210  imgReaderObs.setNoData(obsnodata_opt);
1211  }
1212  if(observationmask_opt.size()==nobs){
1213  imgReaderObsMask.open(observationmask_opt.back());
1214  imgReaderObsMask.setNoData(msknodata_opt);
1215  }
1216  imgReaderObs.getGeoTransform(geotransform);
1217 
1218  vector< vector<double> > obsLineVector(down_opt[0]);
1219  vector<double> obsLineBuffer;
1220  vector<double> obsMaskLineBuffer;
1221  vector<double> modelMaskLineBuffer;
1222  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
1223  vector<double> estReadBuffer;
1224  vector<double> estWriteBuffer(ncol);
1225  vector<double> uncertWriteBuffer(ncol);
1226  vector<double> uncertObsLineBuffer;
1227  // //test
1228  // vector<double> gainWriteBuffer(ncol);
1229 
1230  if(verbose_opt[0])
1231  cout << "initialize obsLineVector" << endl;
1232  assert(down_opt[0]%2);//window size must be odd
1233  int readObsBand=(observation_opt.size()==nobs)? 0:nobs-1;
1234  int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:nobs-1;
1235  int readModelBand=(model_opt.size()==nmodel)? 0:nmodel-1;
1236  int readModelMaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:nmodel-1;
1237  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
1238  if(iline<0)//replicate line 0
1239  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,0,readObsBand);
1240  else
1241  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,iline,readObsBand);
1242  }
1243  for(int jrow=0;jrow<nrow;jrow+=down_opt[0]){
1244  for(int irow=jrow;irow<jrow+down_opt[0]&&irow<nrow;++irow){
1245  imgWriterEst.image2geo(0,irow,geox,geoy);
1246  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1247  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1248  imgReaderModel1.readData(estReadBuffer,GDT_Float64,modRow,readModelBand,theResample);
1249  if(modelmask_opt.size())
1250  imgReaderModel1Mask.readData(modelMaskLineBuffer,GDT_Float64,modRow,readModelMaskBand);
1251  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
1252  obsLineVector.erase(obsLineVector.begin());
1253  imgReaderObs.readData(obsLineBuffer,GDT_Float64,maxRow,readObsBand);
1254  obsLineVector.push_back(obsLineBuffer);
1255 
1256  if(observationmask_opt.size())
1257  imgReaderObsMask.readData(obsMaskLineBuffer,GDT_Float64,irow,readObsMaskBand);
1258 
1259  for(int jcol=0;jcol<ncol;jcol+=down_opt[0]){
1260  for(int icol=jcol;icol<jcol+down_opt[0]&&icol<ncol;++icol){
1261  imgWriterEst.image2geo(icol,irow,geox,geoy);
1262  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1263  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1264  bool modelIsNoData=false;
1265  if(modelmask_opt.size())
1266  modelIsNoData=imgReaderModel1Mask.isNoData(modelMaskLineBuffer[modCol]);
1267  lowerCol=modCol-0.5;
1268  lowerCol=static_cast<int>(lowerCol);
1269  upperCol=modCol+0.5;
1270  upperCol=static_cast<int>(upperCol);
1271  if(lowerCol<0)
1272  lowerCol=0;
1273  if(upperCol>=imgReaderModel1.nrOfCol())
1274  upperCol=imgReaderModel1.nrOfCol()-1;
1275  double modValue=(modCol-0.5-lowerCol)*estReadBuffer[upperCol]+(1-modCol+0.5+lowerCol)*estReadBuffer[lowerCol];
1276  // double modValue=estReadBuffer[modCol];
1277  double errMod=uncertModel_opt[0];//*stdDev*stdDev;
1278  modelIsNoData=modelIsNoData||imgReaderModel1.isNoData(modValue);
1279  bool obsIsNoData=false;
1280  if(observationmask_opt.size())
1281  obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]);
1282  obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]);
1283  if(modelIsNoData){//model is nodata: retain observation
1284  if(obsIsNoData){//both model and observation nodata
1285  estWriteBuffer[icol]=obsnodata_opt[0];
1286  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1287  //test
1288  // gainWriteBuffer[icol]=obsnodata_opt[0];
1289  }
1290  else{
1291  estWriteBuffer[icol]=obsLineBuffer[icol];
1292  if(obsmin_opt.size()){
1293  if(estWriteBuffer[icol]<obsmin_opt[0])
1294  estWriteBuffer[icol]=obsmin_opt[0];
1295  }
1296  if(obsmax_opt.size()){
1297  if(estWriteBuffer[icol]>obsmax_opt[0])
1298  estWriteBuffer[icol]=obsmax_opt[0];
1299  }
1300  uncertWriteBuffer[icol]=uncertObs_opt[0];
1301  }
1302  }
1303  else{//model is valid: calculate estimate from model
1304  estWriteBuffer[icol]=modValue;
1305  uncertWriteBuffer[icol]=errMod;//in case observation is not valid
1306  //test
1307  // gainWriteBuffer[icol]=0;
1308  }
1309  //measurement update
1310  if(!obsIsNoData){
1311  // estWriteBuffer[icol]=estReadBuffer[icol]*modValue1/modValue2
1312  double kalmanGain=1;
1313  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
1314  int maxCol=(icol+down_opt[0]/2<imgReaderObs.nrOfCol()) ? icol+down_opt[0]/2 : imgReaderObs.nrOfCol()-1;
1315  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
1316  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
1317  obsWindowBuffer.clear();
1318  for(int iline=0;iline<obsLineVector.size();++iline){
1319  for(int isample=minCol;isample<=maxCol;++isample){
1320  assert(isample<obsLineVector[iline].size());
1321  obsWindowBuffer.push_back(obsLineVector[iline][isample]);
1322  }
1323  }
1324  if(!modelIsNoData){//model is valid
1325  statfactory::StatFactory statobs;
1326  statobs.setNoDataValues(obsnodata_opt);
1327  double obsMeanValue=0;
1328  double obsVarValue=0;
1329  statobs.meanVar(obsWindowBuffer,obsMeanValue,obsVarValue);
1330  double difference=0;
1331  difference=obsMeanValue-modValue;
1332  // errObs=uncertObs_opt[0]*sqrt(difference*difference);
1333  errObs=uncertObs_opt[0]*difference*difference;//uncertainty of the observation (R in Kalman equations)
1334  // double errorCovariance=errMod;
1335  double errorCovariance=processNoise_opt[0]*obsVarValue;//assumed initial errorCovariance (P in Kalman equations)
1336  if(errorCovariance+errObs>eps_opt[0])
1337  kalmanGain=errorCovariance/(errorCovariance+errObs);
1338  else
1339  kalmanGain=1;
1340  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
1341  if(obsmin_opt.size()){
1342  if(estWriteBuffer[icol]<obsmin_opt[0])
1343  estWriteBuffer[icol]=obsmin_opt[0];
1344  }
1345  if(obsmax_opt.size()){
1346  if(estWriteBuffer[icol]>obsmax_opt[0])
1347  estWriteBuffer[icol]=obsmax_opt[0];
1348  if(uncertWriteBuffer[icol]>obsmax_opt[0])
1349  uncertWriteBuffer[icol]=obsmax_opt[0];
1350  }
1351  }
1352  assert(kalmanGain<=1);
1353  //test
1354  // gainWriteBuffer[icol]=kalmanGain;
1355  }
1356  }
1357  }
1358  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,nmodel-1);
1359  imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,nmodel-1);
1360  // //test
1361  // if(gain_opt.size())
1362  // imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,0);
1363  }
1364  }
1365  if(observation_opt.size()==nobs)
1366  imgReaderObs.close();
1367  if(observationmask_opt.size()==nobs)
1368  imgReaderObsMask.close();
1369  --obsindex;
1370  }
1371 
1372  if(model_opt.size()==nmodel)
1373  imgReaderModel1.close();
1374  if(modelmask_opt.size()==nmodel)
1375  imgReaderModel1Mask.close();
1376  imgWriterEst.close();
1377  imgWriterUncert.close();
1378 
1379  ImgUpdaterGdal imgUpdaterEst;
1380  ImgUpdaterGdal imgUpdaterUncert;
1381  for(int modindex=nmodel-2;modindex>=0;--modindex){
1382  imgUpdaterEst.open(outputbw_opt[0]);
1383  imgUpdaterEst.setNoData(obsnodata_opt);
1384  imgUpdaterUncert.open(uncertbw_opt[0]);
1385  if(verbose_opt[0]){
1386  cout << "processing time " << tmodel_opt[modindex] << endl;
1387  if(obsindex<relobsindex.size())
1388  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
1389  else
1390  cout << "There is no next observation" << endl;
1391  }
1392 
1393  //calculate regression between two subsequence model inputs
1394  if(model_opt.size()==nmodel){
1395  imgReaderModel1.open(model_opt[modindex+1]);
1396  imgReaderModel1.setNoData(modnodata_opt);
1397  imgReaderModel2.open(model_opt[modindex]);
1398  imgReaderModel2.setNoData(modnodata_opt);
1399  }
1400  if(modelmask_opt.size()==nmodel){
1401  imgReaderModel1Mask.open(modelmask_opt[modindex-1]);
1402  imgReaderModel1Mask.setNoData(msknodata_opt);
1403  imgReaderModel2Mask.open(modelmask_opt[modindex]);
1404  imgReaderModel2Mask.setNoData(msknodata_opt);
1405  }
1406 
1407  pfnProgress(progress,pszMessage,pProgressArg);
1408 
1409  bool update=false;
1410  if(obsindex<relobsindex.size()){
1411  update=(relobsindex[obsindex]==modindex);
1412  }
1413  if(update){
1414  if(observation_opt.size()==nobs){
1415  if(verbose_opt[0])
1416  cout << "***update " << relobsindex[obsindex] << " = " << modindex << " " << observation_opt[obsindex] << " ***" << endl;
1417  imgReaderObs.open(observation_opt[obsindex]);
1418  imgReaderObs.getGeoTransform(geotransform);
1419  imgReaderObs.setNoData(obsnodata_opt);
1420  }
1421  if(observationmask_opt.size()==nobs){
1422  imgReaderObsMask.open(observationmask_opt[obsindex]);
1423  imgReaderObsMask.setNoData(msknodata_opt);
1424  }
1425  }
1426  //prediction (also to fill cloudy pixels in update mode)
1427  string input;
1428  input=outputbw_opt[0];
1429 
1430  vector< vector<double> > obsLineVector(down_opt[0]);
1431  vector<double> obsLineBuffer;
1432  vector<double> obsMaskLineBuffer;
1433  vector<double> model1MaskLineBuffer;
1434  vector<double> model2MaskLineBuffer;
1435  vector<double> obsWindowBuffer;//buffer for observation to calculate average corresponding to model pixel
1436  vector<double> model1LineBuffer;
1437  vector<double> model2LineBuffer;
1438  vector<double> model1buffer;//buffer for model 1 to calculate time regression based on window
1439  vector<double> model2buffer;//buffer for model 2 to calculate time regression based on window
1440  vector<double> uncertObsLineBuffer;
1441  vector< vector<double> > estLineVector(down_opt[0]);
1442  vector<double> estLineBuffer;
1443  vector<double> estWindowBuffer;//buffer for estimate to calculate average corresponding to model pixel
1444  vector<double> uncertReadBuffer;
1445  vector<double> estWriteBuffer(ncol);
1446  vector<double> uncertWriteBuffer(ncol);
1447  //test
1448  // vector<double> gainWriteBuffer(ncol);
1449 
1450  int readObsBand=(observation_opt.size()==nobs)? 0:obsindex;
1451  int readObsMaskBand=(observationmask_opt.size()==nobs)? mskband_opt[0]:obsindex;
1452  int readModel1Band=(model_opt.size()==nmodel)? 0:modindex+1;
1453  int readModel2Band=(model_opt.size()==nmodel)? 0:modindex;
1454  int readModel1MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex+1;
1455  int readModel2MaskBand=(modelmask_opt.size()==nmodel)? mskband_opt[0]:modindex;
1456 
1457  //initialize obsLineVector
1458  if(update){
1459  if(verbose_opt[0])
1460  cout << "initialize obsLineVector" << endl;
1461  assert(down_opt[0]%2);//window size must be odd
1462  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
1463  if(iline<0)//replicate line 0
1464  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,0,readObsBand);
1465  else
1466  imgReaderObs.readData(obsLineVector[iline+down_opt[0]/2],GDT_Float64,iline,readObsBand);
1467  }
1468  }
1469  //initialize estLineVector
1470  if(verbose_opt[0])
1471  cout << "initialize estLineVector" << endl;
1472  assert(down_opt[0]%2);//window size must be odd
1473 
1474  for(int iline=-down_opt[0]/2;iline<down_opt[0]/2+1;++iline){
1475  if(iline<0)//replicate line 0
1476  imgUpdaterEst.readData(estLineVector[iline+down_opt[0]/2],GDT_Float64,0,modindex+1);
1477  else
1478  imgUpdaterEst.readData(estLineVector[iline+down_opt[0]/2],GDT_Float64,iline,modindex+1);
1479  }
1480  statfactory::StatFactory statobs;
1481  statobs.setNoDataValues(obsnodata_opt);
1482 
1483  for(int jrow=0;jrow<nrow;jrow+=down_opt[0]){
1484  //todo: read entire window for uncertReadBuffer...
1485  for(int irow=jrow;irow<jrow+down_opt[0]&&irow<nrow;++irow){
1486  imgUpdaterUncert.readData(uncertReadBuffer,GDT_Float64,irow,modindex+1);
1487  imgUpdaterUncert.image2geo(0,irow,geox,geoy);
1488  if(model_opt.size()==nmodel){
1489  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
1490  assert(modRow>=0&&modRow<imgReaderModel2.nrOfRow());
1491  imgReaderModel2.readData(model2LineBuffer,GDT_Float64,modRow,readModel2Band,theResample);
1492  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1493  }
1494  else{
1495  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1496  imgReaderModel1.readData(model2LineBuffer,GDT_Float64,modRow,readModel2Band,theResample);
1497  }
1498 
1499  assert(modRow>=0&&modRow<imgReaderModel1.nrOfRow());
1500  imgReaderModel1.readData(model1LineBuffer,GDT_Float64,modRow,readModel1Band,theResample);
1501  if(modelmask_opt.size()){
1502  imgReaderModel1Mask.readData(model1MaskLineBuffer,GDT_Float64,modRow,readModel1MaskBand);
1503  if(modelmask_opt.size()==nmodel)
1504  imgReaderModel2Mask.readData(model2MaskLineBuffer,GDT_Float64,modRow,readModel2MaskBand);
1505  else
1506  imgReaderModel1Mask.readData(model2MaskLineBuffer,GDT_Float64,modRow,readModel2MaskBand);
1507  }
1508  int maxRow=(irow+down_opt[0]/2<imgUpdaterEst.nrOfRow()) ? irow+down_opt[0]/2 : imgUpdaterEst.nrOfRow()-1;
1509  estLineVector.erase(estLineVector.begin());
1510  imgUpdaterEst.readData(estLineBuffer,GDT_Float64,maxRow,modindex+1);
1511  estLineVector.push_back(estLineBuffer);
1512  estLineBuffer=estLineVector[down_opt[0]/2];
1513 
1514  if(update){
1515  int maxRow=(irow+down_opt[0]/2<imgReaderObs.nrOfRow()) ? irow+down_opt[0]/2 : imgReaderObs.nrOfRow()-1;
1516  obsLineVector.erase(obsLineVector.begin());
1517  imgReaderObs.readData(obsLineBuffer,GDT_Float64,maxRow,readObsBand);
1518  obsLineVector.push_back(obsLineBuffer);
1519  obsLineBuffer=obsLineVector[down_opt[0]/2];
1520 
1521  if(observationmask_opt.size())
1522  imgReaderObsMask.readData(obsMaskLineBuffer,GDT_Float64,irow,readObsBand);
1523  }
1524  for(int jcol=0;jcol<ncol;jcol+=down_opt[0]){
1525  for(int icol=jcol;icol<jcol+down_opt[0]&&icol<ncol;++icol){
1526  imgUpdaterEst.image2geo(icol,irow,geox,geoy);
1527  int minCol=(icol>down_opt[0]/2) ? icol-down_opt[0]/2 : 0;
1528  int maxCol=(icol+down_opt[0]/2<imgUpdaterEst.nrOfCol()) ? icol+down_opt[0]/2 : imgUpdaterEst.nrOfCol()-1;
1529  int minRow=(irow>down_opt[0]/2) ? irow-down_opt[0]/2 : 0;
1530  int maxRow=(irow+down_opt[0]/2<imgUpdaterEst.nrOfRow()) ? irow+down_opt[0]/2 : imgUpdaterEst.nrOfRow()-1;
1531  estWindowBuffer.clear();
1532  for(int iline=0;iline<estLineVector.size();++iline){
1533  for(int isample=minCol;isample<=maxCol;++isample){
1534  assert(isample<estLineVector[iline].size());
1535  estWindowBuffer.push_back(estLineVector[iline][isample]);
1536  }
1537  }
1538  if(update){
1539  obsWindowBuffer.clear();
1540  for(int iline=0;iline<obsLineVector.size();++iline){
1541  for(int isample=minCol;isample<=maxCol;++isample){
1542  assert(isample<obsLineVector[iline].size());
1543  obsWindowBuffer.push_back(obsLineVector[iline][isample]);
1544  }
1545  }
1546  }
1547 
1548  double estValue=estLineBuffer[icol];
1549  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1550  bool model1IsNoData=false;
1551 
1552  if(modelmask_opt.size())
1553  model1IsNoData=imgReaderModel1Mask.isNoData(model1MaskLineBuffer[modCol]);
1554 
1555  lowerCol=modCol-0.5;
1556  lowerCol=static_cast<int>(lowerCol);
1557  upperCol=modCol+0.5;
1558  upperCol=static_cast<int>(upperCol);
1559  if(lowerCol<0)
1560  lowerCol=0;
1561  if(upperCol>=imgReaderModel1.nrOfCol())
1562  upperCol=imgReaderModel1.nrOfCol()-1;
1563  double modValue1=(modCol-0.5-lowerCol)*model1LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model1LineBuffer[lowerCol];
1564  model1IsNoData=model1IsNoData||imgReaderModel1.isNoData(modValue1);
1565  if(model_opt.size()==nmodel)
1566  imgReaderModel2.geo2image(geox,geoy,modCol,modRow);
1567  else
1568  imgReaderModel1.geo2image(geox,geoy,modCol,modRow);
1569  bool model2IsNoData=false;
1570 
1571  if(modelmask_opt.size())
1572  model2IsNoData=imgReaderModel1Mask.isNoData(model2MaskLineBuffer[modCol]);
1573  lowerCol=modCol-0.5;
1574  lowerCol=static_cast<int>(lowerCol);
1575  upperCol=modCol+0.5;
1576  upperCol=static_cast<int>(upperCol);
1577  if(lowerCol<0)
1578  lowerCol=0;
1579  if(upperCol>=imgReaderModel1.nrOfCol())
1580  upperCol=imgReaderModel1.nrOfCol()-1;
1581  double modValue2=(modCol-0.5-lowerCol)*model2LineBuffer[upperCol]+(1-modCol+0.5+lowerCol)*model2LineBuffer[lowerCol];
1582  model2IsNoData=model2IsNoData||imgReaderModel1.isNoData(modValue2);
1583  bool obsIsNoData=false;
1584  if(observationmask_opt.size())
1585  obsIsNoData=imgReaderObsMask.isNoData(obsMaskLineBuffer[icol]);
1586  obsIsNoData=obsIsNoData||imgReaderObs.isNoData(obsLineBuffer[icol]);
1587 
1588  if(imgUpdaterEst.isNoData(estValue)){
1589  //we have not found any valid data yet, better here to take the current model value if valid
1590  if(model2IsNoData){//if both estimate and model are no-data, set obs to nodata
1591  estWriteBuffer[icol]=obsnodata_opt[0];
1592  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1593  //test
1594  // gainWriteBuffer[icol]=0;
1595  }
1596  else{
1597  estWriteBuffer[icol]=modValue2;
1598  uncertWriteBuffer[icol]=uncertModel_opt[0];//*stdDev*stdDev;
1599  if(obsmin_opt.size()){
1600  if(estWriteBuffer[icol]<obsmin_opt[0])
1601  estWriteBuffer[icol]=obsmin_opt[0];
1602  }
1603  if(obsmax_opt.size()){
1604  if(estWriteBuffer[icol]>obsmax_opt[0])
1605  estWriteBuffer[icol]=obsmax_opt[0];
1606  if(uncertWriteBuffer[icol]>obsmax_opt[0])
1607  uncertWriteBuffer[icol]=obsmax_opt[0];
1608  }
1609  //test
1610  // gainWriteBuffer[icol]=0;
1611  }
1612  }
1613  else{//previous estimate is valid
1614  double estMeanValue=0;
1615  double estVarValue=0;
1616  statobs.meanVar(estWindowBuffer,estMeanValue,estVarValue);
1617  double nvalid=0;
1618  //time update
1619  double processNoiseVariance=processNoise_opt[0]*estVarValue;
1620  //estimate stability of weight distribution from model (low resolution) data in a window mod1 -> mod2 and assume distribution holds at fine spatial resolution.
1621 
1622  if(model1IsNoData||model2IsNoData){
1623  estWriteBuffer[icol]=estValue;
1624  // uncertWriteBuffer[icol]=uncertReadBuffer[icol]+processNoiseVariance;
1625  //todo: check following line if makes sense
1626  uncertWriteBuffer[icol]=uncertReadBuffer[icol]+uncertObs_opt[0];
1627  }
1628  else{//model is good
1629  double modRatio=modValue2/modValue1;//transition matrix A in Kalman equations
1630  estWriteBuffer[icol]=estValue*modRatio;
1631  uncertWriteBuffer[icol]=uncertReadBuffer[icol]*modRatio*modRatio+processNoiseVariance;
1632  }
1633  if(obsmin_opt.size()){
1634  if(estWriteBuffer[icol]<obsmin_opt[0])
1635  estWriteBuffer[icol]=obsmin_opt[0];
1636  }
1637  if(obsmax_opt.size()){
1638  if(estWriteBuffer[icol]>obsmax_opt[0])
1639  estWriteBuffer[icol]=obsmax_opt[0];
1640  if(uncertWriteBuffer[icol]>obsmax_opt[0])
1641  uncertWriteBuffer[icol]=obsmax_opt[0];
1642  }
1643  }
1644  //measurement update
1645  if(update&&!imgReaderObs.isNoData(obsLineBuffer[icol])){
1646  double kalmanGain=1;
1647  if(!imgReaderModel1.isNoData(modValue2)){//model is valid
1648  statfactory::StatFactory statobs;
1649  statobs.setNoDataValues(obsnodata_opt);
1650  double obsMeanValue=0;
1651  double obsVarValue=0;
1652  double difference=0;
1653  statobs.meanVar(obsWindowBuffer,obsMeanValue,obsVarValue);
1654  difference=obsMeanValue-modValue2;
1655  // errObs=uncertObs_opt[0]*sqrt(difference*difference);
1656  errObs=uncertObs_opt[0]*difference*difference;//uncertainty of the observation (R in Kalman equations)
1657 
1658  if(errObs<eps_opt[0])
1659  errObs=eps_opt[0];
1660  double errorCovariance=uncertWriteBuffer[icol];//P in Kalman equations
1661 
1662  if(errorCovariance+errObs>eps_opt[0])
1663  kalmanGain=errorCovariance/(errorCovariance+errObs);
1664  else
1665  kalmanGain=1;
1666  estWriteBuffer[icol]+=kalmanGain*(obsLineBuffer[icol]-estWriteBuffer[icol]);
1667  uncertWriteBuffer[icol]*=(1-kalmanGain);
1668  if(obsmin_opt.size()){
1669  if(estWriteBuffer[icol]<obsmin_opt[0])
1670  estWriteBuffer[icol]=obsmin_opt[0];
1671  }
1672  if(obsmax_opt.size()){
1673  if(estWriteBuffer[icol]>obsmax_opt[0])
1674  estWriteBuffer[icol]=obsmax_opt[0];
1675  if(uncertWriteBuffer[icol]>obsmax_opt[0])
1676  uncertWriteBuffer[icol]=obsmax_opt[0];
1677  }
1678  }
1679  assert(kalmanGain<=1);
1680  //test
1681  // gainWriteBuffer[icol]=kalmanGain;
1682  }
1683  }
1684  }
1685  // //test
1686  // if(gain_opt.size())
1687  // imgWriterGain.writeData(gainWriteBuffer,GDT_Float64,irow,modindex);
1688  imgUpdaterEst.writeData(estWriteBuffer,GDT_Float64,irow,modindex);
1689  imgUpdaterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,modindex);
1690  progress=static_cast<float>((irow+1.0)/imgUpdaterEst.nrOfRow());
1691  pfnProgress(progress,pszMessage,pProgressArg);
1692  }
1693  }
1694  //must close writers to ensure flush
1695  imgUpdaterEst.close();
1696  imgUpdaterUncert.close();
1697  // imgWriterEst.close();
1698  // imgReaderEst.close();
1699 
1700  if(update){
1701  if(observation_opt.size()==nobs)
1702  imgReaderObs.close();
1703  if(observationmask_opt.size()==nobs)
1704  imgReaderObsMask.close();
1705  --obsindex;
1706  }
1707  if(model_opt.size()==nmodel){
1708  imgReaderModel1.close();
1709  imgReaderModel2.close();
1710  }
1711  if(modelmask_opt.size()==nmodel){
1712  imgReaderModel1Mask.close();
1713  imgReaderModel2Mask.close();
1714  }
1715  }
1716  // //test
1717  // if(gain_opt.size())
1718  // imgWriterGain.close();
1719  }
1720  }
1721  catch(string errorString){
1722  cerr << errorString << endl;
1723  exit(1);
1724  }
1725  catch(...){
1726  cerr << "Error in backward direction " << endl;
1727  exit(2);
1728  }
1729  if(find(direction_opt.begin(),direction_opt.end(),"smooth")!=direction_opt.end()){
1731  cout << "Running smooth model" << endl;
1732  obsindex=0;
1733 
1734  ImgReaderGdal imgReaderForward(outputfw_opt[0]);
1735  ImgReaderGdal imgReaderBackward(outputbw_opt[0]);
1736  ImgReaderGdal imgReaderForwardUncert(uncertfw_opt[0]);
1737  ImgReaderGdal imgReaderBackwardUncert(uncertbw_opt[0]);
1738  imgReaderForward.setNoData(obsnodata_opt);
1739  imgReaderBackward.setNoData(obsnodata_opt);
1740 
1741  assert(imgReaderForward.nrOfBand()==nmodel);
1742  assert(imgReaderForwardUncert.nrOfBand()==nmodel);
1743  assert(imgReaderBackward.nrOfBand()==nmodel);
1744  assert(imgReaderBackwardUncert.nrOfBand()==nmodel);
1745  ImgWriterGdal imgWriterEst;
1746  imgWriterEst.setNoData(obsnodata_opt);
1747  ImgWriterGdal imgWriterUncert;
1748  imgWriterEst.open(outputfb_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt);
1749  imgWriterEst.setProjectionProj4(projection_opt[0]);
1750  imgWriterEst.setGeoTransform(geotransform);
1751  imgWriterEst.GDALSetNoDataValue(obsnodata_opt[0]);
1752 
1753  imgWriterUncert.open(uncertfb_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt);
1754  imgWriterUncert.setProjectionProj4(projection_opt[0]);
1755  imgWriterUncert.setGeoTransform(geotransform);
1756  for(int modindex=0;modindex<nmodel;++modindex){
1757  if(verbose_opt[0]){
1758  cout << "processing time " << tmodel_opt[modindex] << endl;
1759  if(obsindex<relobsindex.size())
1760  cout << "next observation " << tmodel_opt[relobsindex[obsindex]] << endl;
1761  else
1762  cout << "There is no next observation" << endl;
1763  }
1764  // if(outputfb_opt.size()==model_opt.size())
1765  // theOutput=outputfb_opt[modindex];
1766  // else{
1767  // ostringstream outputstream;
1768  // outputstream << outputfb_opt[0] << "_";
1769  // outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1770  // outputstream << ".tif";
1771  // // outputstream << outputfb_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1772  // theOutput=outputstream.str();
1773  // }
1774 
1775  //two band output band0=estimation, band1=uncertainty
1776 
1777  //open forward and backward estimates
1778  //we assume forward in model and backward in observation...
1779 
1780  // string inputfw;
1781  // string inputbw;
1782  // if(outputfw_opt.size()==model_opt.size())
1783  // inputfw=outputfw_opt[modindex];
1784  // else{
1785  // ostringstream outputstream;
1786  // outputstream << outputfw_opt[0] << "_";
1787  // outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1788  // outputstream << ".tif";
1789  // // outputstream << outputfw_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1790  // inputfw=outputstream.str();
1791  // }
1792  // if(outputbw_opt.size()==model_opt.size())
1793  // inputbw=outputbw_opt[modindex];
1794  // else{
1795  // ostringstream outputstream;
1796  // outputstream << outputbw_opt[0] << "_";
1797  // outputstream << setfill('0') << setw(ndigit) << tmodel_opt[modindex];
1798  // outputstream << ".tif";
1799  // // outputstream << outputbw_opt[0] << "_" << tmodel_opt[modindex] << ".tif";
1800  // inputbw=outputstream.str();
1801  // }
1802  vector<double> estForwardBuffer;
1803  vector<double> estBackwardBuffer;
1804  vector<double> uncertObsLineBuffer;
1805  vector<double> uncertForwardBuffer;
1806  vector<double> uncertBackwardBuffer;
1807  vector<double> uncertReadBuffer;
1808  vector<double> estWriteBuffer(ncol);
1809  vector<double> uncertWriteBuffer(ncol);
1810  // vector<double> lineMask;
1811 
1812  bool update=false;
1813  if(obsindex<relobsindex.size()){
1814  update=(relobsindex[obsindex]==modindex);
1815  }
1816 
1817  int readObsBand=(observation_opt.size()==nobs)? 0:obsindex;
1818 
1819  if(update){
1820  if(observation_opt.size()==nobs){
1821  if(verbose_opt[0])
1822  cout << "***update " << relobsindex[obsindex] << " = " << modindex << " " << observation_opt[obsindex] << " ***" << endl;
1823  imgReaderObs.open(observation_opt[obsindex]);
1824  imgReaderObs.setNoData(obsnodata_opt);
1825  imgReaderObs.getGeoTransform(geotransform);
1826  }
1827  if(observationmask_opt.size()==nobs){
1828  imgReaderObsMask.open(observationmask_opt[obsindex]);
1829  imgReaderObsMask.setNoData(msknodata_opt);
1830  }
1831  // imgReaderObs.open(observation_opt[obsindex]);
1832  // imgReaderObs.getGeoTransform(geotransform);
1833  // imgReaderObs.setNoData(obsnodata_opt);
1834  //calculate regression between model and observation
1835  }
1836 
1837  pfnProgress(progress,pszMessage,pProgressArg);
1838 
1839  for(int irow=0;irow<imgWriterEst.nrOfRow();++irow){
1840  assert(irow<imgReaderForward.nrOfRow());
1841  assert(irow<imgReaderBackward.nrOfRow());
1842  imgReaderForward.readData(estForwardBuffer,GDT_Float64,irow,modindex);
1843  imgReaderBackward.readData(estBackwardBuffer,GDT_Float64,irow,modindex);
1844  imgReaderForwardUncert.readData(uncertForwardBuffer,GDT_Float64,irow,modindex);
1845  imgReaderBackwardUncert.readData(uncertBackwardBuffer,GDT_Float64,irow,modindex);
1846  // imgReaderForward.readData(estForwardBuffer,GDT_Float64,irow,0);
1847  // imgReaderBackward.readData(estBackwardBuffer,GDT_Float64,irow,0);
1848  // imgReaderForward.readData(uncertForwardBuffer,GDT_Float64,irow,1);
1849  // imgReaderBackward.readData(uncertBackwardBuffer,GDT_Float64,irow,1);
1850 
1851  if(update){
1852  if(observation_opt.size()==nobs)
1853  imgReaderObs.readData(estWriteBuffer,GDT_Float64,irow,readObsBand);
1854  if(observationmask_opt.size())
1855  imgReaderObsMask.readData(uncertObsLineBuffer,GDT_Float64,irow,readObsBand);
1856  }
1857 
1858  // double oldRowMask=-1;//keep track of row mask to optimize number of line readings
1859  for(int icol=0;icol<imgWriterEst.nrOfCol();++icol){
1860  imgWriterEst.image2geo(icol,irow,geox,geoy);
1861  double A=estForwardBuffer[icol];
1862  double B=estBackwardBuffer[icol];
1863  double C=uncertForwardBuffer[icol];
1864  double D=uncertBackwardBuffer[icol];
1865  double uncertObs=uncertObs_opt[0];
1866 
1867  // if(update){//check for nodata in observation
1868  // if(imgReaderObs.isNoData(estWriteBuffer[icol]))
1869  // uncertObs=uncertNodata_opt[0];
1870  // else if(uncertObsLineBuffer.size()>icol)
1871  // uncertObs=uncertObsLineBuffer[icol];
1872  // }
1873 
1874  double noemer=(C+D);
1875  //todo: consistently check for division by zero...
1876  if(imgReaderForward.isNoData(A)&&imgReaderBackward.isNoData(B)){
1877  estWriteBuffer[icol]=obsnodata_opt[0];
1878  uncertWriteBuffer[icol]=uncertNodata_opt[0];
1879  }
1880  else if(imgReaderForward.isNoData(A)){
1881  estWriteBuffer[icol]=B;
1882  uncertWriteBuffer[icol]=uncertBackwardBuffer[icol];
1883  }
1884  else if(imgReaderForward.isNoData(B)){
1885  estWriteBuffer[icol]=A;
1886  uncertWriteBuffer[icol]=uncertForwardBuffer[icol];
1887  }
1888  else{
1889  if(noemer<eps_opt[0]){//simple average if both uncertainties are ~>0
1890  estWriteBuffer[icol]=0.5*(A+B);
1891  uncertWriteBuffer[icol]=eps_opt[0];
1892  }
1893  else{
1894  estWriteBuffer[icol]=(A*D+B*C)/noemer;
1895  uncertWriteBuffer[icol]=C*D/noemer;
1896  if(obsmin_opt.size()){
1897  if(estWriteBuffer[icol]<obsmin_opt[0])
1898  estWriteBuffer[icol]=obsmin_opt[0];
1899  }
1900  if(obsmax_opt.size()){
1901  if(estWriteBuffer[icol]>obsmax_opt[0])
1902  estWriteBuffer[icol]=obsmax_opt[0];
1903  if(uncertWriteBuffer[icol]>obsmax_opt[0])
1904  uncertWriteBuffer[icol]=obsmax_opt[0];
1905  }
1906  // double P=0;
1907  // if(C>eps_opt[0])
1908  // P+=1.0/C;
1909  // if(D>eps_opt[0])
1910  // P+=1.0/D;
1911  // if(P>eps_opt[0])
1912  // P=1.0/P;
1913  // else
1914  // P=0;
1915  // uncertWriteBuffer[icol]=P;
1916  }
1917  }
1918  }
1919  imgWriterEst.writeData(estWriteBuffer,GDT_Float64,irow,modindex);
1920  imgWriterUncert.writeData(uncertWriteBuffer,GDT_Float64,irow,modindex);
1921  progress=static_cast<float>((irow+1.0)/imgWriterEst.nrOfRow());
1922  pfnProgress(progress,pszMessage,pProgressArg);
1923  }
1924  if(update){
1925  if(observation_opt.size()==nobs)
1926  imgReaderObs.close();
1927  ++obsindex;
1928  }
1929  }
1930  imgReaderForward.close();
1931  imgReaderBackward.close();
1932  imgWriterEst.close();
1933  imgWriterUncert.close();
1934  }
1935  if(observation_opt.size()<nobs)
1936  imgReaderObs.close();
1937  if(model_opt.size()<nmodel)
1938  imgReaderModel1.close();
1939  // if(mask_opt.size())
1940  // maskReader.close();
1941 }
1942 
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem-members.html0000644000113200011300000002037012647637662026022 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkfilterdem.pkfilterdem Member List
pktools-2.6.6/doc/html/pkcreatect_8cc_source.html0000644000113200011300000010374612647637661017021 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkcreatect.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcreatect.cc
1 /**********************************************************************
2 pkcreatect.cc: program to create and import colour table to GTiff image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include "imageclasses/ImgReaderGdal.h"
22 #include "imageclasses/ImgWriterGdal.h"
23 #include "base/Optionpk.h"
24 
25 /******************************************************************************/
71 using namespace std;
72 
73 int main(int argc,char **argv) {
74 
75  short red=-1;
76  short green=-1;
77  short blue=-1;
78 
79  Optionpk<string> input_opt("i", "input", "Input image file");
80  Optionpk<string> output_opt("o", "output", "Output image file");
81  Optionpk<string> legend_opt("l", "legend", "Create legend as png file");
82  Optionpk<short> dim_opt("dim", "dim", "number of columns and rows in legend.", 100);
83  Optionpk<double> min_opt("min", "min", "minimum value", 0);
84  Optionpk<double> max_opt("max", "max", "maximum value", 100);
85  Optionpk<bool> grey_opt("g", "grey", "grey scale", false);
86  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
87  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).", "GTiff");
88  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
89  Optionpk<string> description_opt("d", "description", "Set image description");
90  Optionpk<bool> verbose_opt("v", "verbose", "verbose", false,2);
91 
92  legend_opt.setHide(1);
93  dim_opt.setHide(1);
94 
95  bool doProcess;//stop process when program was invoked with help option (-h --help)
96  try{
97  doProcess=input_opt.retrieveOption(argc,argv);
98  output_opt.retrieveOption(argc,argv);
99  legend_opt.retrieveOption(argc,argv);
100  dim_opt.retrieveOption(argc,argv);
101  min_opt.retrieveOption(argc,argv);
102  max_opt.retrieveOption(argc,argv);
103  grey_opt.retrieveOption(argc,argv);
104  colorTable_opt.retrieveOption(argc,argv);
105  description_opt.retrieveOption(argc,argv);
106  oformat_opt.retrieveOption(argc,argv);
107  option_opt.retrieveOption(argc,argv);
108  verbose_opt.retrieveOption(argc,argv);
109  }
110  catch(string predefinedString){
111  std::cout << predefinedString << std::endl;
112  exit(0);
113  }
114  if(!doProcess){
115  cout << endl;
116  cout << "Usage: pkcreatect -i input.txt -o output [-ct colortable | -min value -max value]" << endl;
117  cout << endl;
118  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
119  exit(0);//help was invoked, stop processing
120  }
121 
122  GDALColorTable colorTable;
123  GDALColorEntry sEntry;
124  if(colorTable_opt.empty()){
125  sEntry.c4=255;
126  for(int i=min_opt[0];i<=max_opt[0];++i){
127  if(grey_opt[0]){
128  sEntry.c1=255*(i-min_opt[0])/(max_opt[0]-min_opt[0]);
129  sEntry.c2=255*(i-min_opt[0])/(max_opt[0]-min_opt[0]);
130  sEntry.c3=255*(i-min_opt[0])/(max_opt[0]-min_opt[0]);
131  }
132  else{//hot to cold colour ramp
133  sEntry.c1=255;
134  sEntry.c2=255;
135  sEntry.c3=255;
136  double delta=max_opt[0]-min_opt[0];
137  if(i<(min_opt[0]+0.25*delta)){
138  sEntry.c1=0;
139  sEntry.c2=255*4*(i-min_opt[0])/delta;
140  }
141  else if(i<(min_opt[0]+0.5*delta)){
142  sEntry.c1=0;
143  sEntry.c3=255*(1+4*(min_opt[0]+0.25*delta-i)/delta);
144  }
145  else if(i<(min_opt[0]+0.75*delta)){
146  sEntry.c1=255*4*(i-min_opt[0]-0.5*delta)/delta;
147  sEntry.c3=0;
148  }
149  else{
150  sEntry.c2=255*(1+4*(min_opt[0]+0.75*delta-i)/delta);
151  sEntry.c3=0;
152  }
153  }
154  colorTable.SetColorEntry(i,&sEntry);
155  if(output_opt.empty())
156  cout << i << " " << sEntry.c1 << " " << sEntry.c2 << " " << sEntry.c3 << " " << sEntry.c4 << endl;
157  }
158  }
159  ImgWriterGdal legendWriter;
160  short ncol=dim_opt[0];
161  short nrow;
162  if(legend_opt.size()){
163  if(dim_opt.size()>1)
164  nrow=dim_opt[1];
165  else{
166  nrow=max_opt[0]-min_opt[0]+1;
167  ncol=dim_opt[0];
168  }
169  vector<string> pngOption;
170  // pngOption.push_back("-co worldfile=no");
171  pngOption.push_back("");
172  legendWriter.open(legend_opt[0],ncol,nrow,1,GDT_Byte,oformat_opt[0],option_opt);
173  if(colorTable_opt.size()){
174  if(colorTable_opt[0]!="none")
175  legendWriter.setColorTable(colorTable_opt[0]);
176  }
177  else
178  legendWriter.setColorTable(&colorTable);
179  if(legend_opt.size()){
180  for(int irow=0;irow<legendWriter.nrOfRow();++irow){
181  vector<char> buffer(legendWriter.nrOfCol());
182  for(int icol=0;icol<legendWriter.nrOfCol();++icol)
183  buffer[icol]=min_opt[0]+irow*static_cast<short>(max_opt[0]-min_opt[0]+1)/legendWriter.nrOfRow();
184  legendWriter.writeData(buffer,GDT_Byte,legendWriter.nrOfRow()-1-irow);
185  }
186  }
187  }
188 
189  // const char* pszMessage;
190  // void* pProgressArg=NULL;
191  // GDALProgressFunc pfnProgress=GDALTermProgress;
192  // double progress=0;
193  // pfnProgress(progress,pszMessage,pProgressArg);
194  if(input_opt.size()&&output_opt.size()){
195  ImgReaderGdal imgReader(input_opt[0]);
196  ImgWriterGdal imgWriter;
197  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
198  string theInterleave="INTERLEAVE=";
199  theInterleave+=imgReader.getInterleave();
200  option_opt.push_back(theInterleave);
201  }
202 
203  imgWriter.open(output_opt[0],imgReader.nrOfCol(),imgReader.nrOfRow(),1,GDT_Byte,oformat_opt[0],option_opt);
204 
205  imgWriter.copyGeoTransform(imgReader);
206  if(colorTable_opt.size()){
207  if(colorTable_opt[0]!="none")
208  imgWriter.setColorTable(colorTable_opt[0]);
209  }
210  else
211  imgWriter.setColorTable(&colorTable);
212  if(description_opt.size())
213  imgWriter.setImageDescription(description_opt[0]);
214  switch(imgReader.getDataType()){
215  case(GDT_Byte):{
216  vector<char> buffer;
217  for(int irow=0;irow<imgReader.nrOfRow();++irow){
218  imgReader.readData(buffer,GDT_Byte,irow);
219  imgWriter.writeData(buffer,GDT_Byte,irow);
220  }
221  break;
222  }
223  case(GDT_Int16):{
224  vector<short> buffer;
225  cout << "Warning: copying short to unsigned short without conversion, use gdal_translate -scale if needed..." << endl;
226  for(int irow=0;irow<imgReader.nrOfRow();++irow){
227  imgReader.readData(buffer,GDT_Int16,irow,0);
228  imgWriter.writeData(buffer,GDT_Int16,irow,0);
229  }
230  break;
231  }
232  case(GDT_UInt16):{
233  vector<unsigned short> buffer;
234  for(int irow=0;irow<imgReader.nrOfRow();++irow){
235  imgReader.readData(buffer,GDT_UInt16,irow,0);
236  imgWriter.writeData(buffer,GDT_UInt16,irow,0);
237  }
238  break;
239  }
240  default:
241  cerr << "data type " << imgReader.getDataType() << " not supported for adding a colortable" << endl;
242  break;
243  }
244  imgReader.close();
245  imgWriter.close();
246  }
247  if(legend_opt.size())
248  legendWriter.close();
249 }
250 
pktools-2.6.6/doc/html/build-pkcomposite__gui-gcc-Debug_2moc__mainwindow_8cpp_source.html0000644000113200011300000005435412647637661026617 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Debug/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkcomposite_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  13, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  42, 11, 11, 11, 0x08,
35  75, 11, 11, 11, 0x08,
36  108, 11, 11, 11, 0x08,
37  142, 11, 11, 11, 0x08,
38  168, 11, 11, 11, 0x08,
39  199, 11, 11, 11, 0x08,
40  227, 11, 11, 11, 0x08,
41  268, 11, 11, 11, 0x08,
42  297, 11, 11, 11, 0x08,
43  324, 11, 11, 11, 0x08,
44  355, 11, 11, 11, 0x08,
45  383, 11, 11, 11, 0x08,
46 
47  0 // eod
48 };
49 
50 static const char qt_meta_stringdata_MainWindow[] = {
51  "MainWindow\0\0on_toolButton_input_clicked()\0"
52  "on_toolButton_defaults_clicked()\0"
53  "on_actionInput_image_triggered()\0"
54  "on_actionOutput_image_triggered()\0"
55  "on_actionQuit_triggered()\0"
56  "on_toolButton_output_clicked()\0"
57  "on_toolButton_Run_clicked()\0"
58  "on_actionSelection_Info_file_triggered()\0"
59  "on_toolButton_file_clicked()\0"
60  "on_toolButton_ct_clicked()\0"
61  "on_toolButton_extent_clicked()\0"
62  "on_actionExtent_triggered()\0"
63  "deleteItemInput()\0"
64 };
65 
66 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
67 {
68  if (_c == QMetaObject::InvokeMetaMethod) {
69  Q_ASSERT(staticMetaObject.cast(_o));
70  MainWindow *_t = static_cast<MainWindow *>(_o);
71  switch (_id) {
72  case 0: _t->on_toolButton_input_clicked(); break;
73  case 1: _t->on_toolButton_defaults_clicked(); break;
74  case 2: _t->on_actionInput_image_triggered(); break;
75  case 3: _t->on_actionOutput_image_triggered(); break;
76  case 4: _t->on_actionQuit_triggered(); break;
77  case 5: _t->on_toolButton_output_clicked(); break;
78  case 6: _t->on_toolButton_Run_clicked(); break;
79  case 7: _t->on_actionSelection_Info_file_triggered(); break;
80  case 8: _t->on_toolButton_file_clicked(); break;
81  case 9: _t->on_toolButton_ct_clicked(); break;
82  case 10: _t->on_toolButton_extent_clicked(); break;
83  case 11: _t->on_actionExtent_triggered(); break;
84  case 12: _t->deleteItemInput(); break;
85  default: ;
86  }
87  }
88  Q_UNUSED(_a);
89 }
90 
91 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
92  0, qt_static_metacall
93 };
94 
95 const QMetaObject MainWindow::staticMetaObject = {
96  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
97  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
98 };
99 
100 #ifdef Q_NO_DATA_RELOCATION
101 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
102 #endif //Q_NO_DATA_RELOCATION
103 
104 const QMetaObject *MainWindow::metaObject() const
105 {
106  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
107 }
108 
109 void *MainWindow::qt_metacast(const char *_clname)
110 {
111  if (!_clname) return 0;
112  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
113  return static_cast<void*>(const_cast< MainWindow*>(this));
114  return QMainWindow::qt_metacast(_clname);
115 }
116 
117 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
118 {
119  _id = QMainWindow::qt_metacall(_c, _id, _a);
120  if (_id < 0)
121  return _id;
122  if (_c == QMetaObject::InvokeMetaMethod) {
123  if (_id < 13)
124  qt_static_metacall(this, _c, _id, _a);
125  _id -= 13;
126  }
127  return _id;
128 }
129 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/inherit_graph_16.map0000644000113200011300000000031212616110570015457 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img.html0000644000113200011300000003136612647637662021273 00000000000000 pktools: qgis.pklas2img.pklas2img Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pklas2img.pklas2img:
Collaboration diagram for qgis.pklas2img.pklas2img:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list ATTRIBUTE_OPTIONS = ["z","intensity", "return", "nreturn"]
 
list COMPOSITE_OPTIONS = ["last", "min", "max", "median", "mean", "sum", "first", "profile" "percentile", "height", "values", "percentile", "number"]
 
list FILTER_OPTIONS = ["all","first","last","single","multiple"]
 
string ATTRIBUTE = "ATTRIBUTE"
 
string COMPOSITE = "COMPOSITE"
 
string FILTER = "FILTER"
 
string PERCENTILE = "PERCENTILE"
 
string DX = "DX"
 
string DY = "DY"
 
string NODATA = "NODATA"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 39 of file pklas2img.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract__grid_1_1pkextract__grid__coll__graph.png0000644000113200011300000001033512616110567030372 00000000000000‰PNG  IHDR €õLbKGDÿÿÿ ½§“’IDATxœíkPWÇÏB€T1Ô!â„A´C‡éÔ·S«eo¨µ(— Öz£¶Á©U„±J!\ÄJ‰¢ÜŠ7bí”K` b•›Ž B1 $Ù}?œ·ûnD 7Xö÷i÷Ùsž}öüÙ³ËþÁ0 P=]@¡Y(I%0É¡&94U:766ö÷÷««Ša™6mšÝ¸»«$p{{;ƒÁ022R% …ÚÛÛu&0ÀÂÂÂÌÌLÅ$#ÑÕÕÕÐРJêLr(I%0É¡&9:¸©© Am¦úî»ï‰ŽŽVW #uG¤©©iÜi5ÁD9ƒ[ZZ˜L¦&2c–••eiiÉãñÔ•óí·ß š,[]LQ}ñâ…&2×××ß¿?55µ¶¶öáÇjÉÉd2á| ¹²Õ…f†SY^^ÞÂ… ÍÌÌöïß?00€oÅ0,88ØÉÉéùóçK—.Ì™3nêééñ÷÷g2™ÁÁÁ‰d¤ NAAÁ»ï¾K§ÓmllÒÓÓñxVVÖòåËW­Zeoo?ô$Æ0,11ÑÁÁÁ`¬\¹ò·ß~ƒsïÐ}Ác)..¶´´¼xñ"l¦P6àÖ­[,kæÌ™QQQ0‚ È… -Z4kÖ¬èèèôôtkkk“°°0µ ´0àóùJ466\]]>|X^^Îb±"""`EQ\]¼%ÞÑÇÇÇÅÅ¥¹¹¹®®nñâÅÃñ^}}}FFF‰‰‰©©©4­¯¯Ã0E­­­¹\.†aGutt$†aXrr²¹¹ù7„BaQQ‹Å‚ñ‘öåîî^RRR[[ ›)” X»v­H$ºrå `Û¶m"‘(%%ðé§ŸŠD".—‹7PBgg'ŸÏ³0´!p]]\åñx, CBB< ¶„˃ƒƒúúúýõ\½zõ*‹Å6ˆ÷êîî600ˆ‰‰yùò%Š¢½½½r¹ðòòrDZººP__OÜÝâÅ‹ùå¼àÌÌL€’}ÁcÁ»øöíÛ†Éår@cc# x\ ˰TX×`üQª½½}[[\®¬¬\±bEddäÐör¹ÜÖÖ®²X¬¶¶¶aƒx—™3gòùüòòr ‹åË—ÿñÇzzz€¬¬,™LÆd2qvv(ÌÒÍÍÍ‹/ÆWF*?å;oÞ<Ü;ÎŒ3 ËZ@ÃsÀÇáñ ³²²ø|¾BûÙ³gëëë·´´ÀÕææfssóaƒx±XŒ¢èåË—»»»wîܹnݺîîn¹\Îãñbcc{ÿ!((ˆÇãa„·”¬¬¬îÝ»‡¯Þ¿¤àò…Q×o€jC•Ó”S4›Ínll¬¨¨°³³;vìqZ _°`X,†ÁÞÞ^÷öövqqiii©¯¯wttŸ¯¯¯O¬°ªª ðŽçγ°°¸yóæóçÏ‹‹‹.\ˆ ˆò}aC¦h¼l@˜uaŠTX‰Éq NII±²²b2™ûöíõ„ Äbñ‚ ÂÃÃ¥RéG}dll ãÝÝÝ~~~¦¦¦sçÎ=tèX,6HLÅãñlmm íííóòò0 ãp8®®®ÄzPµµµ Å;Êåò¸¸8[[[77·¼¼¼Y³f½q_ø²BÙST`Uv¡i jkkñÕììl'''Ö£Àä¸ÉšÈÔÕÕùúú ‚þþþòòò°°°€€]¥NT5ü•Ã`08ŽFw¡"!!!ýýýžžžB¡ÐÆÆfÇŽ¼à±‚`*¼ø~ûömêÍßèX±bŸ3Lõ)šôP“J`’C LrT½‹îéé‘Édj)E ôõ Œ u]ÈhéëëS1ƒJ=}úTÅ ´Itt)‚ ¡¡ÿÑu!c€N§«Ò]¥_“&Ïž½rv>Ž @ 8nf6C×åh‰)t ¾~½NOAPXX«ëZ´Ç8+«EQ<^…®kÑSEàÖVa}}† CëêÚZ[…º®HKLóòjh4x°¦—Ÿ?Ufé©"0W!“¡pY&C§Î,=%¾w¯ýñã½½üèÑó††Éô Þ¸™çä ô‰ýœ®êÑ&äE±Ë—+¥R91(•Ê/_®œ ÏÈ/pUU«PØ;4ÞÕ%ªªz¤õr´ ù:?C ôssÉ?K“\`©Tž“S­0?ã›®^~™ ¹À••­"‘D__FÓ§Ñô!ÿ,ë½z%&ý,Mr³A$’äç×à«e_ßÿ»Ië׿Ç`¨d×LpH.°ÎO.÷s]¢=H>ESP“J`’C Lr(I%0É¡&9”À$‡˜äP“J`’C Lr(I%0É¡&9”À$‡˜äP“J`’C Lr(I%0É¡&9”À$‡˜äP“J`’C Lr(I%0É¡&9”À$‡˜äüë/üKJJ&Ú'èÕËåËí€-[ÌߨròbggÇf³ÿ¿Nü ¦Ùïdé=½izzÓt]…f¡ÑhDMÿu#®Êg˜(tËíÛ·?NÔ”º“J`’C Lr(Iަnooÿ×ͺv»OÌJt‚¦666Þ¶m›zsvttlذA½95ê5«˜AS›˜˜ìÞ½[½9Q‰DêÍ©iT¯YÅ c𜜜Ï?ÿÜÃÃcïÞ½555l6ðüü|ÿ5kÖ•••±ÙlâÌVZZºsçNWWWooï[·n)ä„-ïÞ½ëçç·qãÆsçÎI¥Râ^½zõÅ_6mÚ7õõõEGGoذaË–- ƒƒƒ#qÔU @&“%&&nܸqãÆ‰‰‰2™¬´´ô“O>éííûùùI$bÍ0¿@ ðòòª¯¯/++Ûµk—››ÛæÍ›333r¹<--ÍËËËÓÓ3** ~¸Pá¨ÇÊØ.,,üùçŸÒÓÓ?û쳨¨(Àµk×ÒÓÓ÷îÝ›™™éããOì"‘H"""<==³²²üüüN:%‘H†fÎÍÍŠŠŠŒŒüóÏ?áÑ0 ãr¹ 66ÖÄÄäÇ\½zn={ö¬P(LLLüþûï+++ýõב‚j¯ÝÑÑÁårÏœ9#ÒÒÒ>üðCggçøøø—/_ÆÇÇ=z”N§+Ô ¸téÒ‘#GÌÍÍ;fgg—‘‘±gÏžäääžžžììì;wîDEEÅÅÅ=yò$##04Ø›ÀW®\ \¶l™©©é|€ßÿ}ggçíÛ·»H¥R ÃÄb±¡¡¡››[AA‘‘ÑÐÌ{öì±°°X´hQ@@@QQ &%%ñx¼ððpƒ¡Ð^&“•””ìÛ·oîܹ666Û·o/**6¨¡J®_¿~àÀ333‡SQQØ·oŸ@ Þ°aƒ½½ý°c¸{÷î÷Þ{Á`¤¦¦îß¿ßÔÔÔÌÌ ðúõëÂÂÂ;vØØØX[[‡††:::¾Y’716;::X,¾jccxúô©µµ5|çwˆ]f̘×ÐаeË–ƒÖÕÕ!24³……\°´´ ÿ÷Y²899Ád^¾|‰¢è¼yóહ¹¹P(6¨¡Jž={¶yóf6›Íf³ƒƒƒ;::ÆÆÆk×®}ôè‘’Û"KKKFkkk Ù½{÷7à¦ÎÎN|ïVVVË–-)Éè›ÀL&³¹¹_}ôè`öìÙ­­­xðñãÇÄ.(ŠFDDxxx|óÍ7ð*¥@[[\xò䉩©)\ŽŒŒ *))©©©Qh?sæL===8¬€§OŸ2™ÌaƒªÄÄÄ$##ƒÏçóùü‚‚8‘vuuåää8;;ÃÕaŽÎÀÀ@DDÄÖ­[“’’<7™šš>{ö .755 û“=VÆ&°»»{BBÂÝ»w»»»+**’’’žžž\.·ªªJ$ÕÔÔ\¼x‘xf røðá;wî¼~ýZ*•Òh481¾~ýovþüùööö¿ÿþ;%%eõêÕ0H§ÓçÏŸïíí‹ß.‰ÅbFc³Ù?üðCGGGkkkjjêªU«† j¨’eË–%''wvv¶´´„„„äææbvêÔ©M›6………UWW—––â9aÍD¤R©L&£Ñhƒƒƒiii€þþ~WW×”””ÖÖÖÖÖÖ³gÏvvv*É0JÆæzyyÉåòøøøžžxí9qâ„§§§\.‹‹{õê•££c``àéÓ§ñ.†††_ý5—Ëíêêš7o^xx¸¡¡! &&ÆÉÉiúôé°ÙªU«¾úê+‰DââââããCœZ½½½‹‹‹333ýüü–,Y²yóæk×®8pþüùÀÀ@ƒ•+Wúøø ÄS©±ÿ;wž?~×®]‚|üñÇ'77·§§gÛ¶m4íСC±±±K–,™3g±fccã={öœ8qâ­·Þòöövqq ¹té’D"9|ø°D"Yºt)‡ÃŒ”a”¨d¶··ûúúFFFš™™ÙÚÚÂà;wÒÓÓ“““Ç”„Ïç¥l0q*7± [ZZNž<ÙØØ800ÐÐÐpáÂ…5kÖ¨ž–B-¨áŽ­[·J$’o¿ý¶§§gîܹîîîëÖ­}÷éÓ§©½æ˜8•¨êRA½Ñ1åÐ¥À#9q£tè&»‘TÑ K5a)Žy@+# K5a)Žy@+# A•؈Ð2»q㜈P…‡‡Ç—_~yÿþ}…T“ÔÈS㌠¾émÄ 455ÅÅÅá› e†;3W®\áñxAAAMMMÄaD ‘×ÛÛ{òäIƒC<˜7ò 7œ––¶k×®ßÿ=>>žÃáÄÇÇGFFB#Ï××wX#ÏËËkõêÕQQQµµµ'Ožôðð¸yó&4ò9}útFFF``àÐ šq Á3X‰-3:ýŸýÌÏÏ'º#ÍZ“ÎÈSûŒ žÁJlDh™á…¡.äP”yGŽhäá½àCfhäýôÓOgΜ©`¢‘#‹íììà&#ÏÊÊJÙ‘ÿƒÚG`hð Vb#*üÔœ9s†ºC™tFžÚG`hP`å6"‘õë×]È .Àød7òTÕÑà­ÜFTh)•J^¼xakkoP'»‘§ú¨ŽŸE—••©b#™¤FžG`”hõY4e#N„PÏ=ÒƒS__ßqÛˆD&¾‘§é7”]H*(»pÊA Lr(I%0ÉQ¼‹®®®†^ÅdäÁƒŠ!âÿTŸ§SL^æÏŸ?âÿÉ¢ Ô5˜äP“J`’C Lr(IÎj# á/zŸvIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_45.png0000644000113200011300000000416412647437044015515 00000000000000‰PNG  IHDR(%~Œã$bKGDÿÿÿ ½§“)IDATxœí›kLYÇÏ´¥‹P )PZB€B#–…H@n&š˜H1ê Qé‡]1jBÔ`Dº‹¯®(Ô£mYJÃJë‹VÌÀ Bð²( (­\RJ‹g?ÌnSÛR&ÜÆ}{~áܧgžyzþü;ç̃±¾Ð¨.pEñ @ÆC ( †uchhH,ÏÍÍQUÍÿ=îîîÁÁÁTò7HñõA$eeeYG¾2^kkkCCƒP(\ߪ\¹\ž““óí)¾à8.“Éœ@&“­WI.†aT—à¤øš’mDk<‚ñ @ÆC ( €åÃ0Fã0¢Ñhœ_?À0ŒÏçÛ< ºwï^ûœœç‹Å;wî´4¯]»†aØÀÀÑÆ0¬¹¹yÉÂÈÑY‰â‰îˆU>ãy{{Ÿ={ÖyŸÁÁÁîînKS§Ó©Õêeçܽ{wWW—Á` š*•ŠF£)•J¢‰ã8“ÉŒ‹‹#SØ7BOÏØÕ«Šúú.ª !ÉE¢Û°ÊÆóóó+--uÞ'--M.—[šOž~üHd˜ššb2™¹¹¹###ÕÕÕ€‰‰ 뜀¬¬,NWUUøôé„ðÔ©Sû÷D"“ÉäííãøÜÜ“Éljj²)Ì>Iyy9›Í®­­U(‡è|äÈ‘ÔÔÔ·oßnÙ²åâÅ‹—/_ÎÌÌ„Ö××oܸ166BØÑÑáîî>;;Kfè¤R)„pbbªªêeZš$0ð'ï4‡“ø“õ_NNÕ’ÙVÎê*®×뫪ªì·]\t¡P( m‡tídp²¯X,>wî„°ºº:==Ý7===333 /_¾$‚6Ã×ÜÜ !œŸŸ·ôñãÇl6ûË—/±±±r¹BxàÀK—.á8N§Ó§§§¡6I"""îÝ»g)òþýû€ùùy:þþý{"X[[ÞÑÑÁb±æçç Ο?ïææ¦Óé$IFFÆ’ã!Ä0æ?Þüþûÿås¹\®­ßþÕÆs¾»ËŠîÐx#yžt¸M¡Pxüøñ+W®ØL9˜Lf__߉'fffÃ}‰_&777K$))ibb¢½½½»»;99°gÏžxyymß¾Åb-™dxxxÛ¶m–O·nÝ _XX #‚ááá###ÀÓÓ³½½]­VߺuK¥R©ÕêæææÌÌL2_ÜÏï°L¦ý§ålÜÚÚ´N>™œ+„Áð#Óm…ŠÝ!Ë1^pp°F£áóùD³§§‡Á`ðx<ò¦§§[ZZ”JåíÛ·-qƒÁ-“ÉöíÛg4ïÞ½k¿/f». ˆŒŒ,))‰‰‰ñõõ¤§§‹Åb‹µØ Þ&IHHHwwwLL ÑüðáÀßߟN§kµÚÍ›7‚‚‚h4ZFFF}}}___lllJJŠR©T«Õ•••d¾øÔÔSRNüùçg³yFÃÌæ/‹õäóÙ"Ñn29WŽã¥¥ÓKv[¹âÀ…EwŒõéäÄ£¸¸8,,ìéÓ§Z­V¥R ‚ÜÜ\â#’SMa^^^TTTrr²u\§ÓaÖØØ8;;[TTèìì´™0Xæ<ÖÛ"‘PTTd9ñ_¢P(ì ³OrãÆ 6›]WW766ÖØØJt>|øpjjªV«}÷î]tttqq1„P.—³X,b²¤T*Y,Vttô’ƒf9œT*5MMMïóò„„r8ù\nÁ7>Õ$©¸“5ž+‹¾jk<“ÉTVVéîîzáÂË“¼ñ^¼x¨¨¨°‰———ûøøðx¼ÊÊÊC‡±Ùl2>¾µµ•è<99™““ãë똟Ÿo0 „z½žÁ`”””@ggg™L¦µöÎÿ\\!øüÙ “ýï‡îp¹AAùAAùߦñH*¾Ø¶‹‹îÐx´š¯Ëd²ƒÂeÍàdÀ0L*•Ú¿'2:ª¯«ë¬©éèíûî;†ÑhNK‹þí·ãk]R| ä¶y÷j™W« ‡ã——’——Òß?^W×)—wp¹>T…XCÖÊx‹ÝFG?®ÎáóýÏœÙ{æÌ^ª A¬-ke pktools: FANN::training_data Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
FANN::training_data Class Reference

Public Member Functions

 training_data (const training_data &data)
 
void destroy_train ()
 
bool read_train_from_file (const std::string &filename)
 
bool save_train (const std::string &filename)
 
bool save_train_to_fixed (const std::string &filename, unsigned int decimal_point)
 
void shuffle_train_data ()
 
void merge_train_data (const training_data &data)
 
unsigned int length_train_data ()
 
unsigned int num_input_train_data ()
 
unsigned int num_output_train_data ()
 
fann_type ** get_input ()
 
fann_type ** get_output ()
 
void set_train_data (unsigned int num_data, unsigned int num_input, fann_type **input, unsigned int num_output, fann_type **output)
 
void set_train_data (const std::vector< std::vector< fann_type > > &input, const std::vector< std::vector< fann_type > > &output)
 
void set_train_data (const std::vector< std::vector< std::vector< fann_type > > > &input, unsigned int num_data)
 
void set_train_data (const std::vector< Vector2d< fann_type > > &input, unsigned int num_data)
 
void create_train_from_callback (unsigned int num_data, unsigned int num_input, unsigned int num_output, void(FANN_API *user_function)(unsigned int, unsigned int, unsigned int, fann_type *, fann_type *))
 
void scale_input_train_data (fann_type new_min, fann_type new_max)
 
void scale_output_train_data (fann_type new_min, fann_type new_max)
 
void scale_train_data (fann_type new_min, fann_type new_max)
 
void subset_train_data (unsigned int pos, unsigned int length)
 

Protected Attributes

struct fann_train_data * train_data
 

Friends

class neural_net
 

Detailed Description

Definition at line 362 of file myfann_cpp.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/structdecision__function-members.html0000644000113200011300000000675612647637662021321 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
decision_function Member List

This is the complete list of members for decision_function, including all inherited members.

alpha (defined in decision_function)decision_function
rho (defined in decision_function)decision_function
pktools-2.6.6/doc/html/classfilter2d_1_1Filter2d.html0000644000113200011300000007214212647637662017350 00000000000000 pktools: filter2d::Filter2d Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Public Member Functions

 Filter2d (const Vector2d< double > &taps)
 
void setTaps (const Vector2d< double > &taps)
 
void pushClass (short theClass=1)
 
int pushNoDataValue (double noDataValue=0)
 
void pushThreshold (double theThreshold)
 
void setThresholds (const std::vector< double > &theThresholds)
 
void setClasses (const std::vector< short > &theClasses)
 
void filter (const ImgReaderGdal &input, ImgWriterGdal &output, bool absolute=false, bool normalize=false, bool noData=false)
 
void smooth (const ImgReaderGdal &input, ImgWriterGdal &output, int dim)
 
void smooth (const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY)
 
void smoothNoData (const ImgReaderGdal &input, ImgWriterGdal &output, int dim)
 
void smoothNoData (const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY)
 
template<class T1 , class T2 >
void filter (const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector)
 
template<class T1 , class T2 >
void smooth (const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector, int dim)
 
template<class T1 , class T2 >
void smooth (const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector, int dimX, int dimY)
 
void dwtForward (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family)
 
void dwtInverse (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family)
 
void dwtCut (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, double cut, bool verbose=false)
 
template<class T >
void dwtForward (Vector2d< T > &data, const std::string &wavelet_type, int family)
 
template<class T >
void dwtInverse (Vector2d< T > &data, const std::string &wavelet_type, int family)
 
template<class T >
void dwtCut (Vector2d< T > &data, const std::string &wavelet_type, int family, double cut)
 
void majorVoting (const std::string &inputFilename, const std::string &outputFilename, int dim=0, const std::vector< int > &prior=std::vector< int >())
 
void doit (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim, short down=1, bool disc=false)
 
void doit (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dimX, int dimY, short down=1, bool disc=false)
 
void mrf (const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY, double beta, bool eightConnectivity=true, short down=1, bool verbose=false)
 
void mrf (const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY, Vector2d< double > beta, bool eightConnectivity=true, short down=1, bool verbose=false)
 
template<class T1 , class T2 >
void doit (const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector, const std::string &method, int dimX, int dimY, short down=1, bool disc=false)
 
void median (const std::string &inputFilename, const std::string &outputFilename, int dim, bool disc=false)
 
void var (const std::string &inputFilename, const std::string &outputFilename, int dim, bool disc=false)
 
void morphology (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dimX, int dimY, const std::vector< double > &angle, bool disc=false)
 
template<class T >
unsigned long int morphology (const Vector2d< T > &input, Vector2d< T > &output, const std::string &method, int dimX, int dimY, bool disc=false, double hThreshold=0)
 
template<class T >
unsigned long int dsm2dtm_nwse (const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3)
 
template<class T >
unsigned long int dsm2dtm_nesw (const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3)
 
template<class T >
unsigned long int dsm2dtm_senw (const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3)
 
template<class T >
unsigned long int dsm2dtm_swne (const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3)
 
template<class T >
void shadowDsm (const Vector2d< T > &input, Vector2d< T > &output, double sza, double saa, double pixelSize, short shadowFlag=1)
 
void shadowDsm (const ImgReaderGdal &input, ImgWriterGdal &output, double sza, double saa, double pixelSize, short shadowFlag=1)
 
void dwt_texture (const std::string &inputFilename, const std::string &outputFilename, int dim, int scale, int down=1, int iband=0, bool verbose=false)
 
void shift (const ImgReaderGdal &input, ImgWriterGdal &output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=BILINEAR, bool verbose=false)
 
template<class T >
void shift (const Vector2d< T > &input, Vector2d< T > &output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=NEAR, bool verbose=false)
 
void linearFeature (const Vector2d< float > &input, std::vector< Vector2d< float > > &output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, bool verbose=false)
 
void linearFeature (const ImgReaderGdal &input, ImgWriterGdal &output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, int band=0, bool verbose=false)
 

Static Public Member Functions

static FILTER_TYPE getFilterType (const std::string filterType)
 
static const RESAMPLE getResampleType (const std::string resampleType)
 

Detailed Description

Definition at line 65 of file Filter2d.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/classKernel__coll__graph.png0000644000113200011300000000403712616110567017311 00000000000000‰PNG  IHDRMpÔj”bKGDÿÿÿ ½§“ÔIDATxœíœmLYÇo[,µm‚ZhHSD‘ Á ‰l¢@¿¨0TbÔ%`m0øÉjCLM­¦Š}²›&,>ËÛú¸²”mXcWPÃk¡¶½ûaܱÛR¤tw‡ù} ½çÎ=çü{ÏLo§Ã¥AÁ*€þ­ J'¹X-:ügΜyõêÕ·J_X,–R© …h“æ}½¥Ñh©©©àå†'ƒA§Ó9rm†ùt—••a}ÿih4šwsµœŸ”NrAé Ììì¬L&KLLär¹)))—.]Bí¢Ñhñññ>kf‰DB£Ñ†‡‡ƒŠ2<<ìs- … uÎÌÌìܹ³»»[¡PôööÊår­V›‘‘1??022200€?11a6›qh³ÙÖ¯_ïoŒŒ<þ|°ézÐétpQ***ÒÒÒÁ,‡cãÆ*• õ••UYY‰õj4‰D°Z­ :´Z­>ià‚– çS«ÕVUU1 ÌÂápd2Ù½{÷Ðfnn®^¯‡—®Ñh<|ø0vpsssRR›Íæóù …šš ˆ‰‰×j{{»P(Ôh4hÝ>~ü866vbbP__¿yóæÙÙÙ•O4Øû÷ï}ì]]]QQQ¨‡ÁÁÁ˜˜˜¾¾>áää$›Íþðá:ŸÓÓÓL&³¸¸øÍ›7Z­ðîÝ;ïùD_K$’§OŸö÷÷cö¢¢¢ÑÑÑèèèîîîȩïzh)ø_ „túçÒ`0999z½~ÇŽÍÍÍ»wï^·nÚ>00 Ö®]‹®.§¦¦üý_¾|9!!ÁûºUWW—‘‘QZZš’’²Œœƒ«ÛÈÈȘ˜ôö¦¿¿ëÖ­X377×`0@}Š–Éd eee%''k4š@Q¼]aqKJJ^¾|YZZTÂ_ªn!„åååéééØu(??ÿþýûB¡P©T¢¬V+‚ ÑÑÑf³™ÃáŒaö¹¹¹ðððÆÆFÇãt:Q£Ýú¿~ýú5ÇËÌÌ¿Åøý–»(o€òùß76ötµÜO t’ J'¹ t’ J'¹ t’ J'¹ t’ J'¹ t’ J'¹ t’ J'¹ t’ J'¹ t’ J'Éô°Åba2™+1<\H§³WÂó¹sçÉ ø|‚Ýnw»Ýè»ý'0 ###z¿òÆÞ½{ñÍfåxöìÙ"½«åü¤t’ JçÒ‹Åv»kÞ¹sçàÁƒ6›-D·ÞØív±X¢<Ÿ{ÓétF£±¶¶V$áèpÓÙØØx÷îÝšššøøx¼|â>çgkk«Z­V(Þ[ ¢R©²³³³³³U*‚ höööæåå½xñB,·µµ8pàÁƒFá’!:;;;¯^½±iÓ&o»Ñh|ûö­Z­®©©éíí½}û6j×ëõr¹v‹Å¢T*¥R©Z­F÷4*DpЩÓéêêêX,–Z­ö¶·´´œ={–Çã‰D"©TúüùsÔ^RR’””Äb±‡âr¹™™™€éééEF…çguuõ¶mÛärù©S§ÒÒÒ’““QûèèhNNv‡ÃA_`{êЇÂ¾¤hTˆà ÝRgË–-W®\¹uëš\DDĵk×bcc‡c||üsH/Uþ[Â"x® 9ŽR©D›iii7oÞ³Ùl2™ìÑ£GKq²¼Q_OkÖ¬‘ËåOž<éîî?~œÍfŸ pktools: pkdumpogr
pktools  2.6.6
Processing Kernel for geospatial data
pkdumpogr

dump ogr file to text file or standard output

SYNOPSIS

Usage: pkdumpogr -i input [-o output]

Options: [-ln layername] [-n attribute]* [-pos] [-transpose]

Advanced options:

Description

The utility pkdumpogr dumps the content of a vector dataset to (standard) output (screen or filename). The default is to dump all the attributes. Individual attributes can be selected with the option -n. The X and Y positions can be printed with the option -pos. Use the option -transpose to transpose the output (only in combination with the option -n attribute).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input shape file
    ln lname std::string Layer name(s) in sample (leave empty to select all)
    o output std::string Output ASCII file
    n name std::string ALL names of the attributes to select. Each attribute is stored in a separate band. Default is ALL: write all attributes
    pos pos bool false include position (x and y)
    t transpose bool false transpose output (does not work for -n ALL
    fs fs char field separator.
    Usage: pkdumpogr -i input. [-o output]

Examples

Some examples how to use pkdumpogr can be found here

pktools-2.6.6/doc/html/inherit_graph_4.map0000644000113200011300000000035012616110570015376 00000000000000 pktools-2.6.6/doc/html/classFileReaderLas__coll__graph.map0000644000113200011300000000116712616110567020525 00000000000000 pktools-2.6.6/doc/html/pkregann.html0000644000113200011300000001367012647637662014361 00000000000000 pktools: pkregann
pktools  2.6.6
Processing Kernel for geospatial data
pkregann

regression with artificial neural network (multi-layer perceptron)

SYNOPSIS

Usage: pkregann -i input -t training [-ic col]* [-oc col]* -o output

Options: [-from row] [-to row] [-cv size] [-nn number]

Advanced options: [–offset value] [–scale value] [–connection rate] [–learning rate] [–maxit number]

Description

The utility pkregann performs a regression based on an artificial neural network. The regression is trained from the input (-ic) and output (-oc) columns in a training text file. Each row in the training file represents one sampling unit. Multi-dimensional input features can be defined with multiple input options (e.g., -ic 0 -ic 1 -ic 2 for three dimensional features).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input ASCII file
    t training std::string training ASCII file (each row represents one sampling unit. Input features should be provided as columns, followed by output)
    ic inputCols int input columns (e.g., for three dimensional input data in first three columns use: -ic 0 -ic 1 -ic 2
    oc outputCols int output columns (e.g., for two dimensional output in columns 3 and 4 (starting from 0) use: -oc 3 -oc 4
    o output std::string output ASCII file for result
    from from double 0 start from this row in training file (start from 0)
    to to double 0 read until this row in training file (start from 0 or set leave 0 as default to read until end of file)
    cv cv unsigned short 0 n-fold cross validation mode
    nn nneuron unsigned int 5 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)
    offset double 0 offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]
    scale double 0 scale value for each spectral band input features: refl=(DN[band]-offset[band])/scaleband
    connection float 1 connection reate (default: 1.0 for a fully connected network)
    l learning float 0.7 learning rate (default: 0.7)
    maxit unsigned int 500 number of maximum iterations (epoch) (default: 500)
    Usage: pkregann -i input -t training [-ic col]* [-oc col]* -o output
pktools-2.6.6/doc/html/classONE__CLASS__Q__coll__graph.png0000644000113200011300000001075412616110567020220 00000000000000‰PNG  IHDR€»­ƒ–¥bKGDÿÿÿ ½§“¡IDATxœí{PSGßÇ¿áf¡Z`D#úŠí â…ŠwŽc‹†Q±Ð± ¥ÏÔ™ZÛNaÛz£Zk½Mb™$¶µõa¤¥Vä"r}¤’7xÑ  ¹dß?|‰Í“@‚`Nâîg&3²»g÷·›»{ÎINx„µØqƒ[˜”à&å8pÑèÉ“'qäÈ.š¶Z¢££±råJ‹·Ëãâ, ,, yyy ²tÓVIÏXH¥R‹·ÍÉ €³[#aaaœµÍö”à&å0(Ǧxøð!âââàïï¡C‡"00_}õºººtex<¼½½aìäféÒ¥àñxP*•ŠC©T‚Çã ¨kÁfhkkôiÓŸŸ;v ¸¸[¶lAzz:/^Œîîn]Ùëׯ£´´TïøææfäææšÕ–J¥‚@ è5ŸÏç#>>þÙ:be،۶mÈ# —˱téRLœ8¡¡¡(((@MM ¾ÿþ{]ÙÈd2½ãOŸ>yóæ™Õ–V«Å½{÷zÍرcdzuÄʰÒÓÓ‘{{{½ô—_~qqq8qâ„.M,C*•ê-'Ož4¸Ò–™™‰€€¸¸¸@(êÞÔ3fFŽ à锟““‘H„””Ýpúôixzz¢¹¹‘‘‰'âáǃ<Ï Âb±˜ˆÅb³Ë777¤©©Éh~^^qss#„€TUU‘‘#G’+W®B¹ÿ>qqq!wïÞ%Huu5imm%NNNdݺu¤¶¶–¤§§äÎ;¤ººšüshzþ^ºt)‘Ë夤¤D/?""‚DFF’††âááAòóóŸëx &œ] |zÛxB`g÷t2³··ÇŠ+ •J1yòddffbÖ¬YxõÕWue† ‚ÒÒRŒ3ÎÎÎ3f  ¥¥¥×öwîÜ ???ƒMä7ß|???,^¼111 H7-ŠM,|>#GŽDII‰Ñü’’øøøè¥‰ÅbÈd2BŒNÿNNN¸ví–,Y‚©S§"%%ÅdÿÝÆ?㋊ŠBee%bbbÌ딕`@xx8’’’ôvû«W¯FFFvìØÕ«W땟={6ÚÚÚpáÂdggã­·ÞÒËoooGXXbccQ\\ŒƒšŒÁÑÑÑhú­[·pàÀ„„„àã?~†Þq‡Í€††,Z´YYY¸víÆ5kÖ@£Ñ`ýúõzå{–èèhÂÝÝ]/ÿñãÇèè耓“ÚÛÛ‘˜˜àÉéf<0—V«Åºuëðá‡"##çÏŸÇo¿ý6=¶ 6#À+¯¼‚Ë—/cÊ”)ؼy3üýý!‘HðÙgŸÁ××Ç„……áêÕ«Fï³óù|$''#<<>>>ðòòÂêÕ«±dÉxyyaöìÙ …&ã:xð šššWWW:tÑÑѺ³k‡³Ï´ÛÁ(..Ö¾Ùƒ=ýÁff€¾prr²Ù7Ÿk^Ï€r˜”à&å0(‡³›A*• Gåªy«B¥Raüøñœ´Í‰cÆŒL&Ctt4Íëpq™xô¨ŒÓ8`þüùœ´ËÉ•@k »[ ÿ'×ÿËʶÁÎîÅøŒ_¡v—§„Zýjõ\¼8°‰Ú2Ô “ÁÁÁŽŽvÉ ¹‡3¨@£éÄ™3¥èêêFg§gΔB£éä:,N R¹üªÞ®ÑtB.¿ÊaDÜA¥?ýT¤÷ùB‡Ÿ~*â0"î N€ÖV Οÿº»µº´în-ΟÿZ[5FÆ Ô ðï—C«5<óÕj ²²Ê9ˆˆ[¨àäÉ"»òñäÓÃô-T ÐÔÔ†‹«¡Õj ò´Z‚‹«ÑÔÔfäȪÈÌ,éóŠÇCffi¯ù/"T •]ÿ{ÐjµÔ]¢F€ººf”•Ý2!PZz ·oß·`dÜbSß wï>À¨Q|½õ¿çbÐK/=ýÆîÞmèQ|‹ÇÈÔÞ €èèTÀ‘#‘GÂÔ, ã0(‡ @9LÊaP€r˜”à&å0(‡ @9LÊaP€r˜”à&å0(‡ @9LÊaP€r˜”à&å0(‡ @9LÊaP€r˜”à&åXÍBƇëׯ[´M «ë®EÛ7nT*•EÛì «€Çãá£>BPPסæybÓ{©TŠ3f %%AAA EHHˆ.ÿúõë …zÇ >\÷o½¼Q£FõÒMÕcËØôàåå˜6mâãã±nÝ:´´´èòª««A!ÍÍ͸té’.ÿ¿ßh;;ãÃaª[Ʀø'Ÿþ9†ŽM›6éÒBCCñÉ'ŸàÆ(++Ã’%KðÝwßõ»îÁªÇya2dRRR––†³g϶oߎaÆ! ,€¿¿?vîÜÙﺫ«„Û-ÈSÐÏM ­bm›Àf`<LÊaP€r˜”à&åXÕ÷üüüàááa±6 áýÛ–‚ÆÆF”——[ÍÇíæfЦM›pëÖ-‹¶YUå€ÀǧÙbmºººbÑ¢EkÏV3Xšû÷ÁÏïsðx’’’ðÅ_`úôéfÕC\.‡»»; …û÷ïGcc#¶mÛ†#FàæÍ›Ø¿?ÚÚÚ°qãF³ËôEÏØòù|DEEÁÓÓS7¶—/_Æž={tcû¬ x HKKŸÏÇ×_ÀÀ@Œ=sæÌÁáÇÑÐЀsçÎéÊ.[¶ ûöíƒZ­î³N>Ÿ777ƒ—9?~ˆ…¯¯/ÆŽ‹°°0„††B"‘˜Ý¯ššܼyqqqP*•¨­­ÕË¿pá6lØoooðù|Lš4 7nÄ_ýÕ¯2}Ñ3¶{÷îÅo¼¡7¶õõõ8sæŒÙýé ˆˆ_zé%¬Zµ ÙÙÙº4±X ‘H„äääçöÓ©¹¹¹X±b…Azdd$âââÌ®G.—ÃßßS§N…H$‚\.×ËwqqÁ©S§ÐÚÚªK›4i’ždæ”é Sc{þüy³ûÓàÁƒP«Õ˜0a‚Ñü &àæÍ§OÞ¶³³Ã–-[pùòedeeõZ¯F£A{{»ÁËÜxD"‘Až³³3ÜÝÝÍèÕÓéáÂ'—ž;w®Áþ#66ÅÅÅX¹r%bcc!‘HÐØØØï2¦úÒÛØz{{£¦¦Æ¬ºúâ¹>-œÇãA«Õê¥=QQQøöÛo1eʣǭ_¿Þhº©M`ϬòÏMæ³PUU…;wî`îܹžžžŽššŒ70mÚ4H$üý÷ß(,,DVVŽ=ŠO?ýT'Ž9eLÑ[_!^ÿÎC‡…››[¯7”J%&NœhþöÛoÃÛÛ»wï6º¤§§C¡P¼L1lØ0¸ººâÆyUUUxÿý÷ñøñc“õÈårtwwcùòåFTT€§j4Ý’àë니ˆ;v k×®ÅáÇÍ.Ó挭±™®¿ X¡¤¥¥üO×h4ÈÈÈ@`` Á1<ñññ¨¨¨@ffæ@CÐcÖ¬YH$begg£«« C† éóx­V …B>øgÏžÕ½Äb1 ! „`ûöíP©Tz}š>}ºî÷Í)c cc›””„œœüøãfÏ"}1`"##ÑÜÜŒM›6¡  µµµøóÏ?@€åË—=N("&&R©Ô ïþýûP«Õ/sxï½÷PZZŠ/¿ü•••P©THMMÅÏ?ÿl°´k§¬¬ ÍÍÍX´hœu¯ÔÖÖB©TÂÙÙ‹/ÆÖ­[qéÒ%Ô××£²²‡Ò½)æ”1glÕj56oÞŒÂÂBÔÖÖB(bûöíèèèÀ›o¾iV=}1(w5 Ž?ŽÂÂBܾ}B¡ .„X,Öý3vá…‚¸¸8 ê… ÆÆFÝ… öövˆD"¼óÎ;˜9s¦®Loí,[¶ õõõؽ{·^:!k׮żyó­V‹~ø¹¹¹¨««ƒ««+‚ƒƒñî»ïê.ò˜SÆÿÛºº:,X°åååpssCBB‚Yõôv7ݶQºººpíÚ5¼öÚkf•g·ƒ_0Ì~óû¬gb±(}-€ùË„5` }±9lé 6…5ô…-”à&å0(‡ @9‚̾VͰ-ìíí ¾ôcp(—Ë;gͰ-<<< Ò¨þñhÛP€r˜”ã@Æu îø?1lE¢&IEND®B`‚pktools-2.6.6/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba_dep.md50000644000113200011300000000004012616110567020541 00000000000000f88560b66f96c6c024c33544efb1952dpktools-2.6.6/doc/html/dir_5785acc8d2e42f8795bdbe936856f26d.html0000644000113200011300000002275412647637663020035 00000000000000 pktools: /home/kempenep/pktools/qgis Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis Directory Reference
Directory dependency graph for qgis:
/home/kempenep/pktools/qgis

Directories

directory  pktools
 

Files

file  __init__.py [code]
 
file  pkcomposite.py [code]
 
file  pkcrop.py [code]
 
file  pkdiff_accuracy.py [code]
 
file  pkextract.py [code]
 
file  pkextract_grid.py [code]
 
file  pkextract_random.py [code]
 
file  pkfilter_spatial.py [code]
 
file  pkfilter_spectral.py [code]
 
file  pkfilterdem.py [code]
 
file  pkgetmask.py [code]
 
file  pklas2img.py [code]
 
file  pkreclass.py [code]
 
file  pksetmask.py [code]
 
file  pksvm.py [code]
 
file  pktoolsAlgorithm.py [code]
 
file  pktoolsAlgorithmProvider.py [code]
 
file  pktoolsUtils.py [code]
 
file  ProcessingPktoolsPlugin.py [code]
 
pktools-2.6.6/doc/html/pkfsann_8cc_source.html0000644000113200011300000032430312647637662016327 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfsann.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfsann.cc
1 /**********************************************************************
2 pkfsann.cc: feature selection for artificial neural network classifier pkann
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <stdlib.h>
21 #include <vector>
22 #include <string>
23 #include <map>
24 #include <algorithm>
25 #include "base/Optionpk.h"
26 #include "imageclasses/ImgReaderOgr.h"
27 #include "algorithms/ConfusionMatrix.h"
28 #include "algorithms/CostFactory.h"
29 #include "algorithms/FeatureSelector.h"
30 #include "floatfann.h"
31 #include "algorithms/myfann_cpp.h"
32 #include "pkfsann.h"
33 
34 #ifdef HAVE_CONFIG_H
35 #include <config.h>
36 #endif
37 
38 /******************************************************************************/
94 using namespace std;
95 
96 #define Malloc(type,n) (type *)malloc((n)*sizeof(type))
97 
98 CostFactoryANN::CostFactoryANN(const vector<unsigned int>& nneuron, float connection, const std::vector<float> weights, float learning, unsigned int maxit, unsigned short cv, bool verbose)
99  : CostFactory(cv,verbose), m_nneuron(nneuron), m_connection(connection), m_weights(weights), m_learning(learning), m_maxit(maxit){};
100 
101 CostFactoryANN::~CostFactoryANN(){
102 }
103 
104 double CostFactoryANN::getCost(const vector<Vector2d<float> > &trainingFeatures)
105 {
106  unsigned short nclass=trainingFeatures.size();
107  unsigned int ntraining=0;
108  unsigned int ntest=0;
109  for(int iclass=0;iclass<nclass;++iclass){
110  ntraining+=m_nctraining[iclass];
111  ntest+=m_nctest[iclass];
112  }
113  if(ntest)
114  assert(!m_cv);
115  if(!m_cv)
116  assert(ntest);
117  unsigned short nFeatures=trainingFeatures[0][0].size();
118 
119  FANN::neural_net net;//the neural network
120  const unsigned int num_layers = m_nneuron.size()+2;
121  const float desired_error = 0.0003;
122  const unsigned int iterations_between_reports = (m_verbose) ? m_maxit+1:0;
123  if(m_verbose>1){
124  cout << "creating artificial neural network with " << m_nneuron.size() << " hidden layer, having " << endl;
125  for(int ilayer=0;ilayer<m_nneuron.size();++ilayer)
126  cout << m_nneuron[ilayer] << " ";
127  cout << "neurons" << endl;
128  }
129  switch(num_layers){
130  case(3):{
131  unsigned int layers[3];
132  layers[0]=nFeatures;
133  layers[1]=m_nneuron[0];
134  layers[2]=nclass;
135  net.create_sparse_array(m_connection,num_layers,layers);
136  break;
137  }
138  case(4):{
139  unsigned int layers[4];
140  layers[0]=nFeatures;
141  layers[1]=m_nneuron[0];
142  layers[2]=m_nneuron[1];
143  layers[3]=nclass;
144  net.create_sparse_array(m_connection,num_layers,layers);
145  break;
146  }
147  default:
148  cerr << "Only 1 or 2 hidden layers are supported!" << endl;
149  exit(1);
150  break;
151  }
152 
153  net.set_learning_rate(m_learning);
154 
155  net.set_activation_function_hidden(FANN::SIGMOID_SYMMETRIC_STEPWISE);
156  net.set_activation_function_output(FANN::SIGMOID_SYMMETRIC_STEPWISE);
157 
158  vector<unsigned short> referenceVector;
159  vector<unsigned short> outputVector;
160  float rmse=0;
161  vector<Vector2d<float> > tmpFeatures(nclass);
162  for(int iclass=0;iclass<nclass;++iclass){
163  tmpFeatures[iclass].resize(trainingFeatures[iclass].size(),nFeatures);
164  for(unsigned int isample=0;isample<m_nctraining[iclass];++isample){
165  for(int ifeature=0;ifeature<nFeatures;++ifeature){
166  tmpFeatures[iclass][isample][ifeature]=trainingFeatures[iclass][isample][ifeature];
167  }
168  }
169  }
170  m_cm.clearResults();
171  if(m_cv>0){
172  rmse=net.cross_validation(tmpFeatures,
173  ntraining,
174  m_cv,
175  m_maxit,
176  desired_error,
177  referenceVector,
178  outputVector,
179  m_verbose);
180  for(int isample=0;isample<referenceVector.size();++isample){
181  string refClassName=m_nameVector[referenceVector[isample]];
182  string className=m_nameVector[outputVector[isample]];
183  if(m_classValueMap.size())
184  m_cm.incrementResult(type2string<short>(m_classValueMap[refClassName]),type2string<short>(m_classValueMap[className]),1.0);
185  else
186  m_cm.incrementResult(m_cm.getClass(referenceVector[isample]),m_cm.getClass(outputVector[isample]),1.0);
187  }
188  }
189  else{//not working yet. please repair...
190  assert(m_cv>0);
191  bool initWeights=true;
192  net.train_on_data(tmpFeatures,ntraining,initWeights, m_maxit,
193  iterations_between_reports, desired_error);
194  vector<Vector2d<float> > testFeatures(nclass);
195  vector<float> result(nclass);
196  int maxClass=-1;
197  for(int iclass=0;iclass<nclass;++iclass){
198  testFeatures.resize(m_nctest[iclass],nFeatures);
199  for(unsigned int isample=0;isample<m_nctraining[iclass];++isample){
200  for(int ifeature=0;ifeature<nFeatures;++ifeature){
201  testFeatures[iclass][isample][ifeature]=trainingFeatures[iclass][m_nctraining[iclass]+isample][ifeature];
202  }
203  result=net.run(testFeatures[iclass][isample]);
204  string refClassName=m_nameVector[iclass];
205  float maxP=-1;
206  for(int ic=0;ic<nclass;++ic){
207  float pv=(result[ic]+1.0)/2.0;//bring back to scale [0,1]
208  if(pv>maxP){
209  maxP=pv;
210  maxClass=ic;
211  }
212  }
213  string className=m_nameVector[maxClass];
214  if(m_classValueMap.size())
215  m_cm.incrementResult(type2string<short>(m_classValueMap[refClassName]),type2string<short>(m_classValueMap[className]),1.0);
216  else
217  m_cm.incrementResult(m_cm.getClass(referenceVector[isample]),m_cm.getClass(outputVector[isample]),1.0);
218  }
219  }
220  }
221  assert(m_cm.nReference());
222  return(m_cm.kappa());
223 }
224 
225 int main(int argc, char *argv[])
226 {
227  // vector<double> priors;
228 
229  //--------------------------- command line options ------------------------------------
230  Optionpk<string> input_opt("i", "input", "input test set (leave empty to perform a cross validation based on training only)");
231  Optionpk<string> training_opt("t", "training", "training vector file. A single vector 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)");
232  Optionpk<string> tlayer_opt("tln", "tln", "training layer name(s)");
233  Optionpk<string> label_opt("label", "label", "identifier for class label in training vector file.","label");
234  Optionpk<unsigned short> maxFeatures_opt("n", "nf", "number of features to select (0 to select optimal number, see also ecost option)", 0);
235  Optionpk<unsigned int> balance_opt("\0", "balance", "balance the input data to this number of samples for each class", 0);
236  Optionpk<bool> random_opt("random","random", "in case of balance, randomize input data", true);
237  Optionpk<int> minSize_opt("min", "min", "if number of training pixels is less then min, do not take this class into account", 0);
238  Optionpk<unsigned short> band_opt("b", "band", "band index (starting from 0, either use band option or use start to end)");
239  Optionpk<unsigned short> bstart_opt("sband", "startband", "Start band sequence number");
240  Optionpk<unsigned short> bend_opt("eband", "endband", "End band sequence number");
241  Optionpk<double> offset_opt("\0", "offset", "offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]", 0.0);
242  Optionpk<double> 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);
243  Optionpk<unsigned short> aggreg_opt("a", "aggreg", "how to combine aggregated classifiers, see also rc option (0: no aggregation, 1: sum rule, 2: max rule).",0);
244  // Optionpk<double> priors_opt("p", "prior", "prior probabilities for each class (e.g., -p 0.3 -p 0.3 -p 0.2 )", 0.0);
245  Optionpk<string> selector_opt("sm", "sm", "feature selection method (sffs=sequential floating forward search,sfs=sequential forward search, sbs, sequential backward search ,bfs=brute force search)","sffs");
246  Optionpk<float> epsilon_cost_opt("ecost", "ecost", "epsilon for stopping criterion in cost function to determine optimal number of features",0.001);
247  Optionpk<unsigned short> cv_opt("cv", "cv", "n-fold cross validation mode",2);
248  Optionpk<string> classname_opt("c", "class", "list of class names.");
249  Optionpk<short> classvalue_opt("r", "reclass", "list of class values (use same order as in classname opt.");
250  Optionpk<unsigned int> nneuron_opt("n", "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);
251  Optionpk<float> connection_opt("\0", "connection", "connection reate (default: 1.0 for a fully connected network)", 1.0);
252  Optionpk<float> 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);
253  Optionpk<float> learning_opt("l", "learning", "learning rate (default: 0.7)", 0.7);
254  Optionpk<unsigned int> maxit_opt("\0", "maxit", "number of maximum iterations (epoch) (default: 500)", 500);
255  Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confusion matrix), 2 (debug)",0,2);
256 
257  tlayer_opt.setHide(1);
258  label_opt.setHide(1);
259  balance_opt.setHide(1);
260  random_opt.setHide(1);
261  minSize_opt.setHide(1);
262  band_opt.setHide(1);
263  bstart_opt.setHide(1);
264  bend_opt.setHide(1);
265  offset_opt.setHide(1);
266  scale_opt.setHide(1);
267  aggreg_opt.setHide(1);
268  // priors_opt.setHide(1);
269  selector_opt.setHide(1);
270  epsilon_cost_opt.setHide(1);
271  cv_opt.setHide(1);
272  classname_opt.setHide(1);
273  classvalue_opt.setHide(1);
274  nneuron_opt.setHide(1);
275  connection_opt.setHide(1);
276  weights_opt.setHide(1);
277  learning_opt.setHide(1);
278  maxit_opt.setHide(1);
279 
280  bool doProcess;//stop process when program was invoked with help option (-h --help)
281  try{
282  doProcess=input_opt.retrieveOption(argc,argv);
283  training_opt.retrieveOption(argc,argv);
284  maxFeatures_opt.retrieveOption(argc,argv);
285  tlayer_opt.retrieveOption(argc,argv);
286  label_opt.retrieveOption(argc,argv);
287  balance_opt.retrieveOption(argc,argv);
288  random_opt.retrieveOption(argc,argv);
289  minSize_opt.retrieveOption(argc,argv);
290  band_opt.retrieveOption(argc,argv);
291  bstart_opt.retrieveOption(argc,argv);
292  bend_opt.retrieveOption(argc,argv);
293  offset_opt.retrieveOption(argc,argv);
294  scale_opt.retrieveOption(argc,argv);
295  aggreg_opt.retrieveOption(argc,argv);
296  // priors_opt.retrieveOption(argc,argv);
297  selector_opt.retrieveOption(argc,argv);
298  epsilon_cost_opt.retrieveOption(argc,argv);
299  cv_opt.retrieveOption(argc,argv);
300  classname_opt.retrieveOption(argc,argv);
301  classvalue_opt.retrieveOption(argc,argv);
302  nneuron_opt.retrieveOption(argc,argv);
303  connection_opt.retrieveOption(argc,argv);
304  weights_opt.retrieveOption(argc,argv);
305  learning_opt.retrieveOption(argc,argv);
306  maxit_opt.retrieveOption(argc,argv);
307  verbose_opt.retrieveOption(argc,argv);
308  }
309  catch(string predefinedString){
310  std::cout << predefinedString << std::endl;
311  exit(0);
312  }
313  if(!doProcess){
314  cout << endl;
315  cout << "Usage: pkfsann -t training -n number" << endl;
316  cout << endl;
317  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
318  exit(0);//help was invoked, stop processing
319  }
320 
321  CostFactoryANN costfactory(nneuron_opt, connection_opt[0], weights_opt, learning_opt[0], maxit_opt[0], cv_opt[0], verbose_opt[0]);
322 
323  assert(training_opt.size());
324  if(input_opt.size())
325  costfactory.setCv(0);
326  if(verbose_opt[0]>=1){
327  if(input_opt.size())
328  std::cout << "input filename: " << input_opt[0] << std::endl;
329  std::cout << "training vector file: " << std::endl;
330  for(int ifile=0;ifile<training_opt.size();++ifile)
331  std::cout << training_opt[ifile] << std::endl;
332  std::cout << "verbose: " << verbose_opt[0] << std::endl;
333  }
334 
335  static std::map<std::string, SelectorValue> selMap;
336  //initialize selMap
337  selMap["sffs"]=SFFS;
338  selMap["sfs"]=SFS;
339  selMap["sbs"]=SBS;
340  selMap["bfs"]=BFS;
341 
342  assert(training_opt.size());
343  if(input_opt.size())
344  cv_opt[0]=0;
345  if(verbose_opt[0]>=1)
346  std::cout << "training vector file: " << training_opt[0] << std::endl;
347 
348  unsigned int totalSamples=0;
349  unsigned int totalTestSamples=0;
350 
351  unsigned short nclass=0;
352  int nband=0;
353  int startBand=2;//first two bands represent X and Y pos
354 
355  // if(priors_opt.size()>1){//priors from argument list
356  // priors.resize(priors_opt.size());
357  // double normPrior=0;
358  // for(int iclass=0;iclass<priors_opt.size();++iclass){
359  // priors[iclass]=priors_opt[iclass];
360  // normPrior+=priors[iclass];
361  // }
362  // //normalize
363  // for(int iclass=0;iclass<priors_opt.size();++iclass)
364  // priors[iclass]/=normPrior;
365  // }
366 
367  //convert start and end band options to vector of band indexes
368  try{
369  if(bstart_opt.size()){
370  if(bend_opt.size()!=bstart_opt.size()){
371  string errorstring="Error: options for start and end band indexes must be provided as pairs, missing end band";
372  throw(errorstring);
373  }
374  band_opt.clear();
375  for(int ipair=0;ipair<bstart_opt.size();++ipair){
376  if(bend_opt[ipair]<=bstart_opt[ipair]){
377  string errorstring="Error: index for end band must be smaller then start band";
378  throw(errorstring);
379  }
380  for(int iband=bstart_opt[ipair];iband<=bend_opt[ipair];++iband)
381  band_opt.push_back(iband);
382  }
383  }
384  }
385  catch(string error){
386  cerr << error << std::endl;
387  exit(1);
388  }
389  //sort bands
390  if(band_opt.size())
391  std::sort(band_opt.begin(),band_opt.end());
392 
393  // map<string,short> classValueMap;//global variable for now (due to getCost)
394  if(classname_opt.size()){
395  assert(classname_opt.size()==classvalue_opt.size());
396  for(int iclass=0;iclass<classname_opt.size();++iclass)
397  costfactory.setClassValueMap(classname_opt[iclass],classvalue_opt[iclass]);
398  }
399  //----------------------------------- Training -------------------------------
400  vector<double> offset;
401  vector<double> scale;
402  vector< Vector2d<float> > trainingPixels;//[class][sample][band]
403  vector< Vector2d<float> > testPixels;//[class][sample][band]
404  map<string,Vector2d<float> > trainingMap;
405  map<string,Vector2d<float> > testMap;
406  vector<string> fields;
407 
408  //organize training data
409  trainingPixels.clear();
410  if(verbose_opt[0]>=1)
411  std::cout << "reading imageVector file " << training_opt[0] << std::endl;
412  try{
413  ImgReaderOgr trainingReader(training_opt[0]);
414  if(band_opt.size()){
415  totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
416  if(input_opt.size()){
417  ImgReaderOgr inputReader(input_opt[0]);
418  totalTestSamples=trainingReader.readDataImageOgr(testMap,fields,band_opt,label_opt[0],tlayer_opt,verbose_opt[0]);
419  inputReader.close();
420  }
421  }
422  else{
423  totalSamples=trainingReader.readDataImageOgr(trainingMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
424  if(input_opt.size()){
425  ImgReaderOgr inputReader(input_opt[0]);
426  totalTestSamples=trainingReader.readDataImageOgr(testMap,fields,0,0,label_opt[0],tlayer_opt,verbose_opt[0]);
427  inputReader.close();
428  }
429  }
430  if(trainingMap.size()<2){
431  string errorstring="Error: could not read at least two classes from training file";
432  throw(errorstring);
433  }
434  if(input_opt.size()&&testMap.size()<2){
435  string errorstring="Error: could not read at least two classes from test input file";
436  throw(errorstring);
437  }
438  trainingReader.close();
439  }
440  catch(string error){
441  cerr << error << std::endl;
442  exit(1);
443  }
444  catch(std::exception& e){
445  std::cerr << "Error: ";
446  std::cerr << e.what() << std::endl;
447  std::cerr << CPLGetLastErrorMsg() << std::endl;
448  exit(1);
449  }
450  catch(...){
451  cerr << "error caught" << std::endl;
452  exit(1);
453  }
454  //delete class 0 ?
455  // if(verbose_opt[0]>=1)
456  // std::cout << "erasing class 0 from training set (" << trainingMap[0].size() << " from " << totalSamples << ") samples" << std::endl;
457  // totalSamples-=trainingMap[0].size();
458  // trainingMap.erase(0);
459  //convert map to vector
460 
461  if(verbose_opt[0]>1)
462  std::cout << "training pixels: " << std::endl;
463  map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
464  while(mapit!=trainingMap.end()){
465  // if(classValueMap.size()){
466  // //check if name in training is covered by classname_opt (values can not be 0)
467  // if(classValueMap[mapit->first]>0){
468  // if(verbose_opt[0])
469  // std::cout << mapit->first << " -> " << classValueMap[mapit->first] << std::endl;
470  // }
471  // else{
472  // std::cerr << "Error: names in classname option are not complete, please check names in training vector and make sure classvalue is > 0" << std::endl;
473  // exit(1);
474  // }
475  // }
476  //delete small classes
477  if((mapit->second).size()<minSize_opt[0]){
478  trainingMap.erase(mapit);
479  continue;
480  }
481  trainingPixels.push_back(mapit->second);
482  if(verbose_opt[0]>1)
483  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
484  ++mapit;
485  }
486  nclass=trainingPixels.size();
487  if(classname_opt.size())
488  assert(nclass==classname_opt.size());
489  nband=trainingPixels[0][0].size()-2;//X and Y//trainingPixels[0][0].size();
490 
491  mapit=testMap.begin();
492  while(mapit!=testMap.end()){
493  //no need to delete small classes for test sample
494  testPixels.push_back(mapit->second);
495  if(verbose_opt[0]>1)
496  std::cout << mapit->first << ": " << (mapit->second).size() << " samples" << std::endl;
497  ++mapit;
498  }
499  if(input_opt.size()){
500  assert(nclass==testPixels.size());
501  assert(nband=testPixels[0][0].size()-2);//X and Y//testPixels[0][0].size();
502  assert(!cv_opt[0]);
503  }
504 
505  //do not remove outliers here: could easily be obtained through ogr2ogr -where 'B2<110' output.shp input.shp
506  //balance training data
507  if(balance_opt[0]>0){
508  if(random_opt[0])
509  srand(time(NULL));
510  totalSamples=0;
511  for(int iclass=0;iclass<nclass;++iclass){
512  if(trainingPixels[iclass].size()>balance_opt[0]){
513  while(trainingPixels[iclass].size()>balance_opt[0]){
514  int index=rand()%trainingPixels[iclass].size();
515  trainingPixels[iclass].erase(trainingPixels[iclass].begin()+index);
516  }
517  }
518  else{
519  int oldsize=trainingPixels[iclass].size();
520  for(int isample=trainingPixels[iclass].size();isample<balance_opt[0];++isample){
521  int index = rand()%oldsize;
522  trainingPixels[iclass].push_back(trainingPixels[iclass][index]);
523  }
524  }
525  totalSamples+=trainingPixels[iclass].size();
526  }
527  assert(totalSamples==nclass*balance_opt[0]);
528  }
529 
530  //set scale and offset
531  offset.resize(nband);
532  scale.resize(nband);
533  if(offset_opt.size()>1)
534  assert(offset_opt.size()==nband);
535  if(scale_opt.size()>1)
536  assert(scale_opt.size()==nband);
537  for(int iband=0;iband<nband;++iband){
538  if(verbose_opt[0]>1)
539  std::cout << "scaling for band" << iband << std::endl;
540  offset[iband]=(offset_opt.size()==1)?offset_opt[0]:offset_opt[iband];
541  scale[iband]=(scale_opt.size()==1)?scale_opt[0]:scale_opt[iband];
542  //search for min and maximum
543  if(scale[iband]<=0){
544  float theMin=trainingPixels[0][0][iband+startBand];
545  float theMax=trainingPixels[0][0][iband+startBand];
546  for(int iclass=0;iclass<nclass;++iclass){
547  for(int isample=0;isample<trainingPixels[iclass].size();++isample){
548  if(theMin>trainingPixels[iclass][isample][iband+startBand])
549  theMin=trainingPixels[iclass][isample][iband+startBand];
550  if(theMax<trainingPixels[iclass][isample][iband+startBand])
551  theMax=trainingPixels[iclass][isample][iband+startBand];
552  }
553  }
554  offset[iband]=theMin+(theMax-theMin)/2.0;
555  scale[iband]=(theMax-theMin)/2.0;
556  if(verbose_opt[0]>1){
557  std::cout << "Extreme image values for band " << iband << ": [" << theMin << "," << theMax << "]" << std::endl;
558  std::cout << "Using offset, scale: " << offset[iband] << ", " << scale[iband] << std::endl;
559  std::cout << "scaled values for band " << iband << ": [" << (theMin-offset[iband])/scale[iband] << "," << (theMax-offset[iband])/scale[iband] << "]" << std::endl;
560  }
561  }
562  }
563 
564  // if(priors_opt.size()==1){//default: equal priors for each class
565  // priors.resize(nclass);
566  // for(int iclass=0;iclass<nclass;++iclass)
567  // priors[iclass]=1.0/nclass;
568  // }
569  // assert(priors_opt.size()==1||priors_opt.size()==nclass);
570 
571  if(verbose_opt[0]>=1){
572  std::cout << "number of bands: " << nband << std::endl;
573  std::cout << "number of classes: " << nclass << std::endl;
574  // std::cout << "priors:";
575  // for(int iclass=0;iclass<nclass;++iclass)
576  // std::cout << " " << priors[iclass];
577  // std::cout << std::endl;
578  }
579 
580  //set names in confusion matrix using nameVector
581  vector<string> nameVector=costfactory.getNameVector();
582  for(int iname=0;iname<nameVector.size();++iname){
583  if(costfactory.getClassValueMap().empty())
584  costfactory.pushBackClassName(nameVector[iname]);
585  // cm.pushBackClassName(nameVector[iname]);
586  else if(costfactory.getClassIndex(type2string<short>((costfactory.getClassValueMap())[nameVector[iname]]))<0)
587  costfactory.pushBackClassName(type2string<short>((costfactory.getClassValueMap())[nameVector[iname]]));
588  }
589 
590  // if(classname_opt.empty()){
591  // for(int iclass=0;iclass<nclass;++iclass){
592  // if(verbose_opt[0])
593  // std::cout << iclass << " " << cm.getClass(iclass) << " -> " << string2type<short>(cm.getClass(iclass)) << std::endl;
594  // classValueMap[cm.getClass(iclass)]=string2type<short>(cm.getClass(iclass));
595  // }
596  // }
597 
598  //Calculate features of trainig set
599 
600  vector<unsigned int> nctraining;
601  vector<unsigned int> nctest;
602  nctraining.resize(nclass);
603  nctest.resize(nclass);
604  vector< Vector2d<float> > trainingFeatures(nclass);
605  for(int iclass=0;iclass<nclass;++iclass){
606  if(verbose_opt[0]>=1)
607  std::cout << "calculating features for class " << iclass << std::endl;
608  nctraining[iclass]=trainingPixels[iclass].size();
609  if(verbose_opt[0]>=1)
610  std::cout << "nctraining[" << iclass << "]: " << nctraining[iclass] << std::endl;
611  if(testPixels.size()>iclass){
612  nctest[iclass]=testPixels[iclass].size();
613  if(verbose_opt[0]>=1){
614  std::cout << "nctest[" << iclass << "]: " << nctest[iclass] << std::endl;
615  }
616  }
617  else
618  nctest[iclass]=0;
619 
620  trainingFeatures[iclass].resize(nctraining[iclass]+nctest[iclass]);
621  for(int isample=0;isample<nctraining[iclass];++isample){
622  //scale pixel values according to scale and offset!!!
623  for(int iband=0;iband<nband;++iband){
624  assert(trainingPixels[iclass].size()>isample);
625  assert(trainingPixels[iclass][isample].size()>iband+startBand);
626  assert(offset.size()>iband);
627  assert(scale.size()>iband);
628  float value=trainingPixels[iclass][isample][iband+startBand];
629  trainingFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]);
630  }
631  }
632  for(int isample=0;isample<nctest[iclass];++isample){
633  //scale pixel values according to scale and offset!!!
634  for(int iband=0;iband<nband;++iband){
635  assert(testPixels[iclass].size()>isample);
636  assert(testPixels[iclass][isample].size()>iband+startBand);
637  assert(offset.size()>iband);
638  assert(scale.size()>iband);
639  float value=testPixels[iclass][isample][iband+startBand];
640  // testFeatures[iclass][isample].push_back((value-offset[iband])/scale[iband]);
641  trainingFeatures[iclass][nctraining[iclass]+isample].push_back((value-offset[iband])/scale[iband]);
642  }
643  }
644  assert(trainingFeatures[iclass].size()==nctraining[iclass]+nctest[iclass]);
645  }
646 
647  costfactory.setNcTraining(nctraining);
648  costfactory.setNcTest(nctest);
649  int nFeatures=trainingFeatures[0][0].size();
650  int maxFeatures=(maxFeatures_opt[0])? maxFeatures_opt[0] : 1;
651  double previousCost=-1;
652  double cost=0;
653  list<int> subset;//set of selected features (levels) for each class combination
654  FeatureSelector selector;
655  try{
656  if(maxFeatures>=nFeatures){
657  subset.clear();
658  for(int ifeature=0;ifeature<nFeatures;++ifeature)
659  subset.push_back(ifeature);
660  cost=costfactory.getCost(trainingFeatures);
661  }
662  else{
663  while(fabs(cost-previousCost)>=epsilon_cost_opt[0]){
664  previousCost=cost;
665  switch(selMap[selector_opt[0]]){
666  case(SFFS):
667  subset.clear();//needed to clear in case of floating and brute force search
668  cost=selector.floating(trainingFeatures,costfactory,subset,maxFeatures,epsilon_cost_opt[0],verbose_opt[0]);
669  break;
670  case(SFS):
671  cost=selector.forward(trainingFeatures,costfactory,subset,maxFeatures,verbose_opt[0]);
672  break;
673  case(SBS):
674  cost=selector.backward(trainingFeatures,costfactory,subset,maxFeatures,verbose_opt[0]);
675  break;
676  case(BFS):
677  subset.clear();//needed to clear in case of floating and brute force search
678  cost=selector.bruteForce(trainingFeatures,costfactory,subset,maxFeatures,verbose_opt[0]);
679  break;
680  default:
681  std::cout << "Error: selector not supported, please use sffs, sfs, sbs or bfs" << std::endl;
682  exit(1);
683  break;
684  }
685  if(verbose_opt[0]>1){
686  std::cout << "cost: " << cost << std::endl;
687  std::cout << "previousCost: " << previousCost << std::endl;
688  std::cout << std::setprecision(12) << "cost-previousCost: " << cost - previousCost << " ( " << epsilon_cost_opt[0] << ")" << std::endl;
689  }
690  if(!maxFeatures_opt[0])
691  ++maxFeatures;
692  else
693  break;
694  }
695  }
696  }
697  catch(...){
698  std::cout << "caught feature selection" << std::endl;
699  exit(1);
700  }
701 
702  if(verbose_opt[0])
703  cout <<"cost: " << cost << endl;
704  subset.sort();
705  for(list<int>::const_iterator lit=subset.begin();lit!=subset.end();++lit)
706  std::cout << " -b " << *lit;
707  std::cout << std::endl;
708  // if((*(lit))!=subset.back())
709  // else
710  // cout << endl;
711 
712  // *NOTE* Because svm_model contains pointers to svm_problem, you can
713  // not free the memory used by svm_problem if you are still using the
714  // svm_model produced by svm_train().
715 
716  // free(prob.y);
717  // free(prob.x);
718  // free(x_space);
719  // svm_destroy_param(&param);
720  return 0;
721 }
722 
pktools-2.6.6/doc/html/classFileReaderAscii__coll__graph.png0000644000113200011300000004352412616110567021050 00000000000000‰PNG  IHDR3ÕEÁbKGDÿÿÿ ½§“ IDATxœìÝ}\TuÞ?þ×f@eFAD$@ó®o›nn¥•K{­]™­-™[i™m}÷zôS¼k û­]jÞ´W»™^jYjå $©›iŠnꢮ¨ˆ°r£È­Ü #3Ìyÿp™¸ŸæÌœy?Ι3Ÿó>gμœs÷9c̹ís“ºÆ³3Ƙ,p˜1ÆdÃŒ1& R››‹††©Ë`ÿæææ†‘#GÂËËKêR³Šäavûöm 0žžžR—ÂTVVbðàÁfÌéHfµZ-u ÀÉ“'¥.±ácfŒ1Yà0cŒÉ‡cL8Ìc²àRa–——Al6]_×Á³œlÂ,??6iËßßK–,±I[Œ1ûM˜‰¢ˆªª*›´ˆ5kÖØ¤-Ƙ}8]˜ŠünnãÖ­[7n\›qcÆŒ±zžååå0ˆˆˆ0‹ŒŒDqq±UõtfäÈ‘¦¿£££QZZ ¥R‰œœÄÅÅáÀŽ;LÓ˜›_aa!‚‚‚ AÀ“O>‰‚‚«—™1gäTa¦Óé Š"öíÛ‡êêjÌ›7Ó§OGuuu‡iÃÂÂpåÊ•6ã®]»fõ< wwwäçç›ÆÝ¸qC‡µªžÎäææšþÎÉÉÁðááÓé0kÖ,$$$ ==›6m2Mcn~ÈÍ͈PSSƒ´´4«—™1gäTa&¦M›†¤¤$h4èõz( x{{›¦Ñjµ€  !!)))(++Ñ#Gðî»ï𦫫«Ã¶mÛºn¡P(ðüóÏãø ™™‰?þñ˜={¶EõtgáÂ…ÈËËÃ… °|ùr¼üòËhjj‚^¯‡R©„N§Cbb" ¾¾Þìüž}öY,[¶ EEEÈÈÈ@\\>þøcëW4cÎHê]kÑìÙ³‡"""H©TRtt4¥¤¤‘Á` É“'“577Óºuë(22’ú÷ïO“&M¢´´4Ó±°öÇØZ·­ººšæÌ™Cƒ ¢   zûí·I§Óu[OwZÚÿúë¯),,ŒÔj5-\¸šššˆèÞɋҰaÃhÓ¦MOjµÚìü4 ½òÊ+@ƒ ¢ùóçÓÝ»w-^·D|ÌŒ9­½‘´Og:yò$bcc¹ ÁŸsRüt&Ƙ<8DçŒrdîÞK‰3&;f}„Ê1ûâÝLƘ,p˜1ÆdÃŒ1& fŒ1Ypˆµµµhnn–º Ƙ“<Ì<==QRR"u½¢×±xq*æÍƒûïwî‹MAà23§$y˜Mš4IêzíÀtTTÜÅ¥KZüßÿ;KêrsI|Ì̾ù&pâD´Ú&‰«aÌ5q˜õRMÍ]¤¦fš›E>|ÅÌ;c}ì—Î@ËÅþ‚ `ÿþJ[c.ŠÃ¬—î…×½43Eüãy¨¨¨—¶(Æ\‡Y/”–ÖâÂ…?݇)¼$aUŒ¹&³^HI¹ w÷¶½cïj2&³^Ø¿ÿD±mï¢HÈÈ(FQ‘mH̳ ‡YݸQ¬¬’aîînHIá]MÆì‰Ã¬‡H‡BáÞékF£{öœëô5ÆXßà0ë¡={ÎÃ`0vúPPpÙÙ¥v®Š1×ÅaÖ·P\\Óí4 …;H·SEŒ1³8xÐüUþƒÉÉíP c p€Íј1!˜>}\›q/bÄú›ÆûÛ»4Æ\–äÏÍ”‹àà·±yóKxúéqæ'fŒÙ?7“1&fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‚Gû¢(¢¢¢¢(JQS«©©AII‰Ôe8•ÂËËKê2˜ DD­GTVVâÚµkRÕã´23+1lØøùyJ]ŠSQ«Õˆ•º æüöuøeÖ’m=ö˜½‹qj¼º¬wíÚ5´û¿”±ãcfŒ1Yà0cŒÉ‡cL8Ìc² y˜åååA›M×óîë6zª¤¤/¼ðÂÂÂàããƒ|ß|óM›iA@^^ž$õ1fO}fùùù ìËYôŠ¿¿?–,Y"y=QUU…ñãÇÃÛÛ{öìÁùóçñÛßþñññøþûïí^cRëpi†-‰¢ˆªªª¾œE¯bÍš5’·Ñ‰‰‰˜2e ¶mÛf‹²²2¬_¿¿üå/í^cR²É/³ƒb̘1ðòòˆ#°sçNÀĉC† F¬[·QQQðõõÅÃ?ŒsçΙÚi¿ËÖÙ.ÜîÝ»•J…7Þx €C‡™~©µ ˜®êkÝ~ss3 •J…ßýîw¨­­5»ìík¬­­ÅË/¿ŒÀÀ@„„„`Ñ¢Ehllì¶Ž®TVV𖝽¤¤$ü×ýW‡ñ‰‰‰Ø¾}{›qGEdd$°zõjÓø®ÖYË2?~¡¡¡8}ú´Åu1&j§¼¼œRSSÛî’V«%OOOÚ¼y3•––ÒöíÛÉÃôZ-åææRëYlܸ‘Ôj5%''SII >|˜‚ƒƒMÓÔÖÖÒÖ­[MÓ·nikêÔ©”““CiiiIK—.%FCJ¥’æÎKÅÅÅ´k×.@×·nÝ:5jeddÐÕ«W顇¢E‹™]þöË8{ölzüñÇ鯔‘‘A£G¦•+Wv[G{çÏŸ§—^z‰T*•””tx½¦¦†PuuµÙúЯýkÒh4”””DèÎ;Ý®³–ezê©§èĉj|||:O@@Œ¬¬¬¯]¸p>ø`›ÝÀàà`h³ÌÝ­³ÑÑÑ].kpp0V®\‰üü|Ì™3úÓŸƒ[·n™]OŒõ…^‡™N§ƒ(ŠØ·oª««1oÞÕÕÕ¦ Õ+WÚŒ³ö¦öÜÜ\Óß999>|8t:fÍš…„„¤§§cÓ¦MV׌ÂÂBÓðåË—ñþûï[UÛàÁƒáîîŽüü|Ó¸7n`èСÝÖ¡R©‹³gÏâÌ™3«{úé§±aÆ÷6îÚµ ƒÞÞÞ¦q]:ÒÝ:k¡P(ÌÖQ^^Žk×®¡¸¸&L@¿~ý̾‡±¾Ðë0Ó¦MCRR4 ôz= E›/“V«,X° HIIAYYŽ9‚wß}×4]]]]›³sí‡`áÂ…ÈËËÃ… °|ùr¼üòËhjj‚^¯‡R©„N§Cbb" ¾¾Þ¢ú`Μ9xçw™™‰ÌÌL¼õÖ[(**²j]( <ÿüóøÃþ€‚‚dffâü#fÏžÝmcÇŽEjj*’““qýúuDEEáÕW_ÅÅ‹»œ×ûï¿S§NaΜ98{ö,222ðÞ{ïá£>²(„»[g戢ˆ£GbÆŒ˜8q"ˆgΜÁW_}åЗâ0™k¿ãií13¢{Ç®"""H©TRtt4¥¤¤‘Á` É“'“577Óºuë(22’ú÷ïO“&M¢´´4Ó1§öÇØZ·üýõ×_SXX©ÕjZ¸p!555ѽ“ ¤aÆѦM›(>>žÔju·õµn¿±±‘-ZDÁÁÁäççGñññ“j_suu5Í™3‡ DAAAôöÛo“N§ë¶ŽöjjjhãÆA………]λ°°ž{î9 &___úÙÏ~Fß~ûm›iðïã` wµÎÚ/S{û÷柳'ÒîÝ»Më¿'ø˜³¡½ú3«¨¨@VVwäDQ„(ŠððèÓË­f0,Ú5§åèQ£zÝsyû3cŽÃÍÍ­Ó)R³E1fkf0wï%qƒŒIŽÃÌVŒ9>ÇÛ‡aŒ±à0cŒÉ‡cL8Ìc²ÀaÆ“…g3[.C8yò¤½kqZ¢HX·. ¿ým,†÷“º§¢V«¥.ÉD‡04h_‘m¥sç qåJ"#‡âW¿ú¹Ôå8•®zaÌZÂÌÍÍ *•JŠZœÖ?üAŽÍÆÆ³¡P¸K]c.‡™õRc£^ Õ6áĉl©KbÌ%q˜õÒ?d¡©©À½_µII]wÛÃë;f½””ôOÓI£Ñˆ£G3q÷n“ÄU1æz8ÌzA£Ñáĉl¢i\s³GŽ\•°*Æ\‡Y/|÷ÝUÜ{FÈOA@RÒ?%ªˆ1×ÅaÖ ûöý@Û03Eüøc.ª«ïJSc.ŠÃ¬‡**ê‘––Qì¼{ C‡®t:ž1Ö78ÌzèàÁK]vÚHDØ¿ÿ‚+b̵q˜õо} Šb§¯‰¢ˆ‹‹P\\cçªs]f=PTT…«Wo£ëhxx¸áÛo/Ù³,Æ\‡Y:t¹› »Ç`0òYMÆìˆŸÐîîÒf\YYüý½áåõÓ“‹Ôêö.1—Õá¹™¬g‚ƒßÆæÍ/áé§ÇI] c®hïf2ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‚‡-illDuuµ-šrZ¾¾^ÐjëPRR"u)’ñöö†¿¿¿Ôe0%õ¶‘¬¬,TTTØ¢æÄAÀ£>*uÌ5í³É/3"‚J¥Â¨Q£lÑsBÈÊÊ’º æÂø˜cL8Ìc²ÀaÆ“3Ƙ,8e˜åååA›M×óîë6cm9\˜åçç#00Pê2ºäïï%K–Ø¥ G_Œ9‡ 3QQUU%u] Äš5kìÒ†£¯ ƉdavðàAŒ3^^^1bvîÜ ˜8q"`È!£ÑˆuëÖ!** ¾¾¾xøá‡qîÜ9S;íwÙ:Û…Û½{7""" R©ðÆo ¡¡pèÐ!Œ?ÞÞÞ j0]Õ׺ýææf$&&"44*• ¿ûÝïP[[kvÙÛ×héºhyßñãÇŠÓ§OÃ`0 !!ƒ†Z­FBB ƒÙåŸ~ú)bbb R©°fÍìܹáááðóóÊ+Ì.c…l 33“233-ž^«Õ’§§'mÞ¼™JKKiûöíäááAZ­–rss©uY7n$µZMÉÉÉTRRB‡¦àà`Ó4µµµ´uëVÓô­‡[Úš:u*åääPZZEFFÒÒ¥KI£ÑR©¤¹sçRqq1íÚµ‹PEE…Åõ­[·ŽFEtõêUz衇hÑ¢Ef—¿uÖ¬‹–á§žzŠNœ8AZ­–Ö®]K3gΤ›7oRFFM˜0Áìò øøxÒh4´mÛ6@³fÍ"FC[¶l!tç΋?ÓòòrJMMµxzÆll¯$aV]]M …‚Ö¯_O555$Š"Õ×דÑhìðŽŠŠ¢;v´yÿçŸN–äpK[¦q{öì¡ððpjjj¢ììlÒjµd4éÔ©S€rss-®ï¾ûî£äädSÛYYYm†ÍÕeíºèly¢££©´´Ô4|ìØ17n\·ËGt/ÌÒÓÓ‰ˆH¯×w:Ü2­%8̘ÄöJ²›€ÔÔT¤¥¥!$$>ú(~üñG¸¹u,çÖ­[7n\›qcÆŒ±j~#GŽ4ýÒÒR(•Jäää ..<ðvìØau}EEEmÚŽ‰‰ÁŒ3¬ªÍšuÑzZ"((‚ @<ùä“(((èvùZøúú E§ÃŒ9IÂL§ÓAEìÛ·ÕÕÕ˜7o¦OŸÞiÏaaa¸råJ›q×®]³j~¹¹¹¦¿srr0|øpèt:Ìš5 HOOǦM›¬®/88………¦áË—/ãý÷ß·ª6kÖE‹ÖaˆÜÜ\ˆ555HKKëvù“#IÂLL›6 IIIÐh4ÐëõP(ðöö6M£Õj ,@BBRRRPVV†#GŽàÝwß5MWWW‡mÛ¶u9 .D^^.\¸€åË—ãå—_FSSôz=”J%t:õõõÕsæÌÁ;#ÌÌLdffâ­·ÞBQQQŸ­‹Î<ûì³X¶lŠŠŠ‘‘¸¸8|üñÇÝ.c²d‹Uk™Ý;vAJ¥’¢££)%%…ˆˆ Mž<™|||ˆˆ¨¹¹™Ö­[G‘‘‘Ô¿š4i¥¥¥™Ž%uu\©õß_ý5………‘Z­¦… RSSÝ;¹0pà@6lmÚ´‰âããI­Vw[_ëöiÑ¢EL~~~O555f—½}Í–®‹öï#"Òh4ôÊ+¯P@@ 4ˆæÏŸOwïÞ5»|hwLÌܰ9|ÌŒIl¯Mú3kÙíã.€\WK@=ö˜Ô¥0×´Ïá.šeŒ±ž°I猬#s÷^Úà1c¬³>ÂaŘ}ñn&cL8̺PRR‚^xaaaðññÁƒ>ˆo¾ù¦Í4‚ //O¢ c­q˜u¢ªªÊtƒöž={pþüyüö·¿E||<¾ÿþ{©ËcŒu‚™u"11S¦Lisñmll,ÊÊʰ~ýzüò—¿”°:ÆXg\ö—Yee¥©+ ö’’’ð_ÿõ_Æ'&&bûöímÆ=z‘‘‘ÀêÕ«Mã»ê~§³n|,­‹1Ö5— ³ .àå—_ƨQ£PWW×áõÚÚZ”••µ¹™»…BCCÛŒûî»ïpéÒ%l߾˗/GUUêëë1sæLL˜0¹¹¹X¿~=–-[†ÊÊJÓû6lØ€Ï?ÿãÇoÓÞ•+WŽÅ‹£  ÀFK͘ü¹D˜566bçÎx衇ðúë¯ãç?ÿ9òóóÔaÚ–K*,í£Ñ¢EðõõÅ3Ï<¨©©§§'®\¹‚>úAAA6l´ ϵk×bÊ”)èß¿›öžxâ \ºt ÞÞÞxä‘GðôÓOãèÑ£E±GËΘ«}˜ýðÃ>|8Ž?Ž¿üå/¸xñ"æÏŸŸN§ÀàÁƒ;}:÷… ðàƒ¶Ù €6]öXÒýNg¿üZ·¹råJäççcΜ9øÓŸþ„˜˜ܺuËÒÅfÌåÈ>ÌT*bccqöìYœ9sÆ¢n­Ÿ~úilذ¡Ã…¯»ví‚Á`hÓ£Eg¿à,é~Ç’>ÃÊËËqíÚ5c„ èׯŸÙ÷0æªdfcÇŽEjj*’““qýúuDEEáÕW_ÅÅ‹»|Ïûï¿S§NaΜ98{ö,222ðÞ{ïá£>²¨¿²Þt¿#Š"Ž=Š3f`âĉ "œ9s_}õ?©‰±nÈ>ÌZŒ=›7oFnn.F…矾˾ÇT*.^¼ˆ¦¦&üæ7¿ÁäÉ“ñ·¿ý ß~û-þã?þÃì¼üýý±aÃÌž=ÑÑÑ C||<âââ̾÷›o¾Abb"~ó›ß ??ï½÷žiW–1Ö5—íHEˆ¢ǺÔÎ`08e·ÕÜ“Ø>Çú&Û‘››[·ýìKŃŒ1GàxßfÆë3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‚Í.ÍhllDII‰­šs:ååõP«},¾A]nº{P1cö`“0óòòBee¥Ë>-[«ÕãÍ7¿Ç¼yãðÈ#ä.G2^^^R—À\˜MÂ,""¶hÊ)}öÙi "ÒÓkðî»s¤.‡1—ÄÇÌl 9ù"øç? Q^®‘ºÆ\‡Y/ݺUôô"Ýëè›oÒ¥.‰1—ÄaÖK))—àî~o5"öí» qEŒ¹&³^Ú»÷š›êÒ:;»7nTHXc®‰Ã¬þõ¯Rä啸©%… \’®(Æ\‡Y/¤¤\‚‡‡{›qïj2&³""ìÛwÍÍÆ¯Ý¼Y…Œ ~øcöÄaÖCéé7QRÒùÃQ<<ÜqàŸÕdÌž8ÌzèÀt(î¾ÖÜlÄÞ½ÿ„ÑÈϺdÌ^8ÌzÀh‘œüO w1[TWkqþ~"bbÚ>Ërñ⽘={ÆŽý©×Œ€ïöoeŒõ›<7“ÁÁocóæ—ðôÓã¤.…1W´w3c²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cL8Ìc²ÀaÆ“3Ƙ,p˜1ÆdÃŒ1& ½yó7pëÖ-[ÕâÔ¦O‰ºº›8y²VêR$çåå…‰'öYû¼Ý¹.777Œ;~~~^ëU˜566bÀ€6lXoš‘…U«FI]‚C¨««CqqqŸÎƒ·;×uíÚ5455uúZ¯Â <==¡R©zÛ “ "²Ë|x»cíñ13Ƙ,p˜1ÆdÃŒ1& fŒ1Ypª0ËË˃ 6›®/æmiD„_|>>>¶(õ!gßîœyþÖp˜0ËÏÏG`` ÔetÉßßK–,±Y%%%ؽ{7²²²Ì¾ÏÑ×3sôuk‹í®;æ–¿¯çoKf¢(¢ªªJê2ºˆ5kÖØ¬ N 5û>G_7ÎÌÑ×­-¶»î˜[þ¾ž¿-Ù=Ì<ˆ1cÆÀËË #FŒÀÎ;ÀtÅø!CF£ëÖ­CTT|}}ñðÃãܹs¦vÚÿüíìçðîÝ»•J…7Þx €C‡aüøñðööFPPP›««úZ·ßÜÜŒÄÄD„††B¥Ráw¿ûjkÍ_ùߺöËkͺiiçøñã ÅéÓ§a0€ÁƒC­V#!!ƒÁìò ‚€O?ý111P©TX³f vî܉ððpøùùaÅŠf—˸òvgÍò·ß¶vìØÑfùAÀîÝ»ƒâƒ>pï°ÉæÍ›‹`êÔ©8tèPñÊ¢ IDAT·»¨•••¦ucÔ ™™™”™™iñôZ­–<==ióæÍTZZJÛ·o'Òjµ”››K­ËÙ¸q#©ÕjJNN¦’’:|ø0›¦©­­¥­[·š¦o=ÜÒÖÔ©S)''‡ÒÒÒ(22’–.]J†”J%Í;—Š‹‹i×®]€***,®oݺu4jÔ(ÊÈÈ «W¯ÒC=D‹-2»ü­Ûh¿¼Ö¬›–á§žzŠNœ8AZ­–Ö®]K3gΤ›7oRFFM˜0Áìò øøxÒh4´mÛ6@³fÍ"FC[¶l!tç΋?ãòòrJMMµxúžàíκí®7ÛÖåË—Û¼€ž{î9ª©©¡­[·ªªª¢­[·ÒСCéÈ‘#TYYIÇŽ£ÈÈHê,bΟ?O/½ô©T**))±øs$"JMM¥òòòÎ^Úk×0«®®&…BAëׯ§ššE‘êëëÉh4vX©QQQ´cÇŽ6ïÿüóÏ;]9íµ´•‘‘a·gÏ §¦¦&ÊÎÎ&­VKF£‘N:E(77×âúî»ï>JNN6µ••ÕfØ\]íÿ¶vÝt¶|ÑÑÑTZZj>vì7®Ûå%º·q¦§§‘^¯ït¸eZK8b˜¹úv×›m«ýëLŸoëícôèÑ´{÷î6óýòË/MïÕétôÅ_ÐÏ~ö3?~|8Ž?Ž¿üå/¸xñ"æÏŸoó3ùv 3NQ±oß>TWWcÞ¼y˜>}:ª««;L†+W®´wíÚ5«æ—››kú;''LJN§Ã¬Y³€ôôtlÚ´Éêú‚ƒƒQXXh¾|ù2Þÿ}«jkÏšuÓ¢õƈÜÜ\ˆ555HKKëvy]…«ow½Ý¶Úë,‡Þa=eggT*bccqöìYœ9sÆâã|Ö²k˜ ‚€iÓ¦!)) z½ …ÞÞÞ¦i´Z-`Á‚HHH@JJ ÊÊÊpäȼûéêêê°mÛ¶.‡`áÂ…ÈËËÃ… °|ùr¼üòËhjj‚^¯‡R©„N§Cbb" ¾¾Þ¢ú`Μ9xçw™™‰ÌÌL¼õÖ[(**²Ûºé̳Ï>‹eË–¡¨¨ˆ‹‹ÃÇÜíòº Wßîz»mYâÍ7ßÄâÅ‹qôèQTUUáĉX¹r%AÀرc‘ššŠääd\¿~QQQxõÕWqñâÅ^ͳ«wZ[±öØѽc¤T*)::šRRRˆˆÈ`0ÐäÉ“ÉÇLJˆˆš››iݺuIýû÷§I“&QZZZ—Çœ:;õõ×_SXX©ÕjZ¸p!555ѽƒ¼¤aÆѦM›(>>žÔju·õµn¿±±‘-ZDÁÁÁäççGñññTSScvÙ»;ffͺé콆^yå  AƒÑüùóéîÝ»f—펉™6Ç™¹övgÍòw·|D]oF£‘>üðCŠˆˆ ???Š‹‹£””R©Tj©©©¡7RDDZT‹îŽ™ ÿ.¨GZ~VŽÅ}y±{***••…Ç{¬ÏæÁÛã9tè† †±cÇšÆ%%%aÕªU¸téR§ïE¢(ÂÃÃòžÈNž<‰ØØX¨Õêö/ís˜‹fcÎ+##/¾ø"ÒÓÓÑÐЀ´´4¬X±¯¾új—ïqss³*È̱]K ÌÞÇÖ‹ÂŒuIêínñâÅhhhÀ3Ï<ƒÊÊJŒ1sçÎÅ믿ާómÃÌÆ8¬˜¤Þî<<<°jÕ*¬ZµJ²x7³‡A@^^žÔe0âm«g8Ìc²ÀaÆ“—³®îÜ·¤‡‚£G"22X½zµi|W½#tÖÛ…%µ0yám«XuÅZ;=¹xÑQ˜»sß\è׿þ5i4JJJ2õ.Ñ]ïõvÑÚ±cÇH­VSBBåçç÷ù:è ŽzѬ#ám«ç¦× ©Ysç¾¹ ÐÉ“'‰ˆÈh4š®„î®w„ÎzUhïöíÛ”˜˜H!!!4}útúþûïÉh4Úh ô=3óxÛê93ú馗^z‰Î;G¢(v;½——]½zµË×PNNN›á–ÛÒ›Ÿ|ÎüsßÜûæz(@7½KtÕ;Bg½]´¶ÿ~š8q"íÞ½ÛÔÓ‚³áÝLóxÛê9î5£=¹s¿¯ §ïÝ•{ÍpLrض€î{Íþ,177·n»¶'9llÌ1¹Â¶åßbÆë%3Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0cŒÉ‡cLzu™ ¨¨¨ÀÉ“'mTŽßÎ963»~½ ¢ØyOäîî–/ß^ôTÎ\ÈÿþïÉ.{AV(Üqòä¿ì\‘cã0³!"ÂÍ›U]¾ÞÜ,âò囸öÛËv¬Š9£ììœ?_£Qìôu¾D£#3ª¨ÐXpCÀ{ï¥t8ÂXkŸ}v Ew÷õnܨ@II÷Ïu%f6Ôr±lkýú)M'ÜÝŒˆÇ…›[ßތ͜Ws³ˆääB J¥;ÜÝ;ûšÞÛ~NŸÎµoqÌåŸÎdKÅÅÕ¦¿===0rä‰0 V¬x11ÁðôäUκçáá†÷ߟ‰Û·k ÑèPW§Ãµk%¸y³ jµ/4´Ú&44èÛls®®WÏÍdmÕÖ6 -íFŽŒðpÜܬ^}GŽ\Å©SK¥.9± ŽààÁ+8yr‰Ô¥8ª}¼›iCþþÞˆ‹»jÓnäèÑCqãFîÞm2ónƺVW§Ã€®ÕSˆµ8ÌúØý÷‡@ ÙÙ%R—œ˜F£ƒ¿?‡Yw8ÌúØðáƒ0`@?\½z[êR˜«­å_fæp˜õ1A0jT0239ÌXÏi4:øùyK]†Cã0³ƒûïÁÕ«|빺ºøùñ/³îp˜ÙÁèÑ!¸~½ z=ßÌz†O˜Çaf£G…Á`DNN¹Ô¥0'UWÇ'Ìá0³ƒ‘#£_?%ïj²1Œ¸{·‰™™Áafîînˆ‰ ⓬Gêë€O˜Áaf'÷Np˜1ëÕÕÝ{t!ïfvÃÌNFЬ¬Û]véÂXWêêtÀ»™fp˜ÙÉèÑ!hhÐóSu˜ÕZÂŒw3»Çaf'11AP(Üù¸³Z]îînðõõ”º‡Æaf'J¥FŽŒÌÌb©KaN¦®®>>^î¯;fvtï$‡³ßdn3;=z(®^½Í4aVá«ÿ-ÃafG÷ß‚ºº×H] s"uu|“¹%8ÌìhÔ¨¡psxW“Yå^˜ñ/3s8Ìì¨O„…òMfî1Ã2fvvÿý!|F“Yå^_ffæp˜ÙŸÑdÖâ^f-Ãafg£GEy¹õR—œ÷2k3;»ÿþà]Mf"âÝL q˜ÙY@@ À»šÌ" z F3 p˜I`ôè¡|F“YD£i¹ÉœÃÌ3 ŒÍg4™ejk¹Ç Kq˜I`̘ܼYÚÚ©Ka®å—ŸÍ4ÃL£GáÚ5~Ê9ë÷2k93 ùC¥òå“̬º:¼¼P*=¤.Åáq˜IdÔ¨¡|ÜŒ™Å÷eZŽÃL"|F“Y‚{̰‡™DFÁhhÐK] s`|Á¬å8Ì$2fLŒFÙÙ|€u{̰‡™D†„¼øYš¬[¼›i93‰‚€ØX> ÀºÇ]f[ŽÃLBÜ3§®Žfb)Ù\¼"Š"*** ŠÎóÄðà`oh4 (.¾ 77ç~ŒØÀáåå%uVillDuuµÔetËËË ýû ()qÌc«Žô¹ $“GUVVâÚµkR—á²Ôj5bcc¥.Ã*YYY¨¨¨º §æ@Ÿû>Ùü2kÉäÇ{LÚB\еkלòñyD•J…Q£FI]ŠSr´Ï™1ÆdÃŒ1& fŒ1Yà0cŒÉ‡YåååAÌ_NÑz:"‹/¾Ÿ¾.9 K·GŸ‡£â0ëD~~>mÒ–¿¿?–,Y())ÁîÝ»‘••e×Xß³×çen>­·7WÃaÖ QQUUe“¶±fÍ€Nw¯ äÐÐP»ÖÀúž½>/sói½½¹—³ƒb̘1ðòòˆ#°sçNÀĉC† F¬[·QQQðõõÅÃ?ŒsçΙÚiÿÓ¾õpë¿Û·kM -í?~¡¡¡8}ú4 0xð`¨Õj$$$À`0:„ñãÇÃÛÛAAAm6pAðé§Ÿ"&&*• kÖ¬ÁÎ;???¬X±ÂV«Xvì±ÍX3ŸöÛÅŽ;Ú´#vïÞ˜˜ 8|ð€{‡<6oÞŒØØX 0S§NÅ¡C‡œ{•d¢¼¼œRSS-ž^«Õ’§§'mÞ¼™JKKiûöíäááAZ­–rss©õªÙ¸q#©ÕjJNN¦’’:|ø0›¦©­­¥­[·š¦o=ܺ­öíZSCËðSO=E'Nœ ­VKk×®¥™3gÒÍ›7)##ƒ&L˜@K—.%FCJ¥’æÎKÅÅÅ´k×.@DD€âããI£ÑжmÛÍš5‹4 mÙ²…Ð;w,^—™™™”™™iñôŽÂÚºíµÍôf»¸|ùr›×ÐsÏ=G555´uëV@UUU´uëV:t(9r„*++騱cIÖD‚ƒ}î{]6̪««I¡PÐúõ멦¦†DQ¤úúz26˜¨¨(Ú±cG›÷þùç}ðÝ…™55´ gdd˜ÆEGGSii©iøØ±c4nÜ8jjj¢ììlÒjµd4éÔ©S€rss‰èÞžžžNDDz½¾Óá–i-á`µÅ¬­Û^ÛLo¶‹ö¯0}/Z¶£G¦Ý»w·™ï—_~éÔaæ²»™HMMEZZBBBðè£âÇ„›[ÇUrëÖ-Œ7®Í¸1cÆØµ†ÑÑѦ¿ A ž|òI@©T"''qqqxà°cÇŽíøúú E§Ã¬#{m3½Ý.Ú Ðö³½qãFÝf:¹Ç²Ç\6Ìt:DQľ}ûP]]yóæaúôéö¢†+W®´g‹›Ú­©¡Eë 200¹¹¹ "jjj––N‡Y³f!!!éé騴iS¯keöÛfz»]´×Y>¼C=ÙÙÙÕç¨\6ÌAÀ´iÓ””F½^…BoïŸzõÔjµ€  !!)))(++Ñ#Gðî»ï𦫫«Ã¶mÛº¶E yöÙg±lÙ2!##qqqøøãÑÔÔ½^¥R N‡ÄÄD@}}½å+ˆu`¯m¦·Û…%Þ|óM,^¼GEUUNœ8•+Wò G`í13"¢={öPDD)•JŠŽŽ¦””""2 4yòdòññ!"¢ææfZ·nEFFRÿþýiÒ¤I”––Öå±°®Ž“µŸÎš:{¯F£¡W^y…hРA4þ|º{÷.Ý;=pà@6lmÚ´‰âããI­Vu8&fnØ;vb±žÔmmÆšù˜k§«ÏÖh4Ò‡~HäççGqqq”’’B*•Êâuá`Ÿû^ÙôgVQQ¬¬,îH-»+Î֕޳Öm ‡°aÃ0vìXÓ¸¤¤$¬Zµ —.]²¨ [û\v7“1W–‘‘_|éééhhh@ZZV¬XW_}UêÒzL632Æ,·xñb444à™gžAee%FŒ¹sçâõ×_—º´ã0cÌyxx`ÕªUXµj•ﴯ ïf2ÆdÃŒ1& fŒ1Yà0cŒÉ‡cLds6³å6Œ“'OJ[H/‘A@å·žôK=Ü}œçéìjµZê¬&***$ÙfšŠÝqç'TÏ6B©vžÏ¹=GúÜefƒ r”+‘{ES`@ÞÙ2(|ñóÿVCp’ßÎÎø\ƒððp¨T*»ÎS4r¾ÒàÖ—Üï!îv­Á–és—M˜¹¹¹Ù}Ãì• ÊPy¹ ·4ã׃¤®H¶úõë‡~ýúÙm~uE8¾´Õy:~ý0üþ!æßÈ,"›0“ ÑðÓ­²é[KxŸ7†?æ'aE¬·H$¤o-Ã¥íe¦a7#žð—¸2yq’×!6ÿtüD€“ï ¾D/aE¬7ên6!åå븴­d$ñÞVb3!ôþOÊ–8ÌŒ±Õ/3æ&±„ü6¿Ø˜ ó« $=Ÿ…ª¨Ý1~/?¨bûKS›Lq˜9˜ö¡%6ªst8ÿ—ÛUĬu·Â€¿½™‹l¸ £:|¦n†?êç4'wœ¯NÓÙ/0 W¿¬@ÁñZ *bÖÈû®ûf^Ciº :ùAMFB裼‹ikfÆh  “ž‹8¹¢uEö/ŠY$óË ¤þ±Íb·‡wCækÇÊ\‡™ƒ Ôi?ì$ÞÛå<º0ÍMÎ{‘¥œù…yAÑÏ ‚{×ýè n@Ð(¼÷Ú2GÅaæ`ŒÍ"ºz¦„h$hn6!mC±}‹böóxþÛQ2Þ§ëãaö8_’Ñ8ÌŒØÜùn¦éu#!;é?sPý*ð›FâÁ·‚!¸ pskûa’ ÿ/ë fFìâ˜poÅÍãÞ‹™wíX³ŠTf5 0ÆÞjÜZívŒðBÿÁJ ‹“/¾ÀÁõÔf7Sp üû¤XÈ$_„=æaà/„»¶§…'êðëÿ ÿ^øûÊ›¸ùc Ãå]̾Âaæ`Äf‚ØLps@D<¦?¨™Ð?H‰ÇW‡K]3£êºçþ\Œñs‡`Èø{7aOûp²öWâÜŸK0≉+”/3ãÐ_øaØÃ~›â‡~øWòüc}1š4Fxà³`Žª¹QDê Óãç·½<ö9bŸ“AGŒ™9˜a?€i#33ý*q!¸ Èû®ZâêXwþ±¡ wšñøê°6Çɘ}p˜9…·"¦à_Éw¤.…uáÆ‘ü+ùYÊÇ3%Âaæ$¢Ÿ„ê<*¯ñYLGD ÄþF…°©|€_*qw N"ù…l¨búã+B¥.…1G³™9‘¨éƒ¬†¾‰±öøl¦ùƒP™Ù}}3Þ|\†±Öx7“1&¼›É“3Ƭ¤)n’ºÖ 3ƬP“߈¤ç³‘¬FêRX;fŒY¨¹QÄ‹ó¡Õáó=–Ž†ÃŒõH^^ž©G\"‹/¾èPO·î ÿXWŒÆêfLùSXŸ>Œ¤ýúl½®[ÿÍÚâ0sb$Ò½®e$àïï%K–JJJ°{÷ndee™}_~~>ûº<›»q¤ÿ:p¿øc(úVôé¼Ú¯ÏÖëšuÃ̉ÝÉÖáû·oàÖYÝçˆ5kÖt: 4Ôü ¢(¢ªªªOk³µúÛzœ^}13ír»RûõÙz]³®q˜91Õ(oŒx"çþ|»ÃCf»#>ýôSÄÄÄ@¥RaÍš5عs'ÂÃÃáçç‡+V˜m£õîÎĉC†üÔíÍÁƒ1fÌxyyaĈعsg§Ó¶´süøq„††âôéÓ0 HHHÀàÁƒ¡V«‘ƒÁ8tèÆoooµù’Ûb¹Ú› Ç—À'H‰I‹BÌNo‹ºZGén] ‚€Ý»w#&&Ä|`zŸ­Öcwó·;bN­ú†Ž¶þŸtÊý®Êâ÷ øøxÒh4´mÛ6@³fÍ"FC[¶l!tçÎnÛÈÍÍ¥–ͧõßDDZ­–<==ióæÍTZZJÛ·o'Òjµ¦m~ê©§èĉ¤ÕjiíÚµ4sæLºyó&eddЄ héÒ¥¤ÑhH©TÒܹs©¸¸˜víÚE¨¢¢ÂfËÕ^s“‘þþ§"ªÌ¾+ɺm?Üþµ®ÖUK-Ï=÷ÕÔÔÐÖ­[ UUUÙt=v7;ÛËa&§WߤOdPS}³EÓ ôôt""ÒëõçæævÛFw_°êêjR(´~ýzª©©!Q©¾¾žŒFc—_ÔŒŒ Ó¸èèh*--5 ;vŒÆGMMM”MZ­–ŒF#:uªM­¶X®Þ²õºm?Üþµ®ÖUK-©©©æmËõØÝüíl/ß›)ÿç÷ÁÈÿ¡—¶–á¡·‡Zô_ß{¡U(÷F@@RSSñç?ÿ‰‰‰˜0a–-[†§žzªË÷DGG›þ.,,DPPP›×ýüü T*‘““ƒ×^{ Z­ãÇ·ërYÊž5tµ®Zw˜·-×£¹ùÛ3“Ïîx`~2÷T ®Hú«Óu:DQľ}ûP]]yóæaúô騮ÜÖ_’ÀÀ@äææ‚ˆ@D¨©©AZZt:fÍš…„„¤§§cÓ¦MöX‡ÖÕºjáæÖñ+nËõhnþöÄa&1ÏbP”·CtÞ(¦M›†¤¤$h4èõz( x{{›¦Ñjµ]¾ÿÙgŸÅ²eËPTT„ŒŒ ÄÅÅáã?FSSôz=”J%t:õõõ}¾LŽª«uÕ[®ÇžÌ¿¯p˜É„à&à?wD!òW¥.^^^øüóϱdÉ :7nÄž={àåå…°°0Lž<¹Ã®Ik«V­‚¯¯/Æ©S§bìØ±X»v-üýý±aÃÌž=ÑÑÑ C||<âââì¸tŽ¥«uÕ[®ÇžÌ¿¯p@Œý[s“m‰þá^R—¬Ç]1ÖâÜÆÛ8¼ F=÷äëŒøl&ë’¹{åô£>ïH5²öWâÉõ#à®ìûÿã]iÝÚ ‡ë’«|¡êoëqfõ-Ä<ˆ°)öyº’«¬[{âÝL`Ôó§+÷nWÊ¿w»ÒBó·+1ÇÅa&s×öTâà«×ÑÜÄÇ:“þ¿¥¨ÉkÄÔ÷Ãí²{Éúz2ú ?Ô—è‘úN¡U7£»‚Ûçëqù³2<ôÿ E@ŸÁtvf2ç¬ÄcÿŠNÕ!}k©Ôå8”þjFÇ«;S%u)Ìø:3‘µ¿gVߤ…!ý‚Zêr³µ}|6ÓEÄ>§³ënÁ]醘眯·WƺÃaæBF=¯‚¶L3koaÀ0%†>4@ê’³3óІ¢¿Zõýò~øs=|ÌŒ1&|o&s •×îÂÐÀצȇ“½»åz|÷Ö \þ¬LêRXâ0c²&6Ž%äÃgˆ^bþ Ìiq˜1}½ÿü¤¢A>‡Q/n)EÍFLYÅ·+ɺ̤&¿×¾ªÄßÞÌC“¦Yêrzíö¹z\ÙQ†‰o‡ðíJ.€ÃŒ™ Û¿ÞÍ­F˜s5ùR—ÔcºjRÿXˆð'øaÁaÆÚt_?<ûu |‡*qàwÿBÁñZ©Kê‘Óÿ} ‚;ðð’aR—Â섯3c „3ÜÂõw0áõ ŒŸ;‚[÷½£:’¼#ÕðT øÿøJ] ³}f¬[Y{+‘öámüê“H Çw 0‡ÅaÆÌk¨2À{ýžÎXð£{ñIDATÌ<2æ 8Ìc²ÀaÆ“3Ö+_”ãÈòÐpÇ ÉüI$¦:çå#̶8ÌX¯Æx£æF#ÌùŠÓ4vŸÿ¥OËpbyêo7Ù}Þ̱ðÙL'õ‡?üÙÙÙR—P&4ü' ÃpÔÿCˆ0ÚmÞ£tO@/èëuÆn󴵘˜|ôÑGR—áìøÒ g%bcc¡V;ÎÃIäƒà¼·@I¡¢¢YYYü„óÞãš8³ßüæ7xì±Ç¤.ƒõÂÉ“'ñÞ{ïI]†,ð13Ƙ,p˜1ÆdÃŒ1& fŒ1Yà0sS¦LéòßíÛ·1eÊhó·µmþò—¿Ä[o½…¼¼¼>YkjëÌ_|)S¦àË/¿´y=½­õŸÍt!ýë_Ôa¼»»;âãã{ÝfCCvíÚ…÷Þ{_|ñÁqú?#"œ8qjµ©©©xá…zݦi½µþ›Iƒ™¹ 8°Ã????ÌŸ?¿×m†„„`Á‚(..F]]«ï‚‚ܼy‹/F^^Š‹‹{ÝfëõÖ›uÈlƒÃŒu»‹ÔÜ܌͛7cÆŒ˜1c6oÞŒææ®vâîîôïßߢ6þñàµ×^C\\fΜiÚE_ý5æÌ™ƒ_ýêWxë­·ÚÜñÐU›-Ë’žžŽçŸW¯^œ8qcÇŽÅ<€ÐÐPœ8q¢MÝgϞżyó0mÚ4¼ð 8zô(Àh4â³Ï>ÃóÏ?gžy«W¯†V«í°Þx7Szf.¤±±:®Í?£±û[öïßÒÒRlÙ²6l@zz:>ûì³NÛ¬ªªÂöíÛñä“OB¡P˜m£¡¡ï¾û.Fމ]»vá7ÞÀÖ­[Q[[‹¤¤$ìÙ³óçÏÇÎ;1gÎlÞ¼ÙâºöîÝ‹¥K—bäÈ‘¦]ÌÇðÈ# 55µÍ2¬\¹Ï<óŒ)@?øà466bÿþýøûßÿŽÕ«WãÃ?Ä­[·°k×®^Ìöø˜™ yõÕW;Œûïÿþo„††vùžï¾û~ø!µZ×_›7oÆk¯½Öi›ýúõÃ'Ÿ|bQ¯¼ò ¶oßµZ OOOÓ­YwïÞÅ·ß~‹ à¿ø`РA˜?>V¯^Ým›¿úÕ¯óçÏLj#ÙÙÙ¨¨¨À#<à^˜íÚµ ‡Á`A§ÓA©T"..=ö<==qøða¼öÚk¦¶–,Y‚›7oZ·â™]p˜¹]»vaèСÆß¾}»Ë÷”••aæÌ™mƵޅlÝfSS>ýôS|ðÁøøãͶáááââb¬_¿:#GŽ4½^YY‰ÈÈÈ6ïi KêjÐ'Nœ€ÑhÄþç¶™>55áááðõõŇ~ˆýû÷ã³Ï>CTT^xá<ôÐC(//GHHˆé=ÇÇðáûX[LJf¬[~~~øðÃM¥ÕjQ]]Ýé´žžžˆ‹‹Ã¡C‡@D¦³™]µÑÔÔ„•+WbåÊ•˜4i ¾ûî;À!CpãÆ DDD˜Ú/,,´¸.{›¶(ŠHMMÅïÿ{üú׿6½þÙgŸ!55¯¼ò ôz=DQÄÊ•+ÑÜÜŒãÇcùòå8pà „²²2„‡‡òòò––†_|±Wë•Ù3cÝúÅ/~­[·¢¼¼ùùùX¼x18Ðåôýû÷GCCt:Ù6 š››ááá½^o:æÕÐЀ§Ÿ~Ÿ|ò Μ9ƒêêjœ?Ÿ~ú©Õuedd ¦¦O>ù$úõëgú÷ÄO ¸¸yyy øûßÿŽ»wïÂ`0ÀÃÞžž˜6m¶mÛ†‚‚àþçP^^nÃ5Ìl…™±nÍ›7ýë_ñÚk¯A<òÈ#xýõ×»œ^¥RÁÛÛÞÞÞݶáéé‰7Þx«V­B¿~ýð /àñÇÇâÅ‹‘””ƒÁ€O>ùUUUˆˆˆÀŠ+ðûßÿ¾Û6ïܹӦž'N`„ ð÷÷o3~äÈ‘Fjj*æÏŸeË–aË–-¨¨¨@pp0¡T*1{öl466"!!˜8qb·ËϤÃý™9)A˜˜È]9¹–.€økØkü¨9Ƙ
pktools-2.6.6/doc/html/ftv2node.png0000644000113200011300000000012612647637661014112 00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask-members.html0000644000113200011300000002223012647637662025207 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pksetmask.pksetmask Member List

This is the complete list of members for qgis.pktools.pksetmask.pksetmask, including all inherited members.

cliName (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmask
defineCharacteristics (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmask
EXTRA (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
group (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmask
INPUT (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
MASK (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
MSKBAND (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
MSKNODATA (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
name (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmask
NODATA (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
OPERATOR (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
OPERATOR_OPTIONS (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
OUTPUT (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
processAlgorithm (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmask
RTYPE (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
TYPE (defined in qgis.pktools.pksetmask.pksetmask)qgis.pktools.pksetmask.pksetmaskstatic
pktools-2.6.6/doc/html/pkascii2ogr_8cc_source.html0000644000113200011300000005503412647637661017105 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkascii2ogr.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkascii2ogr.cc
1 /**********************************************************************
2 pkascii2ogr.cc: program to create vector points or polygons from text file
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <string>
21 #include <fstream>
22 #include <assert.h>
23 #include "base/Optionpk.h"
24 #include "imageclasses/ImgWriterOgr.h"
25 
26 /******************************************************************************/
70 using namespace std;
71 
72 int main(int argc, char *argv[])
73 {
74  Optionpk<string> input_opt("i","input","Input ASCII file");
75  Optionpk<string> output_opt("o", "output", "Output file");
76  Optionpk<string> ogrformat_opt("f", "f", "Output sample file format","ESRI Shapefile");
77  Optionpk<short> colX_opt("x", "x", "column number of x (0)", 0);
78  Optionpk<short> colY_opt("y", "y", "column number of y (1)", 1);
79  Optionpk<bool> polygon_opt("l", "line", "create OGRPolygon as geometry instead of points. Fields are taken from first point and polygon is automatically closed (no need to repeat first point at last line). (false: use OGRPoint)", false);
80  Optionpk<string> fname_opt("n", "name", "Field names for the columns in the input ascii file");
81  Optionpk<string> ftype_opt("ot", "ot", "Field type (Real, Integer, String) for each of the fields as defined by name","Real");
82  Optionpk<string> projection_opt("a_srs", "a_srs", "Override the projection for the output file, use epsg:<code> or Wkt string", "epsg:4326");
83  Optionpk<char> fs_opt("fs","fs","field separator.",' ');
84  Optionpk<int> verbose_opt("v", "verbose", "verbose (0)", 0,2);
85 
86  bool doProcess;//stop process when program was invoked with help option (-h --help)
87  try{
88  doProcess=input_opt.retrieveOption(argc,argv);
89  output_opt.retrieveOption(argc,argv);
90  ogrformat_opt.retrieveOption(argc,argv);
91  colX_opt.retrieveOption(argc,argv);
92  colY_opt.retrieveOption(argc,argv);
93  polygon_opt.retrieveOption(argc,argv);
94  fname_opt.retrieveOption(argc,argv);
95  ftype_opt.retrieveOption(argc,argv);
96  projection_opt.retrieveOption(argc,argv);
97  fs_opt.retrieveOption(argc,argv);
98  verbose_opt.retrieveOption(argc,argv);
99  }
100  catch(string predefinedString){
101  std::cout << predefinedString << std::endl;
102  exit(0);
103  }
104  if(!doProcess){
105  cout << endl;
106  cout << "Usage: pkascii2ogr -i input.txt -o output" << endl;
107  cout << endl;
108  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
109  exit(0);//help was invoked, stop processing
110  }
111  if(input_opt.empty()){
112  std::cerr << "No input file provided (use option -i). Use --help for help information";
113  exit(0);
114  }
115  if(output_opt.empty()){
116  std::cerr << "No output file provided (use option -o). Use --help for help information";
117  exit(0);
118  }
119 
120  string theProjection;
121  theProjection=projection_opt[0];
122  int ogr_typecount=11;//hard coded for now!
123  while(ftype_opt.size()<fname_opt.size())
124  ftype_opt.push_back(ftype_opt[0]);
125  // vector<string> fname(fname_opt.size());
126  vector<OGRFieldType> ftype(ftype_opt.size());
127  if(verbose_opt[0])
128  cout << "field types can be: ";
129  for(int ifield=0;ifield<fname_opt.size();++ifield){
130  // fname[ifield]=fname_opt[ifield];
131  for(int iType = 0; iType < ogr_typecount; ++iType){
132  if(!ifield&&verbose_opt[0])
133  cout << " " << OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType);
134  if( OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType) != NULL
135  && EQUAL(OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType),
136  ftype_opt[ifield].c_str()))
137  ftype[ifield]=(OGRFieldType) iType;
138  }
139  }
140  //todo: what if unknown?
141  if(verbose_opt[0]){
142  cout << endl << "field types are: ";
143  for(int ifield=0;ifield<ftype.size();++ifield)
144  cout << OGRFieldDefn::GetFieldTypeName(ftype[ifield]) << " ";
145  cout << endl;
146  }
147 
148  ImgWriterOgr imgWriter;
149  imgWriter.open(output_opt[0],ogrformat_opt[0]);
150  try{
151  if(polygon_opt[0])
152  imgWriter.ascii2ogr(input_opt[0], "New Layer", fname_opt, ftype, colX_opt[0], colY_opt[0], theProjection, wkbPolygon, fs_opt[0]);
153  else
154  imgWriter.ascii2ogr(input_opt[0], "New Layer", fname_opt, ftype, colX_opt[0], colY_opt[0], theProjection, wkbPoint, fs_opt[0]);
155  }
156  catch(string errorString){
157  cout << errorString << endl;
158  }
159  imgWriter.close();
160 }
pktools-2.6.6/doc/html/inherit_graph_23.png0000644000113200011300000000333212647437044015505 00000000000000‰PNG  IHDR“%FvÛ}bKGDÿÿÿ ½§“IDATxœí›]H“ïÇ¿OsnX¤iÓ–Ó@ƒŒ"ìB°…(è L“aFvPEL( ìÀ 7:¨ŒÌ‚^6m1 O¢d!VÌÕ*-1#EÐÉ6ߦîû;øÿ}þ›nóíÑ~ý¹?ðÜ÷õìz®ïµïîçáÞ&‘$‚ùS»äOW øÿA˜I ÂLÅf(FL¸Éºº:TWW/v-‚¿­V‹ªª*¤§§O‰…5“ÅbÁ—/_““³àÅ þ.jkkQZZ:s3@NN,Ë‚&øû$)bL<3 C˜I ÂLÅf(†bf’$ mmmJ¥ûW"IRÈ}ûö¡½½}^yïܹƒÔÔTy’X³f nß¾õõmmmQŒ ±2Í’ææftuuá÷ïß°Ûí8|øð¼r¡»»ÍÍÍ!óïß¿Ggg' 畱ˆ¸5 N§ÃªU«z½5550 ðx†¡¨¨ˆEEEáBÀÖÖÖqaa!Ýn7kjj€½½½¼~ý:7lØ@‡ÃÁ––nß¾&“‰$ÙÚÚJÜ»w/ß¾}KŸÏÇ«W¯òàÁƒüùó'·lÙÂsçÎÑãñ066–ÇŽã¯_¿øìÙ3`OO}>5 ïݻǮ®.>|ø111ôù|$1çL4~üø‘^¯—‡mmm,((à¶mÛäsJJJ˜ŸŸÏïß¿ÓáppãÆ¼téÒ´5¹Ýnj4Úív’¤Ëåâ’%KØÝÝM’QõNô-¸‡LÏU{pÌfs¸eAÍÔØØH’ôûýr|ݺu´Z­òyŸ?–LJÏÊÊbWW—<~ýú5³³³922B—ËEŸÏÇññqÚívù}}}T«Õ¼qãÝn7½^/ÇÇǣ有ÆàC­Vs×®]²n¿ßO•JE§Ó)¿ÆjµríÚµÓÖD’àÉ“'I’—/_f^^ž‹¦w6fš«öàü3}ýúuJ\«Õ²¥¥%lŽ á~¿_žÓjµSÞÄøøx’¤Ífcnn.³³³YVVRCSS ¹téRîØ±ƒ 3Ê9“éìì$ És‡ƒZ­vÚšHÒb±0%%…cccܺu+«««Câ‘ôF3Ó·oßBÆsÕ܃?b¦p㌌ Ö××Ëó>|`ee%É© IƒÁ’ÇívÓårqpp†6›@€CCCò5ùîÝ;’ÿùD?zôˆ*•н½½QsÎVãd&V¦OŸ>És/_¾dffæ´5‘äÀÀ—-[ÆÇ3&&†===r,šÞpf%I666†ôt®Úƒ{ÉL‹¾5PZZŠ .ÀétÂétâÔ©Sèèèˆx~AAΟ?ŽŽ8ìÙ³UUUßïGll,†††PQQðz½$ »wïÆ‹/àñxà÷û¡V«5ç|Q«Õ(..ÆéÓ§ÑÞÞ§Ó‰‹/¢¤¤dÚš ..û÷ïÇ™3g——N'Ç¢é &!!ðäÉx<ܺukFýT„p[È•ixx˜&“‰«W¯f||ýû—4ýIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_17.md50000644000113200011300000000004012616110567015374 000000000000008cb6dde6a68c795b9bab261632e7a838pktools-2.6.6/doc/html/md_examples_pkdumpimg.html0000644000113200011300000000676412647637662017135 00000000000000 pktools: examples_pkdumpimg
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkdumpimg

Examples of pkdumpimg

We create a 5x5 raster dataset containing all 0 values except for its center (value=1)

cat input.txt
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0

Use pkascii2img to create an raster dataset from input.txt

pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000

Dump the image content of output.tif to screen

pkdumpimg -i output.tif
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
pktools-2.6.6/doc/html/structsvm__problem-members.html0000644000113200011300000000724412647637662020135 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
svm_problem Member List

This is the complete list of members for svm_problem, including all inherited members.

l (defined in svm_problem)svm_problem
x (defined in svm_problem)svm_problem
y (defined in svm_problem)svm_problem
pktools-2.6.6/doc/html/tab_h.png0000644000113200011300000000026112647637661013440 00000000000000‰PNG  IHDR$ÇÇ[xIDATxíÝMÁ@†áž~¥ÜÆÎ’Evˆ¿"!•²‘d*×rGq=Š{¼ßSݧçë­ÓÉHÇ uO^õø[À_‡¢ãXvyËþÒ±=·VCffææ{°öŠó´Rçœ%_õçÿŽ¢ö·°Çrug¶(?gh\i>|sIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_38.md50000644000113200011300000000004012647437044015405 000000000000007be29cee47604c598e9b41d6f6d26540pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite__inherit__graph.md50000644000113200011300000000004012616110566025267 00000000000000425d972d11444a735f88cea7a9295e8apktools-2.6.6/doc/html/classSolver__coll__graph.map0000644000113200011300000000021312616110567017324 00000000000000 pktools-2.6.6/doc/html/classUi_1_1MainWindow__inherit__graph.md50000644000113200011300000000004012616110567021503 000000000000000ee01170730be0f29279620ebd50f876pktools-2.6.6/doc/html/inherit_graph_18.png0000644000113200011300000002021712647437044015512 00000000000000‰PNG  IHDRÃX‰PœêbKGDÿÿÿ ½§“ IDATxœíÝ{TSgº?ðo‰ˆ’È- R@!¤Ž€ŽZÅK«K—Og±ð€åè¯S™V­®êœ¶alçèÒ̈R;·å‘j[]ZGtì,N)ö8í”8="P›€{  !y~ÄìADD‚äù¬•%{'û}Ÿ@|Ÿ¼—½·ˆˆŒ1Ƙë:&vvŒ1Ƙ³q2dŒ1æò82Æsyœ cŒ¹¾úê+ÔÔÔ ¦¦%%%ÇòåˇÕi•••˜={6qæÌ|ú駯ܹsqùòeg‡ÇذǧV0vþþþP©T•J…;v@©T¢¾¾ …ÂÉÑÙ¤§§cΜ9ÈÊÊzq±±±0ÈÈÈÀœ!cÃ÷ Ùˆ$‰ðÁ`Ò¤Ið÷÷ÇöíÛqðàALœ8r¹›7oöìÙƒ¨¨(Èd2,X°¹¹¹} J$H¥RÈåraŸÙl†V«…R©„B¡€V«…Ùläææ"66žžžÀöíÛ‹;wî„F£——âââpîܹû–i¶ÌÏÏGpp0¾üòKäççcÆ =âÎÌÌÄk¯½Ö¯úî'c.f)11ñŽ@ƒÁa;99™ŒF#íÛ·PRRFÊÊÊ"ÔÐÐ@{÷î¥ÀÀ@:uêÕ××S^^©Õj²ÿ×@EEEÔÒÒB---TUUEëÖ­£U«V9ÔŸ‘‘AË–-£ŠŠ *))¡©S§Ò¦M›Èh4’T*¥””ºyó&:tˆP]]íÚµ‹ }üñÇT]]M'Ož¤ñãÇ uß«LƒÁ@èÙgŸ¥3gÎPcc#‰Åbºuë–=^ûƒˆú¬¯¯8íõ=ˆììì>†1':ÊŸV6ì V2,,,$"¢ÎÎÎ^· Mž<™>úè#‡²>ì ï~Œ;–._¾ìpLdd$ÕÔÔÛyyyCTZZJ&“‰, ={V¨[£ÑÐþýûÊ9pà€P÷½Ê´'§’’""ªªª"BÒë-n"ê³¾¾âädÈ\ÀQž3d#–——Û°foÛP^^ŽÉ“';å°m0 V«mmmزe RRRPPP ¼æúõëp8N.—C*•B¯×ãå—_†ÉdBll¬ð|ee%bbbŽ™2eÊ}Ë´‹ŒŒ`›Çôðð€Á`ʧ;‹{š››áããsßúúŠ“1WÀs†Ì¥…„„àÒ¥KûJKKïùzOOO¼øâ‹¸té’ÃjR??? ˆÍÍÍÐéthooGRR´Z- ±{÷nᘠ&ô8õ¡{,÷*ÓΞÔÅb1.\ˆ÷Þ{¯G¼ÙÙÙýª¯¯8sÜ3d.mýúõHMM…¯¯/¦M›†ââblݺµÏ42™ ---0™LBo3!!o¾ù&233qûöm¬^½Ó§OǯýktvvB*•¢½½Û¶m´´´`íÚµÐjµËå˜9s&ŠŠŠ°eË¡ž{•¹qãÆ1¥§§#..2™ +V¬€ÕjENNNœ8!$;êëèè¸gœö÷ÈØˆæÌAZÆz3Xs†ýÙ¶X,ôî»ïRXXÉårZ²d åää¿¿¯ÇY,’ÉdtíÚ5aŸÑh¤U«V‘··7ùúúÒêÕ«©µµ•ˆl W|||(((ˆvïÞMÉÉɤP(¨««‹vîÜIjµšÆŒC³fÍ"N'̵ݫÌ{ÍáÒÂ… I&“Qdd$mܸ‘L&EGGÝ·¾{ÅÉs†Ìåû²a')) †äN¹¹¹ Btt´°ïøñãHKKÃ… yý#•ýNܼ°ÇÄ1ž3d.­¤¤+W®Daa!ÚÚÚ Óé°yóf¼ôÒKÎ16„xι´ÔÔT´µµ!>>õõõ EJJ Ö¬YãìÐ\‚ÕJ¨¨hÄ¥KU(-­ÁÅ‹UhnnÅ_þ²‰›³Ãc.„“!siîîîHKKCZZš³CñL¦”–VãòeÛãüù(/¯CG‡íJ=nnbX,V¸¹‰ùÂàlÈq2dÑ"Ï5=îFš€wÞ9…o¾¹‰’’JÔÖ¶€ˆ Ûîb±X^oß ò…»;Ïà°¡ÅÉ9EGG¾ý¶7n4B¯¿½¾7n4âÚµzù!&¦ÞÙ!²‡ÐÖÖoïçðÎ; ‚íB86V+9lw'‹©’뎓¡ »x± Û¶å ²² :Ý=’:Ìf ®^­GYY-ÊÊê ×ßBy¹m»­­"‘AA>P«˜=; /¼0þé‘ÄÂ†Ž§§;êë÷ã?ÿsþüg$wtttÝ÷8ww7„„øA„Œ9âS+\PEE#~ûÛ“8q∥¥éË=T¡¢¢ øöÛ[ÐëoÝù··o·ÆŒ…¨¨ñˆˆP!$Ä  Þ=†Ä†òÔ öht?µÂ`¨ÅŽŸâo+»»f³åžÇ‰Å"X­‰Ä 'ú#"B…à`_h4JDD¨ V+áé)ÂwÂ\ı^{†×¯_ÇéÓ§‡:6<<<ðüóÏC*íÙ`ÔÖ‘™ù)Ž9±X Û× Ûw!½¾Ó§Oì³l‹Å*ôîºm^¿Þ£± TʠѨ0eJ§ßI|J(•ò>˾ÛÕ«W{½¼{<œ?^ø9<\‰½{_Äùó7ðöÛ9ø¿ÿ»±XÜcΰ ¡¦§' «ËöY+/¯Ã¹s娫k!IªÕ „…) V+ V+¦€Læ1¨ïÛÁ‘)<<Ï<óLý½ö “““qäÈ‘! Œ ¾ãÇ#!!AØ6¿Çÿøöî= «ÕŠ®.ÇFÈÍMŒŒŒDüÇ<hmíÀ¥KUB²³'¿êêï`6[ Û†6í½;û·öß÷.»{ýõ×±k×®‡.‡9Wpp0nܸÑcÿ_è±yóÇ(+«`ŸC´‰D0¶÷èý™ÍTW'|oܰB\¾\ÖÖ€L6&ø _À4Ûg2""£F=øŒ·ƒ#“»»»p¯ÑnŽõš y˜êñ%‰¤¤$tvvaïÞ³øÃòÑÞÞÑ# ÚI$n˜<9ã`0Ôâúõa(+0Ðjµ jµáá¶FÆÇgÌP¾-6ÂX­„“'‹±m[êêZî|6 þþ^(.~ûʺ}»M–ïþå­¢¢ Dww1½ï ·ª„/n‘‘ð÷¿÷uW¹yú¸2RïäìñF:T€wÞù;êë°Z{­Þì‹\ RɱdÉ®Dx¸jµcÆŒ²¸™ë‹Exî¹,\…½{ÏâOú ­­f„‡+¸,¹Ü3f„bÆŒP‡ý]¸v­áNb´õ$¿þúÖ¡½½S8ÖÞ“üa~ÒöŹN†#ŒD¢Ä»ï~ƒŠŠˆD¢~_ÒÓS‚÷ßOyÄÑ1æÈÓSŠá…fã¿ÿûs<ùdà •-•º#"ÂÖ쮳³ ååuœ¤^_ ½¾Ÿ~úM·!WøøŒÅO˜-6¼q2a¼¼âPQa‚Hdþ4›»ÐŸ|xë–ßo†‡‡äþ/fly{Á[oýÛÔ%•ºcÒ¤ñ˜4i|窪šQ^nK’ÙÙ¼€Ë•p2aššþŠßýî}„„LÁåËÕ(-­ÆÅ‹Õ¨­½ ÀÖ¸»»¡½½Ã!I®^­GTTÏ‚1WèÀ@oÌ›O?ý£³ÃaChЮy$‰PVV6XÅ9”Ûý1zôhÄÅÅ¡¨¨hÐë½^¥K—ÂÛÛ*• ñññ=î&~·²²²û^{±?¯éžˆŸŠ·Þú7<¸.lÅ•+¿Áÿüϫض-Ë–MCtt°°bÏ^}ucl`e;Ø[¹SßÀÛ˜3üÚÈÞ==ï¾ú 'ÚÎkiiAzz:–/_Ž+W®<Ô/ãêÕ«˜1ct|ee%fÏž„„œ9sðá‡bîܹÐétˆŠŠplƒM&™3C1s¦ã"ƒÊÊ&\¹Rƒòòz̘Ñ÷y†Œ1×âJmäc‘ ýýý¡RÙ&ÁU*vìØ¥R‰úúz(_õeµZÑØØ8àãÓÓÓ1gÎdee I966F£8pàÀ€Ë*AA> òÁ¢EÎŽ„16ܸRùÈ. /‰ðÁ`Ò¤Ið÷÷ÇöíÛqðàALœ8r¹›7o`›«Ú³g¢¢¢ “ɰ`ÁäææöÙã“H$J¥Ë¸ªInn.bccáé鉀€lß¾]xî“O>Á”)SàááÐÐPþøcª®®¦“'OÒøñã @Ÿq÷[ÿÙÙÙ|cÌÑpk»—Û[}ö6cñâŤ×ëI§Ó‘Z­¦­[·j;ô8·‘ÙÙÙ÷:æè#M†………DDÔÙÙÙë¶Á` É“'ÓG}äPÖáÇ>w?ÆŽK—/_^ßÑÑA¥¥¥d2™Èb±ÐÙ³g…ò›ššH"‘Pff&577“Õj¥––²X,½þ2###©¦¦FØÎËË£˜˜áµ%%%DDTUUE„?ho±i4Ú¿¿C }ÆÍÉ1çní`“¡½"²5þjµzPۡǹì+>Ò;hzyÙ.u$‘HzÝ€òòrLž<Ùḻ'U ˆD„ÖÖV¬Y³))?œ .•J¡×ë±dÉL›6 û÷ïžóööÆçŸN‡'žxóçÏÇ_|±¸÷·~ýúu«W-Z„k×® ÏGFF° xxxÀ`0ÏÙcljjöUVV"&&Æ¡Ž)S¦Ü7nÆØÈ0Xí ÝuÂðÝÛváááÂÏ‘‘‘¸yóæ ¶C#µtúí¤CBBpéÒ%‡}¥¥¥÷|½§§'^|ñE\ºtIø0´··#)) Z­………ؽ{·ðúöövX­V;v MMMøùÏŽçž{ÎáÑŸŸŸCòmnn†N§ž·€Åb1.\Øë²³³…Ÿ'L˜Ðc±ýýö7cÌuܯ îq Eii)ÜÝÝä°¿{òÑëõ?~ü ¶C#µtújÒõë×#55¾¾¾˜6mŠ‹‹±uëÖ>'Že2ZZZ`2™àåå…ŽŽtvvB*•¢½½Û¶m`; C$añâÅ8tèæÏŸÎÎNH$xzz Ñd2aìØ±€„„¼ùæ›ÈÌÌÄíÛ·±zõjLŸ>7nìGzz:ââ⠓ɰbÅ X­VäääàĉÂbíÚµÐjµËå˜9s&ŠŠŠ°eËè3nû·GÆØÈw¿vðÅ_Ä«¯¾ŠßýîwxòÉ'qõêUhµZ¼ð 5ÊñúÁ7nÄ{gææf¼õÖ[X¹r%|}}ªr‰6²·ÁÓÁ+ï϶Åb¡wß}—ÂÂÂH.—Ó’%K(''‡üýý{=ŽˆÈb±L&£k×® ûvíÚE>>>D»wï¦äädR(Dd' #©TJ‘‘‘”““CDDf³™æÌ™CcÇŽÊ1´jÕ*òöö&___Z½z5µ¶¶Þs|º°°.\H2™Œ"##iãÆd2™(::šˆˆºººhçΤV«i̘14kÖ,ÒétBY÷Š›ç s®áÔšÍfÚ±cEDD‡‡…††Ò¯~õ+jmmʲ·ûöí£òóó£W_}•ÚÛÛÜ´6²¯9C§ßÂ)77AAAˆŽŽö?~iii¸páÂ#¯¤é~ 'ÆØÀ=ní`YYÂÃÃû}q~WÔ×-œœ>gXRR‚•+W¢°°mmmÐétؼy3^zé%g‡ÆcC‚ÛAçsúœajj*ÚÚÚúúz„††"%%kÖ¬qvh.¡ûåØâãc¡RÉïclP F;(“ɸÝ|NO†îîîHKKCZZš³CÑŒÆv”–ÖàÊ•\¾\o¾¹ ½þÚÚ:…ûŽ??ýiÌý cŒ ªÁh öìÙ3ˆQ¹§'C6ØÄ¨©iÃ_ÿZ($½K—ªÑÐÐpss`»’}üœïîÍsUœ GŸxddC$*†DâÞãæ¾Ý“`w"‘¡¡þC%cÃOW—Ðëo¡¬¬ £áç×îì°Øád8´´üOâúõX­Ö~ÝåT*ßåž ¹›7›áã3F¸·æPhmí@YYÊÊja0Ô¢¼¼C-®]«‡Ùlû²¨RÉáî.ádèB8Ž0fs-~ñ‹ÉˆÁÖ­9¸r¥"‘V«µÏã,+~ö³}WB­VÿÊåžC9s%UUÍØ±ão8~ü<~ñ‹Åxã%ƒZ¾ÅbEYYôú[¨¨hÄ·ßÞ‚^_‹7qûv`̘Q S@£Q"1ñÇÐhTÐhT?~$7>=ÉÅp2¡æÎÕà³ÏÞ@nn1Þ~ûjj¾ƒÕÚ{7Q"qGh¨|þy)öíû:;» …×Ĩ„FcûW­V `ÜP¾6B45µâ÷¿?>ø€m¾º´´fÀåµµu¢¬¬VHvöÄ×½—§TʠѨ0}úD¬\9 !!¾Ðh”P*yå4ûA¯ÉÐÍÍ GŽy¨»È3çqw·ýYE"ž{.K–üÙÙÿÂo~ó ZZ:`±8ö- –/ŸåËgûnßnÛ¿·ð¿ÿ{M "H$n?~œðmZ£Q""BµZ9¨C^ÿüç?±`ÁtvvZ™ìÑÑjµØ±cGýFc;þøÇ|ìÝ{V«Õá3XZZ}ßrëêZðí·5¸q£Qø<êõ·P[k¸¹‰¦@D„ ‹=)|CB|<ºÁíàÈd_Dx·^¯@sõêUœ?þ‘ÅŸ››~ò“ŸÀÃãÇs­­Ø¿ÿKìÚõw˜ÍVtuý°˜æ“O~iÓBî[¾ÑØŽë×pãFãÉ–,ËËë„ÎþM\£Q RDDŠ¿– ýŠCqöpvíÚ…   ‡¿UGGöí;‹ßÿþ3´·wöø"ØÙµk;!‹PYÙ$$ºÞ†6==¥Â(ED„ ÁÁ¾ÐhT õ‡DÒ{#7PÜŽLJ¥óæÍ»{÷±^“!Ù**±}ûß“sb±‹¥¥é5?h6[P]ý]†¬¬¬mm¶^\î) QED¨„„䱸÷oß}\>‰ 3Ý/_f±Xñç?ŸÃŽŸ¢©ÉtÏ!z»ýè TV6á»ï~Hzaa aNÏ><¦ô¤Ç€c)Âo{7n4 ~¬hÁÏo,þýß,ÌOŽãáI6¤¸gÈœÂj%ܼÙtgÅ_­°ÌÝ`¨uèøúJñõ×;aµ~ïäˆÙý$$<Ë—}`4Ž‚H„~ŸÖ#‘¸aÓ¦¥xå•gm€ŒÝ÷ ™sˆÅ"û"8Ø Lrx®¡Á½Þ6yúôWø×¿:œ%{]]btu‰áæ&†Åb…X,‚››f³ÝyôìíÊÊê†:\Æp2dÃŽŸßXøù©1{¶£FÝÄ¡CÎŽˆõ‡‡G¦N­ÃGýeeu(-­ÆåËÕ¸xñ&.^¬BSS+[OP$ §ïtuYûµ¢”±GÉé·pbl°‰D"”•• j™ëׯÇÌ™3öedd@$¡¼¼\ØWYY ‘H„Ï?ÿ¼Geeeƒ:¦×ë±téRx{{C¥R!>>ÅÅÅ}ÓŸ6N‰Ä “& !aþ뿞Ñ#¯àâÅ4””üGެŦMKñÓŸÆ@­VÀÍÍÖUW7àú Ü3d¬ž~úiìÝ»ííí=z4à³Ï>ƒX,F^^ÂÂÂJ¥xê©§z”1nÜ8üò—¿`[¶?cÆ 444 (žÊÊJÌž= 8sæ àÃ?Äܹs¡Óé5 r%?¿±˜7/óæEûÌf ÊÊjï»Ú”±G“!cý0oÞ<˜Ífœ?sæÌA{{;¾øâ üìg?C^^Ö®] Ðét˜1c†0»óóóÃöíÛV«Ž'==sæÌAVV–Ћ‹…ÑhDFF80ಇ’­9ÞÙa0ÆÃ¤lä‰Døàƒ0iÒ$øûûcûöí8xð &Nœ¹\ŽÍ›7°-䨳g¢¢¢ “ɰ`ÁäææB$A©TbÒ¤I(((`»2NPPV¯^üü|tuÙæ¿ 0þ|? 7æçç#88û÷ï—½ç¨R©„8Íf3´Z-”J% ´Z-Ìfsr¾üòKäççcÆ =†3333ñÚk¯°]YhçÎÐh4ðòòB\\Î;'¼677±±±ðôôD@@€¨sIÄØ0–Mú1@ƒÁa;99™ŒF#íÛ·PRRFÊÊÊ"ÔÐÐ@{÷î¥ÀÀ@:uêÕ××S^^©Õj¡þW^y…âã㉈(55•Ö¬YCf³™ÆGôý÷ß“T*¥Ó§O‘Á` ôì³ÏÒ™3g¨¨¨H(Ëþ\w´lÙ2ª¨¨ ’’š:u*mÚ´©G9$‹éÖ­[±---"¢]»v‘B¡ ?þ˜ª««éäÉ“4~üx@F£‘¤R)¥¤¤ÐÍ›7éСC€êêêz­?)11ñcl8ÊÉ kƒ• ‰ˆ¨³³³×mƒÁ@“'O¦>úÈ¡¬Ã‡ õ9r„ Y­Vš:u*;vŒˆˆ–-[FÛ¶m£‚‚rss’‘=©”””8lßý³]dd$ÕÔÔÛyyyÓ£œªª* ÔcÝDD†öïßïPÇuttPii)™L&²X,töìYá÷Àɹ £}:6nÜØã¸ôôtÄÅÅA&“aÅŠ°Z­ÈÉÉÁ‰'„¤¹víZhµZÈårÌœ9EEEزe  ££J¥hooǶmÛ---B¯™1WÂ=CÆîX·n^ýu¬[·aaaعs'vìØ???á5O?ý4`áÂ…Ç.^¼b±qqqýªk„ ˜3gŽÃ°hZZ¼¼¼‹  ::½/¾øçÏŸÇܹs‘œœŒææfüãÿ†vׯ_­V‹7Þxjµo¿ý6> ÀvÎã;#+V 22&L@rr2–,Ü;Î3ö¸à u³am(oá”››‹   DGG ûŽ?Ž´´4\¸pá‘×ÿ¸ë~ 'Æ3ǸgÈØ%%%X¹r% ÑÖÖN‡Í›7㥗^rvhŒ±GŒç »#55mmmˆG}}=BCC‘’’‚5kÖ8;4ÆØ#ÆÉ±;ÜÝÝ‘––†´´4g‡Âb¾ùæÌ›7ÏÙa06 œ Ù°6sæL<ÿüó°XŽåG8IDAT,Î…ÝǼyó„ï{ÜðhcŒ¹:¾ cŒ1ÆÉ1ƘËãdÈcÌåq2dŒ1æòþ?fDÃNIµIEND®B`‚pktools-2.6.6/doc/html/classfilter2d_1_1Filter2d-members.html0000644000113200011300000005154012647637662020777 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
filter2d::Filter2d Member List

This is the complete list of members for filter2d::Filter2d, including all inherited members.

doit(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim, short down=1, bool disc=false) (defined in filter2d::Filter2d)filter2d::Filter2d
doit(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dimX, int dimY, short down=1, bool disc=false) (defined in filter2d::Filter2d)filter2d::Filter2d
doit(const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector, const std::string &method, int dimX, int dimY, short down=1, bool disc=false) (defined in filter2d::Filter2d)filter2d::Filter2d
dsm2dtm_nesw(const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3) (defined in filter2d::Filter2d)filter2d::Filter2d
dsm2dtm_nwse(const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3) (defined in filter2d::Filter2d)filter2d::Filter2d
dsm2dtm_senw(const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3) (defined in filter2d::Filter2d)filter2d::Filter2d
dsm2dtm_swne(const Vector2d< T > &inputDSM, Vector2d< T > &outputMask, double hThreshold, int nlimit, int dim=3) (defined in filter2d::Filter2d)filter2d::Filter2d
dwt_texture(const std::string &inputFilename, const std::string &outputFilename, int dim, int scale, int down=1, int iband=0, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
dwtCut(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, double cut, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
dwtCut(Vector2d< T > &data, const std::string &wavelet_type, int family, double cut) (defined in filter2d::Filter2d)filter2d::Filter2d
dwtForward(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family) (defined in filter2d::Filter2d)filter2d::Filter2d
dwtForward(Vector2d< T > &data, const std::string &wavelet_type, int family) (defined in filter2d::Filter2d)filter2d::Filter2d
dwtInverse(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family) (defined in filter2d::Filter2d)filter2d::Filter2d
dwtInverse(Vector2d< T > &data, const std::string &wavelet_type, int family) (defined in filter2d::Filter2d)filter2d::Filter2d
filter(const ImgReaderGdal &input, ImgWriterGdal &output, bool absolute=false, bool normalize=false, bool noData=false) (defined in filter2d::Filter2d)filter2d::Filter2d
filter(const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector) (defined in filter2d::Filter2d)filter2d::Filter2d
Filter2d(void) (defined in filter2d::Filter2d)filter2d::Filter2d
Filter2d(const Vector2d< double > &taps) (defined in filter2d::Filter2d)filter2d::Filter2d
getFilterType(const std::string filterType) (defined in filter2d::Filter2d)filter2d::Filter2dinlinestatic
getResampleType(const std::string resampleType) (defined in filter2d::Filter2d)filter2d::Filter2dinlinestatic
linearFeature(const Vector2d< float > &input, std::vector< Vector2d< float > > &output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
linearFeature(const ImgReaderGdal &input, ImgWriterGdal &output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, int band=0, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
majorVoting(const std::string &inputFilename, const std::string &outputFilename, int dim=0, const std::vector< int > &prior=std::vector< int >()) (defined in filter2d::Filter2d)filter2d::Filter2d
median(const std::string &inputFilename, const std::string &outputFilename, int dim, bool disc=false) (defined in filter2d::Filter2d)filter2d::Filter2d
morphology(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dimX, int dimY, const std::vector< double > &angle, bool disc=false) (defined in filter2d::Filter2d)filter2d::Filter2d
morphology(const Vector2d< T > &input, Vector2d< T > &output, const std::string &method, int dimX, int dimY, bool disc=false, double hThreshold=0) (defined in filter2d::Filter2d)filter2d::Filter2d
mrf(const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY, double beta, bool eightConnectivity=true, short down=1, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
mrf(const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY, Vector2d< double > beta, bool eightConnectivity=true, short down=1, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
pushClass(short theClass=1) (defined in filter2d::Filter2d)filter2d::Filter2dinline
pushNoDataValue(double noDataValue=0) (defined in filter2d::Filter2d)filter2d::Filter2d
pushThreshold(double theThreshold) (defined in filter2d::Filter2d)filter2d::Filter2dinline
setClasses(const std::vector< short > &theClasses) (defined in filter2d::Filter2d)filter2d::Filter2dinline
setTaps(const Vector2d< double > &taps) (defined in filter2d::Filter2d)filter2d::Filter2d
setThresholds(const std::vector< double > &theThresholds) (defined in filter2d::Filter2d)filter2d::Filter2dinline
shadowDsm(const Vector2d< T > &input, Vector2d< T > &output, double sza, double saa, double pixelSize, short shadowFlag=1) (defined in filter2d::Filter2d)filter2d::Filter2d
shadowDsm(const ImgReaderGdal &input, ImgWriterGdal &output, double sza, double saa, double pixelSize, short shadowFlag=1) (defined in filter2d::Filter2d)filter2d::Filter2d
shift(const ImgReaderGdal &input, ImgWriterGdal &output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=BILINEAR, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
shift(const Vector2d< T > &input, Vector2d< T > &output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=NEAR, bool verbose=false) (defined in filter2d::Filter2d)filter2d::Filter2d
smooth(const ImgReaderGdal &input, ImgWriterGdal &output, int dim) (defined in filter2d::Filter2d)filter2d::Filter2d
smooth(const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY) (defined in filter2d::Filter2d)filter2d::Filter2d
smooth(const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector, int dim) (defined in filter2d::Filter2d)filter2d::Filter2d
smooth(const Vector2d< T1 > &inputVector, Vector2d< T2 > &outputVector, int dimX, int dimY) (defined in filter2d::Filter2d)filter2d::Filter2d
smoothNoData(const ImgReaderGdal &input, ImgWriterGdal &output, int dim) (defined in filter2d::Filter2d)filter2d::Filter2d
smoothNoData(const ImgReaderGdal &input, ImgWriterGdal &output, int dimX, int dimY) (defined in filter2d::Filter2d)filter2d::Filter2d
var(const std::string &inputFilename, const std::string &outputFilename, int dim, bool disc=false) (defined in filter2d::Filter2d)filter2d::Filter2d
~Filter2d() (defined in filter2d::Filter2d)filter2d::Filter2dinlinevirtual
pktools-2.6.6/doc/html/dir_d7b2ebecdb5f44d7fa09bdedebc881a7.html0000644000113200011300000001047012647637663020571 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkextract_gui-gcc-Debug Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkextract_gui-gcc-Debug Directory Reference
Directory dependency graph for build-pkextract_gui-gcc-Debug:
/home/kempenep/pktools/qt/build-pkextract_gui-gcc-Debug

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/dir_b8eb6544d8d9ffceba16909a7b9d17d7.html0000644000113200011300000001054012647637663020232 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Release Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkcomposite_gui-gcc-Release Directory Reference
Directory dependency graph for build-pkcomposite_gui-gcc-Release:
/home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Release

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/md_examples_pkcreatect.html0000644000113200011300000000731012647637662017251 00000000000000 pktools: examples_pkcreatect
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkcreatect

Examples of pkcreatect

Attach a color table to image with values between 0 and 50

pkcreatect -i image.tif -o image_ct.tif -min 0 -max 50

Attach a grey scale "color" table to image with values between 0 and 100 and create a legend image (annotation needs to be drawn manually)

pkcreatect -i image.tif -o image_ct.tif -min 0 -max 100 -l legend.tif -g

Attach a predefined color table to image.tif. The colortable has 5 entries for the values 0 (black), 1 (red), 2 (green), 3 (blue) and 4 (grey)

cat colortable.txt
0 0 0 0 255
1 255 0 0 255
2 0 255 0 255
3 0 0 255 255
4 100 100 100 255
pkcreatect -i image.tif -o image_ct.tif -ct colortable.txt

Remove the color table from an image

pkcreatect -i image.tif -o image_noct.tif -ct none
pktools-2.6.6/doc/html/svm_8h_source.html0000644000113200011300000005357712647637661015351 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/svm.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
svm.h
1 #ifndef _LIBSVM_H
2 #define _LIBSVM_H
3 
4 #define LIBSVM_VERSION 312
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 extern int libsvm_version;
11 
12 struct svm_node
13 {
14  int index;
15  double value;
16 };
17 
19 {
20  int l;
21  double *y;
22  struct svm_node **x;
23 };
24 
25 enum { C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR }; /* svm_type */
26 enum { LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED }; /* kernel_type */
27 
29 {
30  int svm_type;
31  int kernel_type;
32  int degree; /* for poly */
33  double gamma; /* for poly/rbf/sigmoid */
34  double coef0; /* for poly/sigmoid */
35 
36  /* these are for training only */
37  double cache_size; /* in MB */
38  double eps; /* stopping criteria */
39  double C; /* for C_SVC, EPSILON_SVR and NU_SVR */
40  int nr_weight; /* for C_SVC */
41  int *weight_label; /* for C_SVC */
42  double* weight; /* for C_SVC */
43  double nu; /* for NU_SVC, ONE_CLASS, and NU_SVR */
44  double p; /* for EPSILON_SVR */
45  int shrinking; /* use the shrinking heuristics */
46  int probability; /* do probability estimates */
47  bool verbose;//pk
48 };
49 
50 //
51 // svm_model
52 //
53 struct svm_model
54 {
55  struct svm_parameter param; /* parameter */
56  int nr_class; /* number of classes, = 2 in regression/one class svm */
57  int l; /* total #SV */
58  struct svm_node **SV; /* SVs (SV[l]) */
59  double **sv_coef; /* coefficients for SVs in decision functions (sv_coef[k-1][l]) */
60  double *rho; /* constants in decision functions (rho[k*(k-1)/2]) */
61  double *probA; /* pariwise probability information */
62  double *probB;
63 
64  /* for classification only */
65 
66  int *label; /* label of each class (label[k]) */
67  int *nSV; /* number of SVs for each class (nSV[k]) */
68  /* nSV[0] + nSV[1] + ... + nSV[k-1] = l */
69  /* XXX */
70  int free_sv; /* 1 if svm_model is created by svm_load_model*/
71  /* 0 if svm_model is created by svm_train */
72 };
73 
74 struct svm_model *svm_train(const struct svm_problem *prob, const struct svm_parameter *param);
75 void svm_cross_validation(const struct svm_problem *prob, const struct svm_parameter *param, int nr_fold, double *target);
76 
77 int svm_save_model(const char *model_file_name, const struct svm_model *model);
78 struct svm_model *svm_load_model(const char *model_file_name);
79 
80 int svm_get_svm_type(const struct svm_model *model);
81 int svm_get_nr_class(const struct svm_model *model);
82 void svm_get_labels(const struct svm_model *model, int *label);
83 double svm_get_svr_probability(const struct svm_model *model);
84 
85 double svm_predict_values(const struct svm_model *model, const struct svm_node *x, double* dec_values);
86 double svm_predict(const struct svm_model *model, const struct svm_node *x);
87 double svm_predict_probability(const struct svm_model *model, const struct svm_node *x, double* prob_estimates);
88 
89 void svm_free_model_content(struct svm_model *model_ptr);
90 void svm_free_and_destroy_model(struct svm_model **model_ptr_ptr);
91 void svm_destroy_param(struct svm_parameter *param);
92 
93 const char *svm_check_parameter(const struct svm_problem *prob, const struct svm_parameter *param);
94 int svm_check_probability_model(const struct svm_model *model);
95 
96 void svm_set_print_string_function(void (*print_func)(const char *));
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif /* _LIBSVM_H */
Definition: svm.h:53
Definition: svm.h:12
pktools-2.6.6/doc/html/inherit_graph_40.md50000644000113200011300000000004012647437044015376 0000000000000087aa7d801c4fb0d24fa9d29992fafeb1pktools-2.6.6/doc/html/pkfilterascii_8cc_source.html0000644000113200011300000014654712647637662017534 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkfilterascii.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilterascii.cc
1 /**********************************************************************
2 pkfilterascii.cc: program to filter data in an ASCII file
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <iostream>
22 #include <string>
23 #include <fstream>
24 #include <math.h>
25 #include <sys/types.h>
26 #include <stdio.h>
27 #include "base/Optionpk.h"
28 #include "base/Vector2d.h"
29 #include "algorithms/Filter.h"
30 #include "fileclasses/FileReaderAscii.h"
31 
32 extern "C" {
33 #include <gsl/gsl_sort.h>
34 }
35 
36 /******************************************************************************/
81 using namespace std;
82 
83 /*------------------
84  Main procedure
85  ----------------*/
86 int main(int argc,char **argv) {
87  Optionpk<std::string> input_opt("i","input","input ASCII file");
88  Optionpk<std::string> output_opt("o", "output", "Output ASCII file");
89  Optionpk<int> inputCols_opt("ic", "inputCols", "input columns (e.g., for three dimensional input data in first three columns use: -ic 0 -ic 1 -ic 2");
90  Optionpk<std::string> method_opt("f", "filter", "filter function (to be implemented: dwt, dwti,dwt_cut)");
91  Optionpk<std::string> wavelet_type_opt("wt", "wavelet", "wavelet type: daubechies,daubechies_centered, haar, haar_centered, bspline, bspline_centered", "daubechies");
92  Optionpk<int> family_opt("wf", "family", "wavelet family (vanishing moment, see also http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)", 4);
93  Optionpk<double> threshold_opt("cut", "cut", "threshold to cut dwt coefficients. Use 0 to keep all.", 0);
94  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");
95  Optionpk<double> tapZ_opt("tapz", "tapz", "taps used for spectral filtering");
96  Optionpk<double> fwhm_opt("fwhm", "fwhm", "list of full width half to apply spectral filtering (-fwhm band1 -fwhm band2 ...)");
97  Optionpk<std::string> srf_opt("srf", "srf", "list of ASCII files containing spectral response functions (two columns: wavelength response)");
98  Optionpk<int> wavelengthIn_opt("win", "wavelengthIn", "column number of input ASCII file containing wavelengths");
99  Optionpk<double> wavelengthOut_opt("wout", "wavelengthOut", "list of wavelengths in output spectrum (-wout band1 -wout band2 ...)");
100  Optionpk<std::string> interpolationType_opt("interp", "interp", "type of interpolation for spectral filtering (see http://www.gnu.org/software/gsl/manual/html_node/Interpolation-Types.html)","akima");
101  Optionpk<bool> transpose_opt("t", "transpose", "transpose output with samples in rows and wavelengths in cols", false);
102  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
103 
104  tapZ_opt.setHide(1);
105  fwhm_opt.setHide(1);
106  srf_opt.setHide(1);
107  wavelengthIn_opt.setHide(1);
108  wavelengthOut_opt.setHide(1);
109  interpolationType_opt.setHide(1);
110  transpose_opt.setHide(1);
111  wavelet_type_opt.setHide(1);
112  family_opt.setHide(1);
113  threshold_opt.setHide(1);
114 
115  bool doProcess;//stop process when program was invoked with help option (-h --help)
116  try{
117  doProcess=input_opt.retrieveOption(argc,argv);
118  output_opt.retrieveOption(argc,argv);
119  inputCols_opt.retrieveOption(argc,argv);
120  method_opt.retrieveOption(argc,argv);
121  dimZ_opt.retrieveOption(argc,argv);
122  tapZ_opt.retrieveOption(argc,argv);
123  fwhm_opt.retrieveOption(argc,argv);
124  srf_opt.retrieveOption(argc,argv);
125  wavelengthIn_opt.retrieveOption(argc,argv);
126  wavelengthOut_opt.retrieveOption(argc,argv);
127  interpolationType_opt.retrieveOption(argc,argv);
128  transpose_opt.retrieveOption(argc,argv);
129  wavelet_type_opt.retrieveOption(argc,argv);
130  family_opt.retrieveOption(argc,argv);
131  threshold_opt.retrieveOption(argc,argv);
132  verbose_opt.retrieveOption(argc,argv);
133  }
134  catch(string predefinedString){
135  std::cout << predefinedString << std::endl;
136  exit(0);
137  }
138  if(!doProcess){
139  cout << endl;
140  cout << "Usage: pkfilterascii -i input.txt [-ic column]*" << endl;
141  cout << endl;
142  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
143  exit(0);//help was invoked, stop processing
144  }
145 
146  Vector2d<double> inputData(inputCols_opt.size());
147  Vector2d<double> filteredData(inputCols_opt.size());
148  std::vector<double> wavelengthIn;
149  std::vector<double> wavelengthOut;
150  assert(input_opt.size());
151  FileReaderAscii asciiReader(input_opt[0]);
152  if(wavelengthIn_opt.size())
153  asciiReader.readData(wavelengthIn,wavelengthIn_opt[0]);
154  assert(inputCols_opt.size());
155  asciiReader.readData(inputData,inputCols_opt);
156  if(verbose_opt[0]){
157  std::cout << "wavelengthIn.size(): " << wavelengthIn.size() << std::endl;
158  std::cout << "inputData[0].size(): " << inputData[0].size() << std::endl;
159  }
160  if(wavelengthIn.size())
161  assert(wavelengthIn.size()==inputData[0].size());
162  asciiReader.close();
163  filter::Filter filter1d;
164  if(fwhm_opt.size()){
165  filteredData.resize(inputCols_opt.size(),wavelengthOut_opt.size());
166  assert(wavelengthIn_opt.size());
167  if(verbose_opt[0])
168  std::cout << "spectral filtering to " << fwhm_opt.size() << " bands with provided fwhm " << std::endl;
169  assert(wavelengthOut_opt.size()==fwhm_opt.size());
170  std::vector<double> fwhmData(wavelengthOut_opt.size());
171  for(int icol=0;icol<inputCols_opt.size();++icol)
172  filter1d.applyFwhm<double>(wavelengthIn,inputData[icol], wavelengthOut_opt,fwhm_opt, interpolationType_opt[0], filteredData[icol],verbose_opt[0]);
173  if(verbose_opt[0])
174  std::cout << "spectra filtered to " << wavelengthOut_opt.size() << " bands" << std::endl;
175  wavelengthOut=wavelengthOut_opt;
176  }
177  else if(srf_opt.size()){
178  wavelengthOut.resize(srf_opt.size());
179  filteredData.resize(inputCols_opt.size(),srf_opt.size());
180  Vector2d<double> srfData(srf_opt.size(),inputCols_opt.size());//transposed output
181  if(verbose_opt[0])
182  std::cout << "spectral filtering to " << srf_opt.size() << " bands with provided SRF " << std::endl;
183  std::vector< Vector2d<double> > srf(srf_opt.size());//[0] srf_nr, [1]: wavelength, [2]: response
184  ifstream srfFile;
185  for(int isrf=0;isrf<srf_opt.size();++isrf){
186  srf[isrf].resize(2);
187  srfFile.open(srf_opt[isrf].c_str());
188  double v;
189  //add 0 to make sure srf is 0 at boundaries after interpolation step
190  srf[isrf][0].push_back(0);
191  srf[isrf][1].push_back(0);
192  srf[isrf][0].push_back(1);
193  srf[isrf][1].push_back(0);
194  while(srfFile >> v){
195  srf[isrf][0].push_back(v);
196  srfFile >> v;
197  srf[isrf][1].push_back(v);
198  }
199  srfFile.close();
200  //add 0 to make sure srf[isrf] is 0 at boundaries after interpolation step
201  srf[isrf][0].push_back(srf[isrf][0].back()+1);
202  srf[isrf][1].push_back(0);
203  srf[isrf][0].push_back(srf[isrf][0].back()+1);
204  srf[isrf][1].push_back(0);
205  if(verbose_opt[0])
206  cout << "srf file details: " << srf[isrf][0].size() << " wavelengths defined" << endl;
207  if(verbose_opt[0]>1){
208  for(int iw=0;iw<srf[isrf][0].size();++iw)
209  std::cout << srf[isrf][0][iw] << " " << srf[isrf][1][iw] << std::endl;
210  }
211  }
212  double centreWavelength=0;
213  for(int icol=0;icol<inputCols_opt.size();++icol)
214  filteredData[icol].resize(srf.size());
215 
216  for(int isrf=0;isrf<srf.size();++isrf){
217  double delta=1.0;
218  bool normalize=true;
219  centreWavelength=filter1d.applySrf<double>(wavelengthIn,inputData,srf[isrf], interpolationType_opt[0], srfData[isrf], delta, normalize,1,true, verbose_opt[0]);
220  if(verbose_opt[0])
221  std::cout << "centre wavelength srf " << isrf << ": " << centreWavelength << std::endl;
222  wavelengthOut[isrf]=static_cast<int>(centreWavelength+0.5);
223  }
224  srfData.transpose(filteredData);
225  if(verbose_opt[0])
226  std::cout << "spectra filtered to " << srf.size() << " bands" << std::endl;
227  }
228  else{//no filtering
229  if(verbose_opt[0])
230  std::cout << "no filtering selected" << std::endl;
231  for(int icol=0;icol<inputCols_opt.size();++icol)
232  filteredData[icol]=inputData[icol];
233  }
234 
235  if(method_opt.size()){
236  wavelengthOut=wavelengthIn;
237  for(int icol=0;icol<inputCols_opt.size();++icol){
238  switch(filter::Filter::getFilterType(method_opt[0])){
239  case(filter::dwt):
240  filter1d.dwtForward(filteredData[icol],wavelet_type_opt[0],family_opt[0]);
241  break;
242  case(filter::dwti):
243  filter1d.dwtInverse(filteredData[icol],wavelet_type_opt[0],family_opt[0]);
244  break;
245  case(filter::dwt_cut):
246  filter1d.dwtCut(filteredData[icol],wavelet_type_opt[0],family_opt[0],threshold_opt[0]);
247  break;
248  case(filter::smooth):
249  if(tapZ_opt.size()){
250  filter1d.setTaps(tapZ_opt);
251  filter1d.filter(inputData[icol],filteredData[icol]);
252  }
253  else{
254  assert(dimZ_opt.size());
255  filter1d.smooth(inputData[icol],filteredData[icol],dimZ_opt[0]);
256  }
257  break;
258  default:
259  assert(tapZ_opt.size());
260  filter1d.filter(inputData[icol],filteredData[icol]);
261  // if(verbose_opt[0])
262  // std::cout << "method to be implemented" << std::endl;
263  // exit(1);
264  break;
265  }
266  }
267  }
268  ofstream outputStream;
269  if(!output_opt.empty())
270  outputStream.open(output_opt[0].c_str(),ios::out);
271 
272  if(verbose_opt[0])
273  std::cout << "stream to output" << std::endl;
274  if(transpose_opt[0]){
275  for(int icol=0;icol<inputCols_opt.size();++icol){
276  for(int iband=0;iband<filteredData[icol].size();++iband){
277  if(!output_opt.empty()){
278  outputStream << filteredData[icol][iband];
279  if(iband<filteredData[icol].size()-1)
280  outputStream << " ";
281  else
282  outputStream << std::endl;
283  }
284  else{
285  std::cout << filteredData[icol][iband];
286  if(iband<filteredData[icol].size()-1)
287  std::cout << " ";
288  else
289  std::cout << std::endl;
290  }
291  }
292  }
293  }
294  else{
295  // int nband=wavelengthOut.size()? wavelengthOut.size() : filteredData[0].size();
296  int nband=0;
297  if(method_opt.size()){
298  switch(filter::Filter::getFilterType(method_opt[0])){
299  case(filter::dwt):
300  nband=filteredData[0].size();
301  break;
302  case(filter::dwti):
303  nband=filteredData[0].size();
304  break;
305  case(filter::dwt_cut):
306  nband=filteredData[0].size();
307  break;
308  default:
309  nband=wavelengthOut.size();
310  break;
311  }
312  }
313  else
314  nband=wavelengthOut.size();
315  if(verbose_opt[0]){
316  std::cout << "number of bands: " << nband << std::endl;
317  std::cout << "wavelengthOut.size(): " << wavelengthOut.size() << std::endl;
318  }
319  for(int iband=0;iband<nband;++iband){
320  if(!output_opt.empty()){
321  if(wavelengthOut.size())
322  outputStream << wavelengthOut[iband] << " ";
323  else if(wavelengthIn_opt.size())
324  outputStream << iband << " ";
325  }
326  else{
327  if(wavelengthOut.size())
328  std::cout << wavelengthOut[iband] << " ";
329  else if(wavelengthIn_opt.size())
330  std::cout << iband << " ";
331  }
332  for(int icol=0;icol<inputCols_opt.size();++icol){
333  if(!output_opt.empty()){
334  outputStream << filteredData[icol][iband];
335  if(icol<inputCols_opt.size()-1)
336  outputStream << " ";
337  else
338  outputStream << std::endl;
339  }
340  else{
341  std::cout << filteredData[icol][iband];
342  if(icol<inputCols_opt.size()-1)
343  std::cout << " ";
344  else
345  std::cout << std::endl;
346  }
347  }
348  }
349  }
350  if(!output_opt.empty())
351  outputStream.close();
352  return 0;
353 }
pktools-2.6.6/doc/html/classSVC__Q__inherit__graph.map0000644000113200011300000000035512616110567017644 00000000000000 pktools-2.6.6/doc/html/classFANN_1_1neural__net-members.html0000644000113200011300000013630512647637662020631 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
FANN::neural_net Member List

This is the complete list of members for FANN::neural_net, including all inherited members.

ann (defined in FANN::neural_net)FANN::neural_netprotected
cascadetrain_on_data(const training_data &data, unsigned int max_neurons, unsigned int neurons_between_reports, float desired_error) (defined in FANN::neural_net)FANN::neural_netinline
cascadetrain_on_file(const std::string &filename, unsigned int max_neurons, unsigned int neurons_between_reports, float desired_error) (defined in FANN::neural_net)FANN::neural_netinline
clear_scaling_params() (defined in FANN::neural_net)FANN::neural_netinline
create_from_file(const std::string &configuration_file) (defined in FANN::neural_net)FANN::neural_netinline
create_shortcut(unsigned int num_layers,...) (defined in FANN::neural_net)FANN::neural_netinline
create_shortcut_array(unsigned int num_layers, const unsigned int *layers) (defined in FANN::neural_net)FANN::neural_netinline
create_sparse(float connection_rate, unsigned int num_layers,...) (defined in FANN::neural_net)FANN::neural_netinline
create_sparse_array(float connection_rate, unsigned int num_layers, const unsigned int *layers) (defined in FANN::neural_net)FANN::neural_netinline
create_standard(unsigned int num_layers,...) (defined in FANN::neural_net)FANN::neural_netinline
create_standard_array(unsigned int num_layers, const unsigned int *layers) (defined in FANN::neural_net)FANN::neural_netinline
cross_validation(std::vector< Vector2d< fann_type > > &trainingFeatures, unsigned int ntraining, unsigned short cv, unsigned int max_epochs, float desired_error, std::vector< unsigned short > &referenceVector, std::vector< unsigned short > &outputVector, short verbose=0) (defined in FANN::neural_net)FANN::neural_netinline
cross_validation(std::vector< std::vector< fann_type > > &input, std::vector< std::vector< fann_type > > &output, unsigned short cv, unsigned int max_epochs, float desired_error, std::vector< std::vector< fann_type > > &referenceVector, std::vector< std::vector< fann_type > > &outputVector, short verbose=0) (defined in FANN::neural_net)FANN::neural_netinline
descale_input(fann_type *input_vector) (defined in FANN::neural_net)FANN::neural_netinline
descale_output(fann_type *output_vector) (defined in FANN::neural_net)FANN::neural_netinline
descale_train(training_data &data) (defined in FANN::neural_net)FANN::neural_netinline
destroy() (defined in FANN::neural_net)FANN::neural_netinline
get_activation_function(int layer, int neuron) (defined in FANN::neural_net)FANN::neural_netinline
get_activation_steepness(int layer, int neuron) (defined in FANN::neural_net)FANN::neural_netinline
get_bias_array(unsigned int *bias) (defined in FANN::neural_net)FANN::neural_netinline
get_bit_fail() (defined in FANN::neural_net)FANN::neural_netinline
get_bit_fail_limit() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_activation_functions() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_activation_functions_count() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_activation_steepnesses() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_activation_steepnesses_count() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_candidate_change_fraction() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_candidate_limit() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_candidate_stagnation_epochs() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_max_cand_epochs() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_max_out_epochs() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_num_candidate_groups() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_num_candidates() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_output_change_fraction() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_output_stagnation_epochs() (defined in FANN::neural_net)FANN::neural_netinline
get_cascade_weight_multiplier() (defined in FANN::neural_net)FANN::neural_netinline
get_connection_array(connection *connections) (defined in FANN::neural_net)FANN::neural_netinline
get_connection_array(std::vector< connection > &convector) (defined in FANN::neural_net)FANN::neural_netinline
get_connection_rate() (defined in FANN::neural_net)FANN::neural_netinline
get_errno() (defined in FANN::neural_net)FANN::neural_netinline
get_errstr() (defined in FANN::neural_net)FANN::neural_netinline
get_layer_array(unsigned int *layers) (defined in FANN::neural_net)FANN::neural_netinline
get_layer_array(std::vector< unsigned int > vlayers) (defined in FANN::neural_net)FANN::neural_netinline
get_learning_momentum() (defined in FANN::neural_net)FANN::neural_netinline
get_learning_rate() (defined in FANN::neural_net)FANN::neural_netinline
get_MSE() (defined in FANN::neural_net)FANN::neural_netinline
get_network_type() (defined in FANN::neural_net)FANN::neural_netinline
get_num_input() (defined in FANN::neural_net)FANN::neural_netinline
get_num_layers() (defined in FANN::neural_net)FANN::neural_netinline
get_num_output() (defined in FANN::neural_net)FANN::neural_netinline
get_quickprop_decay() (defined in FANN::neural_net)FANN::neural_netinline
get_quickprop_mu() (defined in FANN::neural_net)FANN::neural_netinline
get_rprop_decrease_factor() (defined in FANN::neural_net)FANN::neural_netinline
get_rprop_delta_max() (defined in FANN::neural_net)FANN::neural_netinline
get_rprop_delta_min() (defined in FANN::neural_net)FANN::neural_netinline
get_rprop_increase_factor() (defined in FANN::neural_net)FANN::neural_netinline
get_total_connections() (defined in FANN::neural_net)FANN::neural_netinline
get_total_neurons() (defined in FANN::neural_net)FANN::neural_netinline
get_train_error_function() (defined in FANN::neural_net)FANN::neural_netinline
get_train_stop_function() (defined in FANN::neural_net)FANN::neural_netinline
get_training_algorithm() (defined in FANN::neural_net)FANN::neural_netinline
init_weights(const training_data &data) (defined in FANN::neural_net)FANN::neural_netinline
neural_net() (defined in FANN::neural_net)FANN::neural_netinline
print_connections() (defined in FANN::neural_net)FANN::neural_netinline
print_error() (defined in FANN::neural_net)FANN::neural_netinline
print_parameters() (defined in FANN::neural_net)FANN::neural_netinline
randomize_weights(fann_type min_weight, fann_type max_weight) (defined in FANN::neural_net)FANN::neural_netinline
reset_errno() (defined in FANN::neural_net)FANN::neural_netinline
reset_errstr() (defined in FANN::neural_net)FANN::neural_netinline
reset_MSE() (defined in FANN::neural_net)FANN::neural_netinline
run(fann_type *input) (defined in FANN::neural_net)FANN::neural_netinline
run(std::vector< fann_type > input) (defined in FANN::neural_net)FANN::neural_netinline
save(const std::string &configuration_file) (defined in FANN::neural_net)FANN::neural_netinline
save_to_fixed(const std::string &configuration_file) (defined in FANN::neural_net)FANN::neural_netinline
scale_input(fann_type *input_vector) (defined in FANN::neural_net)FANN::neural_netinline
scale_output(fann_type *output_vector) (defined in FANN::neural_net)FANN::neural_netinline
scale_train(training_data &data) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_function(activation_function_enum activation_function, int layer, int neuron) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_function_hidden(activation_function_enum activation_function) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_function_layer(activation_function_enum activation_function, int layer) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_function_output(activation_function_enum activation_function) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_steepness(fann_type steepness, int layer, int neuron) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_steepness_hidden(fann_type steepness) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_steepness_layer(fann_type steepness, int layer) (defined in FANN::neural_net)FANN::neural_netinline
set_activation_steepness_output(fann_type steepness) (defined in FANN::neural_net)FANN::neural_netinline
set_bit_fail_limit(fann_type bit_fail_limit) (defined in FANN::neural_net)FANN::neural_netinline
set_callback(callback_type callback, void *user_data) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_activation_functions(activation_function_enum *cascade_activation_functions, unsigned int cascade_activation_functions_count) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_activation_steepnesses(fann_type *cascade_activation_steepnesses, unsigned int cascade_activation_steepnesses_count) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_candidate_change_fraction(float cascade_candidate_change_fraction) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_candidate_limit(fann_type cascade_candidate_limit) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_candidate_stagnation_epochs(unsigned int cascade_candidate_stagnation_epochs) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_max_cand_epochs(unsigned int cascade_max_cand_epochs) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_max_out_epochs(unsigned int cascade_max_out_epochs) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_num_candidate_groups(unsigned int cascade_num_candidate_groups) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_output_change_fraction(float cascade_output_change_fraction) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_output_stagnation_epochs(unsigned int cascade_output_stagnation_epochs) (defined in FANN::neural_net)FANN::neural_netinline
set_cascade_weight_multiplier(fann_type cascade_weight_multiplier) (defined in FANN::neural_net)FANN::neural_netinline
set_error_log(FILE *log_file) (defined in FANN::neural_net)FANN::neural_netinline
set_input_scaling_params(const training_data &data, float new_input_min, float new_input_max) (defined in FANN::neural_net)FANN::neural_netinline
set_learning_momentum(float learning_momentum) (defined in FANN::neural_net)FANN::neural_netinline
set_learning_rate(float learning_rate) (defined in FANN::neural_net)FANN::neural_netinline
set_output_scaling_params(const training_data &data, float new_output_min, float new_output_max) (defined in FANN::neural_net)FANN::neural_netinline
set_quickprop_decay(float quickprop_decay) (defined in FANN::neural_net)FANN::neural_netinline
set_quickprop_mu(float quickprop_mu) (defined in FANN::neural_net)FANN::neural_netinline
set_rprop_decrease_factor(float rprop_decrease_factor) (defined in FANN::neural_net)FANN::neural_netinline
set_rprop_delta_max(float rprop_delta_max) (defined in FANN::neural_net)FANN::neural_netinline
set_rprop_delta_min(float rprop_delta_min) (defined in FANN::neural_net)FANN::neural_netinline
set_rprop_increase_factor(float rprop_increase_factor) (defined in FANN::neural_net)FANN::neural_netinline
set_scaling_params(const training_data &data, float new_input_min, float new_input_max, float new_output_min, float new_output_max) (defined in FANN::neural_net)FANN::neural_netinline
set_train_error_function(error_function_enum train_error_function) (defined in FANN::neural_net)FANN::neural_netinline
set_train_stop_function(stop_function_enum train_stop_function) (defined in FANN::neural_net)FANN::neural_netinline
set_training_algorithm(training_algorithm_enum training_algorithm) (defined in FANN::neural_net)FANN::neural_netinline
set_weight(unsigned int from_neuron, unsigned int to_neuron, fann_type weight) (defined in FANN::neural_net)FANN::neural_netinline
set_weight_array(connection *connections, unsigned int num_connections) (defined in FANN::neural_net)FANN::neural_netinline
set_weight_array(std::vector< connection > convector) (defined in FANN::neural_net)FANN::neural_netinline
test(fann_type *input, fann_type *desired_output) (defined in FANN::neural_net)FANN::neural_netinline
test_data(const training_data &data) (defined in FANN::neural_net)FANN::neural_netinline
test_data(const std::vector< Vector2d< fann_type > > &input, unsigned int num_data) (defined in FANN::neural_net)FANN::neural_netinline
train(fann_type *input, fann_type *desired_output) (defined in FANN::neural_net)FANN::neural_netinline
train_epoch(const training_data &data) (defined in FANN::neural_net)FANN::neural_netinline
train_on_data(const training_data &data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) (defined in FANN::neural_net)FANN::neural_netinline
train_on_data(const std::vector< std::vector< fann_type > > &input, const std::vector< std::vector< fann_type > > &output, bool initWeights, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) (defined in FANN::neural_net)FANN::neural_netinline
train_on_data(const std::vector< Vector2d< fann_type > > &input, unsigned int num_data, bool initWeights, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) (defined in FANN::neural_net)FANN::neural_netinline
train_on_file(const std::string &filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error) (defined in FANN::neural_net)FANN::neural_netinline
~neural_net() (defined in FANN::neural_net)FANN::neural_netinline
pktools-2.6.6/doc/html/dir_e61db0d85028141ec5940fd7f2a6e0fc.html0000644000113200011300000001042012647637663020033 00000000000000 pktools: /home/kempenep/pktools/qt/build-pksvm_gui-gcc-Debug Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pksvm_gui-gcc-Debug Directory Reference
Directory dependency graph for build-pksvm_gui-gcc-Debug:
/home/kempenep/pktools/qt/build-pksvm_gui-gcc-Debug

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/dir_0af1587c8378955de40f48b4bd1869f0_dep.png0000644000113200011300000000342312616110567020303 00000000000000‰PNG  IHDR}ÂHÍ.bKGDÿÿÿ ½§“ÈIDATxœíÝL”÷Àñ÷½CöGÝu• µ6½‚ Ñ”Ón&ebÿИ¤JT´MÄÒMÅ1,a‡°Zf„ŠÄÍRmƒ-ÁF…jh:l-k­AD·´ˆG‘Rº¬–wx—Àþ0½-éÖ©Ïû|^ø>÷ý>y‡{žç¾˜&'''Q¢„zÊx] .FH£ ¤ÑÒèit4º@] .FH£ ¤Ñ óçàãÇsèС©Z‹ºMqqqTWWßõñ&î§gddÐÖövûcw½ugúé켈?Aøõ›`·?Æ+¯¼æï˨ÛtúôI:;süz ½¦ ¤ÑÒèit4º@] .PÐFommáÉ'ˆ‹‹bÕªxNœh ·×‰ÍfåãÏ‘°„ þBUÕË$$,aùòhòó·1<ü]€W?½‚2ºËåâùç7“½•?¼Âöíùäár¹|c®¡²ò .|DKK¯¾ÚÀ±cMôôtsðàþ®~úet¯×ÃÄÄcccX,ÒÓ³¸|¹‡ððpߘ‚+Vü’ææ·Ù¹s ."&&ŽòòìöŸpõÓ/(£ß{ïlŽkâòåv|1™™I´·Ÿ'$ä_§k³EÐßßÇCÙ|ßä‘Ö¬I2|ÍF ÊèãããLLLpàÀ.]r’‘±gŸÍäÛo‡|cÂÂî`Μ(¾üò†ïûŸ}ö7jjôí}Æ1™LlܘJKK3££#x<^˜5+âc×­{šýûËèêúœ®®Ïq8~ÃW_õ`ÕÆñû.Ûÿ#‹ÅBEE-ååúyðÁTW×a±X~0vÛ¶_ãv±iS.—‹U«VSPP€UÇïûécc½µj Ó§Oò 9~ÝOÊ·wõã4º@] .FH£ ¤ÑÒèit4º@] .FH£ ¤ÑÒèit4º@†=#WRò[®_¿jÔt3ŽÅNIIsç>0ísýõ×ÿÈòå+˜7o¾QSÎ(§N5’’òtpEÈÍÝAJJ†‘SÎV«É°¹ôš.FH£ ¤ÑÒèit4º@] .FH£ ¤ÑÒèit4º@3>ºÓÙmè½è`0㣫;§Ñ šèõØí6¢£ïg×®m¸Ý·v|~÷ÝwHLŒgîÜbc£¨ªzÙwLKK3 K‰Š '>þaÞðýÌëõR\¼›… #‰‰™Cqñn¼^¯áç5‚&z}}-¼õÖ;œ;÷g**JaãÆ4–.µÓÑqÒÒJöî-ä›oþË5ÆæÍëÙºu;W®|A~~yy9¸\cÔÖþÞÞΞ½ÈÉ“­´µeß¾âŸåÔšè/½T…ÍͲe¿ ¨è÷œ8Ñ€Ùl¡­í ååÕDFFùžÄþçûíÁG±XÂÉÊÚLOÏá᳨¯ŠŠÌ›7ŸE‹–àp”ÓÚÚÈSœ2Aýû­¼¢£cùúëÌf3ÝÝ]¤§¯å‰'–ñæ›G|cfÏþ)MMïÓÞþ ‹?@RR"çÏ·ù¶¿qã bc£°ZMX­&Ö­[Mooѧ5-‚&úõë×þíë.æÏ_Àø¸›œœ òòvóÁ—¨¬<è3>îfbb‚#Gq:Ù°a ™™É pß}?ãâÅk N288IOÏï½÷‰áç5‚&zQÑ.œÎn:;Û)-ÝCVÖ&nÞ¼‰ÇãÁl63>îfß¾ß0::‚Éd"5u ÍÍo322Œ×ë!,ì""nmžœœÊÞ½…ôõõòé§%=}-‡×ò§LÐlý½…ÔÔÕ¸Ý.22²ÉÍ݉Ùl¦¬l?Ï=÷ ?aÇŽBÒÒ2Y¿~-W¯þÚÚ£8ô÷÷±`ÁÃÔÕ5`±Üú—/¾XFaá¯HLŒ'$$„ää4ŽòŸåÔ0lëo›ÍJ]]ƒ~Âå¿°ZMTW×ñÔS)?:N·þVwE£ ¤ÑÒèit4º@] .FH£ ¤ÑÒèit4º@] .FH£ ¤Ñ2ôÁÈÊÊ2Žý“‘SªÿÀ°è[¶ä20ÐoÔt3NRR*>ºÌ¹ ‹¾gO™QS©ÿA¯éit4º@] .FH£ ¤Ñòë3¡¡¡œ9sŠ3g¬SµuBCCý:ޯϧ;N:::üZ€ºs‘‘‘¬\¹ò®÷+ºš™ôš.FH£ ¤ÑÒèit4º@] .FH£ ¤ÑÒè…^„2Ö?ƒJÓÚóù°IEND®B`‚pktools-2.6.6/doc/html/pktools_2pkextract_8py_source.html0000644000113200011300000012242112647637661020570 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkextract.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkextract.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterRaster
30 from processing.core.parameters import ParameterVector
31 from processing.core.outputs import OutputVector
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 FORMATS = [
39  'ESRI Shapefile',
40  'GeoJSON',
41  'GeoRSS',
42  'SQLite',
43  'GMT',
44  'MapInfo File',
45  'INTERLIS 1',
46  'INTERLIS 2',
47  'GML',
48  'Geoconcept',
49  'DXF',
50  'DGN',
51  'CSV',
52  'BNA',
53  'S57',
54  'KML',
55  'GPX',
56  'PGDump',
57  'GPSTrackMaker',
58  'ODS',
59  'XLSX',
60  'PDF',
61 ]
62 EXTS = [
63  '.shp',
64  '.geojson',
65  '.xml',
66  '.sqlite',
67  '.gmt',
68  '.tab',
69  '.ili',
70  '.ili',
71  '.gml',
72  '.txt',
73  '.dxf',
74  '.dgn',
75  '.csv',
76  '.bna',
77  '.000',
78  '.kml',
79  '.gpx',
80  '.pgdump',
81  '.gtm',
82  '.ods',
83  '.xlsx',
84  '.pdf',
85 ]
86 
87 class pkextract(pktoolsAlgorithm):
88 
89  INPUT = "INPUT"
90  SAMPLE = "SAMPLE"
91  ITERATE = "ITERATE"
92  OUTPUT = "OUTPUT"
93 
94  RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
95 
96  RULE = "RULE"
97  POLYGON = "POLYGON"
98  BUFFER = "BUFFER"
99  SRCNODATA = "SRCNODATA"
100  BNDNODATA = "BNDNODATA"
101 
102  EXTRA = 'EXTRA'
103 
104  FORMAT = "FORMAT"
105 
106  def cliName(self):
107  return "pkextract"
108 
109  def defineCharacteristics(self):
110  self.name = "extract vector sample from raster"
111  self.group = "[pktools] raster/vector"
112  self.addParameter(ParameterRaster(self.INPUT, 'Input raster data set'))
113  self.addParameter(ParameterVector(self.SAMPLE, 'Sample vector data set'))
114  self.addParameter(ParameterBoolean(self.ITERATE, "Iterate over all layers",True))
115  self.addParameter(ParameterSelection(self.RULE,"extraction rule",self.RULE_OPTIONS, 0))
116 
117  self.addOutput(OutputVector(self.OUTPUT, 'Output vector data set'))
118  self.addParameter(ParameterSelection(self.FORMAT,
119  'Destination Format', FORMATS))
120 
121  self.addParameter(ParameterBoolean(self.POLYGON, "Create OGRPolygon as geometry instead of OGRPoint",False))
122  self.addParameter(ParameterNumber(self.BUFFER, "Buffer for calculating statistics for point features",1,25,1))
123  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
124  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
125 
126  self.addParameter(ParameterString(self.EXTRA,
127  'Additional parameters', '', optional=True))
128 
129  def processAlgorithm(self, progress):
130  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
131  commands = [cliPath]
132 
133  input=self.getParameterValue(self.INPUT)
134  commands.append('-i')
135  commands.append('"' + input + '"')
136 
137  sample=self.getParameterValue(self.SAMPLE)
138  if self.getParameterValue(self.ITERATE):
139  if str(sample).find('|')>0:
140  samplename=str(sample)[:str(sample).find('|')]
141  else:
142  samplename=str(sample)
143  else:
144  samplename=str(sample).replace("|layername"," -ln")
145  commands.append('-s')
146  commands.append(samplename)
147 
148  if self.getParameterValue(self.POLYGON):
149  commands.append("-polygon")
150 
151  commands.append("-r")
152  commands.append(self.RULE_OPTIONS[self.getParameterValue(self.RULE)])
153 
154  output = self.getOutputFromName(self.OUTPUT)
155  outFile = output.value
156  formatIdx = self.getParameterValue(self.FORMAT)
157  outFormat = '"' + FORMATS[formatIdx] + '"'
158  commands.append('-f')
159  commands.append(outFormat)
160  ext = EXTS[formatIdx]
161  if not outFile.endswith(ext):
162  outFile += ext
163  output.value = outFile
164  commands.append('-o')
165  commands.append('"' + outFile + '"')
166 
167  if self.getParameterValue(self.POLYGON):
168  commands.append("-polygon")
169  buffer=self.getParameterValue(self.BUFFER)
170  if buffer > 1:
171  commands.append("-buf")
172  commands.append(str(buffer))
173 
174  srcnodata=self.getParameterValue(self.SRCNODATA)
175  if srcnodata != "none":
176  srcnodataValues = srcnodata.split(';')
177  for srcnodataValue in srcnodataValues:
178  commands.append('-srcnodata')
179  commands.append(srcnodataValue)
180  bndnodata=self.getParameterValue(self.BNDNODATA)
181  bndnodataValues = bndnodata.split(';')
182  for bndnodataValue in bndnodataValues:
183  commands.append('-bndnodata')
184  commands.append(bndnodataValue)
185 
186  extra = str(self.getParameterValue(self.EXTRA))
187  if len(extra) > 0:
188  commands.append(extra)
189 
190  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/inherit_graph_18.md50000644000113200011300000000004012647437044015403 000000000000000370cb3959a2ebebf2f238d36085cf82pktools-2.6.6/doc/html/classCostFactoryANN__inherit__graph.map0000644000113200011300000000024512616110567021365 00000000000000 pktools-2.6.6/doc/html/classDecrease__IndexValue.html0000644000113200011300000001010612647637662017567 00000000000000 pktools: Decrease_IndexValue Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Decrease_IndexValue Class Reference

Public Member Functions

int operator() (const IndexValue &pv1, const IndexValue &pv2) const
 

Detailed Description

Definition at line 33 of file IndexValue.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pkreclass_1_1pkreclass__coll__graph.png0000644000113200011300000000674212616110567023761 00000000000000‰PNG  IHDR°p1=m½bKGDÿÿÿ ½§“ —IDATxœíLçÇŸƒRºEF­d…l,f™Ë¦Â@:ˆÙ˜£`1‹KÆØ¡û(™„fÑÅ–âw8B& ™?&–°L"l0)”mRË*B¡…¶wß?n»ôÊa_ŽãÇóúëîáy>ÏûŽw×öÊ!†älèYZ@! $ P E•Jåøø8•!O>ù¤ŸŸß‚—¥DµZÍf³ííí©(LLL¨Õêe#ÀÃÃËåRTòàÁƒÎÎN**Ãk („B !±„„èééAd1K}þùç‚äää,T†™†#ÒÓÓó¯Ë.&KHˆiQ©T‡ŠÊ†•••yzzÊåò…ª¹fÍšÔÔT@elªYêB (ú×_QQ¹£££«««¨¨¨­­­»»{Ajr8üxC]lª¡GüÐZ]]½qãF.—ûþûïOLL?Å0ìÈ‘#ÁÁÁCCC›7o<ýôÓø†‡‡8Àáp<<<Ž9b0fj$¨©©yî¹çX,–OII Ñ^VV¶mÛ¶ððð€€€© äR)ŸÏg³Ù¯½öÚ… ðsÁÔ¹ðm©««óôô}úÙgŸ]»vmNNNII‰···³³ó±cÇlGÿ 0 P(ƒƒƒ³tP*•€ˆˆˆîîîææf'‰ðFE ˆžÄÀ½{÷†……õöö¶··‰D¢i‰Q:ÎÞÞ^*• 1 N‡aŠ¢ÞÞÞ2™ ðO>ù$00Ð2†aîîî—.]Òh4?üðÇÃÛgš+**êÚµkmmmx7«Ø€7Þxcdd¤²²€o`Ïž=###………€·ÞzkddD&“fappP¡PÌû3袽½_•Ëå<oLIIܹsDz'¾<99ikkûË/¿à«ß~û-Ç›¶‘¥Õjíììrss>|ˆ¢èèè¨ÙlÆ0¬¹¹™Á`àûýçŸtttXNôÍ7ßKKK³Ì…o 1|ªõõõ†™Íf€R©Ä[[[ñí²ZÆ;ÌuBÐy A¼Ðßß/ß¼y3$$$;;{jÿÁÁA³Ùìë닯òx¼þþþi‰!... …¢¹¹ÙÃÃcÛ¶m?þø£  ¬¬Ìd2q8A6mÚ°:kôöö«|>¦Ä&̾±nnn|v'''€Õ2Ð)þgèîîÆ÷ ¦¦F*•–••) «þëÖ­³µµU©Tøjoo¯»»û´Ä½^¢hyy¹V«ßµk—V«5›Ír¹v.bÙ*6bNBP1õBQSSÓÖÖF¬VTTӘNJ•yQ¹”ioo‹‹kmmonn>vìXBBÝ¡ªn™6›- i™zޤ¤¤ŒGGGk4Ÿwß}w‰^(Œ‚/êÔ××óù|xÇuàwL…„„,xexÊ€€B@H@! $ T½Ê6™L‡èt:Š*S"„½½ý½{÷¨¨LW¯þß@sŽùÀb±¨(KÉËÎå…ÙŒ>ÿ| ½ý?66Ëä#(Ê€× ©©G«ÓjuËã>XJB€òòÃÆÎΦ¼ü&ÝYègµ a0kko›Lf£­­½m0éND3«]ˆk׺ ãµk]ôæ¡Õ.Dee q/‚ ••-ôæ¡U-ÄȈáêÕN³ÅWÍfôêÕΑÃì£V6«ZˆK—:P”ôªE±Ë—;èʳXÕBTT´X½ ƒaXEŪ>k¬^!4šÑÆF%Š¢–(Š56*5šQºRÑÎêâÂ…¶iß—DäÂ…Û‹Ÿg‰°z…8w®ÅêEÑÕüÕ*B­~ØÞ~w!ÀíÛwïÝ^üTKzn²¥¡!›ÛâoŠÅúûÛW666CC£nnkhËGðÓN ÿ ÉöÓ„~Vé)2P („B !…€€B@H@! $ P („B !…€€B@H@! $ P („B !…€€B@H@! $ P („B !…€€B@H@! $ 2–Ouõòò¢;=0ƒCw zذaƒ¥¤)„ È›o¾ÉçóiÌYL:;;ËËË-°þ§c|>ŸŠÇƒB– ðB !…€€B@HP%„Z­ ¥k8E¥m¢EË<ª„pttܳgEÅ!ÔA•ÎÎΤ¨8„:æ'†açÏŸß¿ÿŽ;Þ{ï½[·n…††böÝwß8p`çÎÉÉÉMMM¡¡¡–½ÆÆÆøøøˆˆ@påÊ«šxÏëׯïÛ·/&&æÄ‰F£ÑrÆS§N%$$ngOOOsss\\œe‘H$‰^~ùe£ÑxñâÅ™â1™Ì•šù±Ìï¢2**êÔ©Sׯ_×jµ7nÜÈÏÏDGGËd²–––‘‘‘[·n9s†xV.A£G644ŒFƒÊjkkÇÆÆˆn'OžT«Õ¿ýö[aaáöíÛñF‹õÌ3Ï‚¼¼¼ÉÉI«0[¶l)((T©T)))UUU………}}}}}}_~ùåàà e£Ñh2™ Æäädqq1`|||Úx+)ó|™ß"66Öl6õÕWÃÃÃ>>>B¡0333::Úl6K$’G&%%?~œÂd2?úè#™LöàÁ77·ŒŒ &“ ÈÍÍ vppÀ»…‡‡øá‡ƒ!,,lïÞ½Ä êêêJKK‰ŽòäÉÄÄDA¶nÝ* mll ÃÑ£G ÃæÍ›…B¡eGGÇC‡eff>ñÄ ,,,%%åüùóÓÆ[1™ç‹õýsÿø[­VÇÅÅeggs¹\â<ÒÐÐPRRRPP0¯" …b>±if9fž–úúúÏ>ûÌÒxcJ¥Reee)•ʉ‰‰ÎÎÎÓ§Oïܹóÿ/ ¡…x*ßÛo¿m0>ýôÓáááõë×GEEíÚµkîÃæÕ)°3Ï‘ÿë”YîPrÊ€¬$ P („„õE¥‹‹ ‹ÉÇU*ÕŒßËHNN¾{÷‚ÐItt´å*|<„¼†€€B@H@! $ ÿ'êM§ÖYàÑIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_13.png0000644000113200011300000000247712616110570015501 00000000000000‰PNG  IHDR}%à?qèbKGDÿÿÿ ½§“ôIDAThíš]({Ç¿þûc$Ï Cæ!ŠÄ.p!7n1k4™ .°’³šD‘rAváR$+"‰RbWÒÙ²2fó’§æhO‡ïïâÔ:ζ“ß,§üÎëêûðù|¾ï½Ïúœ³Ó „€åÇùiÿ(¬ïÌÀúÎ ¬ïÌð?yruuÕÞÞn³Ù˜Ró‹ikk«««sM?ù®Ñh666D"Ñ«úå©Õj¯¾¨Õê”ôOP__OYaû;3°¾3ë;3°¾3ƒ/¾xÂïÊèÁ0 A@’••¥T*iÏÏÏ^!=žg¾Âáá¡@ ð-×h4=<<ø–NÐÙÙi6›———SRRôz½\.zzšžžþNM¿‹¤ÁGßãââ|Ëýøøx||ô-×ÅêêêÖÖ–P($ÄLMMI¥R?úî‘4ø³¿;N…BÁãñâãã …Óélll†††&&&ŽJJJÄe#wטìî¦x,®R©\Ö”••™Íf4"qW*•©©©qqqMMM///‘€———æææØØØäädAl6Eä_›I,--QV<899y%át:!„ãããµµµWWW(Š …ÂÞÞ^‹ÅÔÒÒrss3??¸¿¿7 ®S<މAuuõÞÞ†aîe!„ÛÛÛ|>?88¸¢¢bbbÂd2¹ä¹Ç“Oqߘ˜ÈÍÍEQT«Õ#B!lll,//¿¸¸@Q4//ohhˆ"’Þ1‘H$‰>yè›ïÖ××!„999wwwDÌÎÎNAAÝn×ëõ†½¿¿ïïï Ã}GQ”Xw/KŒq×h4ÃÃÃyyygaaÁ[<ù÷Ýììì••båôô”“S‡ÃÑétÄtee%33“"’¿ùn0Ü×¹\.ùbDDD@×ÖÖJKK d2½ïgggd߇·²†-..â8N||| òù|oñäSÜw¹\®V«¥|rÊõõ5ÀjµSE¹\.E$=î¾û³¿ÇÆÆº®Çóó³F£±Z­õõõ …âøøX¥RyKÄqp{{K^ ôVBØÐРÕj‰€€€€ÊÊJ¢ˆÇxz‘III&“‰Ø=99¥ÈãñxÇh4Ó‹‹ >ŸOù·øÓ÷ššš¾¾>³ÙŒ¢hUUÕÌÌŒÝnw8AAAV«U©T^__‰` Ñ‘‘€¹¹9‹Å255õŲaaaMMMb±xssÓh4""‘H¼ÅÓW“J¥ýýý:N§Óutt¸îÏ.‘b±X.—_^^êtºÆÆÆïšEþò³ÏX,™LÓÚÚúöö!œœœŒŽŽNIIQ©T‰$>>Þét–––†……Y###‘‘‘kkk€ÔgèËâ8>44”ŸŸ’––ÖÓÓãêîñä‚î»6› A¤¤¤ˆˆ‰Dòüü !¤ˆ|zz’J¥111‰‰‰]]]V«•"’÷>I÷IµZ-‹!ûC¼&¿`gßÏ0ë;3°¾3ë;3°¾3ë;3°¾3ƒ‡÷ï³³³?¯ãwc4ÓÓÓ?-‘Dp8†´ýrº»»½þ^eù1ØþÎ ¬ïÌÀúÎ ¬ïÌð€Å£;1 ]†IEND®B`‚pktools-2.6.6/doc/html/dir_d7b2ebecdb5f44d7fa09bdedebc881a7_dep.map0000644000113200011300000000067512616110567021221 00000000000000 pktools-2.6.6/doc/html/inherit_graph_46.png0000644000113200011300000000416412616110570015502 00000000000000‰PNG  IHDR(%~Œã$bKGDÿÿÿ ½§“)IDATxœí›kLYÇÏ´¥‹P )PZB€B#–…H@n&š˜H1ê Qé‡]1jBÔ`Dº‹¯®(Ô£mYJÃJë‹VÌÀ Bð²( (­\RJ‹g?ÌnSÛR&ÜÆ}{~áܧgžyzþü;ç̃±¾Ð¨.pEñ @ÆC ( †uchhH,ÏÍÍQUÍÿ=îîîÁÁÁTò7HñõA$eeeYG¾2^kkkCCƒP(\ߪ\¹\ž““óí)¾à8.“Éœ@&“­WI.†aT—à¤øš’mDk<‚ñ @ÆC ( €åÃ0Fã0¢Ñhœ_?À0ŒÏçÛ< ºwï^ûœœç‹Å;wî´4¯]»†aØÀÀÑÆ0¬¹¹yÉÂÈÑY‰â‰îˆU>ãy{{Ÿ={ÖyŸÁÁÁîînKS§Ó©Õêeçܽ{wWW—Á` š*•ŠF£)•J¢‰ã8“ÉŒ‹‹#SØ7BOÏØÕ«Šúú.ª !ÉE¢Û°ÊÆóóó+--uÞ'--M.—[šOž~üHd˜ššb2™¹¹¹###ÕÕÕ€‰‰ 뜀¬¬,NWUUøôé„ðÔ©Sû÷D"“ÉäííãøÜÜ“Éljj²)Ì>Iyy9›Í®­­U(‡è|äÈ‘ÔÔÔ·oßnÙ²åâÅ‹—/_ÎÌÌ„Ö××oܸ166BØÑÑáîî>;;Kfè¤R)„pbbªªêeZš$0ð'ï4‡“ø“õ_NNÕ’ÙVÎê*®×뫪ªì·]\t¡P( m‡tídp²¯X,>wî„°ºº:==Ý7===333 /_¾$‚6Ã×ÜÜ !œŸŸ·ôñãÇl6ûË—/±±±r¹BxàÀK—.á8N§Ó§§§¡6I"""îÝ»g)òþýû€ùùy:þþý{"X[[ÞÑÑÁb±æçç Ο?ïææ¦Óé$IFFÆ’ã!Ä0æ?Þüþûÿås¹\®­ßþÕÆs¾»ËŠîÐx#yžt¸M¡Pxüøñ+W®ØL9˜Lf__߉'fffÃ}‰_&777K$))ibb¢½½½»»;99°gÏžxyymß¾Åb-™dxxxÛ¶m–O·nÝ _XX #‚ááá###ÀÓÓ³½½]­VߺuK¥R©ÕêæææÌÌL2_ÜÏï°L¦ý§ålÜÚÚ´N>™œ+„Áð#Óm…ŠÝ!Ë1^pp°F£áóùD³§§‡Á`ðx<ò¦§§[ZZ”JåíÛ·-qƒÁ-“ÉöíÛg4ïÞ½k¿/f». ˆŒŒ,))‰‰‰ñõõ¤§§‹Åb‹µØ Þ&IHHHwwwLL ÑüðáÀßߟN§kµÚÍ›7‚‚‚h4ZFFF}}}___lllJJŠR©T«Õ•••d¾øÔÔSRNüùçg³yFÃÌæ/‹õäóÙ"Ñn29WŽã¥¥ÓKv[¹âÀ…EwŒõéäÄ£¸¸8,,ìéÓ§Z­V¥R ‚ÜÜ\â#’SMa^^^TTTrr²u\§ÓaÖØØ8;;[TTèìì´™0Xæ<ÖÛ"‘PTTd9ñ_¢P(ì ³OrãÆ 6›]WW766ÖØØJt>|øpjjªV«}÷î]tttqq1„P.—³X,b²¤T*Y,Vttô’ƒf9œT*5MMMïóò„„r8ù\nÁ7>Õ$©¸“5ž+‹¾jk<“ÉTVVéîîzáÂË“¼ñ^¼x¨¨¨°‰———ûøøðx¼ÊÊÊC‡±Ùl2>¾µµ•è<99™““ãë똟Ÿo0 „z½žÁ`”””@ggg™L¦µöÎÿ\\!øüÙ “ýï‡îp¹AAùAAùߦñH*¾Ø¶‹‹îÐx´š¯Ëd²ƒÂeÍàdÀ0L*•Ú¿'2:ª¯«ë¬©éèíûî;†ÑhNK‹þí·ãk]R| ä¶y÷j™W« ‡ã——’——Òß?^W×)—wp¹>T…XCÖÊx‹ÝFG?®ÎáóýÏœÙ{æÌ^ª A¬-ke pktools: ImgReaderGdal Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for ImgReaderGdal:
Collaboration diagram for ImgReaderGdal:

Public Member Functions

 ImgReaderGdal (const std::string &filename, const GDALAccess &readMode=GA_ReadOnly)
 
void open (const std::string &filename, const GDALAccess &readMode=GA_ReadOnly)
 
void close (void)
 
void setScale (double theScale, int band=0)
 
void setOffset (double theOffset, int band=0)
 
template<typename T >
void readData (T &value, const GDALDataType &dataType, int col, int row, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, double row, int band=0, RESAMPLE resample=NEAR) const
 
template<typename T >
void readDataBlock (Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const
 
template<typename T >
void readDataBlock (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, double row, int band=0, RESAMPLE resample=NEAR) const
 
void getMinMax (int startCol, int endCol, int startRow, int endRow, int band, double &minValue, double &maxValue) const
 
void getMinMax (double &minValue, double &maxValue, int band=0) const
 
double getMin (int &col, int &row, int band=0) const
 
double getHistogram (std::vector< double > &histvector, double &min, double &max, unsigned int &nbin, int theBand=0, bool kde=false)
 
double getMax (int &col, int &row, int band=0) const
 
void getRefPix (double &refX, double &refY, int band=0) const
 
void getRange (std::vector< short > &range, int Band=0) const
 
unsigned long int getNvalid (int band) const
 
- Public Member Functions inherited from ImgRasterGdal
std::string getFileName () const
 
int nrOfCol (void) const
 
int nrOfRow (void) const
 
int nrOfBand (void) const
 
bool isGeoRef () const
 
std::string getProjection (void) const
 
std::string getProjectionRef (void) const
 
std::string getGeoTransform () const
 
void getGeoTransform (double *gt) const
 
bool getBoundingBox (double &ulx, double &uly, double &lrx, double &lry) const
 
bool getCenterPos (double &x, double &y) const
 
double getUlx () const
 
double getUly () const
 
double getLrx () const
 
double getLry () const
 
int getNoDataValues (std::vector< double > &noDataValues) const
 
bool isNoData (double value) const
 
int pushNoDataValue (double noDataValue)
 
int setNoData (const std::vector< double > nodata)
 
CPLErr GDALSetNoDataValue (double noDataValue, int band=0)
 
bool covers (double x, double y) const
 
bool covers (double ulx, double uly, double lrx, double lry) const
 
bool geo2image (double x, double y, double &i, double &j) const
 
bool image2geo (double i, double j, double &x, double &y) const
 
double getDeltaX (void) const
 
double getDeltaY (void) const
 
GDALDataType getDataType (int band=0) const
 
GDALRasterBand * getRasterBand (int band=0)
 
GDALColorTable * getColorTable (int band=0) const
 
std::string getDriverDescription () const
 
std::string getImageType () const
 
std::string getInterleave () const
 
std::string getCompression () const
 
GDALDataset * getDataset ()
 
char ** getMetadata ()
 
char ** getMetadata () const
 
void getMetadata (std::list< std::string > &metadata) const
 
std::string getDescription () const
 
std::string getMetadataItem () const
 
std::string getImageDescription () const
 

Protected Member Functions

void setCodec (const GDALAccess &readMode=GA_ReadOnly)
 

Protected Attributes

std::vector< double > m_scale
 
std::vector< double > m_offset
 
- Protected Attributes inherited from ImgRasterGdal
std::string m_filename
 
GDALDataset * m_gds
 
int m_ncol
 
int m_nrow
 
int m_nband
 
double m_gt [6]
 
std::vector< double > m_noDataValues
 

Detailed Description

Definition at line 32 of file ImgReaderGdal.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/md_examples_pkdumpogr.html0000644000113200011300000001012412647637662017131 00000000000000 pktools: examples_pkdumpogr
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkdumpogr

Examples of pkdumpogr

Dump the attributes label and description for the vector dataset sample.sqlite to standard output (screen)

pkdumpogr -i sample.sqlite -n label -n description
0 2 noforest
1 2 noforest
2 2 noforest
3 2 noforest
4 2 noforest
5 2 noforest
6 2 noforest
7 2 noforest
8 2 noforest
9 2 noforest
10 1 forest
11 2 noforest

Similar to previous example, but transpose output (does not work without explicitly defining options -n for attributes)

pkdumpogr -i sample.sqlite -n label -n description -t
0 2 2 2 2 2 2 2 2 2 2 1 2
1 noforest noforest noforest noforest noforest noforest noforest noforest noforest noforest forest noforest

Dump the entire content of vector dataset input.sqlite to standard output

pkdumpogr -i input.sqlite

Dump only ATTRIBUTE of vector dataset input.sqlite including x and y position and output to ASCII file output.txt

pkdumpogr -i input.sqlite -o output.txt -n ATTRIBUTE -pos
pktools-2.6.6/doc/html/pktools_2pksetmask_8py_source.html0000644000113200011300000007621612647637661020577 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pksetmask.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pksetmask.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pksetmask.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pksetmask(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  MASK = "MASK"
42  MSKNODATA = "MSKNODATA"
43  MSKBAND = "MSKBAND"
44  OPERATOR_OPTIONS = ["=","<",">","!"]
45  OPERATOR = "OPERATOR"
46  NODATA = "NODATA"
47  OUTPUT = "OUTPUT"
48  RTYPE = 'RTYPE'
49  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
50  EXTRA = 'EXTRA'
51 
52  def cliName(self):
53  return "pksetmask"
54 
55  def defineCharacteristics(self):
56  self.name = "apply mask to raster dataset"
57  self.group = "[pktools] raster"
58  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
59  self.addParameter(ParameterMultipleInput(self.MASK, 'Mask(s) to apply',ParameterMultipleInput.TYPE_RASTER))
60  self.addParameter(ParameterString(self.MSKNODATA, "Mask value(s), provide value for each mask (e.g., 250;255)","1"))
61  self.addParameter(ParameterString(self.MSKBAND, "Mask band(s) to read, provide band for each mask (e.g., 0;1)","0"))
62  self.addParameter(ParameterSelection(self.OPERATOR,"setmask rule",self.OPERATOR_OPTIONS, 0))
63  self.addParameter(ParameterString(self.NODATA, "nodata value to put in image if not valid","0"))
64  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
65  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
66  self.addParameter(ParameterString(self.EXTRA,
67  'Additional parameters', '-of GTiff', optional=True))
68 
69  def processAlgorithm(self, progress):
70  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
71  commands = [cliPath]
72 
73  input=self.getParameterValue(self.INPUT)
74  commands.append('-i')
75  commands.append('"' + input + '"')
76 
77  mask=self.getParameterValue(self.MASK)
78  maskFiles = mask.split(';')
79  for maskFile in maskFiles:
80  commands.append('-m')
81  commands.append(maskFile)
82 
83  commands.append(str(self.getParameterValue(self.MSKBAND)))
84  mskband=self.getParameterValue(self.MSKBAND)
85  mskbandValues = mskband.split(';')
86  for mskbandValue in mskbandValues:
87  commands.append('-mskband')
88  commands.append(mskbandValue)
89  commands.append(str(self.getParameterValue(self.MSKNODATA)))
90  msknodata=self.getParameterValue(self.MSKNODATA)
91  msknodataValues = msknodata.split(';')
92  for msknodataValue in msknodataValues:
93  commands.append('-msknodata')
94  commands.append(msknodataValue)
95 
96  commands.append("-p")
97  commands.append(self.OPERATOR_OPTIONS[self.getParameterValue(self.OPERATOR)])
98  nodata=self.getParameterValue(self.NODATA)
99  commands.append('-nodata')
100  commands.append(nodata)
101  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
102  commands.append('-ot')
103  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
104  output=self.getOutputValue(self.OUTPUT)
105  if output != "":
106  commands.append("-o")
107  commands.append('"' + output + '"')
108 
109  extra = str(self.getParameterValue(self.EXTRA))
110  if len(extra) > 0:
111  commands.append(extra)
112 
113  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/build-pkdiff__gui-gcc-Release_2moc__mainwindow_8cpp_source.html0000644000113200011300000005242312647637661026052 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Release/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkdiff_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  11, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  70, 11, 11, 11, 0x08,
36  96, 11, 11, 11, 0x08,
37  124, 11, 11, 11, 0x08,
38  154, 11, 11, 11, 0x08,
39  183, 11, 11, 11, 0x08,
40  214, 11, 11, 11, 0x08,
41  248, 11, 11, 11, 0x08,
42  276, 11, 11, 11, 0x08,
43  308, 11, 11, 11, 0x08,
44 
45  0 // eod
46 };
47 
48 static const char qt_meta_stringdata_MainWindow[] = {
49  "MainWindow\0\0on_actionInput_triggered()\0"
50  "on_actionReference_triggered()\0"
51  "on_actionMask_triggered()\0"
52  "on_actionOutput_triggered()\0"
53  "on_toolButton_input_clicked()\0"
54  "on_toolButton_mask_clicked()\0"
55  "on_toolButton_output_clicked()\0"
56  "on_toolButton_reference_clicked()\0"
57  "on_pushButton_run_clicked()\0"
58  "on_pushButton_restore_clicked()\0"
59  "on_commandLinkButtonPrepareTable_clicked()\0"
60 };
61 
62 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
63 {
64  if (_c == QMetaObject::InvokeMetaMethod) {
65  Q_ASSERT(staticMetaObject.cast(_o));
66  MainWindow *_t = static_cast<MainWindow *>(_o);
67  switch (_id) {
68  case 0: _t->on_actionInput_triggered(); break;
69  case 1: _t->on_actionReference_triggered(); break;
70  case 2: _t->on_actionMask_triggered(); break;
71  case 3: _t->on_actionOutput_triggered(); break;
72  case 4: _t->on_toolButton_input_clicked(); break;
73  case 5: _t->on_toolButton_mask_clicked(); break;
74  case 6: _t->on_toolButton_output_clicked(); break;
75  case 7: _t->on_toolButton_reference_clicked(); break;
76  case 8: _t->on_pushButton_run_clicked(); break;
77  case 9: _t->on_pushButton_restore_clicked(); break;
78  case 10: _t->on_commandLinkButtonPrepareTable_clicked(); break;
79  default: ;
80  }
81  }
82  Q_UNUSED(_a);
83 }
84 
85 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
86  0, qt_static_metacall
87 };
88 
89 const QMetaObject MainWindow::staticMetaObject = {
90  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
91  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
92 };
93 
94 #ifdef Q_NO_DATA_RELOCATION
95 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
96 #endif //Q_NO_DATA_RELOCATION
97 
98 const QMetaObject *MainWindow::metaObject() const
99 {
100  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
101 }
102 
103 void *MainWindow::qt_metacast(const char *_clname)
104 {
105  if (!_clname) return 0;
106  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
107  return static_cast<void*>(const_cast< MainWindow*>(this));
108  return QMainWindow::qt_metacast(_clname);
109 }
110 
111 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
112 {
113  _id = QMainWindow::qt_metacall(_c, _id, _a);
114  if (_id < 0)
115  return _id;
116  if (_c == QMetaObject::InvokeMetaMethod) {
117  if (_id < 11)
118  qt_static_metacall(this, _c, _id, _a);
119  _id -= 11;
120  }
121  return _id;
122 }
123 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/classOptionpk__coll__graph.md50000644000113200011300000000004012616110566017562 000000000000004f870ed6f6d4377a5fdde63d8dedb941pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral__coll__graph.map0000644000113200011300000000015312616110567027512 00000000000000 pktools-2.6.6/doc/html/classLastReturnFilter__inherit__graph.md50000644000113200011300000000004012616110566021741 00000000000000d39673c5d5bfa1f1515c3e94849bbd8epktools-2.6.6/doc/html/Filter2d_8h_source.html0000644000113200011300000065057412647637661016217 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/Filter2d.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
Filter2d.h
1 /**********************************************************************
2 Filter2d.h: class for filtering images
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _MYFILTER2D_H_
21 #define _MYFILTER2D_H_
22 
23 #ifndef PI
24 #define PI 3.1415926535897932384626433832795
25 #endif
26 
27 #ifndef DEG2RAD
28 #define DEG2RAD(DEG) (DEG/180.0*PI)
29 #endif
30 
31 #ifndef RAD2DEG
32 #define RAD2DEG(RAD) (RAD/PI*180)
33 #endif
34 
35 #ifdef WIN32
36 #include <process.h>
37 #define getpid _getpid
38 #endif
39 
40 #include <assert.h>
41 #include <math.h>
42 #include <limits>
43 #include <vector>
44 #include <string>
45 #include <map>
46 extern "C" {
47 #include <gsl/gsl_sort.h>
48 #include <gsl/gsl_wavelet.h>
49 #include <gsl/gsl_wavelet2d.h>
50 #include <gsl/gsl_rng.h>
51 #include <gsl/gsl_randist.h>
52 }
53 #include "base/Vector2d.h"
54 #include "Filter.h"
55 #include "imageclasses/ImgReaderGdal.h"
56 #include "imageclasses/ImgWriterGdal.h"
57 #include "algorithms/StatFactory.h"
58 
59 namespace filter2d
60 {
61  enum FILTER_TYPE { median=100, var=101 , min=102, max=103, sum=104, mean=105, minmax=106, dilate=107, erode=108, close=109, open=110, homog=111, sobelx=112, sobely=113, sobelxy=114, sobelyx=115, smooth=116, density=117, mode=118, mixed=119, threshold=120, ismin=121, ismax=122, heterog=123, order=124, stdev=125, mrf=126, dwt=127, dwti=128, dwt_cut=129, scramble=130, shift=131, linearfeature=132, smoothnodata=133, countid=134, dwt_cut_from=135, savgolay=136, percentile=137, proportion=138, nvalid=139};
62 
63  enum RESAMPLE { NEAR = 0, BILINEAR = 1, BICUBIC = 2 };//bicubic not supported yet...
64 
65 class Filter2d
66 {
67 public:
68  Filter2d(void);
69  Filter2d(const Vector2d<double> &taps);
70  virtual ~Filter2d(){};
71  static FILTER_TYPE getFilterType(const std::string filterType){
72  std::map<std::string, FILTER_TYPE> m_filterMap;
73  initMap(m_filterMap);
74  return m_filterMap[filterType];
75  };
76  static const RESAMPLE getResampleType(const std::string resampleType){
77  if(resampleType=="near") return(NEAR);
78  else if(resampleType=="bilinear") return(BILINEAR);
79  else{
80  std::string errorString="resampling type not supported: ";
81  errorString+=resampleType;
82  errorString+=" use near or bilinear";
83  throw(errorString);
84  }
85  };
86 
87  void setTaps(const Vector2d<double> &taps);
88  /* void setNoValue(double noValue=0){m_noValue=noValue;}; */
89  void pushClass(short theClass=1){m_class.push_back(theClass);};
90  int pushNoDataValue(double noDataValue=0);//{m_mask.push_back(theMask);};
91  void pushThreshold(double theThreshold){m_threshold.push_back(theThreshold);};
92  void setThresholds(const std::vector<double>& theThresholds){m_threshold=theThresholds;};
93  void setClasses(const std::vector<short>& theClasses){m_class=theClasses;};
94  void filter(const ImgReaderGdal& input, ImgWriterGdal& output, bool absolute=false, bool normalize=false, bool noData=false);
95  void smooth(const ImgReaderGdal& input, ImgWriterGdal& output,int dim);
96  void smooth(const ImgReaderGdal& input, ImgWriterGdal& output,int dimX, int dimY);
97  void smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output,int dim);
98  void smoothNoData(const ImgReaderGdal& input, ImgWriterGdal& output,int dimX, int dimY);
99  template<class T1, class T2> void filter(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector);
100  template<class T1, class T2> void smooth(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector,int dim);
101  template<class T1, class T2> void smooth(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector,int dimX, int dimY);
102  void dwtForward(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family);
103  void dwtInverse(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family);
104  void dwtCut(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& wavelet_type, int family, double cut, bool verbose=false);
105  template<class T> void dwtForward(Vector2d<T>& data, const std::string& wavelet_type, int family);
106  template<class T> void dwtInverse(Vector2d<T>& data, const std::string& wavelet_type, int family);
107  template<class T> void dwtCut(Vector2d<T>& data, const std::string& wavelet_type, int family, double cut);
108  void majorVoting(const std::string& inputFilename, const std::string& outputFilename,int dim=0,const std::vector<int> &prior=std::vector<int>());
109  /* void homogeneousSpatial(const std::string& inputFilename, const std::string& outputFilename, int dim, bool disc=false, int noValue=0); */
110  void doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dim, short down=1, bool disc=false);
111  void doit(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, short down=1, bool disc=false);
112  void mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, double beta, bool eightConnectivity=true, short down=1, bool verbose=false);
113  void mrf(const ImgReaderGdal& input, ImgWriterGdal& output, int dimX, int dimY, Vector2d<double> beta, bool eightConnectivity=true, short down=1, bool verbose=false);
114  template<class T1, class T2> void doit(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector, const std::string& method, int dimX, int dimY, short down=1, bool disc=false);
115  void median(const std::string& inputFilename, const std::string& outputFilename, int dim, bool disc=false);
116  void var(const std::string& inputFilename, const std::string& outputFilename, int dim, bool disc=false);
117  void morphology(const ImgReaderGdal& input, ImgWriterGdal& output, const std::string& method, int dimX, int dimY, const std::vector<double> &angle, bool disc=false);
118  template<class T> unsigned long int morphology(const Vector2d<T>& input, Vector2d<T>& output, const std::string& method, int dimX, int dimY, bool disc=false, double hThreshold=0);
119  template<class T> unsigned long int dsm2dtm_nwse(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim=3);
120  template<class T> unsigned long int dsm2dtm_nesw(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim=3);
121  template<class T> unsigned long int dsm2dtm_senw(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim=3);
122  template<class T> unsigned long int dsm2dtm_swne(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim=3);
123  template<class T> void shadowDsm(const Vector2d<T>& input, Vector2d<T>& output, double sza, double saa, double pixelSize, short shadowFlag=1);
124  void shadowDsm(const ImgReaderGdal& input, ImgWriterGdal& output, double sza, double saa, double pixelSize, short shadowFlag=1);
125  void dwt_texture(const std::string& inputFilename, const std::string& outputFilename,int dim, int scale, int down=1, int iband=0, bool verbose=false);
126  void shift(const ImgReaderGdal& input, ImgWriterGdal& output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=BILINEAR, bool verbose=false);
127  template<class T> void shift(const Vector2d<T>& input, Vector2d<T>& output, double offsetX=0, double offsetY=0, double randomSigma=0, RESAMPLE resample=NEAR, bool verbose=false);
128  void linearFeature(const Vector2d<float>& input, std::vector< Vector2d<float> >& output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, bool verbose=false);
129  void linearFeature(const ImgReaderGdal& input, ImgWriterGdal& output, float angle=361, float angleStep=1, float maxDistance=0, float eps=0, bool l1=true, bool a1=true, bool l2=true, bool a2=true, int band=0, bool verbose=false);
130 
131 private:
132  static void initMap(std::map<std::string, FILTER_TYPE>& m_filterMap){
133  //initialize selMap
134  m_filterMap["median"]=filter2d::median;
135  m_filterMap["nvalid"]=filter2d::nvalid;
136  m_filterMap["var"]=filter2d::var;
137  m_filterMap["min"]=filter2d::min;
138  m_filterMap["max"]=filter2d::max;
139  m_filterMap["sum"]=filter2d::sum;
140  m_filterMap["mean"]=filter2d::mean;
141  m_filterMap["minmax"]=filter2d::minmax;
142  m_filterMap["dilate"]=filter2d::dilate;
143  m_filterMap["erode"]=filter2d::erode;
144  m_filterMap["close"]=filter2d::close;
145  m_filterMap["open"]=filter2d::open;
146  m_filterMap["homog"]=filter2d::homog;
147  m_filterMap["sobelx"]=filter2d::sobelx;
148  m_filterMap["sobely"]=filter2d::sobely;
149  m_filterMap["sobelxy"]=filter2d::sobelxy;
150  m_filterMap["sobelyx"]=filter2d::sobelyx;
151  m_filterMap["smooth"]=filter2d::smooth;
152  m_filterMap["density"]=filter2d::density;
153  m_filterMap["mode"]=filter2d::mode;
154  m_filterMap["mixed"]=filter2d::mixed;
155  m_filterMap["smoothnodata"]=filter2d::smoothnodata;
156  m_filterMap["threshold"]=filter2d::threshold;
157  m_filterMap["ismin"]=filter2d::ismin;
158  m_filterMap["ismax"]=filter2d::ismax;
159  m_filterMap["heterog"]=filter2d::heterog;
160  m_filterMap["order"]=filter2d::order;
161  m_filterMap["stdev"]=filter2d::stdev;
162  m_filterMap["mrf"]=filter2d::mrf;
163  m_filterMap["dwt"]=filter2d::dwt;
164  m_filterMap["dwti"]=filter2d::dwti;
165  m_filterMap["dwt_cut"]=filter2d::dwt_cut;
166  m_filterMap["dwt_cut_from"]=filter2d::dwt_cut_from;
167  m_filterMap["scramble"]=filter2d::scramble;
168  m_filterMap["shift"]=filter2d::shift;
169  m_filterMap["linearfeature"]=filter2d::linearfeature;
170  m_filterMap["countid"]=filter2d::countid;
171  m_filterMap["savgolay"]=filter2d::savgolay;
172  m_filterMap["percentile"]=filter2d::percentile;
173  m_filterMap["proportion"]=filter2d::proportion;
174  }
175 
176  Vector2d<double> m_taps;
177  /* double m_noValue; */
178  std::vector<short> m_class;
179  /* std::vector<short> m_mask; */
180  std::vector<double> m_noDataValues;
181  std::vector<double> m_threshold;
182 };
183 
184 
185  template<class T1, class T2> void Filter2d::smooth(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector,int dim)
186  {
187  smooth(inputVector,outputVector,dim,dim);
188  }
189 
190  template<class T1, class T2> void Filter2d::smooth(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector,int dimX, int dimY)
191  {
192  m_taps.resize(dimY);
193  for(int j=0;j<dimY;++j){
194  m_taps[j].resize(dimX);
195  for(int i=0;i<dimX;++i)
196  m_taps[j][i]=1.0/dimX/dimY;
197  }
198  filter(inputVector,outputVector);
199  }
200 
201  template<class T1, class T2> void Filter2d::filter(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector)
202  {
203  outputVector.resize(inputVector.size());
204  int dimX=m_taps[0].size();//horizontal!!!
205  int dimY=m_taps.size();//vertical!!!
206  Vector2d<T1> inBuffer(dimY);
207  std::vector<T2> outBuffer(inputVector[0].size());
208  //initialize last half of inBuffer
209  int indexI=0;
210  int indexJ=0;
211  //initialize last half of inBuffer
212  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
213  inBuffer[indexJ]=inputVector[abs(j)];
214  ++indexJ;
215  }
216 
217  for(int y=0;y<inputVector.size();++y){
218  if(y){//inBuffer already initialized for y=0
219  //erase first line from inBuffer
220  inBuffer.erase(inBuffer.begin());
221  //read extra line and push back to inBuffer if not out of bounds
222  if(y+dimY/2<inputVector.size()){
223  //allocate buffer
224  inBuffer.push_back(inputVector[y+dimY/2]);
225  }
226  else{
227  int over=y+dimY/2-inputVector.nRows();
228  int index=(inBuffer.size()-1)-over;
229  assert(index>=0);
230  assert(index<inBuffer.size());
231  inBuffer.push_back(inBuffer[index]);
232  }
233  }
234  for(int x=0;x<inputVector.nCols();++x){
235  outBuffer[x]=0;
236  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
237  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
238  indexI=x+i;
239  indexJ=(dimY-1)/2+j;
240  //check if out of bounds
241  if(x<(dimX-1)/2)
242  indexI=x+abs(i);
243  else if(x>=inputVector.nCols()-(dimX-1)/2)
244  indexI=x-abs(i);
245  if(y<(dimY-1)/2)
246  indexJ=(dimY-1)/2+abs(j);
247  else if(y>=inputVector.nRows()-(dimY-1)/2)
248  indexJ=(dimY-1)/2-abs(j);
249  outBuffer[x]+=(m_taps[(dimY-1)/2+j][(dimX-1)/2+i]*inBuffer[indexJ][indexI]);
250  }
251  }
252  }
253  //copy outBuffer to outputVector
254  outputVector[y]=outBuffer;
255  }
256  }
257 
258 template<class T1, class T2> void Filter2d::doit(const Vector2d<T1>& inputVector, Vector2d<T2>& outputVector, const std::string& method, int dimX, int dimY, short down, bool disc)
259 {
260  const char* pszMessage;
261  void* pProgressArg=NULL;
262  GDALProgressFunc pfnProgress=GDALTermProgress;
263  double progress=0;
264  pfnProgress(progress,pszMessage,pProgressArg);
265 
266  double noDataValue=0;
267  if(m_noDataValues.size())
268  noDataValue=m_noDataValues[0];
269 
270  assert(dimX);
271  assert(dimY);
272 
274  outputVector.resize((inputVector.size()+down-1)/down);
275  Vector2d<T1> inBuffer(dimY);
276  std::vector<T2> outBuffer((inputVector[0].size()+down-1)/down);
277  int indexI=0;
278  int indexJ=0;
279  //initialize last half of inBuffer
280  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
281  inBuffer[indexJ]=inputVector[abs(j)];
282  ++indexJ;
283  }
284  for(int y=0;y<inputVector.size();++y){
285  if(y){//inBuffer already initialized for y=0
286  //erase first line from inBuffer
287  inBuffer.erase(inBuffer.begin());
288  //read extra line and push back to inBuffer if not out of bounds
289  if(y+dimY/2<inputVector.size())
290  inBuffer.push_back(inputVector[y+dimY/2]);
291  else{
292  int over=y+dimY/2-inputVector.size();
293  int index=(inBuffer.size()-1)-over;
294  assert(index>=0);
295  assert(index<inBuffer.size());
296  inBuffer.push_back(inBuffer[index]);
297  }
298  }
299  if((y+1+down/2)%down)
300  continue;
301  for(int x=0;x<inputVector[0].size();++x){
302  if((x+1+down/2)%down)
303  continue;
304  outBuffer[x/down]=0;
305  std::vector<double> windowBuffer;
306  std::map<int,int> occurrence;
307  int centre=dimX*(dimY-1)/2+(dimX-1)/2;
308  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
309  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
310  indexI=x+i;
311  //check if out of bounds
312  if(indexI<0)
313  indexI=-indexI;
314  else if(indexI>=inputVector[0].size())
315  indexI=inputVector[0].size()-i;
316  if(y+j<0)
317  indexJ=-j;
318  else if(y+j>=inputVector.size())
319  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
320  else
321  indexJ=(dimY-1)/2+j;
322  bool masked=false;
323  for(int imask=0;imask<m_noDataValues.size();++imask){
324  if(inBuffer[indexJ][indexI]==m_noDataValues[imask]){
325  masked=true;
326  break;
327  }
328  }
329  if(!masked){
330  std::vector<short>::const_iterator vit=m_class.begin();
331  //todo: test if this works (only add occurrence if within defined classes)!
332  if(!m_class.size())
333  ++occurrence[inBuffer[indexJ][indexI]];
334  else{
335  while(vit!=m_class.end()){
336  if(inBuffer[indexJ][indexI]==*(vit++))
337  ++occurrence[inBuffer[indexJ][indexI]];
338  }
339  }
340  windowBuffer.push_back(inBuffer[indexJ][indexI]);
341  }
342  }
343  }
344  switch(getFilterType(method)){
345  case(filter2d::nvalid):
346  outBuffer[x/down]=stat.nvalid(windowBuffer);
347  break;
348  case(filter2d::median):
349  if(windowBuffer.empty())
350  outBuffer[x/down]=noDataValue;
351  else
352  outBuffer[x/down]=stat.median(windowBuffer);
353  break;
354  case(filter2d::var):{
355  if(windowBuffer.empty())
356  outBuffer[x/down]=noDataValue;
357  else
358  outBuffer[x/down]=stat.var(windowBuffer);
359  break;
360  }
361  case(filter2d::stdev):{
362  if(windowBuffer.empty())
363  outBuffer[x/down]=noDataValue;
364  else
365  outBuffer[x/down]=sqrt(stat.var(windowBuffer));
366  break;
367  }
368  case(filter2d::mean):{
369  if(windowBuffer.empty())
370  outBuffer[x/down]=noDataValue;
371  else
372  outBuffer[x/down]=stat.mean(windowBuffer);
373  break;
374  }
375  case(filter2d::min):{
376  if(windowBuffer.empty())
377  outBuffer[x/down]=noDataValue;
378  else
379  outBuffer[x/down]=stat.mymin(windowBuffer);
380  break;
381  }
382  case(filter2d::ismin):{
383  if(windowBuffer.empty())
384  outBuffer[x/down]=noDataValue;
385  else
386  outBuffer[x/down]=(stat.mymin(windowBuffer)==windowBuffer[centre])? 1:0;
387  break;
388  }
389  case(filter2d::minmax):{
390  double min=0;
391  double max=0;
392  if(windowBuffer.empty())
393  outBuffer[x/down]=noDataValue;
394  else{
395  stat.minmax(windowBuffer,windowBuffer.begin(),windowBuffer.end(),min,max);
396  if(min!=max)
397  outBuffer[x/down]=0;
398  else
399  outBuffer[x/down]=windowBuffer[centre];//centre pixels
400  }
401  break;
402  }
403  case(filter2d::max):{
404  if(windowBuffer.empty())
405  outBuffer[x/down]=noDataValue;
406  else
407  outBuffer[x/down]=stat.mymax(windowBuffer);
408  break;
409  }
410  case(filter2d::ismax):{
411  if(windowBuffer.empty())
412  outBuffer[x/down]=noDataValue;
413  else
414  outBuffer[x/down]=(stat.mymax(windowBuffer)==windowBuffer[centre])? 1:0;
415  break;
416  }
417  case(filter2d::order):{
418  if(windowBuffer.empty())
419  outBuffer[x/down]=noDataValue;
420  else{
421  double lbound=0;
422  double ubound=dimX*dimY;
423  double theMin=stat.mymin(windowBuffer);
424  double theMax=stat.mymax(windowBuffer);
425  double scale=(ubound-lbound)/(theMax-theMin);
426  outBuffer[x/down]=static_cast<short>(scale*(windowBuffer[centre]-theMin)+lbound);
427  }
428  break;
429  }
430  case(filter2d::sum):{
431  outBuffer[x/down]=stat.sum(windowBuffer);
432  break;
433  }
434  case(filter2d::percentile):{
435  assert(m_threshold.size());
436  outBuffer[x/down]=stat.percentile(windowBuffer,windowBuffer.begin(),windowBuffer.end(),m_threshold[0]);
437  break;
438  }
439  case(filter2d::proportion):{
440  assert(m_threshold.size());
441  double sum=stat.sum(windowBuffer);
442  if(sum)
443  outBuffer[x/down]=windowBuffer[centre]/sum;
444  else
445  outBuffer[x/down]=noDataValue;
446  break;
447  }
448  case(filter2d::homog):
449  if(occurrence.size()==1)//all values in window must be the same
450  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];
451  else//favorize original value in case of ties
452  outBuffer[x/down]=noDataValue;
453  break;
454  case(filter2d::heterog):{
455  for(std::vector<double>::const_iterator wit=windowBuffer.begin();wit!=windowBuffer.end();++wit){
456  if(wit==windowBuffer.begin()+windowBuffer.size()/2)
457  continue;
458  else if(*wit!=inBuffer[(dimY-1)/2][x])
459  outBuffer[x/down]=1;
460  else if(*wit==inBuffer[(dimY-1)/2][x]){//todo:wit mag niet central pixel zijn
461  outBuffer[x/down]=noDataValue;
462  break;
463  }
464  }
465  break;
466  }
467  case(filter2d::density):{
468  if(windowBuffer.size()){
469  std::vector<short>::const_iterator vit=m_class.begin();
470  while(vit!=m_class.end())
471  outBuffer[x/down]+=100.0*occurrence[*(vit++)]/windowBuffer.size();
472  }
473  else
474  outBuffer[x/down]=noDataValue;
475  break;
476  }
477  case(filter2d::countid):{
478  if(windowBuffer.size())
479  outBuffer[x/down]=occurrence.size();
480  else
481  outBuffer[x/down]=noDataValue;
482  break;
483  }
484  case(filter2d::mode):{
485  if(occurrence.size()){
486  std::map<int,int>::const_iterator maxit=occurrence.begin();
487  for(std::map<int,int>::const_iterator mit=occurrence.begin();mit!=occurrence.end();++mit){
488  if(mit->second>maxit->second)
489  maxit=mit;
490  }
491  if(occurrence[inBuffer[(dimY-1)/2][x]]<maxit->second)//
492  outBuffer[x/down]=maxit->first;
493  else//favorize original value in case of ties
494  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];
495  }
496  else
497  outBuffer[x/down]=noDataValue;
498  break;
499  }
500  case(filter2d::threshold):{
501  assert(m_class.size()==m_threshold.size());
502  if(windowBuffer.size()){
503  outBuffer[x/down]=inBuffer[(dimY-1)/2][x];//initialize with original value (in case thresholds not met)
504  for(int iclass=0;iclass<m_class.size();++iclass){
505  if(100.0*(occurrence[m_class[iclass]])/windowBuffer.size()>m_threshold[iclass])
506  outBuffer[x/down]=m_class[iclass];
507  }
508  }
509  else
510  outBuffer[x/down]=noDataValue;
511  break;
512  }
513  case(filter2d::scramble):{//could be done more efficiently window by window with random shuffling entire buffer and assigning entire buffer at once to output image...
514  if(windowBuffer.size()){
515  int randomIndex=std::rand()%windowBuffer.size();
516  if(randomIndex>=windowBuffer.size())
517  outBuffer[x/down]=windowBuffer.back();
518  else if(randomIndex<0)
519  outBuffer[x/down]=windowBuffer[0];
520  else
521  outBuffer[x/down]=windowBuffer[randomIndex];
522  }
523  else
524  outBuffer[x/down]=noDataValue;
525  break;
526  }
527  case(filter2d::mixed):{
528  enum MixType { BF=11, CF=12, MF=13, NF=20, W=30 };
529  double nBF=occurrence[BF];
530  double nCF=occurrence[CF];
531  double nMF=occurrence[MF];
532  double nNF=occurrence[NF];
533  double nW=occurrence[W];
534  if(windowBuffer.size()){
535  if((nBF+nCF+nMF)&&(nBF+nCF+nMF>=nNF+nW)){//forest
536  if(nBF/(nBF+nCF)>=0.75)
537  outBuffer[x/down]=BF;
538  else if(nCF/(nBF+nCF)>=0.75)
539  outBuffer[x/down]=CF;
540  else
541  outBuffer[x/down]=MF;
542  }
543  else{//non-forest
544  if(nW&&(nW>=nNF))
545  outBuffer[x/down]=W;
546  else
547  outBuffer[x/down]=NF;
548  }
549  }
550  else
551  outBuffer[x/down]=inBuffer[indexJ][indexI];
552  break;
553  }
554  default:
555  break;
556  }
557  }
558  progress=(1.0+y/down);
559  progress+=(outputVector.size());
560  progress/=outputVector.size();
561  pfnProgress(progress,pszMessage,pProgressArg);
562  //copy outBuffer to outputVector
563  outputVector[y/down]=outBuffer;
564  }
565 }
566 
567 // class Compare_mapValue{
568 // public:
569 // int operator() (const map<int,int>::value_type& v1, const map<int, int>::value_type& v2) const{
570 // return (v1.second)>(v2.second);
571 // }
572 // };
573 
574 template<class T> void Filter2d::shift(const Vector2d<T>& input, Vector2d<T>& output, double offsetX, double offsetY, double randomSigma, RESAMPLE resample, bool verbose){
575  output.resize(input.nRows(),input.nCols());
576  const gsl_rng_type *rangenType;
577  gsl_rng *rangen;
578  gsl_rng_env_setup();
579  rangenType=gsl_rng_default;
580  rangen=gsl_rng_alloc(rangenType);
581  long seed=time(NULL)*getpid();
582  gsl_rng_set(rangen,seed);
583  const char* pszMessage;
584  void* pProgressArg=NULL;
585  GDALProgressFunc pfnProgress=GDALTermProgress;
586  double progress=0;
587  pfnProgress(progress,pszMessage,pProgressArg);
588  for(int j=0;j<input.nRows();++j){
589  for(int i=0;i<input.nCols();++i){
590  T theValue=0;
591  double randomX=0;
592  double randomY=0;
593  if(randomSigma>0){
594  randomX=gsl_ran_gaussian(rangen,randomSigma);
595  randomY=gsl_ran_gaussian(rangen,randomSigma);
596  }
597  double readCol=i+offsetX+randomX;
598  double readRow=j+offsetY+randomY;
599  if(readRow<0)
600  readRow=0;
601  if(readRow>input.nRows()-1)
602  readRow=input.nRows()-1;
603  if(readCol<0)
604  readCol=0;
605  if(readCol>input.nCols()-1)
606  readCol=input.nCols()-1;
607  switch(resample){
608  case(BILINEAR):{
609  double lowerRow=readRow-0.5;
610  double upperRow=readRow+0.5;
611  lowerRow=static_cast<int>(lowerRow);
612  upperRow=static_cast<int>(upperRow);
613  double lowerCol=readCol-0.5;
614  double upperCol=readCol+0.5;
615  lowerCol=static_cast<int>(lowerCol);
616  upperCol=static_cast<int>(upperCol);
617  assert(lowerRow>=0);
618  assert(lowerRow<input.nRows());
619  assert(lowerCol>=0);
620  assert(lowerCol<input.nCols());
621  assert(upperRow>=0);
622  assert(upperRow<input.nRows());
623  assert(upperCol>=0);
624  if(upperCol>=input.nCols()){
625  std::cout << "upperCol: " << upperCol << std::endl;
626  std::cout << "readCol: " << readCol << std::endl;
627  std::cout << "readCol+0.5: " << readCol+0.5 << std::endl;
628  std::cout << "static_cast<int>(readCol+0.5): " << static_cast<int>(readCol+0.5) << std::endl;
629  }
630  assert(upperCol<input.nCols());
631  double c00=input[lowerRow][lowerCol];
632  double c11=input[upperRow][upperCol];
633  double c01=input[lowerRow][upperCol];
634  double c10=input[upperRow][lowerCol];
635  double a=(upperCol-readCol)*c00+(readCol-lowerCol)*c01;
636  double b=(upperCol-readCol)*c10+(readCol-lowerCol)*c11;
637  theValue=(upperRow-readRow)*a+(readRow-lowerRow)*b;
638  break;
639  }
640  default:
641  theValue=input[static_cast<int>(readRow)][static_cast<int>(readCol)];
642  break;
643  }
644  assert(j>=0);
645  assert(j<output.nRows());
646  assert(i>=0);
647  assert(i<output.nCols());
648  output[j][i]=theValue;
649  }
650  progress=(1.0+j);
651  progress/=output.nRows();
652  pfnProgress(progress,pszMessage,pProgressArg);
653  }
654  gsl_rng_free(rangen);
655 }
656 
657 template<class T> unsigned long int Filter2d::morphology(const Vector2d<T>& input, Vector2d<T>& output, const std::string& method, int dimX, int dimY, bool disc, double hThreshold)
658 {
659  const char* pszMessage;
660  void* pProgressArg=NULL;
661  GDALProgressFunc pfnProgress=GDALTermProgress;
662  double progress=0;
663  pfnProgress(progress,pszMessage,pProgressArg);
664 
665  double noDataValue=0;
666  if(m_noDataValues.size())
667  noDataValue=m_noDataValues[0];
668 
669  unsigned long int nchange=0;
670  assert(dimX);
671  assert(dimY);
673  Vector2d<T> inBuffer(dimY,input.nCols());
674  output.clear();
675  output.resize(input.nRows(),input.nCols());
676  int indexI=0;
677  int indexJ=0;
678  //initialize last half of inBuffer
679  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
680  for(int i=0;i<input.nCols();++i)
681  inBuffer[indexJ][i]=input[abs(j)][i];
682  ++indexJ;
683  }
684  for(int y=0;y<input.nRows();++y){
685  if(y){//inBuffer already initialized for y=0
686  //erase first line from inBuffer
687  inBuffer.erase(inBuffer.begin());
688  //read extra line and push back to inBuffer if not out of bounds
689  if(y+dimY/2<input.nRows()){
690  //allocate buffer
691  inBuffer.push_back(inBuffer.back());
692  for(int i=0;i<input.nCols();++i)
693  inBuffer[inBuffer.size()-1][i]=input[y+dimY/2][i];
694  }
695  else{
696  int over=y+dimY/2-input.nRows();
697  int index=(inBuffer.size()-1)-over;
698  assert(index>=0);
699  assert(index<inBuffer.size());
700  inBuffer.push_back(inBuffer[index]);
701  }
702  }
703  for(int x=0;x<input.nCols();++x){
704  output[y][x]=0;
705  double currentValue=inBuffer[(dimY-1)/2][x];
706  std::vector<double> statBuffer;
707  bool currentMasked=false;
708  for(int imask=0;imask<m_noDataValues.size();++imask){
709  if(currentValue==m_noDataValues[imask]){
710  currentMasked=true;
711  break;
712  }
713  }
714  output[y][x]=currentValue;//introduced due to hThreshold
715  if(currentMasked){
716  output[y][x]=currentValue;
717  }
718  else{
719  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
720  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
721  double d2=i*i+j*j;//square distance
722  if(disc&&(d2>(dimX/2)*(dimY/2)))
723  continue;
724  indexI=x+i;
725  //check if out of bounds
726  if(indexI<0)
727  indexI=-indexI;
728  else if(indexI>=input.nCols())
729  indexI=input.nCols()-i;
730  if(y+j<0)
731  indexJ=-j;
732  else if(y+j>=input.nRows())
733  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
734  else
735  indexJ=(dimY-1)/2+j;
736  if(inBuffer[indexJ][indexI]==noDataValue)
737  continue;
738  bool masked=false;
739  for(int imask=0;imask<m_noDataValues.size();++imask){
740  if(inBuffer[indexJ][indexI]==m_noDataValues[imask]){
741  masked=true;
742  break;
743  }
744  }
745  if(!masked){
746  short binValue=0;
747  for(int iclass=0;iclass<m_class.size();++iclass){
748  if(inBuffer[indexJ][indexI]==m_class[iclass]){
749  binValue=1;
750  break;
751  }
752  }
753  if(m_class.size())
754  statBuffer.push_back(binValue);
755  else
756  statBuffer.push_back(inBuffer[indexJ][indexI]);
757  }
758  }
759  }
760  if(statBuffer.size()){
761  switch(getFilterType(method)){
762  case(filter2d::dilate):
763  if(output[y][x]<stat.mymax(statBuffer)-hThreshold){
764  output[y][x]=stat.mymax(statBuffer);
765  ++nchange;
766  }
767  break;
768  case(filter2d::erode):
769  if(output[y][x]>stat.mymin(statBuffer)+hThreshold){
770  output[y][x]=stat.mymin(statBuffer);
771  ++nchange;
772  }
773  break;
774  default:
775  std::ostringstream ess;
776  ess << "Error: morphology method " << method << " not supported, choose " << filter2d::dilate << " (dilate) or " << filter2d::erode << " (erode)" << std::endl;
777  throw(ess.str());
778  break;
779  }
780  if(output[y][x]&&m_class.size())
781  output[y][x]=m_class[0];
782  // else{
783  // assert(m_noDataValues.size());
784  // output[x]=m_noDataValues[0];
785  // }
786  }
787  else
788  output[y][x]=noDataValue;
789  }
790  }
791  progress=(1.0+y);
792  progress/=output.nRows();
793  pfnProgress(progress,pszMessage,pProgressArg);
794  }
795  return nchange;
796 }
797 
798  template<class T> unsigned long int Filter2d::dsm2dtm_nwse(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim)
799 {
800  const char* pszMessage;
801  void* pProgressArg=NULL;
802  GDALProgressFunc pfnProgress=GDALTermProgress;
803  double progress=0;
804  pfnProgress(progress,pszMessage,pProgressArg);
805 
806  Vector2d<T> tmpDSM(inputDSM);
807  double noDataValue=0;
808  if(m_noDataValues.size())
809  noDataValue=m_noDataValues[0];
810 
811  unsigned long int nchange=0;
812  int dimX=dim;
813  int dimY=dim;
814  assert(dimX);
815  assert(dimY);
817  Vector2d<T> inBuffer(dimY,inputDSM.nCols());
818  if(outputMask.size()!=inputDSM.nRows())
819  outputMask.resize(inputDSM.nRows());
820  int indexI=0;
821  int indexJ=0;
822  //initialize last half of inBuffer
823  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
824  for(int i=0;i<inputDSM.nCols();++i)
825  inBuffer[indexJ][i]=tmpDSM[abs(j)][i];
826  ++indexJ;
827  }
828  for(int y=0;y<tmpDSM.nRows();++y){
829  if(y){//inBuffer already initialized for y=0
830  //erase first line from inBuffer
831  inBuffer.erase(inBuffer.begin());
832  //read extra line and push back to inBuffer if not out of bounds
833  if(y+dimY/2<tmpDSM.nRows()){
834  //allocate buffer
835  inBuffer.push_back(inBuffer.back());
836  for(int i=0;i<tmpDSM.nCols();++i)
837  inBuffer[inBuffer.size()-1][i]=tmpDSM[y+dimY/2][i];
838  }
839  else{
840  int over=y+dimY/2-tmpDSM.nRows();
841  int index=(inBuffer.size()-1)-over;
842  assert(index>=0);
843  assert(index<inBuffer.size());
844  inBuffer.push_back(inBuffer[index]);
845  }
846  }
847  for(int x=0;x<tmpDSM.nCols();++x){
848  double centerValue=inBuffer[(dimY-1)/2][x];
849  short nmasked=0;
850  std::vector<T> neighbors;
851  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
852  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
853  indexI=x+i;
854  //check if out of bounds
855  if(indexI<0)
856  indexI=-indexI;
857  else if(indexI>=tmpDSM.nCols())
858  indexI=tmpDSM.nCols()-i;
859  if(y+j<0)
860  indexJ=-j;
861  else if(y+j>=tmpDSM.nRows())
862  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
863  else
864  indexJ=(dimY-1)/2+j;
865  double difference=(centerValue-inBuffer[indexJ][indexI]);
866  if(i||j)//skip centerValue
867  neighbors.push_back(inBuffer[indexJ][indexI]);
868  if(difference>hThreshold)
869  ++nmasked;
870  }
871  }
872  if(nmasked<=nlimit){
873  ++nchange;
874  //reset pixel in outputMask
875  outputMask[y][x]=0;
876  }
877  else{
878  //reset pixel height in tmpDSM
879  sort(neighbors.begin(),neighbors.end());
880  assert(neighbors.size()>1);
881  inBuffer[(dimY-1)/2][x]=neighbors[1];
882  /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */
883  }
884  }
885  progress=(1.0+y);
886  progress/=outputMask.nRows();
887  pfnProgress(progress,pszMessage,pProgressArg);
888  }
889  return nchange;
890 }
891 
892  template<class T> unsigned long int Filter2d::dsm2dtm_nesw(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim)
893 {
894  const char* pszMessage;
895  void* pProgressArg=NULL;
896  GDALProgressFunc pfnProgress=GDALTermProgress;
897  double progress=0;
898  pfnProgress(progress,pszMessage,pProgressArg);
899 
900  Vector2d<T> tmpDSM(inputDSM);
901  double noDataValue=0;
902  if(m_noDataValues.size())
903  noDataValue=m_noDataValues[0];
904 
905  unsigned long int nchange=0;
906  int dimX=dim;
907  int dimY=dim;
908  assert(dimX);
909  assert(dimY);
911  Vector2d<T> inBuffer(dimY,inputDSM.nCols());
912  if(outputMask.size()!=inputDSM.nRows())
913  outputMask.resize(inputDSM.nRows());
914  int indexI=0;
915  int indexJ=0;
916  //initialize last half of inBuffer
917  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
918  for(int i=0;i<inputDSM.nCols();++i)
919  inBuffer[indexJ][i]=tmpDSM[abs(j)][i];
920  ++indexJ;
921  }
922  for(int y=0;y<tmpDSM.nRows();++y){
923  if(y){//inBuffer already initialized for y=0
924  //erase first line from inBuffer
925  inBuffer.erase(inBuffer.begin());
926  //read extra line and push back to inBuffer if not out of bounds
927  if(y+dimY/2<tmpDSM.nRows()){
928  //allocate buffer
929  inBuffer.push_back(inBuffer.back());
930  for(int i=0;i<tmpDSM.nCols();++i)
931  inBuffer[inBuffer.size()-1][i]=tmpDSM[y+dimY/2][i];
932  }
933  else{
934  int over=y+dimY/2-tmpDSM.nRows();
935  int index=(inBuffer.size()-1)-over;
936  assert(index>=0);
937  assert(index<inBuffer.size());
938  inBuffer.push_back(inBuffer[index]);
939  }
940  }
941  for(int x=tmpDSM.nCols()-1;x>=0;--x){
942  double centerValue=inBuffer[(dimY-1)/2][x];
943  short nmasked=0;
944  std::vector<T> neighbors;
945  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
946  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
947  indexI=x+i;
948  //check if out of bounds
949  if(indexI<0)
950  indexI=-indexI;
951  else if(indexI>=tmpDSM.nCols())
952  indexI=tmpDSM.nCols()-i;
953  if(y+j<0)
954  indexJ=-j;
955  else if(y+j>=tmpDSM.nRows())
956  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
957  else
958  indexJ=(dimY-1)/2+j;
959  double difference=(centerValue-inBuffer[indexJ][indexI]);
960  if(i||j)//skip centerValue
961  neighbors.push_back(inBuffer[indexJ][indexI]);
962  if(difference>hThreshold)
963  ++nmasked;
964  }
965  }
966  if(nmasked<=nlimit){
967  ++nchange;
968  //reset pixel in outputMask
969  outputMask[y][x]=0;
970  }
971  else{
972  //reset pixel height in tmpDSM
973  sort(neighbors.begin(),neighbors.end());
974  assert(neighbors.size()>1);
975  inBuffer[(dimY-1)/2][x]=neighbors[1];
976  /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */
977  }
978  }
979  progress=(1.0+y);
980  progress/=outputMask.nRows();
981  pfnProgress(progress,pszMessage,pProgressArg);
982  }
983  return nchange;
984 }
985 
986  template<class T> unsigned long int Filter2d::dsm2dtm_senw(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim)
987 {
988  const char* pszMessage;
989  void* pProgressArg=NULL;
990  GDALProgressFunc pfnProgress=GDALTermProgress;
991  double progress=0;
992  pfnProgress(progress,pszMessage,pProgressArg);
993 
994  Vector2d<T> tmpDSM(inputDSM);
995  double noDataValue=0;
996  if(m_noDataValues.size())
997  noDataValue=m_noDataValues[0];
998 
999  unsigned long int nchange=0;
1000  int dimX=dim;
1001  int dimY=dim;
1002  assert(dimX);
1003  assert(dimY);
1005  Vector2d<T> inBuffer(dimY,inputDSM.nCols());
1006  if(outputMask.size()!=inputDSM.nRows())
1007  outputMask.resize(inputDSM.nRows());
1008  int indexI=0;
1009  int indexJ=inputDSM.nRows()-1;
1010  //initialize first half of inBuffer
1011  for(int j=inputDSM.nRows()-dimY/2;j<inputDSM.nRows();--j){
1012  for(int i=0;i<inputDSM.nCols();++i)
1013  inBuffer[indexJ][i]=tmpDSM[abs(j)][i];
1014  ++indexJ;
1015  }
1016  for(int y=tmpDSM.nRows()-1;y>=0;--y){
1017  if(y<tmpDSM.nRows()-1){//inBuffer already initialized for y=tmpDSM.nRows()-1
1018  //erase last line from inBuffer
1019  inBuffer.erase(inBuffer.end()-1);
1020  //read extra line and insert to inBuffer if not out of bounds
1021  if(y-dimY/2>0){
1022  //allocate buffer
1023  inBuffer.insert(inBuffer.begin(),inBuffer.back());
1024  for(int i=0;i<tmpDSM.nCols();++i)
1025  inBuffer[0][i]=tmpDSM[y-dimY/2][i];
1026  }
1027  else{
1028  inBuffer.insert(inBuffer.begin(),inBuffer[abs(y-dimY/2)]);
1029  }
1030  }
1031  for(int x=tmpDSM.nCols()-1;x>=0;--x){
1032  double centerValue=inBuffer[(dimY-1)/2][x];
1033  short nmasked=0;
1034  std::vector<T> neighbors;
1035  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
1036  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
1037  indexI=x+i;
1038  //check if out of bounds
1039  if(indexI<0)
1040  indexI=-indexI;
1041  else if(indexI>=tmpDSM.nCols())
1042  indexI=tmpDSM.nCols()-i;
1043  if(y+j<0)
1044  indexJ=-j;
1045  else if(y+j>=tmpDSM.nRows())
1046  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
1047  else
1048  indexJ=(dimY-1)/2+j;
1049  double difference=(centerValue-inBuffer[indexJ][indexI]);
1050  if(i||j)//skip centerValue
1051  neighbors.push_back(inBuffer[indexJ][indexI]);
1052  if(difference>hThreshold)
1053  ++nmasked;
1054  }
1055  }
1056  if(nmasked<=nlimit){
1057  ++nchange;
1058  //reset pixel in outputMask
1059  outputMask[y][x]=0;
1060  }
1061  else{
1062  //reset pixel height in tmpDSM
1063  sort(neighbors.begin(),neighbors.end());
1064  assert(neighbors.size()>1);
1065  inBuffer[(dimY-1)/2][x]=neighbors[1];
1066  /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */
1067  }
1068  }
1069  progress=(1.0+y);
1070  progress/=outputMask.nRows();
1071  pfnProgress(progress,pszMessage,pProgressArg);
1072  }
1073  return nchange;
1074 }
1075 
1076  template<class T> unsigned long int Filter2d::dsm2dtm_swne(const Vector2d<T>& inputDSM, Vector2d<T>& outputMask, double hThreshold, int nlimit, int dim)
1077 {
1078  const char* pszMessage;
1079  void* pProgressArg=NULL;
1080  GDALProgressFunc pfnProgress=GDALTermProgress;
1081  double progress=0;
1082  pfnProgress(progress,pszMessage,pProgressArg);
1083 
1084  Vector2d<T> tmpDSM(inputDSM);
1085  double noDataValue=0;
1086  if(m_noDataValues.size())
1087  noDataValue=m_noDataValues[0];
1088 
1089  unsigned long int nchange=0;
1090  int dimX=dim;
1091  int dimY=dim;
1092  assert(dimX);
1093  assert(dimY);
1095  Vector2d<T> inBuffer(dimY,inputDSM.nCols());
1096  if(outputMask.size()!=inputDSM.nRows())
1097  outputMask.resize(inputDSM.nRows());
1098  int indexI=0;
1099  int indexJ=0;
1100  //initialize first half of inBuffer
1101  for(int j=inputDSM.nRows()-dimY/2;j<inputDSM.nRows();--j){
1102  for(int i=0;i<inputDSM.nCols();++i)
1103  inBuffer[indexJ][i]=tmpDSM[abs(j)][i];
1104  ++indexJ;
1105  }
1106  for(int y=tmpDSM.nRows()-1;y>=0;--y){
1107  if(y<tmpDSM.nRows()-1){//inBuffer already initialized for y=0
1108  //erase last line from inBuffer
1109  inBuffer.erase(inBuffer.end()-1);
1110  //read extra line and insert to inBuffer if not out of bounds
1111  if(y-dimY/2>0){
1112  //allocate buffer
1113  inBuffer.insert(inBuffer.begin(),inBuffer.back());
1114  for(int i=0;i<tmpDSM.nCols();++i)
1115  inBuffer[0][i]=tmpDSM[y-dimY/2][i];
1116  }
1117  else{
1118  inBuffer.insert(inBuffer.begin(),inBuffer[abs(y-dimY/2)]);
1119  }
1120  }
1121  for(int x=0;x<tmpDSM.nCols();++x){
1122  double centerValue=inBuffer[(dimY-1)/2][x];
1123  short nmasked=0;
1124  std::vector<T> neighbors;
1125  for(int j=-(dimY-1)/2;j<=dimY/2;++j){
1126  for(int i=-(dimX-1)/2;i<=dimX/2;++i){
1127  indexI=x+i;
1128  //check if out of bounds
1129  if(indexI<0)
1130  indexI=-indexI;
1131  else if(indexI>=tmpDSM.nCols())
1132  indexI=tmpDSM.nCols()-i;
1133  if(y+j<0)
1134  indexJ=-j;
1135  else if(y+j>=tmpDSM.nRows())
1136  indexJ=(dimY>2) ? (dimY-1)/2-j : 0;
1137  else
1138  indexJ=(dimY-1)/2+j;
1139  double difference=(centerValue-inBuffer[indexJ][indexI]);
1140  if(i||j)//skip centerValue
1141  neighbors.push_back(inBuffer[indexJ][indexI]);
1142  if(difference>hThreshold)
1143  ++nmasked;
1144  }
1145  }
1146  if(nmasked<=nlimit){
1147  ++nchange;
1148  //reset pixel in outputMask
1149  outputMask[y][x]=0;
1150  }
1151  else{
1152  //reset pixel height in tmpDSM
1153  sort(neighbors.begin(),neighbors.end());
1154  assert(neighbors.size()>1);
1155  inBuffer[(dimY-1)/2][x]=neighbors[1];
1156  /* inBuffer[(dimY-1)/2][x]=stat.mymin(neighbors); */
1157  }
1158  }
1159  progress=(1.0+y);
1160  progress/=outputMask.nRows();
1161  pfnProgress(progress,pszMessage,pProgressArg);
1162  }
1163  return nchange;
1164 }
1165 
1166  template<class T> void Filter2d::shadowDsm(const Vector2d<T>& input, Vector2d<T>& output, double sza, double saa, double pixelSize, short shadowFlag)
1167 {
1168  unsigned int ncols=input.nCols();
1169  output.clear();
1170  output.resize(input.nRows(),ncols);
1171  //do we need to initialize output?
1172  // for(int y=0;y<output.nRows();++y)
1173  // for(int x=0;x<output.nCols();++x)
1174  // output[y][x]=0;
1175  int indexI=0;
1176  int indexJ=0;
1177  const char* pszMessage;
1178  void* pProgressArg=NULL;
1179  GDALProgressFunc pfnProgress=GDALTermProgress;
1180  double progress=0;
1181  pfnProgress(progress,pszMessage,pProgressArg);
1182  for(int y=0;y<input.nRows();++y){
1183  for(int x=0;x<input.nCols();++x){
1184  double currentValue=input[y][x];
1185  int theDist=static_cast<int>(sqrt((currentValue*tan(DEG2RAD(sza))/pixelSize)*(currentValue*tan(DEG2RAD(sza))/pixelSize)));//in pixels
1186  double theDir=DEG2RAD(saa)+PI/2.0;
1187  if(theDir<0)
1188  theDir+=2*PI;
1189  for(int d=0;d<theDist;++d){//d in pixels
1190  indexI=x+d*cos(theDir);//in pixels
1191  indexJ=y+d*sin(theDir);//in pixels
1192  if(indexJ<0||indexJ>=input.size())
1193  continue;
1194  if(indexI<0||indexI>=input[indexJ].size())
1195  continue;
1196  if(input[indexJ][indexI]<currentValue-d*pixelSize/tan(DEG2RAD(sza))){//in m
1197  output[indexJ][indexI]=shadowFlag;
1198  }
1199  }
1200  }
1201  progress=(1.0+y);
1202  progress/=output.nRows();
1203  pfnProgress(progress,pszMessage,pProgressArg);
1204  }
1205 }
1206 
1207 template<class T> void Filter2d::dwtForward(Vector2d<T>& theBuffer, const std::string& wavelet_type, int family){
1208  const char* pszMessage;
1209  void* pProgressArg=NULL;
1210  GDALProgressFunc pfnProgress=GDALTermProgress;
1211  double progress=0;
1212  pfnProgress(progress,pszMessage,pProgressArg);
1213 
1214  int nRow=theBuffer.size();
1215  assert(nRow);
1216  int nCol=theBuffer[0].size();
1217  assert(nCol);
1218  //make sure data size if power of 2
1219  while(theBuffer.size()&(theBuffer.size()-1))
1220  theBuffer.push_back(theBuffer.back());
1221  for(int irow=0;irow<theBuffer.size();++irow)
1222  while(theBuffer[irow].size()&(theBuffer[irow].size()-1))
1223  theBuffer[irow].push_back(theBuffer[irow].back());
1224  std::vector<double> vdata(theBuffer.size()*theBuffer[0].size());
1225  double* data=&(vdata[0]);
1226  for(int irow=0;irow<theBuffer.size();++irow){
1227  for(int icol=0;icol<theBuffer[0].size();++icol){
1228  int index=irow*theBuffer[0].size()+icol;
1229  data[index]=theBuffer[irow][icol];
1230  }
1231  }
1232  int nsize=theBuffer.size()*theBuffer[0].size();
1233  gsl_wavelet *w;
1234  gsl_wavelet_workspace *work;
1235  assert(nsize);
1236  w=gsl_wavelet_alloc(filter::Filter::getWaveletType(wavelet_type),family);
1237  work=gsl_wavelet_workspace_alloc(nsize);
1238  gsl_wavelet2d_nstransform_forward (w, data, theBuffer.size(), theBuffer.size(),theBuffer[0].size(), work);
1239  theBuffer.erase(theBuffer.begin()+nRow,theBuffer.end());
1240  for(int irow=0;irow<theBuffer.size();++irow){
1241  theBuffer[irow].erase(theBuffer[irow].begin()+nCol,theBuffer[irow].end());
1242  for(int icol=0;icol<theBuffer[irow].size();++icol){
1243  int index=irow*theBuffer[irow].size()+icol;
1244  theBuffer[irow][icol]=data[index];
1245  }
1246  progress=(1.0+irow);
1247  progress/=theBuffer.nRows();
1248  pfnProgress(progress,pszMessage,pProgressArg);
1249  }
1250  gsl_wavelet_free (w);
1251  gsl_wavelet_workspace_free (work);
1252 }
1253 
1254 template<class T> void Filter2d::dwtInverse(Vector2d<T>& theBuffer, const std::string& wavelet_type, int family){
1255  const char* pszMessage;
1256  void* pProgressArg=NULL;
1257  GDALProgressFunc pfnProgress=GDALTermProgress;
1258  double progress=0;
1259  pfnProgress(progress,pszMessage,pProgressArg);
1260 
1261  int nRow=theBuffer.size();
1262  assert(nRow);
1263  int nCol=theBuffer[0].size();
1264  assert(nCol);
1265  //make sure data size if power of 2
1266  while(theBuffer.size()&(theBuffer.size()-1))
1267  theBuffer.push_back(theBuffer.back());
1268  for(int irow=0;irow<theBuffer.size();++irow)
1269  while(theBuffer[irow].size()&(theBuffer[irow].size()-1))
1270  theBuffer[irow].push_back(theBuffer[irow].back());
1271  std::vector<double> vdata(theBuffer.size()*theBuffer[0].size());
1272  double* data=&(vdata[0]);
1273  //double data[theBuffer.size()*theBuffer[0].size()];
1274  for(int irow=0;irow<theBuffer.size();++irow){
1275  for(int icol=0;icol<theBuffer[0].size();++icol){
1276  int index=irow*theBuffer[0].size()+icol;
1277  data[index]=theBuffer[irow][icol];
1278  }
1279  }
1280  int nsize=theBuffer.size()*theBuffer[0].size();
1281  gsl_wavelet *w;
1282  gsl_wavelet_workspace *work;
1283  assert(nsize);
1284  w=gsl_wavelet_alloc(filter::Filter::getWaveletType(wavelet_type),family);
1285  work=gsl_wavelet_workspace_alloc(nsize);
1286  gsl_wavelet2d_nstransform_inverse (w, data, theBuffer.size(), theBuffer.size(),theBuffer[0].size(), work);
1287  theBuffer.erase(theBuffer.begin()+nRow,theBuffer.end());
1288  for(int irow=0;irow<theBuffer.size();++irow){
1289  theBuffer[irow].erase(theBuffer[irow].begin()+nCol,theBuffer[irow].end());
1290  for(int icol=0;icol<theBuffer[irow].size();++icol){
1291  int index=irow*theBuffer[irow].size()+icol;
1292  theBuffer[irow][icol]=data[index];
1293  }
1294  progress=(1.0+irow);
1295  progress/=theBuffer.nRows();
1296  pfnProgress(progress,pszMessage,pProgressArg);
1297  }
1298  gsl_wavelet_free (w);
1299  gsl_wavelet_workspace_free (work);
1300 }
1301 
1302 template<class T> void Filter2d::dwtCut(Vector2d<T>& theBuffer, const std::string& wavelet_type, int family, double cut){
1303  const char* pszMessage;
1304  void* pProgressArg=NULL;
1305  GDALProgressFunc pfnProgress=GDALTermProgress;
1306  double progress=0;
1307  pfnProgress(progress,pszMessage,pProgressArg);
1308 
1309  int nRow=theBuffer.size();
1310  assert(nRow);
1311  int nCol=theBuffer[0].size();
1312  assert(nCol);
1313  //make sure data size if power of 2
1314  while(theBuffer.size()&(theBuffer.size()-1))
1315  theBuffer.push_back(theBuffer.back());
1316  for(int irow=0;irow<theBuffer.size();++irow)
1317  while(theBuffer[irow].size()&(theBuffer[irow].size()-1))
1318  theBuffer[irow].push_back(theBuffer[irow].back());
1319  double* data=new double[theBuffer.size()*theBuffer[0].size()];
1320  double* abscoeff=new double[theBuffer.size()*theBuffer[0].size()];
1321  size_t* p=new size_t[theBuffer.size()*theBuffer[0].size()];
1322  for(int irow=0;irow<theBuffer.size();++irow){
1323  for(int icol=0;icol<theBuffer[0].size();++icol){
1324  int index=irow*theBuffer[0].size()+icol;
1325  assert(index<theBuffer.size()*theBuffer[0].size());
1326  data[index]=theBuffer[irow][icol];
1327  }
1328  }
1329  int nsize=theBuffer.size()*theBuffer[0].size();
1330  gsl_wavelet *w;
1331  gsl_wavelet_workspace *work;
1332  assert(nsize);
1333  w=gsl_wavelet_alloc(filter::Filter::getWaveletType(wavelet_type),family);
1334  work=gsl_wavelet_workspace_alloc(nsize);
1335  gsl_wavelet2d_nstransform_forward (w, data, theBuffer.size(), theBuffer[0].size(),theBuffer[0].size(), work);
1336  for(int irow=0;irow<theBuffer.size();++irow){
1337  for(int icol=0;icol<theBuffer[0].size();++icol){
1338  int index=irow*theBuffer[0].size()+icol;
1339  abscoeff[index]=fabs(data[index]);
1340  }
1341  }
1342  int nc=(100-cut)/100.0*nsize;
1343  gsl_sort_index(p,abscoeff,1,nsize);
1344  for(int i=0;(i+nc)<nsize;i++)
1345  data[p[i]]=0;
1346  gsl_wavelet2d_nstransform_inverse (w, data, theBuffer.size(), theBuffer[0].size(),theBuffer[0].size(), work);
1347  for(int irow=0;irow<theBuffer.size();++irow){
1348  for(int icol=0;icol<theBuffer[irow].size();++icol){
1349  int index=irow*theBuffer[irow].size()+icol;
1350  theBuffer[irow][icol]=data[index];
1351  }
1352  progress=(1.0+irow);
1353  progress/=theBuffer.nRows();
1354  pfnProgress(progress,pszMessage,pProgressArg);
1355  }
1356  theBuffer.erase(theBuffer.begin()+nRow,theBuffer.end());
1357  for(int irow=0;irow<theBuffer.size();++irow)
1358  theBuffer[irow].erase(theBuffer[irow].begin()+nCol,theBuffer[irow].end());
1359  delete[] data;
1360  delete[] abscoeff;
1361  delete[] p;
1362  gsl_wavelet_free (w);
1363  gsl_wavelet_workspace_free (work);
1364 
1365 }
1366 
1367 }
1368 
1369 #endif /* _MYFILTER_H_ */
pktools-2.6.6/doc/html/pkegcs.html0000644000113200011300000001021512647637662014020 00000000000000 pktools: pkegcs
pktools  2.6.6
Processing Kernel for geospatial data
pkegcs

Utility for raster files in European Grid Coordinate System

SYNOPSIS

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i image std::string input image to analyse
    b band unsigned short 0 Band specific information
    c2b cell2bb std::string convert cell code to geo coordinates of boundingbox (e.g. 32-AB)
    c2m cell2mid std::string convert cell code to centre in geo coordinates (e.g. 32-AB)
    g2c geo2cell bool false get cell code for coordinates in x_opt and y_opt given the resolution in dx_opt
    ref ref bool false get reference pixel (lower left corner of centre of gravity pixel)
    m mask double 0 mask value(s) for no data to calculate reference pixel in image
    dx dx int 250 resolution
    x x double 0 x coordinate in epsg:3035
    y y double 0 y coordinate in epsg:3035
pktools-2.6.6/doc/html/classKernel__inherit__graph.map0000644000113200011300000000071612616110567020013 00000000000000 pktools-2.6.6/doc/html/pktools_2pkcomposite_8py_source.html0000644000113200011300000013013212647637661021116 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkcomposite.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcomposite.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkcomposite.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkcomposite(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  CRULE_OPTIONS = ["overwrite", "maxndvi", "maxband", "minband", "validband", "mean", "mode", "median", "sum", "minallbands", "maxallbands","stdev"]
43  CRULE = "CRULE"
44  DX = "DX"
45  DY = "DY"
46  PROJWIN = 'PROJWIN'
47  CB = "CB"
48  SRCNODATA = "SRCNODATA"
49  BNDNODATA = "BNDNODATA"
50  DSTNODATA = "DSTNODATA"
51  MINGUI = "MINGUI"
52  MAXGUI = "MAXGUI"
53  RESAMPLE_OPTIONS = ['near', 'bilinear']
54  RESAMPLE = "RESAMPLE"
55  RTYPE = 'RTYPE'
56  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
57  EXTRA = 'EXTRA'
58 
59  def cliName(self):
60  return "pkcomposite"
61 
62  def defineCharacteristics(self):
63  self.name = "composite/mosaic raster datasets"
64  self.group = "[pktools] raster"
65  self.addParameter(ParameterMultipleInput(self.INPUT, 'Input layer raster data set',ParameterMultipleInput.TYPE_RASTER))
66  self.addParameter(ParameterSelection(self.CRULE,"composite rule",self.CRULE_OPTIONS, 0))
67  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
68  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
69  self.addParameter(ParameterNumber(self.DX, "Output resolution in x (leave 0 for no change)",0.0,None,0.0))
70  self.addParameter(ParameterNumber(self.DY, "Output resolution in y (leave 0 for no change)",0.0,None,0.0))
71  self.addParameter(ParameterExtent(self.PROJWIN,
72  'Georeferenced boundingbox'))
73  self.addParameter(ParameterString(self.CB, "band index(es) used for the composite rule (0 based), e.g., 0;1 in case of maxndvi","0"))
74  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
75  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
76  self.addParameter(ParameterString(self.DSTNODATA, "nodata value to put in output raster dataset if not valid or out of bounds","0"))
77  self.addParameter(ParameterString(self.MINGUI, "flag values smaller or equal to this value as invalid","none"))
78  self.addParameter(ParameterString(self.MAXGUI, "flag values smaller or equal to this value as invalid","none"))
79  self.addParameter(ParameterSelection(self.RESAMPLE,"resampling method",self.RESAMPLE_OPTIONS, 0))
80  self.addParameter(ParameterString(self.EXTRA,
81  'Additional parameters', '-of GTiff', optional=True))
82 
83  def processAlgorithm(self, progress):
84  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
85  commands = [cliPath]
86 
87  input=self.getParameterValue(self.INPUT)
88  inputFiles = input.split(';')
89  for inputFile in inputFiles:
90  commands.append('-i')
91  commands.append('"' + inputFile + '"')
92 
93  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
94  commands.append('-ot')
95  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
96  output=self.getOutputValue(self.OUTPUT)
97  if output != "":
98  commands.append("-o")
99  commands.append('"' + output + '"')
100  commands.append("-cr")
101  commands.append(self.CRULE_OPTIONS[self.getParameterValue(self.CRULE)])
102  if self.getParameterValue(self.DX) != 0:
103  commands.append("-dx")
104  commands.append(str(self.getParameterValue(self.DX)))
105  if self.getParameterValue(self.DY) != 0:
106  commands.append("-dy")
107  commands.append(str(self.getParameterValue(self.DY)))
108  projwin = str(self.getParameterValue(self.PROJWIN))
109  regionCoords = projwin.split(',')
110  commands.append('-ulx')
111  commands.append(regionCoords[0])
112  commands.append('-uly')
113  commands.append(regionCoords[3])
114  commands.append('-lrx')
115  commands.append(regionCoords[1])
116  commands.append('-lry')
117  commands.append(regionCoords[2])
118  cb=self.getParameterValue(self.CB)
119  cbValues = cb.split(';')
120  for cbValue in cbValues:
121  commands.append('-cb')
122  commands.append(cbValue)
123  srcnodata=self.getParameterValue(self.SRCNODATA)
124  if srcnodata != "none":
125  srcnodataValues = srcnodata.split(';')
126  for srcnodataValue in srcnodataValues:
127  commands.append('-srcnodata')
128  commands.append(srcnodataValue)
129  bndnodata=self.getParameterValue(self.BNDNODATA)
130  bndnodataValues = bndnodata.split(';')
131  for bndnodataValue in bndnodataValues:
132  commands.append('-bndnodata')
133  commands.append(bndnodataValue)
134  commands.append('-dstnodata')
135  commands.append(self.getParameterValue(self.DSTNODATA))
136 
137  minGUI=self.getParameterValue(self.MINGUI)
138  if minGUI != "none":
139  minValues = minGUI.split(';')
140  for minValue in minValues:
141  commands.append('-min')
142  commands.append(minValue)
143  maxGUI=self.getParameterValue(self.MAXGUI)
144  if maxGUI != "none":
145  maxValues = maxGUI.split(';')
146  for maxValue in maxValues:
147  commands.append('-max')
148  commands.append(maxValue)
149  commands.append("-r")
150  commands.append(self.RESAMPLE_OPTIONS[self.getParameterValue(self.RESAMPLE)])
151  extra = str(self.getParameterValue(self.EXTRA))
152  if len(extra) > 0:
153  commands.append(extra)
154 
155  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilter__spectral_1_1pkfilter__spectral.html0000644000113200011300000002742412647637662027315 00000000000000 pktools: qgis.pktools.pkfilter_spectral.pkfilter_spectral Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkfilter_spectral.pkfilter_spectral Class Reference
Inheritance diagram for qgis.pktools.pkfilter_spectral.pkfilter_spectral:
Collaboration diagram for qgis.pktools.pkfilter_spectral.pkfilter_spectral:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "smooth", "density", "smoothnodata values", "threshold local filtering", "stdev", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "savgolay", "percentile"]
 
string METHOD = "METHOD"
 
string DZ = "DZ"
 
string NODATA = "NODATA"
 
list PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
 
string PADDING = "PADDING"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkfilter_spectral.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop__inherit__graph.md50000644000113200011300000000004012616110566025245 0000000000000034fa2dac6c0a33c03e1352b8cee4a33bpktools-2.6.6/doc/html/classqgis_1_1pklas2img_1_1pklas2img__coll__graph.png0000644000113200011300000000700512616110567023556 00000000000000‰PNG  IHDRµpצùbKGDÿÿÿ ½§“ ºIDATxœí{L“WÇOi-rÑPP.€rÈÂb6·ìÈ@æ‚ÙÔQ5ˆ0Ñ,’Éd¡N3Íâ6 3ëFhñŠÁœÂP./8Tn›¯ jz¶ÏûÇãžÕGûއù}þ çü8çw¾§ýrÎÓrÚ‡A€)°±´Àª8Àð€ƒE_jFÓÙÙi0è@¹»»»¸¸Ð”œF(•ʇÒ'@)•ÊYé’º‡˜Ëüþûï´æ‡ëøÀþp€?Öè®®.ƒ1“©öìÙÃ`0öíÛ7]¦êÎ`0ºººþï´35úcRzzz¸\.™ ‚(//÷òò’J¥Ó•sÁ‚™™™ˆNÙ3ìñ‡Á`xøð!™ÛÚÚnÞ¼YRRÒÒÒÒÑÑ1-9¹\.¹Ñ'{f°°?Èu¸²²200ÐÕÕ5--M«ÕR¿%bçÎaaaL63‘ª®®æñx .ÌËË## £´´téÒ¥...ûöí“H$>>>NNN»víš¶úÿ† þþ~™L†oÓÙÙ‰ŠŽŽîè訯¯çñxB¡  ÊTKªãúõë###»»»[[[CCC…Bá¤Aª×ÈȈ­­­X,¾ÿ~II ‹Å!Â`0øøøñÅ_„„„ #âСCçΓËå.\àñxd|ª±bcc/^¼ØÒÒB63‘zçw”JeEEBˆœB(!!A©T#„Ö®]«T* ©nܸqãÆ óžs° ´¶¶’U©TÊãñÈ`FFBèöíÛÆ-ÉòØØ“ɤ—cÇŽñx¼IƒT/…B1oÞ¼üõ×_ƒaxxX¯×Q__Ïb±È§¡±±!ÔÖÖf<\hhè/¿üB .++CaÆ"çBuŸèK—.¡×ëBd°©©‰œ—I™l€nXÅõ‡¿¿?Y êíí%Ë×®]‹ˆˆÈÍÍØ¾¿¿_¯×ûùù‘U×ÛÛ;iê²páB™LV__ïéé~ùòe„Pyy¹N§ãr¹ cÙ²e!“-¦»»;44”ªO%€š~²îîî!rt „мyóLÊÇ*üAþ‘!„:::ȇ!TUU%‹ËËËe2™IûE‹1™Ìžž²ÚÝÝíáá1iê¢V« Ñ#G ErròªU« …^¯—J¥ùùùÓžž.•J £3—ÞÞÞÆÿã¸yóæTÈòŸ×ézé>Cз4=ýþÂçó;;;üýý³²²Œ×äìì쀀µZM‡‡‡É¸@ ˆŒŒìééikk ÉÊÊš4H¥R«ÕçèÑ£r¹¼¨¨ˆÃá¨Õj™LÆd2ûûû)=ׯ_G555Q<èééyþüùÔÔÔ2 üXÄ„ý…’Œ¶ d´¿L š”§bN\{{{s¹ÜíÛ·SV ¨Õꀀ€ìììñññ×_ÝÞÞžŒ+Š7:;;»¹¹íرC­VO4N%•JýüüØlvPPPee%A©©©ÑÑÑÆz ƒŸŸ_ff&ÕQ¯×‹D"???''§˜˜˜ÊÊJ—'ŽE•Mdƒ?þáéýAŸ†OUUUKK U=zôhXX˜õ˜0'®O­™ÖÖÖ 6455©Tªúúú]»v¥¤¤XZÔÌAûù <ŽŽŽ©©©–Õ€'##C¥RÅÇÇËår__ßÍ›7[¹àé…AÐöù¨öööˆˆšòèïócôÒƒýÀþp€?àí¯_îÝ»G÷sFÃápèËO£?lmm Æt¸™ â‡W¯ôðp°´3X°`}Éiô‡““Sxx8}ù§úúî«WOú®_ai-Ö\üÃñãäO>3üðÇ#ÆÆtÇŽ5#„††Tµµ·--ÇZ<âÒ¥[*•!ÄdÚ;Öhi9ÖøãL¦ BH§3œ=ÛªVYZ‘Uþ@¡ÑQíùó7t:=YÕju.´[V’•þ@!cs „ll×-¨Çz „PEÅuãc¡:A&»¥Tª-(ÉJ …b´¶¶C¯ì5-AgδZJ’õþ@§Nýgb ˆ#G`‹ tô赉‡¤ ¢¾¾»¿È"’¬‡¹î{÷ï “¢c2mªª&YZæsÝUU-S°Ôéôsý2 ŸO¶8*Õ˜››#UÑr8óX¬G6³ë£nt@ãùäÙˆ»û±8ñÝwÃ,-ÄZ˜ëû €üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€üà8Àð€ÅøfÉÞÞÞ––calm½llì,­Â’°Ùì_ý•²Äcß?vçÎ5kÖ[J`qvïÞÝ××GUM¿Ÿ.88îh<—Ù½{·q®?àøÀþpÐå¾¾>>Ÿ?½ÝÿeÎiÏcVþÙ"Þº¾_ÛÞÞ>!!¦äf1::úí·ß655½üòËiiiÖ£í‰X\<]뇓“Ó–-[hJn_}õ•\.‰Db±X©TŠD"ëÑöD,.Þ<qüøñÄÄÄ•+W~ôÑGÍÍÍ|>Ÿ ˆ“'OnÚ´)...==½®®ŽÏç/ƒW¯^MNNŽŽŽÕÕÕ&9É–W®\Ù¸qãêÕ«<8>>n|Øx…`0Ÿ~úimm-¹Š²X,r9}úôèè(Õì»ï¾ëëë»uëVqqñŠ+È ‡ÃY²d‰@ ÈÏÏûç†çããã:ŽÅbýøã!•J5é@£££%%%III¶¶¶ÿý›§ŸïTS›Õâͼõcݺuz½þûï¿ôõõMMMÝ»wo||¼^¯‰DCCC!!![·nÝ¿?Õ…ÍföÙg………îîîÙÙÙl6!tàÀ°°°ùóç“Í¢¢¢>ùäF¹~ýzj•F ‚ššš²²2ê¡···ß¶mÛÞ½{Ÿ{î9@™‘‘qüøñ‰utthµÚ={öÏbâš?SMmV‹7‹Çî/Æ`0²³³Ÿþÿû}}}6lÈÍÍuuu¥6ÚÚZ‰DrèÐ!³’Èd2sdÏuuuø©Íjñ“Âçó¥RéÚµkÉê4¼?ÖÓÓ“““ÓÙÙ©ÕjÛÛÛKKKãââþ}Zk`VOmZÄOÃûë|ðF£ùòË/ÝÜÜbccW­ZõôÝçÏŸoVû™ä‰S›Õ⟆µ¿ÏÓ¿¿Ï0àøÀþp˜¾~‘H$§N²ˆÀ yÌéééwïÞµ”Àð÷÷_¾|9U}ìõ-˜×ð€üà8þqê­I«ÒyýIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__coll__graph.map0000644000113200011300000000014712616110567026671 00000000000000 pktools-2.6.6/doc/html/pktools_2pkreclass_8py_source.html0000644000113200011300000010105112647637661020546 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkreclass.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkreclass.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkreclass.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkreclass(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  CLASS = "CLASS"
43  BAND = "BAND"
44  RECLASS = "RECLASS"
45  MASK = "MASK"
46  MSKNODATA = "MSKNODATA"
47  NODATA = "NODATA"
48  RTYPE = 'RTYPE'
49  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
50  EXTRA = 'EXTRA'
51 
52  def cliName(self):
53  return "pkreclass"
54 
55  def defineCharacteristics(self):
56  self.name = "reclass raster datasets"
57  self.group = "[pktools] raster"
58  self.addParameter(ParameterMultipleInput(self.INPUT, 'Input layer raster data set',ParameterMultipleInput.TYPE_RASTER))
59  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
60  self.addParameter(ParameterString(self.BAND, "Band index(es) to replace, e.g., 0;1;2 (other bands are copied to output)", '0'))
61  self.addParameter(ParameterRaster(self.MASK, "Mask raster dataset",optional=True))
62  self.addParameter(ParameterString(self.MSKNODATA, "Mask value(s) not to consider for classification (e.g., 0;255)","0"))
63  self.addParameter(ParameterString(self.CLASS, "list of classes to reclass, in combination with reclass option, e.g., 0;1;2;3",""))
64  self.addParameter(ParameterString(self.RECLASS, "list of recoded classes, in combination with class option e.g., 10;11;12;13",""))
65  self.addParameter(ParameterNumber(self.NODATA, "nodata value to put in image if not valid",0,None,0))
66 
67  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
68  self.addParameter(ParameterString(self.EXTRA,
69  'Additional parameters', '-of GTiff', optional=True))
70 
71  def processAlgorithm(self, progress):
72  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
73  commands = [cliPath]
74 
75  input=self.getParameterValue(self.INPUT)
76  commands.append('-i')
77  commands.append('"' + input + '"')
78 
79  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
80  commands.append('-ot')
81  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
82 
83  output=self.getOutputValue(self.OUTPUT)
84  commands.append("-o")
85  commands.append('"' + output + '"')
86 
87  commands.append('-nodata')
88  commands.append(str(self.getParameterValue(self.NODATA)))
89 
90  band=str(self.getParameterValue(self.BAND))
91  if band != '':
92  bandValues = band.split(';')
93  for bandValue in bandValues:
94  commands.append('-b')
95  commands.append(bandValue)
96 
97  theclass=str(self.getParameterValue(self.CLASS))
98  if theclass != '':
99  classValues = theclass.split(';')
100  for classValue in classValues:
101  commands.append('-c')
102  commands.append(classValue)
103  reclass=str(self.getParameterValue(self.RECLASS))
104  if reclass != '':
105  reclassValues = reclass.split(';')
106  for reclassValue in reclassValues:
107  commands.append('-r')
108  commands.append(reclassValue)
109 
110  mask = str(self.getParameterValue(self.MASK))
111  if mask != "None":
112  commands.append('-m')
113  commands.append(mask)
114  msknodata=str(self.getParameterValue(self.MSKNODATA))
115  msknodataValues = msknodata.split(';')
116  for msknodataValue in msknodataValues:
117  commands.append('-msknodata')
118  commands.append(msknodataValue)
119 
120  extra = str(self.getParameterValue(self.EXTRA))
121  if len(extra) > 0:
122  commands.append(extra)
123 
124  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/dir_b8eb6544d8d9ffceba16909a7b9d17d7_dep.png0000644000113200011300000000674712616110567020701 00000000000000‰PNG  IHDRß?fÙbKGDÿÿÿ ½§“ œIDATxœíÝ}PTåð/$ÂAÑ€`y‘5“‘;9ÕT—1çv-MK¯/Ù‹‰š¡„¡n!¨%™“ifIFqs¥,•KâûÛæš©($²€dPâZÉ«Ïý£é\VwÏ.‹=»Ô÷3³3{ÎyÎóüöyä;g°ë"„ "úcåþÍÑÑ_ƈ¤`Ø‘ "’‚aCDR0lˆH † IÁ°!")6D$ƈ¤`Ø‘ "’‚aCDR0lˆH ·ÎœüÉ'ŸàwÞ¹Qµ‘“òððÀêÕ«lw ›M›6¡¨è4† ‰íL7Dääòò¶`âÄ‰Ž 2$«V½ßÙnˆÈ‰åçûvºÞ³!")6D$ƈ¤`Ø‘ "’‚aCv©ªªÀ]w…;º êB6d—¶¶6üü³ÑÑeP°!‹ÚÚÚý.âã‡!&&=ƒÐh|1zt<`ذ(WI]E§©þ¼6múo½•‰ôô×1xp,NŸ>¤¤é€Í›wàþû‡âðáï\%u¼²!‹6lx))/#>þŸè…ûîûæÎ]à貨‹bØEUUˆŽŽ1ÙÕßAÕPWǰ!‹zõꃒ’"“}¥¥%ª†º:Þ³!‹ÆŽ}K—jáååAƒ†¢¸ø$^{í“6 õðôìî  ©+aØEO=•ˆÖÖ«HOOÅÅ‹µˆŠº))¯àùçŸÂm·cèÐ8 Ö'OV9ºTê6d‘›[7$&ÎCbâìÃÞºœ™3½&g¨Å××Åäx3FŒ¸'O~kÓùÎðœ‘Ó†½||z`öì]F—Ò~Î** ïéµ8RAÁ—()©FII5:&S§ŽƒÂÑ¥uYÒ?©ïæç×Zí2G—Ñ¥´Ÿ³¶¶6¢GòóóG@@o@@@o¼üòkˆŠê…ÚÚ ð÷ppu]“Ó_Ùäææ`È ""ü‘”4 ×]¦ÚòÖ©µµ«V-Gll$‚‚¼0bÄÝ8zô°Ù1ï#? bc£€””Yhnn6i'„ÀÂ…sqÏ=ƒqñb-®^½ŠeË´ˆ‰ FD„?¦Oÿ7~ùåg¥ý/¿üŒ3&#<¼'ú÷¿ ÎEss€ß.Ýsr²0lX4""ü±rå2ètbðàP„„ø`É’…6Õ¦6ÆöíÛ0|ø@zàÎ;àÓ}xÝœÅÇÇ¢¢z+u·´´`Ñ¢yˆŠê…ÈÈ,Z4---ªë&„Àûï¯E\ÜöƨQ÷£  ¾¾.v­Ÿµ>ÕæÞںآ[·npww‡··O‡çE­]AAî½÷Nôéã‰~ý±råÿƒÖÒzudlgâôa“““…ÜÜíØ¸1û÷ïÂòå‹íêgݺ7ñÖ[™Ðj_…^II©Ðj“UÏY¿~ 6nÌÃÇoî]_˜üCB@«MÆ»ñùç»áç×k×®ÄÖ­ŸB§û/¶nÝ‹³gÏàõ×3”s’“ñÃßc×®¯‘›ûöì)ÀÊ•¯*Ç÷íÛ…Ý»¿†V» iióQP‡C‡N -m923ÓM®8,ÕfiŒ††zL™2Ó¦ÍÀñã˜;wfÎœŠ††z“×¼cG!à»ïj”}o¿ý*+˱gŸ¾îÁÒ¥‹Tçî£Ö#33K–¼cÇ xá…—š:GõkÔúT›{këbNCC=êëëP__‡šš‘±cÇ>›nº©Ãób©]]ÝeLš4ÁÑ£¥X¼8iióQ[{ÁêzÙ³&':aìØ±bäÈQ¢¬ÌhÓ€ÈÊÒ £QX}èõ¥€8t脲/+K'BBB•c×¶U{®ÑDŠÕ«7˜Œ±fÍ&ýX;,,\96kV² ŽùNi%²³7+Û……§•í¼"\]]Å—_)dz³7‹°°pa4 @ìÛ÷ÒÖܶ^_ªZ›ÚƒQtëÖM,^œ)ÊË/‰‹ÛDUÕeQ[ÛjqÎ~DDô%%ÕÊögŸí11ƒU×/:z€X·.Çdß»ïþGy¶¬_GúT›{µcæ®{tï~‹(,þ{eûر#>ü>¬X±«WoTUUšœÈÈhÀ… ?¢µµ¡¡åxXX¸IŸ·Üâà·KvsÛ홫MmŒ=nÅÖ­{ñöÛ+±t©ƒ Áœ9óñàƒ™Ÿ°vΫ@¿~&ûÚ¿0§¼¼ ÑÑLöEEÝa¶­Úúµ_›-ö©6÷jÇ®Ãhü­½¾aaá€ÆÆ,Y²‰‰S±cÇWJ[[çÅR;wwwœ={³g?…úú: x§rÜÚzÙ³&Žæôo£ÊÊJÛ=?ƒ  eûêÕ«€êêóVû ¾EEÇMö•”œRžByX;0°²ýñÇÛ°bÅZlÞ¼îöÁ¹sJ›“'¿U.×ýý{ÁÕÕåxyyúôékµvsÌÕ¦6FSS#ÚÚÚ°aC. #&LxãÇ?ŒK—ŒVÇòóë ½¾T™ŸòòKع³Põœ  “ù€3gŠM¶mY¿öë¢Ö§ÚÜ«»v sn¾Ù?>%%§L‚ÑÖy±Ô®©©S§&`æÌyØ·ïdf®Qα¶^ö¬‰£9}Ø,Xƒá,Ž;‚Å‹_ÂãO†O€N—Ë—źuoZígÊ”g¡ÕÎC~þüôS vïÞnõ=îüù³MÆNH˜ óôìŽðð(<ÿ| ^xáY477aܸ‰HOOEqqŠ‹‹œœˆªªJ¿]<úè8¤¤ÌBee9Š‹‹”ûö0W›Ú...=:Û¶}ŠË—EK˸¹uƒ§§§Ùþëëë”ç?<iióQUU‰S§Nà±ÇFà½÷V«Ö7mÚ hµÉØ»wŒÆ‹8p`–-{...v­Ÿµ>Õæ^혭¼¼¼QWwÙ®y±Ô®¹¹W®\»»;šš±t©PWwÙêzÙ³&çì÷lÖ¯ß(‚ƒoþþbÆŒ$QSÓ,ŒF!RSÓ…Oª99[¬Þ³¹páªHK[.ÂÂÂ…§gwûw±sg¡ê=›7ß|O…?¿žâé§gŠêêÆëÞWW7 &R¼ø¢VTW7‰ÄĹ¢wï>ÂÛÛGŒ3^”—_RÚ F1nÜDáëë'zõ Ó§ÏÕÕÊ}½¾Ôä¾¹mµÚ¬‘•¥¡¡áîî.""ú‰œœ-×ÍÓO?µˆ¸¸á¢{÷[”±ÏûU<ñÄѣǭÂ××OLšô´8¾^uýjk[EFÆ"4T#¼½}ÄŒ99[DÏžþ6¯_GúT›{këbîžMû¹ÿ}l//oñí·åVçåÚ× 6+Ä­·úо}ƒDfæ1fÌxáï º^ö®‰£ïÙ¸[nxX€úú+Xµê}›Úk4¾ÈÊÒ9ý7b g1th„ÅËjGræÚÚ+(ÈCß¾A0`²oÛ¶O‘™™Žýû9MŸU¿#fG~vu:ìþÙÍuú·QÔ5:uÏ<3ÇƒÆÆèõ…ÈÈXˆ‰§9UŸ$Óÿo”#xyycòäg]†YÎT›µ¿ÿIJJÅ„  ¶ön¿= &LíTí³f%£±±á†öIò0lÌð÷ÀŠk]†YÎT›-oåRSÓoØxnnnHMM¿¡}’<|EDR0lˆH † IÁ°!")6D$ƈ¤`Ø‘ "’‚aCDR0lˆH † IÁ°!")6D$ƈ¤`Ø‘ "’Bú‡gef¦ãƒÞ•=,µsúôIÄÆÆISjØ<ùäs6}Çý±bcã0rä£RÇ”6/½Äs$ú«â="’‚aCDR0lˆH † IÁ°!")6D$ƈ¤`Ø‘ú¥>WWWäçoA~¾ïª‡ˆœ”›[ç~ØEaýÛá-0 8zôh§ "ççêꊑ#GÂÃÃÃÞ.r;6DD6Êå="’‚aCDR0lˆH † IÁ°!")6D$ƈ¤`Ø‘ "’‚aCDR0lˆH † IÁ°!")Üä:º"úÓ+üw€ôXéŠþIEND®B`‚pktools-2.6.6/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba_dep.png0000644000113200011300000000703112616110567020647 00000000000000‰PNG  IHDReu2­bKGDÿÿÿ ½§“ ÎIDATxœíÝ}LTWÂÇñscEPP°¬¨´jM£¦&Ýè–Ð}l´Z†‡ˆØ¦ÆTmŒ öÅèfij·]ûǦ·íZš³³ò‡Ñ”ÖTS6n(©lxÙ’VÜò2÷ùãîò¹óra˜9ßOæñxçpï{?aJUU€LÂ}“¤CÒ¡éP€€t(@@:  H‡¤CÒ¡éP€€t(@@:á^ýå—_ž:uj‚NÀ7»vízñÅ=?^QUÕó£-˵kß=õÔZïO `B\¿þÝÓO¯---õü%Þ}HñÔSkÏœñâL¨¼<‹·/á=@@:  H‡¤CÒ¡éP€€t¼þEˆãZ±"©½½ÕðiƒÂÞ½¿ûÝüŸGæ }c6›m¶ÊÕ«Ÿösž¿ÿýÚ¦Më].—!g\ŒÊP„î lTD‘+’ÂB1a6wÛ*ï³ }bà„‡Œ/@íí­û÷ï_»Vºÿ]Ɖ'ŒÚô¥ÍÐg‹¥³ó_þÏÓÙù/—ËåÕ/SFe(B÷6*¢°öV±¿¹|„ÅÆ2ô• 2¾ !Ö¬Y“••53Oeeeeþ‹EÎ §’÷7ð8Ö¬ä3&îL4Þ¤CÒ¡éP€€t(@@:  H‡¤CÒ¡éP€€t(@@:  N Pcc£¢(Sgž`Øk—9y!„ªª¹¹¹3fÌDáC&’Ç86·ü¼gܽ\Q”ÆÆF?Î Sß J³fÍ:tèP ÏBR?þøcIIÉÍ›7Ÿ TŒ¬åæææèèè@Ÿ&((EGG?~<Ðg!©¾¾>!Dbb¢à„Š‘µ<<<|÷îÝ@Ÿ&C€ PEEÅÊ•+§OŸ7ò…äÂ… O<ñÄ#<²hÑ¢sçÎ !îß¿ôèÑÄÄĘ˜˜—^zéÞ½{¾Íãnppp°  `îܹ±±±ƒƒƒîŽœ"ün­¢(ÅÅÅK–,‰‰‰9~üø¹sç’’’"##9¢0:UU‹ŠŠ–.]:sæÌõë×WTTh³ÎäG[³fbÞ¼yÂͷ͉Ñ(%%%ÉÉÉ111»wïîííÞ¥›I(…v7Úl¶Å‹ÇÆÆîÛ·o``@wPÿí¡{'hÜío÷îÝÛ±cGttô‚ òóóûûûµp¾úê«ÄÄijgÏj‡=¸À5—.]JII‰ŠŠz÷Ýwµ‘qwÝ`w´‹/¬[÷D\Ü#+W.²ZÏ !š›gÏV®\ùêñǯ^ýæøñ£?ž˜š³{÷Kÿþ÷Ã[Ü¥z#++kÓ¦,‡Cã!„°Z­cLÒÐР}\§Ói6›wîÜÙÑÑñÙgŸ !~þùçžžžiÓ¦uvv~òÉ'ááá===ï¿ÿþ²eËìvû7V¯^ŸŸïÛ<ºƒªª¾÷Þ{[·nmoo·ÛíO>ùäáÇÝég8><ÏPUU!DNNŽÓé<}ú´Âb±8ÎS§N !îܹ£ÎÇ<þü‹/Þ¾}ûòåË)))Úl£sŠäµŠ‹­þ'_\lwQ<þÈóƒ4F£2ôä—Îúõëëë뫪ªRRR>ìyPº™øs>ÆF¤ ¡ú—nZh#¡;vLwзUæI@=“² Ǹ|UUÝíoÛ¶mÛ°aCSS“ÝnOOO ç¹çž«¬¬¬©©½–UUBlܸÑét–——k›ª:Þ®ØMl"=Ó¦M;q¢èŸÿìüÓŸ> ïèèùÇ?„¿ùÍs6[å¡CÇÒÒ–]½j¿víÆªU«÷ìÉŸü“Ü´)+++˻֫£-@uuu===CCCW®\B4448Žˆˆˆ>ø ««kxx¸»»{hhhñâÅçÏŸ×^~óæMí¹ó說š––ÖÙÙ©Íùòå+V¸;ÒÏp<|x[€ª««UUu¹\=ohhÐ '==½¤¤dd¶Ï?ÿ\›mtA‘¼:Å PÆ8 Ýn×þhµZ“’’<J7ÎG3u n£CKIIÑôm•o² З¯ªªîþær¹L&Smm­6xþüù‡ÂÑ]˪ª !¾ùæUU‡††´¤Ž·ëv›ˆGs³#""â÷¿ÿ ¥¥ëîÝá[·ºïÜÒ ÐÕ«v‡CMIYü—¿œ×®ªº9ò|2> @þÌl6×××gff®ZµêìÙ³Ú`TTÔ×_]UUµ`Á‚gžyæÛo¿ kkkKMMÕX²dÉ /¼àÛ<ºƒBˆÖÖÖ¸¸8EQEyöÙg[ZZÜ95=úè£Bˆˆˆˆ‡ž 7á455¥§§¼|éÒ¥Ú“Ñ9¼ˆÑ(#¡imÆó „^&ºŠ‰ …æÁÐ:::tƒýöãò…›ýí§Ÿ~JNNÖSRRFÂIKKûÃÅÇÇ !ŠhŒ]7ØãmÖ¬¨¿ýíëë׫–-[°qã3ß}÷ÿW”šš&„¸u«-9ù?÷د~µdãÆÜÎ5•ò³Ò××g±X ª««Ož<928<<\VVæp8^~ùåçŸÞápÄÇÇ·¶¶jÔÔÔ¼óÎ;¾Í£;(„ˆŽŽÖz½ªª]]]UUUîŽ :ºá,\¸ð‡~9¦®®N{2:’÷1Eû·¸¢¾¾~áÂ…ž%ô2 ØeLÝ(4†¦}å=ì·Ç—/ÜìosçÎ5™LÍÍÍÚ`SSÓüùóµç#ÅÅoÿëú`w´þþ¾ááá³gËš›¹¹/çä<ßÕõŸ+ÒÒ‹‹‹oooÕFnܨùãßq7Õ”È400àr¹Ìfs__ßÑ£G…ÝÝÝŠ¢ddd”——;N—Ë1}úôíÛ·¿õÖ[µµµµµµ{öìikkómÝA!Ä–-[Þxã¶¶6»Ýž™™ùÑG¹;2èè†óÚk¯ F£8p ±±ñúõëo¾ùæŽ;<Jèeè«1’nÚ_½þúë#¡åææêûí1Æå !t÷·ˆˆˆììì}ûöµ´´ÔÖÖ¾ýöÛÛ¶mãCôôôø|zÁïhŠ¢lÙ’qáByw·spÐþðego/,|«®®¶®®öàÁ=·nµ¹›jjñêfƾHUÕ'NÌž=;!!áäÉ“999±±±ªªZ­Öääd³Ùœ––f³ÙTUíïïÏÏÏŒŒÌÉÉéêêòmwƒN§3///**jΜ9¯¾úê/¿üâîH?ÃñðáU†â¿?–v÷|t8CCC~øarrrdddff¦Íf‹‰‰ÑÍ!(’W§Ø{€‚4F£2ôä—Î_|ñØcÅÆÆ8p```À« t3ñ“Qùÿ U/ -´Ó§O/\¸0::zïÞ½}}}ºƒªO«l|“õ 1._UUwû›ÃáØ¾}ûœ9sâââöïß?Ž6áÈóÁÁÁuëÖ͘1ã¿×¤³©Ž»ëp› Gq±5))Ùl6§¦¦•”ØU{ö·ý{öäÏ›?sfäÖ­9--]“†>¼HÑr÷Åbq¹Ä™3¥c3{¶bµZ-‹çÓ†OÂñÐDgXQQ‘°|ùríååå………ßÿý}¸I (Jq±uófûë_KwîÌöjQ„ £2¡» QÔlEX­Âè|SSSº{u'Š¢üRluzéþfà”S^žÅl¥¥^| îwfÁ7v»=77·ººº···ªªêÈ‘#¯¼òJ O Àþ…úìííݼyóíÛ·-Z´sçÎ]»vú¤øeæÌ™£²î`hcƒ‡(@2 /,,,,, ô‰0LlllQQ‘'ƒ¡ý âG`@:  H‡¤CÒ¡éP€€t(@@:  H‡¤CÒ¡éP€€t ŸÑd2eggggg>óÔ·eËÿ2ÌúÌd2àf6™LBEQüŸ*’¡éؘˆL&‘-B1•eè£ mPX¾|•!óÈœ¡oÂÂL¿õžŒŒÿùôÓòáá!ÿ§ :Fe(B÷6*¢n[eX(棆™î³ }eà„‡UU=?Úb±¸\â̙҉;!¯äåYÌfQZêE?á=@@:  H‡¤CÒ¡éxý‹ÛÚš?ýôÏq*>hkkNM]äÕK¼+@ eee55»¼zÀ„Ú°á×^ïÝo‚¼H‡¤CÒ¡éP€€t(@@:  H‡¤CÒ¡éP€€t(@@:ÿæô;4k°ò˜IEND®B`‚pktools-2.6.6/doc/html/pkegcs_8cc_source.html0000644000113200011300000005165312647637661016147 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkegcs.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkegcs.cc
1 /**********************************************************************
2 pkegcs.cc: Utility for raster files in European Grid Coordinate System
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "base/Optionpk.h"
21 #include "imageclasses/ImgReaderGdal.h"
22 #include "algorithms/Egcs.h"
23 
24 /******************************************************************************/
51 using namespace std;
52 int main(int argc, char *argv[])
53 {
54  Optionpk<std::string> image_opt("i","image","input image to analyse","");
55  Optionpk<unsigned short> band_opt("b", "band", "Band specific information", 0);
56  Optionpk<std::string> cell2bb_opt("c2b","cell2bb","convert cell code to geo coordinates of boundingbox (e.g. 32-AB)","");
57  Optionpk<std::string> cell2mid_opt("c2m","cell2mid","convert cell code to centre in geo coordinates (e.g. 32-AB)","");
58  Optionpk<bool> refpixel_opt("ref", "ref", "get reference pixel (lower left corner of centre of gravity pixel)", false);
59  Optionpk<double> maskValue_opt("m", "mask", "mask value(s) for no data to calculate reference pixel in image",0);
60  Optionpk<int> dx_opt("dx","dx","resolution",250);
61  Optionpk<bool> geo2cell_opt("g2c", "geo2cell", "get cell code for coordinates in x_opt and y_opt given the resolution in dx_opt", false);
62  Optionpk<double> x_opt("x","x","x coordinate in epsg:3035",0);
63  Optionpk<double> y_opt("y","y","y coordinate in epsg:3035",0);
64 
65 
66  bool doProcess;//stop process when program was invoked with help option (-h --help)
67  try{
68  doProcess=image_opt.retrieveOption(argc,argv);
69  band_opt.retrieveOption(argc,argv);
70  cell2bb_opt.retrieveOption(argc,argv);
71  cell2mid_opt.retrieveOption(argc,argv);
72  geo2cell_opt.retrieveOption(argc,argv);
73  refpixel_opt.retrieveOption(argc,argv);
74  maskValue_opt.retrieveOption(argc,argv);
75  dx_opt.retrieveOption(argc,argv);
76  x_opt.retrieveOption(argc,argv);
77  y_opt.retrieveOption(argc,argv);
78  }
79  catch(std::string predefinedString){
80  std::cout << predefinedString << std::endl;
81  exit(0);
82  }
83  if(!doProcess){
84  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
85  exit(0);//help was invoked, stop processing
86  }
87 
88  Egcs egcs;
89  if(cell2bb_opt[0]!=""){
90  int theULX, theULY, theLRX, theLRY;
91  egcs.setLevel(egcs.cell2level(cell2bb_opt[0]));
92  egcs.cell2bb(cell2bb_opt[0],theULX,theULY,theLRX,theLRY);
93  std::cout << std::setprecision(12) << "--ulx=" << theULX << " --uly=" << theULY << " --lrx=" << theLRX << " --lry=" << theLRY << std::endl;
94  }
95  if(cell2mid_opt[0]!=""){
96  double midX, midY;
97  egcs.setLevel(egcs.cell2level(cell2mid_opt[0]));
98  egcs.cell2mid(cell2mid_opt[0],midX,midY);
99  std::cout << std::setprecision(12) << "-x=" << midX << " -y=" << midY << std::endl;
100  }
101  if(geo2cell_opt[0]){
102  egcs.setLevel(egcs.res2level(dx_opt[0]));
103  std::cout << egcs.geo2cell(x_opt[0],y_opt[0]) << std::endl;
104  }
105  if(image_opt[0]!=""){
106  ImgReaderGdal imgReader;
107  imgReader.open(image_opt[0]);
108  if(refpixel_opt[0]){
109  assert(band_opt[0]<imgReader.nrOfBand());
110  for(int inodata=0;inodata<maskValue_opt.size();++inodata)
111  imgReader.pushNoDataValue(maskValue_opt[inodata]);
112  // if(verbose_opt[0]){
113  // vector<double> noData;
114  // imgReader.getNoDataValues(noData,band_opt[0]);
115  // std::cout << "number of no data values: " << noData.size() << std::endl;
116  // }
117  double refX,refY;
118  //get centre of reference (centre of gravity) pixel in image
119  imgReader.getRefPix(refX,refY,band_opt[0]);
120  std::cout << std::setprecision(12) << "--x " << refX << " --y " << refY << std::endl;
121  egcs.setLevel(egcs.res2level(imgReader.getDeltaX()));
122  // unsigned short theLevel=egcs.getLevel(imgReader.getDeltaX());
123  // egcs.setLevel(theLevel);
124  std::cout << "cell code at level " << egcs.getLevel() << " (resolution is " << egcs.getResolution() << "): " << egcs.geo2cell(refX,refY) << std::endl;
125  }
126  }
127 }
Definition: Egcs.h:26
pktools-2.6.6/doc/html/dir_89a0bd85ecec8fbb2c320310670be290.html0000644000113200011300000001006412647637663020030 00000000000000 pktools: /home/kempenep/pktools/src/lasclasses Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
lasclasses Directory Reference
Directory dependency graph for lasclasses:
/home/kempenep/pktools/src/lasclasses

Files

file  FileReaderLas.cc [code]
 
file  FileReaderLas.h [code]
 
pktools-2.6.6/doc/html/ftv2lastnode.png0000644000113200011300000000012612647637661014776 00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_21.png0000644000113200011300000000271112647437044015503 00000000000000‰PNG  IHDRp%ÁúXbKGDÿÿÿ ½§“~IDAThí™KHkÇÏÄ«P5&bb"ÒJl©¯€â»PÔV-éN|D¡´ƒd§$Õ…¢"bV® jE >ZZAÄ.bbleBEé"ì£(1‰ÅQ¿»îÜé8¹:©x™ßêœ9sþóÏ|ß73ÁBÀ«ðƒ7”cxC9†7”cþbäããã}}}W"å:¢Ñh*++é#c—W«Õ8Žß»wïÏ »–F½{÷Ž>ȼCàìA<¬¨Õ곃üÊ1¼¡ÃÊ1¼¡sAC1 [__¿pW­V›——G¥ƒð 2ýþý;†asssô’õõu Ã.ÖÎëõêtºôôt¡P˜““ÓÕÕu|||añþ¹š;´¨¨heeåððLgffÙl&SÇÃÂÂòóóé%b±øÅ‹àt:%Iི³³ ÃÒÒRssóèèhiiéÉÉ GWó WchAAAKKKpxxøñãÇ'OžP†Z­ÖÜÜÜ7nÐK$Iww7œžžîîîÞ«££C*•Z,•Ju÷îÝòòòÏŸ?onn qwAÿ¡† ¦¤¤H¥Òîîîááa…B!‰ZZZ!ÔÛÛ›ššõðáÃ>`&“ÉRRRp€………›7oÖÕÕY,r&â8^XXÿLs‹Årë֭ׯ_“Sž¼sår9Ù N'“Ébccu:AôªOŸ>ŒŒ´¶¶†„„P‚#""t:ÝÈÈ«6Fù¶ýJUUUUU:p8T\]]ív»@­V»ÝnòýuggçÕ«WñññF£Ñår™Íæ;wîMëëëËÊÊBz½^£Ñ!‹qÿùógXX˜ÉdB9xüøñìì¬Íf# ÉAJ‰Á`¨¨¨øöí›ÝnÏÌÌljj¢Wýøñ\.Cÿ‚L&cÕF/÷x<~L`õŠC———BGGGŒØáp(•ÊÑÑQªpllŒ´ãíÛ·±±±§§§™™™ïß¿GUTT´··ã8rpp@yg·Ûé>2 MNNÞÚÚ"c³Ùœ‘‘A¯ÚÛÛc5Çq‰Dª^îV¯X^=/€P(€ÐÐPF J¥’:255• ···WWW«ÕÚÒÒòüùó`7 `hãf—÷ƒ^¯÷ù|eee.—+11ñÙ³g&ØM$ÚXþþ‹} °zžãÞPŽá åÞPŽaÙåNgÿŸ—ríp:‰‰‰ÌQÆsiCCÃUh»®4662 d>6ñ\~ åÞPŽá åÞPŽù·ëÂs\з½IEND®B`‚pktools-2.6.6/doc/html/classSVC__Q__inherit__graph.md50000644000113200011300000000004012616110566017542 00000000000000be01d771f362a07cb29951e4936c8c03pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract__coll__graph.png0000644000113200011300000000715512616110567024014 00000000000000‰PNG  IHDR­pãmgåbKGDÿÿÿ ½§“"IDATxœíiPSWÇŸ@„L¢ÃªP(!, íÐa,N¤P\*¨ÃÀZA‘:ØBÙZËÒi Žƒ0‹±B™° hÕÁXZ‘R ¼`]XB;‚Pİ$@’û~8}豈 o.”óûàœóäœçüïÍŸsî'¹4‚ ³âÑ¢ZfI€}€À>À °0tõ¦“ÉdJ¥R½i1ÓX¿~½±±±ªÙ‰äÉ“'ꕈ™†D"XÒ>@8::j"-ñûï¿«='¾>À``Øì b©ø ««‹F£-fª/¿ü’F£;vL]ž×F£uuuýßi‡¥âƒY‰DFFFšÈLdz´´,--UWÎ5kÖ$$$€&ekŽ%í¥RùäÉMdnoo¿{÷nAAAkkkGG‡Zr¡ÙEs²5>@ógMM½½½‰‰É‘#G&&&ÈW ‚ˆuvv~üøñ›o¾ fffè¥ááá}ûöYXXÄÆÆÊd²çIø|þk¯½Æ`0X,VQQçñxnnnžžž3§‚ rrr6nÜh``ðÎ;ï\¸pMø3ÇBÇRWWgiiyöìYÔlšl¸rå ›Í^»vmzz:ŠÐh´3gÎlذÁØØøØ±cEEEÖÖÖL&3))Im'zAjE, ‚¹Ûtvv€——WGGGcc#›ÍNMMEA¥RIš€lIv öððèîînkksrrJMM5HöÕÕÕÍÉÉéïï/(( Ó飣£A(•Jkkk.—KÄÑ£GU…‘——gnnþã?^½z•Íf£øóÆòññ¹víZkk+j6M6lß¾]"‘TVV:4 ’H$ùùùàïï/‘H¸\.Ù`nß¾}ûöí…½1óA™ÚÚÚPµ´´”Íf£`||<Ü¿_µ%*ONNjkk“Ç_UUÅf³g ’½†††V­Z•‘‘ñôéS¥R922¢P(‚hll¤Óéèt777@{{»êpNNNßÿ=)¸¤¤æ  Ù}¦®_¿N„B¡€ÎÎN …踦•Qƒ9Є(»>°µµE‡ÞÞ^Tþí·ß¶lÙ’––6³½X,V(666¨Êf³{{{g ’]Ö®]+-,,ÜÜÜ~þùg---àñxr¹ÜÈȈF£¹¸¸À´¥¡»»ÛÉɉ¬nܸñyÈC˜û`ׯ_ht}}}XµjÕ´2%PæôGè4ŸÏÏÉÉáñx`Z{SSSmmm‘H„ªÝÝÝæææ³É.R©T©T–—— ………íØ±chhH¡P”––fffŽü˜˜˜ÒÒRBež•••êgøwïÞ}žTž÷ýS×-±Qïôòâë‚»»{gggSS“­­mrr²ê\š’’bgg'•JQpddÅ9އ‡‡H$joowttLNNž5H¦’J¥ £¢¢bpp077—Á`H¥R@ ­­-‹I=·nÝ¡PHvÔDZ B&“1 õæT³tuui4šºvv,J%qêT³ŸŸ½¹¹>ÕZÀš5kÔ›PÍ>`2™nnnêÍ©Q»~°·go¡Z •¬ôëƒóç›Ñ¿rùŠþNæŠöÁ䤼ªªž=¯¯¿Oµ*YÑ>¸~ýÞøøhkkUU5S-‡JV´*+›µµµ@.W^ºÔ&•NR­ˆ2V®ÆÆ&._¾-—+PubB~õêj%QÈÊõª @K‹VYy‹B=Ô²r}PYyKuÛ \®îI$R %QÈ õÁÐÐX}}‡Bñ·{E‚ .^l£Jµ¬P\¸ðŸ™A‚ ÊËWèÒ°B}PQñÛÌ 8J%ÑØØ-?£Dµ¬D<|8ÜÜü§R9ËF,mm->–©â_ÏJôŸßú¼Íxr¹¢²r%~ DÁ>UÊŸ\·Î€¬ŽŽN0«èô¿þ$–þW4š÷©.GÖ¯ÎÉyÿ½÷œ©B%+q]ÀÌû€}€A``°0ì ö}€À>À °0ØöûƒÀ>À``Øì û€}€A``°0ì ö}€À>À °0ØöûƒÀ>À``ØìÌ_¨>Ôó—_~ÑÑÑ¡ZÑb£«k©¥õÕ*›¸¸8Õ·þo¿Ô××799™’’B•8ÌâP^^þǨFfù,üÎ=?ýôÓ´¾>À``Øì Bƒ>èëësww§ªû"³¼ÔÎDƒ>ÐÓÓ Ò\þ¹éïïß¹s'µs¬˜Aƒ>`2™Ô\þ¹Q*•‰„Ú ‹9Ö?̰`qþüù÷ßëÖ­‡niiqww'â‡~Ø·oß¶mÛbbbnÞ¼éîî®:U644„……yyyq8œ+W®LˉZÞ¸q#44ÔÏÏïäÉ“SSSª#ž>}:<<üÙ³g —ËsrrüüüüüürrräryCCÞ={FFF ®®.44T&“}øá‡°k×.2¿P( hoo¿yóæ¼½½wïÞ]RR …¢°°0 À××7==}ttT3,_µ/È‚}P[[{îܹðð𢢢½{÷¦§§ÀÅ‹‹ŠŠ>\RRœ­ÚE&“¥¦¦úúúòx¼ÐÐÐãÇËd²™™«««ÓÓÓÓÒÒ~ýõWtÀ@—Ë …™™™L&***úûû¹\î‰'„Baaaá[o½åââ’ýôéÓììì£G2ŒS§N@UU™¿¬¬,11ÑÜÜ<99ÙÖÖ¶¸¸8222//oxx¸¢¢¢¾¾>===++ëÁƒÅÅÅ03ÃòU;/ öAeeå¡C‡6oÞlhhèêêN7mÚÄd2]\\>øàÕ.SSSAH¥Rooo>Ÿ¯««;3sdd¤……ņ ÂÃï^½Š‚¹¹¹¥¥¥)))ýRþ¥K—>úè#‹ÑÔÔQQQB¡066vçγ*?xðà믿n``PPPpäÈCCC«­­Ý¿?‹Å²¶¶NHHpttœ÷<,/µó²àç/ô÷÷³Ùl²Êb±àáÇÖÖÖdð•W^Qí¢¯¯Ÿ••UQQQXXhggÇáp\]]gf¶°°@KKËÁÁAT¾ÿ¾³³sqqqbb"ŠýôS.—»gÏžòòò””´Ë!##cxx˜læééùÉ'Ÿ$&&¾ñÆÁÁÁªƒr8@—caaa/½ôÒ¢££mll"""ª««‡‡‡ƒ‚‚ôõõ£££333GFFÌÌÌ^}õUÕ9¡§§ùÕW_íÝ»×ÌÌÌÃÃ#>>>88xÓ¦MqqqQQQ¦¦¦è ¦eX^jÊßžËSVV ^¼___HHHZZš‰‰‰ Ö××ååå-(ɂƥå¥vV¾øâ ccã²²22¢žÏ‘D"Ñ×_ÝÙÙ911qçÎ3gÎlÛ¶M-™1‹ƒzž×(“É>ÿüóáááuëÖùøøìرãÅ»¯^½zAí©ey©}Aþ麀YŽhj]À,w°0Øö`Öû…ØØØÅ×YLD"‘§§§jäo>puu T(‹« ³Ø°X,Õ~Î7_`Øì ûð_ºN«(ÑHÛJIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img__inherit__graph.png0000644000113200011300000000746212616110567026352 00000000000000‰PNG  IHDRåpn ±bKGDÿÿÿ ½§“çIDATxœíÝyPS×ðKY† ²ˆ%ÄÝv˜qZ;Ódj‹µŠD©bÐR­Õ’V§Z[+2¥e@Kãö`‹U©Èò¢²¶¯,#”²‘Üûþ¸¯wÒ$€ô%„“þ>0÷î9ç—Ãw’C`$‰À„™± ` ¯'W€È+À ÓØLO&“µ··aìBLœ«««³³³±«˜y‹ÅCCCs)±&‹æþ"cWÊêÕ«]‚)ûå—_Œ]ÂSý+À äàò py81å¼vtt0ŒÙêØ±c ãøñãúªa²î £££ão‹/SΫN]]],Ë#“$YTTäááQ\\¬¯1’’’!ËÆË?.¯A bäû÷ï?xð 77·©©©­­M/c²X,êÞÚpeãÅDòJ=n–——/_¾|Á‚qqqr¹œþ.I’ ÞÞÞüñÇK/½„Z´hõ­ááá]»v±X,ww÷„„™L6Y#M(>ÿüóÖÖÖl6»  €n/**òññ X±b…ö],I’`ÕªUvvvëׯ¿téõ@¯=u[®_¿îáᑟŸO]¦Q6B¨¢¢‚Ãá8::¦§§S- #//oåÊ•ÎÎÎÇ/((ðôô´··?zô¨ÞÚèÈ9ïñãÇÕÕÕS_ÓÞÞŽ lkk«­­åp8|>Ÿj$‚+}%Ý1<<Üßß¿³³³¹¹yÍš5|>_g#ÝkllÌÊÊJ ô÷÷çææ2™Ì±±1’$ ‚ðôôÌÊÊ"Iò£>Z½zµza$Iž;wÎÍÍíÚµkƒƒƒ•••‡jŸl®7VUU555Q—i”zýõ×Åbqii)Bˆºi¡;vˆÅ✜„жmÛÄbqVV}ÁZZZZZZföƒ1“Êkss3uZ\\Ìáp¨F‡zôè‘ú•Ô±B¡077§NeeeGg#ÝK$YXXœA5Λ7oùòå|ðALL ý›ÓØØBÈÂÂ",,,..®»»»¥¥åÈ‘#ááá:é) F```ii©X,V(6667oÞ·ý—Ëmoo§vŸ”ðx¼ŠŠŠ¡¡¡ªª*>ŸÏ`0¦žKUö?š±7$Ó{úýkNNÎ’%KX,Vll¬T*UßóI¥ÒeË–%''OLL¼òÊ+¶¶¶T»H$Ú¹s§“““‹‹Ë{ï½'•Ju6ªU\\ìååeii¹bÅŠòòr’$÷íÛ¨^A^^^IIItG•J•‘‘áååeooT^^îìì<í\ô±FÙHmKŠÔö¯ÚÇ“ÁeÿjRy•rþ&¡PØÔÔDŸ^¸pÁÛÛÛˆõhÀ%¯&µ˜Ëš››#""$ImmíÑ£G£££]~°y¿öÔìììöíÛgì*¦Âãñ$Ihhèàà ›ÍÞ½{÷/xnbsþïe ´¶¶úúú»SF=w1÷?Äû€È+À äàò p‚Íó}}}Æ.Á”Éd2kkkcW1= òjeeÅ`0ôõèY@äÙ³õ›7/ws›oìZfÀÁÁÁØ%Lƒ¼ÚÛÛûøø»Š¨­í¼}û‡åËÙáá¾Æ®ÅÔÀþUÿ.^¬§¾*•ð7¿ô òªg …²¬¬!42"©©ydìrL äUÏnÜx(‘ÈBææfeeõÆ.ÇÔ@^õ¬´´ÞÜÜ !¤TW¯6K¥ cWdR ¯ú4>.ÿ׿Z”Ju*—+++[[’‰¼ê“zXBffŒÒÒ{F¬Çô@^õ©´ôžúǪ”J¢ºú¡X,5bI&òª7"ÑxMM›Jõ—ç°H’¼r¥ÙX%™È«Þ\ºôoíF’$KJ`K 7W½¹p¡NûÍïAÖÖv>~.Åk3àÿã´µµÝ±c‡~Çìï)//×ï°³f||üôéÓ …âÅ_Œ‹‹3Ä*È\(Þ€÷¯ööö{÷îÕï˜AˆÅbýŽ9›>ýôÓÁÁÁŒŒ @ ‹322 ±J2ŠŸq^I’¼xñbdddppðýüüH’üá‡víÚçÎ???õ‹Û·oïÙ³'00ËåVTThŒI]yëÖ­;wnÞ¼ùË/¿œ˜˜PŸ1333::zddäÝwßE½õÖ[Ô·ÆÆÆŽ?þæ›onݺ533S¡PLÖHÓW%ê½îܹóÎ;ïmÙ²¥°°p²‰”Je]]]TTÔâÅ‹]]]wïÞ}÷î]õUòóó»zõjdddhhhaaaEEÅŽ;BBBòòò¨ÙµÙdŠJ3Þ\¾|ù›o¾‰_µjUGGGzz:BèÊ•+<oÙ²eê]d2ŸÏ}ùå—þùçÏ>ûìµ×^³¶¶Öùûï¿OOOMMMµ³³  ngVVVCCéS§ìììΞ=QVVFu9}ú´H$R©4%%ÅÆÆ&22R»‘J¿•ŒQK$’?þxÆ éééMMM©©©ÁÁÁÖÖÖÚYZZ,Z´ˆêØØØèââ¢1u}}}ffæ7Nœ8áëë›››[UUõù矿ýöÛ7oÞœb‘M£øiÍøþµ´´4&&æÕW_urrZ·n]tt4ÝøÂ /ØÛÛ¯]»6**J½ËÄÄI’R©ÔÒÒ2((H(ZYYi¼ÿ~ww÷•+WFGGWVVRÙÙÙÅÅÅÉÉÉvvv×+•ʪªªØØX6›UYY©³Ñ •XZZæææÆÅÅ999-X°!4>>®s"333777sss‰D’]^^ž””¤1uXX˜M`` BˆËåÚØØ!„FGG§^dÓ(~Z3Îk?‡Ã¡OÙl6B¨¯¯ÏÓÓ“n|öÙgջ̟??##£µµuëÖ­‡jnnf0Ú#»»»SƒƒƒÔñ£G¼½½¿ýö[íëŸ_(>|xttT{äžžêà÷ßwrr¢ŽÓÒÒâã㫪ª5®wtt433ëïï§NûúúX,–ÎFƒV"—Ëù|þöíÛ³³³:4õD%%%ùùùiii‰‰‰ÚSOaêE6â§5ã¼nܸ133óÖ­["‘èîÝ»ÙÙÙ¡ÐÐЬ¬¬{÷î‰ÅâÆÆÆüü|õû-ƒ‘˜˜XSSC=Ö0™LêQøòåËãããôegΜéíí}øðaNNΆ ¨FkkëÅ‹s¹ÜS§NÑ¿9I¥R„“Éôóóûâ‹/úûû»»»ssst6®„ÐÄÄ„R©d2™ …â믿FI$çææFEEYYYýçOO¿ò“-2ÖÅÏÔŒß S©T_}õÕðð0›ÍÞ·o_JJJhh¨J¥ÊÈÈY½zuLL̉'è.–––~øaVVÖÀÀ€««krr2õ.Û“'Oz{{Ï›7º, àý÷ß—Édþþþáááêã\.÷úõë………;wî|î¹ç¶lÙråÊ„ÐÁƒÏœ9caa±~ýúððpôPz¬„Ž‚­­íþýûSRRžyæ.—ëïïÏãñ.^¼¨=Q[[›\.?vì˜úzêÜêè4Ù"c]üL1H’¤OΟ?V]]ýôý{{{#""ÒÒÒ,XàååE5ÖÔÔœ;wnFƒÌh^™;•h»sçÎÔ‹Œuñ:}òÉ'ÎÎÎçÏŸ§[ôózAWWWjjj{{»\.ommÍËË ÑËÈ€†õ"ë«xý¼»}ûv™LväÈ‘ááa—7nÚ´éé»Ï›7oF×ÎÜ©DÛ´‹ŒuñOéÿÝ`8†Ú0; ¯'W€È+À‰Žçf¿´uuu©¿<‰4òºnݺíÛ·«TªÙ­ ÝØlö¶mÛÔ[þò|sì_N ¯'W€È+ÀÉõ¢ú6ÚwRIEND®B`‚pktools-2.6.6/doc/html/classFeatureSelector-members.html0000644000113200011300000001232412647637662020321 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
FeatureSelector Member List

This is the complete list of members for FeatureSelector, including all inherited members.

backward(std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int minFeatures, short verbose=0) (defined in FeatureSelector)FeatureSelector
bruteForce(std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int maxFeatures=0, short verbose=0) (defined in FeatureSelector)FeatureSelector
FeatureSelector() (defined in FeatureSelector)FeatureSelectorinline
floating(std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int maxFeatures=0, double epsilon=0.001, short verbose=0) (defined in FeatureSelector)FeatureSelector
forward(std::vector< Vector2d< T > > &v, CostFactory &theCostFactory, std::list< int > &subset, int maxFeatures=0, short verbose=0) (defined in FeatureSelector)FeatureSelector
~FeatureSelector() (defined in FeatureSelector)FeatureSelectorinline
pktools-2.6.6/doc/html/classCostFactoryANN__coll__graph.png0000644000113200011300000007316612616110567020677 00000000000000‰PNG  IHDRÛé4Ó$çbKGDÿÿÿ ½§“ IDATxœìÝyXTeÿ?ð÷ ÌȾ#"‚Š;š¶hšåcÚó˜šJ‘R¹g™æWÜ345÷L3³Ÿ .¤ .©Øª’öäcš ¤i€;*û:00ÌÌýûƒ˜Ù7Gàýº./=çÜsîÏ™á|νI„DDDDDDDTW"¥ÆŽ€ˆˆˆˆˆˆ¨±a²MDDDDDDTǘlÕ1Sc@DDµsüøq$$$; ¢:Õ¿x{{; ""¢“p‚4"¢†M&“A£Ñ; ¢:„]»v; ""¢šŠdË6Q§Ñh°gÏ;¢:ÈHDDÔàqÌ6Qc²MDDDDDDTǘlÕ1&ÛDDDDDDDuŒÉ6ÕŠ£F‚••U­Î“‰DRGQÕ¯ºŽõÞ½{xýõ×áíí +++tïÞ¨õy›âgCDDô¸`²MDDµrïÞ=|õÕWøóÏ?ku[[[Ìš5«Ž¢ªëׯÃÑѱÜãukzz: P(°gÏœ9s¯½ö‚‚‚ðÃ?ÔêÜñ³!""j(¸Î6Q'‘HŒºôWBBüüüИ~<Êkš«ÐÐPlÙ²¥Q}6DDDMŠ "¢ €Ø³gO•Ê®\¹R´oß^ÄÆÆŠ?þøC<ùä“"$$D|äÈ‘â…^×®]±±±¢C‡bÁ‚úz†.233ŦM›‘žž.âããŃ¿N*ÚV*•ÂÌÌLlܸQÜ¿_lÙ²E˜šš ¥RYêu5‰¥äXPPÈÉÉ›7oD`` ÈÉÉ_~ù¥ ÒÒÒDNNŽËåb̘1"11Q„‡‡ "%%¥Ük8p 8~ü¸¸xñ¢Áñ7ÞxC¼ùæ›"))I¸¸¸ˆß~ûM,++KlÚ´©ÌíÌÌL@dddTúÙ5†Ï¦ªFŒ!FŒQ­×=f"˜l5pÕI¶Û´i#öï߯ßþóÏ?õÛjµZ˜˜˜ˆK—.éïß¿_øúúê뉎ŽÖ— âãã«•Ðedd™L&V­Z%233…N§¹¹¹B«Õ”«i,%ÇΟ?opìáíøøxQXX(®\¹"”J¥Ðjµâĉ•^Slll™×˜™™)<==E§NôIgUddd"33³Âr峩*&ÛDDÔD°9QrëÖ-øùùé·ýýý1tèP@rr2´Z-Zµj¥?îëë‹ÄÄDý¶»»;@&“U¹NñÀxa;;;DGGãôéÓðôôDŸ>}ðË/¿@*5üuTÛX¬­­ Ž=¼ r¹qqq0`ºuë†mÛ¶Uz-mÛ¶-s¿­­-&L˜€Ë—/cÒ¤I•ž§„\\\ÊœÀììÙ³èÞ½;òóóÕgCDDÔT0Ù&"jBÜÝÝqóæMýöÅ‹±dÉ€‹‹ LLLpýúuýñk×®ÁÃÃC¿ýpâUF¸{÷®~ŸJ¥‚N§Cdd$2220vìX 4¯­ëXÊ¢R©ˆ3fàüùóذaC¥¯)/y¼sçÖ¯_~ýúaúôéÕŠãå—_ÆêÕ«KMbŽ¢¢"(Š&÷Ù5ümHDÔ„cÞ¼y¸té.]º„É“'ãÖ­[ŠÉW_}S¦LÁ7péÒ%|ðÁ9rdµê°µµìر999X·nþ˜D"Aÿþý±oß>äää@­VC&“A¡Pœ£®b©Haa!Ôj5är9T*BCC¹¹¹ú2J¥²Òóèt:Œ3ï½÷vïÞ£GâðáÃúãÙÙÙØ¼ys¹ÛK–,Á‰'ŒS§N!66 .ĺuëôBšÚgCDDÔ(¹;Õª1f»  @„„„wwwacc#‚‚‚ Æ gddˆàà`áàà ÜÜÜÄ´iÓ„J¥Ò×óàØ[”3.X!/^,lmmE«V­ÄÁƒ ŽïÙ³G´jÕJÈårѶm[qðàA!DéñÄ5‰¥²coòÉ'ÂÞÞ^4oÞ\lذA gggQTT$zõê%¬¬¬ÊŒíÁíÏ>ûLtîÜY¨Õj!„nnnúIÏ*7-„7oÞÇîîîÂÚÚZôèÑC:tÈ LcølªŠc¶‰ˆ¨ˆà:ÛDD œ±×Ù&ªk\g›ˆˆ®³MDDDDDDTטlÕ1&ÛDDDDDDDuŒÉ6Qc²MDDM‚D"ŸŸ_©õ¬`àÀH$HHH¨U H$µ:5L¶‰ˆ¨É¸yó&bbb öeffâäÉ“Uzýõë×áèèXîq[[[Ìš5«V1QãÀd›ˆˆšŒ~ýú!22Ò`ß¡C‡Ð§OŸ*½^§Ó!==½Ü㎎ŽX¶lY­b$""¢ÆÉ65#FŒ@DD„AWò½{÷bøðá墢¢…B777}ýÔSO\]]üÓmüرcðòò¶mÛôÝÈ:dffvïÞÖ­[#//¯Þ¯“ˆˆˆŒÉ65={ö„R©Ôw%ÏÎÎÆñãÇ1xð`}™ÜÜ\ 6 ]»vE||‚+%"""c35vDDDЉ‰ † †ˆˆtéÒQQQèÙ³'ôeÌÌ̃æÍ›ÃÂÂÍ›7Pœ˜—gùòåèØ±c© ÖÖ®]‹Ž;¢ÿþ˜4izôèQ?FDDD¶lQ“2bÄDFFBQfr¹\ޏ¸8 0ݺuömÛ*=gÛ¶mËÜokk‹ &àòå˘4iR]„ODDD “m""jRzõê…ÜÜ\ü÷¿ÿÅO?ý„!C†W©T ÄŒ3pþüylذ¡ÒsÊd²2÷ß¹sëׯG¿~ý0}úô:‰Ÿˆˆˆ&ÛDDÔ¤”t%Ÿ8q"zôègggƒã………P«ÕËåP©T P<–»„R©¬´N‡1cÆà½÷ÞÃîÝ»qôèQ>|¸n/†ˆˆˆ[L¶‰ˆ¨É Ä•+WJu!Š»~¯^½#GŽDÛ¶máíí   0ÞÞÞèÕ«ÜÜÜ*­cÆ HMMŬY³`gg‡/¾ø'NÔÏNNDDD›D<¸þ 58‰{öìA`` ±C!ª%ß刈#GBDDTc‘lÙ&""""""ªcL¶‰ˆˆˆ3‰[·n…¿¿?œœœ°lÙ2ìܹ-[¶„ æÏŸ_é94 BCCáåå'''¼ñÆÈÊʪÓ:ˆˆ¨|L¶‰ˆˆˆCGÅ™3g°lÙ2Ì™3QQQˆÅÊ•+±xñb¤§§WøúO?ýûöíÑ#G¸¸8,Y²¤Në "¢òqÌ6QÇ1ÛÔØÔt̶:W M¡ Dz—bkH$ Ο?€€A.——ÚŽ‡¯¯o¹çhÛ¶-–.]Š¡C‡®\¹‚«W¯ê·ë¢""*W¤©±# """ªŒ*CƒüÔ"䥨¡LV#?µÊ$5”÷ÕP&!?U ­Zàõo;ÂÒ¹á'ÜÖÖÖþYÇýáíÊܺu ~~~úmøûû×iDDT>&ÛDDDôX1r´I퇃o\…2¹Yè4ÿtÄ“H%H„x¸ž‰\ ÞÞ€»»;nÞ¼‰:.^¼ˆ#GŽ`Þ¼yFŽŒˆ¨iào#"""z¼è¤°Uy!år~™‡…N@èJï—Hç–šHê9À†!88óæÍƒ··7`òäÉh×®qƒ""jB˜l5ÇŽ3˜e˜¨!‹»õ'´>ÿó‡®Ã™uw!t0hÙ.ÄT÷'¬A„ Ü9s——‡_|yyyx饗°bÅ c‡EDÔdp‚4"¢ÎËË wîÜ1vDujúôéXµjrïâ—Å·q÷lnñJîZ:¿åŠv#aå*¯ÿ ‰ˆˆÊÉd›ˆˆˆ{×fâ—%·¡ÉוÛÊ-‘&r)4…:X¹ÉáÖÕ ®VpíbÛ–æ8b""jâ˜lQÃP˜£Åoëîâ¯oÒ ‘H t†·0­-0x{[¤^Îýßsqÿœ)±yÐê`aoŠ–ùÀ­›•‘¢¯IÅãÓy›GDd4L¶‰ˆˆ¨a¹N‰ oA™T¡-Þ'•IÐn„žžîiPVW$r9÷W¢Í`(œ¸¤=L¶‰ˆˆ¨á)Ê×á÷ ÷pùëTHLxa™7|þeWãsžüèì}-àÖÍö~Hë0`""jj˜lQÕz9'ÞDæõŒü®c[®5*N,¸…{çrQ©Y3¸XÁý k¸u³‚½Ÿ‚É7U“m"""jØtZ¬ë°÷³¨ýÉ‘ Â½³¹¸{6Iç”PçiáÔN!;ÛÖþüDDÔT0Ù&"""*Ð ¤þ™Âl-š÷lfìpˆˆ¨áˆ45vDDDD+‰Tç–•–»~4wÿ— §­áÑÃfÍx‹EDÔÔñ7Q-é4©Wòñס48µWÀó©fð|ºœ:( 5©x‰.""j|Øœˆˆˆ¨Ždjp÷L.îžÉÁÝßr¡¼¯†ÜÚýWûÀ­›µ±Ã#"¢G‡c¶‰ˆˆˆêKöíBÜ=“Ÿì`nÇ…DDM“m""""c;¿ù>ܬáÒÙRSv9'"j8A‘1©24¸ö}&Î}qr+xo ¿ÿØÃÊ•¬Õ“m""""*&t@ú_ù¸u2×¾Ï@Ï9^ðèamì°ˆˆ"&ÛDD\»v wîÜ1vÔH¥RtîÜ666Æ…jIèŠÿ–p†"¢šˆä:DD„‚‚4kÖ Í›77v(ÔÀ]¾|………ƃê@eI¶®Hàìç÷àÝ×.,É£‰‹ˆ¨¡`²MDD333899; "j rï«qëd6bw&ÃÊMŸÙÁw€Ú(ŒÑcÉ6U›—÷·Cú_ù¸öc&®ÿ˜‰Øɰia†Výíá;Ð6-8«95]L¶‰ˆˆˆ¨ÆÚ(àÐFïy óZ®Íĵï3`j.Eç·\Œ‘Ñ0Ù&"""¢:a×ÊÝZ¹¡ëx7h‹tƇˆÈ¨8¿$Õ)‰05«ø6óúO™(ÈÔ<¢ˆˆˆ=&ÛDDôÈ%$$@"išS?ŠkoÊï/5 ê<-~Yt_ ü?M¿Ž['²¡Óp5Z"j\˜lQº~ý:†Q<ªk¯¬[[[Ìš5«Þã ª)¹¥ Fí„~+| 5•àèÌëØùB,~YrI•ƈ¨NpÌ6Õ)N‡ôôtc‡aêÚ+«ÇÑÑË–-«÷8ˆjÃD.A‹Þ6hÑÛyÉEˆÿ. G2pu:ŽrÆSÓ<"Q­°e›ˆˆjäðáÃèÔ©ÌÍÍáããƒ;wžzê)€««+@«ÕbåÊ•hݺ5¬­­Ñ³gOüöÛoúó<Üåùám‰D‚­[·ÂßßNNNX¶lvî܉–-[ÂÆÆóçÏ×—ŠŠB@@ ÜÜÜô gÉ9<ˆ6mÚÀÙÙS¦LAaaa¹×—ššŠüü|£^{Uë)yݱcÇàåå…mÛ¶•z¿úê+øûûÃÞÞ+V¬!°qãF´k×Íš5ÃóÏ?¨¨(vA§GÎÒE†.o¹bxd; ÙÙ­ÿã`숈jOQ“wéÒ%qéÒ¥*—W*•ÂÌÌLlܸQÜ¿_lÙ²E˜šš ¥R)âããŃ¿^>ùäáìì,öïß/îÝ»'Ž9"ÜÝÝõe²²²Ä¦M›ôåÞ ‚‚‚DNNŽØ¼y³ ENNŽøòË/‘––&rrr„\.cÆŒ‰‰‰"<<\)))ú˜ú÷ï/âââÄéÓ§…¯¯¯X°`A©k;sæŒxóÍ7…“““¸wïžÑ®½:õ”l8P?~\\¼xÑà81|øp‘™™)6mÚ$ˆôôt±iÓ&ááá!¾ÿþ{‘šš*~úé'áëë+js{-’““küz""¢F"‚É6U;ÙÎÈÈ2™L¬ZµJdff N'rss…V«-•¶nÝZlÛ¶ÍàõÛ·o¯rB@œ?^!„Z­.s;>>^Š+W®¥R)´Z­8qâ„þXIL±±±úóîÙ³Gøúú !„P©TbÇŽ¢G" @|ùå—"77ר×^z¾¾‡ÑÑÑ¥Þ³:ˆ¯¾úÊ Þ]»v1٦ǚN«‡Çý%.†%‰üô"c‡CDTžv#'"¢j³³³Ctt4NŸ> OOOôéÓ¿üò ¤ÒÒ¿Vîܹƒ.]ºìëÔ©Sµê³¶¶Èd²2·@.—#.. @·nݰmÛ¶RçñóóÓÿ»mÛ¶HLLÄÑ£GÑ¢E ;v Ÿ}öÎ;‡ &ÀÊÊʨ×^z¼¦ò¸»»0|Ï®]»†:”k×®]•â#2–¢|ìZYàbXvÿûŸwI8©=~˜lQµ©T*èt:DFF"##cÇŽÅ Aƒ‘‘Qª¬··7bbb ö]¾|¹^b ÄŒ3pþüylذ¡T™øøxý¿ãââàîî'''´k×§N¯¿þЬ¬¬Jëy×^zJ<˜H?¬¬$½E‹¥â¹råJ•â#2¹• zÎnŽ‘ßwDÏÙ^ÈMTãð¸8ì ¼‚?#RQ”¯5vˆDD˜lQ H$ôïßûöíCNNÔj5d2 …¾ŒRYÜÒôöÛocÆŒ8xð ’’’ðý÷ßãÃ?Ô—ËÎÎÆæÍ›ËÝ®ªÂÂB¨ÕjÈår¨T*„††rssõe¦NŠ„„œ={sçÎŨQ£Ð¹sgDGGcÿþýøë¯¿ÐºukŒ7çÎ3êµW§žšz÷Ýw1sæLüøãHOOÇñãDZ`Áýi›7oFvvv­ê ª/¦R´ì€ÁÛÛà•Ýþpëj…³ëï!f[²±C#"*fìŽìDDd|Õ³-Dñ˜çV­Z ¹\.Ú¶m+<(„¢¨¨HôêÕKXYY !„Ðh4båÊ•Â××WXZZЧŸ~Zœ>}Z?.¸¼ñÇ%ð÷øâªlòÉ'ÂÞÞ^4oÞ\lذA gggý97oÞ,Z´h!Å{ï½'T*U©ëÊÌÌŸ|ò‰hÕª•¸yó¦Q¯½ªõÔô=ÔjµbÍš5¢U«VÂÆÆF 0@=FJº·oßÞȑԄ„øùù¡:¿òt:t:LMMë12㊊ŠBóæÍѹsgý¾}ûöañâŸpá$ ÒÓÓaoo_åsþüóÏh×®œë#d""¢†"’ÝȉˆˆÊ •Ju¢ ±±±5jΟ?üü|œ>}óçÏǸqã½{÷®V¢Mô¸+ÈÖàÏÈTh tÆ…ˆš&ÛDDÔè5kÖ 'N4v™3gbðàÁ2d0vìXŒ3Fÿ^8qÂÈ6. úñðõaýúõððð€Ng˜H !ТE |öÙg$>‰DRnO’B"‘ !!¡ÖõÔDÊyømÍ]ìþ÷%œûò> 25F‰ƒˆšv#'¢­&݃©´ÆÞœv#/_}ÿ¼JNN†»»;Nœ8^½zé÷Ÿ;wÝ»wÇÝ»wáææVïñI$˜ššâìÙ³KßeffÂÓÓùùùˆ‡¯¯o­ê©)U†—v¥àÏÈTèŠZr@ÀW(ÊŸÍŸˆ¨ØœˆˆÈ˜-mDuÅÅÅ/¼ð""" öïß¿½{÷®0Ñ®kýúõCdd¤Á¾C‡¡OŸ>,†òXØ›¢ûdw}Û]'¸áÆñ,|ýŸËøïÇ·Q˜ÃeȨî0Ù&""ªׯ_‡£££±Ã ZH$غu+üýýáää„eË–açÎhÙ²%lll0þüJÏ¡Ñh ///899á7Þ(wíö¨¨(@¡PÀÍÍ Ë–-Ó;|ø0:uêsssøøø`çÎU:„½{÷B«ý'iÜ¿?^}õÕ*Õ[âá.åoaÆŒpqq³³3f̘¢¢"ýñ#F "" •|ïÞ½>|x•Þƒ’ú<ˆ6mÚÀÙÙS¦LAaaa™ïeMÈ-MÐù-¼ÕOýŸ²n@fÁ[c"ªCFšˆ¨N<¸Ä‘N§Ó§O;w©©©B!Ôjµ ÎÎÎÂÉÉI„„„µZ-Þ{ï=1fÌýyrss…………8þ¼BˆC‡‰Ž; 333ѲeK±cÇŽGqPM–þjLPƒ%®öðr[MUM–þÒé„2Y]OU$rrrÄæÍ›(rrrÄ—_~)ˆ´´´ ϱråJѾ}{+þøãñä“OŠ!„áw$''GÈår1fÌ‘˜˜(ÂÃÑ’’"”J¥0337n÷ïß[¶l¦¦¦B©TVxLˆâ¥ëÌÌÌĉ'„B\¹rEH¥R‘””Ti½ÆWÙrrË—/Æ ·oß±±±¢k×®böìÙú÷ñêÕ«ÂÕÕU\¸pA!DVV–P("--Mÿÿ­*±ôïß_ÄÅʼnӧO ___±`Á‚ZÎDDHßQ£ „ÀÌ™3qìØ1;vL߸fÍܸq¿ÿþ;Ž;†ãÇãÃ?ÄðáÃqðàAh4Å“ã>>èÒ¥ òòò0bļûyó&>øàŒ3yyyƼDª¥ŠZàÇ„¯¯/ììì°téRýþ¬¬,¼õÖ[ptt„§§'BBBPPP oy;vì¼¼¼àççpuu-³þÔÔTäçç×ß6 šBîŸËÅùM÷qdB¶={»ÿ} EùÆŸ!zÆŒ°¶¶Æo¼˜={6¬­­1zôhÅãŽ+²yóf,Z´;vD‡†gžy¦T9333ÄÄÄ`ݺupssCóæÍÙÙÙP«ÕÐétP*•077ÇèÑ£‘™™ ‹ €­­-^zé%}Wòýû÷ã¹çžƒ‹‹K¥õVGXXÖ¯_æÍ›£cÇŽX¾|9¾ÿþ{ýq 6LGTTzöì ‡*½%V­Z???<ùä“X²d ÂÃë'‘11Ù&¢FaöìÙXµjöìÙcp3WÞ aÏž=!“ÉpòäIÀ®]» ‰DRéÍ,5žþy899U©ÞÙÚÚvìØœœ¬[·Îàø+¯¼‚9sæàÖ­[ˆÅ€ðù矔)éJ>qâDôèÑ£ÔrpU‰eêÔ©HHHÀÙ³g1wî\Œ5ªjD“)¤xíP{ôxÏ—v§`÷K'Ý…Lº‰¨|¦eí¼víZ£úÅOU'•JѹsgØØØ;¢j±´´D›6m0{öl¼ýöÛˆ‰‰¹¹¹þ†pÕªUÈÎÎÆ„ н{w|öÙgxöÙg¡ÑhðÑGÌÆ[r3Ž>}ú”y3K ˃PÔj5vïÞAƒ!%%ööö`0Ór ˜˜˜àúõëh×®€âß‘ú2Uí^ü ääd\¾|‰‰‰xê©§Õ«è’å(ÌÐi«žˆh u¸¼'–Î2X8È`å"ƒ…½ RYÃjíž3gòòòðâ‹/"///½ôV¬XQªœ­­-V¯^‘#GÂÒÒsæÌAPP €äädlß¾³fÍÂ;wàããƒ={öÀÜÜ*qž4i¶oߎäädýØLˆˆˆÀܹsõ7³Ë—/ÇË/¿l”k¬)­Z /Y e²Ê$52x>ݬ̲—/_´oßþQ†øÈÀÎÎNÿåÀ˜2e 233ann‰D‚øøxøúú€ÁöÈ‘#‘œœŒM›6!//¯½ö† †àà`ƒï^Éw177VVV¥bÐét8zô(¾øâ œ={cÇŽÅĉÖ-¶¾üüóÏhÛÚùÊqqKÒãTH%ÐéÊKE¤&È,¥H%(ÈÒ³°7…¥‹Cëރ€¾‡¶?ŽTE¸°% Wö¥¡ÿ'­Ðü™²¾Q“YfË6Põ7»¸òÓŠ{OÜû…PÞS#÷ž)Ðk®W¹/3·5K'KX°ƒ¥‹V®2XºÊ¡phÚI5.ö~è»ÄÝ'»ãð\ÙŸ ­ZÀÒ©~¾ç¦fR˜šUܳá£Ou*]ƒü´"dhŸ^UzT™”;Øüoéq*œZ~ §t…£L?Ù›¥³ r+“:¼*jHŽÍ¾×+øs„Ô”“¨5%L¶‰ˆêˆ*CƒÃãâ ¼_­º¸åKj"¥‹ Vnf°÷­x|°…½ O‡x>ŠP‰ŒÎÊMާgx"`‚+Í}kãÎÈnj&­v÷õ&r ÚX /¹©—ó LVC•¡®¨øç€çÓÍ0p½o¹¯Wçi‘ŸRKd &å‰N#`ãe†3kïâòžT<9Õ-úpÅ¢¦â±H¶«:ãd}ÌLiìÙ.]c–ššŠ{÷î;ŒÍÝݽIN”X©)'\Á¦M›pÿþ}têÔ ï¼óŽþ<w«.«›õW_}…?ü999>|8V¯^ …B¨¨(ÌŸ?ýõlll0uêTÌž=»Âø<¿F£Á¢E‹•J…bݺu°µ­¼ëVU¯¿¤¾£GbôèÑøè£0zôhýõI$„‡‡cñâÅHNNÆìÙ³1sæL!ðå—_bݺuHLLÄO<ÿû¿ÿàAƒÊ킞šš KKK(\[”ê‰nžÈÂïî#óš .FM¶#‡]Fî=5À¾¸UÚÒE§ö–hÙÏ®Ò%{Z½h÷(Â$"ª3ÞÏÛÂûùîU s´Å“»eOøÖ¬¹Y…¯ÿ#<¿qv2X8Ê`Y2ÑÛßÝØ]ºXÂÞ׸cê5Fƒ={ö”»\ Õˆˆ¼úê«Æ£Îh4„††>6«žPýøù矱páÂ2ÕI²——‡#F`íÚµ ???$%%Ö­[‡U«VaãÆxê©§páÂŒ?^.'''lÚ´©Ümغu+¾ÿþ{ddd`Ô¨QX´hæÎ‹aÆaÔ¨QˆŠŠÂÏ?ÿŒQ£FaìØ±P(åÆ÷ O?ýûöíÑ#G ‘H0nÜ8,Y²+W®¬³ë/±zõjlß¾öö¥Ç©}óÍ7øßÿþ‡½{÷büøñ7nöïßÅ‹cË–-èÖ­.^¼ˆI“&•ÏÙ³gñùçŸãÛo¿ELL “mªs:­@ÜÁtœßœ„üõ?ã%}¢[S¹÷ÔȽWˆ¼¤"äÞ/þ[?~úž/‡µ†C›ò¿ÓýVø@¦ÂÊM9[¥‰¨é1kf³f&°mYµò-ûÙ¡™§òÓŠ—Z„ü´"ä$")F‰ü”"tëZa²}ÿ¼Ù7 fc·°—AÂÁDÔÄÕI²­V«¡Óé T*annŽÑ£G#00¥0oܸ+V¬ÀСCnnnXºt)Þ|óM€ Ƨ/ÿð6PœûùOR´dÉÌž= .DLL š7o 4o^} V«!“É P(‘‘P*•°²²ÂÛo¿3fÀÆÆO>ù$.^¼ˆ?üP®ììlDFF껎?¼ Ó§Odž ™™‰¹sçb̘1(,,„Z­†\.‡J¥ÒRÏÍÍ­R|ŒyóæÁÛÛ0yòd}ëq]]M½û9s&Э[7ÄÄÄ`Á‚H$èܹ3¢££qéÒ%¬_¿­[·ÆàÁƒ1iÒ$tëÖ­ÆuVErr6¼ˆÜÜLŸþb½ÖeLj »Çi©¸¬K:Äo,BQÎÝj½NàÕoÚÃÒ…I3Uîá ÞJ€*C¹uÅ­Ú¿o¸‡{gsõÛ2…Ô`´.£]a×ʼÎã~ؽ{÷‚S§N!-- þþþ˜;w®~èd]ª¨ã£z Oõ#==_|ñ.]º„ììl´hÑ#GŽÄ³Ï>[çuU´ÄZttt×WWvìØ°°0Œ?^?¤¶Dß¾}ѧO„††ü?¹{÷.F¥¿®ª–«­:I¶ÍÍͱ}ûvÌš5 wîÜöìÙsssx{{£W¯^pssCnn.Þ}÷]¨Õj„„„èg#ßµk—~ÖîÔÔTý¤`emÀرcñ¯ý ùùùÆÿýßÿA.—cõêÕ9r$,--1gÎaÀ€HNN.7¾Í™3yyyxñÅ‘——‡—^z +V¬¨Ó믩wÞyï¼óÒÒÒðôÓOcÅŠïK‡°qãF,[¶ aaaxõÕWqìØ1´hQÍGÌ•ÈÎÎÇ‘#±Ø»÷,~û턬¬Ìu²ý¨–°{œ–ŠÓ ˜($Ðä HM%ÚªýW&©™lQ­H¤(+_§ü¥ ~PeOì–Ÿjøw^j$•ô@ÿßêDfk`é$‡ÂIKW¬L«7Æ<==4höìÙkkk|÷Ýw ÂÁƒõsîÔDyâO:…–-«8 ^-êi.]º‹fÍÌáåÕ°‡°äää`ܸqxæ™g …Bß~û ‹-Â’%Kн{÷Ÿûþýûxûí·qðàAƒýëׯ‡›[ùKÖU=uEãÇÃÙÙÑÑÑ¥’m8q⢣£ñüóÏWx®ª–«:[ú+00°ÌåLMMñË/¿è·MLL‚ƒr%7ð¾¾¾7ón?øï²–˜6m¦M›¦ß~p¶îòâ{ðœfffX¹re¥³—¥ª×_Ñõ¥™’í¨¨(ôíÛï¿ÿ¾þؾ}ûàááQªN[[[L›6 S§N…N§+u¼&22ò°ÿ9|óÍy\¸p&&ètâxÇSÔGµ„Ýã¸TÜú™À¡› üÛ´CF¼ I•Hý3÷ÏE^Jñ:‚RS tZaðñK¤@î}5\:—sb""¢:$‘¢xtGPþ”8å’)¤È½«Eöí\ä§/™æbV½†ŠÐÐPôíÛ›7oÖïk×®’’’°jÕªZ%Ûå=ˆwrr‚««kÏ[ÕzW7n¤âÀóˆˆ8ƒÛ·3ðïw¦M£V­„……! 3fÌÐïkÑ¢222°gÏžZ%Û:999¥öÛÚÚ–¹:R]×SWnܸ۷ocåÊ• Abb"<== Ê 4Ÿ~ú)ºtéRáµUµ\mpPK‹Q£FáüùóÈÏÏÇéÓ§1þüR3µ?H*•ÂÔ´æÏSòóÕˆŒ<‹7ÞØ„.]Bú bbîü½&¹º*ŒßmHJ–p{÷ÝwqóæM|ðÁ3f òòòpúôi(µ„ÝòåˇyóæaæÌ™úsU´„]uê)Q²T܃ÿ•(Y*nÅŠ˜5k222°eË,^¼kÖ¬Áõë×1wî\ƒQÕ!5•ÀÑ_AÎè»È¯Û#ö¶CŸÐh=È6-ÌõË»˜È$€(nÙ&""jž˜äŽþŸ´Âàmmt¤Æü¯ ®åÅTëûöíÃÔ©SKí Å–-[ôÛYYYxë­·àèèOOO„„„   @ñƒøN:ÁÜÜ>>>عs'<ˆ¯ª¨¨(@¡PÀÍÍMß+®dÝg///899á7Þ@VVV¹õ”oBB$ Ž;///tíÚcÇŽÕ¿N©TB¡PàÂ… U޹*’’²ñÿþß <ÿü ôìù1>ýôGܾ]>^¿ïøñãèܹ3ºuë///?~¼TÜ#FŒ€——V¯^]a#SUËÕ“í*’H$þ©o3gÎÄàÁƒ1dÈ888`ìØ±3f &NœX§õh4:œ<™€‰·£}û0mÚnœ8ñ4-„Ðjþ²ò”µ„[fff¥Kع¹¹á¥—^ÂÒ¥KõÇ+Z®:õ”X¾|9úöí KKËRÇ\*@©¥âõKÅÕ `ÛÒ­_vÀ³x!p_;¼ñsg¼´Á]ƺ³— ì¼ëg¢­’_îDDD‹¬¬,$%%•¹ÒŒ••¼¼¼ôÛ“'OFbb"Μ9ƒï¾û?üð–/_^£ñyyyP*•4 rss1lØ0tíÚñññXµjæÌ™ƒÔÔT|úé§Ø·oŽ9‚èèhÄÅÅaÉ’%Pf=åÅ[¢¤1`É’%8xð 4 ààÁƒðññ)µQM$'çàóÏáÙg—¢k×X¼ø0®^½ ø¾µ±P*•ÈÈÈ0ø¾”°°°€³³³~{íÚµHMMÅÆ±|ùrœ={»wïFAA,X€!C†à믿Fpp0V¬X‚‚lذ°ÿ~ƒs@¥RüÑjµÈÏÏLJ~???„‡‡cÒ¤IØ´i²²²°wï^œN[éë 4pw¯YËi}ñósĆ Cª\þQ-agì¥âêƒÜÒO6ƒÇ“Íê­ŽÇMCÛFDMÛúõë±téRܹsÇ`!¼½½‚÷Þ{ψ6,íªHQQ¾þúkÄÄÄÀÇÇðÑGaæÌ™˜2eJ©ñ>ˆ/+‘=|ø0ú÷4oÞhÞ¼9€âI‡7oÞŒ¥K—êWõ ÃÕ«W«ïÈ‘#7tìØZ­2™ 'OžÄóÏ?]»v!88¸ÆÈ¾(•Jô=*5šÊïK¢ª~4 Ž?Ž-[¶èÇZ=_~ù%^yå! R© —Ë1`À<÷Üs033+÷|eõ’ýøãѽ{wlÙ²ÎÎÎ033Ó'ûyyy8r䯝ÿ^Ìš5 ·oß®v¼ýúõL˜0>>>Ðét055Ell,pôèQôïß_ÿž\½z)))èÝ»7€âd;<<7nÜ(5§§'&L˜€Ï>û ]»v-÷ú«Z®¦šd²-‘H¯JBÿxé¥VpqqÂ?ü‰ÌÌ|˜™™¢°PSéëd2|þù¨GaÕee•¿ôZYÕvÆ^*ŽêFCÛFDTbĈ˜:u*N:…^½zé÷Ÿ?wîÜÁðáÃk|î¦ø ÒÎÎ...øóÏ?ñÌ3Ï;{ö,Þyçœ8qÐjµhÕª•þ¸¯¯/kô ¾¢{Ù¸¸8Œ?J¥Ò`Ú­[·àçç§ßö÷÷‡¿¿™çHNN.7Þ%&&&xå•W°ÿ~têÔ GÅ—_~YnìiÖ¬/žxb! 5HðwÏÊʽþüó^}õ‹ÕY_,-«¾*µµ5ìììpëÖ-´oßÞàØÕ«Wñé§ŸbíÚµÈÉÉN§Ó7¶€‡‡RSSamm5kÖ`ïÞ½ CëÖ­ñúë¯ãÉ'Ÿ,·Þððð2瀀ÄÄD¬Zµ *•Êà{“œœl0NºE‹åNÈœ™™Yn¼%JZó¥R)ž}öYœ>>8wî¦OŸ®/wüøqhµZ <Ø Žèèè2' :t(Nž<‰•+W–9Ì£ºåj¢I&ÛT>küë_ObÕª×ñûï7pèP öí;‹ìlLMMÊ}šhb"Á Aµï*T—ª»~û£ZÂÎØKÅ5EEE˜;w.vìØ!Þ|óM|üñÇU.'“É ‘H°eˬ\¹iii˜>}:<<<ðá‡"##S¦LÁ¢E‹ªtž²&¡{x2; ü‰ïˆˆ'...xá…alïß¿½{÷®ÕÌÄMõAäË/¿ŒÕ«Wãé§Ÿ6ø]Ž¢¢"( Èd2˜˜˜àúõëúÞf×®]ƒ‡‡GÄ—G¥R!004h  ¸7ÜÍ›7õ½ß.^¼ˆ#GŽ`Þ¼y¥ÎãââRn¼%l 1bFމvíÚ¡W¯^¥&­ªo¦¦&°µU<Ò:+#Då VêÙ³'öìÙƒ… |~úé'hCp#Õ IDAT4˜™™ÁÎÎR©÷ïß×'¸÷î݃££# ¡Óé°`Áh4;v sçÎÅ7ß|SíØ ±`Á,X°O?ý4ŠŠŠðÝwß””¤OppúôiŒUºá­¢xK<8ÇÔsÏ=‡Å‹ÃÛÛ;v„““€âŸ-ÑÑÑxçwðŸÿüG_>,, ÑÑÑ=zt©û\‰D‚Y³fa̘1ˆŠŠ*÷Z«Z®&˜lS™¤R zôðA>X¸p0NJ@DÄ|ûm, Š`b"mTãd€G·„Ýã²TÜãlÍš5¸qã~ÿýwýä,~ø¡Áä+•+?ôèQœ9s7n‹Ý»wcâĉxÿý÷áààPéyJ&¡Û»w¯þs<}ú4üüüô‰vÉx»µk×bðàÁøöÛo1f̼òÊ+e޵'¢†©:ò*;OYò€âÉ­æÏŸ¿þú 666˜:u*fÏž]íú+z„yóæaÍš501)^kÿþý˜2eŠ>Æò^/‘H°hÑ"„……A¥RaàÀX·nlmmË|™••…÷ßQQQ077Çk¯½†Å‹#11Ñ`Å]»v$ÿ É’%Kàïïàà`¼óÎ;°²²Â°nÝ:ýÍ»L&믾Š)S¦`Ó¦MÈËËÃ|€‘#GÖéƒøÂÂB¨ÕjÈår¨T*,\¸››‹àà`Ì›7ÞÞÞŠÇd?<̬¤žŠâ-˳Ï> Fƒ>ú¨VË”æäD#5õGœ8ñ¾ùæ¾û.VßÊ]Ñä¼­[»üÿöî<¾©:Ýø'iš¦ÝW ”.@ËvY¼¢¸ ‚в(Ê  ààuÀñ:—‚½Š0×:"uPGQPpX•M”­øC´¢,-e³PZ(Ð6ÝÛ´Íúüþè4Ò6é¥éòy¿^¾äœ|Ï9ONÒä<9ßïóÅÇϼáãÞ +V<  éCgÏžmý;›0a\]]qèÐ!lݺÕzM¢R©pÏ=÷àoû›µ`ݧŸ~ŠÑ£GC¡P ..¯¼ò  £Ñ•JU«yeeeƒÃjF˜L&¨T* ¬^½PQQ1cÆà“O>±Ó{ï½÷¬ï©ºÇi(^[bcca6›±fÍÌ™3Ǻ>55EEE¸ÿþûkÅ?zôhlÚ´É:ƒO]!!!xþùçñî»ï6ø|›Ú®¹:d´†*-ÖØ³g¢¢¢àããS«°•½êu«.~ÿý÷µö§ÕjQQQq럜89)qç½ðþûOáøñÿÃòåSqûíQP*P©œ T¶»¥M1eÊœ?z½gΜÁ#<à·)Üjàš)ìÒÓÓQ^^Ž~øÇoÒvÍ9NS¦Š»¾ YÍò×_{î¹çÏŸGqq1vïÞ £Ñh·›P[óÙgŸáƒ>@÷îÝqÛm·á­·ÞÂ7ß|ÓìvqqqðôôÄŒ3/¿ü2<==ñÌ3ÕSƒ5i?¶ŠÐÕu#…}ªù!oéÒ¥ˆÇÎ;‘ššŠÄÄD$$$4ùή­Ù$*nÕÜã_ÿCâþýûqàÀk/¬‰'¢°°‡PÝMõ×_­UAØÞö·ªÈ–­7Ú‹€€=zz½?þ8Fމ¯¿þÛ·oÇC=dm÷Á 44C‡Ř1c0fÌÄÇÇ×ú!¾k×®X¾|¹Íâ›ÂÛÛýë_1mÚ4ôéÓááá˜:u*ÆŽ‹øøxŒ3<ðFމ°°0kõg[DZ¯-5]ÉKKKmVÔnµZ…ûïï‡?| §O¿>šQ£úÀÉI ¥RÑ¡®=¯çíí+VÀh4bñâÅxá…œœŒ7ÞxÃúC¼øâ‹ð÷÷·ö´:t(¦M›µZøøx|üñÇxì±Ç°iÓ&,^¼jµÁÁÁ¸í¶ÛšüÚxxxàùçŸGBBf̘àà`Üwß}Ö1ûC‡E\\^xáY‹6Û:޽xmQ*•¸ë®»PQQa› Tw!<==1aBu׎¢¢"„……Ù­ÞX£¦êb]£GÆñãDZbÅ Üu×]4hæÍ›‡Ñ£GÛ,`ÕxbÖ¬;1kÖŽ…êX°`***0aÂhµZDDD´ØTqb”]5 8³ Å«PrQü_+P’¥‡±¢ú ¯ï”ܱ°û ÃßßIIIÖ‹ÕšiUn´Ýͯ)à ·óõõmvLDÔvyzzøm¼jÝ妲5›„Z­¶[ܪ¹ÇÏÌ̬w7ÔËËËúï©S§â…^À{g­[·Öê²ÙÐöz½þ–Ù¢ö«ªª W¯^ŪU«jMéÔÒ‚ƒ½0gÎ(Ì™3 /jñå—ǰqã\ºT•ªc^ow&ƒؽ{7-ZäèpZD‡|WÚª´Xóëkš/¸ë/¢k¾àÆŽ‹!C†XÇ&\¯±)˜–,Y‚ŒŒ LŸ>¯¿þ:bbbpùòå›|FDÍS3UÜ¥K—PYY‰S§Naþüùµ P4FÌ€.Ë‚ ßáè?®aïü lxôVÝ~=…o_¼€Ÿ?¸‚sÛó‘¦Âšh+U xu·?ÅDSLš4 ñññÈÊÊBjj*ÆŽ‹?üð†ÛµÔñl)//ð[½-[¶ ´´´Öx;""[lýWSÜ*..ÇŽ³ÎY{#üýý‘žžˆ ¨¨ÈÚÍzè!èt:¬[·)))õ®•ìm_Sd«Æ‰'¬ÝÈ뺾ÈV†ŠlQûôÓO?á?þã?0kÖ¬V»‹Û³gþô§œ¼{öÌÇ«¯Žo•ãÒ­sæÌ<÷Üs7n\‹ÌÑÞtÈd»)_¶ª27å ®)_¹¹¹8uê²³³1xð`ŽÙ¤v)k£ )‹Œ8ð¿qâód,Fi¶–ë kZL@Ý3“À7úæÞó ðôôÄ Aƒpï½÷bÀ€µÆ÷5·]KïzuǶ54ÞŽˆ¨©ê·Z¼x1ÜPÑÌÆ~HtssÄ ðßÿý߸÷Þ{­UÛ¾¦ÈVZZÒÒÒ0oÞüãÿÀÏ?ÿŒÙ³gãðáõæ”#jOº>äS9 ýÞ %SãS\ZùFÝ\²íéé‰U«VaÕªUµÖ×-g¯€zãfZ¾Ñý:t¨ÖcS¦Láø>"º)×·rwwG||¼µ¸Unnn³ö•€_|ƒ ‚R©ÄäÉ“ëýø»ßýÿüç?m~vÙÛÞÉÉ :<ðt:|ðA›E¶j~ øàƒðâ‹/bèСP«ÕxòÉ'_«+9QGÔ! ¤éõz¼úê«X¿~½õKàïÿ»µz]C…’Þyç$$$X¿à:„ýû÷ãðáÃõŠ!]oË–-xûí·ñ /à±ÇƒZ­nµçÛ’šS ­­kïïcG«9Ý<"ñóWqñ@1”N XÌ gÝ*W%b§Á;Bïp ¼{ºÀIÝ!;ÑQ;%AÙJ.U¡ø¢%—ªÐïÉ@øDT÷Fb4Çh¬@Z{ÃiC§+æââ‚ÄÄDkõñººSõÒK/ᥗ^².?ÿüóv·»Þ#öÇêÂ7å9¿U-/¾Xíi]£w¹óÒtðVÃÍŸSDÔ~Ùª s½ŽrçÎÑÄèò (»¢‡G°ž]íè¬*6 |”7¼z¸À»§^=\àÒ…—ÃDtkðÓ…:,F­V{CEe¨ZÍЋ %ý°/zÞç”Ïs‘òY.€Ùh€˜-µÆk{«á¬F·]št<‹Q°ý™_!ÊU ¯0téî¯ntù÷¿Cy _Ã9“é–§=¥Cvr*´F”]Õ£4Û€òkz˜ Õçzø‹];#ÈîöfÚŒˆèVèc¶éÆu¤1Ûtë•dé‘ü^6.}W¥³£`Òúøõ¾Ái”çPrIÒËÕÿ•\®²þ[¥qÂŒ¤Ø–}DDä0•…&èr (Ï5À=ÀýÜí¶=µA‹S´èÒÍ]ºUßÅîÒÕžÝÔèÒÍ*MËÕQ©T0›Í-¶¿á¡ò†³ÂEÆæÆkœ`2uŒ.ýmá}D­ÃÎû¶cŽÙ&¢ÖáÕÃ,ÄÕ_ÊðCb6J/ëáÝó&¦ºRüv7¼ë°Ú3ˆ¨*66¸yÙ¶Þ’8Ðìêï-É¢s‚î_¡P¸™á1µs ‡ ê8=ý>¢Öcï}Ë«N"ºi¡ÿá‰É_Ä ²È'õ­éã­P®¾ ãvöPbøwCÙ=Ê®—¦CÆÞ"TT'é}Ý0amŸ[Q§!@E¡Z#tyFèò ¨Ôšà¢Fï ~v73èÌ(¿f€{°A<ࢆ{ÁÎpVCåÒvf®¸ë®»vl]®»þëWx¸ý#îAís†rìûˆÚ&ÛDÔ"JÀÍϱEÍ4^*ÄLö¯·Þl° ìªÁZyÖžkGËqpqæowÅCÕðìZýoÏP5Ü¡tâ€q"Ꜯþ\†¤E™¨*6Y?OJÀÕÏž!jt»£áúÝFtir Ϊ쪻žû*W%üG´Ã¿W‰èæ0Ù&¢ÏI­„wxãÝÛ=»ª1`fJ³õ(Ë6 3©eWô0VTws ¿×÷'FÜêp[Ô… pùòeG‡ATR©Ä€àåååèP:ÊB²(EE•FTšP‘oDeaõ¿}"\ñðŠh»Û{…i;½zúF5<‚Ôpt†Ò™?B¶„²+ì|îW¨Ýðà?¢áêËËt¢öŽÅDDÿæ¬FßÇë¬,4¢4Û•KÔç¾*@ò»ÙÖqçÖ‹Ñàê»>]ºkZý⩪ª ]ºtA÷îÝ[õ¸D9uêôz½£Ãh·ÄTQUh‚.¯:aV(ˆ~Ø×î6Z½‘3Üœ¡ñU¡KWð€ÆW¯0ûÓf€{3n›Æª·‚AgÆîyépvSbÜߣ˜hu6ÿ’ òòòpðàÁV‡Ú‚Ææ%êl\}/AÝ1tn(Ês ÐåQp®Yß• Bk„X±OaøK]íno(7¨=Z2|¸¸¸  uŠ Ý*&½Ù‡K:Üj÷–ýi+ :sƒÏ­ìª{ç_@e •…&ˆå·¡1Nj%û»5˜lûõvìµhÌÔ2ÔîNè?-÷ù@ãÃD›¨£°ù×ܳgO^˜ub~~ö‹›‘}Þá›ÝÕ-fA…Ö¥ªá²R׿âø'9Pi”ð®îžéè  êñâ!ƒ<áyÕÞ‰Ú!]®§7iqf³ú23îZÔ£Á"\m™AgFÚyЙQY\}Wº²Ð„ªbªŠLpõWáw_ßfw{/'t¿Ý _\ýTpPÃÕW·g¨=:æIßÇxíMÔÑØL¶]]]áêzƒóäQ-J'<‚¯&3ÉA±îÐiÐå¡Ë5 BkDþ™ èrò|HƒÉvnªZ#ÜüáäÌÂ:Ԯ妔ã亿7ÕfÂî즄‹— ýž °;äCé¬À¤õ1ÐxU'ØNjÖ8!""ûRóFDDΩS§ýúµÎÝ´óçÏ#::üjiXkœ§¶þZL:ˆC$.ïÒ#û‡R(TŠúÉu TÏéìê§úwrm†©ÊR«ÍÌÿ7 Á"c¿î,€ÚÍ .^*¸x9A㥂‹gj§6há¥AÈ~"¢ŽbïlQ“ddd`ذaÈÏÏwt(6µ•øZ+ŽÆŽãíí… ÞÒnÆÕOÝ~F[A $Ú¨n'c|àâ©‚K'¨»8Õú·³kÃ…Âz=Ü>‹«Qû&àÈ{Wº.·ÿO7&ÛD“m""j‹Å‚‚‚G‡aW[‰¯µâhì8þþþXºté-ãF¹ßf„‹Â Åg°ˆÀÉE ³ÞÒèv*W' |&¸"$jû^DÎñrÜÿvÂïövtHDÔJ”Ž€ˆˆÚ–;v 66X»v-`Ĉ€ààêDÇl6#11½zõ‚§§'î¸ãüôÓOÖýœ? …Âæò„ ð§?ýÉú˜^¯‡víÚ0ˆ‹‹CPP£Ñ“Ʉŋ#,, ˜1cŠ‹‹mÆÅÅÅxúé§áïïnݺaþüù¨ªª²Æ²ÿ~„……áûï¿·y.´Z-***vžšsœºÏiõêÕµö£P(°nÝ:ÄÄÄÀ××Ë–-ˆ>úè#ôíÛ]ºtÁ½÷Þ‹;wÖÚ¶)磹¼†qç_1óûxðïÑè?5¾Ñ®Õwº »ã¦[¢@QkÑå±cö¯(8W‰‡WD3Ñ&êl„ˆˆ:¬´´4IKKkrûòòrqqq‘>úH®]»&Ÿ~ú©¨T*)//—ôôt¹þkcùòå([·n•«W¯Ê®]»$44ÔÚ¦¸¸XV®\imýò¿þõ/ ‹Å"""Û¶m“ÐÐP1""òÖ[oÉäÉ“åÒ¥K’šš*ƒ–—_~Y¥_¿~’šš*'Ož”áÇËüùóEDêÅ'"2mÚ4¹ï¾ûäÂ… ’šš*ýû÷—%K–XÛŽ7N8 åååµ¶;räˆÌœ9SäêÕ«;OÍ9NÝçtâĉZÇ{LŠŠŠdåÊ•@ dåʕҵkWùæ›oD«ÕÊÞ½{%**ªÞ¹Ù»w¯J\\œdddÔ{¼9’’’$77·ÞúÒì*9½Y+{þç‚|6ò¸¬|TVÝ~LV=*+•ÏF¿©ã’m¶þ~n¦‰äŸ­ucSeãäSRš­wt8DÔú6òÓ’ˆ¨kn²]XX(ÎÎÎòöÛoKQQ‘X,)++³Ù\ï"»W¯^²zõêZÛ¯Y³¦Iâ:NÜÝÝåÈ‘#""òä“OJ||¼õñ>}úȵk׬Ë{÷î•JïÞ½eëÖ­Öõ§OŸ¶.×Ï`0ˆ““S­ç¿uëV‰ŠŠ²¶MMMµ>VYY)Ÿþ¹ 6L $ü±”••9ô<5ç8uŸSÝÇHRR’õÜôôtéß¿¿¬[·®Öqׯ_o7¾+W®ÈâÅ‹¥[·n2~üxùöÛoÅl67ú\ê²—l_Ïl²HΉrù士òåô3²rÈ1ùd8“m{.\¸ ~~~7´­V«•… ¶X»ÎÎbÙôø)ùjæY©,4::"rŒìFNDDV>>>HJJBrr2ºuë†Q£FáСCP*ë]\¾|¬µ.66¶IÇqssã>ŠÍ›7C§ÓaÇŽxæ™g¬gff"$$ … …÷ß?.^¼ˆ¬¬,DGG[ÛÅÄÄ`âĉ6‘›› ³ÙŒÈÈH뺨¨(dgg[—ûô騷ozôèýû÷ãý÷ßÇÑ£G1gÎxxxØÜwk§æ§îs²%44àìüÛ|Ð.\@ÿþýkµëÛ·oƒûX²d 2220}út¼þú눉‰ÁåË-?ÍœÒI îò\&|Þ3’bñ؆˜?NGq3õš:Æ¿­×h+JàþÄ<ôq44>,‘DÔY1Ù&""«ÊÊJX,lÚ´ ………˜={6ÆÂÂÂzmÃÃÑ’’Rk]ÍTcM1uêTlÞ¼Û·oÇ!Cj%ÑþþþHOO‡HõœËEEEHNNFhh(233­íNœ87ÞxÃæþƒ‚‚àä䄌Œ ëº . k×®Ö嚤3 }ûöÅ?ü€Ã‡[ÇÛÓZç©9Ç©ûœl±•¤÷èÑ£^|¸Ì›7O/^,±±±ròäI9yò¤ÜqÇòûßÿ^D¤^|""¿ûÝïä¾ûŒ 9yò¤ôë×O^{í5»ãNOž<)Ï=÷œøûûËìÙ³å—_~qèyjÎqìu+¯w¯»üþûïK·nÝäÛo¿•üü|Ù¿¿ôîÝ[ E½çm6›åÛo¿• &H×®]åµ×^“+W®Ø2eÊ)--•?þXH~~~“öckŒ}sêÔÇíÚ5Q«Õ2kÖ,ÉÎΖþóŸ@òòòl¾_l¿©íšS €ˆ¨ƒâ˜m"¢Ž¬¹É¶ˆÈ† $22RÔjµôéÓG¶mÛ&""F£QFŽ)""b2™$11Q¢¢¢ÄÝÝ]n¿ývINN¶^L7–ü‰ˆÌ™3G<<<ê(+--•gžyF|||ÄÏÏOæÌ™#:Nªªªdþüù*^^^2uêT)**²ŸHõ˜çéÓ§‹ŸŸŸ„„„ÈK/½T+Qµ§¨¨H–/_.‘‘‘’™™éÐóÔÔãÜh²m6›åwÞ‘ÈÈHñòò’±cÇʶmÛ$  ÞsÞ¼y³Œ1BÖ­['zýÍ|êÈÉö±cÇDä·±ñu—¯Ú­1öÍ©[Pw¿^¯—3gÎHyy¹˜Ífùî»ï¬ûmêÿ[U €ˆ¨Ú¨iÙ{åDDÔVÔtîׯŸƒ#iŸ, , TªŽ;ærçÎèÞ½; `]·eË$$$àøñãµÚÆ»©7ÇÁƒÑ·o_¶ÈþÚ …BôôtDEE5i¹¡ýœ;w½zõªµÝm·Ý†Ÿþ¹Þ8{ º‹wtt4j.íj– ƒõuÛ¾};Q^^ŽAƒá³Ï>Czz:ÔÚÖÞñ›Ú.66ÉÉɵꤤ¤`àÀèH—ž×Ž•#h€;”N§{<5Ù&$!""²C©TvèDRSSñÔSOáØ±c¨¨¨@rr2-Z„gŸ}¶^Û–J´©il±oNÝ‚5¯[ee%¦L™‚¸¸8;v ÿû¸gÑIDATß›}ü¦¶»ÑZí…X€£]ÃÎ9¿"ó@Ã5ˆ¨óêØWDDDÔ   ¢¢&L€V«EDDfÍš…çž{ÎÑ¡‘ Ó§OÇ+¯¼‚ððpÀ¼yóêU///·YI_¯×Ã`0@­V£²²þóŸeeeðôôlÑ8ç΋ ÀÏÏC† AJJ –,YÒ! ¤U•˜ðÝkYÈN.ÅÈø0DÜïã舨b²MDDÔ‰©T*$$$ !!ÁÑ¡PÄÇÇC§Óá€N§Ãƒ>h­Ž‘#G"$$eeeõ¶õööÆ_ÿúWL›6 îîîˆÇÔ©S1vìX>|¸EãüÃþ“É„?üáÈÏÏÇí·ßŽeË–Ùì1Ñž\;VޤW/PàáÑ`{z@""à˜m"¢Œc¶©­ê¨c¶©Zsj´£à§w¯ mC"FûàÎEaP»;9:,"jÛ8f›ˆˆˆˆZVsj´÷ãô&-†ÍëŠûÞìÉD›ˆš„ÝȉˆˆˆZYcc—Û{ÇÃŽV òxGhà×ËÕÑ¡Q;ÂnäDD»‘S[ÅnäDDÔÁmâm"¢®¤¤)))Žƒˆˆˆ¨Sa²MDÔñ®!µUèÒ¥‹£Ã ²  `5#"jAìFNDDDÔ ddd`ذaÈÏÏoûiK´§*ðÝŸ31dN(zŽövt8DÔ1°9Qg`±XPPPÐföÓXÌ‚«r°}ö9¨4JxGhu L¶‰ˆˆˆZ‰B¡ÀªU«ƒ€€,]ºk×®EÏž=áåå…E‹5y?ëÖ­CLL |}}±lÙ2€ÉdÂâÅ‹†€€Ì˜1ÅÅÅ€#F‚ƒƒ­û1ˆ‹‹CPP£Ñرcbcc¡Ñhµk×ÚÝO{”¦[§žÅñU9¸cAwLXÓ>L¶‰¨1Ù&"""jEûöíÑ#G°téRÄÇÇcçÎHMMEbb"š|×ø«¯¾Â?þˆeË–aáÂ…(,,Ļヒ-[¶`×®]HJJ¯¿þŠ7Þxœœ ÈÉɱîãwÞÁÅ‹ñË/¿`ÿþý8pà^{í5èt:<þøã˜;w.233ñꫯbÖ¬YÐét6÷ÓžXL‚«s°}Ö¯prVàÑÕ½Ñg’?ÐðllDDÍÆ1ÛDDDD­D¡PàØ±c4hŒF#Ôju½åôôtDEE5ºŸ¤¤$Ü}÷ݵ¶{øá‡ñæ›obâĉ€3gÎàìÙ³˜8q"Ο?èèèZsxÇÄÄ ))Éz—zß¾}ˆ‹‹Ã„7ß|³gφ——t:ÜÜÜ‘‘Qo?íÉOï^ÁéMZ šŒØAPª˜eÑ-Á1ÛDDDD­ÉÓÓàììls¹©BCCëm—••…èèhërLLŒ5ñ¶%33!!!P(P(¸ÿþûqñâEøøø )) ÉÉÉèÖ­F…C‡A©lÿ—ޱ3ñøæ¾8+˜‰6ÝRíÿ“ˆˆˆ¨²•ø†††"33Óº|âÄ k7r[üýý‘žžˆ ¨¨ÉÉɨ¬¬„ÅbÁ¦M›PXXˆÙ³gcüøñ(,,¼O¥U¹ú:Ã#Díè0ˆ¨`²MDDDÔALŸ>¯¼ò ÒÒÒ––†yóæ!++«V›òòrë¿'Mš„øøxdee!55cǎŇ~…B1cÆ`Ë–-(--…Á`€³³3ÜÜÜlˆêS9:""""jñññÐétxà ÓéðàƒZ+•‡‡‡cäÈ‘ AYY !!/¾ø" ¥R‰É“'ã­·Þ‚F£Áš5k°páB\¾|ذa4Íý´b.î/‚©Ê‚^ãýur,FDDDDí›Yß•à—®¢èB%b&àŽøîŽŽŠˆ:·M¼³MDDDDí’XYß•àĪhÏT ünoÜ“ß(WG‡FDÄnäDDDDmBÑp•lvL~ÝQ€c+sP~M°»¼0ñûÀ?Æ­ñ ‰ˆZ “m"""¢6†ÉtãªJLêØé‘ð×8:"¢z8f›ˆˆˆˆˆˆ¨emâÔ_DDDDÔæ˜ª,Žˆè¦0Ù&"""¢¶A€œå8øZ&þy*t¹GGDDtÃ8f›ˆˆˆˆªô²é_âüîB”^Ö#h€îx9 ^ªQûÅO0""""rˆìKqlå5ä¦èàäŒèýÐk¼/¼z°àµL¶‰ˆˆˆÈ!Äx„¨1ø÷!è:Ü eÃSžµ'¬FNDDDDDDÔ²XœˆˆˆˆZ–X€œãåøé½+ ïëQçÄnäDDDDtóОÖáž"dì-‚.ן ú=`µ££#"juL¶‰ˆˆˆè†iOUàüîBd&£<Ç€.Ý]Ðëa?DŒño”«£Ã#"r&ÛDDDDtÃ2“ŠqåH)z=ì‡ð{½á×› 6ÀiDD^UUÒÓÓa±X unnnˆŽŽvtÔJ,fÒ‰UĉˆêØÄ;ÛDD\ii) àèP¨Ðëõ¸rå “ívΤ·àÚ/e¸ô})LUŒZÜÃn[&ÚDD¶1Ù&""@¿~ýuyyy8}ú´£Ã PzYˇKqùp ®-‡ÙhŒzŒòvthDDí“m"""¢NL,‚O£4[—.*t»Ý#ÿ7 Ýþ³ \}y©HDt£ø JDDDÔ‰)” š ¯p û»A¡d·p"¢–Àd›ˆˆˆ¨*¹¤Gnj9rëÐg’?ú¹ÙmÛë¿VŒŒˆ¨s`²MDDDÔÎYŒí™ ä¥ês¼¹©:T¡tRÀ¯·+ô¥&G‡HDÔé0Ù&"¢VuþüyDGGƒ3O6Ÿ#Î_¯öáÄšýÇ5¨Ý뎾Oø#x€û»CåªttxDD“m""j16lòóóŠMm=¾Æx{{cáÂ…ŽƒZ™©Ê}‰îAÎvÛôïðQÞð‰ÔpÌ5QÁd›ˆˆZŒÅbAAA£Ã°«­Ç×,]ºÔÑaÐ-d¬0#ÿl% ÎV ÿlòÏT 8Sàîxxe/»Û¹97˜ŒQëc¿"""j¶;v 66X»v-`Ĉ€àà`€ÙlFbb"zõêOOOÜqÇøé§Ÿ¬û9þ< …Íå &àOú“õ1½^ìÚµ `4‡   "..F£&“ ‹/FXX0cÆ ÛŒŠ‹‹ñôÓOÃßßݺuÃüùóQUUeeÿþý Ã÷ßoó\hµZTTTÔ[ßÐs…BuëÖ!&&¾¾¾X¶lY£ç÷ú}ˆ>úè#ôíÛ]ºtÁ½÷Þ‹;wZohÿöÎ]c¯Ý:eW Ø8é4ÖŒJÁÎßÿŠ£_ƒ.׈îÿé…{ÿŽ{Â"5—Q§–››+IIIMn_^^....òÑGɵk×äÓO?•J%ååå’žž.×µ,_¾\eëÖ­rõêUÙµk—„††ZÛËÊ•+­í¯_þ׿þ%aaab±XDDdÛ¶m*F£QDDÞzë-™ù¤ÄÇÇ[ïÓ§\»vͺ¼wï^8p ôîÝ[¶nÝj]úôiërÝø ƒ899IZZšuÝÖ­[%**ÊÚ655ÕúXee¥|þùç2lØ04h|üñÇRVVf3þ¦$Û5çÝ`0IOOoòùíß¿¿¬[·®Ö1ׯ__+Ù¶µÿ†ÎÝͼ^5:s²­Ë3ÈÕ_JåÌ—Zùé½lÙýÂyYÿÐIY1ø¨¬rT :³£C$"¢Ö³‘c¶‰ˆ¨Y|||””„wß}‹/ÆàÁƒqãÆÕk{ùòe 8°ÖºØØØ&ÇÍÍ >ú(6oÞŒ¾}ûbÇŽ8~ü¸õñÌÌL„„„ÔÚÆËË z½ÑÑÑÖu111ˆ‰‰±yŒÜÜ\˜ÍfDFFZ×EEE!;;ۺܧOÀ¾}û0mÚ4Œ7ï¿ÿ>†Z«[xcÄF5ïÐÐP€³óocm›z~/\¸€þýû×Z×·oßF÷Ø?wƒá†_/¾œ~Z#T.Jt sw¸½'øÁ7Ò¾Q®Pi8zˆ¨3á§>5Kee%, 6mÚ„ÂÂBÌž=ãÇGaaa½¶áááHII©µîÔ©SM>ÖÔ©S±yóflß¾C† ©•Dûûû#=="AQQ’““ŠÌÌLk»'Nà7Þ°¹ÿ   899!##úîÂ… èÚµ«u¹&Q @ß¾}ñÃ?àðáÃÖqà1™ªç7¾råJ½Ç”Êú_ÃM=¿=zô¨w.Ïœ9Óèþûçîf_¯¡Ë5àç÷¯bí}'‘±·è–«©Ì Š.T!ó`1R?ÏÅ¡7.a×sé(½¬op»±ïEâw_÷Ç3‡bò¿bpßÒžülÂïñF—î.P𪋈¨SáÇ>5‹B¡À˜1c°eË”––Â`0ÀÙÙnnnÖ6ååå€ÿú¯ÿB\\¶mÛ†œœ|óÍ7xíµ×¬íJJJðÉ'ŸØ]3f ŠŠŠ°xñbÌš5«V“&MB||<²²²ššŠ±cÇâÃ?ÄôéÓñÊ+¯ -- iii˜7o²²²jm[Ÿ³³3žxâ üñÄÅ‹‘––†W_}Ó¦M«÷¼ €¤¤$lݺçÎC¯^½ðì³ÏâèÑ£6Ï“··7àóÏ?Gii)þö·¿µØù€¹sçbÁ‚سg pàÀ,Y²¤IwÛí»Æ^¯–”s¢ûâ2ðÅçòy.ô¥&eTÝ’c5Õ‰—ñÅÃiøìŽØ<å4öþONþ3%™UðìªFcSûõvƒ{àÌ[DD°@Qgw#cl7lØ ‘‘‘¢V«¥OŸ>²mÛ612räHñðð“É$‰‰‰%îîîrûí·Krr²u pcãšEDæÌ™#õ ”•––Ê3Ï<#>>>âçç'sæÌN'UUU2þ| ///™:uªÙŒO¤z úôéÓÅÏÏOBBB䥗^’ÊÊJ›±\¯¨¨H–/_.‘‘‘’™™i³MBB‚x{{Kdd¤lÛ¶­Þ˜íš1Ôu—íßëc2›ÍòÎ;ïHdd¤xyyÉØ±ceÛ¶mÐèþí»Æ^¯¦hèýd¬0ËÉõ¹òÅøêqÌŸ ;V=žyðQùtø19¼ìR“ÓŠ£äÒÉÅýErr}®üðöeÙ3ÿ‚䜰=¾¾Æ™/µr|Õ5¹°·PòÏêÄ 3µH>kÖ¬AŸ>}ššŠE‹aîܹ­‹M\9R†“ër‘ýC) T@Ìöß”\ªBÊê\TQUh‚NkDU‘•&T•˜ðŸqÝÑïÉ»ûèvGøDjआG°!ÎpRsÄ9“m""¢vhÁ‚¨¨¨À„  ÕjY³fá¹çžsth¨8§ÂÖgQp®P*Ð@¢]C—kÄéMZ¸8ÃÕW¯.ìW_Üüá×Û­Áí»ól¡g@DDtóØœˆ¨“c7rjIyyyØ·à"t'( t,MH´À#D©;û7Þˆˆ¨íc7r"""jY¡OWbxì`\;VŽ+ÉeÈ‘øDj0àé èK͸z¤ ÙÉ¥¸ô} *´F@ ˆE`Ô™¡ötrt¸DDD7É6ujþþþXºti£í, Z!¢ŽÏ¥‹zŽöFÏÑÞ€’¬*dÿX†Ò+z¨Üx[›ˆˆ:~£Q§vþüy(¿ÍݬP(°nÝ:ÄÄÄÀ××Ë–-Œ1ls?Z­·>àÈ«‡ýž ÀíÿÓ J'ûóhµ'L¶‰ˆˆêøê«¯ðã?bÙ²eX¸p! ‘œœ ÈÉɱ¹MJJ zöì‰ àâÅ‹­.µAL¶‰ˆˆê˜;w.¼½½1sæL@aaa£ÛŒ=LJ››îºë.<òÈ#سg,K£ÛQÇÃd›ˆˆ¨ŽÐÐP€³³s³·[²d 2220}út¼þú눉‰ÁåË—oE˜DDDÔ†1Ù&""ªC©¼¹¯ÇÜÜ\œ:u ÙÙÙŒ/¾øþþþ­%9§þ"""j‚ððpŒ9!!!(++«÷ø—_~‰·ß~/¼ð6lصZí€(‰ˆˆ¨­`²MDDZTTDĺ|ý¿ë.:tÈî~yäLž<¹å$""¢v‰ÝȉˆˆZ@s‹©QÇÆd›ˆˆˆˆˆˆ¨…1Ù&""""""jaL¶‰ˆˆˆˆˆˆZ“m""""""¢Æd›ˆˆˆˆˆˆ¨…1Ù&""""""jaœg›ˆˆ)))Ž:ƒÁà興ˆÚ&ÛDD\—.]qt(Ô¨T*øúú:: """‡S¯®ˆˆˆˆˆˆˆZÒ&ŽÙ&""""""jaL¶‰ˆˆˆˆˆˆZ“m""""""¢öÿ¾ŽÄÃ7NÂIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilter__spatial_1_1pkfilter__spatial-members.html0000644000113200011300000002424312647637662030401 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkfilter_spatial.pkfilter_spatial Member List

This is the complete list of members for qgis.pktools.pkfilter_spatial.pkfilter_spatial, including all inherited members.

cliName (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatial
defineCharacteristics (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatial
DIM (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
EXTRA (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
group (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatial
INPUT (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
METHOD (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
METHOD_OPTIONS (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
name (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatial
NODATA (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
OUTPUT (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
PADDING (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
PADDING_OPTIONS (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
processAlgorithm (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatial
RTYPE (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
TYPE (defined in qgis.pktools.pkfilter_spatial.pkfilter_spatial)qgis.pktools.pkfilter_spatial.pkfilter_spatialstatic
pktools-2.6.6/doc/html/md_examples_pksetmask.html0000644000113200011300000001414512647637662017132 00000000000000 pktools: examples_pksetmask
pktools  2.6.6
Processing Kernel for geospatial data
examples_pksetmask

Examples of pksetmask

Using a single mask

With a single mask you can provide as many triples (–operator, –msknodata, –nodata) as you wish. All operators work simultaneously on that mask. Caution: the first operator that tests true will be selected. This is explained in the next example:

pksetmask -i input.tif -m mask.tif --operator='>' --msknodata 0 --nodata 0 --operator='>' --msknodata 10 --nodata 10 -o output.tif

Warning: second operator will never test true as first will supersede!

pksetmask -i input.tif -m mask.tif --operator='>' --msknodata 10 --nodata 10 --operator='>' --msknodata 0 --nodata 1 -output.tif

OK: values above 10 will be 10, values between 0 and 10 will be 1

Using multiple masks

With multiple masks, you can use one triple (–operator, –msknodata, –nodata) for each corresponding mask (following the same order of input). If the number of triples is not equal to the number of masks, then only the first triple is used for all masks simultaneously

pksetmask -i input.tif -m mask1.tif --operator '>' --msknodata 250 --nodata 1 -m mask2.tif --operator '>' --msknodata 100 --nodata 2 -o output.tif

If mask1.tif is above 250, the output will be 1. If mask2 is above 100, the output will be 2. If both operators test true, the first will supersede (output will be 1)

pksetmask -i input.tif -m mask1.tif -m mask2.tif --operator '>' --msknodata 250 --nodata 1 -o output.tif

If either mask1.tif or mask2.tif is above 250, the output will be 1

More examples

pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte --msknodata 0 -nodata 255

copy pixel values from input.tif to output.tif, applying mask.tif, setting all values to 255 where mask is 0.

pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte --msknodata 1 -nodata 255 --operator '!'

copy values from input.tif to output.tif, but set all values to 255 if mask is not 1

pksetmask -i input.tif -m mask1.tif -m mask2.tif -o output.tif -ot Byte --msknodata 0 -nodata 255

Application of two masks. Copy pixel values from input.tif to output.tif, setting all values to 255 where either mask is 0.

pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte --msknodata 0 --msknodata 1 -nodata 255 -nodata 255

copy pixel values from input.tif to output.tif, applying single masks, setting all values to 255 where mask is either 0 or 1.

pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask__inherit__graph.md50000644000113200011300000000004012616110566026455 00000000000000fd4e090bd4f6765f6023ca57d131081dpktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem__inherit__graph.md50000644000113200011300000000004012616110566027265 00000000000000cbf52a07ff8eed0ceac70d0be39a651epktools-2.6.6/doc/html/classImgRasterGdal.html0000644000113200011300000006007712647637662016272 00000000000000 pktools: ImgRasterGdal Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for ImgRasterGdal:
Collaboration diagram for ImgRasterGdal:

Public Member Functions

virtual void close (void)
 
std::string getFileName () const
 
int nrOfCol (void) const
 
int nrOfRow (void) const
 
int nrOfBand (void) const
 
bool isGeoRef () const
 
std::string getProjection (void) const
 
std::string getProjectionRef (void) const
 
std::string getGeoTransform () const
 
void getGeoTransform (double *gt) const
 
bool getBoundingBox (double &ulx, double &uly, double &lrx, double &lry) const
 
bool getCenterPos (double &x, double &y) const
 
double getUlx () const
 
double getUly () const
 
double getLrx () const
 
double getLry () const
 
int getNoDataValues (std::vector< double > &noDataValues) const
 
bool isNoData (double value) const
 
int pushNoDataValue (double noDataValue)
 
int setNoData (const std::vector< double > nodata)
 
CPLErr GDALSetNoDataValue (double noDataValue, int band=0)
 
bool covers (double x, double y) const
 
bool covers (double ulx, double uly, double lrx, double lry) const
 
bool geo2image (double x, double y, double &i, double &j) const
 
bool image2geo (double i, double j, double &x, double &y) const
 
double getDeltaX (void) const
 
double getDeltaY (void) const
 
GDALDataType getDataType (int band=0) const
 
GDALRasterBand * getRasterBand (int band=0)
 
GDALColorTable * getColorTable (int band=0) const
 
std::string getDriverDescription () const
 
std::string getImageType () const
 
std::string getInterleave () const
 
std::string getCompression () const
 
GDALDataset * getDataset ()
 
char ** getMetadata ()
 
char ** getMetadata () const
 
void getMetadata (std::list< std::string > &metadata) const
 
std::string getDescription () const
 
std::string getMetadataItem () const
 
std::string getImageDescription () const
 

Protected Attributes

std::string m_filename
 
GDALDataset * m_gds
 
int m_ncol
 
int m_nrow
 
int m_nband
 
double m_gt [6]
 
std::vector< double > m_noDataValues
 

Friends

class ImgReaderGdal
 
class ImgWriterGdal
 

Detailed Description

Definition at line 35 of file ImgRasterGdal.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/structsvm__problem__coll__graph.map0000644000113200011300000000023212616110567020756 00000000000000 pktools-2.6.6/doc/html/classImgRasterGdal__coll__graph.png0000644000113200011300000002263012647437044020563 00000000000000‰PNG  IHDR%Ýr³óàbKGDÿÿÿ ½§“ IDATxœíÝ{@WÞ7ð“„P.&á~‘€"X­øVíVÛªO-v»X­-¢õZÔÚöi«X骰ïâVE¥«°ˆbW°(Ú¢kѶXª•r§D!@ r#sž?¦›'BPÂ$„ßç¯Épræ7'ù2—Ì$4Œ1P‚nêE oPòu oPòuÚ år¹©JåØlö¬Y³L]^äM.—{xxØÛÛ›ªšQ«³³³¡¡ÁÔU€aÇèóxìØ±<Ï$¥Œfð)è(ÇoPòu oPòu†7o5554íÉþ:Ä·n¸û£òV[[Ëår‡ÞÏãrppøøã‡Þ¾úÕ?FÈAmmmCïçqq¹Ü={ö ½}õ«4;oçÏŸŸ2e ›ÍöõõMMME‘WE¸¸¸ „Ôju\\Ü„ ÆŒóÜsÏýòË/ä³´÷Íúì§¥¥¥ ·iÓ¦žž„Pnnî´iÓ8Ž«««æß¹š~z{{£££½¼¼x<Þ[o½ÕÑÑñÄõ“}^¹rÅËË+%%ES'FKKK›4i’““Ó¾}ûBã„„„ÀÀÀ±cÇΛ7/77WçΧH$"W „ÂZòóó›››±~R©ÔÚÚ:!!¡©©)99™Á`H¥R¡P¨éçàÁƒ|>?;;»±±ñÂ… nnnäŸ:::’’’È6šiò‰óæÍ«®®.,,ôóóÛ¾}»D"a±Xk×®mhh8yò$B¨¥¥Åðrãââ‚‚‚JKKËÊÊfΜ¹uëÖ'®Ÿœ^¸pá÷ß_\\¬™Zºt©X,NJJBµµµ%%%¹»»÷Ýw"‘èòåË~~~}óÆ«V­âñx†”ÔÜÜœŸŸ?`30Ò=^ÞÚÛÛ™LæþýûÅb1A]]]jµZûý:a„””Mû'Nôyj#ŸXZZJ>LOO?~¼B¡¨ªª’J¥jµúÚµk!¡Phx¹'NÌÎÎ&;©¬¬ÔL?AýÚ%iÏG‘yP*•dI“'ONKKÓô|êÔ)²±L&ûúë¯g̘1mÚ´ÄÄÄ®®.ã©y%oÒÑÑ1??¿°°ÐÃÃã…^øñÇéôGz¨¯¯úé§5§L™2`ŸþþþäD@@@SS‹Åª®® ™>}zJJÊ`–{ïÞ=M'“&MZ¼xñׯ©¤ÿLr[Íd2ɇwîÜ™ÉÍB¨ººÚÛÛ[&“-[¶,22²¨¨èðáÃY®››[]]9]\\¼{÷î'®Ÿ¤ •¶>ÉôööÖ^»ªª*„Ç ¼~ýzAAáÃH0:=^Þh4Ú‚ ²²²$‰R©d2™‡ü“T*Emܸ1222''çáÇß}÷Ý®]»È¿vvv=z´ÿ4BhË–-5557oÞüä“OV¯^­P(”J%‹Å’ÉdÑÑÑ¡®®.ËE­\¹ò¯ýkyyyyyù»ï¾{ïÞ½'®ð6oÞ¼mÛ¶K—.µµµ}ÿý÷1114mêÔ©ùùùÙÙÙ·oßž0aÂúõëoݺõXÝ §½s9àñÆ8==] °X¬€€€œœŒ±J¥š={¶Ƹ··7..ÎÏÏÏÖÖöÙgŸ-,,$ÑÿI3qúôi>Ÿ¿eË…B1>xð “““§§çáÇÃÂÂø|¾Îåjú‘Ëå[·nuss³·· ‹ÅO\¿Î:1Æ!¡P¨=­V«ããã½½}HHHNNÇÓ^X,>xð @ ¨««`§ŽßF ÖºäêÕ«|>ŸúØ8¹¹¹žžžS§N%feeÅÆÆþöÛo}šAƒÑ÷¾§>ZZZ*++_|ñÅá(˜¸~ò •––®X±¢¨¨¨§§§°°pçÎëׯïߌN§60zXì[AߥØHwvnÛ¶­§§'44T$ùúú®]»vÆ FéX0‹Í›±r¥ƒÁˆÖ¥ 3òö'i4ZMM©«àIŒ¼¼0rAÞ ŽùæÍÀUÿ—.]òóósttüôÓOÉ9ýo)оÒÿ§Ÿ~Ò<.ئ¤ýaÜ`>歷¾«þBÿýßÿ-‘H²²²B­­­:o)оÒ_*•jº½|ù2ŸÏŒŒ¬­­5ÑšéŸwæ›7}Wý#„®^½Š1V«Õ!¡P¨ó–‚>7h{ðàAtt´‡‡Ç¢E‹òòòÔj5e+¥äm”0ßýIWý“—êk. ÖyKIß•þ111µµµ+W®üûßÿ>iÒ¤úúúaZ ´™oÞ \õßç³l·t^éOjnn®¨¨hhh¶±±1féèa¾yüUÿ:o)Ðט ˆK—.-^¼xÖ¬Yã‚‚‚ýë_&ù¾#0 ™ïõ%QQQÝÝÝ/¿ürww÷+¯¼B~kˆN·µµŠŠ )((ÐÙøìÙ³û÷ïï½÷ÒÓÓY,Ö°•€£îþ•Je`'ÓTàþ€QÂ|÷'‡‰† Œ£.o˜ä ê@Þ ä ê@Þ ä ê@Þ Î#×—Ðh´ÊÊÊÊÊJSU3gÎT!D{ýu(ðÛŽ£Á#×—ttt¨T*VóÄŠÞ^ˆGˆöã2™V¦.çI0™LSW†×#Û·‘ûzçå•Ëå½áòòÖ &üLÁBŽß22nÐé4:~æÌ¯¦®½,!o‰üßÿ®T« µš¸t©\"‘›º"t³„¼åå•ÄG¡/]*7m=èc yËÌüUsÖcœ™ »”ÀLø¼‰D]ׯ µ·oÕ"‘Þû»0¡Ÿ·ÜÜ’>Ÿ\Ñh´ JMUŒø¼9s“ í9Ïœ¹iªz0`dçíþý¶’’úGã†߯¯×ñÃܘÖÈÎÛ¹sÅ †ŽU`0èçÎõý©QLndç-#ã¦JEôŸßÛ«ÎÈ€]J`vFpÞ„Âæššf„tü®"Æä_[¨¯ Ì÷û'„1þÓŸü4Ÿ¼Ý½ÛŠ?þon¥Ñ¹s`9oÊ N „W™ºôÁû“Œ87¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨y€:7¨Ã0zr¹¼½½ÝèÝÈÆ††jll¤~ÑNNNl6{ˆ˜jÜÀÑét>ŸO§jÓEÃwñ•••---ÆíÓÌñùüÀÀÀ!v2 ÇÍbñx¼Á´4þö cÌãñ‚‚‚ŒÞ³yª¨¨0Êÿ¬Ñ6nãêÕ«ƒÀñÔ¼@ÈÔ¼@‘‘·ššfn]™¿½²[¼Îöæ6f”·ÚÚZ.—;ܽ988|üñÇÆZŠ90ÿrG43ÊAmmmÃÝ—Ëݳg±–bŒ;næ¿ÜÍdy;þü”)SØl¶¯¯ojj*BhÖ¬Y!„Z­Ž‹‹›0a˜1cž{î¹_~ù…|–öîö´áÞÈ–W®\ñòòJIIÑ<‹F£¥¥¥Mš4ÉÉÉiß¾}!ŒqBBB``àØ±cçÍ›—››kV{#ȨãúÑG‘3 …££ã… B*•*22ÒÙÙ™ÏçGFFªTªÞÞÞèèh///÷Ö[outtôY.B¨££cõêÕ\.×ÃÃcëÖ­r¹\{Øúé§>+"‰zzz´çè+^_ÏýW !”––&x<Þ¦M›úôß½ ×3,°±•—————n#•J­­­ššš’““ †T* …šz<Èçó³³³/\¸àææFþ©££#))‰l£™°7rzáÂ…ßÿ}qq±f>BhéÒ¥b±8)) !ÔÖÖ–””äîîþÝw߉D¢Ë—/ûùù 8DƒYßÁ ~ÜNŸ>íååEÆ8''ÇÍÍM¥RaŒ÷îÝ»dÉ’û÷ï—––oß¾=...((¨´´´¬¬læÌ™[·nÅÿUMmáááóçÏ¿sçNiiéäÉ“cbb´‡]*•jZÞ¸qcÕªU<¯±±Q{íô¯¯gòYširbÞ¼yÕÕÕ………~~~Û·o×nÙ½´—~ùòe2‡µµµõÂåçç777²±iòÖÞÞÎd2÷ïß/‹ ‚èêêR«ÕÚC3a„””Mû'Nxߨ9]ZZŠ}— „òóó1ÆJ¥!$ 'Ožœ––¦éùÔ©Sf•7ãŽ[ww·­­í70Æo¾ùfTT9?  ©©‰œ¾|ùòÓO?=qâÄììlrNee%9­½\¥Riee¥©?;;ÛÏÏO{Ø1Æ2™ì믿ž1cÆ´iÓ»ººúÔ£³x=“súäM³¸ôôôñãÇk·ì¿^} xðàAtt´‡‡Ç¢E‹òòòÔjµ¾¡Ó6ò†1þé§Ÿ–.]jkk;gΜ‹/âG_?›ââbMãß~ûÍðûÞpoä´R©ÄýòvûömÍ´P(´±±)))Ñt«½1âúÈ$ã¶|ùòmÛ¶I¥R[[ÛêêjrfŸk¯íííÙlvYYYŸçj/·¾¾!$“Éȇ¥¥¥l6[{ØÉ­ÇªU«~ùår‹ÚŸÎâ ôLΩ®®ÖΛ¦eIIIŸ–ý×KgJ¥2##cöìÙ&L¸ÿ¾Ñ#=VÞLsü&“É‚8sæL{{ûºuë-ZÔçÒxŸ’’ÍÃŠŠŠ¡ôFb2™ýgö¹¬ÛÛÛ[{YUUUƒ\#jwÜBaaa™™™çΛ>}º¿¿?9“Ëå …Bòý!‹ ÝÜÜêêêÈ¿ïÞ½»O?ÎÎÎVVVµµµäÃ;w»“Óä°óx¼ÀÀÀëׯ‡ýé,Þ@Ͻ½½¡hwB !T]]ííí­ý§þ륳ŒæææŠŠŠ†††àà`mžÜ s9xƒù?-“ÉØlvff¦H$úç?ÿÉf³e29RänÆçŸÎçó¿ù曦¦¦o¿ýÖ××é?°7»ø?Û4íé/¿üÒÃÃ#//¯µµõÊ•+'N¤ÑhC_ßÁ ~Ü0Æäií¹÷ßéÒ¥uuu%%%3gÎ|÷Ýw£££§L™RVVVVVöÜsϽýöÛø?#©Ù-\¾|ùüùókkkËÊÊ‚‚‚víÚÕçc\VV¶aÃ.—»nݺ_ýµÏÚé+¾Ï"‘!”œœÜÙÙ¹xñb¤µ}{饗„Bá7üýý?ýôSíú¯—öÒÕju^^^hh¨»»û®]»ûì³ä¿"¬?9†{|ÞÔju||¼@ °·· ÉÉÉáñxFYß™dÜ0ÆvvvÚç3$Éš5kÇÑÝÝ-—Ë·nÝêææfoo&‹û,cÜÞÞ¾råÊqãÆ¹ºº~øá‡šýWA,íããÃçó·lÙ¢P(´kè¿^ÚKÏÌÌœ5kVZZšB¡ðUÐöXy3þýoänÀ½¯$77×ÓÓsêÔ©äì¬¬ØØXò@Bc­ïˆ·'@A †ñï{2*•JçÇ€®^½ÈçóÓØŒ>ï6¥¥¥+V¬(**êéé),,ܹsçúõëM]”e¢Óéæ6¤çðÞèÌh…ÍÁ¶mÛzzzBCCE"‘¯¯ïÚµk7lØ`ꢀ值=‚Á`ÄÆÆÆÆÆšº`™`ê@Þ ä ê@Þ ä êÿü$Fkii¹zõªÑ{<µ„~ÿ3ŽórÇOMÁâùY§aæ0nC'«³j»`íºJfegäë(ÌÙào’4þõ%2™L*•·ÏÇ®A¤Î[ÙHgÒþô÷)ëá^œÝÐ/l5‡q¢†üž[ûÛ±¿’áÎ;ŠvÆg²ï37„›YŒ1fXÓ^9âï<ÕÎÔY:ŒŠþÙt+© aÄá2Ãóž2uAfÊ2ÿ Ñ­hÖöV!µ ]Ø(lüµËÔY²^qiË¢¤&„Nã?ekêŠÌ—eæ !dËc"„0Õ½ø»÷jšnì]5³ÕݬüfÕïõr?‰FG¼ Ž©‹2_–›7W"b Dôâoß6AäŒLTÙ“½â÷Î{ ¢÷£¢s'AÞô²Ø¼Ù9³èVœ5Â"Ô8z–ònÓVeIê®vœ_w[Ù©Ö„y3ÀbóÆá1µW«Q¯ _Ø(U ÿwž·›.o­%T˜P?6—ɶ‡‹àõ²Ø¼Ùò˜¸÷‘9XÕ œ»±ZT ‘{r„ _û۽ߒ"ŒúœÛ¦Ño2œ,1ÄbóÆá31Ñ÷£L`µçn¨ný"÷„®l¯­>×®óc$º;“†XlÞÈó“ýa«eDÞÿÔ`‚âŠ,„ƒ¯ Ž4ÇÆÚÔ*Ì €¼b±yãèÊN£Y!'Æ´u®4‹]õáõÌf·eÙn3Æ „P¿ÐÁ‡†Yì¡­õX†‹¦Vþ±ÛC£Ó0ÆŽ¾ìÿ·ÙÍk¶=„m(ÆzZ/<äw;§í—Ï”RB³ßÎá2ÙûŽ2 K~ß±™!:ƒ†hÈa¼57€3ã7ïç!lÆ€Qõ¹¶±ìik]è :IC4Ä „“%°ä·ž3!Ä à„|.XšhËgxÐçü5x2w.‰›K¥³?ñœ¾ÉuYv Ç¬±ÃÎäÀ,ózeRëï=j¡¹X¹óž<óõªÙŸxM gÚÂF:UqfI…û¬±/Dÿ߆7—vÛ{[Ço†YòöÀѾ3ÀÞ›=á/ã~Mhì•Á©É!)N~¨’3Þsמé<ÅÂ6 KÎ[Ó7¸*¥ê²S-¦.dë¼'/Mk^ïjãézl£+o.sJ¸sIJ³¬]5pk KÁÞ{/vPÏÔ…ŒH£+o¡)«œ™6ôß’šº‘ #?™ù»ÎÏ»Á€,ù|‰>wÿÝaÃe¸< 7}ªÆ¼`*£n‚¼@ÈÔ¼@È"z1Ü gÀïß´ì©7ub´çèÅ9«oWž ëR0Æ+V¬°³³CÕÔÔ_­™0grqïϰl­¨\(M‹Ï[o½% é:tè»»;Aüß¿UŒ±··÷—_~©³ýð½4£=otÍcæØ_>輯¾¥466¦¥¥UVV"„>þøãá[–qÝüª‘ɱšö¶ Å˽~ýzSSSCCÃñãÇ%IpppGG‡¾Æµµµ\.×@o¯¿þúǯ_¿®™STTT__¿téRc=£=o¡éï¸:ú²¿ºÛç{ÝŒH&“!„¼¼¼B\.wÏž=ô ãUtßÎiñž;ƒMõû„Ç㹸¸¸»»Ï;÷ìÙ³¾¾¾ñññúÑÖÖf 7ggçùóçgddhædgg?ÿüó®®®Æ,z oˆnE›³Ã»ýެü_ƒºŽ™F£;vlÒ¤I<oÏž=©©©ãÇ···ß¹s§¾§Ìš5 !äââ‚ô쫨TªÈÈHggg>Ÿ©R©È¥¥¥Mš4ÉÉÉiß¾}dËÜÜÜiÓ¦q8WWWMn,Igÿ†aì©w™6Fâ8ôз:«W¯ær¹[·n•Ëå:Ÿ¸qãÆ .èíáÕ7Daaa™™™jõ¿—”ýÆohOÒ~±´§uŽçùóç§L™Âf³}}}SSSõ +Àc\|üáÑE-åݶ$_<‰DrôèQ„вeË$Ibb"B¨µµUçS„B¡f¨5ÓÚ3÷îÝ»dÉ’û÷ï—––oß¾\ÐÒ¥KÅbqRRB¨­­M"‘°X¬µk×644œZ8ïÚ´…eòN•ᆡ¢¢"Œ±R©ì3Ýç]¢1`ÞšššÈéË—/?ýôÓä‚òóóµ;W(UUUR©T­V_»vM³ÄKÒÙ¿ªõÉ¥?þãž±F@çê(•J++«òòr²Avv¶ŸŸ6˜7# =’ú†c¼xñâÍ›7cŒwïÞ=oÞ<íÌ[ÿñloog2™û÷ï‹ÅAtuu©Õêþƒ·0ý Íþ«WΪۭU2÷™c ·3f BˆÉdö™~buuuÚÇöööä„›››vç,«ººúí·ß–J¥Ó¦M|IúúׇaCŸ³Ã‹?Eï÷‘<ÙôYææfµZ-ȇ~~~ :Ÿ( ÉfF€d AXXØ{ï½÷ùçŸgggGDD ؾ¬u¥qÿñtttÌÏÏÿì³Ï¢££ƒƒƒ£¢¢.\¨» Ñ« lƒ´þeê›îcÀ훇‡‡æ¹b±¸ªªJgç===ÖÖÖ999Aç`4Û7Ã%éìÿ‰=ÁèlInß***È™gÏžýû!bΜ9»víÂëí‘Ô7Dãîîn;;»'N0 r'sÀÉ •J…1ÎÏÏ7ðzõôôüðÃc…B‘’’beeEî0÷çKaÅ2Íb¯½öZTTÔ½{÷JKKCBB¾úê+Í …R©d±X2™,::!ÔÕ5¨Ÿ¶dÿc2™o¼ñÆûï¿÷îÝòòò;v„‡‡“‰D>|ðàÁµk×/^|÷îÝ>úò×a 4àp8¡¡¡|ðÁ¼yóx¼?î—5<¤¡¯¿þZ"‘|ñÅšùýÇ“F£-X° ++K"‘(•J&“Éáèúö¤Çù¿0ží›D"Y³f££ã¸qã"""º»»õu~ðàA'''OOÏLJ……ñùüÁ”¤³*G@_Ëööö•+WŽ7ÎÕÕõÃ?”ÉdøÑÄ<==ÃÃÛ››5ýô•J5{öl;;;} 4Ͻxñ"BèèÑ£Ú…õo¯ýÒÄÆÆ:88‚œœïWzzº@ `±X999:î€:°? u oxÜßþ¦é1L呲[Œ±¯3rG€7CÄwä7ÕŒ/2pôbæ®îª»öÿï ½Ÿ‘;€¼â(`ÏŽò¼y¨±$¥ÙÔµ ¯û?vÞ»ÚéâdêB,|Þ=€€×¸˜@?í¹¯VÁT_ÞJ µÿ¼¿Ág®Ã€ôƒ!‚¼ lÒR.Ž~üÇ}DCÁo[`äÊN5÷´©þœèoêB,ämP^ãªdDa|ƒ“>uµ³©Ë1¦îUqòéo9Û¹°L]‹åƒ¼ ÖSá|šªû¾ã©p>i9gÛn|ñ€íȘ²Ê¢þ‰˜-ø¼ûñ`YÒÏ5v5*3B+æþÃÇ÷¿úÞä†äm´ë¼'·÷f›ºŠÑòu,hß³y*¹¸·*«ÕÔU€‘ò6T ¿H öÔ_ûÛ½^|k,¿A}AgþŽ:5ÏxG_8÷ô‚í›x>gÿzV ‡Ë<^5È/Õ3¡v¡ 6Ŧbcê,ÓÆJð²£JFÜJh’Ô+Ügޱb™ãÿ2U:gÕmU—Jš„9¾'F(:ƒ6óÜ_ŽÔÿ$i­ì1u9ºýz¸‰Pc¸šÄTàøÍø”ÝjŠàbÚ…²³á¿?·Ý3à5Cß¶†lߌÏ<Æ0*ØS?.Àfb(„Íd o£EíeñÃé³[=-éúÏÆž"„·Ý–™j骢𳿅NÎú¿2PòF‘;ߊϮø½0¾AÕc‚sñâZV£ïºQ¿h  ΗP£ß¿i½ùe£›öìGžãÿËâå«•ØTß 4 o”RJÕ·Ž4Udˆœ§ÚÎŽòtؘº"@)È› 4—tì¹ßQ'Ÿ¶ÞuÚ:ªª˜äÍ45®Ì©•x*|ô<š@Þ–™™Iþx':6›ýÕW_‘?e> Á÷ ,##£¤¤$((ÈÔ…X‚ÜÜÜ•+WBÞ€!AAAäƒ!ºzõª©K0%øü ê@Þ ä ê@Þ œ/1š¹sçž}zåÊ•ûöí“Ëå‡F‘aCeff655%&&8p ¨¨èøñãäüŒŒŒíÛ·ûøø466úøø3ÉE³X,777„PVVVzzzDDDjjêÊ•+ôUBݰŽp°}.o¼ñ‡ÃY°`A\\ÜòåË9NHHȺºº²²²6nÜøÌ3Ï „¦OŸ¾fÍšØØXòYëׯ×ô`ccsäÈršÅb%''óù|kkk>Ÿêîî¶²²Â“ yñÅ­­­û”ñí·ßÆÇÇ;99ñùü 6$$$¼òÊ+¡ˆˆ__ß¶¶6Œ1›ýÇwÔ’"åççŸ;wnãÆsæÌA7.""âÓO?ÕYÉð ¡‚¼ ‡ƒb0}¦BãÇ×´Ôl^Bš3œ …âØ±cûöí#·~ £¡¡aÿþý2™Ìßÿþ3fL|||ffæñãÇ'L˜°|ùò™3gö)ãáÇK–,Ñ<Ôì’W0:99±X¬††²OrŸ¶««ëÕW_E‰D"í³£¾¾¾ú*ƒy3ggç»wï’o_„ΓÖÖÖ!!!¹¹¹c¦P(bbbbbbž}öY•Jõí·ß"„ A111½½½W®\ùä“O¾ùæ›>ýØÛÛÇÇÇ“–J¥íííä|2ü4-88877÷Ã?Ô !4gΜ¤¤¤æææÚÚÚmÛ¶õäúõë/]º”˜˜X[[[SSsâĉÜÜ\2¯¾úê‘#G ÚÛÛoܸqìØ1}• ×HYؾ™@hh¨Z­Žïìì Ú¸qc\\\ÿf<ÃáH$‡cgg·iÓ¦ØØX›åË—ÏŸ?Û¶mgÏžŠŠJLLliiqss‹ŽŽf±X...O=õÔ’%K.^¼ˆZ·nÝ¡C‡Þ~ûmöüóÏoذ<÷¨!¾øâ‹„„„sçÎq¹Ügžyæ‹/¾x÷ÝwÉ:U*Õ‘#GÚÚÚÁÎ;ßyç•:tˆš¡éà~Ó-[¶L$ñ~œŸþ™ÏçköÓ~øá‡ÔÔÔ¤¤$cõoÎæÎ›žž¾lÙ2Sb°?iµµµ»wï … …¢²²òرcþóŸM] ìOšÀ›o¾)—ËwìØÑÑÑáêêºpáÂE‹™º(@È› XYY­[·nݺu¦.P ö' ä ê@Þ ä êÀù’AillÌÍÍ5u`ă¼ ÌÓÓóÌ™30u!–ÀÊÊj(_91ÒÁõ%PŽß ä ê@Þ ä êü/„È!¬5aUFIEND®B`‚pktools-2.6.6/doc/html/pkreclass_8py_source.html0000644000113200011300000007706612647637661016733 00000000000000 pktools: /home/kempenep/pktools/qgis/pkreclass.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkreclass.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkreclass.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkreclass(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  CLASS = "CLASS"
43  BAND = "BAND"
44  RECLASS = "RECLASS"
45  MASK = "MASK"
46  MSKNODATA = "MSKNODATA"
47  NODATA = "NODATA"
48  RTYPE = 'RTYPE'
49  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
50  EXTRA = 'EXTRA'
51 
52  def cliName(self):
53  return "pkreclass"
54 
55  def defineCharacteristics(self):
56  self.name = "reclass raster datasets"
57  self.group = "[pktools] raster"
58  self.addParameter(ParameterMultipleInput(self.INPUT, 'Input layer raster data set',ParameterMultipleInput.TYPE_RASTER))
59  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
60  self.addParameter(ParameterString(self.BAND, "Band index(es) to replace, e.g., 0;1;2 (other bands are copied to output)", '0'))
61  self.addParameter(ParameterRaster(self.MASK, "Mask raster dataset",optional=True))
62  self.addParameter(ParameterString(self.MSKNODATA, "Mask value(s) not to consider for classification (e.g., 0;255)","0"))
63  self.addParameter(ParameterString(self.CLASS, "list of classes to reclass, in combination with reclass option, e.g., 0;1;2;3",""))
64  self.addParameter(ParameterString(self.RECLASS, "list of recoded classes, in combination with class option e.g., 10;11;12;13",""))
65  self.addParameter(ParameterNumber(self.NODATA, "nodata value to put in image if not valid",0,None,0))
66 
67  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
68  self.addParameter(ParameterString(self.EXTRA,
69  'Additional parameters', '-of GTiff', optional=True))
70 
71  def processAlgorithm(self, progress):
72  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
73  commands = [cliPath]
74 
75  input=self.getParameterValue(self.INPUT)
76  commands.append('-i')
77  commands.append('"' + input + '"')
78 
79  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
80  commands.append('-ot')
81  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
82 
83  output=self.getOutputValue(self.OUTPUT)
84  commands.append("-o")
85  commands.append('"' + output + '"')
86 
87  commands.append('-nodata')
88  commands.append(str(self.getParameterValue(self.NODATA)))
89 
90  band=str(self.getParameterValue(self.BAND))
91  if band != '':
92  bandValues = band.split(';')
93  for bandValue in bandValues:
94  commands.append('-b')
95  commands.append(bandValue)
96 
97  theclass=str(self.getParameterValue(self.CLASS))
98  if theclass != '':
99  classValues = theclass.split(';')
100  for classValue in classValues:
101  commands.append('-c')
102  commands.append(classValue)
103  reclass=str(self.getParameterValue(self.RECLASS))
104  if reclass != '':
105  reclassValues = reclass.split(';')
106  for reclassValue in reclassValues:
107  commands.append('-r')
108  commands.append(reclassValue)
109 
110  mask = str(self.getParameterValue(self.MASK))
111  if mask != "None":
112  commands.append('-m')
113  commands.append(mask)
114  msknodata=str(self.getParameterValue(self.MSKNODATA))
115  msknodataValues = msknodata.split(';')
116  for msknodataValue in msknodataValues:
117  commands.append('-msknodata')
118  commands.append(msknodataValue)
119 
120  extra = str(self.getParameterValue(self.EXTRA))
121  if len(extra) > 0:
122  commands.append(extra)
123 
124  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/dir_4dfaa1fe1382d1276d1c80b1d5035ade_dep.png0000644000113200011300000000613712616110567020537 00000000000000‰PNG  IHDRðѳOŸbKGDÿÿÿ ½§“ IDATxœíÝ{T”eð/+PB€‚ ¨ 2À@‰„£¬íTËq=Û±£‚©´*id‚7ÔPÌ1q“Ìã]ÌK«@™·eESó²»xÄû•6q¬¸ òì»Í2Ãp›™¾ŸsæœyŸ÷yžß3¯~á}8Ã`&„ ")ýÎØ ¢–c€‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰1ÀDc€‰$ÆIŒ&’L$1˜Hbæ­üõ×_cÛ¶mmµ¢N'44ãÇoñx³Öü>pPPΜù|}ý[¼¢ÎêâÅóxùå—œœÜâ9Zõ|}ý±aîÖNCÔ鄇OkõÜIŒ&’L$1˜Hb 0‘ÄàN ?ÿ.† s7ö2¨0À@mm-~þYmìeP;`€;ˆÚÚZ$$lG@Àpøø¸`üø¤§ŸBa±cÇ+¼Jjk­~#™†ää/±qc¢£?Å!þ¸yó*""föí;Š×^óùs·Œ¼JjküÜAìÞ½ ‘‘Ëð'89õÄ«¯þ ,5ö²¨1ÀD~þ]x{ûhµ)•/i5d( pѳgode]×jËÎÎ2ÒjÈP¸î '#6V[ ì‡ÌÌkøä“µú”——ÁÊÊÚH+¤öÀw3f„áÉ“DGGááÃb(•Ï#2òcÌ;}ûºÂÏo†÷µkùÆ^*µ!¸ƒ07·@XØB„…-Ô´Ý»— èÒÅII©ÆZµ#î‰$ÆIŒîÀúõsCNßBÙ‘1ÀDc€‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰1ÀDc€‰$ÆIŒ&’L$1˜Hb 0‘Ä ö‘:‰œ~°8u| …*ÕjƒÔ2X€âáç7}ú¸ª$‘Áä#!!¾ã>ø`Þz+È%‰ jÿþd„„L0X=î‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰1ÀDc€‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰™d€ssïÀÞÞ¬Uãšš£%5š;æ·þuÇ !Œ¾}Ÿkð¸=´ôz¶%{{3­‡³sWŒõ®]»¬×xSx ¦È$ÜRvvÝ0g·Æ^F=u×UTô#RR‘ž~³Áãö®oLiiÿDVV!²² qöìU( ™!„±—&-ƒ~"G{spèa°2iŽºëª¨¨ôíëÚàq{×7&G89õ89õÂòåŸ@©ì‰ââptt2òêädÒßSRáë«€‡‡#""f¢¢¢¼Þ­”>·ÍOž<Á† kàïï Œõ.\8×`ÍßæHM=%<=9UUUZý„øè£xå•!xø°Xgºë P*{5x¬‹»vmňÏÃÕÕcƼ†´´ÃõnÓõ½.MÍYSSƒÕ«Uðñq…‡‡#fÎü3~ùågÐyN_°´´„­­¦­ººË–-„RÙžžNX¶l!ª««ëÕÕ/-í0~ÿû¡èÝÛ ^^ÎX·îÿ_¼Ž9„‘#ÁÙùY ꆤ¤/›]Û”˜t€w"%åöî=ŒS§¾Ãš5+[4O|üzlÜ•ê/Èȸˆˆ(¨T‹tŽÙ±c3öî=Œ={á»ïþ®õŸ@•jNŸ>ŽýûÃÁ¡‡Þ5ŽMܺUÔà±._}µqqÑXµê3\º”‹ùó— *jžÞס¹snݺ~ƒ¤¤¿áàÁ“¸sç6>ý4¦És)//CYY)ÊÊJQTô#bb–"0p2žyæMŸ-[>ý{y8q"û÷Ç™3'»¬Þ\õ+--Á”)ã0h/.\ÈÆÊ•qX±b1Š‹ ¼¼ Ó¦búôY¸rå.,XŠðð”——5«¶I­(F#rrÔM>ˆ;“„Z-š|ddd âìÙ«š¶;“D¿~4çžî«ë¹Bá)6mÚ­Ucóæ/´æiª¶››»æÜìÙ‹qþü-M]5[WCǺÞÞE||¢VÛöí­WC×µhΜîîJ‘°OÓžž~Ss¬ë\CõÖÖωôô›Zý<<¼DVV¡æøÛo Ÿ!õ^CcýŠŠªÄ¹s™â‡JEqñqøð)ÍõÉÍU ±reœÈË{$>¬ùù%¢¸ø‰Î9õù·©û€^™=zŒ lM…Iï Ís/Öë£Ï@ òáã3D«í…iž×½½ÌÈÈn°vAÁšãK—ÎcäÈW±ví*lÚ´[¯m!//ÞÞµÚ”Êçì«ëºÔ}½Ï>ÛµÑ9óóïi]OOoxzz7yîéjõ×’‘‘ 77w@EE9V­Z†°°=ú/Mßû÷ïÂËËYk=uo±›êgii‰;wncΜ(++Å AC5ç»u뎃ObË–uˆUað`_Ì›·o¼ñÇfÕ6%&} ““]çùm¸¸ôÓ×ÔÔ šœÇÕµ?®_¿¢Õ–•uCó\­šGcµ{kŽ÷ì9„µk·bß¾½8sæ¤^5Ú‚‹K¿zsÞ¾©u¬Ïu©ûzuÍéìÜ÷ïßÕ´_»vYs›¬ëÜÓ5Òµ«&MšŠ¬¬Z_lz ##[36/ïŽK¯7¾±~•• BxøB|ÿýEÄÅmÖŒ©¬¬@mm-vïNAn®ÁÁïbâÄ7ñ葺YµM‰IxéÒäæÞÁ¥Kç±råLš4vvÝII ()ùññ뛜gÚ´÷¡R-DjêüôSŽ?ÒäÞfñâ9Zµƒ‚‚5第¬áî®Äܹ‘˜?ÿ}TUU¶¨FsMŸ> *Õ"œ}«W/‡™™Y‹®KSsN˜ð¢££™y™™×±hQòóï€Îsú²±±Eii ÊÊJ5mo¾9+V,F~þ=ܸqãÇÂçŸoª7¶±~UUUxüø1,--QYYØX ´´fff;6‡}ƒ’’_Q]ýææ°²²jVm“bÊ{à;ö W×þÂÑÑIÌš!ŠŠª„Z-DTT´°³ë& PˆÄÄMî<¨+V¬nnîÂÊÊZøû¿(ŽK×¹^¿þsáâÒO88ôï½. +êíà +„Bá)>üP¥³F[í‹‹Ÿˆ˜˜ÏÄ€ akk'^}”HL< zôpÔûº4gÎÂÂJ¶@ôêÕ[ØÚÚ‰qã&м¼Gÿ{íŸklœ‘‘]¯¶­¸|9OÓvÿþ¯bòäi¢[·îÂÞÞAL™òž(((«÷ë§V ³Vtïn/úôqqq›Å¸q…££“f:`€BXZZ /‘˜x@¯9Mul&ôÙD6"((ee±aî&û*öع3Éäÿ2Cnîøùy4zëgLii‡Ñ§ ¬i;tèÄÅEãÔ©K&3ggöÛ_fÈÉQ7Ù7<|¬­-‘œœÜâz&} MÚnܸŠÐÐ`\¹råÈÈHGLÌGxçé&5'ŽIÿÚlll1uj¨Ñê7õ~߈ˆ(¿…ââèßß ÁÁ!­ZïìÙ‹PQQÞ¦s’á0ÀOqttÂÚµ[V_Ÿ[÷¨¨è6«gnnލ¨è6“ ‡·ÐDc€‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰1ÀDc€‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰ôúãâ¢ñÅÛ Y’È <ø·Aë,Àï¾û^ŸáL$3kk7¼øâË«g°/YÂl!jkÜIŒ&’L$1˜Hb 0‘Ä`"‰1ÀDc€‰$Öª7rtéÒ©©šjßVë!êTÞ~ûíVoÕßÎÍÍÅ… Zµ¢ÎlذapsskñøV˜ˆŒ‹{`"‰1ÀDc€‰$ÆIŒ&’L$1˜Hb 0‘Ä`"‰1ÀDc€‰$ÆIŒ&’˜9€c/‚ˆZæ?«r Sr\IEND®B`‚pktools-2.6.6/doc/html/FileReaderAscii_8h_source.html0000644000113200011300000013755412647637662017516 00000000000000 pktools: /home/kempenep/pktools/src/fileclasses/FileReaderAscii.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
FileReaderAscii.h
1 /**********************************************************************
2 FileReaderAscii.h: class to read ASCII files using (colum based)
3 Copyright (C) 2008-2013 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGREADERASCII_H_
21 #define _IMGREADERASCII_H_
22 
23 #include <string>
24 #include <vector>
25 #include <fstream>
26 #include "base/Optionpk.h"
27 #include <armadillo>
28 
29 //--------------------------------------------------------------------------
31 {
32 public:
33  FileReaderAscii(void);
34  FileReaderAscii(const std::string& filename);
35  FileReaderAscii(const std::string& filename, const char& fieldseparator);
36  ~FileReaderAscii(void);
37  void reset(){m_ifstream.clear();m_ifstream.seekg(0,std::ios::beg);};
38  void open(const std::string& filename);
39  void close(void);
40  void setFieldSeparator(const char& fieldseparator){m_fs=fieldseparator;};
41  void setMinRow(int minRow){m_minRow=minRow;};
42  void setMaxRow(int maxRow){m_maxRow=maxRow;};
43  void setComment(char comment){m_comment=comment;};
44  unsigned int nrOfCol(bool checkCols=false, bool verbose=false);
45  unsigned int nrOfRow(bool checkCols=false, bool verbose=false);
46  template<class T> unsigned int readData(std::vector<std::vector<T> > &dataVector, const std::vector<int> &cols, double scale=1.0, double offset=0.0, bool transpose=false, bool verbose=false);
47  template<class T> unsigned int readData(std::vector<T> &dataVector, int col, double scale=1.0, double offset=0, bool verbose=false);
48 
49  protected:
50  std::string m_filename;
51  std::ifstream m_ifstream;
52  char m_fs;
53  char m_comment;
54  double m_min;
55  double m_max;
56  int m_minRow;
57  int m_maxRow;
58 };
59 
60 template<class T> unsigned int FileReaderAscii::readData(std::vector<T> &dataVector, int col, double scale, double offset, bool verbose){
61  reset();
62  dataVector.clear();
63  int nrow=0;
64  bool withinRange=true;
65  if(m_fs>' '&&m_fs<='~'){//field separator is a regular character (minimum ASCII code is space, maximum ASCII code is tilde)
66  if(verbose)
67  std::cout << "reading csv file " << m_filename << std::endl;
68  std::string csvRecord;
69  while(getline(m_ifstream,csvRecord)){//read a line
70  withinRange=true;
71  if(nrow<m_minRow)
72  withinRange=false;
73  if(m_maxRow>m_minRow)
74  if(nrow>m_maxRow)
75  withinRange=false;
76  if(withinRange){
77  std::istringstream csvstream(csvRecord);
78  std::string item;
79  int ncol=0;
80  bool isComment=false;
81  while(getline(csvstream,item,m_fs)){//read a column
82  if(verbose)
83  std::cout << item << " ";
84  size_t pos=item.find(m_comment);
85  if(pos!=std::string::npos){
86  isComment=true;
87  if(pos>0)
88  item=item.substr(0,pos-1);
89  else
90  break;
91  if(verbose)
92  std::cout << "comment found, string is " << item << std::endl;
93  }
94  if(ncol==col){
95  T value=scale*string2type<T>(item)+offset;
96  if((value>=m_min&&value<=m_max)||m_max<=m_min)
97  dataVector.push_back(value);
98  }
99  ++ncol;
100  if(isComment)
101  break;
102  }
103  if(verbose)
104  std::cout << std::endl;
105  if(dataVector.size()&&ncol<=col){
106  std::ostringstream ess;
107  ess << "Error: different number of cols found in line " << nrow << " (" << ncol << ")" << std::endl;
108  throw(ess.str());
109  }
110  }
111  ++nrow;
112  }
113  assert(dataVector.size());
114  }
115  else{//space or tab delimited fields
116  if(verbose)
117  std::cout << "space or tab delimited fields" << std::endl;
118  std::string spaceRecord;
119  while(!getline(m_ifstream, spaceRecord).eof()){
120  withinRange=true;
121  if(nrow<m_minRow)
122  withinRange=false;
123  if(m_maxRow>m_minRow)
124  if(nrow>m_maxRow)
125  withinRange=false;
126  if(withinRange){
127  if(verbose>1)
128  std::cout << spaceRecord << std::endl;
129  std::istringstream lineStream(spaceRecord);
130  std::string item;
131  int ncol=0;
132  bool isComment=false;
133  while(lineStream >> item){
134  if(verbose)
135  std::cout << item << " ";
136  // std::istringstream itemStream(item);
137  size_t pos=item.find(m_comment);
138  if(pos!=std::string::npos){
139  isComment=true;
140  if(pos>0)
141  item=item.substr(0,pos-1);
142  else
143  break;
144  if(verbose)
145  std::cout << "comment found, string is " << item << std::endl;
146  }
147  T value=scale*string2type<T>(item)+offset;
148  // T value=string2type<T>(item);
149  if(ncol==col){
150  if((value>=m_min&&value<=m_max)||m_max<=m_min)
151  dataVector.push_back(value);
152  }
153  ++ncol;
154  if(isComment)
155  break;
156  }
157  if(verbose>1)
158  std::cout << std::endl;
159  if(verbose)
160  std::cout << "number of columns: " << ncol << std::endl;
161  if(dataVector.size()&&ncol<=col){
162  std::ostringstream ess;
163  ess << "Error: different number of cols found in line " << nrow << " (" << ncol << ")" << std::endl;
164  throw(ess.str());
165  }
166  }
167  ++nrow;
168  }
169  }
170  return dataVector.size();
171 }
172 
173 template<class T> unsigned int FileReaderAscii::readData(std::vector<std::vector<T> > &dataVector, const std::vector<int> &cols, double scale, double offset, bool transpose, bool verbose){
174  reset();
175  dataVector.clear();
176  if(!transpose)
177  dataVector.resize(cols.size());
178  int nrow=0;
179  bool withinRange=true;
180  if(m_fs>' '&&m_fs<='~'){//field separator is a regular character (minimum ASCII code is space, maximum ASCII code is tilde)
181  if(verbose)
182  std::cout << "reading csv file " << m_filename << std::endl;
183  std::string csvRecord;
184  while(getline(m_ifstream,csvRecord)){//read a line
185  std::vector<T> sampleVector;
186  withinRange=true;
187  if(nrow<m_minRow)
188  withinRange=false;
189  if(m_maxRow>m_minRow)
190  if(nrow>m_maxRow)
191  withinRange=false;
192  if(withinRange){
193  std::istringstream csvstream(csvRecord);
194  std::string item;
195  int ncol=0;
196  bool isComment=false;
197  while(getline(csvstream,item,m_fs)){//read a column
198  if(verbose)
199  std::cout << item << " ";
200  size_t pos=item.find(m_comment);
201  if(pos!=std::string::npos){
202  isComment=true;
203  if(pos>0)
204  item=item.substr(0,pos-1);
205  else
206  break;
207  if(verbose)
208  std::cout << "comment found, string is " << item << std::endl;
209  }
210  for(int icol=0;icol<cols.size();++icol){
211  if(ncol==cols[icol]){
212  T value=scale*string2type<T>(item)+offset;
213  // T value=string2type<T>(item);
214  if((value>=m_min&&value<=m_max)||m_max<=m_min){
215  if(transpose)
216  sampleVector.push_back(value);
217  else
218  dataVector[icol].push_back(value);
219  }
220  }
221  }
222  ++ncol;
223  if(isComment)
224  break;
225  }
226  if(verbose)
227  std::cout << std::endl;
228  // if(dataVector.back().size())
229  // assert(ncol>=cols[0]);
230  }
231  if(sampleVector.size()&&transpose)
232  dataVector.push_back(sampleVector);
233  ++nrow;
234  }
235  assert(dataVector.size());
236  }
237  else{//space or tab delimited fields
238  if(verbose)
239  std::cout << "space or tab delimited fields" << std::endl;
240  std::string spaceRecord;
241  while(!getline(m_ifstream, spaceRecord).eof()){
242  std::vector<T> sampleVector;
243  withinRange=true;
244  if(nrow<m_minRow)
245  withinRange=false;
246  if(m_maxRow>m_minRow)
247  if(nrow>m_maxRow)
248  withinRange=false;
249  if(withinRange){
250  if(verbose>1)
251  std::cout << spaceRecord << std::endl;
252  std::istringstream lineStream(spaceRecord);
253  std::string item;
254  int ncol=0;
255  bool isComment=false;
256  while(lineStream >> item){
257  if(verbose)
258  std::cout << item << " ";
259  // std::istringstream itemStream(item);
260  size_t pos=item.find(m_comment);
261  if(pos!=std::string::npos){
262  isComment=true;
263  if(pos>0)
264  item=item.substr(0,pos-1);
265  else
266  break;
267  if(verbose)
268  std::cout << "comment found, string is " << item << std::endl;
269  }
270  T value=scale*string2type<T>(item)+offset;
271  // T value=string2type<T>(item);
272  for(int icol=0;icol<cols.size();++icol){
273  if(ncol==cols[icol]){
274  if((value>=m_min&&value<=m_max)||m_max<=m_min){
275  if(transpose)
276  sampleVector.push_back(value);
277  else
278  dataVector[icol].push_back(value);
279  }
280  }
281  }
282  ++ncol;
283  if(isComment)
284  break;
285  }
286  if(verbose>1)
287  std::cout << std::endl;
288  if(verbose)
289  std::cout << "number of columns: " << ncol << std::endl;
290  // if(dataVector.back().size())
291  // assert(ncol>=cols[0]);
292  }
293  if(sampleVector.size()&&transpose)
294  dataVector.push_back(sampleVector);
295  ++nrow;
296  }
297  }
298  return dataVector.size();
299 }
300 
301 #endif // _IMGREADERASCII_H_
pktools-2.6.6/doc/html/dir_ab1bbd5a6b4bd6507847335527b029bb_dep.map0000644000113200011300000000055712616110567020377 00000000000000 pktools-2.6.6/doc/html/classLastReturnFilter-members.html0000644000113200011300000000701112647637662020473 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
LastReturnFilter Member List

This is the complete list of members for LastReturnFilter, including all inherited members.

filter(const liblas::Point &point) (defined in LastReturnFilter)LastReturnFilter
LastReturnFilter() (defined in LastReturnFilter)LastReturnFilter
pktools-2.6.6/doc/html/classFileReaderAscii.html0000644000113200011300000003222112647637662016546 00000000000000 pktools: FileReaderAscii Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Collaboration diagram for FileReaderAscii:

Public Member Functions

 FileReaderAscii (const std::string &filename)
 
 FileReaderAscii (const std::string &filename, const char &fieldseparator)
 
void reset ()
 
void open (const std::string &filename)
 
void close (void)
 
void setFieldSeparator (const char &fieldseparator)
 
void setMinRow (int minRow)
 
void setMaxRow (int maxRow)
 
void setComment (char comment)
 
unsigned int nrOfCol (bool checkCols=false, bool verbose=false)
 
unsigned int nrOfRow (bool checkCols=false, bool verbose=false)
 
template<class T >
unsigned int readData (std::vector< std::vector< T > > &dataVector, const std::vector< int > &cols, double scale=1.0, double offset=0.0, bool transpose=false, bool verbose=false)
 
template<class T >
unsigned int readData (std::vector< T > &dataVector, int col, double scale=1.0, double offset=0, bool verbose=false)
 

Protected Attributes

std::string m_filename
 
std::ifstream m_ifstream
 
char m_fs
 
char m_comment
 
double m_min
 
double m_max
 
int m_minRow
 
int m_maxRow
 

Detailed Description

Definition at line 30 of file FileReaderAscii.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img__coll__graph.map0000644000113200011300000000013312616110567025616 00000000000000 pktools-2.6.6/doc/html/build-pksvm__gui-gcc-Release_2moc__mainwindow_8cpp_source.html0000644000113200011300000005533312647637661025752 00000000000000 pktools: /home/kempenep/pktools/qt/build-pksvm_gui-gcc-Release/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pksvm_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  14, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  69, 11, 11, 11, 0x08,
36  95, 11, 11, 11, 0x08,
37  123, 11, 11, 11, 0x08,
38  153, 11, 11, 11, 0x08,
39  182, 11, 11, 11, 0x08,
40  213, 11, 11, 11, 0x08,
41  246, 11, 11, 11, 0x08,
42  274, 11, 11, 11, 0x08,
43  302, 11, 11, 11, 0x08,
44  334, 11, 11, 11, 0x08,
45  377, 11, 11, 11, 0x08,
46  410, 11, 11, 11, 0x08,
47 
48  0 // eod
49 };
50 
51 static const char qt_meta_stringdata_MainWindow[] = {
52  "MainWindow\0\0on_actionInput_triggered()\0"
53  "on_actionTraining_triggered()\0"
54  "on_actionMask_triggered()\0"
55  "on_actionOutput_triggered()\0"
56  "on_toolButton_input_clicked()\0"
57  "on_toolButton_mask_clicked()\0"
58  "on_toolButton_output_clicked()\0"
59  "on_toolButton_training_clicked()\0"
60  "on_training_returnPressed()\0"
61  "on_pushButton_run_clicked()\0"
62  "on_pushButton_restore_clicked()\0"
63  "on_commandLinkButtonPrepareTable_clicked()\0"
64  "on_actionColor_table_triggered()\0"
65  "on_toolButton_ct_clicked()\0"
66 };
67 
68 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
69 {
70  if (_c == QMetaObject::InvokeMetaMethod) {
71  Q_ASSERT(staticMetaObject.cast(_o));
72  MainWindow *_t = static_cast<MainWindow *>(_o);
73  switch (_id) {
74  case 0: _t->on_actionInput_triggered(); break;
75  case 1: _t->on_actionTraining_triggered(); break;
76  case 2: _t->on_actionMask_triggered(); break;
77  case 3: _t->on_actionOutput_triggered(); break;
78  case 4: _t->on_toolButton_input_clicked(); break;
79  case 5: _t->on_toolButton_mask_clicked(); break;
80  case 6: _t->on_toolButton_output_clicked(); break;
81  case 7: _t->on_toolButton_training_clicked(); break;
82  case 8: _t->on_training_returnPressed(); break;
83  case 9: _t->on_pushButton_run_clicked(); break;
84  case 10: _t->on_pushButton_restore_clicked(); break;
85  case 11: _t->on_commandLinkButtonPrepareTable_clicked(); break;
86  case 12: _t->on_actionColor_table_triggered(); break;
87  case 13: _t->on_toolButton_ct_clicked(); break;
88  default: ;
89  }
90  }
91  Q_UNUSED(_a);
92 }
93 
94 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
95  0, qt_static_metacall
96 };
97 
98 const QMetaObject MainWindow::staticMetaObject = {
99  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
100  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
101 };
102 
103 #ifdef Q_NO_DATA_RELOCATION
104 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
105 #endif //Q_NO_DATA_RELOCATION
106 
107 const QMetaObject *MainWindow::metaObject() const
108 {
109  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
110 }
111 
112 void *MainWindow::qt_metacast(const char *_clname)
113 {
114  if (!_clname) return 0;
115  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
116  return static_cast<void*>(const_cast< MainWindow*>(this));
117  return QMainWindow::qt_metacast(_clname);
118 }
119 
120 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
121 {
122  _id = QMainWindow::qt_metacall(_c, _id, _a);
123  if (_id < 0)
124  return _id;
125  if (_c == QMetaObject::InvokeMetaMethod) {
126  if (_id < 14)
127  qt_static_metacall(this, _c, _id, _a);
128  _id -= 14;
129  }
130  return _id;
131 }
132 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass.html0000644000113200011300000002604612647637662023542 00000000000000 pktools: qgis.pktools.pkreclass.pkreclass Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkreclass.pkreclass Class Reference
Inheritance diagram for qgis.pktools.pkreclass.pkreclass:
Collaboration diagram for qgis.pktools.pkreclass.pkreclass:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string CLASS = "CLASS"
 
string BAND = "BAND"
 
string RECLASS = "RECLASS"
 
string MASK = "MASK"
 
string MSKNODATA = "MSKNODATA"
 
string NODATA = "NODATA"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkreclass.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_24.png0000644000113200011300000000250212647437044015504 00000000000000‰PNG  IHDRc%V:WäbKGDÿÿÿ ½§“÷IDAThíš_HSmÆŸcŸ+”pYmÌ¥ Åț麂ÖEÐM–Sv‘¢ÐBä@ÝXAA)þôç¢$7™øaBxz#(„Ñ$Jû3¬ qº=]ô}çë´ÍO¿œôü®Îû>ç¼ïsÞ‡½ï9ï™@’PQî´Ýv ò/j B CA¨a(ˆ¿UöõõáñãÇ;íe_pèÐ!tvv"///NK†ËåÂÛ·oaµZSnn¿áv»qõêÕ͇V«.—+¥Æö#‚ $ÕÔ5CA¨a(5 ¡†¡ ¶- A0??ÿ¿®ŸŸßpaû/:::`4‹Ådõ$qòäI´··§´ÿíbOü2l6ü~?^¿~-«ŸžžÆââ"ÊËËwÉÙÖØaèõzœ;w.îQÜãñ ¤¤ƒa—œm”…!º»»QPP€ììl455¢Ñ(š››a2™pøðacjjJºnmm ¢(B¯×C§ÓAE¬­­appF£@ÐÓÓ“É„p8 °ÛíèëëC4•Úòx<¨¬¬”ÊÃÃðX,ÈÈÈ€Á`ÀÇã|ÿ>eý^Næo[`l6m6["))èóùdåòòr>}ú”¸´´Ä––êt:z<~ùò…###ÌÉÉá?V=zÄ+W®paa³³³<{ö,oݺE’¬ªªbuu5ý~?õz=§¦¦¤þ<ȉ‰ ’äÜÜÓÒÒè÷ûI’Á`†µµµüôé_¾|Iüöí}>ŸÔÿ¯Ç‰ÊùÛì8õöö&’\) ãÕ«W$ÉH$"é&“‰ÏŸ?—]ûâÅ é†Ïœ9ï_¿Jš×ëeQQÉŸ~âÄ šÍfÞ½{7ÎCYYoܸA’|ðàKKK%muu•sss …BŒF£œ˜˜ÄÍñYYY­V ‡Ã{÷îÁëõÆõg·ÛQ__ÖÖVx<8IÓh4x÷î®]»†P(‹Å²©{àoB7ò÷§¤tOK‹o>??333²º7oÞHÇÇŽƒÏçID Àää$€ŸAvttàüùóhhhˆkûâÅ‹‡ÃèîîÆÌÌ ÊÊÊ$meeEÓÓÓp:z___|þüYV¿‘¿?eÇŸ¦êêê Š"à÷û166†ÆÆFI¿|ù2nß¾?bvv.\@gg'b±jkkQ__žžŒchhHÖvFF.]º„›7o¢´´Ç—´ÕÕUD"h4¬¬¬àÎ;€ïß¿ËÚÐjµ€®®.ƒA´µµÉôdþ¶…D“×v­‰ÊëëëlnnæéÓ§™™™I«ÕÊÉÉIi^ƒ¬©©á‘#GxôèQ:†Ãa¶··³°°‘H„$ÙßßOƒÁÀååe™ÑÑQà³gÏâ<¶´´0;;›¹¹¹t:´ÛíÔétqëÂýû÷©ÕjyêÔ) È´dþ¶2NÉÖ áïdTTT€º…žA@oo¯4Æ¿ þ;DI¨a(5 ¡†¡ Ô0„†‚PÃPI÷¦Þ¿'Ožì¤—}OÂ0rssáv»qýúõö³ç9pàŒFcB-á¸Ê® ¾+ 5 ¡†¡ Ô0Ä¡ ÞžÀFIEND®B`‚pktools-2.6.6/doc/html/dir_6d2fd95b0bd390617ad5a1eb4a537b4a_dep.png0000644000113200011300000000444412616110567020546 00000000000000‰PNG  IHDRõªÀ_bKGDÿÿÿ ½§“ÙIDATxœíÝkPTçÇñßÂÊ"Åb#ƒD±ÀE±JÔØ†Šqªq NP‹Q‘Äñ‚·A ÒÈÅ‚,JÄK«xI4èu )Þ0Q+Šh ‘ ˆ„0(xÛ¾pºT\”Mþ»Èïó ÷œgŸÿ8ßñ¬ÎY¢½½½D‚l,=õ<ŒŽÄ1:ÇèH£#qŒŽÄ1:ÇèH£#qŒŽÄ1:ÇèH£#qŒŽÄ)ÍY|àÀlÛ¶íçš…º FƒÌÌÌ.¯W˜s?]hh(ŠŠ¾„Ÿß˜.@ÝK]]-JJŠaÎm˜fýI~~cðñÇ;Í}ê&Ž=„’’H³ÞƒŸéH£#qŒŽÄ1:ÇèH£#qŒŽÄ1º§(,ÌÇÔ©þÐh\1aÂ(|þy ººj|õÕ)øûûâüù3ÈÈH¿¿/FöDLÌBÜ¿ÏÂÓ[7F׃Á€%Kæaöì(œ>]ŠÅ‹c ƒÁ`= ééZ”——¡¼¼ ‰‰«ñÃ5˜ºû0û.“‘J¥BZÚ¤¦&¢®®ƒ¹#33*•ê‰s.\ŽÆF=æÎ †Á`À„ “›d©»³ï§Óë›ykSrôè!,]iÖýt¼¼’8FGâ‰ct$ŽÑ‘8FGâ‰ct$ŽÑ‘8FGâ‰ct$ŽÑ‘8FGâ‰ct$ŽÑ‘8FGâD¿#‘”ô>nܸ.¹%=•ÊIIi0àe‘ýD£Û³ço=zÜÜJnK8|x?‚‚Â^Ìè`Ñ¢ •Þ–LP«¢ûñ3‰ct$ŽÑ‘8FGâ‰ct$ŽÑ‘8FGâ‰ct$ŽÑ‘8FGâ‰ct$ŽÑ‘8«®²²Bü>¯®è.sZ«ÎÉ©/–-‹µôô °Úèœû!!!ÅÒcÐ/Àj£ûÿË–Z­ÀÞ½Ùxí5 <=_BFF rr>ÁÈ‘¿…»»Ö¯ÿÀxnAÁŒÂ€:ÔãmooÇÎ[1nœ ú5Þ~{" Ž÷iiiÁÚµ«àíí/¯þX»vZZZÐÚÚŠ””øú‚§çKX¸ðÜ»w·Ã¹Ÿ¶7äççÁß\]í1jÔää|òLÇž6Wg묕ÕFב“'ÿ‰ÂÂ!!!ÉÉq((8‚3g® 99 :õõwððáÌ™Œ#üpñâwX·N‡ää8ܾý#>ýtt:-Ö¯ÿ%%•X¹r âãWßË–P]]…ãÇ‹qèP!ŠŠŽcƵغ5¹¹‘“s¹¹'PQQŽôôŸ˜ÏÔÞƒóæÍDTÔb”–ÞDLÌ_ ƒAoò˜©¹:[g­ºUtÑÑ«àèØaaï–/ŽŽ}0kÖ<ÀÝ» °³S¡¨¨©©™pqq5~óìþý{غõ¯HJÚˆ‰ß„³s?ü qqÉÆ÷ß»w'ÒÒ6ÁÍm |||‘˜˜ŠÂÂ|ìÙ³kÖ¬ƒ/4šáÈÊÚ‰±cÿðÄ|¦önnþïã<B¥²Ç¬YóPUÕ{ûÞ&™š«³uÖª[EçèØЫW¯ vvv¨¨(GHȼñÆ«øì³]ÆcUU7 Ñ ÿÉ{z{û¾uë&†u…Z­€Z­Àôé“P]]…ššjã£6ÀËKƒÀÀéOÌgjï¾}ƒÜܸpᆠ{8{¶666&™š«³uÖʺ§ë‚¦¦FDF†":zNž¼n³ñØÀîøöÛk?9¿¼¼Ìø³³s?‡úúvÔ×·£ªª_|q®®pëÖMãyW¯^îðòjj簾F´µµa×®ý¨¬¬GDÄ|„‡OCCC½Éc¦æêlµzá¢{ôèš››agg‡¦¦FlØàñç­¨¨ÅHHX'þúú;8}ú8RR¡P<þ‹Ä´i3œ‡ššj\»v!!S°}{ÂÂfC«GYÙ×(+û«W/AMMõsí­P(0cÆdäåă÷ÑÒÒ ¥²L35Wgë¬Õ ÷èM'§¾ÐjÓñÞ{†ƒÃ¯°bE‚ƒÃ1s攕աµµ11‹pçÎmŒó{$%mIJeQ€øx-ââ–! `lll0mZ0Sacc ½^àà7a0è1iÒT$%m|®½¯_ÿ7¶lÙÄÄXÔÖÖÀÝ}²³s R=~D»©cO›K¥²7¹ÎZ‰>zÓÃCìì‹}ÿ àÜÜbøðß_ËË;N‹S§J,2“5P«ÈÌÌÆ[ouz.½ùœ®]»‚ "PZz ŸÃ‡~€Ù³£,=ZòÂ]^MYºt5 ˆˆÂíÛ?bðà!ˆˆˆÄܹ ,=ZÒ£¢S*•ˆ×">^kéQz´uy%ëÀèH£#qŒŽÄ1:ÇèH£#qŒŽÄ1:ÇèH£#qŒŽÄ1:ÇèH£#qŒŽÄ‰ßÄ©Ói±{÷ߥ·%+"Ýüù‹PWW+¹%=ƒÀÀ9òU±ýD£[³†·‰?Ó‘0:ÇèH£#qŒŽÄ1:ÇèH£#qfýã°­­-Ž;ŒcÇÔ?×<Ô ØÚÚšµÞ¬ÿŸ®²²/^4kê~\\\0~üø.¯7+:¢®àg:ÇèH£#qŒŽÄ1:ÇèH£#qŒŽÄ1:ÇèH£#qŒŽÄ1:§°ßÒCPÏòìKªÚ¸RåIEND®B`‚pktools-2.6.6/doc/html/classVector2d__inherit__graph.png0000644000113200011300000000732712616110567020277 00000000000000‰PNG  IHDR¨€Öµ¸bKGDÿÿÿ ½§“ŒIDATxœí}PÇßÀ7L0TÀ@€@ JEfå¥ Ngꌂƒ/¥‚Ô€”)h§ÓRû¦ ƒe$¨T+¶‚D¤B°ƒ¼C€Òò–J¤ùI I¸{þ¸>™ˆ¨¼²÷ùënoo÷»ùävïnoîH(ŠøÐÃ;| ÄC !RñBˆ‡}Í•ÚÚZ¹\ŽW(Z…J¥z{{«W_/—ËmllŒ=*íòôéÓ¡¡!Íýi9V­Zenn¾ˆ!,/ß­!ÆxH!ÄC !Rñ¢]ñ===$I«UàȲnÝ[ß××gff¶ðr–f½ºÚº· A'Ož,¼œ¥Y¯®¶nÎâïÞ½ëææF¥RY,Vnn.»dii ˜ššJMMe³Ùï¼óŽÏ£G°½4{EõrpppBB–899ijjZ\\ P*•III #))I©TªTª””[[[ssóO>ùdlllZ½€±±±ÈÈH333›ÄÄD¹\ŽUT^^nkk[SS3­!b±øùóçºÚº7ƒjÀçóGFFÐW#•J) —ˉD999úúúR©´»»[]NZZƒÁ(,,...f2™Ø¦±±±‹/byÔËyyy¶¶¶‚ (ZTTÄd2•J%Š¢§OŸ hkkÛ¸qãñãÇSSS]]]ÛÚÚ——Wbb"Š¢šõ¢(ºÿþÀÀÀÞÞÞ¶¶¶uëÖ}óÍ7X†>ú¨¢¢B*•ªsÖÕÕ8pÀÜÜ|xxX÷Z7####|>_3enâGGG Μ9#‘HyöìÙÔÔ”fˆl6ûÊ•+êü¿üòË´ÿ–&2™ŒF£ÕÕÕ¡(ºgÏž/¾øKwvv‰DØrYYÙ† œœœ ±”ÎÎNlY³^…BA&“ÛÛÛ±ÕÂÂBGGG,C[[–811qõêUOOOww÷ìììgÏžéRë^ÏBÅ£(ZSSF£ÑüüüîÝ»7-DCCÖ–uææææ×ü4(ŠîÛ·/99Y*•Òh´¿ÿþK¤R©š}’±±1•JÓöÕ¬wpp011­¶µµQ©T,ƒB¡@Q´¬¬ŒÁ`8pàÑ£GØQ¨K­{#/‹ŸÛ?11 HAAÁèèhttôŽ;FGG53ØÙÙµ¶¶ªW;::^_àÞ½{y<Þ;w<<<Ö®]‹%š™™uwwcñI$’ÚÚZ&“) ±­---?üðôr,,,Èdr__¶ÚÛÛkmm-ÌÍÍ]\\þøã‡bƒ¨.µn>hþ ÞxÄOLLP©T'‹/\¸@¥R'&&°¿Ösfdd0ŒÛ·o‹D¢’’‹^= ¢(Šõ¬]»V³ =zôhXX˜P(lmmõòòŠ‹‹KIIqssÀÇÇçСCêcBÝcïÛ·/00°¯¯O ¸ºº~ýõ×Ó†IEALLŒ™™YtttCCƒŽµî5¼…®>??ßÁÁaÅŠÎÎÎEEE(Š*•J___###EU*Ujjª££#FÛ´iSmm-œf”Ó"æp8FFFš§'ãããQQQ¦¦¦t:ÃáÈd2¹\ž˜˜Èd2÷îÝ+‘H¦Õ‹¢èèèhDDN·²²úüóÏÕÎ^n‚D"IKKspp …º×ºyY< Õ˜°«¬¬tqqa0óì=–‚ ¢¯?}bZ'ù÷ß;;;·lÙ¢N¢Ù3¢§§§§ïT¼-‡B<¤è²ø¼¼<ÒL´´´àþèò$‰ýýý›7oÆ–t:׸–º,ÞÐÐÐÐÐ •JƄХ®~ÆÙ¶·²×üJ^âè‚øúúúÈÈHWW×§OŸÎußÖÖV{{ûäääþþþ…äYv,cñr¹<77×ËË+&&fóæÍ}}}VVVs-dÛ¶mÍÍÍ+W®ô÷÷ß¹sgii)‚ óȳüм7›[¶K„YζaÌæî¦B¡¸qㆯ¯/›Í˜wž¥ÉBgç–³™m›###CCC7nÄN ç—g¹°\Å¿ÿþû|>¿°°ð¯¿þb³ÙŸ~úiccã<ÊA¤´´4$$ÄÛÛEч^¿~}ÚS޳ɳüÐ<ü—QW¯ÉkfÛ0^ÓÕóxsz:Œâ•ʩ۷[”Ê)•jêöí&¥r ïˆpFñ••]ÏŸObË2Ùdee¾ñàŒâoÞl$“ÿk8™L*,„±·‡N¼L6ùûï•ê¿î]¥B~ÿ] “MâÕâø²²µu …bêþ}(n]hx¯€.ÜõôH<^^ñà\â%ÙƒM{*~j ©¬ì’HdxE… p‰/.n{Õ¦{÷^¹I'K{ölSSÓåË—y<^UUÕÉ“'ÓÓÓ¯]»8þ<@}Z‘‘!‹¹\îéÓ§ëëë¯_¿Ž¥ß¸qãøñãNNN¹¹¹®®®Xbss³••ÕÍ›7óóó9NnnnDD—ËdWWשS§¢¢¢°¿ÚœèííݳgOvv¶H$šÏ¤5poddäííÍçóÕÕÕ6l055Å6•””ÄÇÇ3 ‹SWWW\\|ðàA‹eooìØ1µ?5*•ª¢¢âÈ‘#VVV,+**ª¬¬ ÛÄápÜÝÝW®\immM&“Ÿ?~áÂ…¢¢¢cǎݹs'66ÖÏÏN§{yyq8l…BQZZzøðá´´´uëÖýöÛosƒ0<<<.]ºD¡Pâãã¿üòˆ†íÝ…øFçÎ;räHUUÕŽ;Ôé? U¯Òh4¥RicóßW¿×¬Yóò$D"A„Édb«ÖÖÖb±[¶µµUg+//çr¹žžž\.×ÄÄD,;::ª·²X,@ccã÷ßïååïää´/NÓéôÈÈÈ?þ¸¦¦æêÕ«gÏže0ó.ð­€ÿuü¦M›ärùýû÷{{{}}}Õ鯯Æ×®]ãóù|>ÿîÝ»çÏŸ§Óé?ƶöôô`]½&¦¦¦zzzêNuxxØÌÌ [VŸp\¹råÇLJJÂNÊ,--{{{Õ……B€‰‰‰]GG‡@ ˜Gÿ2‰D(ŠÅb6›M¡P^àÁÿˆ§P(¾¾¾™™™îîîšß1÷óó»xñâáÇe2Ù™3gœ?üðÃK—.YZZ222ìììÔ™'&& õõõ·nÝzîܹÄÄD¹\ž““³mÛ6ͺd2YNNNrr2…BÀwîÜ™••E£ÑÞ{~žžŸþàààžžÞßßëÖ­ˆˆŸ   6›=×Ö¡(ÚØØXTTÔÕÕµ}ûöÌÌÌyŒÚñ€ÀÀÀ²²²i·M¢££333:D"‘üýýcbbôôôäryRR’\.÷ööމ‰XZZ®_¿>44ôÞ½{€øøøÌÌÌØØXƒ€€€ýû÷«{{@ÿäääwß}§YQyy¹R©ÌÊÊzò䉃ƒÃW_}…])ìíí8NIIɉ'ÒÒÒ,,,æÔ´êêêüüü]»v¥¤¤,©Ë<íÎǧ¤¤èÌ´,Š¢‚Éä9í¥R©æç»²²òĉÚ³ƒÿ¿\ ‘Hsµ4Î-–„xH!ÄC !RñBˆ‡B<¤h÷:žÅb©']æ„D"éëë[–ÏÕ'$$ j¯|'88X{…Ãû5iÈ!ÆxH!ÄC !Rñòen¨”4²IEND®B`‚pktools-2.6.6/doc/html/classSolver__NU.html0000644000113200011300000004122512647637662015612 00000000000000 pktools: Solver_NU Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Solver_NU Class Reference
Inheritance diagram for Solver_NU:
Collaboration diagram for Solver_NU:

Public Member Functions

void Solve (int l, const QMatrix &Q, const double *p, const schar *y, double *alpha, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking, bool verbose=false)
 
- Public Member Functions inherited from Solver
void Solve (int l, const QMatrix &Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking, bool verbose=false)
 

Additional Inherited Members

- Protected Types inherited from Solver
enum  { LOWER_BOUND, UPPER_BOUND, FREE }
 
- Protected Member Functions inherited from Solver
double get_C (int i)
 
void update_alpha_status (int i)
 
bool is_upper_bound (int i)
 
bool is_lower_bound (int i)
 
bool is_free (int i)
 
void swap_index (int i, int j)
 
void reconstruct_gradient ()
 
- Protected Attributes inherited from Solver
int active_size
 
schar * y
 
double * G
 
char * alpha_status
 
double * alpha
 
const QMatrixQ
 
const double * QD
 
double eps
 
double Cp
 
double Cn
 
double * p
 
int * active_set
 
double * G_bar
 
int l
 
bool unshrink
 

Detailed Description

Definition at line 1016 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/dir_5f1e10fd305b434def78aaf73fd56d60_dep.map0000644000113200011300000000066412616110567020553 00000000000000 pktools-2.6.6/doc/html/inherit_graph_42.png0000644000113200011300000000221112647437044015501 00000000000000‰PNG  IHDR]%¯br8bKGDÿÿÿ ½§“>IDAThí™MH[ÇïdS¡E˜¦h•& R«hÑ"’6QTZAX}}-+£]Ð7…e˜A Y‹ ±U©e‘¥1)š¦ób5õ^½ù­î=ž;ó?ÿ™{FGEQ@ðޏX ø¥¾àCø‚á >ñ‘»ÝÞÞÞîóùb¥&†´¶¶ÖÖÖ†§¯|1[[[‰äÇUŘƒƒFó¡/æ%ý ¤Ré›Ñ_ð!|Á‡ðÂ|þŽ/ççç}×ÑþŽ/ß á >Ñø¢×ëóóó“’’rrrÔj5 ªªª«« ûôùù™J¥noo ZXX …ééé###jµ:;;;55u``à“ãC´¼¼, ÓÒÒÆÆÆ°àããcSSNçp8===>Ÿ/ ªT*>ŸŸ’’R\\|xxˆe¥RÉd2 †R© QÔÐVWWßDÞãv»§¦¦Çüü|||¼Ûí^YYÉÌÌ …B(Šêt:6›°7;2™ A¹¹9€T*EdzzpÿÑ)µµµ.—kvvððð€¢hCCCii©Åb1™LyyyÃÃà cccãææf{{›ÍfcâGGGkjjìv»Éd*((èííý¼"E%‰D"y¥á«¾8N†ÇÇÇ].W(zzz ƒ‡B¡¡(Z__ß××®ðøøEQ¿ßÿf|vvö‰/ƒ!2Óï÷“H$³ÙŒ%lllðx<>Ÿ¿¸¸^µ´´„‰‡ îîîŠD¢(|ùò>¢R©ƒÁh4r8œ’’’½½½¸¸82™\YY©Õj=^¯—Ëåáü”” ÃoÆŸƒ]üpæÝÝ]0är¹Ø”Çã]___]]‰D¢ð’üü|lpqqÁb± ‚ ¨¬¬Ìf³}µFEñz½¡PhmmÍét¶´´TTT8N€L&Ójµ›››………¹¹¹QHy%+î•0&“I"‘¬V+6µX,YYY'''áœÓÓSl@§ÓÃ7£Ëå2Ñøê‚Äbñúú:‚ ~¿†a2™ ‹Å.—khh¨¹¹9 ŸÃp]]]GG‡Íf3›Íýýý mmmJ¥R§ÓÝÞÞîìì bÉÕÕÕ}}}———&“©¼¼|rr2šSFnªÿÒ_°4.—› t:]8®P(’““Ýnwd§_ºÆïÁÍt:4Åbuvvz½Þ——•JÅãñ(JQQv_ (Š ˆ\.§R©4M¡Px<ž­èúîŸäúîÿœ÷R?ÆG?gÐ_ð—V,}ù õ±ð!|Á‡ðÂ|púîÌÌÌÏëˆ-V«5''çU(òËÌþþ>‰DŠ‘¶ÓÝÝiô›–1„è/ø¾àCø‚á >ÿ1ezðg³"¸IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial__inherit__graph.map0000644000113200011300000000014712616110567027666 00000000000000 pktools-2.6.6/doc/html/dir_e6df591b0639d4c4807ef64d058833e2_dep.map0000644000113200011300000000054312616110567020270 00000000000000 pktools-2.6.6/doc/html/classONE__CLASS__Q__inherit__graph.png0000644000113200011300000001075412616110567020731 00000000000000‰PNG  IHDR€»­ƒ–¥bKGDÿÿÿ ½§“¡IDATxœí{PSGßÇ¿áf¡Z`D#úŠí â…ŠwŽc‹†Q±Ð± ¥ÏÔ™ZÛNaÛz£Zk½Mb™$¶µõa¤¥Vä"r}¤’7xÑ  ¹dß?|‰Í“@‚`Nâîg&3²»g÷·›»{ÎINx„µØqƒ[˜”à&å8pÑèÉ“'qäÈ.š¶Z¢££±råJ‹·Ëãâ, ,, yyy ²tÓVIÏXH¥R‹·ÍÉ €³[#aaaœµÍö”à&å0(Ǧxøð!âââàïï¡C‡"00_}õºººtex<¼½½aìäféÒ¥àñxP*•ŠC©T‚Çã ¨kÁfhkkôiÓŸŸ;v ¸¸[¶lAzz:/^Œîîn]Ùëׯ£´´TïøææfäææšÕ–J¥‚@ è5ŸÏç#>>þÙ:be،۶mÈ# —˱téRLœ8¡¡¡(((@MM ¾ÿþ{]ÙÈd2½ãOŸ>yóæ™Õ–V«Å½{÷zÍرcdzuÄʰÒÓÓ‘{{{½ô—_~qqq8qâ„.M,C*•ê-'Ož4¸Ò–™™‰€€¸¸¸@(êÞÔ3fFŽ à锟““‘H„””Ýpúôixzz¢¹¹‘‘‰'âáǃ<Ï Âb±˜ˆÅb³Ë777¤©©Éh~^^qss#„€TUU‘‘#G’+W®B¹ÿ>qqq!wïÞ%Huu5imm%NNNdݺu¤¶¶–¤§§äÎ;¤ººšüshzþ^ºt)‘Ë夤¤D/?""‚DFF’††âááAòóóŸëx &œ] |zÛxB`g÷t2³··ÇŠ+ •J1yòddffbÖ¬YxõÕWue† ‚ÒÒRŒ3ÎÎÎ3f  ¥¥¥×öwîÜ ???ƒMä7ß|???,^¼111 H7-ŠM,|>#GŽDII‰Ñü’’øøøè¥‰ÅbÈd2BŒNÿNNN¸ví–,Y‚©S§"%%ÅdÿÝÆ?㋊ŠBee%bbbÌ딕`@xx8’’’ôvû«W¯FFFvìØÕ«W땟={6ÚÚÚpáÂdggã­·ÞÒËoooGXXbccQ\\ŒƒšŒÁÑÑÑhú­[·pàÀ„„„àã?~†Þq‡Í€††,Z´YYY¸víÆ5kÖ@£Ñ`ýúõzå{–èèhÂÝÝ]/ÿñãÇèè耓“ÚÛÛ‘˜˜àÉéf<0—V«Åºuëðá‡"##çÏŸÇo¿ý6=¶ 6#À+¯¼‚Ë—/cÊ”)ؼy3üýý!‘HðÙgŸÁ××Ç„……áêÕ«Fï³óù|$''#<<>>>ðòòÂêÕ«±dÉxyyaöìÙ …&ã:xð šššWWW:tÑÑѺ³k‡³Ï´ÛÁ(..Ö¾Ùƒ=ýÁff€¾prr²Ù7Ÿk^Ï€r˜”à&å0(‡³›A*• Gåªy«B¥Raüøñœ´Í‰cÆŒL&Ctt4Íëpq™xô¨ŒÓ8`þüùœ´ËÉ•@k »[ ÿ'×ÿËʶÁÎîÅøŒ_¡v—§„Zýjõ\¼8°‰Ú2Ô “ÁÁÁŽŽvÉ ¹‡3¨@£éÄ™3¥èêêFg§gΔB£éä:,N R¹üªÞ®ÑtB.¿ÊaDÜA¥?ýT¤÷ùB‡Ÿ~*â0"î N€ÖV Οÿº»µº´în-ΟÿZ[5FÆ Ô ðï—C«5<óÕj ²²Ê9ˆˆ[¨àäÉ"»òñäÓÃô-T ÐÔÔ†‹«¡Õj ò´Z‚‹«ÑÔÔfäȪÈÌ,éóŠÇCffi¯ù/"T •]ÿ{ÐjµÔ]¢F€ººf”•Ý2!PZz ·oß·`dÜbSß wï>À¨Q|½õ¿çbÐK/=ýÆîÞmèQ|‹ÇÈÔÞ €èèTÀ‘#‘GÂÔ, ã0(‡ @9LÊaP€r˜”à&å0(‡ @9LÊaP€r˜”à&å0(‡ @9LÊaP€r˜”à&å0(‡ @9LÊaP€r˜”à&åXÍBƇëׯ[´M «ë®EÛ7nT*•EÛì «€Çãá£>BPPסæybÓ{©TŠ3f %%AAA EHHˆ.ÿúõë …zÇ >\÷o½¼Q£FõÒMÕcËØôàåå˜6mâãã±nÝ:´´´èòª««A!ÍÍ͸té’.ÿ¿ßh;;ãÃaª[Ʀø'Ÿþ9†ŽM›6éÒBCCñÉ'ŸàÆ(++Ã’%KðÝwßõ»îÁªÇya2dRRR––†³g϶oߎaÆ! ,€¿¿?vîÜÙﺫ«„Û-ÈSÐÏM ­bm›Àf`<LÊaP€r˜”à&åXÕ÷üüüàááa±6 áýÛ–‚ÆÆF”——[ÍÇíæfЦM›pëÖ-‹¶YUå€ÀǧÙbmºººbÑ¢EkÏV3Xšû÷ÁÏïsðx’’’ðÅ_`úôéfÕC\.‡»»; …û÷ïGcc#¶mÛ†#FàæÍ›Ø¿?ÚÚÚ°qãF³ËôEÏØòù|DEEÁÓÓS7¶—/_Æž={tcû¬ x HKKŸÏÇ×_ÀÀ@Œ=sæÌÁáÇÑÐЀsçÎéÊ.[¶ ûöíƒZ­î³N>Ÿ777ƒ—9?~ˆ…¯¯/ÆŽ‹°°0„††B"‘˜Ý¯ššܼyqqqP*•¨­­ÕË¿pá6lØoooðù|Lš4 7nÄ_ýÕ¯2}Ñ3¶{÷îÅo¼¡7¶õõõ8sæŒÙýé ˆˆ_zé%¬Zµ ÙÙÙº4±X ‘H„äääçöÓ©¹¹¹X±b…Azdd$âââÌ®G.—ÃßßS§N…H$‚\.×ËwqqÁ©S§ÐÚÚªK›4i’ždæ”é Sc{þüy³ûÓàÁƒP«Õ˜0a‚Ñü &àæÍ§OÞ¶³³Ã–-[pùòedeeõZ¯F£A{{»ÁËÜxD"‘Až³³3ÜÝÝÍèÕÓéáÂ'—ž;w®Áþ#66ÅÅÅX¹r%bcc!‘HÐØØØï2¦úÒÛØz{{£¦¦Æ¬ºúâ¹>-œÇãA«Õê¥=QQQøöÛo1eʣǭ_¿Þhº©M`ϬòÏMæ³PUU…;wî`îܹžžžŽššŒ70mÚ4H$üý÷ß(,,DVVŽ=ŠO?ýT'Ž9eLÑ[_!^ÿÎC‡…››[¯7”J%&NœhþöÛoÃÛÛ»wï6º¤§§C¡P¼L1lØ0¸ººâÆyUUUxÿý÷ñøñc“õÈårtwwcùòåFTT€§j4Ý’àë니ˆ;v k×®ÅáÇÍ.Ó挭±™®¿ X¡¤¥¥üO×h4ÈÈÈ@`` Á1<ñññ¨¨¨@ffæ@CÐcÖ¬YH$begg£«« C† éóx­V …B>øgÏžÕ½Äb1 ! „`ûöíP©Tz}š>}ºî÷Í)c cc›””„œœüøãfÏ"}1`"##ÑÜÜŒM›6¡  µµµøóÏ?@€åË—=N("&&R©Ô ïþýûP«Õ/sxï½÷PZZŠ/¿ü•••P©THMMÅÏ?ÿl°´k§¬¬ ÍÍÍX´hœu¯ÔÖÖB©TÂÙÙ‹/ÆÖ­[qéÒ%Ô××£²²‡Ò½)æ”1glÕj56oÞŒÂÂBÔÖÖB(bûöíèèèÀ›o¾iV=}1(w5 Ž?ŽÂÂBܾ}B¡ .„X,Öý3vá…‚¸¸8 ê… ÆÆFÝ… öövˆD"¼óÎ;˜9s¦®Loí,[¶ õõõؽ{·^:!k׮żyó­V‹~ø¹¹¹¨««ƒ««+‚ƒƒñî»ïê.ò˜SÆÿÛºº:,X°åååpssCBB‚Yõôv7ݶQºººpíÚ5¼öÚkf•g·ƒ_0Ì~óû¬gb±(}-€ùË„5` }±9lé 6…5ô…-”à&å0(‡ @9‚̾VͰ-ìíí ¾ôcp(—Ë;gͰ-<<< Ò¨þñhÛP€r˜”ã@Æu îø?1lE¢&IEND®B`‚pktools-2.6.6/doc/html/dir_e28b2035b152bb51229fe7a0fca4e376_dep.png0000644000113200011300000000426412616110567020404 00000000000000‰PNG  IHDR€'úÊbKGDÿÿÿ ½§“iIDATxœíÝkPSg€ñ'r ÞŠFѼP´Þ2:xaÊŒvì¶Åq,ÑŠ«£¸²®Udµšj‘.£X«ÈŽZ]uwÕVѪXYê…ÝÖÙÑ]¯utÚÎÖ„”RY»¬H6$÷ƒcz±bM @Þÿïòžœ÷=ñ™ä 94÷îÝ»‡PV»–^€hY€â$ÅIŠ“'(NPœ 8 @q€â$ÅIŠ“'(.Л8p€­[·6ÕZ„æÎKJJŠÇ×xs=À”)S8}úïŒëñ„ç.^<ÇsÏfÿþýïëW€#bÙ´i§·»ÈÈHózr 8 @q€â$ÅIŠ“'(Îo(/ÿƒa,z}qqƒØ²e‹‰~ýtœ9Pœ 8 @q€â$ÅIŠ“'(NPœ 8 @q€â$ÅIŠ“'43“é ŸÆÿ$ü*€Š ýûwoée´)~€ËåÂjýoK/£MiµètŠ‹÷ð쳃‰ŽÖQX¸Ö=öí··˜?ýûwG¯ïÅo,¦¾Þθqq ø‹ÇîÿÇ/Í?þwYÙQÆŒFxxÇG³oߟÝcN§“ìì% Ø“z½§ÓICC›6;€Þ½;3~üh.\øGS<ͦUß)ôرÃ?~†’’df¦3cƺvÕñÚk ¸y³š“'ÿ‰ÍVGzú4:uêÌñãg5ê>ÿ¼Ú«ym¶:ÒÒ&“Ÿ¿‘ 9q¢”ŒŒÙ ÉtèÐ‘Í›ßÆb1S^~Þc~~6aa=(*ZÇ[om!66Ž+W.‘™™ÞDÏFóhµ¯sæÌ'4´ S§Î ¦ÆŠÓéäý÷ß#?#QQÑ 2£1—ââÝM6¯ÃñàVñwÐjC˜6- ³¹†öìÙ³“‚‚""#{3dÈPrrÖpêT;vl!'g- IôìN|ü²³ó›l]Í¡U@PPû{ß|óoxúéïnñÝŸªª¯¼šëûwÌíÒ¥+%%åܹ³èõ½HHË™3§Ý·ŠÿòË  G§Ó ÓiHJŠÇb1SUUÉС1?د^?Ì«u5·V€FóðòÂÂz@E…Éý=³ù:‘Íq÷î]nÜøîïØíÿÃår±kW1&“•éÓMjªššû÷îÖ­;çÏÿ «õVë=ÌæNœ8KŸ>Q\½úÉöÿÙg׿ $))Þ×SŠFø,€˜˜‘$$$ãr5øjÊ6)!!™˜˜‘>›ÏgDFöfãÆí¾šNüLr 8 @q€â$ÅIŠ“'(NPœW?  ´ô¥¥º¦ZxBS§Nõêñ^ÝÀd2qᯠ¼3räH¢££=~¼Wˆ¶OÎ'(NPœ 8 @q€â$ÅIŠ“'(NPœ 8 @q@qK/B´œÿdоLcºƒ^IEND®B`‚pktools-2.6.6/doc/html/____init_____8py_source.html0000644000113200011300000001707512647637661017271 00000000000000 pktools: /home/kempenep/pktools/qgis/__init__.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
__init__.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  __init__.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 
27 def classFactory(iface):
28  from pktools.ProcessingPktoolsPlugin import ProcessingPktoolsPlugin
29  return ProcessingPktoolsPlugin()
30  #of beter met ifacer argument?
31  #return ProcessingPktoolsPlugin(iface)
pktools-2.6.6/doc/html/pkenhance_8cc_source.html0000644000113200011300000011032712647637661016621 00000000000000 pktools: /home/kempenep/pktools/src/apps/not_used/pkenhance.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkenhance.cc
1 /**********************************************************************
2 pkenhance.cc: program to enhance raster images: histogram matching
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <iostream>
22 #include <string>
23 #include "base/Optionpk.h"
24 #include "imageclasses/ImgReaderGdal.h"
25 #include "imageclasses/ImgWriterGdal.h"
26 
27 using namespace std;
28 
29 int main(int argc,char **argv) {
30  Optionpk<std::string> input_opt("i","input","input image file");
31  Optionpk<string> reference_opt("r", "reference", "Reference image file");
32  Optionpk<std::string> output_opt("o", "output", "Output image file");
33  Optionpk<double> minRef_opt("minref", "minref", "Sets minimum for histogram of reference image");
34  Optionpk<double> maxRef_opt("maxref", "maxref", "Sets maximum for histogram of reference image");
35  Optionpk<double> minInput_opt("mininput", "mininput", "Sets minimum for histogram of input image");
36  Optionpk<double> maxInput_opt("maxinput", "maxinput", "Sets maximum for histogram of input image");
37  Optionpk<double> nodata_opt("nodata", "nodata", "Sets no data value(s) for calculations (nodata values in input image)");
38  Optionpk<std::string> method_opt("m", "method", "enhancement method (histmatch)", "histmatch");
39  // Optionpk<std::string> wavelet_type_opt("wt", "wavelet", "wavelet type: daubechies,daubechies_centered, haar, haar_centered, bspline, bspline_centered", "daubechies");
40  // Optionpk<int> family_opt("wf", "family", "wavelet family (vanishing moment, see also http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)", 4);
41  // Optionpk<double> quantize_opt("q", "quantize", "Quantize threshold",0);
42  Optionpk<short> nbin_opt("nbin", "nbin", "Number of bins used in histogram. Use 0 for all input values as integers",0);
43  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","");
44  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate). Empty string: inherit from input image");
45  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
46  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0);
47 
48  bool doProcess;//stop process when program was invoked with help option (-h --help)
49  try{
50  doProcess=input_opt.retrieveOption(argc,argv);
51  reference_opt.retrieveOption(argc,argv);
52  output_opt.retrieveOption(argc,argv);
53  minRef_opt.retrieveOption(argc,argv);
54  maxRef_opt.retrieveOption(argc,argv);
55  minInput_opt.retrieveOption(argc,argv);
56  maxInput_opt.retrieveOption(argc,argv);
57  nodata_opt.retrieveOption(argc,argv);
58  method_opt.retrieveOption(argc,argv);
59  nbin_opt.retrieveOption(argc,argv);
60  otype_opt.retrieveOption(argc,argv);
61  oformat_opt.retrieveOption(argc,argv);
62  option_opt.retrieveOption(argc,argv);
63  verbose_opt.retrieveOption(argc,argv);
64  }
65  catch(string predefinedString){
66  std::cout << predefinedString << std::endl;
67  exit(0);
68  }
69  if(!doProcess){
70  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
71  exit(0);//help was invoked, stop processing
72  }
73 
74  ImgReaderGdal inputImg;
75  ImgReaderGdal referenceImg;
76  ImgWriterGdal outputImg;
77  assert(input_opt.size());
78  inputImg.open(input_opt[0]);
79  for(int inodata=0;inodata<nodata_opt.size();++inodata){
80  if(!inodata)
81  inputImg.GDALSetNoDataValue(nodata_opt[0],0);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
82  inputImg.pushNoDataValue(nodata_opt[inodata]);
83  }
84 
85  int nband=inputImg.nrOfBand();
86  GDALDataType theType=GDT_Unknown;
87  if(verbose_opt[0])
88  cout << "possible output data types: ";
89  for(int iType = 0; iType < GDT_TypeCount; ++iType){
90  if(verbose_opt[0])
91  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
92  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
93  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
94  otype_opt[0].c_str()))
95  theType=(GDALDataType) iType;
96  }
97  if(theType==GDT_Unknown)
98  theType=inputImg.getDataType();
99 
100  if(verbose_opt[0])
101  std::cout << std::endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
102 
103  string imageType=inputImg.getImageType();
104  if(oformat_opt.size())
105  imageType=oformat_opt[0];
106 
107  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
108  string theInterleave="INTERLEAVE=";
109  theInterleave+=inputImg.getInterleave();
110  option_opt.push_back(theInterleave);
111  }
112  try{
113  assert(output_opt.size());
114  if(verbose_opt[0])
115  std::cout << "opening output image " << output_opt[0] << std::endl;
116  outputImg.open(output_opt[0],inputImg.nrOfCol(),inputImg.nrOfRow(),inputImg.nrOfBand(),theType,imageType,option_opt);
117  }
118  catch(string errorstring){
119  cout << errorstring << endl;
120  exit(1);
121  }
122 
123  if(method_opt[0]=="histmatch"){
124  assert(reference_opt.size());
125  referenceImg.open(reference_opt[0]);
126  assert(nband==referenceImg.nrOfBand());
127  for(int inodata=0;inodata<nodata_opt.size();++inodata){
128  if(!inodata)
129  referenceImg.GDALSetNoDataValue(nodata_opt[0],0);//only single no data can be set in GDALRasterBand (used for ComputeStatistics)
130  referenceImg.pushNoDataValue(nodata_opt[inodata]);
131  }
132  const char* pszMessage;
133  void* pProgressArg=NULL;
134  GDALProgressFunc pfnProgress=GDALTermProgress;
135  double progress=0;
136  pfnProgress(progress,pszMessage,pProgressArg);
137  for(int iband=0;iband<nband;++iband){
138  //calculate histograms
139  unsigned int nbinRef=nbin_opt[0];
140  unsigned int nbinInput=nbin_opt[0];
141  std::vector<double> histRef(nbinRef);
142  std::vector<double> histInput(nbinInput);
143  double minValueRef=0;
144  double maxValueRef=0;
145  double minValueInput=0;
146  double maxValueInput=0;
147  if(minRef_opt.size())
148  minValueRef=minRef_opt[0];
149  if(maxRef_opt.size())
150  maxValueRef=maxRef_opt[0];
151  if(minInput_opt.size())
152  minValueInput=minInput_opt[0];
153  if(maxInput_opt.size())
154  maxValueInput=maxInput_opt[0];
155  unsigned long int nsampleRef=referenceImg.getHistogram(histRef,minValueRef,maxValueRef,nbinRef,iband);
156  unsigned long int nsampleInput=inputImg.getHistogram(histInput,minValueInput,maxValueInput,nbinInput,iband);
157  //create cumulative historgrams
158  for(unsigned int bin=0;bin<nbinRef;++bin){
159  histRef[bin]+=100.0*static_cast<double>(histRef[bin])/static_cast<double>(nsampleRef);
160  }
161  for(unsigned int bin=0;bin<nbinInput;++bin)
162  histInput[bin]+=100.0*static_cast<double>(histInput[bin])/static_cast<double>(nsampleInput);
163  //match histograms
164  vector<double> lineBuffer(inputImg.nrOfCol());
165  for(int irow=0;irow<inputImg.nrOfRow();++irow){
166  inputImg.readData(lineBuffer,GDT_Float64, irow, iband);
167  for(int icol=0;icol<inputImg.nrOfCol();++icol){
168  //find bin in input image histogram
169  int inputBin=static_cast<int>(static_cast<double>(lineBuffer[icol]-minValueInput)/(maxValueInput-minValueInput)*(histInput.size()-1));
170  //find corresponding bin in reference image histogram
171  //todo: optimize with lower_bound?
172  // std::vector<unsigned long int>::const_iterator hit=histRef.begin();
173  int ibin=0;
174  for(ibin=0;ibin<histRef.size();++ibin){
175  if(histRef[ibin]>histInput[inputBin])
176  break;
177  }
178  if(ibin)
179  --ibin;
180  lineBuffer[icol]=(maxValueRef-minValueRef)/(histRef.size()-1)*(ibin)+minValueRef;
181  // std::vector<unsigned long int>::const_iterator it=std::lower_bound(histRef.begin(),histRef.end(),culInput);
182  }
183  outputImg.writeData(lineBuffer,GDT_Float64,irow,iband);
184  progress=(1.0+irow);
185  progress+=(outputImg.nrOfRow()*iband);
186  progress/=outputImg.nrOfBand()*outputImg.nrOfRow();
187  assert(progress>=0);
188  assert(progress<=1);
189  pfnProgress(progress,pszMessage,pProgressArg);
190  }
191  }
192  }
193 
194  inputImg.close();
195  if(method_opt[0]=="histmatch")
196  referenceImg.close();
197  outputImg.close();
198  return 0;
199 }
pktools-2.6.6/doc/html/inherit_graph_32.md50000644000113200011300000000004012647437044015377 0000000000000039685cc5d90d6118c44f4d26507483d2pktools-2.6.6/doc/html/pkoptsvm.html0000644000113200011300000002105112647637662014427 00000000000000 pktools: pkoptsvm
pktools  2.6.6
Processing Kernel for geospatial data
pkoptsvm

program to optimize parameters for support vector machine classifier pksvm

SYNOPSIS

Usage: pkoptsvm -t training

Options: [-cc startvalue -cc endvalue] [-g startvalue -g endvalue] [-stepcc stepsize] [-stepg stepsize]

Advanced options:

Description

The support vector machine depends on several parameters. Ideally, these parameters should be optimized for each classification problem. In case of a radial basis kernel function, two important parameters are {cost} and {gamma}. The utility pkoptsvm can optimize these two parameters, based on an accuracy assessment (the Kappa value). If an input test set (-i) is provided, it is used for the accuracy assessment. If not, the accuracy assessment is based on a cross validation (-cv) of the training sample.

The optimization routine uses a grid search. The initial and final values of the parameters can be set with -cc startvalue -cc endvalue and -g startvalue -g endvalue for cost and gamma respectively. The search uses a multiplicative step for iterating the parameters (set with the options -stepcc and -stepg). An often used approach is to define a relatively large multiplicative step first (e.g 10) to obtain an initial estimate for both parameters. The estimate can then be optimized by defining a smaller step (>1) with constrained start and end values for the parameters cost and gamma.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    t training std::string training vector file. A single vector file contains all training features (must be set as: b0, b1, b2,...) for all classes (class numbers identified by label option).
    cc ccost float 1 min and max boundaries the parameter C of C-SVC, epsilon-SVR, and nu-SVR (optional: initial value)
    g gamma float 0 min max boundaries for gamma in kernel function (optional: initial value)
    stepcc stepcc double 2 multiplicative step for ccost in GRID search
    stepg stepg double 2 multiplicative step for gamma in GRID search
    i input std::string input test vector file
    tln tln std::string training layer name(s)
    label label std::string label identifier for class label in training vector file.
    bal balance unsigned int 0 balance the input data to this number of samples for each class
    random random bool true in case of balance, randomize input data
    min min int 0 if number of training pixels is less then min, do not take this class into account
    b band unsigned short band index (starting from 0, either use band option or use start to end)
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    offset offset double 0 offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]
    scale scale double 0 scale value for each spectral band input features: refl=(DN[band]-offset[band])/scaleband
    svmt svmtype std::string C_SVC type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)
    kt kerneltype std::string radial type of kernel function (linear,polynomial,radial,sigmoid)
    kd kd unsigned short 3 degree in kernel function
    c0 coef0 float 0 coef0 in kernel function
    nu nu float 0.5 the parameter nu of nu-SVC, one-class SVM, and nu-SVR
    eloss eloss float 0.1 the epsilon in loss function of epsilon-SVR
    cache cache int 100 cache memory size in MB
    etol etol float 0.001 the tolerance of termination criterion
    shrink shrink bool false whether to use the shrinking heuristics
    pe probest bool true whether to train a SVC or SVR model for probability estimates
    cv cv unsigned short 2 n-fold cross validation mode
    cf cf bool false use Overall Accuracy instead of kappa
    maxit maxit unsigned int 500 maximum number of iterations
    tol tolerance double 0.0001 relative tolerance for stopping criterion
    c class std::string list of class names.
    r reclass short list of class values (use same order as in class opt).
    Usage: pkoptsvm -t training
pktools-2.6.6/doc/html/pkcomposite_8cc_source.html0000644000113200011300000055677212647637661017244 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkcomposite.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcomposite.cc
1 /**********************************************************************
2 pkcomposite.cc: program to mosaic and composite geo-referenced images
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <algorithm>
21 #include <vector>
22 #include <iostream>
23 #include <string>
24 #include "imageclasses/ImgReaderGdal.h"
25 #include "imageclasses/ImgWriterGdal.h"
26 #include "imageclasses/ImgReaderOgr.h"
27 #include "base/Vector2d.h"
28 #include "base/Optionpk.h"
29 #include "algorithms/StatFactory.h"
30 
31 /******************************************************************************/
135 namespace crule{
136  enum CRULE_TYPE {overwrite=0, maxndvi=1, maxband=2, minband=3, validband=4, mean=5, mode=6, median=7,sum=8,minallbands=9,maxallbands=10,stdev=11};
137 }
138 
139 using namespace std;
140 
141 int main(int argc, char *argv[])
142 {
143  Optionpk<string> input_opt("i", "input", "Input image file(s). If input contains multiple images, a multi-band output is created");
144  Optionpk<string> output_opt("o", "output", "Output image file");
145  Optionpk<int> band_opt("b", "band", "band index(es) to crop (leave empty if all bands must be retained)");
146  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter) (empty: keep original resolution)");
147  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter) (empty: keep original resolution)");
148  Optionpk<string> extent_opt("e", "extent", "get boundary from extent from polygons in vector file");
149  Optionpk<bool> cut_opt("cut", "crop_to_cutline", "Crop the extent of the target dataset to the extent of the cutline.",false);
150  Optionpk<string> mask_opt("m", "mask", "Use the first band of the specified file as a validity mask (0 is nodata).");
151  Optionpk<float> msknodata_opt("msknodata", "msknodata", "Mask value not to consider for composite.", 0);
152  Optionpk<short> mskband_opt("mskband", "mskband", "Mask band to read (0 indexed). Provide band for each mask.", 0);
153  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box", 0.0);
154  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box", 0.0);
155  Optionpk<double> lrx_opt("lrx", "lrx", "Lower right x value bounding box", 0.0);
156  Optionpk<double> lry_opt("lry", "lry", "Lower right y value bounding box", 0.0);
157  Optionpk<string> crule_opt("cr", "crule", "Composite rule (overwrite, maxndvi, maxband, minband, mean, mode (only for byte images), median, sum, maxallbands, minallbands, stdev", "overwrite");
158  Optionpk<int> ruleBand_opt("cb", "cband", "band index used for the composite rule (e.g., for ndvi, use --cband=0 --cband=1 with 0 and 1 indices for red and nir band respectively", 0);
159  Optionpk<double> srcnodata_opt("srcnodata", "srcnodata", "invalid value(s) for input raster dataset");
160  Optionpk<int> bndnodata_opt("bndnodata", "bndnodata", "Band(s) in input image to check if pixel is valid (used for srcnodata, min and max options)", 0);
161  Optionpk<double> minValue_opt("min", "min", "flag values smaller or equal to this value as invalid.");
162  Optionpk<double> maxValue_opt("max", "max", "flag values larger or equal to this value as invalid.");
163  Optionpk<double> dstnodata_opt("dstnodata", "dstnodata", "nodata value to put in output raster dataset if not valid or out of bounds.", 0);
164  Optionpk<string> resample_opt("r", "resampling-method", "Resampling method (near: nearest neighbor, bilinear: bi-linear interpolation).", "near");
165  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", "");
166  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
167  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
168  Optionpk<string> projection_opt("a_srs", "a_srs", "Override the spatial reference for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid");
169  Optionpk<short> file_opt("file", "file", "write number of observations (1) or sequence nr of selected file (2) for each pixels as additional layer in composite", 0);
170  Optionpk<short> weight_opt("w", "weight", "Weights (type: short) for the composite, use one weight for each input file in same order as input files are provided). Use value 1 for equal weights.", 1);
171  Optionpk<short> class_opt("c", "class", "classes for multi-band output image: each band represents the number of observations for one specific class. Use value 0 for no multi-band output image.", 0);
172  Optionpk<string> colorTable_opt("ct", "ct", "color table file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
173  Optionpk<string> description_opt("d", "description", "Set image description");
174  Optionpk<bool> align_opt("align", "align", "Align output bounding box to input image",false);
175  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0,2);
176 
177  extent_opt.setHide(1);
178  cut_opt.setHide(1);
179  mask_opt.setHide(1);
180  msknodata_opt.setHide(1);
181  mskband_opt.setHide(1);
182  option_opt.setHide(1);
183  file_opt.setHide(1);
184  weight_opt.setHide(1);
185  class_opt.setHide(1);
186  colorTable_opt.setHide(1);
187  description_opt.setHide(1);
188 
189  bool doProcess;//stop process when program was invoked with help option (-h --help)
190  try{
191  doProcess=input_opt.retrieveOption(argc,argv);
192  output_opt.retrieveOption(argc,argv);
193  band_opt.retrieveOption(argc,argv);
194  dx_opt.retrieveOption(argc,argv);
195  dy_opt.retrieveOption(argc,argv);
196  extent_opt.retrieveOption(argc,argv);
197  cut_opt.retrieveOption(argc,argv);
198  mask_opt.retrieveOption(argc,argv);
199  msknodata_opt.retrieveOption(argc,argv);
200  mskband_opt.retrieveOption(argc,argv);
201  ulx_opt.retrieveOption(argc,argv);
202  uly_opt.retrieveOption(argc,argv);
203  lrx_opt.retrieveOption(argc,argv);
204  lry_opt.retrieveOption(argc,argv);
205  crule_opt.retrieveOption(argc,argv);
206  ruleBand_opt.retrieveOption(argc,argv);
207  srcnodata_opt.retrieveOption(argc,argv);
208  bndnodata_opt.retrieveOption(argc,argv);
209  minValue_opt.retrieveOption(argc,argv);
210  maxValue_opt.retrieveOption(argc,argv);
211  dstnodata_opt.retrieveOption(argc,argv);
212  resample_opt.retrieveOption(argc,argv);
213  otype_opt.retrieveOption(argc,argv);
214  oformat_opt.retrieveOption(argc,argv);
215  option_opt.retrieveOption(argc,argv);
216  projection_opt.retrieveOption(argc,argv);
217  file_opt.retrieveOption(argc,argv);
218  weight_opt.retrieveOption(argc,argv);
219  class_opt.retrieveOption(argc,argv);
220  colorTable_opt.retrieveOption(argc,argv);
221  description_opt.retrieveOption(argc,argv);
222  align_opt.retrieveOption(argc,argv);
223  verbose_opt.retrieveOption(argc,argv);
224  }
225  catch(string predefinedString){
226  std::cout << predefinedString << std::endl;
227  exit(0);
228  }
229  if(!doProcess){
230  cout << endl;
231  cout << "Usage: pkcomposite -i input [-i input]* -o output" << endl;
232  cout << endl;
233  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
234  exit(0);//help was invoked, stop processing
235  }
236 
237  std::map<std::string, crule::CRULE_TYPE> cruleMap;
238  // //initialize cruleMap
239  // enum CRULE_TYPE {overwrite=0, maxndvi=1, maxband=2, minband=3, validband=4, mean=5, mode=6, median=7,sum=8};
240 
241  cruleMap["overwrite"]=crule::overwrite;
242  cruleMap["maxndvi"]=crule::maxndvi;
243  cruleMap["maxband"]=crule::maxband;
244  cruleMap["minband"]=crule::minband;
245  cruleMap["validband"]=crule::validband;
246  cruleMap["mean"]=crule::mean;
247  cruleMap["mode"]=crule::mode;
248  cruleMap["median"]=crule::median;
249  cruleMap["sum"]=crule::sum;
250  cruleMap["maxallbands"]=crule::maxallbands;
251  cruleMap["minallbands"]=crule::minallbands;
252  cruleMap["stdev"]=crule::stdev;
253 
254  if(srcnodata_opt.size()){
255  while(srcnodata_opt.size()<bndnodata_opt.size())
256  srcnodata_opt.push_back(srcnodata_opt[0]);
257  }
258  while(bndnodata_opt.size()<srcnodata_opt.size())
259  bndnodata_opt.push_back(bndnodata_opt[0]);
260  if(minValue_opt.size()){
261  while(minValue_opt.size()<bndnodata_opt.size())
262  minValue_opt.push_back(minValue_opt[0]);
263  while(bndnodata_opt.size()<minValue_opt.size())
264  bndnodata_opt.push_back(bndnodata_opt[0]);
265  }
266  if(maxValue_opt.size()){
267  while(maxValue_opt.size()<bndnodata_opt.size())
268  maxValue_opt.push_back(maxValue_opt[0]);
269  while(bndnodata_opt.size()<maxValue_opt.size())
270  bndnodata_opt.push_back(bndnodata_opt[0]);
271  }
272  RESAMPLE theResample;
273  if(resample_opt[0]=="near"){
274  theResample=NEAR;
275  if(verbose_opt[0])
276  cout << "resampling: nearest neighbor" << endl;
277  }
278  else if(resample_opt[0]=="bilinear"){
279  theResample=BILINEAR;
280  if(verbose_opt[0])
281  cout << "resampling: bilinear interpolation" << endl;
282  }
283  else{
284  std::cout << "Error: resampling method " << resample_opt[0] << " not supported" << std::endl;
285  exit(1);
286  }
287 
288  if(input_opt.empty()){
289  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
290  exit(0);
291  }
292  int nband=0;
293  int nwriteBand=0;
294  int writeBand=0;
295  vector<short> bands;
296 
297  //get bounding box
298  double maxLRX=0;
299  double maxULY=0;
300  double minULX=0;
301  double minLRY=0;
302  double magic_x=1,magic_y=1;//magic pixel for GDAL map info
303 
304  GDALDataType theType=GDT_Unknown;
305  if(verbose_opt[0])
306  cout << "possible output data types: ";
307  for(int iType = 0; iType < GDT_TypeCount; ++iType){
308  if(verbose_opt[0])
309  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
310  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
311  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
312  otype_opt[0].c_str()))
313  theType=(GDALDataType) iType;
314  }
315  if(verbose_opt[0]){
316  cout << endl;
317  if(theType==GDT_Unknown)
318  cout << "Unknown output pixel type: " << otype_opt[0] << endl;
319  else
320  cout << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
321  }
322 
323  double dx=0;
324  double dy=0;
325  //get bounding box from extentReader if defined
326  ImgReaderOgr extentReader;
327  if(extent_opt.size()){
328  double e_ulx;
329  double e_uly;
330  double e_lrx;
331  double e_lry;
332  for(int iextent=0;iextent<extent_opt.size();++iextent){
333  extentReader.open(extent_opt[iextent]);
334  if(!(extentReader.getExtent(e_ulx,e_uly,e_lrx,e_lry))){
335  cerr << "Error: could not get extent from " << extent_opt[0] << endl;
336  exit(1);
337  }
338  if(!iextent){
339  ulx_opt[0]=e_ulx;
340  uly_opt[0]=e_uly;
341  lrx_opt[0]=e_lrx;
342  lry_opt[0]=e_lry;
343  }
344  else{
345  if(e_ulx<ulx_opt[0])
346  ulx_opt[0]=e_ulx;
347  if(e_uly>uly_opt[0])
348  uly_opt[0]=e_uly;
349  if(e_lrx>lrx_opt[0])
350  lrx_opt[0]=e_lrx;
351  if(e_lry<lry_opt[0])
352  lry_opt[0]=e_lry;
353  }
354  extentReader.close();
355  }
356  if(cut_opt.size())
357  extentReader.open(extent_opt[0]);
358  }
359 
360  if(verbose_opt[0])
361  cout << "--ulx=" << ulx_opt[0] << " --uly=" << uly_opt[0] << " --lrx=" << lrx_opt[0] << " --lry=" << lry_opt[0] << endl;
362 
363  vector<ImgReaderGdal> imgReader(input_opt.size());
364  string theProjection="";
365  GDALColorTable* theColorTable=NULL;
366  string imageType;
367  bool init=false;
368  for(int ifile=0;ifile<input_opt.size();++ifile){
369  try{
370  imgReader[ifile].open(input_opt[ifile]);
371  }
372  catch(string errorstring){
373  cerr << errorstring << " " << input_opt[ifile] << endl;
374  }
375 
376  //todo: must be in init part only?
377  if(colorTable_opt.empty())
378  if(imgReader[ifile].getColorTable())
379  theColorTable=(imgReader[ifile].getColorTable()->Clone());
380  if(projection_opt.empty())
381  theProjection=imgReader[ifile].getProjection();
382  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
383  string theInterleave="INTERLEAVE=";
384  theInterleave+=imgReader[ifile].getInterleave();
385  option_opt.push_back(theInterleave);
386  }
387 
388  if((ulx_opt[0]||uly_opt[0]||lrx_opt[0]||lry_opt[0])&&(!imgReader[ifile].covers(ulx_opt[0],uly_opt[0],lrx_opt[0],lry_opt[0]))){
389  if(verbose_opt[0])
390  cout << input_opt[ifile] << " not within bounding box, skipping..." << endl;
391  // imgReader.close();
392  continue;
393  }
394  double theULX, theULY, theLRX, theLRY;
395  imgReader[ifile].getBoundingBox(theULX,theULY,theLRX,theLRY);
396  if(theLRY>theULY){
397  cerr << "Error: " << input_opt[ifile] << " is not georeferenced, only referenced images are supported for pkcomposite " << endl;
398  exit(1);
399  }
400  if(verbose_opt[0])
401  cout << "Bounding Box (ULX ULY LRX LRY): " << fixed << setprecision(6) << theULX << " " << theULY << " " << theLRX << " " << theLRY << endl;
402  if(!init){
403  if(verbose_opt[0]){
404  switch(cruleMap[crule_opt[0]]){
405  default:
406  case(crule::overwrite):
407  cout << "Composite rule: overwrite" << endl;
408  break;
409  case(crule::maxndvi):
410  cout << "Composite rule: max ndvi" << endl;
411  break;
412  case(crule::maxband):
413  cout << "Composite rule: max band" << endl;
414  break;
415  case(crule::minband):
416  cout << "Composite rule: min band" << endl;
417  break;
418  case(crule::validband):
419  cout << "Composite rule: valid band" << endl;
420  break;
421  case(crule::mean):
422  cout << "Composite rule: mean value" << endl;
423  break;
424  case(crule::mode):
425  cout << "Composite rule: max voting (only for byte images)" << endl;
426  break;
427  case(crule::median):
428  cout << "Composite rule: median" << endl;
429  break;
430  case(crule::stdev):
431  cout << "Composite rule: stdev" << endl;
432  break;
433  case(crule::sum):
434  cout << "Composite rule: sum" << endl;
435  break;
436  case(crule::minallbands):
437  cout << "Composite rule: minallbands" << endl;
438  break;
439  case(crule::maxallbands):
440  cout << "Composite rule: maxallbands" << endl;
441  break;
442  }
443  }
444  if(band_opt.size()){
445  nband=band_opt.size();
446  bands.resize(band_opt.size());
447  for(int iband=0;iband<band_opt.size();++iband){
448  bands[iband]=band_opt[iband];
449  assert(bands[iband]<imgReader[ifile].nrOfBand());
450  }
451  }
452  else{
453  nband=imgReader[ifile].nrOfBand();
454  bands.resize(nband);
455  for(int iband=0;iband<nband;++iband)
456  bands[iband]=iband;
457  }
458  for(int iband=0;iband<bndnodata_opt.size();++iband){
459  assert(bndnodata_opt[iband]>=0&&bndnodata_opt[iband]<nband);
460  }
461  //if output type not set, get type from input image
462  if(theType==GDT_Unknown){
463  theType=imgReader[ifile].getDataType();
464  if(verbose_opt[0])
465  cout << "Using data type from input image: " << GDALGetDataTypeName(theType) << endl;
466  }
467 
468  if(oformat_opt.size())//default
469  imageType=oformat_opt[0];
470  else
471  imageType=imgReader[ifile].getImageType();
472 
473  // dataType=imgReader.getDataType(0);
474  if(verbose_opt[0]){
475  cout << "type of data for " << input_opt[ifile] << ": " << theType << endl;
476  cout << "nband: " << nband << endl;
477  }
478 
479  maxLRX=theLRX;
480  maxULY=theULY;
481  minULX=theULX;
482  minLRY=theLRY;
483  if(dx_opt.size())
484  dx=dx_opt[0];
485  else
486  dx=imgReader[ifile].getDeltaX();
487  if(dy_opt.size())
488  dy=dy_opt[0];
489  else
490  dy=imgReader[ifile].getDeltaY();
491  // imgReader.getMagicPixel(magic_x,magic_y);
492  init=true;
493  }
494  else{
495  //convert bounding box to magic coordinates
496  //check uniformity magic pixel
497  // double test_x,test_y;
498  // imgReader.getMagicPixel(test_x,test_y);
499  // if(verbose_opt[0]){
500  // cout << "magic_x, magic_y: " << magic_x << ", " << magic_y << endl;
501  // }
502  // assert(magic_x==test_x);
503  // assert(magic_y==test_y);
504  maxLRX=(theLRX>maxLRX)?theLRX:maxLRX;
505  maxULY=(theULY>maxULY)?theULY:maxULY;
506  minULX=(theULX<minULX)?theULX:minULX;
507  minLRY=(theLRY<minLRY)?theLRY:minLRY;
508  }
509  // imgReader.close();
510  }
511  if(verbose_opt[0])
512  cout << "bounding box input images (ULX ULY LRX LRY): " << fixed << setprecision(6) << minULX << " " << maxULY << " " << maxLRX << " " << minLRY << endl;
513  if(ulx_opt[0]||uly_opt[0]||lrx_opt[0]||lry_opt[0]){
514  maxLRX=lrx_opt[0];
515  maxULY=uly_opt[0];
516  minULX=ulx_opt[0];
517  minLRY=lry_opt[0];
518  }
519 
520  bool forceEUgrid=false;
521  if(projection_opt.size())
522  forceEUgrid=(!(projection_opt[0].compare("EPSG:3035"))||!(projection_opt[0].compare("EPSG:3035"))||projection_opt[0].find("ETRS-LAEA")!=string::npos);
523  if(forceEUgrid){
524  //force to LAEA grid
525  minULX=floor(minULX);
526  minULX-=static_cast<int>(minULX)%(static_cast<int>(dx));
527  maxULY=ceil(maxULY);
528  if(static_cast<int>(maxULY)%static_cast<int>(dy))
529  maxULY+=dy;
530  maxULY-=static_cast<int>(maxULY)%(static_cast<int>(dy));
531  maxLRX=ceil(maxLRX);
532  if(static_cast<int>(maxLRX)%static_cast<int>(dx))
533  maxLRX+=dx;
534  maxLRX-=static_cast<int>(maxLRX)%(static_cast<int>(dx));
535  minLRY=floor(minLRY);
536  minLRY-=static_cast<int>(minLRY)%(static_cast<int>(dy));
537  }
538  else if(align_opt[0]){
539  if(minULX>imgReader[0].getUlx())
540  minULX-=fmod(minULX-imgReader[0].getUlx(),dx);
541  else if(minULX<imgReader[0].getUlx())
542  minULX+=fmod(imgReader[0].getUlx()-minULX,dx)-dx;
543  if(maxLRX<imgReader[0].getLrx())
544  maxLRX+=fmod(imgReader[0].getLrx()-maxLRX,dx);
545  else if(maxLRX>imgReader[0].getLrx())
546  maxLRX-=fmod(maxLRX-imgReader[0].getLrx(),dx)+dx;
547  if(minLRY>imgReader[0].getLry())
548  minLRY-=fmod(minLRY-imgReader[0].getLry(),dy);
549  else if(minLRY<imgReader[0].getLry())
550  minLRY+=fmod(imgReader[0].getLry()-minLRY,dy)-dy;
551  if(maxULY<imgReader[0].getUly())
552  maxULY+=fmod(imgReader[0].getUly()-maxULY,dy);
553  else if(maxULY>imgReader[0].getUly())
554  maxULY-=fmod(maxULY-imgReader[0].getUly(),dy)+dy;
555  }
556 
557  if(verbose_opt[0])
558  cout << "bounding box composite image (ULX ULY LRX LRY): " << fixed << setprecision(6) << minULX << " " << maxULY << " " << maxLRX << " " << minLRY << endl;
559  //initialize image
560  if(verbose_opt[0])
561  cout << "initializing composite image..." << endl;
562 // double dcol=(maxLRX-minULX+dx-1)/dx;
563 // double drow=(maxULY-minLRY+dy-1)/dy;
564 // int ncol=static_cast<int>(dcol);
565 // int nrow=static_cast<int>(drow);
566 
567  int ncol=ceil((maxLRX-minULX)/dx);
568  int nrow=ceil((maxULY-minLRY)/dy);
569 
570  if(verbose_opt[0])
571  cout << "composite image dim (nrow x ncol): " << nrow << " x " << ncol << endl;
572  ImgWriterGdal imgWriter;
573  while(weight_opt.size()<input_opt.size())
574  weight_opt.push_back(weight_opt[0]);
575  if(verbose_opt[0]){
576  std::cout << weight_opt << std::endl;
577  }
578  if(cruleMap[crule_opt[0]]==crule::mode){
579  nwriteBand=(file_opt[0])? class_opt.size()+1:class_opt.size();
580  }
581  else
582  nwriteBand=(file_opt[0])? bands.size()+1:bands.size();
583  if(output_opt.empty()){
584  std::cerr << "No output file provided (use option -o). Use --help for help information" << std::endl;
585  exit(0);
586  }
587  if(verbose_opt[0])
588  cout << "open output image " << output_opt[0] << " with " << nwriteBand << " bands" << endl << flush;
589  try{
590  imgWriter.open(output_opt[0],ncol,nrow,nwriteBand,theType,imageType,option_opt);
591  for(int iband=0;iband<nwriteBand;++iband)
592  imgWriter.GDALSetNoDataValue(dstnodata_opt[0],iband);
593  }
594  catch(string error){
595  cout << error << endl;
596  }
597  if(description_opt.size())
598  imgWriter.setImageDescription(description_opt[0]);
599  double gt[6];
600  gt[0]=minULX;
601  gt[1]=dx;
602  gt[2]=0;
603  gt[3]=maxULY;
604  gt[4]=0;
605  gt[5]=-dy;
606  imgWriter.setGeoTransform(gt);
607  // imgWriter.setGeoTransform(minULX,maxULY,dx,dy,0,0);
608  if(projection_opt.size()){
609  if(verbose_opt[0])
610  cout << "projection: " << projection_opt[0] << endl;
611  imgWriter.setProjectionProj4(projection_opt[0]);
612  }
613  else if(theProjection!=""){
614  if(verbose_opt[0])
615  cout << "projection: " << theProjection << endl;
616  imgWriter.setProjection(theProjection);
617  }
618  if(imgWriter.getDataType()==GDT_Byte){
619  if(colorTable_opt.size()){
620  if(colorTable_opt[0]!="none")
621  imgWriter.setColorTable(colorTable_opt[0]);
622  }
623  else if(theColorTable)
624  imgWriter.setColorTable(theColorTable);
625  }
626 
627  ImgWriterGdal maskWriter;
628  if(extent_opt.size()&&cut_opt[0]){
629  try{
630  maskWriter.open("/vsimem/mask.tif",ncol,nrow,1,GDT_Float32,"GTiff",option_opt);
631  double gt[6];
632  gt[0]=minULX;
633  gt[1]=dx;
634  gt[2]=0;
635  gt[3]=maxULY;
636  gt[4]=0;
637  gt[5]=-dy;
638  maskWriter.setGeoTransform(gt);
639  if(projection_opt.size())
640  maskWriter.setProjectionProj4(projection_opt[0]);
641  else if(theProjection!=""){
642  if(verbose_opt[0])
643  cout << "projection: " << theProjection << endl;
644  maskWriter.setProjection(theProjection);
645  }
646 
647  //todo: handle multiple extent options
648  vector<double> burnValues(1,1);//burn value is 1 (single band)
649  maskWriter.rasterizeOgr(extentReader,burnValues);
650  maskWriter.close();
651  }
652  catch(string error){
653  cerr << error << std::endl;
654  exit(2);
655  }
656  catch(...){
657  cerr << "error caught" << std::endl;
658  exit(1);
659  }
660  //todo: support multiple masks
661  mask_opt.clear();
662  mask_opt.push_back("/vsimem/mask.tif");
663  }
664  ImgReaderGdal maskReader;
665  if(mask_opt.size()){
666  try{
667  if(verbose_opt[0]>=1)
668  std::cout << "opening mask image file " << mask_opt[0] << std::endl;
669  maskReader.open(mask_opt[0]);
670  if(mskband_opt[0]>=maskReader.nrOfBand()){
671  string errorString="Error: illegal mask band";
672  throw(errorString);
673  }
674  }
675  catch(string error){
676  cerr << error << std::endl;
677  exit(2);
678  }
679  catch(...){
680  cerr << "error caught" << std::endl;
681  exit(1);
682  }
683  }
684 
685  //create composite image
686  if(verbose_opt[0])
687  cout << "creating composite image" << endl;
688  Vector2d<double> writeBuffer(nband,imgWriter.nrOfCol());
689  vector<short> fileBuffer(ncol);//holds the number of used files
690  Vector2d<short> maxBuffer;//buffer used for maximum voting
691  // Vector2d<double> readBuffer(nband);
692  vector<Vector2d<double> > readBuffer(input_opt.size());
693  for(int ifile=0;ifile<input_opt.size();++ifile)
694  readBuffer[ifile].resize(imgReader[ifile].nrOfBand());
696  if(cruleMap[crule_opt[0]]==crule::maxndvi)//ndvi
697  assert(ruleBand_opt.size()==2);
698  if(cruleMap[crule_opt[0]]==crule::mode){//max voting
699  maxBuffer.resize(imgWriter.nrOfCol(),256);//use only byte images for max voting
700  for(int iclass=0;iclass<class_opt.size();++iclass)
701  assert(class_opt[iclass]<maxBuffer.size());
702  }
703  int jb=0;
704  double readRow=0;
705  double readCol=0;
706  double lowerCol=0;
707  double upperCol=0;
708  const char* pszMessage;
709  void* pProgressArg=NULL;
710  GDALProgressFunc pfnProgress=GDALTermProgress;
711  double progress=0;
712  pfnProgress(progress,pszMessage,pProgressArg);
713  for(int irow=0;irow<imgWriter.nrOfRow();++irow){
714  vector<float> lineMask;
715  Vector2d< vector<double> > storeBuffer;
716  vector<bool> writeValid(ncol);
717 
718  //convert irow to geo
719  double x=0;
720  double y=0;
721  imgWriter.image2geo(0,irow,x,y);
722 
723 
724  if(cruleMap[crule_opt[0]]==crule::mean ||
725  cruleMap[crule_opt[0]]==crule::median ||
726  cruleMap[crule_opt[0]]==crule::sum ||
727  cruleMap[crule_opt[0]]==crule::minallbands ||
728  cruleMap[crule_opt[0]]==crule::maxallbands ||
729  cruleMap[crule_opt[0]]==crule::stdev)
730  storeBuffer.resize(nband,ncol);
731  for(int icol=0;icol<imgWriter.nrOfCol();++icol){
732  writeValid[icol]=false;
733  fileBuffer[icol]=0;
734  if(cruleMap[crule_opt[0]]==crule::mode){//max voting
735  for(int iclass=0;iclass<256;++iclass)
736  maxBuffer[icol][iclass]=0;
737  }
738  else{
739  for(int iband=0;iband<nband;++iband)
740  writeBuffer[iband][icol]=dstnodata_opt[0];
741  }
742  }
743 
744  double oldRowMask=-1;//keep track of row mask to optimize number of line readings
745 
746  for(int ifile=0;ifile<input_opt.size();++ifile){
747  //imgReader already open...
748  // try{
749  // imgReader.open(input_opt[ifile]);
750  // }
751  // catch(string error){
752  // cout << error << endl;
753  // }
754  // assert(imgReader.getDataType()==theType);
755  assert(imgReader[ifile].nrOfBand()>=nband);
756  if(!imgReader[ifile].covers(minULX,maxULY,maxLRX,minLRY)){
757  // imgReader.close();
758  continue;
759  }
760  double uli,ulj,lri,lrj;
761  imgReader[ifile].geo2image(minULX+(magic_x-1.0)*imgReader[ifile].getDeltaX(),maxULY-(magic_y-1.0)*imgReader[ifile].getDeltaY(),uli,ulj);
762  imgReader[ifile].geo2image(maxLRX+(magic_x-2.0)*imgReader[ifile].getDeltaX(),minLRY-(magic_y-2.0)*imgReader[ifile].getDeltaY(),lri,lrj);
763  uli=floor(uli);
764  ulj=floor(ulj);
765  lri=floor(lri);
766  lrj=floor(lrj);
767 
768  double startCol=uli;
769  double endCol=lri;
770  if(uli<0)
771  startCol=0;
772  else if(uli>=imgReader[ifile].nrOfCol())
773  startCol=imgReader[ifile].nrOfCol()-1;
774  if(lri<0)
775  endCol=0;
776  else if(lri>=imgReader[ifile].nrOfCol())
777  endCol=imgReader[ifile].nrOfCol()-1;
778  int readncol=endCol-startCol+1;
779 
780  //lookup corresponding row for irow in this file
781  imgReader[ifile].geo2image(x,y,readCol,readRow);
782  if(readRow<0||readRow>=imgReader[ifile].nrOfRow()){
783  // imgReader.close();
784  continue;
785  }
786  // for(int iband=0;iband<imgReader.nrOfBand();++iband){
787  for(int iband=0;iband<nband;++iband){
788  int readBand=(band_opt.size()>iband)? band_opt[iband] : iband;
789  // readBuffer[iband].resize(readncol);
790  try{
791  imgReader[ifile].readData(readBuffer[ifile][iband],GDT_Float64,startCol,endCol,readRow,readBand,theResample);
792  }
793  catch(string error){
794  cerr << "error reading image " << input_opt[ifile] << ": " << endl;
795  throw;
796  }
797  }
798 
799  for(int ib=0;ib<ncol;++ib){
800  imgWriter.image2geo(ib,irow,x,y);
801  //check mask first
802  bool valid=true;
803  if(mask_opt.size()){
804  //read mask
805  double colMask=0;
806  double rowMask=0;
807 
808  maskReader.geo2image(x,y,colMask,rowMask);
809  colMask=static_cast<int>(colMask);
810  rowMask=static_cast<int>(rowMask);
811  if(rowMask>=0&&rowMask<maskReader.nrOfRow()&&colMask>=0&&colMask<maskReader.nrOfCol()){
812  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask)){
813 
814  assert(rowMask>=0&&rowMask<maskReader.nrOfRow());
815  try{
816  maskReader.readData(lineMask,GDT_Float32,static_cast<int>(rowMask),mskband_opt[0]);
817  }
818  catch(string errorstring){
819  cerr << errorstring << endl;
820  exit(1);
821  }
822  catch(...){
823  cerr << "error caught" << std::endl;
824  exit(3);
825  }
826  oldRowMask=rowMask;
827  }
828  if(lineMask[colMask]==msknodata_opt[0])
829  valid=false;
830  }
831  }
832 
833  if(!valid)
834  continue;
835 
836  //lookup corresponding row for irow in this file
837  imgReader[ifile].geo2image(x,y,readCol,readRow);
838  if(readCol<0||readCol>=imgReader[ifile].nrOfCol())
839  continue;
840  double val_current=0;
841  double val_new=0;
842  bool readValid=true;
843  switch(theResample){
844  case(BILINEAR):
845  lowerCol=readCol-0.5;
846  lowerCol=static_cast<int>(lowerCol);
847  upperCol=readCol+0.5;
848  upperCol=static_cast<int>(upperCol);
849  if(lowerCol<0)
850  lowerCol=0;
851  if(upperCol>=imgReader[ifile].nrOfCol())
852  upperCol=imgReader[ifile].nrOfCol()-1;
853  for(int vband=0;vband<bndnodata_opt.size();++vband){
854  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][bndnodata_opt[vband]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][bndnodata_opt[vband]][lowerCol-startCol];
855  if(minValue_opt.size()>vband){
856  if(val_new<=minValue_opt[vband]){
857  readValid=false;
858  break;
859  }
860  }
861  if(maxValue_opt.size()>vband){
862  if(val_new>=maxValue_opt[vband]){
863  readValid=false;
864  break;
865  }
866  }
867  if(srcnodata_opt.size()>vband){
868  if(val_new==srcnodata_opt[vband]){
869  readValid=false;
870  break;
871  }
872  }
873  }
874  break;
875  default:
876  readCol=static_cast<int>(readCol);
877  for(int vband=0;vband<bndnodata_opt.size();++vband){
878  val_new=readBuffer[ifile][bndnodata_opt[vband]][readCol-startCol];
879  if(minValue_opt.size()>vband){
880  if(val_new<=minValue_opt[vband]){
881  readValid=false;
882  break;
883  }
884  }
885  if(maxValue_opt.size()>vband){
886  if(val_new>=maxValue_opt[vband]){
887  readValid=false;
888  break;
889  }
890  }
891  if(srcnodata_opt.size()>vband){
892  if(val_new==srcnodata_opt[vband]){
893  readValid=false;
894  break;
895  }
896  }
897  }
898  break;
899  }
900  if(readValid){
901  if(file_opt[0]==1)
902  ++fileBuffer[ib];
903  if(writeValid[ib]){
904  int iband=0;
905  switch(cruleMap[crule_opt[0]]){
906  case(crule::maxndvi):{//max ndvi
907  double red_current=writeBuffer[ruleBand_opt[0]][ib];
908  double nir_current=writeBuffer[ruleBand_opt[1]][ib];
909  double ndvi_current=0;
910  if(red_current+nir_current>0&&red_current>=0&&nir_current>=0)
911  ndvi_current=(nir_current-red_current)/(nir_current+red_current);
912  double ndvi_new=0;
913  double red_new=0;
914  double nir_new=0;
915  switch(theResample){
916  case(BILINEAR):
917  lowerCol=readCol-0.5;
918  lowerCol=static_cast<int>(lowerCol);
919  upperCol=readCol+0.5;
920  upperCol=static_cast<int>(upperCol);
921  if(lowerCol<0)
922  lowerCol=0;
923  if(upperCol>=imgReader[ifile].nrOfCol())
924  upperCol=imgReader[ifile].nrOfCol()-1;
925  red_new=(readCol-0.5-lowerCol)*readBuffer[ifile][ruleBand_opt[0]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][ruleBand_opt[0]][lowerCol-startCol];
926  nir_new=(readCol-0.5-lowerCol)*readBuffer[ifile][ruleBand_opt[1]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][ruleBand_opt[1]][lowerCol-startCol];
927  if(red_new+nir_new>0&&red_new>=0&&nir_new>=0)
928  ndvi_new=(nir_new-red_new)/(nir_new+red_new);
929  if(ndvi_new>=ndvi_current){
930  for(iband=0;iband<nband;++iband){
931  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
932  writeBuffer[iband][ib]=val_new;
933  }
934  if(file_opt[0]>1)
935  fileBuffer[ib]=ifile;
936  }
937  break;
938  default:
939  readCol=static_cast<int>(readCol);
940  red_new=readBuffer[ifile][ruleBand_opt[0]][readCol-startCol];
941  nir_new=readBuffer[ifile][ruleBand_opt[1]][readCol-startCol];
942  if(red_new+nir_new>0&&red_new>=0&&nir_new>=0)
943  ndvi_new=(nir_new-red_new)/(nir_new+red_new);
944  if(ndvi_new>=ndvi_current){
945  for(iband=0;iband<nband;++iband){
946  val_new=readBuffer[ifile][iband][readCol-startCol];
947  writeBuffer[iband][ib]=val_new;
948  }
949  if(file_opt[0]>1)
950  fileBuffer[ib]=ifile;
951  }
952  break;
953  }
954  break;
955  }
956  case(crule::maxband):
957  case(crule::minband):
958  case(crule::validband)://max,min,valid band
959  val_current=writeBuffer[ruleBand_opt[0]][ib];
960  switch(theResample){
961  case(BILINEAR):
962  lowerCol=readCol-0.5;
963  lowerCol=static_cast<int>(lowerCol);
964  upperCol=readCol+0.5;
965  upperCol=static_cast<int>(upperCol);
966  if(lowerCol<0)
967  lowerCol=0;
968  if(upperCol>=imgReader[ifile].nrOfCol())
969  upperCol=imgReader[ifile].nrOfCol()-1;
970  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][ruleBand_opt[0]][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][ruleBand_opt[0]][lowerCol-startCol];
971  val_new*=weight_opt[ifile];
972  if((cruleMap[crule_opt[0]]==crule::maxband&&val_new>val_current)||(cruleMap[crule_opt[0]]==crule::minband&&val_new<val_current)||(cruleMap[crule_opt[0]]==crule::validband)){//&&val_new>minValue_opt[0]&&val_new<maxValue_opt[0])){
973  for(iband=0;iband<nband;++iband){
974  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
975  val_new*=weight_opt[ifile];
976  writeBuffer[iband][ib]=val_new;
977  }
978  if(file_opt[0]>1)
979  fileBuffer[ib]=ifile;
980  }
981  break;
982  default:
983  readCol=static_cast<int>(readCol);
984  val_new=readBuffer[ifile][ruleBand_opt[0]][readCol-startCol];
985  val_new*=weight_opt[ifile];
986  if((cruleMap[crule_opt[0]]==crule::maxband&&val_new>val_current)||(cruleMap[crule_opt[0]]==crule::minband&&val_new<val_current)||(cruleMap[crule_opt[0]]==crule::validband)){//&&val_new>minValue_opt[0]&&val_new<maxValue_opt[0])){
987  for(iband=0;iband<nband;++iband){
988  val_new=readBuffer[ifile][iband][readCol-startCol];
989  val_new*=weight_opt[ifile];
990  writeBuffer[iband][ib]=val_new;
991  }
992  if(file_opt[0]>1)
993  fileBuffer[ib]=ifile;
994  }
995  break;
996  }
997  break;
998  case(crule::mode)://max voting (only for Byte images)
999  switch(theResample){
1000  case(BILINEAR):
1001  lowerCol=readCol-0.5;
1002  lowerCol=static_cast<int>(lowerCol);
1003  upperCol=readCol+0.5;
1004  upperCol=static_cast<int>(upperCol);
1005  if(lowerCol<0)
1006  lowerCol=0;
1007  if(upperCol>=imgReader[ifile].nrOfCol())
1008  upperCol=imgReader[ifile].nrOfCol()-1;
1009  for(iband=0;iband<nband;++iband){
1010  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
1011  maxBuffer[ib][val_new]=maxBuffer[ib][val_new]+weight_opt[ifile];
1012  // ++(maxBuffer[ib][val_new]);
1013  }
1014  break;
1015  default:
1016  readCol=static_cast<int>(readCol);
1017  for(iband=0;iband<nband;++iband){
1018  val_new=readBuffer[ifile][iband][readCol-startCol];
1019  maxBuffer[ib][val_new]=maxBuffer[ib][val_new]+weight_opt[ifile];
1020  }
1021  break;
1022  }
1023  break;
1024  case(crule::mean)://mean value
1025  case(crule::median)://median value
1026  case(crule::sum)://sum value
1027  case(crule::minallbands)://minimum for each and every band
1028  case(crule::maxallbands)://maximum for each and every band
1029  case(crule::stdev)://maximum for each and every band
1030  switch(theResample){
1031  case(BILINEAR):
1032  lowerCol=readCol-0.5;
1033  lowerCol=static_cast<int>(lowerCol);
1034  upperCol=readCol+0.5;
1035  upperCol=static_cast<int>(upperCol);
1036  if(lowerCol<0)
1037  lowerCol=0;
1038  if(upperCol>=imgReader[ifile].nrOfCol())
1039  upperCol=imgReader[ifile].nrOfCol()-1;
1040  for(iband=0;iband<nband;++iband){
1041  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
1042  val_new*=weight_opt[ifile];
1043  storeBuffer[iband][ib].push_back(val_new);
1044  }
1045  break;
1046  default:
1047  readCol=static_cast<int>(readCol);
1048  for(iband=0;iband<nband;++iband){
1049  val_new=readBuffer[ifile][iband][readCol-startCol];
1050  val_new*=weight_opt[ifile];
1051  storeBuffer[iband][ib].push_back(val_new);
1052  assert(ifile>0);
1053  // assert(weight_opt[ifile]>=0);
1054  // assert(storeBuffer[iband][ib].back()>=0);
1055  }
1056  break;
1057  }
1058  if(file_opt[0]>1)
1059  fileBuffer[ib]=ifile;
1060  break;
1061  case(crule::overwrite):
1062  default:
1063  switch(theResample){
1064  case(BILINEAR):
1065  lowerCol=readCol-0.5;
1066  lowerCol=static_cast<int>(lowerCol);
1067  upperCol=readCol+0.5;
1068  upperCol=static_cast<int>(upperCol);
1069  if(lowerCol<0)
1070  lowerCol=0;
1071  if(upperCol>=imgReader[ifile].nrOfCol())
1072  upperCol=imgReader[ifile].nrOfCol()-1;
1073  for(iband=0;iband<nband;++iband){
1074  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
1075  val_new*=weight_opt[ifile];
1076  writeBuffer[iband][ib]=val_new;
1077  }
1078  break;
1079  default:
1080  readCol=static_cast<int>(readCol);
1081  for(iband=0;iband<nband;++iband){
1082  val_new=readBuffer[ifile][iband][readCol-startCol];
1083  val_new*=weight_opt[ifile];
1084  writeBuffer[iband][ib]=val_new;
1085  }
1086  break;
1087  }
1088  if(file_opt[0]>1)
1089  fileBuffer[ib]=ifile;
1090  break;
1091  }
1092  }
1093  else{
1094  writeValid[ib]=true;//readValid was true
1095  int iband=0;
1096  switch(cruleMap[crule_opt[0]]){
1097  case(crule::mean):
1098  case(crule::median):
1099  case(crule::sum):
1100  case(crule::minallbands):
1101  case(crule::maxallbands):
1102  case(crule::stdev):
1103  switch(theResample){
1104  case(BILINEAR):
1105  lowerCol=readCol-0.5;
1106  lowerCol=static_cast<int>(lowerCol);
1107  upperCol=readCol+0.5;
1108  upperCol=static_cast<int>(upperCol);
1109  if(lowerCol<0)
1110  lowerCol=0;
1111  if(upperCol>=imgReader[ifile].nrOfCol())
1112  upperCol=imgReader[ifile].nrOfCol()-1;
1113  for(iband=0;iband<nband;++iband){
1114  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
1115  val_new*=weight_opt[ifile];
1116  storeBuffer[iband][ib].push_back(val_new);
1117  }
1118  break;
1119  default:
1120  readCol=static_cast<int>(readCol);
1121  for(iband=0;iband<nband;++iband){
1122  val_new=readBuffer[ifile][iband][readCol-startCol];
1123  val_new*=weight_opt[ifile];
1124  storeBuffer[iband][ib].push_back(val_new);
1125  }
1126  break;
1127  }
1128  if(file_opt[0]>1)
1129  fileBuffer[ib]=ifile;
1130  break;
1131  case(crule::mode):
1132  switch(theResample){
1133  case(BILINEAR):
1134  lowerCol=readCol-0.5;
1135  lowerCol=static_cast<int>(lowerCol);
1136  upperCol=readCol+0.5;
1137  upperCol=static_cast<int>(upperCol);
1138  if(lowerCol<0)
1139  lowerCol=0;
1140  if(upperCol>=imgReader[ifile].nrOfCol())
1141  upperCol=imgReader[ifile].nrOfCol()-1;
1142  for(iband=0;iband<nband;++iband){
1143  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
1144  maxBuffer[ib][val_new]=maxBuffer[ib][val_new]+weight_opt[ifile];
1145  // ++(maxBuffer[ib][val_new]);
1146  }
1147  break;
1148  default:
1149  readCol=static_cast<int>(readCol);
1150  for(iband=0;iband<nband;++iband){
1151  val_new=readBuffer[ifile][iband][readCol-startCol];
1152  maxBuffer[ib][val_new]=maxBuffer[ib][val_new]+weight_opt[ifile];
1153  }
1154  // ++(maxBuffer[ib][val_new]);
1155  break;
1156  }
1157  break;
1158  default:
1159  switch(theResample){
1160  case(BILINEAR):
1161  lowerCol=readCol-0.5;
1162  lowerCol=static_cast<int>(lowerCol);
1163  upperCol=readCol+0.5;
1164  upperCol=static_cast<int>(upperCol);
1165  if(lowerCol<0)
1166  lowerCol=0;
1167  if(upperCol>=imgReader[ifile].nrOfCol())
1168  upperCol=imgReader[ifile].nrOfCol()-1;
1169  for(iband=0;iband<nband;++iband){
1170  val_new=(readCol-0.5-lowerCol)*readBuffer[ifile][iband][upperCol-startCol]+(1-readCol+0.5+lowerCol)*readBuffer[ifile][iband][lowerCol-startCol];
1171  val_new*=weight_opt[ifile];
1172  writeBuffer[iband][ib]=val_new;
1173  }
1174  break;
1175  default:
1176  readCol=static_cast<int>(readCol);
1177  for(iband=0;iband<nband;++iband){
1178  val_new=readBuffer[ifile][iband][readCol-startCol];
1179  val_new*=weight_opt[ifile];
1180  writeBuffer[iband][ib]=val_new;
1181  }
1182  break;
1183  }
1184  if(file_opt[0]>1)
1185  fileBuffer[ib]=ifile;
1186  break;
1187  }
1188  }
1189  }
1190  }
1191  // imgReader.close();
1192  }
1193  if(cruleMap[crule_opt[0]]==crule::mode){
1194  vector<short> classBuffer(imgWriter.nrOfCol());
1195  if(class_opt.size()>1){
1196  for(int iclass=0;iclass<class_opt.size();++iclass){
1197  for(int icol=0;icol<imgWriter.nrOfCol();++icol)
1198  classBuffer[icol]=maxBuffer[icol][class_opt[iclass]];
1199  try{
1200  imgWriter.writeData(classBuffer,GDT_Int16,irow,iclass);
1201  }
1202  catch(string error){
1203  cerr << "error writing image file " << output_opt[0] << ": " << error << endl;
1204  throw;
1205  }
1206  }
1207  }
1208  else{
1209  for(int icol=0;icol<imgWriter.nrOfCol();++icol){
1210  vector<short>::iterator maxit=maxBuffer[icol].begin();
1211  maxit=stat.mymax(maxBuffer[icol],maxBuffer[icol].begin(),maxBuffer[icol].end());
1212  writeBuffer[0][icol]=distance(maxBuffer[icol].begin(),maxit);
1213  if(file_opt[0]>1)
1214  fileBuffer[icol]=*(maxit);
1215  }
1216  try{
1217  imgWriter.writeData(writeBuffer[0],GDT_Float64,irow,0);
1218  if(file_opt[0])
1219  imgWriter.writeData(fileBuffer,GDT_Int16,irow,1);
1220  }
1221  catch(string error){
1222  cerr << "error writing image file " << output_opt[0] << ": " << error << endl;
1223  throw;
1224  }
1225  }
1226  }
1227  else{
1228  for(int iband=0;iband<bands.size();++iband){
1229  // assert(writeBuffer[bands[iband]].size()==imgWriter.nrOfCol());
1230  assert(writeBuffer[iband].size()==imgWriter.nrOfCol());
1231  for(int icol=0;icol<imgWriter.nrOfCol();++icol){
1232  try{
1233  switch(cruleMap[crule_opt[0]]){
1234  case(crule::mean):
1235  // writeBuffer[iband][icol]=stat.mean(storeBuffer[bands[iband]][icol]);
1236  writeBuffer[iband][icol]=stat.mean(storeBuffer[iband][icol]);
1237  break;
1238  case(crule::median):
1239  // writeBuffer[iband][icol]=stat.median(storeBuffer[bands[iband]][icol]);
1240  writeBuffer[iband][icol]=stat.median(storeBuffer[iband][icol]);
1241  break;
1242  case(crule::sum):
1243  // writeBuffer[iband][icol]=stat.sum(storeBuffer[bands[iband]][icol]);
1244  writeBuffer[iband][icol]=stat.sum(storeBuffer[iband][icol]);
1245  break;
1246  case(crule::minallbands):
1247  // writeBuffer[iband][icol]=stat.mymin(storeBuffer[bands[iband]][icol]);
1248  writeBuffer[iband][icol]=stat.mymin(storeBuffer[iband][icol]);
1249  break;
1250  case(crule::maxallbands):
1251  // writeBuffer[iband][icol]=stat.mymax(storeBuffer[bands[iband]][icol]);
1252  writeBuffer[iband][icol]=stat.mymax(storeBuffer[iband][icol]);
1253  break;
1254  case(crule::stdev):
1255  // writeBuffer[iband][icol]=sqrt(stat.var(storeBuffer[bands[iband]][icol]));
1256  writeBuffer[iband][icol]=sqrt(stat.var(storeBuffer[iband][icol]));
1257  break;
1258  default:
1259  break;
1260  }
1261  }
1262  catch(string error){
1263  if(verbose_opt[0])
1264  cerr << error << endl;
1265  writeBuffer[iband][icol]=dstnodata_opt[0];
1266  continue;
1267  }
1268  }
1269  try{
1270  imgWriter.writeData(writeBuffer[iband],GDT_Float64,irow,iband);
1271  }
1272  catch(string error){
1273  cerr << error << " in " << output_opt[0] << endl;
1274  throw;
1275  }
1276  }
1277  if(file_opt[0]){
1278  try{
1279  imgWriter.writeData(fileBuffer,GDT_Int16,irow,bands.size());
1280  }
1281  catch(string error){
1282  cerr << error << " in " << output_opt[0] << endl;
1283  throw;
1284  }
1285  }
1286  }
1287  progress=static_cast<float>(irow+1.0)/imgWriter.nrOfRow();
1288  pfnProgress(progress,pszMessage,pProgressArg);
1289  }
1290  if(extent_opt.size()&&cut_opt.size()){
1291  extentReader.close();
1292  }
1293  for(int ifile=0;ifile<input_opt.size();++ifile)
1294  imgReader[ifile].close();
1295  if(mask_opt.size())
1296  maskReader.close();
1297  imgWriter.close();
1298 }
1299 
pktools-2.6.6/doc/html/structSolver_1_1SolutionInfo.html0000644000113200011300000001302512647637662020276 00000000000000 pktools: Solver::SolutionInfo Struct Reference
Solver::SolutionInfo Struct Reference

Public Attributes

double obj
 
double rho
 
double upper_bound_p
 
double upper_bound_n
 
double r
 

Detailed Description

Definition at line 400 of file svm.cpp.


The documentation for this struct was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop__inherit__graph.map0000644000113200011300000000011712616110567025343 00000000000000 pktools-2.6.6/doc/html/dir_b6b6de371025fb67c6b8623f3d3cd2ce.html0000644000113200011300000001061312647637663020123 00000000000000 pktools: /home/kempenep/pktools/qt/pkdiff_gui Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
pkdiff_gui Directory Reference
Directory dependency graph for pkdiff_gui:
/home/kempenep/pktools/qt/pkdiff_gui

Files

file  main.cpp [code]
 
file  mainwindow.cpp [code]
 
file  mainwindow.h [code]
 
pktools-2.6.6/doc/html/pkdumpogr_8h_source.html0000644000113200011300000005704712647637661016550 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkdumpogr.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdumpogr.h
1 /**********************************************************************
2 pkdumpogr.h: dump ogr file to text file or standard output
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <map>
21 #include "base/Vector2d.h"
22 #include "imageclasses/ImgReaderOgr.h"
23 
24 #ifndef _PKDUMPOGR_H_
25 #define _PKDUMPOGR_H_
26 
27 using namespace std;
28 
29 template<typename T> unsigned int readDataImageShape(const string &filename,
30  map<int,Vector2d<T> > &mapPixels, //[classNr][pixelNr][bandNr],
31  vector<string>& fields,
32  double start,
33  double end,
34  const string& label,
35  const string& query="",
36  int verbose=false);
37 
38 
39 template<typename T> unsigned int readDataImageShape(const string &filename,
40  map<int,Vector2d<T> > &mapPixels, //[classNr][pixelNr][bandNr],
41  vector<string>& fields,
42  double start,
43  double end,
44  const string& label,
45  const string& query,
46  int verbose)
47 {
48  mapPixels.clear();
49  int nsample=0;
50  int totalSamples=0;
51  int nband=0;
52  if(verbose)
53  cout << "reading shape file " << filename << endl;
54  ImgReaderOgr imgReaderShape;
55  try{
56  imgReaderShape.open(filename);
57  bool queryFound=false;
58  //only retain bands in fields
59  imgReaderShape.getFields(fields);
60  vector<string>::iterator fit=fields.begin();
61  if(verbose)
62  cout << "reading fields: ";
63  while(fit!=fields.end()){
64  if(verbose)
65  cout << *fit << " ";
66  size_t pos=(*fit).find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ ");
67  if(pos==string::npos){
68  if(query!=""){
69  if((*fit).find(query)!=string::npos)
70  queryFound=true;
71  }
72  fields.erase(fit);
73  }
74  else{
75  string fieldname=(*fit).substr(pos);
76  int iband=atoi(fieldname.c_str());
77  if((start||end)&&(iband<start||iband>end))
78  fields.erase(fit);
79  else
80  ++fit;
81  }
82  }
83  if(verbose)
84  cout << endl;
85  if(verbose){
86  cout << "fields:";
87  for(vector<string>::iterator fit=fields.begin();fit!=fields.end();++fit)
88  cout << " " << *fit;
89  cout << endl;
90  }
91  if(!nband){
92  if(queryFound){
93  ostringstream qs;
94  qs << "select * from " << imgReaderShape.getLayerName() << " where " << query << "=1";
95  if(verbose)
96  cout << "reading with sql: " << qs.str() << endl;
97  nband=imgReaderShape.readSql(mapPixels,OFTReal,fields,label,qs.str(),NULL,0,true,false);
98  }
99  else{
100  if(verbose)
101  cout << "reading data" << endl;
102  nband=imgReaderShape.readData(mapPixels,OFTReal,fields,label,0,true,verbose==2);
103  }
104  }
105  else{
106  if(queryFound){
107  ostringstream qs;
108  qs << "select * from " << imgReaderShape.getLayerName() << " where " << query << "=1";
109  if(verbose)
110  cout << "reading with sql: " << qs.str() << endl;
111  assert(nband==imgReaderShape.readSql(mapPixels,OFTReal,fields,label,qs.str(),NULL,0,true,false));
112  }
113  else
114  assert(nband==imgReaderShape.readData(mapPixels,OFTReal,fields,label,0,true,false));
115  }
116  }
117  catch(string e){
118  ostringstream estr;
119  estr << e << " " << filename;
120  throw(estr.str());
121  }
122  nsample=imgReaderShape.getFeatureCount();
123  totalSamples+=nsample;
124  if(verbose)
125  cout << ": " << nsample << " samples read with " << nband << " bands" << endl;
126  imgReaderShape.close();
127  if(verbose)
128  cout << "total number of samples read " << totalSamples << endl;
129  return totalSamples;
130 }
131 #endif //_PKDUMPOGR_H_
pktools-2.6.6/doc/html/pksieve.html0000644000113200011300000001204012647637662014210 00000000000000 pktools: pksieve
pktools  2.6.6
Processing Kernel for geospatial data
pksieve

program to sieve filter raster image

SYNOPSIS

Usage: pksieve -i input [-s size] -o output

Options: [-c 4|8] [-b band] [-m mask] [-ot type] [-of format] [-co option]* [-ct table]

Description

The utility pksieve filters small objects (maximum size defined with the option -s) in a raster by replacing them to the largest neighbor object. In this context, objects are defined as pixels of the same value that are also connected. The connection can be defined in four directions (N-S and W-E: set option -c 4) or eight directions (N-S, W-E and diagonals NW-SE, NE-SW: set option -c 8).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image file
    s size int 0 raster polygons with sizes smaller than this will be merged into their largest neighbour. No sieve is performed if size = 0
    o output std::string Output image file
    c connect int 8 the connectedness: 4 directions or 8 directions
    b band int 0 the band to be used from input file
    m mask std::string Use the first band of the specified file as a validity mask (zero is invalid, non-zero is valid).
    ot otype std::string Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
    co co std::string Creation option for output file. Multiple options can be specified.
    ct ct std::string color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)
    Usage: pksieve -i input [-s size] -o output

Examples

Some examples how to use pksieve can be found here

pktools-2.6.6/doc/html/classQMatrix-members.html0000644000113200011300000001011712647637662016610 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
QMatrix Member List

This is the complete list of members for QMatrix, including all inherited members.

get_Q(int column, int len) const =0 (defined in QMatrix)QMatrixpure virtual
get_QD() const =0 (defined in QMatrix)QMatrixpure virtual
swap_index(int i, int j) const =0 (defined in QMatrix)QMatrixpure virtual
~QMatrix() (defined in QMatrix)QMatrixinlinevirtual
pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm.html0000644000113200011300000002451412647637662020006 00000000000000 pktools: qgis.pksvm.pksvm Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pksvm.pksvm:
Collaboration diagram for qgis.pksvm.pksvm:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string TRAINING = "TRAINING"
 
string ITERATE = "ITERATE"
 
string LABEL = "LABEL"
 
string GAMMA = "GAMMA"
 
string COST = "COST"
 
string OUTPUT = "OUTPUT"
 
string MASK = "MASK"
 
string MSKNODATA = "MSKNODATA"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 40 of file pksvm.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pksetmask_1_1pksetmask-members.html0000644000113200011300000002075312647637662023143 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pksetmask.pksetmask Member List
pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid__inherit__graph.png0000644000113200011300000000757312616110567027041 00000000000000‰PNG  IHDRåpn ±bKGDÿÿÿ ½§“0IDATxœíÝ{P×ð³­Htx¨@¡$QQ°C‡éètjÁBß‚vDy´TQ´V­Ѫ:µàX„éT4ÛP† A0¢^ˆÅŠT%p‘úàÙŽ ! !Ù½ì½;)„ ½ÁpÒßçÎîaÏÙß9|›CEQL˜»Æò py8¼œ°Œ]ÀØ”Je}}=I’Æ.ÄÄ999988»Š1`W¹\ÞÕÕ5ù—kr¹¼££cò/2y¥yzz»SöÛo¿»„ûW€È+À äàò pbÊymhh âeõõ×_qôèQCÕ0Zw‚ þö°ø2å¼êÔÔÔdoo?#S•““ãêê*‰ 5æ´iÓöïß&²l¼üãòJ’dWW×DŒ|ïÞ½œ9s¦ººº®®Î cÚÛÛÓÖW6^L$¯ôófaaáܹswíÚ588È|•¢¨˜˜ooï?ÿüsÑ¢E¡™3gÒ_êé鉌Œ´··wqq‰‰‰Q*•£52$Éo¼ammÍáp„B!Óž““ãëëàáá1ò!–¢(>Ÿ?þ|[[Û÷Þ{ïÒ¥KôýÈ{Ñs)))quu=wî}Ù°²BÅÅÅ<oúôéIIIt AgÏž7ožƒƒÃÑ£G…B¡»»;›ÍŽ‹‹3ØB5éµ··K¥Rý×Ô××#„ëêê***x<^BBÝH’$VæJ¦cXX˜¿¿cccMM——WBB‚ÎF¦W__Ÿ••ŸÏokk;sæ ‹Åêëë£(Š$Iwww@@QÔ¡C‡<==µ £(*==ÝÙÙùêÕ«×®]ãñxtûh÷Z¶lYiiiuu5}Ù°²B+W®”Ëåb±!DO !´qãF¹\ž‘‘Z¿~½\.ÌzÔÖÖÖÖÖŽïc &•ךšúT$ñx<º166!ôèÑ#í+éc•JennÎ|Ÿòóóy<žÎF¦Www·……Errò³gÏH’|þü¹F£¡(ª¢¢‚Åbѱ¨¬¬DÝ»wOûv^^^?ýôSpvv6BHϽè¹0ÝGæõúõëEi4„P}}=Ý(“Éèy ;¦/З¼šÈ~€6{ölúÀÃ㥥…>¾s玟Ÿ_bbâÈëÛÛÛ5 —Ë¥Oy<^KK‹ÎF¦ËôéÓ¥RiEE…‹‹‹¯¯ï7ÌÌÌB999jµÚÞÞž „а-Acc£——s:þüÑ `¦ ²NNN!úS§"„,,,†› “Ê+ý „ª««£¿!‰DÂçósrr¤Ré°ëg̘annÞÔÔDŸ666:;;ëldº( ’$ÏŸ?ßÝݽyóæU«Vuwwk4‘H”’’òüöîÝ+‰(­Ï¹¹¹iÿŒþÁƒ£@™3C½T‡“ÊëîÝ»îܹsðàÁððpºqÊ”)sçÎ=pàÀ¶mÛ˜9õõõ!„,,,BBBvíÚÕÜÜ\[[{øðá°°0Ì-‚ ‹År¹\¥RYXX¼úê«7nÜèèè ³ùŸÐÐÐúúzz÷IÛ±cGlllqqqWWWiiiBBAúï5]ö?š±7$c{ñýkFF†›››½½ýÎ; …öžO¡PÌ™3'>>~hhèwÞ±±±¡Û»»»#""ìììfÍšµgÏ…B¡³Q{(‘HÄår---=<< )ŠŠŽŽ Ô®‡$I.—»ÿ~¦£F£IMMår¹l6{éÒ¥………cÞ‹9V6ÒÚ’"­ýëÈÆaÇ£ÁeÿjRy})åüM‰¤ººš9ÍËËóöö6b=Ãà’W“ÚLf555ááá2™l`` ¢¢"...**ÊØEá›÷këgkkmì*ô‰ êììäp8›6mšäON5é_FGGÇýû÷ýüüŒ]ˆ)£_»˜üâ€ýÀ äàò py8Áæõ'Ož»S¦T*­­­]ÅØ0È«••A†zôK@’ÔÉ“•ÁÁs§»–q˜6mš±Kye³Ù¾¾¾Æ®b**ËË/ÎË ó3v-¦ö¯†wáB%ý_µ~ç—A^ L¥RççW!„z{ÊÊ»Sy5°ë× "„ÌÍÍòó+]Ž©¼˜X\inn†R«É+Wj •±+2)WCêïü׿jÕj }:8¨¾ví¾qK21WCÒ+BÈÌŒ‹ï±Óy5$±ø®öǪÔjR*}(—+ŒX’‰¼LwwYYFó—×°(Šº|¹ÆX%™È«Á\ºôï‘E?[ƒ¼L^Þ‘o~'Iª¢¢±½½×(%™È«aãÎkQQÑ?þ% ?üðä¤$„ÐåË—…BáŽ;²³³ÃÂÂÒÒÒ´»(•Ê„„„   ºâcÇŽ)•Ê‘#$%%%&&þúë¯ô""„(Š2™,%%…Íf#„òòòÚÚÚÁñãÇe2YffæÛo¿íãã“––öìÙ³´´´C‡Y[[Ÿ}Z$ÅÇÇÛÚþ÷¯µ_¹re÷îÝŽŽŽ'::úöíÛ¡;wÊd²˜˜˜5kÖxxxè¬|ëÖ­o¾ù¦­­í™3gvíÚeggçèèˆêïï/**Ú´i‡Ãqwwß¿¿§§ç‹/…ÎYÓ÷²¶¶¦O/^¼¨½h£=E ŒIÇÏcõkkkãñxÌ)‡ÃA=yòÄÝÝi|ýõ×µ»L:5555///33sΜ9¡¡¡ .9²‹‹ }àêêÚÙÙI?zôÈÛÛ;++ëÀtËÓ§O×­[Çôš2e BÈÆÆfåÊ•?üðÃñãÇG«ÜÕÕ!Äb±ZZZ’““ ó{{;sw77777·Y =³¦ïÅèìì¹h#Á ŒiܯöööÌ)ýv„3f4773üñ‡v—ÁÁA’$$ÉòåË>>ô©N,‹.&!!aÆ §OŸþì³Ïè/ÙÙÙ=}ú”>nhh Ÿ ǤgÖô½3gιh#Á ŒiÜy]¶lÙ©S§nÞ¼ÙÝÝ}ûöíÓ§O#„‚‚‚ÁÝ»wåryUUÕ¹sç‚`º±oß¾²²²þþþ¡¡!‹EŠúûû™ËNœ8ÑÚÚúðáÃŒŒŒ÷ߟn´¶¶~íµ×BCCSRRT*BhñâÅéééíííMMM±±±E;vlíÚµqqq•••ååå̘ …bXýCCCjµšÅb©TªÌÌL„ÐÀÀ@```FFFsssssówß}×ÞÞ®g†þYk[½zµö¢={–n‡¯qïBBB4MZZZOO½:räHPPF£IMMíííõôôܶmÛ·ß~Ët±´´üâ‹/AGG‡““S||<ý.Ûäädoooúé !ðùçŸ+•Jÿ°°0æ !ZRR’¹yóæ'NlÙ²… ˆwß}7::º   §§gãÆ,kÏž=))) ,˜9sæ‚ Ö­[wùòeíúmll¶oß~äÈ‘W^y%44Ôßß?66677W©TîÛ·O©T.Z´(::!4Ú ý³våÐÐЩS§ººº¸\n\\ýOoXñ"(ŠbNrssCBB¤Ré‹÷omm OLLtttär¹tcYY™P(LOO× ãºïdpëÖ­ÿgÖÚ`túꫯrss™Ãü¼ ©©é›o¾©¯¯¼ÿþÙ³gW¬Xa‘'³欵½ü÷~@§ 6(•ÊÇ÷ôôÌš5kÙ²e«V­zñîS¦L×õ/ßh?ìÿÛ³Ö+ð‚þßýg¢ö¼W€È+À äàDÇë111/¿Fjjj ÐnùK^.\¸aÃFór«@7‡³~ýzí–¿¼žÀ$ûW€È+À äàò pòûÝ‹ßáf±SIEND®B`‚pktools-2.6.6/doc/html/dir_ed1df9621940d6aa1183c365ad1750d2.html0000644000113200011300000001044412647637663017673 00000000000000 pktools: /home/kempenep/pktools/qt/build-pksvm_gui-gcc-Release Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pksvm_gui-gcc-Release Directory Reference
Directory dependency graph for build-pksvm_gui-gcc-Release:
/home/kempenep/pktools/qt/build-pksvm_gui-gcc-Release

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/classUi__MainWindow__inherit__graph.md50000644000113200011300000000004012616110566021340 0000000000000019a10cc2bdf62b763527c8e3d8362501pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random__inherit__graph.png0000644000113200011300000001056412616110567027721 00000000000000‰PNG  IHDRÝ€¶ûdbKGDÿÿÿ ½§“)IDATxœíÝ{PWßð³$ $2DT PBTíC‡éèÛ©—¨¥xÒ ©K©Z­¢U)ÌÔ‚Z…±…’ÈÍ6”&R´E…Ž7¨HpŠÊ­-åbˆ$˾¬Ï>)÷$œÏøÇîÉîÙ_N¾îÙ%`8ŽŒÕ ˆ(—ŒP.¡\"0¢S]€n …¢¦¦F£ÑP]ˆ³µµñ\._¾ìààpúôib³e Ùl¶••ULL Ñ‚aXjjê¬Y³&Ož|äÈ¡PèääÄ`0"""Fm )C©µµµ¸¸xømjjj<(--e³ÙQQQD£F£!CInIîèçç·téÒºººÊÊÊ9sæDEEél$÷’Éd&Làóù---)))t:]&“á8®ÑhœœœŽãtuuÕ. Çñ¤¤$;;»_~ù¥½½ýâÅ‹l6›hêXË—//**º}û6±Ù€²«V­’J¥ÙÙÙâ©|}}¥Rirr2`Æ R©T  £ªªªªªjd/Ì«¢÷¹¬¬¬$VÅb1›Í&ÃÃÃ÷ïß×Þ’Xîïï§ÑhäëqöìY6›­³‘Ü«³³ÓØØøøñã]]]¦§§G­Vã8^ZZJ§Ó‰—¿¼¼pçÎíÃÍ™3çÇ$ ÎÈÈ s,â¹»Îåo¿ý†ã¸Z­ÔÔÔ‰„x^–‰ †s.õx'LŸ>Xpqqijj"–ËÊÊ/^=xûÖÖVµZíììL¬²Ù즦&ä.VVVÅÅÅ¥¥¥ööö‹-ºzõª‘‘@$©T*&“‰a˜»»;`ÀT^WW7gÎruöìÙC@>…៬­­-€8:iâĉccãËzMïsIœT< ^6@~~>ŸÏ‰DÅÅŶŸ2e F«¯¯'Vëêêìììt6’»ÈårFsæÌ™ÎÎ΀€€Õ«WwvvªÕj±XÛó_»wï‹Å¸Öï¥8::j]]]=TÄò3ó4Z?ƒŸÞçrçεµµeeeظq#Ñhnn>sæÌýû÷‡„„ï`d2ÀØØØÛÛ{ÇŽ UUU‡òóóÓÙHÃ0ììl©TÚßßolllffvõêÕ¶¶6???‹ÿâñx555ÄÕ!!,,,<<¼°°°£££¨¨(** ðá5Qö¸Cõ…„nÏ}™œœìèèÈd2·oß.—˵¯ÉärùŒ3"##•Jå»ï¾kaaA´wvvúûû[[[O›6m×®]r¹\g£vWb±ØÙÙÙÄÄÄÅÅ%//Çñàà`íz4³³ó¾}ûÈÕju\\œ³³3ƒÁðôôÌËË›ú(&&pþüy¡P–‘‘áçç— ½‹B¡ˆŠŠâr¹ÄëqìØ1…B1¸çÜÜܘ˜˜èèèßÿ|]q‰$66–Á`²²²ZZZÁ‰'$IZZÚ;ï¼ãîîžÐÕÕ•pðàASSÓï¾ûpöìY²ÿÌÌÌýû÷ÛÙÙ}ñÅÓ§OOOO MJJêîîÎÊʺråJLLL\\\ccczz:`p: Ó-±ÁµkׂƒƒAOOOvv¶X,  …þþþ|>ŸØìäÉ“ííí|>ÿèÑ£eee?ýôÑ^^^ž˜˜”””TRR’’’* už‡ôt uY.³³³CBB,X`mm=oÞ¼ÀÀ@²ñí·ßf0îîî[¶lÑÞE©Tâ8.—ËMLL<==óóó'L˜0¸çÐÐP{{ûY³f^¼x‘hýSævvv䘙™‘»k/뤧c¨ÓÈΗL&³®®Ž\ýóÏ?S¦Lihh ÿúë/í]úúú4MTTT~~þŠ+8 óÿzSS±ÐØØhmmM,GGGïÞ½»¨¨¨¢¢‚ha0éééÅÅÅÅÅÅùùùÄLÑÖÖ–““ãîîN¬êD¼œ}}}QQQ>>>§NúôÓO‰‡¬­­=zD,×ÖÖsÐs¦[†aÚ«S§N<€VVVFFF---Dcss3‘æ‘ÒÓ1Ôid¹\¾|ybbâõë×;;;oÞ¼yêÔ)—Ë·nÝ’J¥§OŸÖ~10 Û»wï•+Wž>þáÇ÷îÝKNN~ï½÷ˆFSSÓ×_ÇãÅÆÆo,X””ÔÚÚZ__ž››‹ãø±cÇÖ¯_Q^^~ãÆ ²O¹\> ~¥R©R©ètzZZ ··×ÃÃ#99¹¡¡¡¡¡áäÉ“­­­Ãô “Înun¹fÍí$ÞÁÐét‡óÍ7ß´´´444¤¤¤,[¶ìyŽkHc8ÀÈæqoooµZÐÝÝM\>|˜ËåªÕ길¸Ç»ºº†„„|ýõ×ä.&&&Ÿþ¹@ hkk³µµŒŒ$î±;~ü¸››1‰–-[öÙgŸ)Š¥K—úùù‘Ó€Çã]¾|9##cóæÍñññÛ¶mÃ0láÂ…ÁÁÁ¹¹¹ÝÝݾ¾¾t:}×®]±±±sçÎ:uêܹs½¼¼ÎŸ?¯]¿……EhhèáÇ_{í5·téÒðððÌÌL…B±wï^…B1þüàà`ÀP=褳ۜœœÁ[r¹\¥R™˜˜ØÑÑáììA¼iݹsg|||HHˆ±±ñ’%Küüüžçå0¤1Ãqü+6¢ûÜ>|¸qãÆèèhggg¢ñÊ•+B¡0))iD¤lä_ ` 9ŽX,Þ°a±: ?W¯¯¯ÿꫯjjjúúúîÞ½›ššºråÊ—ïÏFáu…BqèСîîîiÓ¦-_¾|õêÕÏ¿»¹¹ùˆ¶õ†ú”žóüc8R/5#ÈhýyAFÊåXÑëÛÌ(‡r‰Àåú…qˆž8qâèÑ£‡’Éd©©©æææ^^^<Àáp<( »ººx<žF£ÉÌÌ,((èèè`±X\.—èM&“ÅÇÇ—””˜˜˜,Y²$ ÀÄÄ„Ãᄇ‡‹D¢ÇoذÉd¦¥¥I¥R//¯­[·Rú졀ΗC‚ê¶ñårHPÝÃ6Þ y|HPÝÃ6Þ óå º‡m¼A¹|ªîaçÐÄñ TÝÃ6ΡÏÇ( ÏÇ=0ÞçqøïaŸÆ{.Qþà„æqF(—ŒP.¡\"0ø¾§¼¼œø2.¡’ößï!¿bA^1víÚ52Šÿú¼A ®/¡\"0B¹D`„r‰ÀåÑÿzÃö5\è/ IEND®B`‚pktools-2.6.6/doc/html/ftv2folderopen.png0000644000113200011300000000112512647637661015322 00000000000000‰PNG  IHDRÚ}\ˆIDATxí]?oÓPÿ9iš4i°;ii“¶‰ZЉ‘‰ÀÀ7`bèÔÙ¬Øù,HìU'ô$*Tµ]‚T¡DPÚÄ6wÏ}‰;¡C; a¿ÓߟûÝïîž¼jAÀ­InSþ}€9H“ÓŽ|?íÁ÷ =_ÊÆŠ­†¥Àue*;¯YEäsYäæB¢Ÿ¿þÄ—£sÙ½½ÙŒ† É«›©ÀYÇq !GÇ¿v̇¹ÑØ®š °Œ‚ÔF¹}q¥b]÷7í·0)Úd›¾ÿð-èº}Pfä£ÖY{4™ÑÂ@}úæôñ2ÛüÔ—ñúåNŒI‚ÁǃcçÁº%£¬UаI³mc±ô˜å¼ÔÆüÈ>é¸xþt9Æ$µý OæVE*õU´Ì‚ç#ž×ˆ•ïûr@l$øPÿrHaaÇ¥ ²›dZ®rè‘ãqI„o¼øT\Ž,tªj2FAxv-LŸp׌p TÄI/ \¥sfí½; jViTƒèú¤o^cpÅü¼ûû»Ïb]”€¢¤<†aþÕœ²“ßÓ˜y“£§9:Œîù+À³€ñà,E žf³6éNˆÄE£KU}Ü^;¶ØnZ¢uß­US4— ѬëbížN¶.Úk¦ØjTÄöº%µªâ i¯VÄÊÝò§™ Èù¸)ùÿG€™òºJ@T x”IEND®B`‚pktools-2.6.6/doc/html/pkreclass_8cc_source.html0000644000113200011300000017035312647637662016662 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkreclass.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkreclass.cc
1 /**********************************************************************
2 pkreclass.cc: program to replace pixel values in raster image
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <map>
22 #include "base/Optionpk.h"
23 #include "imageclasses/ImgReaderOgr.h"
24 #include "imageclasses/ImgWriterOgr.h"
25 #include "imageclasses/ImgReaderGdal.h"
26 #include "imageclasses/ImgWriterGdal.h"
27 
28 /******************************************************************************/
67 using namespace std;
68 
69 int main(int argc, char *argv[])
70 {
71  Optionpk<string> input_opt("i", "input", "Input image");
72  Optionpk<string> mask_opt("m", "mask", "Mask image(s)");
73  Optionpk<string> output_opt("o", "output", "Output mask file");
74  Optionpk<unsigned short> masknodata_opt("msknodata", "msknodata", "Mask value(s) where image has nodata. Use one value for each mask, or multiple values for a single mask.", 1);
75  Optionpk<int> nodata_opt("nodata", "nodata", "nodata value to put in image if not valid (0)", 0);
76  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
77  Optionpk<unsigned short> band_opt("b", "band", "band index(es) to replace (other bands are copied to output)", 0);
78  Optionpk<string> type_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", "");
79  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).","GTiff");
80  Optionpk<string> code_opt("code", "code", "Recode text file (2 colums: from to)");
81  Optionpk<string> class_opt("c", "class", "list of classes to reclass (in combination with reclass option)");
82  Optionpk<string> reclass_opt("r", "reclass", "list of recoded classes (in combination with class option)");
83  Optionpk<string> fieldname_opt("n", "fname", "field name of the shape file to be replaced", "label");
84  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
85  Optionpk<string> description_opt("d", "description", "Set image description");
86  Optionpk<short> verbose_opt("v", "verbose", "verbose", 0);
87 
88  bool doProcess;//stop process when program was invoked with help option (-h --help)
89  try{
90  doProcess=input_opt.retrieveOption(argc,argv);
91  mask_opt.retrieveOption(argc,argv);
92  masknodata_opt.retrieveOption(argc,argv);
93  nodata_opt.retrieveOption(argc,argv);
94  code_opt.retrieveOption(argc,argv);
95  class_opt.retrieveOption(argc,argv);
96  reclass_opt.retrieveOption(argc,argv);
97  colorTable_opt.retrieveOption(argc,argv);
98  output_opt.retrieveOption(argc,argv);
99  type_opt.retrieveOption(argc,argv);
100  oformat_opt.retrieveOption(argc,argv);
101  band_opt.retrieveOption(argc,argv);
102  fieldname_opt.retrieveOption(argc,argv);
103  option_opt.retrieveOption(argc,argv);
104  description_opt.retrieveOption(argc,argv);
105  verbose_opt.retrieveOption(argc,argv);
106  }
107  catch(string predefinedString){
108  std::cout << predefinedString << std::endl;
109  exit(0);
110  }
111  if(!doProcess){
112  cout << endl;
113  cout << "Usage: pkreclass -i input [-c from -r to]* -o output" << endl;
114  cout << endl;
115  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
116  exit(0);//help was invoked, stop processing
117  }
118 
119  if(input_opt.empty()){
120  std::cerr << "No input file provided (use option -i). Use --help for help information" << std::endl;
121  exit(0);
122  }
123  if(output_opt.empty()){
124  std::cerr << "No output file provided (use option -o). Use --help for help information" << std::endl;
125  exit(0);
126  }
127 
128  // vector<short> bandVector;
129  // for(int iband=0;iband<band_opt.size();++iband)
130  // bandVector.push_back(band_opt[iband]);
131  map<string,string> codemapString;//map with codes: codemapString[theKey(from)]=theValue(to)
132  map<double,double> codemap;//map with codes: codemap[theKey(from)]=theValue(to)
133  if(code_opt.size()){
134  if(verbose_opt[0])
135  cout << "opening code text file " << code_opt[0] << endl;
136  ifstream codefile;
137  codefile.open(code_opt[0].c_str());
138  string theKey;
139  string theValue;
140  while(codefile>>theKey){
141  codefile >> theValue;
142  codemapString[theKey]=theValue;
143  codemap[string2type<double>(theKey)]=string2type<double>(theValue);
144  }
145  codefile.close();
146  }
147  else{//use combination of class_opt and reclass_opt
148  assert(class_opt.size()==reclass_opt.size());
149  for(int iclass=0;iclass<class_opt.size();++iclass){
150  codemapString[class_opt[iclass]]=reclass_opt[iclass];
151  codemap[string2type<double>(class_opt[iclass])]=string2type<double>(reclass_opt[iclass]);
152  }
153  }
154  assert(codemapString.size());
155  assert(codemap.size());
156  //if verbose true, print the codes to screen
157  if(verbose_opt[0]){
158  map<string,string>::iterator mit;
159  cout << codemapString.size() << " codes used: " << endl;
160  for(mit=codemapString.begin();mit!=codemapString.end();++mit)
161  cout << (*mit).first << " " << (*mit).second << endl;
162  }
163  bool refIsRaster=false;
164  ImgReaderOgr ogrReader;
165  try{
166  ogrReader.open(input_opt[0]);
167  }
168  catch(string errorString){
169  refIsRaster=true;
170  }
171  // if(input_opt[0].find(".shp")!=string::npos){//shape file
172  if(!refIsRaster){
173  if(verbose_opt[0])
174  cout << "opening " << input_opt[0] << " for reading " << endl;
175  // ImgReaderOgr ogrReader(input_opt[0]);
176  if(verbose_opt[0])
177  cout << "opening " << output_opt[0] << " for writing " << endl;
178  ImgWriterOgr ogrWriter(output_opt[0],ogrReader);
179  if(verbose_opt[0])
180  cout << "copied layer from " << input_opt[0] << endl << flush;
181  OGRFeatureDefn *poFDefn = ogrWriter.getLayer()->GetLayerDefn();
182  //start reading features from the layer
183  if(verbose_opt[0])
184  cout << "reset reading" << endl;
185  ogrReader.getLayer()->ResetReading();
186  unsigned long int ifeature=0;
187  if(verbose_opt[0])
188  cout << "going through features" << endl << flush;
189  while(true){
190 // while( (poFeature = ogrWriter.getLayer()->GetNextFeature()) != NULL ){
191  OGRFeature *poFeature;
192  poFeature=ogrReader.getLayer()->GetNextFeature();
193  if(poFeature== NULL)
194  break;
195  OGRFeatureDefn *poFDefn = ogrWriter.getLayer()->GetLayerDefn();
196  string featurename;
197  for(int iField=0;iField<poFDefn->GetFieldCount();++iField){
198  OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(iField);
199  string fieldname=poFieldDefn->GetNameRef();
200  if(fieldname==fieldname_opt[0]){
201  string fromClass=poFeature->GetFieldAsString(iField);
202  string toClass=fromClass;
203  if(codemapString.find(fromClass)!=codemapString.end())
204  toClass=codemapString[fromClass];
205  poFeature->SetField(iField,toClass.c_str());
206  if(verbose_opt[0])
207  cout << "feature " << ifeature << ": " << fromClass << "->" << poFeature->GetFieldAsInteger(iField) << endl << flush;
208 // cout << "feature " << ifeature << ": " << fromClass << "->" << toClass << endl << flush;
209  }
210  }
211  //do not forget to actually write feature to file!!!
212  ogrWriter.createFeature(poFeature);
213  OGRFeature::DestroyFeature( poFeature );
214  ++ifeature;
215  }
216  if(verbose_opt[0])
217  cout << "replaced " << ifeature << " features" << endl;
218  ogrReader.close();
219  ogrWriter.close();
220  }
221  else{//image file
222  ImgReaderGdal inputReader;
223  vector<ImgReaderGdal> maskReader(mask_opt.size());
224  ImgWriterGdal outputWriter;
225  if(verbose_opt[0])
226  cout << "opening input image file " << input_opt[0] << endl;
227  inputReader.open(input_opt[0]);
228  for(int imask=0;imask<mask_opt.size();++imask){
229  if(verbose_opt[0])
230  cout << "opening mask image file " << mask_opt[imask] << endl;
231  maskReader[imask].open(mask_opt[imask]);
232  }
233  if(verbose_opt[0]){
234  cout << "opening output image file " << output_opt[0] << endl;
235  cout << "data type: " << type_opt[0] << endl;
236  }
237  //create output image with user defined data type
238  GDALDataType theType=GDT_Unknown;
239  if(verbose_opt[0])
240  cout << "possible output data types: ";
241  for(int iType = 0; iType < GDT_TypeCount; ++iType){
242  if(verbose_opt[0])
243  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
244  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
245  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
246  type_opt[0].c_str()))
247  theType=(GDALDataType) iType;
248  }
249  if(theType==GDT_Unknown)
250  theType=inputReader.getDataType();
251  if(verbose_opt[0])
252  cout << endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
253  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
254  string theInterleave="INTERLEAVE=";
255  theInterleave+=inputReader.getInterleave();
256  option_opt.push_back(theInterleave);
257  }
258  outputWriter.open(output_opt[0],inputReader.nrOfCol(),inputReader.nrOfRow(),inputReader.nrOfBand(),theType,oformat_opt[0],option_opt);
259  for(int iband=0;iband<inputReader.nrOfBand();++iband)
260  outputWriter.GDALSetNoDataValue(nodata_opt[0],iband);
261  if(description_opt.size())
262  outputWriter.setImageDescription(description_opt[0]);
263 
264  if(colorTable_opt.size()){
265  if(colorTable_opt[0]!="none")
266  outputWriter.setColorTable(colorTable_opt[0]);
267  }
268  else if (inputReader.getColorTable()!=NULL)//copy colorTable from input image
269  outputWriter.setColorTable(inputReader.getColorTable());
270 
271  //if input image is georeferenced, copy projection info to output image
272  if(inputReader.isGeoRef()){
273  for(int imask=0;imask<mask_opt.size();++imask)
274  assert(maskReader[imask].isGeoRef());
275  }
276  outputWriter.copyGeoTransform(inputReader);
277  outputWriter.setProjection(inputReader.getProjection());
278  double ulx,uly,lrx,lry;
279  inputReader.getBoundingBox(ulx,uly,lrx,lry);
280  outputWriter.copyGeoTransform(inputReader);
281  assert(nodata_opt.size()==masknodata_opt.size());
282  if(verbose_opt[0]&&mask_opt.size()){
283  for(int iv=0;iv<masknodata_opt.size();++iv)
284  cout << masknodata_opt[iv] << "->" << nodata_opt[iv] << endl;
285  }
286 
287  assert(outputWriter.nrOfCol()==inputReader.nrOfCol());
288  // Vector2d<int> lineInput(inputReader.nrOfBand(),inputReader.nrOfCol());
289  Vector2d<double> lineInput(inputReader.nrOfBand(),inputReader.nrOfCol());
290  Vector2d<short> lineMask(mask_opt.size());
291  for(int imask=0;imask<mask_opt.size();++imask)
292  lineMask[imask].resize(maskReader[imask].nrOfCol());
293  Vector2d<double> lineOutput(outputWriter.nrOfBand(),outputWriter.nrOfCol());
294  int irow=0;
295  int icol=0;
296  const char* pszMessage;
297  void* pProgressArg=NULL;
298  GDALProgressFunc pfnProgress=GDALTermProgress;
299  double progress=0;
300  pfnProgress(progress,pszMessage,pProgressArg);
301  double oldRowMask=-1;
302  for(irow=0;irow<inputReader.nrOfRow();++irow){
303  //read line in lineInput buffer
304  for(int iband=0;iband<inputReader.nrOfBand();++iband){
305  try{
306  // inputReader.readData(lineInput[iband],GDT_Int32,irow,iband);
307  inputReader.readData(lineInput[iband],GDT_Float64,irow,iband);
308  }
309  catch(string errorstring){
310  cerr << errorstring << endl;
311  exit(1);
312  }
313  }
314  double x,y;//geo coordinates
315  double colMask,rowMask;//image coordinates in mask image
316  for(icol=0;icol<inputReader.nrOfCol();++icol){
317  bool masked=false;
318  if(mask_opt.size()>1){//multiple masks
319  for(int imask=0;imask<mask_opt.size();++imask){
320  inputReader.image2geo(icol,irow,x,y);
321  maskReader[imask].geo2image(x,y,colMask,rowMask);
322  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask)){
323  assert(rowMask>=0&&rowMask<maskReader[imask].nrOfRow());
324  try{
325  maskReader[imask].readData(lineMask[imask],GDT_Int16,static_cast<int>(rowMask));
326  }
327  catch(string errorstring){
328  cerr << errorstring << endl;
329  exit(1);
330  }
331  oldRowMask=rowMask;
332  }
333  short ivalue=0;
334  if(mask_opt.size()==masknodata_opt.size())//one invalid value for each mask
335  ivalue=masknodata_opt[imask];
336  else//use same invalid value for each mask
337  ivalue=masknodata_opt[0];
338  if(lineMask[imask][colMask]==ivalue){
339  for(int iband=0;iband<inputReader.nrOfBand();++iband)
340  lineInput[iband][icol]=nodata_opt[imask];
341  masked=true;
342  break;
343  }
344  }
345  }
346  else if(mask_opt.size()){//potentially more invalid values for single mask
347  inputReader.image2geo(icol,irow,x,y);
348  maskReader[0].geo2image(x,y,colMask,rowMask);
349  if(static_cast<int>(rowMask)!=static_cast<int>(oldRowMask)){
350  assert(rowMask>=0&&rowMask<maskReader[0].nrOfRow());
351  try{
352  maskReader[0].readData(lineMask[0],GDT_Int16,static_cast<int>(rowMask));
353  }
354  catch(string errorstring){
355  cerr << errorstring << endl;
356  exit(1);
357  }
358  oldRowMask=rowMask;
359  }
360  for(int ivalue=0;ivalue<masknodata_opt.size();++ivalue){
361  assert(masknodata_opt.size()==nodata_opt.size());
362  if(lineMask[0][colMask]==masknodata_opt[ivalue]){
363  for(int iband=0;iband<inputReader.nrOfBand();++iband)
364  lineInput[iband][icol]=nodata_opt[ivalue];
365  masked=true;
366  break;
367  }
368  }
369  }
370  for(int iband=0;iband<lineOutput.size();++iband){
371  lineOutput[iband][icol]=lineInput[iband][icol];
372  if(find(band_opt.begin(),band_opt.end(),iband)!=band_opt.end()){
373  if(!masked && codemap.find(lineInput[iband][icol])!=codemap.end()){
374  double toValue=codemap[lineInput[iband][icol]];
375  lineOutput[iband][icol]=toValue;
376  }
377  }
378  }
379  }
380  //write buffer lineOutput to output file
381  try{
382  for(int iband=0;iband<outputWriter.nrOfBand();++iband)
383  outputWriter.writeData(lineOutput[iband],GDT_Float64,irow,iband);
384  }
385  catch(string errorstring){
386  cerr << errorstring << endl;
387  exit(1);
388  }
389  //progress bar
390  progress=static_cast<float>((irow+1.0)/outputWriter.nrOfRow());
391  pfnProgress(progress,pszMessage,pProgressArg);
392  }
393  inputReader.close();
394  outputWriter.close();
395  }
396 }
pktools-2.6.6/doc/html/build-pkdiff__gui-gcc-Debug_2ui__mainwindow_8h_source.html0000644000113200011300000021131512647637661025021 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Debug/ui_mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ui_mainwindow.h
1 /********************************************************************************
2 ** Form generated from reading UI file 'mainwindow.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
11 
12 #include <QtCore/QVariant>
13 #include <QtGui/QAction>
14 #include <QtGui/QApplication>
15 #include <QtGui/QButtonGroup>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QComboBox>
18 #include <QtGui/QGridLayout>
19 #include <QtGui/QHBoxLayout>
20 #include <QtGui/QHeaderView>
21 #include <QtGui/QLabel>
22 #include <QtGui/QLineEdit>
23 #include <QtGui/QMainWindow>
24 #include <QtGui/QMenu>
25 #include <QtGui/QMenuBar>
26 #include <QtGui/QPlainTextEdit>
27 #include <QtGui/QPushButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStatusBar>
30 #include <QtGui/QTabWidget>
31 #include <QtGui/QTableView>
32 #include <QtGui/QToolBar>
33 #include <QtGui/QToolButton>
34 #include <QtGui/QVBoxLayout>
35 #include <QtGui/QWidget>
36 
37 QT_BEGIN_NAMESPACE
38 
39 class Ui_MainWindow
40 {
41 public:
42  QAction *actionInput;
43  QAction *actionReference;
44  QAction *actionMask;
45  QAction *actionOutput;
46  QAction *actionColor_table;
47  QWidget *centralWidget;
48  QVBoxLayout *verticalLayout;
49  QTabWidget *tabWidget;
50  QWidget *tab_2;
51  QWidget *layoutWidget;
52  QGridLayout *gridLayout_2;
53  QLabel *label_2;
54  QToolButton *toolButton_output;
55  QLineEdit *lclass;
56  QLineEdit *output;
57  QLabel *label_6;
58  QLineEdit *input;
59  QCheckBox *confusion;
60  QLabel *label_14;
61  QToolButton *toolButton_input;
62  QLabel *label_13;
63  QLineEdit *mask;
64  QToolButton *toolButton_mask;
65  QLineEdit *msknodata;
66  QSpacerItem *horizontalSpacer_15;
67  QLabel *label_3;
68  QLineEdit *nclass;
69  QLabel *label_4;
70  QLabel *label_5;
71  QLineEdit *lref;
72  QLabel *label_reference;
73  QLineEdit *reference;
74  QToolButton *toolButton_reference;
75  QSpacerItem *verticalSpacer_2;
76  QComboBox *f;
77  QLabel *label_7;
78  QLineEdit *nodata;
79  QLabel *label;
80  QWidget *widget;
81  QVBoxLayout *verticalLayout_2;
82  QToolButton *commandLinkButtonPrepareTable;
83  QTableView *tableView_labels;
84  QWidget *tab_4;
85  QVBoxLayout *verticalLayout_6;
86  QLabel *label_18;
87  QLineEdit *commandLineEdit;
88  QLabel *label_19;
89  QPlainTextEdit *consoleEdit;
90  QHBoxLayout *horizontalLayout;
91  QPushButton *pushButton_run;
92  QSpacerItem *horizontalSpacer;
93  QPushButton *pushButton_restore;
94  QMenuBar *menuBar;
95  QMenu *menuFile;
96  QToolBar *mainToolBar;
97  QStatusBar *statusBar;
98 
99  void setupUi(QMainWindow *MainWindow)
100  {
101  if (MainWindow->objectName().isEmpty())
102  MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
103  MainWindow->resize(810, 777);
104  actionInput = new QAction(MainWindow);
105  actionInput->setObjectName(QString::fromUtf8("actionInput"));
106  actionReference = new QAction(MainWindow);
107  actionReference->setObjectName(QString::fromUtf8("actionReference"));
108  actionMask = new QAction(MainWindow);
109  actionMask->setObjectName(QString::fromUtf8("actionMask"));
110  actionOutput = new QAction(MainWindow);
111  actionOutput->setObjectName(QString::fromUtf8("actionOutput"));
112  actionColor_table = new QAction(MainWindow);
113  actionColor_table->setObjectName(QString::fromUtf8("actionColor_table"));
114  centralWidget = new QWidget(MainWindow);
115  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
116  verticalLayout = new QVBoxLayout(centralWidget);
117  verticalLayout->setSpacing(6);
118  verticalLayout->setContentsMargins(11, 11, 11, 11);
119  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
120  tabWidget = new QTabWidget(centralWidget);
121  tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
122  tab_2 = new QWidget();
123  tab_2->setObjectName(QString::fromUtf8("tab_2"));
124  layoutWidget = new QWidget(tab_2);
125  layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
126  layoutWidget->setGeometry(QRect(9, 9, 761, 264));
127  gridLayout_2 = new QGridLayout(layoutWidget);
128  gridLayout_2->setSpacing(6);
129  gridLayout_2->setContentsMargins(11, 11, 11, 11);
130  gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
131  gridLayout_2->setContentsMargins(0, 0, 0, 0);
132  label_2 = new QLabel(layoutWidget);
133  label_2->setObjectName(QString::fromUtf8("label_2"));
134 
135  gridLayout_2->addWidget(label_2, 5, 5, 1, 1);
136 
137  toolButton_output = new QToolButton(layoutWidget);
138  toolButton_output->setObjectName(QString::fromUtf8("toolButton_output"));
139 
140  gridLayout_2->addWidget(toolButton_output, 4, 3, 1, 1);
141 
142  lclass = new QLineEdit(layoutWidget);
143  lclass->setObjectName(QString::fromUtf8("lclass"));
144 
145  gridLayout_2->addWidget(lclass, 4, 6, 1, 1);
146 
147  output = new QLineEdit(layoutWidget);
148  output->setObjectName(QString::fromUtf8("output"));
149 
150  gridLayout_2->addWidget(output, 4, 2, 1, 1);
151 
152  label_6 = new QLabel(layoutWidget);
153  label_6->setObjectName(QString::fromUtf8("label_6"));
154 
155  gridLayout_2->addWidget(label_6, 4, 5, 1, 1);
156 
157  input = new QLineEdit(layoutWidget);
158  input->setObjectName(QString::fromUtf8("input"));
159 
160  gridLayout_2->addWidget(input, 0, 2, 1, 1);
161 
162  confusion = new QCheckBox(layoutWidget);
163  confusion->setObjectName(QString::fromUtf8("confusion"));
164 
165  gridLayout_2->addWidget(confusion, 6, 0, 1, 1);
166 
167  label_14 = new QLabel(layoutWidget);
168  label_14->setObjectName(QString::fromUtf8("label_14"));
169 
170  gridLayout_2->addWidget(label_14, 3, 5, 1, 1);
171 
172  toolButton_input = new QToolButton(layoutWidget);
173  toolButton_input->setObjectName(QString::fromUtf8("toolButton_input"));
174 
175  gridLayout_2->addWidget(toolButton_input, 0, 3, 1, 1);
176 
177  label_13 = new QLabel(layoutWidget);
178  label_13->setObjectName(QString::fromUtf8("label_13"));
179 
180  gridLayout_2->addWidget(label_13, 3, 0, 1, 1);
181 
182  mask = new QLineEdit(layoutWidget);
183  mask->setObjectName(QString::fromUtf8("mask"));
184 
185  gridLayout_2->addWidget(mask, 3, 2, 1, 1);
186 
187  toolButton_mask = new QToolButton(layoutWidget);
188  toolButton_mask->setObjectName(QString::fromUtf8("toolButton_mask"));
189 
190  gridLayout_2->addWidget(toolButton_mask, 3, 3, 1, 1);
191 
192  msknodata = new QLineEdit(layoutWidget);
193  msknodata->setObjectName(QString::fromUtf8("msknodata"));
194 
195  gridLayout_2->addWidget(msknodata, 3, 6, 1, 1);
196 
197  horizontalSpacer_15 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
198 
199  gridLayout_2->addItem(horizontalSpacer_15, 3, 4, 1, 1);
200 
201  label_3 = new QLabel(layoutWidget);
202  label_3->setObjectName(QString::fromUtf8("label_3"));
203 
204  gridLayout_2->addWidget(label_3, 0, 0, 1, 1);
205 
206  nclass = new QLineEdit(layoutWidget);
207  nclass->setObjectName(QString::fromUtf8("nclass"));
208 
209  gridLayout_2->addWidget(nclass, 7, 2, 1, 1);
210 
211  label_4 = new QLabel(layoutWidget);
212  label_4->setObjectName(QString::fromUtf8("label_4"));
213 
214  gridLayout_2->addWidget(label_4, 4, 0, 1, 1);
215 
216  label_5 = new QLabel(layoutWidget);
217  label_5->setObjectName(QString::fromUtf8("label_5"));
218 
219  gridLayout_2->addWidget(label_5, 2, 5, 1, 1);
220 
221  lref = new QLineEdit(layoutWidget);
222  lref->setObjectName(QString::fromUtf8("lref"));
223 
224  gridLayout_2->addWidget(lref, 2, 6, 1, 1);
225 
226  label_reference = new QLabel(layoutWidget);
227  label_reference->setObjectName(QString::fromUtf8("label_reference"));
228 
229  gridLayout_2->addWidget(label_reference, 2, 0, 1, 1);
230 
231  reference = new QLineEdit(layoutWidget);
232  reference->setObjectName(QString::fromUtf8("reference"));
233 
234  gridLayout_2->addWidget(reference, 2, 2, 1, 1);
235 
236  toolButton_reference = new QToolButton(layoutWidget);
237  toolButton_reference->setObjectName(QString::fromUtf8("toolButton_reference"));
238 
239  gridLayout_2->addWidget(toolButton_reference, 2, 3, 1, 1);
240 
241  verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
242 
243  gridLayout_2->addItem(verticalSpacer_2, 8, 0, 1, 1);
244 
245  f = new QComboBox(layoutWidget);
246  f->setObjectName(QString::fromUtf8("f"));
247 
248  gridLayout_2->addWidget(f, 5, 6, 1, 1);
249 
250  label_7 = new QLabel(layoutWidget);
251  label_7->setObjectName(QString::fromUtf8("label_7"));
252 
253  gridLayout_2->addWidget(label_7, 7, 0, 1, 1);
254 
255  nodata = new QLineEdit(layoutWidget);
256  nodata->setObjectName(QString::fromUtf8("nodata"));
257 
258  gridLayout_2->addWidget(nodata, 0, 6, 1, 1);
259 
260  label = new QLabel(layoutWidget);
261  label->setObjectName(QString::fromUtf8("label"));
262 
263  gridLayout_2->addWidget(label, 0, 5, 1, 1);
264 
265  widget = new QWidget(tab_2);
266  widget->setObjectName(QString::fromUtf8("widget"));
267  widget->setGeometry(QRect(11, 281, 391, 331));
268  verticalLayout_2 = new QVBoxLayout(widget);
269  verticalLayout_2->setSpacing(6);
270  verticalLayout_2->setContentsMargins(11, 11, 11, 11);
271  verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
272  verticalLayout_2->setContentsMargins(0, 0, 0, 0);
273  commandLinkButtonPrepareTable = new QToolButton(widget);
274  commandLinkButtonPrepareTable->setObjectName(QString::fromUtf8("commandLinkButtonPrepareTable"));
275 
276  verticalLayout_2->addWidget(commandLinkButtonPrepareTable);
277 
278  tableView_labels = new QTableView(widget);
279  tableView_labels->setObjectName(QString::fromUtf8("tableView_labels"));
280 
281  verticalLayout_2->addWidget(tableView_labels);
282 
283  tabWidget->addTab(tab_2, QString());
284  tab_4 = new QWidget();
285  tab_4->setObjectName(QString::fromUtf8("tab_4"));
286  verticalLayout_6 = new QVBoxLayout(tab_4);
287  verticalLayout_6->setSpacing(6);
288  verticalLayout_6->setContentsMargins(11, 11, 11, 11);
289  verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6"));
290  label_18 = new QLabel(tab_4);
291  label_18->setObjectName(QString::fromUtf8("label_18"));
292 
293  verticalLayout_6->addWidget(label_18);
294 
295  commandLineEdit = new QLineEdit(tab_4);
296  commandLineEdit->setObjectName(QString::fromUtf8("commandLineEdit"));
297 
298  verticalLayout_6->addWidget(commandLineEdit);
299 
300  label_19 = new QLabel(tab_4);
301  label_19->setObjectName(QString::fromUtf8("label_19"));
302 
303  verticalLayout_6->addWidget(label_19);
304 
305  consoleEdit = new QPlainTextEdit(tab_4);
306  consoleEdit->setObjectName(QString::fromUtf8("consoleEdit"));
307 
308  verticalLayout_6->addWidget(consoleEdit);
309 
310  tabWidget->addTab(tab_4, QString());
311 
312  verticalLayout->addWidget(tabWidget);
313 
314  horizontalLayout = new QHBoxLayout();
315  horizontalLayout->setSpacing(6);
316  horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
317  pushButton_run = new QPushButton(centralWidget);
318  pushButton_run->setObjectName(QString::fromUtf8("pushButton_run"));
319 
320  horizontalLayout->addWidget(pushButton_run);
321 
322  horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
323 
324  horizontalLayout->addItem(horizontalSpacer);
325 
326  pushButton_restore = new QPushButton(centralWidget);
327  pushButton_restore->setObjectName(QString::fromUtf8("pushButton_restore"));
328 
329  horizontalLayout->addWidget(pushButton_restore);
330 
331 
332  verticalLayout->addLayout(horizontalLayout);
333 
334  MainWindow->setCentralWidget(centralWidget);
335  menuBar = new QMenuBar(MainWindow);
336  menuBar->setObjectName(QString::fromUtf8("menuBar"));
337  menuBar->setGeometry(QRect(0, 0, 810, 27));
338  menuFile = new QMenu(menuBar);
339  menuFile->setObjectName(QString::fromUtf8("menuFile"));
340  MainWindow->setMenuBar(menuBar);
341  mainToolBar = new QToolBar(MainWindow);
342  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
343  MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
344  statusBar = new QStatusBar(MainWindow);
345  statusBar->setObjectName(QString::fromUtf8("statusBar"));
346  MainWindow->setStatusBar(statusBar);
347  QWidget::setTabOrder(input, toolButton_input);
348  QWidget::setTabOrder(toolButton_input, nodata);
349  QWidget::setTabOrder(nodata, reference);
350  QWidget::setTabOrder(reference, toolButton_reference);
351  QWidget::setTabOrder(toolButton_reference, lref);
352  QWidget::setTabOrder(lref, mask);
353  QWidget::setTabOrder(mask, toolButton_mask);
354  QWidget::setTabOrder(toolButton_mask, msknodata);
355  QWidget::setTabOrder(msknodata, output);
356  QWidget::setTabOrder(output, toolButton_output);
357  QWidget::setTabOrder(toolButton_output, lclass);
358  QWidget::setTabOrder(lclass, f);
359  QWidget::setTabOrder(f, confusion);
360  QWidget::setTabOrder(confusion, nclass);
361  QWidget::setTabOrder(nclass, commandLinkButtonPrepareTable);
362  QWidget::setTabOrder(commandLinkButtonPrepareTable, tableView_labels);
363  QWidget::setTabOrder(tableView_labels, consoleEdit);
364  QWidget::setTabOrder(consoleEdit, pushButton_restore);
365  QWidget::setTabOrder(pushButton_restore, pushButton_run);
366  QWidget::setTabOrder(pushButton_run, commandLineEdit);
367  QWidget::setTabOrder(commandLineEdit, tabWidget);
368 
369  menuBar->addAction(menuFile->menuAction());
370  menuFile->addAction(actionInput);
371  menuFile->addAction(actionReference);
372  menuFile->addAction(actionMask);
373  menuFile->addAction(actionOutput);
374 
375  retranslateUi(MainWindow);
376 
377  tabWidget->setCurrentIndex(0);
378 
379 
380  QMetaObject::connectSlotsByName(MainWindow);
381  } // setupUi
382 
383  void retranslateUi(QMainWindow *MainWindow)
384  {
385  MainWindow->setWindowTitle(QApplication::translate("MainWindow", "pkdiff_gui", 0, QApplication::UnicodeUTF8));
386  actionInput->setText(QApplication::translate("MainWindow", "Input", 0, QApplication::UnicodeUTF8));
387  actionInput->setShortcut(QApplication::translate("MainWindow", "Alt+I", 0, QApplication::UnicodeUTF8));
388  actionReference->setText(QApplication::translate("MainWindow", "Reference", 0, QApplication::UnicodeUTF8));
389  actionReference->setShortcut(QApplication::translate("MainWindow", "Alt+T", 0, QApplication::UnicodeUTF8));
390  actionMask->setText(QApplication::translate("MainWindow", "Mask", 0, QApplication::UnicodeUTF8));
391  actionMask->setShortcut(QApplication::translate("MainWindow", "Alt+M", 0, QApplication::UnicodeUTF8));
392  actionOutput->setText(QApplication::translate("MainWindow", "Output", 0, QApplication::UnicodeUTF8));
393  actionOutput->setShortcut(QApplication::translate("MainWindow", "Alt+O", 0, QApplication::UnicodeUTF8));
394  actionColor_table->setText(QApplication::translate("MainWindow", "Color table", 0, QApplication::UnicodeUTF8));
395  actionColor_table->setShortcut(QApplication::translate("MainWindow", "Alt+C", 0, QApplication::UnicodeUTF8));
396  label_2->setText(QApplication::translate("MainWindow", "OGR output format", 0, QApplication::UnicodeUTF8));
397  toolButton_output->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
398  label_6->setText(QApplication::translate("MainWindow", "class label", 0, QApplication::UnicodeUTF8));
399  confusion->setText(QApplication::translate("MainWindow", "confusion matrix", 0, QApplication::UnicodeUTF8));
400  label_14->setText(QApplication::translate("MainWindow", "msknodata", 0, QApplication::UnicodeUTF8));
401  toolButton_input->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
402 #ifndef QT_NO_TOOLTIP
403  label_13->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Dimensions of mask image must correspond to input image. Pixels in mask with values=masknodata are not classified and get nodata value.</p></body></html>", 0, QApplication::UnicodeUTF8));
404 #endif // QT_NO_TOOLTIP
405  label_13->setText(QApplication::translate("MainWindow", "Mask image", 0, QApplication::UnicodeUTF8));
406  toolButton_mask->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
407 #ifndef QT_NO_TOOLTIP
408  label_3->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Input image. Both OGR vectors and GDAL rasters are supported. Number of bands must match those in training sample.</p></body></html>", 0, QApplication::UnicodeUTF8));
409 #endif // QT_NO_TOOLTIP
410  label_3->setText(QApplication::translate("MainWindow", "Input data", 0, QApplication::UnicodeUTF8));
411  label_4->setText(QApplication::translate("MainWindow", "Output data", 0, QApplication::UnicodeUTF8));
412  label_5->setText(QApplication::translate("MainWindow", "class label", 0, QApplication::UnicodeUTF8));
413  label_reference->setText(QApplication::translate("MainWindow", "Reference", 0, QApplication::UnicodeUTF8));
414  toolButton_reference->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8));
415  label_7->setText(QApplication::translate("MainWindow", "Number of classes to prepare table", 0, QApplication::UnicodeUTF8));
416  label->setText(QApplication::translate("MainWindow", "nodata", 0, QApplication::UnicodeUTF8));
417  commandLinkButtonPrepareTable->setText(QApplication::translate("MainWindow", "prepare table", 0, QApplication::UnicodeUTF8));
418  tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Input/Output", 0, QApplication::UnicodeUTF8));
419  label_18->setText(QApplication::translate("MainWindow", "Command line", 0, QApplication::UnicodeUTF8));
420  label_19->setText(QApplication::translate("MainWindow", "Console output", 0, QApplication::UnicodeUTF8));
421  tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "Console", 0, QApplication::UnicodeUTF8));
422 #ifndef QT_NO_TOOLTIP
423  pushButton_run->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Classify with current settings (check Console for output)</p></body></html>", 0, QApplication::UnicodeUTF8));
424 #endif // QT_NO_TOOLTIP
425  pushButton_run->setText(QApplication::translate("MainWindow", "Run", 0, QApplication::UnicodeUTF8));
426 #ifndef QT_NO_TOOLTIP
427  pushButton_restore->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>reset all parameters to default</p></body></html>", 0, QApplication::UnicodeUTF8));
428 #endif // QT_NO_TOOLTIP
429  pushButton_restore->setText(QApplication::translate("MainWindow", "Restore defaults", 0, QApplication::UnicodeUTF8));
430  menuFile->setTitle(QApplication::translate("MainWindow", "File", 0, QApplication::UnicodeUTF8));
431  } // retranslateUi
432 
433 };
434 
435 namespace Ui {
436  class MainWindow: public Ui_MainWindow {};
437 } // namespace Ui
438 
439 QT_END_NAMESPACE
440 
441 #endif // UI_MAINWINDOW_H
pktools-2.6.6/doc/html/ftv2splitbar.png0000644000113200011300000000047212647637661015011 00000000000000‰PNG  IHDRM¸¿IDATxíÝ¡JCa‡ñç(˜ ëƒ%±Ø4 b±È˜Í¶3˜v^Á±˜…ãó–ŽELƒõ…¥•³ ,ÿb;íç{Ã/¼ðÞÀaYÕ¯åóøq:¼º¹›\òIIIIIIIIIIIIIIIIII-Òçl¹›«õ抢è_t/Ï»ã£ÑíYQVõðêäíã÷´×ùY¬Úÿµ§¦ivók¾_íåýÛ£I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$ýC[Vì=ü[„fÆIEND®B`‚pktools-2.6.6/doc/html/classBadConversion.html0000644000113200011300000001247312647637662016336 00000000000000 pktools: BadConversion Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
BadConversion Class Reference

throw this class when syntax error in command line option More...

#include <Optionpk.h>

Inheritance diagram for BadConversion:
Collaboration diagram for BadConversion:

Public Member Functions

 BadConversion (std::string const &s)
 

Detailed Description

throw this class when syntax error in command line option

Definition at line 45 of file Optionpk.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop.html0000644000113200011300000002623512647637662020304 00000000000000 pktools: qgis.pkcrop.pkcrop Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for qgis.pkcrop.pkcrop:
Collaboration diagram for qgis.pkcrop.pkcrop:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string DX = "DX"
 
string DY = "DY"
 
string PROJWIN = 'PROJWIN'
 
string BAND = "BAND"
 
string NODATA = "NODATA"
 
list RESAMPLE_OPTIONS = ['near', 'bilinear']
 
string RESAMPLE = "RESAMPLE"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkcrop.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/index.html0000644000113200011300000001476512647637663013672 00000000000000 pktools: Main Page
pktools  2.6.6
Processing Kernel for geospatial data
pktools Documentation

Introduction

pktools is a collection of programs written in C++ for image processing with a focus on remote sensing applications. It relies on the Geospatial Data Abstraction Library (GDAL, http://www.gdal.org) and OGR.

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)

Check the code statistics

License

pktools is written by Pieter Kempeneers and released under the GNU General Public License version3

See http://www.gnu.org/licenses for more details

How to get pktools?

Download

You can download the latest stable release from Savannah

the git repository

Get the latest code in development (bleeding edge) from the Git repository:

git clone git://git.savannah.nongnu.org/pktools.git

In a Linux environment, please perform the following actions before following the manual installation procedure

cd pktools

Add libtool support to your package:

libtoolize

Remake the GNU Build System files by scanning 'configure.ac' and running 'autoconf', 'autoheader', 'aclocal', 'automake' and 'libtoolize':

autoreconf

Finalize package generation:

automake --add-missing

How to refer

Please refer to pktools as: http://pktools.nongnu.org (Pieter Kempeneers)

Or use the following reference to the book on Open Source Geospatial Tools

contact: kempenep at gmail.com

Installation

Installation for Linux

Installation for Windows

Plugins

pktools in QGIS via plugin

Bug reports and change requests

Please write a ticket in savannah to report bugs and request changes. You will automatically be informed about the ticket status and this helps me to keep track of the bugs/changes.

pktools-2.6.6/doc/html/classSVR__Q__inherit__graph.map0000644000113200011300000000035512616110567017663 00000000000000 pktools-2.6.6/doc/html/logo.png0000644000113200011300000000514512647637661013331 00000000000000‰PNG  IHDR77P¾u‡ pHYsÄÄ•+ IDATxÍZ TT×~Ã̲£ˆ2 È"Å ‚ƺDQc­’`£=Fm“h¢Vc´Ñõ¨mrN¢Ö¨­IÓ$ÕÆ=¸Ä¸¢ ‹lʢȢ‚lÌ ËlýžwæòfæÍ#GûçÍÿûÿßýÞÿîòßûe†D©kêãK¤‘5ªjkcuòd„Üa "FPE—ß&rèÝj½–Ú¢¢`°w‡-1Ä]ØG¢×Rq2Õ’6EiÔ ¢‘5÷Q/öñVUU­‹ÄÀ,"ír†Ñ6É Úúc?Sw}ŠÒ嫉–Ÿ©3e–æê‹ Qz¿AÒȟᣒ Dl“Ã0”‰ÒÒ]ZšèéÁôcZÓ…Ë„¼LûÄŒO¾McSjßþ–€¸zImã1„a\ÿ¸ éâežÇoNIíÂËÑcÚ9:ŽQ<&âÕÉðãrᕇç¥;cûÖ½·WTí=@mx˜Ò:ëBTA ZnÞ1V«TrmÍ öygÉ Ý_àñ•9yÙ‘c(®í €¨Ú³èÈŽa¸ßèí¡mm…žmüõmĺ ÏÈ‚Mˆ1Þ(c¡ »v^‘™ý`ëN‘½}åöÏI5wæE/[û^Ë–¢Z%èÕ««ëo¼J23Þ ›•"¡“SðñÿÀ¿µôþݥ=ŽÉ ÅâKÚUqq±“"]ŸimPîYN°_ó‡Yo1"!‰ 87·§ÏÁ\«¯Ép²èºk¥þ;[¢§1 /LtS_S¨GVÝK÷d\Ï_jx;:a†W}‹jSD¨dç~mº–â#ööòûd]Ŧ­ü0­ÀÑI Óè4ÚlŸ…üˆÐæ«mf¿ë0„UÕú Âbô«S*‚å—JÇE®Ë\Éј§Ø»Å´7@Ƴ›ÔïI¡|ÙéQÍe•SQ²ˆ¨S©îÌŠÜõWE¤'åŒkD5Ze3dù´eDÔ =úéIyq/Qg^!ð›¹7Ä^Qw·U,·È1äôQ÷ðo_vdz¼x #VçkÕÊÖzÃ|an†í:å…ÔíþªuæFÉ8ßW0 )w³é>G ,é<ñIs`äÌ[_å¾:Ę6ýÎ,sP/‚‰R(qݬψmŠ|â@,†OÕî}é&μE —ÚǦˆè1¼n–”dñA-f\ÁƒhÉ“Wï¹ ¡wÈPTµWïg7¸L9mWîX¾¥ßî#–YÁQÔÅvDš ¤ºô£plDôx}.nøcG„»kü¯ÿ¦õÒÁˆ#ö5ÿfWrÙÈΙC"1N H¿;Pwä„¶¥åiáŒn´ì!„1Ê:llç ¤‰¥ï¯ ü’ñ"³’oEÅBx*Dø?új/òcûNÃ#<âçÔ:"bÔ’«t:æH¢“ ùqÄÍ$(û¯^Q{ø¨H£P˜¯¿&>¤˜3Ââ4έÒï§y!lSöüîÌ6V¼ž67·ݳUlŸº8“îO¡•¹ùÙ£IÑóì"i„ÆËI“^A–ÄUšÈdR%Ï>–ÖQÁezh骺‰{ÝϼYÒç§±eƒãeMluç#»çª¿ÀP{y@—ñcÇ´Õ#‘ëz2O™X Ü‘rUûbÁ〃Œ~ êKà¶?|”îè¿uã€V‘fv õm¼x¥à¥™Öƒj­“Œ“Þ=íéEˬ :”pRŦT]cÉ2LùºØ"±Aõp'— /²A<£ñÒU¢±ñ.¿Zì-)f„â©Kw/ë;ÈISr®j_²Z«Çëüsn¯|î°}³ïŸ? z6¨OËÎ_D`´T®O×eI2È–…Qw.ÈÄ3v†Ü YÞüdwÛ=–¤Å²5#!¨"7W¢é;yîü /7]½ÞuV¦–ò+E>áDÙvlYƱŽz[XÂc¹°ÿ–O(‚°íSœ/!¡§Êî NqÒ’¯µïÎ*;×Ðkæö-…¡+åO-,Ñ/#³Szùrdt:$Žõ§Nw–‰µ"ûš!{2GyÛé*.=Xü‘¢[cœ‹æ»veÀ¶M\MsjzÞ¸)ºöv®ÒÙ}†tŸ´r°sC#c¾&âò®¦ñ²'™[7b)rwC_´÷ãì)Âß%Ô?e 'S;ò\ßFk/k´yÛ³õ k×U–¾«WìøŒ‹,¿™™û¤¡Tëà×Ïyü8n8¿ªù3|Xb Gf^·ðçúþ~>òS®æ)e$¼äDâ £.~c1)vK¼_|^Á I±ÒT}µWÛÖF5O)à,1"í ö9!̉™€3;ªé„e[EåÃ!õéA!蛯½Îç⃓þóGÛ KŽe‹Ø(EÞL2 akknÌEvŽyKχ%>ýá\“ËÛ¢×r5\ùY³ì<'L8¬ $ÐÅsc'â–jÌ…gÍßÙÏbG©à|¸ß²¥%o¾C5æÂ³f x³‘á)ÁÂÛwŸ7GxxsŠÐ<–hU‘u놃ûÐÃß¹ÏMh¡DÝάÞ÷Ï»zßœèóaIxÎ{C…ïI8Ã'屢<^ŸÇµ°˜Ëõy²œ¤8¸ùÞmöLB ÿhu' GÍøfD‰>g–,')‹dÔˆð¤_hP}ÞZì™+úüLX–8–¡ç;¬[O\Ý”§ÝÄ »¥–ÿbi‰Gÿ?¥Aãtð”èIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial__inherit__graph.png0000644000113200011300000001030012616110567027665 00000000000000‰PNG  IHDR»€S-bKGDÿÿÿ ½§“uIDATxœíÝyPSWûðo$,$:l.¨•÷¶8Nk;¿:jµTªN¥v´&hmAÑ:Õq)R«%NÇʼS­  VÔa÷Ñ*¾:*n HëÂb}e)D£E$@–óû£Ã-!!D0÷ùÌd†Ü“{Ïs_“C<cŒ®/£›­+ ÄZ(ì„7(ì„7(ì„7„¶. *++m]±€nݺ!00nnn¶.Å>Â^SSƒúúzxzzÚºòŠ) øùùQØ[òôôĈ#l]yÅÎ;gë8´f'¼Aa'¼Aa'¼Aa'¼ÑåÂ^RR@`w}üøãØ´iS§¯Õžö®)PRRòJût].즔••ÁÛÛÛêý2ÆššŠ --ÍâýõìÙ«V­`»1Û#^…]§ÓáÉ“'Vï÷öíÛ¸sç’““qóæMÜ¿ߢýy{{s¯ ¶³=rȰ7¿Lçää`È!ðõõÅ’%KÐØØ¨÷8ÆV®\‰   <~üï¾û. wïÞÜcž={†yóæÁÛÛþþþX¹r%ÚmkéÈ‘#xóÍ7áææ†€€¤¤¤èµ§¦¦bܸq˜4i†Úæ³;c ñññ>|8<==ñÁàèѣܒ¤­zšçãÌ™30`öìÙÃclÌpêÔ)H$ôêÕ 7näŽ ìÚµ Æ ƒ6mÚ„”” 4"‘k×®mÿd¯˜(**bEEEf?¾¸¸˜`ÁÁÁìþýû,//I$&—˹6NÇV®\É‚‚‚ØãÇõÎkI&“±‰'²ÒÒRVXXÈFŽÉär¹É¶–ש««c®®®,>>žUUU±ääd& Y]]cŒ1NÇ ÄcŒ}ÿý÷lĈcaŒ±ÄÄDÖ¯_?vòäI¦P(ØéÓ§™D"áÚÛ«'$$„={–ݼy“;ÇØ˜°©S§²ÚÚZ–™™Éps€Íž=›ÕÖÖ²¤¤$€Íœ9“ÕÖÖ²„„½Çš#77—UWW›ýx Jwè°rÇÒÒÒ˜D"áÚ¢¢¢vïÞ=ƒóš5551'''½¾³²²˜D"1ÙÖò:J¥’9;;³-[¶°§OŸ2NÇž?δZ-cŒ±¼¼<& ¹€Ü¸qƒ`·oß6¨iäÈ‘lÿþýzc=pà`V=ÍóÑòšm…ýܹsŒ1Æ´Z-ÀŠ‹‹¹¶üü|n~ŒÝo~¬9ì)칌iÈ}=tèP”——s÷¯]»†ñãÇ#66¶Íó«««¡Õj!‹¹c‰ååå&ÛZêÕ«rss‘——Œ7.\@·nÿLmjj*4 ¼½½!0zôh0º”)--ÅÈ‘#õŽ >¼ÝZ[ιúöí \-õèÑàììlô¾£rè°s_ß¿Ÿûÿ¬£ãã㑚šŠÜÜ\£çûùùÁÉÉ eeeܱÒÒRôë×Ïd[K*• :P*•Ç´iÓ T*¡Õj‘––†­[·âùóçÜmùòåHKKkõ‘Äï¿ÿ®wìÎ;íÖÚìeÂhé·gí‘C‡}éÒ¥())Áµk×°zõj„……qmîîî2d¢££±páB½,ëêêüŽY³faÉ’%xðàŠŠŠ°fÍÈd2“m- #33µµµhjj‚³³3ºwïŽ . ¦¦2™ ÜM*•¢¸¸7oÞÔ»ÖâÅ‹…S§NáÉ“'8{ö,är9Ùõ´¥y̼fë…c_³'%%±2oooöÍ7ß0•Je°FU©TlðàÁ,&&†©Õjöþûï3®]©T²9sæ0///Ö§O¶lÙ2¦R©L¶µî#--‰Åbæââ†ÊrrrcŒEFF²àà`ƒúu:‹ÅlÕªUz×Òjµ,..މÅb&‰ØäÉ“YNNóññy©zZÞ76f´Zw£Õš½­6c÷ÛcOkvc¶ÿëÍ/Ýænñ-))A`` Á2ÀÑ=zýû÷Ç[o½ÅËÌÌÄúõëQPP`ÃÊ:îܹs>|8|}}m] ýu{RXXˆ°°0äç磾¾yyyX»v-"""l]Z—`7¿¼ñ2<==ië2^¹¨¨(Ô××cúôéP(ÀW_}Õ%Çj ¹Œ!Žƒ–1„Ø…ð…ð…ð†Ý¼ÓÐÐÀ‹?”ÄCMMüüzغÞ±‹°»¹¹A¡Pàùóç¶.Åâþûßÿa×®[ؾý#xx¸Øº‹puuµuì$ìb±Xo7_W÷¨Õ:<~쎩SÿÏÖåð ­Ù­¨ºúo\¿þ•uÝÖåð…ÝŠ²²òÑ­›Œ7n<Ä£GJ[—Ä+v+Êȸ­Vprê†Ã‡ss—£¢°[Iii îÞ­âîk4:¤§_³aEüCa·’ìì|8;·œn†ââjÜ»÷—Íjâ »•¤¦^…Z­Ó;&:!'‡–2ÖBa·‚[·¡¢â©ÁqF‹ôô«]î—Pì…Ý ²³ó!:m«¬|†‚‚ÿY¹"~¢°[˜V«CFÆuh4Z£íB¡²³ó­\?QØ-ìÊ•2(•mÿf¿F£Efæuî-Ib9v ;tèF›K˜fOŸÖãÒ%þý ik£°[Øñã…Ðju :ÁÉÉ NNݸûÍÿNž,²q¥]Ÿ]lëÊ6ož‰§Oë¹û·n=Âþý—±yóL½Ç °vi¼Ca·°)SÞÒ»ïéùöᅩ°°÷lTÑ2†ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð…ð†Á'oœ={%%ôaV–RTT عs§+éÚ‚ƒƒñúë¯ëd­…B€nº ÎÌÉIdó:ºúmöìÙ­£nðÌ®ÑhƒñãÇ·n"Ä!¬[·Æà8­Ù oPØ oPØ oPØ oØ$ì˜0a‚ծɯ bðXKÔb 掣£ãí ók“°{xx`öìÙVëïÉ“'øí·ßð믿šì¿ªª Ÿ|ò‰ÕêêŒÖµZ{N[r”ùµIØE",X`µþ¾¾¾&û×ét¨­­µZ]ѺVkÏiKŽ2¿ ;c ‡Â_|?þ‹/FAA&L˜Æ>ŒyóæaÊ”)X¾|9._¾Œ &¼´]ºt ááá†T*Å©S§Œö×|ÞÅ‹1g΄††â矆Z­6¨kÇŽˆˆˆÀßÿ¯¿þðé§Ÿê]§µÖþù‡øøx„††"44ñññÐh4Ü5òóó1kÖ,ܾ}Ûä\µ5ÆöÆtùòeÌŸ?“'OÆŒ3pàÀ£µ¶S[ç™âÈókŽN…ýرcØ»w/"""’’‚¹sçbãÆ€ãÇ#%%‹/Æ “ɰ}ûvƒk444@.—cúôéHMMÅœ9s°yóf444´Ùovv66nÜˆØØX\¹rEïÉCBBòóó±uëVˆD"üòË/€¬¬,“ã1ö¸ƒ¢ªª øé§ŸŸŸÝ»wsíéé鈎ŽF```›×5gŒÆÆT__~øØ·o-Z„ÄÄD<{öÌä˜LgG›_su*ì™™™X¸p!ÆŽ ///Œ3zmo¿ý6D"F/¿üÒàjµŒ1¨T*¸¸¸`òäÉ8rä\]]ÛìwÑ¢Eð÷÷ǰaÃÓ§Osm;wîDZZbbbàééÙ™áNœ8¥K—Â×׈ŒŒÄÕ«W¹ö `Ô¨QpsskóæŒÑؘ\\\œœŒ%K–ÀËË‹[&¼xñÂdÍ=ÏT-Íìq~Íe°]àeTUUA"‘è TVVbРAzmsôèÑqqq8xð vïÞÁƒC*•b̘1möëïïÏ}=`À( îþ½{÷„}ûö!::º#ÃÒó×_aÆŒzÇÜÝÝõúo9c46&¡PˆòòrlÙ²*•Êìg·Žžgª–fö8¿æêTؽ½½QZZ ±XÌûóÏ?~~~xðà~xøð¡Á5¡Óé —Ë¡ÑhpæÌ¬^½ÙÙÙèÑ£‡Ñ~ËË˹ë>zô^^^\[ll, ÂÃÃñÑGaÔ¨Q"D"âââЯ_?@]]”J%×.¶?…¦ÆhjLËåËåxï½÷ V«qâÄ ³úëÈy¦jifók®N-cBBB°cÇ\¼xJ¥W¯^å¶®NŸ> ¸~ý:jkkQPP€={ö@ è]C àÛo¿ÅùóçñâÅ ¨Õj…Bî%þرc/¿Û¶mCEEîÞ½‹¤¤$|øá‡\›››ú÷ï©TŠ­[·¢©©é¥Ç¥R©¸¯ÇŽ‹ÄÄDTWW£¬¬ QQQz!5G{clkLjµB¡MMMÜZ¶¾¾Þh­ÍÌ9¯YW˜_su*ì³fÍBhh(¶oߎ°°0ìÝ»‘‘‘þ ûÌ™3©TŠÔÔT,\¸"‘Hï...øî»ï€Ï>û ˆ‰‰‹‹ `Ë–-?XMš4 +V¬@tt4ÞyçÈd2ƒÚ¤R)˜õ.D³Þ½{ã7ÞÐ{Y G÷îÝ1þ|,[¶ b±˜£¹Úc[còððÀ¢E‹°~ýzÌ;½{÷ÆÄ‰e´Öf¦Îk­+̯¹Œ1¦w@ èÔßŠŠ „……!66¾¾¾zKœóçÏ#%%‰‰‰ºvnnn‡Î·Gö4&{ª¥3Ö­[¤§§·<œa±ÿT*++Æ P\\ŒÆÆFüñÇصk¦L™b©. 1éÕ­þ[ùüóÏÑÐЀ5kÖàÙ³gèÓ§BBB0mÚ´_ÓÝݽSç[R{û?Úz¶´§1ÙS-–ðÊ—1„ØšÕ—1„Ø »³ô¶]¾¡°Û{Ú¶ÛQØíˆ=mÛíŠ(ìàÛvÉ¿(ìähÛv‰ßgïêŒmÛ?~¼Ñm»¤¤$Èd2$''Ã××®®®/½m÷eÏ#ÿ¢°w£mÛ%ös´m»„ÖìfÏÛv‰qôÌÞA-·íÖÔÔ oß¾mnÛmhhÀĉ!“ÉàââÂm¿}íµ× •J¹í·ä¶À?~\¯¿–Ûv[Ÿ·mÛ6kß!ÑÞ è*[eí!¼G˺¶]ò/ » ]†ôìÙË—/ÅÕ΢e á ;á ;á ;á £? Þ¸quuuÖ®…W¢²²>>>† ­?,ÒßßßæŸaI7ºuö¶bÅŠö?õÑ£G­Ò%Кð…ð…ð…ð…ðÆÿ®ïÓ`œ¡IEND®B`‚pktools-2.6.6/doc/html/classCostFactory__inherit__graph.map0000644000113200011300000000043512616110567021031 00000000000000 pktools-2.6.6/doc/html/classBadConversion__coll__graph.md50000644000113200011300000000004012616110566020513 000000000000005b65c0253f2ad29e47793e73620a6377pktools-2.6.6/doc/html/pkcomposite__gui_2mainwindow_8cc_source.html0000644000113200011300000011467512647637661022555 00000000000000 pktools: /home/kempenep/pktools/qt/pkcomposite_gui/mainwindow.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.cc
1 /**********************************************************************
2 mainwindow.cpp: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #include "mainwindow.h"
22 #include "ui_mainwindow.h"
23 #include <QFileDialog>
24 #include <QProcess>
25 #include <QMessageBox>
26 #include <QShortcut>
27 
28 MainWindow::MainWindow(QWidget *parent) :
29  QMainWindow(parent),
30  ui(new Ui::MainWindow)
31 {
32  ui->setupUi(this);
33  QStringList resamplelist;
34  resamplelist << "near" << "bilinear";
35  ui->resample->addItems(resamplelist);
36  QStringList crulelist;
37  crulelist << "overwrite" << "maxndvi" << "maxband" <<"minband" << "mean" << "mode" << "median" << "sum";
38  ui->crule->addItems(crulelist);
39  QStringList interleavedlist;
40  interleavedlist << "BAND" << "LINE" << "PIXEL" <<"BSQ";
41  ui->interleaved->addItems(interleavedlist);
42  QStringList compressedlist;
43  compressedlist << "NONE" << "LZW" << "PACKBITS" <<"DEFLATE";
44  ui->compressed->addItems(compressedlist);
45  QStringList otypelist;
46  otypelist << "" << "Byte" << "Int16" << "UInt16" << "UInt32" << "Int32" << "Float32" << "Float64" << "CInt16" << "CInt32" << "CFloat32" << "CFloat64";
47  ui->otype->addItems(otypelist);
48  QStringList oformatlist;
49  oformatlist << "" << "GTiff" << "HFA" << "ENVI";
50  ui->oformat->addItems(oformatlist);
51  setDefaults();
52 
53  ui->listWidget_input->setSelectionMode(QAbstractItemView::ExtendedSelection);
54  //pressing DEL activates the slots only when list widget has focus
55  QShortcut* shortcutDel = new QShortcut(QKeySequence(Qt::Key_Delete), ui->listWidget_input);
56  connect(shortcutDel, SIGNAL(activated()), this, SLOT(deleteItemInput()));
57  //pressing Backspace activates the slots only when list widget has focus
58  QShortcut* shortcutBackspace = new QShortcut(QKeySequence(Qt::Key_Backspace), ui->listWidget_input);
59  connect(shortcutBackspace, SIGNAL(activated()), this, SLOT(deleteItemInput()));
60 
61 }
62 
63 MainWindow::~MainWindow()
64 {
65  delete ui;
66 }
67 
68 void MainWindow::deleteItemInput()
69 {
70  qDeleteAll(ui->listWidget_input->selectedItems());
71 // delete ui->listWidget_input->currentItem();
72 }
73 
74 void MainWindow::setDefaults()
75 {
76  //input
77  ui->listWidget_input->clear();
78  ui->ulx->clear();
79  ui->uly->clear();
80  ui->lrx->clear();
81  ui->lry->clear();
82  ui->extent->clear();
83  //composit
84  ui->resample->setCurrentIndex(0);
85  ui->crule->setCurrentIndex(0);
86  ui->cband->setText("0");
87  ui->bndnodata->setText("0");
88  ui->srcnodata->setText("0");
89  ui->min->clear();
90  ui->max->clear();
91  //output
92  ui->output->clear();
93  ui->a_srs->clear();
94  ui->otype->setCurrentIndex(0);
95  ui->oformat->setCurrentIndex(0);
96  ui->ct->clear();
97  ui->dx->clear();
98  ui->dy->clear();
99  ui->interleaved->setCurrentIndex(0);
100  ui->tiled->setChecked(false);
101  ui->compressed->setCurrentIndex(0);
102  ui->dstnodata->clear();
103  ui->file->clear();
104 }
105 
106 void MainWindow::on_toolButton_input_clicked()
107 {
108  on_actionInput_image_triggered();
109 }
110 
111 void MainWindow::on_toolButton_output_clicked()
112 {
113  on_actionOutput_image_triggered();
114 }
115 
116 void MainWindow::on_toolButton_file_clicked()
117 {
118  on_actionSelection_Info_file_triggered();
119 }
120 
121 void MainWindow::on_toolButton_ct_clicked()
122 {
123  QString qsctfilename=QFileDialog::getSaveFileName(this,"Color table ASCII","","*.*");
124  ui->ct->setText(qsctfilename);
125 }
126 
127 void MainWindow::on_toolButton_defaults_clicked()
128 {
129  setDefaults();
130 }
131 
132 void MainWindow::on_actionInput_image_triggered()
133 {
134  QFileDialog dialog(this);
135  dialog.setDirectory(QDir::homePath());
136  dialog.setFileMode(QFileDialog::ExistingFiles);
137  QStringList fileNames;
138  if (dialog.exec())
139  fileNames = dialog.selectedFiles();
140  ui->listWidget_input->addItems(fileNames);
141 }
142 
143 void MainWindow::on_actionOutput_image_triggered()
144 {
145  QString outputfilename=QFileDialog::getSaveFileName(this,"Output image","","*.*");
146  ui->output->setText(outputfilename);
147 }
148 
149 void MainWindow::on_actionSelection_Info_file_triggered()
150 {
151  QString infofilename=QFileDialog::getSaveFileName(this,"Selection info image","","*.*");
152  ui->file->setText(infofilename);
153 }
154 
155 void MainWindow::on_actionQuit_triggered()
156 {
157  close();
158 }
159 
160 
161 void MainWindow::on_toolButton_Run_clicked()
162 {
163  try{
164  ui->commandLineEdit->clear();
165  ui->consoleEdit->clear();
166 
167  QString program = "pkcomposite";
168 
169  if(ui->listWidget_input->count()<1)
170  MainWindow::on_actionInput_image_triggered();
171  if(ui->listWidget_input->count()<1){
172  QString qsError="No input image file selected";
173  throw(qsError);
174  }
175 
176  for(int i = 0; i < ui->listWidget_input->count(); ++i)
177  {
178  QListWidgetItem* item = ui->listWidget_input->item(i);
179  program+=" --input "+item->text();
180  }
181 
182  if(ui->output->text().isEmpty())
183  MainWindow::on_actionOutput_image_triggered();
184  if(ui->output->text().isEmpty()){
185  QString qsError="No output image file selected";
186  throw(qsError);
187  }
188 
189  program+=" --resample "+ui->resample->currentText();
190  program+=" --crule "+ui->crule->currentText();
191  if(!ui->otype->currentText().isEmpty())
192  program+=" --otype "+ui->otype->currentText();
193  if(!ui->oformat->currentText().isEmpty())
194  program+=" --oformat "+ui->oformat->currentText();
195  program+=" -co COMPRESS="+ui->compressed->currentText();
196  program+=" -co INTERLEAVE="+ui->interleaved->currentText();
197  if(ui->tiled->isChecked())
198  program+=" -co TILED=YES";
199 
200 // QList<QCheckBox*> qcheckBoxList = this->findChildren<QCheckBox *>();
201 
202 // for(QList<QCheckBox*>::ConstIterator qcbit=qcheckBoxList.begin();qcbit!=qcheckBoxList.end();++qcbit){
203 // if((*qcbit)->isChecked()){
204 // QString qsOption;
205 // qsOption+=" --";
206 // qsOption+=(*qcbit)->objectName();
207 // program+=qsOption;
208 // }
209 // }
210 
211  QList<QLineEdit*> qlineEditList = this->findChildren<QLineEdit *>();
212 
213  for(QList<QLineEdit*>::ConstIterator qlbit=qlineEditList.begin();qlbit!=qlineEditList.end();++qlbit){
214  if(!((*qlbit)->text().isEmpty())){
215  QString qsOption;
216  qsOption+=" --";
217  qsOption+=(*qlbit)->objectName();
218  qsOption+=" ";
219  qsOption+=(*qlbit)->text();
220  program+=qsOption;
221  }
222  }
223 
224  ui->commandLineEdit->insert(program);
225 
226 // QProcess *myProcess = new QProcess(parent);
227  QProcess *myProcess = new QProcess(this);
228  myProcess->start(program);
229  myProcess->setProcessChannelMode(QProcess::MergedChannels);
230  this->setCursor(Qt::WaitCursor);
231  myProcess->waitForFinished(-1);
232  this->setCursor(Qt::ArrowCursor);
233  QString p_stderr = myProcess->readAllStandardError();
234  if(!p_stderr.isEmpty()){
235  QMessageBox msgBox;
236  msgBox.setText(p_stderr);
237  msgBox.exec();
238  }
239  QString p_stdout = myProcess->readAll();
240  ui->consoleEdit->insertPlainText(p_stdout);
241  delete myProcess;
242  }
243  catch(QString qsError){
244  QMessageBox msgBox;
245  msgBox.setText(qsError);
246  msgBox.exec();
247  }
248 }
249 
250 void MainWindow::on_toolButton_extent_clicked()
251 {
252  on_actionExtent_triggered();
253 }
254 
255 void MainWindow::on_actionExtent_triggered()
256 {
257  QString qsextent = QFileDialog::getOpenFileName(this, "extent");
258  ui->extent->setText(qsextent);
259 }
pktools-2.6.6/doc/html/inherit_graph_12.png0000644000113200011300000000266312616110570015475 00000000000000‰PNG  IHDR˜%1ô·ÝbKGDÿÿÿ ½§“hIDATxœíšKH[ÇÏ\c¬ÆF iðk”h¥Ü´´P*\¸Ð…­n‚4‚ÝTZ³(}@³(Ú¦¸h±P&Æ*B0‚(µƒ¤‹Jª‹R§u‘SbCJÒ¼æÜÅp‡éÌd2MÒæÞ¹ç·:ó}çñÏüó9y`B€øïóW® ²2R$ #E2R$Hè>ŸoppðǹRƒÈ¡C‡Ä`0( ¿ßOFp§ÖâÏr’²CÎáQ˜¹xÀÌÌ =’åg¤Ãá8sæÌÙ³gµZ-£Â._¾¬Õj/^¼¹~8ãÉÒ÷(ª}âÄ @YY|öì™Z­v»Ý.—K§Ó•——“;>ÞÐÐ —Ë[ZZ\.W² 3‘HŒŽŽÖÕÕ>|øÔ©S/_¾$ãl=tñœÒîªðŠôz½û4b±„ ˆêêêGA¯]»vìØ1úÇ··· ŸÛÈdYNØFnnnB#‘È›7o‰Ä‹/È™k=þBF…dm6µ®ÝnO&¬®®nrr’º´Z­€”z8;± ;[+c±ŽŽ€ÃáˆÇãJ¥ðææfr1ÆÀK—.étºþþ~Èõ†àÏò£ÕjR©t{{»½½½¹¹yrr’³'Y+ùùùB²ïß¿oll¤² É|øð¡©©‰º<~ü¸=B ‚îG&‡x<^^^n6›©ývhh¨¶¶– Æ™LvåÊÀªHÎ,'ìŠ$Û¡P¨  Àét‡WÍQk ÉjµZ»ÝN­;==LX}}½Õj¥.É}2¥Î pktools: /home/kempenep/pktools/qt/pkdiff_gui/main.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
main.cpp
1 /**********************************************************************
2 main.cpp: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "mainwindow.h"
21 #include <QApplication>
22 
23 int main(int argc, char *argv[])
24 {
25  QApplication a(argc, argv);
26  MainWindow w;
27  w.show();
28 
29  return a.exec();
30 }
pktools-2.6.6/doc/html/classSVC__Q__inherit__graph.png0000644000113200011300000000763312616110567017661 00000000000000‰PNG  IHDRM» ´bKGDÿÿÿ ½§“PIDATxœíkPWÇÿ!˜ â+7´[m‹Â@+xA¥Ð~CQ¼T;ÖKýP§­¬êPœVVk[•w:zKAE;5â ¢¨-/ ‚Šˆ¶A(B!çýÀ°ºlbÂ$k{~3Œæœ“³Ïþ²g÷l²û¬„BÀèNŽàE„I£€I£€I£À¹oÁÚµkñÇ8"Qâââ‚Ý»w# €+“ô=zJ$„‡‡ÃßßßÌÌL¨T*ÌŸ?Ÿ+liðé§Ÿòý›‘H$‚2¶O£€I£€I£€I£`P¤=yò‰‰‰˜4iÜÜ܆o¾ùƒk#‘H0vìX˜:Õ…D"AMM̀⨩©1¹ãl,íï¿ÿFhh(.]º„­[·¢´´6lÀþýûîîn®m]]ÊËËyïonn†F£±jYµµµðöö6[ïî¤$ºé¤ˆJ¥ê[l–õëדÈÈHb0xåmmmdôèÑ$55•ë7&&†lܸ‘×.--ÄÆÆ¤ººú¹Ëª®®&&B¶)¦| xKÛ¿?6mÚ©TÊ+6lqàÀ®,>>jµš7D9‚yóæñÞ›››‹àà`¸ººB¡P`ëÖ­€ððp€ŸŸ€§Ã±  HKKã†çñãÇñòË/£¹¹pèÐ!Œ7Ož<è*lKknn&È£GLÖOOO®ßÊÊJâççG®]»F!äñãÇÄÕÕ•üùçŸÜ–ÖÚÚJd2Y¾|9¹wïÙ¿?@>|(ØÒz_ÇÆÆ’ÂÂBRVVÆ«_ºt)Y¶lyðàñõõ%—.]²j½,ù0yFÐ_Ìí| !przº1K¥RÌ;jµAAAÈÍÍÅÔ©Sáååŵ‘Ëå(//‡¿¿?†Êε´´˜]þ¶mÛ(8ìÚµ ˆŽŽÆš5k6ÕäÐðtww‡ŸŸÊÊÊLÖ—••aüøñ¼²øøxdff‚brhÊd2TUU!&&!!!HKK³Gße<ߪU«póæM¬Y³Æº•²k6Çç±nÝ:2}útÞ !!| Ø´iûŒ+‹‹‹Ã矎úúzTTT &&»wïîw߃ÕO°‹4¹\Ž´´4dddàÔ©S€-[¶`øðáFTT&Mš„mÛ¶õ»ïÁê§?ëÖµZ ˜MÿðO¢÷©l–¾;dçž0i0i0i0i0i0iX}î9gÎ[Æ!Àht‚““}sÜ^¿~Ó¦M³ØÎ¢´É“'#!!÷ @[ÓÝ-ÁåË Œ§…——ÎnË6mšuî×w'vB¥ºLŠOÈâÅÿut(&å>­' µçÎý--íŽG€è¤=zô7ŠŠªÐs= pü¸éGÆ9ÑIËÍ-ã~z#„àÈ‘G$DtÒÔê+\nH£‘àÊ•z46Šë¢’vçÎ_¨¨¸ËK¨)•:!'皣"*iÇŽ]ã倀în#23Å5DE%-3³]]ü -!••¸u롃¢"i••¨©yˆÞ£æ³ "ENN©ýƒ2ƒh¤åä”B&3}‚ÒÕÕÇ/Û9"óˆBZÏÔâ ôzƒÙ6 ͨ¨¸kǨÌ# i¥¥õ¸ÿùÓ 1 QQHëÉ/Lælö¯»ÛˆìlqL=D‘†zÆŒñpv–òÊÔêL™ò*üý=¹2//7{‡fa`–†ú“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“FàJH½^ÇC§³ß}–æÈÏÏǃ޽ª;::šË›ÄÑ÷*¿¬¬,»§~óßÂ… WB ¶4ƒ¡ç²ô3gÎXüþé$''s>ž…íÓ(`Ò(`Ò(`Ò(”›/:::––F­V‹‘#GbÖ¬YX¼x1d2²³³qàÀdffò²B€  ..ð×_aïÞ½¸qãZZZ0jÔ(,^¼‘‘‘VÇ£ÓéžžŽË—/ãþýû=z4"""©Tj¹ Ê–öÃ? ºº_}õT*qᤦ¦f̘­V‹7nðÞW]]Gaúôé€ÖÖV¬X±r¹›7oFjj*¢¢¢’’‚’ën”mooÇêÕ«ñûï¿cÕªUøù矱hÑ"äååA©TÂhx‚”A‘VTT„•+WbìØ±pwwÇĉ±víZ\¸pàááœ={–÷>Fƒ‰'ÂËË °oß>C©Tb„ 5jæÏŸ¸¸8¨T*«bÉÈÈ€»»;vî܉ɓ'ã•W^Add$RSSÑØØˆ“'Ox}Eš««+rrrÐÚÚÊ•Mœ8‘·¢QQQ8wîï“>þ^{í5“õcÇŽÅíÛ·û»zEZhh(T*víÚ…ÀÀ@œ>}‹-BAAׯÍÍ áááÜ™ÆùóçàuF:|s}BÌæËíîA§Ó¡°°0aÂ,]º¿üò –,YÂzyvˆj4DEEquLJ‡‡êëë˨¬¬ÄG}„ÎÎÎçÆâææOOOÁ³z©©©1¹%÷—K#„`Ë–-¨­­åÊ$ Þzë-A&¬)S¦@§Ó!??·nÝBDD¯~êÔ©P©T‚ô°yyy0 Ëåã™={6222xûΔ”ààÁƒ˜5kÍjò°´¡C‡"::ÉÉɸxñ"qóæMìÝ»W \.GDD~úé'ÃÝÝWÿᇢ¼¼_ý5nÞ¼‰ÚÚZ¤§§ãèÑ£X±b…Uñ,[¶ Z­ëׯGII îÝ»…B-[¶@¯×ã½÷Þè* “÷&îÏ·F£¿þú+4 àáá™3gâƒ>€L&ãµ½té6lØ¥R‰wß}WÐWSS7¹íèè@@@Þÿ}¼ýöÛVÇ£Óé°oß>””” ¡¡ÞÞÞˆŠŠÂõë×áééiuêýäädŒ9R,xP¤½( TUUáõ×_·ª½9iÿªsOggg«…=·ŸAˆÅ®<;6…=FÈ 'M »Õð,˜4 ˜4 ˜4 ˜4 GÏÞ¯ƒ-Úÿ-$$$Êg:§N²kÚi1‚1cÆðÊ,>˜†!„íÓ(`Ò(`Ò(p`ÝÃÇÿ­.Ã4ÃLfIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkdiff__accuracy_1_1pkdiff__accuracy.html0000644000113200011300000002710112647637662026305 00000000000000 pktools: qgis.pktools.pkdiff_accuracy.pkdiff_accuracy Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkdiff_accuracy.pkdiff_accuracy Class Reference
Inheritance diagram for qgis.pktools.pkdiff_accuracy.pkdiff_accuracy:
Collaboration diagram for qgis.pktools.pkdiff_accuracy.pkdiff_accuracy:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string REFERENCE = "REFERENCE"
 
string ITERATE = "ITERATE"
 
string LABELREF = "LABELREF"
 
string NODATA = "NODATA"
 
string OUTPUT = "OUTPUT"
 
string CMOUTPUT = "CMOUTPUT"
 
list CMFORMAT_OPTIONS = ["ascii", "latex"]
 
string CMFORMAT = "CMFORMAT"
 
string FORMAT = "FORMAT"
 
string LABELCLASS = "LABELCLASS"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 93 of file pkdiff_accuracy.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite__inherit__graph.png0000644000113200011300000000724412616110567025404 00000000000000‰PNG  IHDRÕpó¢‰bKGDÿÿÿ ½§“YIDATxœíÝ{P×ð³Jd(B © Ð3Nÿ¨”fPj u*’@}@Ë(SÊÃZè´ÚZ[”D^NC)Q@iD{q$«R‘ÇEêƒg;(HÉîýcïÝFH¸ÀIà|þpv{Îùø²» IÄ‚‰ìe å å 剻€(ŠÖÖVÇa²Ä988ØÚÚ®â¿ô(2™l``@¾5K’L&ëëëÓŸo²åäéé »„¥ì?þ€]ÂsÐýÊÊÊÓRÈ_[[†a‹9Ô矎aXzzú|Õ0]w ÃÚÚÚæ<¬þ[ ùÓª££ƒÁ`,ÄÈA;;;‹D¢ùsÕªUIII`!ËÖOK68Ž ,ÄÈ÷îÝ{ðàA^^^cccKK˼ŒÉ`0ȳé•­Ÿ ,äuª¼¼ÜÝÝÝÎÎîðáÃãããÔW ‚ˆ÷ööþûï¿7nÜX³f ù¥¡¡¡½{÷2 ''§øøx…B1]#E,¿öÚkæææL&S(RíÅÅž¾¾SOAðùüõë×[YYmÞ¼ùÒ¥Kä…uê\äZ®]»æìì|öìYò°Ie*++Y,–µµuZZÙ‚aX~~þºuëlmmÓÓÓ…B¡««+N?~üø¼}£ ¡7z{{%ÉÌÇ´¶¶ØlvKKKMM ‹ÅJII!q§ÂGIuäñx[¶liooojjòòòJIIÑÚHõ133ãóùR©4//F£ŒŒ㸫««@ âÓO?õôôÔ,Œ ˆœœGGÇ_~ù¥¿¿ÿêÕ«,‹lŸn®­[·VUU566’‡M*ðöÛoËd²ÒÒR¹4@hh¨L&ËÍÍìÚµK&“ ê€477777ëöƒYH™¿¦¦&rW$±X,²111ðèÑ#Í#Ém¥RillL}ßËÊÊX,–ÖFª×àà ‰‰É‰'ž>}Šãø³gÏÔj5A5554ü1×ÕÕîÝ»§9——×?þH\TT˜a.r-T÷©ù»~ý:AjµÐÚÚJ6Ö×ד뚴M0}ËŸ]I¯¼ò ¹áááÑÕÕEn×ÖÖúùù¥¦¦N=¾··W­V»¹¹‘»,«««Kk#ÕÅÚÚZ"‘ÔÔÔ899ùúúÞ¸qÃÈÈP\\¬R© †a6lLº···{yyQ»ëׯŸ®j 3/ÖÁÁ@ÎNY¹r%ÀÄÄdÒ¶Á1Èü‘' @KK ùãˆÅb>Ÿ_\\,‘H&¿zõjcc㎎r·½½ÝÑÑQk#ÕE.—ã8~þüùÁÁÁˆˆˆíÛ·ªÕj‘H”‘‘ñìâââD"¡ñÍ¿±>xð`ºÈíæf¾žZÒO™¿ØØØ¶¶¶ÚÚÚ£G†……‘–––îîîGŽ‰ŽŽ¦IŒŒŒLLLBBB>ÜÙÙÙÜÜ|ìØ1§µ‘šÃ06›]ZZ*“É”J¥‰‰‰……Å7úúúx<ÞŠÿár¹­­­äÝ)&&&11±²²r`` ªª*%%ð™çšŠ,{Y€}ðÙßÿåææº¸¸0ŒC‡ÉårÍ{&¹\¾víÚää䉉‰7ÞxcÅŠdûàà`xx¸½½ýG}$—˵6j%‰ÜÜÜLMM=<<ÊËË ‚ˆŠŠb³Ùšõà8îææ–””DuT«Õ™™™nnnt:=00°¼¼ÜÖÖö…sQÛ“Ê·t@ãþojã¤íéèÛýŸAæoQÊ™#±XÜØØHí–””x{{C¬g}ËŸA^õYSSSXXX}}ýØØXMMÍñãÇ###a¥¿ôîõ§3³²²ŠŠŠ‚]ÅLÇÆÆ8N?“ÉÜ¿¿ž FèÍûÏûúúîß¿ïç绥Œ|l®?/2G×_&”?&”?&”?&½{üÛÓÓ»„¥L¡P˜››Ã®âz”?333 Ãæë‹Ç‰Ó§ë‚ƒÝW®E«V­‚]Â?ô(t:Ý××v:¨©i¿uëgww&ç»C…îÿæîÂ…:ò_• }fÍ¡üÍ‘R©*+k UW?‚]Ž¡Bù›£ë׎ŒÊÊê`—c¨Pþ樴´ÎØØ RáW®4ÉåJØ$”¿¹ÿ׿šU*5¹;>®ºzõ>Ü’ Êß\h†`d„•–Þ…XáBù›‹ÒÒ»šoËP©p‰ä¡L&‡X’BùÓÙààhuu‹ZýÜs.A\¾Ü«$Ã…ò§³K—þ=µ‘ ˆóçÑ%Xg(:+)©ú¢]'jjÚ{{‡¡”d¸PþtÓÓ3TW÷ŽkyѸ±±‘X¬åÔˆÌåO7bqãtoXP©Ô¥¥è‰hÝèÑë ÂØ˜ÒÞÞŠÚ777¡Ñþûk¼¤?ª`AèÑû ‘ƒÃG|þžwÞñ†]ˆ¡B×_&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?&”?*BÃo¿ýfjj »"Cbfældd» C’ ¹ç>ÿ¹»»[©T&''Ã*YÚΟ?ÿçŸj¶hùüq??¿Å©Yn~ýõ×I-èþ å å åió×ÝÝíïï«ûB›Çò–ÏJ§ZÀü­X±"44táÆ‡‹ZT*ݱcìrЂ®tóG§Ó8°pãÃE­Çq™L»œ´ +Õ9A\¸paÏž=Û¶m‹‰‰ihhð÷÷'âçŸÞ»woPPP\\ÜíÛ·ýýý5ÏÛ·nÝŠˆˆ`³Ù\.·²²rÒ˜ä‘7oÞ þþûï'&&4gÌÎÎŽŒŒV«Õ!!!'--mdd„?88888˜Ïç«Tªå¹ÒYÒ9?üðCdd¤P(|ÿý÷ÓÒÒ—/_ …111EEE<ïÔ©Sš] EJJ ‡Ã)..ÿúë¯ ÅÔ‘/^¼˜–––ššúûï¿‘A‚úúúŒŒ :^RRR]]–––™™ùøñãÂÂBò°“'Oö÷÷óùü¯¾úª¶¶ö§Ÿ~"Ûëêê²³³8““sûöí¼¼¼ƒ …Bê÷xê¤S‡š¹þÓ§OÊÊÊÈÝ’’©T*¾ýöÛúúú‚‚‚å¼ÒÒ9¥¥¥ÑÑÑ›6m²±±ñññ‰ŒŒ¤_ýu:¾aÆ}ûöiv™˜˜ B.—›ššŠÅb33³©#ª{HHˆ……›Íp¹\ ‹ÀÀ@À³gÏ´Nªu¨YÖOºråJll¬“ÉŒŠŠºsçÎr^é éüÿÿJ¥R‹Eí2™L@OO««+ÕøòË/kvY¹refffIIIAAÁÚµk¹\®ÏÔ‘œœÈ ggçþþ~rûÑ£GÞÞÞ………GŽôööR‡¹¸¸¸¸¸ž>}Šã¸ƒƒÙîèèHu·°°Ðh´IÛÓMªu¨YÖOzòäÉÎ;©]KKËå¼ÒÒùüÇ`0ÚÛÛ©]òÏÉ«W¯îìì¤ÿúë/Í.ããã8ާ¤¤ˆÅâmÛ¶=z”ú¥ÔÔÕÕEn<~üØÆÆ†ÜNMM‹‹«ªªjhhØØØøÃ°7ß|“¬pù¬TWAÔιsçBBB$Éìûwww‡……¥¦¦ÚÙÙ¹¹¹‘ÕÕÕB¡0''G§Atš÷ÿ‡&]|Ÿ}ö™­­í¹s稖ùyþ¹££ãË/¿lmm¿ÿ~~~~PPмŒŒ,m:_µÚ½{·B¡8vìØÐн½ýÖ­[·oß>ûî–––:?/Фúàÿ½þ"Èì-ÔõAæå å åIËãßøøøÅ¯Y:::&ýÁæ¹üùøøìÞ½[­V/nUÈrÁd2wíÚ¥ÙòÜó/²ÈÐýÊÊÊÓÁå• oŸëèIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract__coll__graph.png0000644000113200011300000001042712616110567026064 00000000000000‰PNG  IHDRÛp—XmbKGDÿÿÿ ½§“ÌIDATxœíÝyLTWûðïQ„FA—¶ö%–¦©Qª%®ÔвX¬A«E¤.…¦¬Qˆm© V(Á¢mƒ¯@µ*u^µnlmdG² Ë̜߆ûc`†Eä0Ï'™„{Ͻçî;wpÿþ}ÄÄÄ   =Ðñ„B!÷T]sŽ42líˤ³gÏbÊ”)011Á¶mÛÐÒÒ¢pc ~~~˜9s&ž={†wÞy0nÜ8î˜ÚÚZ¬[·B¡ðóóCsssmeddà7Þ€¾¾>¬­­§Ðž˜˜ˆ9sæ`þüù°³³SùÓ1†ˆˆL›6 †††xÿý÷qîÜ9nI¨ªžöçãâÅ‹˜8q"Nž<É£lΙ™ ‘H„1cÆ $$„Û/pâÄ L:cÇŽÅÁƒ+++aÿþý=¿@ÃîÞ½ËîÞ½Ûëã æääÄ=zÄrss™H$bAAA\›\.g~~~læÌ™ìÙ³g çuäîîÎæÍ›ÇŠ‹‹ÙíÛ·ÙŒ3XPPP·mûihh`zzz,""‚UVV²˜˜¦££ÃcŒÉårfeeÅ"##cŒíÝ»—MŸ>½Ë\c,**Š™››³ß~û‰ÅbváÂ&‰¸öžêY¸p!ËÊÊbÜ9Êæ €-Y²„ÕÕÕ±ÔÔT€{ް5kÖ°ºº:ͰU«V±ºº:©plodgg³ªªª^?ˆÖè°Ý¾}›Û—””ÄD"׿ïïϰ‡v9¯]kk+ÓÖÖVûÌ™3L$uÛÖ±Ÿêêj6bÄvøðaVSSÃär9«¯¯g2™Œ1ÆXnn.ÓÑÑá¾AoݺŰ;wît©iÆŒìÇT˜kBBЫzÚŸŽ}ª [NNcŒ1™LưÂÂB®-//{~”m·ÛÃ)l¹ŒlgkkË}mgg‡²²2nûƘ;w.‚ƒƒUž_UU™LnŸH$BYYY·m3ÙÙÙÈÍÍ………æÌ™ƒË—/CKëÅK“˜˜©T ¡P@{{{Pº”,..ÆŒ3öM›6­ÇZ;>½5~üxàêìhôèÑ€#F(ÝÖT¶ÂÂBîëGqß@À‹ë¨ˆˆ$&&";;[éù¦¦¦ÐÖÖFII ·¯¸¸æææÝ¶u$‘H —Ë‘œœŒêêjlܸK—.Euu5d2’’’Šúúzî±sçN$%%uúD KKKüõ×_ ûîß¿ßc­íú†þõÈp¤ÑaÛ¾};ŠŠŠpãÆ ìÙ³\Û¨Q£0eÊÀÇÇGáÆFCC€ßœ®®®Ø¶mJKKq÷î]ìÛ·îîîݶu$àää„ÔÔTÔÕÕ¡µµ#FŒÀÈ‘#qùòe<}úîîî000ànnn(,,DAAB_[·n…¿¿?233ñüùsdee!(( ×õ¨Ò>gÒê^Ⱦ /{ÍÍ,--™P(d¾¾¾L"‘t¹F‘H$lòäÉ,00µµµ±÷Þ{píÕÕÕÌÓÓ“3333¶cÇ&‘Hºmëþø?ñþD@===u—ñJ ‹[ÿšdÏž38yò2ÒÒ|áà`­îrHïÑ­ÿ¡D*•#-í& -í–š«!}EaB~ÿýêê$€ÔÔ<´µÉÔ\é ÛræL´µµMM-ÈÉy æŠH_P؆ˆ¦¦VüòËÿ •¾øi¦­-@j*-%‡ Ûñßÿþ¥°l”Jåøí·;hlléæ,2˜P؆ˆ””›è|§_*•!3ó/å'A‡Â6ÔÖ6!;û^|UG¤¦ÞTKM¤ï(lCÀ¯¿ÞVº_.—ã÷ߢ¦¦‘çŠÈË ° ÉÉ7!—«~ïÁ¹sÿã±ò²(lƒÜ“'ÿâÏ?KT~^ c ))7x®Š¼ Û —‘QmmÕ/“\Îpóæ?¨¬¬å±*ò2(lƒ\jê-îwkª0ddÐRr°ïúδ´33#n[*•£¹¹ Šï„§ß· ~ô®ÿ!æçŸ àãó**ÂÔ] éz×?!|¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !<¡°Â !|aüñÇLWW— Ç |hidzzÕ^=T?&MšÔ9VŒ1vºËÿÔ.//Gkk+;7BzpïÞ=$''+mSùìçÎ;Põ¢‘èšžPØá …žPØá‰ÚÂV^^GGÇAß'cðQ÷` )óTEma300Àš5kx¯²²Ë–-ãmþøcÀòå˹cpðàA,[¶ ~ø!Ž;†ÖÖÖÛ:èº@*•"""...pqqADD¤R)®^½Š•+W¢¾¾pñâExzz¢¹¹¹Ë|ÛÇÏË˃««+îܹƒk×®aÓ¦MX°`V¬X„„€L&Cll,\]]áììŒ444€ÒçQçù2ú¶óçÏãÔ©SðòòB\\Ö®]‹À/¿ü‚¸¸8lݺ pwwGxxx—>š››ggg$&&ÂÓÓ‡Bss³ÊqÓÓÓ‚àà`üùçŸÜ¼x!###‘——‡ÐÐPáûᅵ9s†;îèÑ£‹ÅˆˆˆÀ×_7nà§Ÿ~ê±Ïº %%•••ˆŒŒÄ‘#G——‡ØØX¼ûî»°··Gxx8jjj޽{÷B___é|àôéÓ€¹¹9>ÿüsØÚÚ">>[¶lATTjkk‘’’‚K—.!$$aaaxüø1âãã@e¿š:ϾèwØRSSáããƒÙ³gÃØØðòòRh›5kŒŒŒ`ooõë×w飭­ Œ1H$èêêbÁ‚ÈÈÈ€žžžÊq·lÙ L:^^^¸pá×vüøq$%%!00†††JÏ—J¥ÈÊÊ‚¯¯/ÌÌÌ`mmõë×ãÂ… ݶ©£î_ýÛ·o‡‰‰ ¬­­áííëׯ|}}‘——???,[¶ vvv*ǀ͛7ã­·Þ‚¡¡!bbb°mÛ6ÃÄÄÐØØˆóçÏcÆ °¶¶†••vïÞéÓ§wÛ¯¦Î³/T¾]«·*++!‰öY[[***`ee¥Ð6iÒ¤.}Œ=aaaHIIAll,&Ož 777888¨ׂûzâĉ‹ÅÜöÇ1sæLÄÇÇ# @éù555Ëå?~<·ÏÜÜb±¸Û6uÔýäɬX±B¡ŸQ£Fxq£iÉ’%øá‡päÈ•ãvtttPVV†Ã‡C"‘ÀÖÖ–;¦ªªJ¡NKKKXZZöØ·&γ/úý“M(¢¸¸Xaßßÿ 055Eii©BÛ?ÿüÓ¥––Èår!##‹-ž={¸5º2eeeÜ×?†±±1·Œ;w"++ ùùùJÏ3f ´´´PYYÉí«¨¨€P(ì¶Mu!>>ÙÙÙÈÎÎFFF·Ìyúô)ÒÒÒ`ooÏí뎎ŽW{PPV¯^ãÇã“O>áŽ166Æ“'O¸í¢¢"nyÕ[š2ϾèwØ.\ˆcÇŽáÊ•+¨®®Æõë×qüøq€³³3"##qóæMÔÕÕ!??'Ož„@ PèC `×®]¸téÑÖÖn9vþüy466*œóÝwß¡¼¼<@tt4>øà®M__&L€››BCCnlH$/^ GGG|óÍ7¨¬¬Dii)bbb0þünÛÔQ÷ìÙ³…ªª*”””Àßßééé`ŒáСCX¾|9öïß[·náêÕ« ãµÏ·³¶¶6H¥Rèèè µµ±±±€¦¦&899!::¥¥¥(--ÅÑ£GQUU¥²_M™gõ;l®®®pqqAxx8<<>>صkfÍšÅõÓ]ŸuÀÆ1räHlÚ´ ;vì€ ¼½½‘žžŽÚÚZ¬Y³£GÆŽ;Šúúz¥óíÈÀÀ[¶lÁ°víZŒ7óæÍƒ¿¿?ÜÝÝ1kÖ,ìÚµ ¾¾¾055å^SeýjÊ<ûKÀcwœ>}®®®ÈÎÎ~éNËËËáááàà`˜˜˜ÀÆÆ†k»téâââÕ¯¾ûSŸ: ÕºûJSæ©JNN¾øâ tŠ$è/µKJJðÕW_¡°°---¸wïNœ8ŋ䰄 Jý¾ÙÕ«W£¹¹ûöíCmm-ÌḬ̀páB,]ºô¥û5jT¿ÎW—¡Zw_iÊ<_Æ€,# ÑTj[FBþ…žPØá …ž¨¼éççÇg„ 555*Ûº„ÍÁÁ«W¯†L&Т®œ•îïrëŸ2 èÖ?!|¡°Â !<¡°“ÿêó®Üóü‘IEND®B`‚pktools-2.6.6/doc/html/ConfusionMatrix_8h_source.html0000644000113200011300000010614112647637661017656 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/ConfusionMatrix.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ConfusionMatrix.h
1 /**********************************************************************
2 ConfusionMatrix.h: class for (classification accuracy) confusion matrix
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _CONFUSIONMATRIX_H_
21 #define _CONFUSIONMATRIX_H_
22 
23 #include <sstream>
24 #include <vector>
25 #include "base/Vector2d.h"
26 #include "base/Optionpk.h"
27 
28 namespace confusionmatrix
29 {
30  enum CM_FORMAT { ASCII = 0, LATEX = 1, HTML = 2 };
31 
33 public:
35  ConfusionMatrix(short nclass);
36  ConfusionMatrix(const std::vector<std::string>& classNames);
38  ConfusionMatrix& operator=(const ConfusionMatrix& cm);
39  short size() const {return m_results.size();};
40  void resize(short nclass);
41  void setClassNames(const std::vector<std::string>& classNames, bool doSort=false);
42  void pushBackClassName(const std::string& className, bool doSort=false);
43  void setResults(const Vector2d<double>& theResults);
44  void setResult(const std::string& theRef, const std::string& theClass, double theResult);
45  void incrementResult(const std::string& theRef, const std::string& theClass, double theIncrement);
46  void clearResults();
47  double nReference(const std::string& theRef) const;
48  double nReference() const;
49  double nClassified(const std::string& theRef) const;
50  int nClasses() const {return m_classes.size();};
51  std::string getClass(int iclass) const {assert(iclass>=0);assert(iclass<m_classes.size());return m_classes[iclass];};
52  int getClassIndex(std::string className) const {
53  int index=0;
54  for(index=0;index<m_classes.size();++index){
55  if(m_classes[index]==className)
56  break;
57  }
58  if(index>=m_classes.size())
59  index=-1;
60  return index;
61  // int index=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),className));
62  // assert(index>=0);
63  // if(index<m_results.size())
64  // return(index);
65  // else
66  // return(-1);
67  }
68  std::vector<std::string> getClassNames() const {return m_classes;};
69  ~ConfusionMatrix();
70  double pa(const std::string& theClass, double* se95=NULL) const;
71  double ua(const std::string& theClass, double* se95=NULL) const;
72  double oa(double* se95=NULL) const;
73  int pa_pct(const std::string& theClass, double* se95=NULL) const;
74  int ua_pct(const std::string& theClass, double* se95=NULL) const;
75  int oa_pct(double* se95=NULL) const;
76  double kappa() const;
77  ConfusionMatrix& operator*=(double weight);
78  ConfusionMatrix operator*(double weight);
79  ConfusionMatrix& operator+=(const ConfusionMatrix &cm);
80  ConfusionMatrix operator+(const ConfusionMatrix &cm){
81  return ConfusionMatrix(*this)+=cm;
82  }
83  void sortClassNames();
84 
85  void reportSE95(bool doReport) {m_se95=doReport;};
86  void setFormat(const CM_FORMAT& theFormat) {m_format=theFormat;};
87  void setFormat(const std::string theFormat) {m_format=getFormat(theFormat);};
88  CM_FORMAT getFormat() const {return m_format;};
89 
90  static const CM_FORMAT getFormat(const std::string theFormat){
91  if(theFormat=="ascii") return(ASCII);
92  else if(theFormat=="latex") return(LATEX);
93  else{
94  std::string errorString="Format not supported: ";
95  errorString+=theFormat;
96  errorString+=" use ascii or latex";
97  throw(errorString);
98  }
99  };
100 
101  friend std::ostream& operator<<(std::ostream& os, const ConfusionMatrix &cm){
102  std::ostringstream streamLine;
103  /* streamosclass << iclass; */
104  /* m_classes[iclass]=osclass.str(); */
105 
106  std::string fieldSeparator=" ";
107  std::string lineSeparator="";
108  std::string mathMode="";
109  switch(cm.getFormat()){
110  case(LATEX):
111  fieldSeparator=" & ";
112  lineSeparator="\\\\";
113  mathMode="$";
114  break;
115  case(ASCII):
116  default:
117  fieldSeparator="\t";
118  lineSeparator="";
119  mathMode="";
120  break;
121  }
122 
123  double se95_ua=0;
124  double se95_pa=0;
125  double se95_oa=0;
126  double dua=0;
127  double dpa=0;
128  double doa=0;
129 
130  doa = cm.oa(&se95_oa);
131 
132  if(cm.getFormat()==LATEX){
133  os << "\\documentclass{article}" << std::endl;
134  os << "\\begin{document}" << std::endl;
135  }
136  os << "Kappa = " << mathMode << cm.kappa() << mathMode ;
137  os << ", Overall Acc. = " << mathMode << 100.0*cm.oa() << mathMode ;
138  if(cm.m_se95)
139  os << " (" << mathMode << se95_oa << mathMode << ")";
140  os << std::endl;
141  os << std::endl;
142  if(cm.getFormat()==LATEX){
143  os << "\\begin{tabular}{@{}l";
144  for(int iclass=0;iclass<cm.nClasses();++iclass)
145  os << "l";
146  os << "}" << std::endl;
147  os << "\\hline" << std::endl;
148  }
149 
150  os << "Class";
151  for(int iclass=0;iclass<cm.nClasses();++iclass)
152  os << fieldSeparator << cm.m_classes[iclass];
153  os << lineSeparator << std::endl;
154  if(cm.getFormat()==LATEX)
155  os << "\\hline" << std::endl;
156  assert(cm.m_classes.size()==cm.m_results.size());
157  for(int irow=0;irow<cm.m_results.size();++irow){
158  os << cm.m_classes[irow];
159  for(int icol=0;icol<cm.m_results[irow].size();++icol)
160  os << fieldSeparator << cm.m_results[irow][icol];
161  os << lineSeparator<< std::endl;
162  }
163  if(cm.getFormat()==LATEX){
164  os << "\\hline" << std::endl;
165  }
166  else
167  os << std::endl;
168 
169  os << "User' Acc.";
170  for(int iclass=0;iclass<cm.nClasses();++iclass){
171  dua=cm.ua_pct(cm.m_classes[iclass],&se95_ua);
172  os << fieldSeparator << dua;
173  if(cm.m_se95)
174  os << " (" << se95_ua << ")";
175  }
176  os << lineSeparator<< std::endl;
177  os << "Prod. Acc.";
178  for(int iclass=0;iclass<cm.nClasses();++iclass){
179  dpa=cm.pa_pct(cm.m_classes[iclass],&se95_ua);
180  os << fieldSeparator << dpa;
181  if(cm.m_se95)
182  os << " (" << se95_pa << ")";
183  }
184  os << lineSeparator<< std::endl;
185  if(cm.getFormat()==LATEX){
186  os << "\\end{tabular}" << std::endl;
187  os << "\\end{document}" << std::endl;
188  }
189  return os;
190  };
191 private:
192  std::vector<std::string> m_classes;
193  Vector2d<double> m_results;
194  CM_FORMAT m_format;
195  bool m_se95;
196 };
197 }
198 #endif /* _CONFUSIONMATRIX_H_ */
pktools-2.6.6/doc/html/inherit_graph_26.md50000644000113200011300000000004012647437044015402 0000000000000056ebfdfc43aa9f9214fa9993b74d1491pktools-2.6.6/doc/html/classCostFactory__coll__graph.md50000644000113200011300000000004012616110566020217 00000000000000013d2047d241b8e0b23a7bd03fa53828pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkreclass_1_1pkreclass-members.html0000644000113200011300000002221112647637662025160 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkreclass.pkreclass Member List

This is the complete list of members for qgis.pktools.pkreclass.pkreclass, including all inherited members.

BAND (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
CLASS (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
cliName (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclass
defineCharacteristics (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclass
EXTRA (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
group (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclass
INPUT (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
MASK (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
MSKNODATA (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
name (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclass
NODATA (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
OUTPUT (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
processAlgorithm (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclass
RECLASS (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
RTYPE (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
TYPE (defined in qgis.pktools.pkreclass.pkreclass)qgis.pktools.pkreclass.pkreclassstatic
pktools-2.6.6/doc/html/inherit_graph_39.map0000644000113200011300000000031712647437044015505 00000000000000 pktools-2.6.6/doc/html/classImgReaderGdal__coll__graph.map0000644000113200011300000000051412647437044020513 00000000000000 pktools-2.6.6/doc/html/inherit_graph_3.map0000644000113200011300000000030512616110567015403 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm-members.html0000644000113200011300000002041312647637662023504 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pksvm.pksvm Member List
pktools-2.6.6/doc/html/pkstatprofile_8cc_source.html0000644000113200011300000007555712647637662017574 00000000000000 pktools: /home/kempenep/pktools/src/apps/pkstatprofile.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkstatprofile.cc
1 /**********************************************************************
2 pkstatprofile.cc: program to calculate statistics in temporal or spectral profile
3 Copyright (C) 2008-2015 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <assert.h>
21 #include <iostream>
22 #include <string>
23 #include <fstream>
24 #include <math.h>
25 #include <sys/types.h>
26 #include <stdio.h>
27 #include "base/Optionpk.h"
28 #include "base/Vector2d.h"
29 #include "algorithms/Filter2d.h"
30 #include "algorithms/Filter.h"
31 #include "imageclasses/ImgReaderGdal.h"
32 #include "imageclasses/ImgWriterGdal.h"
33 #include "algorithms/StatFactory.h"
34 
35 /******************************************************************************/
94 using namespace std;
95 /*------------------
96  Main procedure
97  ----------------*/
98 int main(int argc,char **argv) {
99  Optionpk<std::string> input_opt("i","input","input image file");
100  Optionpk<std::string> output_opt("o", "output", "Output image file");
101  Optionpk<std::string> function_opt("f", "function", "Statistics function (mean, median, var, stdev, min, max, sum, mode (provide classes), ismin, ismax, proportion (provide classes), percentile, nvalid");
102  Optionpk<double> percentile_opt("perc","perc","Percentile value(s) used for rule percentile");
103  Optionpk<short> class_opt("class", "class", "class value(s) to use for mode, proportion");
104  Optionpk<double> nodata_opt("nodata", "nodata", "nodata value(s)");
105  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","");
106  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate)","GTiff");
107  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to ommit color table");
108  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
109  // Optionpk<short> down_opt("d", "down", "down sampling factor. Use value 1 for no downsampling). Use value n>1 for downsampling (aggregation)", 1);
110  Optionpk<short> verbose_opt("v", "verbose", "verbose mode if > 0", 0,2);
111 
112  percentile_opt.setHide(1);
113  class_opt.setHide(1);
114  otype_opt.setHide(1);
115  oformat_opt.setHide(1);
116  colorTable_opt.setHide(1);
117 
118  bool doProcess;//stop process when program was invoked with help option (-h --help)
119  try{
120  doProcess=input_opt.retrieveOption(argc,argv);
121  output_opt.retrieveOption(argc,argv);
122  function_opt.retrieveOption(argc,argv);
123  percentile_opt.retrieveOption(argc,argv);
124  nodata_opt.retrieveOption(argc,argv);
125  otype_opt.retrieveOption(argc,argv);
126  oformat_opt.retrieveOption(argc,argv);
127  colorTable_opt.retrieveOption(argc,argv);
128  verbose_opt.retrieveOption(argc,argv);
129  }
130  catch(string predefinedString){
131  std::cout << predefinedString << std::endl;
132  exit(0);
133  }
134  if(!doProcess){
135  cout << endl;
136  cout << "Usage: pkstatprofile -i input -o ouptut [-function]*" << endl;
137  cout << endl;
138  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
139  exit(0);//help was invoked, stop processing
140  }
141 
142  if(function_opt.empty()){
143  cerr << "Error: no function selected, use option -f" << endl;
144  exit(1);
145  }
146 
147  filter::Filter filter1d;
148  filter1d.setNoDataValues(nodata_opt);
149  for(int iclass=0;iclass<class_opt.size();++iclass)
150  filter1d.pushClass(class_opt[iclass]);
151 
152  filter1d.setThresholds(percentile_opt);
153 
154  ImgReaderGdal input;
155  ImgWriterGdal output;
156  if(input_opt.empty()){
157  cerr << "Error: no input file selected, use option -i" << endl;
158  exit(1);
159  }
160  if(output_opt.empty()){
161  cerr << "Error: no output file selected, use option -o" << endl;
162  exit(1);
163  }
164  try{
165  input.open(input_opt[0]);
166  }
167  catch(string errorstring){
168  cout << errorstring << endl;
169  exit(1);
170  }
171 
172  GDALDataType theType=GDT_Unknown;
173  if(verbose_opt[0])
174  cout << "possible output data types: ";
175  for(int iType = 0; iType < GDT_TypeCount; ++iType){
176  if(verbose_opt[0])
177  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
178  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
179  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
180  otype_opt[0].c_str()))
181  theType=(GDALDataType) iType;
182  }
183  if(theType==GDT_Unknown)
184  theType=input.getDataType();
185 
186  if(verbose_opt[0])
187  std::cout << std::endl << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
188 
189  string imageType;//=input.getImageType();
190  if(oformat_opt.size())
191  imageType=oformat_opt[0];
192 
193  if(option_opt.findSubstring("INTERLEAVE=")==option_opt.end()){
194  string theInterleave="INTERLEAVE=";
195  theInterleave+=input.getInterleave();
196  option_opt.push_back(theInterleave);
197  }
198  if(verbose_opt[0])
199  cout << "Calculating statistic metrics: " << function_opt.size() << endl;
200  try{
201  output.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),function_opt.size(),theType,imageType,option_opt);
202  }
203  catch(string errorstring){
204  cout << errorstring << endl;
205  exit(4);
206  }
207 
208  output.setProjection(input.getProjection());
209  double gt[6];
210  input.getGeoTransform(gt);
211  output.setGeoTransform(gt);
212 
213  if(colorTable_opt.size()){
214  if(colorTable_opt[0]!="none"){
215  if(verbose_opt[0])
216  cout << "set colortable " << colorTable_opt[0] << endl;
217  assert(output.getDataType()==GDT_Byte);
218  output.setColorTable(colorTable_opt[0]);
219  }
220  }
221  else if(input.getColorTable()!=NULL)
222  output.setColorTable(input.getColorTable());
223 
224  if(nodata_opt.size()){
225  for(int iband=0;iband<output.nrOfBand();++iband)
226  output.GDALSetNoDataValue(nodata_opt[0],iband);
227  }
228 
229  try{
230  filter1d.stats(input,output,function_opt);
231  }
232  catch(string errorstring){
233  cerr << errorstring << endl;
234  }
235  input.close();
236  output.close();
237  return 0;
238 }
pktools-2.6.6/doc/html/classSVR__Q__inherit__graph.md50000644000113200011300000000004012616110566017561 00000000000000a7e53ec819237bac61d50010179771f7pktools-2.6.6/doc/html/pkcomposite__gui_2mainwindow_8h_source.html0000644000113200011300000003122612647637661022405 00000000000000 pktools: /home/kempenep/pktools/qt/pkcomposite_gui/mainwindow.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.h
1 /**********************************************************************
2 mainwindow.h
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #ifndef MAINWINDOW_H
22 #define MAINWINDOW_H
23 
24 #include <QMainWindow>
25 #include <QListWidget>
26 
27 namespace Ui {
28 class MainWindow;
29 }
30 
31 class MainWindow : public QMainWindow
32 {
33  Q_OBJECT
34 
35 public:
36  explicit MainWindow(QWidget *parent = 0);
37  ~MainWindow();
38 
39 private slots:
40  void on_toolButton_input_clicked();
41 
42  void on_toolButton_defaults_clicked();
43 
44  void on_actionInput_image_triggered();
45 
46  void on_actionOutput_image_triggered();
47 
48  void on_actionQuit_triggered();
49 
50  void on_toolButton_output_clicked();
51 
52  void on_toolButton_Run_clicked();
53 
54  void on_actionSelection_Info_file_triggered();
55 
56  void on_toolButton_file_clicked();
57 
58  void on_toolButton_ct_clicked();
59 
60  void on_toolButton_extent_clicked();
61 
62  void on_actionExtent_triggered();
63 
64  void deleteItemInput();
65 
66 private:
67  Ui::MainWindow *ui;
68  void setDefaults();
69 };
70 
71 #endif // MAINWINDOW_H
pktools-2.6.6/doc/html/classfilter_1_1Filter.html0000644000113200011300000012352512647637662016676 00000000000000 pktools: filter::Filter Class Reference
pktools  2.6.6
Processing Kernel for geospatial data

Public Member Functions

 Filter (const std::vector< double > &taps)
 
void setPadding (const std::string &padString)
 
void setTaps (const std::vector< double > &taps, bool normalize=true)
 
void pushClass (short theClass=1)
 
void pushMask (short theMask=0)
 
unsigned int pushNoDataValue (double noDataValue)
 
unsigned int setNoDataValues (std::vector< double > vnodata)
 
void pushThreshold (double theThreshold)
 
void setThresholds (const std::vector< double > &theThresholds)
 
template<class T >
void filter (const std::vector< T > &input, std::vector< T > &output)
 
template<class T >
void filter (const std::vector< T > &input, std::vector< T > &output, const std::string &method, int dim)
 
template<class T >
void smooth (const std::vector< T > &input, std::vector< T > &output, short dim)
 
template<class T >
void smoothNoData (const std::vector< T > &input, const std::string &interpolationType, std::vector< T > &output)
 
template<class T >
void filter (T *input, int inputSize, std::vector< T > &output)
 
template<class T >
void smooth (T *input, int inputSize, std::vector< T > &output, short dim)
 
void morphology (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim, short verbose=0)
 
void filter (const ImgReaderGdal &input, ImgWriterGdal &output)
 
void stat (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method)
 
void stats (const ImgReaderGdal &input, ImgWriterGdal &output, const std::vector< std::string > &methods)
 
void filter (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim)
 
void getSavGolayCoefficients (std::vector< double > &c, int np, int nl, int nr, int ld, int m)
 
void ludcmp (std::vector< double > &a, std::vector< int > &indx, double &d)
 
void lubksb (std::vector< double > &a, std::vector< int > &indx, std::vector< double > &b)
 
void smooth (const ImgReaderGdal &input, ImgWriterGdal &output, short dim)
 
void smoothNoData (const ImgReaderGdal &input, const std::string &interpolationType, ImgWriterGdal &output)
 
double getCentreWavelength (const std::vector< double > &wavelengthIn, const Vector2d< double > &srf, const std::string &interpolationType, double delta=1.0, bool verbose=false)
 
template<class T >
double applySrf (const std::vector< double > &wavelengthIn, const std::vector< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, T &output, double delta=1.0, bool normalize=false, bool verbose=false)
 
template<class T >
double applySrf (const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, std::vector< T > &output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false)
 
template<class T >
void applyFwhm (const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, std::vector< T > &output, bool verbose=false)
 
template<class T >
void applyFwhm (const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, Vector2d< T > &output, int down=1, bool verbose=false)
 
void dwtForward (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family)
 
void dwtInverse (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family)
 
void dwtCut (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, double cut)
 
void dwtForward (std::vector< double > &data, const std::string &wavelet_type, int family)
 
void dwtInverse (std::vector< double > &data, const std::string &wavelet_type, int family)
 
void dwtCut (std::vector< double > &data, const std::string &wavelet_type, int family, double cut)
 
void dwtCutFrom (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, int band)
 
 Filter (const std::vector< double > &taps)
 
void setTaps (const std::vector< double > &taps, bool normalize=true)
 
void pushClass (short theClass=1)
 
void pushMask (short theMask=0)
 
template<class T >
void filter (const std::vector< T > &input, std::vector< T > &output)
 
template<class T >
void filter (const std::vector< T > &input, std::vector< T > &output, const std::string &method, int dim)
 
template<class T >
void smooth (const std::vector< T > &input, std::vector< T > &output, short dim)
 
template<class T >
void filter (T *input, int inputSize, std::vector< T > &output)
 
template<class T >
void smooth (T *input, int inputSize, std::vector< T > &output, short dim)
 
template<class T >
void morphology (const std::vector< T > &input, std::vector< T > &output, const std::string &method, int dim, bool verbose=false)
 
void morphology (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim, short verbose=0)
 
void filter (const ImgReaderGdal &input, ImgWriterGdal &output)
 
void stat (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method)
 
void filter (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim)
 
void smooth (const ImgReaderGdal &input, ImgWriterGdal &output, short dim)
 
double getCentreWavelength (const std::vector< double > &wavelengthIn, const Vector2d< double > &srf, const std::string &interpolationType, double delta=1.0, bool verbose=false)
 
template<class T >
double applySrf (const std::vector< double > &wavelengthIn, const std::vector< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, T &output, double delta=1.0, bool normalize=false, bool verbose=false)
 
template<class T >
double applySrf (const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, std::vector< T > &output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false)
 
template<class T >
void applyFwhm (const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, std::vector< T > &output, bool verbose=false)
 
template<class T >
void applyFwhm (const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, Vector2d< T > &output, int down=1, bool verbose=false)
 
void dwtForward (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family)
 
void dwtInverse (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family)
 
void dwtCut (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, double cut)
 
void dwtForward (std::vector< double > &data, const std::string &wavelet_type, int family)
 
void dwtInverse (std::vector< double > &data, const std::string &wavelet_type, int family)
 
void dwtCut (std::vector< double > &data, const std::string &wavelet_type, int family, double cut)
 
void dwtCutFrom (const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, int band)
 
template<class T >
void smooth (T *input, int inputSize, std::vector< T > &output, short dim)
 
template<class T >
void filter (T *input, int inputSize, std::vector< T > &output)
 

Static Public Member Functions

static const gsl_wavelet_type * getWaveletType (const std::string waveletType)
 
static FILTER_TYPE getFilterType (const std::string filterType)
 
static PADDING getPadding (const std::string &padString)
 
static const gsl_wavelet_type * getWaveletType (const std::string waveletType)
 
static FILTER_TYPE getFilterType (const std::string filterType)
 

Detailed Description

Definition at line 40 of file Filter.h.


The documentation for this class was generated from the following files:
  • /home/kempenep/pktools/src/algorithms/Filter.h
  • /home/kempenep/pktools/src/algorithms/Filter_old.h
  • /home/kempenep/pktools/src/algorithms/Filter.cc
pktools-2.6.6/doc/html/inherit_graph_15.md50000644000113200011300000000004012616110567015372 0000000000000063abf9dc85b779812e5853a91d813293pktools-2.6.6/doc/html/classDecrease__PosValue-members.html0000644000113200011300000000650012647637662020714 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Decrease_PosValue Member List

This is the complete list of members for Decrease_PosValue, including all inherited members.

operator()(const PosValue &pv1, const PosValue &pv2) const (defined in Decrease_PosValue)Decrease_PosValueinline
pktools-2.6.6/doc/html/classqgis_1_1pkfilterdem_1_1pkfilterdem__coll__graph.md50000644000113200011300000000004012616110566024500 000000000000006848dbb8564bac7bb85324114cc2e769pktools-2.6.6/doc/html/inherit_graph_26.png0000644000113200011300000000443112647437044015511 00000000000000‰PNG  IHDR%1ÑàôbKGDÿÿÿ ½§“ÎIDATxœí›kLSÙ€÷imáB!±P´3–GÅXéEÁP¦CÃ#£”ÉuÔ¨6㈷VAC5V‰3Äñ‘\1#`ˆ$28Òk}tÈCA”ã¸(ˆyH”}œL-å@A½¶ÊþÒÝk¯®³Î^Ygí³÷.!b,$g;€@¸"(1Pb  Ä@ ˜eÛ0 :nttÔYÞ|Ì;×Ù^¼gçÎÍÍÍÎöÂÕ‘H$)))¶ÌvUª§§çÉ“'.×/‹þþ~ooïÐÐPg;ò Ã"""X,–³q]´ZmdddQQ‘­pÖx=—Šë—ESS“³] ###55ÕÙ^¸.„ƒƒÞ1Pb  Ä@ @‰@ð‰144$—Ëy<F[¾|ù±cÇFFFð. ÃíŽ`%$$`ÖÚÚJh­µµð‰®%•JW¬Xam?~ð¶¶6¼ÙÑÑa˜Z­žÜÈ´®8Ó@!χ$ÆÀÀ@xxxUU•B¡¨­­Ý·oŸR©‰D‹WxþüyCCƒU_¯×k4šI Òéô½{÷NÔ+êêꆇ‡ñfEE‰DR©TxS«ÕR©ÔˆˆˆÉ¸CCÆ’’‡ryÑ»w&gûò2{  ÝÝÝjµ:B&“­ZµjddÄ*d³ÙçÎß:ñññYYYÖÞüüü„„€N§sh|„°¦¦ÆÝÝ}hhhòÁ±V ‹eT£yöãJg“™ñÍ7ÿd2wÙ}\ªbÌØÁ *Æ&Foo¯üÁƒ¾¾¾øêt:©Tš™™ !T*•qqqV¹Ñhlnn´X,wîÜÁ…v„û`2™À_¥üÚµk ctt”ÏçC×­[wèÐ!­VK&“Ʋ‘   üü|«·—/_˜L&2™lü”””p8œššf2™vïÞ••E¡Pôz}nnnbb¢Ã!nll¼v­âÀ’%K²™Ì]ß~K®™36dp‚Ä 829t:Ýßß¿¾¾^(ÚÊëëëCBB¬M±X¼eË–£GÚe*•ÚÒÒ²uëÖÁÁÁ°°0ÂKàÏ …b•ÄÄÄôôôTWW744ÄÆÆD"Ñ•+W¼¼¼ÂÃÃi4šC#K—.µö.Y²ÐÝÝm±X.\ˆ 9NgggXX˜§§guuµF£ÉËË«¨¨Ðh4jµ:))ÉáàTV¶*ÿà“É2‰²P˜ëÐàÇC¥ÎŸ¢æÌ ÙDL;1éé釸kFZZZrr²B¡°]aˆŽŽ¸wïžJ¥:þ¼U><<œššZTT´zõj£ÑxéÒ¥ñöI$û7ÿààà#GŽðx¼9sæâââ¤R)FÃg«°Ù솆‡7ñCM~~~d2¹½½}Ñ¢E€¶¶¶yóæ‘H¤ÄÄÄÒÒÒ––>ŸÿÝwß©T*FsöìY‡#³lÙü~ø»FóŸ?þè¥Rg™L#“(gg'Ï›7Û¡ÍdÍšóŽ•35db[>¦¸*õöíÛàààØØØ[·n={ö,++ À`0ŒF£µþBwìØÁårcccmëµ^¯Ç0¬¼¼ß ÔÖÖÚ•TëJˆíw‰DËåV7eeexsr#gΜa07nÜxñâEyyù‚ påõë× …ÂöööLJ††fggC‹‹‹i4>P©T4-44t 5ùý;ÆŸ¾ÎË«X±â0“¹‹Å"žP¹ÚT ÎÈÁO¸*åííýðáC>Ÿ/“Éx<^aaáþýû¹\î† lÕRSS›››í޹Óéô“'O¦§§‡„„°Ùì´´´øøø©\T lço"‘ˆD"EEEMåçR©tÏž=2™ŒÃáäää\½z—çåå,[¶L$‰D¢ÌÌL@\\œÁ`Àl+W®4™LÓ-Ê,–T*üý÷jõÞŸ~úžÉ¤(”©ÏŸ“™2;þßÏt1™LµµµãÍ—^îÇŸÛ7›-ͳ7ê~ýõ‘Á`ž5‹d6[*+÷p¹ÿo—0 +,,DÇÎ'»ÿc|²³Rø^æ§²ö•A¡…ÂE?ÿœÞÔtä—_þ!„xyýÍÇÇÓÙ~!&ÄÕ‹ûW†»;%99,9™xmá: Óµ(1Pb  Ä@ @‰@@°*ÕÕÕõùýø:0 îîîÎöžÊÊʾ¾>g{Ẵ··ãÛê¶ŒI 777 ÃZZZ>£W_t:ÝÙ.ŒÅb]¸pÁÙ^¸:ã7µÇì|#ôŽ@€ %AJ ‚€ÿTTSrmd~IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask__coll__graph.png0000644000113200011300000000704312616110567023752 00000000000000‰PNG  IHDRÀpÇtè%bKGDÿÿÿ ½§“ ØIDATxœíÝTSuðï… ù!‡‰ â ¢ãéX§T$¼`/ô"ŒH$ Ïr€X,F…††öõõµµµq8>ŸO6â8N¥‡:’ê¸k×®àààîîn>Ÿo°‘ê5>>nmmŸŸ?44T\\Ì`0ÆÇÇ ‚ÀqÜÃÃC ññÇûùùéFDaa¡««ë¹sçd2Ù… 8Ù>Ó\áááMMM]]]äaze#„^xá…BQ]]"—†Љ‰Q(EEE¡W_}U¡Pê€Y ‹D¢ych0Çuww“»B¡Ãá)))¡7nèInOMMYZZþüóÏäîÉ“'9ŽÁFª—\._±bEvvö;wpÓjµA´µµ1 òûtåÊ„POOîtþþþß~û-Upyy9Bh–¹ÈµPݧ¨¹¹™ ­V‹‹Ådcgg'¹.½mò€Y?@æu #Q¿Êñõõ$·úé§ÀÀÀŒŒŒéÇkµZ///r—Ãá l¤º8::ŠD¢¶¶66›½uëÖ~øÁÂÂ!TQQ¡ÑhX,†a7nDé]Åüýý©].—;SÔf_¬‹‹ Bˆœbgg‡Z±b…Þ¶2Ç‘ÿLB}}}ä닪­­ÍÏϯ¨¨‰DzǯY³ÆÒÒR"‘»®®®©.J¥ÇñÊÊJ¹\ž°cǹ\®Õj…BaNNÎØÿ$'' …BBç©_ww÷_~ù…Ú½~ýúLÛs~ãê “1æéî>/aAAAb±¸½½ÝÛÛ;55U÷´Ÿ––æãã£T*ÉÆ±±1²ÇãK$’žž??¿ÔÔTƒÔPJ¥’ÉdVUUÉd²‚‚&“©T*E"‘¥¥¥n…¡ÎÎNªã±cÇØlöùóçGFFׯ_aØìsÓ.aTÙH窄t.aÓõ¶g÷@b„PQQ‘»»;‹ÅÚ¿?•ò¥Réãã“––¦V«Ÿ}öY[[[²].—ïÞ½ÛÉÉiíÚµï¾û®R©4ب;”P(ôòò²²²òõõ­©©!")))44T·ǽ¼¼:DuÔjµ¹¹¹^^^aaa555«W¯žs.j[¯lÐüÜg€ŒVÏ?P[[ÛÕÕEíVUU˜°=pm»ccc;;;'&&ÚÚÚ>œ˜˜hê¢LÉØ”ÍÎÞÞ>))ÉÔUÌ&%%ebb"22R&“yzz¾ñÆf^ðbÃ#þaass3—Ë…'ùDb`` Ñf„K hZ @€cÿ6::ªÑhŒ<éƒc||ÜÈ35@ÖÖÖ·nÝ2æŒ4]¼ø;B($d‰ë˜&“iÌéŒúcüÒ¢Õâ?ž†êîþ—…Åÿ•ç¢{ µ¶öËå÷äòñ––¥ýÜû¢‚ͨ²²ƒÁ°X±Â¢²ò'S×b¾ @†©T꺺kV­ÆëꮩTjSWd¦ @†55]§B£R©›š®›¶³2¬ººƒzVðêêÓÖc¶ @(ª‹{µZœÜÕjñ‹{ Õì½L ÎëÁñ¿½»ãÄùó=¦ªÇœA€ ¨ªêÐ{wŒ ˆª*¸ŠÒ'“µ´ˆq×mÄq¢¥E,“™ª*³ÒwæL—Á÷1 ;sæšñë1s }ß}סwDÂqÞQœô7Réîî›3]»vóÖ­QãWeÎÌë¡z“wqYEÝ‘ï%2™ÿýëR ‹‘‘1—U&«ÏüÀoãg“”ôo„@gêBÌ\Â- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€- @ д@€=„wwwS—c^ ƒÁ2uæeݺuº™ùÛq‡aØ+¯¼ÂårMX0g½½½•••º™ÑÿO6¹\®1?¶,uphZ @€ e±$•Jƒ‚‚LÕ}‘ü³ª–ÓZ¦[¬ÙÚÚÆÄÄ,ÒàszñÅM5ûÂ2óµ,V€Þ|óÍE|N8Ž+ S;°Ì|-ó A§NŠ‹‹Û¾}ûÛo¿}õêÕ   ‚ ¾ÿþûøøøˆˆˆäääÖÖÖ   Ý3dKKKBBBhh(ÇkhhГ<òòåË»wŠ:vì˜Z­Ö1///11ñîÝ»'Bi4šüüü¨¨¨¨¨¨üü|FóÖ[o!„^zé%r   úúú¸¸¸ÈÈÈòòò†††˜˜˜ˆˆˆ’’ò€ÖÖÖ={ö„……EGG———ÏY¶nUËu-÷i~ŸÖSWW÷õ×_'''s¹ÜþþþÌÌL„ÐÙ³gËÊÊRRR|||úûûsssu»¨T*>Ÿ¿ÿþgžyæÇüüóÏ·lÙÂd2õF>}útffæØØXzzº½½}HH¹6@ÐÙÙ™““coo_WWgp¢ªªª¡¡!@0>>ž••UZZúÕW_ÅÆÆžò¾}ûØlö† /\¸@6…´´4rm3MT__ÿÎ;ï8;;{zz&%%µ··OçÎ666¡¡¡!gcc†³²²*..>pà€“““³³3BèÞ½{³”­WÕò^Ëœæwâp8Ô®§§'BèÖ­[Tãºuët»ØÙÙåææVUU•––úøøðx¼M›6M™Íf“nnn2™ŒÜ¾qãF@@À7ß|óÁÌ2ÑŸþMµ¯\¹rúø666!ƒ¡·Mn fgg+•Jooï9ËÖ«jy¯eNó ‹Åðòò"wÿýw„К5k~ûí72L¡?þøC·Ëää$Žã|>_£Ñ466~ôÑG§OŸ¶³³ÓyppáæÍ›NNNdcFF†L&KHHxþùçŸx≙&rppÈÍÍuuuEËåòy-jrr’Ïçóùü§Ÿ~Z­V×××ÏT¶Áª¦¸œÖ2§ù]ÂÂÃÃóòò._¾,—ËÛÛÛ B‘‘‘ ££C¡P\½zõĉöÿ­Å0ìý÷ß¿téy.e0äù³®®îÞ½{ÔaÇ—J¥¿þúkQQѶmÛÈF&“ùÈ#ðx¼œœœ©©©™&Ú¼ysaaáðð°D"III¡^¥Ry?‹R«Õ†Á`LMM•––"„&&&f*{zUËl-ó5¿3ÐÎ;µZí—_~9::J^¤9©ÕjsssïÞ½ëçç·wïÞ£GR]¬¬¬>üðC@pûöm—´´4+++„Pvvv@@uŠ yï½÷T*Uppð®]»¨3?BˆÇã566–——ÇÅÅœ(!!áøñã{öìÁ0lË–-III ãÑGŽŽ>{ö윋²µµÝ·oß‘#Gzè!œ’’rêÔ)ƒeO¯*>>~9­eÎ)ôè?”––vÿsH¥ÒØØØŒŒ gggêºvéÒ¥²²²ÂÂÂy "‰æ<²µµ•ÎDF°œÖbPssó§Ÿ~ª›™x#Q"‘¤§§‹ÅâÉÉÉÞÞÞ’’’ˆˆúÚp"#X6kY€Om~íµ×T*Õ'Ÿ|2::ºvíÚððð;vÜ÷•+WÞçñ4'2‚å´–ûDë4‹r 2 hZôo¢===MX0gwîÜ‘H$3þ]XrròÍ›7^XJ"##uwÿv`¾àд@€- @Ë=í­øô=IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_6.map0000644000113200011300000000026512616110570015405 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img__coll__graph.md50000644000113200011300000000004012616110566025522 00000000000000370d3db2308817b35abccf3147f6e330pktools-2.6.6/doc/html/pklas2img_8cc_source.html0000644000113200011300000030027712647637662016564 00000000000000 pktools: /home/kempenep/pktools/src/apps/pklas2img.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pklas2img.cc
1 /**********************************************************************
2 pklas2img.cc: Rasterize LAS/LAZ point clouds with filtering/compositing options
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include "base/Optionpk.h"
22 #include "imageclasses/ImgReaderGdal.h"
23 #include "imageclasses/ImgWriterGdal.h"
24 #include "imageclasses/ImgReaderOgr.h"
25 #include "lasclasses/FileReaderLas.h"
26 #include "algorithms/StatFactory.h"
27 #include "algorithms/Filter2d.h"
28 
29 /******************************************************************************/
83 using namespace std;
84 
85 int main(int argc,char **argv) {
86  Optionpk<string> input_opt("i", "input", "Input las file");
87  Optionpk<string> attribute_opt("n", "name", "names of the point attribute to select: intensity, angle, return, nreturn, angle, z", "z");
88  // Optionpk<bool> disc_opt("circ", "circular", "circular disc kernel for dilation and erosion", false);
89  // Optionpk<double> maxSlope_opt("s", "maxSlope", "Maximum slope used for morphological filtering", 0.0);
90  // Optionpk<double> hThreshold_opt("ht", "maxHeight", "initial and maximum height threshold for progressive morphological filtering (e.g., -ht 0.2 -ht 2.5)", 0.2);
91  // Optionpk<short> maxIter_opt("maxit", "maxit", "Maximum number of iterations in post filter", 5);
92  Optionpk<unsigned short> returns_opt("ret", "ret", "number(s) of returns to include");
93  Optionpk<unsigned short> classes_opt("class", "class", "classes to keep: 0 (created, never classified), 1 (unclassified), 2 (ground), 3 (low vegetation), 4 (medium vegetation), 5 (high vegetation), 6 (building), 7 (low point, noise), 8 (model key-point), 9 (water), 10 (reserved), 11 (reserved), 12 (overlap)");
94  Optionpk<string> composite_opt("comp", "comp", "composite for multiple points in cell (min, max, median, mean, sum, first, last, profile (percentile height values), percentile, number (point density)). Last: overwrite cells with latest point", "last");
95  Optionpk<string> filter_opt("fir", "filter", "filter las points (first,last,single,multiple,all).", "all");
96  Optionpk<unsigned short> angle_min_opt("angle_min", "angle_min", "Minimum scan angle to read points.");
97  Optionpk<unsigned short> angle_max_opt("angle_max", "angle_max", "Maximum scan angle to read points.");
98  // Optionpk<string> postFilter_opt("pf", "pfilter", "post processing filter (etew_min,promorph (progressive morphological filter),bunting (adapted promorph),open,close,none).", "none");
99  // Optionpk<short> dimx_opt("dimx", "dimx", "Dimension X of postFilter", 3);
100  // Optionpk<short> dimy_opt("dimy", "dimy", "Dimension Y of postFilter", 3);
101  Optionpk<string> output_opt("o", "output", "Output image file");
102  Optionpk<string> projection_opt("a_srs", "a_srs", "assign the projection for the output file in epsg code, e.g., epsg:3035 for European LAEA projection");
103  Optionpk<double> ulx_opt("ulx", "ulx", "Upper left x value bounding box (in geocoordinates if georef is true). 0 is read from input file", 0.0);
104  Optionpk<double> uly_opt("uly", "uly", "Upper left y value bounding box (in geocoordinates if georef is true). 0 is read from input file", 0.0);
105  Optionpk<double> lrx_opt("lrx", "lrx", "Lower right x value bounding box (in geocoordinates if georef is true). 0 is read from input file", 0.0);
106  Optionpk<double> lry_opt("lry", "lry", "Lower right y value bounding box (in geocoordinates if georef is true). 0 is read from input file", 0.0);
107  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", "Byte");
108  Optionpk<string> oformat_opt("of", "oformat", "Output image format (see also gdal_translate).", "GTiff");
109  Optionpk<double> dx_opt("dx", "dx", "Output resolution in x (in meter)", 1.0);
110  Optionpk<double> dy_opt("dy", "dy", "Output resolution in y (in meter)", 1.0);
111  Optionpk<short> nbin_opt("nbin", "nbin", "Number of percentile bins for calculating percentile height value profile (=number of output bands)", 10.0);
112  Optionpk<double> percentile_opt("perc","percentile","Percentile value used for rule percentile",95);
113  Optionpk<short> nodata_opt("nodata", "nodata", "nodata value to put in image", 0);
114  Optionpk<string> option_opt("co", "co", "Creation option for output file. Multiple options can be specified.");
115  Optionpk<string> colorTable_opt("ct", "ct", "color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)");
116  Optionpk<short> verbose_opt("v", "verbose", "verbose mode", 0,2);
117 
118  nbin_opt.setHide(1);
119  percentile_opt.setHide(1);
120  nodata_opt.setHide(1);
121  option_opt.setHide(1);
122  colorTable_opt.setHide(1);
123 
124  bool doProcess;//stop process when program was invoked with help option (-h --help)
125  try{
126  doProcess=input_opt.retrieveOption(argc,argv);
127  attribute_opt.retrieveOption(argc,argv);
128  returns_opt.retrieveOption(argc,argv);
129  classes_opt.retrieveOption(argc,argv);
130  composite_opt.retrieveOption(argc,argv);
131  filter_opt.retrieveOption(argc,argv);
132  angle_min_opt.retrieveOption(argc,argv);
133  angle_max_opt.retrieveOption(argc,argv);
134  output_opt.retrieveOption(argc,argv);
135  projection_opt.retrieveOption(argc,argv);
136  ulx_opt.retrieveOption(argc,argv);
137  uly_opt.retrieveOption(argc,argv);
138  lrx_opt.retrieveOption(argc,argv);
139  lry_opt.retrieveOption(argc,argv);
140  otype_opt.retrieveOption(argc,argv);
141  oformat_opt.retrieveOption(argc,argv);
142  dx_opt.retrieveOption(argc,argv);
143  dy_opt.retrieveOption(argc,argv);
144  nbin_opt.retrieveOption(argc,argv);
145  percentile_opt.retrieveOption(argc,argv);
146  nodata_opt.retrieveOption(argc,argv);
147  option_opt.retrieveOption(argc,argv);
148  colorTable_opt.retrieveOption(argc,argv);
149  verbose_opt.retrieveOption(argc,argv);
150  }
151  catch(string predefinedString){
152  std::cout << predefinedString << std::endl;
153  exit(0);
154  }
155 
156  if(!doProcess){
157  cout << endl;
158  cout << "pklas2img -i lasfile -o output" << endl;
159  cout << endl;
160  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;
161  exit(0);//help was invoked, stop processing
162  }
163  //todo: is this needed?
164  GDALAllRegister();
165 
166  double dfComplete=0.0;
167  const char* pszMessage;
168  void* pProgressArg=NULL;
169  GDALProgressFunc pfnProgress=GDALTermProgress;
170  double progress=0;
171 
172  Vector2d<vector<double> > inputData;//row,col,point
173 
174 
175  ImgReaderGdal maskReader;
176  ImgWriterGdal outputWriter;
177  GDALDataType theType=GDT_Unknown;
178  if(verbose_opt[0])
179  cout << "possible output data types: ";
180  for(int iType = 0; iType < GDT_TypeCount; ++iType){
181  if(verbose_opt[0])
182  cout << " " << GDALGetDataTypeName((GDALDataType)iType);
183  if( GDALGetDataTypeName((GDALDataType)iType) != NULL
184  && EQUAL(GDALGetDataTypeName((GDALDataType)iType),
185  otype_opt[0].c_str()))
186  theType=(GDALDataType) iType;
187  }
188  if(verbose_opt[0]){
189  if(theType==GDT_Unknown)
190  cout << "Unknown output pixel type: " << otype_opt[0] << endl;
191  else
192  cout << "Output pixel type: " << GDALGetDataTypeName(theType) << endl;
193  }
194 
195  double maxLRX=0;
196  double maxULY=0;
197  double minULX=0;
198  double minLRY=0;
199 
200  unsigned long int totalPoints=0;
201  unsigned long int nPoints=0;
202  unsigned long int ipoint=0;
203  for(int iinput=0;iinput<input_opt.size();++iinput){
204  // assert(input_opt[iinput].find(".las")!=string::npos);
205  FileReaderLas lasReader;
206  try{
207  lasReader.open(input_opt[iinput]);
208  }
209  catch(string errorString){
210  cerr << errorString << endl;
211  exit(1);
212  }
213  catch(...){
214  cerr << "Error opening input " << input_opt[iinput] << endl;
215  exit(2);
216  }
217  nPoints=lasReader.getPointCount();
218  totalPoints+=nPoints;
219 
220  if(ulx_opt[0]>=lrx_opt[0]||uly_opt[0]<=lry_opt[0]){
221  double ulx,uly,lrx,lry;
222  lasReader.getExtent(ulx,uly,lrx,lry);
223  lrx+=dx_opt[0];//pixel coordinates are referenced to upper left corner (las coordinates are centres)
224  lry-=dy_opt[0];//pixel coordinates are referenced to upper left corner (las coordinates are centres)
225  if(ulx>=lrx){
226  ulx=ulx-dx_opt[0]/2.0;
227  lrx=ulx+dx_opt[0]/2.0;
228  }
229  if(uly<=lry){
230  uly=lry+dy_opt[0]/2.0;
231  lry=lry-dy_opt[0]/2.0;
232  }
233  if(maxLRX>minULX){
234  maxLRX=(lrx>maxLRX)?lrx:maxLRX;
235  maxULY=(uly>maxULY)?uly:maxULY;
236  minULX=(ulx<minULX)?ulx:minULX;
237  minLRY=(lry<minLRY)?lry:minLRY;
238  }
239  else{//initialize
240  maxLRX=lrx;
241  maxULY=uly;
242  minULX=ulx;
243  minLRY=lry;
244  }
245  }
246  else{
247  maxLRX=lrx_opt[0];
248  maxULY=uly_opt[0];
249  minULX=ulx_opt[0];
250  minLRY=lry_opt[0];
251  }
252  lasReader.close();
253  }
254  if(verbose_opt[0]){
255  std::cout << setprecision(12) << "--ulx=" << minULX << " --uly=" << maxULY << " --lrx=" << maxLRX << " --lry=" << minLRY << std::endl;
256  std::cout << "total number of points before filtering: " << totalPoints << std::endl;
257  std::cout << "filter set to " << filter_opt[0] << std::endl;
258  if(angle_min_opt.size())
259  std::cout << "minimum scan angle: " << angle_min_opt[0] << std::endl;
260  if(angle_max_opt.size())
261  std::cout << "maximum scan angle: " << angle_max_opt[0] << std::endl;
262  // std::cout << "postFilter set to " << postFilter_opt[0] << std::endl;
263  }
264  int ncol=ceil(maxLRX-minULX)/dx_opt[0];//number of columns in outputGrid
265  int nrow=ceil(maxULY-minLRY)/dy_opt[0];//number of rows in outputGrid
266  //todo: multiple bands
267  int nband=(composite_opt[0]=="profile")? nbin_opt[0] : 1;
268  if(!output_opt.size()){
269  cerr << "Error: no output file defined" << endl;
270  exit(1);
271  }
272  if(verbose_opt[0])
273  cout << "opening output file " << output_opt[0] << endl;
274  outputWriter.open(output_opt[0],ncol,nrow,nband,theType,oformat_opt[0],option_opt);
275  outputWriter.GDALSetNoDataValue(nodata_opt[0]);
276  //set projection
277  double gt[6];
278  gt[0]=minULX;
279  gt[1]=dx_opt[0];
280  gt[2]=0;
281  gt[3]=maxULY;
282  gt[4]=0;
283  gt[5]=-dy_opt[0];
284  outputWriter.setGeoTransform(gt);
285  if(projection_opt.size()){
286  string projectionString=outputWriter.setProjectionProj4(projection_opt[0]);
287  if(verbose_opt[0])
288  cout << "projection: " << projectionString << endl;
289  }
290  if(!outputWriter.isGeoRef())
291  cout << "Warning: output image " << output_opt[0] << " is not georeferenced!" << endl;
292  if(colorTable_opt.size())
293  outputWriter.setColorTable(colorTable_opt[0]);
294 
295  inputData.clear();
296  inputData.resize(nrow,ncol);
297  Vector2d<double> outputData(nrow,ncol);
298  for(int irow=0;irow<nrow;++irow)
299  for(int icol=0;icol<ncol;++icol)
300  outputData[irow][icol]=0;
301 
302  cout << "Reading " << input_opt.size() << " point cloud files" << endl;
303  pfnProgress(progress,pszMessage,pProgressArg);
304  for(int iinput=0;iinput<input_opt.size();++iinput){
305  FileReaderLas lasReader;
306  try{
307  lasReader.open(input_opt[iinput]);
308  }
309  catch(string errorString){
310  cout << errorString << endl;
311  exit(1);
312  }
313  if(verbose_opt[0]){
314  if(lasReader.isCompressed())
315  cout << "Reading compressed point cloud " << input_opt[iinput]<< endl;
316  else
317  cout << "Reading uncompressed point cloud " << input_opt[iinput] << endl;
318  }
319  //set bounding filter
320  // lasReader.addBoundsFilter(minULX,maxULY,maxLRX,minLRY);
321  //set returns filter
322  if(returns_opt.size())
323  lasReader.addReturnsFilter(returns_opt);
324  if(classes_opt.size())
325  lasReader.addClassFilter(classes_opt);
326  lasReader.setFilters();
327 
328  if(attribute_opt[0]!="z"){
329  vector<boost::uint16_t> returnsVector;
330  vector<string>::iterator ait=attribute_opt.begin();
331  while(ait!=attribute_opt.end()){
332  if(*ait=="intensity"){
333  if(verbose_opt[0])
334  std::cout << "writing intensity" << std::endl;
335  ++ait;
336  }
337  if(*ait=="angle"){
338  if(verbose_opt[0])
339  std::cout << "writing angle" << std::endl;
340  ++ait;
341  }
342  else if(*ait=="return"){
343  if(verbose_opt[0])
344  std::cout << "writing return number" << std::endl;
345  ++ait;
346  }
347  else if(*ait=="nreturn"){
348  if(verbose_opt[0])
349  std::cout << "writing number of returns" << std::endl;
350  ++ait;
351  }
352  else
353  attribute_opt.erase(ait);
354  }
355  }
356  liblas::Point thePoint(&(lasReader.getHeader()));
357  while(lasReader.readNextPoint(thePoint)){
358  progress=static_cast<float>(ipoint)/totalPoints;
359  pfnProgress(progress,pszMessage,pProgressArg);
360  if(verbose_opt[0]>1)
361  cout << "reading point " << ipoint << endl;
362  if(thePoint.GetX()<minULX||thePoint.GetX()>=maxLRX||thePoint.GetY()>=maxULY||thePoint.GetY()<minLRY)
363  continue;
364  if((filter_opt[0]=="single")&&(thePoint.GetNumberOfReturns()!=1))
365  continue;
366  if((filter_opt[0]=="multiple")&&(thePoint.GetNumberOfReturns()<2))
367  continue;
368  if((filter_opt[0]=="last")&&(thePoint.GetReturnNumber()!=thePoint.GetNumberOfReturns()))
369  continue;
370  if((filter_opt[0]=="first")&&(thePoint.GetReturnNumber()!=1))
371  continue;
372  if(angle_min_opt.size()){
373  if(angle_min_opt[0]>thePoint.GetScanAngleRank())
374  continue;
375  }
376  if(angle_max_opt.size()){
377  if(angle_max_opt[0]<thePoint.GetScanAngleRank())
378  continue;
379  }
380  double dcol,drow;
381  outputWriter.geo2image(thePoint.GetX(),thePoint.GetY(),dcol,drow);
382  int icol=static_cast<int>(dcol);
383  int irow=static_cast<int>(drow);
384  if(irow<0||irow>=nrow){
385  // //test
386  // cout << "Error: thePoint.GetX(),thePoint.GetY(),dcol,drow" << thePoint.GetX() << ", " << thePoint.GetY() << ", " << dcol << ", " << drow << endl;
387  continue;
388  }
389  if(icol<0||icol>=ncol){
390  // //test
391  // cout << "Error: thePoint.GetX(),thePoint.GetY(),dcol,drow" << thePoint.GetX() << ", " << thePoint.GetY() << ", " << dcol << ", " << drow << endl;
392  continue;
393  }
394  assert(irow>=0);
395  assert(irow<nrow);
396  assert(icol>=0);
397  assert(icol<ncol);
398  if(composite_opt[0]=="number")
399  outputData[irow][icol]+=1;
400  else if(attribute_opt[0]=="z")
401  inputData[irow][icol].push_back(thePoint.GetZ());
402  else if(attribute_opt[0]=="intensity")
403  inputData[irow][icol].push_back(thePoint.GetIntensity());
404  else if(attribute_opt[0]=="angle")
405  inputData[irow][icol].push_back(thePoint.GetScanAngleRank());
406  else if(attribute_opt[0]=="return")
407  inputData[irow][icol].push_back(thePoint.GetReturnNumber());
408  else if(attribute_opt[0]=="nreturn")
409  inputData[irow][icol].push_back(thePoint.GetNumberOfReturns());
410  else{
411  std::string errorString="attribute not supported";
412  throw(errorString);
413  }
414  ++ipoint;
415  }
416  if(verbose_opt[0])
417  std::cout << "number of points: " << ipoint << std::endl;
418  lasReader.close();
419  }
420  progress=1;
421  pfnProgress(progress,pszMessage,pProgressArg);
422 
423  std::cout << "processing LiDAR points" << std::endl;
424  progress=0;
425  pfnProgress(progress,pszMessage,pProgressArg);
427  //fill inputData in outputData
428  // if(composite_opt[0]=="profile"){
429  // assert(postFilter_opt[0]=="none");
430  // for(int iband=0;iband<nband;++iband)
431  // outputProfile[iband].resize(nrow,ncol);
432  // }
433  for(int irow=0;irow<nrow;++irow){
434  if(composite_opt[0]=="number")
435  continue;//outputData already set
436  Vector2d<double> outputProfile(nband,ncol);
437  for(int icol=0;icol<ncol;++icol){
438  std::vector<double> profile;
439  if(!inputData[irow][icol].size())
440  outputData[irow][icol]=(static_cast<double>((nodata_opt[0])));
441  else{
443  if(composite_opt[0]=="min")
444  outputData[irow][icol]=stat.mymin(inputData[irow][icol]);
445  else if(composite_opt[0]=="max")
446  outputData[irow][icol]=stat.mymax(inputData[irow][icol]);
447  else if(composite_opt[0]=="median")
448  outputData[irow][icol]=stat.median(inputData[irow][icol]);
449  else if(composite_opt[0]=="percentile")
450  outputData[irow][icol]=stat.percentile(inputData[irow][icol],inputData[irow][icol].begin(),inputData[irow][icol].end(),percentile_opt[0]);
451  else if(composite_opt[0]=="mean")
452  outputData[irow][icol]=stat.mean(inputData[irow][icol]);
453  else if(composite_opt[0]=="sum")
454  outputData[irow][icol]=stat.sum(inputData[irow][icol]);
455  else if(composite_opt[0]=="first")
456  outputData[irow][icol]=inputData[irow][icol][0];
457  else if(composite_opt[0]=="last")
458  outputData[irow][icol]=inputData[irow][icol].back();
459  else if(composite_opt[0]=="profile"){
460  if(inputData[irow][icol].size()<2){
461  for(int iband=0;iband<nband;++iband)
462  outputProfile[iband][icol]=static_cast<double>(nodata_opt[0]);
463  continue;
464  }
465  double min=0;
466  double max=0;
467  stat.minmax(inputData[irow][icol],inputData[irow][icol].begin(),inputData[irow][icol].end(),min,max);
468  if(verbose_opt[0])
469  std::cout << "min,max: " << min << "," << max << std::endl;
470  if(max>min){
471  stat.percentiles(inputData[irow][icol],inputData[irow][icol].begin(),inputData[irow][icol].end(),profile,nband,min,max);
472  assert(profile.size()==nband);
473  for(int iband=0;iband<nband;++iband)
474  outputProfile[iband][icol]=profile[iband];
475  }
476  else{
477  for(int iband=0;iband<nband;++iband)
478  outputProfile[iband][icol]=max;
479  }
480  }
481  else{
482  std::cout << "Error: composite_opt " << composite_opt[0] << " not supported" << std::endl;
483  exit(2);
484  }
485  }
486  }
487  if(composite_opt[0]=="profile"){
488  for(int iband=0;iband<nband;++iband){
489  // assert(outputProfile[iband].size()==outputWriter.nrOfRow());
490  assert(outputProfile[iband].size()==outputWriter.nrOfCol());
491  try{
492  outputWriter.writeData(outputProfile[iband],GDT_Float64,irow,iband);
493  }
494  catch(std::string errorString){
495  cout << errorString << endl;
496  exit(1);
497  }
498  }
499  }
500  progress=static_cast<float>(irow)/outputWriter.nrOfRow();
501  pfnProgress(progress,pszMessage,pProgressArg);
502  }
503  progress=1;
504  pfnProgress(progress,pszMessage,pProgressArg);
505  inputData.clear();//clean up memory
506  //apply post filter
507  // std::cout << "Applying post processing filter: " << postFilter_opt[0] << std::endl;
508  // if(postFilter_opt[0]=="etew_min"){
509  // if(composite_opt[0]!="min")
510  // std::cout << "Warning: composite option is not set to min!" << std::endl;
511  // //Elevation Threshold with Expand Window (ETEW) Filter (p.73 frmo Airborne LIDAR Data Processing and Analysis Tools ALDPAT 1.0)
512  // //first iteration is performed assuming only minima are selected using options -fir all -comp min
513  // unsigned long int nchange=1;
514  // //increase cells and thresholds until no points from the previous iteration are discarded.
515  // int dimx=dimx_opt[0];
516  // int dimy=dimy_opt[0];
517  // filter2d::Filter2d morphFilter;
518  // // morphFilter.setNoValue(0);
519  // Vector2d<float> currentOutput=outputData;
520  // int iteration=1;
521  // while(nchange&&iteration<=maxIter_opt[0]){
522  // double hThreshold=maxSlope_opt[0]*dimx;
523  // Vector2d<float> newOutput;
524  // nchange=morphFilter.morphology(currentOutput,newOutput,"erode",dimx,dimy,disc_opt[0],hThreshold);
525  // currentOutput=newOutput;
526  // dimx+=2;//change from theory: originally double cellCize
527  // dimy+=2;//change from theory: originally double cellCize
528  // std::cout << "iteration " << iteration << ": " << nchange << " pixels changed" << std::endl;
529  // ++iteration;
530  // }
531  // outputData=currentOutput;
532  // }
533  // else if(postFilter_opt[0]=="promorph"||postFilter_opt[0]=="bunting"){
534  // if(composite_opt[0]!="min")
535  // std::cout << "Warning: composite option is not set to min!" << std::endl;
536  // assert(hThreshold_opt.size()>1);
537  // //Progressive morphological filter tgrs2003_zhang vol41 pp 872-882
538  // //first iteration is performed assuming only minima are selected using options -fir all -comp min
539  // //increase cells and thresholds until no points from the previous iteration are discarded.
540  // int dimx=dimx_opt[0];
541  // int dimy=dimy_opt[0];
542  // filter2d::Filter2d theFilter;
543  // // theFilter.setNoValue(0);
544  // Vector2d<float> currentOutput=outputData;
545  // double hThreshold=hThreshold_opt[0];
546  // int iteration=1;
547  // while(iteration<=maxIter_opt[0]){
548  // std::cout << "iteration " << iteration << " with window size " << dimx << " and dh_max: " << hThreshold << std::endl;
549  // Vector2d<float> newOutput;
550  // try{
551  // theFilter.morphology(outputData,currentOutput,"erode",dimx,dimy,disc_opt[0],hThreshold);
552  // theFilter.morphology(currentOutput,outputData,"dilate",dimx,dimy,disc_opt[0],hThreshold);
553  // if(postFilter_opt[0]=="bunting"){
554  // theFilter.doit(outputData,currentOutput,"median",dimx,dimy,1,disc_opt[0]);
555  // outputData=currentOutput;
556  // }
557  // }
558  // catch(std::string errorString){
559  // cout << errorString << endl;
560  // exit(1);
561  // }
562  // int newdimx=(dimx==1)? 3: 2*(dimx-1)+1;
563  // int newdimy=(dimx==1)? 3: 2*(dimy-1)+1;//from PE&RS vol 71 pp313-324
564  // hThreshold=hThreshold_opt[0]+maxSlope_opt[0]*(newdimx-dimx)*dx_opt[0];
565  // dimx=newdimx;
566  // dimy=newdimy;
567  // if(hThreshold>hThreshold_opt[1])
568  // hThreshold=hThreshold_opt[1];
569  // ++iteration;
570  // }
571  // outputData=currentOutput;
572  // }
573  // else if(postFilter_opt[0]=="open"){
574  // if(composite_opt[0]!="min")
575  // std::cout << "Warning: composite option is not set to min!" << std::endl;
576  // filter2d::Filter2d morphFilter;
577  // // morphFilter.setNoValue(0);
578  // Vector2d<float> filterInput=outputData;
579  // try{
580  // morphFilter.morphology(outputData,filterInput,"erode",dimx_opt[0],dimy_opt[0],disc_opt[0],maxSlope_opt[0]);
581  // morphFilter.morphology(filterInput,outputData,"dilate",dimx_opt[0],dimy_opt[0],disc_opt[0],maxSlope_opt[0]);
582  // }
583  // catch(std::string errorString){
584  // cout << errorString << endl;
585  // exit(1);
586  // }
587  // }
588  // else if(postFilter_opt[0]=="close"){
589  // if(composite_opt[0]!="max")
590  // std::cout << "Warning: composite option is not set to max!" << std::endl;
591  // filter2d::Filter2d morphFilter;
592  // // morphFilter.setNoValue(0);
593  // Vector2d<float> filterInput=outputData;
594  // try{
595  // morphFilter.morphology(outputData,filterInput,"dilate",dimx_opt[0],dimy_opt[0],disc_opt[0],maxSlope_opt[0]);
596  // morphFilter.morphology(filterInput,outputData,"erode",dimx_opt[0],dimy_opt[0],disc_opt[0],maxSlope_opt[0]);
597  // }
598  // catch(std::string errorString){
599  // cout << errorString << endl;
600  // exit(1);
601  // }
602  // }
603  if(composite_opt[0]!="profile"){
604  //write output file
605  std::cout << "writing output raster file" << std::endl;
606  progress=0;
607  pfnProgress(progress,pszMessage,pProgressArg);
608  for(int irow=0;irow<nrow;++irow){
609  try{
610  assert(outputData.size()==outputWriter.nrOfRow());
611  assert(outputData[0].size()==outputWriter.nrOfCol());
612  outputWriter.writeData(outputData[irow],GDT_Float64,irow,0);
613  }
614  catch(std::string errorString){
615  cout << errorString << endl;
616  exit(1);
617  }
618  progress=static_cast<float>(irow)/outputWriter.nrOfRow();
619  pfnProgress(progress,pszMessage,pProgressArg);
620  }
621  }
622  progress=1;
623  pfnProgress(progress,pszMessage,pProgressArg);
624  if(verbose_opt[0])
625  std::cout << "closing lasReader" << std::endl;
626  outputWriter.close();
627 }
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkgetmask_1_1pkgetmask__coll__graph.png0000644000113200011300000000746112616110567026032 00000000000000‰PNG  IHDRíp}×`EbKGDÿÿÿ ½§“æIDATxœí{Pg÷ÇŸ…p)·È°\ â l‡ŽÓ±V%‚¤¾B©Z.XP°ØR[«%N¹8Õ´¥ä¢SZ†Œ‚ZT|a«PäEŠÊÍ:)P#$\’Ýßû¾ûK“€¤&Æ<=Ÿ?œ}Ïsö{6_7‡Ín (ŠB`ä˜Zèð1€àcÀǰ -@;&&&ºººH’4´Ìqqqqtt4´ -02K¥Òû÷ï×!6:¤RéÐÐqd#ó1¯¯¯¡%àÌo¿ýfh Zý1€àcÀÇ€ø§ø¸»»› ˆ§™êË/¿$âÀºÒ0Ór‚ º»»ÿvZ<ø§øX#½½½G™)Š*++sww‰DºÊ9o޼ݻw#}Ê6^þÑ>&IòþýûúÈ|ãÆ›7oµ¶¶vvvê$'‡Ã¡Ïîú“m¼`ècúý÷ôéÓ‹-rrrJII™œœd~JQÔ®]»üüüþüóÏ×^{ !ôüóÏÓ?‰‹‹ãp8nnn»v횘˜˜)ÈPYYùòË/[ZZzyy•””0ñ²²²U«V.^¼Xý”LQ”P(ôññ±³³[½zõ™3gè†A}_t-µµµîîîÇŽ£§©ÈFUWWs¹\{{û¬¬,:BDqqñ’%K8PRRâééÉf³÷íÛ§³ýLAƒƒƒõõõ³ÏéêêBuvv655q¹\@@I’dLÌÌdFGGôôô´µµ-]ºT h 2«ÆÆÆ,,,„B¡X,.**b±XcccE‘$éé陟ŸOQÔçŸîëë«,Œ¢¨‚‚WW×óçÏ×ÔÔp¹\:>Ó¾BBBêêêZ[[éi*²Bo¿ý¶T*-//GÑ¥!„"##¥Riaa!BhãÆR©4??Ÿ™0 ííííííÚ½0†[·µµÑC‘HÄåré ŸÏGݾ}[y&½=55ejjʼ~\.WcY%‘HÌÌÌ:ôàÁ’$GGG EQMMM,‹¶Kss3BèÆÊ»[ºtéO?ýÄ.--EͲ/ºf¹º/\¸@Q”B¡@uuuÑÁ––º.•mzÂ,£1ì+h,X@o,^¼¸¯¯Þ¾zõª¿¿ff¦úüÁÁA…BáííM¹\n__ŸÆ ³ÄÞÞ¾¾¾¾©©ÉÍÍmÕªU/^411A•••Éår‡CIJeËB*­EOOÏÒ¥K™¡ÏL˜f/ÖÅÅ!DïÁÖÖ!dff¦²%Øú˜>i!„:;;é—!TYY) ËÊÊêëëUæÏŸ?ßÔÔ´··—öôô¸ººj 2Kd2I’Ç—H$ñññëÖ­“H$ …B$eggþÔÔT‘HD)=?æáá¡|ÃÍ›7g@o?Öºº¤h¼`ëã;wvww_½zuÏž=111tÐÚÚzÑ¢EŸ~úiRRóÛØØBÈÌÌlÓ¦M)))wîÜiooß»wott´Æ ³ ‚ ‚‚‚ÊËË¥RéÔÔ”™™™••ÕÅ‹‡††¢££mþGTTTWWÝÝÒìØ±ƒÏçWWWß¿¿®®N 1û¾Ô¡eÿÅÐv̽?.,,ôððàp8ÉÉÉ2™L¹§”Éd .LKK›žž~óÍ7mllè¸D"Ù¼y³ƒƒƒ³³óG}$“É4•S‰D"ooossóÅ‹Ÿ>}š¢¨ÄÄÄ   e=$Iz{{ïÞ½›Y¨P(rrr¼½½ÙlvppðéÓ§»/f[E6Rjy‘R¬TÙž cì±õñS‘ó7©¬¬lmme†'Nœðóó3 ŒÑÇØöÏ2mmm111---ãããMMMûöíKHH0´(ãÆ(;;»ÄÄDC«˜ >Ÿ?>>6<<ìååõþûï?ゟ}ʨ¾‡ehh¨££ÃßßßÐBp†¾–b\Ý@_àøÀð1€àcŒòzÅÀÀ€¡%àÌÄÄ„¥¥¥¡Uh‡‘ùØÂ‚ ]Ý™þ IêðáæððE®®¶†Ö¢óæÍ3´í02³ÙìU«VZ…45õ\¾üó¢E^ÑÑþ†Ö‚3Ðë—“'›éårøN:=>Ö#SSòŠŠë¡‡ÇnZ΀õÈ… ·ÆÇ'B¦¦&͆–ƒ3àc=R^Þljj‚’Ëɪª6™lÊЊ°|¬/=šü÷¿Ûår=œœ”×ÔtVÆ€õ…²‰B&&Dyù5êÁð±¾(/¿¦üØœ\NÖ×ß’Je”„1àc½ ‘Ö 'N\U@$©¦¦žÁÁ‡‘„7àcÝ300ÒÜ|—$5Ñ=FvŸQ0>>åìlÇ ÇÆ&--ÍX¬ÿž2þñ_ý£Œì9ScÄÅå#¡0ö_ÿò3´œ¾Àð1€àcÀÇ€8>p| àøÀð1€àcÀÇ€8>p| àøÀð1€àcÀÇ€8>p| àøÀð1€àcÀÇ€8>p| àøÀJ CËÁ w+C«À ssó_~ù…±î_þ>ÈÝ»w7lØàããc(q0GöïßßßßÏ Uÿο¿ÿSUÚ³ÿ~å!ôÇ€8>p@_>îïïçñx†Zþl*Ñ!ONµ¨ /ÛØØDFFê6§X,^¿~½nsêcÔ<Ïr-úò1›ÍÞ¶m›ns’$)•Ju›Sߣæ™x–kÑÎÇE@½óÎ;ôÆÆÆ8°~ýú 6äååMMMÍdЕ%#„är¹P(  …r¹\E3Ç«ªªŠ +--­®®ŽŒŒ -..¦'466nݺ5888""¢´´ô±²•UáZË\PýdvΞ=ûÃ?¤¦¦úøøtwwgee!„Î;WRRÂçó.\ØÝÝ““£¼dbbB $''¿ñÆ¿þúëW_}µråJKKK•̧NÊÊÊÍÈȰ³³ ¤ ËÏÏoiiÉÎζ³³;|øpLLLEE½ä›o¾‘H$B¡P&“¥§§[YYÅÆÆªéTºUröìY%Ÿ8qB,çççÓÿŽ=ª¢!ÔÜÜœ——wáÂ…ƒúûûÕÕÕ}ýõ×ï¾û.‹Åúâ‹/Ö¬Y“••ÕÚÚš‘‘±víZKKKuÙt*Uê¯NµÌŽvçãòòò¤¤¤+V888,_¾ŸÏ¼H´æÇ2==-—ËY,ÖÔÔÔÑ£GBããã3ÉÖx|pªE+´;oÚ´I¡P|ÿý÷###tÛ”žž¦P(rrr>|èëë›””tðàAf‰¹¹ùgŸ}–ŸŸ?44äââ’––fnnŽ:t蟟Ÿµµ5=-00ðã?ž˜˜ˆŽŽV¢jkkKKK7oÞüÒK/EDDœ;w!´sçÎÜÜܤ¤$33³Õ«WGGGk 2©t¨$66VcÉñññ¹¹¹[·n%båÊ•‰‰‰,KYóìØØØlß¾===ý¹çž‹ŠŠ àóù'OžÔ([]U\\Nµp| à€êõŠ’’’3gÎD ümþâãÔÔÔ{÷îJ Ì ,_¾œþåº)Ð8>p| àøÀÿ§@›`R’NIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_34.png0000644000113200011300000000524412647437044015513 00000000000000‰PNG  IHDRÛ3”}¯bKGDÿÿÿ ½§“ YIDATxœíœ{hSçÇ¿g5Z6×VMÓµÊl´WJƒ*¸MÓµ››:vß`ZÄ®ÃÍq²^ Z/tX«ÅRÇœ¢™(Œ6í6flšŽÎ"½švë%ßß¿_ίiNN“4·Î÷rÞ§ïyŸó<ïÃyóæ|+‘$A¤©{$Ö ¢Ø‚(!ŠM ˆ³”.]ºm_‚Obb"6mÚ„Ù³gû©À¦M›@âGǹsç”ÊêŒâ“m||%%%8s挒Y øA’$Œ)ÚÄw6 Jˆb¢„(6 Jˆb¢DL‹íÎ;$)î¯Î1$Iò:’““±~ýz´··‡ÙËð®ØNƒxÏa¨Ä´ØRRRðÉ'ŸDm<»Ý­VµñüqóæMtuuáîÝ»¸víÜn7¶lÙk·¦$œù 5ñ’ÃPPÜúZ­_~ùeÔÆs»ÝèííÚxþHMMÅO<HOOGuu5ôz=œN'’’’bì™/µ¨/9 …°<ÙÜn7<ˆÜÜ\<þøãX±bÌf3$IITUU!//IIIxá…páÂH’äó(ollDaa!±dÉœ:uJqýôÓ^>®[·ŽW¯^åÐÐ_?¾ùææççÓjµ²¥¥…EEE4™LòX_}õ_~ùeþù矴Z­|ê©§X^^®ê³šmrü°¸¸˜ýýý¬®®&öööªæ<˜ÄkÕÀÚÚZ%Ó™°[~~>?îÕvâÄ `AAkjj¼lß}÷O±õõõQ£ÑðÛo¿e?Ýn79>>î3ž§ŸÕj•Ûjkki0d[YYð?þðéçadd„ lmm•Ûêëëi0Tm¡úMÒçÕFÕ+WÒf³)Þ›šÙÙÙ¬¯¯—Ûûí7¯óœœvuuÉç—/_¦ÑhTõYͦTlf³YöÓ“SµœƒxÍ¡jÅ–e¤Ýn‡Ñhôj+,,´µµ¡  ÀË–——çsyóæÁl6Ãb±@¯×cåÊ•¸~ý:yÄ¿‹K—.•?çää ³³S>ÿùçŸñÜsÏaïÞ½~ûß»wãããÈÊÊ’Û :;;UmÓõÛf³$Hbdd?ýô ƒ×ßäääLécGG‡W rss±aÃùÜáp ==]Þõ[½z5ÚÛÛU}ö~222Fn $çÄ žs a¹Zff&š››½Ú~ýõWÀâÅ‹åÏ~ÿýwŸk¸\.¸ÝnÔÕÕ¡¯¯ï¼ó^|ñEôõõù×f³ÉŸoß¾-'øï¼ªª §OŸ†ÙlV쟖–†„„Øív¹­­­ ™™™ª¶éúžÉ«æGFF‡ÜÞÔÔ„/¾øB>×jµ^“º¿¿‹EÕç`ïGiBšó©˜é9ôAéyì2rïÞ½Ôét<þ<»ººøÃ?ÈßÙ8@½^Ïü‘===¼rå ³³³)I’×£Üår111‘gÏžeww79ÂÄÄDº\.’duu5Hþ)ñüóÏÓf³ñÖ­[\ºt)wíÚå³Ì¨¨¨à²eËèr¹dÛàà lýõ×¹jÕ*Úív¶´´0??Ÿ»víRµ…ê·g™áY.)¡ôÄŸ,,,dKK [ZZøÌ3Ïð½÷Þ“û•––²¸¸˜‡ƒÍÍÍ,**â¶mÛT}V³)-#'Þ‹ç\-ç¡Ä Ö9 Dú;ÛÈÈwïÞÍ'Ÿ|’sçÎåŠ+ä5úøø8÷íÛǬ¬,&''síÚµlhh`jjªOPkkk™••ÅÙ³g3''‡ ^71yMôèQ.^¼˜Z­–Û·oWœ.—‹Ë–-cEEGGGùì³Ïrîܹ²½¯¯[·nå‚ ˜žžÎ?þX²?[¨~+OF©ØüùñàÁšL&fdd099™¯½öûûûå~N§“o½õçÍ›Ç ðý÷ßçßÿ=¥Ïþl›ZÎC‰A¬s /6%<7ÓØØÈ¦¦&/ÛÙ³gi4§}mA|‰œÏÔŠ-âoX­VlÙ²¿üò †‡‡a±XðùçŸãÝwßôЂ!r®LÄß )++Ãðð0^zé%twwcÉ’%xûí·ñÁ„|ͤ¤¤iõD–Häü߀ô¿GŸ¯¼ò ¥¶@$’$¡¶¶V®¡ ˆÿ)D‹°[4dBÚ2=fš´%ÞçT°„õÉiéÈt%BÚ2ó¤-ñ>§‚Bi2”­(üvÒÙÙI¼ÿ~Ì·ë§òïa`:9 Wþ‚¹N¼Ï)%«­²‰Éî‰ç B’ãOâŠBÚ23¤-ñ>§TQ*ÁPŸlÈ&&ž|¨$Ç3¦’Äc:þ iKüH[â}Nù›gƒÊ&&ž|¨$Ç3¦’Äc:þ iKüH[â}N)¡Vla]F"›P‚~ê T’ãAIâ1ÿ„´%¾¤-ñ>§‚!¦¿³yÖÝýõ—ܬ<#Üš#!m™ÙÒ–xœSòu#rÕ)HIIœªj ”pÅî±ÇCvv6ÊËËñá‡zml M5ÛDÂqÏ¢1§¦Òâ2\[ÿ™¼6Þ³gSRR˜••ņ†ÙŒ$gò˜ÏÕløG iK¬¥-ñ6§±Ø„ÊÃ,Ϙ."vÊD3.jÅwïF yFèˆØ)/q‰é?iUBÈ3BGÄN™x‰‹ØaDHl‚8@›@%D± QB›@%üîFÚív9r$š¾ÿj‹máÂ…¨««{è·Œ‚`IHHðyÔƒâÖ¿@ ;bë_ ˆ¢Ø‚(!ŠM ˆ³ÔÅÚ à!Àò–8ÑÃÏ6IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1ProcessingPktoolsPlugin_1_1ProcessingPktoolsPlugin.html0000644000113200011300000001316112647637662027220 00000000000000 pktools: qgis.ProcessingPktoolsPlugin.ProcessingPktoolsPlugin Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.ProcessingPktoolsPlugin.ProcessingPktoolsPlugin Class Reference

Public Member Functions

def __init__
 
def initGui
 
def unload
 

Public Attributes

 provider
 

Detailed Description

Definition at line 40 of file ProcessingPktoolsPlugin.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classCostFactory__inherit__graph.md50000644000113200011300000000004012616110566020730 00000000000000e64c5347d3103351bf80477a99bb5b35pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask__inherit__graph.png0000644000113200011300000000736112616110567026572 00000000000000‰PNG  IHDRíp}×`EbKGDÿÿÿ ½§“¦IDATxœíÝyPS×ðË ² „‚H;tk;SR)…R+”es)ÈRF¨ÑZ-qÚíX˜.JEÇXJFA)*>ÁÁ*TyHQYë¤@‰°$÷¾?î{yi hjÒÓßççÞýç~oøN8ÄDi$I"tœž¶ Ðc€è1Àôà€®íª™™™ééé!BÛA0ggggee¥í*б‹D¢ññqÝzˆuŽH$Õ­YÇzLY³f¶#àì×_Õv•Áúàz p=8€üSzÜÛÛK£ÑþΩ>ûì3–››«® ÊN§Ñh½½½yZ<üSz¼¨þþ~&“©‰™I’,//wttäóùêšsåÊ•{öìAšŒ­»þÑ=&b||\3ߺuëöíÛ%%%íííÝÝÝj™“ÉdRÏîš‹­»0ì1õ󷪪ÊÝÝÝÚÚ:55uvvVöU’$322¼½½ÿøã—_~!dccC}ibbbÛ¶mL&ÓÁÁ!##cffFÙ Luuõ /¼`llìââÂãñdãååå>>>~~~ Ÿ’I’är¹žžžæææ¯½öÚ¹sç¨ÃÂkQ÷réÒ%GGÇãÇS‡)ÄFÕÖÖ²X, ‹œœj„F£•––®^½ÚÊÊ*77—Çã9;;3Œ¨í^VH222ÒÐаô1===!ÿîîîææf‹Åáp¨A‚ d%–);1::zãÆ}}}^^^gÑAÙY“““FFF\.W ”””ÐéôÉÉI’$ ‚pvv.,,$Iò“O>Y³f|0’$‹ŠŠìíí/^¼866VWWÇb±¨qe× ¬¯¯ooo§Sˆzë­·D"QEEBˆº5„Pdd¤H$*..F…‡‡‹D¢ÂÂBÙKèìììììTí£mØö¸££ƒÚåóù,‹ÌÌÌDݽ{WþHj{nnN___öý«¬¬d±X‹ÊÎ …‡zðàA=’J¥$I677Óétª.­­­¡[·nÉ_ÎËËë‡~.++C-q-ê^d§/ìñåË—I’”J¥¡žžj°­­º/…mê€%èb1\WPÜÜܨ ÁÁAj»¥¥Å××7;;{áñ###R©ÔÕÕ•Úe±Xƒƒƒ‹ÊN±°°hhhhnnvppðññ¹r办žB¨¼¼\"‘0™L¶víZ„ÂÒ¢¯¯ÏËËK¶ëéé©,€ì–¾Y;;;„uu333„Â6–°í1õ¤…êîÍ¡êêj.—[^^ÞÐРpüªU«ôõõûûû©Ý¾¾>{{ûEe§ˆÅb‚ N:% ãââ6mÚ$ ¥R)ŸÏÏËË{ô?ééé|>Ÿ”ûü˜“““ü{nß¾­,µýØþ©ë%EÝ…mÓÒÒz{{[ZZöíÛC ®X±ÂÝÝ}ïÞ½III²ßØ&''B©©©û÷^tPv æïï_QQ!‰æææ LLL®\¹2::mú?QQQ===Ôê–’’’’™™Y[[;>>^__Ïáph4ÚÒ×ZˆŠ þKÛ Õ<ùú¸¸¸ØÉɉÉdîܹS,˯)ÅbñsÏ=—••5??ÿꫯšššRãB¡066ÖÒÒÒÖÖv×®]b±xÑAù©ø|¾«««¡¡¡‡‡GUUI’‰‰‰þþþòy‚puuݳgìD©TšŸŸïêêÊ`0ªªª¬¬¬{-Ù¶Bl$·äErëã…ƒ ÛÊèâúÛÿ-qþ¢êêêöövÙîéÓ§½½½µ˜G.öÛuÅrÖÑÑÓÖÖ6==ÝÜÜ|àÀøøxm‡Òm:ù>ú¥™››'&&j;ÅR233§§§ƒƒƒÇÆÆ\\\Þÿýexù£‘:õï°ŒŽŽvuuùúúj;Ψ×RtëC7°®8€@ Ç:ùzÅðð°¶#àlffÆØØXÛ)T£c=622¢Ñhêzgú߀ È#GZCBÜííÍ´E+W®ÔvÕèX †¶S¨ ¹¹ïÚµŸÜÝ]¢£}µg°>Ö¬3gZ©?%ø7é4z¬Ass’ÊÊ›¡‡§ïj;ΠÇtùòééY„¾¾^ee«¶ãà z¬A­úúz!‰„¨©é‹ç´[ÐcM™ššý׿:%)µ;;+©«ëÒn$ŒA5E¾Ä!==ZEÅ -æÁôXS**nÈlN"!îˆDb-FÂôX#„Â©ÆÆn©ôO¯µ‘$yáB‡¶"á z¬çÎý{á I’§NÁÒB# ÇqútËÂ(ÙÜÜ72òP+‘ð=V¿áá‰ÖÖ{±Èmôõõª«yªO z¬~ÕÕíÊ>,&‘H+*à/DÔOÇÞ'¤¦§çlmÍe»““³ÆÆtúŸ2þñÿôFèØçLu‘Ý..wëÛo{k;Î`]p=8€@ ÇÐc€è1Àôàz p=8€@ ÇÐc€è1Àôàz p=8€@ ÇÐc€è1Àôàz p=8€@ ÇÐc€è1Àôàz °@ÊqrrÒv 9êé™h;n þùgYuÿôÿƒÜ»w/,,ÌÓÓS[áxB’í*þ?7žžž¾¾¾k"TwðàAù]X@ ÇÐc€MõxhhˆÍfkëôå™DþZ*œîE¦zljj©Þ9ÁæÍ›Õ;§¦ébfe–ó½hªÇ #!!A½s!‰Ô;§¦ébfe–ó½¨Öc’$Ïœ9³uëÖ7ß|3%%åæÍ›l6›$ÉŸ~úiÛ¶mAAAéééMMMl6[þ‡Åµk×âââüýý£¢¢jkk椎¼zõjlllHHÈwß}7??/Å‚‚‚øøø‡~ðÁ¡wÞy‡úÒäädnnîæÍ›ÃÂÂ æææ” ʨ+‰²©$ —Ë ár¹‰D!3›Í®©©ÙºukpppYYYmmmdddPPPii)u@SSÓŽ;BCCËÊÊ[!–÷ò$TëñùóçOœ8Ïãñ¶lÙ’““ƒºpáÇKII)++‹ŽŽ>|ø°ü)333'88¸¼¼<66ö«¯¾š™™Y8óÙ³gsrr²³³ùåÙ=“$YXXØÖÖ–——Ç`0Ž9‚ª¬¬¤¾úÍ7ߌq¹Ü/¿ü²¥¥åÇT6¨ö$ʦ:}ú´@ (,,üúë¯ÛÚÚŽ;¦!ÔÚÚZPPPTTÔÔÔTRR’œœÌãñD"Ñôôô§Ÿ~êæævòäÉää䢢¢‰‰‰%b+¤Âû^–¦Z+**’’’6lØ`ii¹~ýúøøxÙàºuë ÆÚµk·oß.ÊüüøÝËÒTë±@ `±X²]„Ððð°³³³lðÙgŸ•?ÅÌÌ,??¿««+,,ìÃ?ìèè Ñh gvpp 6ÇÆÆ¨í»wïz{{ŸÚ»wïK/½-Ѩ¨(„PYY™ÍóÏ?J§¥¥1™Ì¤¤¤Ý»w¯[·Ž:kÑAµ'Q6U\\œ‰‰ÉŽ;víÚåêꚘ˜¨yi¦¦¦ÉÉÉŸþù–-[lll6nܘ™™©ìZ Sav/*¡‘$ùÿ-++ëÉß·944“mmm-[l466òx¼¢¢"•&ihhP%¶F,Ÿ$O§{Y›ÍæóùáááÔ®þ¤¿¿ÿ‹/¾èéé™íêê*-- zúixrªýž·¨÷Þ{offfÿþý¶¶¶›6mzòÓW¬X¡Òñš³|’<=œîåI<ÕºmQÿº­ƒ@ ÇНWðx¼sçÎi% ÙŸzœžž~ÿþ}mEàɹ¹¹­_¿^¶û§×ÝÐQ°>8€@ Çÿ/^jÂ*÷IEND®B`‚pktools-2.6.6/doc/html/dir_35acdce8930fac877097c845a64519e5_dep.map0000644000113200011300000000054012616110567020350 00000000000000 pktools-2.6.6/doc/html/inherit_graph_11.png0000644000113200011300000000260112616110570015464 00000000000000‰PNG  IHDR‹%rabKGDÿÿÿ ½§“6IDATxœíšAHoÆŸ1[*¤ÔÌ´pAì°Q‡ô”x1Ékµ‚…‡$ÝC^ –Šô`QB‘‚š¡°³+AÔ-T¢/ɲŒ‘cCËÝ]ݧË—ÝffýV7µ¿ß>Ø™÷÷{˜}v¾wgF!IH$ëãÉØn’i‰0Ò,a¤Y$ÂdíDWW×Vk‘ìöíÛ‡ŽŽX­V]ÌÐ,n·Ÿ>}Byyù_'ÙYx<ÔÕÕ‰›ÊËËáv»ÿª0ÉÎCQÓ˜ìY$ÂH³H„‘f‘#Í"&mfQÅtÄÓÒÒEQÐÖÖfXÃn·ãÏÇUSSS uDóv2ÿ’Ö(i½²ŒŽŽ"èF’p¹\°Z­PUÕ°Æàà il#y»•ééiäå奵fZÍräÈèF”‰‰ LNN¢··^¯~¿_WÃápàÆøöí[Ò¹Dóv+‘Hóóói­¹¥=‹ËåBEE*++a³Ù ¯ ÍÍͰÙlhllÔ-3©æýy©7ZÎpòäIäææâÁƒ±X8†ÓéÄÑ£G‘ŸŸ§Ó‰p8œ´fôóÐЬV+Þ¿ׯ_£´´@aa¡áò»ÑyöìYHø±n`·Ûi·ÛB¦ ×ëe0Láp˜$‰DX\\Ì®®.’äÝ»wyêÔ)] MÓè÷û¹ÿ~öõõ‘$5Mc¼TѼ?~°§§Çt/_¾Ì……öôôçççI’÷ïßç¥K—833CŸÏDz²2Þ¾}[7Güvôsuu5‡‡‡h±XX__ÏÙÙYö÷÷çæætuÖ;·›Õ) ªªjr§Õ,FãÕ«W$ɱ±1fffòû÷ï$É?'&&jhšF’|üø1<È™™S³¬—'¢ydd„$¹²²’P×f³1Ärß¼yÃ3gΙÅçó‘$———999ÉP(ĵµ5¾}û66GªfÙ¬ÎTΉ™YLo÷oMÓpâÄ Ã˜ËåÂêꪮéRU§OŸÖå755áÅ‹¸~ý:ž>}j:§hžÇŽìÝ»7aÿçÏŸQXX˜°ïСCºãi°Úl6€ÅbßïGCCB¡JKKSÖ—.é`Kz–µµ5¨ªŠöövƒÁظyó&TU5<áèëëÇÐÝÝmZ[4/ÙñFäååAÓ4I,,,`ll,_]]|ýúUwlô ]ZZBMM œN'ÆÇÇÑÙÙ™²¾ÍêL'[b–wïÞannW¯^EVVVl\¹rš¦ÁëõW\\Œ‡âÑ£GIë›åýüùÏž=3ÝNÆÅ‹qçÎ|ùò>Ÿ.\@GG²³³ÏŸ?Çââ"ž|èàà ‘H%%%®®®ýýý3ÛŸˆ±žžüúúz¤…OŸ>ÙÙÙ½{÷†áÞÞ^‰ôýûw¤?¥R)‘Hn]¹reݺuÁÁÁIII~~~ÓðY»¸µ²²²³³C~iuÞ¿ïææ†&###KKKaÖZ"‘ØÖÖ²aÃ&“9‘õ¦P»ÇŽkiiIJJÒÊá_h·0 §¦¦¡ãPttô;wœœœ®]»†´Àãñ”JåÒ¥Kkjj,,,D"š?00`jjúàÁ•J¥P(̱q;v»»»›L&ïܹ3>>~*A;V‹ÖãPNNŽP(ܱcGEEE[[…B‰7,p†®Ó°ÐœÇs8œÞÞÞ™µ©0fJ ·[SCýÜŠÁjaA¾W­¯õΙ6D jkkQi»Ÿîÿßùîe> þ}ÝK»XŸíOÅ@®|P¢ÄÒ.¦:û¿¹r``:*$XšÆTgçs D€ð(Ì{üKÓ˜êä=þ¡…=düaÌLc§³ïÏ¡m ðsÔ# Žçb̬c§³£Bldòë¤9: ó¢Î¶GbÕˆÚ9 ½ŠÛØXÇHç÷O²¯Cš¶M Žgºéìx&12Ö´¥ÛÊLæ)Xè„U€÷X¬RªÆ ôŒˆ>hÿA{°Ð)|'WˆGÆ7o uT`1a¡³«ª`db4öVÁϱ8D§ó|E[(ÁV$[4ÙZö}™ïÂD$if……X_¯Š6piôQvXcit¾ÜOÀu¸NÃb¾èœ…ó ¿QfãbfncòûªúctÎ ó%nqØ2ÉÚHý€ÍjÉ‘J¥nnn[¶lyòäIkkë½{÷Ö¬YC¥RÕWêÈœÐ9ùÚH½0'tÚÙÙUVVjdêËÄ,ŸOþüýµ*ª··W(zyyiTóööniiÑ—ÑYÐÉo”½2ùÚHÝ™ýñvŠk#udöuâââÎ;‡®<‰‰)))¡Óé111z³¡¯}êüwýÛŽç[ ×××·zõj*•úìÙ³ÖÖÖ¬¬,™LÒ—Ñ9ÑŸ .|ûöíúõëÓÒÒ<==Y,Vvv¶»»{BB‚Þlèë›:cûs\ô»6rNôç¸èwm$~ýiXÌݸÕ/¸NÃ×iXà:g ëOl˜+ן3 ·†®Ó°Àuøõ§a1_â×iXà: \çŒ_Î ó%n'|ŽT[[K$gÂâ ’;‰°p&ZNOOŸH΄kÓù|þðð0òµ•¥¥¥]]]•þf þÖ­[õëÍÌQ]]=Ié|9>q†Å|Ñ©ë»@ …‚ÉdÖÔÔˆÅb[[[7Ñ ‰ÏçÇÇÇ¿|ùRG£Ó@Wyyy"‘èìÙ³¶¶¶ÝÝÝyyy2™,%%E/Îé]ã¶¶¶öèÑ£...VVV)))¯_¿Ö‹gúEW$©¬¬L*•"I‹…lËår:¾gÏžÈÈÈÂÂÂáá_oן>}º  ÙÙ½{wCC@©T2Œ°°°°°0ƒ¡T*ù|>•Jår¹QQQ>|˜¶ŸºêLOOçr¹ééé,K$¡EW®\éééa0/^ljj*))A‹h4Zuu5r ®©©ÉÔÔÔ××p÷î]@pýúõK—.q¹Ü›7o"õÙlvff¦‹Ëô?¢«N‹…|²¢¢"66–Ãá”JeUUUrr²½½=…B9xð`ee%º×¦M›¤Rikk+€Ãá„„„ &}úôé‰'Èd2…BILL|óæ RÿرcÞÞÞfffÓöS§qhpp°®®nëÖ­îîîîîîûöíc2™ ƒF£I$•JµlÙ2¤¦ƒƒCOOº£©©i@@@uuµ³³s]]]QQ’/ ÃÃÃÑjÈúøi£“N†ÏŸ?ïää´jÕ*A¾¾¾È÷­­­ŒŒÁŠ+_¿~Õø˜/F»zõêªU«\]]—/_Žd.Z´è?þpppÈår±ø¯Wšu=/è·æææÁÁÁ¹¹¹  ¥¥¥°°F£!žQ©Ô¼¼<@ðùóç7nlß¾]}____¹\Îd2wíÚ…f‰D¢ÎÎÎŒŒŒ²²2]ÜSG×ß)##ãÖ­[EEE|>ßÚÚšJ¥8p):qâD~~þñãÇMLL¶mÛ§ºÆÆÆAAA'((Í<|øp~~þÑ£G!Ú²eKbb"òí\Ý™ð¹›ÍŽŠŠš•¹ËôÈÍ͵µµe³Ùã–Ηù-®Ó°Àu¸NÃâ7ó„´´4lüÐÎÎN)—:êܸqctt4úŽÐ܇B¡Lòðu†®Ó°˜/:ÿ«býÚ=ö«IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_2.md50000644000113200011300000000004012616110567015306 00000000000000a712eee6ed4da3865c5a6e68e7999cecpktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img-members.html0000644000113200011300000002525412647637662024776 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pklas2img.pklas2img Member List

This is the complete list of members for qgis.pktools.pklas2img.pklas2img, including all inherited members.

ATTRIBUTE (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
ATTRIBUTE_OPTIONS (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
cliName (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2img
COMPOSITE (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
COMPOSITE_OPTIONS (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
defineCharacteristics (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2img
DX (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
DY (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
EXTRA (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
FILTER (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
FILTER_OPTIONS (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
group (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2img
INPUT (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
name (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2img
NODATA (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
OUTPUT (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
PERCENTILE (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
processAlgorithm (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2img
RTYPE (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
TYPE (defined in qgis.pktools.pklas2img.pklas2img)qgis.pktools.pklas2img.pklas2imgstatic
pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random__coll__graph.map0000644000113200011300000000014712616110567027175 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral__inherit__graph.png0000644000113200011300000001054112616110567030234 00000000000000‰PNG  IHDRÀ¶³ÝhbKGDÿÿÿ ½§“IDATxœíÝ{P”UðïË¥Dи© ÄÍV8N£Í›©i$™æL$`š hN:y2 œ3™&MP eÅ o¦øê˜äL)Sn7aörÞ?zx^–½°‚ìßgfgØç<ûœß9ðeÏÂaác „Æ®€cAa „Ga „Ga „'2têˆÅbÔÔÔº Ò,,,àëë [[[C—¢Â(ÃP__ÖÖVØÛÛºò”‰Åb¸ººRž„½½=üüü ]yÊΟ?oè4¢× „ð( „ð( „ð( „ðÌ> ¥¥¥à8Îèúøâ‹/Àq¶mÛÖçkõ¤§kr‡ÒÒÒ§Ú§)2û0hS^^'''½÷ËCff&F…¬¬¬~ïoÈ!ˆŽŽ`¸1›‚…Bû÷ïë½ß[·náöíÛHKKÃ7p÷îÝ~íÏÉÉIx2Ô˜MY„¡s——‡1cÆÀÅÅ«V­B{{»ÒyŒ1¬[·þþþhhhÀ”)SÆ ÎijjÂâÅ‹áääwww¬[·‰¤Ç¶®Ž;†_|¶¶¶ðòòBzzºR{ff&¦M›†Y³faìØ±ŸcHJJÂøñãaoo×_Ç–<šê霳gÏbÔ¨Q8pà€ðuc€Ó§OÃÇÇC‡EBB‚pœã8ìÛ·ãÆƒ³³3¶mÛ†ôôtxzzÂÁÁ›6mêùd*˜*..fÅÅÅ:Ÿ_RR°€€v÷î]VPPÀ|||X\\œÐ¦P(غu똿¿?khhPz\W¡¡¡læÌ™¬¬¬ŒÝ¼y“M˜0ÅÅÅimëz––fccÃ’’’Xmm-KKKc"‘ˆµ´´0ÆS(ÌÓÓ“%''3Æûì³Ï˜ŸŸŸÊXc,%%…¹¹¹±Ÿ~ú‰‰ÅbvæÌæãã#´÷TO`` ;wî»qã†ðucÀÞ~ûmÖÜÜÌrrraް °ææf–ššÊ°÷Þ{577³ääd¥su‘ŸŸÏêêêt>_²Í* 7oÞŽeee1¡-**Š`wîÜQy\§ŽŽfii©Ô÷Ñ£G™Ö¶®×illdVVVlÇŽìÁƒL¡P°G1¹\Îc¬  €‰D"á èúõë »uë–JM&L`‡RkFF S=óÑõššÂpþüyÆcr¹œ`%%%B[aa¡0?êîwž« cƒY,“:ùúú ;UUUÂý«W¯búôéˆ×øøºº:Èårx{{ Ç|||PUU¥µ­«¡C‡"??pwwÇ´iÓpñâEXXü;Õ™™™ÉdprrÇq˜4i¨]*•••a„ JÇÆßc­]ç@W#FŒ¡Î® °²²R{ß\˜UJJJ„ïÞ½+|‚×ñIIIÈÌÌD~~¾ÚÇ»ººÂÒÒååå±²²2¸¹¹im몭­ …‡Fcc#ÂÃÃ1wî\466B.—#++ ;wîÄ£G„Ûš5k••Öí/p=<<ðûï¿+»}ûvµvz’/Öþþñ³)0«0¬^½¥¥¥¸zõ*6lØ€°°0¡mРA3f bbb°|ùr¥¾---þýâ ƪU«PQQââblܸ¡¡¡ZÛºâ8ÈÉÉAss3:::`ee…gŸ}/^D}}=BCCagg'ÜBBBPRR‚7n(]kåÊ•ˆŠŠÂéÓ§qÿþ}œ;wqqqà8Nçz4é3éÂÐ 5uzûš!55•yxx0'''öñdz¶¶6•5r[[=z4‹eR©”½úê«ÌÎÎNholld .dŽŽŽløðáì“O>ammmZÛº÷‘••ż½½™µµ5;v,ËËËcŒ1ÉTêW(ÌÛÛ›EGG+]K.—³ÄÄDæííÍØìÙ³Y^^svv~¢zºÞW7ft[÷£ÛkMmêî÷Ę_3pŒß»ct. tÝÂ]ZZ ___•e†©;~ü8Fމ—^zI8–““ƒ-[¶ ¨¨È€•õÞùóç1~üx¸¸¸º”îèÝ1ŒÙÍ›7†ÂÂB´¶¶¢  ›6mBDD„¡K3KFûÇ=OÂÞÞ‘‘‘†.ã©‹ŠŠBkk+‚‚‚ ‹áåå…%K–˜åXY,“ˆé e!&€Â@Â@Â@Ïhš$‘Hĉ1ÆP_ßW×Á†.eÀ3Ê0ØÚÚB,ãÑ£G†.¥ßý÷¿ÿ`߾߰{÷›°³³6t9ýŽã8ØØØº µŒ2 ÞÞÞJ»1ÍYbâ×Jhh„·ßþ¡ËÐè5ƒÕÕ=ĵkƒã€£G¯ºœÂ`@G‚cÀõ룲²ÑÐ% h:|ø*ärÀÒÒ?þhš›ïÌ…Á@ÊÊêñ矵Â}™Lì쫬ˆP $7·VV]§Ÿ¡¤¤wîÜ3XM…Á@23¯@*U(‰,‘—GK%C¡0Ào¿U¢ºúÊq™LŽìì+f÷GJ¦‚Â`¹¹…‰,Õ¶ÕÔ4¡¨è=WD ƒÞÉå >| 2™\m»Hd‰ÜÜB=WE ƒÞýúk95¿3…L&GNÎ5áG®D( zöÃ×5.‘:=xЊ_~¡·ˆ×7 ƒž½{!faóæÍÉd*Çé5!< !< !< !<ƒ„¡ºº3fÌÐÛ5cغu+UÎíZLYoçÃæß a°³³Ã‚ ôÖßýû÷ñóÏ?ã»ï¾ÓÚmm-Þyç½ÕÕ_Œm¦2ÿ ƒƒƒ–-[¦·þÚÛÛ...ZûW(hnnÖ[]ýÅØÆa*óß§00ÆðÃ?`Ñ¢Exë­·°råJaÆŒ`ŒáÇÄâÅ‹1gάY³—/_ÆŒ3Tžù儇‡# !!!8}ú´Úþ:wéÒ%,\¸óæÍÃ7ß|©TªRמ={‡â£>¼ûî»J×é®ûyÀ¿¿wIJJ¼yó0oÞ<$%%A&“ ×(,,Dpp0nݺ¥u®4±§1iê_.—cÿþýFPPÐÒÒ¢vêj½|ù2–.]ŠÙ³gcþüùÈÈÈÐZ¿©Ï¿.ú†'Nàûï¿GDDÒÓÓñÁ !!pòäI¤§§cåÊ•ÈÈÈ@hh(vïÞ­r ‰D‚¸¸8!33 .ÄöíÛ!‘H4ö›››‹„„ÄÇÇã×_UúD2ÆœœŒÂÂBìܹøöÛoGÕ:uç9rµµµHNNÆW_}…ÂÂBìß¿_hÏÎÎFLL |}}5^W—1j“¦þ9‚ . !!‰‰‰¨¬¬ÄÁƒ5Ž£k­nnnøüóÏáë닃bÅŠHIIASS“Öùé©VÀ8ç_W} CNN–/_Ž©S§ÂÑÑ“'OFDD„RÛË/¿ Lš4 ~ø¡Ê5¤R)chkkƒµµ5fÏžcÇŽÁÆÆFc¿+V¬€»»;Ƈˆˆœ9sFhÛ»w/²²² {{û¾ pêÔ)¬^½...ðòòBdd$®\¹"´/[¶ 'N„­­­Ækè2FMcÒÔÿ‰'°dÉxyyÁÓÓÑÑÑðóóÓ:–ÎZííí‘––†U«VÁÑÑQX¾<~üX§91µùוÊvŒ'Q[[ ¥c^^^€ššxzz*µ©lŒ0xð`$&&âÈ‘#Ø¿?FLž…ÁÉÉ eeeðööŽýõ×_WWWTTTဿÿþ[åíííP(ˆ‹‹ƒL&ÃÙ³g±aÃäææbðàÁjû­ªª®[YY GGG¡->>b±áááxóÍ71qâľ HLL„›› ¥¥B»HÔójcOcÒÔLL îÝ»'|Ã)--EAAÂÂÂ4ÖÑYk{{;âââ‡W^yR©§NÒyNLmþuÕ§eR`` öìÙƒK—.¡±±W®\¶"!99×®]Css3ŠŠŠpàÀp§t Žã°~ýz\¸p?†T*…H$–'NœPyúÞµkª««ñçŸ"55o¼ñ†Ðfkk‹‘#G"$$;wîDGGÇ«­­MøxêÔ©HIIA]]ÊËË¥ôE¬‹žÆ¨mLšú@jj****PQQ¯¿þuuuÇÑ•T*…L&ƒH$BGG‡°ommU9׿_W}ŠUpp0är9vïÞ¦¦&aM·eËA.—#11>„ŸŸ–/_Ž/¿üRéÖÖÖøôÓO‘œœŒúúzŒ1±±±°¶¶ìرþþþJO³fÍÂÚµk!‘H0sæL„††*=U@HHΞ=‹ŒŒ ¥O–6Æ à /¼€ùóçãäÉ“€ððpìÚµ K—.Çqxíµ×‰††ç©§1j“¶þ-,, ‘H°~ýzH$L™2‘‘‘ÇÑ•V¬X-[¶à™gžAHHfΜ‰¨¨(ìÚµKé\s˜]qŒ1¦t€ãú´…»ººaaaˆ‡‹‹‹ÒêÂ… HOOGJJJŸ®ŸŸß«Ç#S“)ÕªÍæÍ›áììŒìì쮇÷Û/ÝÊË˱uëV””” ½½üñöíÛ‡9sæôW—„ôÉÓ{õÑÍû￉D‚7¢©© ÇG`` æÎÛëk4¨OïO=í¯ÑôÝÔ˜ÇÔ)ÕÚO}™Dˆ±Óû2‰SCaŒi›´1£0˜Coo( &ÂÐÛ› C˜Ã¶lò†^2·mÙ¤Ï`îÔmËž>}ºÚmÙÔÔT,Z´§NBbb"ž{î9¸¸¸ 22IIIhooÇÒ¥K…MpÑÑÑøçŸ´Ö±lÙ2xyyA&“!-- ...°±±yâmÙ„ÂÐkæ¶-›PzÍܶezÍÐk¦¼-›¨GÏ ½dÊÛ²‰z´7©˜ËVgsE{“é-“´Û²ÉÿQ´èí2gÈ!X³fÍS®†ô7Z&£0£0£0ÂSûúúõëÂÖaBÌMMM œUºÿ3\wwwƒÿ^ºÑ­¿ok×®íùÿ@WVVv?DÈ€@¯áQáQáQáQáý\Cç×öM/!IEND®B`‚pktools-2.6.6/doc/html/classSVC__Q__coll__graph.md50000644000113200011300000000004012616110566017031 00000000000000be01d771f362a07cb29951e4936c8c03pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkextract_1_1pkextract.html0000644000113200011300000002667712647637662023610 00000000000000 pktools: qgis.pktools.pkextract.pkextract Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkextract.pkextract Class Reference
Inheritance diagram for qgis.pktools.pkextract.pkextract:
Collaboration diagram for qgis.pktools.pkextract.pkextract:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string SAMPLE = "SAMPLE"
 
string ITERATE = "ITERATE"
 
string OUTPUT = "OUTPUT"
 
list RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
 
string RULE = "RULE"
 
string POLYGON = "POLYGON"
 
string BUFFER = "BUFFER"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string EXTRA = 'EXTRA'
 
string FORMAT = "FORMAT"
 

Detailed Description

Definition at line 87 of file pkextract.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/dir_e61db0d85028141ec5940fd7f2a6e0fc_dep.md50000644000113200011300000000004012616110567020362 00000000000000465f06766900a94290281b83d3781d79pktools-2.6.6/doc/html/pkfssvm.html0000644000113200011300000001772612647637662014253 00000000000000 pktools: pkfssvm
pktools  2.6.6
Processing Kernel for geospatial data
pkfssvm

feature selection for support vector machine classifier pksvm

SYNOPSIS

Usage: pkfssvm -t training -n number

Options:

Advanced options:

Description

Classification problems dealing with high dimensional input data can be challenging due to the Hughes phenomenon. Hyperspectral data, for instance, can have hundreds of spectral bands and require special attention when being classified. In particular when limited training data are available, the classification of such data can be problematic without reducing the dimension.

The SVM classifier has been shown to be more robust to this type of problem than others. Nevertheless, classification accuracy can often be improved with feature selection methods. The utility pkfssvm implements a number of feature selection techniques, among which a sequential floating forward search (SFFS).

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input test set (leave empty to perform a cross validation based on training only)
    t training std::string training vector file. A single vector file contains all training features (must be set as: B0, B1, B2,...) for all classes (class numbers identified by label option).
    n nf unsigned short 0 number of features to select (0 to select optimal number, see also ecost option)
    tln tln std::string training layer name(s)
    label label std::string label identifier for class label in training vector file.
    bal balance unsigned int 0 balance the input data to this number of samples for each class
    random random bool true in case of balance, randomize input data
    min min int 0 if number of training pixels is less then min, do not take this class into account
    b band unsigned short band index (starting from 0, either use band option or use start to end)
    sband startband unsigned short Start band sequence number
    eband endband unsigned short End band sequence number
    offset offset double 0 offset value for each spectral band input features: refl[band]=(DN[band]-offset[band])/scale[band]
    scale scale double 0 scale value for each spectral band input features: refl=(DN[band]-offset[band])/scaleband
    svmt svmtype std::string C_SVC type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR)
    kt kerneltype std::string radial type of kernel function (linear,polynomial,radial,sigmoid)
    kd kd unsigned short 3 degree in kernel function
    g gamma float 1 gamma in kernel function
    c0 coef0 float 0 coef0 in kernel function
    cc ccost float 1000 the parameter C of C-SVC, epsilon-SVR, and nu-SVR
    nu nu float 0.5 the parameter nu of nu-SVC, one-class SVM, and nu-SVR
    eloss eloss float 0.1 the epsilon in loss function of epsilon-SVR
    cache cache int 100 cache memory size in MB
    etol etol float 0.001 the tolerance of termination criterion
    shrink shrink bool false whether to use the shrinking heuristics
    pe probest bool true whether to train a SVC or SVR model for probability estimates
    sm sm std::string sffs feature selection method (sffs=sequential floating forward search,sfs=sequential forward search, sbs, sequential backward search ,bfs=brute force search)
    ecost ecost float 0.001 epsilon for stopping criterion in cost function to determine optimal number of features
    cv cv unsigned short 2 n-fold cross validation mode
    c class std::string list of class names.
    r reclass short list of class values (use same order as in classname opt.
    Usage: pkfssvm -t training -n number
pktools-2.6.6/doc/html/ProcessingPktoolsPlugin_8py_source.html0000644000113200011300000002634712647637661021607 00000000000000 pktools: /home/kempenep/pktools/qgis/ProcessingPktoolsPlugin.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
ProcessingPktoolsPlugin.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  ProcessingPktoolsPlugin.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os, sys
27 import inspect
28 
29 from qgis.core import *
30 
31 from processing.core.Processing import Processing
32 from pktools.pktoolsAlgorithmProvider import pktoolsAlgorithmProvider
33 
34 cmd_folder = os.path.split(inspect.getfile(inspect.currentframe()))[0]
35 
36 if cmd_folder not in sys.path:
37  sys.path.insert(0, cmd_folder)
38 
39 
41  def __init__(self):
42  self.provider = pktoolsAlgorithmProvider()
43 
44  def initGui(self):
45  Processing.addProvider(self.provider)
46 
47  def unload(self):
48  Processing.removeProvider(self.provider)
pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spectral_1_1pkfilter__spectral-members.html0000644000113200011300000002317712647637662026672 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkfilter_spectral.pkfilter_spectral Member List

This is the complete list of members for qgis.pkfilter_spectral.pkfilter_spectral, including all inherited members.

cliName (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectral
defineCharacteristics (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectral
DZ (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
EXTRA (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
group (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectral
INPUT (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
METHOD (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
METHOD_OPTIONS (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
name (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectral
NODATA (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
OUTPUT (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
PADDING (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
PADDING_OPTIONS (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
processAlgorithm (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectral
RTYPE (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
TYPE (defined in qgis.pkfilter_spectral.pkfilter_spectral)qgis.pkfilter_spectral.pkfilter_spectralstatic
pktools-2.6.6/doc/html/classMainWindow__inherit__graph.png0000644000113200011300000001354512616110567020662 00000000000000‰PNG  IHDRup¯«¨XbKGDÿÿÿ ½§“IDATxœíyXIúÇ«sqE9…„CQîK.p%2º¨3Ž:®ã¸Ìóˆ¢3®Î®Çº^;êú¬®ó¬ÂŽã.* Š8ƒ#£#: *QˆÜ¢\‚‰@ I§û÷G;1æè\g×_>ðЕ·ªÞ|SývUuu5„¢(°`6H¿¶ï8}Í‹E_óbÑ×¼P”FGG[[[ùµ¼ypww7nœâð }‡††úûû•?¶`CCC}}}ZõÅ y‹.½S<|øP%ÅÍ‹E_óbÑ×¼Xô5/Fê+‹333ÃÃÃétú{ï½·ÿ~†± òóóS™Ö˜;w.AmmmKkkkƒ H[]6lˆ‰‰Q€Ç㩤³Ùl'''LÓÇ3ŒššE­­íË—/­­­CCC4í³Ï>ãr¹¹¹¹€¾¾>åÖXºt)ŸÏ?qâ ¿¿EÑ´´´… ¢(š™™¹víZ™LæààÀf³GGGi4Úõë×Ñ7›¤z!‡vuu½téRwwwqq±»»;f¼råÊÄÄÄöööúúúÐÐÐ]»víÙ³gþüù(Š;6** EQ‡cmm-‹ m¿FêûòåK•ôŠŠ 컵¶¶nذaëÖ­(ŠæææÎž=[‘.‘H=z$‰ärù­[·°Di0¤R)ø%¤äç绺º"UPP€¢è’%KvïÞÍf³Éd²P(T×W¥ÿœœ…·§NH¥R2™¬PäÒ¥K¾¾¾‡N§K¥Ò/¿ürÛ¶mT*•Ïç:thÞ¼yøÊhÔ×àøàààÀ`0jkkUÒkkk‡ÉÉɘ*ÁF£µ´´$%%EGGçääh¬k\T*U‘2sæÌ¾¾¾ªªªºº:‹˜3gNII ›Íž2e N×YHWWWDD„âÓÉ“'^¼x!—Ë}||°D___.—iggWUUU^^¾`Á‚ÈÈÈòòòÒÒÒùóçë-ÒkŒ‰¿+W®Ü»w¯¢·°bÅŠ¼¼¼¬X±Ba' ïܹSRR²páBEúÈÈȲeË222ª««?®Ù'’ªW # `ß¾}áááÎÎ΀ٳgß»wïúõëXðÕYˆ···r—›(pss#“ÉOž<ÁÛÛÛ=<sæÌåË—+·²²2À±cÇT¾óáÇœœ¼¼¼Ž?¾bÅ WWW}ôÍËËüôÓO 6lØ@"‘vˆ_ Çòõõµ³³›6mÚ½{÷0ãU«V9;;3™ÌÍ›7ŒŒ (*(ʾ}ûP‹Å4MùwÅA]_Uhõõõ555%$$qH¥ÒêêêØØX#ò¾3`aGy‚—°ùlETiï –ùóbÑ×¼Xô5/}Í‹E_óbÑ×¼h¸?ßÝÝýöýx7µ¶¶VNyC_+++‚ZZZ©¬¸¸]*…- ÐiyîÜCǘw|3A°hQ€‡Ç|K@ròdíš5cÇZá[>~Ü_Zútõêɶ¶šš888¼q¬Ï°ÏP`X¾eË&sÓ§ŸžÐi\TTÃdnJO?¯Ó’Ínc27mÛV¨ÓòÖ­ÇLæ¦Ï>;©ÓòâÅ*&sS|üþÞ^Nc# >þJ$ðš59¹¹lÁÁ:š$'ÌÌ<xùR¨³äï¾{€ý…a+äÄ®^m,*ªÁ· dž?ÿ~EE›LúûEø…—•=–ÈdÒ¥Kðùüa E¥RùÆgQíÏ@ÐhG #££²å˳._ÖÑä ‚0}ŸðÁ‘Þ^LöjÞL&ùø¸j³çrù;v|§øâ|þ0~ù……Èd†‘«WëGF¤8Æ"LS™L~ï^{^Þ}ãÐPO  ‚ HZÚ™ìì2|gô‡}oÝj^°àèàà¨rd?Þ‰J%k´GQtãÆ\†x%°H4Š Z[™X,ùé§Fì´H$pIIŽ?ýýb…'¶o/ìì|©Í8(ˆI¡~1FQݳçòŽßá´zý!@ߢ¢šO>ùF"åò×âBê©-Ë©S••2Ùk{A‡†F´Ù+‹ ‘ ÂBŽK<Þ’:(‚ _~™§M/†²'X–œœÛ7žSœ‹Fcª¾YY¥ëןADÅ{*•Œ]šÕéèàíÚõ½zkk«¥°£¼œ †‘ÒÒÇ8¿÷F4—ÉÊÊŽœœ»™êÒ#úý÷Õ+Vd‹DmµèƒIúþýï×öîýE5´ ™Lîï咽E.GÖ¯ÏÕøÂÀ€æKÜÀ€¸¼¼Eùä (úãõÚSæ‚îÞ]ÔÑÁS7öövÁ"»º«÷î=Y¾üøà ŽkÆë+•Âß|S®v«÷(Šjl¿'OÞnhèÒØÕÖ~¯\©SODQ´ @kˆÐ¨‚ ë×çªüN*•-77¿ ¯úîAd2âA€L&‘H¤ ‡-[æþõ¯‹ƒíìh*•¬Üj4¶ß~¨ÕÖM‚aya¡†Æ›å@VVT 2Šˆ˜°qãìóç׫¯ü ``à …ìädççÇ óˆ÷×ñÍõ€˜I£›7M™2ñҥϯ]kص«èÙ³~#c77û””ø””xF¾ý¶|Ïž¢èè µµ]r9"“Áãïð°”É«8‰$ÖÖTEwUãi¬( ¼½e2ùĉã¾ý6eìXk Ö( ¬­©_|ñþÚµ gϲ¾È¢"ã!d–hêÔÝG޼Zù!“É 9:§£Nº¸ EQ±XrófÓÞ½—¯_oÄÏ‚¢(“¹©¨¨ߦ§G°ukÁùó•==EÓÓÏ''ÇÏ‚ H~þý¾¾!ìðñã&sSCW§?:! ýöô¸\þÔ©“°C …´xq´Î\ÝÝ|€­-mÖ¬ Y³‚L÷ƒÁ°ÿê«×+ ÝÝØlÍÏ%(€ hùò÷‡þþn¶UU¡¡&:C@üml|APx¸—A¹º»ØÄйqwwèéÑÐÍÀû:õõ]¦×N€¾OŸöG§ÓuÜ)P¡·wˆÁ°7½v0ö##Ò¡¡Qƒr2››{M¯}Ÿ=ë÷òÒÜ?ÇA(3Fë‡@°Z„B­ƒiøø¸¶µ½0½vbÚïøñN†æ‰$†6yãøE_ÃÚ¯——“H$1edŒALû0Au¨¦‘h”NíûÅbæiÜÜÆz{‡L¬}ù|ñ¸qVèãóÖÚ¯1í×ÑÑUÔ!@_¹U_ѯ©¦ÑˆÝàceEÁª3(öärS§Ø ÑQ™Ñô­l †ÕbèÓ°Ø$ Î-=!@_A5NÙàAÐÛÙy ÓÈP}±£>™i(è‹¢¨í‚hú€µ_C=ÄâƒégúZYQFG ‹n‰ôvâƒqíW,ØØPuZâC€¾NNôþ~Ý«oT°³£Úg2¬lFT°U)îà Ð×ÙÙ®¯Ï`}íímMíýèV‹½½­A¹ž?P($¬l èëí=®£CëêmØÛÛàÜ&¬{{ƒruw ÆkÄu[ô8ÑåéScôL}êV‹¡úöô˜L¦ŸÐ78ØËåóùZW/hÄÁÁö­éK£Qll ‹¿uûúj]Ü¥?èî…¢h}=× \žžN]]¦×®“®®OOÃ.Sr9R[û,2r‚éµr}£{z:r8åòôt|kúzy6½×ÜÜ+I¢¢þ;ô̘PV¦cM® ^^NBá¨é€:ár Ö·¬ì±‹ Ýô›C€(}ããýëë» ËÓÓ Àåò q.—Õ¥?åå-¿ù/!x£obb0™LÂY¦¶zµ¥…€{8 K¹\¾;Âòx»w[çÏ'Äbô¥Ó­5.ÓF dr‡ÆF®\Ž„‡×?Ë?ÖÓh”ÄDã×D)CØúõää©·n5?{Ö¯–É“½ ëuJcãs'';ƒúçÎÝ›?²­­aý9m¦ïìÙ! †ýéÓúg óll|nÖYž†.Î2ouª«Ÿ64pW¯Ž#ÊÂô¥PH))q¹¹úzÃÂ<‡†FŒ[ëOmí³°0ô=vìfdäøèhzfD>?”’O£Qô8dòdOÛÒÒGú Lw· ¹¹wæL}—éÕÖ>»zµ!#c.>©¯­--55áäÉò/ôºíJ&“ââüÊˉyWòòfšbá–Nü1*jBBB nS½!øùµkƳsçwzÚϘÀf·™þ‰FÊÊšcc'a÷7uRTTsûvËþýKu›ÁúR©ä;>¼r¥®´ô±>öññþ"‘äþý'ĺÉä·o·ÄÅé‡wï.Z²dŠAÁZˆþ8))lñâèÍ›Ïé3£6a‚st´÷… •„»QRòphhdÑ¢(}Œ·n-$‘ ½{î†Yöר½{! #ã‚>}¯åËß+.®7tý‡N ªâãýõYBXXÈ)*ªùê«%8 °Æ,ú:9Ùeg¯.)yøÏÞÔiüÑG‘€âbÆ~:éïýüó£e˦ê´ljêÎȸ°n]œ9¡:ðœµ×¦”lcL¥jxN“¥?™¬×.+«ñ$’î;iD±µ ÝW6¢3Mýaýñöö6rýzgggppprr²Ñuÿï0ǸlMMM8:~aWWWã¶£´€aÙ?ʼXô5/}Í‹E_óB€¾,ë“O>QJlÙ²…Åb=þ\c–çÏŸcÛÔkäÿøGZZšâ0//Åb)v½ëëëc±X555ø…T£ù ¦ýööö*^ …ʛɫC§Ó•7ÃW!""¢­­M"yµúïÁƒq8¯v#hjj¢P(ÁÁÁø…ü—@Œ¾ÑÑÑØnëÊ/CPÇÞÞ>55UÛ§ááá0 cÛJ$’úúú¤¤$e}ƒ‚‚¬¬¬ð ù/}ÊÊÊ!âÖ­[ʯM`³ÙkÖ¬IJJZ²dɹsçÀ›g+‹ÅºqãÆêÕ«,XŸŸpttœ0a¶—ycc£««ë|P]]½âáÇááá: A$??ÕªUóæÍûüóÏ=z5‹/‰8ðÑG%''geeI¥Ò 6`c¡P8kÖ¬¬¬,,û‡~ˆmƒo Äè:22‚…±X\]]=}útì£ááá;wúùùåææ¦¥¥8qB PÝðíÎ;ÇŽ[»ví¿þõ/¡PˆˆˆÀôåp8QQQ577Ëd²––L_üB ÏŸ?ŸššzæÌ™U«VeggcfGåñxÙÙÙ¬ªªÊËË‹‰‰©®®444ØØØÔÔÔÚÚÚ¤Ridd¤‰Ê£/‰Dš1c"ØlvXXØØ±¯æh4ÚÉ“'7nÜèìììêê ‹Uç-.\H§ÓûÛ߆††áááØ‹ °±Ñ°ØT¥çëë«ø{¡ŸÏG{uÀÃÃÇãùùùY[[777×××OŸ>Ý××·¾¾¾¦¦fÚ´i¦Iú†…… 744p8œ¸¸×÷·%É®]»>þøão¾ùfÓ¦Móª¯DÂ^@ræÌìTˆŽŽnjjâp8ƒƒz! C¹KÓÙÙ ptt$‘H===Xbww·‹‹ A±±±wîÜéêêòóóÃN”úúzB^7A˜¾Xˆ8|øpPPò¸2™ †a …"•JÿóŸÿ†‡õZ¦QQQýj+ &“Éd2+++ñ{& ,X••u÷îÝÊÊÊÿûß …Âb±¾þúëžžžŽŽŽ“'O¾ÿþû€˜˜˜¢¢¢àà` …uíÚ577777½&Wñ!rüÆb±ž>}ªòÂ%:ž––¶oß¾O?ý”Á`$&&b¯Ò ¦£B_À”)S  Õk"|áÂ…üqVVÖÊ•+OŸ>ýç?ÿKÿÃþàââ²nݺŒŒŒ©S§®\¹+Y*•bgFhh¨L&#ê])ªýβeËx<Þ_þòBjz')++Û½{7ކ–ùóbÑ×¼Xô5/}Í‹E_óbÑ×¼Xô5/:îÏ×ÕÕa/°¶ ìmÐ8àéûÿce‰©(¿}X¼ñ›Ó±Ä_óbÑ×¼Xô5/}ÍËÿÔÁí—ýÓL€IEND®B`‚pktools-2.6.6/doc/html/classLastReturnFilter__inherit__graph.png0000644000113200011300000000521612616110567022053 00000000000000‰PNG  IHDR}p¼|è¬bKGDÿÿÿ ½§“ CIDATxœíkLÙÇOi™b…J+¬ŠJAIŒÆGâ#Ñ>«Q#`D]ßUã V‚‰1jP¾(– j´䵺%ë‹ 6qázu/²øˆµŠPÚék:s?ÌÍܱ-Ð)-Ǻç÷œžÎ9ç?¿¡‡é0EQ1ìÀðy‡òäNKwuu}üøÑGQü‘Hëþòܼwvvâ8>jÔ(Ž©~p,‹V«õ¡wÀ¨Q£¦M›ÆµÕMggçË—/95Aó;w8 ïp@Þáà}ïmmm<ÏeÁåb^犸Ùm[[›·B²á¼?ã>¡¡¡Gõ]ÿ444Lž<™]#´··Ï;÷óçÏÖª?|è=<<üÔ©S¾ë߉DáPé€$É/_¾ [¤ðáüîðé¾qã†L&“H$ééé8޳—¬®®ž5k–H$ŠŒŒdLUUU͘1#(((::úúõëÎ}:{8/0þ|³yl6›R©;v¬T*U*•6›nòàÁƒ¨¨¨úúú!­ÿÀP\hiiiiix™×¯_ÓÝ:–,YÒÚÚªÑhbbb233™wõz=†a»wïþðáƒZ­tvv ¡P¨R©t:]qq±@ 0 EõôôѱˀgÏžõ±°Ùlý%a¢ž>}:99ùýû÷ÍÍͳgÏfR­ZµêáǃðúõëAµtttÔÖÖr29|Þ›››énݺ5yòdæ]‹ÅòêÕ+ƒÁ`·Û=zD¯jwww```^^Þׯ_I’ìëë³Ûí­†UUUƒz‹‹ÓéttùÞ½{3gÎtˆê;ï÷ɾ ×–©Ç0¬µµU.—Ï™3çêÕ«teXXXmm­F£?~üâÅ‹?~0HTAkÖ¬4ÒÛ·o###éŸåË—¿yó†IèÁ rbø¼Ó¿J€ÖÖÖ‰'2õ&“iãÆJ¥²©©©  €©$I²¬¬¬»»[¡P¬]»¶»»Ûë‘ÂÃÙ­õõëWFC×z},†Ï{FFF[[ÛÓ§O³³³wîÜÉÔ[,«ÕŠa˜ÉdÊÉÉôõõñx¼+VTTTèõz«Õ(‰½½½—.]¢²Ëœ 'n@RRRVVÖ»wïš››årù… †¸Žà4+ e~/))™4i’T*ÍÈȰX,ì©öܹsb±x„ ›7o–J¥EݺuK&“awç·ÎÊÀÕDìœÄf³-\¸088˜^@¯×ïÚµ+,,l̘1©©©F£Ñá€Ënñ`~çQ\Î'xñâv€>ï~t|È;w8 ïp@ÞြÃy‡çãïf³ºäóØ}¸y êêêêëëã:Œ×!Iª  11qê¸q!°³@PP§å¹y—Éd2™ŒS¡ÑüÝÐðëÔ©Ñ?ÿ;‹'øëüþË/ôO‚ agñ¿ônµ••ÿôöâuuÿÇüÒûü…ãŸPYÙ;Ž'ø¥÷ŠŠF>?@dMM³Éd…ˆ3þçÝh´üþ{ AØé— qï·sq¿üÏ;[: €WQñ'Ä<žáÞ+*þdŸCdmí_z½ b$ð3ïÝÝÆººV»ý›}GŠ¢~û­V$Ïð3ïÕÕÿv®¤(ª¬ÌϦ?ó^^þÔùÂ$Ii4wtôB‰äþäýãÇžÆÆw$éâñ|~@U•‹Âw‹?y¯ªzÖßÉa¯¨ð§/P><Ûëà¸52òÿ—p –  @à¿:Þ»ˆa8àvþÌwÅO?R©v¬[7vOð§yæGy‡òäÈ;w8 ïp@ÞြÃy‡òäÈ;w8 ïp@ÞြÃy‡òäÈ;w8 ïp@ÞြÃy‡òäÈ;w8 ïp@ÞြC‚}óÔúúz Ã`'r¡0* @;…»(•J¶êo®oÒjµV«•¾92‹”••½}û–]ãâº2N÷¹E¸ý<6h~‡òäÈ;<¹^;!!A­V7nèÃ'$$0e Ãbcc<3ôžÝ”A­Voݺµ¶¶V«ÕÒŸfîëäu:ݾ}ûîܹÃÔœ?>22€ã¸Z­>~üøµk×ú{ –ssÏ`eàóù›7oöÅX.nï$IêõzvMhh¨X,ˆÅâ}ûö%&&ööö†††ºÙÜ3˜AÙ¤¦¦úb,—xm~òäÉÞ½{åryrròÍ›7éʆ†…B±bÅŠ-[¶Ü½{°ÿ~@RR’ËNø|¾@ 9r$ý’ •J•˜˜˜˜˜¨R©‚`7×jµÌŒÁ”éBSSSJJÊóçÏîß¿¿cÇŽuëÖ•”” ŸÝCTç0cqÒåï8Ž;v,66V­V§§§õôô˜ÍæÜÜÜõë×—””lÛ¶íÌ™3f³™~BSee%ÓÖl6›L&“ÉôåË—âââåË—3O*//×ét………gÏžmjjºråŠss—”––fffÒOꪯ¯¿páBZZZaa!sgcfP»Ýî܉ÃXÎaœÇrïÌ3†K¥R¡P(•JF£‘ÏçSe2™0 “ËåñññB¡Ð¹íž={˜òˆ#.^¼È¼¬©©ÉÏÏ‹ÅR©4--M¥R­^½Ú<©©©ÑÑÑtyýúõÁÁÁ+W®ÌËËÓëõ!!!ƒNž<5pŸý…aå>Þñ.>|ø——g2™˜-’ŸŸ_^^~åÊ•)S¦lÙ²eÞ¼yÎm™]#‹Årùòå3gÎ0ϯúôéSrr2³$3ÿ8ãp7¶Äððp:¡ËA´ZíÀëØ_˜A7˜K¼ãÝb±äæææææ.X°Àf³ÕÔÔЕ$IæææñàÁƒìììÛ·oЉP(”ËåÕÕÕEÑû3£GÎÏϧ —гÛí|>ßáQ¶lËÞzªqa¶¨›x8¿÷ôôt³°ÙlA«ÕJO|8Žóx<¥RYWWg4m6›@ `æ“ÉõíGމã8óî¢E‹ŠŠŠ:::ÚÛÛ9Âl6zàà`ÀÝ»wqtÆ÷˜AÃx†‡Þ8Ì"888==ýĉÛ·oˆˆXºté‘#G0 ËÊÊ*,,ܰaCYYYNN†aÓ§Og`ÙH$‘HÄì½) ‘H´wïÞC‡Éd²´´4vóÑ£G+Š‚‚z?ʳ‡¨Îa†Òù7÷¹*--MIIñõWµ Ç—H$¥¥¥L :>äÈ;w8 ïp@ÞြÃÁÅwÜÇŽ›öööeË–±k¾ñ>oÞ¼M›6¹<(Š ÑÑÑ7nd×øñ}™ý4¿Ãy‡òäÿ3v©Â9»ÅIEND®B`‚pktools-2.6.6/doc/html/dir_b66e135988e27fdc966ddddb8708f514_dep.md50000644000113200011300000000004012616110567020345 00000000000000928b491e528b51b218b678ed430a2838pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pklas2img_1_1pklas2img__inherit__graph.md50000644000113200011300000000004012616110566026233 00000000000000370d3db2308817b35abccf3147f6e330pktools-2.6.6/doc/html/nav_g.png0000644000113200011300000000013712647637661013457 00000000000000‰PNG  IHDRô1&IDATxíÝ1 ÁOHf„á_ ->~¸åM iËMèÀƒS½ü‚<IEND®B`‚pktools-2.6.6/doc/html/classDecrease__PosValue.html0000644000113200011300000001005612647637662017265 00000000000000 pktools: Decrease_PosValue Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Decrease_PosValue Class Reference

Public Member Functions

int operator() (const PosValue &pv1, const PosValue &pv2) const
 

Detailed Description

Definition at line 34 of file PosValue.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classCache-members.html0000644000113200011300000000757112647637662016240 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Cache Member List

This is the complete list of members for Cache, including all inherited members.

Cache(int l, long int size) (defined in Cache)Cache
get_data(const int index, Qfloat **data, int len) (defined in Cache)Cache
swap_index(int i, int j) (defined in Cache)Cache
~Cache() (defined in Cache)Cache
pktools-2.6.6/doc/html/classUi__MainWindow.html0000644000113200011300000021761312647637662016455 00000000000000 pktools: Ui_MainWindow Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for Ui_MainWindow:

Public Member Functions

void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 
void setupUi (QMainWindow *MainWindow)
 
void retranslateUi (QMainWindow *MainWindow)
 

Public Attributes

QAction * actionInput_image
 
QAction * actionOutput_image
 
QAction * actionQuit
 
QAction * actionSelection_Info_file
 
QAction * actionExtent
 
QWidget * centralWidget
 
QVBoxLayout * verticalLayout
 
QTabWidget * tabWidget
 
QWidget * tab
 
QVBoxLayout * verticalLayout_2
 
QGridLayout * gridLayout_2
 
QSpacerItem * horizontalSpacer_3
 
QListWidget * listWidget_input
 
QLabel * label
 
QToolButton * toolButton_input
 
QLineEdit * lry
 
QLineEdit * uly
 
QLabel * label_2
 
QSpacerItem * horizontalSpacer_2
 
QLineEdit * lrx
 
QLineEdit * ulx
 
QLabel * label_4
 
QLineEdit * extent
 
QToolButton * toolButton_extent
 
QWidget * tab_2
 
QGridLayout * gridLayout_4
 
QSpacerItem * verticalSpacer_3
 
QComboBox * resample
 
QLabel * label_18
 
QLabel * label_17
 
QComboBox * crule
 
QLabel * label_19
 
QLineEdit * cband
 
QGroupBox * groupBox
 
QGridLayout * gridLayout_3
 
QLabel * label_21
 
QLineEdit * srcnodata
 
QLabel * label_23
 
QLabel * label_22
 
QLineEdit * min
 
QLineEdit * max
 
QLabel * label_20
 
QLineEdit * bndnodata
 
QSpacerItem * horizontalSpacer_4
 
QSpacerItem * horizontalSpacer_5
 
QWidget * tab_3
 
QVBoxLayout * verticalLayout_3
 
QGridLayout * gridLayout
 
QSpacerItem * horizontalSpacer_6
 
QLabel * label_7
 
QLabel * label_14
 
QLineEdit * file
 
QLabel * label_10
 
QComboBox * oformat
 
QComboBox * interleaved
 
QLabel * label_9
 
QLineEdit * dx
 
QLabel * label_8
 
QLabel * label_13
 
QToolButton * toolButton_ct
 
QComboBox * compressed
 
QLabel * label_12
 
QLineEdit * ct
 
QLineEdit * output
 
QToolButton * toolButton_output
 
QLabel * label_6
 
QLineEdit * a_srs
 
QLabel * label_15
 
QLineEdit * dy
 
QLabel * label_5
 
QCheckBox * tiled
 
QComboBox * otype
 
QLabel * label_11
 
QLineEdit * dstnodata
 
QToolButton * toolButton_file
 
QLabel * label_3
 
QWidget * tab_4
 
QVBoxLayout * verticalLayout_5
 
QVBoxLayout * verticalLayout_4
 
QLabel * label_24
 
QLineEdit * commandLineEdit
 
QLabel * label_25
 
QPlainTextEdit * consoleEdit
 
QSpacerItem * verticalSpacer_2
 
QHBoxLayout * horizontalLayout_2
 
QToolButton * toolButton_Run
 
QSpacerItem * horizontalSpacer
 
QToolButton * toolButton_defaults
 
QMenuBar * menuBar
 
QMenu * menuFile
 
QToolBar * mainToolBar
 
QStatusBar * statusBar
 
QAction * actionInput
 
QAction * actionOutput
 
QListWidget * listWidget_band
 
QLabel * label_16
 
QToolButton * toolButton
 
QSpacerItem * horizontalSpacer_9
 
QSpacerItem * verticalSpacer
 
QSpacerItem * horizontalSpacer_8
 
QRadioButton * autoscale
 
QLineEdit * offset
 
QRadioButton * manual
 
QRadioButton * noscale
 
QLineEdit * scale
 
QLineEdit * as_from
 
QLineEdit * as_to
 
QSpacerItem * horizontalSpacer_11
 
QSpacerItem * horizontalSpacer_10
 
QLineEdit * nodata
 
QSpacerItem * horizontalSpacer_7
 
QButtonGroup * buttonGroup
 
QAction * actionReference
 
QAction * actionMask
 
QAction * actionColor_table
 
QWidget * layoutWidget
 
QLineEdit * lclass
 
QLineEdit * input
 
QCheckBox * confusion
 
QLineEdit * mask
 
QToolButton * toolButton_mask
 
QLineEdit * msknodata
 
QSpacerItem * horizontalSpacer_15
 
QLineEdit * nclass
 
QLineEdit * lref
 
QLabel * label_reference
 
QLineEdit * reference
 
QToolButton * toolButton_reference
 
QComboBox * f
 
QWidget * widget
 
QToolButton * commandLinkButtonPrepareTable
 
QTableView * tableView_labels
 
QVBoxLayout * verticalLayout_6
 
QHBoxLayout * horizontalLayout
 
QPushButton * pushButton_run
 
QPushButton * pushButton_restore
 
QAction * actionSample
 
QGridLayout * gridLayout_5
 
QHBoxLayout * horizontalLayout_3
 
QHBoxLayout * horizontalLayout_4
 
QLineEdit * sample
 
QToolButton * toolButton_sample
 
QCheckBox * polygon
 
QHBoxLayout * horizontalLayout_5
 
QLineEdit * bname
 
QComboBox * rule
 
QToolButton * toolButton_createTable
 
QLineEdit * threshold
 
QLineEdit * cname
 
QHBoxLayout * horizontalLayout_6
 
QAction * actionTraining
 
QToolButton * toolButton_training
 
QLineEdit * training
 
QLineEdit * label
 
QLineEdit * tln
 
QCommandLinkButton * commandLinkButtonPrepareTable
 
QLineEdit * cv
 
QLineEdit * ccost
 
QComboBox * svmtype
 
QLineEdit * gamma
 
QLineEdit * coef0
 
QLineEdit * nu
 
QLineEdit * kd
 
QComboBox * kerneltype
 

Detailed Description

Definition at line 39 of file ui_mainwindow.h.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Debug/ui_mainwindow.h
pktools-2.6.6/doc/html/inherit_graph_27.png0000644000113200011300000000304412647437044015511 00000000000000‰PNG  IHDRc%V:WäbKGDÿÿÿ ½§“ÙIDAThí›[h[†ÿœ9-¯ØÜš¶5Ú–¥^Z …Š·G!J©Š Z“—ª­•Á7‹ŠèK@šHŠ("Ø|ð† !*™6Z(‚UÛÒNMÒ$]çᜎÆÎœÓHZÇÓù``öZÙk­Ù²÷ž QAAøþøÕ(|CCF(bÈE ñ§˜ñÖ­[¸råÊT×2-˜1c.]º“É4Î'*†×ëÅÛ·oQYY9éÅM7|>ÇÄÅ€ÊÊJx½ÞI-l:¢R©$}Êš!#1d„"†ŒPÄYcxx.— +V¬Àœ9s°fÍœ?Édò§â©T*Éëÿˆän*S†††P^^½^ææf,^¼,ËâôéÓxðàÚÛÛÁ0ŒdÿH$‚òòr|þü9Íþøñc,Z´([eJæ‘YÃívC«Õ"ƒ¾lÙ2lÞ¼V«7nÜÀþýû%ûŽŽâË—/ãìZ­ƒ![eJæ‘Y›¦<Æ}ûgÍš—ËǃÎÎN¨T*ܾ}ÅÅÅÐét¨««C<ÇÚµk £¿{÷.ÊÊÊ V«‘ŸŸ¦¦&@2™Dcc#L&´Z-öìÙƒÍ300€½{÷B£Ñ °°N§±XL¨7Àd2aåʕطoŸÐçy¨Õj¼|ùòçíGH›ÍF6›MÌ%J? OŸ>‰ú=zDz½ž8Ž#´iÓ& ‡ÃôôéS2›ÍtæÌÁ÷=( ÒÐÐPÚ•H$hpprss©¶¶–zzzÈãñêíí¥ .Åb¡P(D¯^½¢ŠŠ r:DD¢yìv;UWWSWW…B!²Z­i5mݺ•:::èÞ½{”——G‰D‚ˆˆ<Y,ðX ÖÖV1—wJÄxòä i4ááB¡àkmm%³Ù,)†ØuçΊÇãôæÍâyžR©=|øÇqT\\L~¿_ˆóúõk¡ýcž‘‘b†X–l~¿?­¦±z“É$  DD´mÛ6jjjšð8=“”YY3æÏŸƒÁ€`0ˆ7ŽóƒA¬ZµJh/]ºT¸/))AOOdlŽã`6›E}ápÏó(++ìÝÝÝi9JKKQZZ*ããÇH¥RX²d‰`3›Íi5•””†ÁöíÛá÷û±|ùr´··gõ@5kk†Ýn‡ÛíF*•J³£¹¹[¶llÇ ÷ápF£1ã|Ñh;vì€Ëå‹/ÐÒÒ"øŒF#Þ¿/´ƒÁ Î;'G¯×ƒaD"ÁÖÕÕ…‚‚¡““#ÜÛl6´µµÁëõ¢ªª ………×.EÖÄhhh@oo/ª««qÿþ}p‡¶¶6TTT   ‡>{ìØ1tvvâùó稯¯ÇîÝ»ÏóÊÇ122‚ÜÜ\D£Q466ø{‹íp8pòäI°, –eqäÈtww§õË“““ƒ;w¢®®ïÞ½˲8uêìv»hÞuëÖ!™LÂívÃápd4Fÿ‰Øä•éš1ÏótâÄ ²Z­¤V«Éb±ÐÙ³géëׯDôm¾¾ví-\¸4 =z”¢Ñ(% ªªª¢Ù³g§Í¯ÇIæ»xñ"-X°€ŠŠŠ¨¥¥…jjjH§ÓQ,#§ÓIF£‘æÍ›G555ÔßßOD$𧝝åååQ~~>?~œ¢Ñ¨è:FDtèÐ!š9s& f pktools: Increase_IndexValue Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Increase_IndexValue Class Reference

Public Member Functions

int operator() (const IndexValue &pv1, const IndexValue &pv2) const
 

Detailed Description

Definition at line 39 of file IndexValue.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classImgRasterGdal__coll__graph.md50000644000113200011300000000004012647437043020452 000000000000005b5c3a71fa87a01e9c39c0db77fd07fdpktools-2.6.6/doc/html/md_examples_pkdsm2shadow.html0000644000113200011300000000552512647637662017540 00000000000000 pktools: examples_pkdsm2shadow
pktools  2.6.6
Processing Kernel for geospatial data
examples_pkdsm2shadow

Examples of pkdsm2shadow

Create a shadow mask for the input raster dataset dsm.tif, using Sun zenith angle of 10 degrees and a Sun azimuth angle of 135 degrees (South-South-East). All shadow pixels are set to a value of 1.

pkdsm2shadow -i dsm.tif -sza 10 -saa 170 -f 1 -o shadow.tif
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilter__spatial_1_1pkfilter__spatial.html0000644000113200011300000002775712647637662026766 00000000000000 pktools: qgis.pktools.pkfilter_spatial.pkfilter_spatial Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkfilter_spatial.pkfilter_spatial Class Reference
Inheritance diagram for qgis.pktools.pkfilter_spatial.pkfilter_spatial:
Collaboration diagram for qgis.pktools.pkfilter_spatial.pkfilter_spatial:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "homog ", "heterog ", "sobelx ", "sobely ", "sobelxy ", "sobelyx" , "smooth", "countid", "smoothnodata values", "threshold local filtering", "ismin", "ismax", "order ", "stdev", "mrf", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "scramble", "shift", "savgolay", "percentile"]
 
string METHOD = "METHOD"
 
string DIM = "DIM"
 
string NODATA = "NODATA"
 
list PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
 
string PADDING = "PADDING"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkfilter_spatial.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/md_header.html0000644000113200011300000000571212647637662014462 00000000000000 pktools: header
pktools  2.6.6
Processing Kernel for geospatial data
header

thetool

theshortdescription

SYNOPSIS

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 --help shows all options |short|long|type|default|description| |--—|-—|-—|----—|--------—|
pktools-2.6.6/doc/html/pktoolsAlgorithmProvider_8py_source.html0000644000113200011300000006667212647637661022022 00000000000000 pktools: /home/kempenep/pktools/qgis/pktoolsAlgorithmProvider.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktoolsAlgorithmProvider.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pktoolsAlgorithmProvider.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 
27 #from pktools.ExampleAlgorithm import ExampleAlgorithm
28 #raster utilities
29 from pktools.pkcomposite import pkcomposite
30 from pktools.pkcrop import pkcrop
31 from pktools.pkreclass import pkreclass
32 from pktools.pkgetmask import pkgetmask
33 from pktools.pksetmask import pksetmask
34 #raster/vector utilities
35 from pktools.pkextract import pkextract
36 from pktools.pkextract_grid import pkextract_grid
37 from pktools.pkextract_random import pkextract_random
38 #Supervised classification utilities
39 from pktools.pksvm import pksvm
40 from pktools.pkdiff_accuracy import pkdiff_accuracy
41 #LiDAR utilities
42 from pktools.pklas2img import pklas2img
43 from pktools.pkfilterdem import pkfilterdem
44 #filter utilities
45 from pktools.pkfilter_spectral import pkfilter_spectral
46 from pktools.pkfilter_spatial import pkfilter_spatial
47 
48 from processing.core.AlgorithmProvider import AlgorithmProvider
49 from processing.core.ProcessingConfig import Setting, ProcessingConfig
50 import os
51 from PyQt4 import QtGui
52 from pktools.pktoolsUtils import pktoolsUtils
53 
54 
55 class pktoolsAlgorithmProvider(AlgorithmProvider):
56 
57  MY_DUMMY_SETTING = "MY_DUMMY_SETTING"
58 
59  def __init__(self):
60  AlgorithmProvider.__init__(self)
61  # deactivate provider by default
62  self.activate = True
63  # load algorithms
64 # self.alglist = [pkinfo()]
65  self.alglist = [pkreclass(),pkcrop(),pkcomposite(),pkgetmask(),pksetmask(),pkextract(),pkextract_grid(),pkextract_random(),pksvm(),pkdiff_accuracy(),pklas2img(),pkfilterdem(),pkfilter_spectral(),pkfilter_spatial()]
66  # pktools = [pkinfo()]
67  # for alg in pktools:
68  # alg.group = "pktools"
69  # self.alglist.extend(pktools)
70  for alg in self.alglist:
71  alg.provider = self
72 
73  def initializeSettings(self):
74  '''In this method we add settings needed to configure our provider.
75  Do not forget to call the parent method, since it takes care or
76  automatically adding a setting for activating or deactivating the
77  algorithms in the provider
78  '''
79  AlgorithmProvider.initializeSettings(self)
80  ProcessingConfig.addSetting(Setting(self.getDescription(), pktoolsUtils.PKTOOLS_FOLDER, "pktools folder", pktoolsUtils.pktoolsPath()))
81 
82 # ProcessingConfig.addSetting(Setting("Example algorithms", pktoolsAlgorithmProvider.MY_DUMMY_SETTING, "Example setting", "Default value"))
83  # '''To get the parameter of a setting parameter, use
84 # ProcessingConfig.getSetting(name_of_parameter)
85 # '''
86 
87  def unload(self):
88  '''Setting should be removed here, so they do not appear anymore
89  when the plugin is unloaded'''
90  AlgorithmProvider.unload(self)
91  ProcessingConfig.removeSetting(pktoolsAlgorithmProvider.MY_DUMMY_SETTING)
92 
93  def getName(self):
94  '''This is the name that will appear on the toolbox group.
95  It is also used to create the command line name of all the algorithms
96  from this provider
97  '''
98  return "pktools"
99 
100  def getDescription(self):
101  '''This is the provired full name.
102  '''
103  return "Utilities for remote sensing image processing"
104 
105  def getIcon(self):
106  filepath = os.path.dirname(__file__) + "/logo.png"
107  return QtGui.QIcon(filepath)
108 
109  def _loadAlgorithms(self):
110  '''Here we fill the list of algorithms in self.algs.
111  This method is called whenever the list of algorithms should be updated.
112  If the list of algorithms can change
113  (for instance, if it contains algorithms from user-defined scripts and
114  a new script might have been added), you should create the list again
115  here.
116  In this case, since the list is always the same, we assign from the pre-made list.
117  This assignment has to be done in this method even if the list does not change,
118  since the self.algs list is cleared before calling this method
119  '''
120  self.algs = self.alglist
pktools-2.6.6/doc/html/md_installation_windows.html0000644000113200011300000001364412647637662017510 00000000000000 pktools: installation_windows
pktools  2.6.6
Processing Kernel for geospatial data
installation_windows

Installation on Windows machines

Dependencies: OSGeo4W and Visual Studio redistributables

Download and install the ​32bit or ​64bit (preferred) version of OSGeo4W. The basic installation with GDAL contains most dependencies that are required for pktools.

Download and install the ​redistributables for Visual Studio 2015.

Please make sure the latest version of pktools is always installed. Changes with respect to the previous versions can be checked in the text file Changelog. Older versions of pktools were installed with a setup exe file. They should be uninstalled first via Programs and Features in Control Panel.

Binary packages of pktools

Binary packages of pktools are available for Windows on the ftp server. Latest versions are only available for 64bit architectures. Older versions of pktools are also available for 32 bit architectures

Unzip the archives to your local hard drive. Then copy the pktools folder in the OSGeo apps directory (e.g., "C:\OSGeoW64\apps")

Manual installation via cmake

If you prefer to compile pktools yourself, the easiest way is to use CMake. First, install CMake on your machine (version 3.0 or higher). These dependency packages must also be pre-installed: Armadillo and NLOpt (for the utility pkoptsvm only).

Set the source directory in CMake to the pktools directory. Build out-of-source by setting a "build" directory, where binaries will be created.

Specify the generator for building the pktools (e.g., Visual Studio 14 2015 Win64 for 64 bit architectures). You can leave the default native compilers checked.

Add the OSGeoW64 and armadillo paths to the CMAKE_INSTALL_PREFIX (via the button "add Entry"). Other paths for dependencies on FANN and NLOPT should also be added here.

Click on the "Configure" button.

Under "BUILD" you can now select extra utilities based on FANN, LIBLAS and NLOPT. Click again on "Configure". Make sure all dependencies are resolved.

Then press "Generate".

A Visual Studio project (PKTOOLS.sln) will be created in the build directory. Open the project in Visual Studio and build the solution.

How to run pktools in Windows

The pktools utilities can be run from the command line using the OSGEo4W Shell. A selection of them can also be run from within QGIS, via the Processing Toolbox.

To run the pktools utilities from a simple Windows cmd shell, you first have to set some environment variables. This can be done by executing the batch file o4w_env.bat, located in OSGeo4W64 from within the cmd shell.

pktools-2.6.6/doc/html/classqgis_1_1pksvm_1_1pksvm__coll__graph.map0000644000113200011300000000007312616110567022263 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract_1_1pkextract-members.html0000644000113200011300000002151512647637662023146 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkextract.pkextract Member List
pktools-2.6.6/doc/html/inherit_graph_8.md50000644000113200011300000000004012616110567015314 00000000000000e7be88bf7b83e43a3c5e72ff57ce973epktools-2.6.6/doc/html/classUi_1_1MainWindow__inherit__graph.png0000644000113200011300000002560012616110567021613 00000000000000‰PNG  IHDR®p‡8K±bKGDÿÿÿ ½§“ IDATxœígXWÇÿ³ŽR¤¨ˆ"BÀF±¾QQT,Ñ ÑD%&ö(jŒ=±$Q£`4šØbLÐØkì½¢‚ˆ *"Št¥·mçý°²Šì.³»„H²¿çá3sν3{æÜsÛ†ˆ:tÔ/VpþéèС :ÃÕQ/Ñ®Žz‰ÎpuÔKxuYØ…  ©TZ—Åêø›iÒ¤ ~ûí7ðxugNL]Ž*LŸ>{öì··w]©ão&77—/_FFFlmmëªØuêqÀÅÅû÷ï¯ëbuüM„††âòåËu^®.ÆÕQ/Ñ®Žz‰ÎpuÔKt†«£^òÎ.Ã0xüø±Êã?Ã0¬õµjÕ ŠSú÷ﯴ¼7a[ÞÔ©Sѹsç*ÇV­Z†a””$?–šš †apùòeµîEÓzýxç — 6ļyóX_ŸœœŒ˜˜˜*ÇòòòpíÚµZ-¯gÏžˆŽŽFYY™üØ… Àáppþüyù±°°0téÒEí{ù¯ò¯0\KKK¬\¹’õõ½{÷ƪ;vìzôèQ«åyyyA$áÎ;€²²2„††âÓO?­b¸áááèÔ© Ô¾—ÿ*ÿ ÃU·‰>|8öïß_%\8xð † Våº'NÀÝ݆††°µµ•ÔÛå1 ƒ]»vÁÅÅæææ X[[ÃÅÅaaa€7nÀÎÎ'NÄÅ‹!‹ÈLŽŽŽIÆÆÆ$ iÖ¬Y´páBâóù”——GÁÁÁäççÇê9VòOn½è­€·ÿׄáÇãÀ "…a‚@ À£GЯ_?xzz"$$D¥¾Æø|~•ã=zô@vv6nß¾˜˜ù: ___œ?aaaèСŒÕÒšš 77·*×µk×ðüùsH$´lÙR~ÎÑÑiiipww‡‘‘nß¾k×®aðàÁpwwǵk×pùòe 0@å}¾+¼ó†Û¬Y³jÃS<ǃÆz»u놢¢"\¿~çÏŸÇ!Cªœ/++ÃG}„9sæ ** 7nT©ÃQü(mllàììŒeË–¡}ûö°°°ôéÓááá8wî\BEº›7o^md$>>€,¶ær¹xòä‰ü\RRš4i‡???=z=‚‡‡zõê…óçÏãÚµk:í-ÆŽ‹ÀÀ@œ8qOŸ>ÅÅ‹1zôh@OOOc½\.þþþ˜4i:uê++«*ç+**  !PVV†%K–ŠŠŠÔ.«gÏž8~ü8z÷î-?Ö¢E ´hÑgΜa=šñ&“'OÆœ9spôèQdeeáÌ™3X¼x1™g1b¦OŸŽ§OŸ"..ß|ó FðóóÃÆѹsgðù|øøø $$ööö°··W».ÿu˜hãŠD" "gggÒ××'úú믫t 4‰q‰ˆ®\¹BhÆ ϯY³†ÌÍÍÉÎÎŽ6nÜHü1YYY)ŒCߌÃßþÏž=€Îž=[¥.S§N%‡CùùùJïE™n±XLÁÁÁäèèHFFFÔµkW —˾|ù’ÆŒCdkkK_~ù%•••‘¬3ÊãñhÙ²eDDTRRB€æÎËê¾É?ãÖùzÜ»wï²è×ñî //¯:_û· :t(¢Î’ÿÝÔ4Q‡ ŒŽ¿‘áê ó¿.TÐQ/Ñ®Žz‰ÎpuÔKêÌpss‹‘•Å@,ÔU‘:ê=½fxøð9D"I•ù·Œã–– qï^¢£SŒÛ·“‘•Uàóñõ׃kÔ!•Ê:Z\®z+úÅb÷ߨÀ±˜ÀåÖ<Úò6"‘|~Í~-!á1vï.Ãð ðàêÚ;¶€»{3¸¹5Cóæ–šV]+´6\‰DŠGžãîÝg¸s'·n%!99 Ãဈä=} âã×H¤T‡cCö02rCyy .°®‹‘‘LLºáåË¿ ¦±–34lG€ââÛ¬eÀĤD¢,”—«ÞêSffýQ\|"Qk).צ¦>(,¼‰¤„µœ¹¹?F€‚‚Ó‹óYÉp8F°¶‡ŠŠ4””D¡¢"Yåõ––îzÊg‰D "ÀÄDnnÍЩS ¸¹5ƒ»»=ÌÍX×_ šM@$'çbÙ²ã>®5ÖåСHxyý€Èȧ` ];;XZ*_"ø&aaI Ü"‚‰‰+™J‚‚Nˆ™¬–ÜÝ»)\½š€¨¨g¬åŒŒd}ƒÄÄçøüóßYÇ“½{·…b,\x#GnÂóç5Ê}ÿý‡¯Â BjêK,Yò\]"0p'>̬výìÙýàëÛ<W¡>‰äu¾¸ÌÌ?~Ë—‡X¬Y9 w̘ÿÁÑÑ \.;ñ F£cÇòÿ33ó±|ù ¸»/ÁüùðèÑsÿ añbÕqpVVFŒØ„éÓw£¬L±X .—‹Û±ªS||:FÞ©T †a`jªÏJ¢¢žáÂ…û€ÜÜ"yüΆèègàó9àñ8X±âk9##ÙJ8"BXØcLºRiÍQ^×®-ab"»7©”þï¿¿¢FoçîÞ }ú´–¢X,H$Åñã1èÕ+ü„ãÇïÊ ’alÚ€Ö­+5Þ·Yºtx<ÍÆ4’âñ8 ú¨ÆÇá0 ôÁ A²Ï‘‘O1aB:uú¿þzeJ_ÇÀ2Ý\ôë×íÛ+_k{øðtïþÂÂ’^5W²ãb±}ú´®±þééy9r3„B ¤RÇ‘‚ƒOˆ¢£SXËFD<…H$X,ÅÍ›žT³P¥~‰§NÅ`åÊš÷†q¹øø¸€Ï—ÕW$’ ´T„yóöãã7«ô¾‹ QU(ÊöÉÝ»—†É“w K—eذá" J¡§ÇCHÈx˜™ªtj<žžÍñÑGk¬¿24ëÒ¥%l¯ôíâr9ðók‡yóü›Š!CÖcðàõ8{ö$©Ò¦N*•bîÜþ Ïåç—b„îzåe«êhÒÄ NN6*ë]PPŠ#6¡  ì oÖ†õ W¯&ÈËæóy¯šÿš ÅUšY™8ÃJöíúI¥„ .á?Bk”íÛ·m•¦½ìaaIèÙ3§OßS(ײ¥>øÀ|~õ•b±DÞ¿øá‡SèÐá;¬\y––ÆØ¹sâ+ÃU<’!•J±jÕp­r@hl¸yy%HK˃¢…ÿ<°víÇ`ááOñTÆ4<þþžpv®n|.ÜG÷î+pî\ˆ¨š·¸èß¿­Ê: …b|úéoHM}YÅ膻ñå  SUš7‘HÂ:ÎϨb@b±ááì¼.ŸÏUèÅ-:‚3g^%ÞÞ. D(£¨¨ ãÆýމCPPPZíš¹sûטÏX*•¢´´Û·ß@E…mÛ6Å/¿Œ†"»är906ÖGllªJ5¡‘á>z”…þý×¢°° “'{Wy(\.cc=ìÚ5Iî%&LðÂ'Ÿt©ñ ãp8X¸p`•c¥¥BÌ»Ÿ~úòòÊ”zj¡P__åaaúô]¸sçY5Dìüð˜šêãàÁ©˜=»¿¼£Æ0 †ƒ;ªŽ 0 ƒU«†ÃϯҽY\.ãÇ{ÁÚºA•ã?ýt;w†½ò²Êß|CC:wn©ôüªU§pâDÌ[M¦ ©”ä½vU¬^}VahTZ*ÄÓ§5ÉFG§V[½&óºOV³×UÔ*H¥‰DŠÑ£UY_ß6*'sÄb)ž?/Ä'ŸlA~~UÏ;}zŠ2 ƒ={&ÁÅ¥êBò9súÁϯÝ-aéÒ!˜6Í+WCHÈu|õÕ^Vô©e¸Ïž½À¨Q[в¥škkSðx,_îÿjÀ™°lÙ‡èСE5Y.—ƒÇ eËF ›<}ª;¶<=›Wys߆Çã gÏ÷ä·ùãëX¿þ‚Ò·["‘Öèq#"žàúõGÕâj@Ö eÓA‹ˆHRøâðx×ìu ×Q"‘¢¤¤#FlFnn±Âk|}[צqÁãq°dÉ`4lhX圹¹¦NõQð»1`à‡†ÁÓ³y5 ÃàÇGÊgÏÚ·oO²‘©-[>Å¡C‘øþûcJë¥ Ö†ûüy!FŒØ›†Øµk’|ˆºuk…±c»á‹/z! àJuDG?CRR6llL«x.‡Á´i>hÐÀ°šLãÆ qìØt,]:\.G¡ÑK¥??ÅÃ`×®%`ñâ#PÖQdMnM†|FiO™ËåÔØA+,,CjjžÂsl½®ªVA,–"++ãÇÿ.ïù¿‰ƒC#¥Ó¯ƒ–-­péÒ\Œç¥ðšI“z¢A¼ùhÔȇG)õš&&úعs"ÜÜšaõêUÂ?¿vX¿~~ýõ*Ö­;¯P^¬ W,–bâĶocãê?òŠþøæ›AJu”– 1cÆnôèáŒ'¾„­mðù\0 `jj€qãº+•eãÇ{aïÞÉ00T3 †zõrQ(»|ù‰W!†êæ¨26SÄ­[OpãF¢Bo È:h·o?U©?6¶z˜ð&²XWõð–¢çþ&R)!"â).^| ð¼Ÿ_»*­’¬cÐ¥‹#ΞGG+…r€ìùLŸÞGÞgóæùá·ß>GXØc„„ÜP*kooS§¾„«kãjç† ñÀüùtçÎÅ©¼¿7ae¸ëÖý{i _-eË–-W›[Œ kkSìßÿ40‘lÖ…Mç(&&Un¤ ƒW15ƒvíšUkÞ*Ù±c¾úª52Ã@éÂeÍ0¬]{¶Æ…;fªœÍЉIUÊ2çpëÖS•/€²Ù=€†aУ‡3¶o~ýÚ(¼ÎÇÇU^G€ >øÀ qqiJ_Ê7;ö}XY™u¸§Oï OO{L˜à…  Ó(,,«Aƒb¦Mó¿¿'¾újž?/d%S£á^¿žˆµkÏaÅ ÿjÁ7[rrаqã%|ñE/ØØÈ ßÞÞûö}?î‚1c”‡o²gÏ-|ø¡'¶o•+‡ƒÏ炈àç§|ÌÚÚ³fõETÔlÛö9š6µxeÀUHY3œ—W‚ÐÐÄW«Î¸¯:)ÕX$’(œ ­$**EaŒÉår påMè¡C‘Ju˜˜èˇ˜xv©Ìã›™áêÕùxò$))/‘’ò×®=BVV>„B ÊË_¯t{ð mÛ6UZÿÊP¡rŠY$’Â×·5Z¶l;; 4kfŽÖ­›(½##=Éä==›# à˜9s:wv€yÏ€Çã`ƌމ$˜6­·|ˆ«Gg;vþþjÔáããZm ‰©©>¾øÂk֜ôi>J[?UðóÏ£0hÐ:üõWTÍu©–já þüó&µh1‡23óU]¦’òr¹º~MkÖœ­ùb¬\y’:tø–¤R©Vu±³›EGʲ4VTˆèðá;4þ ŬõÌŸ€† û…ˆˆrrŠèÎd:y2†^¾,V*sëV]ºô€?~N"º}û ÙÚÎTëÙ^¹ò–.ý‹=Ê’ëÕ+ˆ–-;ÎZ‡"öî½Eöö³©°°Lc¥¥ôÞ{ iãÆKZÕeáƒԡ÷TQ!RuÙr¥·¬Lˆ<‹Ñ£»Ê›wM8u*ÅÅå5ª«Æ:àÊ•‡èÝÛU«iÂÄÄç‹¥òN‚@ÀÃС:ÔC-=eeBù˜ª¥¥1«Õh:9Tù¿R¾¬LȺÜ=œÑ£‡s•c®®ñðakЍŒ}ÃÓX­õP„þþžøóÏ›˜<¹§Æ¿ÓŒ¾Ø·/!!70q¢òÔTJcÜS§bñòe1¦N­>¶ªÇŽEÃÛÛVV&ë(.®@\\:ºvuÔª.fBO§õªü²2ë)be¼6\å‹êÙàìlƒ„„,­tXZÃÙÙ·n=©ùbŒÑ Éɹˆ×üE²²2Á'ŸtÁ„ª…Qj¸F¢woWX[›j\ ¡PŒÐÐGèÛW³·¸’»wŸA"‘¢cÇæZéIIyfÍ,4^JW‰Ìãòk¾P•ò¥¥ZéiÞÜù¬:4ªèС¹Úk‹ß¦mÛ¦hÚÔL­a-EŒó?<{öBå‹Â_0;»ׯ'²êô¨"22¥¥Bxy9×|± >Ì‚¥¥1lmj¥'7·iîù+y3TДÚò¸™@*%¼xÁ~;"Ú´iªuÈ^^θz5A+­ZYÃÅ¥1މRzBà  ‡âA}¶Ü½›[Û†hÒĬæ‹U”” GGk­t²ÆìvG¨¢´´6<®ú1®"*ãëÜ\õÓŸ¾I«VÖ(,,g=ŽªŒš#..]ãÅ3•ôíÛ¡¡”žWh¸qqépt´ÒÚ«$$d)\¢¨.ii/aoo¡µžÜÜbÖÛzTQ1®ž\.Gk[ù"jk¸•Ï75õ…VzZµ²AY™))Úéi×®)’“sQR¢8”Rh¸dÀÕUùx"[ž>Í…ƒC#­õääÔŽ§|ñ¢¸6v˜¢¬L}}í<.èëóµö¸ €Çãh*T>——/µÓãà ëø>{¦áºº6†TJxøPqÇS¡áfdä³Ю‰ÂÂ2˜™©?ý6ùù¥µ¢G$’(]ž§bèéio¸ÕĨÃ0àóyZ'ãÐ×çC_Ÿ¼¼ê‹ÉÕ¡ACp8 4›þ­ÄÎÎ à #CñÂ$…†+ûÙmxSEqq9ŒŒØoBT†H$a½¯.¨Ì -‰Dåú¶‘ÂÝê"p.ÛT‡‘‘Š‹ËµÒS¹ÎWÙRL†«½g’MOj­æƒÇÓþdÙbjã…”î»ó ¦vÒ½ Ê[…†kh(@Q‘vo 4lhP+zøüÚ1”ʵQŸÚÈ“%׎ÇjÇA……#ÕA*%W(\[­"‘lˆ²Ñ…†ëà`…¤¤l­ dËð´uÀÌÌPëØ í‡«&^æqµ×#Ë¡}ÞA©”´ÖSZ*Dy¹Hë¾DQ‘,å€lѹ椤¼€D"EË–Š×+¼ÛæÍ-ñôi®V@‹–HL|®µss#¼x¡xKŠ:XX׊žÚh*·:iëq J!I´-©M07×nôæñc™ÃÓvZ=99 àY3Åà ·]»¦HHȬ¶iN]\\#>>]+€ì!Aœ2¬¬L‘“£Ýx'€Wí ·Òck;ýœ“#{5Ò|j’“eÏWÛñòû÷3`b¢_-Ý–º„‡?ƒC#¥»>>µ^½\Àårpö¬vsέ[7Á‹ÅHKS<¤Á––-­jÅs7jd‚ìlíf†Y¨ i*TÆÈÚzÜÊûÑv*ûñã4lh¨õÍÝ»©xï=[­;‹'OÆ _?宑‘ºti©µávêÔÆÆz8^;=NN6ÈÏ/EF»4™Ê®ö—ϯ +“×vT!7·<GëPáÁƒŒ³Õ„TJ8>Néþ?¶<|˜‰ää\ôî­<é¡ÒvÊß¿ΟGr²æ±.ŸÏE·nN¸tIñæ=¶tèÐ|>—už-eØÚ6Df¦ö+©jcÀ_(¬›––‡FLUnßgÃ͛ѵ«ò¼lˆMEnn1«,›ªØºõìí-СCs¥×(5Ü¡C=м¹¥ÚÛ†ßfÐ 7\½š VF÷Ñ×ç£]»¦ˆˆÐn½hëÖQ^.ÒzÄÄÄD_ëöJyu²D*âÞ½4´i£Ýô|NNž<É©’QSöí‹@‹кuõݼlIIy"0s¦¯Ê‘¥g¸\&Oî‰Ã‡ïh5ïüPõ’Z•]Ú>êGG+Óä²^ó'ŸtÁîÝá(-Õ|AI¿~m“SÄ:3¢"ø|.Zµ²Öj…> [Ø¢éVìJ*嵨/+âÉ“…ù Ôáܹ8ôèá¬ÕléÞ½àrøûkž:ôæÍÇØ½; ¬1„Ri¸|>›6àÎdlݪù‡£'Nì ‰DŠ .j¬ÃÉÉ..¶Ø¿?Bc€lÕуÚ®‰‰¾Ö·  ìU^^Í—G&$dA"‘ªÜ\ÏŸàÚµGòÆš—W‚µkÏaÊ”^‡>……e˜6m'lÏj`ƒˆNN6øâ‹^ :¥q+Û¾Ü [·^Õju̘÷±ÿm­Æ—;vlˆˆ' Ó±ÅÌÌH뙼—/KР¡VÍêõ뉰¶6Õjì5$äÌÍÑ¿?»LîŠØ°áôôx˜0AùæFU¾ùæ0**ÄøþûYɰýž9ÓžžÍñé§¿i<œ4nœ,-M0oÞäàÃ=À0 vï×X‡¯ok””qó¦:_Ê©Š)òòJªäTP—ììByVM9>½zi¾ó¹¬LˆÝ»Ã1lX'BbcS±uëUÌ›çWcŠ(e¬Ysý…ǰfU[>Ÿ‹­[?ƒ±±>ûì7~0==6oÀÅ‹÷5þÚJeޱ .i¼xÇÚº\\låßpЄJƒÓf2#+«@«¨yy%ˆŠz†^½ÞÓXǶm¡(+bÊoäKJ*0yòôèáŒO>é¢‘Žƒ#±fÍY¬X1¬ÚÖ{U°~ÍLMõ±cǤ§ça̘_52œvíì0~¼¾ûî(>®Zn¥Ái³?Kæq5Ÿíºz5£ñFÔ¢¢rüúëŒÝUãɋŋÿÂË—ÅX¹r¸FòFbÖ¬=˜2Å£G«—wC­öÁÎÎÇÏDzz>üI£™¬ ÂÝÝŸ|²Y#y cLÚ ?ÿ|ééšM%ûø¸ %åââ4[Gaii‡Ñjl:+«P«õ'NÄ C‡æUÒ½ªCpðiH$„ÀÀÞÉÿøãY8-[Æ¢qcõw_oÜx 3fìÆ¼y~*³|*CíÀÆÎÎûöMH$Á°aÔ^CÀãq°ys 22‘û )IDAT7îwªï¹+“ç-ZtDmY@–UÆÅÅ!!×5’çó¹°µm¨ñø6áÙ³\4o®Y§*--gÏÆ! à}äãâÒrß|3ffê{Û#G¢°víY|ýõ µšw@6-tË–ÇW_õÕ8áŒF¹9Ž „‰‰>üüÖâØ±hµäÍÌŒð矑‘Q£¶¨v<¬Zõ΋þ}š ý?9¥ðƒlhÑÂRãéðœœb”– ao¯ÙÒ¿}ûnÁÒÒDi2kU”—‹0mÚNtêä Q"ÃcÇîbÆŒ];¶&Mê©–l~~)¶â—_.`Ù²1kV_µË—£M‚2‘HB«WŸ¦&M¾¤ÀÀTV&TK>!!“Úµ[Dƒ­£‚õ®}ÿý1rtœGOžd«-[TTNNNóé÷߯©-KD4gÎ>>|ƒF²²„wii/Õ– Åäæ¶˜V­:¥QÙ  ÷Þ[HééyjË=Mvv³hÁ‚j'¼}û ¹»/¡®]—QLLŠÚe¿År­ ·’£G£ÉÉi>õîLwî$«%›Inn‹ÉËëzú4G-Y¡PL¬¥=Vj”ipöì}Ô½û ‰$jËþòËêØñ[µåˆˆöí‹ {ûÙ$«_î‘#w¨iÓY”’òBmÙ½{oQãÆ_Ò‰wÕ–ýùç Ԥɗ´pá!µŒ¶¼\DAA§ÈÞ~6µ…^¼PžÑR jÇp‰ˆž=Ë¥‘#7Q“&_Ò‚¨  ”µlzzõéL®®_Ó‰j•›••OîîKh̘_Õ6„ÌÌ|rp˜K¿ývU-9"¢‹ï“­íL~ˆ%KޝïjµåJK+ÈÝ} -Xp@mÙ[·’ÈÞ~6ŸVK®¼\D;©iÓY´e˵d¯^}H]».{Õ²…j•"ö-jÏp+Ù¿?‚\]¿&7·Å´gO8kc*)© Ï?ßFvv³hõê3jaLL 9:ΣÀÀ$‘¨÷p~øá½÷ÞB•¹m‘•U@¶¶3)4ô‘ZrDDÆýB3gîV[nݺóää4Ÿrs‹Ô’‹‰I!gç4iRˆZÆ“I½z‘“Ó|ºp!žµ\rr.Mš´lmgR@ÀVÊÈP?,©Ú7\"Y²ã3vQ“&_’—×têT,«&•JiË–+do?›† Y¯Ö ß¼ù˜Z¶œK R«®¥äêúµFɑ۵[D›6]V[ÎÅe!mݪž—ñ¢˜œÐêÕêyÌää\rqYH[ÕJ^½{w98Ì¥þý×°á²³ iáÂCÔ¬ÙWÔ±ã·òÚáVòða&}þù6jÜøKòñùŒŒ, ²ÏߨüãñÌÉŸ8CV×Wþ v$ت%€ôõ‰ÏgW··å¸ÜjÊ1¤¯ï@<^C5å8ddäA ÃW»<™W-9cãÎdbÒ…†ÕõÞÞãÉÑqµk·ˆ¶m»VSFqmYÎÕF¦Õܽ›‚àà#ؽûK|õÕ,kŸLÇ»ÃéÓ§!Yá³Ïf`Ü8/•ŸÞª%VhŸ®†nnÍ0y²vï&tíÚÚg^ÔñîpïÞ=dggk< § Úg£Ð¡ã@g¸:ê%:ÃÕQ/Ñ®ŽzÉ;m¸ÞÞÞHO¯¾ôðÍãéééðöf¿ÚÛÛ£GV¸ùsÞ¼yJË|¶eþôÓO˜2eJ•c{öì··722^oƒÊÎΆ··7¢££Õ¾Mêõoà6\6ãã?VK&++ IIU“‹!&&¦VËtssÃãÇQQñú;wîÜÃ0ˆŒ|ýÍÞû÷ïƒÇãÁÕÕU£ûù/Rï ·Aƒ˜8q¢Z2žžž¸råJ•c7oÞ„›»®lËlß¾=Äb1=’}=¦¢¢±±±èׯ_5ÃuqqžžžF÷ó_¤ÞîÛÍcMÿ@Ïž=qåÊ•*áÂÕ«WÑ£GÕ]ªaaa˜0aúõëìÞ½[¡Nooo\¸pŸ~ú)Œ½{÷ÌÌÌ`ooøøx@\\¬¬¬0pà@DEEA"‘¥aŠGûöíÕÒ-•J±wï^Œ3~~~˜6m””$÷f;vDdd$âããáìì å9ÄéÎÉÉ£cÕr;8ȾО——©TŠÆ_§fjÒ¤ rrrЪU+èëë#!!±±±xÿý÷áèèˆØØXDGG£kWí¾r_W¼Ó†keeUmh*%%\.Wî5¥mÛ¶(--Ž{÷‰nݺU9_QQ¥K—bäÈ‘øõ×_1sæL•ú”%å077‡þüóO´lÙRîÕ===qÿþ}DFFª ”é¶±±©62’œœ @[s8df¾N‘‘KKK0 ƒ.]ºàúõëHMME«V­äÞ?66]ºh–¡®y§ ·_¿~X¿~=™™‰¨¨(,_¾¾¾¾à󥤤'OžTú%•áš5kàâ₆ «n±‰D‹Åàñx …øã?Èb_uqssÃÍ›7áéù:¡­­-lmmÁz4ãMŒM›6áÆxùò%"""ðûï¿yfooo¬_¿™™™xúô)¶mÛ†Þ½e‹`:wGÂÕÕ<8sæ ¬­­am­ý7“ë‚wÚp0hÐ lÚ´ cÇŽÅêիѹsg̘1C©L~~>V¯^­ôÿ7ñööƳgϪ… €l¬vÊ”)X¶l`ccÌ;Wíû¨4Ì7 :tè†aЦMµu2#GŽÄ¦M›0jÔ(ìØ±‹-’ŸŸ1c,--1yòdÌ™3;vĨQ£äå …B¹§oÓ¦ D"Q½ñ¶P'ëq 44^^^8xð nY㿌ŸþÙÙÙ Õ<»š¬x§=®ÊЮŽz‰ÎpuÔKt†«£^¢3\õáꨗè WG½¤N¶§¿Éwß}§tÖKGý$55NNNuZf®««+F]e7€Žðõõ­Ó2ëlæL‡ŽZD7s¦£~¢3\õáꨗè WG½äÿjƒõÉ4¸†IEND®B`‚pktools-2.6.6/doc/html/dir_0f38b5d14ac73b43e2a48a75f9e70be8.html0000644000113200011300000001043212647637663020046 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Debug Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkcrop_gui-gcc-Debug Directory Reference
Directory dependency graph for build-pkcrop_gui-gcc-Debug:
/home/kempenep/pktools/qt/build-pkcrop_gui-gcc-Debug

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid__inherit__graph.md50000644000113200011300000000004012616110566026717 000000000000005329576720c306ce1e73ae3720c000efpktools-2.6.6/doc/html/inherit_graph_34.md50000644000113200011300000000004012647437044015401 000000000000002206cdc4d139a6c86521c0fd8a09da98pktools-2.6.6/doc/html/dir_ed1df9621940d6aa1183c365ad1750d2_dep.map0000644000113200011300000000066712616110567020323 00000000000000 pktools-2.6.6/doc/html/inherit_graph_25.md50000644000113200011300000000004012647437044015401 00000000000000036f5f07709542323000a94860133ffepktools-2.6.6/doc/html/ImgGdal_8h_source.html0000644000113200011300000002600412647637662016032 00000000000000 pktools: /home/kempenep/pktools/src/imageclasses/ImgGdal.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
ImgGdal.h
1 /**********************************************************************
2 ImgUpdaterGdal.h: class to read raster files using GDAL API library
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _IMGUPDATERGDAL_H_
21 #define _IMGUPDATERGDAL_H_
22 
23 #include "ImgReaderGdal.h"
24 #include "ImgWriterGdal.h"
25 
26 //--------------------------------------------------------------------------
28 {
29 public:
30  ImgUpdaterGdal(void);
31  ImgUpdaterGdal(const std::string& filename){open(filename);};
32  ~ImgUpdaterGdal(void);
33  void open(const std::string& filename);
34  void close(void);
35 
36 protected:
37  void setCodec();//double magicX, double magicY);
38 
39  std::string m_filename;
40  GDALDataset *m_gds;
41  int m_ncol;
42  int m_nrow;
43  int m_nband;
44  double m_gt[6];
45  std::vector<double> m_noDataValues;
46  std::vector<double> m_scale;
47  std::vector<double> m_offset;
48 };
49 
50 #endif // _IMGUPDATERGDAL_H_
pktools-2.6.6/doc/html/build-pkextract__gui-gcc-Release_2moc__mainwindow_8cpp_source.html0000644000113200011300000005045112647637661026613 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkextract_gui-gcc-Release/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkextract_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  9, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  67, 11, 11, 11, 0x08,
36  95, 11, 11, 11, 0x08,
37  125, 11, 11, 11, 0x08,
38  156, 11, 11, 11, 0x08,
39  187, 11, 11, 11, 0x08,
40  215, 11, 11, 11, 0x08,
41  251, 11, 11, 11, 0x08,
42 
43  0 // eod
44 };
45 
46 static const char qt_meta_stringdata_MainWindow[] = {
47  "MainWindow\0\0on_actionInput_triggered()\0"
48  "on_actionSample_triggered()\0"
49  "on_actionOutput_triggered()\0"
50  "on_toolButton_input_clicked()\0"
51  "on_toolButton_output_clicked()\0"
52  "on_toolButton_sample_clicked()\0"
53  "on_pushButton_run_clicked()\0"
54  "on_toolButton_createTable_clicked()\0"
55  "on_pushButton_restore_clicked()\0"
56 };
57 
58 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
59 {
60  if (_c == QMetaObject::InvokeMetaMethod) {
61  Q_ASSERT(staticMetaObject.cast(_o));
62  MainWindow *_t = static_cast<MainWindow *>(_o);
63  switch (_id) {
64  case 0: _t->on_actionInput_triggered(); break;
65  case 1: _t->on_actionSample_triggered(); break;
66  case 2: _t->on_actionOutput_triggered(); break;
67  case 3: _t->on_toolButton_input_clicked(); break;
68  case 4: _t->on_toolButton_output_clicked(); break;
69  case 5: _t->on_toolButton_sample_clicked(); break;
70  case 6: _t->on_pushButton_run_clicked(); break;
71  case 7: _t->on_toolButton_createTable_clicked(); break;
72  case 8: _t->on_pushButton_restore_clicked(); break;
73  default: ;
74  }
75  }
76  Q_UNUSED(_a);
77 }
78 
79 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
80  0, qt_static_metacall
81 };
82 
83 const QMetaObject MainWindow::staticMetaObject = {
84  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
85  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
86 };
87 
88 #ifdef Q_NO_DATA_RELOCATION
89 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
90 #endif //Q_NO_DATA_RELOCATION
91 
92 const QMetaObject *MainWindow::metaObject() const
93 {
94  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
95 }
96 
97 void *MainWindow::qt_metacast(const char *_clname)
98 {
99  if (!_clname) return 0;
100  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
101  return static_cast<void*>(const_cast< MainWindow*>(this));
102  return QMainWindow::qt_metacast(_clname);
103 }
104 
105 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
106 {
107  _id = QMainWindow::qt_metacall(_c, _id, _a);
108  if (_id < 0)
109  return _id;
110  if (_c == QMetaObject::InvokeMetaMethod) {
111  if (_id < 9)
112  qt_static_metacall(this, _c, _id, _a);
113  _id -= 9;
114  }
115  return _id;
116 }
117 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkfilterdem_1_1pkfilterdem__coll__graph.md50000644000113200011300000000004012616110566026554 00000000000000cbf52a07ff8eed0ceac70d0be39a651epktools-2.6.6/doc/html/pksvm__gui_2main_8cpp_source.html0000644000113200011300000001653612647637661020322 00000000000000 pktools: /home/kempenep/pktools/qt/pksvm_gui/main.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
main.cpp
1 /**********************************************************************
2 main.cpp: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "mainwindow.h"
21 #include <QApplication>
22 
23 int main(int argc, char *argv[])
24 {
25  QApplication a(argc, argv);
26  MainWindow w;
27  w.show();
28 
29  return a.exec();
30 }
pktools-2.6.6/doc/html/classCompare__IndexValue.html0000644000113200011300000001010312647637662017437 00000000000000 pktools: Compare_IndexValue Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Compare_IndexValue Class Reference

Public Member Functions

int operator() (const IndexValue &pv1, const IndexValue &pv2) const
 

Detailed Description

Definition at line 27 of file IndexValue.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/dir_0d45166ba6790a432639a127a727f02c_dep.png0000644000113200011300000000437312616110567020111 00000000000000‰PNG  IHDR}ÂHÍ.bKGDÿÿÿ ½§“°IDATxœíÝLÓwÇñW)¶À%S«“€üp2È4—Íùs¦0±ü¸À ž?6#Ì-¨¨‡EÆ¡'AO‚,ˆ»àFpˆ Âœà¹¸Í裿öÚdlÝú…Áöߨx^^oê½C¯s,}ô©S§a÷îýÛ¿V«E{{›Þû1ô:Ç’QDߺ5Æè¾W«ûàáñ®\¹4äa³¬¬kÖ,†›› –-óÀÙ³y#šãEãäòÕ€E‹\ }:yúûþþ~deÅÊ• 1w®=½Q[[ýÜq¿!**^^oâÝwÝ‘œügôõõæîsFý£üQZZ¬{•©¢¢–––X²dÅ3Û©T*|öÙF„…mAEÅ DDìž=Û¡R©†Ýÿpã .~ùåöK×yêÔ deÞ=ûQVv ;‘’òüßn…b7ZZþƒÂÂË8y2åÈÌLÉÝapF}Å o´··áæÍZ@qñw˃!?û‚¡F£†V«Eww7¤R)BP[[ ‹a÷?ÚqÿïôélìÝ«ÀêÕ>˜1ÃË–­BTTÜíž<ÑàüùÄÅ%ÃÞ~\\æ 22……ù¯4Ÿ¡EtKKK|ðÁ””œƒJ¥Byy)B†l7yòœ>]„ÚÚ*¼÷ž;‚ƒ}PUuffÃÆhÇxæ5îææ&¸¹Í}æç..îCÆ F{ûãa÷=šqýýO6ën³³sÀ­[ÿzf»»wo ;}úë‹Åhl¼¯»íÁƒzX[Û»N¡Mô÷ß_ŽŽŽv¤¥}‰ÀÀŸ»H$† r”–£««jµæææ°´´vß#§RuüÓ òÐÕÕ‰œœºmBB6"9y?._¾ˆÖÖÿ¢¢¢ GŽ$™ÏÜ|Ö®]øø½hllÀ;ÿÆáñn]à+ß/† ÷Y¶±2i’~¸EEgàí½î¹ÛH¥R¤¦f %Eææ&888"==R©tØ}7ÎÎÎ ¼ƒE‹\qóf#¦N†;b”‹ãÇÿŠ˜˜D\ºtºjµIIqhmm‹‹;ÒÒ²àï¿jÈœ Å_ ?¿•H&ÁÇGŽmÛ"õ¿£Æ€ÞçÓ»»Õ|jU@.âóÏ7éu>ÝhÞ™pŒæá]_/{Ý»®NÿWÝL…ÉDç¨#Çïqt‚8:A ŽNG'ˆ£ÄÑ âèqt‚8:A ŽNG'ˆ£$Øùôøø½¨«{ù ¨’J-Ÿ [[;ƒÏ%Xô¯¿> ÞÁÌ™öBM9¡œ;—?¿?šVt„Ÿ_SN2™H°¹ø9 ŽNG'ˆ£ÄÑ âèqt‚8:A ŽNG'ˆ£ÄÑ âèqt‚&|t¥òž ç¢MÁ„Î^G'Èd¢çççÂÓÓ ÎίcçÎmèé¼2ô÷ߟÇÒ¥°µµ‚«« ÒÒ¾Ô)--ÆâÅó`ccÙÈËû»îgqqQpq±Æ[oÍ@\\4àÇe&=77ùù¥øöÛóøé§ËHMM@WW'6lðǼyž¨®¾‹„„C8p µB¥êÆÆØ²%7nÜÇ®]±Ø¾}“îr¡GÐÐPòòk(,,Cee9’“‡^ñy"2™èIIiprr†—×"ÄÆÄÙ³yH¤¨¬¼””tX[ÛèÞ‰ÛÑñÔêß/Þ©Ô!!Q_ÿ–€ÜÜ“HM=†™3í1gÎ\()(++ÏC3&ÝÉÉY÷µ³³+ZZš!‘HpïÞxcùr/|óMŽn›)S¦¢¨è ªª~†»»||–âêÕJÝåÀ<¸WWÈd"Èd"¬_¿ õB–A˜Lôºº»O}}ööŽèííÁ¦MAؾ= ?þx‡×mÓÛÛ­V‹œœ|(•m ÝŒà`_<~ýôcXYý‘‘Ñð÷F` 7nß~ˆŒŒSP(ö ©©ŽŽ³‘©tð_|ÄÄ$":ú ,]ê333øúúC¡H磂]úÛÉI†ìì<þ„Ë Èd"¤§gcíZ¿a·ãK³Qáèqt‚8:A ŽNG'ˆ£ÄÑ âèqt‚8:A ŽNG'ˆ£ÄÑ âèqt‚}cä¡C‰8u*KÈ)Ùs}óæp477 5Ý„ãã#Çüù^‚Ì%Xô}û…šŠ½?§ÄÑ âèqt‚8:A ŽNG'H¯gÄb1.^<‡‹ecµ6b±X¯ñz}>]©T¢ººZ¯°Wgmm%K–Œz¼^ÑÙÄÄÏéqt‚8:A ŽNG'ˆ£ÄÑ âèqt‚8:A ŽN9€üñ^Öÿ –þ83Ã@ÐIEND®B`‚pktools-2.6.6/doc/html/pktools_2pkdiff__accuracy_8py_source.html0000644000113200011300000012454012647637661022043 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkdiff_accuracy.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkdiff_accuracy.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkdiff_accuracy.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 
28 from PyQt4.QtCore import QVariant
29 from qgis.core import QgsField
30 
31 from pktoolsUtils import pktoolsUtils
32 from pktoolsAlgorithm import pktoolsAlgorithm
33 from processing.core.parameters import ParameterRaster
34 from processing.core.parameters import ParameterVector
35 from processing.core.outputs import OutputVector
36 from processing.core.outputs import OutputFile
37 #from processing.core.outputs import OutputTable
38 from processing.core.parameters import ParameterSelection
39 from processing.core.parameters import ParameterNumber
40 from processing.core.parameters import ParameterString
41 from processing.core.parameters import ParameterBoolean
42 from processing.core.parameters import ParameterExtent
43 
44 FORMATS = [
45  'ESRI Shapefile',
46  'GeoJSON',
47  'GeoRSS',
48  'SQLite',
49  'GMT',
50  'MapInfo File',
51  'INTERLIS 1',
52  'INTERLIS 2',
53  'GML',
54  'Geoconcept',
55  'DXF',
56  'DGN',
57  'CSV',
58  'BNA',
59  'S57',
60  'KML',
61  'GPX',
62  'PGDump',
63  'GPSTrackMaker',
64  'ODS',
65  'XLSX',
66  'PDF',
67 ]
68 EXTS = [
69  '.shp',
70  '.geojson',
71  '.xml',
72  '.sqlite',
73  '.gmt',
74  '.tab',
75  '.ili',
76  '.ili',
77  '.gml',
78  '.txt',
79  '.dxf',
80  '.dgn',
81  '.csv',
82  '.bna',
83  '.000',
84  '.kml',
85  '.gpx',
86  '.pgdump',
87  '.gtm',
88  '.ods',
89  '.xlsx',
90  '.pdf',
91 ]
92 
93 class pkdiff_accuracy(pktoolsAlgorithm):
94 
95  INPUT = "INPUT"
96  REFERENCE = "REFERENCE"
97  ITERATE = "ITERATE"
98  LABELREF = "LABELREF"
99  NODATA = "NODATA"
100 # TABLE = 'TABLE'
101  OUTPUT = "OUTPUT"
102  CMOUTPUT = "CMOUTPUT"
103  CMFORMAT_OPTIONS = ["ascii", "latex"]
104  CMFORMAT = "CMFORMAT"
105 
106  FORMAT = "FORMAT"
107  LABELCLASS = "LABELCLASS"
108  EXTRA = 'EXTRA'
109 
110  def cliName(self):
111  return "pkdiff"
112 
113  def defineCharacteristics(self):
114  self.name = "Accuracy assessment with ground reference"
115  self.group = "[pktools] supervised classification"
116  self.addParameter(ParameterRaster(self.INPUT, 'Classification result (raster map)'))
117  self.addParameter(ParameterVector(self.REFERENCE, 'Labeled reference vector data set'))
118  self.addParameter(ParameterBoolean(self.ITERATE, "Iterate over all layers",True))
119  self.addParameter(ParameterString(self.LABELREF, "Attribute name of the reference label","label"))
120  self.addParameter(ParameterString(self.NODATA, "No data value(s) in input or reference dataset to ignore (e.g., 0;255)","0"))
121  self.addOutput(OutputFile(self.CMOUTPUT, self.tr("Confusion matrix output file ")))
122  self.addParameter(ParameterSelection(self.CMFORMAT,"Format for confusion matrix output",self.CMFORMAT_OPTIONS, 0))
123 
124 # self.addOutput(OutputTable(self.TABLE, self.tr('Confusion matrix table')))
125  self.addOutput(OutputVector(self.OUTPUT, 'Assessment output vector data set'))
126  self.addParameter(ParameterSelection(self.FORMAT,
127  'Assessment output vector Format', FORMATS))
128  self.addParameter(ParameterString(self.LABELCLASS, "Attribute name of classified (map) label","class"))
129  self.addParameter(ParameterString(self.EXTRA,
130  'Additional parameters', '', optional=True))
131 
132  def processAlgorithm(self, progress):
133  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
134  commands = [cliPath]
135  #outputtable = self.getOutputFromName(self.TABLE)
136 
137  input=self.getParameterValue(self.INPUT)
138  commands.append('-i')
139  commands.append('"' + input + '"')
140 
141  reference=self.getParameterValue(self.REFERENCE)
142  if self.getParameterValue(self.ITERATE):
143  if str(reference).find('|')>0:
144  referencename=str(reference)[:str(reference).find('|')]
145  else:
146  referencename=str(reference)
147  else:
148  referencename=str(reference).replace("|layername"," -ln")
149  commands.append('-ref')
150  commands.append(referencename)
151 
152  commands.append('-lr');
153  commands.append(self.getParameterValue(self.LABELREF))
154 
155  nodata=self.getParameterValue(self.NODATA)
156  if nodata != "none":
157  nodataValues = nodata.split(';')
158  for nodataValue in nodataValues:
159  commands.append('-nodata')
160  commands.append(nodataValue)
161 
162  commands.append("-cm")
163  commands.append("-cmf")
164  commands.append(self.CMFORMAT_OPTIONS[self.getParameterValue(self.CMFORMAT)])
165  commands.append("-cmo")
166  commands.append(self.getOutputValue(self.CMOUTPUT))
167 
168  output = self.getOutputFromName(self.OUTPUT)
169  outFile = output.value
170  formatIdx = self.getParameterValue(self.FORMAT)
171  outFormat = '"' + FORMATS[formatIdx] + '"'
172  commands.append('-f')
173  commands.append(outFormat)
174  ext = EXTS[formatIdx]
175  if not outFile.endswith(ext):
176  outFile += ext
177  output.value = outFile
178  commands.append('-o')
179  commands.append('"' + outFile + '"')
180  commands.append('-lc');
181  commands.append(self.getParameterValue(self.LABELCLASS))
182 
183  extra = str(self.getParameterValue(self.EXTRA))
184  if len(extra) > 0:
185  commands.append(extra)
186 
187  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/pksvm__gui_2mainwindow_8cpp_source.html0000644000113200011300000012134412647637661021544 00000000000000 pktools: /home/kempenep/pktools/qt/pksvm_gui/mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.cpp
1 /**********************************************************************
2 mainwindow.cpp: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include "mainwindow.h"
21 #include "ui_mainwindow.h"
22 #include <QFileDialog>
23 #include <QStandardItemModel>
24 #include <QMessageBox>
25 #include <QProcess>
26 
27 MainWindow::MainWindow(QWidget *parent) :
28  QMainWindow(parent),
29  ui(new Ui::MainWindow)
30 {
31  ui->setupUi(this);
32  QStringList svmlist;
33  svmlist << "C_SVC" << "nu_SVC" << "one_class" << "epsilon_SVR" << "nu_SVR";
34  ui->svmtype->addItems(svmlist);
35  QStringList kernellist;
36  kernellist << "radial" << "linear" << "polynomial" << "sigmoid";
37  ui->kerneltype->addItems(kernellist);
38  setDefaults();
39 }
40 
41 MainWindow::~MainWindow()
42 {
43  delete ui;
44 }
45 
46 void MainWindow::setDefaults()
47 {
48  //tab training
49  //m_training="d:\\osgeo\\course\\openstreetmap\\training2.sqlite";
50 // ui->training->setText(m_training);
51  ui->cv->setText("0");
52  ui->training->clear();
53  ui->tln->clear();
54  ui->label->setText("label");
55  QStringList labels;
56  setClassTable(labels);
57  ui->nclass->clear();
58 
59  //tab input/output
60  ui->input->clear();
61  ui->msknodata->setText("0");
62  ui->output->clear();
63  ui->nodata->setText("0");
64  ui->ct->clear();
65  //tab classifier
66  ui->coef0->setText("0");
67  ui->nu->setText("0.5");
68  ui->kd->setText("3");
69  ui->label->setText("label");
70  ui->cv->setText("0");
71  ui->gamma->setText("1");
72  ui->ccost->setText("1000");
73 }
74 
75 void MainWindow::on_actionTraining_triggered()
76 {
77  QString qstraining = QFileDialog::getOpenFileName(this, "Training");
78  ui->training->setText(qstraining);
79  this->on_training_returnPressed();
80 }
81 
82 void MainWindow::on_actionMask_triggered()
83 {
84  QString qsmask = QFileDialog::getOpenFileName(this, "Mask");
85  ui->mask->setText(qsmask);
86 }
87 
88 void MainWindow::on_actionOutput_triggered()
89 {
90  QString qsoutput = QFileDialog::getSaveFileName(this,"Output image","","*.*");
91  ui->output->setText(qsoutput);
92 }
93 
94 void MainWindow::on_actionInput_triggered()
95 {
96  QString qsinput = QFileDialog::getOpenFileName(this, "Input");
97  ui->input->setText(qsinput);
98 }
99 
100 
101 void MainWindow::on_actionColor_table_triggered()
102 {
103  QString qsct = QFileDialog::getOpenFileName(this, "Color table");
104  ui->ct->setText(qsct);
105 }
106 
107 void MainWindow::on_toolButton_input_clicked()
108 {
109  on_actionInput_triggered();
110 }
111 
112 void MainWindow::on_toolButton_mask_clicked()
113 {
114  on_actionMask_triggered();
115 }
116 
117 void MainWindow::on_toolButton_output_clicked()
118 {
119  on_actionOutput_triggered();
120 }
121 
122 void MainWindow::on_toolButton_training_clicked()
123 {
124  on_actionTraining_triggered();
125 }
126 
127 void MainWindow::on_toolButton_ct_clicked()
128 {
129  on_actionColor_table_triggered();
130 }
131 
132 void MainWindow::on_training_returnPressed()
133 {
134  //eventually read classes from vector file to fill in table...
135 }
136 
137 void MainWindow::setClassTable(const QStringList &labels)
138 {
139  QStandardItemModel *model = new QStandardItemModel(labels.size(),4,this); //nlabel rows and 4 columns
140  model->setHorizontalHeaderItem(0, new QStandardItem(QString("label name")));
141  model->setHorizontalHeaderItem(1, new QStandardItem(QString("class nr")));
142  model->setHorizontalHeaderItem(2, new QStandardItem(QString("prior prob")));
143  model->setHorizontalHeaderItem(3, new QStandardItem(QString("balance (optional)")));
144  for(int ilabel=0;ilabel<labels.size();++ilabel){
145  QStandardItem *firstCol = new QStandardItem(QString(labels[ilabel]));
146  model->setItem(ilabel,0,firstCol);
147  QStandardItem *secondCol = new QStandardItem(QString::number(ilabel+1));
148  model->setItem(ilabel,1,secondCol);
149  QStandardItem *thirdCol = new QStandardItem(QString::number(1.0/labels.size()));
150  model->setItem(ilabel,2,thirdCol);
151  }
152  ui->tableView_labels->setModel(model);
153 }
154 
155 void MainWindow::on_pushButton_run_clicked()
156 {
157  try{
158  ui->commandLineEdit->clear();
159  ui->consoleEdit->clear();
160  QString program = "pksvm";
161  if(ui->training->text().isEmpty())
162  MainWindow::on_actionTraining_triggered();
163  if(ui->training->text().isEmpty()){
164  QString qsError="No training vector file selected";
165  throw(qsError);
166  }
167  if(!ui->input->text().isEmpty()){
168  if(ui->output->text().isEmpty())
169  MainWindow::on_actionOutput_triggered();
170  if(ui->output->text().isEmpty()){
171  QString qsError="No training vector file selected";
172  throw(qsError);
173  }
174  }
175 
176 // QList<QCheckBox*> qcheckBoxList = this->findChildren<QCheckBox *>();
177 
178 // for(QList<QCheckBox*>::ConstIterator qcbit=qcheckBoxList.begin();qcbit!=qcheckBoxList.end();++qcbit){
179 // if((*qcbit)->isChecked()){
180 // QString qsOption;
181 // qsOption+=" --";
182 // qsOption+=(*qcbit)->objectName();
183 // program+=qsOption;
184 // }
185 // }
186 
187  QStringList qslBalance;
188  for(int irow=0;irow<ui->tableView_labels->model()->rowCount();++irow){
189  QString qsOption;
190  qsOption+=" --class ";
191  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,0)).toString();
192  qsOption+=" --reclass ";
193  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,1)).toString();
194  qsOption+=" --prior ";
195  qsOption+=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,2)).toString();
196  program+=qsOption;
197  if(ui->tableView_labels->model()->columnCount()>3){
198  QString qsbalance=ui->tableView_labels->model()->data(ui->tableView_labels->model()->index(irow,3)).toString();
199  if(!qsbalance.isEmpty())
200  qslBalance << qsbalance;
201  }
202  }
203  if(qslBalance.size()){
204  for(int irow=0;irow<ui->tableView_labels->model()->rowCount();++irow){
205  QString qsOption;
206  qsOption+=" --balance ";
207  if(qslBalance.size()==ui->tableView_labels->model()->rowCount())
208  qsOption+=qslBalance[irow];
209  else
210  qsOption+=qslBalance[0];
211  program+=qsOption;
212  }
213  }
214 
215  QList<QComboBox*> qcomboBoxList = this->findChildren<QComboBox *>();
216 
217  for(QList<QComboBox*>::ConstIterator qcbit=qcomboBoxList.begin();qcbit!=qcomboBoxList.end();++qcbit){
218  QString qsOption;
219  qsOption+=" --";
220  qsOption+=(*qcbit)->objectName();
221  program+=qsOption;
222  program+=" ";
223  program+=(*qcbit)->currentText();
224  }
225 
226  QList<QLineEdit*> qlineEditList = this->findChildren<QLineEdit *>();
227 
228  for(QList<QLineEdit*>::ConstIterator qlbit=qlineEditList.begin();qlbit!=qlineEditList.end();++qlbit){
229  if(!((*qlbit)->text().isEmpty())){
230  QString qsOption;
231  qsOption+=" --";
232  qsOption+=(*qlbit)->objectName();
233  qsOption+=" ";
234  qsOption+=(*qlbit)->text();
235  program+=qsOption;
236  }
237  }
238 
239  ui->commandLineEdit->setText(program);
240 
241 // QProcess *myProcess = new QProcess(parent);
242  QProcess *myProcess = new QProcess(this);
243  myProcess->start(program);
244  myProcess->setProcessChannelMode(QProcess::MergedChannels);
245  this->setCursor(Qt::WaitCursor);
246  myProcess->waitForFinished(-1);
247  this->setCursor(Qt::ArrowCursor);
248  QMessageBox msgBox;
249  QString p_stderr = myProcess->readAllStandardError();
250  if(!p_stderr.isEmpty()){
251  msgBox.setText(p_stderr);
252  msgBox.exec();
253  }
254  QString p_stdout = myProcess->readAll();
255  ui->consoleEdit->insertPlainText(p_stdout);
256  delete myProcess;
257  }
258  catch(QString qsError){
259  QMessageBox msgBox;
260  msgBox.setText(qsError);
261  msgBox.exec();
262  }
263 }
264 
265 void MainWindow::on_pushButton_restore_clicked()
266 {
267  setDefaults();
268 }
269 
270 void MainWindow::on_commandLinkButtonPrepareTable_clicked()
271 {
272  int nclass=ui->nclass->text().toInt();
273  QStringList labels;
274  for(int iclass=1;iclass<=nclass;++iclass){
275  QString lstring="label";
276  lstring+=QString::number(iclass);
277  labels << lstring;
278  }
279  setClassTable(labels);
280 }
pktools-2.6.6/doc/html/classqgis_1_1pkcrop_1_1pkcrop__inherit__graph.png0000644000113200011300000000642112616110567023302 00000000000000‰PNG  IHDRp¬0d5bKGDÿÿÿ ½§“ ÆIDATxœí}LSWÇÏ¥¥4¾´Šè`´åE ‹Y4ÙVþLÐøF„ea›ÂÞ´˜)é ›nPgVgèÜ”@ ›®S(<àP¡ÀŒ+hå¥Ú{Ÿ?Ξ›Z°Ð‡–rëùüAÎùõw~÷{ûåž{˽ô`AÄ‚ÇÍÙ³ùD OÔùD èÖ_6 8ŽÏšg___ooo+ 3ø¤Óé?~l½bŽètºþþþ9ù ·“$Ä4üùçŸ3æ ó5@>Qä5@>QGù¤V«1 ›ÏRŸþ9†a¹¹¹öÒð´á†©Õêÿ»ìÿǼO]]]Ç• ‚(--õ÷÷—Édöª¹lÙ²ÌÌLàHÙ³g^}ÂqüñãÇŽ¨ÜÚÚzçÎ’’’æææööv»Ôäp8ðètœìÙcŸàüPYY²|ùò÷Þ{o||œ|• ˆDFF>zôhÍš5€çž{¾488¸k×.‡Ãår8`0ž$‘Ëå/¾ø"“ÉäñxR©”Œ—––FEEÅÄÄ„††N=¤‚(,, c±Xëׯ¯ªª‚ÚÔmÁ}©­­õ÷÷?{ö,L³ ¸zõª@ ðôôÌÉÉ ÃΜ9³råJooïÜÜ\©TÈf³:4÷wøß}°‚F£Q(Ös:::±±±íííJ¥R deeÁ Žã¤Id&90999::º³³³¥¥%"""++kÚ 9jddÄÃã°°°¯¯¯¤¤„N§ŒŒãx`` D"!âÓO? 7FÄéÓ§ýüü~ùå—šš@ãOÛV\\\]]]ss3L³ xã7t:]yy9î`Û¶m:®¸¸°uëVN'‘HÈ+ܾ}ûöíÛÖsìæSKK ìÊd2@ƒ€{÷î™gÂöÄÄF#õUTT‚iƒä(­Vëîî~âĉþùÇñááa“ÉD„R©¤Óéðíhll´¶¶šo.""â‡~ Ÿ?`e[p_ÈáS}ºvíA&“ ÐÑу*• î—E&Xa6>Ùíü¡¡¡>„í[·n­[·.;;{j¾F£1™L|>vÁǧ ’C<== …R©är¹QQQ¿þú«›› ´´Ôh4r8 ÃV­Z°˜ú:;;#""ÈnXXØÓ»`}g}}}pë$K—.¸»»[´í‚Ý|‚¿t€ööv¸¹\^XXXZZªP(,òW¬XA£Ñººº`·³³ÓÏÏoÚ 9D¯×ã8~á­V»wïÞÍ›7kµZ“É$“Éòòò†ÿ‡H$’Éd„ÙóæC»sçÎÓÀöŒï¯½>rØ€õÃmöóžP(ìèè¸yófPPÐáÇÍç ±X¬×ëapxxÆ“’’¢££»ººZ[[ÃÃÃ>88X,ONN¾úê«K–,q­V»cÇ///Ÿýû÷ëõúiƒæ¥d2ŸÏg0¡¡¡•••A¤¦¦ÆÆÆšëÁqœÏçgff’M&S~~>ŸÏg³Ù6l¨¬¬ôööžq[dÛB6µ}²žã\äryss3Ù-++‹ŒŒt¢ æõ:b!ÓÒÒ²}ûv•J566¦T*:”’’âlQ¶1«û„Öa±X©©©s¯ã8222ÆÆÆâããx<Þž={¸à©`„Õç,ûûûÛÚÚÖ­[7_zžE൨õ›æÏļç Ÿ¨ò‰ Ÿ¨Á¬®÷z{{­ãYÆ`00™Lë93øäááa˜½î¼Í8N|ûmã–-!~~K­Å–-[f=aŸØlvTT”ýô8¥²óÆK!!¼ääuÎÖbO\íütñb#üi4ºÔ3ñ.åÓÄ„±¢¢ 044V_ÏÙrì‰KùtíÚݱ±qæVQÑèl9öÄ¥|*/o¤ÑÜF#þóÏ-zý„³Ù ×ñittüÊ•ÛF£ vÇÇ55mΕdG\Ç's“nnXyyƒõØ×ñ©¼¼Áü±£W(îêtz'J²#.â“V;Z_ßn2=q-NÄåË-Î’d_\ħªªÿL qá‚‹L}.âSYÙ­©7ðÚá9§366áãÃ"»##ãL¦;þï¯àü?ºêfxŽ…Šøúî/,Üù曑ÎbO\aÞ{@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>Qä5@>QäE0ÿÒù€€g˱þnn‹œ­b®0Œß~û´æ‰ÿϽÿ~BB\vá\Ž9ÒÓÓCv-ÿ:,, }«üBàÈ‘#æ]t~¢È'j€|¢È'jà(Ÿzzz„B¡³†Ï§ °ÀQ>-Y²dÛ¶m*þ â(ŸØlö¾}ûTüÄ6Ÿ‚¸xñâÎ;7nÜøî»ï655 …B‚ .]º´k×®M›6‰D¢ßÿ](šÏ7nÜØ»wolllRRÒÕ«W-jÂÌë×¯ïØ±cË–-'Ožœœœ4ßbAAAJJÊÐÐÉdúî»ïãããsrrFFFÈá*•*11±µµudd$77÷­·ÞJHH(((˜˜˜°^!˜ ¶}_Xuuõ÷ß/‰ÂÂÂÔj5\ÝüòåËR©4###88X­Vççç›1 YYYéé鯼òÊüñÅ_¼öÚkS—ýøé§Ÿrrr†‡‡;Æb±bbbà{$‘HT*U^^‹Å’Édõõõ999†?~üܹsiiipø?þøÑG}ùå—Z­¶°°P¯×=ztÑ¢E°”Eý;w.4Ö±íx*//OKK[»v­——×êÕ«ájŒ0øòË/³ÙìU«VíÞ½Û|Èää$Az½žÁ`lذA.—{xxL­üÎ;ïp¹Ü•+W¦¤¤ÔÔÔÀ`QQ‘L&‹Å, P]]½gϘ™™i¾Pܾ}û^zé%:^WW—žžîããÃãñvïÞM–š¶þ‚`Û|êë냋ØCx< ··700 ¾ð æC–.]šŸŸßÖÖ–ðÁ´´´L»˜3—Ë… ÿؾwï^ddä¹sç`W£Ñik×®%‡ûûûàºïäjØ~~~d©ië/(Ö±Í'‡ÓÙÙIvÿúë/ÀŠ+º»»Éàýû÷͇Œã8ž••%—Ë7nÜøÉ'Ÿ O­L®­þàÁ///ØÎÎΉDuuuMMM//¯¿ÿþ¾¤V«É·@§Óžžžnnn}}}0ØÛÛËáp¬Ô_P¬c›Oqqqׯ_×jµ7oÞ,**ÄÇÇK$’††N×ÔÔtöìYó#ðƒÖ×׎ŽNNNÒét8ïUWWŽŽ’i§Nêéé¹{÷nqqñ믿ƒL&óùçŸOJJÊËË›˜˜ˆ-..îîîîîîþꫯ4…<:. ¿þúë¾¾¾îîî’’xn˜¶¾ÓØ„m׉‰‰&“é›o¾äñx©©©G‡ s …‡‡§¥¥?~œÂ`0>þøc‰DÒßßïëë+‹ àĉ‘‘‘‹/†i111~ø¡Á`ˆŽŽNNN6Ÿ’’’jkkÏŸ?Ÿœœl0ôññ‰‹‹Û¼yóì‡/^¼Ø¦|[™±¾Ó̆9Í{Çaÿy1 Ÿ¨ò‰ Ÿ¨åõžT*­ªªrŠ„žðI$=xðÀYRæ­^½šìºà:(. :?Qä5@>Qä5ø/çW†IEND®B`‚pktools-2.6.6/doc/html/classImgUpdaterGdal__coll__graph.map0000644000113200011300000000107212647437044020715 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksetmask_1_1pksetmask__coll__graph.png0000644000113200011300000000736112616110567026061 00000000000000‰PNG  IHDRíp}×`EbKGDÿÿÿ ½§“¦IDATxœíÝyPS×ðË ² „‚H;tk;SR)…R+”es)ÈRF¨ÑZ-qÚíX˜.JEÇXJFA)*>ÁÁ*TyHQYë¤@‰°$÷¾?î{yi hjÒÓßççÞýç~oøN8ÄDi$I"tœž¶ Ðc€è1Àôà€®íª™™™ééé!BÛA0ggggee¥í*б‹D¢ññqÝzˆuŽH$Õ­YÇzLY³f¶#àì×_Õv•Áúàz p=8€üSzÜÛÛK£ÑþΩ>ûì3–››«® ÊN§Ñh½½½yZ<üSz¼¨þþ~&“©‰™I’,//wttäóùêšsåÊ•{öìAšŒ­»þÑ=&b||\3ߺuëöíÛ%%%íííÝÝÝj™“ÉdRÏîš‹­»0ì1õ󷪪ÊÝÝÝÚÚ:55uvvVöU’$322¼½½ÿøã—_~!dccC}ibbbÛ¶mL&ÓÁÁ!##cffFÙ Luuõ /¼`llìââÂãñdãååå>>>~~~ Ÿ’I’är¹žžžæææ¯½öÚ¹sç¨ÃÂkQ÷réÒ%GGÇãÇS‡)ÄFÕÖÖ²X, ‹œœj„F£•––®^½ÚÊÊ*77—Çã9;;3Œ¨í^VH222ÒÐаô1===!ÿîîîææf‹Åáp¨A‚ d%–);1::zãÆ}}}^^^gÑAÙY“““FFF\.W ”””ÐéôÉÉI’$ ‚pvv.,,$Iò“O>Y³f|0’$‹ŠŠìíí/^¼866VWWÇb±¨qe× ¬¯¯ooo§Sˆzë­·D"QEEBˆº5„Pdd¤H$*..F…‡‡‹D¢ÂÂBÙKèìììììTí£mØö¸££ƒÚåóù,‹ÌÌÌDݽ{WþHj{nnN___öý«¬¬d±X‹ÊÎ …‡zðàA=’J¥$I677Óétª.­­­¡[·nÉ_ÎËËë‡~.++C-q-ê^d§/ìñåË—I’”J¥¡žžj°­­º/…mê€%èb1\WPÜÜܨ ÁÁAj»¥¥Å××7;;{áñ###R©ÔÕÕ•Úe±Xƒƒƒ‹ÊN±°°hhhhnnvppðññ¹r办žB¨¼¼\"‘0™L¶víZ„ÂÒ¢¯¯ÏËËK¶ëéé©,€ì–¾Y;;;„uu333„Â6–°í1õ¤…êîÍ¡êêj.—[^^ÞÐРpüªU«ôõõûûû©Ý¾¾>{{ûEe§ˆÅb‚ N:% ãââ6mÚ$ ¥R)ŸÏÏËË{ô?ééé|>Ÿ”ûü˜“““ü{nß¾­,µýØþ©ë%EÝ…mÓÒÒz{{[ZZöíÛC ®X±ÂÝÝ}ïÞ½III²ßØ&''B©©©û÷^tPv æïï_QQ!‰æææ LLL®\¹2::mú?QQQ===Ôê–’’’’™™Y[[;>>^__Ïáph4ÚÒ×ZˆŠ þKÛ Õ<ùú¸¸¸ØÉɉÉdîܹS,˯)ÅbñsÏ=—••5??ÿꫯšššRãB¡066ÖÒÒÒÖÖv×®]b±xÑAù©ø|¾«««¡¡¡‡‡GUUI’‰‰‰þþþòy‚puuݳgìD©TšŸŸïêêÊ`0ªªª¬¬¬{-Ù¶Bl$·äErëã…ƒ ÛÊèâúÛÿ-qþ¢êêêöövÙîéÓ§½½½µ˜G.öÛuÅrÖÑÑÓÖÖ6==ÝÜÜ|àÀøøxm‡Òm:ù>ú¥™››'&&j;ÅR233§§§ƒƒƒÇÆÆ\\\Þÿýexù£‘:õï°ŒŽŽvuuùúúj;Ψ×RtëC7°®8€@ Ç:ùzÅðð°¶#àlffÆØØXÛ)T£c=622¢Ñhêzgú߀ È#GZCBÜííÍ´E+W®ÔvÕèX †¶S¨ ¹¹ïÚµŸÜÝ]¢£}µg°>Ö¬3gZ©?%ø7é4z¬Ass’ÊÊ›¡‡§ïj;ΠÇtùòééY„¾¾^ee«¶ãà z¬A­úúz!‰„¨©é‹ç´[ÐcM™ššý׿:%)µ;;+©«ëÒn$ŒA5E¾Ä!==ZEÅ -æÁôXS**nÈlN"!îˆDb-FÂôX#„Â©ÆÆn©ôO¯µ‘$yáB‡¶"á z¬çÎý{á I’§NÁÒB# ÇqútËÂ(ÙÜÜ72òP+‘ð=V¿áá‰ÖÖ{±Èmôõõª«yªO z¬~ÕÕíÊ>,&‘H+*à/DÔOÇÞ'¤¦§çlmÍe»““³ÆÆtúŸ2þñÿôFèØçLu‘Ý..wëÛo{k;Î`]p=8€@ ÇÐc€è1Àôàz p=8€@ ÇÐc€è1Àôàz p=8€@ ÇÐc€è1Àôàz p=8€@ ÇÐc€è1Àôàz °@ÊqrrÒv 9êé™h;n þùgYuÿôÿƒÜ»w/,,ÌÓÓS[áxB’í*þ?7žžž¾¾¾k"TwðàAù]X@ ÇÐc€MõxhhˆÍfkëôå™DþZ*œîE¦zljj©Þ9ÁæÍ›Õ;§¦ébfe–ó½hªÇ #!!A½s!‰Ô;§¦ébfe–ó½¨Öc’$Ïœ9³uëÖ7ß|3%%åæÍ›l6›$ÉŸ~úiÛ¶mAAAéééMMMl6[þ‡Åµk×âââüýý£¢¢jkk椎¼zõjlllHHÈwß}7??/Å‚‚‚øøø‡~ðÁ¡wÞy‡úÒäädnnîæÍ›ÃÂÂ æææ” ʨ+‰²©$ —Ë ár¹‰D!3›Í®©©ÙºukpppYYYmmmdddPPPii)u@SSÓŽ;BCCËÊÊ[!–÷ò$TëñùóçOœ8Ïãñ¶lÙ’““ƒºpáÇKII)++‹ŽŽ>|ø°ü)333'88¸¼¼<66ö«¯¾š™™Y8óÙ³gsrr²³³ùåÙ=“$YXXØÖÖ–——Ç`0Ž9‚ª¬¬¤¾úÍ7ߌq¹Ü/¿ü²¥¥åÇT6¨ö$ʦ:}ú´@ (,,üúë¯ÛÚÚŽ;¦!ÔÚÚZPPPTTÔÔÔTRR’œœÌãñD"Ñôôô§Ÿ~êæævòäÉää䢢¢‰‰‰%b+¤Âû^–¦Z+**’’’6lØ`ii¹~ýúøøxÙàºuë ÆÚµk·oß.ÊüüøÝËÒTë±@ `±X²]„Ððð°³³³lðÙgŸ•?ÅÌÌ,??¿««+,,ìÃ?ìèè Ñh gvpp 6ÇÆÆ¨í»wïz{{ŸÚ»wïK/½-Ѩ¨(„PYY™ÍóÏ?J§¥¥1™Ì¤¤¤Ý»w¯[·Ž:kÑAµ'Q6U\\œ‰‰ÉŽ;víÚåêꚘ˜¨yi¦¦¦ÉÉÉŸþù–-[lll6nܘ™™©ìZ Sav/*¡‘$ùÿ-++ëÉß·944“mmm-[l466òx¼¢¢"•&ihhP%¶F,Ÿ$O§{Y›ÍæóùáááÔ®þ¤¿¿ÿ‹/¾èéé™íêê*-- zúixrªýž·¨÷Þ{offfÿþý¶¶¶›6mzòÓW¬X¡Òñš³|’<=œîåI<ÕºmQÿº­ƒ@ ÇНWðx¼sçÎi% ÙŸzœžž~ÿþ}mEàɹ¹¹­_¿^¶û§×ÝÐQ°>8€@ Çÿ/^jÂ*÷IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid-members.html0000644000113200011300000002233712647637662025461 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkextract_grid.pkextract_grid Member List

This is the complete list of members for qgis.pkextract_grid.pkextract_grid, including all inherited members.

BNDNODATA (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
BUFFER (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
cliName (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_grid
defineCharacteristics (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_grid
EXTRA (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
FORMAT (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
GRID (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
group (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_grid
INPUT (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
name (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_grid
OUTPUT (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
POLYGON (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
processAlgorithm (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_grid
RULE (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
RULE_OPTIONS (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
SRCNODATA (defined in qgis.pkextract_grid.pkextract_grid)qgis.pkextract_grid.pkextract_gridstatic
pktools-2.6.6/doc/html/classMainWindow__coll__graph.md50000644000113200011300000000004012616110566020033 000000000000002de25f242e69277e451feaec96359d9fpktools-2.6.6/doc/html/classVector2d__coll__graph.md50000644000113200011300000000004012616110566017447 00000000000000c9cd762b7b49852773a75f82f00f6e5epktools-2.6.6/doc/html/classSVC__Q__coll__graph.png0000644000113200011300000000763312616110567017150 00000000000000‰PNG  IHDRM» ´bKGDÿÿÿ ½§“PIDATxœíkPWÇÿ!˜ â+7´[m‹Â@+xA¥Ð~CQ¼T;ÖKýP§­¬êPœVVk[•w:zKAE;5â ¢¨-/ ‚Šˆ¶A(B!çýÀ°ºlbÂ$k{~3Œæœ“³Ïþ²g÷l²û¬„BÀèNŽàE„I£€I£€I£À¹oÁÚµkñÇ8"Qâââ‚Ý»w# €+“ô=zJ$„‡‡ÃßßßÌÌL¨T*ÌŸ?Ÿ+liðé§Ÿòý›‘H$‚2¶O£€I£€I£€I£`P¤=yò‰‰‰˜4iÜÜ܆o¾ùƒk#‘H0vìX˜:Õ…D"AMM̀⨩©1¹ãl,íï¿ÿFhh(.]º„­[·¢´´6lÀþýûîîn®m]]ÊËËyïonn†F£±jYµµµðöö6[ïî¤$ºé¤ˆJ¥ê[l–õëדÈÈHb0xåmmmdôèÑ$55•ë7&&†lܸ‘×.--ÄÆÆ¤ººú¹Ëª®®&&B¶)¦| xKÛ¿?6mÚ©TÊ+6lqàÀ®,>>jµš7D9‚yóæñÞ›››‹àà`¸ººB¡P`ëÖ­€ððp€ŸŸ€§Ã±  HKKã†çñãÇñòË/£¹¹pèÐ!Œ7Ož<è*lKknn&È£GLÖOOO®ßÊÊJâççG®]»F!äñãÇÄÕÕ•üùçŸÜ–ÖÚÚJd2Y¾|9¹wïÙ¿?@>|(ØÒz_ÇÆÆ’ÂÂBRVVÆ«_ºt)Y¶lyðàñõõ%—.]²j½,ù0yFÐ_Ìí| !przº1K¥RÌ;jµAAAÈÍÍÅÔ©Sáååŵ‘Ëå(//‡¿¿?†Êε´´˜]þ¶mÛ(8ìÚµ ˆŽŽÆš5k6ÕäÐðtww‡ŸŸÊÊÊLÖ—••aüøñ¼²øøxdff‚brhÊd2TUU!&&!!!HKK³Gße<ߪU«póæM¬Y³Æº•²k6Çç±nÝ:2}útÞ !!| Ø´iûŒ+‹‹‹Ã矎úúzTTT &&»wïîw߃ÕO°‹4¹\Ž´´4dddàÔ©S€-[¶`øðáFTT&Mš„mÛ¶õ»ïÁê§?ëÖµZ ˜MÿðO¢÷©l–¾;dçž0i0i0i0i0i0iX}î9gÎ[Æ!Àht‚““}sÜ^¿~Ó¦M³ØÎ¢´É“'#!!÷ @[ÓÝ-ÁåË Œ§…——ÎnË6mšuî×w'vB¥ºLŠOÈâÅÿut(&å>­' µçÎý--íŽG€è¤=zô7ŠŠªÐs= pü¸éGÆ9ÑIËÍ-ã~z#„àÈ‘G$DtÒÔê+\nH£‘àÊ•z46Šë¢’vçÎ_¨¨¸ËK¨)•:!'皣"*iÇŽ]ã倀în#23Å5DE%-3³]]ü -!••¸u롃¢"i••¨©yˆÞ£æ³ "ENN©ýƒ2ƒh¤åä”B&3}‚ÒÕÕÇ/Û9"óˆBZÏÔâ ôzƒÙ6 ͨ¨¸kǨÌ# i¥¥õ¸ÿùÓ 1 QQHëÉ/Lælö¯»ÛˆìlqL=D‘†zÆŒñpv–òÊÔêL™ò*üý=¹2//7{‡fa`–†ú“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“F“FàJH½^ÇC§³ß}–æÈÏÏǃ޽ª;::šË›ÄÑ÷*¿¬¬,»§~óßÂ… WB ¶4ƒ¡ç²ô3gÎXüþé$''s>ž…íÓ(`Ò(`Ò(`Ò(”›/:::––F­V‹‘#GbÖ¬YX¼x1d2²³³qàÀdffò²B€  ..ð×_aïÞ½¸qãZZZ0jÔ(,^¼‘‘‘VÇ£ÓéžžŽË—/ãþýû=z4"""©Tj¹ Ê–öÃ? ºº_}õT*qᤦ¦f̘­V‹7nðÞW]]Gaúôé€ÖÖV¬X±r¹›7oFjj*¢¢¢’’‚’ën”mooÇêÕ«ñûï¿cÕªUøù矱hÑ"äååA©TÂhx‚”A‘VTT„•+WbìØ±pwwÇĉ±víZ\¸pàááœ={–÷>Fƒ‰'ÂËË °oß>C©Tb„ 5jæÏŸ¸¸8¨T*«bÉÈÈ€»»;vî܉ɓ'ã•W^Add$RSSÑØØˆ“'Ox}Eš««+rrrÐÚÚÊ•Mœ8‘·¢QQQ8wîï“>þ^{í5“õcÇŽÅíÛ·û»zEZhh(T*víÚ…ÀÀ@œ>}‹-BAAׯÍÍ áááÜ™ÆùóçàuF:|s}BÌæËíîA§Ó¡°°0aÂ,]º¿üò –,YÂzyvˆj4DEEquLJ‡‡êëë˨¬¬ÄG}„ÎÎÎçÆâææOOOÁ³z©©©1¹%÷—K#„`Ë–-¨­­åÊ$ Þzë-A&¬)S¦@§Ó!??·nÝBDD¯~êÔ©P©T‚ô°yyy0 Ëåã™={6222xûΔ”ààÁƒ˜5kÍjò°´¡C‡"::ÉÉɸxñ"qóæMìÝ»W \.GDD~úé'ÃÝÝWÿᇢ¼¼_ý5nÞ¼‰ÚÚZ¤§§ãèÑ£X±b…Uñ,[¶ Z­ëׯGII îÝ»…B-[¶@¯×ã½÷Þè* “÷&îÏ·F£¿þú+4 àáá™3gâƒ>€L&ãµ½té6lØ¥R‰wß}WÐWSS7¹íèè@@@Þÿ}¼ýöÛVÇ£Óé°oß>””” ¡¡ÞÞÞˆŠŠÂõë×áééiuêýäädŒ9R,xP¤½( TUUáõ×_·ª½9iÿªsOggg«…=·ŸAˆÅ®<;6…=FÈ 'M »Õð,˜4 ˜4 ˜4 ˜4 GÏÞ¯ƒ-Úÿ-$$$Êg:§N²kÚi1‚1cÆðÊ,>˜†!„íÓ(`Ò(`Ò(p`ÝÃÇÿ­.Ã4ÃLfIEND®B`‚pktools-2.6.6/doc/html/classImgUpdaterGdal.html0000644000113200011300000016607312647637662016441 00000000000000 pktools: ImgUpdaterGdal Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Inheritance diagram for ImgUpdaterGdal:
Collaboration diagram for ImgUpdaterGdal:

Public Member Functions

 ImgUpdaterGdal (const std::string &filename)
 
void open (const std::string &filename)
 
void close (void)
 
 ImgUpdaterGdal (const std::string &filename, const GDALAccess &readMode=GA_Update)
 
void open (const std::string &filename, const GDALAccess &readMode=GA_Update)
 
void close (void)
 
- Public Member Functions inherited from ImgReaderGdal
 ImgReaderGdal (const std::string &filename, const GDALAccess &readMode=GA_ReadOnly)
 
void open (const std::string &filename, const GDALAccess &readMode=GA_ReadOnly)
 
void setScale (double theScale, int band=0)
 
void setOffset (double theOffset, int band=0)
 
template<typename T >
void readData (T &value, const GDALDataType &dataType, int col, int row, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, double row, int band=0, RESAMPLE resample=NEAR) const
 
template<typename T >
void readDataBlock (Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const
 
template<typename T >
void readDataBlock (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const
 
template<typename T >
void readData (std::vector< T > &buffer, const GDALDataType &dataType, double row, int band=0, RESAMPLE resample=NEAR) const
 
void getMinMax (int startCol, int endCol, int startRow, int endRow, int band, double &minValue, double &maxValue) const
 
void getMinMax (double &minValue, double &maxValue, int band=0) const
 
double getMin (int &col, int &row, int band=0) const
 
double getHistogram (std::vector< double > &histvector, double &min, double &max, unsigned int &nbin, int theBand=0, bool kde=false)
 
double getMax (int &col, int &row, int band=0) const
 
void getRefPix (double &refX, double &refY, int band=0) const
 
void getRange (std::vector< short > &range, int Band=0) const
 
unsigned long int getNvalid (int band) const
 
- Public Member Functions inherited from ImgRasterGdal
std::string getFileName () const
 
int nrOfCol (void) const
 
int nrOfRow (void) const
 
int nrOfBand (void) const
 
bool isGeoRef () const
 
std::string getProjection (void) const
 
std::string getProjectionRef (void) const
 
std::string getGeoTransform () const
 
void getGeoTransform (double *gt) const
 
bool getBoundingBox (double &ulx, double &uly, double &lrx, double &lry) const
 
bool getCenterPos (double &x, double &y) const
 
double getUlx () const
 
double getUly () const
 
double getLrx () const
 
double getLry () const
 
int getNoDataValues (std::vector< double > &noDataValues) const
 
bool isNoData (double value) const
 
int pushNoDataValue (double noDataValue)
 
int setNoData (const std::vector< double > nodata)
 
CPLErr GDALSetNoDataValue (double noDataValue, int band=0)
 
bool covers (double x, double y) const
 
bool covers (double ulx, double uly, double lrx, double lry) const
 
bool geo2image (double x, double y, double &i, double &j) const
 
bool image2geo (double i, double j, double &x, double &y) const
 
double getDeltaX (void) const
 
double getDeltaY (void) const
 
GDALDataType getDataType (int band=0) const
 
GDALRasterBand * getRasterBand (int band=0)
 
GDALColorTable * getColorTable (int band=0) const
 
std::string getDriverDescription () const
 
std::string getImageType () const
 
std::string getInterleave () const
 
std::string getCompression () const
 
GDALDataset * getDataset ()
 
char ** getMetadata ()
 
char ** getMetadata () const
 
void getMetadata (std::list< std::string > &metadata) const
 
std::string getDescription () const
 
std::string getMetadataItem () const
 
std::string getImageDescription () const
 
- Public Member Functions inherited from ImgWriterGdal
void open (const std::string &filename)
 
void open (const std::string &filename, const ImgReaderGdal &imgSrc, const std::vector< std::string > &options=std::vector< std::string >())
 
void open (const std::string &filename, int ncol, int nrow, int nband, const GDALDataType &dataType, const std::string &imageType, const std::vector< std::string > &options=std::vector< std::string >())
 
void close (void)
 
void copyGeoTransform (const ImgReaderGdal &imgSrc)
 
void setProjection (const std::string &projection)
 
std::string setProjectionProj4 (const std::string &projection)
 
void setImageDescription (const std::string &imageDescription)
 
void setGeoTransform (double *gt)
 
template<typename T >
bool writeData (T &value, const GDALDataType &dataType, int col, int row, int band=0) const
 
template<typename T >
bool writeData (std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const
 
template<typename T >
bool writeData (std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const
 
bool writeData (void *pdata, const GDALDataType &dataType, int band=0) const
 
template<typename T >
bool writeDataBlock (Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const
 
void setColorTable (const std::string &filename, int band=0)
 
void setColorTable (GDALColorTable *colorTable, int band=0)
 
void setMetadata (char **metadata)
 
void rasterizeOgr (ImgReaderOgr &ogrReader, const std::vector< double > &burnValues=std::vector< double >(), const std::vector< std::string > &layernames=std::vector< std::string >())
 

Protected Member Functions

void setCodec ()
 
- Protected Member Functions inherited from ImgReaderGdal
void setCodec (const GDALAccess &readMode=GA_ReadOnly)
 
- Protected Member Functions inherited from ImgWriterGdal
void setCodec (const GDALDataType &dataType, const std::string &imageType)
 
void setCodec (const ImgReaderGdal &ImgSrc)
 

Protected Attributes

std::string m_filename
 
GDALDataset * m_gds
 
int m_ncol
 
int m_nrow
 
int m_nband
 
double m_gt [6]
 
std::vector< double > m_noDataValues
 
std::vector< double > m_scale
 
std::vector< double > m_offset
 
- Protected Attributes inherited from ImgReaderGdal
std::vector< double > m_scale
 
std::vector< double > m_offset
 
- Protected Attributes inherited from ImgRasterGdal
std::string m_filename
 
GDALDataset * m_gds
 
int m_ncol
 
int m_nrow
 
int m_nband
 
double m_gt [6]
 
std::vector< double > m_noDataValues
 
- Protected Attributes inherited from ImgWriterGdal
std::vector< std::string > m_options
 

Detailed Description

Definition at line 27 of file ImgGdal.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/classCompare__PosValue-members.html0000644000113200011300000000647112647637662020576 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Compare_PosValue Member List

This is the complete list of members for Compare_PosValue, including all inherited members.

operator()(const PosValue &pv1, const PosValue &pv2) const (defined in Compare_PosValue)Compare_PosValueinline
pktools-2.6.6/doc/html/structsvm__model__coll__graph.map0000644000113200011300000000041212616110567020416 00000000000000 pktools-2.6.6/doc/html/pkstatascii.html0000644000113200011300000001770312647637662015074 00000000000000 pktools: pkstatascii
pktools  2.6.6
Processing Kernel for geospatial data
pkstatascii

program to calculate basic statistics from text file

SYNOPSIS

Usage: pkstatascii -i input [-c column]*

Options: [-size] [-rnd number [-dist function] [-rnda value -rndb value]] [-mean] [-median] [-var] [-skew] [-stdev] [-sum] [-mm] [-min] [-max] [-hist [-nbin value] [-rel] [-kde]] [-hist2d [-nbin value] [-rel] [-kde]] [-cor] [-rmse] [-reg] [-regerr]

Advanced options: [-srcmin value] [-srcmax value] [-fs separator] [-r startrow [-r endrow]] [-o [-t]] [–comment character]

Description

The utility pkstatascii calculates basic statistics of a data series in a text file.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string name of the input text file
    c column int 0 column nr, starting from 0
    size size bool false sample size
    rnd rnd unsigned int 0 generate random numbers
    dist dist std::string gaussian distribution for generating random numbers, see http://www.gn/software/gsl/manual/gsl-ref_toc.html#TOC320 (only uniform and Gaussian supported yet)
    rnda rnda double 0 first parameter for random distribution (mean value in case of Gaussian)
    rndb rndb double 1 second parameter for random distribution (standard deviation in case of Gaussian)
    mean mean bool false calculate median
    median median bool false calculate median
    var var bool false calculate variance
    stdev stdev bool false calculate standard deviation
    skew skewness bool false calculate skewness
    kurt kurtosis bool false calculate kurtosis
    sum sum bool false calculate sum of column
    mm minmax bool false calculate minimum and maximum value
    min min bool false calculate minimum value
    max max bool false calculate maximum value
    hist hist bool false calculate histogram
    nbin nbin short number of bins to calculate histogram
    rel relative bool false use percentiles for histogram to calculate histogram
    kde kde bool false Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb
    hist2d hist2d bool false calculate 2-dimensional histogram based on two columns
    cor correlation bool false calculate Pearson produc-moment correlation coefficient between two columns (defined by -c <col1> -c <col2>
    rmse rmse bool false calculate root mean square error between two columns (defined by -c <col1> -c <col2>
    reg regression bool false calculate linear regression between two columns and get correlation coefficient (defined by -c <col1> -c <col2>
    regerr regerr bool false calculate linear regression between two columns and get root mean square error (defined by -c <col1> -c <col2>
    src_min src_min double start reading source from this minimum value
    src_max src_max double stop reading source from this maximum value
    fs fs char field separator.
    r range int 0 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.
    o output bool false output the selected columns
    t transpose bool false transpose input ascii vector (use in combination with –output)
    comment comment char # comment character
    Usage: pkstatascii -i input [-c column]*
pktools-2.6.6/doc/html/classqgis_1_1pkcomposite_1_1pkcomposite-members.html0000644000113200011300000002636112647637662024032 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkcomposite.pkcomposite Member List

This is the complete list of members for qgis.pkcomposite.pkcomposite, including all inherited members.

BNDNODATA (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
CB (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
cliName (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcomposite
CRULE (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
CRULE_OPTIONS (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
defineCharacteristics (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcomposite
DSTNODATA (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
DX (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
DY (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
EXTRA (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
group (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcomposite
INPUT (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
MAXGUI (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
MINGUI (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
name (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcomposite
OUTPUT (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
processAlgorithm (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcomposite
PROJWIN (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
RESAMPLE (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
RESAMPLE_OPTIONS (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
RTYPE (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
SRCNODATA (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
TYPE (defined in qgis.pkcomposite.pkcomposite)qgis.pkcomposite.pkcompositestatic
pktools-2.6.6/doc/html/dir_280a0ba2820d23d6529bf494f1ea3ddd_dep.png0000644000113200011300000000641612616110567020465 00000000000000‰PNG  IHDR'ß.bKGDÿÿÿ ½§“ ÃIDATxœíÝ{P”åð/u:` *"»\$%Me´IOuç4– Vb‰Y¦¢©(áuñR’2^ò–hGÁ2o‘¨x¯±D=ÞE‘XoGžó‡ã{X…wáÁv_ôû™ygö½=Ïï}Þåëû¾îìÚ !ˆˆ$üÅÖQãÅ!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"iM²ó7ß|ƒ+V<¬ZˆÈÊFŒJïo×ï ÅÁƒ?¢k× éˆÈ6Ž;‚Þ½_@JJŠt º€®]ƒ°xñš†6CDV6fLxƒÛà3"’Æ!"i "’Æ!"i "’Æ!‹òó/ [7[—AÄ!‹ªªªpíšÉÖe1@ÀÝHL\…àà ôÄÀÁ8|ø ôz  èÑÃ߯U’Ö4øƒdôhHIY‡%Kâû9ºt ¯¿žDdäHÀ¦M;ñÒKÝñóÏgm\%i ¯@°ví DG‚àà¡U«ÖèÓçï˜8qš­Ë"c€€»JÍ–ùûw´Q5ÔX0@кu[de6[–e£j¨±à3„„ ÆÜ¹4oî„λ#3ó>ûl¦Ù6¥¥·àààh£ I‹ xÿýTVÞAlìT””ÃßÿDGÏĸqïãé§Û¡{÷žèÑ£NÊ·u©¤! 4iÒ“1IY–—gØÛ7Arrª­J# ã3"’Æ!"i ª•——99ü;ÕŽBDÒ D$BDÒ D$BDÒ D$BDÒ D$BDÒ D$BDÒ D$BDÒ D$BDÒ¬ö•†3gF#'‡?LDôgÓëýa0̳J_V ÄÄ•èÞ½'<<<­Õ%Ñc§  ‰‰+½€Q£Æãµ×B­Ù%Ñceóæ 6ÈjýñIc€‘4Ic€‘4Ic€‘4Ic€‘4Ic€‘4Ic€‘4Ic€‘4IÓd€çáâb× ý,µ!Ó‡l]Z¦¥cÒB-..vfSçÎí1rä;(..ªÓþZ8kÒd€Èrvn>úØÖe4*ÕÇìÂ#||Zj¢[JKû YY…8sæ7,Y²7oÞ@Ÿ>]qýú5[—¦9T€¸º¶´ÚW¹=*ªYUUL¦MÔbK®®nhÕª ÜÝ=л÷ß°nÝwhß^‡eËÚº4ÍÑt€lܘ„®]õðõuCdäH”••>p‰X—Û–ÊÊJ,^<AA~ðôl޾}_ÀÑ£?רç½6RS· (È~~­=åååfÛ !0}úD¼øb””ãÎ;˜7Ï€ÀÀvðõuÃÈ‘ï˜ý‹uýú5Œ=>>-ѱãÓ˜>}"ÊËo¸{Ùœ””€=àëë†øøyHN^‡.]¼áååŒ9s¦×©6µ>vìØ†^½ž…»ûxî9’“×=0fÁÁ=þþm”º+**0cÆ$øû·†Ÿ_+̘1 ªçM5k–£gÏgЮú÷ iiÛáâb'uþ,µ©6ö–ÎK]ØÙÙ!<üCìÜù}Ç¥¾ï]µãÓ2MHRR6nÜ ¶cÿþݘ?–T;+W.Â’%q0>EFÆ9DFN…Á¥ºÏêÕ_`ÆíX¿~vïþññÿÿ—Qƒ! ¤cóæt¸º¶Äòåñغõ[$'­[÷âüùsøüóÙÊ>QQøý÷ß°{÷/ظñìÙ“†øøO•õûöíFzú/0æ!&f2ÒÒ¶ãС“ˆ‰™¸¸X³+ƒÚj«­ÒÒ[Áðá£qâÄLœ8 cÆ Cié-³cÞ¹ó0àìÙKʲeË"//{öd`óæt<¸sçÎP»¯¿^¸¸XÌ™³Ç1aÂL:^uKÔÚT{K祮t:_äææ(ó–Æ¥¾ïÝ?c̬B4@HHˆèׯ¿ÈÉ1Yœˆ„„da2 ‹SFF¶ :©,KHH^^Þʺû·U{­×û‰¥KךõñÅ_™µc©oÎGY7vl” Ž9«lããã/7)ó‡ÿªÌ_¾ü‡°··?ýtZYŸ˜¸Ièt>Âd€Ø·ï˜²mMóÙªµ©õa4šDÓ¦MŬYq"7÷ª()©ùù7Eqqe­cvoòõí ²² •ùï¾Û%»¨ž¿€€NbåÊ$³e«Vý[9Žºœ¿ú´©6öjëjšîÕxÿòôô#ÂÙ¹…Åq‘}ïª_]þfª÷ N“ýúõ!!! ‰aÕoe¯/½ÞWyíëÛ—.>°Âb;ù ìb¶¬cÇg•×Õ/32²kì» à7eþøñ#èÕ«,˜ƒ¥K×òóóÌöñó €Ÿ_ ¨è2*++áí­WÖët>fm>ùds@Ó¦Mkœ¯®¦ÚÔúhÑâ)lݺË–Åcî\:wîŠñã'ã•WþQó€Usñâtèàn¶ÌÉÉYuŸÜÜt2[æïÿLÛª¿êçå‰'þZk›jc¯¶îþ>L¦Úk1³ÍÆÖÒ¸Ô÷½[Ÿ1ÓMßÂäädW{}žž^Êü;w……Ûi×®=NŸ>a¶,+ëŒòÚdÊT[ßîîm•ùõë·aÁ‚娴iÜ pwo‹‹/(Ûœ:õåRÙÍ­5ìííqá‚QYŸ››ƒ¶m=,Ö^“šjSëãöí2TUUaíÚ0M {o½õ*®^5YìËÕµ%22²•ñÉͽŠ]»«îãéée6¾pî\¦Ù|]Î_õó¢Ö¦ÚØ«­»¿Ú!° ÁÁÿT–Y—ú¾wë2fZ¤é™6-Fãy?~³fMÁÛo…³s @rr"nÞ¼•+Yl'<üC “šºW®\Bzú‹÷ñ“'dÖwhh˜²ÎÁÁ>>þ7.&|ˆòòÛ4hbc§"3ó423O#**ùùyî^E¼þú DGE^^.23Ocöìi ,5.5Õ¦Ö‡ ƶmßâæÍ¨¨øMš4…ƒƒCíߺõ_åõ«¯@LÌdäççáÌ™“8°/¾ür©j}džÁ…½{wÂd*Á{0oÞ'°³³“:–ÚT{µuµ)))•+—PXX€Ü!C^G^^.FšPçq©ï{Wíø4MËÏ@V¯Þ Úµk/ÜÜZ‰Ñ£#Å¥KåÂdbêÔXáìÜBx{ëERÒ‹Ï@ŠŠîˆ˜˜ùB§óŽ"(èy±k×aÕg ‹})<=½„«kKñÁcDaaÙ÷°……eB¯÷l……·EDÄDѦM[áää,Þxã-‘›{UÙÖh4‰Aƒ†WѺµ»9r¼(,,«ñ¾»¶yµÚ,õ‘,¼½õ¢Y³fÂ×·ƒHJÚòÀ8]¹R!zöì%ŸTú¾xñ†<8\´hñ”pqqï¾û((¸¥zþŠ‹+ÅìÙ …··^899‹—_î+’’¶ˆ–-Ýê|þêÓ¦ÚØ[:/5=©>yxxŠÁâìÙËfÛÕ6.²ï]Kc¦Õg v¢.jŠ[·þÀâÅk,n«×» !!Yó¿Lg4žG÷—´¶¢åÚªKKÛOtêÔYY¶mÛ·ˆ‹‹ÅþýÇ5Ó¦–<¬ã»÷Ët99–oOÇŒ ‡£c3¤¤¤HÕ hü†§3gNbĈ0œ8q ee¥ÈÈ8ŒÙ³§cÈášjSKëñiúal¡ys' :ÂÖeÔHKµYú€SdäT„…½†ââ"´o¯CXذÕ>vlÊÊJj›ZÒX·0DÞÂQ£Á!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"iVýF²¸¸X|õÕ*kvIôX)*ºlÕþ¬ ï½7ªN¿áBDòuxþùÞVëÏj2eJ¬µº""+á3"’Æ!"i "’Æ!"i "’Æ!"i "’Æ!"i ú ™½½=RS· 5ÕåaÕCDVôæ›o6hÿý¸¶ÑhÄÑ£GTÙN·nÝ Óé¤÷oP€ÑãÏ@ˆH„ˆ¤1@ˆH„ˆ¤1@ˆH„ˆ¤1@ˆH„ˆ¤1@ˆH„ˆ¤1@ˆH„ˆ¤1@ˆHZm]5NÿN‡q/­JIEND®B`‚pktools-2.6.6/doc/html/Optionpk_8cc_source.html0000644000113200011300000005137512616145623016463 00000000000000 pktools: /home/kempenep/pktools/vis_studio/base/Optionpk.cc Source File
pktools  2.6.4
Processing Kernel for geospatial data
Optionpk.cc
1 /**********************************************************************
2 Optionpk.cc: source file used for specialization of template class
3 Optionpk defined in Optionpk.h
4 Copyright (C) 2008-2014 Pieter Kempeneers
5 
6 This file is part of pktools
7 
8 pktools is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 pktools is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with pktools. If not, see <http://www.gnu.org/licenses/>.
20 ***********************************************************************/
21 
22 #include "base/Optionpk.h"
23 
25 template<> inline std::string string2type(std::string const& s){
26  return s;
27 }
28 
30 template<> inline OGRFieldType string2type(std::string const& s){
31  OGRFieldType ftype;
32  int ogr_typecount=11;//hard coded for now!
33  for(int iType = 0; iType < ogr_typecount; ++iType){
34  if( OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType) != NULL
35  && EQUAL(OGRFieldDefn::GetFieldTypeName((OGRFieldType)iType),s.c_str()))
36  ftype=(OGRFieldType) iType;
37  }
38  return ftype;
39 }
40 
42 template<> inline std::string type2string(bool const& value){
43  if(value)
44  return("true");
45  else
46  return("false");
47 }
48 
50 template<> inline std::string type2string(std::string const& value){
51  // if(value.empty())
52  // return("<empty string>");
53  // else
54  return(value);
55 }
56 
58 template<> inline std::string type2string(float const& value){
59  std::ostringstream oss;
60  // oss.precision(1);
61  // oss.setf(ios::fixed);
62  oss << value;
63  return oss.str();
64 }
65 
67 template<> inline std::string type2string(double const& value){
68  std::ostringstream oss;
69  // oss.precision(1);
70  // oss.setf(ios::fixed);
71  oss << value;
72  return oss.str();
73 }
74 
76 template<> inline void Optionpk<bool>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo);
77 
78 template<> inline void Optionpk<bool>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo)
79 {
80  m_shortName=shortName;
81  m_longName=longName;
82  m_hasArgument=false;
83  m_help=helpInfo;
84  m_hide=0;
85 }
86 
88 template<> inline void Optionpk<bool>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const bool& defaultValue, short hide);
89 
91 template<> inline void Optionpk<bool>::setAll(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const bool& defaultValue, short hide)
92 {
93  m_shortName=shortName;
94  m_longName=longName;
95  m_hasArgument=false;
96  m_help=helpInfo;
97  m_defaultValue=defaultValue;
98  m_hasDefault=true;
99  m_hide=hide;
100 }
101 
103 template<> inline Optionpk<bool>::Optionpk(const std::string& shortName, const std::string& longName, const std::string& helpInfo,const bool& defaultValue, short hide)
104 {
105  setAll(shortName,longName,helpInfo,defaultValue, hide);
106 }
107 
108 //specialization (only makes sense for T=std::string), generic function throws exception
109 //find a substring in string option (e.g., option is of type -co INTERLEAVE=BAND)
110 template<> inline std::vector<std::string>::const_iterator Optionpk<std::string>::findSubstring(const std::string& argument) const{
111  std::vector<std::string>::const_iterator opit=this->begin();
112  while(opit!=this->end()){
113  if(opit->find(argument)!=std::string::npos)
114  break;
115  ++opit;
116  }
117  return opit;
118 }
Optionpk()
default constructor
Definition: Optionpk.h:198
std::vector< T >::const_iterator findSubstring(const T &argument) const
Definition: Optionpk.h:160
void setAll(const std::string &shortName, const std::string &longName, const std::string &helpInfo)
set all attributes of the option, except default and hide
Definition: Optionpk.h:277
pktools-2.6.6/doc/html/pkdumpimg.html0000644000113200011300000001332312647637662014544 00000000000000 pktools: pkdumpimg
pktools  2.6.6
Processing Kernel for geospatial data
pkdumpimg

program to dump image content to ascii or std out

SYNOPSIS

Usage: pkdumpimg -i input.txt [-o output]

Options: [-of matrix | line] [-b band] [-e vector | -ulx value -uly value -lrx value -lry value]

Advanced options: [-dx value -dy value] [-r resampling] -srcnodata value -dstnodata value

Description

The utility pkdumpimg dumps the content of a raster dataset to (standard) output (screen or filename). The default is to dump the output in matrix format. Use -of line to dump each pixel value on a separate line, preceded by its position (x and y value). You can specify a bounding box to dump with either the extent of an OGR vector dataset or via the options -ulx -uly -lrx and -lry.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image file
    o output std::string Output ascii file (Default is empty: use stdout
    of oformat std::string matrix Output format (matrix form or list (x,y,z) form. Default is matrix form
    b band int band index to crop
    e extent std::string get boundary from extent from polygons in vector file
    ulx ulx double 0 Upper left x value bounding box (in geocoordinates if georef is true)
    uly uly double 0 Upper left y value bounding box (in geocoordinates if georef is true)
    lrx lrx double 0 Lower left x value bounding box (in geocoordinates if georef is true)
    lry lry double 0 Lower left y value bounding box (in geocoordinates if georef is true)
    dx dx double 0 Output resolution in x (in meter) (0.0: keep original resolution)
    dy dy double 0 Output resolution in y (in meter) (0.0: keep original resolution)
    r resampling-method std::string near Resampling method (near: nearest neighbour, bilinear: bi-linear interpolation).
    srcnodata srcnodata double set no data value(s) for input image
    dstnodata dstnodata short 0 nodata value for output if out of bounds.
    Usage: pkdumpimg -i input.txt [-o output]

Examples

Some examples how to use pkdumpimg can be found here

pktools-2.6.6/doc/html/dir_53adf0b982dc8545998aae3f283a5a58_dep.md50000644000113200011300000000004012616110567020327 00000000000000b57292cdcfa82f3220b7290682271e9epktools-2.6.6/doc/html/vis__studio_2config_8h_source.html0000644000113200011300000003444412616145622020455 00000000000000 pktools: /home/kempenep/pktools/vis_studio/config.h Source File
pktools  2.6.4
Processing Kernel for geospatial data
config.h
1 /* config.h. Generated from config.h.in by configure. */
2 /* config.h.in. Generated from configure.ac by autoheader. */
3 
4 /* Define to 1 if you have the <dlfcn.h> header file. */
5 #define HAVE_DLFCN_H 1
6 
7 /* Define to 1 if GDAL library are available */
8 #define HAVE_GDAL 1
9 
10 /* Define to 1 if you have the <gdal.h> header file. */
11 /* #undef HAVE_GDAL_H */
12 
13 /* Define to 1 if GDAL library includes OGR support */
14 #define HAVE_GDAL_OGR 1
15 
16 /* Define to 1 if you have the <inttypes.h> header file. */
17 #define HAVE_INTTYPES_H 1
18 
19 /* Define to 1 if you have the <iostream> header file. */
20 #define HAVE_IOSTREAM 1
21 
22 /* Define to 1 if you have the <memory.h> header file. */
23 #define HAVE_MEMORY_H 1
24 
25 /* Define to 1 if you have the <stdint.h> header file. */
26 #define HAVE_STDINT_H 1
27 
28 /* Define to 1 if you have the <stdlib.h> header file. */
29 #define HAVE_STDLIB_H 1
30 
31 /* Define to 1 if you have the <string> header file. */
32 #define HAVE_STRING 1
33 
34 /* Define to 1 if you have the <strings.h> header file. */
35 #define HAVE_STRINGS_H 1
36 
37 /* Define to 1 if you have the <string.h> header file. */
38 #define HAVE_STRING_H 1
39 
40 /* Define to 1 if you have the <sys/stat.h> header file. */
41 #define HAVE_SYS_STAT_H 1
42 
43 /* Define to 1 if you have the <sys/types.h> header file. */
44 #define HAVE_SYS_TYPES_H 1
45 
46 /* Define to 1 if you have the <unistd.h> header file. */
47 #define HAVE_UNISTD_H 1
48 
49 /* Define to the sub-directory in which libtool stores uninstalled libraries.
50  */
51 #define LT_OBJDIR ".libs/"
52 
53 /* Name of package */
54 #define PACKAGE "pktools"
55 
56 /* Define to the address where bug reports for this package should be sent. */
57 #define PACKAGE_BUGREPORT "kempenep@gmail.com"
58 
59 /* Define to the full name of this package. */
60 #define PACKAGE_NAME "pktools"
61 
62 /* Define to the full name and version of this package. */
63 #define PACKAGE_STRING "pktools 2.6.3"
64 
65 /* Define to the one symbol short name of this package. */
66 #define PACKAGE_TARNAME "pktools"
67 
68 /* Define to the home page for this package. */
69 #define PACKAGE_URL ""
70 
71 /* Define to the version of this package. */
72 #define PACKAGE_VERSION "2.6.3"
73 
74 /* Define to 1 if you have the ANSI C header files. */
75 #define STDC_HEADERS 1
76 
77 /* Version number of package */
78 #define VERSION "2.6.3"
79 
80 /* Define to `unsigned int' if <sys/types.h> does not define. */
81 /* #undef size_t */
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkdiff__accuracy_1_1pkdiff__accuracy__coll__graph.map0000644000113200011300000000016312616110567030567 00000000000000 pktools-2.6.6/doc/html/inherit_graph_46.md50000644000113200011300000000004012616110567015376 0000000000000062ce278189506cc1c0752d729480526epktools-2.6.6/doc/html/inherit_graph_42.md50000644000113200011300000000004012647437044015400 000000000000002af511324d18119462e473d0dca2ff4cpktools-2.6.6/doc/html/pkstat.html0000644000113200011300000001564712647637662014070 00000000000000 pktools: pkstat
pktools  2.6.6
Processing Kernel for geospatial data
pkstat

program to calculate basic statistics from raster dataset

SYNOPSIS

Usage: pkstat -i input

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string name of the input raster dataset
    b band unsigned short 0 band(s) on which to calculate statistics
    f filename bool false Shows image filename
    stats statistics bool false Shows basic statistics (min,max, mean and stdDev of the raster datasets)
    nodata nodata double Set nodata value(s)
    mean mean bool false calculate mean
    median median bool false calculate median
    var var bool false calculate variance
    stdev stdev bool false calculate standard deviation
    mm minmax bool false calculate minimum and maximum value
    min min bool false calculate minimum value
    max max bool false calculate maximum value
    hist hist bool false calculate histogram
    nbin nbin short number of bins to calculate histogram
    rel relative bool false use percentiles for histogram to calculate histogram
    hist2d hist2d bool false calculate 2-dimensional histogram based on two images
    cor correlation bool false calculate Pearson produc-moment correlation coefficient between two raster datasets (defined by -c <col1> -c <col2>)
    rmse rmse bool false calculate root mean square error between two raster datasets
    reg regression bool false calculate linear regression between two raster datasets and get correlation coefficient
    regerr regerr bool false calculate linear regression between two raster datasets and get root mean square error
    preg preg bool false calculate perpendicular regression between two raster datasets and get correlation coefficient
    ulx ulx double Upper left x value bounding box
    uly uly double Upper left y value bounding box
    lrx lrx double Lower right x value bounding box
    lry lry double Lower right y value bounding box
    down down short 1 Down sampling factor (for raster sample datasets only). Can be used to create grid points
    rnd rnd unsigned int 0 generate random numbers
    scale scale double Scale(s) for reading input image(s)
    offset offset double Offset(s) for reading input image(s)
    src_min src_min double start reading source from this minimum value
    src_max src_max double stop reading source from this maximum value
    kde kde bool false Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb
    Usage: pkstat -i input
pktools-2.6.6/doc/html/classqgis_1_1pkdiff__accuracy_1_1pkdiff__accuracy__coll__graph.md50000644000113200011300000000004012616110566026414 00000000000000ef701b67026c6319312d673a8645c11cpktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__coll__graph.png0000644000113200011300000001072512616110567026703 00000000000000‰PNG  IHDRË€¥dœbKGDÿÿÿ ½§“ŠIDATxœíÝyPgðo(E)‡\Ò hìxcµ"È«RGZ¯Zµ2ˆZµÅ‚öPqê­•±ˆ¨c¥RÁÑÚz†Ä׫¶‚V­R¨`ƒ ÉïýÃ7û¸¼‰Èï3³3Ý}²ûü²›/ûlx,""0ƞ爉¡+`¬£à°0&‡…1‘8,Œ‰djèô%77?6t¬'''ØÙÙº ½è4a)..†¥¥%ºvíjèRØ) ”••qXÚ#ØÛÛº ö_üñ‡¡KÐ+~faL$ c"qX‰Ã˜HF–[·n! ÖÖÖppp@`` ²³³õÚÇ×_ ‰D‚ 6hlÏË˃D"Ñk_Ï;¦D"A^^ž^û4&F–¢¢"¼õÖ[pvv†L&Ù3gàêꊑ#Gâúõëz郈pøða¸ºº"))I/ÇlIÏž=±lÙ2@AAlmm_xŸÆ¤S}uÜk׮ň#'ü4®^½Š7n %%cÇŽÅ­[·Ð¯_?Û[[[á¦R©ðÏ?ÿ¼°¾Œ‘ÑÞYÒÒÒ°xñb­aË–-[!¬×ÕÕ!22½zõ‚½½="##QWW¨ªªÂìÙ³akk |öÙg¨­­ö=|ø0ÞyçøùùÁÓÓ³Ù» a÷îÝðòò‚¥¥%ÆŒƒ“'O µ5×zØ•––WWW8p@Øç7Þ888hô•’’X[[cýúõÂv‰D‚ýû÷£ÿþ°³³Ã† €>}úÀÊÊ +V¬øOuçA„\.§{÷î‰zmmm-™˜˜Ðßÿ-l«®®ÖXÔ6nÜH“'O¦;wîPNN 2„–/_NDD!!!äëëKùùù”““C  èèh""R©TÔ§OŠ‹‹#"¢/¿ü’¼½½…ãæææ’úôÇÇÇ“³³3={–ÊËË)55•<<<„öæúQcüøñ$“ÉèÊ•+Â> ¯€Þ}÷]R(tôèQ@÷ïßÚ‚‚‚H¡PÐÞ½{ M›6 ÅÅÅi¼V¬k׮ѵk×ZµO;–l”a)..&¡ ±¨yzzRii©°žššJƒ ¢§OŸ’T*Õø0;vŒ<<<ˆˆèÒ¥Kdjj*|À222]½z•ˆ4?Ì  C‡iÔ˜˜˜HZìG}Œœœ­c6–sçΑR©$”››+´effÑÓ§O›\W¿V¬Î£|fqpp€¹¹9rss1xð`φBPYY‰—_~Yxmaa!5ö·²²Â½{÷ T*áîî.l÷ððÀÝ»w<‚Õ××k=d'%%aÀ€Ûòóóµ¶yyyÀsûOOOÑïÝÉÉ `b¢=ïÑ£ÀÌ̬Éucg”Ï,&&&ðõõÅž={´Ú?WØÚÚ"77D"Bee%.]º„^½zA*•¢  @xm~~>œ¡T*‘””„­[·¢ººZX"""””$Sí•W^ÑšGuãÆ h±µÖ|˜õýuµQ1ìMZ3 #"ºrå uëÖ¢¢¢(;;›²²²(::š† BfffÂë/^LS¦L¡ÂÂBÊÎΦáÇÓÇLDDÁÁÁäëëKtõêUòöö¦•+W’\.'©TªUOzzº0¼i8LÚ¾};¹¸¸Ð/¿üB÷ïß§´´4zíµ×H"‘´ØOã¡VSðÆC͆C)4†5×ÖÔºmf´a!"ÊÌÌ$___²´´$OOOZ²d =|ø(¼F¡PМ9sÈÚÚšlll(,,Œ=zDDD4sæL²±±!GGGúôÓO©¦¦†æÍ›GþþþZý©T*rww§eË–i|°•J%ÅÄÄ»»;YYYѸqãè§Ÿ~";;»ûi),uuu4bÄêÞ½»ÐÎaÑI²„¨süß]Î;//¯9EÿäÉ“èÝ»7(l;zô(Ö¬Yƒ¬¬,V¦õÐÒÛÛÛÀ•èÿß]Úƒœœ̘1™™™xüø1.]º„+V 44ÔÐ¥±ŒòÛ°ö&** ?F`` ÊËËáææ†>úóæÍ3ti¬†±†‡aŒ) c"qX‰Ã˜HêÛ°ªª*Ô×׺ ÊÊ¢W¯†.Egµµµ0777tzÓiÂÒµkW”””º ýûßw°6vîüºwïbèrtÖ³gOC— 7&,o¾ù¦¡KЋ˜˜m¨«Sáþýnx÷Ý· ]k€ŸYÚ‘{÷ =ý/H$À±cé†.‡5ÂaiGŽË„‰‰D@FÆ_(*ª0tI¬K;räÈïP*U©Ô?ÿÜq'QvF–v"?¿ 7o– ëõõ*$'ÿnÀŠXc–vâøñL˜™5¼„ÜÜ{øóÏ¿ VÓÄai'þ uu*m¦¦RüôÅÚ K;]„ââJ­íõõJ$'ÿ¦õoö™apXÚãÇ3aj*m²­¤¤ YYwÚ¸"Ö‹)•*9’Žúze“í¦¦R?žÙÆU±¦pX ìòåTTƯ¿òŸŠ04‹>¥RSS)LM¥J¥JM„uuΞ½fàJY§™HÙQmÚ4 ••…õìì":t›6MÓxÝ A®m]k„Ãb`5Ö--_¡C1cFç˜EÝ™ð0Œ1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘8,Œ‰ÄaaL$ c"qX‰Ã˜HÆDâ°0&‡…1‘´þò—L&C^ÿ±OC¹vMسg+1nþþþxõÕW57R#¦¦¦€-‰I¥V¯ÃØ—   ÆÑHÖº³Ô××cÕªU=ztã&ÆŒÂêÕ«Q__¯µŸY‰Ã˜HÆDâ°0&’AÂR\\ ŸvL}ôqðàAøøø 11Qçc=ÏóŽéããƒââb½ö©K=¥5ƒ„¥{÷î j³þJKK1iÒ¤6ëOˆ “É`oo¹\þÂûkx^ õžÅjïõ5Å a±²²BXXX›õ§R© P(Ú¬?µÛ·oãÎ;ˆŠŠB^^îÞ½ûBûkx^ õžÅjïõ5E§°~üñGÌš5 &LÀÂ… ‘••~þùgÌž=ˆˆˆÀÅ‹…¡@Ã[篿þйsçÂßßÁÁÁHIIi²?õ~.\ÀÌ™3ñÞ{ïaûöí¨««Óª+66¡¡¡xðà,Xxÿý÷…×<|ø6lÀ¤I“0uêTÄÆÆâéÓ§ÏmkèyuËd2 8C‡…««+d2Y³ç±¹sÕR=êó‘™™‰éÓ§ãìÙ³Â>M½gHOOGHH&NœˆC‡ Û}||pæÌÌš5 HLLDJJ ‚‚‚€ýû÷wŠk¢ ­_J¶Æ©S§pðàADDDÀËË yyyX¿~=àôéÓHHH@TTúõ뇼¼<ÄÄÄh£¶¶ÑÑÑX´hÞ~ûm\¾|›6m¨Q£`nnÞd¿ÇÇúõëQ]]µk×ÂÒÒ~~~ž]”¸¸8dffbëÖ­°´´Ä®]»0cÆ ;vL8ƶmÛPQQÝ»w£¦¦kÖ¬……fÍšÕl›º1u«‡`ÁÁÁ€Q£FA.—ãÃ?Ôz?Ï;WÏ«'99Ë—/‡¥¥¥°OSï._¾Œøøxddd`åÊ•˜8q¢°_FFbccqîÜ9lÞ¼£Gƾ}û “ÉðÍ7ß`Ê”)}t´k¢+î,GExx8FŽ  >¡¡¡mÆ ƒ••†Š9sæh£®®D„šštéÒãÆÃ‰'еk×fû?>\\\†"55UhÛ³g’’’°jÕªf/l}}=d2-ZGGG¸¹¹aΜ9HMMm±­5uß¼yeee5j€ga),,ÄíÛ·›=M+1õ„……aðàÁ¢>Ó§O‡……FŒ¨®®Öjó÷÷ÃÂÂãÆÓzmcášèJ§°”––ÂÃÃCc››› ¤¤}úôÑhÓš˜ Gˆ‰‰Áõë×1uêT|òÉ'ÈÉÉD"i¶_á¿]]]Q^^.¬ÿùçŸ4h¾ÿþûf÷¯¬¬„J¥‚“““°ÍÙÙååå-¶µ¦n™L¥R‰I“&ÁÇÇGx–hêA¿¥s%¦WW×fßkc666Ðäùµ°°˜šš6¹Þ’ŽpMt¥SXlmm‘ŸŸ¯±­°°ЫW/­Ÿ¢ýõ—Ö1ž-,S§N…\.i«¥s%¦1f5}}pkï×Dt Ëøñã‹ . ¢¢¿ýö›0µ<00qqqHOO‡B¡@VV8 u±$ "##qþüyH¨Ñ˜@"‘è4E¿¸¸3fÌÀºuë`oowww¡íüùóHHH@||¼NÇn‹_𵥋/êý\µ•ÎxMV¯^ ;;;$''7Ü|ä…ýR²  k×®Enn.ž c¬£kóac ‡¥•Œyʽ±ã°´O¹7n–Và)÷ÆÃÒ Æ0åž5Ã"’zæëë àSžr¿páB$&&"$$;wîÚ·mÛ†òòrìÞ½7nÄï¿ÿŽ~øAhWO¹ïÛ·¯°m×®]Ðì”û¨¨(ìÝ»Wãr†øøx\¼xûöíÃüùó‘ÀwªVâ°ˆdlSî™¶öKÉΦá”û†är¹ÖôúÎ0åžiã;‹Æ8åžiã°ˆÐÙ§Ü3q8,"ˆ™rßP`` ¦M›†˜˜ãðáÇ••€gÓÍmmmŽÈÈH 6L˜ŠÞœ†Sî™aðܰ #O¹g<7¬Mñ”ûΉ¿y:ò”{Ö<Ë •J1wî\Ì;×Ð¥0=âac"qX‰Ã˜HÆDjò?##>lëZkJJJ`gg§ÝÐø}»¸¸üoó‹¡—¥K—6ŽF²Ö¥¨¨¨ñ&Æø™…1Ñ8,Œ‰ÄaaL$ c"qXé?«ú¢x×{(mIEND®B`‚pktools-2.6.6/doc/html/classVector2d__coll__graph.map0000644000113200011300000000022212616110567017542 00000000000000 pktools-2.6.6/doc/html/functions_rela.html0000644000113200011300000000616612647637663015572 00000000000000 pktools: Class Members - Related Functions
 
pktools-2.6.6/doc/html/classqgis_1_1pkextract__random_1_1pkextract__random__coll__graph.png0000644000113200011300000001056412616110567027210 00000000000000‰PNG  IHDRÝ€¶ûdbKGDÿÿÿ ½§“)IDATxœíÝ{PWßð³$ $2DT PBTíC‡éèÛ©—¨¥xÒ ©K©Z­¢U)ÌÔ‚Z…±…’ÈÍ6”&R´E…Ž7¨HpŠÊ­-åbˆ$˾¬Ï>)÷$œÏøÇîÉîÙ_N¾îÙ%`8ŽŒÕ ˆ(—ŒP.¡\"0¢S]€n …¢¦¦F£ÑP]ˆ³µµñ\._¾ìààpúôib³e Ùl¶••ULL Ñ‚aXjjê¬Y³&Ož|äÈ¡PèääÄ`0"""Fm )C©µµµ¸¸xømjjj<(--e³ÙQQQD£F£!CInIîèçç·téÒºººÊÊÊ9sæDEEél$÷’Éd&Làóù---)))t:]&“á8®ÑhœœœŽãtuuÕ. Çñ¤¤$;;»_~ù¥½½ýâÅ‹l6›hêXË—//**º}û6±Ù€²«V­’J¥ÙÙÙâ©|}}¥Rirr2`Æ R©T  £ªªªªªjd/Ì«¢÷¹¬¬¬$VÅb1›Í&ÃÃÃ÷ïß×Þ’Xîïï§ÑhäëqöìY6›­³‘Ü«³³ÓØØøøñã]]]¦§§G­Vã8^ZZJ§Ó‰—¿¼¼pçÎíÃÍ™3çÇ$ ÎÈÈ s,â¹»Îåo¿ý†ã¸Z­ÔÔÔ‰„x^–‰ †s.õx'LŸ>Xpqqijj"–ËÊÊ/^=xûÖÖVµZíììL¬²Ù즦&ä.VVVÅÅÅ¥¥¥ööö‹-ºzõª‘‘@$©T*&“‰a˜»»;`ÀT^WW7gÎruöìÙC@>…៬­­-€8:iâĉccãËzMïsIœT< ^6@~~>ŸÏ‰DÅÅŶŸ2e F«¯¯'Vëêêìììt6’»ÈårFsæÌ™ÎÎ΀€€Õ«WwvvªÕj±XÛó_»wï‹Å¸Öï¥8::j]]]=TÄò3ó4Z?ƒŸÞçrçεµµeeeظq#Ñhnn>sæÌýû÷‡„„ï`d2ÀØØØÛÛ{ÇŽ UUU‡òóóÓÙHÃ0ììl©TÚßßolllffvõêÕ¶¶6???‹ÿâñx555ÄÕ!!,,,<<¼°°°£££¨¨(** ðá5Qö¸Cõ…„nÏ}™œœìèèÈd2·oß.—˵¯ÉärùŒ3"##•Jå»ï¾kaaA´wvvúûû[[[O›6m×®]r¹\g£vWb±ØÙÙÙÄÄÄÅÅ%//Çñàà`íz4³³ó¾}ûÈÕju\\œ³³3ƒÁðôôÌËË›ú(&&pþüy¡P–‘‘áçç— ½‹B¡ˆŠŠâr¹ÄëqìØ1…B1¸çÜÜܘ˜˜èèèßÿ|]q‰$66–Á`²²²ZZZÁ‰'$IZZÚ;ï¼ãîîžÐÕÕ•pðàASSÓï¾ûpöìY²ÿÌÌÌýû÷ÛÙÙ}ñÅÓ§OOOO MJJêîîÎÊʺråJLLL\\\ccczz:`p: Ó-±ÁµkׂƒƒAOOOvv¶X,  …þþþ|>ŸØìäÉ“ííí|>ÿèÑ£eee?ýôÑ^^^ž˜˜”””TRR’’’* už‡ôt uY.³³³CBB,X`mm=oÞ¼ÀÀ@²ñí·ßf0îîî[¶lÑÞE©Tâ8.—ËMLL<==óóó'L˜0¸çÐÐP{{ûY³f^¼x‘hýSævvv䘙™‘»k/뤧c¨ÓÈΗL&³®®Ž\ýóÏ?S¦Lihh ÿúë/í]úúú4MTTT~~þŠ+8 óÿzSS±ÐØØhmmM,GGGïÞ½»¨¨¨¢¢‚ha0éééÅÅÅÅÅÅùùùÄLÑÖÖ–““ãîîN¬êD¼œ}}}QQQ>>>§NúôÓO‰‡¬­­=zD,×ÖÖsÐs¦[†aÚ«S§N<€VVVFFF---Dcss3‘æ‘ÒÓ1Ôid¹\¾|ybbâõë×;;;oÞ¼yêÔ)—Ë·nÝ’J¥§OŸÖ~10 Û»wï•+Wž>þáÇ÷îÝKNN~ï½÷ˆFSSÓ×_ÇãÅÆÆo,X””ÔÚÚZ__ž››‹ãø±cÇÖ¯_Q^^~ãÆ ²O¹\> ~¥R©R©ètzZZ ··×ÃÃ#99¹¡¡¡¡¡áäÉ“­­­Ãô “Înun¹fÍí$ÞÁÐét‡óÍ7ß´´´444¤¤¤,[¶ìyŽkHc8ÀÈæqoooµZÐÝÝM\>|˜ËåªÕ길¸Ç»ºº†„„|ýõ×ä.&&&Ÿþ¹@ hkk³µµŒŒ$î±;~ü¸››1‰–-[öÙgŸ)Š¥K—úùù‘Ó€Çã]¾|9##cóæÍñññÛ¶mÃ0láÂ…ÁÁÁ¹¹¹ÝÝݾ¾¾t:}×®]±±±sçÎ:uêܹs½¼¼ÎŸ?¯]¿……EhhèáÇ_{í5·téÒðððÌÌL…B±wï^…B1þüàà`ÀP=褳ۜœœÁ[r¹\¥R™˜˜ØÑÑáììA¼iݹsg|||HHˆ±±ñ’%Küüüžçå0¤1Ãqü+6¢ûÜ>|¸qãÆèèhggg¢ñÊ•+B¡0))iD¤lä_ ` 9ŽX,Þ°a±: ?W¯¯¯ÿꫯjjjúúúîÞ½›ššºråÊ—ïÏFáu…BqèСîîîiÓ¦-_¾|õêÕÏ¿»¹¹ùˆ¶õ†ú”žóüc8R/5#ÈhýyAFÊåXÑëÛÌ(‡r‰Àåú…qˆž8qâèÑ£‡’Éd©©©æææ^^^<Àáp<( »ººx<žF£ÉÌÌ,((èèè`±X\.—èM&“ÅÇÇ—””˜˜˜,Y²$ ÀÄÄ„Ãᄇ‡‹D¢ÇoذÉd¦¥¥I¥R//¯­[·Rú졀ΗC‚ê¶ñårHPÝÃ6Þ y|HPÝÃ6Þ óå º‡m¼A¹|ªîaçÐÄñ TÝÃ6ΡÏÇ( ÏÇ=0ÞçqøïaŸÆ{.Qþà„æqF(—ŒP.¡\"0ø¾§¼¼œø2.¡’ößï!¿bA^1víÚ52Šÿú¼A ®/¡\"0B¹D`„r‰ÀåÑÿzÃö5\è/ IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_8.map0000644000113200011300000000031312616110570015401 00000000000000 pktools-2.6.6/doc/html/structsvm__parameter.html0000644000113200011300000002216212647637662017021 00000000000000 pktools: svm_parameter Struct Reference
pktools  2.6.6
Processing Kernel for geospatial data
svm_parameter Struct Reference

Public Attributes

int svm_type
 
int kernel_type
 
int degree
 
double gamma
 
double coef0
 
double cache_size
 
double eps
 
double C
 
int nr_weight
 
int * weight_label
 
double * weight
 
double nu
 
double p
 
int shrinking
 
int probability
 
bool verbose
 

Detailed Description

Definition at line 28 of file svm.h.


The documentation for this struct was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.h
pktools-2.6.6/doc/html/pktools_2pkextract__grid_8py_source.html0000644000113200011300000011704012647637661021735 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/pkextract_grid.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkextract_grid.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkextract_grid.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterRaster
30 from processing.core.parameters import ParameterVector
31 from processing.core.outputs import OutputVector
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 FORMATS = [
39  'ESRI Shapefile',
40  'GeoJSON',
41  'GeoRSS',
42  'SQLite',
43  'GMT',
44  'MapInfo File',
45  'INTERLIS 1',
46  'INTERLIS 2',
47  'GML',
48  'Geoconcept',
49  'DXF',
50  'DGN',
51  'CSV',
52  'BNA',
53  'S57',
54  'KML',
55  'GPX',
56  'PGDump',
57  'GPSTrackMaker',
58  'ODS',
59  'XLSX',
60  'PDF',
61 ]
62 EXTS = [
63  '.shp',
64  '.geojson',
65  '.xml',
66  '.sqlite',
67  '.gmt',
68  '.tab',
69  '.ili',
70  '.ili',
71  '.gml',
72  '.txt',
73  '.dxf',
74  '.dgn',
75  '.csv',
76  '.bna',
77  '.000',
78  '.kml',
79  '.gpx',
80  '.pgdump',
81  '.gtm',
82  '.ods',
83  '.xlsx',
84  '.pdf',
85 ]
86 
87 class pkextract_grid(pktoolsAlgorithm):
88 
89  INPUT = "INPUT"
90  OUTPUT = "OUTPUT"
91 
92  RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
93 
94  RULE = "RULE"
95  POLYGON = "POLYGON"
96  BUFFER = "BUFFER"
97  GRID = "GRID"
98  SRCNODATA = "SRCNODATA"
99  BNDNODATA = "BNDNODATA"
100  EXTRA = 'EXTRA'
101 
102  FORMAT = "FORMAT"
103 
104  def cliName(self):
105  return "pkextract"
106 
107  def defineCharacteristics(self):
108  self.name = "extract regular grid"
109  self.group = "[pktools] raster/vector"
110  self.addParameter(ParameterRaster(self.INPUT, 'Input raster data set'))
111  self.addParameter(ParameterSelection(self.RULE,"extraction rule",self.RULE_OPTIONS, 0))
112 
113  self.addOutput(OutputVector(self.OUTPUT, 'Output vector data set'))
114  self.addParameter(ParameterSelection(self.FORMAT,
115  'Destination Format', FORMATS))
116  self.addParameter(ParameterBoolean(self.POLYGON, "Create OGRPolygon as geometry instead of OGRPoint",False))
117  self.addParameter(ParameterNumber(self.BUFFER, "Buffer for calculating statistics for point features",1,25,1))
118  self.addParameter(ParameterNumber(self.GRID, "Cell grid size (in projected units, e.g,. m)",0,1000000,1))
119 
120  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
121  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
122  self.addParameter(ParameterString(self.EXTRA, 'Additional parameters', '', optional=True))
123 
124  def processAlgorithm(self, progress):
125  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
126  commands = [cliPath]
127 
128  input=self.getParameterValue(self.INPUT)
129  commands.append('-i')
130  commands.append('"' + input + '"')
131 
132  commands.append("-r")
133  commands.append(self.RULE_OPTIONS[self.getParameterValue(self.RULE)])
134 
135  output = self.getOutputFromName(self.OUTPUT)
136  outFile = output.value
137  formatIdx = self.getParameterValue(self.FORMAT)
138  outFormat = '"' + FORMATS[formatIdx] + '"'
139  commands.append('-f')
140  commands.append(outFormat)
141  ext = EXTS[formatIdx]
142  if not outFile.endswith(ext):
143  outFile += ext
144  output.value = outFile
145  commands.append('-o')
146  commands.append('"' + outFile + '"')
147 
148  if self.getParameterValue(self.POLYGON):
149  commands.append("-polygon")
150  buffer=self.getParameterValue(self.BUFFER)
151  if buffer > 1:
152  commands.append("-buf")
153  commands.append(str(buffer))
154 
155  if self.getParameterValue(self.GRID) > 0:
156  commands.append("-grid")
157  commands.append(str(self.getParameterValue(self.GRID)))
158 
159  srcnodata=self.getParameterValue(self.SRCNODATA)
160  if srcnodata != "none":
161  srcnodataValues = srcnodata.split(';')
162  for srcnodataValue in srcnodataValues:
163  commands.append('-srcnodata')
164  commands.append(srcnodataValue)
165  bndnodata=self.getParameterValue(self.BNDNODATA)
166  bndnodataValues = bndnodata.split(';')
167  for bndnodataValue in bndnodataValues:
168  commands.append('-bndnodata')
169  commands.append(bndnodataValue)
170 
171  extra = str(self.getParameterValue(self.EXTRA))
172  if len(extra) > 0:
173  commands.append(extra)
174 
175  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classImgWriterOgr.html0000644000113200011300000004401512647637662016160 00000000000000 pktools: ImgWriterOgr Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
Collaboration diagram for ImgWriterOgr:

Public Member Functions

 ImgWriterOgr (const std::string &filename, const std::string &imageType="ESRI Shapefile")
 
 ImgWriterOgr (const std::string &filename, ImgReaderOgr &imgReaderOgr)
 
 ImgWriterOgr (const std::string &filename, ImgReaderOgr &imgReaderOgr, bool copyData)
 
void open (const std::string &filename, ImgReaderOgr &imgReaderOgr)
 
void open (const std::string &filename, const std::string &imageType="ESRI Shapefile")
 
void close (void)
 
int ascii2ogr (const std::string &filename, const std::string &layername, const std::vector< std::string > &fieldName, const std::vector< OGRFieldType > &fieldType, short colX=1, short colY=2, const std::string &theProjection="", const OGRwkbGeometryType &eGType=wkbPoint, const char fs=' ')
 
OGRLayer * createLayer (const std::string &layername="New layer", const std::string &theProjection="", const OGRwkbGeometryType &eGType=wkbUnknown, char **papszOptions=NULL)
 
OGRLayer * copyLayer (OGRLayer *poSrcLayer, const std::string &layername, char **papszOptions=NULL)
 
void createField (const std::string &fieldname, const OGRFieldType &fieldType, int theLayer=0)
 
OGRLayer * getLayer (int layer=0) const
 
std::string getLayerName (int layer=0)
 
int getFields (std::vector< std::string > &fields, int layer=0) const
 
int getFields (std::vector< OGRFieldDefn * > &fields, int layer=0) const
 
void copyFields (const ImgReaderOgr &imgReaderOgr, int srcLayer=0, int targetLayer=0)
 
void addLineString (std::vector< OGRPoint * > &points, const std::string &fieldName, const std::string &theId, int layer=0)
 
void addRing (std::vector< OGRPoint * > &points, const std::string &fieldName, int theId, int layer=0)
 
void addLineString (std::vector< OGRPoint * > &points, const std::string &fieldName, int theId, int layer=0)
 
void addPoint (double x, double y, const std::map< std::string, double > &pointAttributes, std::string fieldName, const std::string &theId, int layer=0)
 
void addPoint (double x, double y, const std::map< std::string, double > &pointAttributes, std::string fieldName, int theId, int layer=0)
 
int addData (const ImgReaderGdal &imgReader, int layer=0, bool verbose=false)
 
OGRFeature * createFeature (int layer=0)
 
OGRErr createFeature (OGRFeature *theFeature, int layer=0)
 
int getFieldCount (int layer=0) const
 
int getFeatureCount (int layer=0) const
 
OGRDataSource * getDataSource (void)
 
OGRSFDriver * getDriver (void) const
 

Protected Member Functions

void setCodec (const std::string &imageType)
 
void setCodec (OGRSFDriver *poDriver)
 

Protected Attributes

std::string m_filename
 
OGRDataSource * m_datasource
 

Detailed Description

Definition at line 35 of file ImgWriterOgr.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/pktools_2____init_____8py_source.html0000644000113200011300000001725012647637661021121 00000000000000 pktools: /home/kempenep/pktools/qgis/pktools/__init__.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
__init__.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  __init__.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 
27 def classFactory(iface):
28  from pktools.ProcessingPktoolsPlugin import ProcessingPktoolsPlugin
29  return ProcessingPktoolsPlugin()
30  #of beter met ifacer argument?
31  #return ProcessingPktoolsPlugin(iface)
pktools-2.6.6/doc/html/inherit_graph_23.map0000644000113200011300000000030712647437044015475 00000000000000 pktools-2.6.6/doc/html/pkstatz.html0000644000113200011300000001234212634276615014240 00000000000000 pktools: pkstatz
pktools  2.6.5
Processing Kernel for geospatial data
pkstatz

program to calculate statistics in temporal or spectral profile

SYNOPSIS

Usage: pkstatz -i input -o output [-f function]*

Options: [-nodata value]

Advanced options: check table

Description

This utility calculates statistics for a temporal (time series) or spectral profile

function description
mean calculate mean in window
median perform a median filter in spatial (dx, dy) or spectral/temporal (dz) domain
var calculate variance in window
stdev calculate standard deviation in window
min calculate minimum in window
max calculate maximum in window
sum calculate sum in window
mode calculate mode of all values
ismin 1 if value is minimum, else 0
ismax 1 if value is maximum, else 0
per calculate percentile in time series (provide percentage value as argument)
prop calculate proportion
nvalid report number of valid observations

Example: Calculate min and max NDVI in time series

pkstatz -i modis_ndvi_2010.tif -o modis_stats_2010.tif -f min -f max

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string input image file
    o output std::string Output image file
    f function std::string statistics function (see table)
    perc percentile double percentile value(s) for percentile function
    class class std::string class value(s) to use for mode, proportion
    nodata nodata double nodata value(s)
    Usage: pkstatz -i input -o ouptut [-f function]*

Examples

Some examples how to use pkstatz can be found here

pktools-2.6.6/doc/html/classfilter_1_1Filter-members.html0000644000113200011300000007503312647637662020326 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
filter::Filter Member List

This is the complete list of members for filter::Filter, including all inherited members.

applyFwhm(const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, std::vector< T > &output, bool verbose=false) (defined in filter::Filter)filter::Filter
applyFwhm(const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, Vector2d< T > &output, int down=1, bool verbose=false) (defined in filter::Filter)filter::Filter
applyFwhm(const std::vector< double > &wavelengthIn, const std::vector< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, std::vector< T > &output, bool verbose=false) (defined in filter::Filter)filter::Filter
applyFwhm(const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const std::vector< double > &wavelengthOut, const std::vector< double > &fwhm, const std::string &interpolationType, Vector2d< T > &output, int down=1, bool verbose=false) (defined in filter::Filter)filter::Filter
applySrf(const std::vector< double > &wavelengthIn, const std::vector< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, T &output, double delta=1.0, bool normalize=false, bool verbose=false) (defined in filter::Filter)filter::Filter
applySrf(const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, std::vector< T > &output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false) (defined in filter::Filter)filter::Filter
applySrf(const std::vector< double > &wavelengthIn, const std::vector< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, T &output, double delta=1.0, bool normalize=false, bool verbose=false) (defined in filter::Filter)filter::Filter
applySrf(const std::vector< double > &wavelengthIn, const Vector2d< T > &input, const Vector2d< double > &srf, const std::string &interpolationType, std::vector< T > &output, double delta=1.0, bool normalize=false, int down=1, bool transposeInput=false, bool verbose=false) (defined in filter::Filter)filter::Filter
dwtCut(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, double cut) (defined in filter::Filter)filter::Filter
dwtCut(std::vector< double > &data, const std::string &wavelet_type, int family, double cut) (defined in filter::Filter)filter::Filter
dwtCut(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, double cut) (defined in filter::Filter)filter::Filter
dwtCut(std::vector< double > &data, const std::string &wavelet_type, int family, double cut) (defined in filter::Filter)filter::Filter
dwtCutFrom(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, int band) (defined in filter::Filter)filter::Filter
dwtCutFrom(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family, int band) (defined in filter::Filter)filter::Filter
dwtForward(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtForward(std::vector< double > &data, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtForward(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtForward(std::vector< double > &data, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtInverse(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtInverse(std::vector< double > &data, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtInverse(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
dwtInverse(std::vector< double > &data, const std::string &wavelet_type, int family) (defined in filter::Filter)filter::Filter
filter(const std::vector< T > &input, std::vector< T > &output) (defined in filter::Filter)filter::Filter
filter(const std::vector< T > &input, std::vector< T > &output, const std::string &method, int dim) (defined in filter::Filter)filter::Filter
filter(T *input, int inputSize, std::vector< T > &output) (defined in filter::Filter)filter::Filter
filter(const ImgReaderGdal &input, ImgWriterGdal &output) (defined in filter::Filter)filter::Filter
filter(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim) (defined in filter::Filter)filter::Filter
filter(const std::vector< T > &input, std::vector< T > &output) (defined in filter::Filter)filter::Filter
filter(const std::vector< T > &input, std::vector< T > &output, const std::string &method, int dim) (defined in filter::Filter)filter::Filter
filter(T *input, int inputSize, std::vector< T > &output) (defined in filter::Filter)filter::Filter
filter(const ImgReaderGdal &input, ImgWriterGdal &output) (defined in filter::Filter)filter::Filter
filter(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim) (defined in filter::Filter)filter::Filter
filter(T *input, int inputSize, std::vector< T > &output) (defined in filter::Filter)filter::Filter
Filter(void) (defined in filter::Filter)filter::Filter
Filter(const std::vector< double > &taps) (defined in filter::Filter)filter::Filter
Filter(void) (defined in filter::Filter)filter::Filter
Filter(const std::vector< double > &taps) (defined in filter::Filter)filter::Filter
getCentreWavelength(const std::vector< double > &wavelengthIn, const Vector2d< double > &srf, const std::string &interpolationType, double delta=1.0, bool verbose=false) (defined in filter::Filter)filter::Filter
getCentreWavelength(const std::vector< double > &wavelengthIn, const Vector2d< double > &srf, const std::string &interpolationType, double delta=1.0, bool verbose=false) (defined in filter::Filter)filter::Filter
getFilterType(const std::string filterType) (defined in filter::Filter)filter::Filterinlinestatic
getFilterType(const std::string filterType) (defined in filter::Filter)filter::Filterinlinestatic
getPadding(const std::string &padString) (defined in filter::Filter)filter::Filterinlinestatic
getSavGolayCoefficients(std::vector< double > &c, int np, int nl, int nr, int ld, int m) (defined in filter::Filter)filter::Filter
getWaveletType(const std::string waveletType) (defined in filter::Filter)filter::Filterinlinestatic
getWaveletType(const std::string waveletType) (defined in filter::Filter)filter::Filterinlinestatic
lubksb(std::vector< double > &a, std::vector< int > &indx, std::vector< double > &b) (defined in filter::Filter)filter::Filter
ludcmp(std::vector< double > &a, std::vector< int > &indx, double &d) (defined in filter::Filter)filter::Filter
morphology(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim, short verbose=0) (defined in filter::Filter)filter::Filter
morphology(const std::vector< T > &input, std::vector< T > &output, const std::string &method, int dim, bool verbose=false) (defined in filter::Filter)filter::Filter
morphology(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method, int dim, short verbose=0) (defined in filter::Filter)filter::Filter
pushClass(short theClass=1) (defined in filter::Filter)filter::Filterinline
pushClass(short theClass=1) (defined in filter::Filter)filter::Filterinline
pushMask(short theMask=0) (defined in filter::Filter)filter::Filterinline
pushMask(short theMask=0) (defined in filter::Filter)filter::Filterinline
pushNoDataValue(double noDataValue) (defined in filter::Filter)filter::Filter
pushThreshold(double theThreshold) (defined in filter::Filter)filter::Filterinline
setNoDataValues(std::vector< double > vnodata) (defined in filter::Filter)filter::Filter
setPadding(const std::string &padString) (defined in filter::Filter)filter::Filterinline
setTaps(const std::vector< double > &taps, bool normalize=true) (defined in filter::Filter)filter::Filter
setTaps(const std::vector< double > &taps, bool normalize=true) (defined in filter::Filter)filter::Filter
setThresholds(const std::vector< double > &theThresholds) (defined in filter::Filter)filter::Filterinline
smooth(const std::vector< T > &input, std::vector< T > &output, short dim) (defined in filter::Filter)filter::Filter
smooth(T *input, int inputSize, std::vector< T > &output, short dim) (defined in filter::Filter)filter::Filter
smooth(const ImgReaderGdal &input, ImgWriterGdal &output, short dim) (defined in filter::Filter)filter::Filter
smooth(const std::vector< T > &input, std::vector< T > &output, short dim) (defined in filter::Filter)filter::Filter
smooth(T *input, int inputSize, std::vector< T > &output, short dim) (defined in filter::Filter)filter::Filter
smooth(const ImgReaderGdal &input, ImgWriterGdal &output, short dim) (defined in filter::Filter)filter::Filter
smooth(T *input, int inputSize, std::vector< T > &output, short dim) (defined in filter::Filter)filter::Filter
smoothNoData(const std::vector< T > &input, const std::string &interpolationType, std::vector< T > &output) (defined in filter::Filter)filter::Filter
smoothNoData(const ImgReaderGdal &input, const std::string &interpolationType, ImgWriterGdal &output) (defined in filter::Filter)filter::Filter
stat(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method) (defined in filter::Filter)filter::Filter
stat(const ImgReaderGdal &input, ImgWriterGdal &output, const std::string &method) (defined in filter::Filter)filter::Filter
stats(const ImgReaderGdal &input, ImgWriterGdal &output, const std::vector< std::string > &methods) (defined in filter::Filter)filter::Filter
~Filter() (defined in filter::Filter)filter::Filterinlinevirtual
~Filter() (defined in filter::Filter)filter::Filterinlinevirtual
pktools-2.6.6/doc/html/pktestOption_8cc_source.html0000644000113200011300000003070612647637662017373 00000000000000 pktools: /home/kempenep/pktools/src/base/pktestOption.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktestOption.cc
1 /**********************************************************************
2 pktestOption: example program how to use class Optionpk pktestOption.cc
3 Copyright (C) 2008-2013 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #include <iostream>
21 #include <string>
22 #include "base/Optionpk.h"
23 
24 int main(int argc, char *argv[])
25 {
26  Optionpk<std::string> foo_opt("f","foo","command line option **foo** of type string can be invoked with either short (f) or long (foo) option","defaultString");
27  Optionpk<int> bar_opt("\0","bar","command line option **bar** of type int has no short option",false,1);//bar will only be visible in long help (hide=1)
28  Optionpk<bool> easterEgg_opt("egg","egg","this help information is useless",false,2);//this option will not be shown in help (hide=2)
29 
30  bool doProcess;//stop process when program was invoked with help option (-h --help)
31  try{
32  doProcess=foo_opt.retrieveOption(argc,argv);
33  bar_opt.retrieveOption(argc,argv);
34  easterEgg_opt.retrieveOption(argc,argv);
35  }
36  catch(std::string predefinedString){//command line option contained license or version
37  std::cout << predefinedString << std::endl;//report the predefined string to stdout
38  exit(0);//stop processing
39  }
40  if(!doProcess){//command line option contained help option
41  std::cout << "short option -h shows basic options only, use long option --help to show all options" << std::endl;//provide extra details for help to the user
42  exit(0);//stop processing
43  }
44  std::cout << "foo: ";
45  for(int ifoo=0;ifoo<foo_opt.size();++ifoo){
46  std::cout << foo_opt[ifoo] << " ";
47  }
48  std::cout << std::endl;
49  std::cout << foo_opt << std::endl;//short cut for code above
50 
51  if(bar_opt[0]>0)
52  std::cout << "long option for bar was used with a positive value" << std::endl;
53 
54  if(easterEgg_opt[0])
55  std::cout << "How did you find this option -egg or --egg? Not through the help info!" << std::endl;
56 }
pktools-2.6.6/doc/html/pkfilterdem_8py_source.html0000644000113200011300000006233612647637661017244 00000000000000 pktools: /home/kempenep/pktools/qgis/pkfilterdem.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilterdem.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkfilterdem.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.parameters import ParameterFile
32 from processing.core.outputs import OutputRaster
33 from processing.core.parameters import ParameterSelection
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterBoolean
37 from processing.core.parameters import ParameterExtent
38 
39 class pkfilterdem(pktoolsAlgorithm):
40 
41  INPUT = "INPUT"
42  OUTPUT = "OUTPUT"
43  DIM = "DIM"
44  RTYPE = 'RTYPE'
45  TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
46  FILTER_OPTIONS = ["promorph"]
47  FILTER = "FILTER"
48  EXTRA = 'EXTRA'
49 
50  def cliName(self):
51  return "pkfilterdem"
52 
53  def defineCharacteristics(self):
54  self.name = "Create DTM from DEM raster dataset)"
55  self.group = "[pktools] LiDAR"
56 
57  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
58  self.addParameter(ParameterSelection(self.FILTER,"filter",self.FILTER_OPTIONS, 0))
59  self.addParameter(ParameterNumber(self.DIM, "maximum filter kernel size",3,None,17))
60 
61  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
62  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type', self.TYPE, 0))
63  self.addParameter(ParameterString(self.EXTRA,
64  'Additional parameters', '-of GTiff', optional=True))
65 
66  def processAlgorithm(self, progress):
67  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
68  commands = [cliPath]
69 
70  input=self.getParameterValue(self.INPUT)
71  if input != "":
72  commands.append('-i')
73  commands.append('"' + input + '"')
74 
75  filter=self.FILTER_OPTIONS[self.getParameterValue(self.FILTER)]
76  if filter != "none":
77  commands.append("-f")
78  commands.append(filter)
79  if self.getParameterValue(self.DIM) != 0:
80  commands.append("-dim")
81  commands.append(str(self.getParameterValue(self.DIM)))
82 
83  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
84  commands.append('-ot')
85  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
86  output=self.getOutputValue(self.OUTPUT)
87  if output != "":
88  commands.append("-o")
89  commands.append('"' + output + '"')
90 
91  extra = str(self.getParameterValue(self.EXTRA))
92  if len(extra) > 0:
93  commands.append(extra)
94 
95  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/dir_6d2fd95b0bd390617ad5a1eb4a537b4a_dep.md50000644000113200011300000000004012616110567020433 00000000000000494718c3c8bbc08f25b24a1da2a07d9apktools-2.6.6/doc/html/pkfilter__spatial_8py_source.html0000644000113200011300000010234312647637661020423 00000000000000 pktools: /home/kempenep/pktools/qgis/pkfilter_spatial.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkfilter_spatial.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkfilter_spatial.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkfilter_spatial(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "homog ", "heterog ", "sobelx ", "sobely ", "sobelxy ", "sobelyx" , "smooth", "countid", "smoothnodata values", "threshold local filtering", "ismin", "ismax", "order ", "stdev", "mrf", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "scramble", "shift", "savgolay", "percentile"]
43  METHOD = "METHOD"
44 # RESAMPLE_OPTIONS = ['near', 'bilinear']
45 # RESAMPLE = "RESAMPLE"
46  DIM = "DIM"
47  NODATA = "NODATA"
48  PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
49  PADDING = "PADDING"
50  RTYPE = 'RTYPE'
51  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
52  EXTRA = 'EXTRA'
53 
54  def cliName(self):
55  return "pkfilter"
56 
57  def defineCharacteristics(self):
58  self.name = "spatial filter"
59  self.group = "[pktools] filter"
60 
61  self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
62  self.addParameter(ParameterSelection(self.METHOD,"filter rule",self.METHOD_OPTIONS, 0))
63  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
64  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
65  self.addParameter(ParameterNumber(self.DIM, "Filter kernel size (odd value)",0.0,None,3.0))
66  #for smooth nodata:
67  self.addParameter(ParameterString(self.NODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
68  self.addParameter(ParameterSelection(self.PADDING,"Padding (edge effects)",self.PADDING_OPTIONS, 0))
69 # self.addParameter(ParameterSelection(self.RESAMPLE,"resampling method",self.RESAMPLE_OPTIONS, 0))
70  self.addParameter(ParameterString(self.EXTRA,
71  'Additional parameters', '-of GTiff', optional=True))
72 
73  def processAlgorithm(self, progress):
74  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
75  commands = [cliPath]
76 
77  input=self.getParameterValue(self.INPUT)
78  if input != "":
79  commands.append('-i')
80  commands.append('"' + input + '"')
81 
82  method=self.METHOD_OPTIONS[self.getParameterValue(self.METHOD)]
83  if method != "none":
84  commands.append("-f")
85  commands.append(method)
86  commands.append("-pad")
87  commands.append(self.PADDING_OPTIONS[self.getParameterValue(self.PADDING)])
88 
89  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
90  commands.append('-ot')
91  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
92  output=self.getOutputValue(self.OUTPUT)
93  if output != "":
94  commands.append("-o")
95  commands.append('"' + output + '"')
96 
97  if self.getParameterValue(self.DIM) != 0:
98  commands.append("-dx")
99  commands.append(str(self.getParameterValue(self.DIM)))
100  commands.append("-dy")
101  commands.append(str(self.getParameterValue(self.DIM)))
102  nodata=self.getParameterValue(self.NODATA)
103  if nodata != "none":
104  nodataValues = nodata.split(';')
105  for nodataValue in nodataValues:
106  commands.append('-nodata')
107  commands.append(nodataValue)
108  extra = str(self.getParameterValue(self.EXTRA))
109  if len(extra) > 0:
110  commands.append(extra)
111 
112  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/classVector2d__inherit__graph.md50000644000113200011300000000004012616110566020160 00000000000000b03ef4d1bc2ca4abd7e897b9222b2b71pktools-2.6.6/doc/html/dir_b66e135988e27fdc966ddddb8708f514_dep.map0000644000113200011300000000053512616110567020446 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial__inherit__graph.md50000644000113200011300000000004012616110566027565 00000000000000bfd647e27b6d070eafc25fff7acac190pktools-2.6.6/doc/html/pkcrop__gui_2mainwindow_8cc_source.html0000644000113200011300000012723612647637661021513 00000000000000 pktools: /home/kempenep/pktools/qt/pkcrop_gui/mainwindow.cc Source File
pktools  2.6.6
Processing Kernel for geospatial data
mainwindow.cc
1 /**********************************************************************
2 mainwindow.cc: GUI for pktools
3 Copyright (C) 2008-2014 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 
21 #include "mainwindow.h"
22 #include "ui_mainwindow.h"
23 #include <QFileDialog>
24 #include <QProcess>
25 #include <QMessageBox>
26 #include <QProcess>
27 
28 MainWindow::MainWindow(QWidget *parent) :
29  QMainWindow(parent),
30  ui(new Ui::MainWindow)
31 {
32  ui->setupUi(this);
33  QStringList resamplelist;
34  resamplelist << "near" << "bilinear";
35  ui->resample->addItems(resamplelist);
36  QStringList interleavedlist;
37  interleavedlist << "BAND" << "LINE" << "PIXEL" <<"BSQ";
38  ui->interleaved->addItems(interleavedlist);
39  QStringList compressedlist;
40  compressedlist << "NONE" << "LZW" << "PACKBITS" <<"DEFLATE";
41  ui->compressed->addItems(compressedlist);
42  QStringList otypelist;
43  otypelist << "" << "Byte" << "Int16" << "UInt16" << "UInt32" << "Int32" << "Float32" << "Float64" << "CInt16" << "CInt32" << "CFloat32" << "CFloat64";
44  ui->otype->addItems(otypelist);
45  QStringList oformatlist;
46  oformatlist << "" << "GTiff" << "HFA" << "ENVI";
47  ui->oformat->addItems(oformatlist);
48 
49  setDefaults();
50 
51  ui->listWidget_input->setSelectionMode(QAbstractItemView::ExtendedSelection);
52 
53  //pressing DEL activates the slots only when list widget has focus
54  QShortcut* shortcutDel = new QShortcut(QKeySequence(Qt::Key_Delete), ui->listWidget_band);
55  connect(shortcutDel, SIGNAL(activated()), this, SLOT(deleteItem()));
56  //pressing Backspace activates the slots only when list widget has focus
57  QShortcut* shortcutBackspace = new QShortcut(QKeySequence(Qt::Key_Backspace), ui->listWidget_band);
58  connect(shortcutBackspace, SIGNAL(activated()), this, SLOT(deleteItem()));
59 }
60 
61 MainWindow::~MainWindow()
62 {
63  delete ui;
64 }
65 
66 void MainWindow::setDefaults()
67 {
68  m_as=false;
69  m_manual=false;
70  //input
71  ui->listWidget_input->clear();
72  ui->ulx->clear();
73  ui->uly->clear();
74  ui->lrx->clear();
75  ui->lry->clear();
76  ui->extent->clear();
77  ui->listWidget_band->clear();
78  //scaling
79  ui->resample->setCurrentIndex(0);
80  ui->as_from->clear();
81  ui->as_to->clear();
82  ui->scale->clear();
83  ui->offset->clear();
84  //output
85  ui->output->clear();
86  ui->a_srs->clear();
87  ui->otype->setCurrentIndex(0);
88  ui->oformat->setCurrentIndex(0);
89  ui->ct->clear();
90  ui->dx->clear();
91  ui->dy->clear();
92  ui->interleaved->setCurrentIndex(0);
93  ui->tiled->setChecked(false);
94  ui->compressed->setCurrentIndex(0);
95  ui->nodata->clear();
96 }
97 
98 void MainWindow::deleteItem()
99 {
100  qDeleteAll(ui->listWidget_band->selectedItems());
101 }
102 
103 void MainWindow::on_toolButton_input_clicked()
104 {
105  on_actionInput_triggered();
106 }
107 
108 
109 void MainWindow::on_toolButton_extent_clicked()
110 {
111  on_actionExtent_triggered();
112 }
113 
114 void MainWindow::on_toolButton_output_clicked()
115 {
116  on_actionOutput_triggered();
117 }
118 
119 void MainWindow::on_toolButton_defaults_clicked()
120 {
121  setDefaults();
122 }
123 
124 void MainWindow::on_toolButton_ct_clicked()
125 {
126  QString qsct = QFileDialog::getOpenFileName(this, "Color table ASCII");
127  ui->ct->setText(qsct);
128 }
129 
130 void MainWindow::on_actionInput_triggered()
131 {
132  QFileDialog dialog(this);
133  dialog.setDirectory(QDir::homePath());
134  dialog.setFileMode(QFileDialog::ExistingFiles);
135  QStringList fileNames;
136  if (dialog.exec())
137  fileNames = dialog.selectedFiles();
138  ui->listWidget_input->addItems(fileNames);
139  //fill in band list
140  ui->listWidget_band->clear();
141  QProcess *myProcess = new QProcess(this);
142  QString program="pkinfo -nb -i ";
143  //todo: loop over all filenames and get the minimum number of bands?
144  program+=fileNames[0];
145  myProcess->start(program);
146  this->setCursor(Qt::WaitCursor);
147  myProcess->waitForFinished(-1);
148  this->setCursor(Qt::ArrowCursor);
149  QString p_stdout=myProcess->readAll();
150  int nband=p_stdout.section(' ',1).toInt();
151  QStringList bandlist;
152  for(int iband=0;iband<nband;++iband){
153  QString qsband=QString::number(iband);
154  bandlist << qsband;
155  }
156  ui->listWidget_band->addItems(bandlist);
157  ui->listWidget_band->setSelectionMode(QAbstractItemView::ExtendedSelection);
158  ui->listWidget_band->selectAll();
159 }
160 
161 void MainWindow::on_actionExtent_triggered()
162 {
163  QString qsextent = QFileDialog::getOpenFileName(this, "extent");
164  ui->extent->setText(qsextent);
165 }
166 
167 void MainWindow::on_actionOutput_triggered()
168 {
169  QString outputfilename=QFileDialog::getSaveFileName(this,"Output image","","*.*");
170  ui->output->setText(outputfilename);
171 }
172 
173 void MainWindow::on_actionQuit_triggered()
174 {
175  close();
176 }
177 
178 void MainWindow::on_toolButton_Run_clicked()
179 {
180  try{
181  ui->commandLineEdit->clear();
182  ui->consoleEdit->clear();
183 
184  QString program = "pkcomposite";
185 
186  if(ui->listWidget_input->count()<1)
187  MainWindow::on_actionInput_triggered();
188  if(ui->listWidget_input->count()<1){
189  QString qsError="No input image file selected";
190  throw(qsError);
191  }
192 
193  for(int i = 0; i < ui->listWidget_input->count(); ++i)
194  {
195  QListWidgetItem* item = ui->listWidget_input->item(i);
196  program+=" --input "+item->text();
197  }
198 
199  for(int i = 0; i < ui->listWidget_band->count(); ++i)
200  {
201  QListWidgetItem* item = ui->listWidget_band->item(i);
202  program+=" --band "+item->text();
203  }
204 
205  if(ui->output->text().isEmpty())
206  MainWindow::on_actionOutput_triggered();
207  if(ui->output->text().isEmpty()){
208  QString qsError="No output image file selected";
209  throw(qsError);
210  }
211 
212  program+=" --resample "+ui->resample->currentText();
213  if(!ui->otype->currentText().isEmpty())
214  program+=" --otype "+ui->otype->currentText();
215  if(!ui->oformat->currentText().isEmpty())
216  program+=" --oformat "+ui->oformat->currentText();
217  program+=" -co COMPRESS="+ui->compressed->currentText();
218  program+=" -co INTERLEAVE="+ui->interleaved->currentText();
219  if(ui->tiled->isChecked())
220  program+=" -co TILED=YES";
221 
222  //todo: radiobuttons on scaling
223  if(m_as){
224  program+=" --autoscale ";
225  program+=ui->as_from->text();
226  program+=" --autoscale ";
227  program+=ui->as_to->text();
228  }
229  else if(m_manual){
230  program+=" --scale ";
231  program+=ui->scale->text();
232  program+=" ---offset ";
233  program+=ui->offset->text();
234  }
235 // QList<QCheckBox*> qcheckBoxList = this->findChildren<QCheckBox *>();
236 
237 // for(QList<QCheckBox*>::ConstIterator qcbit=qcheckBoxList.begin();qcbit!=qcheckBoxList.end();++qcbit){
238 // if((*qcbit)->isChecked()){
239 // QString qsOption;
240 // qsOption+=" --";
241 // qsOption+=(*qcbit)->objectName();
242 // program+=qsOption;
243 // }
244 // }
245 
246  QList<QLineEdit*> qlineEditList = this->findChildren<QLineEdit *>();
247 
248  for(QList<QLineEdit*>::ConstIterator qlbit=qlineEditList.begin();qlbit!=qlineEditList.end();++qlbit){
249  if(!((*qlbit)->text().isEmpty())){
250  QString qsOption;
251  qsOption+=" --";
252  qsOption+=(*qlbit)->objectName();
253  qsOption+=" ";
254  qsOption+=(*qlbit)->text();
255  program+=qsOption;
256  }
257  }
258 
259  ui->commandLineEdit->insert(program);
260 
261 // QProcess *myProcess = new QProcess(parent);
262  QProcess *myProcess = new QProcess(this);
263  myProcess->start(program);
264  myProcess->setProcessChannelMode(QProcess::MergedChannels);
265  this->setCursor(Qt::WaitCursor);
266  myProcess->waitForFinished(-1);
267 // QString p_stderr = myProcess->readyReadStandardError();
268 // if(!p_stderr.isEmpty()){
269 // QMessageBox msgBox;
270 // msgBox.setText(p_stderr);
271 // msgBox.exec();
272 // }
273  this->setCursor(Qt::ArrowCursor);
274  QString p_stdout = myProcess->readAll();
275  ui->consoleEdit->insertPlainText(p_stdout);
276  delete myProcess;
277  }
278  catch(QString qsError){
279  QMessageBox msgBox;
280  msgBox.setText(qsError);
281  msgBox.exec();
282  }
283 }
284 
285 void MainWindow::on_autoscale_clicked()
286 {
287  m_as=true;
288  m_manual=false;
289 }
290 
291 void MainWindow::on_manual_clicked()
292 {
293  m_as=false;
294  m_manual=true;
295 }
296 
297 void MainWindow::on_noscale_clicked()
298 {
299  m_as=false;
300  m_manual=false;
301 }
302 
303 void MainWindow::on_toolButton_clicked()
304 {
305  ui->listWidget_input->clear();
306 }
pktools-2.6.6/doc/html/structsvm__model__coll__graph.png0000644000113200011300000001213212616110567020427 00000000000000‰PNG  IHDR䀔PR–bKGDÿÿÿ ½§“IDATxœíyX×ÞÇÏdۉ„}ñ굨õ*nVJûÜV+ÅíuiÁjq+¸+Øûôq­>­T¥€K©¯hEÄj-Z* •‚…E $³Ïyÿ˜Þˆ¬A’ “œÏ_“ä7g¾ó›oN~3s2ƒ‚ ÐÈ€@h 2+‚2 ³"(2+‚20:¾¨««[½zµT*%K ‰DEEÍŸ?€dff&&&jE‚ ãqyͬ………—.] %C™¤§§ܬééé<ðóóÓŠ*D§ãÂ葞ž®_I䦭¦üüüŒ0:¢ÓqA5+‚2 ³"(2+‚2 ³"(ƒá˜µªª Ã0²U tˆá˜1H¨©©ár¹ºh™¡epokkÓEËobÖììì±cÇš˜˜xxx¤¦¦æÎ»aÃâS™Lfee•““À0ìøñã£F²±±Ù³gOjjêðáÃ---wìØÑKû†>}zÔ¨QÆ Û·oñæóçÏ—.]Êårcbb¤R©J¥Ú¿¿···¹¹ùÔ©Sÿøã"R¡PÄÆÆÚÙÙÙÚÚÆÆÆ*Š7ØG¢ÓåPVVÖÈ‘#mmm׬Y#“É—.]7n‡Ãqppسg:277×ÕÕ5??¿k€&ºf{òäÉ{{ûž:m·‰ƒ8{öl§wº"‰Ølö±cÇx<^JJ ƒÁ‰Diii®®®8ŽC³²² 1R6""B(&''„B!qC²µµµ§MæÏŸ/’’’mmmÂ… Κ5«ººº¬¬l̘1ñññ´µµ=þ|cccNNŽ££#!~ïÞ½!!!uuueeeãÇß¼ysï{! í3L+íè:=UVVzyyÅÇÇ …B‹µ|ùò†††üÐÒÒBD¾÷Þ{ׯ_çñx]4Ð5ÛD³j==Û‰Dšç³ßfåóùL&óÀÇñööv•J%‹MMMïܹ!üøã·lÙòwë”””@åry§åGõ´ À7:FÊår:^^^Nœ?ÞËËËÛÛûäÉ“êµN:Eˆ÷ññáñxÄ›×®]óõõí}º&åѤ]'°BYYñòìÙ³^^^2™¬¢¢B$©Tª¼¼êý$pĈÄ‚OCC‹Åª¬¬ ž0aÂÉ“';Fúøøz è]@ŸÙî)€Øn¿è·Y% Žã|>ÅŠ|ðŸÏDDDdff^¼xq„ êL½14ÚkÂìììètzMM ñ²ººÚÉÉÉÝݽ´´TsïÞ=bËåª{@PXX8@1ÚE? $z/@ee¥£££D" ‹-))9räHÇHÂy½ôNŸÙî)@“¯\'úmV ‚‚Î;' år9“Éäp8€   @·|ùòþ¶Ù'L&3<<|Íš5?.//ß¾}ûÂ… W®\›••ÕÔÔtåÊ•;wÁóæÍÛ²eË“'OÊÊÊ‚ƒƒ¿ûî;­ëúIàÚµk«ªªŠŠŠ¶nݺhÑ"™L&—ËY,–D"‰‹‹´··wŒï3 'zʶH$ê=àMèX"hR³ažžž,ËÇÇ'++Ký~dd¤™™YÇ’t(­zZîJ·‘|>ñâÅÖÖÖëׯ—H$J¥rÿþý^^^¦¦¦~~~ÄWB( —-[feeemm)‹ûÜ#}Ö¬PÇ $úÔääd777.—-‘H „6l˜‹‹Ë‘#G"""lmm;—]4Ð5Û …bÚ´ifffDd×€NÛÕ<ŸìðïÖôôôððph|ÿw%†¢ |hŸ¶ÚUUU#FŒ0ŒƒØ)Ÿè¦‚2t3øZoôt+ß0z=ÐS£¢¢ô¬D?iVdÊbl De‚2 ³"(2+‚2 ³"(C7'Xßÿ½þuô†„ †èv˜_MM‡‡‡¶šD TÐÀSE¶Ž7¤óqéxà ??ŸN§“§­ÌÃÇÿ¹Èu+“ÆÖ醾øâ Mî©ôŽzLê`ÀÇ|ⱿD¸l"[È€èx\^»ƒ5à‡ÀR™PeénôµÇPw²Q\ ‹òJO5A¦owõùH'2Ñ?ƒ¾fÅ€³ŸFíõÒs•Ù:ù¿„!!le-yXšÚDôBÎ~d+ÒƒÞ¬8O±€à*€Ëa^|Ý/ëªeBªaº¦üLKæüûüj T€¥+ÛÌžE¶(­A³N²¯JX_ Ì ½ß\*&QÒ D&Tþ²¾ºàÀS•âJ 11·CÉÖ¥M(`VŽ ÓÒùÕÙ®„¾2û“ÊâDÄIÔ5ˆà•ˆ2æWÔA‡¯5®€ÎSÌIT¥u(`V€Ë4KóÕ  ˆCˆÃ’dÞåÏ*_¶ º?¯ê\ ö7äDVJ \ñÚ¹2…Ù3#K˜. †Y&™?m¯ƒ¦¿Ä™ó+ …dˆ"aƒìÂÿ<¼—Ñ!èô#ƒÑ€Ãx3:‹ÇWC¨±3öãͺ‡+¡\¤º²¦ºöúsý«"¹Huañ~åKØÝÙ&FܧXê]”n¡†YY¦tî?8ÝŽÞ¤ÑÉP†©áœój“C9‡ ÀèÝ é¢5Ì pnÑé¨`0à3Ïæã‹£mFsÈF LZçôáÉ‘föL£³_Mm™V†v…2fuždѱl¥Ñ1†)üç”Î Êì…Ö±c:?ãNͰÿ¦ÆÄ\§Z (dV›Ñ&‡ÀpŸ5*AKùK²u‘ÿ‘äéöÑá¶lKÑÅâ ƒºq¥†2fÅh˜Ã3ƒƒüÇ}Öîá“78ßMæ5Ý‘-LäbÕõ­ÝfZN‰u93ŠHFŽoÔV‚A?¥Oò^T^j›ãbjÇ®¬­z^+ IEtºFHÞ®'õùÂùé£L¬ÁýÌgí òIëÈ–¦}¨dÖ®ˆ[çÂï{½?lJ¬ ÙZH æš wóã ƒžnþX¡v…Ú’©-sòç{gŸ5Ý}—­Š[{êGα6§ª›àýok?‹üÝuŠ—Æ5+wM›¼Þ™l!úƒÚe¸YQy©Íw™F3¢ 0‹Ú1:æ0Þ îþ÷Ž!˜a$P¾ @Ȭʀ̊  ȬÊ`˜fm{h€c‹Ú!nÔgÃhÖu²Ÿ=¬¼dPÚn,j¿¼êQý-£»÷Ñ4«¥+{t¸Í­=õ™æk‰D¢˜˜˜áÇ2dĈqqqR©àää„ã¯þ5!tss;|ø°ö¥÷€ô¹òÆöZÏàa9ð¯ ü™9ƒ¥L•zïRT%Ä5]eéÒ¥ÅÅÅ---yyyo½õÖçŸ!ljj¢Ñh7oÞTGþù矆566êBy·ü²¡úßÿ?Y»Ro[œ¦Y!„Ï*ÄÉÿ*)OkÑ0~èС………ê—yyy®®®ÄòìÙ³£££ÕmݺÕßß_{JûàáÅÖ¤·‹y%ízÛâ Å`Í !,:òôø”»ÏŸH5 vuu]²dI·¢?~ÜÁÁA©ü»cóññ9räˆ6…öÌ‹:é‰iwo¨ïöSbŽž .x{{ÛØØDGGK¥Ravv¶¯¯ï!CìííwïÞ­Žüõ×_]\\nÞ¼Ù5BHIIñññár¹»wïþá‡ÜÝÝ-,,¶oß®ŸíC6«J‰ÿ´¨"ké\Õw5põêU'''6›={öìýû÷×ÖÖª?l6;//BXQQA£Ñšššt¨û¿à*úhõêÕ¯¾ú*00PWr_WáÅI-å=έç9…IÇÀͪ!"‘èÌ™3êzÇwìØáää¤HOO·³³S*•&LHLL$Ifg BKKKMLL „YYYÓ¦Móõõ%&,V›U.—‘]à›N©OY!„°½½ð»wïªßÉÏÏ·³³S¿‹Åfff§Nb0Äæ` SÏš‘‘áááñòåK6›••…ã¸D"éhV"¬ÛH³àuÖ7ÀÌÌlÉ’%ááá999555·oߎ‰‰‰ˆˆPp8œ¹sç®[·.00ÐÆÆ†D©]ÑÛœÂäCö·e° T*ãããÇŽ;dÈww÷M›6©^ ._¾ HNN&KaWô<§0é ÁׯæÖ£+TòA}h_Ôõã±±a\fmo”§}PÞ\6HŸšýä·!÷5R ã-,, uNán1º2à×M5­/CÒF19ƒk%q³<3¼Â+xØÔÍÆø M0®ž0m‹«R =%[Èë@·ëÉaÌIë ðI*ÚÂèÌj2”1}›ëƒŸZëo½ [Ë+Ê϶ðŠE_¹óûÄSã6ÓÒë½a¿ÿ§N&T’­øU’;ß<õ]fÏetO™íÆhVÀÔM.4:v{oÙB®€¿í|bíÍ÷©=ÙZ;FjV–}êf—¦¿DÒ$w®J)njÇœ±Ó•ÖÝÓÖ1º«QÉ!…,BŒÚ¬ja¤e‚Š ³"(2+‚2 ³’€\d\Ï=ÖȬó²UqyUUûSzz”ÃOÿè¾¼ùµß ³þ‰C.R]ßV«ÓçI½¨“åï®9Çše>¸†ÑPdÖ¿¡Ñ±™_ºñ+%¥§šu´ ˆÃ¼¸Z«á&V:èh† 2ë+†º›¼½Ú±8‘×V)ÑEûon{(ñßåÞuªU„& ³¾Æ˜[»±f7¶=VÉñ¾£ûCK¹¸ä{Þ„U†7ÿ¯Þ@f} ŒüãÝDMŠ’ï›´Ø¬â%~c{­ý8³.°Ób³Æ2kgÌYÿŠv,Ok‘ ´6ÆEÜ,ÇhØŒ®Ê÷@cºaƒÌÂ…­Í&q€œ:@Y”}Ù”™AY”™U7@µ|¡̪*9,>ÆSÊúá¾Z/¯z„üªeH|(Ü@ˆÕ[ŠÌV£-üúµÊºÙ?-§éHOWÜÝÝÉ> ú€ª—®ÂÂÂîÝ»J¶ò¹ÿ~FFEc¿`-àͱµµ9s&Ù*úÕ¬ʀ̊  Ȭʀ̊  Ȭ$óôéÓ€€€þ~dœ ³"(2+‚2Pø:«&ܾ};%%¥¾¾žËå.]º4((hûöíŽŽŽ«V­(ŠyóæmÛ¶mòäÉ7nLKK{ñâEXX—Ë=qâ„P( Y¾|yOí÷¹–H$JHH(((`±X+V¬`0ééé999mmmsçÎ%šR*•ÉÉÉW¯^¼û|ò‰^2D% ¹g•J¥ñññsçÎMKK[¼xñ¾}û¤Ré¬Y³ˆù­EEEl6{âĉD|qqñÑ£G###“’’ RRR>ûì³ÔÔT¡PØËVz_ë›o¾yöìÙ±cÇöîÝ[TTtæÌ™sçÎ={622255uñâÅÇŽ#ÚÉÌÌäñx‰‰‰_ýuIIɉ'tœêaÈfU(B‰DÂb±‚ƒƒ³³³Ùlö”)S„Báǹ¹¹ÁÁÁtúßÏ›çp8AAA€ p8œàà`Ð×l‘½¬¥T*¯_¿íàààáá±lÙ²k×®]¼xqåʕӧO·¶¶ž4iRdd$ÑÎÏ?ÿ¼víZ[[[¨¨¨;wîè27”ÄËssóC‡effž8qÂÛÛ{Á‚“&Mb³ÙS§NÍËËsww¿}ûvRR’:žÃá F§åÞée-@€ã¸££#ñÒÉÉéÙ³g†yyy©W÷ðð šššBBBÔšdß C6«L&Ãq<>>^©TææænݺõÂ… æææ³fÍ:|ø°———···³³³îXYYÑh4çææhllär¹L&³ººÚÓÓ“ˆ©­­%,--:äää‰D|>_wÂ(Š!—†ÅÆÆþþûïb±X¡P0 6› ˜8q¢H$:yòäû￯S # àÛo¿åñx?NIIyçw>üðãGÞºu‹Ïçß¹sçøñãDðôéÓ“’’š››kjj6nÜxáÂj£"†Ü³²X¬-[¶$&&¶´´8::ÆÅűX,ƒÁð÷÷ÏÍÍõ÷÷×µ†µk×&$$¬\¹’Éd.\¸Á`(Š£G¶µµyzzîØ±ƒ¸4±bÅŠ„„„O?ýð3fDEEµ¶¶êZµ ðxÖgÏžÅÅÅ‘-„|~ûí·]»vQô8ö C.†!—Z¤§{ô7nÜгc™U#)¨ @PdVe@fEPdVe ð ViiiLL Ù*ÈG -AOPÕ¬èñQŠ5l¨z a„ šAY”™AY”áÿ‚ñ â Ré4IEND®B`‚pktools-2.6.6/doc/html/classMainWindow__coll__graph.png0000644000113200011300000001354512616110567020151 00000000000000‰PNG  IHDRup¯«¨XbKGDÿÿÿ ½§“IDATxœíyXIúÇ«sqE9…„CQîK.p%2º¨3Ž:®ã¸Ìóˆ¢3®Î®Çº^;êú¬®ó¬ÂŽã.* Š8ƒ#£#: *QˆÜ¢\‚‰@ I§û÷G;1æè\g×_>ðЕ·ªÞ|SývUuu5„¢(°`6H¿¶ï8}Í‹E_óbÑ×¼P”FGG[[[ùµ¼ypww7nœâð }‡††úûû•?¶`CCC}}}ZõÅ y‹.½S<|øP%ÅÍ‹E_óbÑ×¼Xô5/Fê+‹333ÃÃÃétú{ï½·ÿ~†± òóóS™Ö˜;w.AmmmKkkkƒ H[]6lˆ‰‰Q€Ç㩤³Ùl'''LÓÇ3ŒššE­­íË—/­­­CCC4í³Ï>ãr¹¹¹¹€¾¾>åÖXºt)ŸÏ?qâ ¿¿EÑ´´´… ¢(š™™¹víZ™LæààÀf³GGGi4Úõë×Ñ7›¤z!‡vuu½téRwwwqq±»»;f¼råÊÄÄÄöööúúúÐÐÐ]»víÙ³gþüù(Š;6** EQ‡cmm-‹ m¿FêûòåK•ôŠŠ 컵¶¶nذaëÖ­(ŠæææÎž=[‘.‘H=z$‰ärù­[·°Di0¤R)ø%¤äç绺º"UPP€¢è’%KvïÞÍf³Éd²P(T×W¥ÿœœ…·§NH¥R2™¬PäÒ¥K¾¾¾‡N§K¥Ò/¿ürÛ¶mT*•Ïç:thÞ¼yøÊhÔ×àøàààÀ`0jkkUÒkkk‡ÉÉɘ*ÁF£µ´´$%%EGGçääh¬k\T*U‘2sæÌ¾¾¾ªªªºº:‹˜3gNII ›Íž2e N×YHWWWDD„âÓÉ“'^¼x!—Ë}||°D___.—iggWUUU^^¾`Á‚ÈÈÈòòòÒÒÒùóçë-ÒkŒ‰¿+W®Ü»w¯¢·°bÅŠ¼¼¼¬X±Ba' ïܹSRR²páBEúÈÈȲeË222ª««?®Ù'’ªW # `ß¾}áááÎÎ΀ٳgß»wïúõëXðÕYˆ···r—›(pss#“ÉOž<ÁÛÛÛ=<sæÌåË—+·²²2À±cÇT¾óáÇœœ¼¼¼Ž?¾bÅ WWW}ôÍËËüôÓO 6lØ@"‘vˆ_ Çòõõµ³³›6mÚ½{÷0ãU«V9;;3™ÌÍ›7ŒŒ (*(ʾ}ûP‹Å4MùwÅA]_Uhõõõ555%$$qH¥ÒêêêØØX#ò¾3`aGy‚—°ùlETiï –ùóbÑ×¼Xô5/}Í‹E_óbÑ×¼h¸?ßÝÝýöýx7µ¶¶VNyC_+++‚ZZZ©¬¸¸]*…- ÐiyîÜCǘw|3A°hQ€‡Ç|K@ròdíš5cÇZá[>~Ü_Zútõêɶ¶šš888¼q¬Ï°ÏP`X¾eË&sÓ§ŸžÐi\TTÃdnJO?¯Ó’Ínc27mÛV¨ÓòÖ­ÇLæ¦Ï>;©ÓòâÅ*&sS|üþÞ^Nc# >þJ$ðš59¹¹lÁÁ:š$'ÌÌ<xùR¨³äï¾{€ý…a+äÄ®^m,*ªÁ· dž?ÿ~EE›LúûEø…—•=–ÈdÒ¥Kðùüa E¥RùÆgQíÏ@ÐhG #££²å˳._ÖÑä ‚0}ŸðÁ‘Þ^LöjÞL&ùø¸j³çrù;v|§øâ|þ0~ù……Èd†‘«WëGF¤8Æ"LS™L~ï^{^Þ}ãÐPO  ‚ HZÚ™ìì2|gô‡}oÝj^°àèàà¨rd?Þ‰J%k´GQtãÆ\†x%°H4Š Z[™X,ùé§Fì´H$pIIŽ?ýýb…'¶o/ìì|©Í8(ˆI¡~1FQݳçòŽßá´zý!@ߢ¢šO>ùF"åò×âBê©-Ë©S••2Ùk{A‡†F´Ù+‹ ‘ ÂBŽK<Þ’:(‚ _~™§M/†²'X–œœÛ7žSœ‹Fcª¾YY¥ëןADÅ{*•Œ]šÕéèàíÚõ½zkk«¥°£¼œ †‘ÒÒÇ8¿÷F4—ÉÊÊŽœœ»™êÒ#úý÷Õ+Vd‹DmµèƒIúþýï×öîýE5´ ™Lîï咽E.GÖ¯ÏÕøÂÀ€æKÜÀ€¸¼¼Eùä (úãõÚSæ‚îÞ]ÔÑÁS7öövÁ"»º«÷î=Y¾üøà ŽkÆë+•Âß|S®v«÷(Šjl¿'OÞnhèÒØÕÖ~¯\©SODQ´ @kˆÐ¨‚ ë×çªüN*•-77¿ ¯úîAd2âA€L&‘H¤ ‡-[æþõ¯‹ƒíìh*•¬Üj4¶ß~¨ÕÖM‚aya¡†Æ›å@VVT 2Šˆ˜°qãìóç׫¯ü ``à …ìädççÇ óˆ÷×ñÍõ€˜I£›7M™2ñҥϯ]kص«èÙ³~#c77û””ø””xF¾ý¶|Ïž¢èè µµ]r9"“Áãïð°”É«8‰$ÖÖTEwUãi¬( ¼½e2ùĉã¾ý6eìXk Ö( ¬­©_|ñþÚµ gϲ¾È¢"ã!d–hêÔÝG޼Zù!“É 9:§£Nº¸ EQ±XrófÓÞ½—¯_oÄÏ‚¢(“¹©¨¨ߦ§G°ukÁùó•==EÓÓÏ''ÇÏ‚ H~þý¾¾!ìðñã&sSCW§?:! ýöô¸\þÔ©“°C …´xq´Î\ÝÝ|€­-mÖ¬ Y³‚L÷ƒÁ°ÿê«×+ ÝÝØlÍÏ%(€ hùò÷‡þþn¶UU¡¡&:C@üml|APx¸—A¹º»ØÄйqwwèéÑÐÍÀû:õõ]¦×N€¾OŸöG§ÓuÜ)P¡·wˆÁ°7½v0ö##Ò¡¡Qƒr2››{M¯}Ÿ=ë÷òÒÜ?ÇA(3Fë‡@°Z„B­ƒiøø¸¶µ½0½vbÚïøñN†æ‰$†6yãøE_ÃÚ¯——“H$1edŒALû0Au¨¦‘h”NíûÅbæiÜÜÆz{‡L¬}ù|ñ¸qVèãóÖÚ¯1í×ÑÑUÔ!@_¹U_ѯ©¦ÑˆÝàceEÁª3(öärS§Ø ÑQ™Ñô­l †ÕbèÓ°Ø$ Î-=!@_A5NÙàAÐÛÙy ÓÈP}±£>™i(è‹¢¨í‚hú€µ_C=ÄâƒégúZYQFG ‹n‰ôvâƒqíW,ØØPuZâC€¾NNôþ~Ý«oT°³£Úg2¬lFT°U)îà Ð×ÙÙ®¯Ï`}íímMíýèV‹½½­A¹ž?P($¬l èëí=®£CëêmØÛÛàÜ&¬{{ƒruw ÆkÄu[ô8ÑåéScôL}êV‹¡úöô˜L¦ŸÐ78ØËåóùZW/hÄÁÁö­éK£Qll ‹¿uûúj]Ü¥?èî…¢h}=× \žžN]]¦×®“®®OOÃ.Sr9R[û,2r‚éµr}£{z:r8åòôt|kúzy6½×ÜÜ+I¢¢þ;ô̘PV¦cM® ^^NBá¨é€:ár Ö·¬ì±‹ Ýô›C€(}ããýëë» ËÓÓ Àåò q.—Õ¥?åå-¿ù/!x£obb0™LÂY¦¶zµ¥…€{8 K¹\¾;Âòx»w[çÏ'Äbô¥Ó­5.ÓF dr‡ÆF®\Ž„‡×?Ë?ÖÓh”ÄDã×D)CØúõää©·n5?{Ö¯–É“½ ëuJcãs'';ƒúçÎÝ›?²­­aý9m¦ïìÙ! †ýéÓúg óll|nÖYž†.Î2ouª«Ÿ64pW¯Ž#ÊÂô¥PH))q¹¹úzÃÂ<‡†FŒ[ëOmí³°0ô=vìfdäøèhzfD>?”’O£Qô8dòdOÛÒÒGú Lw· ¹¹wæL}—éÕÖ>»zµ!#c.>©¯­--55áäÉò/ôºíJ&“ââüÊˉyWòòfšbá–Nü1*jBBB nS½!øùµkƳsçwzÚϘÀf·™þ‰FÊÊšcc'a÷7uRTTsûvËþýKu›ÁúR©ä;>¼r¥®´ô±>öññþ"‘äþý'ĺÉä·o·ÄÅé‡wï.Z²dŠAÁZˆþ8))lñâèÍ›Ïé3£6a‚st´÷… •„»QRòphhdÑ¢(}Œ·n-$‘ ½{î†Yöר½{! #ã‚>}¯åËß+.®7tý‡N ªâãýõYBXXÈ)*ªùê«%8 °Æ,ú:9Ùeg¯.)yøÏÞÔiüÑG‘€âbÆ~:éïýüó£e˦ê´ljêÎȸ°n]œ9¡:ðœµ×¦”lcL¥jxN“¥?™¬×.+«ñ$’î;iD±µ ÝW6¢3Mýaýñöö6rýzgggppprr²Ñuÿï0ǸlMMM8:~aWWWã¶£´€aÙ?ʼXô5/}Í‹E_óB€¾,ë“O>QJlÙ²…Åb=þ\c–çÏŸcÛÔkäÿøGZZšâ0//Åb)v½ëëëc±X555ø…T£ù ¦ýööö*^ …ʛɫC§Ó•7ÃW!""¢­­M"yµúïÁƒq8¯v#hjj¢P(ÁÁÁø…ü—@Œ¾ÑÑÑØnëÊ/CPÇÞÞ>55UÛ§ááá0 cÛJ$’úúú¤¤$e}ƒ‚‚¬¬¬ð ù/}ÊÊÊ!âÖ­[ʯM`³ÙkÖ¬IJJZ²dɹsçÀ›g+‹ÅºqãÆêÕ«,XŸŸpttœ0a¶—ycc£««ë|P]]½âáÇááá: A$??ÕªUóæÍûüóÏ=z5‹/‰8ðÑG%''geeI¥Ò 6`c¡P8kÖ¬¬¬,,û‡~ˆmƒo Äè:22‚…±X\]]=}útì£ááá;wúùùåææ¦¥¥8qB PÝðíÎ;ÇŽ[»ví¿þõ/¡PˆˆˆÀôåp8QQQ577Ëd²––L_üB ÏŸ?ŸššzæÌ™U«VeggcfGåñxÙÙÙ¬ªªÊËË‹‰‰©®®444ØØØÔÔÔÚÚÚ¤Ridd¤‰Ê£/‰Dš1c"ØlvXXØØ±¯æh4ÚÉ“'7nÜèìììêê ‹Uç-.\H§ÓûÛ߆††áááØ‹ °±Ñ°ØT¥çëë«ø{¡ŸÏG{uÀÃÃÇãùùùY[[777×××OŸ>Ý××·¾¾¾¦¦fÚ´i¦Iú†…… 744p8œ¸¸×÷·%É®]»>þøão¾ùfÓ¦Móª¯DÂ^@ræÌìTˆŽŽnjjâp8ƒƒz! C¹KÓÙÙ ptt$‘H===Xbww·‹‹ A±±±wîÜéêêòóóÃN”úúzB^7A˜¾Xˆ8|øpPPò¸2™ †a …"•JÿóŸÿ†‡õZ¦QQQýj+ &“Éd2+++ñ{& ,X••u÷îÝÊÊÊÿûß …Âb±¾þúëžžžŽŽŽ“'O¾ÿþû€˜˜˜¢¢¢àà` …uíÚ577777½&Wñ!rüÆb±ž>}ªòÂ%:ž––¶oß¾O?ý”Á`$&&b¯Ò ¦£B_À”)S  Õk"|áÂ…üqVVÖÊ•+OŸ>ýç?ÿKÿÃþàââ²nݺŒŒŒ©S§®\¹+Y*•bgFhh¨L&#ê])ªýβeËx<Þ_þòBjz')++Û½{7ކ–ùóbÑ×¼Xô5/}Í‹E_óbÑ×¼Xô5/:îÏ×ÕÕa/°¶ ìmÐ8àéûÿce‰©(¿}X¼ñ›Ó±Ä_óbÑ×¼Xô5/}ÍËÿÔÁí—ýÓL€IEND®B`‚pktools-2.6.6/doc/html/inherit_graph_40.map0000644000113200011300000000032612647437044015475 00000000000000 pktools-2.6.6/doc/html/classKernel-members.html0000644000113200011300000001235012647637662016444 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Kernel Member List

This is the complete list of members for Kernel, including all inherited members.

get_Q(int column, int len) const =0 (defined in Kernel)Kernelpure virtual
get_QD() const =0 (defined in Kernel)Kernelpure virtual
k_function(const svm_node *x, const svm_node *y, const svm_parameter &param) (defined in Kernel)Kernelstatic
Kernel(int l, svm_node *const *x, const svm_parameter &param) (defined in Kernel)Kernel
kernel_function (defined in Kernel)Kernelprotected
swap_index(int i, int j) const (defined in Kernel)Kernelinlinevirtual
~Kernel() (defined in Kernel)Kernelvirtual
~QMatrix() (defined in QMatrix)QMatrixinlinevirtual
pktools-2.6.6/doc/html/classImgUpdaterGdal__inherit__graph.png0000644000113200011300000003037612647437044021446 00000000000000‰PNG  IHDRÿ»ªÁH°bKGDÿÿÿ ½§“ IDATxœíÝwXS×ÿðw‘lEpPp£uoQë¨–Š€* 2u@Ѫ_¬ð«(Õ~­ƒ!ˆ"Êpj몭j¿RĪ­ˆZ†ˆƒ„™q~PR‘%1!œ×óð>^üš®®.®^½ŠôôttíÚãÇÇÏ?ÿ &³ñYàÉ“'èÒ¥‹ø×…)S¦àñãÇâ×­­­Ôî*¨ªª";;[üZ]Æ/^ˆŸËËËàAƒêMcÀ€-æ¦d‡¿‚èÞ½;îÞ½[ï¹æ®&TWW‡»»;îÞ½+>Ú_YY '''"##{öì¿¿²²"‘©©©xñâ/^ŒY³fÕ+Ð7Ô[ؼ|ùéééâ×ë\L&vvvˆŽŽnÐGrr²øß ~ú«ûÿ6—›’z´_A ((úúú2dnß¾føikkƒËå‚ÇãAKK ÕÕÕ¨©©‡ÃAee%6mÚàr¹`0˜:u*:„ñãÇ£¦¦***PWW/x<455sæÌÁÚµkׯ_ÃÛÛC‡ÅŠ+ä ÃèÑ£¡­­ WWWˆD"œ:u §OŸ/$|}} >™™™Ø¸q#4›»n+‰’9îs´ Â>ÿ»< …dÇŽ¤gÏžDGG‡L›6œ:uŠ6ÚŽB„B!ÑÖÖ&??·}ûv¢§§GºuëFöìÙC\\\ˆ‘‘!¤v?¸gÏž„ÃákkkrêÔ)B!|>ŸŒ3†hjjŠû)++#DWW—èëëoooR^^Þä>xFF±³³#ÚÚÚÄÚÚš¬X±‚ðx<2pà@B!€lÛ¶ôêÕ‹hhh‘#G’ôôtq_Må¦ûü2“B¯çoƒÁ@rr²Ì/é={ö,ºu놊Ÿ;vìBCCñûï¿ËtÚQÝ%½tön½WQdeeÁÍÍ ¨¨¨@zz:6lØ///yG£:(ºÏ¯ ‚‚‚PQQ{{{””” Gðôô„¼£Q-~Áf³ŠÐÐPyG¡”Ýì§(%E‹Ÿ¢”-~ŠRR´ø)JIÑ~ïàòåËxõꕼcP­pëÖ-yGPxô$Ÿ˜››#//OÞ1Þ ‹¥ MÍaàóKPQqGª}s8fÐÐïøü"©ö-+æææøûï¿åCQÑ“|Z’››+¾¸EQÿ^¼à!$äLM½¡®>_½SêÓ¸qãg¨ªZÁÐp>,ˆÆ½{Oåþÿné~óèš¿+/¯Ftô5ìÚu 55B…"¨ªª 3s´µÕ¤>½éÓ·#++L&"‘3gÄçŸÏ@Ïž’!FÉ ]ó·G<^5¾þú Áöí? ²’¡P&\]Gʤð`Ù²É „¡PB€ î`ܸ-X° ÷ï?•É4)Ù¡kþv¤¦F€˜˜kصë x¼*…¢z¯3 ܸ±’ÄÛ‘ˆ`øðÍxúô%ÞœkØl„Bf΀µkgÂÒÒP&Ó§¤Š®ùÛ¡P„C‡Ò0bÄf|õÕ9¼~]Ù ðÙl&&N´–Yá“É€ŸßÄ£ÿBBpáÂ7n –-;„Ü\ÉG¦Ú]ó+¸ë׳ñå—§ðÇOÁdÖ®}›räˆ/Æÿ@¦yx¼jØÚnDyyM“ïa³™`±˜ðòÏ>› N2ÍDI„®ùYi)óæíŽ{H“…Ï`0`iiˆqã¬džIS³. 6›Õä{ª«ùؽû2._¦7íPT´ø˜¾¾&""œ0Àd6=œƒøúNh³ÛZy{oq ƒ‰/¾ø³gÛ¶I&ªõhñ+¸yó†#)ɻɀ¶¶œ‡µY&ccØÛÛBE¥ñµ?ƒÁ@hèصY&ªõhñ·cÆXáÐ!o°Ù,°Ùõ¿26›‰E‹FƒÃiÛ3µýýí 4üµÁ¼¼ÆÁÃcL›æ¡Z;PS#À7ß\„º:ššªõö· ÜÝG·y&›.1¢§xaÄdÖþ Ú‰‰iøßÿ·Ð%o´øŸ/Ä’%ñøã|;¶§N-‡žž:86Øl¦Occû‘Ÿñ˜ÌÚ{ìÜé†cÇ0yrÌŸ…ÌÌ\¹ä¢Þ -~&¬\y7nd#!Á66]л·1Î[ BøøŒ—[¾É“û¢[7]0™LÄÄxàÓOƒÅbâÛoÝ0|xÌ›‰»w ä–jý_­[w‡ÿŠ„„%;¶þÏx¥¥<\ºt¯Mô5æ? Àç akk^ïùª*>\]£]„'–ÑóÿO*-~µ}û÷رãDE-ÂŒäG"\nœœö ¤„‹“'—£kW]yG¢þEOòQDÑÑ×qaaí¶ð@KK‰‰>ÐÒR…³ó^så‰z-~“œ|›6BPÐt,\8JÞqÞ›žžRSÀd2àâ‰W¯*ä‰ú-~réÒ=¥ÀÇg<>ûlª¼ãH&’“ýÀåVbÁ‚h”—WË;Zü ã×_ÁÛ;sçņ ³åGêLM;#9Ù¹¹/àá‹êj¼#)=Zü à? °hQ &O[Ûìý¶fiiˆ¤$_ܹSŸ ΤÚ-~9ËÉ)†‹K$lm»c÷î`±:öWbccŠC‡¼qãF6>ûìp³—(S²Õ±ç4WTônnÑèÚU11M^(ÓÑ Òû÷{âÜ¹Ûøâ‹cô6ÚrB‹_N^½ª€‹K86} ©©\^Œc…¨¨EHLLCHÈ)yÇQJ´øå ¼¼nnÑàñª”ä == yG’‹©Sûá›oæ#6ö'ìÜyIÞq”½cO«©ÀÃ#yy/pòä2téÒYÞ‘äjΜ!àó…Xµ* :±áã3AÞ‘”-þ6$ŠàçwYYy8~|)åöÎÎÃÀåVá?ÿ9 mmU¸¸Œw$¥@‹¿ }ñÅ1\¹r‰‰>èÓÇTÞqŠ—×8¼xQŽ  Thh¨böìAòŽÔáÑâo#ááßáðátÄÆzbÔ¨^òŽ£‚‚¦£ªªË–‚†vv}ä©C£üÚ@däøöÛKرÃS¦ô•w…¶aÃl89 Ã’%ñHOÏ‘wœ¿Œ9’ŽÍ›OcóæOáàð¡¼ã(<ƒ-[æâ£úaÑ¢}¸}»}Ü!¹=¢Å/CçÎÝFPP*V¬˜±òŽÓn°XLìÜéŠáÃ{ÀÕ5 <“w¤‰¿ŒüôÓ_ð÷O€§çXM—wœvGE……èhwX[wÁ¼y‘øûozû/i£#ùÈ@VV÷`Ò$ìÞ½ ÙnPÍãr«àì¼/_–ãäÉer¬´¢#ùHÛÇŘ?? ÆYbçNWZøïIKKII¾ÐÔT…ƒÃn””ÐÑ€¤…¿åç¿„³ó^ôîm¬TêÈš¶¶ŽñƒQ;Ðë×t4 i Å/%%%\8;ï…¾¾XUUyGêPêF*+«„›[ **š¾K0õnhñKWE‹öÉdàða_hk«Ê;R‡T7P^^)<|}ÒÑ€Þ-þ÷ ˆàë{wï>Eb¢LM•û ½¶bcÓ‡yãúõXµê HB´ø%DÁêÕI¸~=‰‰>øàyGR*ƒwG\Übœ9“‰ ŽË;N»D‹_B7žÄ©S¿cÿ~Ï·ª¢ÚƘ1½íŽC‡Ò°uëyyÇiwhñK`÷îË8pà:"#bÌ«–P23eJ_ìÙ³ß~{ »w_–wœv…+%&¦á«¯Î!"b¦Më/ï8€™3""Â_}uþ"ï8í½ž¿NŸÎDpðQÏ„“ÓPyÇ¡Þàì< <^Ö­; --U|úé`yGRx´øßÑÕ«bÙ²Cðñ™€¥Kíä‡jÄâÅãðòe–/O„Š ·ßÐÐ&&µ#䘘˜`ëÖ­066FII ŒŒ㌭°°0Œ3QQQâ%³­­-ÊÊÊŽÈ9aÇ5nÜ8ðù|ܺu cÆŒAee%~þùg,Z´/^„¯¯/ ==Æ ƒššZƒ> °eË€H$Bi©äwjoó‚Ô×ü qqq°±±¡¡!¶lÙ‚„„XZZBGG6lPûûcdd$úôémmmLš4 gÏžmvÓFEE::ÿÞµ…Ïç#00ÆÆÆ022B`` ø|>àìÙ³°µµ…ºº:ºté"þ’…B!¶mÛ+++hiiaôèÑøõ×_[ì³nÓëòåË077Çõë×qùòe,_¾¼A¬Zµê¦×TÎŽL󉱱1lll––¸qãºuëooo\¾|Aíè¾iii?~<4øãããÅß]Ý–AÝ èàóÂÛçü ÉÉÉï|š'’]ﱋ‹ )++#ûöí#ˆ““)++#QQQyþü9‰‰‰!fffäÂ… ¤¤¤„\¼x‘ôêÕ‹ÔE@233 —Ë%\.—âááQoúáááÄÁÁäææ’¬¬,2xð`LÊÊʇÃ!žžž$??Ÿ:tˆ ÅÅÅdûöíÄÈȈ?~œ<}ú”œ;wŽ˜ššŠ§ÝTŸÙÙÙ™>}:¹rå )--%L&“<{öLœ§.oÝ!¤Ùé5—³nz­åèèH[Ý®5e>ñóó#ööö„B‚‚‚ˆáóù¤sçÎ$--TUU‡C~øáBiðfffŠûjìónïóBrrrSíRdRü„Bjjj}œMúõëGëõuøðázÅÿöŸ¦¦&¹wï^½6ÖÖÖ¤°°PüøâÅ‹dРA¤ººšÜ¿Ÿðx<" ɵk×ÄÓ¶²²"ñññõú9pà€xÚMõY÷deeB)(( Ä_lc¹ !ÍN¯¹œ½ø¥1Ÿ$%%###"‰ÈàÁƒIjj*!„²iÓ&’––FX,–ø;zû;|ó3nìónïóBsÅ/“}~---µ›é=€œœôëׯ^»>}úÔ{œ^½z***°qãFxzzŠ7ó€ÚsÌ»téR¯ŽŽ8øà„††bàÀÐ××L™2éééøá‡ÄûûozsÓœŽ™0a¢¢¢$~ÎÒÒ–––¸pá–-[Öªiòx<ñ–B‡žÞÞ€öåÞå±P($;vì ={ö$:::dÚ´iäÔ©SÄÐаÑv„" ‰¶¶6yüø±ø¹²²2âááAtuu‰¾¾>ñöö&ååå„Úƒ+zzz¤[·ndÏž=ÄÅÅ…@@¶mÛFzõêE444ÈÈ‘#Izzºxߨ©>›ÚïÊÈÈ vvvD[[›X[[“+VGH!-N¯©œ}Ÿ_ó !„9r„ ßÿ}½i&“I^½z%~îíÏôÍÇ|>ŸŒ3†hjjŠ_oïó‚LøIêÌ™3$33³ÞsG%ƒ ’ù´;:E,~IÑùäý4WürÛçÏÊÊ‚››222PQQôôtlذ^^^òŠD) :ŸÈŽÜöùƒ‚‚PQQ{{{””” Gðôô„¼"Q ˆÎ'²#·âg³Ù Ehh¨¼"PíOdG¡/ì¡(JvhñS”’¢ÅOQJŠ?E)©wìa0èß¿?Œå•©Í‰DL0™¢Vµ)/ד)‚šZeËoncwîÜÁ¸qã’’"³i(Ò|R]Ý 55hiq[ÕN’ï½½)**Â;w'µÁÑþU«V!//¯m’)€ÊJ22L`bRŽîÝ_ƒÍ~·Q‚ õñâ…*45ùèÚ• =½J0d;jܸqprr’é4ä=Ÿ¼|©Š‚M¼~Ý êê|˜›¿S[‘ˆÜ\-<}ª…¾}K £S#ã´ò£««‹)S¦4úšÒß«O ¡ÿõxýºZøúkgL™Ò·Åv7o>‚½ý·`0jׂººðöWבÐÓÓhƒäÊéÕ« 9ò+¢£¯¡¸¸L¼F‹ŠZ„Y³µÐøé§¿°zu2 ^BE……;wB¡­­*ëØŠ(Ué‹>ÿ<‡§C$ª½rkÖ¬A s€f³íÜÝcqõê}ðùB€Š "Áôéý±dÉx jÙñ•ÂÍ›ó.\¸&“!þÌÙl& 膳g?k¶ýóç¿á#‹ ‘ˆ@WW..#àå5ÆÆ:ôB½© à%âãoàС_ÀãUƒ‘¨álª¢ÂÂĉ6ˆ_Üh?YYyX¹2 þYØà€—¦f'ܽ¦Ì åT9D%_L&£‘µsí.@VV>&M Ç×__h°Ö€•+?‚¨‰ÆB¡èŸ *y£F…áÚµ¿dóŸè ®_ÏÆ¨QaˆŽþ¯_WB(5Zø@íç<£ÁóååÕX¿þfÌØììg ŸÍfaÖ,[e.|ôw~±O>Ôhq B"ìØñìì¶áöíúG¸»w×Ç‚#¡¢ÒôeäŸQ` &LM;K={GÒ§é;mq8lÌ;ÖÖõ‡ØúñÇ?1nÜ8p"@ÐpÉ,ñ駃¥–¹½¢ÅÿÁƒ- ¯ßô>‘ˆàñãb|üñ7øï/Ö{mÍšéPQiú£d0àpØ8zÔ½{ËÿwqE¦§§Ó§—CWWlvsŸ)°víÌzϧÂÕ5EE¯!6ýû½®®:FŽì)µÌí-þ0™ Ì™3lvÓ›‚Baí¾ç‰·ê=¯§§?¿‰Î¬ Àb1pðà d.õÜ‘‰‰RRü ªªÒèÁV6›_߉06Ö®÷|nní 7šÚM¨këàð!X,:ëÓOà ööƒ!4Üô¯Ã`0àè8ß¿¦Ák¾¾¡©Ù £A› ¬1p`7iÇíÐLL:£kW]0™Œ -­N°kÐ&1ÑëÖÍßß±1Ê$s{C‹ÿ ¶¶æ03Ómð<‹Å‹ÅDx¸#¾ùÆ:5Ü¿×Ðè„+¦Ö›Q ‚ƒgâ÷ßsáæ ¯Z¦ù;ŠÒRæÌùUUlÛæ,>‘ ¨ÝB[µê£´õ1 Ø!>~1TUÙ`±nÅ™›ëÓñ?hñ¿ÅÞ~p½Íw6›UUicúôæ^´h´øì>Xµê#,]j‡“'—!7·»ðúu…Ló·wEEe˜3g*+ù8v,ÎÎðy³€ÚÏÔÈH Œj¶++¨«sй³Z½Ý86› GGºÖ¯C‹ÿ-3g!f³™è×Ï gÏ®€šš æÏByyÓkoUUN¸»ÅêÕzö4ÂÑ£(..ƒ›[4¸Ü*ÙÿGÚ¡¢¢×ptÜ ƒ'–¡K—Ú_FÜÝGã³Ï¦€`ݺÁá4ýËJq1ÎÎ{aaaˆK—Ö`Ĉâý{@„Ù³•ç¦(-’åÈ¡í‘H$"C†„.]>#ÁÁGIM€BÈ“'ÏIÿþ뉛[áó…M¶„äâÅ»D(5x-;»ˆ ¸|üñ7„Ë­’Ùÿ¡=*,|EÆŒù?2aÂR\\Öè{~ûí‰~®u¸Ü*2uj=:Œ”–ò!µßÇæÍgˆ©éJ2a™do§Rè~¸xñ.ªªø .¹yóœ÷bîܡضM²«æ>,ÆÜ¹»`nn€Ã‡}ÝwU6……¯0w²‘œìßâ5áó…puÂ_=ÃéÓ+н»~½×/^¼‹ÎÕéõÿJ¥kþV:}úwbf¶’ìÙsEâ>îÝ+ }û~AfÏþ/á—‘Ù§IDATñ”{ à￟“aþ$“&m%ÏŸs[nБHDüý’^½>'™™¹RNØaÉoÜþöjÖ¬AX»v&BCÏàøñ[-7h„)RSý‘“S W×èf#tdÿ] ‡ÝÐÓÓÀñãÍždÕœððïpæL&"#Ò#ù­@‹_vpwÕ«“ðÛo%êÃÆÆ))þÈÎ.‚›[4**:î€yòä9æÎÝ CC-$%ùBGG]¢~bcÂΗî;»>-7 ÄhñKèË/?ÅøñÖpwENλ ó¶>}L‘’⇊àዪ*¾”S*¦¼¼˜7/ÚÚjHHX"qáŸ;wÿùÏI¬^ý\\FH9eÇG‹_B,»w»Á̬3ÜÜ¢ñü9¯åFèÛ× z!33þþ ^ˆÒ‘½†“Óhi©"5Õ_âMý›7aéÒCX¸pV¯ž&å”Êÿ{ÐÐè„ýû£ªŠoïx‰×ÜC†X !a ®]û É ¶Ø!•áÓOwA[[ ÇŽ-•x¸³GJà嵯õÀ¦MŸJ9¥ò ÅÿžÌÌtqðàܽ[Ÿ¯¹‡ 냗àäÉ ¬[wLÊ)åïÕ« ÌŸ ö‘xܼüü—prÚSS]ìÛç¡ô×ä¿ZüRпW9â‹_~yoïx‰£G÷BTÔ"$&¦aÛ¶óRN)?<^5\]£P^^ƒ¤$_‰7õóó_ÂÞ~' ´’â--¥xSjhñKÉàÁݱ¿'®\¹5k’$ÞtŸ:µ¶owÁ7ß\DdäÒ )ÕÕxxìÃÓ§¯”ä+>e·µêNÛÕÔTEb¢·²Ž¸+U¬y‡è(ÌÍõamÝ[·žGe%ãÆYIÔOŸ>¦ÐÕUGHÈ)˜šê ÿ®RNÚ6ø|!–,‰ÇíÛùHIñG¯^’ dòêUœœö ¦F€£G`d¤Ýr#ª%÷hñKY¯^ÆèÚU›7Ÿª*Æõ¨[Ûî„ ;‹>0••‰”“Ê–P(‚Ÿ_~ùå!ŽõGŸ>¦õÃãUcþü(¼|YŽãÇ—ÒaФç^Ó—GQst .· 6œ€ŽŽ:ÜÜFJÔÏçŸÏ@EE üý Šqã>rRÙ „`Íšd\½zII¾èÛ×L¢~**jàê…üü8qbY£c-PïAÎçwh[¶œ#ff+É©S÷!ŠˆŸßAbeLnßnç­¯_œtニ\»ö§Ä}TWóɼy{‰Í:rï^ÓQÿH¡Å/cÿùÏ bn¾š\¾|Oâ>jjdÁ‚hÒ·ïäÁƒgRL'}Û·Oºu[EΟϒ¸>_H/Ž#½{NnÝz"ÅtÔhñËšH$"Ÿ}v˜ôèD~ý5Gâ~x¼*2sæ2bÄfRTÔøõîò–˜˜FLMW’nH܇P("Ë—'KË@rýz¶ÓQo¡WõɃÁÀÖ­N6Ìžžqøë¯gõ£¡Ñ KÀá°á•Šu!ÐåË÷œŠààX¸°ùa¶šv'NÜÂîÝ 0zt/)&¤ÞF‹¿ ¨¨°ë‰^½Œáè¸[‮®’“ýPTT†%K$?™HÚþ÷¿ÇX²$îîc°lÙd‰ú „ $ä$¢£¯á¿ÿumq¼DêýÑâo#êê9âS|òÉNdfæJÔ‰‰âã#==kוrÊÖ{ô¨î4É!!öõ!¬Y“‚øøØ¿1½›N¡Å߆ÔÔ88pÀ vüy‘/ú÷ïŠ;]qäH:öíûIÊ)ßÝóç<¸¹EÃÒÒ»v¹5y7ãæ",]zÇÿqqž˜<™^“ßVhñ·1UU•z €ß—l0cƬ[÷1BBNâÂ…;RNÙ²ÊÊ,\ƒ¼ ªªÒê>j ?.ÜA\ÜbLšd#ƒ¤TShñËÁ› Éþþ“°`Á(øû'H܇$„B|}"/ï½%º4—ÏÂßÿ ._¾ÄDLœh-ƒ¤TshñËIýÀ^‰‹wóæ96¬<=cQPðRÊ)÷å—§ñÓO!6Ö­n_S#ÀâÅq¸zõO$$,¡7Í”ZürôïÀ..{‘‘ñw«û`³™ˆ‰q‡žžÜÜ¢QV&Û‚ÄÄ\ûgÜ_ôDI-~ @·nzˆŠZ„7",ìŒÔ3feåaÅŠÃprÿI­n_^^{u^ff.RSýñá‡ôæòF‹_A¨ªª .Î66¦puÆ­[OZÝLj=±m›¢¢~ÄÑ£ÿ“Z¶âb.<<â0dˆÂÃ[ݞ˭‚»û>ܽ[€ƒ½0`[_ÐâW ˜è[[s8;ïÅ?þÙê>‡ÂßV¯NÂÍ›Þ;See ÜÜ¢ ££†ØXÏV™WRÂ…ƒÃ.üõ×3ºÆW0´øŒº: KðÉ'ƒ±`A ’’~muëÖ}Œ1czÃÇ犊^¿WžÀÀ<}ú ññ‹[}_ÁœœbÌœ¹••||÷Ý*ºÆW0´ø‹ÅDD„||&`õêäVåÇd2°{÷¨ªªÀË+|¾P¢{ö\ÁéÓ¿cïÞ…07×o¹ÁnÝz‚Y³þ “Î8sfºv¥q(y_WH5o×®KÄÔt% =Óê¶“îÝ×Í›O·ºí/¿<$ݺ­"»w_nuÛ+W=ƒˆ«k)/¯nu{ªMÐëùÛƒä䛤[·U$88•…Mߟ¾1ññ׉©éÊV &RTTF ÚH||â[•œ8q‹˜›¯&+W!|¾°Õí©6C‹¿½¸pá±°XCüü’šA«Ú.[vˆX[¯#¹¹¥-¾·¦F@>þx?~K«×Ú{÷^%¦¦+ÉæÍ§‰HÔº…Õæhñ·'ׯg+«`â踇ðxUïÜŽÇ«"cÇþ™9sG‹ Ž/¿øà8::bݺuï|žAAAÜÜÜŠÈÈHðx‚——ŠŠŠàææ†¯¿þáááX¿~=222°zõjqá×ñóóÃóçÏÔ.`$ÉFI-~¹uëöîÝ‹üÛ¶mÄ ‹+W®à믿ÆÜ¹sñóÏ?#!!AAA°²²ÂDZclj¦wòäI|õÕWàr¹ ƒ¶¶6ÔÕÕ‘œœŒU«V¡OŸ>xøð!¶mÛ¨¨¨ÀÆ1eÊ|õÕWÈÌÌDXXf̘={öÀÍÍM\øpôèQ"** <[¶lÁþýû1cÆ @JJ ‚ƒƒaaa§OŸÂÂÂBܶ²²Àáp`jj  öl;I²QÒC÷ùeÄÙÙêêê˜:u*`þüùPWWÇ´iÓ\.ÇŽƒ¯¯/†  2MÏÏÏ]»v… ¼¼¼pñâEœ>}¾¾¾;v,ôõõ1|øpx{{¨-ÄØØX,_¾úúú022”—7~jïùóç±bÅ ¡GðññÁÍ›7ů{{{ÃÖÖ555 „@UUUüÚŒ3êýj6J2tÍ/#êêµϰÙìFÀÓ§OaiYL»7ט@íÝk›{\§k׮⛛›£¤¤ ½zÕ¿Íu=Ä9òóóÊÊJôîÝ»ÙÿϳgÏ\ó ¡ñïzÌÍÍzzzàp8ÈÏÏ÷Y· Ãår1{öl@II‰Ô²Q’¡Å/GÆÆÆxüø±x¦Pïh¸‘‘ êvnn.X,–xmX'??_ÜO^^ôõõÁáp““ƒž=ÿ½1Æ“'OÕÕÕ AHHFŽ >ŸóçÏ7™UGG;v쀙™€ÇãáÅ‹â×ëj ƒÆÙ³g±råÊz}¼yÃÄÄDjÙ(ÉÐâ—#{{{DEEAGGVVVÈÉÉA||¼ø@Ù´iÓ°sçN,]º(,,Ddd$¦N •ú7ÆÜµkV¯^ .—‹}ûöaÊ”)ÐÑÑÁÞ½{¡¡¡<|øqqq>Ÿ@6›ššÄÇǨÝß®ÛJ©¬¬„šš`ìØ±ˆ‰‰ŸŸÊËËkkëF¯€ôòòÂÒ¥K¡®®Ž)S¦@$áÆ¸qã†x!1{öì÷ÊF½?Zürdoo¡Pˆ;vàõë×èÛ·/|}}ž.\555ìÝ»EEEÐ×ׇÜÜÜô5yòd¬^½UUU°³³ƒ««+Øl6ø|>öîÝ‹ÒÒRôìÙ6l€¿¿?455áçç‡ÐÐP¨©©aþüù°³³CPPŽ=ŠþýûÃÁÁß}÷`ñâÅØµk–,YƒqãÆÁÇÇG|ôþM={öÄÎ;‰Ó§OÃÀÀC‡/Èêþï’dÛµk— ¿åB¯çKJJ œÛä’Þ´´4ÕÛôýé§Ÿ€˜˜˜wê£î§>z ró&Nœˆääd899É;Š¢H¥GûåèÑ£G Cvv6ª««qïÞ=ÄÅÅaæÌ™òŽF)ºÙ/GóæÍCUUÖ¯_W¯^¡K—.˜>}:fÍšõÎ}hhh´êýU‡¿±X,,^¼‹/–¸Î;cÕªURLE) ºÙOQJŠ?E))Zü¥¤hñS”’¢ÅOQJŠí ‹Å:TTôæEU=着*|÷Ýw %»§=¥˜X,f̘QïRc%Go×EQJŠžÞKQÊŠ?E))Zü¥¤ØRå‚¢¨6—þÿÅ3]BêõIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkfilter__spatial_1_1pkfilter__spatial.html0000644000113200011300000002750712647637662024703 00000000000000 pktools: qgis.pkfilter_spatial.pkfilter_spatial Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkfilter_spatial.pkfilter_spatial Class Reference
Inheritance diagram for qgis.pkfilter_spatial.pkfilter_spatial:
Collaboration diagram for qgis.pkfilter_spatial.pkfilter_spatial:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list METHOD_OPTIONS = ["none", "median", "var", "min", "max", "sum", "mean", "dilate", "erode", "close", "open", "homog ", "heterog ", "sobelx ", "sobely ", "sobelxy ", "sobelyx" , "smooth", "countid", "smoothnodata values", "threshold local filtering", "ismin", "ismax", "order ", "stdev", "mrf", "dwt", "dwti", "dwt_cut", "dwt_cut_from", "scramble", "shift", "savgolay", "percentile"]
 
string METHOD = "METHOD"
 
string DIM = "DIM"
 
string NODATA = "NODATA"
 
list PADDING_OPTIONS = ["symmetric", "replicate", "circular", "zero"]
 
string PADDING = "PADDING"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 38 of file pkfilter_spatial.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/classImgReaderGdal-members.html0000644000113200011300000006247012647637662017663 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ImgReaderGdal Member List

This is the complete list of members for ImgReaderGdal, including all inherited members.

close(void) (defined in ImgReaderGdal)ImgReaderGdalvirtual
covers(double x, double y) const (defined in ImgRasterGdal)ImgRasterGdal
covers(double ulx, double uly, double lrx, double lry) const (defined in ImgRasterGdal)ImgRasterGdal
GDALSetNoDataValue(double noDataValue, int band=0) (defined in ImgRasterGdal)ImgRasterGdalinline
geo2image(double x, double y, double &i, double &j) const (defined in ImgRasterGdal)ImgRasterGdal
getBoundingBox(double &ulx, double &uly, double &lrx, double &lry) const (defined in ImgRasterGdal)ImgRasterGdal
getCenterPos(double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
getColorTable(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getCompression() const (defined in ImgRasterGdal)ImgRasterGdal
getDataset() (defined in ImgRasterGdal)ImgRasterGdalinline
getDataType(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getDeltaX(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDeltaY(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getDriverDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getFileName() const (defined in ImgRasterGdal)ImgRasterGdalinline
getGeoTransform() const (defined in ImgRasterGdal)ImgRasterGdal
getGeoTransform(double *gt) const (defined in ImgRasterGdal)ImgRasterGdal
getHistogram(std::vector< double > &histvector, double &min, double &max, unsigned int &nbin, int theBand=0, bool kde=false) (defined in ImgReaderGdal)ImgReaderGdal
getImageDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getImageType() const (defined in ImgRasterGdal)ImgRasterGdalinline
getInterleave() const (defined in ImgRasterGdal)ImgRasterGdal
getLrx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getLry() const (defined in ImgRasterGdal)ImgRasterGdalinline
getMax(int &col, int &row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getMetadata() (defined in ImgRasterGdal)ImgRasterGdal
getMetadata() const (defined in ImgRasterGdal)ImgRasterGdal
getMetadata(std::list< std::string > &metadata) const (defined in ImgRasterGdal)ImgRasterGdal
getMetadataItem() const (defined in ImgRasterGdal)ImgRasterGdal
getMin(int &col, int &row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getMinMax(int startCol, int endCol, int startRow, int endRow, int band, double &minValue, double &maxValue) const (defined in ImgReaderGdal)ImgReaderGdal
getMinMax(double &minValue, double &maxValue, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getNoDataValues(std::vector< double > &noDataValues) const (defined in ImgRasterGdal)ImgRasterGdal
getNvalid(int band) const (defined in ImgReaderGdal)ImgReaderGdal
getProjection(void) const (defined in ImgRasterGdal)ImgRasterGdal
getProjectionRef(void) const (defined in ImgRasterGdal)ImgRasterGdal
getRange(std::vector< short > &range, int Band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getRasterBand(int band=0) (defined in ImgRasterGdal)ImgRasterGdal
getRefPix(double &refX, double &refY, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
getUlx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getUly() const (defined in ImgRasterGdal)ImgRasterGdalinline
image2geo(double i, double j, double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdal
ImgReaderGdal(void) (defined in ImgReaderGdal)ImgReaderGdal
ImgReaderGdal(const std::string &filename, const GDALAccess &readMode=GA_ReadOnly) (defined in ImgReaderGdal)ImgReaderGdalinline
isGeoRef() const (defined in ImgRasterGdal)ImgRasterGdalinline
isNoData(double value) const (defined in ImgRasterGdal)ImgRasterGdalinline
m_filename (defined in ImgRasterGdal)ImgRasterGdalprotected
m_gds (defined in ImgRasterGdal)ImgRasterGdalprotected
m_gt (defined in ImgRasterGdal)ImgRasterGdalprotected
m_nband (defined in ImgRasterGdal)ImgRasterGdalprotected
m_ncol (defined in ImgRasterGdal)ImgRasterGdalprotected
m_noDataValues (defined in ImgRasterGdal)ImgRasterGdalprotected
m_nrow (defined in ImgRasterGdal)ImgRasterGdalprotected
m_offset (defined in ImgReaderGdal)ImgReaderGdalprotected
m_scale (defined in ImgReaderGdal)ImgReaderGdalprotected
nrOfBand(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfCol(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfRow(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
open(const std::string &filename, const GDALAccess &readMode=GA_ReadOnly) (defined in ImgReaderGdal)ImgReaderGdal
pushNoDataValue(double noDataValue) (defined in ImgRasterGdal)ImgRasterGdal
readData(T &value, const GDALDataType &dataType, int col, int row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, double row, int band=0, RESAMPLE resample=NEAR) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readData(std::vector< T > &buffer, const GDALDataType &dataType, double row, int band=0, RESAMPLE resample=NEAR) const (defined in ImgReaderGdal)ImgReaderGdal
readDataBlock(Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
readDataBlock(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const (defined in ImgReaderGdal)ImgReaderGdal
setCodec(const GDALAccess &readMode=GA_ReadOnly) (defined in ImgReaderGdal)ImgReaderGdalprotected
setNoData(const std::vector< double > nodata) (defined in ImgRasterGdal)ImgRasterGdalinline
setOffset(double theOffset, int band=0) (defined in ImgReaderGdal)ImgReaderGdalinline
setScale(double theScale, int band=0) (defined in ImgReaderGdal)ImgReaderGdalinline
~ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdalinlinevirtual
~ImgReaderGdal(void) (defined in ImgReaderGdal)ImgReaderGdal
pktools-2.6.6/doc/html/dir_b66e135988e27fdc966ddddb8708f514_dep.png0000644000113200011300000000417412616110567020460 00000000000000‰PNG  IHDR‹ß1ðbKGDÿÿÿ ½§“1IDATxœíÝkPTçÇñ/‚ ¨/c¼E‘o• ¼p¢!)1Œ)^É ØŠ—±õRQ1ÁA c(¥E5#^3º¢6ŠEq¼$šMÕïVe5c3SA'4l_t$Ò˜ðD–ÝE~ŸWœÃá<v¾ìÙÙÙ]Ül6› ‘ú´pöÒt(1¦XĘbcŠEŒ)1¦XĘbcŠEŒ)1¦XĘbcŠEŒ)1æÑÞ¶m«V­²×,Òˆ¼¼¼X±bݺu{ês4(–­[·röìyBBÂrq€Ý»w2~üxçÅF^ÞÚ†žFYQ‘_ƒÏ¡Ç,bL±ˆ1Å"Æ‹S,bL±üˆëׯ1p`/gáR˨©©áÎrgáRšu,555lØð1QQáôïߕѣ£8vì~Œ@xx“§t ~R®)Ûºu#Ë—g“™ù‚ƒÃ8þ4sçþ€;öÊ—_þÓÉSºŽf}ϲnÝ*’“5Œ:2dÈ/IJJsöX.«YÇrýú5z÷î_g_PP_'Mãúšu,;¾ÈÅ‹gëì»|ù¢“¦q}Íú1˘1ãøàƒt|}[3`@(.œaÙ²Œ:ÇTVVàíý¼“&t-Í:–)SfðÝwÉÌL¥¬ìAA}HNÎ 1q ]ºt#44‚ððW8s溳Gu Í:–̘13æÕîûúk+îîX,EÎÍ%5ëÇ,òó(1¦XþO÷î=)-ÕÓüO¢XĘbcŠEŒ)1¦XĘbcŠEŒ)1¦XĘbcŠEŒ)1¦XĘbcŠEŒ9ìe•É”–ê [ö—ÀÛoÿÊ!k9,– VAçÎ]µä3ïøñ£ýõÙ‹`Ú´Ù ëÈ%Ÿi ±tëÖš˜˜HŠ‹wãççöƒKÍãÛº ÙÁš5aË–ÝlÞ\Èþý{ÈÍýþ¯Ïf³‘žþ‡àÓOàïߎÊÊ Æ0yòtNºFRR3gN¤²²‚Q£â(,ÜŽÍfààÁbZµò&2ò­Ús~öÙ~ø;ééY,Z”Bqñn¾øâ4‹}Hvv&ååe?9ï¦MkÈÎÎdéÒ?RRbeΜù¤¦ÎnœÇ \:–Å‹³ dàÀpÒÒ–PP°©ö{É,_žM~¾??ª««©©©¡¢â?xzz1vlW¯ÞÆË«C‡¾Cyy_}u€íÛ7÷<<¾ÍúÌ™óðññåÝw @bb2>>¾Œ›À;·rÞ•+ÿDFÆ2"#ßÂß¿ƒ¿IJÊ"»Þ&ÎäÒ±Ö~ø 7nü«v»¤ä8ƒ !'gií¾¶m_`×®C?~Œ¾}»0lØ`Ž=B‹-hÕÊ›èèvîÜFee{÷ÖFðˆ/-[¶|âv}®^-¥wï~uöõyâ±îáš—Ž¥´ôòc__¢S§k·7o.$'g%;vláÈ‘CÜ¿ššÖ­+Àj-'>~qqïpûöÿ>yÔ¨8víÚÆž=»X'F{èÚµ;/ž«³ïÒ¥ u¶>|ÀÍ›7캶#¸t,))³°Z¯PRrœÅ‹ç_û=oïçéÕ+ˆÄÄdæÌù-UU÷qsscäÈ( ·s÷î·—¤¤i„„—÷!Ëð÷o‡¿;RS3IK›Ë!!ÄÅM°ûúÍÍÖ€‹gll,Õäå­­÷Ø€?òó-FïH´Z¯HyyÓº®ï¦sç®ôë7 v_aáv²³3ùüó»¯÷艦·¿Åb!6ö©ßZàÒ÷,M͹s§™:5žS§þÁ½{•œ8qŒ%K0~üdgf.ùÏ©|}[3aÂTgñDõ=y6wn*ññùuëß¼ôROâã'ºìïòs¹d,íÛw 'g¥³Çx"“Kcjj¦&q<]†Ä˜bcŠEŒ)1¦XĘbcŠEŒ)1¦XĘbcŠEŒ)1¦XĘbcŠEŒ)1æÐ?egg²~ýÇŽ\ò™vþüÂÂ"¶žÃb™4iZ“|¯Œ+ ‹ :z„ÃÖsX,óç?›/5lNô˜EŒ)1¦XĘbcŠEŒ)1¦XĘbc zRÎÝÝ¢¢ùÙkiD~ÞÓhÐç³X­VNž<Ù Ä1ÜÝÝ‰ŽŽÆËËëiOQРX¤Yчùˆ9Å"Æ‹S,bL±ˆ1Å"Æ‹S,bL±ˆ1Å"Æ‹S,bL±ˆ1 ÀÙCH“pì¿>Ä@&Ú øUIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask__inherit__graph.md50000644000113200011300000000004012616110566024351 000000000000009473b48fc4d0e2ccad567f96a6c088dcpktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkdiff__accuracy_1_1pkdiff__accuracy__coll__graph.png0000644000113200011300000001033512616110567030600 00000000000000‰PNG  IHDR½€ÑQÿbKGDÿÿÿ ½§“’IDATxœí{PWûÇŸpiE"C@¹jÞ@_:N§¾Ó "4x£u,Rµ h­­EEÛÊÅ©c‹•‹à¥X‡€ ˆÚzÅÁRQ18`E —V‘ˆI Ùìïõ·Æì’Îgüãì“sžóÝÃ7{69Ç,Çq@ ôÄÌÔo$È7* ß ¨€|ƒ Ë8Ý( ‘H¤V«ÓݨÅÉÉÉÞÞÞÉ72™¬££Ã8§4j‘Édmmm#Ê7žžžÆìn´ñ÷ß­/tƒ ò ‚ È7* ß ¨@wß4440 c¦úñÇ FZZš¡4 ÔœÁ`444PNkZèî455q8œáÈŒãxAA«««@ 0TÎqãÆmÞ¼†S¶ñy#}£V«;::†#s]]]}}}^^Þ­[·îß¿oœ‡¸z ŸlãC#ß×óÒÒÒÉ“';88|ýõ×½½½ä«8ŽoܸÑÛÛûÉ“'³fÍ€ &/uvv®X±‚ÃḸ¸lܸQ¡P $)++›1c†••—ËÍÏÏ'ã¾¾¾S¦LéÉÁq<++kÚ´i666sçÎ=uê1õï‹8—‹/ººº:tˆ¨¦%Î;ÇãñlmmSSS‰ƒÁ8pàÀÔ©SíííÓÒÒòóó'NœÈf³ 6Ð7 ‰¤¼¼|ð:"‘ø|þýû÷«ªªx<^rr2T«Õ¤iÈšdȈÿÆÆÆÚÚZ//¯äädA²Uww·¥¥eVV–X,ÎËËc±XÝÝÝ8Ž«Õê‰'fggã8þÃ?xzzj Ãq|ÿþýÎÎÎüñG{{ûùóçy<¨¯   K—.ݺu‹¨¦%æÏŸ/“ÉŠ‹‹€85 “Éd¹¹¹ðÙgŸÉd²ììl²Â ܾ}ûöíÛúýa¨B;ßÔÖÖ‡€ÇãÁøøx¸wïžfM¢Ü××Çd2Éñ*))áñx:ƒd+©Tjnn¾k×®§OŸªÕê®®. Ãp¯ªªb±XÄŸçæÍ›PWW§Ù——×o¿ýF >zô( Òq.dóþ¾¹|ù2Žã†€H$"‚B¡8/­2QaŒéÍSDaÊ”)---DùÆsæÌIIIé__"‘`æîîNòx¼––A²‰­­myyyUU•‹‹‹¯¯ï•+WÌÌÌ   @¥Rq8ƒ1sæLКª½¼¼ÈÃiÓ¦ $€<…ÁOÖÉÉ ˆÞIÆŽ æææZeZA;ßoJ¸ÿ>1¬PVV–••UPPP^^®UüøñL&³©©‰8llltvvÖ$›ÈårµZ]TT$•J£¢¢,X •J1 »wïîúâââ®±ÖÍÍMs ¨¾¾~ DùµoC}Å`ŒsYú<åçç'‰®_¿îáᑘ˜¨ymOJJš4i’\.'‚]]]D<<<Üßß¿©©©®®ÎÓÓ311QgL%—Ë­¬¬Ž;ÖÞÞž““cee%—ËËËË™L¦D"!õTWW€P($fdd¸¸¸œ={öÉ“'/^œiÒ¤¤¤$¥RùÑGY[[q©Tiggçèèøí·ßÊårAÍTÀÝÝÝÂÂbÊ”)¥¥¥8ŽÇÆÆòù|M=jµÚÝÝ}óæÍdC ÃÒÓÓÝÝÝÙlv```ii©½½ýkû"ËZ²‘o^ÏÐ}c9)++»uëyxìØ1oooêÑbTßÓ™ÚÚÚeË– …žžžªªª„„„èèhS‹2 FÝ·58666±±±¦V1ñññ===!!!ííí\.÷‹/¾ ¹àáƒåÿݵµµÝ¹sgΜ9FèkÔB|Ö3ΦJ4O!¨€|ƒ ò ‚ È7*õóTkk«1»û‘Hº¬ß ¥…Baeeeœ¾ŒäKKKƒa¨PF »»oíÚ³QQÞ>>ï˜Z‹Œ7Î8É7l6Û×××8}„ƒÿT*ÕBáÓÄÄHSk¡#èþF7%%7 ¨®þG"‘™Z A¾ÑÁÇR¡ð_ƒqü¸ÐÔrèòJKk˜L3À0uQÑ SË¡#È7:(,¼¡R½øÉ•úúÖÆÆ6Óê¡!È7Úܽ+nh¼X¶377;q¢Æ´’hò6¥¥5,“¬U1 £oØlvLLŒasªÕj™Œ¾ô&O¹··´Ê#½}ƒãøñãÇ—/_¼víÚšš???ÇOž<¹bÅŠyóæÅÅÅ]½zUó¢ ýõWTTŸÏ?wîœVN¢feeeddä'Ÿ|’‘‘¡T*5{ÌÌÌŒŽŽ~öìÙ—_~ Ÿ~ú)ñRwwwZZÚ¢E‹–,Y’™™Ù××7PÄPJÔjuAAAdddppðW_}U__3š¦N-Í#½Ÿsúôé_ý5..nÚ´i ©©©pæÌ™üüüøøøI“&544¤§§k6Q(ÉÉÉëÖ­ûðï]»¶sçN+++­Ì'NœHMMíêêÚ±c‡M@@à8ž- wïÞmcc³oß¾eË–•””MöìÙ#•J³²²ärùöíÛß~ûíåË—÷© «¤¨¨H ãðÓO?ifÐÔ©¥yd ÷õ¦¸¸xõêÕ³g϶³³ûàƒ¢££Éàûï¿Ïf³gΜ¹råJÍ&J¥Çq¹\naaXVVfiiÙ?óš5k\\\¦N}þüy"˜““#’’’lll´ê«TªK—.­[·ÎÑÑ‘Ëå®\¹òüùó:ƒÃ¡ääÉ“šã`ð™æèí±XÌãñÈC.— ­­­'N$ƒ¯,€Œ;6==ýÎ;K–,Y¿~}mm-ƒÁèŸÙÅÅ…(¸ºº¶··å{÷îy{{9r¤ý§OŸªÕj'§OŒrvvnoo×%íííýÇaô ·o8Ncc#yøÏ?ÿÀøñã››_>~òßÿÕlÒÛÛ«V«“““ËÊÊ‚ƒƒ¿ÿþû®®®þ™[ZZˆÂÇíììˆrJJJ\\Ü¥K—jj´þnkkkff&‹‰ÃÖÖV‡£38J&L˜ÐFzû&(((33³²²R*•^¿~=''BBB²³³«««e2YMMÍ¡C‡4ßÇ cÓ¦MÏŸ?W*•,‹˜NŸ>ýüùs²ÚÞ½{=zt÷îÝÜÜÜ?þ˜ZYY½óÎ;ááá»wï&ïpår9°X,??¿ŸþY,777çååè ‡’… jŽÃôÉ7½ï‹CCC1 ûå—_:;;¹\nllìöíÛCBB0 KOOöì™§§çêÕ«5ï-,,¾ûî»ììì¶¶6''§¤¤$ صk—··÷˜1cˆj6lP(þþþšóKxxøÅ‹=9}úôÅ‹Ÿ9s¾ù曽{÷®^½ÚÜÜ|îܹ:ƒd**ùüóÏ•JefffGG‡»»{BBñ¹i”ðÊs CCCõÚGñèÑ£eË–¥¤¤888¸»»ÁŠŠŠüüüýû÷ë•„û7裄VlÛ¶ÍÞÞ¾°°Œæ{¿¦¦¦;vˆD¢ÞÞÞ;wî8p`Þ¼yÉŒ '†yžïÒ¥K ÅÖ­[;;;ƒ‚‚,X0ôæcƌѫþðA%4秣ᚧ£ ä´SB s3zÐÚ)!´Ê£t½ÑѳSbp 曫W¯®Zµ*00pñâÅG Ã<’ššÚÝÝ=PPsš ËDA(†††ÖÕÕ 1FFÆÎ;‰Tr¹<00P$iê4ÕN‰7e|†ˆa|ÓÓÓ“˜˜èááqäÈ‘5kÖìß¿¿³³óرc©©©ééé>$Vu¡°°pË–-ÎÎÎCÌïëë[YY‰aTVV:::j®>’;%RRR®]»FŒ2¼ºS‚Íf ‚˜˜˜üüüÈÈȬ¬,Í ûöír§YãóZ scaa‘——çàà`iiI\®Ÿ?~úôéU«V Å›7o~ðàè BLL —ËU©TCÌïååÅb±jkkß{ï½ .ðù|+ÞÄN ˆŽŽÎÍÍ%Ö°ˆùùùZ;%ÀÎÎ.&&†Øl4ÆçµÆ7,«¥¥e×®]r¹ÜÃÃJ$rC‚›››››Û@AM4¿OWWW½ò›™™Íž=»¢¢‚ËåÞ¼ysÆ :¾SbË–-`ÐoÜø¼ÃÌS½½½ÉÉÉK—.ÍÉÉY¿~=´³³{üø1Qnhh ®“:ƒÄÅóÉ“'š™Y,–^ù`Μ9W®\¹|ùòôéÓíííu 6òN‰7n|^‹a|£T*U*‹Åêëë;xð ôôôðùüÜÜÜææææææ={öH$д¶¶€sçÎõôôè¼Kz~˜1c†a‡æóùdÓî” ÿøè‹aæ)kkë5kÖlß¾ý­·Þ ÷÷÷/,,T(›6mR(³fÍŠ€ˆˆˆþA6›µoß¾#Gެ]»öÊ•+”ó€™™™ÏÙ³g}||È ¦Ý)AÿñÑ—‘¹>•››ûøñã­[·ö 픀AÇG'#}ª¯¯O,ÿþûïóçÏ7µ:b¨ñÑ{žh‡&ïàúúú„„„… z{{ë¬0Ü;%Þôñ"#sžB–‘?O!Œò ‚ È7* ß ¨ ãóÔ©S§Œ¯AgZ[[µW$4”öÏ?ÿd2™&Ò† 56lд Ck} èþAäoT@¾APùA…ÿv4ãæ·kIEND®B`‚pktools-2.6.6/doc/html/dir_e61db0d85028141ec5940fd7f2a6e0fc_dep.png0000644000113200011300000000620512616110567020472 00000000000000‰PNG  IHDRíãEÇbKGDÿÿÿ ½§“ :IDATxœíÝTÍ÷ðgÊÉJµ¤¨TBÓ¨åûýnföÕËñ³d–™ 1á*¡©á›öã2Ö¡…©hBŒ¶ïì+ßæ×*I'_ê2VIéýýcßݹ[êÖ­î}çù8çsÎý|ÞŸÏûýú¼ÏçyîçsO÷f$„ "i´ÒwDT? -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐIÆD—ƒwïÞ76V-DOwwwÄÆÆ6øx#]¾O€ÌÌoѯŸwƒ zš";; º|]§wZè×Ïë×oÕµ¢§Âû=E§>øLK$†–H2 -‘dZ"É0´D’ah[¸‚‚kèß¿‡¾Ë FÄжpÕÕÕ¸{W¥ï2¨1´-@uu5¶oÿ¾¾>ðð°Çر¾8y2ÎÎ=Úàãã¦ç*©±èüǤ_|±qq1ˆŒüžžÞøñdz ™Ø»÷öÂ÷ßÿ¤ç*©±ð¶ضm#BC—Á××ÖÖ64hæÍ[¬ï²¨‰0´-@AÁ5¸»{hlssë­§j¨©1´-€M\ºt^cÛ•+—ôT 55>Ó¶þþ±j•ffÑ·¯.^<‡Õ«Ã5ö)++…©i{=UH‰¡mÞy'U!22 %%Åpsë…ÐÐpÌ™óºvu€—×øøôĹsú.•CÛ˜˜´Fpð|ÏWoËÏÏ› 11M_¥Qà3-‘dZ"É0´-T·nNÈÉáŸ/¶D -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$™fý¹™ððPääðG³©eiÓ¦-ÂãѥK×f¯YC»}û&xy €}sKÔ¤’““0r世Z˜1ãŒÐÜÃ5 £fÏ´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘d 6´¹¹Wô=ÅÇ««†ŒÑк ™!œ“……‘ÆÒ·owLŸþ&Š‹oku¼!œCs1ØÐ6”¹y'¼ÿþ‡ú.C*†2gééÿÂ¥KE¸páââ¶âþý{4¨~þù®¾K3(-.´––¡PDé» ©ÊœYZZÁÚú9ØÚÚáå—_ÅŽ_¢{w'lذVߥƒmRRúõs†‹‹BB¦£¼¼ìO·BÚÜ?zôë×GÃÛÛööf:ôo8}úûÇü­´´dx{»ÁÕÕ¡¡³QQQ¡±ŸK–ÌÃÀž())<˜Š—^z¶¶mñ NHLÜ ‰°°¹êc+**àèø,:à×ÛÄ%||Üáâb…u뢘¸žžŽèÖÍ+W.©s®„غ5ô‚ƒCGŒ1ééûaaaÔ 9««Ïªª*DE)àáá+LŸþ¦ú]±¶6m!(è=õ@ee%–.77¸ºZcéÒù¨¬¬T·×÷z©íü •Á‡6!A‰¤¤ƒØµk?Ž?‚èèå êgÓ¦XÄÅÅ@¡øYY—…bA­ÇlÙòOìÚµ;w¦âÈ‘¯°nÝïïFB( pâDöíË€¥eg”••"(ÈS§ÎÄ™3×0oÞbÌš5ee¥3fœœ\——£^ß°a-òóópôhöíË@fæQ¬ZµTÝ^ßë¥)欩|hW®\ggôïïƒÅ‹WàË/ÔReËVÃÏolll1dÈ0,]ºªÖc–/Ñ;)ésu[xx(ââb T&ÂÂÂððáCTWW£´ô´iÓ&!/ïÚ¶m‡¡C‡C¥*Á?döìÙ‰ñã'ÃÄä÷ßÖ›5k>:t0øqoæÌ E‡f˜0!p÷îZëÿÂÃWcðà×aiÙ¯¼òw,\QÿÉÒ²ÏíÛ7cÑ¢åèÕËîî}ðÉ'[ñâ‹­³M [;;{ôêåeË>BFÆAu{}¯—¦˜³¦fð¡uvvQ¿vq鉛7‹þ´Ïoï^µ),,€‡‡§Æ¶Þ½ŸW¿~ü“Ë']XxC½ž} /½4kÖ¬ToëÔéY¤¤éS'Ñ»wWøù½‚ï¾ËD«V­Ð®)† ääÝ(++ÅÁƒ©ê0þ¦C3@ëÖ­k\¯K^^ÜÝûhlssëUã¾µÍÙãsQ[Ÿùsäêê?¿Qu¶ýqŒÚäæ^££³zýúõkèÙÓV}ì¨QCŸŸ§n¯ïõRŸ93Úœœ+½¾ {ûnêõªª*@QQaý88tÇùóg4¶]ºtAýZ¥êåIcÛÚvQ¯ïÜ™Š5kâ±wï.df|RÝ^ßëE›934ÚÅ‹C›{ÙÙ§°|ù"L˜ðÌÍ;·ãþý{Ø´)¶Î~‚‚ÞƒB1iiɸuë&22j< ÕdáÂ÷5ÆT·™š¶Gn˜3'sç¾‡ŠŠ022ÂèѾHM݃û÷ò!LLZÃÔÔð꫾¸{÷¢¢˜8qгR³©SgB¡X€cÇA¥*Á‰Gµ FFF š³ºú7n"#Ãpñây\¼x £  jm{’’’Û¸uë&ŠŠ ñí·Ç1iÒ(äççaÆŒß?À>|4""¢  .œÅرC±yó'êöú^/µŸÁ:ð÷÷Æ99*­B©L*•¨sÉʺ"ˆ-[v ‡îÂÊÊZÌœ"nÞ¬*•aa‘Âܼ“ptt É€Æq|}ûv•ˆˆˆNN=„©i{áíýqøðIu{McÇÆnööÝ„¥eg1mÚ,QTT®Ñ§J%DQQ¹pvv~¨*•Je¢pttÏ<óŒpqé)’5úž ‰Œç×ìÿËGffñÖ[ï껌ÕõikHHG¢¸ø6ºwwB`àÎeöì(//kÔ> ‰ŒçÇÐÖÀÊÊkÖÄ뻌isËÙh㙘˜ ,,²Qû4$2žo‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’iö/ÁÇÄDâ³Ï>mîa‰ZŒf íÛoÏÐê7Љdâç7žžý›m¼f í¢Eòü¤‘¡â3-‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$†–H2:ýq…±±1ÒÒ’‘–fÑXõµxÆÆÆ:¯Óÿ§ÍÍÍÅéÓ§u*€èicccƒ6øxBKDÍÏ´D’ah‰$ÃÐI†¡%’ CK$†–H2 -‘dZ"É0´D’ah‰$ÃÐI†¡%’ CK$Iú.‚ˆ´÷?)™5"–—>ÌIEND®B`‚pktools-2.6.6/doc/html/classVector2d-members.html0000644000113200011300000002575312647637662016727 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Vector2d< T > Member List

This is the complete list of members for Vector2d< T >, including all inherited members.

mymax(int &x, int &y, double maxValue) const (defined in Vector2d< T >)Vector2d< T >
nCols() const (defined in Vector2d< T >)Vector2d< T >inline
nRows() const (defined in Vector2d< T >)Vector2d< T >inline
operator+=(const Vector2d< T > &v1) (defined in Vector2d< T >)Vector2d< T >
operator<< (defined in Vector2d< T >)Vector2d< T >friend
operator=(const Vector2d< T > &v1) (defined in Vector2d< T >)Vector2d< T >
resize(int nrow) (defined in Vector2d< T >)Vector2d< T >inline
resize(int nrow, int ncol) (defined in Vector2d< T >)Vector2d< T >
scale(const std::vector< double > &scaleVector, const std::vector< double > &offsetVector, Vector2d< T > &scaledOutput) (defined in Vector2d< T >)Vector2d< T >
scale(const T lbound, const T ubound, std::vector< double > &scaleVector, std::vector< double > &offsetVector, Vector2d< T > &scaledOutput) (defined in Vector2d< T >)Vector2d< T >
selectCol(int col, std::vector< T > &output) const (defined in Vector2d< T >)Vector2d< T >
selectCol(int col, T *output) const (defined in Vector2d< T >)Vector2d< T >
selectCol(int col) (defined in Vector2d< T >)Vector2d< T >
selectCols(const std::list< int > &cols, Vector2d< T > &output) const (defined in Vector2d< T >)Vector2d< T >
selectCols(const std::list< int > &cols) (defined in Vector2d< T >)Vector2d< T >
setMask(const Vector2d< T > &mask, T msknodata, T nodata=0) (defined in Vector2d< T >)Vector2d< T >
sort(Vector2d< T > &output) (defined in Vector2d< T >)Vector2d< T >
sum(const Vector2d< T > &v1, const Vector2d< T > &v2) const (defined in Vector2d< T >)Vector2d< T >
sum() const (defined in Vector2d< T >)Vector2d< T >
transpose(Vector2d< T > &output) const (defined in Vector2d< T >)Vector2d< T >inline
Vector2d() (defined in Vector2d< T >)Vector2d< T >
Vector2d(const Vector2d< T > &v1) (defined in Vector2d< T >)Vector2d< T >
Vector2d(int nrow) (defined in Vector2d< T >)Vector2d< T >
Vector2d(int nrow, int ncol) (defined in Vector2d< T >)Vector2d< T >
Vector2d(int nrow, int ncol, const T &value) (defined in Vector2d< T >)Vector2d< T >
Vector2d(const gsl_matrix *gsl_m) (defined in Vector2d< T >)Vector2d< T >
~Vector2d() (defined in Vector2d< T >)Vector2d< T >
pktools-2.6.6/doc/html/classImgRasterGdal__coll__graph.map0000644000113200011300000000032612647437044020552 00000000000000 pktools-2.6.6/doc/html/classUi_1_1MainWindow-members.html0000644000113200011300000014700012647637663020240 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Ui::MainWindow Member List

This is the complete list of members for Ui::MainWindow, including all inherited members.

a_srs (defined in Ui_MainWindow)Ui_MainWindow
actionColor_table (defined in Ui_MainWindow)Ui_MainWindow
actionExtent (defined in Ui_MainWindow)Ui_MainWindow
actionInput (defined in Ui_MainWindow)Ui_MainWindow
actionInput_image (defined in Ui_MainWindow)Ui_MainWindow
actionMask (defined in Ui_MainWindow)Ui_MainWindow
actionOutput (defined in Ui_MainWindow)Ui_MainWindow
actionOutput_image (defined in Ui_MainWindow)Ui_MainWindow
actionQuit (defined in Ui_MainWindow)Ui_MainWindow
actionReference (defined in Ui_MainWindow)Ui_MainWindow
actionSample (defined in Ui_MainWindow)Ui_MainWindow
actionSelection_Info_file (defined in Ui_MainWindow)Ui_MainWindow
actionTraining (defined in Ui_MainWindow)Ui_MainWindow
as_from (defined in Ui_MainWindow)Ui_MainWindow
as_to (defined in Ui_MainWindow)Ui_MainWindow
autoscale (defined in Ui_MainWindow)Ui_MainWindow
bname (defined in Ui_MainWindow)Ui_MainWindow
bndnodata (defined in Ui_MainWindow)Ui_MainWindow
buttonGroup (defined in Ui_MainWindow)Ui_MainWindow
cband (defined in Ui_MainWindow)Ui_MainWindow
ccost (defined in Ui_MainWindow)Ui_MainWindow
centralWidget (defined in Ui_MainWindow)Ui_MainWindow
cname (defined in Ui_MainWindow)Ui_MainWindow
coef0 (defined in Ui_MainWindow)Ui_MainWindow
commandLineEdit (defined in Ui_MainWindow)Ui_MainWindow
commandLinkButtonPrepareTable (defined in Ui_MainWindow)Ui_MainWindow
commandLinkButtonPrepareTable (defined in Ui_MainWindow)Ui_MainWindow
compressed (defined in Ui_MainWindow)Ui_MainWindow
confusion (defined in Ui_MainWindow)Ui_MainWindow
consoleEdit (defined in Ui_MainWindow)Ui_MainWindow
crule (defined in Ui_MainWindow)Ui_MainWindow
ct (defined in Ui_MainWindow)Ui_MainWindow
cv (defined in Ui_MainWindow)Ui_MainWindow
dstnodata (defined in Ui_MainWindow)Ui_MainWindow
dx (defined in Ui_MainWindow)Ui_MainWindow
dy (defined in Ui_MainWindow)Ui_MainWindow
extent (defined in Ui_MainWindow)Ui_MainWindow
f (defined in Ui_MainWindow)Ui_MainWindow
file (defined in Ui_MainWindow)Ui_MainWindow
gamma (defined in Ui_MainWindow)Ui_MainWindow
gridLayout (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_2 (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_3 (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_4 (defined in Ui_MainWindow)Ui_MainWindow
gridLayout_5 (defined in Ui_MainWindow)Ui_MainWindow
groupBox (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_2 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_3 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_4 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_5 (defined in Ui_MainWindow)Ui_MainWindow
horizontalLayout_6 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_10 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_11 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_15 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_2 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_3 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_4 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_5 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_6 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_7 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_8 (defined in Ui_MainWindow)Ui_MainWindow
horizontalSpacer_9 (defined in Ui_MainWindow)Ui_MainWindow
input (defined in Ui_MainWindow)Ui_MainWindow
interleaved (defined in Ui_MainWindow)Ui_MainWindow
kd (defined in Ui_MainWindow)Ui_MainWindow
kerneltype (defined in Ui_MainWindow)Ui_MainWindow
label (defined in Ui_MainWindow)Ui_MainWindow
label (defined in Ui_MainWindow)Ui_MainWindow
label_10 (defined in Ui_MainWindow)Ui_MainWindow
label_11 (defined in Ui_MainWindow)Ui_MainWindow
label_12 (defined in Ui_MainWindow)Ui_MainWindow
label_13 (defined in Ui_MainWindow)Ui_MainWindow
label_14 (defined in Ui_MainWindow)Ui_MainWindow
label_15 (defined in Ui_MainWindow)Ui_MainWindow
label_16 (defined in Ui_MainWindow)Ui_MainWindow
label_17 (defined in Ui_MainWindow)Ui_MainWindow
label_18 (defined in Ui_MainWindow)Ui_MainWindow
label_19 (defined in Ui_MainWindow)Ui_MainWindow
label_2 (defined in Ui_MainWindow)Ui_MainWindow
label_20 (defined in Ui_MainWindow)Ui_MainWindow
label_21 (defined in Ui_MainWindow)Ui_MainWindow
label_22 (defined in Ui_MainWindow)Ui_MainWindow
label_23 (defined in Ui_MainWindow)Ui_MainWindow
label_24 (defined in Ui_MainWindow)Ui_MainWindow
label_25 (defined in Ui_MainWindow)Ui_MainWindow
label_3 (defined in Ui_MainWindow)Ui_MainWindow
label_4 (defined in Ui_MainWindow)Ui_MainWindow
label_5 (defined in Ui_MainWindow)Ui_MainWindow
label_6 (defined in Ui_MainWindow)Ui_MainWindow
label_7 (defined in Ui_MainWindow)Ui_MainWindow
label_8 (defined in Ui_MainWindow)Ui_MainWindow
label_9 (defined in Ui_MainWindow)Ui_MainWindow
label_reference (defined in Ui_MainWindow)Ui_MainWindow
layoutWidget (defined in Ui_MainWindow)Ui_MainWindow
lclass (defined in Ui_MainWindow)Ui_MainWindow
listWidget_band (defined in Ui_MainWindow)Ui_MainWindow
listWidget_input (defined in Ui_MainWindow)Ui_MainWindow
lref (defined in Ui_MainWindow)Ui_MainWindow
lrx (defined in Ui_MainWindow)Ui_MainWindow
lry (defined in Ui_MainWindow)Ui_MainWindow
mainToolBar (defined in Ui_MainWindow)Ui_MainWindow
manual (defined in Ui_MainWindow)Ui_MainWindow
mask (defined in Ui_MainWindow)Ui_MainWindow
max (defined in Ui_MainWindow)Ui_MainWindow
menuBar (defined in Ui_MainWindow)Ui_MainWindow
menuFile (defined in Ui_MainWindow)Ui_MainWindow
min (defined in Ui_MainWindow)Ui_MainWindow
msknodata (defined in Ui_MainWindow)Ui_MainWindow
nclass (defined in Ui_MainWindow)Ui_MainWindow
nodata (defined in Ui_MainWindow)Ui_MainWindow
noscale (defined in Ui_MainWindow)Ui_MainWindow
nu (defined in Ui_MainWindow)Ui_MainWindow
offset (defined in Ui_MainWindow)Ui_MainWindow
oformat (defined in Ui_MainWindow)Ui_MainWindow
otype (defined in Ui_MainWindow)Ui_MainWindow
output (defined in Ui_MainWindow)Ui_MainWindow
polygon (defined in Ui_MainWindow)Ui_MainWindow
pushButton_restore (defined in Ui_MainWindow)Ui_MainWindow
pushButton_run (defined in Ui_MainWindow)Ui_MainWindow
reference (defined in Ui_MainWindow)Ui_MainWindow
resample (defined in Ui_MainWindow)Ui_MainWindow
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
retranslateUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
rule (defined in Ui_MainWindow)Ui_MainWindow
sample (defined in Ui_MainWindow)Ui_MainWindow
scale (defined in Ui_MainWindow)Ui_MainWindow
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
setupUi(QMainWindow *MainWindow) (defined in Ui_MainWindow)Ui_MainWindowinline
srcnodata (defined in Ui_MainWindow)Ui_MainWindow
statusBar (defined in Ui_MainWindow)Ui_MainWindow
svmtype (defined in Ui_MainWindow)Ui_MainWindow
tab (defined in Ui_MainWindow)Ui_MainWindow
tab_2 (defined in Ui_MainWindow)Ui_MainWindow
tab_3 (defined in Ui_MainWindow)Ui_MainWindow
tab_4 (defined in Ui_MainWindow)Ui_MainWindow
tableView_labels (defined in Ui_MainWindow)Ui_MainWindow
tabWidget (defined in Ui_MainWindow)Ui_MainWindow
threshold (defined in Ui_MainWindow)Ui_MainWindow
tiled (defined in Ui_MainWindow)Ui_MainWindow
tln (defined in Ui_MainWindow)Ui_MainWindow
toolButton (defined in Ui_MainWindow)Ui_MainWindow
toolButton_createTable (defined in Ui_MainWindow)Ui_MainWindow
toolButton_ct (defined in Ui_MainWindow)Ui_MainWindow
toolButton_defaults (defined in Ui_MainWindow)Ui_MainWindow
toolButton_extent (defined in Ui_MainWindow)Ui_MainWindow
toolButton_file (defined in Ui_MainWindow)Ui_MainWindow
toolButton_input (defined in Ui_MainWindow)Ui_MainWindow
toolButton_mask (defined in Ui_MainWindow)Ui_MainWindow
toolButton_output (defined in Ui_MainWindow)Ui_MainWindow
toolButton_reference (defined in Ui_MainWindow)Ui_MainWindow
toolButton_Run (defined in Ui_MainWindow)Ui_MainWindow
toolButton_sample (defined in Ui_MainWindow)Ui_MainWindow
toolButton_training (defined in Ui_MainWindow)Ui_MainWindow
training (defined in Ui_MainWindow)Ui_MainWindow
ulx (defined in Ui_MainWindow)Ui_MainWindow
uly (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_2 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_3 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_4 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_5 (defined in Ui_MainWindow)Ui_MainWindow
verticalLayout_6 (defined in Ui_MainWindow)Ui_MainWindow
verticalSpacer (defined in Ui_MainWindow)Ui_MainWindow
verticalSpacer_2 (defined in Ui_MainWindow)Ui_MainWindow
verticalSpacer_3 (defined in Ui_MainWindow)Ui_MainWindow
widget (defined in Ui_MainWindow)Ui_MainWindow
pktools-2.6.6/doc/html/classDecrease__IndexValue-members.html0000644000113200011300000000652212647637662021226 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
Decrease_IndexValue Member List

This is the complete list of members for Decrease_IndexValue, including all inherited members.

operator()(const IndexValue &pv1, const IndexValue &pv2) const (defined in Decrease_IndexValue)Decrease_IndexValueinline
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pksvm_1_1pksvm__coll__graph.map0000644000113200011300000000011312616110567024332 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcrop_1_1pkcrop__coll__graph.png0000644000113200011300000000675112616110567024653 00000000000000‰PNG  IHDR½pÄÃæ bKGDÿÿÿ ½§“ žIDATxœíyPgÇŸ… CÐrJ‡@;tœŽÎ´ʈ֊í(Ê1x0BÛ¡­”£—B§ Lµ0V+‡`bÂe1B« ÄÒjSåzÁ¢rÖ)G! ì¾ìûnc@öͱ¾ü>0ÏóËóû=ßÝ|³Ï&Ù°Aˆ™©O%à€à€à€,ãL£P(:;;q7Ît‹;;;#Ld$ßÈd²‡g“-2™lhhèÿÊ7$>>>Æœn±ñÇm.8¿è¾è¾è¾èÀtßtuuafÌR_|ñ†a™™™úÒ0[:†a]]]´Ëš¦ûF'===\.ו ‚(..vvvúª¹bÅŠ””dHÙÆç©ô Žã>4Då¶¶¶;wî¶´´tttè¥&—Ë%^†“m|äòx^YYééé¹råÊ÷Þ{ojjŠz” ˆÄÄD??¿¬[·!ôÌ3ÏŒŒìÙ³‡Ëå:99%&&*ŠÙ‚B¡ð…^`³Ù<¯¨¨ˆŠûûûyyyir‚ÈÍÍõööæp87n¼|ù2¹iÏEnKmm­³³ó¹sçÈa²BW¯^åóù666dð³gÏ®^½ÚÎÎ.33³¨¨ÈÕÕÕÚÚúСCzÛÑz0 ‰D$Í=¦³³!ÜÑÑ!‹ù|~ZZÄqœ2 5’JŒˆˆ ìîînmmõõõMKKÓ¤²ÆÇÇ­¬¬rss Y,Öøø8A8Ž»ººæååñé§Ÿúøø¨ #âÌ™3ŽŽŽ?ýôÓððpMM ŸÏ'ã³ÍRWW×ÒÒBÓzýõ×e2Yyy9BˆÜ4„ÐîÝ»e2YAABhçÎ2™,//0·oß¾}ûöžº0Î7­­­dW ðù|2˜œœŒºwïžúH²===mnnNí¯ŠŠ >Ÿ¯3HeI¥R ‹ãÇ?zôÇñ±±1•JE„X,f±XäÓÓØØˆjkkSŸÎ××÷ûï¿§_¸p!4Ç\ä¶PéÚ¾¹víA*• !ÔÙÙI›ššÈíÒh“æÀ˜¾aÐ:EâîîN6¼¼¼úúúÈö­[·6lØžž®=^"‘¨T*777²Ëçóûúút©‘H$‹œœüýýùå333„Pqq±R©är¹†­Y³!¤±TuwwûúúR]ooïÙP›0÷Æ:88 „ÈÙ)–/_޲°°Ðh3 Æù†|Q"„:::ÈÝŠ …¹¹¹ÅÅÅ"‘HcüªU«ÌÍÍ{zzÈnww·£££Î •"—Ëq/--•J¥û÷ïߺu«T*U©T ++kì¿$$$Bí:Zõï€îܹ3›²=ïó­¯L€qkO¾NtvvÞ¼yÓÝÝýðáÃêÇöÔÔT¹\NÇÆÆÈxxxx```OOO[[›ÏáÇu©Rr¹œÍf—•• ççç³Ùl¹\.‰ÌÍÍ% ¥§¡¡!ÔÔÔD%žü]—nr&'§íí9Tw||ŠÍ¶`±þóÒzzZiŒt]úÓˆƒÃÁÜÜè7Þð3µ&ë@ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ð @ õ›Ðÿú믖––¦VĬ¬œÍÌ–˜ZSHJJR·Êcÿ߯¿¿zz:55ÕTâfRZZú矪Gtü_H¸;< ÁÏ?ÿ¬ó€à€à€à€ôM@@€©Ò™©ä) }³lٲݻwë·æààà¶mÛô[ }cmm}àÀýÖÄq\&“é·&@ƒû† ˆ‹/FGGoÞ¼ùÝwßmnn âÒ¥K{öìÙ²eKBBÂo¿ý ~t½qãÆþýûƒƒƒÃÃï^½ªQ“yýúõ¨¨¨íÛ·Ÿúè#ww÷¯¾úJ§úÑÑÑL0/ >Þ”——ÇÅÅ­_¿ÞÖÖvíÚµ111Tð¥—^²¶¶^³fÍÞ½{ÕSfff‚Ëå–––›6m …VVVÚ•ß~ûm''§Õ«WÇÄÄÔÔÔÁüü|@ššÊáp4Æ+•ʺººøøx{{{·wïÞššAC(©ªªÚ·oÇsuuMIIñññ¡Ò8ðâ‹/²X¬Ù”è¬Ï(ó²`ß òù|ªËãñB®®®Tð¹çžSOY¾|yvvv{{ûŽ;>øàƒÖÖVL×ÍœœœœÈ†³³óðð0Ù¾wŸßùóçµÇ?zôÇq²ëèè8<<¬3h%‰„æââ²~ýz*ÝÙÙy6ysÔg”€yY°o¸\nww7Õ%¿îZµjUoo/¼ÿ¾zÊÔÔŽãiiiB¡póæÍŸ|òÉØØ˜vå¾¾>²ñ×_ÙÚÚ’íôôô„„„ºººææfñ666fffƒƒƒdw``€Ëåê B‰­­íßÿM>ÔÕÕ¥îl‹5›¼9ê3JÀ¼,Ø7!!!999ׯ_—J¥7oÞÌÏÏG…††æåå544Èd²æææsçΩ¿Ž1 KJJª¯¯Ÿ˜˜˜™™a±XäêPUU511A ;uêTÿÝ»w ^{í52Èf³Ÿ}öÙððð¬¬,ê W.—#„X,V@@À×_=88ØÛÛ[XX¤3h%ÁÁÁ½½½½½½'NœH$;j%ÚõM.`¡,ø¼8,,L¥R}óÍ7###</66öÈ‘#¡¡¡*•*;;{ttÔÇÇ'..îØ±cTŠ¥¥åÇœ——744äààššJ^åsüøq??¿¥K—’‚‚>üðC…B¡~ü ¯­­½páBTTÔóÏ?ÿÖ[oUWW#„ÞÿýS§NÅÅÅYXXlܸ1""Bg*¥G% …"))I¡P¬[·.66V{_ͦD£>,”Çî“XRR&‰ž<¿¿¿?222==}åÊ•nnnd°¾¾¾¨¨èÌ™3 *² y „¡•Ì[ßätòùçŸÛÙÙ•””Pý|î×ÓÓsôèÑÎÎΩ©©ööö³gÏnÙ²E/•f¢ŸûùîÚµK¡P|öÙg###ööö!!![·n}òô¥K—.h¼á0´’yë›\Àò¿®SÀbÀPë°ØßtßtßtÐñ~*11Ñø:&ÓÓÓ£þ±;ÒðÍÚµkwíÚ¥R©Œ« `:<oçÎê‘ÇÞ‡Àç7À7À7À7þ ÒBIý1~jIEND®B`‚pktools-2.6.6/doc/html/inherit_graph_37.map0000644000113200011300000000112512647437044015501 00000000000000 pktools-2.6.6/doc/html/classDataModel.html0000644000113200011300000002664512647637662015442 00000000000000 pktools: DataModel Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
DataModel Class Reference

Public Member Functions

 DataModel (const SensorModel::SensorModel &theModel)
 
void setModel (const SensorModel::SensorModel &theModel)
 
const SensorModel::SensorModel & getModel () const
 
int getSize () const
 
void setThreshold (double theThreshold)
 
double getThreshold ()
 
int erase (int index)
 
int pushAttPlatform (const arma::vec &atp)
 
int pushPosPlatform (const arma::vec &ppl)
 
int pushPosGCP (const arma::vec &pgcp)
 
int pushRow (int r)
 
int pushCol (int c)
 
arma::vec getPosPlatform (int index) const
 
arma::vec getAttPlatform (int index) const
 
arma::vec getPosGCP (int index) const
 
arma::vec getPos (int index) const
 
double getDistGeo (int index) const
 
int getRow (int index) const
 
int getCol (int index) const
 
double getHeight (int index) const
 
void setBoresightAtt (const arma::vec &bc_att)
 

Detailed Description

Definition at line 29 of file pksensormodel.h.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/md_faq_pksetmask.html0000644000113200011300000000654412647637662016067 00000000000000 pktools: faq_pksetmask
pktools  2.6.6
Processing Kernel for geospatial data
faq_pksetmask

Frequently asked questions about pksetmask

Q1. I want to mask my input image (a byte image with values between 0 and 254) with a mask that only covers a spatial subset of the input image. Within the spatial subset of the primary mask, all pixels must be set to 0 where the primary mask equals 1. Outside the spatial subset I want to set all pixel values to 255.

A1. This can be done using two masks, selecting the input image as the secondary mask. Choose the secondary operator acting on the secondary mask such that the condition is always true (e.g, < 255 ).

pksetmask -i input.tif -m mask.tif -t 1 -f 0 --operator '=' -m input.tif -t 255 -f 255 --operator '<' -o output.tif
pktools-2.6.6/doc/html/dir_d7b2ebecdb5f44d7fa09bdedebc881a7_dep.png0000644000113200011300000000624512616110567021227 00000000000000‰PNG  IHDRû)S´hbKGDÿÿÿ ½§“ ZIDATxœíÝ}PTåð/t¸pA@eyUQ#mn/Þ^óÖõ¦BSJ¦“–…/‰ï¤[ŠiŠZ*¾…hW|G­;8bÜ|E X-EDçþá¸Ã"ìK» Ï÷3sföœ=û{~ç9ç;œÃ쀅B€ˆÚ»¤¿˜º"2†H ;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ †H ;‘$v"I0ìD’`؉$aeȇøálذ¡µz!¢FX[[#&&-®aPØqþüER†ˆôHNÞ‹°°0Ó…ƒ°zõfCË‘))×à3;‘$v"I0ìD’`؉$Á°I‚a—TaáU<û¬—©Û #bØ%U[[‹Û·Õ¦nƒŒˆaoÇjkk±uë·ˆ€wŒŒŒŒ“P(0|x0`à@_wIÆbð—jÈ|%&nÚ5шŠZŽþýƒpñâYDDLìÚu/¿<§N]2q—d,üÉÞŽmÙ²³gŽàà7àì܃¿†éÓ?3u[d" {;VXxþþZÛ|}{›¨25†½ëÚÕ99çµ¶åææ˜¨25>³·c!!£°x±:Ù¡_¿ÈÎ>‡¥K¿ÐÚçÞ½ ØØØš¨C2&†½?>55ÕˆŠŠDyy|}{aöì/0uêx<ý´ „ýpî\¡©[%#`ØÛ1+«Ÿððšm*€¥¥RLÕ™ŸÙ‰$Á°I‚a—L÷îžÈËã×deİI‚a'’ÃN$ †H ;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ †H ;‘$v"I0ìD’0ÊŸ¥úí·ëP*g ªê¾1†#j3 _(•KŒ2–Qž••‰£GS1lXˆ1†#jŠŠ ±uëÆööÇ6oN4æpDfmÏžDŒ÷¶ÑÆã3;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ †H ;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ ³ »Ju}N_–ŒÑÒ¾Ú+s˜ ­¥_¿˜8ñ=”••6éóæp Æb–ao){ûΘ2e–©Ûh–«WUðòêÒfêÖe.óšú_ääãÂ…ëX³f3îÜùƒâ÷ßo›º5³Ò®ÂîèØÅhâ§µÔÖÖB­.o3uë2—ùvtt‚³s7¸¸¸á…þmÛv£GO¬[·ÒÔ­™³{RR<ðövBDÄDTVÞ{â¶«)·î555X½z‚‚|àîÞ C†ügΜjpÌÇ5RRö"(È>>Θ={2ªªª´öB`Þ¼éxñÅþ(//<|øóçÏ€¯oWøø8cþüxøð!~üqzõrÃíÛ·;wnGPîÝ«@p𠀯o7­ñÓÓÓàŒŒŸššŒ—^z®®6ðósÁ×_? Xuu5–,Q" ÀÞÞN˜8ñ=ÍO³úuuB`óæõ4¨<<ì0lØËHMM†ƒƒE‹æ[_M]}ëz¯©,,,0vìG8tè€f[cçæ±æ^kºŽÏ\™uØããã”t;v$#=ý–-[Ø¢:7®Âš5ÑP*¿BfæeDDDB©œ©ó3›6­ÅŽÉؾ}?ŽùQ0àщV*gâĉ4ìÙ“GÇG·ËëÖ­DAA>ŽÍÄž=i8yò(/ž×_ÿ~‘‘Ÿ¢´ôæÎý6|[:”¸t©Dkü˜˜åX»ö;xzza̘èÛ7gÎäbáÂh,X0ee¥X¿þkìÛ· °oß1\¹rË—/€Fë6äûï7!:: _~¹YY*L›6‘‘Ÿ6}‚›YSWߺÞkOOoäççiÖ;75÷Zû3æìO' "†&òòÔ:—U«â¡V‹&-™™¹€øé§³šmqq ¢{÷žš÷êï«ëµBá#bb¶h±víw öÔØØžž^š÷&Ož)ˆÓ§/i}ÖÛÛOääkÖwï>,ú µZˆüü[ÂÕõiÑ»w_1kÖç ößÐø%%UâÔ©lqýú]QVV#’“Ó‘™™+¼¼|ÅÖ­»4ŸÍȸ¨Y¯_W×âïßGlܯµíÛoÿ£§)óÝœšºúÖõ^CËãëoOK;-ìí;ë=7-½Öt_S¯ó¸¸@o~òòÔ€HHH0$®‰Fýë²Í¥Pxk^{{û¡¤¤ø‰}„zë"  ¿Ö¶Þ½ûj^×½õÊÌÌmp좢ëšõ¬¬ÓxþùÁX±âKÄÄlÑl¿ví*üü\´Æ±³³ðè—YcÆLÀÒ¥_`×®Ãz{ööötìØW®\Æ”)ãQQq}û>£Ù§°°@«Oøøøë­]_~~üýûhmóõíÕྺæ»îàòål­õ¦ÌwÝyÔUSWßúŽ©¡sUŸqqëüOÍ6]çhþµÖ”937föÏ>‹€JuYY§±pá\¼ûîû°·ï HHØŠ;wþÀÆ«ôÖ;ö#(•3’²7o– -í ÖóZCæÌ™¢5vhèhÍ{66¶ðòòÅÔ©³1mÚGšÿtóæ›Ã±`ÁàÂ…³9rbccP[[‹ððq?~bc·ãøñ#8xp¿Öxw죪ª <@ÇŽqÿ~%/VîÞ½ƒ·ßCTT$²³Ï#;û›Çš{­é:>³eÎÏì›6í=„““³øä“QRR%Ôj!"#£„½}gѳ§BÄÇïÕûÌ^ZZ-,X&<=½„­ zN>œ¡ó™}ÕªXáîÞ]8:v&LÅÅ•O<ÃW …ÂGÌš¥jµ×®ý!F+:w~J888Š1c&ˆ¢¢ ñÕW«EŸ>ýÄ„Z-Ķm»E×®.B¥R‹›7ŠAƒž¶¶kô9xѢ⩧„››»ˆŽ^+FŒxG899‹ââû"<|ºèÖÍUØÙÙ‹#Þùù·„Z-ž¨«k)+«‹­={*„½xå•!">~¯èÒÅ©ÉóÝœšºúÖõ^cÏìu77w2J\ºtCk¿ÆÎMK¯5}sfŽÏì¢)½ EEŬ^½Yç~ìÁäÉãtÞz™ •ê  ðn½¶–ÔÔd¸¹¹£OŸ~šmû÷ïDttÒӳ̦¦9iã{üaòòÔz÷U(€ÐÐЖ¶œdÖ·ñd.œÅ‡ŽÆ¯¿þ‚ÊÊ{ÈÌÌÀ¢EóöYÕ4'mñøÌú·ñ¦Ð©“ÞÿCS·Ñêô}Ù#""£Gÿee¥èÑãG3h&Ož‰ÊÊ{­ZÓœ´ÅãcØëqrrÆŠëMÝF«kÊcIddT«gee…ÈȨV­iNÚâññ6žH ;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ †H ;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ £þñŠ·Þz͘ÙµÒÒFÏ(aïßÿY¼ñÆpÔÖÖc8¢6ÁÖÖÏ=÷‚ÑÆ3JØÝÜÜñÍ7±ÆŠˆÁgv"I0ìD’`؉$Á°I‚a'’ÃN$ †H ;‘$ úR¥¥%RRö"%Å¡µú!¢FXYö8ƒþ?»J¥Â™3g j€ˆô³´´ÄСCammÝÒI…ˆÚŒ$>³I‚a'’ÃN$ †H ;‘$v"I0ìD’`؉$Á°I‚a'’ÃN$ †H ;‘$¬$™º "úÓeüBðŒKü;Ç,IEND®B`‚pktools-2.6.6/doc/html/CostFactorySVM_8h_source.html0000644000113200011300000003051412647637661017354 00000000000000 pktools: /home/kempenep/pktools/src/algorithms/CostFactorySVM.h Source File
pktools  2.6.6
Processing Kernel for geospatial data
CostFactorySVM.h
1 /**********************************************************************
2 CostFactorySVM.h: select features, typical use: feature selection for classification
3 Copyright (C) 2008-2012 Pieter Kempeneers
4 
5 This file is part of pktools
6 
7 pktools is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 pktools is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with pktools. If not, see <http://www.gnu.org/licenses/>.
19 ***********************************************************************/
20 #ifndef _COSTFACTORYSVM_H_
21 #define _COSTFACTORYSVM_H_
22 
23 #include <math.h>
24 #include <vector>
25 #include <map>
26 #include "base/Vector2d.h"
27 #include "CostFactory.h"
28 
29 namespace svm{
30  enum SVM_TYPE {C_SVC=0, nu_SVC=1,one_class=2, epsilon_SVR=3, nu_SVR=4};
31  enum KERNEL_TYPE {linear=0,polynomial=1,radial=2,sigmoid=3};
32 }
33 
35 {
36 public:
38 CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose);
40 double getCost(const std::vector<Vector2d<float> > &trainingFeatures);
41 
42 private:
43 std::string m_svm_type;
44 std::string m_kernel_type;
45 unsigned short m_kernel_degree;
46 float m_gamma;
47 float m_coef0;
48 float m_ccost;
49 float m_nu;
50 float m_epsilon_loss;
51 int m_cache;
52 float m_epsilon_tol;
53 bool m_shrinking;
54 bool m_prob_est;
55 };
56 #endif
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite__inherit__graph.map0000644000113200011300000000014312616110567027440 00000000000000 pktools-2.6.6/doc/html/inherit_graph_3.md50000644000113200011300000000004012616110567015307 00000000000000db206f037e61bf07733c253f284e0cbcpktools-2.6.6/doc/html/classQMatrix.html0000644000113200011300000001300112647637662015153 00000000000000 pktools: QMatrix Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
QMatrix Class Referenceabstract
Inheritance diagram for QMatrix:

Public Member Functions

virtual Qfloat * get_Q (int column, int len) const =0
 
virtual double * get_QD () const =0
 
virtual void swap_index (int i, int j) const =0
 

Detailed Description

Definition at line 196 of file svm.cpp.


The documentation for this class was generated from the following file:
  • /home/kempenep/pktools/src/algorithms/svm.cpp
pktools-2.6.6/doc/html/dir_41d189c72498e24f979b227eb8e138b1_dep.png0000644000113200011300000000653712616110567020235 00000000000000‰PNG  IHDRæXׂbKGDÿÿÿ ½§“ IDATxœíÝyPWð/+ BAAåFŃ@éV,µ—2ׯòÀòȪDMŒx⢎ˆQ4Þ^a•'ïkw±ƒ·(2¨„…(Ž&rˆ(oÿ0;ÅCfÂŒòýTuÕtÏë÷~ÓùVw;Θ !ˆˆþðc@D¦…¡@D†I D$a(‘„¡@D†I D$a(‘„¡@D†I D$a(‘„¡@DsCvþᇰnݺڪ…ˆj¿¿?âããk¼¿™!ß§гgÿ…ÀÀà@Dµ'77iiJò5))@``0V¬Ølh7DT Ú‹´´0ƒúà="’0ˆHÂP " Cˆ$ "’0H’}ï¾ëeì2Ȉ $)++Ó'jc—AFÄP¨‡ÊÊʰmÛ„„tA@€ú÷AjêYxzÚ£oß@—.¾F®’ŒÅà/Ñ›çûï·cåÊ8DG/E§NÁ¸qã ""Æöì9‚÷ßÂùó·Œ\% Ïê¡-[Ö!2r.BB>““3zöü¦L™eì²ÈD0ê¡ìì»ð÷¶ùú¶3R5dj õ³³+ÒÓ¯IÛ22ÒT ™ÞS¨‡ ‚ØXlllѱcnÞ¼ŠÅ‹çImŠŠ aeem¤ ɘ õШQáxùò¢££ðèQ>|}Û"2r&N…–-ÝÔ]ºøáêÕlc—JFÀP¨‡ÌÍ->ááS5ÛîÝS40GRR²±J#À{ D$a(‘„¡@€V­<™É7Cˆ*`(‘„¡@D†I D$a(‘„¡@D†I D$a(‘„¡@D†I D$a(‘„¡@D’:û:¶yó"‘™É!ª‰† aÞ¼%pumù§Ug¡°mÛzuE‹nu5$Ñ[cß¾]èÓgàÛ ðõדЧOh]IôV°·7«³±xOˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHb’¡ RÝ©Ñÿ/¿Ÿ¾>j2FMëz[™Âñ°·7“—ÆèÝû=\½z©Jû›Âk05& 5eg×&L7vÕr÷® ^^ÍÞ˜~Ë3•ã’òo¤§ç"==çÎ]§§7ÂÂBaìÒÞHuúÍK6‡fP(»Œj)++ƒZýèé·›6­ÆÎ±cÇ;ö“ô „€B1 gÎÇÞ½Çáàðê4}Íšoqï^NœPbïÞã8{öbcçàÃÿŽž={!*j>ü3gNºußÁÊÊGޤnÝÊ“Æ_µj)V¯Þ / Ö:ââÅ ,X‡ùóg ?ÿ!Ö®]Žýûw#)éöï?‰;wncéÒÐÚoe¾ûnâ⢱pá·HKSaòä™ˆŠšTõ\Í>uÕ­ë9mŠŠ QXX€ÂÂäåý11³0`À4lØPÓFÛÜT¤­]AÁS­óPTTˆ#`äȱ¸|ù.¦L™…qãÂPTTX­±M†0À€ÄG}&23Õz"!!I¨ÕBï¢Tfâܹ+šm I¢U«6šç*¶ÕõØÓÓG¬ZµEcõê­R?úÆöððÒ<7~ü4@\¸pKÚ×ÛÛO¤§çjÖüñ¨è$Ôj!²² W×–¢]»búô¹•Ö_Ùøyy%âüù›â—_ D~þKqðài@(•ÂËËWlÛ¶G³ojê ÍzÅ~u-þþíÅúõ‰Ò¶ þ©§*Ç»:}êª[×s•-^[¬­ß©©7ª47_ƒ¶vºæA¥R ±`AœÈÊz,=*ÙÙOE~þK½U]ˆøø½ï³øøaàÛZ˜ô=OOoÍcoo?äåå¾Ö¦*7“rr²ÐIÚÖ®]Íãò§ÀJeF¥cçäü¢YOK»€nÝzbÙ²…Xµj‹fûýûwáçç"óÿSX;»&6l4/ž‡={Žê­ÙÛÛ`ii‰;wnc„Q(,,@‡5m²³ïIuúøøÃÇÇ_oßeeeÂß¿½´Í×·m¥muïòDZQ£ÆZûÔU·¾×T~ µúU-Je<<¼ÅÅEX¸pÂÃÃpäÈ4muÍMyÚÚ隇&Mšbÿþ“X³f9bcèØ1“&Í@¯^VklSaÒ—™™å߆›[+Íú‹/¹¹9zûqwok×.KÛÒÓ¯k«ÕB³hÛÅÅU³¾cÇ,[¶{öìÄÙ³'5ÛšA©ÌÐô••õG¾:ÏÉÉÆÆ+Ñ£G/Ìž¡·f À³gÅ ŸqSqêÔψ‹[­iãââŠû÷ïjÖ¯^½¤÷T»2nn­¤ã·oߔ֫r¼ËG]}êª[ßkªl®ÊkÜØ ƒGzúu)ÀtÍMyÚÚ隇gÏŠQVV†-[vA¥RcèÐ/0hЧxüX]­±M…I‡Â¬YP©î -í,˜‰Áƒ‡Ãή )iž>ýë×ÇëígĈ¯ PLErò>uÕ­ë9m×ÚJeÆkcÛØØŠK—²4Û´ÍMÅ× ­®yPÿqß©MOaii)¼½ýDbâ¾*õiŠ÷ÌDU.ʵ Eaás¬X±Yo[OO{$$$™ü/D©Twä­õôôm”’r-Z¸¡}ûŽšmìF\\4NŸN3™>ë3{{3ÄÇ'àãûèlwèÐ^ŒfзLúòêÆõëWðå—CqùòÏ(..‚R™Š˜˜Ùøüó‘&Õ'Õ “þ×c°±±Åðá_»ŒZ§ïóýQ:´òó¢uk fÐq?~Š‹‹jµOª … °lÙZc—Qëªr9]kã™››#**ºVû¤ºÁË"’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$uú%+qqÑØºuC]IDÕTg¡ðÅ_Wé7ˆèuŸ|Ò:½['cÕY(̜ɯå"zðžI D$a(‘„¡@D†I D$a(‘„¡@Dƒ>¼Ô A$'ïCr²}mÕCDjРAû› ~È^¥RáâÅ‹@DµËÙÙÝ»w¯ñþ…½}xOˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$ "’0ˆHÂP " Cˆ$æv»"2ÿˆ4ïé͹IEND®B`‚pktools-2.6.6/doc/html/classCostFactoryANN__inherit__graph.png0000644000113200011300000000673512616110567021406 00000000000000‰PNG  IHDR…p¿ç$ÁbKGDÿÿÿ ½§“ ’IDATxœíyPgÇ’˜ˆoÁp„pU„Ö–¢ M錊P(Gûì³Å‹{{{?~<55ÕÍÍM¡PR©Ôçž{.55Éô¢jÐó†á¼¼<{{{‰DbâűÄ;جÿ/©­­MNN6¯®ÍñÁ |ûí·&î¼o7ïˈ'û™l€Çã8œnk˱›÷£¡¡ÇÔj¨¥E —+­­È"lÛ™™Ùs箪ÕdsvV}þüµ¹« ÛöC× g×Ðð»õXŽmûÑÐð»î?‹ªÕ×'‘È­(ÉBlØ‘h†Ï¿¡ÑÜw ÃðÙ³kI²ö£¹ùŠa& Ãuu6ÜeÙ°õõ]†/ îì¼=>þ·U$YŽ­ú12r·»{‚Œ¼ìÁãqMMFšŽM`«~45]~Ћ7µZÓÐ`«†¶úý¹L¦ôðøvS*]¸pðÏÇËv 3Þï¨ÔÝåå[7l¶¶K±Õþj¾‚ù.0?ÐæºÀü@˜èó]`~  Ìtù.0?ÐæºÀü@˜èó]`~  Ìtù.0?ÐæºÀü@˜èó]`~  Ìtù.0?ÐæºÀü@˜èó]`~  Ì”¡7Ë‘H´¶"s ‘|p¸EÖVa Cׂû~?xçÎ¥RÉd2­%îY£®®N»‚‘ßs>µ¹˜1¥ctÁÆtù.0?Ðæº0Ó©©©ýû÷§¤¤ÄÅÅåååµµµY¨#ÒÆ4S§NEFF~÷ÝwzòX,–îÜ wîÜÑ*œ»ô‘0ljD²}ûv‰Äd2ËËËßxã?þ¸««ë‘‚ŒŽŽnܸQ7çØ±c ÷cI4ó€a˜Ë庹¹ñx<½¢‹/fšXj:æÌ_R]]Â`0M___‘HTSSC£ÑLAD"ÑÍqrrZ¼ØÌ9¦ £™GÿÐÐPIIIaaáðð°î‚jñññG 6*rîRÓ1§}ðùü-[¶èælݺYÕ •J:´qãF:þå—_*•J@GGGVVVLLLZZÚO?ýرc !á!3J_ºt);;;66vË–-H¢Ñhª««“““7mÚT\\,•J £j@:žžžää䜜œÃ‡#{ÊåòØØXd /—Ë]±bEhh¨—ËÕUB§Ó}||ô–ï3±ÔtÙ©T*‰|||t3íííÝÜÜtYYÙäädyyù'Ÿ|ÒÕÕuúôi…BÁb±6mÚôý÷ßgdd>|X¡P «r8m…B!×A£ÑÈd²¢¢¢€€6›ŸŸÿÕW_ݽ{·¾¾žÏç9räÏ?ÿDVGÕ‹f¨ɯ­­Ý·o_VVV{{»F£´··{xxøûûƒ{UTT <<\¯ÿÁápûöíëîî6º>õÜ¥¦óÈýâÿƒ–W«Õ\.·ªªÊÃðmÛ¶'N$$$À0,—ˉDblllDD‰D2¬»}ûvÝ̓Òh´ªª*777‰„ø=33óã?fgg# ìÝ»whhÈ ÑÑÑ€œœ???‚‚@  imm‰‰AN§¯¯obb"<<Îf³ûûû—,Y¢ìåå•““óÅ_¬\¹ÒPÿÜ¥&òÈ~8:::;;j3ûúúŽ=ZVV&‘H ¢R©H¾§§çä䤣£ã‘#Gêëë«««_xá…´´´°°0ÃÈl6[»<¦–áááÒÒR¹\®]ùt||\Û­ûúúúúúêUAÖ¾ÕÓ€¤‘fÃáÖ¬YÃçóýüüº»» R.—«Ñhtï x<ž®€Í›7óùü’’’]»vžÂÜ¥¦`Îø±jÕªššÝŽòüùójµšD"9;;ãp8íñ###...³³³±X¬¦¦¦uëÖ½ÿþûÓÓÓ¦hvv–Åb¥¤¤TTT¼ûî»H&™LCÒ·nÝBú+]Œj@ÒÂ?Ÿ¿ˆˆˆ¶¶¶ .¹ºº âñx;vì8{:ÎãñôÆ;;»½{÷^½zµ¹¹ÙPðÜ¥¦`ŽYYYW®\9xðàü! Ož<ÉápÞ†@ DFF~þù磣£ýýýUUUÑÑÑvvv ƒÏçÏĮ̀T* í¯äò¹æÊU©Tjµš@ (•Êêêj€L&‹‰‰©¬¬ìïïïïï/++×îD3ªA/òòåË5ÍÉ“'cbb@ ‹ß|óMû{DGGߺuK¯®‡‡G~~þƒ–{œ»ô¡˜ã‡““SEE…J¥b2™;wîìììT*ÕèSE|||hhèƒdÏ]:7÷Íׇ¬‚úXžkÐOeeåØØØ‡~hE }ô‘«««nczß_)•ÊÑÑÑ–––õë×[[‹>Ï¢ׯ_ÏÍÍ‹‹ FÝü—¶:ß«%¬X±¢±±ÑÚ*Œó,¶4ƒù.0?Ðæº02ž>}Ï&B¡PïÝÁ}~„……¥¤¤ /¢1ž~~~IIIº9ód>ýy6~  Ìtù.0?ÐÅÿŒògS€ âÙIEND®B`‚pktools-2.6.6/doc/html/dir_280a0ba2820d23d6529bf494f1ea3ddd.html0000644000113200011300000001051412647637663020026 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Debug Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
build-pkcomposite_gui-gcc-Debug Directory Reference
Directory dependency graph for build-pkcomposite_gui-gcc-Debug:
/home/kempenep/pktools/qt/build-pkcomposite_gui-gcc-Debug

Files

file  moc_mainwindow.cpp [code]
 
file  ui_mainwindow.h [code]
 
pktools-2.6.6/doc/html/inherit_graph_33.png0000644000113200011300000000364412647437044015514 00000000000000‰PNG  IHDRÝ3Š èbKGDÿÿÿ ½§“YIDATxœíÜ_HSïð÷RófEk¥[iÛt¦CÖ]‚%Œn‚n4, ³ ‹0†Bå”.$"è¢.L ’(´T’%^t3 ¢¬ü³Š$ mJn®fÛçwñÃóu›Ûׯsǹ}^0Øžçœó|öŒ7;gçœÉˆˆÀ“̪å.€±xácLb:Æ$–èßàv»ÑÚÚŠß¿/G=ŒÅ£ÑˆÌÌLßFòÓÑÑAøÁ~,Á£¬¬Ì?bðM÷÷ï_ÿ¨ÉXxJKKÅ<ÍÅÇtŒIŒCǘÄ8tŒIŒCǘĖ-tCCCÉdQ¿M)ƈ¶ºe2†††Üî¿ýx˜£p,[è6lØ€ššÉƳÙlËå’·T¢µnÿº¤þd_<Ô=ûùø›Ûî_×Ü×ñ0G QRRB%%%óèßð_C———G·oßöikii!¤×ëéîÝ»>}÷îÝ Ýn§¤¤$ºrå MLL×륩©)òx<ãÍ®×××çS³V«ûª«« }üø1`½Yn·›èýû÷b[gg'iµÚ}ñP÷R†.Vçh!‚….ìÝK›ÍƒÁàÓ–ŸŸ†^¯÷éËÍÍ ØÆÆÑÛÛ «Õ •J…={öàÅ‹Xµ*xyYYYâ󜜌ŒŒˆ¯_½z…¢¢"444]ÿÇðx<Ðh4b›V«ÅÈÈHȾx©›ü.ô½P±¥ññqêéé!NG2™Ìç«Üår‘ ÔÞÞNcccÔÔÔD‚ Ëå""¢ææfšœœ$¢v%öîÝKƒƒƒôòåKÊÊÊ"³Ù°›QWWGÙÙÙär¹Ä¾©©)±ÿðáÃT\\L6›Þ½{Gyyyd6›CöÅCÝf³™4 Y,²ÙlôüùsÚµkUVVŠ5ø×l÷2Vçh!"vLçv»éâÅ‹´cÇJII¡‚‚ñ¸ÍãñÐÕ«WI£ÑÐúõëiÿþýÔÕÕE›7o˜Ä¶¶6Òh4´zõjÊÉÉ¡®®®ŠœçXâæÍ›”‘‘Ar¹œªªª|&–Ëå¢ììlª««£™™*,,¤””±ßn·ÓÑ£GiÓ¦M”––FgÏž'5X_<Ô=33C—/_&NG‚ Z­¦óçÏ“ÓéôYfn]ÁB«s´ Ý|f‹·X,ôæÍŸ¾ööv2 ao{¥Y©uK)Öæ(b?¤„Ò×ׇòòr¼~ýÓÓÓ°Z­¨­­ÅÉ“'#9,cQ-à&Ö¥T]]ééi:ÄwŽ3¦ÒÒRÿÏÔ\|kcãÐE‰h¼†E‡n‰¦ÛiØâqèVhº†-‡n‰Äí4LzºÄjµ¾ÿr9§Ó‰’’œ>}Ÿ?Æ… PYY §Ó)E™ì_pèbÛí†×ë…Ãဠ8~ü8&&&°fÍšå.CUüÏ.ö\i$oKaáãO!J,÷í4L:º(QQQªª*twwãÓ§OèééAyy9Ž;†äädŸeGÈmÉd2Ftttàׯ_p»ÝHJJÂÚµk#ùØEôÚK¶pµµµHIIÉd—/_žžŽ²²2œ;wN\&33………HKKÃÔÔTÐm ‚€––ÔÔÔàëׯP«Õhkkƒ R¼ö/øÚKÆ"„¯½d,Jp蓇Ž1‰q蓇Ž1‰q蓇Ž1‰=9ÞÔÔ$eŒÅ›ÍµZÐ:¥R‰„„„¸øW&Æ"­¨¨( -àŠÆXdñ1cãÐ1&1cKð`¹‹`,žü%»ŠŸ oIEND®B`‚pktools-2.6.6/doc/html/dir_4dfaa1fe1382d1276d1c80b1d5035ade_dep.md50000644000113200011300000000004012616110567020423 000000000000005972fef120262b31c6ded442cc052402pktools-2.6.6/doc/html/classCostFactorySVM__coll__graph.md50000644000113200011300000000004012616110566020605 000000000000000f9a8f382626bf9a88185ebf63693f69pktools-2.6.6/doc/html/classqgis_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__inherit__graph.md50000644000113200011300000000004012616110566027301 00000000000000ee118d8207204db98eaa40ce89a69fd0pktools-2.6.6/doc/html/dir_e6df591b0639d4c4807ef64d058833e2_dep.png0000644000113200011300000000446312616110567020304 00000000000000‰PNG  IHDRˆ4-ŠóbKGDÿÿÿ ½§“èIDATxœíÝkLTg€ñgt`PqAÐ* ˆˆŠ²…jI„xé–mZ6""^Š«¨­¡ˆUE´†‹¨ ¸â/‰·n­]DÛ(†‚õ®­Zïݵ¶¬t«v7*Þ`¸Åa?GQ÷Õ:03àÿ÷É9óžó¾3>™3ÀIަ¦¦¦!þ&Ö^€°mˆP’@„’"”$¡$% D(I BIJˆP’@„’"”$¡$%­9;oÛ¶µk×ÖÕZD=˜4i/½¿ÆœëA"##9|øüýû¾ôDý9}úÁÁýÙºuëKìOÿ¾¬X±ÑÜÈzmö1ä;ˆP’@„’"”$¡$% D(I Bé• dïÞÞy'ˆîÝÝ8°_~™ÀåËz:wváÛoÔ“ãÇ••NPPO^½ ññ1ܽ{ÇÊ«·¼W*ƒÁÀäÉÑŒ3‘C‡ÎOBBƒÁ4fݺl23Wqüø7ìdýú¶lÙIqñEV­ZbÅÕ[Ç+HuuF£‘²²2t:£9{¶Ó˜„„dƒÉËÛÎôé³éÖ­]»v'##ÿ~V\½u¼R899³eËNΞ=Aÿþ~ŒʉGiÒäÑÛйs®^ý/¯Î¦í>>] µøš­í• ¤¢¢£ÑÈÊ•›8}ZOddï¿?ŠÛ·o™Æhµv¼öšW®üÛ´ý‡þAv¶œb5FÃØ±áäQZzªªj´Z-Íš5jìС#X²$¢¢ ] 9y&×®ýb…U[—ÙÍmHt:‹¯&##™_½Š§gG–/߀N§{jlLÌTÊËË7nƒß"!!Å «¶.³¯)+«’?÷Û¨¸¸hZ´°7ëzWê#~; D(I BIJˆP’@„’"”$¡$% D(I BIJˆP’@„’"”$¡$% D(YìšÔk×®”4ƒÊÊ KMÙ(ét¤¤,ÆÝ½½Eæ³X gΜdß¾B† n©)¥;r ÑøyhãÆ—¿€V€‹‹Æ¢óÉw¡$% D(I BIJˆP’@„’"”$¡$% D(I BIJˆP’@„Rƒ D¯¿Xç×D<ï˜..ôú‹u:gCÑà©NNÎ|ôQ—.éññimåÙ pumMRR:F£‘’’›V^‘í°Ù@ w1`@ÜÝ›ãëëFVVúScjjjظq =ðôüC† ¦°p—étqçÎmbcÇáãÓ?¿öÌOee…é”rðà^zöôdË–M¦}BBèÖ­]­¹öïßM@€:µbéÒ…¦í..>ûlo¼Ñ.]Ú••NNΧôî݉ŽX°`®ilAAAA½pss Oorr>­ó÷­®Ùd ¥¥÷;v½zùsêÔ¿˜7/“ÔÔDnܸ^kÜæÍëÉÌLcÁ‚¥œ9£gúôÙÌ™3ÍôüÌ™“¹ví {ö|GnîWìÛWHVV†éùìì%¬Zõ ½zõ1mÛ½û?ýôŸZsíÙóžaùòõÌ›7»Ö§Ì{Ø»÷;’’ÒIMM¤°pGŽ|Ojêb23Ó()¹‰ÁPFtôp&NŒåܹKÄÇL\Üx †²:}ïêšMbo¯ãðásdd,§m[7<<:üíZã&LøØØ¿ÿ!þþY±b1))‹pu}ð{ŒE‹VÒ®;o¾Ù—ðð aÚ´DåÜžž^áëëV§¯I§s`õêOHNNÀÏσì쿲aC:Ãów¶"›½_LLÌ4bbýD2~|Œéß%%î`òõ×ù"&fªé¹¼¼í¸¹=88;·bõê¿=ulooÓ1ž|¬ÕjÉÏ?\küãcŸ|¬zîÉÇaa‘„…E>ëåÚ,›üyQçÏϤIQœ;wšòr'Ocþü¹Œ3ÑÚKk4löäEL™2“òrQQaܸq//o¢¢Æ3nÜ$k/­ÑhÐhµZæÌIcΜ4k/¥ÑjЧQÿ$¡$% D(I BIJˆP’@„’"”$¡$% D(I BIJˆP’@„’Å/:ô-KO)Ì`±@z÷ 44£ñ¾¥¦l”BCÃéÝ;ÀbóY,,[¶ÎRÓ‰:"ßA„’"”$¡$% D(I BIJˆP2ëeM›6%?ùù.uµQÇFŽiÖþšššššç{6½^Ï©S§ÌZ€¨_x{{¿ôþf"?ù"”$¡$% D(I BIJˆP’@„’"”$¡$% D(I BI äZ{Âvý‘³|Ó×IEND®B`‚pktools-2.6.6/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba_dep.map0000644000113200011300000000170012616110567020635 00000000000000 pktools-2.6.6/doc/html/classCostFactoryANN.html0000644000113200011300000003662312647637662016402 00000000000000 pktools: CostFactoryANN Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
CostFactoryANN Class Reference
Inheritance diagram for CostFactoryANN:
Collaboration diagram for CostFactoryANN:

Public Member Functions

 CostFactoryANN (const std::vector< unsigned int > &nneuron, float connection, const std::vector< float > weights, float learning, unsigned int maxit, unsigned short cv, bool verbose)
 
double getCost (const std::vector< Vector2d< float > > &trainingFeatures)
 
- Public Member Functions inherited from CostFactory
 CostFactory (unsigned short cv, short verbose)
 
void setCv (unsigned short cv)
 
void setClassValueMap (const std::string &classname, short classvalue)
 
std::map< std::string, short > getClassValueMap ()
 
std::vector< std::string > getNameVector ()
 
void setNameVector (std::vector< std::string > &nameVector)
 
int getClassIndex (std::string classname) const
 
void pushBackClassName (std::string classname)
 
void pushBackName (std::string classname)
 
void setNcTraining (const std::vector< unsigned int > nctraining)
 
void setNcTest (const std::vector< unsigned int > nctest)
 

Additional Inherited Members

- Protected Attributes inherited from CostFactory
confusionmatrix::ConfusionMatrix m_cm
 
std::map< std::string, short > m_classValueMap
 
std::vector< std::string > m_nameVector
 
std::vector< unsigned int > m_nctraining
 
std::vector< unsigned int > m_nctest
 
unsigned short m_cv
 
short m_classvalue
 
short m_verbose
 

Detailed Description

Definition at line 29 of file pkfsann.h.


The documentation for this class was generated from the following files:
pktools-2.6.6/doc/html/dir_849702d4228bd835bdf1201002937cb3.html0000644000113200011300000001010612647637663017446 00000000000000 pktools: /home/kempenep/pktools/src/fileclasses Directory Reference
pktools  2.6.6
Processing Kernel for geospatial data
fileclasses Directory Reference
Directory dependency graph for fileclasses:
/home/kempenep/pktools/src/fileclasses

Files

file  FileReaderAscii.cc [code]
 
file  FileReaderAscii.h [code]
 
pktools-2.6.6/doc/html/classqgis_1_1pkgetmask_1_1pkgetmask__coll__graph.md50000644000113200011300000000004012616110566023640 000000000000009473b48fc4d0e2ccad567f96a6c088dcpktools-2.6.6/doc/html/dir_849702d4228bd835bdf1201002937cb3_dep.md50000644000113200011300000000004012616110567017774 00000000000000aa089dd78524c2f8fb48599b1b28f12epktools-2.6.6/doc/html/pkinfo.html0000644000113200011300000001667712647637662014054 00000000000000 pktools: pkinfo
pktools  2.6.6
Processing Kernel for geospatial data
pkinfo

Report basic information from raster datasets (similar to gdalinfo)

SYNOPSIS

Usage: pkinfo -i input [options]

Description

The utility pkinfo retrieves basic information about a raster data set. An important difference with gdalinfo is that pkinfo only reports the information that is requested via the corresponding command line option, whereas gdalinfo provides all basic information at once. The reported information is in a format that can be used as input for other pktools utilities. This mechanism facilitates command substitution in the bash scripting language. Some examples are given in later in this section.

Options

  • use either -short or --long options (both --long=value and --long value are supported)
  • short option -h shows basic options only, long option --help shows all options
    shortlongtypedefaultdescription
    i input std::string Input image file
    bb bbox bool false Shows bounding box
    te te bool false Shows bounding box in GDAL format: xmin ymin xmax ymax
    c center bool false Image center in projected X,Y coordinates
    ct colortable bool false Shows colour table
    ns nsample bool false Number of samples in image
    nl nline bool false Number of lines in image
    nb nband bool false Show number of bands in image
    b band short 0 Band specific information
    dx dx bool false Gets resolution in x (in m)
    dy dy bool false Gets resolution in y (in m)
    mm minmax bool false Shows min and max value of the image
    min minimum bool false Shows min value of the image
    max maximum bool false Shows max value of the image
    stats statistics bool false Shows statistics (min,max, mean and stdDev of the image)
    a_srs a_srs bool false Shows projection of the image
    geo geo bool false Gets geotransform
    il interleave bool false Shows interleave
    f filename bool false Shows image filename
    cover cover bool false Print filename to stdout if current image covers the provided coordinates via bounding box, (x y) coordinates or extent of vector file
    x xpos double x pos
    y ypos double y pos
    r read bool false Reads row y (in projected coordinates if geo option is set, otherwise in image coordinates, 0 based)
    ref reference bool false Gets reference pixel (lower left corner of center of gravity pixel)
    of oformat bool false Gets driver description
    e extent std::string Gets boundary from vector file
    ulx ulx double Upper left x value bounding box
    uly uly double Upper left y value bounding box
    lrx lrx double Lower right x value bounding box
    lry lry double Lower right y value bounding box
    ot otype bool false Returns data type
    d description bool false Returns image description
    meta meta bool false Shows meta data
    nodata nodata double Sets no data value(s) for calculations (nodata values in input image)
    Usage: pkinfo -i input [options]

Examples

Some examples how to use pkinfo can be found here

pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite__coll__graph.map0000644000113200011300000000014312616110567026727 00000000000000 pktools-2.6.6/doc/html/classqgis_1_1pkextract__grid_1_1pkextract__grid.html0000644000113200011300000002606512647637662024033 00000000000000 pktools: qgis.pkextract_grid.pkextract_grid Class Reference
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pkextract_grid.pkextract_grid Class Reference
Inheritance diagram for qgis.pkextract_grid.pkextract_grid:
Collaboration diagram for qgis.pkextract_grid.pkextract_grid:

Public Member Functions

def cliName
 
def defineCharacteristics
 
def processAlgorithm
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
list RULE_OPTIONS = ['centroid', 'point', 'mean', 'proportion', 'custom', 'min', 'max', 'mode', 'sum', 'median', 'stdev', 'percentile']
 
string RULE = "RULE"
 
string POLYGON = "POLYGON"
 
string BUFFER = "BUFFER"
 
string GRID = "GRID"
 
string SRCNODATA = "SRCNODATA"
 
string BNDNODATA = "BNDNODATA"
 
string EXTRA = 'EXTRA'
 
string FORMAT = "FORMAT"
 

Detailed Description

Definition at line 87 of file pkextract_grid.py.


The documentation for this class was generated from the following file:
pktools-2.6.6/doc/html/inherit_graph_11.md50000644000113200011300000000004012616110567015366 000000000000003ac4a0099168f402e096a08d93a6a94bpktools-2.6.6/doc/html/build-pkextract__gui-gcc-Debug_2moc__mainwindow_8cpp_source.html0000644000113200011300000005044512647637661026264 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkextract_gui-gcc-Debug/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkextract_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  9, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  67, 11, 11, 11, 0x08,
36  95, 11, 11, 11, 0x08,
37  125, 11, 11, 11, 0x08,
38  156, 11, 11, 11, 0x08,
39  187, 11, 11, 11, 0x08,
40  215, 11, 11, 11, 0x08,
41  251, 11, 11, 11, 0x08,
42 
43  0 // eod
44 };
45 
46 static const char qt_meta_stringdata_MainWindow[] = {
47  "MainWindow\0\0on_actionInput_triggered()\0"
48  "on_actionSample_triggered()\0"
49  "on_actionOutput_triggered()\0"
50  "on_toolButton_input_clicked()\0"
51  "on_toolButton_output_clicked()\0"
52  "on_toolButton_sample_clicked()\0"
53  "on_pushButton_run_clicked()\0"
54  "on_toolButton_createTable_clicked()\0"
55  "on_pushButton_restore_clicked()\0"
56 };
57 
58 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
59 {
60  if (_c == QMetaObject::InvokeMetaMethod) {
61  Q_ASSERT(staticMetaObject.cast(_o));
62  MainWindow *_t = static_cast<MainWindow *>(_o);
63  switch (_id) {
64  case 0: _t->on_actionInput_triggered(); break;
65  case 1: _t->on_actionSample_triggered(); break;
66  case 2: _t->on_actionOutput_triggered(); break;
67  case 3: _t->on_toolButton_input_clicked(); break;
68  case 4: _t->on_toolButton_output_clicked(); break;
69  case 5: _t->on_toolButton_sample_clicked(); break;
70  case 6: _t->on_pushButton_run_clicked(); break;
71  case 7: _t->on_toolButton_createTable_clicked(); break;
72  case 8: _t->on_pushButton_restore_clicked(); break;
73  default: ;
74  }
75  }
76  Q_UNUSED(_a);
77 }
78 
79 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
80  0, qt_static_metacall
81 };
82 
83 const QMetaObject MainWindow::staticMetaObject = {
84  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
85  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
86 };
87 
88 #ifdef Q_NO_DATA_RELOCATION
89 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
90 #endif //Q_NO_DATA_RELOCATION
91 
92 const QMetaObject *MainWindow::metaObject() const
93 {
94  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
95 }
96 
97 void *MainWindow::qt_metacast(const char *_clname)
98 {
99  if (!_clname) return 0;
100  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
101  return static_cast<void*>(const_cast< MainWindow*>(this));
102  return QMainWindow::qt_metacast(_clname);
103 }
104 
105 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
106 {
107  _id = QMainWindow::qt_metacall(_c, _id, _a);
108  if (_id < 0)
109  return _id;
110  if (_c == QMetaObject::InvokeMetaMethod) {
111  if (_id < 9)
112  qt_static_metacall(this, _c, _id, _a);
113  _id -= 9;
114  }
115  return _id;
116 }
117 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/doxygen.png0000644000113200011300000000730312647637661014044 00000000000000‰PNG  IHDRh ;ˆØŠIDATxí]y\•Õº~45%TL Q”PE"q–Û11±]8a„w*©¨(*â" ˆzÀè`8 ¨‰¢mÅ,’òà„p$%”œBó(8k†Ü÷ýÜû6lòö»§k÷Ç÷[ÏÞß·Ö;?k½ëßÕÕÕPxÑêÏ't´ÏùÈ€zÀÇÅ3_€Q4€g@œmÿ ¾ò‰âci‰ôçÿ{ ðÇð¬ù~½Á€4:õHcÂü ðŸÁ³„ª'ÕPÆæ P7^h،♠zb„cóP¨„ 3‚† Ò}çÿO²qÁºNkÝTÛ(É?d Ç~z<’«4Óǡ؞Þv­zµÙ¦õ¬ZâdÛ,Ë6Ók±]Fz< ¾ZçƒsÕ?ìƒsUø2SÉåwê1”c`[ì—}%ѽ.Ô¼6‚BLZ˜û!F8[ ¹…×TéÛ— »Þ#gó]å:vžu?‡vèbÙR˜?wùŽŸ¾ÊÐgbÑÉÌÕ$kF~Ê;عÆ•¢ïX®?ÉèlÆÙôõà»Nʪ¼­,ìHC§gAz•ÆlÓº­gÑú ]œjÎñåM…3ÓÚæoÒ³'=‘$Ò÷f}G•ŸS_‡öèco.Êȹ :ó£ Ãds®Ù:1=¼{ƒå9?÷ý…zqÛvîÓi‰D’p¿Ë šmÙíoÛâýaÖüEqÒµwÌ}¿~{òj€ç{ôºŸFNëí[ëOq·ÇOSúXO]°>‚‚muæÄ¾e¤“5Ë{¨JÕ¯£(›´«bÂçû’ÍlÓÅ}žïú`éUÞy„ac§Á†ÔCºŠóAkl‘±y¥†ô¢ùôs÷Aø¬7ÄõôoJ±äÄ ù.¥Be. Z¬Ð×ÇÈöå¹­ù'Ù-PëìŠyF.ž‚žÝÚ€lp&.êˆð•jò7’re’z19»ã§HGíø%œüq°ïüz׈c¬_k_")ŸHJnÐÑ~ˆÐÖ˜á´äÕ5 µÁq€ÿ5#¸·îà¶+9T‘‚ ðŽ÷Rܸrz“Ï´Ì =Ï…{ðáO£Èf ¡Íwg|Ž’Ü/¢Þ$÷¯¢ëðúÀ;¿à¨Ö™âÒÆ­]¯ÜW"Þ/< ‡÷DÏà°½üB}çyIEc^—ƒ=[V“Ýh²ëMä$l];Kû®¸ýr¦È*Åò ÿtÒõ$]•MŸ÷´;×I€1èó!‚œõ¸M õ¨(fÌæ<ÁÎÎò5~z¿ù¶ž mÌêÕ >–âÚ©âëˆIÎÞçz;ãu[i·eç^ÆÜÙÓ³NÞëF6B\}7†»+üŽÓ,Ã'a ½˜-yHY¿,‘^—ñfú~ß?Hcø¸…¸ñó{Z+4\såƒû·¯Ù·nߣð«íFÆ¡sغëû§D¾?ò<–Ævkx0ÅM±ælذÁIÓxÿd”žÜÉ÷EE»AªM«g*È£YEí7Û™^[uíý®v[wGå†=Ed¼n×¶ÆæÖÅl¡'¨pGÚk+‹æ¢À¬¨C8ªâš2 dz3H£ß ¡¨BÒûSÃÅù[wŘ ~xpçútÁæmö¤Å£¥iQæ­‰AB1ÉfÙ‰›4u¹ïìIÒ]Ë6äò%ÿ†† 1t.’NJph¬zÌ ÎR1Ž"3-"¸‡‹&ìó°1âüžìó[:‡ï„¼‘……N m–“W0®_èÜœ ×õ6ùò&»)Æìꦬýæ}¬ñ~»{múù]z½£M•ºP~^Îá:eQTÙ_*7ÕÄ9É8—·Ëï 3°¶47E•î¿u÷“SÉ»U¯ _ NíºôW¬e¸ÄNÓ|»;™¿;ŒæÅd"ȉôøòÞµõï¾®½"èÄ´ÖMM+bYµ‘_ÉæEÝüÎ]P»¹XKÐI½Þ¥oE<_¹(„EP±Œ|mÇÁ¡‘Ý,ŠÓ©ººZ±Îߺ§×kÝ,kÍMš`Äø…jzeU»æ ™Át3ÓÀ½˜6—ÒöùË·r¨¹Ñ}““wö:Χùë¼ ¿|‚TܵÉQˆKßç_ÁâÀ™œ”pÑÐóໃ¼Ydâ0!®àa –øöçW$ÃÁ‘Á$/\¬$ð 2ÞímÞLH‹Ÿ èd£HVÜ,:ò½»RÍZšJ­a„z*>‹_…NT(ù‚^SVF­U¹8ñEþôñ܈óùnd;«®8™\C]ø=Èêm¬Æ:‚´ÆbãDd=Áãßžˆ‹UU5O‹|]þð®Pèêv‰á\]2ßìÿ"yÈ[ïyʧz£g{Y«{„Ùø5©ÿ;w{N3é­nâĨw§Á¢ÍK¢Ý­ûÏ29Id¿’ì y)ìPÞò8ŒÅ©¯‰±@mPÔñwjl,6 áhWÕ˜d öà uõmÁp®.™á£Ç…twöR x­BδYcŒxg*vo  yò‘•“[¬?ÜVœ˜0ÒN¡O난~Žó’¯·h#´Hkýœ±8kÓß^Àq@]àÓ“ø,56´¯÷Í-κU»n…[>]@nîøÏœp›[œ6# €4tën¯:ŽÒþ}…—8äT9_žY$/´G’K™©ù†•(óÑ’Mø©`ŸÉdѺ;ùO‹B Ó&P{qöhJÉ+Úé–§¦l2«MïöÝ_1ÑÓ«’t¸½±l€ëØya ¦ô©«®½ÆL^¬žêñš¸ùy.¾Û½Š[ u/]½‹iS}øN>²e1™q‡jfÚ&¢©iT\=kÏ›ÀXô-.84V5ðu!TE˜ þ.ŒOH´¶4—zwTr.ï‰¦Ë xõµ·œÖ„HÆù£žÈHùg Ñhñ’T$ßyq¸zþ¨p¿´ë< q•ró÷š‰wÿÍÑð–I]´–æI²é²˜sÂ"×:Õ–bÕ¦“ÈÙL6¢9VÊÓWž§<æ;”3?ý©Mê3AV#µ±ËÞ¯‘ž K£UrÝ9!›qát¦H£Ù+6ÇV…/TS^pÃùqgLP'Ú5E ‚–ÀÞºîÄ Ën"2|Ÿ;®W»Îý"Ö¬TwÖâµtúŽO'› á+W Ã+¦âZÌ–<ÕÆ&nOÝ,IŠ£06.ÁZ.Çñúøh*INÚ’Oe½ÉgBXÐÔZóäøä9èü“hÒíDSš¥¡Ê µA¯/Ôc¸ö“`A§¯"zå|‘ €ÅŸ¨ú;HÍ#‚Î|%ÄOˆƒ«OàÌÉÐÜD ž mÜðâc–ƤÉÂqm¶uË&~÷núÒË £ÇÏ€ZÕj =«_n[‡‡÷nN§ÏÝ$_¾bE˜‚€Õ)ù8¾?6‘lú“ÍÙæÖ}#bW( œ³d-®•p&¡ý’œÖa”"9öõņÐ$’Ú›AÜ!ä;ÐÑõè{~á¹8‘ÛÞ£1ÛÓÉ0ž`²#´kÒuäNÅÖ Q¹bhæ ”8ûÓMáŽa›•¿”w±h²¢®qŠæ°(bK ‚’Z¾Ò%ÐÆémáãÖË(Éý‚ÛJ)@> þ›7% ï{y Á“¾ÆÒîohfòô>{pÿ.­_Î%±ÉèägëlZØ\B2B #™¸ÚüÒºp‚hÝšü®[¥Ü<‹#SpñÌA7’ãØHƒt4:Ÿ|g¨tÓL¶*($Æ©»ì…®ù’ó÷$;b›ÔÙ`=¶£¦M„MÌÄ5ò«·Ç¾“H·ÌH.¼žHeAîº5}r­dõ¨±)ÀT};€Q5iÖ2…O0ü…0óñÃ;óæ,Š´²µ냔}g‘£]‹7å9ˆà©_{üèîêžC>úhê{Ž .ÈìðIIð€?[Kswz6Òuíý¬;µ€ç§OåâJÉa˶zv°éd† ¤µâ‚l´é舊«Åüy¾c÷ÁèÖÍ'ràúÅ™TWÕôÓ°¡L €|ʽŒ¼ì­høBã ÝTëî'ò]Kø£ìâÏ(=¹Kx €¿ LÌ,Pý¤Êµu‡¹…׈ §Å¾÷à1Ý«Äý;¿pGDäxZYÛ kfæ6¸ùóæ7®œ®þ6·ÕoÚ¾ÔH~ò®Þ¸â 8Uø“p<ºw3¡a£ÏÑ’‘3èÏ"€bˆ-ÎܺÏ_ªÅ]+ËM©zü°s“f-êçhÇãÑýÊãôÿ5}ZQNb{Ó?å%ÿ\SUõعIÓæ}~}p[œoÔÄ„êÐMMZáNÅå@>Œ„²á6(?¡Åé âK½+ü?À%ÝÝ·/Ç1‚9áUø?B)”ÕèâÞlÈÒêÏ @=àùÄÞžk­®ÅIEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkdiff__accuracy_1_1pkdiff__accuracy-members.html0000644000113200011300000002474012647637662027743 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkdiff_accuracy.pkdiff_accuracy Member List

This is the complete list of members for qgis.pktools.pkdiff_accuracy.pkdiff_accuracy, including all inherited members.

cliName (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracy
CMFORMAT (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
CMFORMAT_OPTIONS (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
CMOUTPUT (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
defineCharacteristics (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracy
EXTRA (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
FORMAT (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
group (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracy
INPUT (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
ITERATE (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
LABELCLASS (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
LABELREF (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
name (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracy
NODATA (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
OUTPUT (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
processAlgorithm (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracy
REFERENCE (defined in qgis.pktools.pkdiff_accuracy.pkdiff_accuracy)qgis.pktools.pkdiff_accuracy.pkdiff_accuracystatic
pktools-2.6.6/doc/html/pkcomposite_8py_source.html0000644000113200011300000012524512647637661017272 00000000000000 pktools: /home/kempenep/pktools/qgis/pkcomposite.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pkcomposite.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pkcomposite.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 import os
27 from pktoolsUtils import pktoolsUtils
28 from pktoolsAlgorithm import pktoolsAlgorithm
29 from processing.core.parameters import ParameterMultipleInput
30 from processing.core.parameters import ParameterRaster
31 from processing.core.outputs import OutputRaster
32 from processing.core.parameters import ParameterSelection
33 from processing.core.parameters import ParameterNumber
34 from processing.core.parameters import ParameterString
35 from processing.core.parameters import ParameterBoolean
36 from processing.core.parameters import ParameterExtent
37 
38 class pkcomposite(pktoolsAlgorithm):
39 
40  INPUT = "INPUT"
41  OUTPUT = "OUTPUT"
42  CRULE_OPTIONS = ["overwrite", "maxndvi", "maxband", "minband", "validband", "mean", "mode", "median", "sum", "minallbands", "maxallbands","stdev"]
43  CRULE = "CRULE"
44  DX = "DX"
45  DY = "DY"
46  PROJWIN = 'PROJWIN'
47  CB = "CB"
48  SRCNODATA = "SRCNODATA"
49  BNDNODATA = "BNDNODATA"
50  DSTNODATA = "DSTNODATA"
51  MINGUI = "MINGUI"
52  MAXGUI = "MAXGUI"
53  RESAMPLE_OPTIONS = ['near', 'bilinear']
54  RESAMPLE = "RESAMPLE"
55  RTYPE = 'RTYPE'
56  TYPE = ['none', 'Byte','Int16','UInt16','UInt32','Int32','Float32','Float64','CInt16','CInt32','CFloat32','CFloat64']
57  EXTRA = 'EXTRA'
58 
59  def cliName(self):
60  return "pkcomposite"
61 
62  def defineCharacteristics(self):
63  self.name = "composite/mosaic raster datasets"
64  self.group = "[pktools] raster"
65  self.addParameter(ParameterMultipleInput(self.INPUT, 'Input layer raster data set',ParameterMultipleInput.TYPE_RASTER))
66  self.addParameter(ParameterSelection(self.CRULE,"composite rule",self.CRULE_OPTIONS, 0))
67  self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
68  self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type (leave as none to keep original type)', self.TYPE, 0))
69  self.addParameter(ParameterNumber(self.DX, "Output resolution in x (leave 0 for no change)",0.0,None,0.0))
70  self.addParameter(ParameterNumber(self.DY, "Output resolution in y (leave 0 for no change)",0.0,None,0.0))
71  self.addParameter(ParameterExtent(self.PROJWIN,
72  'Georeferenced boundingbox'))
73  self.addParameter(ParameterString(self.CB, "band index(es) used for the composite rule (0 based), e.g., 0;1 in case of maxndvi","0"))
74  self.addParameter(ParameterString(self.SRCNODATA, "invalid value(s) for input raster dataset (e.g., 0;255)","none"))
75  self.addParameter(ParameterString(self.BNDNODATA, "Band(s) in input image to check if pixel is valid (e.g., 0;1)","0"))
76  self.addParameter(ParameterString(self.DSTNODATA, "nodata value to put in output raster dataset if not valid or out of bounds","0"))
77  self.addParameter(ParameterString(self.MINGUI, "flag values smaller or equal to this value as invalid","none"))
78  self.addParameter(ParameterString(self.MAXGUI, "flag values larger or equal to this value as invalid","none"))
79  self.addParameter(ParameterSelection(self.RESAMPLE,"resampling method",self.RESAMPLE_OPTIONS, 0))
80  self.addParameter(ParameterString(self.EXTRA,
81  'Additional parameters', '-of GTiff', optional=True))
82 
83  def processAlgorithm(self, progress):
84  cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
85  commands = [cliPath]
86 
87  input=self.getParameterValue(self.INPUT)
88  inputFiles = input.split(';')
89  for inputFile in inputFiles:
90  commands.append('-i')
91  commands.append('"' + inputFile + '"')
92 
93  if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
94  commands.append('-ot')
95  commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
96  output=self.getOutputValue(self.OUTPUT)
97  if output != "":
98  commands.append("-o")
99  commands.append('"' + output + '"')
100  commands.append("-cr")
101  commands.append(self.CRULE_OPTIONS[self.getParameterValue(self.CRULE)])
102  if self.getParameterValue(self.DX) != 0:
103  commands.append("-dx")
104  commands.append(str(self.getParameterValue(self.DX)))
105  if self.getParameterValue(self.DY) != 0:
106  commands.append("-dy")
107  commands.append(str(self.getParameterValue(self.DY)))
108  projwin = str(self.getParameterValue(self.PROJWIN))
109  regionCoords = projwin.split(',')
110  commands.append('-ulx')
111  commands.append(regionCoords[0])
112  commands.append('-uly')
113  commands.append(regionCoords[3])
114  commands.append('-lrx')
115  commands.append(regionCoords[1])
116  commands.append('-lry')
117  commands.append(regionCoords[2])
118  cb=self.getParameterValue(self.CB)
119  cbValues = cb.split(';')
120  for cbValue in cbValues:
121  commands.append('-cb')
122  commands.append(cbValue)
123  srcnodata=self.getParameterValue(self.SRCNODATA)
124  if srcnodata != "none":
125  srcnodataValues = srcnodata.split(';')
126  for srcnodataValue in srcnodataValues:
127  commands.append('-srcnodata')
128  commands.append(srcnodataValue)
129  bndnodata=self.getParameterValue(self.BNDNODATA)
130  bndnodataValues = bndnodata.split(';')
131  for bndnodataValue in bndnodataValues:
132  commands.append('-bndnodata')
133  commands.append(bndnodataValue)
134  commands.append('-dstnodata')
135  commands.append(self.getParameterValue(self.DSTNODATA))
136 
137  minGUI=self.getParameterValue(self.MINGUI)
138  if minGUI != "none":
139  minValues = minGUI.split(';')
140  for minValue in minValues:
141  commands.append('-min')
142  commands.append(minValue)
143  maxGUI=self.getParameterValue(self.MAXGUI)
144  if maxGUI != "none":
145  maxValues = maxGUI.split(';')
146  for maxValue in maxValues:
147  commands.append('-max')
148  commands.append(maxValue)
149  commands.append("-r")
150  commands.append(self.RESAMPLE_OPTIONS[self.getParameterValue(self.RESAMPLE)])
151  extra = str(self.getParameterValue(self.EXTRA))
152  if len(extra) > 0:
153  commands.append(extra)
154 
155  pktoolsUtils.runpktools(commands, progress)
pktools-2.6.6/doc/html/pktoolsAlgorithm_8py_source.html0000644000113200011300000002776112647637661020303 00000000000000 pktools: /home/kempenep/pktools/qgis/pktoolsAlgorithm.py Source File
pktools  2.6.6
Processing Kernel for geospatial data
pktoolsAlgorithm.py
1 # -*- coding: utf-8 -*-
2 
3 """
4 ***************************************************************************
5  pktoolsAlgorithm.py
6  ---------------------
7  Date : April 2015
8  Copyright : (C) 2015 by Pieter Kempeneers
9  Email : kempenep at gmail dot com
10 ***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************
18 """
19 
20 __author__ = 'Pieter Kempeneers'
21 __date__ = 'April 2015'
22 __copyright__ = '(C) 2015, Pieter Kempeneers'
23 # This will get replaced with a git SHA1 when you do a git archive
24 __revision__ = '$Format:%H$'
25 
26 from processing.core.GeoAlgorithm import GeoAlgorithm
27 
28 import os
29 from PyQt4 import QtGui
30 from pktools.pktoolsUtils import pktoolsUtils
31 
32 from processing.core.parameters import ParameterFile
33 from processing.core.parameters import ParameterBoolean
34 from processing.core.parameters import ParameterNumber
35 from processing.core.parameters import ParameterString
36 from processing.core.parameters import ParameterSelection
37 from processing.core.outputs import OutputFile
38 from processing.core.outputs import OutputRaster
39 from processing.core.outputs import OutputVector
40 
41 class pktoolsAlgorithm(GeoAlgorithm):
42 
43  def getIcon(self):
44  filepath = os.path.dirname(__file__) + "/logo.png"
45  return QtGui.QIcon(filepath)
46 
47  def checkBeforeOpeningParametersDialog(self):
48  path = pktoolsUtils.pktoolsPath()
49  if path == "":
50  return "pktools folder is not configured.\nPlease configure it before running pktools algorithms."
51 
52  def help(self):
53 
54  #utilityName=self.__class__.__name__
55  helpUrl = 'http://pktools.nongnu.org/html/{}.html'.format(self.cliName())
56  return False, helpUrl
pktools-2.6.6/doc/html/build-pkdiff__gui-gcc-Debug_2moc__mainwindow_8cpp_source.html0000644000113200011300000005241712647637661025523 00000000000000 pktools: /home/kempenep/pktools/qt/build-pkdiff_gui-gcc-Debug/moc_mainwindow.cpp Source File
pktools  2.6.6
Processing Kernel for geospatial data
moc_mainwindow.cpp
1 /****************************************************************************
2 ** Meta object code from reading C++ file 'mainwindow.h'
3 **
4 ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5 **
6 ** WARNING! All changes made in this file will be lost!
7 *****************************************************************************/
8 
9 #include "../pkdiff_gui/mainwindow.h"
10 #if !defined(Q_MOC_OUTPUT_REVISION)
11 #error "The header file 'mainwindow.h' doesn't include <QObject>."
12 #elif Q_MOC_OUTPUT_REVISION != 63
13 #error "This file was generated using the moc from 4.8.6. It"
14 #error "cannot be used with the include files from this version of Qt."
15 #error "(The moc has changed too much.)"
16 #endif
17 
18 QT_BEGIN_MOC_NAMESPACE
19 static const uint qt_meta_data_MainWindow[] = {
20 
21  // content:
22  6, // revision
23  0, // classname
24  0, 0, // classinfo
25  11, 14, // methods
26  0, 0, // properties
27  0, 0, // enums/sets
28  0, 0, // constructors
29  0, // flags
30  0, // signalCount
31 
32  // slots: signature, parameters, type, tag, flags
33  12, 11, 11, 11, 0x08,
34  39, 11, 11, 11, 0x08,
35  70, 11, 11, 11, 0x08,
36  96, 11, 11, 11, 0x08,
37  124, 11, 11, 11, 0x08,
38  154, 11, 11, 11, 0x08,
39  183, 11, 11, 11, 0x08,
40  214, 11, 11, 11, 0x08,
41  248, 11, 11, 11, 0x08,
42  276, 11, 11, 11, 0x08,
43  308, 11, 11, 11, 0x08,
44 
45  0 // eod
46 };
47 
48 static const char qt_meta_stringdata_MainWindow[] = {
49  "MainWindow\0\0on_actionInput_triggered()\0"
50  "on_actionReference_triggered()\0"
51  "on_actionMask_triggered()\0"
52  "on_actionOutput_triggered()\0"
53  "on_toolButton_input_clicked()\0"
54  "on_toolButton_mask_clicked()\0"
55  "on_toolButton_output_clicked()\0"
56  "on_toolButton_reference_clicked()\0"
57  "on_pushButton_run_clicked()\0"
58  "on_pushButton_restore_clicked()\0"
59  "on_commandLinkButtonPrepareTable_clicked()\0"
60 };
61 
62 void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
63 {
64  if (_c == QMetaObject::InvokeMetaMethod) {
65  Q_ASSERT(staticMetaObject.cast(_o));
66  MainWindow *_t = static_cast<MainWindow *>(_o);
67  switch (_id) {
68  case 0: _t->on_actionInput_triggered(); break;
69  case 1: _t->on_actionReference_triggered(); break;
70  case 2: _t->on_actionMask_triggered(); break;
71  case 3: _t->on_actionOutput_triggered(); break;
72  case 4: _t->on_toolButton_input_clicked(); break;
73  case 5: _t->on_toolButton_mask_clicked(); break;
74  case 6: _t->on_toolButton_output_clicked(); break;
75  case 7: _t->on_toolButton_reference_clicked(); break;
76  case 8: _t->on_pushButton_run_clicked(); break;
77  case 9: _t->on_pushButton_restore_clicked(); break;
78  case 10: _t->on_commandLinkButtonPrepareTable_clicked(); break;
79  default: ;
80  }
81  }
82  Q_UNUSED(_a);
83 }
84 
85 const QMetaObjectExtraData MainWindow::staticMetaObjectExtraData = {
86  0, qt_static_metacall
87 };
88 
89 const QMetaObject MainWindow::staticMetaObject = {
90  { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
91  qt_meta_data_MainWindow, &staticMetaObjectExtraData }
92 };
93 
94 #ifdef Q_NO_DATA_RELOCATION
95 const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
96 #endif //Q_NO_DATA_RELOCATION
97 
98 const QMetaObject *MainWindow::metaObject() const
99 {
100  return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
101 }
102 
103 void *MainWindow::qt_metacast(const char *_clname)
104 {
105  if (!_clname) return 0;
106  if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
107  return static_cast<void*>(const_cast< MainWindow*>(this));
108  return QMainWindow::qt_metacast(_clname);
109 }
110 
111 int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
112 {
113  _id = QMainWindow::qt_metacall(_c, _id, _a);
114  if (_id < 0)
115  return _id;
116  if (_c == QMetaObject::InvokeMetaMethod) {
117  if (_id < 11)
118  qt_static_metacall(this, _c, _id, _a);
119  _id -= 11;
120  }
121  return _id;
122 }
123 QT_END_MOC_NAMESPACE
pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pktoolsAlgorithm_1_1pktoolsAlgorithm__coll__graph.png0000644000113200011300000001010212616110567030744 00000000000000‰PNG  IHDRø€©Â3ðbKGDÿÿÿ ½§“÷IDATxœíÝ{PWûð³I@^P"%r‡V.ÁŽ‚ãØ_«Ô:*õ•VѰheµjK Ú‹‚S¬VÆzÁ8V”’:Þ¯…!aœ±x ¡â…« ¢DE#J$$ûûcßn×$ `npžÏ_»'»gO¾nNÂ!$I":–¹ À è t€:ÀÇÜ‹R©¬©©Ñh4æ.¤ß`±X~~~666æ.Ä(lÐ ÅLJ fîBú ¹\îìì Aï—Í]B¿QZZjîŒæè t€:À`‚ŽnÞ¼îàààââqåÊ•>wõÓO?‘™™I·ÔÖÖÑç»; ˆÚÚÚ>w‹!܃~çÎ>øÀÝÝ],Ÿ>}ÚËËkâĉÕÕÕ}èŠ$ÉÂÂB///‘Hd¨ò†ºjÕ*„P}}=Ç3T·à/¾Rzzú„ „B!uã R(6løí·ßzÛUUUÕµk×ŠŠŠ¦L™róæÍ#F¼yy<z}Ðh4>|ó±…û½¤¤dÅŠÌéÁ¦M›©m•J•””äìììää”””¤R©B?^¸p!ÇóððøöÛo•J%upaaáG}æïï¯{S'IrçÎööö“'O>qâuQÝÞ¨éJII‰——מ={¨ÃÞÿ}„‹‹ ÝaQQ‘¯¯¯ƒƒCFFÕBÄîÝ»GŽ9lذÌÌÌüüüáÇs¹Ü5kÖiôúr€ºÿ¾D"éù¥RÉb±îÝ»Gí>e Z6lØ0{öìÛ·oËd²àààÕ«W“$ZWW'“ÉF•ššJ’¤F£>|¸P($Iò‡~ ¤z¨©©¡9''ÇÝÝýÌ™3r¹¼¸¸Ø××—j×í:eúôéb±øòåËÔat?„ÐǬP(<ˆzðàÕ8þ|…B‘››‹š;w®B¡ …ô=“H$÷ïßïÍ÷'X½¹¹!DÇZ÷ÿ¿¿¿KK µ]\\‰‰‰"‘ˆd¼J¼ýöÛW¯^¥w¯]»†ÒÛµýÊ€¾É§–82çˉ1½ÎÔ…$ÉË—/ÛÙÙ%''_¹r¥²²255588ØÊÊŠztÅŠsæÌill¼råÊøñã¿üòK’$Ahhh}}}UUU``àÚµk% ›Íf¾î———#„¤R)=åØºu«‡‡ÇŸþùàÁƒ’’’wß}— ½½1g)ZSæ,‹þˆSÝF­í ì© îA'IR*•†††ÚÛÛûûû¯\¹²½½}ôèÑÔC …bÑ¢EŽŽŽqqqÏž=#IòÑ£G ,ptttuuýúë¯;::âãã§NÊìS£Ñøøø¬ZµŠNªZ­ÎÊÊòññár¹Ó¦M;zôè°aÃôö¦7è*•j„ ƒ¦Ú!è½Eô[Z[[«««'MšdîBþçĉžžž£G¦v<˜––VYYiÞª˜JKKœœœÌ]ˆQ`=G7%™L-•JŸ?~þüù5kÖÄÆÆš»(Œ`ý©‹)%''?þ<""B.—{{{ñÅñññæ. #táp8iiiiiiæ.S0uX€ ,@Ð è üÍèÝ»wÍ]‚¶ööN„ÐàÁÖæ./6èƒ "âæÍ›æ.D[fæ_A¬Zõæ.DAƒ 2wÆ2`2j™îÝ{2vì:‚@Ré:'§!æ.#0G7©Ó§e,AèäÉËæ®/t“*,¼¨Ñh4$]4w-x ›NCƒ¼ªª‰$Ijd²¦†¹¹+ÂÝtŽ­äp¨'8Ö±c0{1ºéˆD»ºþ÷}í]]˜½˜ÝD®^m¾uë¥/fil|P]mqóTt9|XjeÅf¶XY±–š«Ü@ÐMA£!¸¤R©™*•úÀKðs Ó€ ›Byyƒ\þT·½µUQ^ÞhòrpA7Ýy ÅÊŠ}äÌ^L‚nt*•úðá ­y ýСCú†A7ºK— %›ÍâpØ›òÏ6ëÉ“˜½˜,ê2:…ByìØ¿_k±o_B(:úßÕ‹ÿýo½ýÀü£‡–‚njññ¿!„„Âs‚˜º,@Ð è t€:À`‚°AX€ ,@Ð è t€:À`‚°AX€ ,@Ð è t€:À`‚°AX€ ,@Ð è t€:À`‚°AX€ ,¼ô/Äbqmm­«ÁÁÍ¡ÈHws2Àùùùñùü÷I‡c¾ÂpÁbÙ²X¶æ®bàãp8Ìl¿tG'"%%eÒ¤Iæ+(--]·n3Û0GX€ ,@Ð è Æ zssóKî˜öô~]ÉÞ½{ù|~AA¡jèît>ŸßÜÜÜçn{u-óv…ŒôÁƒÏŸ?ß°}¶´´Ìš5˰}öñ*!IR,;99I$CõI?æ@KxâŒt.—gØ>5B¡0lŸ}c¼Jnß¾œœ\[[ÛÔÔd>éçÂ\h O\ï‚N’äáÇcbbf̘±lÙ²ÊÊJ>ŸO’ä±cÇ.\ž˜˜XVVF½&Ò¯;ýõ×âÅ‹§N*ŠŠŠ´ú¤Žùä“­[·ªT*æ³³³cccŸŸúô阘˜ˆˆˆ‚‚‚¢¢¢ùó燇‡ïÞ½Û‡ëõõîG¡'OžÜ»wobbb@@@mmmFFBèÔ©SùùùÉÉÉ#FŒ¨­­ÍÊÊbž¢T*SSS—/_þá‡^¸páçŸ ±±±ÑêùÈ‘#OŸ>MOO··· C‘$) ¥RéæÍ›íííwìØ}èÐ!ê”-[¶œn|çw˜§ 2$++«ºº:22ò«¯¾’ÉdAèöìááAmxyyÉårjûÆcƌٷoŸîñmmmÆÍÍÚuww—ËåzûQ%b±X­VÏš5‹ÏçS³j­·¤z‡º‡kyyyéÌäèèˆÒ[[[„µð‰¹­—å{öL¥Rq8êuçäɓϞ=£Û¶m[ssóõë×sss§L™B5ÚØØxzz ‚Í›7ÓïN:::B‡Ïçÿúë¯--- yyyaaazûK%2™¬­­mÊ”)ÿùGXXXSSsá´Þ¡îùZº¨²ûÌB†«·e÷îÍè¼yóÔjõöíÛ?~ìíퟖ–¡V«³²²žS*•?þøããÇ]]]§OŸ>sæÌ×?ÝÎήWÇåTÒ7jòüáb‚ß0ü†ÀýuõëÕ³‚þZäêY¬@Ð_Ë€\=‹úkéG«g^ôW£æ-¡¡¡èŸÕ³ZP«g—-[VPPµ}ûvª}Ë–-r¹|çÎ6l¸téÒï¿ÿNµS«gýüü¨Ý;v „tWÏ&''çææÒ7{jõl\\\NNNYYY^^Þ’%KòóóáÕàu@Ð_­?®žZà;è^^=K·H$ærY \= ´ÀýúéêY ‚þ ýeõ,èýzX=K·DDDÌ;7++K &$$p¹\„ÐÊ•+y<^BBBRRÒ¸qã¨õ¨ºèÕ³Æþ·à Öº€E­žÖº ¬žµ|ð¶Ý,jõ,Ð ‚nl6{ñâÅ‹/6w! [0uX€ ,@Ð è ÚoF+**ÚÛÛÍR †rãÆ í&æßb¤¿G€þÎÓÓ³Û¿3 À@st€:À`‚°AXøM!âàÁƒŽjÃdO'¢±±Ñîj§u,×V…AÀ“š7o^~~¾cëÔëõÁÁÁŽ­Ó>Îk MÓ …"::Z©T:ªNæ½pUºÉ L*88˜}ŽàEõõõ9¶Nû8¯%uuu÷ïß?yòdMMN§sHÌ{áªt“7–ס(êèÑ£ .ô÷÷_±b…Z­&‚¦éÒÒÒE‹¼ñÆ•••x¬ÁœÏ«Tª””‘HæÌ‹:ñžIII‰$77÷Ù³gÌ_išÞµkWZZZooïÏ~ö3„PXXþÓÀÀÀï~÷»ààਨ¨]»vákô­2Ü¿% …bõêÕo¾ù¦L&›x’eµ«­ ¿–ëׯGGGŸ:u ïfÑl„ÐÕ«W¥Ri``à§Ÿ~ŠK‚øûßÿ¾pპ9s&..N,ïÝ»× »kzf÷Jlà\øëa{Ÿ²²2‰Drþüùööö‹/FEE!„Ž?yùòåžžžk×®I¥R„PCC®mxxxΜ9¥¥¥'OžÃÃÃì:ñžr¹\§Ói4©TZXXˆ )Šb>ô̞̳³³322ššš´ZíâÅ‹ ­r¨%EÅÅÅ•••Ñ4ýç?ÿ999™Ý0š¦­vµcý⿸qãFMM ÞÍ¢Ù¡wÞygppßä€_BhÆ ƒƒƒ'Nœ@eff–••1;¸OwÙ°~ýúõë×[BÀò(S XÉÉɧNbž>}!´xñâüãLáW_}ÅXƒA(–””ô÷÷S544d6›Ùuâ=µZ-Ó ©TŠ óòòB<`ï‰·ÇÆÆø|~}}=~xþüy©TjµC-Ñh4Éïܹƒª««cÎjWÛ8~-ÌÓ'¬›7oÒ4m6›ñ[† «««ñë²ØÆ;¸OwÙ`5`ÁÐëèõú´´4æaJJ B¨©©iñâÅLá¢E‹ØO T«Õ&**jõêÕUUU<ž•ONBBÞÉd­­­xûûï¿_³fMqqñÄý»ººÌf3I’ø¡T*mmmµZÈ¡–(Šñññàà`‚ –.]вZíjÇ’Éd̲è„P(´Ø¶Ê}Þ¸—‚€åu"##kkk™‡wïÞEÅÄÄà ìþýûì§FŠ¢¾ùæƒÁ°eË–uëÖ †‰5ã§!N‡¿E!•JUZZªP(ÔjµÅþ¡¡¡|>_¯×ã‡MMM‘‘‘V ¹Ò³Ù¬T*?ÿüó¡çvìØ¡T*iÖÝV»ÚƱllæ× ¸Ï÷r¶ÏÊ·LeHX\\,‘H.\¸ÐÑÑqéÒ%<‡õÅ_DEE]¹r¥··÷úõëIIIA0çóF£Q$•——÷ôô;vL$Fš¦?>00@?/¼þúë ·nÝJHHØ·o{QPP˜˜h4qáÐÐ.߸qcFF†^¯¯««KNNÞ·oŸÕB®´D­Vóùü®®.¦·oß¾ª®®fžhµ«m‹ž0$dšX£<ÄN,do»IwÙþ Â–ç›JÀÛ¿\\œŸŸßŠ+ðŠÙl>räI’b±xíÚµ!!!ì®R©$IÒÇÇG&“UTTàBæ €÷¬¯¯ß³gOvv¶ ;ÿÕx5XÀó)ŠŒŒ ‰D”,Y²„$Iöo…999;wîÌÉÉ!IòðáÇÂãÇ£GFDD,[¶L.—ËåòÝ»w[=Dlllzzzxx¸³_‹—ƒ{ = ÜKh·ÊÊÊ ¤¦¦â‡çÎ+**úá‡\Û*o÷0)Xõ…àWBr³U_Àd `€B ¨¨¨¨¨ÈÕ ¶ÀÀ°œ À0‡åt##c ]©© ^sssßãÇ}ÍÍ}têt÷µ·÷Ã?!àÁ `9‘Édþúëÿ>üm¿ñÁƒâW^™cwU4M·¶öëõ=]ÝMM=MMÝ!?¿9$)!IÉʕҮ®Æƒ‰cÇŽ9îEàz½>>>Þ¢ð…€5::ÚÐÐ@QÔ,¶ŠÛx<^BB‚H$²(§iZ¥ªùäUGÇEÑ¡¦¦î””©ždMŠ¢;;œÝ<›=ëÀéééeeeøDæÕW_üì³ÏNŸ>=ݪp2Þ«W¯¾õÖ[:.11ÑŽöXp‡d¼ó""æ½ùæ|tÔôðaO\\àÀŒØ3$¼~ýznn.{ØURR²cǼm2™>úè£ÐÐP‰DòÑG™L&d-}.ÞÙK’ñŠDÂ… #D"HèÀ̰“vuu©ÕjÛÙ GGGy<^gg'~8Ä‚K>ûì³_ÿú×?ÖjµK–,ùøãikésiHÆ«V«»ºº^ºÀ!¦°ÚÚÚBLxšûd2YGGÞ¾víZZZšÕô¹´G$ã…€ÀlšöVXX˜H$jhhxõÕWÑó›åúûûçÏŸwxôè;Ù‘X,ž,}.$ãLË´ç°x<^FF†Å&ìé§àà`æÜ¤¿¿_£ÑXMŸ ÉxÓeϤûΜ9“ŸŸ¯Õjkjjþò—¿?~œ ï½÷ÞîÝ»›››µZíÚµkÿö·¿YMŸ ÉxÓÆNe «®®ÎÈÈÉd|ðÁððpjj*þÓàààïÿûÀÀÀ   ?þñOŸ>¥iÚ`0lÞ¼9(((<<üÃ?4Û¶m“Ëåì:)Š"I2??Ÿ™{2›ÍGŽ!IR,¯]»¶¢¢"$$Äjmìé*fÛd2¥§§ûùùárÄš–B¬9¬‰…Û6À³é…ÌÏÝÝÝ÷îÝ›¸h–«¸2Þ›7o.Z´ˆݪ¾¾a®ë'?‰òó³ÑQ€[ßü¬ÕjwïÞ}úôi™L¦Õj÷îÝ»}ûvW7jJZ[ûëë[ëëÛjk[jk[z{‡BGŽlÈÊZîê¦Àan°¸’Œ×l¦ôúžúú¶úúÖ;wß½Ûúôé3‚@<½ÚLdä<6àÖCB÷·gÏ—ÿúW×£G}ccã<ÁçóL¦I™¹}» "bösë3,÷g2QõšLBˆ¢hŠš4ZùøÂÃųØ4<¿°°yðôéÓžžžØØX—5‡k„ÂÁ?ýiíܹ¾55y<Nc•Xx믽öõ×ÿ|ùÒ%-Ÿÿ㯄ããff1,±Ø7%Å—½Úßø8ÕÖÖÓá…••5--<À‹}qðzÈÂHR"8qmë¼¼¼Ã‡;¯~à âââ˜ûçè…_ Ÿ Óuâ4«8uu "„„B~Dļèè ˜˜ ÄÄ0œc5:z¾£î”ÌÌÌliia8`ºþóŸÿ9rÄ‘„€ðä<4M_¼¨=p@ÕÒbÐj?™?ÿ•Vˆ‡“8+T65u?}ú !äã#ˆ ÆÁ +e²ð;Ž’™™‰:{öì [ ¼ÖÙ³g³²²œ[`ˉ‚xçÔµkÒÜÜ;óh…¬ 'BOžŒàà…YU•îĉŽgÏÆkR,11411,&&H* õõ…©}ÀU°œN à‘äKn6œ ±ØwùòøåËã™<œÄ“btêtåå·™I±Ðм˜I1©T‚³Ààæ `y ¡ãѪUÿ+4ž>|ØÓØØ­×÷<|ØsçNsyùmü뤿¿(..$>>„$Câã%##B__“ËZÀä `y‹ùó_™?ÿ•¥Kcم̤˜NשÓu]»v¯±Qíëë'“AÎWàŽ` àÕÄbß””ëÖ¥íܹ¶¬ì·—/︿X*}âÀC8)-®óªâtfßÙï®Y ¼@(ä ÔË÷›2&¯­éõzv*¢Y™}U';³¯“šm›«Žë °€s1ymÈy)rqfß“'OÖÔÔèt:‡Ôéò̾.Ì(ìp°€=(Š:zôèÂ… ýýýW¬X¡V« ‚ ­%¾e,T*UJJŠH$Š?sæŒExÏŠŠŠ¤¤$‰D’››ûìÙ3æ¯4MïÚµ+--­··×"E®Õ4½“åîµÝeöu‡îr—,Ì ÜÙúõëׯ_o{Ÿ²²2‰Drþüùööö‹/FEE!„¬&¾e–Øž3gNiiiGGÇÉ“'Áðð0»N¼§\.×étF*•2)r)Šb¾~ô„Œ“VÓôN–m×FK¸•Ù×åÝeŽõ¶÷±,`i*+99ùÔ©SÌÃÓ§O#„¬&¾e>÷ƒA(–””ô÷÷S544d6›Ùu²³áÒ4­T*™¹yyy¡°÷ÄÛVëÚȶk£%ÜÊìëòî²Áy †„Àz½>--y˜’’‚&I|Ë T«Õ&**jõêÕUUUm±„„¼!“ɘ¹ßÿýš5kŠ‹‹'îo5±®l»6ZÂdö%béÒ¥èÅ„›“½@×föuaw¹,`ÈÈÈÚÚZæ!Îwk5ñ-Ãh4RõÍ7ß †-[¶¬[·Î`0L¬ÿcGét:ü}F©TªÒÒR…B¡V«-ö·šX×F¶ÝÉZÂÑ̾®ê®6Û~Î8mœ6•!aqq±D"¹páBGGÇ¥K—ðÖ_|uåÊ•ÞÞÞëׯ'%%ÁŒ,ŒF£H$*//ïéé9vì˜H$24M?~|``€~>ryýõ×nݺ•°oß>öp¦   11‘IC944„Ë7nܘ‘‘¡×ëëêê’““÷íÛgµÐvKÔj5ŸÏgg™¼}û6B¨ººšy¢ÕhûXô„!!ÓldW¢L7é.ۘóg*klllÿþýqqq~~~+V¬À³9Vß²¿BJ¥’$I™LVQQ ™¯"Þóĉ111ÁÁÁï¿ÿ¾EŠ\£Ñ˜˜˜XPP`‘"wbb]«…¶[•̾nÒ]¶AÀ³g*Ëþp«T*¼žV^^ž––6ÝJ¦uÜY6ÃèXîÜ]0é8@«ÕnÚ´©ººzddD£ÑìÝ»wëÖ­®n”#yü tpó3p˜&¾ pÏD¹ ·ÊìëþÝå °â(°+Ž‚rÞŠ£0$^„Ó+1 xÚWbð6°€·ðÈ•¼ ,à-8´˜”3®•œfÇuXî[+1p\8 fG,n­ÄÀuÎ Xpð ÌJ L‰R©d/½à†+1€‰` x>Ž®Ä&‚€<_UUUwwwvv¶ßs7nlhhÀ3PØöíÛóòò®^½Ú××wãÆÂÂB‚ „BaVVVnnîÇëëë÷ìÙ“mã@ÃÃÃÎ5^ ð| …"##C"ù_þí%K–$Éþ­0''gçÎ999$I>|øÐ¡CxüxôèшˆˆeË–Éår¹\¾{÷n«‡ˆMOOwökñrpk°ä·æTVV.X° 55?Ÿ¯P(àV80|>ßÕ•îÀ’^¯Ç °`·ÐÐÐ×^{ÍáÕBÀpÌa8€3 `8ãÿ ­¾VáÊ@¢IEND®B`‚pktools-2.6.6/doc/html/classqgis_1_1pktools_1_1pkcomposite_1_1pkcomposite-members.html0000644000113200011300000003025012647637662026076 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
qgis.pktools.pkcomposite.pkcomposite Member List

This is the complete list of members for qgis.pktools.pkcomposite.pkcomposite, including all inherited members.

BNDNODATA (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
CB (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
cliName (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcomposite
CRULE (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
CRULE_OPTIONS (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
defineCharacteristics (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcomposite
DSTNODATA (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
DX (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
DY (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
EXTRA (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
group (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcomposite
INPUT (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
MAXGUI (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
MINGUI (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
name (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcomposite
OUTPUT (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
processAlgorithm (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcomposite
PROJWIN (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
RESAMPLE (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
RESAMPLE_OPTIONS (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
RTYPE (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
SRCNODATA (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
TYPE (defined in qgis.pktools.pkcomposite.pkcomposite)qgis.pktools.pkcomposite.pkcompositestatic
pktools-2.6.6/doc/html/classImgWriterGdal-members.html0000644000113200011300000006116012647637662017730 00000000000000 pktools: Member List
pktools  2.6.6
Processing Kernel for geospatial data
ImgWriterGdal Member List

This is the complete list of members for ImgWriterGdal, including all inherited members.

close(void) (defined in ImgWriterGdal)ImgWriterGdalvirtual
copyGeoTransform(const ImgReaderGdal &imgSrc) (defined in ImgWriterGdal)ImgWriterGdal
covers(double x, double y) const (defined in ImgRasterGdal)ImgRasterGdal
covers(double ulx, double uly, double lrx, double lry) const (defined in ImgRasterGdal)ImgRasterGdal
GDALSetNoDataValue(double noDataValue, int band=0) (defined in ImgRasterGdal)ImgRasterGdalinline
geo2image(double x, double y, double &i, double &j) const (defined in ImgRasterGdal)ImgRasterGdal
getBoundingBox(double &ulx, double &uly, double &lrx, double &lry) const (defined in ImgRasterGdal)ImgRasterGdal
getCenterPos(double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
getColorTable(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getCompression() const (defined in ImgRasterGdal)ImgRasterGdal
getDataset() (defined in ImgRasterGdal)ImgRasterGdalinline
getDataType(int band=0) const (defined in ImgRasterGdal)ImgRasterGdal
getDeltaX(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDeltaY(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
getDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getDriverDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getFileName() const (defined in ImgRasterGdal)ImgRasterGdalinline
getGeoTransform() const (defined in ImgRasterGdal)ImgRasterGdal
getGeoTransform(double *gt) const (defined in ImgRasterGdal)ImgRasterGdal
getImageDescription() const (defined in ImgRasterGdal)ImgRasterGdal
getImageType() const (defined in ImgRasterGdal)ImgRasterGdalinline
getInterleave() const (defined in ImgRasterGdal)ImgRasterGdal
getLrx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getLry() const (defined in ImgRasterGdal)ImgRasterGdalinline
getMetadata() (defined in ImgRasterGdal)ImgRasterGdal
getMetadata() const (defined in ImgRasterGdal)ImgRasterGdal
getMetadata(std::list< std::string > &metadata) const (defined in ImgRasterGdal)ImgRasterGdal
getMetadataItem() const (defined in ImgRasterGdal)ImgRasterGdal
getNoDataValues(std::vector< double > &noDataValues) const (defined in ImgRasterGdal)ImgRasterGdal
getProjection(void) const (defined in ImgRasterGdal)ImgRasterGdal
getProjectionRef(void) const (defined in ImgRasterGdal)ImgRasterGdal
getRasterBand(int band=0) (defined in ImgRasterGdal)ImgRasterGdal
getUlx() const (defined in ImgRasterGdal)ImgRasterGdalinline
getUly() const (defined in ImgRasterGdal)ImgRasterGdalinline
image2geo(double i, double j, double &x, double &y) const (defined in ImgRasterGdal)ImgRasterGdal
ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdal
ImgWriterGdal(void) (defined in ImgWriterGdal)ImgWriterGdal
isGeoRef() const (defined in ImgRasterGdal)ImgRasterGdalinline
isNoData(double value) const (defined in ImgRasterGdal)ImgRasterGdalinline
m_filename (defined in ImgRasterGdal)ImgRasterGdalprotected
m_gds (defined in ImgRasterGdal)ImgRasterGdalprotected
m_gt (defined in ImgRasterGdal)ImgRasterGdalprotected
m_nband (defined in ImgRasterGdal)ImgRasterGdalprotected
m_ncol (defined in ImgRasterGdal)ImgRasterGdalprotected
m_noDataValues (defined in ImgRasterGdal)ImgRasterGdalprotected
m_nrow (defined in ImgRasterGdal)ImgRasterGdalprotected
m_options (defined in ImgWriterGdal)ImgWriterGdalprotected
nrOfBand(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfCol(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
nrOfRow(void) const (defined in ImgRasterGdal)ImgRasterGdalinline
open(const std::string &filename) (defined in ImgWriterGdal)ImgWriterGdal
open(const std::string &filename, const ImgReaderGdal &imgSrc, const std::vector< std::string > &options=std::vector< std::string >()) (defined in ImgWriterGdal)ImgWriterGdal
open(const std::string &filename, int ncol, int nrow, int nband, const GDALDataType &dataType, const std::string &imageType, const std::vector< std::string > &options=std::vector< std::string >()) (defined in ImgWriterGdal)ImgWriterGdal
pushNoDataValue(double noDataValue) (defined in ImgRasterGdal)ImgRasterGdal
rasterizeOgr(ImgReaderOgr &ogrReader, const std::vector< double > &burnValues=std::vector< double >(), const std::vector< std::string > &layernames=std::vector< std::string >()) (defined in ImgWriterGdal)ImgWriterGdal
setCodec(const GDALDataType &dataType, const std::string &imageType) (defined in ImgWriterGdal)ImgWriterGdalprotected
setCodec(const ImgReaderGdal &ImgSrc) (defined in ImgWriterGdal)ImgWriterGdalprotected
setColorTable(const std::string &filename, int band=0) (defined in ImgWriterGdal)ImgWriterGdal
setColorTable(GDALColorTable *colorTable, int band=0) (defined in ImgWriterGdal)ImgWriterGdal
setGeoTransform(double *gt) (defined in ImgWriterGdal)ImgWriterGdal
setImageDescription(const std::string &imageDescription) (defined in ImgWriterGdal)ImgWriterGdalinline
setMetadata(char **metadata) (defined in ImgWriterGdal)ImgWriterGdal
setNoData(const std::vector< double > nodata) (defined in ImgRasterGdal)ImgRasterGdalinline
setProjection(const std::string &projection) (defined in ImgWriterGdal)ImgWriterGdal
setProjectionProj4(const std::string &projection) (defined in ImgWriterGdal)ImgWriterGdal
writeData(T &value, const GDALDataType &dataType, int col, int row, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeData(std::vector< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int row, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeData(std::vector< T > &buffer, const GDALDataType &dataType, int row, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeData(void *pdata, const GDALDataType &dataType, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
writeDataBlock(Vector2d< T > &buffer, const GDALDataType &dataType, int minCol, int maxCol, int minRow, int maxRow, int band=0) const (defined in ImgWriterGdal)ImgWriterGdal
~ImgRasterGdal(void) (defined in ImgRasterGdal)ImgRasterGdalinlinevirtual
~ImgWriterGdal(void) (defined in ImgWriterGdal)ImgWriterGdal
pktools-2.6.6/doc/html/classImgUpdaterGdal__coll__graph.png0000644000113200011300000010375212647437044020734 00000000000000‰PNG  IHDR¥>±¸ bKGDÿÿÿ ½§“ IDATxœìÝyxÕÚð3Ùš¦{›¤û^ -e)(¢¢ ‚ÈdÑ (›àŠZ®BQáÊ&êE”­HYªPö‚VÒ¦t/]Ó%i³4m–™ïñƘfé2i¶÷÷<}ži2sæÉdÞÌ™sÎ`A € 4kÀq@R@H*(Ie ©  C÷Ÿ¬¬¬ŽŽk…âäØlöèÑ£­ôÉ?’JGGGHHˆ———µ¢qZmmm555ÖŽúŠ¡÷¿§§'dzJ(Î z ÜS@H*(Ie © Œe“Jii)†a½{·…÷¥ËÇCAR)//çr¹}/§§¼½½W­ZÕ÷rŒÅOUùà<(H*8Ž·´´ô½œžâr¹›6mê{9Æâ§ª|p=N*§N:t(›ÍŽŠŠ:tèBˆì€Òh4[·n8p ‡‡Ç£>úÇKéV%éU+¥¦¦FGGóx¼×^{­½½!túôéÄÄD‡¨=­w]¯¶µZ’’Æãñ^zé¥ÖÖÖ^ÇO–yéÒ¥°°°ýû÷kãÄ0,555..Î××wË–-!‚ víÚïéé9~üøÓ§O¬+kjj"7 œ¡#33S(ÆÉd2—]»vÕ××ïÛ·Á`Èd²’’m9Û·oçóùéééuuugΜ "ßjmmݳg9vš\püøñÅÅÅYYY111«W¯–H$,kÑ¢E555‡F566š^ïÖ­[,òòòzè¡äää^ÇONO™2åòåË999Ú×B³fÍ‹Å{öìAµ´´ìÙ³'88øìÙ³MMM.\ˆ‰‰ÑÛ™7oÞ|ùå—y<^]]‰]J …™™™fg׳¤"‰˜Læ¶mÛÄb1ŽãR©T£Ñèž”¸ÿ~íüÐ;Õê"ä¿iii‘‘‘EEE2™L£Ñ\½z!TRRbz½ƒ JOO' ),,ÔN÷"~Ýt_G‘'}¥RI†”ššª-ùÈ‘#äÌ …âàÁƒ£FJLLܽ{·T*5±?µ ©CϪ¿|||233³²²BBBÆŽ{íÚ5í%TWW>\ûïСCÍ–9`Àr"66¶¾¾žÅbOžûì³èèh//¯É“'gddðx<݉ÅâíÛ·GGGWVVš©ƒ„{*G:ƒ®_¹r%>>žÏç÷n³;§OŸ 6lùïÉ“'7lØpçνÙpÇqœÁÐÄ€žÆÆÆÂÂÂqãÆY"Tè70öW/ ‚yóæegg···gee­]»vÉ’%]g£Ñhf3 8 ‡=ß¶‹ èqXï½÷^{{ûôéÓ›šš¢¢¢-Z´lÙ2JJûå°I…ªäa ƒÁذaÆ ,º°/öWý…aXii©µ£`€ý%6 ’ ÊØnR11öðùóçcbb|||>ùäò•®ëŽ7üÛo¿i—…aƒÀrl7©|þùç'OžùdÈ!¡ï¾ûîîݻڷ’““=<<¦OŸŽ‹Åaaa¹¹¹¡¡¡®®®¡¡¡¡¶¶6rÎÍ›7“%h=ùä“wîÜùæ›oüñÄÄÄ7ß|óÉ'Ÿ48¬$€ž²Ý“©‰±‡Éƒµ™ÀàÀÆ$cã ¯_¿¾¼¼|þüùüq\\\uuµ…¶œŠí&cëul48°1ÉàxÃ$¡PXPPPSS3bÄWWW*Cge»I¥ûcØØØÌ8ŽŸ?~ÆŒ£G&âúõëßÿ=—˵È6€“±Ý{*kÖ¬‘ËåO=õ”\.úé§É'Ãäííýé§ŸÎ;×ÍÍmÍš5III“'O¾~ýºÁ™øá‡mÛ¶½õÖ[iii,Ëbá€3rºQŠU*•‰:1kQŠŽÁv«¿,Ä3 8 §K*,’ Ê@R@H*(Ie ©  $”ùGz à ­M_?^„6{¶$í‚Þ€f`þÑ£¾µµU¥RY1š^ëìTûBصk+˜LºµÃé &“éíímí( Oþq¥b¿'µsçò;:ÔùùÍ“&%X;pRrO娱›4F£ÑŽÿÓÚ±€ór„¤"‘t\¼X¨Ñà ~þ|¾DÒaíˆÀI9BR9w.Çÿº3„ãÄùóùÖœ–#$•'þÔ67 âÄ ¨ë°û¤ÒÔ$½q£D÷Jåúõâ¦&£O~`9vŸTNŸÎÕëáaØ™3kÅÎÌî“Êñã·p×}ljãÇoY+pföTîßoÉÍ­þgNA8Nääܯ®Y)(p^öT~ú)‡Á0° í§Ÿîô<àäì;©;vK¥Â»¾®VkŽƒ0èovœTJJ„¥¥B„ˆ®oùncÿGÎŒa~[EÄ#Äh{¨TT4#„"#¹ä¿ö±2ôÇ9ó.[v!´{÷ËÖœ—W°5TP’ Ê@R@H*(Ie ©  $”¤€2TP’ Ê@R@H*(Ie ©  $”¤€2TP’ Ê@R@H*(Ie ©  $”¤€2TP’ Ê@R@H*(Ie ©  $”¤€2TP’ Ê@R@å%vttˆD"Ê‹5ËÕCÕÕÕõÿª}}}Ùlvÿ¯8±X¬P(¬è1‡ãíímí(¬#‚Ú ©-ÓÆñùüøøxkGÓÕ«W)ÿ’‚~€aØØ±c­…P¥BÇ>žÏç[;Ð………ÖŽÂ:àž Ê@R@H*(Ieì#©”––bfkE`ìú+ÐÓà Îo×{ÀöÙPR)//çr¹–.ÍÛÛ{ÕªUT­ÛDí·Éö× l‡ %Ç[ZZ,]—ËÝ´iUkÀ6Qûm²ýõÛaµ¤rêÔ©¡C‡²Ù쨨¨C‡!„F @i4š­[·8ÐÃÃãÑGýã?È¥t¯[u§M—FÎyéÒ¥°°°ýû÷k—Â0,555..Î××wË–-!‚ víÚïéé9~üøÓ§OÃe2°}~›¦OŸþÎ;ï/vvvúøøœ9s!¤R©V®\éïïÏçóW®\©R©ÔjuJJJXXÇ{饗Z[[õÖ‹jmm]°`—Ë INNîèèÐý2þöÛozÒÔÔÔÞÞ®ûбà•ÜuÓB©©©ÑÑÑ<ïµ×^Ó+¿ëv™Ž˜GP-?????ßô<2™ÌÅÅe×®]õõõûöíc02™¬¤¤DÏöíÛù|~zzz]]Ý™3g‚‚‚È·Z[[÷ìÙCΣ6[9=eʔ˗/çääh_GÍš5K,ïÙ³!ÔÒÒ²gÏžààà³gÏ655]¸p!&&Æì.êÎöÐk™™™B¡ÐÄ Ô~›Ž=†ã8AAAA*•Š ˆÍ›7Ïœ9óþýû`Ĉ«W¯ÞºuëàÁƒA^^ÞC=”œœLüﻦmîܹ&L(++ ëׯ×ý2Êd2íœ7oÞ|ùå—y<^]]îÖ ÞXÉäRÚirbüøñÅÅÅYYY111«W¯Ö³ëvé®ýÂ… d²)//ïѧ& 333{´ˆÃ°NR‰DL&sÛ¶mb±Çq©TªÑht?éîß¿_;ÿLœÜÍ–FN âŸ=Bˆüà•J%B¨¤¤$!!!55U[ò‘#G ©ë2›T¨ý6Éår77·›7oñ /¬Y³†|=66¶¾¾žœ¾páÂðáà ”žžN¾RXXHNë®W©TÒétí·#===&&F÷ËH„B¡8xðà¨Q£wïÞ-•Jõâ1¼‰’ÉWô’Švuiii‘‘‘ºsvÝ.½jkkSRRBBB¦M›vîÜ9Fcl×éræ¤bê/ŸÌÌ̬¬¬±cÇ^»vFûG$ÕÕÕÇ×þ;tèо”FŠíú"ùÇÉd’ÿ–••%$$hß…½€í£öÛÄápž}öÙ'NÈåòS§N-\¸|½²²200Ã0 Ã&NœXQQQUU5`Àòݸ¸¸3fè% 5Mtt4ùoLLLMM 9M~/^¼~éÒ¥;vܾ}{éÒ¥îîîz… ÞDÉ$âŸ#'iã$Sˆî[]·K/€   õë×———ÏŸ?ÿã?Ž‹‹«®®6±u’ŠB¡Àqüøñã"‘hñâÅÓ¦MÓØ8"""77WûoAAA_J#i3‡.½¯_xx¸îºŠŠŠº¹EX µß&„PRRÒ‰'~úé§‘#GjOÇ\.·¤¤„ü)*‹³²²‚‚‚*++Éwsrr6nܨWŽ¿¿?N///'ÿ-++ &§É/#Ç‹¿qãÆõë×É[2] ÞDÉjµ!T[[«[yi‚*..×}«ëv C(ÔÔÔŒ1ÂÕÕÕà<à/”_ût§:H¡P°Ùì'N455}óÍ7l6[¡Pùäݺn—îÚ5͹sç¦OŸ¼nݺÚÚÚn~jÎ\ýe¤BDZZZtt4‹ÅŠÍÈÈ B¥R3ÆÝÝ µZ½uëÖ˜˜77·‡~˜üù@O¦Kë~RÑh4Ÿ}öYtt´——×äÉ“322x<%Û @ï˜M*Õß&‚ Èš(Ýé‰dáÂ…>>>~~~K—.•ËåÉÉÉAAA^^^IIIb±Xo½AˆD¢ùóçûùù®X±B›íºn‚X,Þ¾}{tttee¥îëÆ‚ïZ2A6lðööŽŽŽÎÈÈÐÝÆ£GFDDðùüwß}·³³S7†®Û¥»ö'NŒ=:55µ³³Óì'¥Ë™“ õÏS!¯OítèûÓ§O‡††6Œü÷äÉ“6l¸s玉Eìz{í»råŠó }ã8Žã õäè•Je°ÚÜ,rèûqãÆQ‘°¡Î¶@ Ì›7/;;»½½=++kíÚµK–,±vP8 f;¹ L³¡Ïϼ÷Þ{íííÓ§OojjŠŠŠZ´hѲeˬp4N4Ü‘ájDc`L !Är§c4Dw¡ÑY4ŒŽXntkÇ@/ARùƒ±aÆ 6X;àÈrä§—–˜Á¦a4D°Üc¾Á‘SÔ~GÕ_ô7~‡ábþ«§îÀUí¸{œ†éßS`7à` ¿ÑY´ðqÞ4†©aåh ŒéF›´=š7KÁר8Z°‚ÈñÞ¸Úè» óà:ëX|øX¯~ À=ú›F‰+¥È+B<‡7êí`: FÈö’ ý§­ªónzsñ©•÷Šti-ë$ð¿;ŠÑ…=ñQDÄÞV €¾ >©`ÖØØxåÊJJØøW–\À Y.£¹žGr“Éð&8×&t¡Aµ»8CL‚áƒ3¼q†Áô!>ckG9IÇ4ÐkŽ*3[‹N4ÕÞ’z…±‡/ 0Í÷þµ¶_?¬ÒÎC£c^á.·F{…ÿãPÃ0¬°°°°°°ß£¶B‰ÉKèîƒM}a %V½ÃÍû1¥ç(e¿F-§}õI%22’Çãõ½• /ûAV~R¢é Ü‚ ü]©”jή®÷wyp+Eµ·Ô]kW „Ñ0„ÿëuº æâMãø3Ý‚è>ƒÃg¸òi~ . ë:´*ZÍO‹îµUuDŒ÷žúõ€ <†Bá{‘µ]ä_ü,Þ¨ÿ ¢³ôòaÆé=9ÊÞåî×ÿ,›z2˜ì£c£û²Za /öñ®Ÿ+×þ:î8mÇI꓊««kGñTÊ4ù©¹‡„%NhBhä’`¾¿ŸÁ™sN5à*BT ôñðc°)hw0åSîåÕ•UWŸæØh:‰v¡¦]¨iÎG4:FàˆÐÿúv˜[ßW ˜‹'}À3¾‘Ox{…³ÿù:Ø[Ã9ÆÀ}/$n¦áG»{{;TU˜0WVñs5"[åéË3u¢ˆž¤¸›ÞÜ"P^z¥áÑÕ¡Ÿ1|¶Æ¶Zµ·¨~ßZsx¢ çÛµ'4aˆÃc˜êkp~\CmBáj\˜+§$›°9"j²/fäêG¸Š@òŽdû…ŒÌ¾ @/£âgñ|¢\¦h,£8\C\ÛpŸ¬’5˜©×ŠœàCà×jþë‡U ïIª;û#JÐ7¶r£^!Råì¥7!iÔ_"`44ì%c-ú+.´*Dj„‰Õü. ~ȃ’`06n}8B¨ü1Žp“ F, DNZk ¨=Ù'z²µ£è?y‡[+; Ñ蘬ÞLR éÎäÐUí„£æÂö“/=ünHì .|ïl™õ¯T"Õï[k¾Ÿš_t¢I£$t3 BˆéJaôG\î„!Ѝþ­Â¨È¼5ÅÇàõ †aîA¬¨IU/ú¨þ¶ôÚÇ÷µ7á€imçíÝuµv£af¯Tht,â /íJ\M¨;ðkŸÜ?ój‰ÙeY9©hN{¶ à¸t‚¢3°øÙ<†«á óä-Å íwX\ÙÑÞBåýL“y…ð‰p ¨©pö®£M}õêÓËJd J¥Œ‚Vˆé·g\BM˜½RAEŒ÷&þyká¨!Gv|fáÝôfDñS;5¬œT„¹rU;®wK\‹@(áE£mºòRiÌ¿O÷Bõ·dÔ†g8¯`ÈÕ©”kN-.þiQñýkmpp;³ÒŸEÇgÖÜLØ9å«O[©R¶)—ZknJñÿýp$¢;7HBöÔýŽ“´—,?¿^"Â%‹Í±rRûaØ€©~4CQИXìs\W_ÃÍòäBeÅ¥V\¥s÷…ŽÕdI(°k^Á04|QÀ´}Ÿû>Î3„uáÝò£ÏäߨQBŇs‘TwþüzÉ•”ʨ >³OÆG=éDwGzD)ÓüöŸûØ?ï„H»Q…Åp¡öÀ 6™ÁQÝMééeæ{ýÌÊI£aã> ŸÅëÚ…Р¡óü-Xx¼Y¯k®&ª¯Sy[E £acSÂßð¦ÑÓ>è_~!¿®ã>Š˜q$Ö˜ÛŸÕŸUXó;õY Ø&¥\“±à^{³zÚ¾A® e¹Û_GŠ~s{W½R¦Ö{Èl§Xƒw©ñî*r‚2T@cbL7Úè!”E (býõC¼äêÇD:?dh ,r¢·G0Ëàj^p¬±k¥™B¤n­ì°DŒ4:6þ“ˆð±ÞBÃ^ò×½ÍããúÄÇs~ú¨Ûª>œËþäÖ¨çRc¡Y¹iÍwÛ Ž6uåŒ ¹ÐüMЈ±Þ¨K×tŒ†ñâ8³N †7mõ“ŠZÿòf)Ó•6t._{ôà"qa€±EJ©†~¼0°Ú,©…â¤Ñ±ñ›"_žð¢AY<‚X® åÆr,´v`ƒG¸w­ñºœøõ£*ÌÈU\wq±<è‰î×dÐÂPØã^Óö tã;i—ug夂kˆKk*¤uÊÉ;bz'xè|>Â0Œ†t÷`¤·-‡„„¡ëfBCTß°H ‰FÇM§¦ß>ÎàÞ--÷«¹°n´*&ENô&mÒÛƒ1pšoÍ Ik…Eê$@ßYùüxý?Õõ·¥O}íâ‚zèíàKœ¾(ÐØ"õwdm÷;‘¡¬B¨>[f¬-™µ”œ]~¿BTª°v ô·–{ „!„¡®—t4F·®TBáyã8Â0ä;ÀuúáØÇ>÷äš¹¶J·°ôõë×[kÝ·¿®/8ÞôÔç1Ãÿ1èOûòâÖ#áJ¼£MíêËdrèÕ„nw3\MDOô1ÖfÌ*Ú›TegÅÙßÔ·Üm÷vqã¾Ql–º/;'öاíœSØc^ /ðÝ=X%ÑѦ&4ˆFÇ0F¨‘g¨KøãæoаÜéâREèÃ^ãÿÉöf`4,èœoÔDð(jуI–W|ªåê‡U};½O£ýüZ‰G0ëÁ7‚;ÚÔméaƒ_mÈ‘åîÞ¿Öæ?Ì}ØÿðǼ`¨ »Ð!VŸ[Q&¹ß9óxÇφ~¬Ø;ûŠÒ›'m‹æÊ…YC¶,j’ÏèwzÙ|«ðxÓ-ÕSw  c„Û«%qyGíMI }}ÉÙ·J]¹Ì±)á”Deiu·¤wö5ÔÝ’Žô˜ºk€ &? KV¯<óZ "ÐäÿÆè=æôÔ¹·ËÚ„O"))ÀÙùñ¹#qÆÝVaµÃ'ŠÝ÷Œ‚ÂXwZ»Ûˆ =¦îðìþAÑ“| £Ø8¹PuæÕ›öìþAQúŠ@yrÿ!”5¿Æhh܇á­jÁa!UeJØ}¿ š]%ˆŸºo°iòô+ÅlÆÔ¯°< cc_µÝïìhSó)íÓãæÏzê‹?cÍD•@R±-N”ô#…H}îíRº í©/¢!£P¢1ONgѸƒ(îÈ=OmÝWÁ8RRQÊ4‡'å]YWÙV#²&: óÄ™ºkÜ™§Š0OÆs…¾¢ÎÀî“ ƒMÓt8ÈHŽ46ìeÿº[ÒÏþúQ•…†œf±ÜéOlˆ€ÛjÈý‡@3-§ÐO­¿„yÉ™–G’C)ÿ©R}½MÑ¢ø/Çy~5£û¿µÝÙ[ßTÐþWûãn´åÀ–Ýú².äaOhþë ú#©ÈU?̽8Ò}Â'‘Ð9£›U]mÍÝ/lÌ—ßéTØ/‹'\Eœz¥XÕ®yv,“c÷µmý¯î–”7˜ÃäÀíbÌ•(\<nþPoiM?Ëg}^ÓZÑ1qk4d”Þ zÐ2 f8ºü~ÅmÕÖÄÙYöD_|º¥ ­i܇ÐwŒr ‘J!‚Ç¡S£èD³´Lkß0óï°ÊÌÖÊ+­ÖŽÅ©Y0©´Ük¿þŸê¡óýÃÇÙÐ}æÒÒR¬Ë3ìQîáÑgòûä~wžõmAÌ›7ÏÝÝéìvÜÿM…í×7ßoÈ‘õóz1/½ôRSSS_ üòË/ƒƒƒqüïÆA„‡‡ïرÃàü6øYôQÀp÷ÏøÝØR£jw¡öÈ‚I¥ü|«_¬ëƒoYn¶¬¼¼œËíÓX™¦z+xÌ¿ÃîÈÓ¦ü´¨¸êW >H¦wêêêRSS B[­ Ò IDATÞÞÞ«V­²vD†ÝÞUç?Ô}ÀTßþ_õ7êëëkjj¾ûî;‰D2bĈÖV£¿²ÍQ³gÏnhh¸qã†ö•ìììêêêY³fQ´m{hE°¦¿³¯ÞÚ8/ &•ß š¼#†Æp¨ŸB݇ãxKK‹åʧ1°ÏøÎ<7qkçW”~¥øþµ6CÏó¶…B Cq¹ÜM›6Y;"Zî)ªoH†¾ìo•µóx¼€€€ààà'žxâ‡~ˆŠŠúì³ÏŒÍlöˆò÷÷Ÿ0a±cÇ´¯¤§§?þøãFŸNäxØ^ŒKó4¶UA7/ë°ì=–[ÜanÈ‘ÝÜQkð-•JµråJ>Ÿ¿råJ•Jeö] þýöÛ¸¸8·iÓ¦C‡EFFzyy­]»ÖôR©©©qqq¾¾¾[¶lA=!ð×C‘O:5tèP6›uèÐ!ª¶£¡ˆñÞÏîôÜ‘8÷@Vöž 5Ú6»[ºÒÝkZº¹'B§OŸNLLäp8ÚäÔ»OJÏÝš½#Øá¨¡íÅ&‹¿µµuÁ‚\.7$$$99¹£ÃÀùðW_}õÌ™3Æ6Yïˆ2¸O’’’Nœ8¡ÑhÈÓÓÓŸþyó“t?Ýiƒ;°§Gò-ÕÕ×%fg£PÜ,®g(;ësÃç`q„ý+=+Ú;*[Õ¡éúÖæÍ›gΜyÿþ}@0bĈիW—””h·ºë»A „’’’$ÉÞ½{BsæÌ‘H$»wïF577›XjÖ¬Yb±xÏž=¡––ÝÉd2—]»vÕ××ïÛ·Á`Èd2Kì ƒ;fwKWº{@;Ýý¯·'% ‹ÅZ´hQMMÍáÇBÝ É`ùº4*üàøÜ;ûê©Údƒñ1wîÜ &”•• ‚„„„õëדs–””è.{ëÖ-ooo‚ n²î®3¶OÄb±‹‹ËÕ«W ‚(**¢Ñh f 4øIÜ==’•rÍž²Ë/ˆMÌc Õ¿·ý´øžªÝR_`‚#$™Pù͈ÛuJº¾[_ÿ×)ãÂ… Ç×ýÎt}— „Pvv6AJ¥Roš<[*33SwN݉D"&“¹mÛ6±XŒã¸T*Õhììp7»[º2›Tº¹';;;‹ŠŠd2™F£¹zõªv½û¤tÕÞ’|3âvkeU›l0~¥RI§ÓóóóÉÒÓÓcbb“IÅà&ëî:cû„ ˆ3f¼ñÆAlܸqüøñ&æ7›TºîÀžÉä–5(MÌŒÝRŒrã3ÝXõwd#õŸ-ZYY©[¡ìååÕw=<<BL&SoÚôRAAAzsjùøødff~þùç)))#FŒX³fÍ”)Sz±¥½–³¿!ôa/¿A}$Üôné…nîI‹U\\üÊ+¯Èd²ÄÄÄî‡dúÓG5æÉ=‚]L´wïÝ&ëÅ/ 5Mtt4ùoLLLMMÁKJJÈÙLl2ÉÄ IIIo½õÖ_|‘žž¾téR³óë!tzCwÝ==’r7&ôFt*Ò!ј[£@Þõu.—«ý'‹³²²ºÿ®1Æ–¢ÑŒîL…BãøñãÇE"ÑâÅ‹§M›&‰z²}}¢j×”ŸoM±èç×Jª¯ÛÐünîI…B1gΜ•+Wfggïܹ³ïåk _0ãpl·¢+½øýýýétzyy9ùoYYYppp×¥‚øú믧NŠº±É&f˜:uª\.OMMÍÍÍ1c†ÙùµÔj5B¨¶öï[]w`OdaŒ#ét(K*¸†8ójIÕë4l íY[¦îÔoœþÜsÏ­Y³¦ªªJ Lž<ù«¯¾êþ»Æôh)™L†Â0lÒ¤I'Ož”H$J¥’Édr8?XÂ&‡þܑ؇c9<æùåGŸÍÏÝ/TJ5ý€1ÝÜ“J¥’Åb)Š””„T*¥ª|O‹·%a2™Ï?ÿüòåË+**òóó?øàƒ¹sç’o555544ÔÖÖ^½zuÆŒï¼ó2¹Éäeb‡3}úôÿû¿ÿ?~<Ç#_4½½½½B”H$ÿýﵯwÝ=;’ Ô(Sû`.`¨ªG»³¯þۇ﫞¶4…HµçìÊÌV½×%ÉÂ… }||üüü–.]*—Ëõîvê½Kü³¦Ûàt7—R©TcÆŒqww'_LKK‹ŽŽf±X±±±–ÝƉ+¿n¨úöá;'ä–uA³»¥+³÷Tº¿ÿ·oßîëëºsçΤ¤$>Ÿß –oÑM66§H$š?¾ŸŸ_``àŠ+ ñÏ1÷BCCçÎ+ µåtÝd½#Êà>!ýüóÏ¡½{÷êÖu~ÝÏbÆ ÞÞÞÑÑѦ? îÉm÷;¾q[(°H›`³¨P²µ¢#ýÅ¢¯_Ð÷ÒzçÇ—îù t}ìƒ0k`G:ÄêÂM¡xòïH`)%gD×6T½|u8å¤ÕœI…@§—«Úñg¢Ñ­vô4µ»²ØÞŽÐô VàmÕ~­ÿ ùêëm¾1h/Ð?(¸§R”Þ,Ì•?¾.ÜŠ!Äã@Fé;'pUg`FX"Bá„›ÜS Wš-d\E\ßT ·ô›¾&¹Puó‹Ú„$~›«Q~¾õû©ùÙ{ë;Ä=ÙXíªåâ´:'Üd;Ecb#—Ýý¡né}M*‚ƒB–}Ä2«ÝJÔ éó´¯à@ã‘§óý¨JT¢°vD–‚«‰N‰ÆvXˉyÚÇ+Ü%{Oƒµq }½§¢îÄ¥µJŸ(6U[ Qâåç[óR…-Å n'á~ôd´îOé™e%ó/ …ZSgP~^|ùýŠçŽÄù€:Ëêë• Ã…ÅñÐY´Ïø>w$nÊ—1?æµ÷;Zí`LW:B¼á$"ŸôñŽ`çZ;Çç =êE`(äaϧ¾ˆ~ñl‡ëh-g8<&B¨½ øè0¶  ì¬ñii˜TÔøµï7µ[;ÇÁörÀ "—Ic`²zãáƒ>Ò(ñ^´!´´èI>³áN?âÓÙ8`Ra°hmÕ×6Þ' bÃÂîýØr÷Çfu‡]îhŒ†Üü™Ò:}³]«¸Üzh‚@£´­¼Bcbs~ˆðŒñéT0© =º*TT¢¸—ÑlíPœ¤ºó÷­5G¦äÿñE­´Îþj|¢\[·y› så^á.6Ø‘žáâˆg<Ó›]ÜÞdë5>Ñ츙Ü?wÖ)DŽv{Ù¦<øVЋ¿$ _è_qIœölÁ…wËkoJí¨‘®oŒ«¸’ õ`IgÖã¤"È¿&¿¥ØÖ¿Š¼Dcb¿~\eí@œ‹'cèKþÏÿ˜0q[”J¡ùùõ’Ÿß(µvPÝå7ÐaÛO´ªv\T¢à¤â¤z|öÏuü!n¶0ú‚i,ú„O"O-))8Ú4øžµÃqp …õ ëÕZÑ!­·›z°¨I>Q“|¬…£i.jÇ5 Çט'‡º/gÖƒ+•†;2a®,q‰= óEgaáë?™ô?µ¿±¥úû©ù™ïW6æxð3pt&-p¤­×} såÇgªvÙÞÆõ`쯳ËKUr|Ú¾ 8*u^vV\x¢©¹¨ω›Å‹žäÃp…&žÀ :ÚÔG&ç=º*lÐt?kÇâhº›TÚîwŸYðäÖ¨ˆqÞ–Ž 8¶¦yáñæ²sb:{ðÍ ø9ÐŒXÁÅUåíª}7ÈÚ8š\©Ôß–$ºcðËP¡£M}ïÇ¿A®!£áÆ>°‚ê’³o•Î:ï CâR‰šgÔÛ’°Á¾¾ÀŠJN‹8|fð(kúßOÍ™â;j¹}4gµNwÝqÿ·¶ã³ $Õ0â“ #PÝ-iÝV~Aœ³žàä\03Å·üb«µq4N—T†»³½™§—•Hk!¯Ø¨æ»í?¿^’6=?gƒBÔ}ŒÍð«»-m»‡„s‰œà#­íl¹#šS‰¾~ýzkÇЯè,ZÌdßêëm¹ûÃóbû8à îöŽÃcÆ>Ç¥Ñi…Çš³w×7äÈè.4¯p6F³T¥¥g¨Ë½[Ž‚‚0'âÆcÖü.áÆ¹y…¹X;ÇáŒ÷TBÍϯ•tJÕOïàÇ“Ò(ñ²sâÂãÍMr¯pöc´ÔIÿÖ—u÷2Z^ü%ÁÁžšÜŸ*¯´z¹ØþNÀ¢œ®ú‹äâIú뮾ÌS‹Šáâ×fÑY´Óü¦4ýPlÀp7WKöÆ8ÍO!VUÿ&±Ü*ÞõMÕÕ7Ú¬°23I¥öiÕ¯Žy”¸xÒŸÞ9À'†}mÃ};­Ý9ñâ9¯ ÷ް`ÓO¯p—ˆ±Þ¹áv}/É”íM*G˜I*Ù{êKõO(ýÉ¡=õy̤íÑ*<ì–ª]CU[¾„¹üæ"…Ì~FY¶)yrã æX;`e¦’J{“J˜+‹šèÈcƒÓY‡CÚ±²óâ´?¿^Zy¹×ôé’3p„û‹gÜaxÝÞ ä¾\l'­QZ¦Ú>U\n¥»ÐBǘéðŒãxcc#ŽÃÐlÎÅ××—Íîk}TeeåùóçûT¡)žµùüÚ÷ÚGM ¯G }ŒÊN±Ùì^xŲNR´èÓ ‚˜?þ?þ(“Ét§-´:Ц’Jefk裞fŸêÜÒÒr÷î]J£v€ÏçÇÇÇ÷±5kÖ=z”’xx.Ác¹³Ûî5_Øq˜’í‘»»ûsÏ=×ÿëÕ(ñæ{탟·Ô0nuuu©©©UUUzÓÝW^^>jÔ¨ææfËþf4©t´ªëoËÆ}n¶²Qò¸qã( ظ‚‚J£k4šÙ³g;v¬ïEé8DiivÃ0µZm•U7)pa¹+…B Ó›î>Ç[ZZŒ½[[Zq¹õ‘•¡}  dâžJÝM)†¡°Gáa$38<æ¨åÁžÁú]¾0 ûöÛoãââx<Þ¦M›:éååµvíZ¥µ¶¶.X°€Ë冄„$''wttŒ=!€ÒF:ujèСl6;**êС¿~O¨Tª•+Wúûûóùü•+WªT*½¥ôt¶i 5)¥š>í€2‘Tª¯KøCÝXôþŒ`<‚XÃ^ö7ØŠòâÅ‹7oÞÜ´iÓš5kNŸ>-¶nݺaÃ× o¾ùfMMÍÍ›7ùå—sçÎmÞ¼9++ !ÔÐЀÒ–Ëå³gÏ~ã7*++?øàƒE‹Éår„ÐgŸ}VQQñçŸ^ºtéòåËëÖ­Ó]ª«€DwGðø8 M*#_ ½"¤?C8ž•+Wzxx¼ôÒK¡Õ«W{xx,\¸!$‹ ίR©Ž=úÅ_DEE 2ä£>:|ØèM2¥R‰ã¸L&c³Ù .‹Å®®®¡ï¾ûîË/¿ 2dÈæÍ›Ïž=k:H¶ÃÍŸÕ\ý )`4©¸° É9 <<<BL&SoÚ¡P¨Ñh¢££ÉcbbjjjŒÍìãã“™™™••2vìØk×®Ñh4„Peee`` †a†Mœ8±¢¢Âlœ¼x$JØh£òÒÒR s؉ncï(- ÃJKKûX‚–««ë£>š““CUx&O:ÕÇÇ' `úôé¹¹¹g3ñ9:ÉG¬åïïO§ÓËËËÉËÊÊ‚ƒ>ïD¡Pà8~üøq‘H´xñâiÓ¦‰D"„—Ë-))!‚ ±XLÖ}™Æƒ¤B k&•òòr.—ë¨ë¥v-ÆJóöö^µjUkql7nܨ¯¯¯¯¯ xþùç{Ú€­§Ÿiuuõ#<|ùòå_~ù%,,ì±Ç+,,ìaàÎ…Éd>ÿüóË—/¯¨¨ÈÏÏÿàƒæÎklf Ã&MštòäI‰D¢T*™L&‡ÃA=÷ÜskÖ¬©ªª“'OþꫯÈùMtmáÆºJ땸WßWÖøÝt#?{_/µk1V—ËÝ´iUkql<lü°eËÿ¦¦&>Ÿßýzú™nܸq̘1»wï&/5%ÉæÍ›8ÐÓàÊ—_~ùöÛo?øàƒ,ë…^X³f±06›}àÀU«VUWWGEE¥¥¥‘r7lØðöÛo'&&Òh´™3gnÞ¼™Åb3&00P*•,Ê'Ú¨µBá? †/ë¢Ï„Baff¦ÙÙ~úé§!C†¸¸¸DFF}ú4AJ¥299™Ïçóx¼ääd¥R©R©Ö­[ÊårçÏŸ/‹õÖK^¿üòË~~~ÁÁÁï¾û®B¡ WtñâÅÐÐÐk×®émHcc£\.·ÜÖ™-M7¼ï¾ûN»Bèðáñ±±>>>›7o&Çñ¯¿þ:..ÎÃÃã‰'ž8uê”Þ'np[º#?????¿ ê™={öìÙ³ÍΆÒÖf „öíÛËår?ù䓃FDDxzz~ðÁ„ñMÖ- ‘HÄb±:::ÈO:5|øpWW×€€€O>ù„|Ñô§@:ÞôŽœ˜˜˜K—.énHSSSNNaüè‰îav/¥¥¥ugNЮ!îÿÖÚѦ¶v v¯Ÿ’ŠL&sqqÙµkW}}ý¾}û †L&Óý¶lß¾Ïç§§§×ÕÕ9s&((ˆ|«µµuÏž=ä<Úé£G†……á8NDFFFPPJ¥"bóæÍ3gμÿ¾@ 1bÄêÕ«·nÝ:xð`@——÷ÐC%'']¾¥sçÎ0aBYY™@ HHHX¿~=9Ô)S._¾L AºyóæË/¿Ìãñêêê,·ufKÓ ¼1@¾Žš5k–X,Þ³gB¨¥¥eÏž=ÁÁÁgÏžmjjºpáBLLŒÞééÂ… dCþòòòî|ÖZÖM*III‰dïÞ½¡9sæH$’Ý»w#„š››m2B(''G*•J¥ÒÚÚÚ×_}áÂ…d‰„Åb-Z´¨¦¦†<¹766šýCÇ›îGÓÒÒB£ÑÈ™¥:#‡„ÁHl<©4Ê3ÞU´ªúy½Àf8X5J¼GEt'©ˆD"&“¹mÛ6±XŒã¸T*Õh4ºß–îß¿_;?Y?`¬4¹\îæævóæM‚ È«còõØØØúúzrúÂ… Ç4hPzz:ùJaa!9­»^¥RI§ÓµçÇôôô˜˜r@@¾¨P(<8jÔ¨ÄÄÄÝ»w“'ËmÙÒtÃÓ}!D~J¥’< '$$¤¦¦jK>räH×õÖÖÖ¦¤¤„„„L›6íܹsÆX`º¬›T²³³‰ÿm¦î´‰MÖ»@www/,,$çéìì,**’ÉdæêÕ«d9f?ÂÐñ¦ûÑÔÖÖ"„´G‹^õ€ÁCÂ`$6žT‡„'ä=;güÅrÕ'ÀР܍?·¢ìÆÖjcŸwïkù§U]]=|øpí¿C‡5Q‡ÃyöÙgOœ8!—ËO:E6{G†ÚVUU 0€|7..nÆŒzE™h¿‹ºxñbxxø¥K—vìØqûöí¥K—º»ëW¹R»ufKÓ OùƒWÛd³¬¬,!!Aû®Á¡º‚‚‚Ö¯__^^>þü?þ8..®ºšâOŸr&Z©šØdmZ’ËåË–-[´hù:‹Å*..ž>þÆׯ_omm퇭3[šnxzôN|áááºë***2¶R¡PXPPPSS3bIJû˜êÎ&s8œ h‡/S(sæÌY¹revvöÎ;Éyºó)k·J~44m„ ß|óî"iiiä„ÁCÂ`$6N˜'ó·Ø_Àé'•Ž6µB¤ò¡ø´b¬åú_#¿W_}uåÊ• gÏž]·nùn[[Yu®7=iÒ$±Xœ’’¢ý½‰ µ#œ?þûï¿OÖÕ¼ù曺#›’ë5Û~qذa™™™ééé÷îÝ8pà’%Knß¾mÑ­3[Z÷½ñÆï½÷Þùóç[ZZ._¾¼~ýz½8ŽŸ?~ÆŒ£G&âúõëßÿ½UÚySÅì&“<==¥R)¹?;;;•J%‹ÅR()))!©TÚOÁX»U­7:thÕªU ''çÃ?ܳg™r #±Ôž¢‚\¨’ U¶“Tœ­OÒ»ð dߌ¸-©íì~ Z7[¥¥¥EGG³X¬ØØØŒŒ ‚ T*Õ˜1cÜÝÝ ‚P«Õ[·n‰‰qss{øá‡É}„ñöQA5Qº7Ò%ÉÂ… }||üüü–.]*—Ë;::’““ƒ‚‚¼¼¼’’’ÈÖ_ºë%B$ÍŸ?ßÏÏ/00pÅŠÚÖ_]7A,oß¾=::º²²Ò¢[gº4cK¡Þx())Ñh4Ÿ}öYtt´——×äÉ“322x<žnØ'Nœ=ztjjjgg>qÂÚ÷TLLÛdôÏÖ_ÆÓÓ³¢¢‚üwûöí¾¾¾¡¡¡;wîLJJâóù„¹O0t¼u=r²³³'L˜àééûöÛoËd²aÆÆ‰®‘Øò=•² ¢½f«Ú»u®t_ËÑÿJδì}ïÉAÒͤâ04 ÙØÌö:uŠlÀJ:qâÄðáÃugP*•½+¹Ÿ“J÷™ÝdÖÿIå÷íÕ'“ ûs¦AR±úÕ_’ÚN÷@f££·ØÆ`X³Óh÷ ‚yóæegg···gee­]»vÉ’%º3˜…É™Ýd@¡–» ~‚Ѻ¯Þ{ßu({µZ’’Æãñ^zé%í­ÍÓ§O'&&r8œÀÀÀ®]€»Ž~ß-úåÍÒ»?Àƒ¼úF/É\ÛXuzYqò’³]©Ø•Jõþû†²Ùìøøø­[·Rue³W*–ÛdÛ‡úýJ×à2£½‘ÉE1Ø=È`o3³}zºö"êÎ¥Ï-Êú¼¦ç{üM?©d®«¸ú‘þ Ó ©8!›M*άÿ“ŠiÈd"ƒ‹ìd°·™Ù>=]{u'æ_Þ*½²®g'@ G¿žk܇¯5ÿa0«§ãÞìd°·™Ù>=½ý!äêËPˆºUQŒ›'[a°{ÁÞffûôôbô{„«C!RS·AÎ’ ÀVìd°·™Ù>=f{äâÉè”BRéH*[¡Ê>88xûöíäPökÖ¬™4iÒSO=5f̘°°°-[¶ „¼½½?ýôÓ¹sçÆÆÆFDD$%%Mž\¼Xøú뇂 ÄdÒù|ÓóLÞMQ«52Yç¬Y_edÜé—H­¯Q wñdxGôG=°;úI…åAï”@Ré%¶ƒÁùk—BV§üiQ±\yÅÖ]¿^ºdÉ·þW%Cðùž¦ öñðøë¬Šã¸Z¿þú¡O?=kÙ@mƒ0OÎOà@û(`~Rqõa*Äpì=@í´FEÈ…ÊŒw%5V ˜öÇåsçîV©pÇÉWÔjœÇ3s¥‚ŠÔN“=··o?÷î»GU*ÿYÖ(ó‡@Ý0L?©¸±duJ«„â|"غ­Zp5¡©ZTÜVyÅåæVÏ›ƒVã IDAT·[­ÖèÞ7ÆqóW*¡aØÌ´û"tìØ­yóvK¥ÔÇjä*Yƒ’7T€úIÅ#%…¤Òž¡.ãŸìUmªŒ÷D% kE Êϯ5뫎5Žë·D2{O!¬Ñàz/j4xVVÅ3Ï|^[+¦,P[¢îÀÃÆxñâ3©tˆÕGÿUÐT ·v v¬KR fu´©á^}¯y„²P—3®FJ¹æ§Å÷à`µ%%Â9s¾êìTuM !Ïü•J||P×l„R©ÔååÍÿú×mmíjc¼Â\žú"ÚÅÓ&ºæPCÒÚNU»Ct“~Rñá¸û³dB¸Xé% ÜPF&4„ª?ÿ®5<µe‰âùç¿–H:Õj§:óõ5ÿK|à@Ã@W$ Ãq<8Ø—NwÐ3¯ãÂhBˆ0ô[t“~çG7fÒ™«„â°Cá¸Ré=G„b sç3B4†a˜WÛ+’=|?d4dHÈ—_ÎKI™àÍ`ÐY¬¿~cvwÌ•øø à :†a³gš9óÁ‹  h”o¯ BÑà'A@R¡žW˜ BÈ#ØeÂæÈYÇây±œ¬Ïkp5üö±EA|ÿýÆ…ܺµnéÒ±Ž BÈß¿»I%!!D­Ö$&†?ÿîöíϯ]û Ž_|qÞ’! Rwà!NŒ½GÁ(Å@0W¦hQ‡óÆh!$­SŸYðprhÜL®µCú.\(X°`ßùóÉ:¿5dHðDvgq‚ êþ¾UöÝw¿­_ÿcf檨(eÕþÈê•ß?“?ýà Þ`Çl3Ý ©ô‡ß·Õ”=Ÿ1˜ÉëjÛòÌ3Ÿ{{s^JU >iÒ¶°0¿ï¾[LU™6B!Rç|×0|a€«¯ÃÞ‹ÅÕ„\¨äðXÿè Ë«¼þ¸$@ÓIäáŸmËo¿•dgW­X1‰Â2étÚ‡N?w.ÿêÕ{k „9²‚£t¦#Ÿmi Ì#Ø2J_I**9#j¾ë€]·¬‚íÍ2Ÿ/8 Tˆà® Ù±ãâèÑÑ#GFP[ì˜1'Nœ’ò£ÁN0ö«1_îÁfyÀÕ60ÅHRÁPAZcÁѦþ Æ‘%¼È§»Ðr÷ ­øËŸV\»V¼|ù“–(üçWV69’e‰Â­E(Ã_À,£Õ_Ñ“|«®¶j”pÇ…,7úØ”ðAÓá^½­øê«ËLJk‰Â#"¸ <ºiÓ™ÖV¹ÜÇÕDsa; N Ì2žT&û¨ÚñŠ‹Ž9(žU„=æåÏ5² EEõçϼùæË­âwž¢Ói_|qÁr«èO¢…º÷Ý­€F“ ‡ËŒ~Ê'÷€Áµ p8_}uiР€)S†Xnžž®ÉÉ“¿ýöZY™#4ÐhÌ“»xÒáW0ËT믄ù¢RE}¶´ß¢ TT4edÜyýõñfÙF>óæ=ãÿÑG?Yt-ýC˜'çÅ»ÁÓY¦’ 7–èžnׇòõ×™¡¡¾3fŒ°ôŠÈæÅ.\¹r×Òë²´¡óø#_ 4?Ÿ+<Ötþ2kGaßÌôS<‡W}CÒуvÑÐÐvìØ­×^{‚NïNZcÆ ˜4)!%åG{Æ°ß ?ÁñïÒ·ÝïìÃé®OÌ|¯"&x?Ÿ1˜íå°h­žÙ`{÷þêíí:{öƒý¶Æõ럭ªj9|ø÷~[#èµ±ší§»>1“ThtÌÏìŸPœŠ¸L‘6½žÜÜÏZZdû÷ÿ¶té86»ÿŽêˆîâÅmÙò‹X Ïý´u H*}ôX‡w$›É¡ÿ¾­ÚÚ8—/¿¼äááºxñãý¼Þ+žrq¡öŒ^lë:ZÕ®>¶û3š ˆyóæ¹»»ëMÛH*ÖѰ‡ß ©ºÚV}½ÍÚ±8 ¡°mÿþß^}uœ‹KÿuwwINž²ÿo÷î5ôóªAt´ªlùJ¥®®.55µ°°PoºûÊË˹\ËvÁ†¤b5AzD=ésck [Ð?víºâíí¶`Á«¬ýÅGÇÇoØàÍ‹X‡XíjÃIE¡P „ÂÂÂô¦»Çñ––KĦIÅšF¿ÜÞ¬*8êãly™²l™.SH4¶ví¿.]*º|¹È*³Tí’°Ä• †aß~ûm\\ÇÛ´iÓ¡C‡"##½¼¼Ö®]kb©ÖÖÖ p¹Üää䎎ŽÑ£G#„BºÓ¡S§N :”ÍfGEE:tè¯-R©V®\éïïÏçóW®\©R©ô–²¢'äÍJ¥\Ý£E€i·¿©ûnL޼Qií@Üúõ?º¶½½Óºa,Z´ï±Çþ£TÚÓ—èꇕW?ª´vý×à’šu§†ò’BIII‰dïÞ½¡9sæH$’Ý»w#„š››-5wîÜ &”•• ‚„„„õë×—””hOÚºÓ2™ÌÅÅe×®]õõõûöíc02™Œ ˆÍ›7Ïœ9óþýû`Ĉ«W¯Ö]ÊBzP:®!Òf\ûO•å¢qB*…&uJÞoŸÜ·v ެ¡¡5""yçÎËÖ„¨¬lOÞ»÷ªµé£Ïæÿùuµ£°o¡ììl‚ ”J¥ÞtII‰ÁE”J%NÏÏÏ'ÿMOO‰‰1–TD"“Éܶm›X,Æq\*•j4‚ bccëëëÉy.\¸0|øð~H*=¨þÂhèÁ׃ŠN4×ü.¡öjÉ™1Ø´‰[£F¾êø}•­h×®+ì µv (<ÜoÉ’Ç·m;'ÙGóâ±ZRÓ #Þ÷‡‡BˆÉdêM# 5Mtt4ùoLLLMM±™}||233³²²BBBÆŽ{íÚ5†ª¬¬ Ä0 ð‰'VTTP¸EÆôìžJä“Þ‘Oz_Ûx_Õnß݃m o0‡ím»÷íÝÿ}=áêʲv,!ôÿ7‰Íf|úé9kÒ-Â<9†!ñ¾ßùûûÓéôòòròß²²²àà`c3+ Ç?.‰/^˜˜Èápµ§K³!,¿Gbžö {Üë׫ÔxO—튪‘·É™‘‘1hÐ >Ÿ¿|ùòÎÎNc{»ëâÈÈN68jw¯mÙòKllàÌ™ô±œ~3rdÄ´iÃRR~T*ÕÖŽÅyµVtx‡Y¤²´wß¾®_ µZ’’Æãñ^zé¥ÖÖVrNƒç(­¾Ÿ‹zŒÂÁ)¯~TùݘQi;…eÿßÞ}4‘¼ ŸT:¡W‘&ˆØEÅ‚Ø{CAÏŠ4ÅÞ z`ï,€½a¡ÚP±bGOE¥W)¡†R÷ý{9þ @’MÂü>…°³û°KöÉÎÎ>Ó¡ªÑky6~³yEhþ†\\\ª««Ï;¨¬¬¤P(D"qÙ²eEEEááá€òòraB¸þöªûÍŒuO¯-¬ï@Û&:°‘–+oOš4)##ãÇ=zôh¥wóæˆ ÜRÕîŽùô)ÇÐpm||J‡×€Šââj ‹Í¡¡ hò/——ý´ŠI‘¥ýÂC®Œùþóv‹Ÿ…ÎèÀ§Oà‡âÈ‘#½{÷NNNNII±··ß¸q#‚ ÏQmžëÄJ”I…]Ͻí‘~köZ…(gí¯ÝfRi^š¿¡„„„Æ+g2™éééT*•Ëå¾zõªa‹m†$pý(êÀ>l¥òvrr2ÿ͈ˆˆ–Êq lŽÚÉ-Uíî'§3gþÝáæ(:t衵õÖ²2 Ú ‚Tü¢Ÿô¥2CÄ_¥Ëã²yâXs>}?={öŒå/––Æ-ðÕæ¹N¬Dy£¯€tÜá"×d‹väR{«F·©¥ŠÐFFFWN$322¦L™bggwùòeáCB¥âtëDXyÛÊÊŠÿÂÆÆ¦¥rÜ­4o²“[ªÚÝ ??~ÌÙ±cFÇš£Ë×wœ²²Â±cñhåÉ4¢ NÓ²K<öȇÁb°xq˜jï§Oà‡"??¿á£×«W¯9sæ€VÏQ|’?‰xô—²az˜Ì~ìŸÍe‰àf€˜´TºÉéŒÁ`Ì›7oÓ¦MIII!!!_¿ i¥ò6ÿ{ ##ƒŸ!ÚÕ¼ùNXµ»½x<$0ðþ˜16ööhŽ:…íۧ߸ñ!=ýQå)4[eŒ|•?FFFyyyü¾}û„8GIþ\$úÿ5c… G-ÈiôÌ95HFK¡›`2™,‹H$2Œ={öêꄉ äú¥Y+•·ýýý³²²>}ú´}ûvþ›MŠi _¸»¥ªÝí÷ýׯ’;gv ­”pqܯ_·Ý»Ñ^\–BՇʼnÑ#ðC±hÑ¢;vüøñãÇ~~~ùùù@ˆs ç"1u«UfÒõO‚F=-½n¢Í{* eéÒ¥šššÚÚÚžžž4­¥•kii™˜˜„„„¸¹¹ééé ’Àõ£¨ûAªªªE‹ikk®[·ŽÁ`ð÷áùóçMMMuttV¯^Í`0Øl¶ƒƒƒªª*ÒlŠÓ&Í[ÚzDD„¥¥%‘H´±±¹{÷nþ@‹3bDЪU—;ÐVª|þœkd´îÑ£dc`T³ÏÚ}É{Uƒb ò¤cŸ¾æŠúúú7‘H$77·êêjþ’ÍÏQmžëĪC¥ï!”pYŽˆæóêYYYVVVRø?sýzâöí1/_n17×E;–Îòñ¹öõkþ«W[‰Dtæ•(x[ûxmö¢gýà„¤PÀNS™Áeñîþñóçí ´‘: ëèÑÇóæ •ƒŒصk&™\wþük´(O¦©wS€ê™O*rV5º8"ÖÄôþpQU&C´k~ª««¯ZµJ´[ï¼+WÞS(Œ'£ˆhjxyýë¯'eeTÐí­Òg*›F‡ÁcÓQU$g0Øý%Kx\äþò 6ëtͯ ó_D‚Fc8gŽÝÞ½NhÇ"2õõìQ£ŒcsäÈ<´c‘©·ÈIgK½è‡v rBr'¦ª,Fy œ7¢S°8ÌèÓºbÖ—PXÔö_!!/˜LΚ5ÐD” [·N»yóCrr!ڱȿŠtº¶dçl|Ebff¶xñb2™Ü™ž:uÊØØ˜Çûïz ASSÓ“'O \^¬eŒ%—T¾_.‹_“]•%â®›®FÃLÑa{÷äð²ü—µhÇ‚¾¢¢êëÖMÖÖVE;›;×ÎÎÎl×®Û°/AÜÈé4][IObûþýû’’’¢¢¢K—.Q(”Aƒ5Ôòj®q!p\]]KKKß¿ßðNRRRaa¡‹‹‹(ƒŽä’ʨÝ5-ùfQŠ˜Û¨\²š®Õg^®Üêœz´cAÙáÃŒ4—/—Ò ƒ;ƒÁìÙ3ûó缇“ÑŽEž±éÜšÜz^’N*ºººÆÆÆcÇŽ½}û¶……ÅñãÇ[Z¸q!pôõõÇÙðNll¬£££¡¡¡(ƒŽä’ ^;ù/K=¯Lj KbÛ•KC×ëöV¡–téôœœ\ûeÛ¶é2Qâ¾ 2;×îÏ?ï3™°z±¸Tþb <ÐäJ¥cu…VàX«»yC//¯ðl^u¸q!p ÜÜÜ¢££¹ÜëcÅÆÆÎŸ?¿•åù÷ƒ5~-°¶±°ÕÄÅý LL*çö¢Ÿ×§¦PŠ˜Þ4$gœO99@; ñ*)©±´Ü|òä3´‘[Éáe×&|oò&èPUoЬ7Òr­î&=~úôICC¢êpK¥Ó«««^½z… Hzz:‹---ms…-•o^ÛXøjâ’N*‚0)œX÷ôÓR(Å0¯@ôäÉ#£uIIùh"vGÆ÷è±¥´´í@äÓ‹¹V7}¬´¿®0"¨w+µº[J*mVn©t:‚ sæÌñõõE$((hܸq­,ßfRi^ÛXøjâ( K%ªá&ÿm© Ž«+îÒ½7P‡q8¼?ÿ¼çä4pàÀîhÇ"v¾¾ã45•z(m¥GWtµ…DœÑPµæïw¬2z“ Ü­Ôên"33“¿X›U‡[Y ¡¬qßW›+l€4Ò¼¶q;ª‰·šÅň×ñ)3 ®îúõDSÓyyb™RI ݾýÅØxÝׯb¿,{àùb{®¸·"ý@‡ªu5_’¥’ššÊóöíÛ–––Í×ÃãñFµ{÷nAètº‚‚ÂÝ»wy<Zô&W*àÿŠF£©ªª^¹rÇóûÄÚ\!ÿ›ÍF$!!¡a+ݺuk\Û8==N§¿~ýA&“yùòeÇïßkµè`Um¨cªªh÷½½Çššj£‹„Ìž=pð`óÝ»ï â^ŒðùM¯/,N,2­Ôê&“É¥¥¥ÅÅů^½š3gNnnîúõëA«U‡ù…À[Y@YYÙÉÉiíÚµãÆÓÕý·dQëeŒ544W¯^¥P('Nœhx¿ymãvT6wCRï÷g©˜4PܶoÉ×wÜ©SÏËÊÄò½¡,…g{†üÕ-)J*fã4Uì‡>™l:íXdÕÈ-&º¶*ñk²hål´c1:µoß=gçÁýú™  j¼½Çii©8ð@äkfQ¹5¹ x—^­ÜS€T%Uâ”=¨¿YO7ærðz¥#°x̸fX<æÅö\9ëK M¨©¡oÙ2 í@Ф €ß±cFTÔç¯_ D»f‚2Öù–­±½ºhW+Í~Þ©(ùR×örP;IQRh˜)N µªH§=ZûÁ:FI‹0åoËêlÆ· ¥hÇ"2¹¹äS§ž­^=ÞÈHíXP6kÖ@{{‹Ý»E\½ƒÅhZ*”¥ë„ V_BJÊ’ád¢'uÿCš–Š³.ö¤0ãVf0)°Ž^GhZ*M µê¿Dí@DA "¬¬ôýüäjÒ”Û·oÎׯù÷î}C;V›Ï¤W² ÉÛŒ Ò@ê’ @Ã\qÊIKj ëóé®U1B„tl”ñJÒxp; :úó§O¹‡ÏÃãåä/ê¤>}Œ]]‡ìÛwÁ€Õ¾;¨äk^«k ï!‰ž”~Jµ{*Ï8g5Ø…É ©RUE ¸»xñÈä¿Ì—ð¶oŸA¥Ö‡…½D;YUú•ª×GK€C¶DOJ“ @ÓRIAvÊx ¨Hضm:ÚH]]5?¿ñ'O>+.®F;™TšD5€}_â!½I‚>}ʽqãC`à\UU´c‘:^^c H’©^,g¨¥¬ºß,ƒ0©ˆL*]E}-çÇr ;ÃŒÙlîÖ­QãÆÙLÚíX¤€Û¾}FLÌ—¤¤üN®ŠIéZO†¼©%(ã aR˜TºŠ²¯´¿=P€ÈÈPíC‡–”Ô=ºí@¤×Œý‡ ³Ø³§SËÙtîµñÉù¯ä¶ºOs¦ŽcÍà 1‘¥¤Â¢qûg“Séh"“LǦžî‘õ¨úɆl.KÚËÇ9aa Núú]èq¼Ø·oηo…wî|íðÊSèÑíÝBsy¤¢O0MB; ¹%KI‹Ç <äWfÑ Ú±È$£!j“ÿ²,ýB}¶9WškáÔ׳7l¸5qbïyó† ‹´ëÝÛxÞ¼¡þyNïàðâòšª!QY§íi !H²”Tð ØÉ[ö˜¦¿:;=ºípd’¡êô³Véôû+2èd)­vðàƒÊJÚÁƒ.h"¶m›N§3CC_t¬yY2¬# ‰’,%‹qØÖ}ˆ¯ÑÛÿœ,–¡ÛÎÒCÇFyÖ¥ž\roù/N½Ôõƒ%&fŸ?ÿz÷î™úú°ƒB(::ª«WO8}úEQQû‡# <…¦“ $:2–Tøú/Ñ`š^þjo>K»©g]´ºÆ¯(]ÿt:kÓ¦ˆáÃ-,°G;Yâé9ÆÐPãÀ¸ö6¬-¨gR8ú°81$:ÒuNžõLíqAæÙ« ßÁû+¡ Ž·˜ ‰vMÜ©¨¨ vƒ³S´ €Û¹sæ;_ÿù'§] Ë’ix¬vÏ.t—7YM*ó ®Ñ½à(¹qïÞ×ððÄà`7-´c‘=S§ö5Êz÷î;<^;®Ý.è>šÔuf{dQ¥w|ŠÜá¤P3†ZˉââêÍ›£æÏ:mZ?´c‘U»wÏJM-Žý"|“žNÚ㘋/$©Â¦ó®ONÉy Ûˆ—l'HäU( ãry«W_×ÑQ r–üÖ冭­‘››ýþýq^,ßò_Õð¸H·aðÉ'ñ‚IúOéWê­™©™ª$¼Ý³g_}ù’wúô"ee¢„7-g¶l™F§3OŸ~Žv Ò(çYµñ5¢í@äœ&•²ïT9›IWbôú©ôœ­ýrwÞÇãÅH{ºæ;ãÇâC‡®];©ÿ®;ù¼¨hk«úûO M(,”ô7)Ç¢r‹ÞSÌÇKÝàù#oI…Ãä=Û’·RzŸì“fXfÄfÇ]¦©‘ä‡>Yè c0X¾¾×6ó÷Ÿ(îmu+V8iìßßîáÅò­àM-¦cḱ“·¤‚WÀ:]µAxHÌüôâêÐG&õtÒž{Ó†QʼnvM/|/ÞÛ÷ËËëNœpÇb»Ê$q#p»vͺ{÷ëÇí^,ßržU VS$Á)šÄNÞ’ @E0ó‚u·‘êñ~Yß/—¡ŽLÒ0SœuÑÚ`ꓵÙÙÅ5ZæéÓÔË—ßÍ52ÒÓ&º¦É“ûŒÝs×®Øv /–cÿö}M„ÿf’€ @;ÑÃâ0fc4¸,äËÙ’úJN·aêü"Ü>8"Ör¢¦¢¾»ƒ:AIô÷6ËËëÜÝÏL™ÒwÆ)"_9Ô¯_·ààÇÆÆš}ú \ <…Vü©NÛºK<öX_Ã¥–²úu²îW IDAT.Ô'(Éá×hiƒéÌL Ò/çiõ›? ÌÆkŒÞcŠv,ÐÿX¹òrRRþ‹›H¤.q^“¼mÛ¢>L~ûv»ššbóß¾Ý_P•ɘu©§äƒä"ïj ë)EõhG!oß¾%eu .‘hB$ þ-I›6mɱ033CûOi ‹U&‘&`±2 @ ÕMÉZÂ!µ—¨Ž$IòÛJ½›Ü>u_\\Ìb±"##ÑDVçåå‰dUyyyëÖ­>|¸HÖ&RžhÐA"<:$ÉR‘{®®®h‡ «¢¢¢D¸¶aÆÁc!B¢=:ÄÀÛVAÈtѤ¦ó’ÃËx\y¤A$y]4©Óh_BKî/Ϩ+†¥÷ H>ñØüâ(y]4© Vs‰²Å`@´kÚ›åh‡AèeÄUF:¥ÂÉa%¬‹&€šqÆyë~è.zº)‡Iá ‘¸`0˜¬¬¬7÷õõµ·ÿorßC‡a0˜ììlþ……… &!!¡q“¬¬¬Oݘ‘‘1}útMMM''§ïß¿ \¬•MtfëbÕÉÁ_C%%¥‘#G~ûö­“QµkwÉÖÑùu§R€j×™‚LJtݤÀâ0v« '²(ù\wgñ/r*툤ј1c¾~ýÊ`0ø?>{ö ‹Å>}ú”ÿcbb"‘H6lXã&[¶läääèèè¿­ÂÂÂ#F¿xñâÑ£GÝ»w5jTZZšˆþyðþýû’’’’’’ääd++«ùóç#’z~Y¶ŽNÙwZùšS;þý ‘€CŠÙ8 ýª¯öäÑÈ,]ŸînÊÑÑ‘ÍfùòÅÁÁÁ`¼yóæ?þxúô©——àÇC‡URRjÜDGGçàÁƒWYY)ü¶‚‚‚Μ9Ãÿ2;pà@ …rèС+W®ˆôo’aºººƒÃ‡ëëë“Éd=== lZ¶ŽÎ·K¥úýU íTѤËéÒW* ”´ð“ÿîa6FþëÍa0˜‹/öêÕKWW÷àÁƒ×®]377'‘H»ví fkk«®®>nܸ¸¸8 £¯¯ß«W¯ÄÄDÀ»wïLLL<==Ÿ?Îáp‰‰‰£Gÿß­ñüùóîÝ»_¾|™Þá_ÁðO‚6›½iÓ&}}}==½M›6±ÙìÆ­Þ¾}ûüùó5kÖ4î9zôèúõë\.÷È‘#ÖÖÖjjj#GŽüøñ#¸¸¸*++ò3™LèÀh¾@$I¤˹7ß½@ÐþiiOÊÓѩή/x[Ûo±¾Ä¶ýå'ú¡Nˆˆˆæ233^»¹¹Q(”óçÏæÍ›G¡PΜ9¨¨¨8w±q||<™L~úôi=øë÷öövrrBdóæÍ«V­b³Ù‰‰‰õõõD"ñÉ“'‚dff¦NúâÅ ~GÛ ‘:tÈÙÙ¹   99yРA[·nmܪ²²‹Å–––ò®kAàà`==½ØØØß¿?xðÀÈÈ@¡PˆDâ²eËŠŠŠÂÃÃåååM6Ú WWWWW×víóVvrDDD›Ëtò@¾}ûÆß'ÅÅÅ>>>K—.mXóÝ+pÿÜ“›ËîÑy嚊ð:Öê˜TdXÇ’JRR‚ ,«ÉëÌÌÌ>}ú\¿~½¡á7øë¿uë–žžÇ4hPTT‚ ÎÎÎ{÷îMLLÄápüÓ ÿd‘œœŒ4Ê%MÎ 666%%%ü×OŸ>0`@ãVÅÅÅþÚÿ½O€ ˆµµõåË—VÅïra2™éééT*•Ëå¾zõŠÿWÈJRéÀhòPUU5--­a±æ»Wàþ¸'6—Ñ£C-ežšôënEÚBï©´œF×µ•«-jjjÐä5 ;;»OŸ> KÚÚÚò_Œ=º¼¼üÓ§Oß¿;v,`Ò¤I×®]SSS4n…ÅbÇöìÙÆMøWc33³ÆXùq2ŒyóæmÚ´))))$$¤£·Ôié@4¦¬¬¼dÉ’ÔÔTäÿ¯šï^ûGàžØœÿ¾Ì¢*®¯‡ŽG£&•Ö TyÞú÷çºH§´ü—µh‡#v¾¾¾›7o~òäIeeå‹/îÊŽ3æþýû&Làÿhnnnnnß$©D¥Rù/æÎ»mÛ¶üüüäää)S¦œ>}ºÉ’AAA×®]Û²eKrrò·oßöîÝ{îÜ9þIÍËËkÓ¦MwïÞ---ß½{7€Éd²X,"‘È`0öìÙ¨«“‡9¤[9©««×ÕÕµ²{î{R`ó&›ƒG ]n²†Íà¾?\xÖî˳Í9õµl´ÃùOÇî©´òšËå?~ÜÒÒ’D"M™2åîÝ»ºººünÞ¼ xüøqÃj}}}±XlMM ÿÇÆ}å ¯Ùl¶ƒƒƒªª*ÿ} …²téRMMMmmmOOOÖ¼‡=))iüøñêêê666þþþT*µÿþ‚p8œ#GŽôèÑCEEeøðáüïÑ‚kii™˜˜„„„¸¹¹éééÉÊ=•ˆÆK"ÂårÕÕÕsssù?6ß½ˆ ýÓÒž”ã£I’œÏü(BÅ)¯÷ð8ˆÃŽî¦Ž$´Ã€ÈÈHÑ>ûgbbÒ¿þ111_¿~Õú¥Í¼yó"™ƒÁDDDðWØy]í@$£Iìþ–±½úœ6†ƒU‹ÞSÐŽE\’““=<<’’’ètú‡víÚµbÅ ´ƒêŠà€dýÕŠ$ü¸ s„‡vb³yóf:îääD&“-,,–-[¶jÕ*´ƒêŠà€dL*톑߫;<ˆv ]<íõûS]ÎÓê›M`ùHÔÉï ‚ ®ÇAÞ)¢W°aF‘0©ˆFZ4¹ôí( ¨+úv©´®˜9l}7´€IE4P”H¹¿"ãíþV]—xL‚¤DU&ãë…Ò!¾FêÝÐŽ&ÑÀ€IÇ,'[¾£Üšõãgl€ã´!Hü8 Þóm¹z}Tz/DñHðF½È˜:’Œ‡¨%/y{ 0+¾jÔŽî$SE lwâĉØJg0™ 8ocnMÁÐéÊ**4ÉDHIIqttÕÚÏ;'ªµµ®¾^±¦FCM­®ÍÝÅb@ˆD¶d!aŽÎ«½ù,*wÆYk9>#s`R%¼vèjc“¤7A·=~Í8g¥c#Æb”ööö ,àr¥½ÃíÇ`k[©¦Æje±º:B^žžŠ Û¢–DbJ 0GGGQ=®¸~ýúÂÂB‘¬ªl6–LV.-U¡Óñmm¼¦&±•… ÔKKU ¨––²Wd¨Í£óûs]îóê)'{(iÁó˜OÔ‹—…üºWa3G‹ƒÃQÀ¾}wÃÂ^b±˜\-ÑÒb‚Œu0'§̰a³ûõ3‘dœR‹Ãá%$¤_¿þáùó Ýc0[[£øø X¬€0&“sîÜËãÇŸÔ×s¹sgõС’[J’¨†ƒàÜŽÒ&HìâãS–-»‚Åb¦Oïÿ×_nJJ‚¿__¿ž¸uk4—ËÃá°\.oøðþ9ÇÖÖHÂKþɉŽþ›Ä`°p8,‡óïU)‹yôh}ß¾MÇ;q¹¼›7?<ø°¶–Îåò°XŒµµÁ‹›%8ÔuÁ¤‰]Eµ_¿]ü×x<ÖÂBïêÕÝ»k7_²¾žÝ¿ÿúÿ_Çår§Ní·k×,SSËË+2¹.2òŸ7>ææ’ùùµño Ü‚ö‡¹6iõôiêž=wòó+€°Xìέ\BÈÁ¤"iE‰c{5Œ ^ 96xðÞß¿kø¯ñx¬’ñܹ%ŽŽ=›/xÿܹWlö7Šðx‚ óçݲeš®®š„"FϦM‘‘ÿp¹bÖæ ¨¨(~ø°C[û¿nŸ´´ß»wß~ÿ>«IRV&~ÿ¾OE޵…$Ž™¨ºbÖãuÙ·Ý–|éZOJŽi…Çãø¯9Æ\¸ðÌéÓÏ›/¹t©÷?_Ì9.—Ë‹Šú4tèŸAAq ×1òª°°šÃAxÀ¤"i$SÅ©§{L[55ÅðpOE\³¡ƒ\.røð¼†_.¼a0ØÍÓ ‹Åôë×­woc±‡+<6òlKÎ#¿,.Kž½|€Ifã4\£m®4H‹&GÌNeTÉÞ³iíbmm ¤$`úz.—›Mž:5øû÷ÿòpp°¶¶Öo>XÇ)+ïÞ]co/Ÿdtï®íç7 ÿí<7þÐÆÃ¬7®W£>CŒ’a×®™#‘”££}¦LéÓ<««+Μ9@"ÁŠ‹$ìÌ+ûN›ü—…vO%´ÃÚ“ Ê5ð6stÐŽBFŒ°l¸Wÿÿ0X,fȳׯ·9;nü‹¹síßa&ñŠŠ„1czZ[H$XÔ ²k×í-[¢öì™}åÊŠ¥KGápX 6mšª©©Òdy"8WSS¥ñ5 €swÞü¾”Ìá0yO7ä¾£L9a©ß>ä(`R$dð`óÆwJ¼Š ñøq·˜?ssÝ& +*þøc$ÿ´H à,-utM MhÐ’Åfsýýo\½úîï¿®XáØ»×iäH+€¥¥Þ’%Í›”•ÕÎ{J[[uË–©Ì¿ÝeOžM©¯æÄ­È §Òfž·63ŠÌ€IEJ!<ðõBi}MEeÈ A¦ü^þWï1cz2l%%"¦…N±E‹Fp¹< Ó§qLŒßœ9ƒvîœt?>>E¢qK •Êôð8ŸîÙp݆ÇcÏž]2aBïà`·æãÁÊËëœOãñب(ÿ‰ÁÁ p8€Á€aÃ,åàYQF›ÍàM³Òé%ÆzÈÁ‡¥Tmóþò .‹7`™AïºxyHÿrrÈ::*AAÎ3gسçNDÄÇ'O6 |º°zõõÚZzXØÊÊÿ–uÙ¶-:"âŸØX?9»³RQA]¼ø\QQÕÕ«+…üÓªªh®®§ vLŒ¯¡¡ÿÍ/Ò==/‡†.ž8±·8ã•„'ϳwË+˜T¤‡ÁK¾^öýbQ 7`™ÍYúréÒ›¬,ò–-SÕÕ•,gúô¿ÜÝ»k„¼Àfs=<Îfd”=|¸¶áL*ëòò*ÜÜÂ0ÌÍ›^B^aÔÔÐ]\NS©ÌØX?#£ÿÙl6Wî¦@² &iW_ËI½EN /Ç)`úyè÷v““«¾ŒŒÒ©SûøŒÝ°aŠMªªhÓ§×ÕUŽö!e¾æyJJÑ¢EgõôÔÃÃWéé U„¦¶–îêR[ˈõ36Öw„Ô.¸€€´c€ZƒWÄ V³š®Å¨æ¤F­gh+¨ÉÏ÷PmmUIyÿþ¸aÃ,ML´„i¢¤Dtt´>yòYAAÕäÉ}Ä¡X½|ùÓÃãlÿþ&7n¬ÒÔêΕÊtw?SZJ‰Žöm©Û‚P¯Td “ÂUP—ŸŒÒ`É’ ?~=¾‰Dö–ìë׿<<ÎnÛ6ÃÛ{¬XcŸ;w’üýoL›ÖïÄ w!;¬ø5Ó *cbü,,š™“],÷×ʾ õ€l÷ïBÀÑ_²E.3 8x—ËÛ´)Rø&ŽŽ=wì˜tÿÙ³4ñ&>!!/|}×/²HÈŒR_Ï^ºôb~~Et´¯·ÁáðV¯ô(ùÂ…eS¦ô²UM }Á‚Т¢š˜?C±F(aFCÔ¬gjUäsàI»¿äSUCÕ€HT•ÉíöíÑQQŸãâÖ ŸWY¾üRrrá“'µ´¤+•²Xœ•+/¿ŸuåÊŠ#zÙªªŠ¶`AhU-2ÒGžÆzAr&Hê°Ù\—Ó••ÔGÖ«© Û=R[KŸ<9¸G½«WW6Ÿ_-L&gÅŠ‹ÿü“{õêJáç++«7/”ÍæFFútë&×^Ô8¤¸kaR¸lº´Ï^L àÂÂ×Ö2Ö¬¹.ü—I9,lñÛ·™'O>kx£јîîg’’ "#}„Ï(¿×8;ŸÆ`0·o¯–õŒÂã ¿?ס$QðžJ×’t¶$ag«Ž«i©DP–ÞÎ155Åþý»>üHI‰(ü'’ººRPÐýÁƒÍLMQžúŒJe.Zt63³ìÖ-ï~ýº Ù*/¯ÂÙù”²212ÒGOO†ˆÊ’iOÖfÿŒ©°uÑÅÉQÁ:¨u0©t-úýT•µ ¿îV~ýMN£“LTô¤ôñŽîݵÜ¡C‡ ë!dY0ÀÀ¦99äÐЄ9sìTUQYTSCŸ??´¨¨&:Ú·W/aï±ÿúUêârJ_Ÿ壥%ÃÓRÕ×pÞî/HC¤§—̘ñ×Ò¥;wÎkxÍÕÔÐÝÜÂÈäºvÚJJÊww?Û·¯ñåË+d¥4@sô ö#¿¬šœz›9:vÞ†Šð¥+‚IL GA]z?ÿéé%3gþåæ6ìÏ?çßêÊ•w;vÄ\»æ9v¬øbk‚B©Ÿ??¤ªŠå#|]úoß ÜÝÏZ[ë_½ºRøÑnRáN÷œ­­a&ÃÔI0©@2àæÍ7F†…-ž9s€ð­¼½¯¾{—ùìÙf!'¿ê¤šº«k•Zë'ü¬”¯^ýZ±â’ÙÅ‹Ëd÷‚À!P‹’¯–‘ÓèhGnnÃÜ݇­]{39¹PøVÇŽ-PWWòö¾ÂåòĬ…ˆŽö>£„‡'zxœurtýº'Ì(|€IŒÃäå<«¹³èçýå¹ÏkÊW´¸88X-\x&/¯BÈ&ÊÊÄEŸ?ç……%ˆ56þÜYÅÅ5ÞÂ׉9v,~Ë–¨µk'>ì*|MiÀað²ã«ÑŽ’R°û jMÙwjÊò¼µª„Þóõz:i£Xú…JeΞý7—‹Ü»ç¯®.l¯ý‰ÏŽ}tçÎ1•›¬¯g/^|>3³46ÖÏÜ\¨;ó<²kWì•+ïþüsÎÒ¥£Ä•˜pêy?c+¾]*c3¸®Q¶ª†ðê j &¨mu¿Y©å¿îT"<Ä~m·^Ψ=WXXX5cÆ_}ú_½ºRÈo÷<²`AhQQõ“'UUD‹Åùãóii¿cbüzôjî,&“ããsõÅ‹ôÅS§ [\ul:7-²"åz›Î³™«3`©¾’œS &HXl:/ëa•–•’~4+6~ûVàì|zñâ{ö̲IAAå¤IGçεۿßE„‘°ÙÜU«®|ü˜åckk$L ¥~ùò ))E.,9RØâ’èbR¸©·ÊÜ$#\ÄÖU·»ž’–ôŽ„PŸ¨‡„…#`tm•U Pîñ00 YXèîÝ{OWW­ašHÊݺiÅ Ð]T9ž·÷Õ÷ï³##}z÷6¦Iiií¼y!¿×FEùJóÔ/MÔæ3?/°Ì`l ¹‰ƒ:AI–nÿ@’¯T @xHéWªá 5‰=–ôhüɓϮ_÷tpv://¯+?æ$$lÑÐPîäÖy$…`R$QÅ©øIï6LM„ÅöïÝûæãsuëÖé~~ã…Y~éÒ ii¿¶y“ãõë_‹[¾|ÔîÝm?SUE[²äBFFéùóK„œ&a¥_©:¶Êð<$rð9HÒ ^×>ÛœûóvE}GE(’i{ö4ÐÖVÝ»÷®‘©oß¶çî:Ô",,Á`;:¶}Òÿõ«ÔÃãܸq½žßf[NÙÅåt]]}d¤4<Œ‚ð1«±xéꑃäL*¤iõPê½@OIŸý¤úshIî³j6§n¢@PîTU±º×ÖÒ{Ü¿¿I›5¸ÔÔñxÜß?5k@ë#ÇÊÊ(..§­¬ô/\X†Ç·á—/ùîîa*‘‘>ff¨³PKYYñU‰G‹ª2&#…4‚:vAèA@IRݯ{•¹Ïj2=̺“`x<Äßÿƃ߯]ól³ —Ë›<ù˜––Jd¤OKËP(õ³gÿÅbïÞ]Ófݰ¨¨O›6EŽßëÄ wR]13÷yMγr „3Ÿ a=SÛp OwɘT ô±hÜœ§ÕVÓ´:?ú¨!¯„‡{ŽÑF^ùô)×Ééä¥KË&MêÓü·oñâsiiÅqqëºukíé 6›»cGÌœV¬pìÔÐQŒ*NüꬊŸt¢ ÎÄAÝþÛ¥­oIDATl¬†ÉHõN^üAPÀ¤É.—ççþôi꫆µh}aoï«ß¿¾|¹¥ùC$7Fܹ“ëׯ_kÆ**¨+W^JO/ Y4n\¯ÎFßaøx¢Øhˆšñ5,Þ,P“ $¾¾¾õõõ\.Ǽ[Q­kW+Áæçwçpð––Y­ßYg³‰™™=ºu+VW¯mü>‹EÌÎîadô›Dªi}[yyæl6ÑÄ$_Q±³l»(**ž>}º{÷î’Ü(µ &H,"##çÏŸ?f̘N®GƒgXƒ-é@CÃå f›Kr8D<ž%è}<ßv3&Sçàp’¨xÖØË—/#""æÍ›'áíBP뤱n$7öìÙƒvrëåË—h‡AÀGŸ ‚ ‘I‚ ˜T ‚ ‘I‚ ˜T 4;¶¸¸X´kh×:‹‹‹ÇŽÛ™+**ÚºuëÌ™3çλsçÎìììönT´ñ@äÁ¤A‚•””ÌžÝvMâååå¾¾¾ºººÁÁÁ‡Ò××_³fM~~¾ø"„ )‡C`<B¡¿|xxxß¾}ׯ_ϯ leeE£Ñnܸ±mÛ6±ÅAR&HZŒ;vóæÍ·nݪ­­7ožŽŽÎ¥K—(г³ó²e˹ÿ~ll,™LîÙ³§««ëöíÛZYaqq±‡‡G```XX•J7nœ——‡‹ŒŒ|ðàAee¥………““áÄÄÄ‹/ª¨¨8;;/\¸ÐÇÇ0wîÜØØX‡Ã9þüãÇ“'O^±bEYY™‡‡Ç±cÇ:´sçΤ¤¤ 64®3ïíí]QQàñxBnT<»‚$&HŠ|ùò%44ôåË—GŽ3fÌ… ^¼xqìØ1—7oÞ\»vmóæÍÖÖÖYYYÇrwîÜ9pà@]]]PPººº²²rDDÄúõëmmm³²²Ž9 Óé»wïž8qâ¾}û4mÚ´~FDGG—””œ9s†J¥•Ö‡ü¶Kbb¢žž^CÒëׯ¯]»vîܹVšð‡‹0©2vìX8Ÿ $…àè/H6äääeff2™Ì´´´‹/NŸ>í  j vA²aÁ‚õõõ;w©144œ:uêÌ™3[o¢¢¢Òæ2‰L*lÀápË—/_¾|¹ðM444Ö¯_/¾ jvAA"“ A$20©@A"“ A$2ðF=$Fqqqh‡ADÁ¤‰…±±1‡;vìÚÈ-Ç/DAR>QA‰ ¼§A‰ L*AÈÀ¤A‰ L*AÈü>wyzaÁ˜IEND®B`‚pktools-2.6.6/doc/examples_pkstatogr.dox0000644000113200011300000000051012400110722015301 00000000000000\section examples_pkstatogr Examples of pkstatogr \code pkstatogr -i input.shp -f FIELDID -n 100 \endcode report histogram of values in FIELDID (to standard output) \code pkstatogr -i input.shp -f FIELDID -min -max -mean -stdev \endcode report min, max, mean and standard deviation of values in FIELDID (to standard output) pktools-2.6.6/doc/examples_pkdsm2shadow.dox0000644000113200011300000000051412431401630015702 00000000000000\section examples_pkdsm2shadow Examples of pkdsm2shadow Create a shadow mask for the input raster dataset dsm.tif, using Sun zenith angle of 10 degrees and a Sun azimuth angle of 135 degrees (South-South-East). All shadow pixels are set to a value of 1. \code pkdsm2shadow -i dsm.tif -sza 10 -saa 170 -f 1 -o shadow.tif \endcode pktools-2.6.6/doc/apps.dox~0000644000113200011300000000470012647442674012566 00000000000000\section available_tools Available tools - \ref pkann classify raster image using Artificial Neural Network - \ref pkascii2img program to create raster image based on ascii file - \ref pkascii2ogr program to create vector points or polygons from text file - \ref pkcomposite program to mosaic and composite geo-referenced images - \ref pkcreatect program to create and import colour table to GTiff image - \ref pkcrop perform raster data operations on image such as crop, extract and stack bands - \ref pkdiff program to compare two raster image files - \ref pkdsm2shadow program to calculate sun shadow based on digital surface model and sun angles - \ref pkdumpimg program to dump image content to ascii or std out - \ref pkdumpogr dump ogr file to text file or standard output - \ref pkegcs Utility for raster files in European Grid Coordinate System - \ref pkextract extract pixel values from raster image from a (vector or raster) sample - \ref pkfillnodata program to fill holes in raster image - \ref pkfilterascii program to filter data in an ASCII file - \ref pkfilter program to filter raster images - \ref pkfilterdem Filter digital elevation model raster datasets - \ref pkfsann feature selection for artificial neural network classifier pkann - \ref pkfssvm feature selection for support vector machine classifier pksvm - \ref pkgetmask program to create mask image based on values in input raster image - \ref pkinfo Report basic information from raster datasets (similar to gdalinfo) - \ref pkkalman1 - \ref pkkalman produce kalman filtered raster time series - \ref pklas2img Rasterize LAS/LAZ point clouds with filtering/compositing options - \ref pkoptsvm program to optimize parameters for support vector machine classifier pksvm - \ref pkpolygonize program to make vector file from raster image - \ref pkreclass program to replace pixel values in raster image - \ref pkregann regression with artificial neural network (multi-layer perceptron) - \ref pksetmask program to apply mask image (set invalid values) to raster image - \ref pksieve program to sieve filter raster image - \ref pkstatascii program to calculate basic statistics from text file - \ref pkstat program to calculate basic statistics from raster dataset - \ref pkstatogr program to calculate basic statistics from vector file - \ref pkstatprofile program to calculate statistics in temporal or spectral profile - \ref pksvm classify raster image using Support Vector Machine pktools-2.6.6/doc/examples_pkascii2img.dox0000644000113200011300000000405212431401630015477 00000000000000\section examples_pkascii2img Examples of pkascii2img We create a 5x5 raster dataset containing all 0 values except for its center (value=1) \code cat input.txt 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 \endcode We define a pixel size of 25 by 25 m and and a projected in the European projection system ETS89/LAEA. The location of the upper left pixel is also set: \code pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000 \endcode We check the output GeoTIFF using gdalinfo : \code gdalinfo output.tif Driver: GTiff/GeoTIFF Files: output.tif Size is 5, 5 Coordinate System is: PROJCS["ETRS89 / LAEA Europe", GEOGCS["ETRS89", DATUM["European_Terrestrial_Reference_System_1989", SPHEROID["GRS 1980",6378137,298.2572221010042, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4258"]], PROJECTION["Lambert_Azimuthal_Equal_Area"], PARAMETER["latitude_of_center",52], PARAMETER["longitude_of_center",10], PARAMETER["false_easting",4321000], PARAMETER["false_northing",3210000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","3035"]] Origin = (1000000.000000000000000,1000000.000000000000000) Pixel Size = (25.000000000000000,-25.000000000000000) Metadata: AREA_OR_POINT=Area TIFFTAG_DATETIME=2014:11:08 11:33:52 TIFFTAG_DOCUMENTNAME=output.tif TIFFTAG_SOFTWARE=pktools 2.5.4 by Pieter Kempeneers Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 1000000.000, 1000000.000) ( 23d13' 9.44"W, 25d30'21.01"N) Lower Left ( 1000000.000, 999875.000) ( 23d13' 8.02"W, 25d30'17.24"N) Upper Right ( 1000125.000, 1000000.000) ( 23d13' 5.27"W, 25d30'22.72"N) Lower Right ( 1000125.000, 999875.000) ( 23d13' 3.85"W, 25d30'18.95"N) Center ( 1000062.500, 999937.500) ( 23d13' 6.65"W, 25d30'19.98"N) Band 1 Block=5x5 Type=Byte, ColorInterp=Gray \endcodepktools-2.6.6/doc/examples_pksvm.dox0000644000113200011300000000247112431401630014440 00000000000000\section examples_pksvm Examples of pksvm Classify input image input.tif with a support vector machine. A training sample that is provided as an OGR vector dataset. 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 colourtable (a five column text file: image value, RED, GREEN, BLUE, ALPHA) has also been provided. \code pksvm -i input.tif -t training.sqlite -o output.tif -cv 2 -ct colourtable.txt -cc 1000 -g 0.1 \endcode Classification using bootstrap aggregation. The training sample is randomly split in three subsamples (33% of the original sample each). \code pksvm -i input.tif -t training.sqlite -o output.tif -bs 33 -bag 3 \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...) \code pksvm -i input.tif -t training.sqlite -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 pktools-2.6.6/doc/examples_pkkalman.dox~0000644000113200011300000000176112647444325015316 00000000000000\section examples_pkkalman Examples of pkkalman Assimilate fine spatial resolution NDVI time series acquired at (100 m) with median spatial resolution NDVI time series (300 m). Both time series have temporal resolution of 10 days, but fine spatial resolution data are sparse due to cloud coverage (missing data characterized by -obsnodata 255). Coarse spatial resolution data have occasional cloud cover too (-modnodata 255). Run the kalman filter in forward mode only. \code pkkalman -obs fine.tif -mod coarse.tif -obsnodata 255 -modnodata 255 -dir forward -ofw fine_filled.tif \endcode Same as above, but run in forward, backward and smooth mode. Write uncertainties of predicted time series as fine_forward_uncert.tif. \code pkkalman -obs fine.tif -mod coarse.tif -obsnodata 255 -modnodata 255 -dir forward -ofw fine_forward.tif -dir backward -ofb fine_backward.tif -dir smooth -ofw fine_smooth.tif -u_ofw fine_forward_uncert.tif -u_obw fine_backward_uncert.tif -u_ofb fine_smooth_uncert.tif \endcode pktools-2.6.6/doc/Makefile.am0000644000113200011300000000067112502310202012713 00000000000000if HAVE_DOXYGEN #directory = $(top_srcdir)/doc/man/man3/ #dist_man_MANS = $(directory)/man_page_1.3 $(directory)/man_page_2.3 #$(directory)/man_page_1.3: doxyfile.stamp #$(directory)/man_page_2.3: doxyfile.stamp doxyfile.stamp: # $(top_srcdir)/doc/createappsdox.sh $(top_srcdir) $(DOXYGEN) Doxyfile echo Timestamp > doxyfile.stamp CLEANFILES = doxyfile.stamp all-local: doxyfile.stamp clean-local: rm -rf $(top_srcdir)/doc/html endif pktools-2.6.6/doc/faq_pksetmask.dox0000644000113200011300000000132212400110722014220 00000000000000\section faq_pksetmask Frequently asked questions about pksetmask Q1. I want to mask my input image (a byte image with values between 0 and 254) with a mask that only covers a spatial subset of the input image. Within the spatial subset of the primary mask, all pixels must be set to 0 where the primary mask equals 1. Outside the spatial subset I want to set all pixel values to 255. A1. This can be done using two masks, selecting the input image as the secondary mask. Choose the secondary operator acting on the secondary mask such that the condition is always true (e.g, < 255 ). \code pksetmask -i input.tif -m mask.tif -t 1 -f 0 --operator '=' -m input.tif -t 255 -f 255 --operator '<' -o output.tif \endcode pktools-2.6.6/doc/examples_pkcreatect.dox0000644000113200011300000000152012431401630015417 00000000000000\section examples_pkcreatect Examples of pkcreatect Attach a color table to image with values between 0 and 50 \code pkcreatect -i image.tif -o image_ct.tif -min 0 -max 50 \endcode Attach a 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 -min 0 -max 100 -l legend.tif -g \endcode Attach a predefined color table to image.tif. The colortable has 5 entries for the values 0 (black), 1 (red), 2 (green), 3 (blue) and 4 (grey) \code cat colortable.txt 0 0 0 0 255 1 255 0 0 255 2 0 255 0 255 3 0 0 255 255 4 100 100 100 255 \endcode \code pkcreatect -i image.tif -o image_ct.tif -ct colortable.txt \endcode Remove the color table from an image \code pkcreatect -i image.tif -o image_noct.tif -ct none \endcode pktools-2.6.6/doc/examples_pkascii2ogr.dox0000644000113200011300000000105612431401630015513 00000000000000\section examples_pkascii2ogr Examples of pkascii2ogr 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). \code pkascii2ogr -i input.txt -o output.shp -x 2 -y 1 -n id -ot Integer -n label -ot Integer -a_srs epsg:4326 \endcode pktools-2.6.6/doc/Doxyfile~0000644000113200011300000023414512501537243012607 00000000000000# 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 = # 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 = "Processing Kernel for remote sensing data" # 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 = doc/logo.png # 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 text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. Note that you specify absolute paths here, but also # relative paths, which will be relative from the directory where doxygen is # started. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, # and language is one of the parsers supported by doxygen: IDL, Java, # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, # C++. For instance to make doxygen treat .inc files as Fortran files (default # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note # that for custom extensions you also need to set FILE_PATTERNS otherwise the # files are not read by doxygen. EXTENSION_MAPPING += dox=md # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented classes, # or namespaces to their corresponding documentation. Such a link can be # prevented in individual cases by by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES (the # default) will make doxygen replace the get and set methods by a property in # the documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. #SYMBOL_CACHE_SIZE = 0 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if section-label ... \endif # and \cond section-label ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. Do not use # file names with spaces, bibtex cannot handle them. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. 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 # also the default input encoding. 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. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page (index.html). # This can be useful if you have a project on for instance GitHub and want reuse # the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = YES # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C, C++ and Fortran comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = doc/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If left blank doxygen will # generate a default style sheet. Note that it is recommended to use # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this # tag will in the future become obsolete. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET # since it does not replace the standard style sheet and is therefor more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of # entries shown in the various tree structured indices initially; the user # can expand and collapse entries dynamically later on. Doxygen will expand # the tree to such a level that at most the specified number of entries are # visible (unless a fully collapsed tree already exceeds this amount). # So setting the number of entries 1 will produce a full collapsed tree by # default. 0 is a special value representing an infinite number of entries # and will result in a full expanded tree by default. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely # identify the documentation publisher. This should be a reverse domain-name # style string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and # SVG. The default value is HTML-CSS, which is slower, but has the best # compatibility. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. # There are two flavours of web server based search depending on the # EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for # searching and an index file used by the script. When EXTERNAL_SEARCH is # enabled the indexing and searching needs to be provided by external tools. # See the manual for details. SERVER_BASED_SEARCH = NO # When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP # script for searching. Instead the search results are written to an XML file # which needs to be processed by an external indexer. Doxygen will invoke an # external search engine pointed to by the SEARCHENGINE_URL option to obtain # the search results. Doxygen ships with an example indexer (doxyindexer) and # search engine (doxysearch.cgi) which are based on the open source search engine # library Xapian. See the manual for configuration details. EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will returned the search results when EXTERNAL_SEARCH is enabled. # Doxygen ships with an example search engine (doxysearch) which is based on # the open source search engine library Xapian. See the manual for configuration # details. SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the # SEARCHDATA_FILE tag the name of this file can be specified. SEARCHDATA_FILE = searchdata.xml # When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple # projects and redirect the results back to the right project. EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are # all added to the same external search index. Each project needs to have a # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id # of to a relative location where the documentation can be found. # The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # managable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES pktools-2.6.6/doc/installation_windows.dox0000644000113200011300000000637012642750444015675 00000000000000\section installation_windows Installation on Windows machines \subsection installation_windows_dependencies Dependencies: OSGeo4W and Visual Studio redistributables Download and install the ​32bit or ​64bit (preferred) version of OSGeo4W. The basic installation with GDAL contains most dependencies that are required for pktools. Download and install the ​redistributables for Visual Studio 2015. Please make sure the latest version of pktools is always installed. Changes with respect to the previous versions can be checked in the text file Changelog. Older versions of pktools were installed with a setup exe file. They should be uninstalled first via Programs and Features in Control Panel. \subsection Installation_windows_binaries Binary packages of pktools Binary packages of pktools are available for Windows on the ftp server. Latest versions are only available for 64bit architectures. Older versions of pktools are also available for 32 bit architectures Unzip the archives to your local hard drive. Then copy the pktools folder in the OSGeo apps directory (e.g., "C:\OSGeoW64\apps") \subsection Installation_windows_cmake Manual installation via cmake If you prefer to compile pktools yourself, the easiest way is to use CMake. First, install CMake on your machine (version 3.0 or higher). These dependency packages must also be pre-installed: Armadillo and NLOpt (for the utility pkoptsvm only). Set the source directory in CMake to the pktools directory. Build out-of-source by setting a "build" directory, where binaries will be created. Specify the generator for building the pktools (e.g., Visual Studio 14 2015 Win64 for 64 bit architectures). You can leave the default native compilers checked. Add the OSGeoW64 and armadillo paths to the CMAKE_INSTALL_PREFIX (via the button "add Entry"). Other paths for dependencies on FANN and NLOPT should also be added here. Click on the "Configure" button. Under "BUILD" you can now select extra utilities based on FANN, LIBLAS and NLOPT. Click again on "Configure". Make sure all dependencies are resolved. Then press "Generate". A Visual Studio project (PKTOOLS.sln) will be created in the build directory. Open the project in Visual Studio and build the solution. \subsection run_windows How to run pktools in Windows The pktools utilities can be run from the command line using the OSGEo4W Shell. A selection of them can also be run from within \ref qgis_plugin "QGIS", via the Processing Toolbox. To run the pktools utilities from a simple Windows cmd shell, you first have to set some environment variables. This can be done by executing the batch file o4w_env.bat, located in OSGeo4W64\bin from within the cmd shell.pktools-2.6.6/doc/examples_pkdumpimg.dox0000644000113200011300000000107612431401630015275 00000000000000\section examples_pkdumpimg Examples of pkdumpimg We create a 5x5 raster dataset containing all 0 values except for its center (value=1) \code cat input.txt 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 \endcode Use \ref pkascii2img "pkascii2img" to create an raster dataset from input.txt \code pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000 \endcode Dump the image content of output.tif to screen \code pkdumpimg -i output.tif \endcode \code 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 \endcode pktools-2.6.6/doc/examples_pksetmask.dox0000644000113200011300000000475612400110722015305 00000000000000\section examples_pksetmask Examples of pksetmask \section single_mask Using a single mask With a single mask you can provide as many triples (--operator, --msknodata, --nodata) as you wish. All operators work simultaneously on that mask. Caution: the first operator that tests true will be selected. This is explained in the next example: \code pksetmask -i input.tif -m mask.tif --operator='>' --msknodata 0 --nodata 0 --operator='>' --msknodata 10 --nodata 10 -o output.tif \endcode Warning: second operator will never test true as first will supersede! \code pksetmask -i input.tif -m mask.tif --operator='>' --msknodata 10 --nodata 10 --operator='>' --msknodata 0 --nodata 1 -output.tif \endcode OK: values above 10 will be 10, values between 0 and 10 will be 1 \section multiple_masks Using multiple masks With multiple masks, you can use one triple (--operator, --msknodata, --nodata) for each corresponding mask (following the same order of input). If the number of triples is not equal to the number of masks, then only the first triple is used for all masks simultaneously \code pksetmask -i input.tif -m mask1.tif --operator '>' --msknodata 250 --nodata 1 -m mask2.tif --operator '>' --msknodata 100 --nodata 2 -o output.tif \endcode If mask1.tif is above 250, the output will be 1. If mask2 is above 100, the output will be 2. If both operators test true, the first will supersede (output will be 1) \code pksetmask -i input.tif -m mask1.tif -m mask2.tif --operator '>' --msknodata 250 --nodata 1 -o output.tif \endcode If either mask1.tif or mask2.tif is above 250, the output will be 1 \section more_examples More examples \code pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte --msknodata 0 -nodata 255 \endcode copy pixel values from input.tif to output.tif, applying mask.tif, setting all values to 255 where mask is 0. \code pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte --msknodata 1 -nodata 255 --operator '!' \endcode copy values from input.tif to output.tif, but set all values to 255 if mask is not 1 \code pksetmask -i input.tif -m mask1.tif -m mask2.tif -o output.tif -ot Byte --msknodata 0 -nodata 255 \endcode Application of two masks. Copy pixel values from input.tif to output.tif, setting all values to 255 where either mask is 0. \code pksetmask -i input.tif -m mask.tif -o output.tif -ot Byte --msknodata 0 --msknodata 1 -nodata 255 -nodata 255 \endcode copy pixel values from input.tif to output.tif, applying single masks, setting all values to 255 where mask is either 0 or 1.pktools-2.6.6/doc/examples_pkdiff.dox0000644000113200011300000000055212431401630014541 00000000000000\section examples_pkdiff Examples of pkdiff Check if two raster images are different (reports only if images are different or not) \code pkdiff -i input.tif -ref reference.tif \endcode Validate a classification map using points from a reference sample and report confusion matrix \code pkdiff -i classificationMap.tif -ref referencePoints.shp -cm \endcode pktools-2.6.6/doc/examples_pkfilter.dox0000644000113200011300000001323512616136637015141 00000000000000\section examples_pkfilter Examples of pkfilter \subsection examples_pkfilter_spatial Filtering in spatial domain Filter input.tif with morphological dilation filter. Use a circular kernel (instead of rectangular) of size 3x3. \code pkfilter -i input.tif -o filter.tif -dx 3 -dy 3 -f dilate -circ \endcode Similar to previous example, but consider only values of 255 for filtering operation. Typical usage: dilate cloud values in input image that are flagged as 255 \code pkfilter -i input.tif -o filter.tif -dx 3 -dy 3 -class 255 -f dilate -circ \endcode \subsection examples_pkfilter_spectral Filtering in spectral/temporal domain \subsubsection examples_pkfilter_spectral_moving_window Applications with moving window Calculate the median value for each pixel, calculated on a moving window of width 3 (-dz 3) over all input bands. The output raster dataset will contain as many bands as the input raster dataset. \code pkfilter -i input.tif -o filter_stdev.tif -dz 3 -f median \endcode \subsubsection examples_pkfilter_spectral_statistics Applications of statistical functions in spectral domain Calculate the standard deviation for each pixel, calculated on all input bands. The output raster dataset will contain a single band only, no moving window is used (-dz 1). \code pkfilter -i input.tif -o filter_stdev.tif -dz 1 -f stdev \endcode "Smooth" (interpolate) nodata in spectral/temporal domain (-dz 1), using a linear interpolation. The following interpolation types are supported: akima (default), linear, polynomial, cspline, cspline_periodic, akima_periodic (please check gsl page for more information on the interpolation types). \code pkfilter -i input.tif -o smoothed.tif -dz 1 -f smoothnodata -interp linear \endcode \subsubsection examples_pkfilter_srf Filter with spectral response functions The following two examples show how to use pkfilter for spectral filtering a high dimensional input (hyperspectral image) to a lower dimensional output (multi-spectral image). Notice that the input wavelenghts must be provided as -win value1 -win value2 -win value3 ... To save typing, we assume the input wavelengths are listed in a text file wavelengths.txt (single column ASCII file with all wavelenghts listed in nanometer). \code cat wavelengths.txt | while read W;do echo " -win $W";done \endcode In the first example, the hyperspectral image is filtered with a spectral response function. For each spectral response function provided, a separate output band is created. The spectral response function(s) must be listed in two column ASCII file(s) with the wavelengths and response listed in the first and second column respectively. The response functions can but must not be normalized (this is taken care of by the filter utility). In this example, the input is a hyperspectral image with N>>1 spectral wavelengths (bands). The output is a multispectral image with 3 bands, where a spectral response function is provided for each output band. \code pkfilter -i hyperspectral.tif -o multispectral.tif -srf srf1.txt -srf srf2.txt -srf srf3.txt $(cat wavelengths.txt | while read W;do echo " -win $W";done) \endcode The next example is similar to the previous. Instead of providing a spectral response function for each output band, you can also provide the center wavelengths and full width half max values. Here, a three band (red, green, blue) output image is produced. \code pkfilter -i hyperspectral.tif -o multispectral.tif -wout 650 -wout 510 -wout 475 -fwhm 50 -fwhm 50 -fwhm 50 $(cat wavelengths.txt | while read W;do echo " -win $W";done) \endcode \subsubsection examples_pkfilter_savgolay Applying the Savitzky-Golay filter to reconstruct a time-series data set The following example reconstructs a time-series data set based on the Savitzky--Golay filter, as suggested by J. Chen 2004. Input is a multi-band (Byte) raster dataset containing a noisy time series, e.g., a normalized difference vegetation index (NDVI) with cloud contaminated (low) NDVI values. Output is the reconstructed time-series data set, which approaches the upper NDVI enveloppe. Please refer to J. Chen 2004 for more details. \subsubsection savgolay_preparation Preparation Create a long-term change trend fitting (lta.tif) using the Savitzky-Golay filter. Choose the number of lefward (past) and rightward (future) data points (e.g., 7). The order of smoothing polynomial in the Savitzky-Golay filter is set to 2. \code pkfilter -i input.tif -o lta.tif -f savgolay -nl 7 -nr 7 -m 2 -pad replicate \endcode \subsubsection savgolay_initialization Initialization Decrease the number of lefward (past) and rightward (future) data points to 4. The order of smoothing polynomial in the Savitzky-Golay filter is set to 6. Valid data are from 0 to 250 (nodata is set to 250). \code pkcomposite -i lta.tif -i input.tif -o iter1.tif -cr maxallbands -max 250 -dstnodata 250 pkfilter -i iter1.tif -o savgolay1.tif -f savgolay -nl 4 -nr 4 -m 6 -pad replicate \endcode \subsubsection savgolay_iteration Iterative process (repeat, e.g., 5-10 times) \code pkcomposite -i input.tif -i savgolay1.tif -o iter2.tif -cr maxallbands -max 250 -dstnodata pkfilter -i iter2.tif -o savgolay2.tif -f savgolay -nl 4 -nr 4 -m 6 -pad replicate \endcode \code pkcomposite -i input.tif -i savgolay2.tif -o iter3.tif -cr maxallbands -max 250 -dstnodata pkfilter -i iter3.tif -o savgolay3.tif -f savgolay -nl 4 -nr 4 -m 6 -pad replicate \endcode \code etc. \endcode Output savgolay.tif is the reconstructed time-series data set.pktools-2.6.6/doc/examples_pkcomposite.dox0000644000113200011300000000315412535236670015653 00000000000000\section examples_pkcomposite Examples of pkcomposite Create a composit from two input images. If images overlap, keep only last image (default rule) \code pkcomposite -i input1.tif -i input2.tif -o output.tif \endcode Create a composit from two input images. Values of 255 in band 1 (starting from 0) are masked as invalid. Typically used when second band of input image is a cloud mask \code pkcomposite -i input1.tif -i input2.tif -srcnodata 255 -bndnodata 1 -dstnodata 0 -o output.tif \endcode Create a maximum NDVI (normalized difference vegetation index) composit. Values of 255 in band 0 are masked as invalid and flagged as 0 if no other valid coverage. Typically used for (e.g., MODIS) images where red and near infrared spectral bands are stored in bands 0 and 1 respectively. In this particular case, a value of 255 in the first input band indicates a nodata value (e.g., cloud mask is coded within the data values). \code pkcomposite -i input1.tif -i input2.tif -cr maxndvi -cb 0 -cb 1 -srcnodata 255 -bndnodata 0 -dstnodata 0 -o output.tif \endcode Create a composite image using weighted mean: output=(3/4*input1+6/4*input2+3/4*input2)/3.0 \code pkcomposite -i input1.tif -i input2.tif -i input3.tif -o output.tif -cr mean -w 0.75 -w 1.5 -w 0.75 \endcode Create a median composit of all GTiff images found in current directory that cover (at least part of) the image coverage.tif. Values smaller or equal to 0 are set as nodata 0 (default value for -dstnodata) \code pkcomposite -i large.tif $(for IMAGE in *.tif;do pkinfo -i $IMAGE --cover $(pkinfo -i coverage.tif -bb);done) -cr median -min 0 -o output.tif \endcode pktools-2.6.6/doc/examples_pkpolygonize.dox0000644000113200011300000000035512400110722016024 00000000000000\section examples_pkpolygonize Examples of pkpolygonize \code pkpolygonize -i input.tif -m input.tif -o ouput.shp \endcode create vector file from raster image (typically a classification image), based on pixel (land cover class) values.pktools-2.6.6/doc/installation_linux.dox0000644000113200011300000001407612634276310015340 00000000000000\section installation_linux Installation on Linux \subsection install_debian Installation for Debian Linux (via repository) A binary package of pktools for Debian is maintained by Francesco Paolo Lovergine and available in the repository. You can install it using the advanced package tool (apt): \code sudo apt-get install pktools \endcode The version in the repository might not be the latest available (please check the packages overview). The latest version of pktools can always be installed via the \ref install_ubuntu "installation script" or from the source code using a \ref install_manual "manual" installation. \subsection install_ubuntu Installation for Ubuntu (Debian based) Linux distributions (from source code via automatic script) Users working with Debian based distributions (e.g., Ubuntu) can download install_pktools.sh. This script will automatically download the latest release of pktools and dependencies. You need an internet connection when running the script (as root or sudo): \code sudo bash install_pktools.sh \endcode \subsection install_manual Manual installation for (all Linux distributions) For a manual installation, download the latest release from Savannah Optionally: check the release md5sum to ensure originality. \code md5sum pktools-latest.tar.gz \endcode The result should be identical to the content of the corresponding md5 file you downloaded. Unpack the tar zip file \code tar xzvf pktools-latest.tar.gz cd pktools-* \endcode You can install pktools via - \ref installation_autotools "autotools" (linux only) - \ref installation_cmake "cmake" (linux, windows, Mac OS) \subsection installation_autotools Installation via autotools Add libtool support to your package: If you obtained pktools from the git repository, please please perform the following actions first (assuming the current directory is pktools): \code libtoolize \endcode Remake the GNU Build System files by scanning 'configure.ac' and running 'autoconf', 'autoheader', 'aclocal', 'automake' and 'libtoolize': \code autoreconf \endcode Finalize package generation: \code automake --add-missing \endcode Basic installation (please refer to INSTALL file for more advanced configuration) \code ./configure make sudo make install sudo ldconfig \endcode \subsubsection pktools_installation_required Required dependences packages to install before pktools - g++ - make - libgdal-dev (see also http://trac.osgeo.org/gdal/wiki/BuildingOnUnix) - libgsl0-dev (see also http://www.gnu.org/software/gsl/) - libarmadillo-dev (see also http://arma.sourceforge.net/download.html) Example on how to install required packages in Debian based system (using apt-get): - sudo apt-get install g++ make libgdal-dev libgsl0-dev libarmadillo-dev \subsubsection pktools_installation_optional Optional dependences To enable program \ref pkoptsvm Install additional package - libnlopt-dev (see also http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation ) Example on how to install required packages in Debian based system (using apt-get): \code sudo apt-get install libnlopt-dev \endcode Note: currently, the repository seems not to include this package anymore and manual installation is required (see also http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation) - Install pktools with with extra configuration option --enable-nlopt: \code ./configure --enable-nlopt make sudo make install sudo ldconfig \endcode To enable programs \ref pkann and \ref pkfsann Install package - libfann-dev (see also http://leenissen.dk/fann/wp/download/) Example on how to install required packages in Debian based system (using apt-get): \code sudo apt-get install libfann-dev \endcode Install pktools with extra configuration option --libfann-dev: \code ./configure --enable-fann make sudo make install sudo ldconfig \endcode To enable program \ref pklas2img Install additional packages: - libboost-dev (see also http://www.boost.org/) - liblas1 (from Mateusz Loskot, see also http://www.liblas.org/tutorial/cpp.html) - liblas-dev - python-liblas - liblas2 - liblas-c2 - liblas-c-dev Example on how to install required packages in Debian based system (using apt-get): - first add the following two lines to /etc/apt/sources.list (replace with what you get from lsb_release -c) \code deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu main deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu main \endcode - then install extra packages: \code sudo apt-get install libboost-dev liblas-dev liblas-c-dev liblas1 liblas2 liblas-c2 python-liblas \endcode Or install manually as explained in http://www.liblas.org/compilation.html#using-unix-makefiles-on-linux ! Note that if you want support for compressed las format (LAZ), you need to install laszip first (http://www.laszip.org) and install liblas manually - Install pktools with with extra configuration option --enable-las: \code ./configure --enable-las make sudo make install sudo ldconfig \endcode \subsection installation_cmake Installation via cmake (or ccmake) Note that CMake version 3.0 or higher is required for building via cmake We will build out-of-source: \code mkdir build cd build ccmake .. \endcode Within ccmake, press "c" to configure. Make sure all paths are correctly set. Then press "g" to generate and exit ccmake. Compile and link via make: \code make \endcode pktools-2.6.6/doc/Doxyfile.in~0000644000113200011300000030360112501511375013204 00000000000000# Doxyfile 1.8.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single 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. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "My Project" # 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) path # into which the generated documentation will be written. 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 causes # performance problems for the file system. # The default value is: NO. 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. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES 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. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES 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. # The default value is: YES. 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 text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a # new page for each member. If set to NO, the documentation of a member will be # part of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. # # Note For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined # locally in source files will be included in the documentation. If set to NO # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO these classes will be included in the various overviews. This option has # no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the # todo list. This list is created by putting \todo commands in the # documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the # test list. This list is created by putting \test commands in the # documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES the list # will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. Do not use file names with spaces, bibtex cannot handle them. See # also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO doxygen will only warn about wrong or incomplete parameter # documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. # Note: If this tag is empty the current directory is searched. 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. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank the # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER ) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES, then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- # defined cascading style sheet that is included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefor more robust against future updates. # Doxygen will copy the style sheet file to the output directory. For an example # see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to NO can help when comparing the output of multiple runs. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler ( hhc.exe). If non-empty # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated ( # YES) or that it should be included in the master .chm file ( NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated ( # YES) or a normal table of contents ( NO) in the .chm file. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using prerendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /