/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.4.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


#define SWIG_VERSION 0x040401
#define SWIGPYTHON
#define SED_HACKS
#define SWIG_PYTHON_THREADS
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#define SWIGPYTHON_NOGIL

#define SWIG_name    "_gdal"
/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif

#if defined(__cplusplus) && __cplusplus >=201103L
# define SWIG_NOEXCEPT noexcept
#else
# define SWIG_NOEXCEPT throw()
#endif 

/* -----------------------------------------------------------------------------
 * swigcompat.swg
 *
 * Macros to provide support compatibility with older C and C++ standards.
 *
 * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
 * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
 * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
 * ----------------------------------------------------------------------------- */

/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
 * if you're missing it.
 */
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
     (defined __cplusplus && __cplusplus >= 201103L) || \
     defined SWIG_HAVE_SNPRINTF) && \
    !defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
 * fixed maximum possible size or dynamically allocate a buffer that's large
 * enough.
 */
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif


#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
# include <math.h>
#endif

#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN)
#define PY_SSIZE_T_CLEAN
#endif

#if __GNUC__ >= 7
#pragma GCC diagnostic push
#if defined(__cplusplus) && __cplusplus >=201703L
#pragma GCC diagnostic ignored "-Wregister" /* For python-2.7 headers that use register */
#endif
#endif

#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */

#if defined(_MSC_VER) && _MSC_VER >= 1929
/* Workaround compilation errors when redefining _DEBUG in MSVC 2019 version 16.10 and later
 * See https://github.com/swig/swig/issues/2090 */
# include <corecrt.h>
#endif

# undef _DEBUG
# include <Python.h>
# define _DEBUG 1
#else
# include <Python.h>
#endif


#if __GNUC__ >= 7
#pragma GCC diagnostic pop
#endif

#include <stdio.h>
#include <stdlib.h>

/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "5"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2
#define SWIG_POINTER_NO_NULL       0x4
#define SWIG_POINTER_CLEAR         0x8
#define SWIG_POINTER_RELEASE       (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows returning the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
/* Runtime errors are < 0 */
#define SWIG_ERROR                 (-1)
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
/* Errors < -200 are generic runtime specific errors */
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)

#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporary objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del object mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next array of casts | pointer to cast hashed by value */
  unsigned int            value;		/* index of the last valid element in the array | typename hash value */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
 * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
 */
SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
  const unsigned char *data = (const unsigned char *)str;
  unsigned int hash = len, i = 0, k;
  int rem = (int)len;

  while (rem >= (int)sizeof(unsigned int)) {
    memcpy(&k, data, sizeof(unsigned int));
    k += i++;
    hash ^= k;
    hash *= 171717;
    data += sizeof(unsigned int);
    rem -= sizeof(unsigned int);
  }

  switch (rem) {
    case 3: k = (unsigned int)(data[2]) << 16;
            k |= (unsigned int)(data[1]) << 8;
            k |= (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
    case 2: k = (unsigned int)(data[1]) << 8;
            k |= (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
    case 1: k = (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
  }
  return hash;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  static const unsigned int scan_threshold = 4;
  if (ty) {
    swig_cast_info *head = ty->cast;
    unsigned int hash_value = 0;
    int hashed = 0;

    while (head) {

      if (strcmp(head->type->name, c) == 0) {
        return head;
      }

      if (head->value) {
        swig_cast_info *iter;
        swig_cast_info *last = head + head->value;
        swig_cast_info *first = head + 1;
        int search = 1;

        if (!hashed) {
          if (head->value < scan_threshold) {
            for (iter = first; iter <= last; iter++) {
              if (strcmp(iter->type->name, c) == 0) {
                return iter;
              }
            }
            search = 0;
          } else {
            hashed = 1;
            hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
          }
        }

        if (search) {
          /* Binary search over sorted <'next'|'value'> pairs */
          do {
            iter = first + ((last - first) >> 1);
            if (iter->value < hash_value) {
              first = iter + 1;
            } else if (iter->value == hash_value) {

              if (strcmp(iter->next->type->name, c) == 0) {
                return iter->next;
              }

              /* Hash collision check */
              for (last = iter + 1; last->next && last->value == hash_value; last++) {
                if (strcmp(last->next->type->name, c) == 0) {
                  return last->next;
                }
              }
              for (first = iter - 1; first != head && first->value == hash_value; first--) {
                if (strcmp(first->next->type->name, c) == 0) {
                  return first->next;
                }
              }
              break;
            } else
              last = iter - 1;
          } while (first <= last);
        }
      }
      head = head->next;
    }
  }
  return 0;
}

/*
  Check the type by type address
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *head = ty->cast;
    while (head) {
      if (head->type == from) {
        return head;
      }

      if (head->value) {
        swig_cast_info *iter;
        swig_cast_info *last = head + head->value;
        swig_cast_info *first = head + 1;

        /* Binary search over sorted array of casts */
        do {
          iter = first + ((last - first) >> 1);
          if (iter->type < from) {
            first = iter + 1;
          } else if (iter->type == from) {
            return iter;
          } else
            last = iter - 1;
        } while (first <= last);
      }
      head = head->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  Choose the last
     name. It should be the most specific; a fully resolved name
     but not necessarily with default template parameters expanded. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *head = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (head) {
    swig_cast_info *cast;
    for (cast = head; (cast - head) <= head->value; cast++) {
      if (!cast->converter) {
        swig_type_info *tc = cast->type;
        if (!tc->clientdata) {
          SWIG_TypeClientData(tc, clientdata);
        }
      }
    }
    head = head->next;
  }
}

SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13


#if PY_VERSION_HEX >= 0x03030000 && !defined(SWIG_NO_HEAPTYPES)
#if !defined(SWIG_HEAPTYPES)
// Below is disabled because of https://github.com/swig/swig/issues/3061
// # define SWIG_HEAPTYPES
#endif
#endif

/* Compatibility macros for Python 3 */
#if PY_VERSION_HEX >= 0x03000000

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
#define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
#define PyString_AsString(str) PyBytes_AsString(str)
#define PyString_Size(str) PyBytes_Size(str)	
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)

#endif

/* SWIG APIs for compatibility of both Python 2 & 3 */

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
#else
#  define SWIG_Python_str_FromFormat PyString_FromFormat
#endif

#if defined(SWIG_HEAPTYPES)
#if PY_VERSION_HEX < 0x030c0000
#include <structmember.h>
#define Py_READONLY READONLY
#define Py_T_PYSSIZET T_PYSSIZET
#endif
#endif

#include <stddef.h> /* For offsetof */


/* Wrapper around PyUnicode_AsUTF8AndSize - call Py_XDECREF on the returned pbytes when finished with the returned string */
SWIGINTERN const char *
SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes)
{
#if PY_VERSION_HEX >= 0x03030000
# if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
  *pbytes = NULL;
  return PyUnicode_AsUTF8AndSize(str, psize);
# else
  const char *chars;
  *pbytes = PyUnicode_AsUTF8String(str);
  chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL;
  if (chars && psize)
    *psize = PyBytes_Size(*pbytes);
  return chars;
# endif
#else
  char *chars = NULL;
  *pbytes = NULL;
  PyString_AsStringAndSize(str, &chars, psize);
  return chars;
#endif
}

SWIGINTERN PyObject *
SWIG_Python_str_FromChar(const char *c)
{
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(c); 
#else
  return PyString_FromString(c);
#endif
}

#define SWIG_RUNTIME_MODULE "swig_runtime_data" SWIG_RUNTIME_VERSION

/* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */
# define SWIGPY_USE_CAPSULE
#ifdef SWIGPYTHON_BUILTIN
# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule_builtin" SWIG_TYPE_TABLE_NAME
#else
# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule" SWIG_TYPE_TABLE_NAME
#endif
#define SWIGPY_CAPSULE_NAME SWIG_RUNTIME_MODULE "." SWIGPY_CAPSULE_ATTR_NAME

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif

#if defined(Py_LIMITED_API)
# define PyTuple_GET_ITEM PyTuple_GetItem
/* Note that PyTuple_SetItem() has different semantics from PyTuple_SET_ITEM as it decref's the original tuple item, so in general they cannot be used
  interchangeably. However in SWIG-generated code PyTuple_SET_ITEM is only used with newly initialized tuples without any items and for them this does work. */
# define PyTuple_SET_ITEM PyTuple_SetItem
# define PyTuple_GET_SIZE PyTuple_Size
# define PyCFunction_GET_FLAGS PyCFunction_GetFlags
# define PyCFunction_GET_FUNCTION PyCFunction_GetFunction
# define PyCFunction_GET_SELF PyCFunction_GetSelf
# define PyList_GET_ITEM PyList_GetItem
# define PyList_SET_ITEM PyList_SetItem
# define PySliceObject PyObject
#endif

/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */
#ifdef Py_LIMITED_API
# define SWIG_Py_INCREF Py_IncRef
# define SWIG_Py_XINCREF Py_IncRef
# define SWIG_Py_DECREF Py_DecRef
# define SWIG_Py_XDECREF Py_DecRef
#else
# define SWIG_Py_INCREF Py_INCREF
# define SWIG_Py_XINCREF Py_XINCREF
# define SWIG_Py_DECREF Py_DECREF
# define SWIG_Py_XDECREF Py_XDECREF
#endif

#if PY_VERSION_HEX >= 0x03000000
#if (PY_VERSION_HEX >= 0x030d00a6) && (!defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d00a6)
# define SWIG_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
SWIGINTERN PyObject *
SWIG_PyType_GetFullyQualifiedName(PyTypeObject *type) {
  PyObject *result = NULL;
  PyObject *qualname = PyObject_GetAttrString((PyObject *)type, "__qualname__");
  if (qualname) {
    PyObject *mod = PyObject_GetAttrString((PyObject *)type, "__module__");
    if (mod) {
      if (PyUnicode_Check(mod) && PyUnicode_CompareWithASCIIString(mod, "builtins") && PyUnicode_CompareWithASCIIString(mod, "__main__")) {
        result = PyUnicode_FromFormat("%U%c%U", mod, '.', qualname);
        SWIG_Py_DECREF(qualname);
      } else {
        result = qualname;
      }
      SWIG_Py_DECREF(mod);
    } else {
      result = qualname;
    }
  }

  return result;
}
#endif
#endif

/* gh-114329 added PyList_GetItemRef() to Python 3.13.0a4 */
#if (PY_VERSION_HEX >= 0x030d00a4) && (!defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d00a4)
# define SWIG_PyList_GetItemRef PyList_GetItemRef
#else
SWIGINTERN PyObject *
SWIG_PyList_GetItemRef(PyObject *op, Py_ssize_t index) {
  PyObject *item = PyList_GetItem(op, index);
  Py_XINCREF(item);
  return item;
}
#endif

/* gh-106004 added PyDict_GetItemRef() and PyDict_GetItemStringRef() to Python 3.13.0a1
   functions are renamed here for compatibility with abi3audit */
#if (PY_VERSION_HEX >= 0x030d00a1) && (!defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d00a1)
# define SWIG_PyDict_GetItemRef PyDict_GetItemRef
# define SWIG_PyDict_GetItemStringRef PyDict_GetItemStringRef
#else
SWIGINTERN int
SWIG_PyDict_GetItemRef(PyObject *mp, PyObject *key, PyObject **result) {
#if PY_VERSION_HEX >= 0x03000000
  PyObject *item = PyDict_GetItemWithError(mp, key);
#else
  PyObject *item = _PyDict_GetItemWithError(mp, key);
#endif
  if (item != NULL) {
    *result = (PyObject *)(item);
    SWIG_Py_INCREF(*result);
    return 1;
  }
  if (!PyErr_Occurred()) {
    *result = NULL;
    return 0;
  }
  *result = NULL;
  return -1;
}

SWIGINTERN int
SWIG_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result) {
  int res;
#if PY_VERSION_HEX >= 0x03000000
  PyObject *key_obj = PyUnicode_FromString(key);
#else
  PyObject *key_obj = PyString_FromString(key);
#endif
  if (key_obj == NULL) {
    *result = NULL;
    return -1;
  }
  res = SWIG_PyDict_GetItemRef(mp, key_obj, result);
  Py_DECREF(key_obj);
  return res;
}
#endif

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */

SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
  PyObject* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = PyExc_MemoryError;
    break;
  case SWIG_IOError:
    type = PyExc_IOError;
    break;
  case SWIG_RuntimeError:
    type = PyExc_RuntimeError;
    break;
  case SWIG_IndexError:
    type = PyExc_IndexError;
    break;
  case SWIG_TypeError:
    type = PyExc_TypeError;
    break;
  case SWIG_DivisionByZero:
    type = PyExc_ZeroDivisionError;
    break;
  case SWIG_OverflowError:
    type = PyExc_OverflowError;
    break;
  case SWIG_SyntaxError:
    type = PyExc_SyntaxError;
    break;
  case SWIG_ValueError:
    type = PyExc_ValueError;
    break;
  case SWIG_SystemError:
    type = PyExc_SystemError;
    break;
  case SWIG_AttributeError:
    type = PyExc_AttributeError;
    break;
  case SWIG_NullReferenceError:
    type = PyExc_TypeError;
    break;
  default:
    type = PyExc_RuntimeError;
  }
  return type;
}


SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
  PyObject *type = 0;
  PyObject *value = 0;
  PyObject *traceback = 0;

  if (PyErr_Occurred())
    PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    PyObject *old_str = PyObject_Str(value);
    PyObject *bytes = NULL;
    const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
    PyErr_Clear();
    SWIG_Py_XINCREF(type);
    if (tmp)
      PyErr_Format(type, "%s %s", tmp, mesg);
    else
      PyErr_Format(type, "%s", mesg);
    SWIG_Py_XDECREF(bytes);
    SWIG_Py_DECREF(old_str);
    SWIG_Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject *obj)
{
  PyObject *error;
  if (obj)
    return 0;
  error = PyErr_Occurred();
  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
}

SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char *message)
{
  if (SWIG_Python_TypeErrorOccurred(NULL)) {
    /* Use existing TypeError to preserve stacktrace and enhance with given message */
    PyObject *newvalue;
    PyObject *type = NULL, *value = NULL, *traceback = NULL;
    PyErr_Fetch(&type, &value, &traceback);
#if PY_VERSION_HEX >= 0x03000000
    newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
#else
    newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
#endif
    if (newvalue) {
      SWIG_Py_XDECREF(value);
      PyErr_Restore(type, newvalue, traceback);
    } else {
      PyErr_Restore(type, value, traceback);
    }
  } else {
    /* Raise TypeError using given message */
    PyErr_SetString(PyExc_TypeError, message);
  }
}

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    define SWIG_PYTHON_USE_GIL
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      if PY_VERSION_HEX < 0x03070000
#        define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
#      else
#        define SWIG_PYTHON_INITIALIZE_THREADS
#      endif
#    endif
#    ifdef __cplusplus /* C++ code */
       class SWIG_Python_Thread_Block {
         bool status;
         PyGILState_STATE state;
       public:
         void end() { if (status) { PyGILState_Release(state); status = false;} }
         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
         ~SWIG_Python_Thread_Block() { end(); }
       };
       class SWIG_Python_Thread_Allow {
         bool status;
         PyThreadState *save;
       public:
         void end() { if (status) { status = false; PyEval_RestoreThread(save); }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

/* -----------------------------------------------------------------------------
 * Python API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Constant declarations
 * ----------------------------------------------------------------------------- */

/* Constant Types */
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

/* Constant information structure */
typedef struct swig_const_info {
  int type;
  const char *name;
  long lvalue;
  double dvalue;
  void   *pvalue;
  swig_type_info **ptype;
} swig_const_info;

#ifdef __cplusplus
}
#endif


/* -----------------------------------------------------------------------------
 * pyrun.swg
 *
 * This file contains the runtime support for Python modules
 * and includes code for managing global variables and pointer
 * type checking.
 *
 * ----------------------------------------------------------------------------- */

#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
# error "This version of SWIG only supports Python >= 2.7"
#endif

#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03050000
# error "This version of SWIG only supports Python 3 >= 3.5"
#endif

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)

#ifdef SWIGPYTHON_BUILTIN
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
#else
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
#endif

#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)

#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)

#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
#define SWIG_fail                        		goto fail					   

/* Runtime API implementation */

/* Error manipulation */

SWIGINTERN void 
SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
  PyErr_SetObject(errtype, obj);
  SWIG_Py_DECREF(obj);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

SWIGINTERN void 
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  PyErr_SetString(errtype, msg);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  PyObject *s = PyString_InternFromString(key);
  PyList_Append(seq, s);
  SWIG_Py_DECREF(s);
}

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  SWIG_Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  SWIG_Py_DECREF(obj);
}

#endif

/* SWIG runtime data Python module */
static PyObject *Swig_runtime_data_module_global = NULL;

/* Create/obtain the single swig_runtime_data module which is used across different SWIG generated modules */
SWIGINTERN PyObject *
SWIG_runtime_data_module(void) {
  if (!Swig_runtime_data_module_global) {
#if (PY_VERSION_HEX >= 0x030d0000) && (!defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000)
    /* free-threading note: the GIL is always enabled when this function is first called
       by SWIG_init, so there's no risk of race conditions */
    Swig_runtime_data_module_global = PyImport_AddModuleRef(SWIG_RUNTIME_MODULE);
#elif PY_VERSION_HEX >= 0x03000000
    Swig_runtime_data_module_global = PyImport_AddModule(SWIG_RUNTIME_MODULE);
    SWIG_Py_XINCREF(Swig_runtime_data_module_global);
#else
    static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
    Swig_runtime_data_module_global = Py_InitModule(SWIG_RUNTIME_MODULE, swig_empty_runtime_method_table);
    SWIG_Py_XINCREF(Swig_runtime_data_module_global);
#endif
  }
  assert(Swig_runtime_data_module_global);
  return Swig_runtime_data_module_global;
}

/* Append a value to the result obj */
SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) {
  if (!result) {
    result = obj;
  } else if (result == Py_None && is_void) {
    SWIG_Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      if (result) {
        PyList_SET_ITEM(result, 0, o2);
      } else {
        SWIG_Py_DECREF(obj);
        return o2;
      }
    }
    PyList_Append(result,obj);
    SWIG_Py_DECREF(obj);
  }
  return result;
}

/* Unpack the argument tuple */

SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
  if (!args) {
    if (!min && !max) {
      return 1;
    } else {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
		   name, (min == max ? "" : "at least "), (int)min);
      return 0;
    }
  }  
  if (!PyTuple_Check(args)) {
    if (min <= 1 && max >= 1) {
      Py_ssize_t i;
      objs[0] = args;
      for (i = 1; i < max; ++i) {
	objs[i] = 0;
      }
      return 2;
    }
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    Py_ssize_t l = PyTuple_GET_SIZE(args);
    if (l < min) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at least "), (int)min, (int)l);
      return 0;
    } else if (l > max) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at most "), (int)max, (int)l);
      return 0;
    } else {
      Py_ssize_t i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
  int no_kwargs = 1;
  if (kwargs) {
    assert(PyDict_Check(kwargs));
    if (PyDict_Size(kwargs) > 0) {
      PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
      no_kwargs = 0;
    }
  }
  return no_kwargs;
}

/* A functor is a function object with one single object argument */
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);

/*
  Helper for static pointer initialization for both C and C++ code, for example
  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
*/
#ifdef __cplusplus
#define SWIG_STATIC_POINTER(var)  var
#else
#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
 
/* -----------------------------------------------------------------------------
 * global variable support code.
 * ----------------------------------------------------------------------------- */
 
typedef struct swig_globalvar {   
  char       *name;                  /* Name of global variable */
  PyObject *(*get_attr)(void);       /* Return the current value */
  int       (*set_attr)(PyObject *); /* Set the value */
  struct swig_globalvar *next;
} swig_globalvar;

typedef struct swig_varlinkobject {
  PyObject_HEAD
  swig_globalvar *vars;
} swig_varlinkobject;

SWIGINTERN PyObject *
SwigVarLink_repr(PyObject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_InternFromString("<Swig global variables>");
#else
  return PyString_FromString("<Swig global variables>");
#endif
}

SWIGINTERN PyObject *
SwigVarLink_str(PyObject *o) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
#if PY_VERSION_HEX >= 0x03000000
  PyObject *str = PyUnicode_InternFromString("(");
  PyObject *tail;
  PyObject *joined;
  swig_globalvar *var;
  for (var = v->vars; var; var=var->next) {
    tail = PyUnicode_FromString(var->name);
    joined = PyUnicode_Concat(str, tail);
    SWIG_Py_DECREF(str);
    SWIG_Py_DECREF(tail);
    str = joined;
    if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        SWIG_Py_DECREF(str);
        SWIG_Py_DECREF(tail);
        str = joined;
    }
  }
  tail = PyUnicode_InternFromString(")");
  joined = PyUnicode_Concat(str, tail);
  SWIG_Py_DECREF(str);
  SWIG_Py_DECREF(tail);
  str = joined;
#else
  PyObject *str = PyString_FromString("(");
  swig_globalvar *var;
  for (var = v->vars; var; var=var->next) {
    PyString_ConcatAndDel(&str,PyString_FromString(var->name));
    if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  }
  PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
  return str;
}

SWIGINTERN void
SwigVarLink_dealloc(PyObject *o) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
  swig_globalvar *var = v->vars;
  while (var) {
    swig_globalvar *n = var->next;
    free(var->name);
    free(var);
    var = n;
  }
}

SWIGINTERN PyObject *
SwigVarLink_getattr(PyObject *o, char *n) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
  PyObject *res = NULL;
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      res = (*var->get_attr)();
      break;
    }
    var = var->next;
  }
  if (res == NULL && !PyErr_Occurred()) {
    PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  }
  return res;
}

SWIGINTERN int
SwigVarLink_setattr(PyObject *o, char *n, PyObject *p) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
  int res = 1;
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      res = (*var->set_attr)(p);
      break;
    }
    var = var->next;
  }
  if (res == 1 && !PyErr_Occurred()) {
    PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  }
  return res;
}

SWIGINTERN PyTypeObject*
SwigVarLink_TypeOnce(void) {
  static char SwigVarLink_doc[] = "Swig variable link object";
#ifndef SWIG_HEAPTYPES
  static PyTypeObject varlink_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                  /* ob_size */
#endif
      SWIG_RUNTIME_MODULE ".SwigVarLink", /* tp_name */
      sizeof(swig_varlinkobject),         /* tp_basicsize */
      0,                                  /* tp_itemsize */
      (destructor) SwigVarLink_dealloc,   /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
      (printfunc)0,                       /* tp_print */
#else
      (Py_ssize_t)0,                      /* tp_vectorcall_offset */
#endif
      (getattrfunc) SwigVarLink_getattr,  /* tp_getattr */
      (setattrfunc) SwigVarLink_setattr,  /* tp_setattr */
      0,                                  /* tp_compare */
      (reprfunc) SwigVarLink_repr,        /* tp_repr */
      0,                                  /* tp_as_number */
      0,                                  /* tp_as_sequence */
      0,                                  /* tp_as_mapping */
      0,                                  /* tp_hash */
      0,                                  /* tp_call */
      (reprfunc) SwigVarLink_str,         /* tp_str */
      0,                                  /* tp_getattro */
      0,                                  /* tp_setattro */
      0,                                  /* tp_as_buffer */
      0,                                  /* tp_flags */
      SwigVarLink_doc,                    /* tp_doc */
      0,                                  /* tp_traverse */
      0,                                  /* tp_clear */
      0,                                  /* tp_richcompare */
      0,                                  /* tp_weaklistoffset */
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
      0,                                  /* tp_del */
      0,                                  /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                  /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                  /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                  /* tp_print */
#endif
#if PY_VERSION_HEX >= 0x030c0000
      0,                                  /* tp_watched */
#endif
#if PY_VERSION_HEX >= 0x030d00a4
      0,                                  /* tp_versions_used */
#endif
#ifdef COUNT_ALLOCS
      0,                                  /* tp_allocs */
      0,                                  /* tp_frees */
      0,                                  /* tp_maxalloc */
      0,                                  /* tp_prev */
      0                                   /* tp_next */
#endif
    };
    PyObject *runtime_data_module = SWIG_runtime_data_module();
    varlink_type = tmp;
    type_init = 1;
    if (PyType_Ready(&varlink_type) < 0)
      return NULL;
    if (PyModule_AddObject(runtime_data_module, "SwigVarLink", (PyObject *)&varlink_type) == 0)
      SWIG_Py_INCREF((PyObject *)&varlink_type);
  }
  return &varlink_type;
#else
  PyType_Slot slots[] = {
    { Py_tp_dealloc, (void *)SwigVarLink_dealloc },
    { Py_tp_repr, (void *)SwigVarLink_repr },
    { Py_tp_getattr, (void *)SwigVarLink_getattr },
    { Py_tp_setattr, (void *)SwigVarLink_setattr },
    { Py_tp_str, (void *)SwigVarLink_str },
    { Py_tp_doc, (void *)SwigVarLink_doc },
    { 0, NULL }
  };
  PyType_Spec spec = {
    SWIG_RUNTIME_MODULE ".SwigVarLink",
    sizeof(swig_varlinkobject),
    0,
    Py_TPFLAGS_DEFAULT,
    slots
  };
  PyObject *pytype = PyType_FromSpec(&spec);
  PyObject *runtime_data_module = SWIG_runtime_data_module();
  if (pytype && PyModule_AddObject(runtime_data_module, "SwigVarLink", pytype) == 0)
    SWIG_Py_INCREF(pytype);
  return (PyTypeObject *)pytype;
#endif
}

SWIGRUNTIME PyTypeObject*
SwigVarLink_Type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigVarLink_TypeOnce();
  return type;
}

/* Create a variable linking object for use later */
SWIGINTERN PyObject *
SWIG_Python_newvarlink(void) {
  swig_varlinkobject *result = PyObject_New(swig_varlinkobject, SwigVarLink_Type());
  if (result) {
    result->vars = 0;
  }
  return ((PyObject*) result);
}

SWIGINTERN void 
SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  swig_varlinkobject *v = (swig_varlinkobject *) p;
  swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  if (gv) {
    size_t size = strlen(name)+1;
    gv->name = (char *)malloc(size);
    if (gv->name) {
      memcpy(gv->name, name, size);
      gv->get_attr = get_attr;
      gv->set_attr = set_attr;
      gv->next = v->vars;
    }
  }
  v->vars = gv;
}


static PyObject *Swig_Globals_global = NULL;
  
SWIGINTERN PyObject *
SWIG_globals(void) {
  if (Swig_Globals_global == NULL) {
    Swig_Globals_global = SWIG_newvarlink();
  }
  return Swig_Globals_global;
}

#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */

/* Flags for new pointer objects */
#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)

#ifdef __cplusplus
extern "C" {
#endif

/* The python void return value */

SWIGRUNTIMEINLINE PyObject * 
SWIG_Py_Void(void)
{
  PyObject *none = Py_None;
  SWIG_Py_INCREF(none);
  return none;
}

/* SwigPyClientData */

typedef struct {
  PyObject *klass;
  PyObject *newraw;
  PyObject *newargs;
  PyObject *destroy;
  int delargs;
  int implicitconv;
  PyTypeObject *pytype;
} SwigPyClientData;

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  int fail = data ? data->implicitconv : 0;
  if (fail)
    PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
  return fail;
}

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  PyObject *klass = data ? data->klass : 0;
  return (klass ? klass : PyExc_RuntimeError);
}


SWIGRUNTIME SwigPyClientData * 
SwigPyClientData_New(PyObject* obj)
{
  if (!obj) {
    return 0;
  } else {
    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    /* the klass element */
    data->klass = obj;
    SWIG_Py_INCREF(data->klass);
    /* the newraw method and newargs arguments used to create a new raw instance */
    if (PyClass_Check(obj)) {
      data->newraw = 0;
      SWIG_Py_INCREF(obj);
      data->newargs = obj;
    } else {
      data->newraw = PyObject_GetAttrString(data->klass, "__new__");
      if (data->newraw) {
        data->newargs = PyTuple_New(1);
        if (data->newargs) {
          SWIG_Py_INCREF(obj);
          PyTuple_SET_ITEM(data->newargs, 0, obj);
        } else {
          SWIG_Py_DECREF(data->newraw);
          SWIG_Py_DECREF(data->klass);
          free(data);
          return 0;
        }
      } else {
        SWIG_Py_INCREF(obj);
        data->newargs = obj;
      }
    }
    /* the destroy method, aka as the C++ delete method */
    data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
    if (PyErr_Occurred()) {
      PyErr_Clear();
      data->destroy = 0;
    }
    if (data->destroy) {
      data->delargs = !(PyCFunction_GET_FLAGS(data->destroy) & METH_O);
    } else {
      data->delargs = 0;
    }
    data->implicitconv = 0;
    data->pytype = 0;
    return data;
  }
}

SWIGRUNTIME void 
SwigPyClientData_Del(SwigPyClientData *data)
{
  SWIG_Py_XDECREF(data->klass);
  SWIG_Py_XDECREF(data->newraw);
  SWIG_Py_XDECREF(data->newargs);
  SWIG_Py_XDECREF(data->destroy);
  free(data);
}

/* =============== SwigPyObject =====================*/

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
  PyObject *swigdict;
  PyObject *weakreflist;
} SwigPyObject;


#ifdef SWIGPYTHON_BUILTIN

SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;

  if (!sobj->swigdict)
    sobj->swigdict = PyDict_New();

  SWIG_Py_XINCREF(sobj->swigdict);
  return sobj->swigdict;
}

#endif

SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
SwigPyObject_format(const char* fmt, SwigPyObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args) {
    PyObject *val = SwigPyObject_long(v);
    if (val) {
      PyObject *ofmt;
      PyTuple_SET_ITEM(args, 0, val);
      ofmt = SWIG_Python_str_FromChar(fmt);
      if (ofmt) {
#if PY_VERSION_HEX >= 0x03000000
        res = PyUnicode_Format(ofmt,args);
#else
        res = PyString_Format(ofmt,args);
#endif
        SWIG_Py_DECREF(ofmt);
      }
    }
    SWIG_Py_DECREF(args);
  }
  return res;
}

SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject *v)
{
  return SwigPyObject_format("%o",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject *v)
{
  return SwigPyObject_format("%x",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject *v)
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  if (repr && v->next) {
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
    if (nrep) {
# if PY_VERSION_HEX >= 0x03000000
      PyObject *joined = PyUnicode_Concat(repr, nrep);
      SWIG_Py_DECREF(repr);
      SWIG_Py_DECREF(nrep);
      repr = joined;
# else
      PyString_ConcatAndDel(&repr,nrep);
# endif
    } else {
      SWIG_Py_DECREF(repr);
      repr = NULL;
    }
  }
  return repr;
}

/* We need a version taking two PyObject* parameters so it's a valid
 * PyCFunction to use in SwigPyObject_methods[]. */
SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  return SwigPyObject_repr((SwigPyObject*)v);
}

SWIGRUNTIME int
SwigPyObject_compare(PyObject *v, PyObject *w)
{
  /* tp_compare is only called when both objects have the same type, so
   * the casts are guaranteed to be ok. */
  void *i = ((SwigPyObject *)v)->ptr;
  void *j = ((SwigPyObject *)w)->ptr;
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
}

SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *);

/* Added for Python 3.x, would it also be useful for Python 2.x? */
SWIGRUNTIME PyObject*
SwigPyObject_richcompare(PyObject *v, PyObject *w, int op)
{
  PyObject* res = NULL;
  if (!PyErr_Occurred()) {
    /* Per https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_richcompare
     * the first argument is guaranteed to be an instance of SwigPyObject, but the
     * second is not, so we typecheck that one. */
    if ((op != Py_EQ && op != Py_NE) || !SwigPyObject_Check(w)) {
      SWIG_Py_INCREF(Py_NotImplemented);
      return Py_NotImplemented;
    }
    res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  }
  return res;
}


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

#ifdef SWIGPYTHON_BUILTIN
static swig_type_info *SwigPyObject_stype = 0;
SWIGRUNTIME PyTypeObject*
SwigPyObject_Type(void) {
    SwigPyClientData *cd;
    assert(SwigPyObject_stype);
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    assert(cd);
    assert(cd->pytype);
    return cd->pytype;
}
#else
SWIGRUNTIME PyTypeObject*
SwigPyObject_Type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  return type;
}
#endif

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
  PyTypeObject *target_tp = SwigPyObject_Type();
  PyTypeObject *op_type = Py_TYPE(op);
#ifdef SWIGPYTHON_BUILTIN
  /* Only builtin types have SwigPyObject as a base type */
  return PyType_IsSubtype(op_type, target_tp);
#else
  /* Check for an exact match to SwigPyObject */
  if (op_type == target_tp) {
    return 1;
  } else {
    /* Fallback for multiple modules */
#if PY_VERSION_HEX >= 0x03000000
    int cmp;
    PyObject *tpname = SWIG_PyType_GetFullyQualifiedName(op_type);
    if (!tpname)
      return 0;
    cmp = PyUnicode_CompareWithASCIIString(tpname, SWIG_RUNTIME_MODULE ".SwigPyObject");
    SWIG_Py_DECREF(tpname);
    return cmp == 0;
#else
    return strcmp(op_type->tp_name, SWIG_RUNTIME_MODULE ".SwigPyObject") == 0;
#endif
  }
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);

static PyObject* Swig_Capsule_global = NULL;

SWIGRUNTIME void
SwigPyObject_dealloc(PyObject *v)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  PyObject *next = sobj->next;
  if (sobj->own == SWIG_POINTER_OWN) {
    swig_type_info *ty = sobj->ty;
    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    PyObject *destroy = data ? data->destroy : 0;
    if (destroy) {
      /* destroy is always a VARARGS method */
      PyObject *res;

      /* PyObject_CallFunction() has the potential to silently drop
         the active exception.  In cases of unnamed temporary
         variable or where we just finished iterating over a generator
         StopIteration will be active right now, and this needs to
         remain true upon return from SwigPyObject_dealloc.  So save
         and restore. */
      
      PyObject *type = NULL, *value = NULL, *traceback = NULL;
      PyErr_Fetch(&type, &value, &traceback);

      if (data->delargs) {
        /* we need to create a temporary object to carry the destroy operation */
        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
        if (tmp) {
          res = SWIG_Python_CallFunctor(destroy, tmp);
        } else {
          res = 0;
        }
        SWIG_Py_XDECREF(tmp);
      } else {
        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
        PyObject *mself = PyCFunction_GET_SELF(destroy);
        res = ((*meth)(mself, v));
      }
      if (!res)
        PyErr_WriteUnraisable(destroy);

      PyErr_Restore(type, value, traceback);

      SWIG_Py_XDECREF(res);
    } 
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    else {
      const char *name = SWIG_TypePrettyName(ty);
      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    }
#endif
    SWIG_Py_XDECREF(Swig_Capsule_global);
  }
  SWIG_Py_XDECREF(next);
  SWIG_Py_XDECREF(sobj->swigdict);
  PyObject_Free(v);
}

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (!SwigPyObject_Check(next)) {
    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    return NULL;
  }
  ((SwigPyObject *)next)->next = sobj->next;
  sobj->next = next;
  SWIG_Py_INCREF(next);
  return SWIG_Py_Void();
}

SWIGRUNTIME PyObject* 
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    SWIG_Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

SWIGINTERN PyObject*
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = 0;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = SWIG_POINTER_OWN;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    return NULL;
  } else {
    SwigPyObject *sobj = (SwigPyObject *)v;
    PyObject *obj = PyBool_FromLong(sobj->own);
    if (val) {
      if (PyObject_IsTrue(val)) {
        SWIG_Py_DECREF(SwigPyObject_acquire(v,args));
      } else {
        SWIG_Py_DECREF(SwigPyObject_disown(v,args));
      }
    } 
    return obj;
  }
}

static PyMethodDef
SwigPyObject_methods[] = {
  {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
  {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
  {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
  {"append",  SwigPyObject_append,  METH_O,       "appends another 'this' object"},
  {"next",    SwigPyObject_next,    METH_NOARGS,  "returns the next 'this' object"},
  {"__repr__",SwigPyObject_repr2,   METH_NOARGS,  "returns object representation"},
  {0, 0, 0, 0}  
};

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char SwigPyObject_doc[] = "Swig object holding a C/C++ pointer";
#ifndef SWIG_HEAPTYPES
  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#else
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      SWIG_RUNTIME_MODULE ".SwigPyObject",  /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
      (printfunc)0,                         /* tp_print */
#else
      (Py_ssize_t)0,                        /* tp_vectorcall_offset */
#endif
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
      0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      0,                                    /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      SwigPyObject_doc,                     /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      offsetof(SwigPyObject, weakreflist),  /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      SwigPyObject_methods,                 /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#if PY_VERSION_HEX >= 0x030c0000
      0,                                    /* tp_watched */
#endif
#if PY_VERSION_HEX >= 0x030d00a4
      0,                                    /* tp_versions_used */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    PyObject *runtime_data_module = SWIG_runtime_data_module();
    swigpyobject_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpyobject_type) != 0)
      return NULL;
    if (PyModule_AddObject(runtime_data_module, "SwigPyObject", (PyObject *)&swigpyobject_type) == 0)
      SWIG_Py_INCREF((PyObject *)&swigpyobject_type);
  }
  return &swigpyobject_type;
#else
  static PyMemberDef SwigPyObject_members[] = {
      { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, swigdict), Py_READONLY, NULL },
      { (char *)"__weaklistoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, weakreflist), Py_READONLY, NULL },
      { NULL, 0, 0, 0, NULL }
  };
  PyType_Slot slots[] = {
    { Py_tp_dealloc, (void *)SwigPyObject_dealloc },
    { Py_tp_repr, (void *)SwigPyObject_repr },
    { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
    { Py_tp_doc, (void *)SwigPyObject_doc },
    { Py_tp_richcompare, (void *)SwigPyObject_richcompare },
    { Py_tp_methods, (void *)SwigPyObject_methods },
    { Py_nb_int, (void *)SwigPyObject_long },
    { Py_tp_members, (void *)SwigPyObject_members },
    { 0, NULL }
  };
  PyType_Spec spec = {
    SWIG_RUNTIME_MODULE ".SwigPyObject",
    sizeof(SwigPyObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
    slots
  };
  PyObject *pytype = PyType_FromSpec(&spec);
  PyObject *runtime_data_module = SWIG_runtime_data_module();
#if !defined(Py_LIMITED_API)
/* While this __dictoffset__ is only used with the builtin wrappers, SwigPyObject ought to be
   identical when created for use by proxy class wrappers in case it is shared across multiple modules. */
#if PY_VERSION_HEX < 0x03090000
    /* Workaround as __dictoffset__ and __weaklistoffset__ above are only supported from python-3.9 */
  if (pytype) {
    ((PyTypeObject *)pytype)->tp_dictoffset = offsetof(SwigPyObject, swigdict);
    ((PyTypeObject *)pytype)->tp_weaklistoffset = offsetof(SwigPyObject, weakreflist);
  }
#endif
#endif
  if (pytype && PyModule_AddObject(runtime_data_module, "SwigPyObject", pytype) == 0)
    SWIG_Py_INCREF(pytype);
  return (PyTypeObject *)pytype;
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
{
  SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_Type());
  if (sobj) {
    sobj->ptr  = ptr;
    sobj->ty   = ty;
    sobj->own  = own;
    sobj->next = 0;
    sobj->swigdict = 0;
    sobj->weakreflist = 0;
    if (own == SWIG_POINTER_OWN) {
      /* Obtain a reference to the Python capsule wrapping the module information, so that the
       * module information is correctly destroyed after all SWIG python objects have been freed
       * by the GC (and corresponding destructors invoked) */
      SWIG_Py_XINCREF(Swig_Capsule_global);
    }
  }
  return (PyObject *)sobj;
}

/* -----------------------------------------------------------------------------
 * Implements a simple Swig Packed type, and use it instead of string
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *pack;
  swig_type_info *ty;
  size_t size;
} SwigPyPacked;

SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  }  
}

SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromChar(v->ty->name);
  }  
}

SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
{
  size_t i = v->size;
  size_t j = w->size;
  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
}

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

SWIGRUNTIME PyTypeObject*
SwigPyPacked_Type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  PyTypeObject *target_tp = SwigPyPacked_Type();
  PyTypeObject *op_type = Py_TYPE(op);
  /* Check for an exact match to SwigPyPacked */
  if (op_type == target_tp) {
    return 1;
  } else {
    /* Fallback for multiple modules */
#if PY_VERSION_HEX >= 0x03000000
    int cmp;
    PyObject *tpname = SWIG_PyType_GetFullyQualifiedName(op_type);
    if (!tpname)
      return 0;
    cmp = PyUnicode_CompareWithASCIIString(tpname, SWIG_RUNTIME_MODULE ".SwigPyPacked");
    SWIG_Py_DECREF(tpname);
    return cmp == 0;
#else
    return strcmp(op_type->tp_name, SWIG_RUNTIME_MODULE ".SwigPyPacked") == 0;
#endif
  }
}

SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject *v)
{
  if (SwigPyPacked_Check(v)) {
    SwigPyPacked *sobj = (SwigPyPacked *) v;
    free(sobj->pack);
  }
  PyObject_Free(v);
}

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char SwigPyPacked_doc[] = "Swig object holding a C/C++ function pointer";
#ifndef SWIG_HEAPTYPES
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      SWIG_RUNTIME_MODULE ".SwigPyPacked",  /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
      (printfunc)0,                         /* tp_print */
#else
      (Py_ssize_t)0,                        /* tp_vectorcall_offset */
#endif
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      SwigPyPacked_doc,                     /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#if PY_VERSION_HEX >= 0x030c0000
      0,                                    /* tp_watched */
#endif
#if PY_VERSION_HEX >= 0x030d00a4
      0,                                    /* tp_versions_used */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    PyObject *runtime_data_module = SWIG_runtime_data_module();
    swigpypacked_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpypacked_type) != 0)
      return NULL;
    if (PyModule_AddObject(runtime_data_module, "SwigPyPacked", (PyObject *)&swigpypacked_type) == 0)
      SWIG_Py_INCREF((PyObject *)&swigpypacked_type);
  }
  return &swigpypacked_type;
#else
  PyType_Slot slots[] = {
    { Py_tp_dealloc, (void *)SwigPyPacked_dealloc },
    { Py_tp_repr, (void *)SwigPyPacked_repr },
    { Py_tp_str, (void *)SwigPyPacked_str },
    { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
    { Py_tp_doc, (void *)SwigPyPacked_doc },
    { 0, NULL }
  };
  PyType_Spec spec = {
    SWIG_RUNTIME_MODULE ".SwigPyPacked",
    sizeof(SwigPyPacked),
    0,
    Py_TPFLAGS_DEFAULT,
    slots
  };
  PyObject *pytype = PyType_FromSpec(&spec);
  PyObject *runtime_data_module = SWIG_runtime_data_module();
  if (pytype && PyModule_AddObject(runtime_data_module, "SwigPyPacked", pytype) == 0)
    SWIG_Py_INCREF(pytype);
  return (PyTypeObject *)pytype;
#endif
}

SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
  SwigPyPacked *sobj = PyObject_New(SwigPyPacked, SwigPyPacked_Type());
  if (sobj) {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      sobj->pack = pack;
      sobj->ty   = ty;
      sobj->size = size;
    } else {
      PyObject_Free((PyObject *)sobj);
      sobj = 0;
    }
  }
  return (PyObject *) sobj;
}

SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  if (SwigPyPacked_Check(obj)) {
    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    if (sobj->size != size) return 0;
    memcpy(ptr, sobj->pack, size);
    return sobj->ty;
  } else {
    return 0;
  }
}

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

static PyObject *Swig_This_global = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (Swig_This_global == NULL)
    Swig_This_global = SWIG_Python_str_FromChar("this");
  return Swig_This_global;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

/* TODO: I don't know how to implement the fast getset in Python 3 right now */
#if PY_VERSION_HEX >= 0x03000000
#define SWIG_PYTHON_SLOW_GETSET_THIS 
#endif

/* Returns a borrowed reference to the 'this' object */
SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject *pyobj) 
{
  PyObject *obj;

  if (SwigPyObject_Check(pyobj))
    return (SwigPyObject *) pyobj;

#ifdef SWIGPYTHON_BUILTIN
  (void)obj;
  if (PyWeakref_CheckProxy(pyobj)) {
#if PY_VERSION_HEX >= 0x030d0000
    if (PyWeakref_GetRef(pyobj, &pyobj) > 0)
      Py_DECREF(pyobj);
    else
      pyobj = NULL;
#else
    pyobj = PyWeakref_GetObject(pyobj);
#endif
    if (pyobj && SwigPyObject_Check(pyobj))
      return (SwigPyObject*) pyobj;
  }
  return NULL;
#else

  obj = 0;

#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  if (PyInstance_Check(pyobj)) {
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
  } else {
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    if (dictptr != NULL) {
      PyObject *dict = *dictptr;
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    } else {
      if (PyWeakref_CheckProxy(pyobj)) {
        PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
      }
      obj = PyObject_GetAttr(pyobj, SWIG_This());
      if (obj) {
	SWIG_Py_DECREF(obj);
      } else {
	if (PyErr_Occurred()) PyErr_Clear();
	return 0;
      }
    }
  }
#else
  obj = PyObject_GetAttr(pyobj, SWIG_This());
  if (obj) {
    SWIG_Py_DECREF(obj);
  } else {
    if (PyErr_Occurred()) PyErr_Clear();
    return 0;
  }
#endif
  if (obj && !SwigPyObject_Check(obj)) {
    /* a PyObject is called 'this', try to get the 'real this'
       SwigPyObject from it */ 
    return SWIG_Python_GetSwigThis(obj);
  }
  return (SwigPyObject *)obj;
#endif
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  if (own == SWIG_POINTER_OWN) {
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    if (sobj) {
      int oldown = sobj->own;
      sobj->own = own;
      return oldown;
    }
  }
  return 0;
}

/* Convert a pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  int res;
  SwigPyObject *sobj;
  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None && !implicit_conv) {
    if (ptr)
      *ptr = 0;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }

  res = SWIG_ERROR;

  sobj = SWIG_Python_GetSwigThis(obj);
  if (own)
    *own = 0;
  while (sobj) {
    void *vptr = sobj->ptr;
    if (ty) {
      swig_type_info *to = sobj->ty;
      if (to == ty) {
        /* no type cast needed */
        if (ptr) *ptr = vptr;
        break;
      } else {
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
        if (!tc) {
          sobj = (SwigPyObject *)sobj->next;
        } else {
          if (ptr) {
            int newmemory = 0;
            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
            if (newmemory == SWIG_CAST_NEW_MEMORY) {
              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
              if (own)
                *own = *own | SWIG_CAST_NEW_MEMORY;
            }
          }
          break;
        }
      }
    } else {
      if (ptr) *ptr = vptr;
      break;
    }
  }
  if (sobj) {
    if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !sobj->own) {
      res = SWIG_ERROR_RELEASE_NOT_OWNED;
    } else {
      if (own)
        *own = *own | sobj->own;
      if (flags & SWIG_POINTER_DISOWN) {
        sobj->own = 0;
      }
      if (flags & SWIG_POINTER_CLEAR) {
        sobj->ptr = 0;
      }
      res = SWIG_OK;
    }
  } else {
    if (implicit_conv) {
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
      if (data && !data->implicitconv) {
        PyObject *klass = data->klass;
        if (klass) {
          PyObject *impconv;
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
          impconv = SWIG_Python_CallFunctor(klass, obj);
          data->implicitconv = 0;
          if (PyErr_Occurred()) {
            PyErr_Clear();
            impconv = 0;
          }
          if (impconv) {
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
            if (iobj) {
              void *vptr;
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
              if (SWIG_IsOK(res)) {
                if (ptr) {
                  *ptr = vptr;
                  /* transfer the ownership to 'ptr' */
                  iobj->own = 0;
                  res = SWIG_AddCast(res);
                  res = SWIG_AddNewMask(res);
                } else {
                  res = SWIG_AddCast(res);		    
                }
              }
            }
            SWIG_Py_DECREF(impconv);
          }
        }
      }
      if (!SWIG_IsOK(res) && obj == Py_None) {
        if (ptr)
          *ptr = 0;
        if (PyErr_Occurred())
          PyErr_Clear();
        res = SWIG_OK;
      }
    }
  }
  return res;
}

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    swig_cast_info *tc;

    /* here we get the method pointer for callbacks */
#ifndef Py_LIMITED_API
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
#else
    PyObject* pystr_doc = PyObject_GetAttrString(obj, "__doc__");
    PyObject *bytes = NULL;
    const char *doc = pystr_doc ? SWIG_PyUnicode_AsUTF8AndSize(pystr_doc, NULL, &bytes) : 0;
#endif
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
#ifdef Py_LIMITED_API
    SWIG_Py_XDECREF(bytes);
    SWIG_Py_XDECREF(pystr_doc);
#endif
    if (!desc)
      return SWIG_ERROR;
    tc = SWIG_TypeCheck(desc,ty);
    if (tc) {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
    } else {
      return SWIG_ERROR;
    }
    return SWIG_OK;
  }
}

/* Convert a packed pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  if (!to) return SWIG_ERROR;
  if (ty) {
    if (to != ty) {
      /* check type cast? */
      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
      if (!tc) return SWIG_ERROR;
    }
  }
  return SWIG_OK;
}  

/* -----------------------------------------------------------------------------
 * Create a new pointer object
 * ----------------------------------------------------------------------------- */

/*
  Create a new instance object, without calling __init__, and set the
  'this' attribute.
*/

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
        PyObject *dict = *dictptr;
        if (dict == NULL) {
          dict = PyDict_New();
          *dictptr = dict;
        }
        if (dict) {
          PyDict_SetItem(dict, SWIG_This(), swig_this);
        } else{
          SWIG_Py_DECREF(inst);
          inst = 0;
        }
      }
#else
      if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
        SWIG_Py_DECREF(inst);
        inst = 0;
      }
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *empty_args = PyTuple_New(0);
    if (empty_args) {
      PyObject *empty_kwargs = PyDict_New();
      if (empty_kwargs) {
#ifndef Py_LIMITED_API
        newfunc newfn = ((PyTypeObject *)data->newargs)->tp_new;
#else
        newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new);
#endif
        inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
        SWIG_Py_DECREF(empty_kwargs);
        if (inst) {
          if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
            SWIG_Py_DECREF(inst);
            inst = 0;
          } else {
            PyType_Modified(Py_TYPE(inst));
          }
        }
      }
      SWIG_Py_DECREF(empty_args);
    }
#else
    PyObject *dict = PyDict_New();
    if (dict) {
      PyDict_SetItem(dict, SWIG_This(), swig_this);
      inst = PyInstance_NewRaw(data->newargs, dict);
      SWIG_Py_DECREF(dict);
    }
#endif
  }
  return inst;
}

SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  PyObject **dictptr = _PyObject_GetDictPtr(inst);
  if (dictptr != NULL) {
    PyObject *dict = *dictptr;
    if (dict == NULL) {
      dict = PyDict_New();
      *dictptr = dict;
    }
    if (dict) {
      return PyDict_SetItem(dict, SWIG_This(), swig_this);
    } else{
      return -1;
    }
  }
#endif
  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
} 


SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) {
  PyObject *obj[2];
  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    return NULL;
  } else {
    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    if (sthis) {
      SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1]));
    } else {
      if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
        return NULL;
    }
    return SWIG_Py_Void();
  }
}

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  SwigPyClientData *clientdata;
  PyObject * robj;
  int own;

  if (!ptr)
    return SWIG_Py_Void();

  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  if (clientdata && clientdata->pytype) {
    SwigPyObject *newobj;
    if (flags & SWIG_BUILTIN_TP_INIT) {
      newobj = (SwigPyObject*) self;
      if (newobj->ptr) {
#ifndef Py_LIMITED_API
        allocfunc alloc = clientdata->pytype->tp_alloc;
#else
        allocfunc alloc = (allocfunc)PyType_GetSlot(clientdata->pytype, Py_tp_alloc);
#endif
        PyObject *next_self = alloc(clientdata->pytype, 0);
        while (newobj->next)
	  newobj = (SwigPyObject *) newobj->next;
        newobj->next = next_self;
        newobj = (SwigPyObject *)next_self;
        newobj->swigdict = 0;
        newobj->weakreflist = 0;
      }
    } else {
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
      if (newobj) {
        newobj->swigdict = 0;
        newobj->weakreflist = 0;
      }
    }
    if (newobj) {
      newobj->ptr = ptr;
      newobj->ty = type;
      newobj->own = own;
      newobj->next = 0;
      return (PyObject*) newobj;
    }
    return SWIG_Py_Void();
  }

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

  robj = SwigPyObject_New(ptr, type, own);
  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    SWIG_Py_DECREF(robj);
    robj = inst;
  }
  return robj;
}

/* Create a new packed object */

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}

/* -----------------------------------------------------------------------------*
 *  Get type list 
 * -----------------------------------------------------------------------------*/

#ifdef SWIG_LINK_RUNTIME
void *SWIG_ReturnGlobalTypeList(void *);
#endif

static PyObject *Swig_TypeCache_global = NULL;

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  if (Swig_TypeCache_global == NULL) {
    Swig_TypeCache_global = PyDict_New();
  }
  return Swig_TypeCache_global;
}

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
#ifdef SWIG_LINK_RUNTIME
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  }
#else
  void *type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  if (PyErr_Occurred()) {
    PyErr_Clear();
    type_pointer = (void *)0;
  }
#endif
  return (swig_module_info *) type_pointer;
}


#if defined(SWIG_REFCNT_DEBUG)
#define SWIG_PYOBJ_REFCNT(OBJ) fprintf(stdout, "" #OBJ " count %ld\n", (OBJ ? Py_REFCNT(OBJ) : 0))
#else
#define SWIG_PYOBJ_REFCNT(OBJ)
#endif

static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */

SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject *obj)
{
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  swig_type_info **types = swig_module->types;
  size_t i;
  if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */
    return;
  for (i = 0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      ty->clientdata = 0;
      if (data) SwigPyClientData_Del(data);
    }
  }
  SWIG_PYOBJ_REFCNT(Swig_This_global);
  SWIG_Py_XDECREF(Swig_This_global);
  Swig_This_global = NULL;

  SWIG_PYOBJ_REFCNT(Swig_Globals_global);
  SWIG_Py_XDECREF(Swig_Globals_global);
  Swig_Globals_global = NULL;

  SWIG_PYOBJ_REFCNT(Swig_TypeCache_global);
  SWIG_Py_XDECREF(Swig_TypeCache_global);
  Swig_TypeCache_global = NULL;

  SWIG_PYOBJ_REFCNT(Swig_Capsule_global);
  Swig_Capsule_global = NULL;

  SWIG_PYOBJ_REFCNT(Swig_runtime_data_module_global);
  SWIG_Py_XDECREF(Swig_runtime_data_module_global);
  Swig_runtime_data_module_global = NULL;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
  PyObject *runtime_data_module = SWIG_runtime_data_module();
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && runtime_data_module) {
    if (PyModule_AddObject(runtime_data_module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) {
      ++interpreter_counter;
      Swig_Capsule_global = pointer;
    } else {
      SWIG_Py_DECREF(pointer);
    }
  } else {
    SWIG_Py_XDECREF(pointer);
  }
}

SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char *type)
{
  swig_type_info *descriptor;
  PyObject *cache = SWIG_Python_TypeCache();
  PyObject *obj;
  SWIG_PyDict_GetItemStringRef(cache, type, &obj);
  if (obj) {
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  } else {
    swig_module_info *swig_module = SWIG_GetModule(0);
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
      if (obj) PyDict_SetItemString(cache, type, obj);
    }
  }
  SWIG_Py_XDECREF(obj);
  return descriptor;
}

/* 
   For backward compatibility only
*/
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)

SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{  
  if (PyErr_Occurred()) {
    PyObject *type = 0;
    PyObject *value = 0;
    PyObject *traceback = 0;
    PyErr_Fetch(&type, &value, &traceback);
    if (value) {
      PyObject *old_str = PyObject_Str(value);
      PyObject *bytes = NULL;
      const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
      const char *errmesg = tmp ? tmp : "Invalid error message";
      SWIG_Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, errmesg);
      } else {
	PyErr_Format(type, "%s %s", errmesg, mesg);
      }
      SWIG_Py_XDECREF(bytes);
      SWIG_Py_DECREF(old_str);
    }
    return 1;
  } else {
    return 0;
  }
}
  
SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)
{
  if (PyErr_Occurred()) {
    /* add information about failing argument */
    char mesg[256];
    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    return SWIG_Python_AddErrMesg(mesg, 1);
  } else {
    return 0;
  }
}

SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject *self)
{
  SwigPyObject *v = (SwigPyObject *)self;
  swig_type_info *ty = v ? v->ty : 0;
  return ty ? ty->str : "";
}

/* Convert a pointer value, signal an exception on a type mismatch */
SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  void *result;
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    PyErr_Clear();
  }
  return result;
}

#ifdef SWIGPYTHON_BUILTIN
SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  PyTypeObject *tp = Py_TYPE(obj);
  PyObject *descr;
  PyObject *encoded_name;
  descrsetfunc f;
  int res = -1;

# ifdef Py_USING_UNICODE
  if (PyString_Check(name)) {
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    if (!name)
      return -1;
  } else if (!PyUnicode_Check(name))
# else
  if (!PyString_Check(name))
# endif
  {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *tpname = SWIG_PyType_GetFullyQualifiedName(Py_TYPE(name));
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%S'", tpname);
    SWIG_Py_DECREF(tpname);
#else
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%s'", Py_TYPE(name)->tp_name);
#endif
    return -1;
  } else {
    SWIG_Py_INCREF(name);
  }

  if (!tp->tp_dict) {
    if (PyType_Ready(tp) != 0)
      goto done;
  }

  descr = _PyType_Lookup(tp, name);
  f = NULL;
  if (descr != NULL)
    f = Py_TYPE(descr)->tp_descr_set;
  if (!f) {
    if (PyString_Check(name)) {
      encoded_name = name;
      SWIG_Py_INCREF(name);
    } else {
      encoded_name = PyUnicode_AsUTF8String(name);
      if (!encoded_name)
        goto done;
    }
#if PY_VERSION_HEX >= 0x03000000
    {
      PyObject *tpname = SWIG_PyType_GetFullyQualifiedName(tp);
      PyErr_Format(PyExc_AttributeError, "'%S' object has no attribute '%s'", tpname, PyString_AsString(encoded_name));
      SWIG_Py_DECREF(tpname);
    }
#else
    PyErr_Format(PyExc_AttributeError, "'%s' object has no attribute '%s'", tp->tp_name, PyString_AsString(encoded_name));
#endif
    SWIG_Py_DECREF(encoded_name);
  } else {
    res = f(descr, obj, value);
  }
  
  done:
  SWIG_Py_DECREF(name);
  return res;
}
#endif


#ifdef __cplusplus
}
#endif



#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0) 



  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_CPLErrorHandler swig_types[0]
#define SWIGTYPE_p_CPLVirtualMemShadow swig_types[1]
#define SWIGTYPE_p_CPLXMLNode swig_types[2]
#define SWIGTYPE_p_DirEntry swig_types[3]
#define SWIGTYPE_p_GByte swig_types[4]
#define SWIGTYPE_p_GDALAlgorithmArgHS swig_types[5]
#define SWIGTYPE_p_GDALAlgorithmHS swig_types[6]
#define SWIGTYPE_p_GDALAlgorithmRegistryHS swig_types[7]
#define SWIGTYPE_p_GDALArgDatasetValueHS swig_types[8]
#define SWIGTYPE_p_GDALAsyncReaderShadow swig_types[9]
#define SWIGTYPE_p_GDALAttributeHS swig_types[10]
#define SWIGTYPE_p_GDALBuildVRTOptions swig_types[11]
#define SWIGTYPE_p_GDALColorEntry swig_types[12]
#define SWIGTYPE_p_GDALColorTableShadow swig_types[13]
#define SWIGTYPE_p_GDALComputedRasterBandShadow swig_types[14]
#define SWIGTYPE_p_GDALContourOptions swig_types[15]
#define SWIGTYPE_p_GDALDEMProcessingOptions swig_types[16]
#define SWIGTYPE_p_GDALDatasetShadow swig_types[17]
#define SWIGTYPE_p_GDALDimensionHS swig_types[18]
#define SWIGTYPE_p_GDALDriverShadow swig_types[19]
#define SWIGTYPE_p_GDALEDTComponentHS swig_types[20]
#define SWIGTYPE_p_GDALExtendedDataTypeClass swig_types[21]
#define SWIGTYPE_p_GDALExtendedDataTypeHS swig_types[22]
#define SWIGTYPE_p_GDALExtendedDataTypeSubType swig_types[23]
#define SWIGTYPE_p_GDALFootprintOptions swig_types[24]
#define SWIGTYPE_p_GDALGridOptions swig_types[25]
#define SWIGTYPE_p_GDALGroupHS swig_types[26]
#define SWIGTYPE_p_GDALInfoOptions swig_types[27]
#define SWIGTYPE_p_GDALMDArrayHS swig_types[28]
#define SWIGTYPE_p_GDALMDArrayRawBlockInfo swig_types[29]
#define SWIGTYPE_p_GDALMajorObjectShadow swig_types[30]
#define SWIGTYPE_p_GDALMultiDimInfoOptions swig_types[31]
#define SWIGTYPE_p_GDALMultiDimTranslateOptions swig_types[32]
#define SWIGTYPE_p_GDALNearblackOptions swig_types[33]
#define SWIGTYPE_p_GDALProgressFunc swig_types[34]
#define SWIGTYPE_p_GDALRATDateTime swig_types[35]
#define SWIGTYPE_p_GDALRasterAlgebraBinaryOperation swig_types[36]
#define SWIGTYPE_p_GDALRasterAlgebraUnaryOperation swig_types[37]
#define SWIGTYPE_p_GDALRasterAttributeTableShadow swig_types[38]
#define SWIGTYPE_p_GDALRasterBandShadow swig_types[39]
#define SWIGTYPE_p_GDALRasterizeOptions swig_types[40]
#define SWIGTYPE_p_GDALRelationshipShadow swig_types[41]
#define SWIGTYPE_p_GDALSubdatasetInfo swig_types[42]
#define SWIGTYPE_p_GDALTileIndexOptions swig_types[43]
#define SWIGTYPE_p_GDALTransformerInfoShadow swig_types[44]
#define SWIGTYPE_p_GDALTranslateOptions swig_types[45]
#define SWIGTYPE_p_GDALVectorInfoOptions swig_types[46]
#define SWIGTYPE_p_GDALVectorTranslateOptions swig_types[47]
#define SWIGTYPE_p_GDALViewshedMode swig_types[48]
#define SWIGTYPE_p_GDALViewshedOutputType swig_types[49]
#define SWIGTYPE_p_GDALWarpAppOptions swig_types[50]
#define SWIGTYPE_p_GDAL_GCP swig_types[51]
#define SWIGTYPE_p_GIntBig swig_types[52]
#define SWIGTYPE_p_GUIntBig swig_types[53]
#define SWIGTYPE_p_OGRFeatureShadow swig_types[54]
#define SWIGTYPE_p_OGRFieldDomainShadow swig_types[55]
#define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[56]
#define SWIGTYPE_p_OGRGeometryShadow swig_types[57]
#define SWIGTYPE_p_OGRLayerShadow swig_types[58]
#define SWIGTYPE_p_OGRStyleTableShadow swig_types[59]
#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[60]
#define SWIGTYPE_p_StatBuf swig_types[61]
#define SWIGTYPE_p_Statistics swig_types[62]
#define SWIGTYPE_p_SuggestedWarpOutputRes swig_types[63]
#define SWIGTYPE_p_VSIDIR swig_types[64]
#define SWIGTYPE_p_VSILFILE swig_types[65]
#define SWIGTYPE_p_bool swig_types[66]
#define SWIGTYPE_p_char swig_types[67]
#define SWIGTYPE_p_double swig_types[68]
#define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[69]
#define SWIGTYPE_p_int swig_types[70]
#define SWIGTYPE_p_long_long swig_types[71]
#define SWIGTYPE_p_p_GByte swig_types[72]
#define SWIGTYPE_p_p_GDALComputedRasterBandShadow swig_types[73]
#define SWIGTYPE_p_p_GDALDatasetShadow swig_types[74]
#define SWIGTYPE_p_p_GDALDimensionHS swig_types[75]
#define SWIGTYPE_p_p_GDALEDTComponentHS swig_types[76]
#define SWIGTYPE_p_p_GDALMDArrayHS swig_types[77]
#define SWIGTYPE_p_p_GDALRasterBandShadow swig_types[78]
#define SWIGTYPE_p_p_GDAL_GCP swig_types[79]
#define SWIGTYPE_p_p_GUIntBig swig_types[80]
#define SWIGTYPE_p_p_OGRLayerShadow swig_types[81]
#define SWIGTYPE_p_p_OSRSpatialReferenceShadow swig_types[82]
#define SWIGTYPE_p_p_char swig_types[83]
#define SWIGTYPE_p_p_double swig_types[84]
#define SWIGTYPE_p_p_int swig_types[85]
#define SWIGTYPE_p_p_long_long swig_types[86]
#define SWIGTYPE_p_p_p_GDALAttributeHS swig_types[87]
#define SWIGTYPE_p_p_p_GDALDimensionHS swig_types[88]
#define SWIGTYPE_p_p_p_GDALEDTComponentHS swig_types[89]
#define SWIGTYPE_p_p_p_GDALMDArrayHS swig_types[90]
#define SWIGTYPE_p_p_void swig_types[91]
#define SWIGTYPE_p_size_t swig_types[92]
#define SWIGTYPE_p_vsi_l_offset swig_types[93]
static swig_type_info *swig_types[95];
static swig_module_info swig_module = {swig_types, 94, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#ifdef SWIG_TypeQuery
# undef SWIG_TypeQuery
#endif
#define SWIG_TypeQuery SWIG_Python_TypeQuery

/*-----------------------------------------------
              @(target):= _gdal.so
  ------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_init    PyInit__gdal

#else
#  define SWIG_init    init_gdal

#endif

#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigSmartPointer {
    T *ptr;
    SwigSmartPointer(T *p) : ptr(p) { }
    ~SwigSmartPointer() { delete ptr; }
    SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
    void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
  SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
  operator T&&() const { return std::move(*pointer.ptr); }
#else
  operator T&() const { return *pointer.ptr; }
#endif
  T *operator&() const { return pointer.ptr; }
  static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
};

/*
 * SwigValueInit() is a generic initialisation solution as the following approach:
 * 
 *       T c_result = T();
 * 
 * doesn't compile for all types for example:
 * 
 *       unsigned int c_result = unsigned int();
 */
template <typename T> T SwigValueInit() {
  return T();
}

#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif

#endif

#if defined(__cplusplus) && (__cplusplus >=201103L)
# define SWIG_OVERRIDE override
#else
# define SWIG_OVERRIDE
#endif



#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 


#include <stdexcept>


namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    SwigPtr_PyObject() :_obj(0)
    {
    }

    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      SWIG_Py_XINCREF(_obj);
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    {
      if (initial_ref) {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        SWIG_Py_XINCREF(_obj);
        SWIG_PYTHON_THREAD_END_BLOCK;
      }
    }
    
    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      SWIG_Py_XINCREF(item._obj);
      SWIG_Py_XDECREF(_obj);
      _obj = item._obj;
      SWIG_PYTHON_THREAD_END_BLOCK;
      return *this;      
    }
    
    ~SwigPtr_PyObject() 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      SWIG_Py_XDECREF(_obj);
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    operator PyObject *() const
    {
      return _obj;
    }

    PyObject *operator->() const
    {
      return _obj;
    }
  };
}


namespace swig {
  struct SwigVar_PyObject : SwigPtr_PyObject {
    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    
    SwigVar_PyObject & operator = (PyObject* obj)
    {
      SWIG_Py_XDECREF(_obj);
      _obj = obj;
      return *this;      
    }
  };
}


#include <iostream>
#include <vector>
using namespace std;

#define CPL_SUPRESS_CPLUSPLUS

// Suppress deprecation warning for GDALApplyVerticalShiftGrid
#define CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid(x)

#include "cpl_port.h"
#include "cpl_string.h"
#include "cpl_multiproc.h"
#include "cpl_http.h"
#include "cpl_vsi_error.h"

#include "gdal.h"
#include "gdal_alg.h"

#include "gdalwarper.h"
#include "ogr_srs_api.h"

// From gdal_priv.h
void CPL_DLL GDALEnablePixelTypeSignedByteWarning(GDALRasterBandH hBand, bool b);

typedef void GDALMajorObjectShadow;
typedef void GDALDriverShadow;
typedef void GDALDatasetShadow;
typedef void GDALRasterBandShadow;
typedef void GDALComputedRasterBandShadow;
typedef void GDALColorTableShadow;
typedef void GDALRasterAttributeTableShadow;
typedef void GDALSubdatasetInfoShadow;
typedef void GDALTransformerInfoShadow;
typedef void GDALAsyncReaderShadow;
typedef void GDALRelationshipShadow;

typedef GDALExtendedDataTypeHS GDALExtendedDataTypeHS;
typedef GDALEDTComponentHS GDALEDTComponentHS;
typedef GDALGroupHS GDALGroupHS;
typedef GDALMDArrayHS GDALMDArrayHS;
typedef GDALAttributeHS GDALAttributeHS;
typedef GDALDimensionHS GDALDimensionHS;



#ifdef DEBUG
typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
typedef struct OGRLayerHS OGRLayerShadow;
typedef struct OGRFeatureHS OGRFeatureShadow;
typedef struct OGRGeometryHS OGRGeometryShadow;
#else
typedef void OSRSpatialReferenceShadow;
typedef void OGRLayerShadow;
typedef void OGRFeatureShadow;
typedef void OGRGeometryShadow;
#endif

typedef struct OGRStyleTableHS OGRStyleTableShadow;
typedef struct OGRFieldDomainHS OGRFieldDomainShadow;
typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;


/* use this to not return the int returned by GDAL */
typedef int RETURN_NONE;
/* return value that is used for VSI methods that return -1 on error (and set errno) */
typedef int VSI_RETVAL;


SWIGINTERNINLINE PyObject*
  SWIG_From_int  (int value)
{
  return PyInt_FromLong((long) value);
}


static int getAlignment(GDALDataType ntype)
{
    switch(ntype)
    {
        case GDT_Unknown:
            break; // shouldn't happen
        case GDT_Byte:
        case GDT_Int8:
            return 1;
        case GDT_Int16:
        case GDT_UInt16:
        case GDT_Float16:
            return 2;
        case GDT_Int32:
        case GDT_UInt32:
        case GDT_Float32:
            return 4;
        case GDT_Float64:
        case GDT_Int64:
        case GDT_UInt64:
            return 8;
        case GDT_CInt16:
        case GDT_CFloat16:
            return 2;
        case GDT_CInt32:
        case GDT_CFloat32:
            return 4;
        case GDT_CFloat64:
            return 8;
        case GDT_TypeCount:
            break; // shouldn't happen
    }
    // shouldn't happen
    CPLAssert(false);
    return 1;
}

static bool readraster_acquirebuffer(void** buf,
                                     void*& inputOutputBuf,
                                     size_t buf_size,
                                     GDALDataType ntype,
                                     int l_bUseExceptions,
                                     char*& data,
                                     Py_buffer& view)
{
    SWIG_PYTHON_THREAD_BEGIN_BLOCK;

    if( inputOutputBuf == Py_None )
        inputOutputBuf = NULL;

    if( inputOutputBuf )
    {
        if (PyObject_GetBuffer( (PyObject*)inputOutputBuf, &view,
                                PyBUF_SIMPLE | PyBUF_WRITABLE) == 0)
        {
            if( static_cast<GUIntBig>(view.len) < buf_size )
            {
                PyBuffer_Release(&view);
                SWIG_PYTHON_THREAD_END_BLOCK;
                CPLError(CE_Failure, CPLE_AppDefined,
                    "buf_obj length is " CPL_FRMT_GUIB " bytes. "
                    "It should be at least " CPL_FRMT_GUIB,
                    static_cast<GUIntBig>(view.len),
                    static_cast<GUIntBig>(buf_size));
                return false;
            }
            data = (char*)view.buf;
            if( (reinterpret_cast<uintptr_t>(data) % getAlignment(ntype)) != 0 )
            {
                PyBuffer_Release(&view);
                SWIG_PYTHON_THREAD_END_BLOCK;
                CPLError(CE_Failure, CPLE_AppDefined,
                         "buffer has not the appropriate alignment");
                return false;
            }
        }
        else
        {
            PyErr_Clear();
            SWIG_PYTHON_THREAD_END_BLOCK;
            CPLError(CE_Failure, CPLE_AppDefined,
                     "buf_obj is not a simple writable buffer");
            return false;
        }
    }
    else
    {
        *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
        if (*buf == NULL)
        {
            *buf = Py_None;
            if( !l_bUseExceptions )
            {
                PyErr_Clear();
            }
            SWIG_PYTHON_THREAD_END_BLOCK;
            CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
            return false;
        }
        data = PyByteArray_AsString( (PyObject *)*buf );
    }
    SWIG_PYTHON_THREAD_END_BLOCK;
    return true;
}

static void readraster_releasebuffer(CPLErr eErr,
                                     void** buf,
                                     void* inputOutputBuf,
                                     Py_buffer& view)
{
    SWIG_PYTHON_THREAD_BEGIN_BLOCK;

    if( inputOutputBuf )
        PyBuffer_Release(&view);

    if (eErr == CE_Failure)
    {
        if( inputOutputBuf == NULL )
            Py_DECREF((PyObject*)*buf);
        *buf = NULL;
    }
    else if( inputOutputBuf )
    {
        *buf = inputOutputBuf;
        Py_INCREF((PyObject*)*buf);
    }

    SWIG_PYTHON_THREAD_END_BLOCK;
}



#define MODULE_NAME           "gdal"


#include "cpl_string.h"
#include "cpl_conv.h"

static int bUseExceptions=0;
static int bUserHasSpecifiedIfUsingExceptions = FALSE;
static thread_local int bUseExceptionsLocal = -1;

struct PythonBindingErrorHandlerContext
{
    std::string     osInitialMsg{};
    std::string     osFailureMsg{};
    CPLErrorNum     nLastCode = CPLE_None;
    bool            bMemoryError = false;
};

static void CPL_STDCALL
PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
{
  PythonBindingErrorHandlerContext* ctxt = static_cast<
      PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());

  /*
  ** Generally we want to suppress error reporting if we have exceptions
  ** enabled as the error message will be in the exception thrown in
  ** Python.
  */

  /* If the error class is CE_Fatal, we want to have a message issued
     because the CPL support code does an abort() before any exception
     can be generated */
  if (eclass == CE_Fatal ) {
    CPLCallPreviousHandler(eclass, err_no, msg );
  }

  /*
  ** We do not want to interfere with non-failure messages since
  ** they won't be translated into exceptions.
  */
  else if (eclass != CE_Failure ) {
    CPLCallPreviousHandler(eclass, err_no, msg );
  }
  else {
    ctxt->nLastCode = err_no;
    try
    {
        if( ctxt->osFailureMsg.empty() ) {
          ctxt->osFailureMsg = msg;
          ctxt->osInitialMsg = ctxt->osFailureMsg;
        } else {
          if( ctxt->osFailureMsg.size() < 10000 ) {
            std::string osTmp(msg);
            osTmp += "\nMay be caused by: ";
            osTmp += ctxt->osFailureMsg;
            ctxt->osFailureMsg = std::move(osTmp);
            ctxt->osInitialMsg = ctxt->osFailureMsg;
          }
          else
          {
            std::string osTmp(msg);
            osTmp += "\n[...]\nMay be caused by: ";
            osTmp += ctxt->osInitialMsg;
            ctxt->osFailureMsg = std::move(osTmp);
          }
        }
    }
    catch( const std::exception& )
    {
        ctxt->bMemoryError = true;
    }
  }
}




static
int GetUseExceptions() {
  return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
}

static int _GetExceptionsLocal()
{
  return bUseExceptionsLocal;
}

static void _SetExceptionsLocal(int bVal)
{
  bUseExceptionsLocal = bVal;
}

static
void _UseExceptions() {
  CPLErrorReset();
  bUserHasSpecifiedIfUsingExceptions = TRUE;
  if( !bUseExceptions )
  {
    bUseExceptions = 1;
  }
}

static
void _DontUseExceptions() {
  CPLErrorReset();
  bUserHasSpecifiedIfUsingExceptions = TRUE;
  if( bUseExceptions )
  {
    bUseExceptions = 0;
  }
}

static int _UserHasSpecifiedIfUsingExceptions()
{
    return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
}



#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
  int res = SWIG_TypeError;
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AsDouble(obj);
    return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
  } else if (PyInt_Check(obj)) {
    if (val) *val = (double) PyInt_AsLong(obj);
    return SWIG_OK;
#endif
  } else if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    double d = PyFloat_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = d;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      long v = PyLong_AsLong(obj);
      if (!PyErr_Occurred()) {
	if (val) *val = v;
	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
      } else {
	PyErr_Clear();
      }
    }
  }
#endif
  return res;
}


#include <errno.h>


#include <float.h>


#include <math.h>


SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double *d, double min, double max) {
  double x = *d;
  if ((min <= x && x <= max)) {
   double fx, cx, rd;
   errno = 0;
   fx = floor(x);
   cx = ceil(x);
   rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
   if ((errno == EDOM) || (errno == ERANGE)) {
     errno = 0;
   } else {
     double summ, reps, diff;
     if (rd < x) {
       diff = x - rd;
     } else if (rd > x) {
       diff = rd - x;
     } else {
       return 1;
     }
     summ = rd + x;
     reps = diff/summ;
     if (reps < 8*DBL_EPSILON) {
       *d = rd;
       return 1;
     }
   }
  }
  return 0;
}


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else
#endif
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      // Largest double not larger than LONG_MAX (not portably calculated easily)
      // Note that double(LONG_MAX) is stored in a double rounded up by one (for 64-bit long)
      // 0x7ffffffffffffc00LL == (int64_t)std::nextafter(double(__uint128_t(LONG_MAX)+1), double(0))
      const double long_max = sizeof(long) == 8 ? 0x7ffffffffffffc00LL : LONG_MAX;
      // No equivalent needed for 64-bit double(LONG_MIN) is exactly LONG_MIN
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, long_max)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< int >(v);
    }
  }  
  return res;
}


/* Completely unrelated: just to avoid Coverity warnings */

static int bReturnSame = 1;

void NeverCallMePlease() {
    bReturnSame = 0;
}

/* Some SWIG code generates dead code, which Coverity warns about */
template<class T> static T ReturnSame(T x)
{
    if( bReturnSame )
        return x;
    return 0;
}

static void pushErrorHandler()
{
    CPLErrorReset();
    PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
}

static void popErrorHandler()
{
    PythonBindingErrorHandlerContext* ctxt = static_cast<
      PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    CPLPopErrorHandler();
    if( ctxt->bMemoryError )
    {
        CPLErrorSetState(
          CE_Failure, CPLE_OutOfMemory, "Out of memory");
    }
    else if( !ctxt->osFailureMsg.empty() )
    {
      CPLErrorSetState(
          CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
          ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    }
    delete ctxt;
}




/* Return a PyObject* from a NULL terminated C String */
static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
{
  const unsigned char* pszIter = (const unsigned char*) pszStr;
  while(*pszIter != 0)
  {
    if (*pszIter > 127)
    {
        PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
        if (pyObj != NULL && !PyErr_Occurred())
            return pyObj;
        PyErr_Clear();
        return PyBytes_FromString(pszStr);
    }
    pszIter ++;
  }
  return PyUnicode_FromString(pszStr);
}

/* Return a NULL terminated c String from a PyObject */
/* Result must be freed with GDALPythonFreeCStr */
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
{
  *pbToFree = 0;
  if (PyUnicode_Check(pyObject))
  {
      char *pszStr;
      char *pszNewStr;
      Py_ssize_t nLen;
      PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
      if( pyUTF8Str == NULL )
        return NULL;
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
      pszNewStr = (char *) malloc(nLen+1);
      if( pszNewStr == NULL )
      {
          CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
                   (unsigned long long)(nLen + 1));
          Py_XDECREF(pyUTF8Str);
          return NULL;
      }
      memcpy(pszNewStr, pszStr, nLen+1);
      Py_XDECREF(pyUTF8Str);
      *pbToFree = 1;
      return pszNewStr;
  }
  else if( PyBytes_Check(pyObject) )
  {
      char* ret = PyBytes_AsString(pyObject);

      // Check if there are \0 bytes inside the string
      const Py_ssize_t size = PyBytes_Size(pyObject);
      for( Py_ssize_t i = 0; i < size; i++ )
      {
          if( ret[i] == 0 )
          {
              CPLError(CE_Failure, CPLE_AppDefined,
                       "bytes object cast as string contains a zero-byte.");
              return NULL;
          }
      }

      return ret;
  }
  else
  {
      CPLError(CE_Failure, CPLE_AppDefined,
               "Passed object is neither of type string nor bytes");
      return NULL;
  }
}

static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
{
    PyObject* os = PyImport_ImportModule("os");
    if (os == NULL)
    {
        return NULL;
    }

    PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    if (pathLike == NULL)
    {
        Py_DECREF(os);
        return NULL;
    }

    if (!PyObject_IsInstance(pyObject, pathLike))
    {
        Py_DECREF(pathLike);
        Py_DECREF(os);
        return NULL;
    }

    PyObject* str = PyObject_Str(pyObject);
    char* ret = NULL;
    if (str != NULL)
    {
        ret = GDALPythonObjectToCStr(str, pbToFree);
        Py_DECREF(str);
    }

    Py_DECREF(pathLike);
    Py_DECREF(os);

    return ret;
}


static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
static void GDALPythonFreeCStr(void* ptr, int bToFree)
{
   if (bToFree)
       free(ptr);
}



unsigned int wrapper_VSIFReadL( void **buf, unsigned int nMembSize, unsigned int nMembCount, VSILFILE *fp)
{
    size_t buf_size = static_cast<size_t>(nMembSize) * nMembCount;
    if( buf_size > 0xFFFFFFFFU )
   {
        CPLError(CE_Failure, CPLE_AppDefined, "Too big request");
        *buf = NULL;
        return 0;
    }

    if (buf_size == 0)
    {
        *buf = NULL;
        return 0;
    }

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    if (*buf == NULL)
    {
        *buf = Py_None;
        if( !GetUseExceptions() )
        {
            PyErr_Clear();
        }
        SWIG_PYTHON_THREAD_END_BLOCK;
        CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
        return 0;
    }
    PyObject* o = (PyObject*) *buf;
    char *data = PyByteArray_AsString(o);
    SWIG_PYTHON_THREAD_END_BLOCK;
    size_t nRet = (size_t)VSIFReadL( data, nMembSize, nMembCount, fp );
    if (nRet * (size_t)nMembSize < buf_size)
    {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        PyByteArray_Resize(o, nRet * nMembSize);
        SWIG_PYTHON_THREAD_END_BLOCK;
        *buf = o;
    }
    return static_cast<unsigned int>(nRet);
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else
#endif
  if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      // Largest double not larger than ULONG_MAX (not portably calculated easily)
      // Note that double(ULONG_MAX) is stored in a double rounded up by one (for 64-bit unsigned long)
      // 0xfffffffffffff800ULL == (uint64_t)std::nextafter(double(__uint128_t(ULONG_MAX)+1), double(0))
      const double ulong_max = sizeof(unsigned long) == 8 ? 0xfffffffffffff800ULL : ULONG_MAX;
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ulong_max)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > UINT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< unsigned int >(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject*
  SWIG_From_unsigned_SS_int  (unsigned int value)
{
  return PyInt_FromSize_t((size_t) value);
}


void wrapper_VSIGetMemFileBuffer(const char *utf8_path, GByte **out, vsi_l_offset *length)
{
    *out = VSIGetMemFileBuffer(utf8_path, length, 0);
}


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static swig_type_info* info = 0;
  if (!info) {
    info = SWIG_TypeQuery("_p_char");
  }
  return info;
}


/* Return string from Python obj. NOTE: obj must remain in scope in order
   to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */
SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
{
#if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  if (PyBytes_Check(obj))
#else
  if (PyUnicode_Check(obj))
#endif
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
    PyObject *bytes = NULL;
    int ret = SWIG_OK;
    if (alloc)
      *alloc = SWIG_OLDOBJ;
#if PY_VERSION_HEX >= 0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#else
    cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes);
    if (!cstr)
      return SWIG_TypeError;
    /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */
    if (bytes && cptr) {
      if (alloc) {
        cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
        *alloc = SWIG_NEWOBJ;
      } else {
        /* alloc must be set in order to clean up allocated memory */
        return SWIG_RuntimeError;
      }
    }
#endif
    if (cptr) *cptr = cstr;
    if (psize) *psize = len + 1;
    SWIG_Py_XDECREF(bytes);
    return ret;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX < 0x03000000
    if (PyUnicode_Check(obj)) {
      char *cstr; Py_ssize_t len;
      if (!alloc && cptr) {
        return SWIG_RuntimeError;
      }
      obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
      if (!obj)
        return SWIG_TypeError;
      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
        if (cptr) {
          if (alloc) *alloc = SWIG_NEWOBJ;
          *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
        }
        if (psize) *psize = len + 1;

        SWIG_Py_XDECREF(obj);
        return SWIG_OK;
      } else {
        SWIG_Py_XDECREF(obj);
      }
    }
#endif
#endif

    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *) vptr;
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}






typedef struct {
    PyObject *psPyCallback;
    PyObject *psPyCallbackData;
    int nLastReported;
} PyProgressData;

/************************************************************************/
/*                          PyProgressProxy()                           */
/************************************************************************/


static int CPL_STDCALL
PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;

static int CPL_STDCALL
PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )

{
    PyProgressData *psInfo = (PyProgressData *) pData;
    PyObject *psArgs, *psResult;
    int      bContinue = TRUE;

    if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
        return TRUE;

    if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
        return TRUE;

    psInfo->nLastReported = (int) (100.0 * dfComplete);

    if( pszMessage == NULL )
        pszMessage = "";

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;

    if( psInfo->psPyCallbackData == NULL )
        psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    else
        psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
                           psInfo->psPyCallbackData );

    psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
    Py_XDECREF(psArgs);

    if( PyErr_Occurred() != NULL )
    {
        PyErr_Print();
        PyErr_Clear();
        SWIG_PYTHON_THREAD_END_BLOCK;
        return FALSE;
    }

    if( psResult == NULL )
    {
        SWIG_PYTHON_THREAD_END_BLOCK;
        return TRUE;
    }

    if( psResult == Py_None )
    {
        SWIG_PYTHON_THREAD_END_BLOCK;
        return TRUE;
    }

    if( !PyArg_Parse( psResult, "i", &bContinue ) )
    {
        PyErr_Clear();
        CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
        Py_XDECREF(psResult);
        SWIG_PYTHON_THREAD_END_BLOCK;
        return FALSE;
    }

    Py_XDECREF(psResult);
    SWIG_PYTHON_THREAD_END_BLOCK;

    return bContinue;
}


typedef char retStringAndCPLFree;


  void Debug( const char *msg_class, const char *message ) {
    CPLDebug( msg_class, "%s", message );
  }


  CPLErr SetErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
  {
    if( pfnErrorHandler == NULL )
    {
        pfnErrorHandler = CPLDefaultErrorHandler;
    }

    CPLSetErrorHandlerEx( pfnErrorHandler, user_data );

    return CE_None;
  }


extern "C" int CPL_DLL GDALIsInGlobalDestructor();

void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, CPLErrorNum err_no, const char* pszErrorMsg)
{
    if( GDALIsInGlobalDestructor() )
    {
        // this is typically during Python interpreter shutdown, and ends up in a crash
        // because error handling tries to do thread initialization.
        return;
    }

    PyObject* callable = (PyObject*)CPLGetErrorHandlerUserData();
    PyObject *psArgs;

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;

    if (!PyCallable_Check(callable))
    {
        PyErr_SetString( PyExc_RuntimeError,
                         "PyCPLErrorHandler: Critical error: callback is not callable" );
    }
    else
    {
        psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
        PyObject_CallObject( callable, psArgs);
        Py_XDECREF(psArgs);
    }

    SWIG_PYTHON_THREAD_END_BLOCK;
}


  CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
  {
    if( pfnErrorHandler == NULL )
        CPLPushErrorHandler(CPLQuietErrorHandler);
    else
        CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    return CE_None;
  }


  void PopErrorHandler()
  {
     void* user_data = CPLGetErrorHandlerUserData();
     if( user_data != NULL )
     {
         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
         Py_XDECREF((PyObject*)user_data);
         SWIG_PYTHON_THREAD_END_BLOCK;
     }
     CPLPopErrorHandler();
  }


  void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    CPLError( msg_class, err_code, "%s", msg );
  }


retStringAndCPLFree* wrapper_EscapeString(int len, char *bin_string , int scheme=CPLES_SQL) {
    return CPLEscapeString(bin_string, len, scheme);
}


static bool
GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
  {
    if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    {
      if( view->len > INT_MAX ) {
        PyBuffer_Release(view);
        PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
        return false;
      }
      *viewIsValid = true;
      *nLen = (int) view->len;
      *pBuf = (char*) view->buf;
      return true;
    }
    else
    {
      PyErr_Clear();
    }
  }
  if (PyUnicode_Check(input))
  {
    size_t safeLen = 0;
    int ret;
    try {
      ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    }
    catch( const std::exception& )
    {
      PyErr_SetString(PyExc_MemoryError, "out of memory");
      return false;
    }
    if (!SWIG_IsOK(ret)) {
      PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
      return false;
    }

    if (safeLen) safeLen--;
    if( safeLen > INT_MAX ) {
      PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
      return false;
    }
    *nLen = (int) safeLen;
    return true;
  }
  else
  {
    PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    return false;
  }
}


void EscapeBinary(int len, char *bin_string, size_t *pnLenOut, char** pOut, int scheme=CPLES_SQL) {
    *pOut = CPLEscapeString(bin_string, len, scheme);
    *pnLenOut = *pOut ? strlen(*pOut) : 0;
}


SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > (size_t)PY_SSIZE_T_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
      return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
      return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#endif
#else
      return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


SWIGINTERNINLINE PyObject * 
SWIG_FromCharPtr(const char *cptr)
{ 
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}


char **wrapper_VSIReadDirEx( const char * utf8_path, int nMaxFiles = 0 )
{
    return VSIReadDirEx(utf8_path, nMaxFiles);
}


static PyObject* CSLToList( char** stringarray, bool *pbErr )
{
  PyObject* res;
  if ( stringarray == NULL ) {
    res = Py_None;
    Py_INCREF( res );
  }
  else {
    int len = CSLCount( stringarray );
    res = PyList_New( len );
    if( !res ) {
      *pbErr = true;
      return res;
    }
    for ( int i = 0; i < len; ++i ) {
      PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
      PyList_SetItem(res, i, o );
    }
  }
  *pbErr = false;
  return res;
}


VSIDIR* wrapper_VSIOpenDir( const char * utf8_path,
                            int nRecurseDepth = -1,
                            char** options = NULL )
{
    return VSIOpenDir(utf8_path, nRecurseDepth, options);
}


/************************************************************************/
/*                         CSLFromPySequence()                          */
/************************************************************************/
static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )

{
  *pbErr = FALSE;
  /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
  if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError,"not a sequence");
    *pbErr = TRUE;
    return NULL;
  }

  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)(INT_MAX - 1) ) {
    PyErr_SetString(PyExc_TypeError, "too big sequence");
    *pbErr = TRUE;
    return NULL;
  }
  if( size == 0 ) {
    return NULL;
  }
  char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
  if( !papszRet ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pbErr = TRUE;
    return NULL;
  }
  for (int i = 0; i < (int)size; i++) {
    PyObject* pyObj = PySequence_GetItem(pySeq,i);
    if (PyUnicode_Check(pyObj))
    {
      char *pszStr;
      Py_ssize_t nLen;
      PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
      if( !pyUTF8Str )
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
      }
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
      papszRet[i] = VSIStrdup(pszStr);
      Py_XDECREF(pyUTF8Str);
    }
    else if (PyBytes_Check(pyObj))
      papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
    else
    {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
    }
    Py_DECREF(pyObj);
    if( !papszRet[i] )
    {
        PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
    }
  }
  return papszRet;
}


static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )

{
    char** retCSL = NULL;
    Py_ssize_t size = PyMapping_Length( pyObj );
    if ( size > 0 && size == (int)size) {
      PyObject *item_list = PyMapping_Items( pyObj );
      for( int i=0; i<(int)size; i++ ) {
        PyObject *it = PySequence_GetItem( item_list, i );

        PyObject *k, *v;
        if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
          Py_DECREF(it);
          Py_DECREF(item_list);
          PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
          CSLDestroy(retCSL);
          *pbErr = TRUE;
          return NULL;
        }

        PyObject* kStr = PyObject_Str(k);
        if( PyErr_Occurred() )
        {
            Py_DECREF(it);
            Py_DECREF(item_list);
            CSLDestroy(retCSL);
            *pbErr = TRUE;
            return NULL;
        }

        PyObject* vStr;
        if( PyBytes_Check(v) )
        {
            vStr = v;
            Py_INCREF(vStr);
        }
        else
        {
            vStr = PyObject_Str(v);
            if( PyErr_Occurred() )
            {
                Py_DECREF(it);
                Py_DECREF(kStr);
                Py_DECREF(item_list);
                CSLDestroy(retCSL);
                *pbErr = TRUE;
                return NULL;
            }
        }

        int bFreeK, bFreeV;
        char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
        char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
        if( pszK == NULL || pszV == NULL )
        {
            GDALPythonFreeCStr(pszK, bFreeK);
            GDALPythonFreeCStr(pszV, bFreeV);
            Py_DECREF(kStr);
            Py_DECREF(vStr);
            Py_DECREF(it);
            Py_DECREF(item_list);
            PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
            CSLDestroy(retCSL);
            *pbErr = TRUE;
            return NULL;
        }
        retCSL = CSLAddNameValue( retCSL, pszK, pszV );

        GDALPythonFreeCStr(pszK, bFreeK);
        GDALPythonFreeCStr(pszV, bFreeV);
        Py_DECREF(kStr);
        Py_DECREF(vStr);
        Py_DECREF(it);
      }
      Py_DECREF(item_list);
    }
    *pbErr = FALSE;
    return retCSL;
}


typedef struct
{
    char*        name;
    int          mode;
    GIntBig      size;
    GIntBig      mtime;
    bool         modeKnown;
    bool         sizeKnown;
    bool         mtimeKnown;
    char**       extra;
} DirEntry;


SWIGINTERNINLINE PyObject*
  SWIG_From_bool  (bool value)
{
  return PyBool_FromLong(value ? 1 : 0);
}


/* Return a PyObject* from a C String */
static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
{
  const unsigned char* pszIter = (const unsigned char*) pszStr;
  for( size_t i = 0; i < nLen; ++i)
  {
    if (pszIter[i] > 127)
    {
        PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
        if (pyObj != NULL && !PyErr_Occurred())
            return pyObj;
        PyErr_Clear();
        return PyBytes_FromStringAndSize(pszStr, nLen);
    }
  }
  return PyUnicode_FromStringAndSize(pszStr, nLen);
}


static PyObject*
GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
  PyObject* dict = PyDict_New();
  if ( stringarray != NULL ) {
    for (char** iter = stringarray; *iter; ++iter ) {
      const char* pszSep = strchr( *iter, '=' );
      if ( pszSep != NULL) {
        const char* keyptr = *iter;
        const char* valptr = pszSep + 1;
        PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
        PyObject *val = GDALPythonObjectFromCStr( valptr );
        PyDict_SetItem(dict, nm, val );
        Py_DECREF(nm);
        Py_DECREF(val);
      }
    }
  }
  if( bFreeCSL )
    CSLDestroy(stringarray);
  return dict;
}

SWIGINTERN DirEntry *new_DirEntry(DirEntry const *entryIn){
    DirEntry *self = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    self->name = CPLStrdup(entryIn->name);
    self->mode = entryIn->mode;
    self->size = entryIn->size;
    self->mtime = entryIn->mtime;
    self->modeKnown = entryIn->modeKnown;
    self->sizeKnown = entryIn->sizeKnown;
    self->mtimeKnown = entryIn->mtimeKnown;
    self->extra = CSLDuplicate(entryIn->extra);
    return self;
  }
SWIGINTERN void delete_DirEntry(DirEntry *self){
    CPLFree(self->name);
    CSLDestroy(self->extra);
    CPLFree(self);
  }
SWIGINTERN bool DirEntry_IsDirectory(DirEntry *self){
     return (self->mode & S_IFDIR) != 0;
  }

DirEntry* wrapper_VSIGetNextDirEntry(VSIDIR* dir)
{
    const VSIDIREntry* vsiEntry = VSIGetNextDirEntry(dir);
    if( vsiEntry == nullptr )
    {
        return nullptr;
    }
    DirEntry* entry = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    entry->name = CPLStrdup(vsiEntry->pszName);
    entry->mode = vsiEntry->nMode;
    entry->size = vsiEntry->nSize;
    entry->mtime = vsiEntry->nMTime;
    entry->modeKnown = vsiEntry->bModeKnown == TRUE;
    entry->sizeKnown = vsiEntry->bSizeKnown == TRUE;
    entry->mtimeKnown = vsiEntry->bMTimeKnown == TRUE;
    entry->extra = CSLDuplicate(vsiEntry->papszExtra);
    return entry;
}


const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
{
    return CPLGetConfigOption( pszKey, pszDefault );
}
const char *wrapper_CPLGetGlobalConfigOption( const char * pszKey, const char * pszDefault = NULL )
{
    return CPLGetGlobalConfigOption( pszKey, pszDefault );
}
const char *wrapper_CPLGetThreadLocalConfigOption( const char * pszKey, const char * pszDefault = NULL )
{
    return CPLGetThreadLocalConfigOption( pszKey, pszDefault );
}


char** wrapper_GetConfigOptions() {
    char ** papszOpts = CPLGetConfigOptions();
    char ** papszTLOpts = CPLGetThreadLocalConfigOptions();

    papszOpts = CSLMerge(papszOpts, papszTLOpts);

    CSLDestroy(papszTLOpts);

    return papszOpts;
};


void wrapper_VSISetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszValue )
{
    VSISetPathSpecificOption(pszPathPrefix, pszKey, pszValue);
}

const char *wrapper_VSIGetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
{
    return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
}

const char *wrapper_VSIGetPathSpecificOption( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
{
    return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
}


void wrapper_VSIClearCredentials(const char * pszPathPrefix = NULL)
{
    VSIClearPathSpecificOptions( pszPathPrefix );
}
void wrapper_VSIClearPathSpecificOptions(const char * pszPathPrefix = NULL)
{
    VSIClearPathSpecificOptions( pszPathPrefix );
}


VSI_RETVAL wrapper_VSIFileFromMemBuffer( const char* utf8_path, GIntBig nBytes, const char *pabyData)
{
    const size_t nSize = static_cast<size_t>(nBytes);
    void* pabyDataDup = VSIMalloc(nSize);
    if (pabyDataDup == NULL)
            return -1;
    memcpy(pabyDataDup, pabyData, nSize);
    VSILFILE *fp = VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nSize, TRUE);

    if (fp == NULL) {
        VSIFree(pabyDataDup);
        return -1;
    } else {
        VSIFCloseL(fp);
        return 0;
    }
}


static bool
GetBufferAsCharPtrGIntBigSize( PyObject* input, GIntBig *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
  {
    if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    {
      *viewIsValid = true;
      *nLen = view->len;
      *pBuf = (char*) view->buf;
      return true;
    }
    else
    {
      PyErr_Clear();
    }
  }
  if (PyUnicode_Check(input))
  {
    size_t safeLen = 0;
    int ret;
    try {
      ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    }
    catch( const std::exception& )
    {
      PyErr_SetString(PyExc_MemoryError, "out of memory");
      return false;
    }
    if (!SWIG_IsOK(ret)) {
      PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
      return false;
    }

    if (safeLen) safeLen--;
    *nLen = (GIntBig)safeLen;
    return true;
  }
  else
  {
    PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    return false;
  }
}


bool wrapper_VSIUnlinkBatch(char** files)
{
    int* success = VSIUnlinkBatch(files);
    if( !success )
        return false;
    int bRet = true;
    for( int i = 0; files && files[i]; i++ )
    {
        if( !success[i] ) {
            bRet = false;
            break;
        }
    }
    VSIFree(success);
    return bRet;
}


int wrapper_HasThreadSupport()
{
    return strcmp(CPLGetThreadingModel(), "stub") != 0;
}


VSI_RETVAL wrapper_VSIMove(const char * old_path, const char *new_path, char** options = NULL,
                           GDALProgressFunc callback=NULL,
                           void* callback_data=NULL)
{
    return VSIMove(old_path, new_path, options, callback, callback_data);
}


bool wrapper_VSISync(const char* pszSource,
                     const char* pszTarget,
                     char** options = NULL,
                     GDALProgressFunc callback=NULL,
                     void* callback_data=NULL)
{
    return VSISync( pszSource, pszTarget, options, callback, callback_data, nullptr );
}


int wrapper_VSICopyFile(const char* pszSource,
                        const char* pszTarget,
                        VSILFILE* fpSource = NULL,
                        GIntBig nSourceSize = -1,
                        char** options = NULL,
                        GDALProgressFunc callback=NULL,
                        void* callback_data=NULL)
{
    return VSICopyFile(
        pszSource, pszTarget, fpSource,
        nSourceSize < 0 ? static_cast<vsi_l_offset>(-1) : static_cast<vsi_l_offset>(nSourceSize),
        options, callback, callback_data );
}


void CopyFileRestartable(const char* pszSource,
                         const char* pszTarget,
                         const char* pszInputPayload,
                         int* pnRetCode,
                         char** ppszOutputPayload,
                         char** options = NULL,
                         GDALProgressFunc callback=NULL,
                         void* callback_data=NULL)
{
    *pnRetCode = VSICopyFileRestartable(pszSource, pszTarget, pszInputPayload,
                                        ppszOutputPayload, options, callback,
                                        callback_data);
}




int wrapper_MoveFile(const char* pszSource, const char* pszTarget)
{
    return CPLMoveFile(pszTarget, pszSource);
}


retStringAndCPLFree* wrapper_VSIGetSignedURL(const char * utf8_path, char** options = NULL )
{
    return VSIGetSignedURL( utf8_path, options );
}


typedef struct
{
  int     mode;
  GIntBig size;
  GIntBig mtime;
} StatBuf;

SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    self->mode = psStatBuf->mode;
    self->size = psStatBuf->size;
    self->mtime = psStatBuf->mtime;
    return self;
  }
SWIGINTERN void delete_StatBuf(StatBuf *self){
    CPLFree(self);
  }
SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
     return (self->mode & S_IFDIR) != 0;
  }

int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
{
    VSIStatBufL sStat;
    memset(&sStat, 0, sizeof(sStat));
    memset(psStatBufOut, 0, sizeof(StatBuf));
    int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    psStatBufOut->mode = sStat.st_mode;
    psStatBufOut->size = (GIntBig)sStat.st_size;
    psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    return nRet;
}


VSILFILE   *wrapper_VSIFOpenL( const char *utf8_path, const char *pszMode )
{
    if (!pszMode) /* would lead to segfault */
        pszMode = "r";
    return VSIFOpenL( utf8_path, pszMode );
}


VSILFILE   *wrapper_VSIFOpenExL( const char *utf8_path, const char *pszMode, int bSetError = FALSE, char** options = NULL )
{
    if (!pszMode) /* would lead to segfault */
        pszMode = "r";
    return VSIFOpenEx2L( utf8_path, pszMode, bSetError, options );
}



int wrapper_VSIFSeekL( VSILFILE* fp, GIntBig offset, int whence) {



if (offset < 0) {
    switch (whence) {
        case SEEK_END: VSIFSeekL(fp, 0, SEEK_END);
        case SEEK_CUR:
            offset = VSIFTellL(fp) + offset;
            whence = SEEK_SET;
            break;
        default:
            VSIError(VSIE_FileError, "Cannot use negative offset with SEEK_SET");
            return -1;
    }
}

return VSIFSeekL(fp, offset, whence);
}


int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE* fp)
{
    if (nLen < static_cast<GIntBig>(size) * memb)
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Inconsistent buffer size with 'size' and 'memb' values");
        return 0;
    }
    return static_cast<int>(VSIFWriteL(pBuf, size, memb, fp));
}


void MultipartUploadGetCapabilities(
    const char *pszFilename, int* pnRetCode, int *pbNonSequentialUploadSupported,
    int *pbParallelUploadSupported, int *pbSupportsAbort, size_t *pnMinPartSize,
    size_t *pnMaxPartSize, int *pnMaxPartCount)
{
    *pnRetCode = VSIMultipartUploadGetCapabilities(pszFilename,
                        pbNonSequentialUploadSupported,
                        pbParallelUploadSupported,
                        pbSupportsAbort,
                        pnMinPartSize,
                        pnMaxPartSize,
                        pnMaxPartCount);
}


retStringAndCPLFree* MultipartUploadStart(const char *pszFilename, char** options = NULL)
{
    return VSIMultipartUploadStart(pszFilename, options);
}


retStringAndCPLFree* MultipartUploadAddPart(const char *pszFilename,
                             const char *pszUploadId,
                             int nPartNumber,
                             GUIntBig nFileOffset,
                             size_t nDataLength, const char *pData,
                             char** options = NULL)
{
    return VSIMultipartUploadAddPart(pszFilename, pszUploadId,
                                     nPartNumber, nFileOffset,
                                     pData, nDataLength,
                                     options);
}


static bool
GetBufferAsCharPtrSizetSize( PyObject* input, size_t *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
  {
    if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    {
      *viewIsValid = true;
      *nLen = view->len;
      *pBuf = (char*) view->buf;
      return true;
    }
    else
    {
      PyErr_Clear();
    }
  }
  if (PyUnicode_Check(input))
  {
    size_t safeLen = 0;
    int ret;
    try {
      ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    }
    catch( const std::exception& )
    {
      PyErr_SetString(PyExc_MemoryError, "out of memory");
      return false;
    }
    if (!SWIG_IsOK(ret)) {
      PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
      return false;
    }

    if (safeLen) safeLen--;
    *nLen = safeLen;
    return true;
  }
  else
  {
    PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    return false;
  }
}


#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
#  define SWIG_LONG_LONG_AVAILABLE
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
      return SWIG_OverflowError;
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
      if (val) *val = (unsigned long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_size_t (PyObject * obj, size_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    unsigned long long v;
    res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  }
#endif
  return res;
}


bool MultipartUploadEnd(const char *pszFilename,
                        const char *pszUploadId,
                        char** partIds,
                        GUIntBig nTotalSize,
                        char** options = NULL)

{
    return VSIMultipartUploadEnd(pszFilename, pszUploadId,
                                 CSLCount(partIds), partIds,
                                 nTotalSize,
                                 options);
}


bool MultipartUploadAbort(const char *pszFilename,
                          const char *pszUploadId,
                          char** options = NULL)
{
    return VSIMultipartUploadAbort(pszFilename, pszUploadId, options);
}

SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    return GDALGetDescription( self );
  }
SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    GDALSetDescription( self, pszNewDesc );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    return GDALGetMetadataDomainList( self );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    return GDALSetMetadata( self, papszMetadata, pszDomain );
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    char *tmpList[2];
    tmpList[0] = pszMetadataString;
    tmpList[1] = 0;
    return GDALSetMetadata( self, tmpList, pszDomain );
  }
SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    return GDALGetMetadataItem( self, pszName, pszDomain);
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
  }
SWIGINTERN GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *utf8_path,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){

    GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self,
                                                                utf8_path,
                                                                xsize,
                                                                ysize,
                                                                bands,
                                                                eType,
                                                                options );
    return ds;
  }
SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateVector(GDALDriverShadow *self,char const *utf8_path,char **options=0){
    GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(self, utf8_path, 0, 0, 0, GDT_Unknown, options);
    return ds;
  }
SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateMultiDimensional(GDALDriverShadow *self,char const *utf8_path,char **root_group_options=0,char **options=0){

    GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreateMultiDimensional(    self,
                                                                utf8_path,
                                                                root_group_options,
                                                                options );
    return ds;
  }
SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateCopy(GDALDriverShadow *self,char const *utf8_path,GDALDatasetShadow *src,int strict=1,char **options=0,GDALProgressFunc callback=NULL,void *callback_data=NULL){

    GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self,
                                                                    utf8_path,
                                                                    src,
                                                                    strict,
                                                                    options,
                                                                    callback,
                                                                    callback_data );
    return ds;
  }
SWIGINTERN CPLErr GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    return GDALDeleteDataset( self, utf8_path );
  }
SWIGINTERN CPLErr GDALDriverShadow_Rename(GDALDriverShadow *self,char const *newName,char const *oldName){
    return GDALRenameDataset( self, newName, oldName );
  }
SWIGINTERN CPLErr GDALDriverShadow_CopyFiles(GDALDriverShadow *self,char const *newName,char const *oldName){
    return GDALCopyDatasetFiles( self, newName, oldName );
  }
SWIGINTERN bool GDALDriverShadow_HasOpenOption(GDALDriverShadow *self,char const *openOptionName){
    return GDALDriverHasOpenOption( self, openOptionName );
  }
SWIGINTERN bool GDALDriverShadow_TestCapability(GDALDriverShadow *self,char const *cap){
    // TODO: should this also check DCAP entries in driver metadata?
    return (OGR_Dr_TestCapability(self, cap) > 0);
  }
SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    return GDALRegisterDriver( self );
  }
SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    GDALDeregisterDriver( self );
  }

char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
  return GDALGetDriverShortName( h );
}
char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
  return GDALGetDriverLongName( h );
}
char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
  return GDALGetDriverHelpTopic( h );
}


SWIGINTERN int
SWIG_AsVal_short (PyObject * obj, short *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < SHRT_MIN || v > SHRT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< short >(v);
    }
  }  
  return res;
}


  #define SWIG_From_long   PyInt_FromLong 


SWIGINTERNINLINE PyObject *
SWIG_From_short  (short value)
{    
  return SWIG_From_long  (value);
}


  #define SWIG_From_double   PyFloat_FromDouble 

SWIGINTERN GDAL_GCP *new_GDAL_GCP(double x=0.0,double y=0.0,double z=0.0,double pixel=0.0,double line=0.0,char const *info="",char const *id=""){

    GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    self->dfGCPX = x;
    self->dfGCPY = y;
    self->dfGCPZ = z;
    self->dfGCPPixel = pixel;
    self->dfGCPLine = line;
    self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    self->pszId = CPLStrdup( (id==0)? "" : id );
    return self;
  }
SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    if ( self->pszInfo )
      CPLFree( self->pszInfo );
    if ( self->pszId )
      CPLFree( self->pszId );
    CPLFree( self );
  }


double GDAL_GCP_GCPX_get( GDAL_GCP *gcp ) {
  return gcp->dfGCPX;
}
void GDAL_GCP_GCPX_set( GDAL_GCP *gcp, double dfGCPX ) {
  gcp->dfGCPX = dfGCPX;
}
double GDAL_GCP_GCPY_get( GDAL_GCP *gcp ) {
  return gcp->dfGCPY;
}
void GDAL_GCP_GCPY_set( GDAL_GCP *gcp, double dfGCPY ) {
  gcp->dfGCPY = dfGCPY;
}
double GDAL_GCP_GCPZ_get( GDAL_GCP *gcp ) {
  return gcp->dfGCPZ;
}
void GDAL_GCP_GCPZ_set( GDAL_GCP *gcp, double dfGCPZ ) {
  gcp->dfGCPZ = dfGCPZ;
}
double GDAL_GCP_GCPPixel_get( GDAL_GCP *gcp ) {
  return gcp->dfGCPPixel;
}
void GDAL_GCP_GCPPixel_set( GDAL_GCP *gcp, double dfGCPPixel ) {
  gcp->dfGCPPixel = dfGCPPixel;
}
double GDAL_GCP_GCPLine_get( GDAL_GCP *gcp ) {
  return gcp->dfGCPLine;
}
void GDAL_GCP_GCPLine_set( GDAL_GCP *gcp, double dfGCPLine ) {
  gcp->dfGCPLine = dfGCPLine;
}
const char * GDAL_GCP_Info_get( GDAL_GCP *gcp ) {
  return gcp->pszInfo;
}
void GDAL_GCP_Info_set( GDAL_GCP *gcp, const char * pszInfo ) {
  if ( gcp->pszInfo )
    CPLFree( gcp->pszInfo );
  gcp->pszInfo = CPLStrdup(pszInfo);
}
const char * GDAL_GCP_Id_get( GDAL_GCP *gcp ) {
  return gcp->pszId;
}
void GDAL_GCP_Id_set( GDAL_GCP *gcp, const char * pszId ) {
  if ( gcp->pszId )
    CPLFree( gcp->pszId );
  gcp->pszId = CPLStrdup(pszId);
}


static PyObject *
CreateTupleFromDoubleArray( const double *first, size_t size ) {
  PyObject *out = PyTuple_New( size );
  for( unsigned int i=0; i<size; i++ ) {
    PyObject *val = PyFloat_FromDouble( *first );
    ++first;
    PyTuple_SetItem( out, i, val );
  }
  return out;
}


#include "gdal.h"

typedef struct
{
    CPLVirtualMem *vmem;
    int            bAuto;
    GDALDataType   eBufType;
    int            bIsBandSequential;
    int            bReadOnly;
    int            nBufXSize;
    int            nBufYSize;
    int            nBandCount;
    GDALTileOrganization eTileOrganization;
    int                  nTileXSize;
    int                  nTileYSize;
    int            nPixelSpace; /* if bAuto == TRUE */
    GIntBig        nLineSpace; /* if bAuto == TRUE */
} CPLVirtualMemShadow;


SWIGINTERN void delete_CPLVirtualMemShadow(CPLVirtualMemShadow *self){
        CPLVirtualMemFree( self->vmem );
        free(self);
    }
SWIGINTERN void CPLVirtualMemShadow_GetAddr(CPLVirtualMemShadow *self,void **pptr,size_t *pnsize,GDALDataType *pdatatype,int *preadonly){
        *pptr = CPLVirtualMemGetAddr( self->vmem );
        *pnsize = CPLVirtualMemGetSize( self->vmem );
        *pdatatype = self->eBufType;
        *preadonly = self->bReadOnly;
    }
SWIGINTERN void CPLVirtualMemShadow_Pin(CPLVirtualMemShadow *self,size_t start_offset=0,size_t nsize=0,int bWriteOp=0){
        if( nsize == 0 || start_offset + nsize >= CPLVirtualMemGetSize( self->vmem ) )
            nsize = CPLVirtualMemGetSize( self->vmem ) - start_offset;
        char* start_addr = (char*)CPLVirtualMemGetAddr( self->vmem ) + start_offset;
        CPLVirtualMemPin(self->vmem, start_addr, nsize, bWriteOp);
    }

/* Returned size is in bytes or 0 if an error occurred. */
static
GIntBig ComputeDatasetRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
                                int nBands, int* bandMap, int nBandMapArrayLength,
                                GIntBig nPixelSpace, GIntBig nLineSpace, GIntBig nBandSpace,
                                int bSpacingShouldBeMultipleOfPixelSize )
{
    if (buf_xsize <= 0 || buf_ysize <= 0)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
        return 0;
    }

    if (nPixelSpace < 0 || nLineSpace < 0 || nBandSpace < 0)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
        return 0;
    }

    if (nPixelSize == 0)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
        return 0;
    }

    if( nPixelSpace == 0 )
        nPixelSpace = nPixelSize;
    else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
        return 0;
    }

    if( nLineSpace == 0 )
    {
        nLineSpace = nPixelSpace * buf_xsize;
    }
    else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
        return 0;
    }

    if( nBandSpace == 0 )
    {
        nBandSpace = nLineSpace * buf_ysize;
    }
    else if ( bSpacingShouldBeMultipleOfPixelSize && (nBandSpace % nPixelSize) != 0 )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
        return 0;
    }

    if (nBands <= 0 || (bandMap != NULL && nBands > nBandMapArrayLength))
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Invalid band count");
        return 0;
    }

    GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + (GIntBig)(nBands - 1) * nBandSpace + nPixelSize;
#if SIZEOF_VOIDP == 4
    if (nRet > INT_MAX)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
        return 0;
    }
#endif

    return nRet;
}


typedef struct
{
    GDALAsyncReaderH  hAsyncReader;
    void             *pyObject;
} GDALAsyncReaderWrapper;

typedef void* GDALAsyncReaderWrapperH;

static GDALAsyncReaderH AsyncReaderWrapperGetReader(GDALAsyncReaderWrapperH hWrapper)
{
    GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    if (psWrapper->hAsyncReader == NULL)
    {
        CPLError(CE_Failure, CPLE_AppDefined, "AsyncReader object is defunct");
    }
    return psWrapper->hAsyncReader;
}

#if defined(SWIGPYTHON)
static void* AsyncReaderWrapperGetPyObject(GDALAsyncReaderWrapperH hWrapper)
{
    GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    return psWrapper->pyObject;
}
#endif

static void DeleteAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
{
    GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    if (psWrapper->hAsyncReader != NULL)
    {
        CPLError(CE_Failure, CPLE_AppDefined,
                 "Native AsyncReader object will leak. EndAsyncReader() should have been called before");
    }
    CPLFree(psWrapper);
}




static GDALAsyncReaderWrapper* CreateAsyncReaderWrapper(GDALAsyncReaderH  hAsyncReader,
                                                        void             *pyObject)
{
    GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper* )CPLMalloc(sizeof(GDALAsyncReaderWrapper));
    psWrapper->hAsyncReader = hAsyncReader;
    psWrapper->pyObject = pyObject;
    Py_INCREF((PyObject*) psWrapper->pyObject);
    return psWrapper;
}

static void DisableAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
{
    GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    if (psWrapper->pyObject)
    {
        Py_XDECREF((PyObject*) psWrapper->pyObject);
    }
    psWrapper->pyObject = NULL;
    psWrapper->hAsyncReader = NULL;
}

SWIGINTERN void delete_GDALAsyncReaderShadow(GDALAsyncReaderShadow *self){
        DeleteAsyncReaderWrapper(self);
    }
SWIGINTERN GDALAsyncStatusType GDALAsyncReaderShadow_GetNextUpdatedRegion(GDALAsyncReaderShadow *self,double timeout,int *xoff,int *yoff,int *buf_xsize,int *buf_ysize){
        GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
        if (hReader == NULL)
        {
            *xoff = 0;
            *yoff = 0;
            *buf_xsize = 0;
            *buf_ysize = 0;
            return GARIO_ERROR;
        }
        return GDALARGetNextUpdatedRegion(hReader, timeout, xoff, yoff, buf_xsize, buf_ysize );
    }
SWIGINTERN void GDALAsyncReaderShadow_GetBuffer(GDALAsyncReaderShadow *self,void **ppRetPyObject){
        GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
        if (hReader == NULL)
        {
            *ppRetPyObject = NULL;
            return;
        }
        *ppRetPyObject = AsyncReaderWrapperGetPyObject(self);
        Py_INCREF((PyObject*)*ppRetPyObject);
    }
SWIGINTERN int GDALAsyncReaderShadow_LockBuffer(GDALAsyncReaderShadow *self,double timeout){
        GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
        if (hReader == NULL)
        {
            return 0;
        }
        return GDALARLockBuffer(hReader,timeout);
    }
SWIGINTERN void GDALAsyncReaderShadow_UnlockBuffer(GDALAsyncReaderShadow *self){
        GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
        if (hReader == NULL)
        {
            return;
        }
        GDALARUnlockBuffer(hReader);
    }
SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    if ( GDALDereferenceDataset( self ) <= 0 ) {
      if( GDALClose(self) != CE_None )
      {
          if( CPLGetLastErrorType() == CE_None )
              CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALClose()");
      }
    }
  }
SWIGINTERN void GDALDatasetShadow_MarkSuppressOnClose(GDALDatasetShadow *self){
    GDALDatasetMarkSuppressOnClose(self);
  }
SWIGINTERN CPLErr GDALDatasetShadow_Close(GDALDatasetShadow *self){
     return GDALClose(self);
  }
SWIGINTERN CPLErr GDALDatasetShadow__RunCloseWithoutDestroying(GDALDatasetShadow *self){
     CPLErr eErr = GDALDatasetRunCloseWithoutDestroying(self);
     if (eErr != CE_None && CPLGetLastErrorType() == CE_None ) {
       CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALDatasetRunCloseWithoutDestroying()");
     }
     return eErr;
  }
SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    return (GDALDriverShadow*) GDALGetDatasetDriver( self );
  }
SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
  }
SWIGINTERN bool GDALDatasetShadow_IsThreadSafe(GDALDatasetShadow *self,int nScopeFlags){
      return GDALDatasetIsThreadSafe(self, nScopeFlags, nullptr);
  }
SWIGINTERN GDALDatasetShadow *GDALDatasetShadow_GetThreadSafeDataset(GDALDatasetShadow *self,int nScopeFlags){
      return GDALGetThreadSafeDataset(self, nScopeFlags, nullptr);
  }
SWIGINTERN GDALGroupHS *GDALDatasetShadow_GetRootGroup(GDALDatasetShadow *self){
    return GDALDatasetGetRootGroup(self);
  }
SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    return GDALGetProjectionRef( self );
  }
SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    return GDALGetProjectionRef( self );
  }
SWIGINTERN int GDALDatasetShadow_GetRefCount(GDALDatasetShadow *self){
    return OGR_DS_GetRefCount(self);
  }
SWIGINTERN int GDALDatasetShadow_GetSummaryRefCount(GDALDatasetShadow *self){
    return OGR_DS_GetSummaryRefCount(self);
  }
SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow *self){
    OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
    if( ref )
       ref = OSRClone( ref );
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    return GDALSetProjection( self, prj );
  }
SWIGINTERN CPLErr GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow *self,OSRSpatialReferenceShadow *srs){
     return GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
  }
SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    if (can_return_null && *can_return_null)
    {
        *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    }
    else
    {
        *isvalid = TRUE;
        if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
            argout[0] = 0.0;
            argout[1] = 1.0;
            argout[2] = 0.0;
            argout[3] = 0.0;
            argout[4] = 0.0;
            argout[5] = 1.0;
        }
    }
  }
SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    return GDALSetGeoTransform( self, argin );
  }
SWIGINTERN void GDALDatasetShadow_GetExtent(GDALDatasetShadow *self,double argout[4],int *isvalid,OSRSpatialReferenceShadow *srs=NULL){
    CPLErr eErr = GDALGetExtent(self, (OGREnvelope*)argout, srs);
    *isvalid = (eErr == CE_None);
    return;
  }
SWIGINTERN void GDALDatasetShadow_GetExtentWGS84LongLat(GDALDatasetShadow *self,double argout[4],int *isvalid){
    CPLErr eErr = GDALGetExtentWGS84LongLat(self, (OGREnvelope*)argout);
    *isvalid = (eErr == CE_None);
    return;
  }

static int*
CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(int) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  int* ret = (int*) malloc((*pnSize)*sizeof(int));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"i",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

SWIGINTERN int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){

    return GDALBuildOverviewsEx(  self,
                                resampling ? resampling : "NEAREST",
                                overviewlist,
                                pOverviews,
                                0,
                                0,
                                callback,
                                callback_data,
                                options);
  }
SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    return GDALGetGCPCount( self );
  }
SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    return GDALGetGCPProjection( self );
  }
SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow *self){
    OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
    if( ref )
       ref = OSRClone( ref );
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    *nGCPs = GDALGetGCPCount( self );
    *pGCPs = GDALGetGCPs( self );
  }
SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
  }
SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,OSRSpatialReferenceShadow *hSRS){
    return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
  }
SWIGINTERN CPLErr GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    return GDALFlushCache( self );
  }
SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    return GDALAddBand( self, datatype, options );
  }
SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
      return GDALCreateDatasetMaskBand( self, nFlags );
  }
SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    return GDALGetFileList( self );
  }
SWIGINTERN CPLErr GDALDatasetShadow_WriteRaster(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,GIntBig buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0,GIntBig *buf_band_space=0){
    CPLErr eErr;
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype;
    if ( buf_type != 0 ) {
      ntype = (GDALDataType) *buf_type;
    } else {
      int lastband = GDALGetRasterCount( self );
      if (lastband <= 0)
        return CE_Failure;
      ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    }

    GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;

    GIntBig min_buffer_size =
      ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSizeBytes( ntype ),
                                  band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
                                  pixel_space, line_space, band_space, FALSE);
    if (min_buffer_size == 0)
        return CE_Failure;

    if ( buf_len < min_buffer_size )
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
        return CE_Failure;
    }

    GDALRasterIOExtraArg* psExtraArg = NULL;

    eErr = GDALDatasetRasterIOEx( self, GF_Write, xoff, yoff, xsize, ysize,
                                  (void*) buf_string, nxsize, nysize, ntype,
                                  band_list, pband_list, pixel_space, line_space, band_space, psExtraArg );

    return eErr;
  }
SWIGINTERN CPLErr GDALDatasetShadow_AdviseRead(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,char **options=NULL){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype;
    if ( buf_type != 0 ) {
      ntype = (GDALDataType) *buf_type;
    } else {
      int lastband = GDALGetRasterCount( self );
      if (lastband <= 0)
        return CE_Failure;
      ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    }
    return GDALDatasetAdviseRead(self, xoff, yoff, xsize, ysize,
                                 nxsize, nysize, ntype,
                                 band_list, pband_list, options);
}
SWIGINTERN GDALAsyncReaderShadow *GDALDatasetShadow_BeginAsyncReader(GDALDatasetShadow *self,int xOff,int yOff,int xSize,int ySize,size_t buf_len,char *buf_string,void *pyObject,int buf_xsize,int buf_ysize,GDALDataType bufType=(GDALDataType) 0,int band_list=0,int *pband_list=0,int nPixelSpace=0,int nLineSpace=0,int nBandSpace=0,char **options=0){

    if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    {
        // calculate an appropriate buffer size
        const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
        if (pszLevel)
        {
            // round up
            int nLevel = atoi(pszLevel);
            if( nLevel < 0 || nLevel > 30 )
            {
                CPLError(CE_Failure, CPLE_AppDefined, "Invalid LEVEL: %d", nLevel);
            }
            else
            {
                int nRes = 1 << nLevel;
                buf_xsize = static_cast<int>(ceil(xSize / (1.0 * nRes)));
                buf_ysize = static_cast<int>(ceil(ySize / (1.0 * nRes)));
            }
        }
    }

    int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    int nysize = (buf_ysize == 0) ? ySize : buf_ysize;

    GDALDataType ntype;
    if (bufType != 0) {
        ntype = (GDALDataType) bufType;
    }
    else {
        ntype = GDT_Byte;
    }

    int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    uint64_t nMinSize = (uint64_t)nxsize * nysize * nBCount * GDALGetDataTypeSizeBytes(ntype);
    if (buf_string == NULL || buf_len < nMinSize)
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
        return NULL;
    }

    bool myBandList = false;
    int* pBandList;

    if (band_list != 0){
        myBandList = false;
        pBandList = pband_list;
    }
    else
    {
        myBandList = true;
        pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
        for (int i = 0; i < nBCount; ++i) {
            pBandList[i] = i + 1;
        }
    }

    GDALAsyncReaderH hAsyncReader =
            GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    nBandSpace, options);

    if ( myBandList ) {
       CPLFree( pBandList );
    }

    if (hAsyncReader)
    {
        return (GDALAsyncReaderShadow*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    }
    else
    {
        return NULL;
    }

  }
SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    if( ario == NULL ) return;
    GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    if (hReader == NULL)
    {
        return;
    }
    GDALEndAsyncReader(self, hReader);
    DisableAsyncReaderWrapper(ario);
  }
SWIGINTERN CPLVirtualMemShadow *GDALDatasetShadow_GetVirtualMem(GDALDatasetShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nBufXSize,int nBufYSize,GDALDataType eBufType,int band_list,int *pband_list,int bIsBandSequential,size_t nCacheSize,size_t nPageSizeHint,char **options=NULL){
        int nPixelSpace;
        int nBandSpace;
        if( bIsBandSequential != 0 && bIsBandSequential != 1 )
            return NULL;
        if( band_list == 0 )
            return NULL;
        if( bIsBandSequential || band_list == 1 )
        {
            nPixelSpace = 0;
            nBandSpace = 0;
        }
        else
        {
            nBandSpace = GDALGetDataTypeSizeBytes(eBufType);
            nPixelSpace = nBandSpace * band_list;
        }
        CPLVirtualMem* vmem = GDALDatasetGetVirtualMem( self,
                                         eRWFlag,
                                         nXOff, nYOff,
                                         nXSize, nYSize,
                                         nBufXSize, nBufYSize,
                                         eBufType,
                                         band_list, pband_list,
                                         nPixelSpace,
                                         0,
                                         nBandSpace,
                                         nCacheSize,
                                         nPageSizeHint,
                                         FALSE,
                                         options );
        if( vmem == NULL )
            return NULL;
        CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
        vmemshadow->vmem = vmem;
        vmemshadow->eBufType = eBufType;
        vmemshadow->bIsBandSequential = bIsBandSequential;
        vmemshadow->bReadOnly = (eRWFlag == GF_Read);
        vmemshadow->nBufXSize = nBufXSize;
        vmemshadow->nBufYSize = nBufYSize;
        vmemshadow->nBandCount = band_list;
        return vmemshadow;
    }
SWIGINTERN CPLVirtualMemShadow *GDALDatasetShadow_GetTiledVirtualMem(GDALDatasetShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nTileXSize,int nTileYSize,GDALDataType eBufType,int band_list,int *pband_list,GDALTileOrganization eTileOrganization,size_t nCacheSize,char **options=NULL){
        if( band_list == 0 )
            return NULL;
        CPLVirtualMem* vmem = GDALDatasetGetTiledVirtualMem( self,
                                         eRWFlag,
                                         nXOff, nYOff,
                                         nXSize, nYSize,
                                         nTileXSize, nTileYSize,
                                         eBufType,
                                         band_list, pband_list,
                                         eTileOrganization,
                                         nCacheSize,
                                         FALSE,
                                         options );
        if( vmem == NULL )
            return NULL;
        CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
        vmemshadow->vmem = vmem;
        vmemshadow->eBufType = eBufType;
        vmemshadow->bIsBandSequential = -1;
        vmemshadow->bReadOnly = (eRWFlag == GF_Read);
        vmemshadow->nBufXSize = nXSize;
        vmemshadow->nBufYSize = nYSize;
        vmemshadow->eTileOrganization = eTileOrganization;
        vmemshadow->nTileXSize = nTileXSize;
        vmemshadow->nTileYSize = nTileYSize;
        vmemshadow->nBandCount = band_list;
        return vmemshadow;
    }
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
                                  name,
                                  srs,
                                  geom_type,
                                  options);
    return layer;
  }
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayerFromGeomFieldDefn(GDALDatasetShadow *self,char const *name,OGRGeomFieldDefnShadow *geom_field,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayerFromGeomFieldDefn( self,
                                  name,
                                  geom_field,
                                  options);
    return layer;
  }
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CopyLayer(GDALDatasetShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCopyLayer( self,
                                                      src_layer,
                                                      new_name,
                                                      options);
    return layer;
  }
SWIGINTERN OGRErr GDALDatasetShadow_DeleteLayer(GDALDatasetShadow *self,int index){
    return GDALDatasetDeleteLayer(self, index);
  }


#include "ogr_core.h"
static char const *
OGRErrMessages( int rc ) {
  switch( rc ) {
  case OGRERR_NONE:
    return "OGR Error: None";
  case OGRERR_NOT_ENOUGH_DATA:
    return "OGR Error: Not enough data to deserialize";
  case OGRERR_NOT_ENOUGH_MEMORY:
    return "OGR Error: Not enough memory";
  case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    return "OGR Error: Unsupported geometry type";
  case OGRERR_UNSUPPORTED_OPERATION:
    return "OGR Error: Unsupported operation";
  case OGRERR_CORRUPT_DATA:
    return "OGR Error: Corrupt data";
  case OGRERR_FAILURE:
    return "OGR Error: General Error";
  case OGRERR_UNSUPPORTED_SRS:
    return "OGR Error: Unsupported SRS";
  case OGRERR_INVALID_HANDLE:
    return "OGR Error: Invalid handle";
  case OGRERR_NON_EXISTING_FEATURE:
    return "OGR Error: Non existing feature";
  default:
    return "OGR Error: Unknown";
  }
}

SWIGINTERN bool GDALDatasetShadow_IsLayerPrivate(GDALDatasetShadow *self,int index){
    return GDALDatasetIsLayerPrivate(self, index);
  }

SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
  int r;
  if (!PyBool_Check(obj))
    return SWIG_ERROR;
  r = PyObject_IsTrue(obj);
  if (r == -1)
    return SWIG_ERROR;
  if (val) *val = r ? true : false;
  return SWIG_OK;
}

SWIGINTERN OGRFeatureShadow *GDALDatasetShadow_GetNextFeature(GDALDatasetShadow *self,bool include_layer=true,bool include_pct=false,OGRLayerShadow **ppoBelongingLayer=NULL,double *pdfProgressPct=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    OGRLayerH hLayer = NULL;
    OGRFeatureShadow* feat = (OGRFeatureShadow*)GDALDatasetGetNextFeature( self, &hLayer, pdfProgressPct,
                                      callback, callback_data );
    *ppoBelongingLayer = (OGRLayerShadow*)hLayer;
    return feat;
  }
SWIGINTERN bool GDALDatasetShadow_TestCapability(GDALDatasetShadow *self,char const *cap){
    return (GDALDatasetTestCapability(self, cap) > 0);
  }
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_ExecuteSQL(GDALDatasetShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetExecuteSQL(self,
                                                      statement,
                                                      spatialFilter,
                                                      dialect);
    return layer;
  }
SWIGINTERN void GDALDatasetShadow_ReleaseResultSet(GDALDatasetShadow *self,OGRLayerShadow *layer){
    GDALDatasetReleaseResultSet(self, layer);
  }
SWIGINTERN OGRStyleTableShadow *GDALDatasetShadow_GetStyleTable(GDALDatasetShadow *self){
    return (OGRStyleTableShadow*) GDALDatasetGetStyleTable(self);
  }
SWIGINTERN void GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByIndex(GDALDatasetShadow *self,int index=0){



    OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
    return layer;
  }
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,char const *layer_name){
    OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
    return layer;
  }
SWIGINTERN void GDALDatasetShadow_ResetReading(GDALDatasetShadow *self){
    GDALDatasetResetReading(self);
  }
SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
    return GDALDatasetGetLayerCount(self);
  }
SWIGINTERN OGRErr GDALDatasetShadow_AbortSQL(GDALDatasetShadow *self){
    return GDALDatasetAbortSQL(self);
}
SWIGINTERN OGRErr GDALDatasetShadow_StartTransaction(GDALDatasetShadow *self,int force=FALSE){
    return GDALDatasetStartTransaction(self, force);
  }
SWIGINTERN OGRErr GDALDatasetShadow_CommitTransaction(GDALDatasetShadow *self){
    return GDALDatasetCommitTransaction(self);
  }
SWIGINTERN OGRErr GDALDatasetShadow_RollbackTransaction(GDALDatasetShadow *self){
    return GDALDatasetRollbackTransaction(self);
  }
SWIGINTERN void GDALDatasetShadow_ClearStatistics(GDALDatasetShadow *self){
      GDALDatasetClearStatistics(self);
  }
SWIGINTERN char **GDALDatasetShadow_GetFieldDomainNames(GDALDatasetShadow *self,char **options=0){
    return GDALDatasetGetFieldDomainNames(self, options);
  }
SWIGINTERN OGRFieldDomainShadow *GDALDatasetShadow_GetFieldDomain(GDALDatasetShadow *self,char const *name){
    return (OGRFieldDomainShadow*) GDALDatasetGetFieldDomain(self, name);
  }
SWIGINTERN bool GDALDatasetShadow_AddFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
      char* pszReason = NULL;
      if( !GDALDatasetAddFieldDomain(self, (OGRFieldDomainH)fieldDomain, &pszReason) )
      {
          CPLError(CE_Failure, CPLE_AppDefined, "%s", pszReason);
          CPLFree(pszReason);
          return false;
      }
      return true;
  }
SWIGINTERN bool GDALDatasetShadow_DeleteFieldDomain(GDALDatasetShadow *self,char const *name){
      return GDALDatasetDeleteFieldDomain(self, name, NULL);
  }
SWIGINTERN bool GDALDatasetShadow_UpdateFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
      return GDALDatasetUpdateFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
  }
SWIGINTERN char **GDALDatasetShadow_GetRelationshipNames(GDALDatasetShadow *self,char **options=0){
    return GDALDatasetGetRelationshipNames(self, options);
  }
SWIGINTERN GDALRelationshipShadow *GDALDatasetShadow_GetRelationship(GDALDatasetShadow *self,char const *name){
    return (GDALRelationshipShadow*) GDALDatasetGetRelationship(self, name);
  }
SWIGINTERN bool GDALDatasetShadow_AddRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
      return GDALDatasetAddRelationship(self, (GDALRelationshipH)relationship, NULL);
  }
SWIGINTERN bool GDALDatasetShadow_DeleteRelationship(GDALDatasetShadow *self,char const *name){
      return GDALDatasetDeleteRelationship(self, name, NULL);
  }
SWIGINTERN bool GDALDatasetShadow_UpdateRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
      return GDALDatasetUpdateRelationship(self, (GDALRelationshipH)relationship, NULL);
  }
SWIGINTERN GDALMDArrayHS *GDALDatasetShadow_AsMDArray(GDALDatasetShadow *self,char **options=NULL){
    return GDALDatasetAsMDArray(self, options);
  }
SWIGINTERN CPLErr GDALDatasetShadow_ReadRaster1(GDALDatasetShadow *self,double xoff,double yoff,double xsize,double ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0,GIntBig *buf_band_space=0,GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour,GDALProgressFunc callback=NULL,void *callback_data=NULL,void *inputOutputBuf=NULL){
    *buf = NULL;

    int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    GDALDataType ntype;
    if ( buf_type != 0 ) {
      ntype = *buf_type;
    } else {
      int lastband = GDALGetRasterCount( self ) - 1;
      if (lastband < 0)
      {
          return CE_Failure;
      }
      ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    }

    GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;

    int ntypesize = GDALGetDataTypeSizeBytes( ntype );
    size_t buf_size = static_cast<size_t>(
        ComputeDatasetRasterIOSize (nxsize, nysize, ntypesize,
                                    band_list ? band_list :
                                        GDALGetRasterCount(self),
                                    pband_list, band_list,
                                    pixel_space, line_space, band_space,
                                    FALSE));
    if (buf_size == 0)
    {
        return CE_Failure;
    }

    char *data;
    Py_buffer view;

    if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
                                  GetUseExceptions(), data, view) )
    {
        return CE_Failure;
    }

    if( inputOutputBuf == NULL )
    {
        /* Should we clear the buffer in case there are hole in it ? */
        if( line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
        {
            memset(data, 0, buf_size);
        }
        else if( band_list > 1 && band_space != 0 )
        {
            if( line_space != 0 && band_space > line_space * nysize )
                memset(data, 0, buf_size);
            else if( pixel_space != 0 && band_space < pixel_space &&
                     pixel_space != (GIntBig)GDALGetRasterCount(self) * ntypesize )
                memset(data, 0, buf_size);
        }
    }

    GDALRasterIOExtraArg sExtraArg;
    INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    sExtraArg.eResampleAlg = resample_alg;
    sExtraArg.pfnProgress = callback;
    sExtraArg.pProgressData = callback_data;

    int nXOff = (int)(xoff + 0.5);
    int nYOff = (int)(yoff + 0.5);
    int nXSize = (int)(xsize + 0.5);
    int nYSize = (int)(ysize + 0.5);
    if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
        fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    {
        sExtraArg.bFloatingPointWindowValidity = TRUE;
        sExtraArg.dfXOff = xoff;
        sExtraArg.dfYOff = yoff;
        sExtraArg.dfXSize = xsize;
        sExtraArg.dfYSize = ysize;
    }

    CPLErr eErr = GDALDatasetRasterIOEx(self, GF_Read, nXOff, nYOff, nXSize, nYSize,
                               data, nxsize, nysize, ntype,
                               band_list, pband_list, pixel_space, line_space, band_space,
                               &sExtraArg );

    readraster_releasebuffer(eErr, buf, inputOutputBuf, view);

    return eErr;
}

int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
  return GDALGetRasterXSize( h );
}
int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
  return GDALGetRasterYSize( h );
}
int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
  return GDALGetRasterCount( h );
}


/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
/* isfinite() is a macro for C99 */
# if defined(isfinite)
#  define SWIG_isfinite(X) (isfinite(X))
# elif defined(__cplusplus) && __cplusplus >= 201103L
/* Use a template so that this works whether isfinite() is std::isfinite() or
 * in the global namespace.  The reality seems to vary between compiler
 * versions.
 *
 * Make sure namespace std exists to avoid compiler warnings.
 *
 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
 */
namespace std { }
extern "C++" template<typename T>
inline int SWIG_isfinite_func(T x) {
  using namespace std;
  return isfinite(x);
}
#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
#  define SWIG_isfinite(X) (__builtin_isfinite(X))
# elif defined(_MSC_VER)
#  define SWIG_isfinite(X) (_finite(X))
# elif defined(__sun) && defined(__SVR4)
#  include <ieeefp.h>
#  define SWIG_isfinite(X) (finite(X))
# endif
#endif


/* Accept infinite as a valid float value unless we are unable to check if a value is finite */
#ifdef SWIG_isfinite
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
#else
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
#endif


SWIGINTERN int
SWIG_AsVal_float (PyObject * obj, float *val)
{
  double v;
  int res = SWIG_AsVal_double (obj, &v);
  if (SWIG_IsOK(res)) {
    if (SWIG_Float_Overflow_Check(v)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< float >(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject *
SWIG_From_float  (float value)
{    
  return SWIG_From_double  (value);
}

SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
        return (GDALRasterAttributeTableShadow*)
		GDALCreateRasterAttributeTable();
    }
SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
        GDALDestroyRasterAttributeTable(self);
    }
SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
        return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    }
SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){
        return GDALRATGetColumnCount( self );
    }
SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){
        return GDALRATGetNameOfCol( self, iCol );
    }
SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
        return GDALRATGetUsageOfCol( self, iCol );
    }
SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
        return GDALRATGetTypeOfCol( self, iCol );
    }
SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
        return GDALRATGetColOfUsage( self, eUsage );
    }
SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){
        return GDALRATGetRowCount( self );
    }
SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
        return GDALRATGetValueAsString( self, iRow, iCol );
    }
SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
        return GDALRATGetValueAsInt( self, iRow, iCol );
    }
SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
        return GDALRATGetValueAsDouble( self, iRow, iCol );
    }
SWIGINTERN bool GDALRasterAttributeTableShadow_GetValueAsBoolean(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
        return GDALRATGetValueAsBoolean( self, iRow, iCol );
    }
SWIGINTERN GDALRATDateTime GDALRasterAttributeTableShadow_GetValueAsDateTime(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
        GDALRATDateTime dt;
        GDALRATGetValueAsDateTime( self, iRow, iCol, &dt );
        return dt;
    }
SWIGINTERN CPLErr GDALRasterAttributeTableShadow_GetValueAsWKBGeometry(GDALRasterAttributeTableShadow *self,int iRow,int iCol,size_t *nLen,char **pBuf){
        const void* pRet = GDALRATGetValueAsWKBGeometry( self, iRow, iCol, nLen );
        *pBuf = (char*)VSIMalloc(*nLen);
        if (*nLen)
            memcpy(*pBuf, pRet, *nLen);
        return CE_None;
    }
SWIGINTERN CPLErr GDALRasterAttributeTableShadow_SetValueAsWKBGeometry(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nLen,char *pBuf){
        return GDALRATSetValueAsWKBGeometry(self, iRow, iCol, pBuf, nLen);
    }
SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsString(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,char **ppszData){
        return GDALRATValuesIOAsString(self, GF_Read, iField, iStartRow, iLength, ppszData);
    }
SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,int *pnData){
        return GDALRATValuesIOAsInteger(self, GF_Read, iField, iStartRow, iLength, pnData);
    }
SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,double *pdfData){
        return GDALRATValuesIOAsDouble(self, GF_Read, iField, iStartRow, iLength, pdfData);
    }
SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsBoolean(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,bool *pbData){
        return GDALRATValuesIOAsBoolean(self, GF_Read, iField, iStartRow, iLength, pbData);
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){
        GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){
        GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){
        GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsBoolean(GDALRasterAttributeTableShadow *self,int iRow,int iCol,bool value){
        GDALRATSetValueAsBoolean( self, iRow, iCol, value );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDateTime(GDALRasterAttributeTableShadow *self,int iRow,int iCol,GDALRATDateTime value){
        GDALRATSetValueAsDateTime( self, iRow, iCol, &value );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
        GDALRATSetRowCount( self, nCount );
    }
SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
        return GDALRATCreateColumn( self, pszName, eType, eUsage );
    }
SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
        return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    }
SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
        return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    }
SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
        return GDALRATGetRowOfValue( self, dfValue );
    }
SWIGINTERN int GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(GDALRasterAttributeTableShadow *self){
        return GDALRATChangesAreWrittenToFile( self );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_DumpReadable(GDALRasterAttributeTableShadow *self){
        GDALRATDumpReadable( self, NULL );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_SetTableType(GDALRasterAttributeTableShadow *self,GDALRATTableType eTableType){
        GDALRATSetTableType( self, eTableType );
    }
SWIGINTERN GDALRATTableType GDALRasterAttributeTableShadow_GetTableType(GDALRasterAttributeTableShadow *self){
        return GDALRATGetTableType( self );
    }
SWIGINTERN void GDALRasterAttributeTableShadow_RemoveStatistics(GDALRasterAttributeTableShadow *self){
        GDALRATRemoveStatistics(self);
    }
SWIGINTERN void delete_GDALGroupHS(GDALGroupHS *self){
    GDALGroupRelease(self);
  }
SWIGINTERN char const *GDALGroupHS_GetName(GDALGroupHS *self){
    return GDALGroupGetName(self);
  }
SWIGINTERN char const *GDALGroupHS_GetFullName(GDALGroupHS *self){
    return GDALGroupGetFullName(self);
  }
SWIGINTERN char **GDALGroupHS_GetMDArrayNames(GDALGroupHS *self,char **options=0){
    return GDALGroupGetMDArrayNames( self, options );
  }
SWIGINTERN char **GDALGroupHS_GetMDArrayFullNamesRecursive(GDALGroupHS *self,char **groupOptions=0,char **arrayOptions=0){
    return GDALGroupGetMDArrayFullNamesRecursive( self, groupOptions, arrayOptions );
  }
SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArray(GDALGroupHS *self,char const *name,char **options=0){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALMDArrayH hRet = GDALGroupOpenMDArray(self, name, options);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);

    return hRet;
  }
SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArrayFromFullname(GDALGroupHS *self,char const *name,char **options=0){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALMDArrayH hRet = GDALGroupOpenMDArrayFromFullname(self, name, options);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);

    return hRet;
  }
SWIGINTERN GDALMDArrayHS *GDALGroupHS_ResolveMDArray(GDALGroupHS *self,char const *name,char const *starting_point,char **options=0){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALMDArrayH hRet = GDALGroupResolveMDArray(self, name, starting_point, options);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);

    return hRet;
  }
SWIGINTERN char **GDALGroupHS_GetGroupNames(GDALGroupHS *self,char **options=0){
    return GDALGroupGetGroupNames( self, options );
  }
SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroup(GDALGroupHS *self,char const *name,char **options=0){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALGroupH hRet = GDALGroupOpenGroup(self, name, options);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);

    return hRet;
  }
SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroupFromFullname(GDALGroupHS *self,char const *name,char **options=0){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALGroupH hRet = GDALGroupOpenGroupFromFullname(self, name, options);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);

    return hRet;
  }
SWIGINTERN char **GDALGroupHS_GetVectorLayerNames(GDALGroupHS *self,char **options=0){
    return GDALGroupGetVectorLayerNames( self, options );
  }
SWIGINTERN OGRLayerShadow *GDALGroupHS_OpenVectorLayer(GDALGroupHS *self,char const *name,char **options=0){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    OGRLayerH hRet = GDALGroupOpenVectorLayer(self, name, options);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Vector layer %s does not exist", name);

    return (OGRLayerShadow*) hRet;
  }
SWIGINTERN void GDALGroupHS_GetDimensions(GDALGroupHS *self,GDALDimensionHS ***pdims,size_t *pnCount,char **options=0){
    *pdims = GDALGroupGetDimensions(self, pnCount, options);
  }
SWIGINTERN GDALAttributeHS *GDALGroupHS_GetAttribute(GDALGroupHS *self,char const *name){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALAttributeH hRet = GDALGroupGetAttribute(self, name);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);

    return hRet;
  }
SWIGINTERN void GDALGroupHS_GetAttributes(GDALGroupHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    *pattrs = GDALGroupGetAttributes(self, pnCount, options);
  }
SWIGINTERN char **GDALGroupHS_GetStructuralInfo(GDALGroupHS *self){
    return GDALGroupGetStructuralInfo( self );
  }
SWIGINTERN GDALGroupHS *GDALGroupHS_CreateGroup(GDALGroupHS *self,char const *name,char **options=0){
    return GDALGroupCreateGroup(self, name, options);
  }
SWIGINTERN CPLErr GDALGroupHS_DeleteGroup(GDALGroupHS *self,char const *name,char **options=0){
    return GDALGroupDeleteGroup(self, name, options) ? CE_None : CE_Failure;
  }
SWIGINTERN GDALDimensionHS *GDALGroupHS_CreateDimension(GDALGroupHS *self,char const *name,char const *dim_type,char const *direction,GUIntBig size,char **options=0){
    return GDALGroupCreateDimension(self, name, dim_type, direction, size, options);
  }
SWIGINTERN GDALMDArrayHS *GDALGroupHS_CreateMDArray(GDALGroupHS *self,char const *name,int dimensions,GDALDimensionHS **dimensionsValues,GDALExtendedDataTypeHS *data_type,char **options=0){
    return GDALGroupCreateMDArray(self, name, dimensions, dimensionsValues,
                                  data_type, options);
  }
SWIGINTERN CPLErr GDALGroupHS_DeleteMDArray(GDALGroupHS *self,char const *name,char **options=0){
    return GDALGroupDeleteMDArray(self, name, options) ? CE_None : CE_Failure;
  }

static GUIntBig*
CreateCGUIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(GUIntBig) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  GUIntBig* ret = (GUIntBig*) malloc((*pnSize)*sizeof(GUIntBig));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"K",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

SWIGINTERN GDALAttributeHS *GDALGroupHS_CreateAttribute(GDALGroupHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    return GDALGroupCreateAttribute(self, name, dimensions,
                                    (const GUInt64*) sizes,
                                    data_type, options);
  }
SWIGINTERN CPLErr GDALGroupHS_DeleteAttribute(GDALGroupHS *self,char const *name,char **options=0){
    return GDALGroupDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALGroupHS_Rename(GDALGroupHS *self,char const *newName){
    return GDALGroupRename( self, newName ) ? CE_None : CE_Failure;
  }
SWIGINTERN GDALGroupHS *GDALGroupHS_SubsetDimensionFromSelection(GDALGroupHS *self,char const *selection,char **options=0){
    return GDALGroupSubsetDimensionFromSelection(self, selection, options);
  }
SWIGINTERN size_t GDALGroupHS_GetDataTypeCount(GDALGroupHS *self){
    return GDALGroupGetDataTypeCount(self);
  }

SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
}


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
}
#endif


SWIGINTERNINLINE PyObject *
SWIG_From_size_t  (size_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
  }
#endif
}

SWIGINTERN GDALExtendedDataTypeHS *GDALGroupHS_GetDataType(GDALGroupHS *self,size_t idx){
    if (idx >= GDALGroupGetDataTypeCount(self))
    {
        CPLError(CE_Failure, CPLE_AppDefined, "GetDataType(): invalid index");
        return NULL;
    }
    return GDALGroupGetDataType(self, idx);
  }

typedef struct
{
  double min;
  double max;
  double mean;
  double std_dev;
  GIntBig valid_count;
} Statistics;

SWIGINTERN void delete_Statistics(Statistics *self){
    CPLFree(self);
  }
SWIGINTERN void delete_GDALMDArrayRawBlockInfo(GDALMDArrayRawBlockInfo *self){
    GDALMDArrayRawBlockInfoRelease(self);
  }
SWIGINTERN GUIntBig GDALMDArrayRawBlockInfo_GetOffset(GDALMDArrayRawBlockInfo *self){
      return self->nOffset;
  }
SWIGINTERN GUIntBig GDALMDArrayRawBlockInfo_GetSize(GDALMDArrayRawBlockInfo *self){
      return self->nSize;
  }
SWIGINTERN char const *GDALMDArrayRawBlockInfo_GetFilename(GDALMDArrayRawBlockInfo *self){
    return self->pszFilename;
  }
SWIGINTERN char **GDALMDArrayRawBlockInfo_GetInfo(GDALMDArrayRawBlockInfo *self){
      return self->papszInfo;
  }
SWIGINTERN void GDALMDArrayRawBlockInfo_GetInlineData(GDALMDArrayRawBlockInfo *self,size_t *nLen,char **pBuf){
      if (self->pabyInlineData )
      {
          *nLen = self->nSize;
          *pBuf = reinterpret_cast<char*>(self->pabyInlineData);
          self->pabyInlineData = NULL;
      }
      else
      {
          *nLen = 0;
          *pBuf = NULL;
      }
  }

#include <limits>

static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
{
    GDALExtendedDataTypeClass klass = GDALExtendedDataTypeGetClass(dt);
    if( klass == GEDTC_NUMERIC )
        return true;
    if( klass == GEDTC_STRING )
        return false;
    CPLAssert( klass == GEDTC_COMPOUND );
    size_t nCount = 0;
    GDALEDTComponentH* comps = GDALExtendedDataTypeGetComponents(dt, &nCount);
    bool ret = true;
    for( size_t i = 0; i < nCount; i++ )
    {
        GDALExtendedDataTypeH tmpType = GDALEDTComponentGetType(comps[i]);
        ret = CheckNumericDataType(tmpType);
        GDALExtendedDataTypeRelease(tmpType);
        if( !ret )
            break;
    }
    GDALExtendedDataTypeFreeComponents(comps, nCount);
    return ret;
}

static CPLErr MDArrayReadWriteCheckArguments(GDALMDArrayHS* array,
                                             bool bCheckOnlyDims,
                                             int nDims1, GUIntBig* array_start_idx,
                                             int nDims2, GUIntBig* count,
                                             int nDims3, GIntBig* array_step,
                                             int nDims4, GIntBig* buffer_stride,
                                             GDALExtendedDataTypeHS* buffer_datatype,
                                             size_t* pnBufferSize)
{
    const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(array);
    if( nDims1 != nExpectedDims )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Wrong number of values in array_start_idx");
        return CE_Failure;
    }
    if( nDims2 != nExpectedDims )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Wrong number of values in count");
        return CE_Failure;
    }
    if( nDims3 != nExpectedDims )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Wrong number of values in array_step");
        return CE_Failure;
    }
    if( nDims4!= nExpectedDims )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Wrong number of values in buffer_stride");
        return CE_Failure;
    }
    if( bCheckOnlyDims )
        return CE_None;
    if( !CheckNumericDataType(buffer_datatype) )
    {
        CPLError(CE_Failure, CPLE_NotSupported,
            "non-numeric buffer data type not supported in SWIG bindings");
        return CE_Failure;
    }
    GIntBig nBufferSize = 0;
    for( int i = 0; i < nExpectedDims; i++ )
    {
        if( count[i] == 0 )
        {
            CPLError(CE_Failure, CPLE_AppDefined,
                     "count[%d] = 0 is invalid", i);
            return CE_Failure;
        }
        if( buffer_stride[i] < 0 )
        {
            CPLError(CE_Failure, CPLE_NotSupported,
                "Negative value in buffer_stride not supported in SWIG bindings");
            return CE_Failure;
        }
        if( count[i] > 1 && buffer_stride[i] != 0 )
        {
            if( (GUIntBig)buffer_stride[i] > std::numeric_limits<GIntBig>::max() / (count[i] - 1) )
            {
                CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
                return CE_Failure;
            }
            GIntBig nDelta = buffer_stride[i] * (count[i] - 1);
            if( nBufferSize > std::numeric_limits<GIntBig>::max() - nDelta )
            {
                CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
                return CE_Failure;
            }
            nBufferSize += nDelta;
        }
    }
    const size_t nDTSize = GDALExtendedDataTypeGetSize(buffer_datatype);
    if( nDTSize == 0 )
    {
        CPLError(CE_Failure, CPLE_AppDefined, "nDTSize == 0");
        return CE_Failure;
    }
    if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() / nDTSize )
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
        return CE_Failure;
    }
    nBufferSize *= nDTSize;
    if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() - nDTSize )
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
        return CE_Failure;
    }
    nBufferSize += nDTSize;

#if SIZEOF_VOIDP == 4
    if( nBufferSize > INT_MAX )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
        return CE_Failure;
    }
#endif
    *pnBufferSize = (size_t)nBufferSize;
    return CE_None;
}

SWIGINTERN void delete_GDALMDArrayHS(GDALMDArrayHS *self){
    GDALMDArrayRelease(self);
  }
SWIGINTERN char const *GDALMDArrayHS_GetName(GDALMDArrayHS *self){
    return GDALMDArrayGetName(self);
  }
SWIGINTERN char const *GDALMDArrayHS_GetFullName(GDALMDArrayHS *self){
    return GDALMDArrayGetFullName(self);
  }
SWIGINTERN GUIntBig GDALMDArrayHS_GetTotalElementsCount(GDALMDArrayHS *self){
    return GDALMDArrayGetTotalElementsCount(self);
  }
SWIGINTERN size_t GDALMDArrayHS_GetDimensionCount(GDALMDArrayHS *self){
    return GDALMDArrayGetDimensionCount(self);
  }
SWIGINTERN void GDALMDArrayHS_GetDimensions(GDALMDArrayHS *self,GDALDimensionHS ***pdims,size_t *pnCount){
    *pdims = GDALMDArrayGetDimensions(self, pnCount);
  }
SWIGINTERN void GDALMDArrayHS_GetCoordinateVariables(GDALMDArrayHS *self,GDALMDArrayHS ***parrays,size_t *pnCount){
    *parrays = GDALMDArrayGetCoordinateVariables(self, pnCount);
  }
SWIGINTERN void GDALMDArrayHS_GetBlockSize(GDALMDArrayHS *self,GUIntBig **psizes,size_t *pnCount){
    *psizes = GDALMDArrayGetBlockSize(self, pnCount);
  }
SWIGINTERN void GDALMDArrayHS_GetProcessingChunkSize(GDALMDArrayHS *self,size_t nMaxChunkMemory,GUIntBig **psizes,size_t *pnCount){
     size_t* panTmp = GDALMDArrayGetProcessingChunkSize(self, pnCount, nMaxChunkMemory);
     *psizes = NULL;
     if( panTmp )
     {
        *psizes = (GUIntBig*) CPLMalloc(sizeof(GUIntBig) * (*pnCount));
        for( size_t i = 0; i < *pnCount; ++i )
        {
            (*psizes)[i] = panTmp[i];
        }
        CPLFree(panTmp);
     }
  }
SWIGINTERN GDALExtendedDataTypeHS *GDALMDArrayHS_GetDataType(GDALMDArrayHS *self){
    return GDALMDArrayGetDataType(self);
  }
SWIGINTERN char **GDALMDArrayHS_GetStructuralInfo(GDALMDArrayHS *self){
    return GDALMDArrayGetStructuralInfo( self );
  }
SWIGINTERN CPLErr GDALMDArrayHS_Resize(GDALMDArrayHS *self,int newDimensions,GUIntBig *newSizes,char **options=NULL){
    if( static_cast<size_t>(newDimensions) != GDALMDArrayGetDimensionCount(self) )
    {
        CPLError(CE_Failure, CPLE_IllegalArg,
                 "newSizes array not of expected size");
        return CE_Failure;
    }
    return GDALMDArrayResize( self, newSizes, options ) ? CE_None : CE_Failure;
  }

static GIntBig*
CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"L",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

SWIGINTERN CPLErr GDALMDArrayHS_Read(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,int nDims4,GIntBig *buffer_stride,GDALExtendedDataTypeHS *buffer_datatype,void **buf){
    *buf = NULL;

    size_t buf_size = 0;
    if( MDArrayReadWriteCheckArguments(self, true,
                                        nDims1, array_start_idx,
                                        nDims2, count,
                                        nDims3, array_step,
                                        nDims4, buffer_stride,
                                        buffer_datatype,
                                        &buf_size) != CE_None )
    {
      return CE_Failure;
    }

    const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    std::vector<size_t> count_internal(nExpectedDims + 1);
    std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims + 1);
    size_t nProductCount = 1;
    for( int i = 0; i < nExpectedDims; i++ )
    {
        count_internal[i] = (size_t)count[i];
        if( count_internal[i] != count[i] )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
            return CE_Failure;
        }
        nProductCount *= count_internal[i];
        buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
        if( buffer_stride_internal[i] != buffer_stride[i] )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
            return CE_Failure;
        }
    }

    GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    bool isSelfString = GDALExtendedDataTypeGetClass(selfType) == GEDTC_STRING;
    GDALExtendedDataTypeRelease(selfType);

    if( GDALExtendedDataTypeGetClass(buffer_datatype) == GEDTC_STRING &&
        isSelfString )
    {
        size_t nExpectedStride = 1;
        for( int i = nExpectedDims; i > 0; )
        {
            --i;
            if( (size_t)buffer_stride_internal[i] != nExpectedStride )
            {
                CPLError(CE_Failure, CPLE_AppDefined, "Unhandled stride");
                return CE_Failure;
            }
            nExpectedStride *= count_internal[i];
        }
        char** ppszBuffer = (char**)VSI_CALLOC_VERBOSE(nProductCount, sizeof(char*));
        if( !ppszBuffer )
            return CE_Failure;
        GByte* pabyBuffer = (GByte*)ppszBuffer;
        if( !(GDALMDArrayRead( self,
                            array_start_idx,
                            &count_internal[0],
                            array_step,
                            NULL,
                            buffer_datatype,
                            pabyBuffer,
                            pabyBuffer,
                            nProductCount * sizeof(char*) )) )
        {
            for( size_t i = 0; i < nProductCount; i++ )
                VSIFree(ppszBuffer[i]);
            VSIFree(pabyBuffer);
            return CE_Failure;
        }

        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        PyObject* obj = PyList_New( nProductCount );
        for( size_t i = 0; i < nProductCount; i++ )
        {
            if( !ppszBuffer[i] )
            {
                Py_INCREF(Py_None);
                PyList_SetItem(obj, i, Py_None);
            }
            else
            {
                PyList_SetItem(obj, i, GDALPythonObjectFromCStr( ppszBuffer[i] ) );
            }
            VSIFree(ppszBuffer[i]);
        }
        SWIG_PYTHON_THREAD_END_BLOCK;
        *buf = obj;
        VSIFree(pabyBuffer);
        return CE_None;
    }

    if( MDArrayReadWriteCheckArguments(self, false,
                                        nDims1, array_start_idx,
                                        nDims2, count,
                                        nDims3, array_step,
                                        nDims4, buffer_stride,
                                        buffer_datatype,
                                        &buf_size) != CE_None )
    {
      return CE_Failure;
    }
    if( buf_size == 0 )
    {
        return CE_None;
    }


    SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    if (*buf == NULL)
    {
        *buf = Py_None;
        if( !GetUseExceptions() )
        {
            PyErr_Clear();
        }
        SWIG_PYTHON_THREAD_END_BLOCK;
        CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
        return CE_Failure;
    }
    char *data = PyByteArray_AsString( (PyObject *)*buf );
    SWIG_PYTHON_THREAD_END_BLOCK;

    memset(data, 0, buf_size);

    CPLErr eErr = GDALMDArrayRead( self,
                                   array_start_idx,
                                   &count_internal[0],
                                   array_step,
                                   &buffer_stride_internal[0],
                                   buffer_datatype,
                                   data,
                                   data,
                                   buf_size ) ? CE_None : CE_Failure;
    if (eErr == CE_Failure)
    {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        Py_DECREF((PyObject*)*buf);
        SWIG_PYTHON_THREAD_END_BLOCK;
        *buf = NULL;
    }

    return eErr;
  }
SWIGINTERN CPLErr GDALMDArrayHS_WriteStringArray(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,GDALExtendedDataTypeHS *buffer_datatype,char **options){

    const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    std::vector<size_t> count_internal(nExpectedDims + 1);
    if( nExpectedDims > 1 )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Unsupported number of dimensions");
        return CE_Failure;
    }
    for( int i = 0; i < nExpectedDims; i++ )
    {
        count_internal[i] = (size_t)count[i];
        if( count_internal[i] != count[i] )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
            return CE_Failure;
        }
    }
    if( nExpectedDims == 1 )
    {
        if( nDims1 != 1 )
        {
            CPLError(CE_Failure, CPLE_AppDefined,
                "Wrong number of values in array_start_idx");
            return CE_Failure;
        }
        if( nDims2 != 1 )
        {
            CPLError(CE_Failure, CPLE_AppDefined,
                "Wrong number of values in count");
            return CE_Failure;
        }
        if( nDims3 != 1 )
        {
            CPLError(CE_Failure, CPLE_AppDefined,
                "Wrong number of values in array_step");
            return CE_Failure;
        }
    }

    CPLErr eErr = GDALMDArrayWrite(self,
                                   array_start_idx,
                                   &count_internal[0],
                                   array_step,
                                   NULL,
                                   buffer_datatype,
                                   options,
                                   options,
                                   CSLCount(options) * sizeof(char*) ) ? CE_None : CE_Failure;
    return eErr;
  }
SWIGINTERN CPLErr GDALMDArrayHS_Write(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,int nDims4,GIntBig *buffer_stride,GDALExtendedDataTypeHS *buffer_datatype,GIntBig buf_len,char *buf_string){

    size_t buf_size = 0;
    if( MDArrayReadWriteCheckArguments(self, false,
                                        nDims1, array_start_idx,
                                        nDims2, count,
                                        nDims3, array_step,
                                        nDims4, buffer_stride,
                                        buffer_datatype,
                                        &buf_size) != CE_None )
    {
      return CE_Failure;
    }

    if ( (GUIntBig)buf_len < buf_size )
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
        return CE_Failure;
    }

    const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    std::vector<size_t> count_internal(nExpectedDims+1);
    std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims+1);
    for( int i = 0; i < nExpectedDims; i++ )
    {
        count_internal[i] = (size_t)count[i];
        if( count_internal[i] != count[i] )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
            return CE_Failure;
        }
        buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
        if( buffer_stride_internal[i] != buffer_stride[i] )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
            return CE_Failure;
        }
    }

    CPLErr eErr = GDALMDArrayWrite( self,
                                   array_start_idx,
                                   &count_internal[0],
                                   array_step,
                                   &buffer_stride_internal[0],
                                   buffer_datatype,
                                   buf_string,
                                   buf_string,
                                   (size_t)buf_len ) ? CE_None : CE_Failure;
    return eErr;
  }
SWIGINTERN CPLErr GDALMDArrayHS_AdviseRead(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,char **options=0){

    const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    if( nDims1 != nExpectedDims )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Wrong number of values in array_start_idx");
        return CE_Failure;
    }
    if( nDims2 != nExpectedDims )
    {
        CPLError(CE_Failure, CPLE_AppDefined,
            "Wrong number of values in count");
        return CE_Failure;
    }

    std::vector<size_t> count_internal(nExpectedDims+1);
    for( int i = 0; i < nExpectedDims; i++ )
    {
        count_internal[i] = (size_t)count[i];
        if( count_internal[i] != count[i] )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
            return CE_Failure;
        }
    }

    if( !(GDALMDArrayAdviseReadEx( self, array_start_idx, count_internal.data(), options )) )
    {
        return CE_Failure;
    }
    return CE_None;
  }
SWIGINTERN GDALAttributeHS *GDALMDArrayHS_GetAttribute(GDALMDArrayHS *self,char const *name){

    CPLErr eLastErrorType = CPLGetLastErrorType();

    GDALAttributeH hRet = GDALMDArrayGetAttribute(self, name);

    if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
        CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);

    return hRet;
  }
SWIGINTERN void GDALMDArrayHS_GetAttributes(GDALMDArrayHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    *pattrs = GDALMDArrayGetAttributes(self, pnCount, options);
  }
SWIGINTERN GDALAttributeHS *GDALMDArrayHS_CreateAttribute(GDALMDArrayHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    return GDALMDArrayCreateAttribute(self, name, dimensions,
                                    (const GUInt64*) sizes,
                                    data_type, options);
  }
SWIGINTERN CPLErr GDALMDArrayHS_DeleteAttribute(GDALMDArrayHS *self,char const *name,char **options=0){
    return GDALMDArrayDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_GetNoDataValueAsRaw(GDALMDArrayHS *self,void **buf){
    *buf = NULL;
    const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    if( pabyBuf == NULL )
    {
      return CE_Failure;
    }
    GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    const size_t buf_size = GDALExtendedDataTypeGetSize(selfType);
    GDALExtendedDataTypeRelease(selfType);

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    if (*buf == NULL)
    {
        *buf = Py_None;
        if( !GetUseExceptions() )
        {
            PyErr_Clear();
        }
        SWIG_PYTHON_THREAD_END_BLOCK;
        CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
        return CE_Failure;
    }
    char *data = PyByteArray_AsString( (PyObject *)*buf );
    SWIG_PYTHON_THREAD_END_BLOCK;

    memcpy(data, pabyBuf, buf_size);

    return CE_None;
  }
SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsDouble(GDALMDArrayHS *self,double *val,int *hasval){
    *val = GDALMDArrayGetNoDataValueAsDouble( self, hasval );
  }
SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsInt64(GDALMDArrayHS *self,GIntBig *val,int *hasval){
    *val = GDALMDArrayGetNoDataValueAsInt64( self, hasval );
  }
SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsUInt64(GDALMDArrayHS *self,GUIntBig *val,int *hasval){
    *val = GDALMDArrayGetNoDataValueAsUInt64( self, hasval );
  }
SWIGINTERN retStringAndCPLFree *GDALMDArrayHS_GetNoDataValueAsString(GDALMDArrayHS *self){
    GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    GDALExtendedDataTypeRelease(selfType);

    if( typeClass != GEDTC_STRING )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
        return NULL;
    }
    const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    if( pabyBuf == NULL )
    {
      return NULL;
    }
    const char* ret = *reinterpret_cast<const char* const*>(pabyBuf);
    if( ret )
        return CPLStrdup(ret);
    return NULL;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueDouble(GDALMDArrayHS *self,double d){
    return GDALMDArraySetNoDataValueAsDouble( self, d ) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueInt64(GDALMDArrayHS *self,GIntBig v){
    return GDALMDArraySetNoDataValueAsInt64( self, v ) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueUInt64(GDALMDArrayHS *self,GUIntBig v){
    return GDALMDArraySetNoDataValueAsUInt64( self, v ) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueString(GDALMDArrayHS *self,char const *nodata){
    GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    GDALExtendedDataTypeRelease(selfType);

    if( typeClass != GEDTC_STRING )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
        return CE_Failure;
    }
    return GDALMDArraySetRawNoDataValue(self, &nodata) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueRaw(GDALMDArrayHS *self,GIntBig nLen,char *pBuf){
    GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    const size_t selfTypeSize = GDALExtendedDataTypeGetSize(selfType);
    GDALExtendedDataTypeRelease(selfType);

    if( static_cast<size_t>(nLen) != selfTypeSize )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Argument of wrong size");
        return CE_Failure;
    }
    return GDALMDArraySetRawNoDataValue(self, pBuf) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_DeleteNoDataValue(GDALMDArrayHS *self){
    return GDALMDArraySetRawNoDataValue( self, NULL ) ? CE_None : CE_Failure;
  }
SWIGINTERN void GDALMDArrayHS_GetOffset(GDALMDArrayHS *self,double *val,int *hasval){
    *val = GDALMDArrayGetOffset( self, hasval );
  }
SWIGINTERN GDALDataType GDALMDArrayHS_GetOffsetStorageType(GDALMDArrayHS *self){
    GDALDataType eDT = GDT_Unknown;
    int hasval = FALSE;
    GDALMDArrayGetOffsetEx( self, &hasval, &eDT );
    return hasval ? eDT : GDT_Unknown;
  }
SWIGINTERN void GDALMDArrayHS_GetScale(GDALMDArrayHS *self,double *val,int *hasval){
    *val = GDALMDArrayGetScale( self, hasval );
  }
SWIGINTERN GDALDataType GDALMDArrayHS_GetScaleStorageType(GDALMDArrayHS *self){
    GDALDataType eDT = GDT_Unknown;
    int hasval = FALSE;
    GDALMDArrayGetScaleEx( self, &hasval, &eDT );
    return hasval ? eDT : GDT_Unknown;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetOffset(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    return GDALMDArraySetOffsetEx( self, val, storageType ) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetScale(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    return GDALMDArraySetScaleEx( self, val, storageType ) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALMDArrayHS_SetUnit(GDALMDArrayHS *self,char const *unit){
    return GDALMDArraySetUnit(self, unit) ? CE_None : CE_Failure;
  }
SWIGINTERN char const *GDALMDArrayHS_GetUnit(GDALMDArrayHS *self){
    return GDALMDArrayGetUnit(self);
  }
SWIGINTERN OGRErr GDALMDArrayHS_SetSpatialRef(GDALMDArrayHS *self,OSRSpatialReferenceShadow *srs){
     return GDALMDArraySetSpatialRef( self, (OGRSpatialReferenceH)srs ) ? CE_None : CE_Failure;
  }
SWIGINTERN OSRSpatialReferenceShadow *GDALMDArrayHS_GetSpatialRef(GDALMDArrayHS *self){
    return (OSRSpatialReferenceShadow*) GDALMDArrayGetSpatialRef(self);
  }
SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetView(GDALMDArrayHS *self,char const *viewExpr){
    return GDALMDArrayGetView(self, viewExpr);
  }
SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_Transpose(GDALMDArrayHS *self,int axisMap,int *mapInts){
    return GDALMDArrayTranspose(self, axisMap, mapInts);
  }
SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetUnscaled(GDALMDArrayHS *self){
    return GDALMDArrayGetUnscaled(self);
  }
SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetMask(GDALMDArrayHS *self,char **options=0){
    return GDALMDArrayGetMask(self, options);
  }
SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetGridded(GDALMDArrayHS *self,char const *pszGridOptions,GDALMDArrayHS *xArray=NULL,GDALMDArrayHS *yArray=NULL,char **options=0){
    return GDALMDArrayGetGridded(self, pszGridOptions, xArray, yArray, options);
  }
SWIGINTERN GDALDatasetShadow *GDALMDArrayHS_AsClassicDataset(GDALMDArrayHS *self,size_t iXDim,size_t iYDim,GDALGroupHS *hRootGroup=NULL,char **options=0){
    return (GDALDatasetShadow*)GDALMDArrayAsClassicDatasetEx(self, iXDim, iYDim, hRootGroup, options);
  }
SWIGINTERN GDALMDArrayRawBlockInfo *GDALMDArrayHS_GetRawBlockInfo(GDALMDArrayHS *self,int nDims,GUIntBig *block_coordinates){
      if (static_cast<size_t>(nDims) != GDALMDArrayGetDimensionCount(self) )
      {
          CPLError(CE_Failure, CPLE_AppDefined,
                   "Invalid number of values in block_coordinates argument");
          return NULL;
      }
      GDALMDArrayRawBlockInfo* blockInfo = GDALMDArrayRawBlockInfoCreate();
      if( !GDALMDArrayGetRawBlockInfo(self, reinterpret_cast<const uint64_t*>(block_coordinates), blockInfo) )
      {
          GDALMDArrayRawBlockInfoRelease(blockInfo);
          blockInfo = NULL;
      }
      return blockInfo;
  }
SWIGINTERN Statistics *GDALMDArrayHS_GetStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,bool force=TRUE,GDALProgressFunc callback=NULL,void *callback_data=NULL){
        GUInt64 nValidCount = 0;
        Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
        CPLErr eErr = GDALMDArrayGetStatistics(self, NULL, approx_ok, force,
                                 &(psStatisticsOut->min),
                                 &(psStatisticsOut->max),
                                 &(psStatisticsOut->mean),
                                 &(psStatisticsOut->std_dev),
                                 &nValidCount,
                                 callback, callback_data);
        psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
        if( eErr == CE_None )
            return psStatisticsOut;
        CPLFree(psStatisticsOut);
        return NULL;
  }
SWIGINTERN Statistics *GDALMDArrayHS_ComputeStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=0){
        GUInt64 nValidCount = 0;
        Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
        int nSuccess = GDALMDArrayComputeStatisticsEx(self, NULL, approx_ok,
                                 &(psStatisticsOut->min),
                                 &(psStatisticsOut->max),
                                 &(psStatisticsOut->mean),
                                 &(psStatisticsOut->std_dev),
                                 &nValidCount,
                                 callback, callback_data, options);
        psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
        if( nSuccess )
            return psStatisticsOut;
        CPLFree(psStatisticsOut);
        return NULL;
  }
SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetResampled(GDALMDArrayHS *self,int nDimensions,GDALDimensionHS **dimensions,GDALRIOResampleAlg resample_alg,OSRSpatialReferenceShadow **srs,char **options=0){
    return GDALMDArrayGetResampled(self, nDimensions, dimensions,
                                  resample_alg, srs ? *srs : NULL, options);
  }
SWIGINTERN void GDALMDArrayHS_GetMeshGrid(int nInputArrays,GDALMDArrayHS **ahInputArrays,GDALMDArrayHS ***outputArrays,size_t *pnCountOutputArrays,char **options=0){
    *outputArrays = GDALMDArrayGetMeshGrid(ahInputArrays, nInputArrays, pnCountOutputArrays, options);
  }
SWIGINTERN bool GDALMDArrayHS_Cache(GDALMDArrayHS *self,char **options=NULL){
      return GDALMDArrayCache(self, options);
  }
SWIGINTERN CPLErr GDALMDArrayHS_Rename(GDALMDArrayHS *self,char const *newName){
    return GDALMDArrayRename( self, newName ) ? CE_None : CE_Failure;
  }
SWIGINTERN void delete_GDALAttributeHS(GDALAttributeHS *self){
    GDALAttributeRelease(self);
  }
SWIGINTERN char const *GDALAttributeHS_GetName(GDALAttributeHS *self){
    return GDALAttributeGetName(self);
  }
SWIGINTERN char const *GDALAttributeHS_GetFullName(GDALAttributeHS *self){
    return GDALAttributeGetFullName(self);
  }
SWIGINTERN GUIntBig GDALAttributeHS_GetTotalElementsCount(GDALAttributeHS *self){
    return GDALAttributeGetTotalElementsCount(self);
  }
SWIGINTERN size_t GDALAttributeHS_GetDimensionCount(GDALAttributeHS *self){
    return GDALAttributeGetDimensionCount(self);
  }
SWIGINTERN void GDALAttributeHS_GetDimensionsSize(GDALAttributeHS *self,GUIntBig **pdims,size_t *pnCount){
    *pdims = GDALAttributeGetDimensionsSize(self, pnCount);
  }
SWIGINTERN GDALExtendedDataTypeHS *GDALAttributeHS_GetDataType(GDALAttributeHS *self){
    return GDALAttributeGetDataType(self);
  }
SWIGINTERN CPLErr GDALAttributeHS_ReadAsRaw(GDALAttributeHS *self,void **buf){
    *buf = NULL;
    GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    bool bIsNumeric = CheckNumericDataType(dt);
    GDALExtendedDataTypeRelease(dt);
    if( !bIsNumeric )
    {
        CPLError(CE_Failure, CPLE_NotSupported,
            "non-numeric buffer data type not supported in SWIG bindings");
        return CE_Failure;
    }
    size_t buf_size = 0;
    GByte* pabyBuf = GDALAttributeReadAsRaw(self, &buf_size);
    if( pabyBuf == NULL )
    {
      return CE_Failure;
    }

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size );
    if (*buf == NULL)
    {
        *buf = Py_None;
        if( !GetUseExceptions() )
        {
            PyErr_Clear();
        }
        SWIG_PYTHON_THREAD_END_BLOCK;
        CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
        GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
        return CE_Failure;
    }
    char *data = PyBytes_AsString( (PyObject *)*buf );
    SWIG_PYTHON_THREAD_END_BLOCK;

    memcpy(data, pabyBuf, buf_size);
    GDALAttributeFreeRawResult(self, pabyBuf, buf_size);

    return CE_None;
  }
SWIGINTERN char const *GDALAttributeHS_ReadAsString(GDALAttributeHS *self){
    return GDALAttributeReadAsString(self);
  }
SWIGINTERN int GDALAttributeHS_ReadAsInt(GDALAttributeHS *self){
    return GDALAttributeReadAsInt(self);
  }
SWIGINTERN long long GDALAttributeHS_ReadAsInt64(GDALAttributeHS *self){
    return GDALAttributeReadAsInt64(self);
  }

#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE PyObject* 
SWIG_From_long_SS_long  (long long value)
{
  return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
}
#endif

SWIGINTERN double GDALAttributeHS_ReadAsDouble(GDALAttributeHS *self){
    return GDALAttributeReadAsDouble(self);
  }
SWIGINTERN char **GDALAttributeHS_ReadAsStringArray(GDALAttributeHS *self){
    return GDALAttributeReadAsStringArray(self);
  }

static PyObject *
CreateTupleFromIntArray( const int *first, size_t size ) {
  PyObject *out = PyTuple_New( size );
  for( unsigned int i=0; i<size; i++ ) {
    PyObject *val = PyInt_FromLong( *first );
    ++first;
    PyTuple_SetItem( out, i, val );
  }
  return out;
}

SWIGINTERN void GDALAttributeHS_ReadAsIntArray(GDALAttributeHS *self,int **pvals,size_t *pnCount){
    *pvals = GDALAttributeReadAsIntArray(self, pnCount);
  }

static PyObject *
CreateTupleFromInt64Array( const long long *first, size_t size ) {
  PyObject *out = PyTuple_New( size );
  for( unsigned int i=0; i<size; i++ ) {
    PyObject *val = PyLong_FromLongLong( *first );
    ++first;
    PyTuple_SetItem( out, i, val );
  }
  return out;
}

SWIGINTERN void GDALAttributeHS_ReadAsInt64Array(GDALAttributeHS *self,long long **pvals,size_t *pnCount){
    *pvals = (long long*)GDALAttributeReadAsInt64Array(self, pnCount);
  }
SWIGINTERN void GDALAttributeHS_ReadAsDoubleArray(GDALAttributeHS *self,double **pvals,size_t *pnCount){
    *pvals = GDALAttributeReadAsDoubleArray(self, pnCount);
  }
SWIGINTERN CPLErr GDALAttributeHS_WriteRaw(GDALAttributeHS *self,GIntBig nLen,char *pBuf){
    GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    bool bIsNumeric = CheckNumericDataType(dt);
    GDALExtendedDataTypeRelease(dt);
    if( !bIsNumeric )
    {
        CPLError(CE_Failure, CPLE_NotSupported,
            "non-numeric buffer data type not supported in SWIG bindings");
        return CE_Failure;
    }
    return GDALAttributeWriteRaw(self, pBuf, nLen) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALAttributeHS_WriteString(GDALAttributeHS *self,char const *val){
    return GDALAttributeWriteString(self, val) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALAttributeHS_WriteStringArray(GDALAttributeHS *self,char **vals){
    return GDALAttributeWriteStringArray(self, vals) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALAttributeHS_WriteInt(GDALAttributeHS *self,int val){
    return GDALAttributeWriteInt(self, val) ? CE_None : CE_Failure;
  }

#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    long long v = PyLong_AsLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    long v;
    res = SWIG_AsVal_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    const double mant_min = -mant_max;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
      return SWIG_OverflowError;
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
      if (val) *val = (long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}
#endif

SWIGINTERN CPLErr GDALAttributeHS_WriteInt64(GDALAttributeHS *self,long long val){
    return GDALAttributeWriteInt64(self, val) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALAttributeHS_WriteDouble(GDALAttributeHS *self,double val){
    return GDALAttributeWriteDouble(self, val) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALAttributeHS_WriteIntArray(GDALAttributeHS *self,int nList,int *pList){
    return GDALAttributeWriteIntArray(self, pList, nList) ? CE_None : CE_Failure;
  }

static long long*
CreateCInt64ListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(long long) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  long long* ret = (long long*) malloc((*pnSize)*sizeof(long long));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"L",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

SWIGINTERN CPLErr GDALAttributeHS_WriteInt64Array(GDALAttributeHS *self,int nList,long long *pList){
    return GDALAttributeWriteInt64Array(self, (int64_t*)pList, nList) ? CE_None : CE_Failure;
  }

static double*
CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  double* ret = (double*) malloc((*pnSize)*sizeof(double));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"d",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an number");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

SWIGINTERN CPLErr GDALAttributeHS_WriteDoubleArray(GDALAttributeHS *self,int nList,double *pList){
    return GDALAttributeWriteDoubleArray(self, pList, nList) ? CE_None : CE_Failure;
  }
SWIGINTERN CPLErr GDALAttributeHS_Rename(GDALAttributeHS *self,char const *newName){
    return GDALAttributeRename( self, newName ) ? CE_None : CE_Failure;
  }
SWIGINTERN void delete_GDALDimensionHS(GDALDimensionHS *self){
    GDALDimensionRelease(self);
  }
SWIGINTERN char const *GDALDimensionHS_GetName(GDALDimensionHS *self){
    return GDALDimensionGetName(self);
  }
SWIGINTERN char const *GDALDimensionHS_GetFullName(GDALDimensionHS *self){
    return GDALDimensionGetFullName(self);
  }
SWIGINTERN char const *GDALDimensionHS_GetType(GDALDimensionHS *self){
    return GDALDimensionGetType(self);
  }
SWIGINTERN char const *GDALDimensionHS_GetDirection(GDALDimensionHS *self){
    return GDALDimensionGetDirection(self);
  }
SWIGINTERN GUIntBig GDALDimensionHS_GetSize(GDALDimensionHS *self){
    return GDALDimensionGetSize(self);
  }
SWIGINTERN GDALMDArrayHS *GDALDimensionHS_GetIndexingVariable(GDALDimensionHS *self){
    return GDALDimensionGetIndexingVariable(self);
  }
SWIGINTERN bool GDALDimensionHS_SetIndexingVariable(GDALDimensionHS *self,GDALMDArrayHS *array){
    return GDALDimensionSetIndexingVariable(self, array);
  }
SWIGINTERN CPLErr GDALDimensionHS_Rename(GDALDimensionHS *self,char const *newName){
    return GDALDimensionRename( self, newName ) ? CE_None : CE_Failure;
  }
SWIGINTERN void delete_GDALExtendedDataTypeHS(GDALExtendedDataTypeHS *self){
    GDALExtendedDataTypeRelease(self);
  }
SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_Create(GDALDataType dt){
    return GDALExtendedDataTypeCreate(dt);
  }
SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateString(size_t nMaxStringLength=0,GDALExtendedDataTypeSubType eSubType=GEDTST_NONE){
    return GDALExtendedDataTypeCreateStringEx(nMaxStringLength, eSubType);
  }
SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateCompound(char const *name,size_t nTotalSize,int nComps,GDALEDTComponentHS **comps){
    return GDALExtendedDataTypeCreateCompound(name, nTotalSize, nComps, comps);
  }
SWIGINTERN char const *GDALExtendedDataTypeHS_GetName(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetName(self);
  }
SWIGINTERN GDALExtendedDataTypeClass GDALExtendedDataTypeHS_GetClass(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetClass(self);
  }
SWIGINTERN GDALDataType GDALExtendedDataTypeHS_GetNumericDataType(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetNumericDataType(self);
  }
SWIGINTERN size_t GDALExtendedDataTypeHS_GetSize(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetSize(self);
  }
SWIGINTERN size_t GDALExtendedDataTypeHS_GetMaxStringLength(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetMaxStringLength(self);
  }
SWIGINTERN GDALExtendedDataTypeSubType GDALExtendedDataTypeHS_GetSubType(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetSubType(self);
  }
SWIGINTERN GDALRasterAttributeTableShadow *GDALExtendedDataTypeHS_GetRAT(GDALExtendedDataTypeHS *self){
    return GDALExtendedDataTypeGetRAT(self);
  }
SWIGINTERN void GDALExtendedDataTypeHS_GetComponents(GDALExtendedDataTypeHS *self,GDALEDTComponentHS ***pcomps,size_t *pnCount){
    *pcomps = GDALExtendedDataTypeGetComponents(self, pnCount);
  }
SWIGINTERN bool GDALExtendedDataTypeHS_CanConvertTo(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    return GDALExtendedDataTypeCanConvertTo(self, other);
  }
SWIGINTERN bool GDALExtendedDataTypeHS_Equals(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    return GDALExtendedDataTypeEquals(self, other);
  }
SWIGINTERN void delete_GDALEDTComponentHS(GDALEDTComponentHS *self){
    GDALEDTComponentRelease(self);
  }
SWIGINTERN GDALEDTComponentHS *GDALEDTComponentHS_Create(char const *name,size_t offset,GDALExtendedDataTypeHS *type){
    return GDALEDTComponentCreate(name, offset, type);
  }
SWIGINTERN char const *GDALEDTComponentHS_GetName(GDALEDTComponentHS *self){
    return GDALEDTComponentGetName(self);
  }
SWIGINTERN size_t GDALEDTComponentHS_GetOffset(GDALEDTComponentHS *self){
    return GDALEDTComponentGetOffset(self);
  }
SWIGINTERN GDALExtendedDataTypeHS *GDALEDTComponentHS_GetType(GDALEDTComponentHS *self){
    return GDALEDTComponentGetType(self);
  }

GDALRasterAttributeTableShadow* CreateRasterAttributeTableFromMDArrays(
    GDALRATTableType eTableType, int nArrays, GDALMDArrayHS **ahArrays,
    int nUsages = 0, GDALRATFieldUsage *paeUsages = NULL )
{
  if( nUsages != 0 && nUsages != nArrays )
  {
      CPLError(CE_Failure, CPLE_AppDefined, "nUsages != nArrays");
      return NULL;
  }
  return GDALCreateRasterAttributeTableFromMDArrays( eTableType, nArrays, (const GDALMDArrayH *)ahArrays, paeUsages );
}


/* Returned size is in bytes or 0 if an error occurred. */
static
GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
                                 GIntBig nPixelSpace, GIntBig nLineSpace,
                                 int bSpacingShouldBeMultipleOfPixelSize )
{
    if (buf_xsize <= 0 || buf_ysize <= 0)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
        return 0;
    }

    if (nPixelSpace < 0 || nLineSpace < 0)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
        return 0;
    }

    if (nPixelSize == 0)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
        return 0;
    }

    if( nPixelSpace == 0 )
        nPixelSpace = nPixelSize;
    else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
        return 0;
    }

    if( nLineSpace == 0 )
    {
        nLineSpace = nPixelSpace * buf_xsize;
    }
    else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
        return 0;
    }

    GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
#if SIZEOF_VOIDP == 4
    if (nRet > INT_MAX)
    {
        CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
        return 0;
    }
#endif

    return nRet;
}


static
CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
                             int xoff, int yoff, int xsize, int ysize,
                             int buf_xsize, int buf_ysize,
                             GDALDataType buf_type,
                             GIntBig buf_size, char *buffer,
                             GIntBig pixel_space, GIntBig line_space,
                             GDALRasterIOExtraArg* psExtraArg )
{
    GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSizeBytes( buf_type ),
                                                   pixel_space, line_space, FALSE );
    if ( min_buffer_size == 0 )
      return CE_Failure;

    if ( buf_size < min_buffer_size ) {
      CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
      return CE_Failure;
    }

    return GDALRasterIOEx( obj, GF_Write, xoff, yoff, xsize, ysize,
                           (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space, psExtraArg );
}

SWIGINTERN GDALDatasetShadow *GDALRasterBandShadow_GetDataset(GDALRasterBandShadow *self){
    return (GDALDatasetShadow*) GDALGetBandDataset(self);
  }
SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    return GDALGetBandNumber(self);
  }
SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
      GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
  }
SWIGINTERN void GDALRasterBandShadow_GetActualBlockSize(GDALRasterBandShadow *self,int nXBlockOff,int nYBlockOff,int *pnxvalid,int *pnyvalid,int *pisvalid){
    *pisvalid = (GDALGetActualBlockSize(self, nXBlockOff, nYBlockOff, pnxvalid, pnyvalid) == CE_None);
  }
SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    return GDALGetRasterColorInterpretation(self);
  }
SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    return GDALGetRasterColorInterpretation(self);
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    return GDALSetRasterColorInterpretation( self, val );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    return GDALSetRasterColorInterpretation( self, val );
  }
SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterNoDataValue( self, hasval );
  }
SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig *val,int *hasval){
    *val = GDALGetRasterNoDataValueAsInt64( self, hasval );
  }
SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig *val,int *hasval){
    *val = GDALGetRasterNoDataValueAsUInt64( self, hasval );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    return GDALSetRasterNoDataValue( self, d );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig v){
    return GDALSetRasterNoDataValueAsInt64( self, v );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig v){
    return GDALSetRasterNoDataValueAsUInt64( self, v );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_DeleteNoDataValue(GDALRasterBandShadow *self){
    return GDALDeleteRasterNoDataValue(self);
  }
SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
      return GDALGetRasterUnitType(self);
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    return GDALSetRasterUnitType( self, val );
  }
SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    return GDALGetRasterCategoryNames(self);
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    return GDALSetRasterCategoryNames( self, names );
  }
SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterMinimum( self, hasval );
  }
SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterMaximum( self, hasval );
  }
SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterOffset( self, hasval );
  }
SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterScale( self, hasval );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    return GDALSetRasterOffset( self, val );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    return GDALSetRasterScale( self, val );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    if (min) *min = 0;
    if (max) *max = 0;
    if (mean) *mean = 0;
    if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    return GDALGetRasterStatistics( self, approx_ok, force,
				    min, max, mean, stddev );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min,double *max,double *mean,double *stddev,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    return GDALSetRasterStatistics( self, min, max, mean, stddev );
  }
SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    return GDALGetOverviewCount(self);
  }
SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    return (GDALRasterBandShadow*) GDALGetOverview( self, i );
  }
SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetSampleOverview(GDALRasterBandShadow *self,GUIntBig nDesiredSamples){
    return (GDALRasterBandShadow*) GDALGetRasterSampleOverviewEx( self, nDesiredSamples );
  }
SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
  }
SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int *isvalid,bool approx_ok=false,bool can_return_none=false){
    *isvalid = GDALComputeRasterMinMax( self, approx_ok, argout ) == CE_None;
    if( !can_return_none && !*isvalid )
    {
        *isvalid = true;
        argout[0] = CPLAtof("nan");
        argout[1] = CPLAtof("nan");
    }
  }
SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    GDALComputeBandStats( self, samplestep, argout+0, argout+1,
                          NULL, NULL );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    return GDALFillRaster( self, real_fill, imag_fill );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_WriteRaster(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,GIntBig buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
                                        : *buf_type;
    GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    GDALRasterIOExtraArg* psExtraArg = NULL;
    return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
                                 nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space, psExtraArg );
  }
SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    GDALFlushRasterCache( self );
  }
SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
  }
SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
  }
SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    return GDALSetRasterColorTable( self, arg );
  }
SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    return GDALSetRasterColorTable( self, arg );
  }
SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){
      return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
  }
SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
      return GDALSetDefaultRAT(self, table);
  }
SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
      return (GDALRasterBandShadow *) GDALGetMaskBand( self );
  }
SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
      return GDALGetMaskFlags( self );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
      return GDALCreateMaskBand( self, nFlags );
  }
SWIGINTERN bool GDALRasterBandShadow_IsMaskBand(GDALRasterBandShadow *self){
      return GDALIsMaskBand( self );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_GetHistogram(GDALRasterBandShadow *self,double min=-0.5,double max=255.5,int buckets=256,GUIntBig *panHistogram=NULL,int include_out_of_range=0,int approx_ok=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    CPLErrorReset();
    CPLErr err = GDALGetRasterHistogramEx( self, min, max, buckets, panHistogram,
                                         include_out_of_range, approx_ok,
                                         callback, callback_data );
    return err;
  }
SWIGINTERN CPLErr GDALRasterBandShadow_GetDefaultHistogram(GDALRasterBandShadow *self,double *min_ret=NULL,double *max_ret=NULL,int *buckets_ret=NULL,GUIntBig **ppanHistogram=NULL,int force=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return GDALGetDefaultHistogramEx( self, min_ret, max_ret, buckets_ret,
                                    ppanHistogram, force,
                                    callback, callback_data );
}
SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,GUIntBig *panHistogram_in){
    return GDALSetDefaultHistogramEx( self, min, max,
                                    buckets_in, panHistogram_in );
}
SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
      return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
  }
SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    return GDALGetRasterCategoryNames( self );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    return GDALSetRasterCategoryNames( self, papszCategoryNames );
  }
SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMem(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nBufXSize,int nBufYSize,GDALDataType eBufType,size_t nCacheSize,size_t nPageSizeHint,char **options=NULL){
        CPLVirtualMem* vmem = GDALRasterBandGetVirtualMem( self,
                                         eRWFlag,
                                         nXOff, nYOff,
                                         nXSize, nYSize,
                                         nBufXSize, nBufYSize,
                                         eBufType,
                                         0,
                                         0,
                                         nCacheSize,
                                         nPageSizeHint,
                                         FALSE,
                                         options );
        if( vmem == NULL )
            return NULL;
        CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
        vmemshadow->vmem = vmem;
        vmemshadow->eBufType = eBufType;
        vmemshadow->bIsBandSequential = TRUE;
        vmemshadow->bReadOnly = (eRWFlag == GF_Read);
        vmemshadow->nBufXSize = nBufXSize;
        vmemshadow->nBufYSize = nBufYSize;
        vmemshadow->nBandCount = 1;
        return vmemshadow;
    }
SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMemAuto(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,char **options=NULL){
        int            nPixelSpace;
        GIntBig        nLineSpace;
        CPLVirtualMem* vmem = GDALGetVirtualMemAuto( self,
                                         eRWFlag,
                                         &nPixelSpace,
                                         &nLineSpace,
                                         options );
        if( vmem == NULL )
            return NULL;
        CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
        vmemshadow->vmem = vmem;
        vmemshadow->eBufType = GDALGetRasterDataType( self );
        vmemshadow->bAuto = TRUE;
        vmemshadow->bReadOnly = (eRWFlag == GF_Read);
        vmemshadow->nBandCount = 1;
        vmemshadow->nPixelSpace = nPixelSpace;
        vmemshadow->nLineSpace = nLineSpace;
        vmemshadow->nBufXSize = GDALGetRasterBandXSize(self);
        vmemshadow->nBufYSize = GDALGetRasterBandYSize(self);
        return vmemshadow;
    }
SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetTiledVirtualMem(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nTileXSize,int nTileYSize,GDALDataType eBufType,size_t nCacheSize,char **options=NULL){
        CPLVirtualMem* vmem = GDALRasterBandGetTiledVirtualMem( self,
                                         eRWFlag,
                                         nXOff, nYOff,
                                         nXSize, nYSize,
                                         nTileXSize, nTileYSize,
                                         eBufType,
                                         nCacheSize,
                                         FALSE,
                                         options );
        if( vmem == NULL )
            return NULL;
        CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
        vmemshadow->vmem = vmem;
        vmemshadow->eBufType = eBufType;
        vmemshadow->bIsBandSequential = -1;
        vmemshadow->bReadOnly = (eRWFlag == GF_Read);
        vmemshadow->nBufXSize = nXSize;
        vmemshadow->nBufYSize = nYSize;
        vmemshadow->eTileOrganization = GTO_BSQ;
        vmemshadow->nTileXSize = nTileXSize;
        vmemshadow->nTileYSize = nTileYSize;
        vmemshadow->nBandCount = 1;
        return vmemshadow;
    }
SWIGINTERN int GDALRasterBandShadow_GetDataCoverageStatus(GDALRasterBandShadow *self,int nXOff,int nYOff,int nXSize,int nYSize,int nMaskFlagStop=0,double *pdfDataPct=NULL){
        return GDALGetDataCoverageStatus(self, nXOff, nYOff,
                                         nXSize, nYSize,
                                         nMaskFlagStop,
                                         pdfDataPct);
    }
SWIGINTERN CPLErr GDALRasterBandShadow_AdviseRead(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,char **options=NULL){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype;
    if ( buf_type != 0 ) {
      ntype = (GDALDataType) *buf_type;
    } else {
      ntype = GDALGetRasterDataType( self );
    }
    return GDALRasterAdviseRead(self, xoff, yoff, xsize, ysize,
                                nxsize, nysize, ntype, options);
}
SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtPoint(GDALRasterBandShadow *self,double pixel,double line,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue){
    if (pdfRealValue) *pdfRealValue = 0;
    if (pdfImagValue) *pdfImagValue = 0;
    return GDALRasterInterpolateAtPoint( self, pixel, line, interpolation, pdfRealValue, pdfImagValue );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtGeolocation(GDALRasterBandShadow *self,double geolocX,double geolocY,OSRSpatialReferenceShadow *srs,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue,char **transformerOptions=NULL){
    if (pdfRealValue) *pdfRealValue = 0;
    if (pdfImagValue) *pdfImagValue = 0;
    return GDALRasterInterpolateAtGeolocation( self, geolocX, geolocY,
                (OGRSpatialReferenceH)srs, interpolation,
                pdfRealValue, pdfImagValue, transformerOptions );
  }
SWIGINTERN CPLErr GDALRasterBandShadow_ComputeMinMaxLocation(GDALRasterBandShadow *self,double *pdfMin,double *pdfMax,int *pnMinX,int *pnMinY,int *pnMaxX,int *pnMaxY){
    return GDALComputeRasterMinMaxLocation( self, pdfMin, pdfMax,
                                            pnMinX, pnMinY,
                                            pnMaxX, pnMaxY );
  }
SWIGINTERN GDALMDArrayHS *GDALRasterBandShadow_AsMDArray(GDALRasterBandShadow *self){
    return GDALRasterBandAsMDArray(self);
  }
SWIGINTERN void GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(GDALRasterBandShadow *self,bool b){
      GDALEnablePixelTypeSignedByteWarning(self, b);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_UnaryOp(GDALRasterBandShadow *self,GDALRasterAlgebraUnaryOperation op){
      return GDALRasterBandUnaryOp(self, op);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpBand(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *other){
      return GDALRasterBandBinaryOpBand(self, op, other);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDouble(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,double constant){
      return GDALRasterBandBinaryOpDouble(self, op, constant);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDoubleToBand(double constant,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *band){
      return GDALRasterBandBinaryOpDoubleToBand(constant, op, band);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_IfThenElse(GDALRasterBandShadow *condBand,GDALRasterBandShadow *thenBand,GDALRasterBandShadow *elseBand){
      return GDALRasterBandIfThenElse(condBand, thenBand, elseBand);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_AsType(GDALRasterBandShadow *self,GDALDataType dt){
      return GDALRasterBandAsDataType(self, dt);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaximumOfNBands(int band_count,GDALRasterBandShadow **bands){
     return GDALMaximumOfNBands(band_count, bands);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaxConstant(GDALRasterBandShadow *self,double constant){
      return GDALRasterBandMaxConstant(self, constant);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinimumOfNBands(int band_count,GDALRasterBandShadow **bands){
     return GDALMinimumOfNBands(band_count, bands);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinConstant(GDALRasterBandShadow *self,double constant){
      return GDALRasterBandMinConstant(self, constant);
  }
SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MeanOfNBands(int band_count,GDALRasterBandShadow **bands){
     return GDALMeanOfNBands(band_count, bands);
  }
SWIGINTERN CPLErr GDALRasterBandShadow_ReadRaster1(GDALRasterBandShadow *self,double xoff,double yoff,double xsize,double ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0,GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour,GDALProgressFunc callback=NULL,void *callback_data=NULL,void *inputOutputBuf=NULL){

    *buf = NULL;

    int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
                                        : *buf_type;
    GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;

    size_t buf_size = static_cast<size_t>(
        ComputeBandRasterIOSize( nxsize, nysize,
                                 GDALGetDataTypeSizeBytes( ntype ),
                                 pixel_space, line_space, FALSE ) );
    if (buf_size == 0)
    {
        return CE_Failure;
    }

    char *data;
    Py_buffer view;
    if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
                                  GetUseExceptions(), data, view) )
    {
        return CE_Failure;
    }

    /* Should we clear the buffer in case there are hole in it ? */
    if( inputOutputBuf == NULL &&
        line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    {
        memset(data, 0, buf_size);
    }

    GDALRasterIOExtraArg sExtraArg;
    INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    sExtraArg.eResampleAlg = resample_alg;
    sExtraArg.pfnProgress = callback;
    sExtraArg.pProgressData = callback_data;
    int nXOff = (int)(xoff + 0.5);
    int nYOff = (int)(yoff + 0.5);
    int nXSize = (int)(xsize + 0.5);
    int nYSize = (int)(ysize + 0.5);
    if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
        fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    {
        sExtraArg.bFloatingPointWindowValidity = TRUE;
        sExtraArg.dfXOff = xoff;
        sExtraArg.dfYOff = yoff;
        sExtraArg.dfXSize = xsize;
        sExtraArg.dfYSize = ysize;
    }

    CPLErr eErr = GDALRasterIOEx( self, GF_Read, nXOff, nYOff, nXSize, nYSize,
                         data, nxsize, nysize, ntype,
                         pixel_space, line_space, &sExtraArg );

    readraster_releasebuffer(eErr, buf, inputOutputBuf, view);

    return eErr;
  }
SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf,void *buf_obj=NULL){

    int nBlockXSize, nBlockYSize;
    GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    GDALDataType ntype = GDALGetRasterDataType(self);
    int nDataTypeSize = GDALGetDataTypeSizeBytes(ntype);
    size_t buf_size = static_cast<size_t>(nBlockXSize) *
                                                nBlockYSize * nDataTypeSize;

    *buf = NULL;

    char *data;
    Py_buffer view;

    if( !readraster_acquirebuffer(buf, buf_obj, buf_size, ntype,
                                  GetUseExceptions(), data, view) )
    {
        return CE_Failure;
    }

    CPLErr eErr = GDALReadBlock( self, xoff, yoff, data);

    readraster_releasebuffer(eErr, buf, buf_obj, view);

    return eErr;
  }

GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
  return GDALGetRasterDataType( h );
}
int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
  return GDALGetRasterBandXSize( h );
}
int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
  return GDALGetRasterBandYSize( h );
}

SWIGINTERN void delete_GDALComputedRasterBandShadow(GDALComputedRasterBandShadow *self){
      GDALComputedRasterBandRelease(self);
  }
SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
        return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    }
SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
        GDALDestroyColorTable(self);
    }
SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
        return (GDALColorTableShadow*) GDALCloneColorTable (self);
    }
SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
        return GDALGetPaletteInterpretation(self);
    }
SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
        return GDALGetColorEntryCount(self);
    }
SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
        return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    }
SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
        return GDALGetColorEntryAsRGB(self, entry, centry);
    }
SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
        GDALSetColorEntry(self, entry, centry);
    }
SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
        GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    }

#include "gdalsubdatasetinfo.h"

SWIGINTERN void delete_GDALSubdatasetInfoShadow(GDALSubdatasetInfoShadow *self){
            GDALDestroySubdatasetInfo(reinterpret_cast<GDALSubdatasetInfoH>(self));
        }
SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetPathComponent(GDALSubdatasetInfoShadow *self){
            return GDALSubdatasetInfoGetPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
        }
SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetSubdatasetComponent(GDALSubdatasetInfoShadow *self){
        return GDALSubdatasetInfoGetSubdatasetComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
        }
SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_ModifyPathComponent(GDALSubdatasetInfoShadow *self,char const *pszNewFileName){
        return GDALSubdatasetInfoModifyPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self), pszNewFileName );
        }

GDALSubdatasetInfoShadow* GetSubdatasetInfo(const char *pszFileName)
{
    GDALSubdatasetInfoH info { GDALGetSubdatasetInfo(pszFileName) };

    if( ! info )
    {
      return nullptr;
    }

    return (GDALSubdatasetInfoShadow*)( info );
};

SWIGINTERN GDALRelationshipShadow *new_GDALRelationshipShadow(char const *name,char const *leftTableName,char const *rightTableName,GDALRelationshipCardinality cardinality){
        return (GDALRelationshipShadow*)
        GDALRelationshipCreate(name,
                               leftTableName,
                               rightTableName,
                               cardinality);
    }
SWIGINTERN void delete_GDALRelationshipShadow(GDALRelationshipShadow *self){
        GDALDestroyRelationship(self);
    }
SWIGINTERN char const *GDALRelationshipShadow_GetName(GDALRelationshipShadow *self){
        return GDALRelationshipGetName( self );
    }
SWIGINTERN GDALRelationshipCardinality GDALRelationshipShadow_GetCardinality(GDALRelationshipShadow *self){
        return GDALRelationshipGetCardinality( self );
    }
SWIGINTERN char const *GDALRelationshipShadow_GetLeftTableName(GDALRelationshipShadow *self){
        return GDALRelationshipGetLeftTableName( self );
    }
SWIGINTERN char const *GDALRelationshipShadow_GetRightTableName(GDALRelationshipShadow *self){
        return GDALRelationshipGetRightTableName( self );
    }
SWIGINTERN char const *GDALRelationshipShadow_GetMappingTableName(GDALRelationshipShadow *self){
        return GDALRelationshipGetMappingTableName( self );
    }
SWIGINTERN void GDALRelationshipShadow_SetMappingTableName(GDALRelationshipShadow *self,char const *pszName){
        GDALRelationshipSetMappingTableName( self, pszName );
    }
SWIGINTERN char **GDALRelationshipShadow_GetLeftTableFields(GDALRelationshipShadow *self){
           return GDALRelationshipGetLeftTableFields(self);
        }
SWIGINTERN char **GDALRelationshipShadow_GetRightTableFields(GDALRelationshipShadow *self){
            return GDALRelationshipGetRightTableFields(self);
        }
SWIGINTERN void GDALRelationshipShadow_SetLeftTableFields(GDALRelationshipShadow *self,char **pFields){
            GDALRelationshipSetLeftTableFields(self, pFields);
        }
SWIGINTERN void GDALRelationshipShadow_SetRightTableFields(GDALRelationshipShadow *self,char **pFields){
            GDALRelationshipSetRightTableFields(self, pFields);
        }
SWIGINTERN char **GDALRelationshipShadow_GetLeftMappingTableFields(GDALRelationshipShadow *self){
            return GDALRelationshipGetLeftMappingTableFields(self);
        }
SWIGINTERN char **GDALRelationshipShadow_GetRightMappingTableFields(GDALRelationshipShadow *self){
            return GDALRelationshipGetRightMappingTableFields(self);
        }
SWIGINTERN void GDALRelationshipShadow_SetLeftMappingTableFields(GDALRelationshipShadow *self,char **pFields){
          GDALRelationshipSetLeftMappingTableFields(self, pFields);
      }
SWIGINTERN void GDALRelationshipShadow_SetRightMappingTableFields(GDALRelationshipShadow *self,char **pFields){
          GDALRelationshipSetRightMappingTableFields(self, pFields);
      }
SWIGINTERN GDALRelationshipType GDALRelationshipShadow_GetType(GDALRelationshipShadow *self){
        return GDALRelationshipGetType( self );
    }
SWIGINTERN void GDALRelationshipShadow_SetType(GDALRelationshipShadow *self,GDALRelationshipType type){
      return GDALRelationshipSetType( self, type );
    }
SWIGINTERN char const *GDALRelationshipShadow_GetForwardPathLabel(GDALRelationshipShadow *self){
        return GDALRelationshipGetForwardPathLabel( self );
    }
SWIGINTERN void GDALRelationshipShadow_SetForwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
        GDALRelationshipSetForwardPathLabel( self, pszLabel );
    }
SWIGINTERN char const *GDALRelationshipShadow_GetBackwardPathLabel(GDALRelationshipShadow *self){
        return GDALRelationshipGetBackwardPathLabel( self );
    }
SWIGINTERN void GDALRelationshipShadow_SetBackwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
        GDALRelationshipSetBackwardPathLabel( self, pszLabel );
    }
SWIGINTERN char const *GDALRelationshipShadow_GetRelatedTableType(GDALRelationshipShadow *self){
        return GDALRelationshipGetRelatedTableType( self );
    }
SWIGINTERN void GDALRelationshipShadow_SetRelatedTableType(GDALRelationshipShadow *self,char const *pszType){
        GDALRelationshipSetRelatedTableType( self, pszType );
    }

#include "gdalgrid.h"

#ifdef DEBUG
typedef struct OGRLayerHS OGRLayerShadow;
typedef struct OGRGeometryHS OGRGeometryShadow;
#else
typedef void OGRLayerShadow;
typedef void OGRGeometryShadow;
#endif


static int
GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
  return GDALTermProgress( dfProgress, pszMessage, pData);
}


int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
                              GDALRasterBandShadow *green,
                              GDALRasterBandShadow *blue,
                              int num_colors,
                              GDALColorTableShadow* colors,
                              GDALProgressFunc callback = NULL,
                              void* callback_data=NULL) {

    CPLErrorReset();

    int err = GDALComputeMedianCutPCT( red,
                                          green,
                                          blue,
                                          NULL,
                                          num_colors,
                                          colors,
                                          callback,
                                          callback_data);

    return err;
}


int  DitherRGB2PCT ( GDALRasterBandShadow *red,
                     GDALRasterBandShadow *green,
                     GDALRasterBandShadow *blue,
                     GDALRasterBandShadow *target,
                     GDALColorTableShadow *colors,
                     GDALProgressFunc callback = NULL,
                     void* callback_data=NULL) {

    CPLErrorReset();
    int err;
    err = GDALDitherRGB2PCT(  red,
                                  green,
                                  blue,
                                  target,
                                  colors,
                                  callback,
                                  callback_data);

    return err;
}


CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
                         GDALDatasetShadow *dst_ds,
                         const char *src_wkt=NULL,
                         const char *dst_wkt=NULL,
                         GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
                         double WarpMemoryLimit=0.0,
                         double maxerror = 0.0,
			 GDALProgressFunc callback = NULL,
                     	 void* callback_data=NULL,
                         char** options = NULL ) {

    CPLErrorReset();

    GDALWarpOptions* psOptions = NULL;
    if( options != NULL )
    {
        psOptions = GDALCreateWarpOptions();
        psOptions->papszWarpOptions = CSLDuplicate(options);
    }

    CPLErr err = GDALReprojectImage( src_ds,
                                     src_wkt,
                                     dst_ds,
                                     dst_wkt,
                                     eResampleAlg,
                                     WarpMemoryLimit,
                                     maxerror,
                                     callback,
                                     callback_data,
                                     psOptions);

    if( psOptions != NULL )
        GDALDestroyWarpOptions(psOptions);

    return err;
}


int  ComputeProximity( GDALRasterBandShadow *srcBand,
                       GDALRasterBandShadow *proximityBand,
                       char **options = NULL,
                       GDALProgressFunc callback=NULL,
                       void* callback_data=NULL) {

    CPLErrorReset();

    return GDALComputeProximity( srcBand, proximityBand, options,
                                 callback, callback_data );
}


int  RasterizeLayer( GDALDatasetShadow *dataset,
                 int bands, int *band_list,
                 OGRLayerShadow *layer,
                 void *pfnTransformer = NULL,
                 void *pTransformArg = NULL,
		 int burn_values = 0, double *burn_values_list = NULL,
                 char **options = NULL,
                 GDALProgressFunc callback=NULL,
                 void* callback_data=NULL) {

    CPLErr eErr;

    CPLErrorReset();

    if( burn_values == 0 )
    {
        burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
        for( int i = 0; i < bands; i++ )
            burn_values_list[i] = 255.0;
    }
    else if( burn_values != bands )
    {
        CPLError( CE_Failure, CPLE_AppDefined,
                  "Did not get the expected number of burn values in RasterizeLayer()" );
        return CE_Failure;
    }

    OGRLayerH hLayer = (OGRLayerH)layer;
    eErr = GDALRasterizeLayers( dataset, bands, band_list,
                                1, &hLayer,
                                (GDALTransformerFunc) pfnTransformer,
                                pTransformArg,
                                burn_values_list, options,
                                callback, callback_data );

    if( burn_values == 0 )
        CPLFree( burn_values_list );

    return eErr;
}


int  Polygonize( GDALRasterBandShadow *srcBand,
     		 GDALRasterBandShadow *maskBand,
  	         OGRLayerShadow *outLayer,
                 int iPixValField,
                 char **options = NULL,
                 GDALProgressFunc callback=NULL,
                 void* callback_data=NULL) {

    CPLErrorReset();

    return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
                           options, callback, callback_data );
}


int  FPolygonize( GDALRasterBandShadow *srcBand,
                 GDALRasterBandShadow *maskBand,
                 OGRLayerShadow *outLayer,
                 int iPixValField,
                 char **options = NULL,
                 GDALProgressFunc callback=NULL,
                 void* callback_data=NULL) {

    CPLErrorReset();

    return GDALFPolygonize( srcBand, maskBand, outLayer, iPixValField,
                           options, callback, callback_data );
}


int  FillNodata( GDALRasterBandShadow *targetBand,
     		 GDALRasterBandShadow *maskBand,
                 double maxSearchDist,
                 int smoothingIterations,
                 char **options = NULL,
                 GDALProgressFunc callback=NULL,
                 void* callback_data=NULL) {

    CPLErrorReset();

    return GDALFillNodata( targetBand, maskBand, maxSearchDist,
    	   		   0, smoothingIterations, options,
			   callback, callback_data );
}


int  SieveFilter( GDALRasterBandShadow *srcBand,
     		  GDALRasterBandShadow *maskBand,
  	          GDALRasterBandShadow *dstBand,
                  int threshold, int connectedness=4,
                  char **options = NULL,
                  GDALProgressFunc callback=NULL,
                  void* callback_data=NULL) {

    CPLErrorReset();

    return GDALSieveFilter( srcBand, maskBand, dstBand,
                            threshold, connectedness,
                            options, callback, callback_data );
}


int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
     			  int overviewBandCount,
                          GDALRasterBandShadow **overviewBands,
                          const char *resampling = "average",
                          GDALProgressFunc callback=NULL,
                          void* callback_data=NULL) {

    CPLErrorReset();

    return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    	   			    resampling ? resampling : "average", callback, callback_data );
}


int  RegenerateOverview( GDALRasterBandShadow *srcBand,
                          GDALRasterBandShadow *overviewBand,
                          const char *resampling = "average",
                          GDALProgressFunc callback=NULL,
                          void* callback_data=NULL) {

    CPLErrorReset();

    return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    	   			    resampling ? resampling : "average", callback, callback_data );
}


int ContourGenerate( GDALRasterBandShadow *srcBand,
                     double contourInterval,
                     double contourBase,
                     int fixedLevelCount,
                     double *fixedLevels,
                     int useNoData,
                     double noDataValue,
                     OGRLayerShadow* dstLayer,
                     int idField,
                     int elevField,
                     GDALProgressFunc callback = NULL,
                     void* callback_data = NULL)
{
    CPLErr eErr;

    CPLErrorReset();

    eErr =  GDALContourGenerate( srcBand,
                                 contourInterval,
                                 contourBase,
                                 fixedLevelCount,
                                 fixedLevels,
                                 useNoData,
                                 noDataValue,
                                 dstLayer,
                                 idField,
                                 elevField,
                                 callback,
                                 callback_data);

    return eErr;
}


int ContourGenerateEx( GDALRasterBandShadow *srcBand,
                       OGRLayerShadow* dstLayer,
                       char** options = NULL,
                       GDALProgressFunc callback = NULL,
                       void* callback_data = NULL )
{
    CPLErr eErr;

    CPLErrorReset();

    eErr =  GDALContourGenerateEx( srcBand,
                                   dstLayer,
                                   options,
                                   callback,
                                   callback_data);

    return eErr;
}


GDALDatasetShadow *ViewshedGenerate( GDALRasterBandShadow *srcBand,
                        const char* driverName,
                        const char* targetRasterName,
                        char** creationOptions,
                        double observerX, double observerY, double observerHeight,
                        double targetHeight, double visibleVal, double invisibleVal,
                        double outOfRangeVal,  double noDataVal, double dfCurvCoeff,
                        GDALViewshedMode mode, double maxDistance,
                        GDALProgressFunc callback = NULL, void* callback_data = NULL,
                        GDALViewshedOutputType heightMode = GVOT_NORMAL,
                        char** options = NULL)
{
    GDALDatasetShadow* ds = GDALViewshedGenerate( srcBand,
                                 driverName,
                                 targetRasterName,
                                 creationOptions,
                                 observerX,
                                 observerY,
                                 observerHeight,
                                 targetHeight,
                                 visibleVal,
                                 invisibleVal,
                                 outOfRangeVal,
                                 noDataVal,
                                 dfCurvCoeff,
                                 mode,
                                 maxDistance,
                                 callback,
                                 callback_data,
                                 heightMode,
                                 options);
  if (ds == 0) {
    /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
  }
  return ds;
}


void IsLineOfSightVisible(GDALRasterBandShadow *band,
                          int xA, int yA, double zA,
                          int xB, int yB, double zB,
                          bool *pbVisible, int *pnXIntersection, int *pnYIntersection,
                          char** options = NULL)
{
    *pbVisible = GDALIsLineOfSightVisible(band, xA, yA, zA, xB, yB, zB, pnXIntersection, pnYIntersection, options);
}


GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
                                        const char *src_wkt = 0,
                                        const char *dst_wkt = 0,
                                        GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
                                        double maxerror = 0.0 ) {
  GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
                                                   dst_wkt,
                                                   eResampleAlg,
                                                   maxerror,
                                                   0 );
  if (ds == 0) {
    /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
  }
  return ds;

}


GDALDatasetShadow*  CreatePansharpenedVRT( const char* pszXML,
                            GDALRasterBandShadow* panchroBand,
                            int nInputSpectralBands,
                            GDALRasterBandShadow** ahInputSpectralBands )
{
    CPLErrorReset();

    return (GDALDatasetShadow*)GDALCreatePansharpenedVRT( pszXML, panchroBand,
                                      nInputSpectralBands, ahInputSpectralBands );
}

SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    GDALDestroyTransformer( self );
  }
SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    int nRet, nSuccess = TRUE;

    nRet = GDALUseTransformer( self, bDstToSrc,
                               1, &inout[0], &inout[1], &inout[2],
                               &nSuccess );

    return nRet && nSuccess;
  }
SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    int nRet, nSuccess = TRUE;

    argout[0] = x;
    argout[1] = y;
    argout[2] = z;
    nRet = GDALUseTransformer( self, bDstToSrc,
                               1, &argout[0], &argout[1], &argout[2],
                               &nSuccess );

    return nRet && nSuccess;
  }

static int
DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
{
  for( int i = 0; i<nCount; ++i )
  {

    PyObject *o = PySequence_GetItem(seq, i);
    if ( !PySequence_Check(o) )
    {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "not a sequence");

        return FALSE;
    }

    Py_ssize_t len = PySequence_Size(o);

    if (len == 2 || len == 3)
    {
        PyObject *o1 = PySequence_GetItem(o, 0);
        if (!PyNumber_Check(o1))
        {
            Py_DECREF(o); Py_DECREF(o1);
            PyErr_SetString(PyExc_TypeError, "not a number");

            return FALSE;
        }
        x[i] = PyFloat_AsDouble(o1);
        Py_DECREF(o1);

        o1 = PySequence_GetItem(o, 1);
        if (!PyNumber_Check(o1))
        {
            Py_DECREF(o); Py_DECREF(o1);
            PyErr_SetString(PyExc_TypeError, "not a number");

            return FALSE;
        }
        y[i] = PyFloat_AsDouble(o1);
        Py_DECREF(o1);

        /* The 3rd coordinate is optional, default 0.0 */
        if (len == 3)
        {
            o1 = PySequence_GetItem(o, 2);
            if (!PyNumber_Check(o1))
            {
                Py_DECREF(o); Py_DECREF(o1);
                PyErr_SetString(PyExc_TypeError, "not a number");

                return FALSE;
            }
            z[i] = PyFloat_AsDouble(o1);
            Py_DECREF(o1);
        }
        else
        {
            z[i] = 0.0;
        }
    }
    else
    {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "invalid coordinate");

        return FALSE;
    }

    Py_DECREF(o);
  }

  return TRUE;
}

SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    int nRet;

    nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );

    return nRet;
  }
SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){

    CPLErrorReset();

    return GDALTransformGeolocations( xBand, yBand, zBand,
                                      GDALUseTransformer, self,
                            	      callback, callback_data, options );
  }

  GDALTransformerInfoShadow* Transformer( GDALDatasetShadow *src, GDALDatasetShadow *dst,
                             char **options ) {
    GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*)
       GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst,
                                         options );
    return obj;
  }


typedef struct
{
  int     width;
  int     height;
  double  xmin;
  double  ymin;
  double  xmax;
  double  ymax;
  double  geotransform[6];
} SuggestedWarpOutputRes;

SWIGINTERN void delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes *self){
    CPLFree(self);
  }
SWIGINTERN void SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes *self,double geotransform[6]){
      memcpy(geotransform, self->geotransform, 6 * sizeof(double));
  }

#ifdef SWIGPYTHON
  SuggestedWarpOutputRes* SuggestedWarpOutputFromTransformer(
                                               GDALDatasetShadow *src,
                                               GDALTransformerInfoShadow* transformer )
#else
  SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
                                               GDALTransformerInfoShadow* transformer )
#endif
  {
    SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    double extent[4];
    if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, transformer,
                                 res->geotransform,&(res->width), &(res->height),
                                 extent, 0) != CE_None )
    {
        CPLFree(res);
        return NULL;
    }
    res->xmin = extent[0];
    res->ymin = extent[1];
    res->xmax = extent[2];
    res->ymax = extent[3];
    return res;
  }


#ifdef SWIGPYTHON
  SuggestedWarpOutputRes* SuggestedWarpOutputFromOptions( GDALDatasetShadow *src,
                                                          char** options )
#else
  SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
                                               char** options )
#endif
  {
    SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    double extent[4];
    void* pTransformArg = GDALCreateGenImgProjTransformer2( src, NULL, options );
    if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, pTransformArg,
                                 res->geotransform,&(res->width), &(res->height),
                                 extent, 0) != CE_None )
    {
        GDALDestroyTransformer(pTransformArg);
        CPLFree(res);
        return NULL;
    }
    GDALDestroyTransformer(pTransformArg);
    res->xmin = extent[0];
    res->ymin = extent[1];
    res->xmax = extent[2];
    res->ymax = extent[3];
    return res;
  }


GDALDatasetShadow* ApplyVerticalShiftGrid( GDALDatasetShadow *src_ds,
                                           GDALDatasetShadow *grid_ds,
                                           bool inverse = false,
                                           double srcUnitToMeter = 1.0,
                                           double dstUnitToMeter = 1.0,
                                           char** options = NULL ) {
  GDALDatasetShadow *ds = GDALApplyVerticalShiftGrid( src_ds, grid_ds,
                                                      inverse,
                                                      srcUnitToMeter,
                                                      dstUnitToMeter,
                                                      options );
  return ds;

}


#include "gdalalgorithm.h"

typedef GDALAlgorithmRegistryHS GDALAlgorithmRegistryHS;
typedef GDALAlgorithmHS GDALAlgorithmHS;
typedef GDALAlgorithmArgHS GDALAlgorithmArgHS;
typedef GDALArgDatasetValueHS GDALArgDatasetValueHS;

SWIGINTERN void delete_GDALAlgorithmArgHS(GDALAlgorithmArgHS *self){
    GDALAlgorithmArgRelease( self );
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetName(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetName(self);
  }
SWIGINTERN GDALAlgorithmArgType GDALAlgorithmArgHS_GetType(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetType(self);
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetDescription(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDescription(self);
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetShortName(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetShortName(self);
  }
SWIGINTERN char **GDALAlgorithmArgHS_GetAliases(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAliases( self );
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetMetaVar(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetMetaVar(self);
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetCategory(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetCategory(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsPositional(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsPositional(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsRequired(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsRequired(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetMinCount(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetMinCount(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetMaxCount(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetMaxCount(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_GetPackedValuesAllowed(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetPackedValuesAllowed(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_GetRepeatedArgAllowed(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetRepeatedArgAllowed(self);
  }
SWIGINTERN char **GDALAlgorithmArgHS_GetChoices(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetChoices( self );
  }
SWIGINTERN char **GDALAlgorithmArgHS_GetMetadataItem(GDALAlgorithmArgHS *self,char const *item){
    return GDALAlgorithmArgGetMetadataItem( self, item );
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsExplicitlySet(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsExplicitlySet(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_HasDefaultValue(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgHasDefaultValue(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_GetDefaultAsBoolean(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDefaultAsBoolean(self);
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetDefaultAsString(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDefaultAsString(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetDefaultAsInteger(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDefaultAsInteger(self);
  }
SWIGINTERN double GDALAlgorithmArgHS_GetDefaultAsDouble(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDefaultAsDouble(self);
  }
SWIGINTERN char **GDALAlgorithmArgHS_GetDefaultAsStringList(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDefaultAsStringList( self );
  }
SWIGINTERN void GDALAlgorithmArgHS_GetDefaultAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
     size_t nLenSizet = 0;
    *pList = GDALAlgorithmArgGetDefaultAsIntegerList(self, &nLenSizet);
    *nLen = (int)nLenSizet;
  }
SWIGINTERN void GDALAlgorithmArgHS_GetDefaultAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
     size_t nLenSizet = 0;
    *pList = GDALAlgorithmArgGetDefaultAsDoubleList(self, &nLenSizet);
    *nLen = (int)nLenSizet;
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsHidden(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsHidden(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForCLI(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsHiddenForCLI(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForAPI(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsHiddenForAPI(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsInput(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsInput(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_IsOutput(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgIsOutput(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetDatasetType(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDatasetType(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetDatasetInputFlags(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDatasetInputFlags(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetDatasetOutputFlags(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetDatasetOutputFlags(self);
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetMutualExclusionGroup(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetMutualExclusionGroup(self);
  }
SWIGINTERN bool GDALAlgorithmArgHS_GetAsBoolean(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAsBoolean(self);
  }
SWIGINTERN char const *GDALAlgorithmArgHS_GetAsString(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAsString(self);
  }
SWIGINTERN int GDALAlgorithmArgHS_GetAsInteger(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAsInteger(self);
  }
SWIGINTERN double GDALAlgorithmArgHS_GetAsDouble(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAsDouble(self);
  }
SWIGINTERN GDALArgDatasetValueHS *GDALAlgorithmArgHS_GetAsDatasetValue(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAsDatasetValue(self);
  }
SWIGINTERN char **GDALAlgorithmArgHS_GetAsStringList(GDALAlgorithmArgHS *self){
    return GDALAlgorithmArgGetAsStringList( self );
  }
SWIGINTERN void GDALAlgorithmArgHS_GetAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
     size_t nLenSizet = 0;
    *pList = GDALAlgorithmArgGetAsIntegerList(self, &nLenSizet);
    *nLen = (int)nLenSizet;
  }
SWIGINTERN void GDALAlgorithmArgHS_GetAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
     size_t nLenSizet = 0;
    *pList = GDALAlgorithmArgGetAsDoubleList(self, &nLenSizet);
    *nLen = (int)nLenSizet;
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsBoolean(GDALAlgorithmArgHS *self,bool value){
    return GDALAlgorithmArgSetAsBoolean(self, value);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsString(GDALAlgorithmArgHS *self,char const *value){
    return GDALAlgorithmArgSetAsString(self, value);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsInteger(GDALAlgorithmArgHS *self,int value){
    return GDALAlgorithmArgSetAsInteger(self, value);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsDouble(GDALAlgorithmArgHS *self,double value){
    return GDALAlgorithmArgSetAsDouble(self, value);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsDatasetValue(GDALAlgorithmArgHS *self,GDALArgDatasetValueHS *value){
    return GDALAlgorithmArgSetAsDatasetValue(self, value);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsStringList(GDALAlgorithmArgHS *self,char **value){
    return GDALAlgorithmArgSetAsStringList(self, value);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsIntegerList(GDALAlgorithmArgHS *self,int nList,int *pList){
    return GDALAlgorithmArgSetAsIntegerList(self, nList, pList);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetAsDoubleList(GDALAlgorithmArgHS *self,int nList,double *pList){
    return GDALAlgorithmArgSetAsDoubleList(self, nList, pList);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetDataset(GDALAlgorithmArgHS *self,GDALDatasetShadow *ds){
    return GDALAlgorithmArgSetDataset(self, ds);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetDatasets(GDALAlgorithmArgHS *self,int object_list_count,GDALDatasetShadow **poObjects){
    return GDALAlgorithmArgSetDatasets(self, object_list_count, poObjects);
  }
SWIGINTERN bool GDALAlgorithmArgHS_SetDatasetNames(GDALAlgorithmArgHS *self,char **names){
    return GDALAlgorithmArgSetDatasetNames(self, names);
  }
SWIGINTERN void delete_GDALAlgorithmHS(GDALAlgorithmHS *self){
    GDALAlgorithmRelease( self );
  }
SWIGINTERN char const *GDALAlgorithmHS_GetName(GDALAlgorithmHS *self){
    return GDALAlgorithmGetName(self);
  }
SWIGINTERN char const *GDALAlgorithmHS_GetDescription(GDALAlgorithmHS *self){
    return GDALAlgorithmGetDescription(self);
  }
SWIGINTERN char const *GDALAlgorithmHS_GetLongDescription(GDALAlgorithmHS *self){
    return GDALAlgorithmGetLongDescription(self);
  }
SWIGINTERN char const *GDALAlgorithmHS_GetHelpFullURL(GDALAlgorithmHS *self){
    return GDALAlgorithmGetHelpFullURL(self);
  }
SWIGINTERN bool GDALAlgorithmHS_HasSubAlgorithms(GDALAlgorithmHS *self){
    return GDALAlgorithmHasSubAlgorithms(self);
  }
SWIGINTERN char **GDALAlgorithmHS_GetSubAlgorithmNames(GDALAlgorithmHS *self){
    return GDALAlgorithmGetSubAlgorithmNames( self );
  }
SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_InstantiateSubAlgorithm(GDALAlgorithmHS *self,char const *algName){
    return GDALAlgorithmInstantiateSubAlgorithm(self, algName);
  }
SWIGINTERN bool GDALAlgorithmHS_ParseCommandLineArguments(GDALAlgorithmHS *self,char **args){
    return GDALAlgorithmParseCommandLineArguments(self, args);
  }
SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_GetActualAlgorithm(GDALAlgorithmHS *self){
    return GDALAlgorithmGetActualAlgorithm(self);
  }
SWIGINTERN bool GDALAlgorithmHS_Run(GDALAlgorithmHS *self,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return GDALAlgorithmRun(self, callback, callback_data);
  }
SWIGINTERN bool GDALAlgorithmHS_Finalize(GDALAlgorithmHS *self){
    return GDALAlgorithmFinalize(self);
  }
SWIGINTERN bool GDALAlgorithmHS_ParseRunAndFinalize(GDALAlgorithmHS *self,char **args,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return GDALAlgorithmParseCommandLineArguments(self, args) &&
           GDALAlgorithmRun(self, callback, callback_data) &&
           GDALAlgorithmFinalize(self);
  }
SWIGINTERN retStringAndCPLFree *GDALAlgorithmHS_GetUsageAsJSON(GDALAlgorithmHS *self){
    return GDALAlgorithmGetUsageAsJSON(self);
  }
SWIGINTERN char **GDALAlgorithmHS_GetArgNames(GDALAlgorithmHS *self){
    return GDALAlgorithmGetArgNames( self );
  }
SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArg(GDALAlgorithmHS *self,char const *argName){
    return GDALAlgorithmGetArg(self, argName);
  }
SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArgNonConst(GDALAlgorithmHS *self,char const *argName){
    return GDALAlgorithmGetArgNonConst(self, argName);
  }
SWIGINTERN void delete_GDALAlgorithmRegistryHS(GDALAlgorithmRegistryHS *self){
    GDALAlgorithmRegistryRelease( self );
  }
SWIGINTERN char **GDALAlgorithmRegistryHS_GetAlgNames(GDALAlgorithmRegistryHS *self){
    return GDALAlgorithmRegistryGetAlgNames( self );
  }
SWIGINTERN GDALAlgorithmHS *GDALAlgorithmRegistryHS_InstantiateAlg(GDALAlgorithmRegistryHS *self,char const *algName){
    return GDALAlgorithmRegistryInstantiateAlg(self, algName);
  }
SWIGINTERN void delete_GDALArgDatasetValueHS(GDALArgDatasetValueHS *self){
    GDALArgDatasetValueRelease( self );
  }
SWIGINTERN char const *GDALArgDatasetValueHS_GetName(GDALArgDatasetValueHS *self){
    return GDALArgDatasetValueGetName(self);
  }
SWIGINTERN GDALDatasetShadow *GDALArgDatasetValueHS_GetDataset(GDALArgDatasetValueHS *self){
    return GDALArgDatasetValueGetDatasetIncreaseRefCount(self);
  }
SWIGINTERN void GDALArgDatasetValueHS_SetName(GDALArgDatasetValueHS *self,char const *name){
    GDALArgDatasetValueSetName(self, name);
  }
SWIGINTERN void GDALArgDatasetValueHS_SetDataset(GDALArgDatasetValueHS *self,GDALDatasetShadow *ds){
    GDALArgDatasetValueSetDataset(self, ds);
  }

GIntBig wrapper_GDALGetCacheMax()
{
    return GDALGetCacheMax64();
}


GIntBig wrapper_GDALGetCacheUsed()
{
    return GDALGetCacheUsed64();
}


void wrapper_GDALSetCacheMax(GIntBig nBytes)
{
    return GDALSetCacheMax64(nBytes);
}


int wrapper_GDALGetDataTypeSizeBits( GDALDataType eDataType )
{
    return GDALGetDataTypeSizeBits(eDataType);
}


/************************************************************************/
/*                          XMLTreeToPyList()                           */
/************************************************************************/
static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
{
    PyObject *pyList;
    int      nChildCount = 0, iChild;
    CPLXMLNode *psChild;

    if( psTree == NULL )
        return Py_None;

    for( psChild = psTree->psChild;
         psChild != NULL;
         psChild = psChild->psNext )
        nChildCount++;

    pyList = PyList_New(nChildCount+2);

    PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );

    for( psChild = psTree->psChild, iChild = 2;
         psChild != NULL;
         psChild = psChild->psNext, iChild++ )
    {
        PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    }

    return pyList;
}


/************************************************************************/
/*                          PyListToXMLTree()                           */
/************************************************************************/
static CPLXMLNode *PyListToXMLTree( PyObject *pyList )

{
    int      nChildCount = 0, iChild, nType = 0;
    CPLXMLNode *psThisNode;
    CPLXMLNode *psChild;
    char       *pszText = NULL;

    if( PyList_Size(pyList) > INT_MAX )
    {
        PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
        return NULL;
    }
    nChildCount = static_cast<int>(PyList_Size(pyList)) - 2;
    if( nChildCount < 0 )
    {
        PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
        return NULL;
    }

    CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType ));
    CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText ));

    /* Detect "pseudo" root */
    if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    {
        PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
        if (PyList_Size(pyFirst) < 2)
        {
            PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
            return NULL;
        }
        int nTypeFirst = 0;
        char* pszTextFirst = NULL;
        CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst ));
        CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst ));
        if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
        {
            psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
            psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
            return psThisNode;
        }
    }

    psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );

    for( iChild = 0; iChild < nChildCount; iChild++ )
    {
        psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
        CPLAddXMLChild( psThisNode, psChild );
    }

    return psThisNode;
}


retStringAndCPLFree *GetJPEG2000StructureAsString( const char* pszFilename, char** options = NULL )
{
    CPLXMLNode* psNode = GDALGetJPEG2000Structure(pszFilename, options);
    if( psNode == NULL )
        return NULL;
    char* pszXML = CPLSerializeXMLTree(psNode);
    CPLDestroyXMLNode(psNode);
    return pszXML;
}


int GetDriverCount() {
  return GDALGetDriverCount();
}


static
GDALDriverShadow* GetDriverByName( char const *name ) {
  return (GDALDriverShadow*) GDALGetDriverByName( name );
}


GDALDriverShadow* GetDriver( int i ) {
  return (GDALDriverShadow*) GDALGetDriver( i );
}


GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
  CPLErrorReset();
  GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
#ifndef SWIGPYTHON
  if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
  {
      if ( GDALDereferenceDataset( ds ) <= 0 )
          GDALClose(ds);
      ds = NULL;
  }
#endif
  return (GDALDatasetShadow*) ds;
}


GDALDatasetShadow* OpenEx( char const* utf8_path, unsigned int nOpenFlags = 0,
                           char** allowed_drivers = NULL, char** open_options = NULL,
                           char** sibling_files = NULL ) {
  CPLErrorReset();
#ifdef SWIGPYTHON
  if( GetUseExceptions() )
      nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
#endif
  GDALDatasetShadow *ds = GDALOpenEx( utf8_path, nOpenFlags, allowed_drivers,
                                      open_options, sibling_files );
#ifndef SWIGPYTHON
  if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
  {
      if ( GDALDereferenceDataset( ds ) <= 0 )
          GDALClose(ds);
      ds = NULL;
  }
#endif
  return (GDALDatasetShadow*) ds;
}


GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
  CPLErrorReset();
  GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
#ifndef SWIGPYTHON
  if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
  {
      if ( GDALDereferenceDataset( ds ) <= 0 )
          GDALClose(ds);
      ds = NULL;
  }
#endif
  return (GDALDatasetShadow*) ds;
}


GDALDriverShadow *IdentifyDriver( const char *utf8_path,
                                  char **papszSiblings = NULL ) {
    return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path,
                                                papszSiblings );
}


GDALDriverShadow *IdentifyDriverEx( const char* utf8_path,
                                    unsigned int nIdentifyFlags = 0,
                                    char** allowed_drivers = NULL,
                                    char** sibling_files = NULL )
{
    return  (GDALDriverShadow *) GDALIdentifyDriverEx( utf8_path,
                                                nIdentifyFlags,
                                                allowed_drivers,
                                                sibling_files );
}


  char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    int nResArgCount;

    if( papszArgv == NULL )
        return NULL;

    bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
                            CSLFindString(papszArgv, "OGR_SKIP") >= 0 );

    nResArgCount =
      GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );

    if( bReloadDrivers )
    {
        GDALAllRegister();
    }

    if( nResArgCount <= 0 )
        return NULL;
    else
        return papszArgv;
  }


#include "gdal_utils.h"



#include <vector>

class ErrorStruct
{
  public:
    CPLErr type;
    CPLErrorNum no;
    char* msg;

    ErrorStruct() = delete;
    ErrorStruct(CPLErr eErrIn, CPLErrorNum noIn, const char* msgIn) :
        type(eErrIn), no(noIn), msg(msgIn ? CPLStrdup(msgIn) : nullptr) {}
    ErrorStruct(const ErrorStruct& other):
        type(other.type), no(other.no),
        msg(other.msg ? CPLStrdup(other.msg) : nullptr) {}
    ~ErrorStruct() { CPLFree(msg); }
};

static void CPL_STDCALL StackingErrorHandler( CPLErr eErr, CPLErrorNum no,
                                           const char* msg )
{
    std::vector<ErrorStruct>* paoErrors =
        static_cast<std::vector<ErrorStruct> *>(
            CPLGetErrorHandlerUserData());
    paoErrors->emplace_back(eErr, no, msg);
}

static void PushStackingErrorHandler(std::vector<ErrorStruct>* paoErrors)
{
    CPLPushErrorHandlerEx(StackingErrorHandler, paoErrors);
    CPLSetCurrentErrorHandlerCatchDebug(false);
}

static void PopStackingErrorHandler(std::vector<ErrorStruct>* paoErrors, bool bSuccess)
{
    CPLPopErrorHandler();

    // If the operation was successful, do not emit regular CPLError()
    // of CE_Failure type that would be caught by the PythonBindingErrorHandler
    // and turned into
    // Python exceptions. Just emit them with the previous error handler

    for( size_t iError = 0; iError < paoErrors->size(); ++iError )
    {
        CPLErr eErrClass = (*paoErrors)[iError].type;
        if( bSuccess && eErrClass == CE_Failure )
        {
            CPLCallPreviousHandler( eErrClass,
                                (*paoErrors)[iError].no,
                                (*paoErrors)[iError].msg );
        }
        else
        {
            CPLError( eErrClass,
                    (*paoErrors)[iError].no,
                    "%s",
                    (*paoErrors)[iError].msg );
        }
    }

    if( bSuccess )
    {
        CPLErrorReset();
    }
}

SWIGINTERN GDALInfoOptions *new_GDALInfoOptions(char **options){
        return GDALInfoOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALInfoOptions(GDALInfoOptions *self){
        GDALInfoOptionsFree( self );
    }
SWIGINTERN GDALVectorInfoOptions *new_GDALVectorInfoOptions(char **options){
        return GDALVectorInfoOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALVectorInfoOptions(GDALVectorInfoOptions *self){
        GDALVectorInfoOptionsFree( self );
    }
SWIGINTERN GDALMultiDimInfoOptions *new_GDALMultiDimInfoOptions(char **options){
        return GDALMultiDimInfoOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions *self){
        GDALMultiDimInfoOptionsFree( self );
    }
SWIGINTERN GDALTranslateOptions *new_GDALTranslateOptions(char **options){
        return GDALTranslateOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALTranslateOptions(GDALTranslateOptions *self){
        GDALTranslateOptionsFree( self );
    }

GDALDatasetShadow* wrapper_GDALTranslate( const char* dest,
                                      GDALDatasetShadow* dataset,
                                      GDALTranslateOptions* translateOptions,
                                      GDALProgressFunc callback=NULL,
                                      void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( translateOptions == NULL )
        {
            bFreeOptions = true;
            translateOptions = GDALTranslateOptionsNew(NULL, NULL);
        }
        GDALTranslateOptionsSetProgress(translateOptions, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALTranslate(dest, dataset, translateOptions, &usageError);
    if( bFreeOptions )
        GDALTranslateOptionsFree(translateOptions);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALWarpAppOptions *new_GDALWarpAppOptions(char **options){
        return GDALWarpAppOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALWarpAppOptions(GDALWarpAppOptions *self){
        GDALWarpAppOptionsFree( self );
    }


int wrapper_GDALWarpDestDS( GDALDatasetShadow* dstDS,
                            int object_list_count, GDALDatasetShadow** poObjects,
                            GDALWarpAppOptions* warpAppOptions,
                            GDALProgressFunc callback=NULL,
                            void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( warpAppOptions == NULL )
        {
            bFreeOptions = true;
            warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
        }
        GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    bool bRet = (GDALWarp(NULL, dstDS, object_list_count, poObjects, warpAppOptions, &usageError) != NULL);
    if( bFreeOptions )
        GDALWarpAppOptionsFree(warpAppOptions);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, bRet);
    }
#endif
    return bRet;
}


GDALDatasetShadow* wrapper_GDALWarpDestName( const char* dest,
                                             int object_list_count, GDALDatasetShadow** poObjects,
                                             GDALWarpAppOptions* warpAppOptions,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( warpAppOptions == NULL )
        {
            bFreeOptions = true;
            warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
        }
        GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALWarp(dest, NULL, object_list_count, poObjects, warpAppOptions, &usageError);
    if( bFreeOptions )
        GDALWarpAppOptionsFree(warpAppOptions);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALVectorTranslateOptions *new_GDALVectorTranslateOptions(char **options){
        return GDALVectorTranslateOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions *self){
        GDALVectorTranslateOptionsFree( self );
    }

int wrapper_GDALVectorTranslateDestDS( GDALDatasetShadow* dstDS,
                                       GDALDatasetShadow* srcDS,
                            GDALVectorTranslateOptions* options,
                            GDALProgressFunc callback=NULL,
                            void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALVectorTranslateOptionsNew(NULL, NULL);
        }
        GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    bool bRet = (GDALVectorTranslate(NULL, dstDS, 1, &srcDS, options, &usageError) != NULL);
    if( bFreeOptions )
        GDALVectorTranslateOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, bRet);
    }
#endif
    return bRet;
}


GDALDatasetShadow* wrapper_GDALVectorTranslateDestName( const char* dest,
                                             GDALDatasetShadow* srcDS,
                                             GDALVectorTranslateOptions* options,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALVectorTranslateOptionsNew(NULL, NULL);
        }
        GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALVectorTranslate(dest, NULL, 1, &srcDS, options, &usageError);
    if( bFreeOptions )
        GDALVectorTranslateOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALDEMProcessingOptions *new_GDALDEMProcessingOptions(char **options){
        return GDALDEMProcessingOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions *self){
        GDALDEMProcessingOptionsFree( self );
    }

GDALDatasetShadow* wrapper_GDALDEMProcessing( const char* dest,
                                      GDALDatasetShadow* dataset,
                                      const char* pszProcessing,
                                      const char* pszColorFilename,
                                      GDALDEMProcessingOptions* options,
                                      GDALProgressFunc callback=NULL,
                                      void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALDEMProcessingOptionsNew(NULL, NULL);
        }
        GDALDEMProcessingOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALDEMProcessing(dest, dataset, pszProcessing, pszColorFilename, options, &usageError);
    if( bFreeOptions )
        GDALDEMProcessingOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALNearblackOptions *new_GDALNearblackOptions(char **options){
        return GDALNearblackOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALNearblackOptions(GDALNearblackOptions *self){
        GDALNearblackOptionsFree( self );
    }

int wrapper_GDALNearblackDestDS( GDALDatasetShadow* dstDS,
                            GDALDatasetShadow* srcDS,
                            GDALNearblackOptions* options,
                            GDALProgressFunc callback=NULL,
                            void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALNearblackOptionsNew(NULL, NULL);
        }
        GDALNearblackOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    bool bRet = (GDALNearblack(NULL, dstDS, srcDS, options, &usageError) != NULL);
    if( bFreeOptions )
        GDALNearblackOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, bRet);
    }
#endif
    return bRet;
}


GDALDatasetShadow* wrapper_GDALNearblackDestName( const char* dest,
                                             GDALDatasetShadow* srcDS,
                                             GDALNearblackOptions* options,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALNearblackOptionsNew(NULL, NULL);
        }
        GDALNearblackOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALNearblack(dest, NULL, srcDS, options, &usageError);
    if( bFreeOptions )
        GDALNearblackOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALGridOptions *new_GDALGridOptions(char **options){
        return GDALGridOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALGridOptions(GDALGridOptions *self){
        GDALGridOptionsFree( self );
    }

GDALDatasetShadow* wrapper_GDALGrid( const char* dest,
                                      GDALDatasetShadow* dataset,
                                      GDALGridOptions* options,
                                      GDALProgressFunc callback=NULL,
                                      void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALGridOptionsNew(NULL, NULL);
        }
        GDALGridOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALGrid(dest, dataset, options, &usageError);
    if( bFreeOptions )
        GDALGridOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALContourOptions *new_GDALContourOptions(char **options){
            return GDALContourOptionsNew(options, NULL);
        }
SWIGINTERN void delete_GDALContourOptions(GDALContourOptions *self){
            GDALContourOptionsFree( self );
        }


int wrapper_GDALContourDestDS(  GDALDatasetShadow* dstDS,
                                GDALDatasetShadow* srcDS,
                                GDALContourOptions* options,
                                GDALProgressFunc callback=NULL,
                                void* callback_data=NULL)
{
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALContourOptionsNew(NULL, NULL);
        }
        GDALContourOptionsSetProgress(options, callback, callback_data);
    }

#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif

    char** papszStringOptions = NULL;
    GDALRasterBandH hBand = NULL;
    OGRLayerH hLayer = NULL;
    const CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    bool bRet = (err == CE_None && GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data) == CE_None);
    if( bFreeOptions )
        GDALContourOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, bRet);
    }
#endif
    CSLDestroy(papszStringOptions);
    return bRet;
}


GDALDatasetShadow* wrapper_GDALContourDestName( const char* dest,
                                                  GDALDatasetShadow* srcDS,
                                                  GDALContourOptions* options,
                                                  GDALProgressFunc callback=NULL,
                                                  void* callback_data=NULL)
{
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALContourOptionsNew(NULL, NULL);
        }
        GDALContourOptionsSetProgress(options, callback, callback_data);
    }

#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif

    GDALContourOptionsSetDestDataSource(options, dest);
    char** papszStringOptions = NULL;
    GDALRasterBandH hBand = NULL;
    OGRLayerH hLayer = NULL;
    GDALDatasetH dstDS = NULL;
    CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    if (err == CE_None )
    {
        err = GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data);
    }

    if( bFreeOptions )
        GDALContourOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, dstDS != NULL);
    }
#endif
    CSLDestroy(papszStringOptions);
    return dstDS;
}

SWIGINTERN GDALRasterizeOptions *new_GDALRasterizeOptions(char **options){
        return GDALRasterizeOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALRasterizeOptions(GDALRasterizeOptions *self){
        GDALRasterizeOptionsFree( self );
    }

int wrapper_GDALRasterizeDestDS( GDALDatasetShadow* dstDS,
                            GDALDatasetShadow* srcDS,
                            GDALRasterizeOptions* options,
                            GDALProgressFunc callback=NULL,
                            void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALRasterizeOptionsNew(NULL, NULL);
        }
        GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    bool bRet = (GDALRasterize(NULL, dstDS, srcDS, options, &usageError) != NULL);
    if( bFreeOptions )
        GDALRasterizeOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, bRet);
    }
#endif
    return bRet;
}


GDALDatasetShadow* wrapper_GDALRasterizeDestName( const char* dest,
                                             GDALDatasetShadow* srcDS,
                                             GDALRasterizeOptions* options,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALRasterizeOptionsNew(NULL, NULL);
        }
        GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALRasterize(dest, NULL, srcDS, options, &usageError);
    if( bFreeOptions )
        GDALRasterizeOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALFootprintOptions *new_GDALFootprintOptions(char **options){
        return GDALFootprintOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALFootprintOptions(GDALFootprintOptions *self){
        GDALFootprintOptionsFree( self );
    }

int wrapper_GDALFootprintDestDS( GDALDatasetShadow* dstDS,
                            GDALDatasetShadow* srcDS,
                            GDALFootprintOptions* options,
                            GDALProgressFunc callback=NULL,
                            void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALFootprintOptionsNew(NULL, NULL);
        }
        GDALFootprintOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    bool bRet = (GDALFootprint(NULL, dstDS, srcDS, options, &usageError) != NULL);
    if( bFreeOptions )
        GDALFootprintOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, bRet);
    }
#endif
    return bRet;
}


GDALDatasetShadow* wrapper_GDALFootprintDestName( const char* dest,
                                             GDALDatasetShadow* srcDS,
                                             GDALFootprintOptions* options,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALFootprintOptionsNew(NULL, NULL);
        }
        GDALFootprintOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALFootprint(dest, NULL, srcDS, options, &usageError);
    if( bFreeOptions )
        GDALFootprintOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALBuildVRTOptions *new_GDALBuildVRTOptions(char **options){
        return GDALBuildVRTOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALBuildVRTOptions(GDALBuildVRTOptions *self){
        GDALBuildVRTOptionsFree( self );
    }

GDALDatasetShadow* wrapper_GDALBuildVRT_objects( const char* dest,
                                             int object_list_count, GDALDatasetShadow** poObjects,
                                             GDALBuildVRTOptions* options,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALBuildVRTOptionsNew(NULL, NULL);
        }
        GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALBuildVRT(dest, object_list_count, poObjects, NULL, options, &usageError);
    if( bFreeOptions )
        GDALBuildVRTOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}


GDALDatasetShadow* wrapper_GDALBuildVRT_names( const char* dest,
                                         char ** source_filenames,
                                         GDALBuildVRTOptions* options,
                                         GDALProgressFunc callback=NULL,
                                         void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALBuildVRTOptionsNew(NULL, NULL);
        }
        GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALBuildVRT(dest, CSLCount(source_filenames), NULL, source_filenames, options, &usageError);
    if( bFreeOptions )
        GDALBuildVRTOptionsFree(options);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALTileIndexOptions *new_GDALTileIndexOptions(char **options){
        return GDALTileIndexOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALTileIndexOptions(GDALTileIndexOptions *self){
        GDALTileIndexOptionsFree( self );
    }

GDALDatasetShadow* wrapper_TileIndex_names( const char* dest,
                                            char ** source_filenames,
                                            GDALTileIndexOptions* options,
                                            GDALProgressFunc callback=NULL,
                                            void* callback_data=NULL)
{
    int usageError; /* ignored */
#if 0
    bool bFreeOptions = false;
    if( callback )
    {
        if( options == NULL )
        {
            bFreeOptions = true;
            options = GDALTileIndexOptionsNew(NULL, NULL);
        }
        GDALTileIndexOptionsSetProgress(options, callback, callback_data);
    }
#endif

#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALTileIndex(dest, CSLCount(source_filenames), source_filenames, options, &usageError);
#if 0
    if( bFreeOptions )
        GDALTileIndexOptionsFree(options);
#endif
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

SWIGINTERN GDALMultiDimTranslateOptions *new_GDALMultiDimTranslateOptions(char **options){
        return GDALMultiDimTranslateOptionsNew(options, NULL);
    }
SWIGINTERN void delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions *self){
        GDALMultiDimTranslateOptionsFree( self );
    }

GDALDatasetShadow* wrapper_GDALMultiDimTranslateDestName( const char* dest,
                                             int object_list_count, GDALDatasetShadow** poObjects,
                                             GDALMultiDimTranslateOptions* multiDimTranslateOptions,
                                             GDALProgressFunc callback=NULL,
                                             void* callback_data=NULL)
{
    int usageError; /* ignored */
    bool bFreeOptions = false;
    if( callback )
    {
        if( multiDimTranslateOptions == NULL )
        {
            bFreeOptions = true;
            multiDimTranslateOptions = GDALMultiDimTranslateOptionsNew(NULL, NULL);
        }
        GDALMultiDimTranslateOptionsSetProgress(multiDimTranslateOptions, callback, callback_data);
    }
#ifdef SWIGPYTHON
    std::vector<ErrorStruct> aoErrors;
    if( GetUseExceptions() )
    {
        PushStackingErrorHandler(&aoErrors);
    }
#endif
    GDALDatasetH hDSRet = GDALMultiDimTranslate(dest, NULL, object_list_count, poObjects, multiDimTranslateOptions, &usageError);
    if( bFreeOptions )
        GDALMultiDimTranslateOptionsFree(multiDimTranslateOptions);
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
    {
        PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    }
#endif
    return hDSRet;
}

#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    result = GetUseExceptions();
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)_GetExceptionsLocal();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      _SetExceptionsLocal(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    _UseExceptions();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    _DontUseExceptions();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)_UserHasSpecifiedIfUsingExceptions();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  void **arg1 = 0 ;
  unsigned int arg2 ;
  unsigned int arg3 ;
  VSILFILE *arg4 = 0 ;
  void *pyObject1 = NULL ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[3] ;
  unsigned int result;
  
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    arg1 = &pyObject1;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFReadL", 3, 3, swig_obj)) SWIG_fail;
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = static_cast< unsigned int >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = static_cast< unsigned int >(val3);
  res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
  }
  arg4 = reinterpret_cast< VSILFILE * >(argp4);
  {
    if (!arg4) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (unsigned int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg1)
    {
      resultobj = (PyObject*)*arg1;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIGetMemFileBuffer_unsafe(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GByte **arg2 = 0 ;
  vsi_l_offset *arg3 = 0 ;
  int bToFree1 = 0 ;
  GByte *out2 = NULL ;
  vsi_l_offset length2 ;
  PyObject *swig_obj[1] ;
  
  {
    arg2 = &out2;
    arg3 = &length2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      wrapper_VSIGetMemFileBuffer((char const *)arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    if (*arg2 == NULL) {
      if( GetUseExceptions() ) {
        PyErr_SetString(PyExc_RuntimeError, "Could not find path");
        resultobj = NULL;
      } else {
        CPLError(CE_Failure, CPLE_AppDefined, "Could not find path");
        resultobj = Py_None;
        Py_INCREF(resultobj);
      }
    } else {
      do {
        resultobj = PyMemoryView_FromMemory(reinterpret_cast<char *>(*arg2), *arg3, PyBUF_READ);
        if (resultobj == NULL) {
          if( GetUseExceptions() ) {
            PyErr_SetString(PyExc_RuntimeError, "Could not allocate result buffer");
            resultobj = NULL;
          } else {
            CPLError(CE_Failure, CPLE_AppDefined, "Could not allocate result buffer");
            resultobj = Py_None;
            Py_INCREF(resultobj);
          }
        }
      } while(0);
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Debug(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Debug", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      Debug((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLErrorHandler arg1 = NULL ;
  void *arg2 = NULL ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SetErrorHandler", 0, 1, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    {
      /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
      int alloc = 0;
      char* pszCallbackName = NULL;
      arg2 = NULL;
      if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
      {
        if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
        arg1 = CPLQuietErrorHandler;
        else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
        arg1 = CPLQuietWarningsErrorHandler;
        else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
        arg1 = CPLDefaultErrorHandler;
        else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
        arg1 = CPLLoggingErrorHandler;
        else
        {
          if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
          PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
          SWIG_fail;
        }
        
        if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
      }
      else if (!PyCallable_Check(swig_obj[0]))
      {
        PyErr_SetString( PyExc_RuntimeError,
          "Object given is not a String or a Python function" );
        SWIG_fail;
      }
      else
      {
        Py_INCREF(swig_obj[0]);
        arg1 = PyCPLErrorHandler;
        arg2 = swig_obj[0];
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)SetErrorHandler(SWIG_STD_MOVE(arg1),arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetCurrentErrorHandlerCatchDebug(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetCurrentErrorHandlerCatchDebug" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLSetCurrentErrorHandlerCatchDebug(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLErrorHandler arg1 = NULL ;
  void *arg2 = NULL ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "PushErrorHandler", 0, 1, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    {
      /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
      int alloc = 0;
      char* pszCallbackName = NULL;
      arg2 = NULL;
      if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
      {
        if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
        arg1 = CPLQuietErrorHandler;
        else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
        arg1 = CPLQuietWarningsErrorHandler;
        else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
        arg1 = CPLDefaultErrorHandler;
        else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
        arg1 = CPLLoggingErrorHandler;
        else
        {
          if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
          PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
          SWIG_fail;
        }
        
        if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
      }
      else if (!PyCallable_Check(swig_obj[0]))
      {
        PyErr_SetString( PyExc_RuntimeError,
          "Object given is not a String or a Python function" );
        SWIG_fail;
      }
      else
      {
        Py_INCREF(swig_obj[0]);
        arg1 = PyCPLErrorHandler;
        arg2 = swig_obj[0];
      }
    }
  }
  {
    if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
    result = (CPLErr)PushErrorHandler(SWIG_STD_MOVE(arg1),arg2);
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "PopErrorHandler", 0, 0, 0)) SWIG_fail;
  {
    if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
    PopErrorHandler();
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Error(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLErr arg1 = CE_Failure ;
  int arg2 = 0 ;
  char *arg3 = (char *)"error" ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Error", 0, 3, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
    } 
    arg1 = static_cast< CPLErr >(val1);
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      Error(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GOA2GetRefreshToken", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GOA2GetAccessToken", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ErrorReset", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLErrorReset();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_EscapeString(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  char *arg2 = 0 ;
  int arg3 = CPLES_SQL ;
  int alloc1 = 0 ;
  bool viewIsValid1 = false ;
  Py_buffer view1 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"len",  (char *)"scheme",  NULL 
  };
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:wrapper_EscapeString", kwnames, &obj0, &obj1)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
      SWIG_fail;
    }
    arg2 = (char *)ptr;
  }
  if (obj1) {
    ecode3 = SWIG_AsVal_int(obj1, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wrapper_EscapeString" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)wrapper_EscapeString(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_EscapeBinary(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  char *arg2 = 0 ;
  size_t *arg3 = 0 ;
  char **arg4 = 0 ;
  int arg5 = CPLES_SQL ;
  int alloc1 = 0 ;
  bool viewIsValid1 = false ;
  Py_buffer view1 ;
  size_t nLen3 = 0 ;
  char *pBuf3 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"len",  (char *)"scheme",  NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (size_t *nLen3, char **pBuf3 ) */
    arg3 = &nLen3;
    arg4 = &pBuf3;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:EscapeBinary", kwnames, &obj0, &obj1)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
      SWIG_fail;
    }
    arg2 = (char *)ptr;
  }
  if (obj1) {
    ecode5 = SWIG_AsVal_int(obj1, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EscapeBinary" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      EscapeBinary(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (size_t *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
    if( *arg4 ) {
      resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
    }
    else {
      resultobj = Py_None;
      Py_INCREF(Py_None);
    }
  }
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetLastErrorNo", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
#endif
    
    result = CPLGetLastErrorNo();
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetLastErrorType", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
#endif
    
    result = CPLGetLastErrorType();
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetLastErrorMsg", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
#endif
    
    result = (char*)CPLGetLastErrorMsg();
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetErrorCounter(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  unsigned int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetErrorCounter", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
#endif
    
    result = CPLGetErrorCounter();
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIGetLastErrorNo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorNo", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSIGetLastErrorNo();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIGetLastErrorMsg(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorMsg", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)VSIGetLastErrorMsg();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIErrorReset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIErrorReset", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSIErrorReset();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLPushFinderLocation((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "PopFinderLocation", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLPopFinderLocation();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FinderClean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FinderClean", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLFinderClean();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FindFile(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FindFile", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ReadDir(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 = 0 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ReadDir", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDir" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)wrapper_VSIReadDirEx((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)VSIReadDirRecursive((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_OpenDir(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 = -1 ;
  char **arg3 = NULL ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  VSIDIR *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "OpenDir", 1, 3, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenDir" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (VSIDIR *)wrapper_VSIOpenDir((char const *)arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSIDIR, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_name_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_name_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (char *) ((arg1)->name);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_mode_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mode_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->mode);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_size_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_size_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result =  ((arg1)->size);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_mtime_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtime_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result =  ((arg1)->mtime);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_modeKnown_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_modeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool) ((arg1)->modeKnown);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_sizeKnown_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_sizeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool) ((arg1)->sizeKnown);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_mtimeKnown_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtimeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool) ((arg1)->mtimeKnown);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_extra_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_extra_get" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (char **) ((arg1)->extra);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, false);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DirEntry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  DirEntry *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirEntry" "', argument " "1"" of type '" "DirEntry const *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (DirEntry *)new_DirEntry((DirEntry const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_DirEntry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirEntry" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_DirEntry(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DirEntry_IsDirectory(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  DirEntry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_IsDirectory" "', argument " "1"" of type '" "DirEntry *""'"); 
  }
  arg1 = reinterpret_cast< DirEntry * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)DirEntry_IsDirectory(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DirEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_DirEntry, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DirEntry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_GetNextDirEntry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSIDIR *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  DirEntry *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetNextDirEntry" "', argument " "1"" of type '" "VSIDIR *""'"); 
  }
  arg1 = reinterpret_cast< VSIDIR * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (DirEntry *)wrapper_VSIGetNextDirEntry(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CloseDir(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSIDIR *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CloseDir" "', argument " "1"" of type '" "VSIDIR *""'"); 
  }
  arg1 = reinterpret_cast< VSIDIR * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSICloseDir(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SetConfigOption", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLSetConfigOption((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetThreadLocalConfigOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SetThreadLocalConfigOption", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLSetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetConfigOption", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetGlobalConfigOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetGlobalConfigOption", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetGlobalConfigOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetGlobalConfigOption" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)wrapper_CPLGetGlobalConfigOption((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetThreadLocalConfigOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetThreadLocalConfigOption", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)wrapper_CPLGetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetConfigOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetConfigOptions", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)wrapper_GetConfigOptions();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, true);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetPathSpecificOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SetPathSpecificOption", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSISetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetCredential(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SetCredential", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetCredential" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetCredential" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetCredential" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      wrapper_VSISetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetCredential(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetCredential", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCredential" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCredential" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetCredential" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)wrapper_VSIGetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetPathSpecificOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetPathSpecificOption", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)wrapper_VSIGetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ClearCredentials(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ClearCredentials", 0, 1, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearCredentials" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = reinterpret_cast< char * >(buf1);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      wrapper_VSIClearCredentials((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ClearPathSpecificOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *)NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ClearPathSpecificOptions", 0, 1, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearPathSpecificOptions" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = reinterpret_cast< char * >(buf1);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      wrapper_VSIClearPathSpecificOptions((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GByte *arg2 = 0 ;
  int alloc1 = 0 ;
  bool viewIsValid1 = false ;
  Py_buffer view1 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
      SWIG_fail;
    }
    arg2 = (GByte *)ptr;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  GByte *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CPLHexToBinary", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = reinterpret_cast< int * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GIntBig arg2 ;
  char *arg3 = 0 ;
  int bToFree1 = 0 ;
  int alloc2 = 0 ;
  bool viewIsValid2 = false ;
  Py_buffer view2 ;
  PyObject *swig_obj[2] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FileFromMemBuffer", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
      SWIG_fail;
    }
    arg3 = (char *)ptr;
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = wrapper_VSIFileFromMemBuffer((char const *)arg1,SWIG_STD_MOVE(arg2),(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid2 ) {
      PyBuffer_Release(&view2);
    }
    else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
      delete[] arg3;
    }
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid2 ) {
      PyBuffer_Release(&view2);
    }
    else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
      delete[] arg3;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Unlink(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIUnlink((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_UnlinkBatch(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)wrapper_VSIUnlinkBatch(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "HasThreadSupport", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_HasThreadSupport();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetCurrentThreadCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetCurrentThreadCount", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)CPLGetCurrentThreadCount();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Mkdir(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Mkdir", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIMkdir((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Rmdir(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIRmdir((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MkdirRecursive(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MkdirRecursive", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MkdirRecursive" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIMkdirRecursive((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RmdirRecursive(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIRmdirRecursive((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int bToFree1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Rename", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIRename((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Move(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = NULL ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"old_path",  (char *)"new_path",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  VSI_RETVAL result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Move", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = wrapper_VSIMove((char const *)arg1,(char const *)arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Sync(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = NULL ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"pszSource",  (char *)"pszTarget",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  bool result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Sync", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)wrapper_VSISync((char const *)arg1,(char const *)arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_AbortPendingUploads(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)VSIAbortPendingUploads((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CopyFile(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  VSILFILE *arg3 = NULL ;
  GIntBig arg4 = -1 ;
  char **arg5 = NULL ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  int bToFree1 = 0 ;
  int bToFree2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"pszSource",  (char *)"pszTarget",  (char *)"fpSource",  (char *)"nSourceSize",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOO:CopyFile", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path_or_none) */
    if( obj0 == Py_None )
    {
      arg1 = NULL;
    }
    else
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
      if (arg1 == NULL)
      {
        PyErr_SetString( PyExc_RuntimeError, "not a string" );
        SWIG_fail;
      }
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_VSILFILE, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFile" "', argument " "3"" of type '" "VSILFILE *""'"); 
    }
    arg3 = reinterpret_cast< VSILFILE * >(argp3);
  }
  if (obj3) {
    {
      arg4 = (GIntBig)PyLong_AsLongLong(obj3);
    }
  }
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_VSICopyFile((char const *)arg1,(char const *)arg2,arg3,SWIG_STD_MOVE(arg4),arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path_or_none) */
    if( arg1 != NULL )
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path_or_none) */
    if( arg1 != NULL )
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CopyFileRestartable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  int *arg4 = 0 ;
  char **arg5 = 0 ;
  char **arg6 = NULL ;
  GDALProgressFunc arg7 = NULL ;
  void *arg8 = NULL ;
  int bToFree1 = 0 ;
  int bToFree2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int nRetCode4 = 0 ;
  char *pszOutputPayload4 = 0 ;
  PyObject *swig_obj[6] ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg8 = psProgressInfo;
  {
    /* %typemap(in) (int* pnRetCode, char** ppszOutputPayload) */
    arg4 = &nRetCode4;
    arg5 = &pszOutputPayload4;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CopyFileRestartable", 3, 6, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path_or_none) */
    if( swig_obj[0] == Py_None )
    {
      arg1 = NULL;
    }
    else
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
      if (arg1 == NULL)
      {
        PyErr_SetString( PyExc_RuntimeError, "not a string" );
        SWIG_fail;
      }
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFileRestartable" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[4]) || PyInt_Check(swig_obj[4]) )
      {
        if( PyLong_AsLong(swig_obj[4]) == 0 )
        {
          swig_obj[4] = Py_None;
        }
      }
      
      if (swig_obj[4] && swig_obj[4] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[4],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg7 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[4])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[4];
          arg7 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[5]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[5] ;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CopyFileRestartable((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,SWIG_STD_MOVE(arg7),arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int* pnRetCode, char** ppszOutputPayload)  */
    PyObject *r = PyTuple_New( 2 );
    PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
    if( *arg5 )
    {
      PyTuple_SetItem( r, 1, GDALPythonObjectFromCStr(*arg5) );
      VSIFree(*arg5);
    }
    else
    {
      Py_INCREF(Py_None);
      PyTuple_SetItem( r, 1, Py_None );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  {
    /* %typemap(freearg) (const char *utf8_path_or_none) */
    if( arg1 != NULL )
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path_or_none) */
    if( arg1 != NULL )
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MoveFile(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int bToFree1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MoveFile", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path_or_none) */
    if( swig_obj[0] == Py_None )
    {
      arg1 = NULL;
    }
    else
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
      if (arg1 == NULL)
      {
        PyErr_SetString( PyExc_RuntimeError, "not a string" );
        SWIG_fail;
      }
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_MoveFile((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path_or_none) */
    if( arg1 != NULL )
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path_or_none) */
    if( arg1 != NULL )
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetActualURL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)VSIGetActualURL((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetSignedURL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = NULL ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetSignedURL", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)wrapper_VSIGetSignedURL((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFileSystemsPrefixes(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetFileSystemsPrefixes", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)VSIGetFileSystemsPrefixes();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFileSystemOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)VSIGetFileSystemOptions((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *VSILFILE_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_VSILFILE, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  StatBuf *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
  }
  arg1 = reinterpret_cast< StatBuf * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->mode);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  StatBuf *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
  }
  arg1 = reinterpret_cast< StatBuf * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result =  ((arg1)->size);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  StatBuf *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
  }
  arg1 = reinterpret_cast< StatBuf * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result =  ((arg1)->mtime);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  StatBuf *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  StatBuf *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
  }
  arg1 = reinterpret_cast< StatBuf * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (StatBuf *)new_StatBuf(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  StatBuf *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
  }
  arg1 = reinterpret_cast< StatBuf * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_StatBuf(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  StatBuf *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
  }
  arg1 = reinterpret_cast< StatBuf * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)StatBuf_IsDirectory(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *StatBuf_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  StatBuf *arg2 = 0 ;
  int arg3 = 0 ;
  int bToFree1 = 0 ;
  StatBuf sStatBuf2 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  {
    /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
    arg2 = &sStatBuf2;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIStatL", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (StatBuf *psStatBufOut)*/
    Py_DECREF(resultobj);
    if (result == 0)
    resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFileMetadata(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = NULL ;
  int bToFree1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetFileMetadata", 2, 3, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetFileMetadata" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)VSIGetFileMetadata((char const *)arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, true);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetFileMetadata(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = 0 ;
  char *arg3 = 0 ;
  char **arg4 = NULL ;
  int bToFree1 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[4] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SetFileMetadata", 3, 4, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetFileMetadata" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)VSISetFileMetadata((char const *)arg1,arg2,(char const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int bToFree1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  VSILFILE *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFOpenL", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (VSILFILE *)wrapper_VSIFOpenL((char const *)arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFOpenExL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int arg3 = FALSE ;
  char **arg4 = NULL ;
  int bToFree1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[4] ;
  VSILFILE *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFOpenExL", 2, 4, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenExL" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFOpenExL" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (VSILFILE *)wrapper_VSIFOpenExL((char const *)arg1,(char const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFEofL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFEofL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSIFEofL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFErrorL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFErrorL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSIFErrorL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFClearErrL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFClearErrL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSIFClearErrL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFFlushL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFFlushL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSIFFlushL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  VSI_RETVAL result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIFCloseL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) VSI_RETVAL */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) VSI_RETVAL */
    resultobj = PyInt_FromLong( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  GIntBig arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFSeekL", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_VSIFSeekL(arg1,SWIG_STD_MOVE(arg2),arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = VSIFTellL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFTruncateL", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSIFTruncateL(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSISupportsSparseFiles(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSISupportsSparseFiles((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFGetRangeStatusL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  GIntBig arg2 ;
  GIntBig arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFGetRangeStatusL", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFGetRangeStatusL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)VSIFGetRangeStatusL(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  char *arg2 = 0 ;
  int arg3 ;
  int arg4 ;
  VSILFILE *arg5 = 0 ;
  int alloc1 = 0 ;
  bool viewIsValid1 = false ;
  Py_buffer view1 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSIFWriteL", 4, 4, swig_obj)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
      SWIG_fail;
    }
    arg2 = (char *)ptr;
  }
  ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
  }
  arg5 = reinterpret_cast< VSILFILE * >(argp5);
  {
    if (!arg5) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPLReadLineL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  VSILFILE *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLReadLineL" "', argument " "1"" of type '" "VSILFILE *""'"); 
  }
  arg1 = reinterpret_cast< VSILFILE * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)CPLReadLineL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSICurlClearCache(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VSICurlClearCache", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSICurlClearCache();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VSICurlPartialClearCache(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSICurlPartialClearCache((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_NetworkStatsReset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "NetworkStatsReset", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      VSINetworkStatsReset();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_NetworkStatsGetAsSerializedJSON(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = NULL ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "NetworkStatsGetAsSerializedJSON", 0, 1, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    {
      /* %typemap(in) char **dict */
      arg1 = NULL;
      if ( PySequence_Check( swig_obj[0] ) ) {
        int bErr = FALSE;
        arg1 = CSLFromPySequence(swig_obj[0], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[0] ) ) {
        int bErr = FALSE;
        arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)VSINetworkStatsGetAsSerializedJSON(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ParseCommandLine(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)CSLParseCommandLine((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetNumCPUs(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetNumCPUs", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)CPLGetNumCPUs();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetUsablePhysicalRAM(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GIntBig result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetUsablePhysicalRAM", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = CPLGetUsablePhysicalRAM();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultipartUploadGetCapabilities(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int *arg2 = 0 ;
  int *arg3 = 0 ;
  int *arg4 = 0 ;
  int *arg5 = 0 ;
  size_t *arg6 = 0 ;
  size_t *arg7 = 0 ;
  int *arg8 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int nRetCode2 = 0 ;
  int bNonSequentialUploadSupported2 = 0 ;
  int bParallelUploadSupported2 = 0 ;
  int bSupportsAbort2 = 0 ;
  size_t nMinPartSize2 = 0 ;
  size_t nMaxPartSize2 = 0 ;
  int nMaxPartCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    arg2 = &nRetCode2;
    arg3 = &bNonSequentialUploadSupported2;
    arg4 = &bParallelUploadSupported2;
    arg5 = &bSupportsAbort2;
    arg6 = &nMinPartSize2;
    arg7 = &nMaxPartSize2;
    arg8 = &nMaxPartCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadGetCapabilities" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      MultipartUploadGetCapabilities((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    if( *arg2 == 0 )
    {
      Py_DECREF(resultobj);
      resultobj = Py_None;
      Py_INCREF(Py_None);
    }
    else
    {
      PyObject *r = PyTuple_New( 6 );
      PyTuple_SetItem( r, 0, PyBool_FromLong(*arg3) );
      PyTuple_SetItem( r, 1, PyBool_FromLong(*arg4) );
      PyTuple_SetItem( r, 2, PyBool_FromLong(*arg5) );
      PyTuple_SetItem( r, 3, PyLong_FromUnsignedLongLong(*arg6) );
      PyTuple_SetItem( r, 4, PyLong_FromUnsignedLongLong(*arg7) );
      PyTuple_SetItem( r, 5, PyLong_FromUnsignedLongLong(*arg8) );
#if SWIG_VERSION >= 0x040300
      resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
      resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultipartUploadStart(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MultipartUploadStart", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadStart" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)MultipartUploadStart((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultipartUploadAddPart(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  int arg3 ;
  GUIntBig arg4 ;
  size_t arg5 ;
  char *arg6 = 0 ;
  char **arg7 = NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int alloc5 = 0 ;
  bool viewIsValid5 = false ;
  Py_buffer view5 ;
  PyObject *swig_obj[6] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAddPart", 5, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAddPart" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAddPart" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipartUploadAddPart" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
  }
  {
    /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrSizetSize(swig_obj[4], &arg5, &ptr, &alloc5, &viewIsValid5, &view5) ) {
      SWIG_fail;
    }
    arg6 = (char *)ptr;
  }
  if (swig_obj[5]) {
    {
      /* %typemap(in) char **dict */
      arg7 = NULL;
      if ( PySequence_Check( swig_obj[5] ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPySequence(swig_obj[5], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[5] ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPyMapping(swig_obj[5], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)MultipartUploadAddPart((char const *)arg1,(char const *)arg2,arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),(char const *)arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
    if( viewIsValid5 ) {
      PyBuffer_Release(&view5);
    }
    else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
      delete[] arg6;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
    if( viewIsValid5 ) {
      PyBuffer_Release(&view5);
    }
    else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
      delete[] arg6;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultipartUploadEnd(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  GUIntBig arg4 ;
  char **arg5 = NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[5] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MultipartUploadEnd", 4, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadEnd" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadEnd" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    /* %typemap(in) char **dict */
    arg3 = NULL;
    if ( PySequence_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)MultipartUploadEnd((char const *)arg1,(char const *)arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultipartUploadAbort(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAbort", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAbort" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAbort" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)MultipartUploadAbort((char const *)arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char *arg2 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, false);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char *arg2 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  char *arg3 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  CPLErr result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  CPLErr result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
  --argc;
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
        /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
        /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
        /* (see #4816) */
        _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        if (argc <= 2) {
          return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
    "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  char *arg4 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (swig_obj[3]) {
    res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
    }
    arg4 = reinterpret_cast< char * >(buf4);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDriverShadow_ShortName_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDriverShadow_LongName_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 = 1 ;
  GDALDataType arg6 = GDT_Byte ;
  char **arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"utf8_path",  (char *)"xsize",  (char *)"ysize",  (char *)"bands",  (char *)"eType",  (char *)"options",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Driver_Create", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  if (obj4) {
    ecode5 = SWIG_AsVal_int(obj4, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  if (obj5) {
    {
      if (PyInt_Check(obj5))
      {
        arg6 = static_cast<GDALDataType>(PyInt_AsLong(obj5));
      }
      else
      {
        PyObject* gdal_array = PyImport_ImportModule("osgeo.gdal_array");
        if (gdal_array)
        {
          PyObject* dict = PyModule_GetDict(gdal_array);
          PyObject* fn = PyDict_GetItemString(dict, "NumericTypeCodeToGDALTypeCode");
          PyObject* type_code = PyObject_CallFunctionObjArgs(fn, obj5, NULL);
          
          Py_DECREF(gdal_array);
          if (type_code && PyInt_Check(type_code))
          {
            arg6 = static_cast<GDALDataType>(PyInt_AsLong(type_code));
            Py_DECREF(type_code);
          }
          else
          {
            Py_XDECREF(type_code);
            PyErr_SetString(PyExc_RuntimeError, "type must be a GDAL data type code or NumPy type");
            SWIG_fail;
          }
        }
        else
        {
          PyErr_SetString(PyExc_RuntimeError, "gdal_array module is not available; type must be a specified as a GDAL data type code");
          SWIG_fail;
        }
      }
    }
  }
  if (obj6) {
    {
      /* %typemap(in) char **dict */
      arg7 = NULL;
      if ( PySequence_Check( obj6 ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPySequence(obj6, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj6 ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPyMapping(obj6, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_CreateVector(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"utf8_path",  (char *)"options",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Driver_CreateVector", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateVector" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALDriverShadow_CreateVector(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_CreateMultiDimensional(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"utf8_path",  (char *)"root_group_options",  (char *)"options",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Driver_CreateMultiDimensional", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateMultiDimensional" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALDriverShadow_CreateMultiDimensional(arg1,(char const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  GDALDatasetShadow *arg3 = 0 ;
  int arg4 = 1 ;
  char **arg5 = 0 ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"utf8_path",  (char *)"src",  (char *)"strict",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOO:Driver_CreateCopy", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
    {
      arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
  if (obj3) {
    ecode4 = SWIG_AsVal_int(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
  }
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Driver_Delete", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDriverShadow_Delete(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int bToFree3 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Driver_Rename", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
    {
      arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
    }
    else
    {
      arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
      
    }
    if (arg3 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int bToFree3 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Driver_CopyFiles", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
    {
      arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
    }
    else
    {
      arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
      
    }
    if (arg3 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_HasOpenOption(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Driver_HasOpenOption", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HasOpenOption" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_HasOpenOption" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDriverShadow_HasOpenOption(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDriverShadow_TestCapability(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDriverShadow_Register(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDriverShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDriverShadow_Deregister(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  short arg2 ;
  GDALColorEntry ce1 ;
  short val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c1_set", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
  } 
  arg2 = static_cast< short >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->c1 = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  GDALColorEntry ce1 ;
  PyObject *swig_obj[1] ;
  short result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (short) ((arg1)->c1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_short(static_cast< short >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  short arg2 ;
  GDALColorEntry ce1 ;
  short val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c2_set", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
  } 
  arg2 = static_cast< short >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->c2 = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  GDALColorEntry ce1 ;
  PyObject *swig_obj[1] ;
  short result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (short) ((arg1)->c2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_short(static_cast< short >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  short arg2 ;
  GDALColorEntry ce1 ;
  short val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c3_set", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
  } 
  arg2 = static_cast< short >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->c3 = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  GDALColorEntry ce1 ;
  PyObject *swig_obj[1] ;
  short result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (short) ((arg1)->c3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_short(static_cast< short >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  short arg2 ;
  GDALColorEntry ce1 ;
  short val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c4_set", 2, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
  } 
  arg2 = static_cast< short >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->c4 = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorEntry *arg1 = 0 ;
  GDALColorEntry ce1 ;
  PyObject *swig_obj[1] ;
  short result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) GDALColorEntry* */
    ce1.c4 = 255;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg1 = &ce1;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (short) ((arg1)->c4);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_short(static_cast< short >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPX_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPX_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPY_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPY_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPZ_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPZ_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPPixel_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPPixel_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPLine_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPLine_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_Info_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDAL_GCP_Info_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_Id_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDAL_GCP_Id_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GCP(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 = 0.0 ;
  double arg2 = 0.0 ;
  double arg3 = 0.0 ;
  double arg4 = 0.0 ;
  double arg5 = 0.0 ;
  char *arg6 = (char *)"" ;
  char *arg7 = (char *)"" ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  PyObject *swig_obj[7] ;
  GDAL_GCP *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_GCP", 0, 7, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
  }
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
  }
  if (swig_obj[3]) {
    ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
  }
  if (swig_obj[4]) {
    ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
  }
  if (swig_obj[5]) {
    res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
    }
    arg6 = reinterpret_cast< char * >(buf6);
  }
  if (swig_obj[6]) {
    res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
    }
    arg7 = reinterpret_cast< char * >(buf7);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDAL_GCP(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GCP_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPX_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPX_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPY_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPY_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPZ_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPZ_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPPixel_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPPixel_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDAL_GCP_GCPLine_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_GCPLine_set(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDAL_GCP_Info_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_Info_set(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDAL_GCP_Id_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDAL_GCP *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
  }
  arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDAL_GCP_Id_set(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GDAL_GCP *arg2 = 0 ;
  double *arg3 = (double *)0 ;
  int arg4 = 1 ;
  GDAL_GCP *tmpGCPList1 ;
  double argout3[6] ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[2] ;
  RETURN_NONE result;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GCPsToGeoTransform", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
    /* check if is List */
    if ( !PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
      PyErr_SetString(PyExc_RuntimeError, "too big sequence");
      SWIG_fail;
    }
    arg1 = (int)size;
    tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
    if( !tmpGCPList1 ) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    arg2 = tmpGCPList1;
    for( int i = 0; i<arg1; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      GDAL_GCP *item = 0;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
      if ( ! item ) {
        Py_DECREF(o);
        SWIG_fail;
      }
      memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
      Py_DECREF(o);
    }
  }
  if (swig_obj[1]) {
    ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (RETURN_NONE)GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  /*%typemap(out) IF_FALSE_RETURN_NONE */
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,0);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg2 );
  }
  {
    /* %typemap(ret) IF_FALSE_RETURN_NONE */
    if (result == 0 ) {
      Py_XDECREF( resultobj );
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
    if (resultobj == 0) {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GCPsToHomography(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GDAL_GCP *arg2 = 0 ;
  double *arg3 = (double *)0 ;
  GDAL_GCP *tmpGCPList1 ;
  double argout3[9] ;
  PyObject *swig_obj[1] ;
  RETURN_NONE result;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
    /* check if is List */
    if ( !PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
      PyErr_SetString(PyExc_RuntimeError, "too big sequence");
      SWIG_fail;
    }
    arg1 = (int)size;
    tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
    if( !tmpGCPList1 ) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    arg2 = tmpGCPList1;
    for( int i = 0; i<arg1; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      GDAL_GCP *item = 0;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
      if ( ! item ) {
        Py_DECREF(o);
        SWIG_fail;
      }
      memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
      Py_DECREF(o);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (RETURN_NONE)GDALGCPsToHomography(arg1,(GDAL_GCP const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  /*%typemap(out) IF_FALSE_RETURN_NONE */
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg3, 9 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,0);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg2 );
  }
  {
    /* %typemap(ret) IF_FALSE_RETURN_NONE */
    if (result == 0 ) {
      Py_XDECREF( resultobj );
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
    if (resultobj == 0) {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_VirtualMem(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLVirtualMemShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VirtualMem" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
  }
  arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_CPLVirtualMemShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VirtualMem_GetAddr(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLVirtualMemShadow *arg1 = 0 ;
  void **arg2 = 0 ;
  size_t *arg3 = 0 ;
  GDALDataType *arg4 = 0 ;
  int *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *ptr2 ;
  size_t nsize2 ;
  GDALDataType datatype2 ;
  int readonly2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly) */
    arg2 = &ptr2;
    arg3 = &nsize2;
    arg4 = &datatype2;
    arg5 = &readonly2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_GetAddr" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
  }
  arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLVirtualMemShadow_GetAddr(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
    Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
    
    if (PyBuffer_FillInfo(buf, swig_obj[0], *(arg2), *(arg3), *(arg5), PyBUF_ND)) {
      // error, handle
    }
    if( *(arg4) == GDT_Byte )
    {
      buf->format = (char*) "B";
      buf->itemsize = 1;
    }
    else if( *(arg4) == GDT_Int16 )
    {
      buf->format = (char*) "h";
      buf->itemsize = 2;
    }
    else if( *(arg4) == GDT_UInt16 )
    {
      buf->format = (char*) "H";
      buf->itemsize = 2;
    }
    else if( *(arg4) == GDT_Int32 )
    {
      buf->format = (char*) "i";
      buf->itemsize = 4;
    }
    else if( *(arg4) == GDT_UInt32 )
    {
      buf->format = (char*) "I";
      buf->itemsize = 4;
    }
    else if( *(arg4) == GDT_Float16 )
    {
      buf->format = (char*) "f";
      buf->itemsize = 2;
    }
    else if( *(arg4) == GDT_Float32 )
    {
      buf->format = (char*) "f";
      buf->itemsize = 4;
    }
    else if( *(arg4) == GDT_Float64 )
    {
      buf->format = (char*) "F";
      buf->itemsize = 8;
    }
    else
    {
      buf->format = (char*) "B";
      buf->itemsize = 1;
    }
    Py_DECREF(resultobj);
    resultobj = PyMemoryView_FromBuffer(buf);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VirtualMem_Pin(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLVirtualMemShadow *arg1 = 0 ;
  size_t arg2 = 0 ;
  size_t arg3 = 0 ;
  int arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VirtualMem_Pin", 1, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_Pin" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
  }
  arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VirtualMem_Pin" "', argument " "2"" of type '" "size_t""'");
    } 
    arg2 = static_cast< size_t >(val2);
  }
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VirtualMem_Pin" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
  }
  if (swig_obj[3]) {
    ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VirtualMem_Pin" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      CPLVirtualMemShadow_Pin(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *VirtualMem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_CPLVirtualMemShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAsyncReaderShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALAsyncReaderShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAsyncReaderShadow *arg1 = 0 ;
  double arg2 ;
  int *arg3 = 0 ;
  int *arg4 = 0 ;
  int *arg5 = 0 ;
  int *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int temp3 ;
  int res3 = SWIG_TMPOBJ ;
  int temp4 ;
  int res4 = SWIG_TMPOBJ ;
  int temp5 ;
  int res5 = SWIG_TMPOBJ ;
  int temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[2] ;
  GDALAsyncStatusType result;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AsyncReader_GetNextUpdatedRegion", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags), 0);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAsyncReaderShadow *arg1 = 0 ;
  void **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *pyObject2 = NULL ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
    arg2 = &pyObject2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg2)
    {
      resultobj = (PyObject*)*arg2;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAsyncReaderShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AsyncReader_LockBuffer", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAsyncReaderShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAsyncReaderShadow_UnlockBuffer(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_RasterCount_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALDatasetShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_MarkSuppressOnClose(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_MarkSuppressOnClose" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_MarkSuppressOnClose(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_Close(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_Close" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_Close(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset__RunCloseWithoutDestroying(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__RunCloseWithoutDestroying" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow__RunCloseWithoutDestroying(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDriverShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRasterBand", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_IsThreadSafe(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_IsThreadSafe", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsThreadSafe" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsThreadSafe" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_IsThreadSafe(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetThreadSafeDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetThreadSafeDataset", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALDatasetShadow_GetThreadSafeDataset(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetRootGroup(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALGroupHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRootGroup" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALGroupHS *)GDALDatasetShadow_GetRootGroup(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDatasetShadow_GetProjection(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetRefCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_GetRefCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetSummaryRefCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSummaryRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_GetSummaryRefCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetSpatialRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetSpatialRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_SetProjection", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_SetSpatialRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  OSRSpatialReferenceShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_SetSpatialRef(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  int *arg3 = 0 ;
  int *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  int isvalid2 ;
  int val4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"can_return_null",  NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetGeoTransform", kwnames, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj1 == Py_None ) {
        arg4 = 0;
      }
      else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
        arg4 = (int *) &val4;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[6], int* isvalid)  */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = CreateTupleFromDoubleArray(arg2, 6);
    }
#if 0x040401 >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argin2[6] ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_SetGeoTransform", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    /* %typemap(in) (double argin2[ANY]) */
    arg2 = argin2;
    if (! PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
    if ( seq_size != 6 ) {
      PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
      SWIG_fail;
    }
    for (unsigned int i=0; i<6; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      double val;
      if ( !PyArg_Parse(o, "d", &val ) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg2[i] =  val;
      Py_DECREF(o);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetExtent(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  int *arg3 = 0 ;
  OSRSpatialReferenceShadow *arg4 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[4] ;
  int isvalid2 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"srs",  NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetExtent", kwnames, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtent" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (obj1) {
    res4 = SWIG_ConvertPtr(obj1, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_GetExtent" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
    }
    arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_GetExtent(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[4], int* isvalid)  */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = CreateTupleFromDoubleArray(arg2, 4);
    }
#if 0x040401 >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetExtentWGS84LongLat(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[4] ;
  int isvalid2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtentWGS84LongLat" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_GetExtentWGS84LongLat(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[4], int* isvalid)  */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = CreateTupleFromDoubleArray(arg2, 4);
    }
#if 0x040401 >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = (char *)"NEAREST" ;
  int arg3 = 0 ;
  int *arg4 = 0 ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  char **arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"resampling",  (char *)"overviewlist",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOO:Dataset_BuildOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    {
      /* %typemap(in,numinputs=1) (int nList, int* pList)*/
      arg4 = CreateCIntListFromSequence(obj2, &arg3);
      if( arg3 < 0 ) {
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  if (obj5) {
    {
      /* %typemap(in) char **dict */
      arg7 = NULL;
      if ( PySequence_Check( obj5 ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPySequence(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj5 ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPyMapping(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_GetGCPCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetGCPSpatialRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetGCPSpatialRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int *arg2 = 0 ;
  GDAL_GCP **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nGCPs2 = 0 ;
  GDAL_GCP *pGCPs2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
    arg2 = &nGCPs2;
    arg3 = &pGCPs2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
    PyObject *dict = PyTuple_New( *arg2 );
    for( int i = 0; i < *arg2; i++ ) {
      GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
        (*arg3)[i].dfGCPY,
        (*arg3)[i].dfGCPZ,
        (*arg3)[i].dfGCPPixel,
        (*arg3)[i].dfGCPLine,
        (*arg3)[i].pszInfo,
        (*arg3)[i].pszId );
      
      PyTuple_SetItem(dict, i,
        SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
    }
    Py_DECREF(resultobj);
    resultobj = dict;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset__SetGCPs(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  GDAL_GCP *arg3 = 0 ;
  char *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDAL_GCP *tmpGCPList2 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
    /* check if is List */
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
      PyErr_SetString(PyExc_RuntimeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
    if( !tmpGCPList2 ) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    arg3 = tmpGCPList2;
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDAL_GCP *item = 0;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
      if ( ! item ) {
        Py_DECREF(o);
        SWIG_fail;
      }
      memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
      Py_DECREF(o);
    }
  }
  res4 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg3 );
  }
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg3 );
  }
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset__SetGCPs2(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  GDAL_GCP *arg3 = 0 ;
  OSRSpatialReferenceShadow *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDAL_GCP *tmpGCPList2 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs2", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs2" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
    /* check if is List */
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
      PyErr_SetString(PyExc_RuntimeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
    if( !tmpGCPList2 ) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    arg3 = tmpGCPList2;
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDAL_GCP *item = 0;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
      if ( ! item ) {
        Py_DECREF(o);
        SWIG_fail;
      }
      memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
      Py_DECREF(o);
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs2" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_SetGCPs2(arg1,arg2,(GDAL_GCP const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
    free( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_FlushCache(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDataType arg2 = GDT_Byte ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"datatype",  (char *)"options",  NULL 
  };
  CPLErr result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Dataset_AddBand", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (obj1) {
    {
      // %typemap(in) GDALDataType
      int val = 0;
      int ecode = SWIG_AsVal_int(obj1, &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
      }
      if( val < GDT_Unknown || val >= GDT_TypeCount )
      {
        SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
      }
      arg2 = static_cast<GDALDataType>(val);
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALDatasetShadow_GetFileList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  GIntBig arg6 ;
  char *arg7 = 0 ;
  int *arg8 = 0 ;
  int *arg9 = 0 ;
  GDALDataType *arg10 = 0 ;
  int arg11 = 0 ;
  int *arg12 = 0 ;
  GIntBig *arg13 = 0 ;
  GIntBig *arg14 = 0 ;
  GIntBig *arg15 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int alloc6 = 0 ;
  bool viewIsValid6 = false ;
  Py_buffer view6 ;
  int val8 ;
  int val9 ;
  GDALDataType val10 ;
  GIntBig val13 ;
  GIntBig val14 ;
  GIntBig val15 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_len",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"band_list",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  (char *)"buf_band_space",  NULL 
  };
  CPLErr result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOOOO:Dataset_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
      SWIG_fail;
    }
    arg7 = (char *)ptr;
  }
  if (obj6) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj6 == Py_None ) {
        arg8 = 0;
      }
      else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
        arg8 = (int *) &val8;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj7) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj7 == Py_None ) {
        arg9 = 0;
      }
      else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
        arg9 = (int *) &val9;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj8) {
    {
      /* %typemap(in) (GDALDataType *optional_GDALDataType) */
      int intval = 0;
      if ( obj8 == Py_None ) {
        arg10 = NULL;
      }
      else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
        if( intval < GDT_Unknown || intval >= GDT_TypeCount )
        {
          SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
        }
        val10 = static_cast<GDALDataType>(intval);
        arg10 = &val10;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj9) {
    {
      /* %typemap(in,numinputs=1) (int nList, int* pList)*/
      arg12 = CreateCIntListFromSequence(obj9, &arg11);
      if( arg11 < 0 ) {
        SWIG_fail;
      }
    }
  }
  if (obj10) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj10 == Py_None ) {
        arg13 = 0;
      }
      else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
        arg13 = (GIntBig *) &val13;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj11) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj11 == Py_None ) {
        arg14 = 0;
      }
      else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
        arg14 = (GIntBig *) &val14;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj12) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj12 == Py_None ) {
        arg15 = 0;
      }
      else if ( PyArg_Parse( obj12,"L" ,&val15 ) ) {
        arg15 = (GIntBig *) &val15;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid6 ) {
      PyBuffer_Release(&view6);
    }
    else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
      delete[] arg7;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg12);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid6 ) {
      PyBuffer_Release(&view6);
    }
    else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
      delete[] arg7;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg12);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_AdviseRead(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int *arg6 = 0 ;
  int *arg7 = 0 ;
  GDALDataType *arg8 = 0 ;
  int arg9 = 0 ;
  int *arg10 = 0 ;
  char **arg11 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int val8 ;
  PyObject *swig_obj[10] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_AdviseRead", 5, 10, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AdviseRead" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AdviseRead" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_AdviseRead" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_AdviseRead" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_AdviseRead" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  if (swig_obj[5]) {
    res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Dataset_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
    }
    arg6 = reinterpret_cast< int * >(argp6);
  }
  if (swig_obj[6]) {
    res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Dataset_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
    }
    arg7 = reinterpret_cast< int * >(argp7);
  }
  if (swig_obj[7]) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( swig_obj[7] == Py_None ) {
        arg8 = 0;
      }
      else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
        arg8 = (GDALDataType *) &val8;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (swig_obj[8]) {
    {
      /* %typemap(in,numinputs=1) (int nList, int* pList)*/
      arg10 = CreateCIntListFromSequence(swig_obj[8], &arg9);
      if( arg9 < 0 ) {
        SWIG_fail;
      }
    }
  }
  if (swig_obj[9]) {
    {
      /* %typemap(in) char **dict */
      arg11 = NULL;
      if ( PySequence_Check( swig_obj[9] ) ) {
        int bErr = FALSE;
        arg11 = CSLFromPySequence(swig_obj[9], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[9] ) ) {
        int bErr = FALSE;
        arg11 = CSLFromPyMapping(swig_obj[9], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg10);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg11 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg10);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg11 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  size_t arg6 ;
  char *arg7 = 0 ;
  void *arg8 = 0 ;
  int arg9 ;
  int arg10 ;
  GDALDataType arg11 = (GDALDataType) 0 ;
  int arg12 = 0 ;
  int *arg13 = 0 ;
  int arg14 = 0 ;
  int arg15 = 0 ;
  int arg16 = 0 ;
  char **arg17 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  int val15 ;
  int ecode15 = 0 ;
  int val16 ;
  int ecode16 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xOff",  (char *)"yOff",  (char *)"xSize",  (char *)"ySize",  (char *)"buf_len",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"bufType",  (char *)"band_list",  (char *)"nPixelSpace",  (char *)"nLineSpace",  (char *)"nBandSpace",  (char *)"options",  NULL 
  };
  GDALAsyncReaderShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO|OOOOOO:Dataset_BeginAsyncReader", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    /* %typemap(in,numinputs=1) (size_t nLenKeepObject, char *pBufKeepObject, void* pyObject) */
    if (PyBytes_Check(obj5))
    {
      Py_ssize_t safeLen = 0;
      PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
      arg6 = safeLen;
      arg8 = obj5;
    }
    else
    {
      PyErr_SetString(PyExc_TypeError, "not a bytes");
      SWIG_fail;
    }
  }
  ecode9 = SWIG_AsVal_int(obj6, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_int(obj7, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  if (obj8) {
    {
      // %typemap(in) GDALDataType
      int val = 0;
      int ecode = SWIG_AsVal_int(obj8, &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
      }
      if( val < GDT_Unknown || val >= GDT_TypeCount )
      {
        SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
      }
      arg11 = static_cast<GDALDataType>(val);
    }
  }
  if (obj9) {
    {
      /* %typemap(in,numinputs=1) (int nList, int* pList)*/
      arg13 = CreateCIntListFromSequence(obj9, &arg12);
      if( arg12 < 0 ) {
        SWIG_fail;
      }
    }
  }
  if (obj10) {
    ecode14 = SWIG_AsVal_int(obj10, &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
    } 
    arg14 = static_cast< int >(val14);
  }
  if (obj11) {
    ecode15 = SWIG_AsVal_int(obj11, &val15);
    if (!SWIG_IsOK(ecode15)) {
      SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
    } 
    arg15 = static_cast< int >(val15);
  }
  if (obj12) {
    ecode16 = SWIG_AsVal_int(obj12, &val16);
    if (!SWIG_IsOK(ecode16)) {
      SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
    } 
    arg16 = static_cast< int >(val16);
  }
  if (obj13) {
    {
      /* %typemap(in) char **dict */
      arg17 = NULL;
      if ( PySequence_Check( obj13 ) ) {
        int bErr = FALSE;
        arg17 = CSLFromPySequence(obj13, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj13 ) ) {
        int bErr = FALSE;
        arg17 = CSLFromPyMapping(obj13, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg13);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg17 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg13);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg17 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALAsyncReaderShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_EndAsyncReader", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_EndAsyncReader(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetVirtualMem(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALRWFlag arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  GDALDataType arg9 ;
  int arg10 ;
  int *arg11 = 0 ;
  int arg12 ;
  size_t arg13 ;
  size_t arg14 ;
  char **arg15 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  size_t val13 ;
  int ecode13 = 0 ;
  size_t val14 ;
  int ecode14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nBufXSize",  (char *)"nBufYSize",  (char *)"eBufType",  (char *)"band_list",  (char *)"bIsBandSequential",  (char *)"nCacheSize",  (char *)"nPageSizeHint",  (char *)"options",  NULL 
  };
  CPLVirtualMemShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOOOO|O:Dataset_GetVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
  } 
  arg2 = static_cast< GDALRWFlag >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetVirtualMem" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetVirtualMem" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetVirtualMem" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetVirtualMem" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetVirtualMem" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetVirtualMem" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(obj8, &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg9 = static_cast<GDALDataType>(val);
  }
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg11 = CreateCIntListFromSequence(obj9, &arg10);
    if( arg10 < 0 ) {
      SWIG_fail;
    }
  }
  ecode12 = SWIG_AsVal_int(obj10, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetVirtualMem" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  ecode13 = SWIG_AsVal_size_t(obj11, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetVirtualMem" "', argument " "13"" of type '" "size_t""'");
  } 
  arg13 = static_cast< size_t >(val13);
  ecode14 = SWIG_AsVal_size_t(obj12, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_GetVirtualMem" "', argument " "14"" of type '" "size_t""'");
  } 
  arg14 = static_cast< size_t >(val14);
  if (obj13) {
    {
      /* %typemap(in) char **dict */
      arg15 = NULL;
      if ( PySequence_Check( obj13 ) ) {
        int bErr = FALSE;
        arg15 = CSLFromPySequence(obj13, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj13 ) ) {
        int bErr = FALSE;
        arg15 = CSLFromPyMapping(obj13, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,SWIG_STD_MOVE(arg13),SWIG_STD_MOVE(arg14),arg15);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg11);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg15 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg11);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg15 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetTiledVirtualMem(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALRWFlag arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  GDALDataType arg9 ;
  int arg10 ;
  int *arg11 = 0 ;
  GDALTileOrganization arg12 ;
  size_t arg13 ;
  char **arg14 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  size_t val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"band_list",  (char *)"eTileOrganization",  (char *)"nCacheSize",  (char *)"options",  NULL 
  };
  CPLVirtualMemShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOOO|O:Dataset_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
  } 
  arg2 = static_cast< GDALRWFlag >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(obj8, &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg9 = static_cast<GDALDataType>(val);
  }
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg11 = CreateCIntListFromSequence(obj9, &arg10);
    if( arg10 < 0 ) {
      SWIG_fail;
    }
  }
  ecode12 = SWIG_AsVal_int(obj10, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "12"" of type '" "GDALTileOrganization""'");
  } 
  arg12 = static_cast< GDALTileOrganization >(val12);
  ecode13 = SWIG_AsVal_size_t(obj11, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "13"" of type '" "size_t""'");
  } 
  arg13 = static_cast< size_t >(val13);
  if (obj12) {
    {
      /* %typemap(in) char **dict */
      arg14 = NULL;
      if ( PySequence_Check( obj12 ) ) {
        int bErr = FALSE;
        arg14 = CSLFromPySequence(obj12, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj12 ) ) {
        int bErr = FALSE;
        arg14 = CSLFromPyMapping(obj12, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,SWIG_STD_MOVE(arg13),arg14);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg11);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg14 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg11);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg14 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_CreateLayer(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  OSRSpatialReferenceShadow *arg3 = NULL ;
  OGRwkbGeometryType arg4 = wkbUnknown ;
  char **arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"name",  (char *)"srs",  (char *)"geom_type",  (char *)"options",  NULL 
  };
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Dataset_CreateLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayer" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
    }
    arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
  }
  if (obj3) {
    ecode4 = SWIG_AsVal_int(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
    } 
    arg4 = static_cast< OGRwkbGeometryType >(val4);
  }
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_CreateLayerFromGeomFieldDefn(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  OGRGeomFieldDefnShadow *arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[4] ;
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateLayerFromGeomFieldDefn", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayerFromGeomFieldDefn(arg1,(char const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_CopyLayer(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  OGRLayerShadow *arg2 = 0 ;
  char *arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"src_layer",  (char *)"new_name",  (char *)"options",  NULL 
  };
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Dataset_CopyLayer", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CopyLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CopyLayer" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALDatasetShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_DeleteLayer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_DeleteLayer" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)GDALDatasetShadow_DeleteLayer(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_IsLayerPrivate(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_IsLayerPrivate", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsLayerPrivate" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsLayerPrivate" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_IsLayerPrivate(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetNextFeature(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  bool arg2 = true ;
  bool arg3 = false ;
  OGRLayerShadow **arg4 = NULL ;
  double *arg5 = NULL ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  OGRLayerShadow *poBelongingLayer4 = NULL ;
  double dfProgressPct4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"include_layer",  (char *)"include_pct",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRFeatureShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  {
    /* %typemap(in) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
    arg4 = &poBelongingLayer4;
    arg5 = &dfProgressPct4;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Dataset_GetNextFeature", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetNextFeature" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_bool(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetNextFeature" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_bool(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetNextFeature" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    /* %typemap(check) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
    if( !arg3 )
    arg5 = NULL;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureShadow *)GDALDatasetShadow_GetNextFeature(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(argout) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
    
    if( arg2 )
    {
      if( resultobj == Py_None )
      {
        resultobj = PyList_New(1);
        PyList_SetItem(resultobj, 0, Py_None);
      }
      
      PyObject* r;
      if ( !*arg4 ) {
        r = Py_None;
        Py_INCREF(Py_None);
      }
      else {
        r = SWIG_NewPointerObj(SWIG_as_voidptr( *arg4), SWIGTYPE_p_OGRLayerShadow, 0 );
      }
#if SWIG_VERSION >= 0x040300
      resultobj = SWIG_Python_AppendOutput(resultobj,r,0);
#else
      resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
    }
    
    if( arg3 )
    {
      if( resultobj == Py_None )
      {
        resultobj = PyList_New(1);
        PyList_SetItem(resultobj, 0, Py_None);
      }
      PyObject* r = PyFloat_FromDouble( *arg5);
#if SWIG_VERSION >= 0x040300
      resultobj = SWIG_Python_AppendOutput(resultobj,r,0);
#else
      resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
    }
    
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_TestCapability(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_TestCapability", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_TestCapability" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_TestCapability(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_ExecuteSQL(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  OGRGeometryShadow *arg3 = NULL ;
  char *arg4 = (char *)"" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"statement",  (char *)"spatialFilter",  (char *)"dialect",  NULL 
  };
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Dataset_ExecuteSQL", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ExecuteSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
  }
  if (obj3) {
    res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
    }
    arg4 = reinterpret_cast< char * >(buf4);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALDatasetShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_ReleaseResultSet(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  OGRLayerShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReleaseResultSet" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_ReleaseResultSet(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetStyleTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRStyleTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRStyleTableShadow *)GDALDatasetShadow_GetStyleTable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_SetStyleTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  OGRStyleTableShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_SetStyleTable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetLayerByIndex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByIndex" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByIndex(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetLayerByName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByName" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByName(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_ResetReading(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ResetReading" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_ResetReading(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetLayerCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDatasetShadow_GetLayerCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_AbortSQL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AbortSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)GDALDatasetShadow_AbortSQL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_StartTransaction(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 = FALSE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"force",  NULL 
  };
  OGRErr result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_StartTransaction", kwnames, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_StartTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_StartTransaction" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)GDALDatasetShadow_StartTransaction(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_CommitTransaction(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CommitTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)GDALDatasetShadow_CommitTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_RollbackTransaction(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RollbackTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)GDALDatasetShadow_RollbackTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_ClearStatistics(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ClearStatistics" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDatasetShadow_ClearStatistics(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomainNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomainNames", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomainNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALDatasetShadow_GetFieldDomainNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRFieldDomainShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomain", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)GDALDatasetShadow_GetFieldDomain(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_AddFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  OGRFieldDomainShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_AddFieldDomain", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_AddFieldDomain(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_DeleteFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteFieldDomain", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_DeleteFieldDomain(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_UpdateFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  OGRFieldDomainShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateFieldDomain", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_UpdateFieldDomain(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetRelationshipNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationshipNames", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationshipNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALDatasetShadow_GetRelationshipNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_GetRelationship(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALRelationshipShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationship", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetRelationship" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRelationshipShadow *)GDALDatasetShadow_GetRelationship(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_AddRelationship(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALRelationshipShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_AddRelationship", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_AddRelationship(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_DeleteRelationship(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteRelationship", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteRelationship" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_DeleteRelationship(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_UpdateRelationship(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALRelationshipShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateRelationship", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDatasetShadow_UpdateRelationship(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_AsMDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char **arg2 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dataset_AsMDArray", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AsMDArray" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALDatasetShadow_AsMDArray(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void **arg6 = 0 ;
  int *arg7 = 0 ;
  int *arg8 = 0 ;
  GDALDataType *arg9 = 0 ;
  int arg10 = 0 ;
  int *arg11 = 0 ;
  GIntBig *arg12 = 0 ;
  GIntBig *arg13 = 0 ;
  GIntBig *arg14 = 0 ;
  GDALRIOResampleAlg arg15 = GRIORA_NearestNeighbour ;
  GDALProgressFunc arg16 = NULL ;
  void *arg17 = NULL ;
  void *arg18 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  void *pyObject6 = NULL ;
  int val7 ;
  int val8 ;
  GDALDataType val9 ;
  GIntBig val12 ;
  GIntBig val13 ;
  GIntBig val14 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  PyObject * obj15 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"band_list",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  (char *)"buf_band_space",  (char *)"resample_alg",  (char *)"callback",  (char *)"callback_data",  (char *)"inputOutputBuf",  NULL 
  };
  CPLErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg17 = psProgressInfo;
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
    arg6 = &pyObject6;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OOOOOOOOOOO:Dataset_ReadRaster1", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  if (obj5) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj5 == Py_None ) {
        arg7 = 0;
      }
      else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
        arg7 = (int *) &val7;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj6) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj6 == Py_None ) {
        arg8 = 0;
      }
      else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
        arg8 = (int *) &val8;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj7) {
    {
      /* %typemap(in) (GDALDataType *optional_GDALDataType) */
      int intval = 0;
      if ( obj7 == Py_None ) {
        arg9 = NULL;
      }
      else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
        if( intval < GDT_Unknown || intval >= GDT_TypeCount )
        {
          SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
        }
        val9 = static_cast<GDALDataType>(intval);
        arg9 = &val9;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj8) {
    {
      /* %typemap(in,numinputs=1) (int nList, int* pList)*/
      arg11 = CreateCIntListFromSequence(obj8, &arg10);
      if( arg10 < 0 ) {
        SWIG_fail;
      }
    }
  }
  if (obj9) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj9 == Py_None ) {
        arg12 = 0;
      }
      else if ( PyArg_Parse( obj9,"L" ,&val12 ) ) {
        arg12 = (GIntBig *) &val12;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj10) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj10 == Py_None ) {
        arg13 = 0;
      }
      else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
        arg13 = (GIntBig *) &val13;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj11) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj11 == Py_None ) {
        arg14 = 0;
      }
      else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
        arg14 = (GIntBig *) &val14;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj12) {
    {
      // %typemap(in) GDALRIOResampleAlg
      int val = 0;
      int ecode = SWIG_AsVal_int(obj12, &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
      }
      if( val < 0 ||
        ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
          val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
        val > static_cast<int>(GRIORA_LAST) )
      {
        SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
      }
      arg15 = static_cast< GDALRIOResampleAlg >(val);
    }
  }
  if (obj13) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj13) || PyInt_Check(obj13) )
      {
        if( PyLong_AsLong(obj13) == 0 )
        {
          obj13 = Py_None;
        }
      }
      
      if (obj13 && obj13 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj13,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg16 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj13)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj13;
          arg16 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj14) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj14 ;
    }
  }
  if (obj15) {
    {
      /* %typemap(in) ( void *inPythonObject ) */
      arg18 = obj15;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,SWIG_STD_MOVE(arg16),arg17,arg18);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg6)
    {
      resultobj = (PyObject*)*arg6;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg11);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg11);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_RATDateTime_nYear_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nYear_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nYear_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nYear_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nYear = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nYear_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nYear_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nYear);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nMonth_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nMonth_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nMonth_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nMonth_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nMonth = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nMonth_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nMonth_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nMonth);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nDay_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nDay_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nDay_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nDay_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nDay = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nDay_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nDay_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nDay);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nHour_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nHour_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nHour_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nHour_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nHour = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nHour_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nHour_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nHour);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nMinute_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nMinute_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nMinute_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nMinute_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nMinute = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nMinute_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nMinute_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nMinute);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_fSecond_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  float arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_fSecond_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_fSecond_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_fSecond_set" "', argument " "2"" of type '" "float""'");
  } 
  arg2 = static_cast< float >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->fSecond = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_fSecond_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  float result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_fSecond_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (float) ((arg1)->fSecond);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_float(static_cast< float >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nTimeZoneHour_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nTimeZoneHour_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nTimeZoneHour_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nTimeZoneHour_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nTimeZoneHour = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nTimeZoneHour_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nTimeZoneHour_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nTimeZoneHour);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nTimeZoneMinute_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_nTimeZoneMinute_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nTimeZoneMinute_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_nTimeZoneMinute_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->nTimeZoneMinute = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_nTimeZoneMinute_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_nTimeZoneMinute_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->nTimeZoneMinute);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_bPositiveTimeZone_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_bPositiveTimeZone_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_bPositiveTimeZone_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_bPositiveTimeZone_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->bPositiveTimeZone = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_bPositiveTimeZone_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_bPositiveTimeZone_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool) ((arg1)->bPositiveTimeZone);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_bIsValid_set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RATDateTime_bIsValid_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_bIsValid_set" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RATDateTime_bIsValid_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    if (arg1) (arg1)->bIsValid = arg2;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RATDateTime_bIsValid_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RATDateTime_bIsValid_get" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool) ((arg1)->bIsValid);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RATDateTime(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_RATDateTime", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRATDateTime *)new GDALRATDateTime();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRATDateTime, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_RATDateTime(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATDateTime *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRATDateTime, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RATDateTime" "', argument " "1"" of type '" "GDALRATDateTime *""'"); 
  }
  arg1 = reinterpret_cast< GDALRATDateTime * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete arg1;
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *RATDateTime_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALRATDateTime, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *RATDateTime_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_RasterAttributeTable", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALRasterAttributeTableShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRasterAttributeTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetNameOfCol", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALRATFieldUsage result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetUsageOfCol", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALRATFieldType result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetTypeOfCol", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  GDALRATFieldUsage arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetColOfUsage", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
  } 
  arg2 = static_cast< GDALRATFieldUsage >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsString", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsInt", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDouble", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsBoolean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsBoolean", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsBoolean" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsBoolean" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsBoolean" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALRasterAttributeTableShadow_GetValueAsBoolean(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDateTime(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALRATDateTime result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDateTime", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDateTime" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDateTime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDateTime" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALRasterAttributeTableShadow_GetValueAsDateTime(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj((new GDALRATDateTime(result)), SWIGTYPE_p_GDALRATDateTime, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsWKBGeometry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  size_t *arg4 = 0 ;
  char **arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  size_t nLen4 = 0 ;
  char *pBuf4 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  {
    /* %typemap(in,numinputs=0) (size_t *nLen4, char **pBuf4 ) */
    arg4 = &nLen4;
    arg5 = &pBuf4;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsWKBGeometry", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsWKBGeometry" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsWKBGeometry" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsWKBGeometry" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterAttributeTableShadow_GetValueAsWKBGeometry(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (size_t *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
    if( *arg5 ) {
      resultobj = PyByteArray_FromStringAndSize( *arg5, *arg4 );
    }
    else {
      resultobj = Py_None;
      Py_INCREF(Py_None);
    }
  }
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsWKBGeometry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  char *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int alloc4 = 0 ;
  bool viewIsValid4 = false ;
  Py_buffer view4 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsWKBGeometry", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsWKBGeometry" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsWKBGeometry" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsWKBGeometry" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrIntSize(swig_obj[3], &arg4, &ptr, &alloc4, &viewIsValid4, &view4) ) {
      SWIG_fail;
    }
    arg5 = (char *)ptr;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterAttributeTableShadow_SetValueAsWKBGeometry(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid4 ) {
      PyBuffer_Release(&view4);
    }
    else if (ReturnSame(alloc4) == SWIG_NEWOBJ ) {
      delete[] arg5;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid4 ) {
      PyBuffer_Release(&view4);
    }
    else if (ReturnSame(alloc4) == SWIG_NEWOBJ ) {
      delete[] arg5;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  char **arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int iLength4 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsString", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int iLength4, char **ppszData) (int iLength4) */
    if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) )
    {
      PyErr_SetString(PyExc_TypeError, "not a integer");
      SWIG_fail;
    }
    if( iLength4 <= 0 || iLength4 > INT_MAX - 1 )
    {
      PyErr_SetString(PyExc_TypeError, "invalid length");
      SWIG_fail;
    }
    arg4 = iLength4;
    arg5 = (char**)VSICalloc(iLength4 + 1, sizeof(char*));
    if( !arg5 )
    {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsString(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (int iLength, char **ppszData) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( arg4 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<arg4; i++ ) {
      if( arg5[i] )
      {
        PyObject *val = GDALPythonObjectFromCStr( arg5[i] );
        PyList_SetItem( out, i, val );
      }
      else
      {
        Py_INCREF(Py_None);
        PyList_SetItem( out, i, Py_None );
      }
    }
    resultobj = out;
  }
  {
    /* %typemap(freearg) (int iLength, char **ppszData) */
    CSLDestroy(arg5);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int iLength, char **ppszData) */
    CSLDestroy(arg5);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsInteger(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int iLength4 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsInteger", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int iLength4, int *pnData) (int iLength4) */
    if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
      PyErr_SetString(PyExc_TypeError, "not a integer");
      SWIG_fail;
    }
    if( iLength4 <= 0 )
    {
      PyErr_SetString(PyExc_TypeError, "invalid length");
      SWIG_fail;
    }
    arg4 = iLength4;
    arg5 = (int*)VSICalloc(iLength4, sizeof(int));
    if( !arg5 )
    {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (int iLength, int *pnData) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( arg4 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<arg4; i++ ) {
      PyObject *val = PyLong_FromLong( (arg5)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  {
    /* %typemap(freearg) (int iLength, int *pnData) */
    CPLFree(arg5);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int iLength, int *pnData) */
    CPLFree(arg5);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  double *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int iLength4 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsDouble", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int iLength4, double *pdfData) (int iLength4) */
    if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
      PyErr_SetString(PyExc_TypeError, "not a integer");
      SWIG_fail;
    }
    if( iLength4 <= 0 )
    {
      PyErr_SetString(PyExc_TypeError, "invalid length");
      SWIG_fail;
    }
    arg4 = iLength4;
    arg5 = (double*)CPLCalloc(iLength4, sizeof(double));
    if( !arg5 )
    {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (int iLength, double *pdfData)  */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( arg4 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<arg4; i++ ) {
      PyObject *val = PyFloat_FromDouble( (arg5)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  {
    /* %typemap(freearg) (int iLength, double *pdfData) */
    CPLFree(arg5);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int iLength, double *pdfData) */
    CPLFree(arg5);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsBoolean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  bool *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int iLength4 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsBoolean", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsBoolean" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsBoolean" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsBoolean" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int iLength4, bool *pbData) (int iLength4) */
    if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
      PyErr_SetString(PyExc_TypeError, "not a integer");
      SWIG_fail;
    }
    if( iLength4 <= 0 )
    {
      PyErr_SetString(PyExc_TypeError, "invalid length");
      SWIG_fail;
    }
    arg4 = iLength4;
    arg5 = (bool*)VSICalloc(iLength4, sizeof(bool));
    if( !arg5 )
    {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsBoolean(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (int iLength, bool *pbData) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( arg4 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<arg4; i++ ) {
      PyObject *val = PyBool_FromLong( (arg5)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  {
    /* %typemap(freearg) (int iLength, bool *pbData) */
    CPLFree(arg5);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int iLength, bool *pbData) */
    CPLFree(arg5);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  char *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *str4 = 0 ;
  int bToFree4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsString", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in) (tostring argin) */
    str4 = PyObject_Str( swig_obj[3] );
    if ( str4 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg4 = GDALPythonObjectToCStr(str4, &bToFree4);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str4 != NULL)
    {
      Py_DECREF(str4);
    }
    GDALPythonFreeCStr(arg4, bToFree4);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str4 != NULL)
    {
      Py_DECREF(str4);
    }
    GDALPythonFreeCStr(arg4, bToFree4);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsInt", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDouble", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsBoolean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsBoolean", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsBoolean" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsBoolean" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsBoolean" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsBoolean" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetValueAsBoolean(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDateTime(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  GDALRATDateTime arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDateTime", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDateTime" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDateTime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDateTime" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_GDALRATDateTime,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterAttributeTable_SetValueAsDateTime" "', argument " "4"" of type '" "GDALRATDateTime""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "RasterAttributeTable_SetValueAsDateTime" "', argument " "4"" of type '" "GDALRATDateTime""'");
    } else {
      GDALRATDateTime * temp = reinterpret_cast< GDALRATDateTime * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetValueAsDateTime(arg1,arg2,arg3,SWIG_STD_MOVE(arg4));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetRowCount", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  GDALRATFieldType arg3 ;
  GDALRATFieldUsage arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_CreateColumn", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
  } 
  arg3 = static_cast< GDALRATFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
  } 
  arg4 = static_cast< GDALRATFieldUsage >(val4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  double *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  bool result;
  
  arg2 = &temp2;
  arg3 = &temp3;
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (ReturnSame(SWIG_IsTmpObj(res2))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags), 0);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetLinearBinning", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetRowOfValue", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_ChangesAreWrittenToFile(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ChangesAreWrittenToFile" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_DumpReadable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_DumpReadable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_DumpReadable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetTableType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  GDALRATTableType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetTableType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetTableType" "', argument " "2"" of type '" "GDALRATTableType""'");
  } 
  arg2 = static_cast< GDALRATTableType >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_SetTableType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTableType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRATTableType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRATTableType)GDALRasterAttributeTableShadow_GetTableType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterAttributeTable_RemoveStatistics(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterAttributeTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_RemoveStatistics" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterAttributeTableShadow_RemoveStatistics(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *RasterAttributeTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_Group(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Group" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALGroupHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALGroupHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetFullName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetFullName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALGroupHS_GetFullName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetMDArrayNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayNames", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALGroupHS_GetMDArrayNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetMDArrayFullNamesRecursive(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char **arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayFullNamesRecursive", 1, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  if (swig_obj[1]) {
    res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "2"" of type '" "char **""'"); 
    }
    arg2 = reinterpret_cast< char ** >(argp2);
  }
  if (swig_obj[2]) {
    res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "3"" of type '" "char **""'"); 
    }
    arg3 = reinterpret_cast< char ** >(argp3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALGroupHS_GetMDArrayFullNamesRecursive(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_OpenMDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArray", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArray" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArray(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_OpenMDArrayFromFullname(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArrayFromFullname", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArrayFromFullname(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_ResolveMDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[4] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_ResolveMDArray", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_ResolveMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_ResolveMDArray" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_ResolveMDArray" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALGroupHS_ResolveMDArray(arg1,(char const *)arg2,(char const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetGroupNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetGroupNames", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetGroupNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALGroupHS_GetGroupNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_OpenGroup(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALGroupHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroup", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroup" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALGroupHS *)GDALGroupHS_OpenGroup(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_OpenGroupFromFullname(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALGroupHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroupFromFullname", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroupFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroupFromFullname" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALGroupHS *)GDALGroupHS_OpenGroupFromFullname(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetVectorLayerNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetVectorLayerNames", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetVectorLayerNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALGroupHS_GetVectorLayerNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_OpenVectorLayer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  OGRLayerShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_OpenVectorLayer", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenVectorLayer" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenVectorLayer" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)GDALGroupHS_OpenVectorLayer(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetDimensions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  GDALDimensionHS ***arg2 = 0 ;
  size_t *arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDALDimensionHS **dims2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
    arg2 = &dims2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetDimensions", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDimensions" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALGroupHS_GetDimensions(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALDimensionHS */
      (*arg2)[i] = NULL;
    }
  }
  {
    /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
    GDALReleaseDimensions(*arg2, *arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
    GDALReleaseDimensions(*arg2, *arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetAttribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALAttributeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetAttribute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAttributeHS *)GDALGroupHS_GetAttribute(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetAttributes(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  GDALAttributeHS ***arg2 = 0 ;
  size_t *arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDALAttributeHS **attrs2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    arg2 = &attrs2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttributes" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALGroupHS_GetAttributes(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALAttributeHS */
      (*arg2)[i] = NULL;
    }
  }
  {
    /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    GDALReleaseAttributes(*arg2, *arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    GDALReleaseAttributes(*arg2, *arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetStructuralInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetStructuralInfo" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALGroupHS_GetStructuralInfo(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, false);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_CreateGroup(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"name",  (char *)"options",  NULL 
  };
  GDALGroupHS *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Group_CreateGroup", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateGroup" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALGroupHS *)GDALGroupHS_CreateGroup(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_DeleteGroup(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_DeleteGroup", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteGroup" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALGroupHS_DeleteGroup(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_CreateDimension(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  char *arg4 = 0 ;
  GUIntBig arg5 ;
  char **arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"name",  (char *)"dim_type",  (char *)"direction",  (char *)"size",  (char *)"options",  NULL 
  };
  GDALDimensionHS *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|O:Group_CreateDimension", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateDimension" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateDimension" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_CreateDimension" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Group_CreateDimension" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    arg5 = (GIntBig)PyLong_AsUnsignedLongLong(obj4);
  }
  if (obj5) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( obj5 ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj5 ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDimensionHS *)GDALGroupHS_CreateDimension(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_CreateMDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  int arg3 ;
  GDALDimensionHS **arg4 = 0 ;
  GDALExtendedDataTypeHS *arg5 = 0 ;
  char **arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_CreateMDArray", 4, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateMDArray" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
    if ( !PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (GDALDimensionHS**) VSIMalloc(arg3*sizeof(GDALDimensionHS*));
    if( !arg4) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[2],i);
      GDALDimensionHS* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
        SWIG_fail;
      }
      arg4[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateMDArray" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALGroupHS_CreateMDArray(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
    CPLFree( arg4 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
    CPLFree( arg4 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_DeleteMDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_DeleteMDArray", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteMDArray" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALGroupHS_DeleteMDArray(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_CreateAttribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  int arg3 ;
  GUIntBig *arg4 = 0 ;
  GDALExtendedDataTypeHS *arg5 = 0 ;
  char **arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  GDALAttributeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAttributeHS *)GDALGroupHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_DeleteAttribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALGroupHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_Rename", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_Rename" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_Rename" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALGroupHS_Rename(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_SubsetDimensionFromSelection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALGroupHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_SubsetDimensionFromSelection", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALGroupHS *)GDALGroupHS_SubsetDimensionFromSelection(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetDataTypeCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataTypeCount" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALGroupHS_GetDataTypeCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Group_GetDataType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGroupHS *arg1 = 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Group_GetDataType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataType" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Group_GetDataType" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALGroupHS_GetDataType(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Group_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALGroupHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Statistics_min_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min_get" "', argument " "1"" of type '" "Statistics *""'"); 
  }
  arg1 = reinterpret_cast< Statistics * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->min);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Statistics_max_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max_get" "', argument " "1"" of type '" "Statistics *""'"); 
  }
  arg1 = reinterpret_cast< Statistics * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->max);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Statistics_mean_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean_get" "', argument " "1"" of type '" "Statistics *""'"); 
  }
  arg1 = reinterpret_cast< Statistics * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->mean);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Statistics_std_dev_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_std_dev_get" "', argument " "1"" of type '" "Statistics *""'"); 
  }
  arg1 = reinterpret_cast< Statistics * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->std_dev);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Statistics_valid_count_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_valid_count_get" "', argument " "1"" of type '" "Statistics *""'"); 
  }
  arg1 = reinterpret_cast< Statistics * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result =  ((arg1)->valid_count);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Statistics(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
  }
  arg1 = reinterpret_cast< Statistics * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_Statistics(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Statistics(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  Statistics *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_Statistics", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (Statistics *)new Statistics();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Statistics_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Statistics, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Statistics_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_RawBlockInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayRawBlockInfo, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RawBlockInfo" "', argument " "1"" of type '" "GDALMDArrayRawBlockInfo *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayRawBlockInfo * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALMDArrayRawBlockInfo(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RawBlockInfo_GetOffset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GUIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayRawBlockInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RawBlockInfo_GetOffset" "', argument " "1"" of type '" "GDALMDArrayRawBlockInfo *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayRawBlockInfo * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALMDArrayRawBlockInfo_GetOffset(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromUnsignedLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RawBlockInfo_GetSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GUIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayRawBlockInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RawBlockInfo_GetSize" "', argument " "1"" of type '" "GDALMDArrayRawBlockInfo *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayRawBlockInfo * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALMDArrayRawBlockInfo_GetSize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromUnsignedLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RawBlockInfo_GetFilename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayRawBlockInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RawBlockInfo_GetFilename" "', argument " "1"" of type '" "GDALMDArrayRawBlockInfo *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayRawBlockInfo * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMDArrayRawBlockInfo_GetFilename(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RawBlockInfo_GetInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayRawBlockInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RawBlockInfo_GetInfo" "', argument " "1"" of type '" "GDALMDArrayRawBlockInfo *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayRawBlockInfo * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMDArrayRawBlockInfo_GetInfo(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RawBlockInfo_GetInlineData(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *arg1 = 0 ;
  size_t *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t nLen2 = 0 ;
  char *pBuf2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (size_t *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayRawBlockInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RawBlockInfo_GetInlineData" "', argument " "1"" of type '" "GDALMDArrayRawBlockInfo *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayRawBlockInfo * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayRawBlockInfo_GetInlineData(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (size_t *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
    if( *arg3 ) {
      resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
    }
    else {
      resultobj = Py_None;
      Py_INCREF(Py_None);
    }
  }
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RawBlockInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayRawBlockInfo *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_RawBlockInfo", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayRawBlockInfo *)new GDALMDArrayRawBlockInfo();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayRawBlockInfo, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *RawBlockInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayRawBlockInfo, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *RawBlockInfo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_MDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MDArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALMDArrayHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMDArrayHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetFullName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetFullName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMDArrayHS_GetFullName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetTotalElementsCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GUIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetTotalElementsCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALMDArrayHS_GetTotalElementsCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromUnsignedLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetDimensionCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensionCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALMDArrayHS_GetDimensionCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetDimensions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GDALDimensionHS ***arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDALDimensionHS **dims2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
    arg2 = &dims2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensions" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetDimensions(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALDimensionHS */
      (*arg2)[i] = NULL;
    }
  }
  {
    /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
    GDALReleaseDimensions(*arg2, *arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
    GDALReleaseDimensions(*arg2, *arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetCoordinateVariables(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GDALMDArrayHS ***arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDALMDArrayHS **arrays2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    arg2 = &arrays2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetCoordinateVariables" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetCoordinateVariables(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALMDArrayHS */
      (*arg2)[i] = NULL;
    }
  }
  {
    /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    GDALReleaseArrays(*arg2, *arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    GDALReleaseArrays(*arg2, *arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetBlockSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GUIntBig **arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GUIntBig *vals2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
    arg2 = &vals2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetBlockSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetBlockSize(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      char szTmp[32];
      snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
      PyObject *o = PyLong_FromString(szTmp, NULL, 10);
      PyList_SetItem(resultobj, i, o );
    }
  }
  {
    /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetProcessingChunkSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  size_t arg2 ;
  GUIntBig **arg3 = 0 ;
  size_t *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  GUIntBig *vals3 = 0 ;
  size_t nCount3 = 0 ;
  PyObject *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
    arg3 = &vals3;
    arg4 = &nCount3;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetProcessingChunkSize", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetProcessingChunkSize(arg1,SWIG_STD_MOVE(arg2),arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg4 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg4; i++ ) {
      char szTmp[32];
      snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg3)[i]);
      PyObject *o = PyLong_FromString(szTmp, NULL, 10);
      PyList_SetItem(resultobj, i, o );
    }
  }
  {
    /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
    CPLFree(*arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
    CPLFree(*arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetDataType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDataType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALMDArrayHS_GetDataType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetStructuralInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStructuralInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMDArrayHS_GetStructuralInfo(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, false);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_Resize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GUIntBig *arg3 = 0 ;
  char **arg4 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_Resize", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Resize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_Resize(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_Read(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GUIntBig *arg3 = 0 ;
  int arg4 ;
  GUIntBig *arg5 = 0 ;
  int arg6 ;
  GIntBig *arg7 = 0 ;
  int arg8 ;
  GIntBig *arg9 = 0 ;
  GDALExtendedDataTypeHS *arg10 = 0 ;
  void **arg11 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *pyObject11 = NULL ;
  PyObject *swig_obj[6] ;
  CPLErr result;
  
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject11 = NULL ) */
    arg11 = &pyObject11;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_Read", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Read" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
    if( arg6 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
    if( arg8 < 0 ) {
      SWIG_fail;
    }
  }
  res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Read" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
  {
    if (!arg10) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_Read(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg11)
    {
      resultobj = (PyObject*)*arg11;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg7);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg9);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg7);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg9);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_WriteStringArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GUIntBig *arg3 = 0 ;
  int arg4 ;
  GUIntBig *arg5 = 0 ;
  int arg6 ;
  GIntBig *arg7 = 0 ;
  GDALExtendedDataTypeHS *arg8 = 0 ;
  char **arg9 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject *swig_obj[6] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_WriteStringArray", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_WriteStringArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
    if( arg6 < 0 ) {
      SWIG_fail;
    }
  }
  res8 = SWIG_ConvertPtr(swig_obj[4], &argp8,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MDArray_WriteStringArray" "', argument " "8"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8);
  {
    /* %typemap(in) char **dict */
    arg9 = NULL;
    if ( PySequence_Check( swig_obj[5] ) ) {
      int bErr = FALSE;
      arg9 = CSLFromPySequence(swig_obj[5], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[5] ) ) {
      int bErr = FALSE;
      arg9 = CSLFromPyMapping(swig_obj[5], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    if (!arg8) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_WriteStringArray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg7);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg9 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg7);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg9 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_Write(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GUIntBig *arg3 = 0 ;
  int arg4 ;
  GUIntBig *arg5 = 0 ;
  int arg6 ;
  GIntBig *arg7 = 0 ;
  int arg8 ;
  GIntBig *arg9 = 0 ;
  GDALExtendedDataTypeHS *arg10 = 0 ;
  GIntBig arg11 ;
  char *arg12 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int alloc11 = 0 ;
  bool viewIsValid11 = false ;
  Py_buffer view11 ;
  PyObject *swig_obj[7] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_Write", 7, 7, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Write" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
    if( arg6 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
    if( arg8 < 0 ) {
      SWIG_fail;
    }
  }
  res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Write" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
  {
    /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrGIntBigSize(swig_obj[6], &arg11, &ptr, &alloc11, &viewIsValid11, &view11) ) {
      SWIG_fail;
    }
    arg12 = (char *)ptr;
  }
  {
    if (!arg10) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_Write(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,SWIG_STD_MOVE(arg11),arg12);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg7);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg9);
  }
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid11 ) {
      PyBuffer_Release(&view11);
    }
    else if( alloc11 == SWIG_NEWOBJ ) {
      delete[] arg12;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg7);
  }
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg9);
  }
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid11 ) {
      PyBuffer_Release(&view11);
    }
    else if( alloc11 == SWIG_NEWOBJ ) {
      delete[] arg12;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_AdviseRead(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GUIntBig *arg3 = 0 ;
  int arg4 ;
  GUIntBig *arg5 = 0 ;
  char **arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_AdviseRead", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AdviseRead" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetAttribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALAttributeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetAttribute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAttributeHS *)GDALMDArrayHS_GetAttribute(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetAttributes(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GDALAttributeHS ***arg2 = 0 ;
  size_t *arg3 = 0 ;
  char **arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDALAttributeHS **attrs2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    arg2 = &attrs2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttributes" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetAttributes(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALAttributeHS */
      (*arg2)[i] = NULL;
    }
  }
  {
    /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    GDALReleaseAttributes(*arg2, *arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
    GDALReleaseAttributes(*arg2, *arg3);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_CreateAttribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  int arg3 ;
  GUIntBig *arg4 = 0 ;
  GDALExtendedDataTypeHS *arg5 = 0 ;
  char **arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  GDALAttributeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_CreateAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MDArray_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAttributeHS *)GDALMDArrayHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_DeleteAttribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsRaw(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *pyObject2 = NULL ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
    arg2 = &pyObject2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_GetNoDataValueAsRaw(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg2)
    {
      resultobj = (PyObject*)*arg2;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetNoDataValueAsDouble(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GIntBig *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GIntBig tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetNoDataValueAsInt64(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (GIntBig *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyLong_FromLongLong( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsUInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GUIntBig *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GUIntBig tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetNoDataValueAsUInt64(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyLong_FromUnsignedLongLong( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALMDArrayHS_GetNoDataValueAsString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueDouble", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetNoDataValueDouble(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueInt64", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetNoDataValueInt64(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueUInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GUIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueUInt64", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetNoDataValueUInt64(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueString", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetNoDataValueString" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetNoDataValueString(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueRaw(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  GIntBig arg2 ;
  char *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int alloc2 = 0 ;
  bool viewIsValid2 = false ;
  Py_buffer view2 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueRaw", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
      SWIG_fail;
    }
    arg3 = (char *)ptr;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetNoDataValueRaw(arg1,SWIG_STD_MOVE(arg2),arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid2 ) {
      PyBuffer_Release(&view2);
    }
    else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
      delete[] arg3;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid2 ) {
      PyBuffer_Release(&view2);
    }
    else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
      delete[] arg3;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_DeleteNoDataValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteNoDataValue" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_DeleteNoDataValue(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetOffset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetOffset(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetOffsetStorageType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDataType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffsetStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALMDArrayHS_GetOffsetStorageType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetScale(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetScale(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetScaleStorageType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDataType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScaleStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALMDArrayHS_GetScaleStorageType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetOffset(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  double arg2 ;
  GDALDataType arg3 = GDT_Unknown ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
  };
  CPLErr result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetOffset", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetOffset" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (obj2) {
    {
      // %typemap(in) GDALDataType
      int val = 0;
      int ecode = SWIG_AsVal_int(obj2, &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
      }
      if( val < GDT_Unknown || val >= GDT_TypeCount )
      {
        SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
      }
      arg3 = static_cast<GDALDataType>(val);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetOffset(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetScale(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  double arg2 ;
  GDALDataType arg3 = GDT_Unknown ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
  };
  CPLErr result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetScale", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetScale" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (obj2) {
    {
      // %typemap(in) GDALDataType
      int val = 0;
      int ecode = SWIG_AsVal_int(obj2, &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
      }
      if( val < GDT_Unknown || val >= GDT_TypeCount )
      {
        SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
      }
      arg3 = static_cast<GDALDataType>(val);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetScale(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetUnit(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetUnit", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetUnit" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_SetUnit(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetUnit(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMDArrayHS_GetUnit(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_SetSpatialRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  OSRSpatialReferenceShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)GDALMDArrayHS_SetSpatialRef(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetSpatialRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)GDALMDArrayHS_GetSpatialRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetView(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetView", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetView" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetView" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALMDArrayHS_GetView(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_Transpose(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_Transpose", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Transpose" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALMDArrayHS_Transpose(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetUnscaled(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnscaled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALMDArrayHS_GetUnscaled(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetMask(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMask", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetMask" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALMDArrayHS_GetMask(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetGridded(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  GDALMDArrayHS *arg3 = NULL ;
  GDALMDArrayHS *arg4 = NULL ;
  char **arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"pszGridOptions",  (char *)"xArray",  (char *)"yArray",  (char *)"options",  NULL 
  };
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:MDArray_GetGridded", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetGridded" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetGridded" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MDArray_GetGridded" "', argument " "3"" of type '" "GDALMDArrayHS *""'"); 
    }
    arg3 = reinterpret_cast< GDALMDArrayHS * >(argp3);
  }
  if (obj3) {
    res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_GetGridded" "', argument " "4"" of type '" "GDALMDArrayHS *""'"); 
    }
    arg4 = reinterpret_cast< GDALMDArrayHS * >(argp4);
  }
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALMDArrayHS_GetGridded(arg1,(char const *)arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_AsClassicDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  size_t arg2 ;
  size_t arg3 ;
  GDALGroupHS *arg4 = NULL ;
  char **arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_AsClassicDataset", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AsClassicDataset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_AsClassicDataset" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_AsClassicDataset" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  if (swig_obj[3]) {
    res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_AsClassicDataset" "', argument " "4"" of type '" "GDALGroupHS *""'"); 
    }
    arg4 = reinterpret_cast< GDALGroupHS * >(argp4);
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALMDArrayHS_AsClassicDataset(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetRawBlockInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GUIntBig *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALMDArrayRawBlockInfo *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetRawBlockInfo", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetRawBlockInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayRawBlockInfo *)GDALMDArrayHS_GetRawBlockInfo(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayRawBlockInfo, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetStatistics(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  bool arg2 = FALSE ;
  bool arg3 = TRUE ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"approx_ok",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  Statistics *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_GetStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_bool(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetStatistics" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_bool(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_GetStatistics" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (Statistics *)GDALMDArrayHS_GetStatistics(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_ComputeStatistics(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  bool arg2 = FALSE ;
  GDALProgressFunc arg3 = NULL ;
  void *arg4 = NULL ;
  char **arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
  };
  Statistics *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg4 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_ComputeStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_bool(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
      {
        if( PyLong_AsLong(obj2) == 0 )
        {
          obj2 = Py_None;
        }
      }
      
      if (obj2 && obj2 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg3 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj2)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj2;
          arg3 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj3) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj3 ;
    }
  }
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (Statistics *)GDALMDArrayHS_ComputeStatistics(arg1,arg2,SWIG_STD_MOVE(arg3),arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetResampled(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  int arg2 ;
  GDALDimensionHS **arg3 = 0 ;
  GDALRIOResampleAlg arg4 ;
  OSRSpatialReferenceShadow **arg5 = 0 ;
  char **arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  OSRSpatialReferenceShadow *val5 ;
  PyObject *swig_obj[5] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetResampled", 4, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetResampled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALDimensionHS**) VSIMalloc(arg2*sizeof(GDALDimensionHS*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALDimensionHS* rawobjectpointer = NULL;
      if( o != Py_None )
      {
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
        if (!rawobjectpointer) {
          Py_DECREF(o);
          PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
          SWIG_fail;
        }
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    // %typemap(in) GDALRIOResampleAlg
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[2], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
    }
    if( val < 0 ||
      ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
        val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
      val > static_cast<int>(GRIORA_LAST) )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
    }
    arg4 = static_cast< GDALRIOResampleAlg >(val);
  }
  {
    /* %typemap(in) (OSRSpatialReferenceShadow** optional_OSRSpatialReferenceShadow) */
    if ( swig_obj[3] == Py_None ) {
      arg5 = NULL;
    }
    else {
      void* argp = NULL;
      int res = SWIG_ConvertPtr(swig_obj[3], &argp, SWIGTYPE_p_OSRSpatialReferenceShadow,  0  | 0);
      if (!SWIG_IsOK(res)) {
        SWIG_exception_fail(SWIG_ArgError(res), "argument of type != OSRSpatialReferenceShadow");
      }
      val5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp);
      arg5 = &val5;
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALMDArrayHS_GetResampled(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_GetMeshGrid(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GDALMDArrayHS **arg2 = 0 ;
  GDALMDArrayHS ***arg3 = 0 ;
  size_t *arg4 = 0 ;
  char **arg5 = 0 ;
  GDALMDArrayHS **arrays3 = 0 ;
  size_t nCount3 = 0 ;
  PyObject *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    arg3 = &arrays3;
    arg4 = &nCount3;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMeshGrid", 1, 2, swig_obj)) SWIG_fail;
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
    if ( !PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg1 = (int)size;
    arg2 = (GDALMDArrayHS**) VSIMalloc(arg1*sizeof(GDALMDArrayHS*));
    if( !arg2) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg1; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      GDALMDArrayHS* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
        SWIG_fail;
      }
      arg2[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMDArrayHS_GetMeshGrid(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg4 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg4; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg3)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALMDArrayHS */
      (*arg3)[i] = NULL;
    }
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
    CPLFree( arg2 );
  }
  {
    /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    GDALReleaseArrays(*arg3, *arg4);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
    CPLFree( arg2 );
  }
  {
    /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
    GDALReleaseArrays(*arg3, *arg4);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_Cache(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char **arg2 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_Cache", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Cache" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALMDArrayHS_Cache(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_MDArray_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMDArrayHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MDArray_Rename", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Rename" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_Rename" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMDArrayHS_Rename(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *MDArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_Attribute(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALAttributeHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAttributeHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_GetFullName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetFullName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAttributeHS_GetFullName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_GetTotalElementsCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GUIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetTotalElementsCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALAttributeHS_GetTotalElementsCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromUnsignedLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_GetDimensionCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALAttributeHS_GetDimensionCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_GetDimensionsSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  GUIntBig **arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GUIntBig *vals2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
    arg2 = &vals2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionsSize" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAttributeHS_GetDimensionsSize(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      char szTmp[32];
      snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
      PyObject *o = PyLong_FromString(szTmp, NULL, 10);
      PyList_SetItem(resultobj, i, o );
    }
  }
  {
    /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_GetDataType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDataType" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALAttributeHS_GetDataType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsRaw(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *pyObject2 = NULL ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
    arg2 = &pyObject2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_ReadAsRaw(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg2)
    {
      resultobj = (PyObject*)*arg2;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAttributeHS_ReadAsString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAttributeHS_ReadAsInt(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  long long result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (long long)GDALAttributeHS_ReadAsInt64(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_long_SS_long(static_cast< long long >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDALAttributeHS_ReadAsDouble(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsStringArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAttributeHS_ReadAsStringArray(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsIntArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  int **arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int *vals2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (int** pvals, size_t* pnCount) */
    arg2 = &vals2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAttributeHS_ReadAsIntArray(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int** pvals, size_t* pnCount) */
    PyObject *list = CreateTupleFromIntArray(*arg2, *arg3);
    Py_DECREF(resultobj);
    resultobj = list;
  }
  {
    /* %typemap(freearg) (int** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64Array(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  long long **arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long *vals2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (long long** pvals, size_t* pnCount) */
    arg2 = &vals2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAttributeHS_ReadAsInt64Array(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int** pvals, size_t* pnCount) */
    PyObject *list = CreateTupleFromInt64Array(*arg2, *arg3);
    Py_DECREF(resultobj);
    resultobj = list;
  }
  {
    /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_ReadAsDoubleArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  double **arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double *vals2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double** pvals, size_t* pnCount) */
    arg2 = &vals2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAttributeHS_ReadAsDoubleArray(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double** pvals, size_t* pnCount) */
    PyObject *list = CreateTupleFromDoubleArray(*arg2, *arg3);
    Py_DECREF(resultobj);
    resultobj = list;
  }
  {
    /* %typemap(freearg) (double** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (double** pvals, size_t* pnCount) */
    CPLFree(*arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteRaw(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  GIntBig arg2 ;
  char *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int alloc2 = 0 ;
  bool viewIsValid2 = false ;
  Py_buffer view2 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteRaw", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
      SWIG_fail;
    }
    arg3 = (char *)ptr;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteRaw(arg1,SWIG_STD_MOVE(arg2),arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid2 ) {
      PyBuffer_Release(&view2);
    }
    else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
      delete[] arg3;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid2 ) {
      PyBuffer_Release(&view2);
    }
    else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
      delete[] arg3;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteString", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_WriteString" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteString(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteStringArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteStringArray", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteStringArray(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteInt(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteInt(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  long long arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt64" "', argument " "2"" of type '" "long long""'");
  } 
  arg2 = static_cast< long long >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteInt64(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDouble", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteDouble" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteDouble(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteIntArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  int arg2 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteIntArray", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteIntArray(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteInt64Array(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  int arg2 ;
  long long *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64Array", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, long long* pList)*/
    arg3 = CreateCInt64ListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteInt64Array(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, long long* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, long long* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_WriteDoubleArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  int arg2 ;
  double *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDoubleArray", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_WriteDoubleArray(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Attribute_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAttributeHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Attribute_Rename", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_Rename" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_Rename" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALAttributeHS_Rename(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *Attribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALAttributeHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_Dimension(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dimension" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALDimensionHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDimensionHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_GetFullName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetFullName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDimensionHS_GetFullName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_GetType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetType" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDimensionHS_GetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_GetDirection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetDirection" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDimensionHS_GetDirection(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_GetSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GUIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetSize" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALDimensionHS_GetSize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromUnsignedLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_GetIndexingVariable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALDimensionHS_GetIndexingVariable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_SetIndexingVariable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  GDALMDArrayHS *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dimension_SetIndexingVariable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_SetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_SetIndexingVariable" "', argument " "2"" of type '" "GDALMDArrayHS *""'"); 
  }
  arg2 = reinterpret_cast< GDALMDArrayHS * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALDimensionHS_SetIndexingVariable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Dimension_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDimensionHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Dimension_Rename", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_Rename" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_Rename" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALDimensionHS_Rename(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *Dimension_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALDimensionHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ExtendedDataType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExtendedDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALExtendedDataTypeHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_Create(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  PyObject *swig_obj[1] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_Create(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  size_t arg1 = 0 ;
  GDALExtendedDataTypeSubType arg2 = GEDTST_NONE ;
  size_t val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateString", 0, 2, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ExtendedDataType_CreateString" "', argument " "1"" of type '" "size_t""'");
    } 
    arg1 = static_cast< size_t >(val1);
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateString" "', argument " "2"" of type '" "GDALExtendedDataTypeSubType""'");
    } 
    arg2 = static_cast< GDALExtendedDataTypeSubType >(val2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateString(SWIG_STD_MOVE(arg1),arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateCompound(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  size_t arg2 ;
  int arg3 ;
  GDALEDTComponentHS **arg4 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateCompound", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CreateCompound" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateCompound" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALEDTComponentHS *optional_##GDALEDTComponentHS)*/
    if ( !PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALEDTComponentHS*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (GDALEDTComponentHS**) VSIMalloc(arg3*sizeof(GDALEDTComponentHS*));
    if( !arg4) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[2],i);
      GDALEDTComponentHS* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALEDTComponentHS");
        SWIG_fail;
      }
      arg4[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateCompound((char const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
    CPLFree( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
    CPLFree( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetName" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALExtendedDataTypeHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetClass(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALExtendedDataTypeClass result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetClass" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeClass)GDALExtendedDataTypeHS_GetClass(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetNumericDataType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDataType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetNumericDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALExtendedDataTypeHS_GetNumericDataType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSize" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALExtendedDataTypeHS_GetSize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetMaxStringLength(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetMaxStringLength" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALExtendedDataTypeHS_GetMaxStringLength(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSubType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALExtendedDataTypeSubType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSubType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeSubType)GDALExtendedDataTypeHS_GetSubType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetRAT(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRasterAttributeTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetRAT" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterAttributeTableShadow *)GDALExtendedDataTypeHS_GetRAT(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_GetComponents(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  GDALEDTComponentHS ***arg2 = 0 ;
  size_t *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GDALEDTComponentHS **comps2 = 0 ;
  size_t nCount2 = 0 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
    arg2 = &comps2;
    arg3 = &nCount2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetComponents" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALExtendedDataTypeHS_GetComponents(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
    Py_DECREF(resultobj);
    resultobj = PyList_New( *arg3 );
    if( !resultobj ) {
      SWIG_fail;
    }
    for( size_t i = 0; i < *arg3; i++ ) {
      PyList_SetItem(resultobj, i,
        SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALEDTComponentHS,SWIG_POINTER_OWN) );
      /* We have borrowed the GDALEDTComponentHS */
      (*arg2)[i] = NULL;
    }
  }
  {
    /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
    GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
    GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_CanConvertTo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  GDALExtendedDataTypeHS *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CanConvertTo", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALExtendedDataTypeHS_CanConvertTo(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ExtendedDataType_Equals(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALExtendedDataTypeHS *arg1 = 0 ;
  GDALExtendedDataTypeHS *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_Equals", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_Equals" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_Equals" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALExtendedDataTypeHS_Equals(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ExtendedDataType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_EDTComponent(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALEDTComponentHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EDTComponent" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALEDTComponentHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_EDTComponent_Create(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  size_t arg2 ;
  GDALExtendedDataTypeHS *arg3 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALEDTComponentHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "EDTComponent_Create", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_Create" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EDTComponent_Create" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EDTComponent_Create" "', argument " "3"" of type '" "GDALExtendedDataTypeHS *""'"); 
  }
  arg3 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp3);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALEDTComponentHS *)GDALEDTComponentHS_Create((char const *)arg1,SWIG_STD_MOVE(arg2),arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_EDTComponent_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALEDTComponentHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetName" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALEDTComponentHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_EDTComponent_GetOffset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALEDTComponentHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetOffset" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = GDALEDTComponentHS_GetOffset(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_EDTComponent_GetType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALEDTComponentHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALExtendedDataTypeHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetType" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALExtendedDataTypeHS *)GDALEDTComponentHS_GetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *EDTComponent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALEDTComponentHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CreateRasterAttributeTableFromMDArrays(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRATTableType arg1 ;
  int arg2 ;
  GDALMDArrayHS **arg3 = 0 ;
  int arg4 = 0 ;
  GDALRATFieldUsage *arg5 = NULL ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[3] ;
  GDALRasterAttributeTableShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreateRasterAttributeTableFromMDArrays", 2, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateRasterAttributeTableFromMDArrays" "', argument " "1"" of type '" "GDALRATTableType""'");
  } 
  arg1 = static_cast< GDALRATTableType >(val1);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALMDArrayHS**) VSIMalloc(arg2*sizeof(GDALMDArrayHS*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALMDArrayHS* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  if (swig_obj[2]) {
    {
      /*  %typemap(in) (int nUsages, GDALRATFieldUsage *paeUsages)*/
      if ( !PySequence_Check(swig_obj[2]) ) {
        PyErr_SetString(PyExc_TypeError, "not a sequence");
        SWIG_fail;
      }
      Py_ssize_t size = PySequence_Size(swig_obj[2]);
      if( size > (Py_ssize_t)INT_MAX ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      if( (size_t)size > SIZE_MAX / sizeof(int) ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      arg4 = (int)size;
      arg5 = (GDALRATFieldUsage*) VSIMalloc(arg4*sizeof(GDALRATFieldUsage));
      if( !arg5) {
        PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
        SWIG_fail;
      }
      
      for( int i = 0; i<arg4; i++ ) {
        PyObject *o = PySequence_GetItem(swig_obj[2],i);
        int nVal = 0;
        if ( !PyArg_Parse(o,"i",&nVal) ) {
          PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
          Py_DECREF(o);
          SWIG_fail;
        }
        Py_DECREF(o);
        if( nVal < 0 || nVal >= GFU_MaxCount )
        {
          PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
          SWIG_fail;
        }
        (arg5)[i] = static_cast<GDALRATFieldUsage>(nVal);
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterAttributeTableShadow *)CreateRasterAttributeTableFromMDArrays(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
    CPLFree( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
    CPLFree( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_XSize_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_YSize_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDataType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALRasterBandShadow_GetDataset(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_GetBand(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int temp2 ;
  int res2 = SWIG_TMPOBJ ;
  int temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (ReturnSame(SWIG_IsTmpObj(res2))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)), 1);
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags), 1);
  }
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)), 1);
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags), 1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetActualBlockSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = 0 ;
  int *arg5 = 0 ;
  int *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int nxvalid4 = 0 ;
  int nyvalid4 = 0 ;
  int isvalid4 = 0 ;
  PyObject *swig_obj[3] ;
  
  {
    /* %typemap(in) (int *pnxvalid, int *pnyvalid, int* pisvalid) */
    arg4 = &nxvalid4;
    arg5 = &nyvalid4;
    arg6 = &isvalid4;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_GetActualBlockSize", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetActualBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetActualBlockSize" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetActualBlockSize" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetActualBlockSize(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *pnxvalid, int *pnyvalid, int* pisvalid)  */
    PyObject *r;
    if ( !*arg6 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyTuple_New( 2 );
      PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
      PyTuple_SetItem( r, 1, PyLong_FromLong(*arg5) );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALColorInterp result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALColorInterp result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALColorInterp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
  } 
  arg2 = static_cast< GDALColorInterp >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALColorInterp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
  } 
  arg2 = static_cast< GDALColorInterp >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GIntBig *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GIntBig tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetNoDataValueAsInt64(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (GIntBig *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyLong_FromLongLong( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsUInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GUIntBig *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  GUIntBig tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetNoDataValueAsUInt64(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyLong_FromUnsignedLongLong( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValue", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsInt64", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsInt64(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsUInt64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GUIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsUInt64", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsUInt64(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_DeleteNoDataValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DeleteNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_DeleteNoDataValue(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetUnitType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterCategoryNames", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tmpval2 ;
  int tmphasval2 ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
    arg2 = &tmpval2;
    arg3 = &tmphasval2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(python,argout) (double *val, int *hasval) */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = PyFloat_FromDouble( *arg2 );
    }
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetOffset", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetScale", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = 0 ;
  double *arg5 = 0 ;
  double *arg6 = 0 ;
  double *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  double temp7 ;
  int res7 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_GetStatistics", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) IF_ERROR_RETURN_NONE */
  }
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res7))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags), 0);
  }
  {
    /* %typemap(ret) IF_ERROR_RETURN_NONE */
    if (result != CE_None ) {
      Py_XDECREF( resultobj );
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  bool arg2 ;
  double *arg3 = 0 ;
  double *arg4 = 0 ;
  double *arg5 = 0 ;
  double *arg6 = 0 ;
  GDALProgressFunc arg7 = NULL ;
  void *arg8 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  CPLErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg8 = psProgressInfo;
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Band_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (obj2) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
      {
        if( PyLong_AsLong(obj2) == 0 )
        {
          obj2 = Py_None;
        }
      }
      
      if (obj2 && obj2 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg7 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj2)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj2;
          arg7 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj3) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj3 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,SWIG_STD_MOVE(arg7),arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) IF_ERROR_RETURN_NONE */
  }
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags), 0);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) IF_ERROR_RETURN_NONE */
    if (result != CE_None ) {
      Py_XDECREF( resultobj );
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetStatistics", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_GetOverview", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetSampleOverview(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GUIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_GetSampleOverview", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetSampleOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetSampleOverview(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 = 0 ;
  int arg3 = 0 ;
  int *arg4 = 0 ;
  int *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int val5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  NULL 
  };
  int result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Band_Checksum", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  if (obj3) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj3 == Py_None ) {
        arg4 = 0;
      }
      else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
        arg4 = (int *) &val4;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj4 == Py_None ) {
        arg5 = 0;
      }
      else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
        arg5 = (int *) &val5;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  int *arg3 = 0 ;
  bool arg4 = false ;
  bool arg5 = false ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[2] ;
  int isvalid2 ;
  bool val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"approx_ok",  (char *)"can_return_none",  NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (double argout2[2], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Band_ComputeRasterMinMax", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  if (obj1) {
    ecode4 = SWIG_AsVal_bool(obj1, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ComputeRasterMinMax" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
  }
  if (obj2) {
    ecode5 = SWIG_AsVal_bool(obj2, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ComputeRasterMinMax" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[2], int* isvalid)  */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = CreateTupleFromDoubleArray(arg2, 2);
    }
#if 0x040401 >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  int arg3 = 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[2] ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_ComputeBandStats", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  if (swig_obj[1]) {
    ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 = 0.0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_Fill", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  GIntBig arg6 ;
  char *arg7 = 0 ;
  int *arg8 = 0 ;
  int *arg9 = 0 ;
  GDALDataType *arg10 = 0 ;
  GIntBig *arg11 = 0 ;
  GIntBig *arg12 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int alloc6 = 0 ;
  bool viewIsValid6 = false ;
  Py_buffer view6 ;
  int val8 ;
  int val9 ;
  GDALDataType val10 ;
  GIntBig val11 ;
  GIntBig val12 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_len",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  NULL 
  };
  CPLErr result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOO:Band_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
      SWIG_fail;
    }
    arg7 = (char *)ptr;
  }
  if (obj6) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj6 == Py_None ) {
        arg8 = 0;
      }
      else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
        arg8 = (int *) &val8;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj7) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj7 == Py_None ) {
        arg9 = 0;
      }
      else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
        arg9 = (int *) &val9;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj8) {
    {
      /* %typemap(in) (GDALDataType *optional_GDALDataType) */
      int intval = 0;
      if ( obj8 == Py_None ) {
        arg10 = NULL;
      }
      else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
        if( intval < GDT_Unknown || intval >= GDT_TypeCount )
        {
          SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
        }
        val10 = static_cast<GDALDataType>(intval);
        arg10 = &val10;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj9) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj9 == Py_None ) {
        arg11 = 0;
      }
      else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
        arg11 = (GIntBig *) &val11;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj10) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj10 == Py_None ) {
        arg12 = 0;
      }
      else if ( PyArg_Parse( obj10,"L" ,&val12 ) ) {
        arg12 = (GIntBig *) &val12;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7,arg8,arg9,arg10,arg11,arg12);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid6 ) {
      PyBuffer_Release(&view6);
    }
    else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
      delete[] arg7;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
    if( viewIsValid6 ) {
      PyBuffer_Release(&view6);
    }
    else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
      delete[] arg7;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow_FlushCache(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALColorTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALColorTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALColorTableShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALColorTableShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetColorTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRasterAttributeTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterAttributeTableShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultRAT", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_IsMaskBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IsMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALRasterBandShadow_IsMaskBand(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 = -0.5 ;
  double arg3 = 255.5 ;
  int arg4 = 256 ;
  GUIntBig *arg5 = NULL ;
  int arg6 = 0 ;
  int arg7 = 1 ;
  GDALProgressFunc arg8 = NULL ;
  void *arg9 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"min",  (char *)"max",  (char *)"buckets",  (char *)"include_out_of_range",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  CPLErr result;
  
  {
    /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
    arg5 = (GUIntBig *) VSICalloc(sizeof(GUIntBig),arg4);
  }
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg9 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_double(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_double(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
  }
  if (obj3) {
    {
      /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
      int requested_buckets = 0;
      CPL_IGNORE_RET_VAL(SWIG_AsVal_int(obj3, &requested_buckets));
      if( requested_buckets != arg4 )
      {
        arg4 = requested_buckets;
        if (requested_buckets <= 0 || (size_t)requested_buckets > SIZE_MAX / sizeof(GUIntBig))
        {
          PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
          SWIG_fail;
        }
        void* tmp = VSIRealloc(arg5, sizeof(GUIntBig) * requested_buckets);
        if( !tmp) {
          PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
          SWIG_fail;
        }
        arg5 = (GUIntBig *)tmp;
      }
      if (arg5 == NULL)
      {
        PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    ecode6 = SWIG_AsVal_int(obj4, &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
    } 
    arg6 = static_cast< int >(val6);
  }
  if (obj5) {
    ecode7 = SWIG_AsVal_int(obj5, &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
    } 
    arg7 = static_cast< int >(val7);
  }
  if (obj6) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
      {
        if( PyLong_AsLong(obj6) == 0 )
        {
          obj6 = Py_None;
        }
      }
      
      if (obj6 && obj6 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg8 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj6)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj6;
          arg8 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj7) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj7 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,SWIG_STD_MOVE(arg8),arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(out) int buckets, GUIntBig* panHistogram -> list */
    GUIntBig *integerarray = arg5;
    Py_DECREF( resultobj );
    if ( integerarray == NULL ) {
      resultobj = Py_None;
      Py_INCREF( resultobj );
    }
    else {
      resultobj = PyList_New( arg4 );
      if( !resultobj ) {
        SWIG_fail;
      }
      for ( int i = 0; i < arg4; ++i ) {
        char szTmp[32];
        snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, integerarray[i]);
        PyObject *o = PyLong_FromString(szTmp, NULL, 10);
        PyList_SetItem(resultobj, i, o );
      }
    }
  }
  {
    /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
    VSIFree( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
    VSIFree( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = NULL ;
  double *arg3 = NULL ;
  int *arg4 = NULL ;
  GUIntBig **arg5 = NULL ;
  int arg6 = 1 ;
  GDALProgressFunc arg7 = NULL ;
  void *arg8 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  double val3 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"min_ret",  (char *)"max_ret",  (char *)"buckets_ret",  (char *)"ppanHistogram",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  CPLErr result;
  
  double min_val = 0.0, max_val = 0.0;
  int buckets_val = 0;
  GUIntBig *panHistogram = NULL;
  
  arg2 = &min_val;
  arg3 = &max_val;
  arg4 = &buckets_val;
  arg5 = &panHistogram;
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg8 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetDefaultHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) (double *optional_##double) */
      if ( obj1 == Py_None ) {
        arg2 = 0;
      }
      else if ( PyArg_Parse( obj1,"d" ,&val2 ) ) {
        arg2 = (double *) &val2;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj2) {
    {
      /* %typemap(in) (double *optional_##double) */
      if ( obj2 == Py_None ) {
        arg3 = 0;
      }
      else if ( PyArg_Parse( obj2,"d" ,&val3 ) ) {
        arg3 = (double *) &val3;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
    }
    arg4 = reinterpret_cast< int * >(argp4);
  }
  if (obj4) {
    res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_GUIntBig, 0 |  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "GUIntBig **""'"); 
    }
    arg5 = reinterpret_cast< GUIntBig ** >(argp5);
  }
  if (obj5) {
    ecode6 = SWIG_AsVal_int(obj5, &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
    } 
    arg6 = static_cast< int >(val6);
  }
  if (obj6) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
      {
        if( PyLong_AsLong(obj6) == 0 )
        {
          obj6 = Py_None;
        }
      }
      
      if (obj6 && obj6 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg7 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj6)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj6;
          arg7 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj7) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj7 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,SWIG_STD_MOVE(arg7),arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    int i;
    PyObject *psList = NULL;
    
    Py_XDECREF(resultobj);
    
    if (panHistogram)
    {
      psList = PyList_New(buckets_val);
      if( !psList ) {
        SWIG_fail;
      }
      for( i = 0; i < buckets_val; i++ )
      PyList_SetItem(psList, i, Py_BuildValue("K", panHistogram[i] ));
      
      CPLFree( panHistogram );
      
      resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
      Py_XDECREF(psList);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  GUIntBig *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultHistogram", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
    arg5 = CreateCGUIntBigListFromSequence(swig_obj[3], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GUIntBig* pList) */
    free(arg5);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_SetCategoryNames", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetVirtualMem(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRWFlag arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  GDALDataType arg9 ;
  size_t arg10 ;
  size_t arg11 ;
  char **arg12 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  size_t val10 ;
  int ecode10 = 0 ;
  size_t val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nBufXSize",  (char *)"nBufYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"nPageSizeHint",  (char *)"options",  NULL 
  };
  CPLVirtualMemShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOO|O:Band_GetVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
  } 
  arg2 = static_cast< GDALRWFlag >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetVirtualMem" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetVirtualMem" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetVirtualMem" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetVirtualMem" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetVirtualMem" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetVirtualMem" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(obj8, &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg9 = static_cast<GDALDataType>(val);
  }
  ecode10 = SWIG_AsVal_size_t(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetVirtualMem" "', argument " "10"" of type '" "size_t""'");
  } 
  arg10 = static_cast< size_t >(val10);
  ecode11 = SWIG_AsVal_size_t(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Band_GetVirtualMem" "', argument " "11"" of type '" "size_t""'");
  } 
  arg11 = static_cast< size_t >(val11);
  if (obj11) {
    {
      /* %typemap(in) char **dict */
      arg12 = NULL;
      if ( PySequence_Check( obj11 ) ) {
        int bErr = FALSE;
        arg12 = CSLFromPySequence(obj11, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj11 ) ) {
        int bErr = FALSE;
        arg12 = CSLFromPyMapping(obj11, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,SWIG_STD_MOVE(arg10),SWIG_STD_MOVE(arg11),arg12);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg12 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg12 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetVirtualMemAuto(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRWFlag arg2 ;
  char **arg3 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"eRWFlag",  (char *)"options",  NULL 
  };
  CPLVirtualMemShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Band_GetVirtualMemAuto", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMemAuto" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMemAuto" "', argument " "2"" of type '" "GDALRWFlag""'");
  } 
  arg2 = static_cast< GDALRWFlag >(val2);
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMemAuto(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetTiledVirtualMem(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRWFlag arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  GDALDataType arg9 ;
  size_t arg10 ;
  char **arg11 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  size_t val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"options",  NULL 
  };
  CPLVirtualMemShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO|O:Band_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
  } 
  arg2 = static_cast< GDALRWFlag >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(obj8, &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg9 = static_cast<GDALDataType>(val);
  }
  ecode10 = SWIG_AsVal_size_t(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetTiledVirtualMem" "', argument " "10"" of type '" "size_t""'");
  } 
  arg10 = static_cast< size_t >(val10);
  if (obj10) {
    {
      /* %typemap(in) char **dict */
      arg11 = NULL;
      if ( PySequence_Check( obj10 ) ) {
        int bErr = FALSE;
        arg11 = CSLFromPySequence(obj10, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj10 ) ) {
        int bErr = FALSE;
        arg11 = CSLFromPyMapping(obj10, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,SWIG_STD_MOVE(arg10),arg11);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg11 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg11 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_GetDataCoverageStatus(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 = 0 ;
  double *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double temp7 ;
  int res7 = SWIG_TMPOBJ ;
  PyObject *swig_obj[6] ;
  int result;
  
  arg7 = &temp7;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_GetDataCoverageStatus", 5, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataCoverageStatus" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetDataCoverageStatus" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetDataCoverageStatus" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetDataCoverageStatus" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetDataCoverageStatus" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  if (swig_obj[5]) {
    ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDataCoverageStatus" "', argument " "6"" of type '" "int""'");
    } 
    arg6 = static_cast< int >(val6);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALRasterBandShadow_GetDataCoverageStatus(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (ReturnSame(SWIG_IsTmpObj(res7))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags), 0);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_AdviseRead(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int *arg6 = 0 ;
  int *arg7 = 0 ;
  GDALDataType *arg8 = 0 ;
  char **arg9 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int val8 ;
  PyObject *swig_obj[9] ;
  CPLErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_AdviseRead", 5, 9, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AdviseRead" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_AdviseRead" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_AdviseRead" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_AdviseRead" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_AdviseRead" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  if (swig_obj[5]) {
    res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Band_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
    }
    arg6 = reinterpret_cast< int * >(argp6);
  }
  if (swig_obj[6]) {
    res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Band_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
    }
    arg7 = reinterpret_cast< int * >(argp7);
  }
  if (swig_obj[7]) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( swig_obj[7] == Py_None ) {
        arg8 = 0;
      }
      else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
        arg8 = (GDALDataType *) &val8;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (swig_obj[8]) {
    {
      /* %typemap(in) char **dict */
      arg9 = NULL;
      if ( PySequence_Check( swig_obj[8] ) ) {
        int bErr = FALSE;
        arg9 = CSLFromPySequence(swig_obj[8], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[8] ) ) {
        int bErr = FALSE;
        arg9 = CSLFromPyMapping(swig_obj[8], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg9 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg9 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_InterpolateAtPoint(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  GDALRIOResampleAlg arg4 ;
  double *arg5 = 0 ;
  double *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  CPLErr result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtPoint", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtPoint" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtPoint" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtPoint" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    // %typemap(in) GDALRIOResampleAlg
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[3], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
    }
    if( val < 0 ||
      ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
        val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
      val > static_cast<int>(GRIORA_LAST) )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
    }
    arg4 = static_cast< GDALRIOResampleAlg >(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_InterpolateAtPoint(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags), 0);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_InterpolateAtGeolocation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  OSRSpatialReferenceShadow *arg4 = 0 ;
  GDALRIOResampleAlg arg5 ;
  double *arg6 = 0 ;
  double *arg7 = 0 ;
  char **arg8 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  double temp7 ;
  int res7 = SWIG_TMPOBJ ;
  PyObject *swig_obj[6] ;
  CPLErr result;
  
  arg6 = &temp6;
  arg7 = &temp7;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtGeolocation", 5, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtGeolocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtGeolocation" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtGeolocation" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_InterpolateAtGeolocation" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
  {
    // %typemap(in) GDALRIOResampleAlg
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[4], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
    }
    if( val < 0 ||
      ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
        val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
      val > static_cast<int>(GRIORA_LAST) )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
    }
    arg5 = static_cast< GDALRIOResampleAlg >(val);
  }
  if (swig_obj[5]) {
    {
      /* %typemap(in) char **dict */
      arg8 = NULL;
      if ( PySequence_Check( swig_obj[5] ) ) {
        int bErr = FALSE;
        arg8 = CSLFromPySequence(swig_obj[5], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[5] ) ) {
        int bErr = FALSE;
        arg8 = CSLFromPyMapping(swig_obj[5], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_InterpolateAtGeolocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res7))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags), 0);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg8 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg8 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_ComputeMinMaxLocation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double *arg2 = 0 ;
  double *arg3 = 0 ;
  int *arg4 = 0 ;
  int *arg5 = 0 ;
  int *arg6 = 0 ;
  int *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  int temp4 ;
  int res4 = SWIG_TMPOBJ ;
  int temp5 ;
  int res5 = SWIG_TMPOBJ ;
  int temp6 ;
  int res6 = SWIG_TMPOBJ ;
  int temp7 ;
  int res7 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  CPLErr result;
  
  arg2 = &temp2;
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeMinMaxLocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_ComputeMinMaxLocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (ReturnSame(SWIG_IsTmpObj(res2))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res7))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags), 0);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_AsMDArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALMDArrayHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsMDArray" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMDArrayHS *)GDALRasterBandShadow_AsMDArray(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band__EnablePixelTypeSignedByteWarning(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band__EnablePixelTypeSignedByteWarning", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_UnaryOp(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterAlgebraUnaryOperation arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_UnaryOp", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_UnaryOp" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_UnaryOp" "', argument " "2"" of type '" "GDALRasterAlgebraUnaryOperation""'");
  } 
  arg2 = static_cast< GDALRasterAlgebraUnaryOperation >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_UnaryOp(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_BinaryOpBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterAlgebraBinaryOperation arg2 ;
  GDALRasterBandShadow *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpBand", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
  } 
  arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpBand(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_BinaryOpDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterAlgebraBinaryOperation arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDouble", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpDouble" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDouble" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
  } 
  arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_BinaryOpDouble" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDouble(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_BinaryOpDoubleToBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 ;
  GDALRasterAlgebraBinaryOperation arg2 ;
  GDALRasterBandShadow *arg3 = 0 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDoubleToBand", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
  } 
  arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDoubleToBand(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_IfThenElse(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  GDALRasterBandShadow *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_IfThenElse", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IfThenElse" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_IfThenElse" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_IfThenElse" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_IfThenElse(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_AsType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALDataType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_AsType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[1], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg2 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_AsType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_MaximumOfNBands(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GDALRasterBandShadow **arg2 = 0 ;
  PyObject *swig_obj[1] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
    if ( !PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg1 = (int)size;
    arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
    if( !arg2) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg1; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      GDALRasterBandShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
        SWIG_fail;
      }
      arg2[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaximumOfNBands(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_MaxConstant(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_MaxConstant", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MaxConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MaxConstant" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaxConstant(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_MinimumOfNBands(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GDALRasterBandShadow **arg2 = 0 ;
  PyObject *swig_obj[1] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
    if ( !PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg1 = (int)size;
    arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
    if( !arg2) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg1; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      GDALRasterBandShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
        SWIG_fail;
      }
      arg2[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinimumOfNBands(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_MinConstant(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Band_MinConstant", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MinConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MinConstant" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinConstant(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_MeanOfNBands(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  GDALRasterBandShadow **arg2 = 0 ;
  PyObject *swig_obj[1] ;
  GDALComputedRasterBandShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
    if ( !PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[0]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg1 = (int)size;
    arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
    if( !arg2) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg1; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      GDALRasterBandShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
        SWIG_fail;
      }
      arg2[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MeanOfNBands(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void **arg6 = 0 ;
  int *arg7 = 0 ;
  int *arg8 = 0 ;
  GDALDataType *arg9 = 0 ;
  GIntBig *arg10 = 0 ;
  GIntBig *arg11 = 0 ;
  GDALRIOResampleAlg arg12 = GRIORA_NearestNeighbour ;
  GDALProgressFunc arg13 = NULL ;
  void *arg14 = NULL ;
  void *arg15 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  void *pyObject6 = NULL ;
  int val7 ;
  int val8 ;
  GDALDataType val9 ;
  GIntBig val10 ;
  GIntBig val11 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  (char *)"resample_alg",  (char *)"callback",  (char *)"callback_data",  (char *)"inputOutputBuf",  NULL 
  };
  CPLErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg14 = psProgressInfo;
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
    arg6 = &pyObject6;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OOOOOOOOO:Band_ReadRaster1", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  if (obj5) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj5 == Py_None ) {
        arg7 = 0;
      }
      else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
        arg7 = (int *) &val7;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj6) {
    {
      /* %typemap(in) (int *optional_##int) */
      if ( obj6 == Py_None ) {
        arg8 = 0;
      }
      else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
        arg8 = (int *) &val8;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj7) {
    {
      /* %typemap(in) (GDALDataType *optional_GDALDataType) */
      int intval = 0;
      if ( obj7 == Py_None ) {
        arg9 = NULL;
      }
      else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
        if( intval < GDT_Unknown || intval >= GDT_TypeCount )
        {
          SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
        }
        val9 = static_cast<GDALDataType>(intval);
        arg9 = &val9;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj8) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj8 == Py_None ) {
        arg10 = 0;
      }
      else if ( PyArg_Parse( obj8,"L" ,&val10 ) ) {
        arg10 = (GIntBig *) &val10;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj9) {
    {
      /* %typemap(in) (GIntBig *optional_##GIntBig) */
      if ( obj9 == Py_None ) {
        arg11 = 0;
      }
      else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
        arg11 = (GIntBig *) &val11;
      }
      else {
        PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
        SWIG_fail;
      }
    }
  }
  if (obj10) {
    {
      // %typemap(in) GDALRIOResampleAlg
      int val = 0;
      int ecode = SWIG_AsVal_int(obj10, &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
      }
      if( val < 0 ||
        ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
          val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
        val > static_cast<int>(GRIORA_LAST) )
      {
        SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
      }
      arg12 = static_cast< GDALRIOResampleAlg >(val);
    }
  }
  if (obj11) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj11) || PyInt_Check(obj11) )
      {
        if( PyLong_AsLong(obj11) == 0 )
        {
          obj11 = Py_None;
        }
      }
      
      if (obj11 && obj11 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj11,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg13 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj11)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj11;
          arg13 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj12) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj12 ;
    }
  }
  if (obj13) {
    {
      /* %typemap(in) ( void *inPythonObject ) */
      arg15 = obj13;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,SWIG_STD_MOVE(arg13),arg14,arg15);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg6)
    {
      resultobj = (PyObject*)*arg6;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  void **arg4 = 0 ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *pyObject4 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"buf_obj",  NULL 
  };
  CPLErr result;
  
  {
    /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
    arg4 = &pyObject4;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Band_ReadBlock", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  if (obj3) {
    {
      /* %typemap(in) ( void *inPythonObject ) */
      arg5 = obj3;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) ( void **outPythonObject ) */
    Py_XDECREF(resultobj);
    if (*arg4)
    {
      resultobj = (PyObject*)*arg4;
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ComputedBand(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALComputedRasterBandShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ComputedBand" "', argument " "1"" of type '" "GDALComputedRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALComputedRasterBandShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALComputedRasterBandShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ComputedBand_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALPaletteInterp arg1 = GPI_RGB ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char * kwnames[] = {
    (char *)"palette",  NULL 
  };
  GDALColorTableShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_ColorTable", kwnames, &obj0)) SWIG_fail;
  if (obj0) {
    ecode1 = SWIG_AsVal_int(obj0, &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
    } 
    arg1 = static_cast< GDALPaletteInterp >(val1);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALColorTableShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALColorTableShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALPaletteInterp result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALColorEntry *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntry", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) GDALColorEntry* */
    if ( result != NULL )
    resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
    else
    resultobj = NULL;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  int arg2 ;
  GDALColorEntry *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  GDALColorEntry ce3 ;
  PyObject *swig_obj[3] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntryAsRGB", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) GDALColorEntry* */
    ce3.c4 = 255;
    if (! PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg3 = &ce3;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  int arg2 ;
  GDALColorEntry *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  GDALColorEntry ce3 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorTable_SetColorEntry", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) GDALColorEntry* */
    ce3.c4 = 255;
    if (! PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg3 = &ce3;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorTableShadow *arg1 = 0 ;
  int arg2 ;
  GDALColorEntry *arg3 = 0 ;
  int arg4 ;
  GDALColorEntry *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  GDALColorEntry ce3 ;
  int val4 ;
  int ecode4 = 0 ;
  GDALColorEntry ce5 ;
  PyObject *swig_obj[5] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ColorTable_CreateColorRamp", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) GDALColorEntry* */
    ce3.c4 = 255;
    if (! PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg3 = &ce3;
  }
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    /* %typemap(in) GDALColorEntry* */
    ce5.c4 = 255;
    if (! PySequence_Check(swig_obj[4]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[4]);
    if ( size > 4 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
      SWIG_fail;
    }
    if ( size < 3 ) {
      PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
      SWIG_fail;
    }
    if ( !PyArg_ParseTuple( swig_obj[4],"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
      PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
      SWIG_fail;
    }
    arg5 = &ce5;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ColorTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_SubdatasetInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALSubdatasetInfoShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SubdatasetInfo" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALSubdatasetInfoShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetPathComponent(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALSubdatasetInfoShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetPathComponent(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetSubdatasetComponent(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALSubdatasetInfoShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetSubdatasetComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetSubdatasetComponent(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SubdatasetInfo_ModifyPathComponent(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALSubdatasetInfoShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SubdatasetInfo_ModifyPathComponent", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_ModifyPathComponent(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *SubdatasetInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALSubdatasetInfo, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_GetSubdatasetInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALSubdatasetInfoShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSubdatasetInfo" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALSubdatasetInfoShadow *)GetSubdatasetInfo((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Relationship(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  GDALRelationshipCardinality arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  GDALRelationshipShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_Relationship", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Relationship" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Relationship" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Relationship" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Relationship" "', argument " "4"" of type '" "GDALRelationshipCardinality""'");
  } 
  arg4 = static_cast< GDALRelationshipCardinality >(val4);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRelationshipShadow *)new_GDALRelationshipShadow((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Relationship(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Relationship" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALRelationshipShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetCardinality(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRelationshipCardinality result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetCardinality" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRelationshipCardinality)GDALRelationshipShadow_GetCardinality(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetLeftTableName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetRightTableName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetRightTableName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetMappingTableName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetMappingTableName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetMappingTableName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *str2 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetMappingTableName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) (tostring argin) */
    str2 = PyObject_Str( swig_obj[1] );
    if ( str2 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetMappingTableName(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALRelationshipShadow_GetLeftTableFields(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetRightTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALRelationshipShadow_GetRightTableFields(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetLeftTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftTableFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetLeftTableFields(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetRightTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightTableFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetRightTableFields(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetLeftMappingTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALRelationshipShadow_GetLeftMappingTableFields(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetRightMappingTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALRelationshipShadow_GetRightMappingTableFields(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetLeftMappingTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetLeftMappingTableFields(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetRightMappingTableFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetRightMappingTableFields(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRelationshipType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRelationshipType)GDALRelationshipShadow_GetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  GDALRelationshipType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Relationship_SetType" "', argument " "2"" of type '" "GDALRelationshipType""'");
  } 
  arg2 = static_cast< GDALRelationshipType >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetForwardPathLabel(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetForwardPathLabel(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetForwardPathLabel(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *str2 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetForwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) (tostring argin) */
    str2 = PyObject_Str( swig_obj[1] );
    if ( str2 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetForwardPathLabel(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetBackwardPathLabel(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetBackwardPathLabel(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetBackwardPathLabel(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *str2 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetBackwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) (tostring argin) */
    str2 = PyObject_Str( swig_obj[1] );
    if ( str2 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetBackwardPathLabel(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_GetRelatedTableType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALRelationshipShadow_GetRelatedTableType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Relationship_SetRelatedTableType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRelationshipShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *str2 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRelatedTableType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
  {
    /* %typemap(in) (tostring argin) */
    str2 = PyObject_Str( swig_obj[1] );
    if ( str2 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALRelationshipShadow_SetRelatedTableType(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str2 != NULL)
    {
      Py_DECREF(str2);
    }
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *Relationship_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALRelationshipShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Relationship_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 ;
  char *arg2 = (char *)NULL ;
  void *arg3 = NULL ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
  };
  int result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  GDALRasterBandShadow *arg3 = 0 ;
  int arg4 ;
  GDALColorTableShadow *arg5 = 0 ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"num_colors",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:ComputeMedianCutPCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  GDALRasterBandShadow *arg3 = 0 ;
  GDALRasterBandShadow *arg4 = 0 ;
  GDALColorTableShadow *arg5 = 0 ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"target",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:DitherRGB2PCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
  }
  arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg4) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  char *arg3 = (char *)NULL ;
  char *arg4 = (char *)NULL ;
  GDALResampleAlg arg5 = GRA_NearestNeighbour ;
  double arg6 = 0.0 ;
  double arg7 = 0.0 ;
  GDALProgressFunc arg8 = NULL ;
  void *arg9 = NULL ;
  char **arg10 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  char * kwnames[] = {
    (char *)"src_ds",  (char *)"dst_ds",  (char *)"src_wkt",  (char *)"dst_wkt",  (char *)"eResampleAlg",  (char *)"WarpMemoryLimit",  (char *)"maxerror",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
  };
  CPLErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg9 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOOOOO:ReprojectImage", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  if (obj2) {
    res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  if (obj3) {
    res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
    }
    arg4 = reinterpret_cast< char * >(buf4);
  }
  if (obj4) {
    ecode5 = SWIG_AsVal_int(obj4, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
    } 
    arg5 = static_cast< GDALResampleAlg >(val5);
  }
  if (obj5) {
    ecode6 = SWIG_AsVal_double(obj5, &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
    } 
    arg6 = static_cast< double >(val6);
  }
  if (obj6) {
    ecode7 = SWIG_AsVal_double(obj6, &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
    } 
    arg7 = static_cast< double >(val7);
  }
  if (obj7) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
      {
        if( PyLong_AsLong(obj7) == 0 )
        {
          obj7 = Py_None;
        }
      }
      
      if (obj7 && obj7 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg8 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj7)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj7;
          arg8 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj8) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj8 ;
    }
  }
  if (obj9) {
    {
      /* %typemap(in) char **dict */
      arg10 = NULL;
      if ( PySequence_Check( obj9 ) ) {
        int bErr = FALSE;
        arg10 = CSLFromPySequence(obj9, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj9 ) ) {
        int bErr = FALSE;
        arg10 = CSLFromPyMapping(obj9, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,SWIG_STD_MOVE(arg8),arg9,arg10);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg10 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg10 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  char **arg3 = NULL ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"proximityBand",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ComputeProximity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)ComputeProximity(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  int *arg3 = 0 ;
  OGRLayerShadow *arg4 = 0 ;
  void *arg5 = NULL ;
  void *arg6 = NULL ;
  int arg7 = 0 ;
  double *arg8 = NULL ;
  char **arg9 = NULL ;
  GDALProgressFunc arg10 = NULL ;
  void *arg11 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  char * kwnames[] = {
    (char *)"dataset",  (char *)"bands",  (char *)"layer",  (char *)"pfnTransformer",  (char *)"pTransformArg",  (char *)"burn_values",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg11 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOOOO:RasterizeLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg3 = CreateCIntListFromSequence(obj1, &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
  }
  arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
  if (obj3) {
    res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
    }
  }
  if (obj4) {
    res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
    }
  }
  if (obj5) {
    {
      /* %typemap(in,numinputs=1) (int nList, double* pList)*/
      arg8 = CreateCDoubleListFromSequence(obj5, &arg7);
      if( arg7 < 0 ) {
        SWIG_fail;
      }
    }
  }
  if (obj6) {
    {
      /* %typemap(in) char **dict */
      arg9 = NULL;
      if ( PySequence_Check( obj6 ) ) {
        int bErr = FALSE;
        arg9 = CSLFromPySequence(obj6, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj6 ) ) {
        int bErr = FALSE;
        arg9 = CSLFromPyMapping(obj6, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj7) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
      {
        if( PyLong_AsLong(obj7) == 0 )
        {
          obj7 = Py_None;
        }
      }
      
      if (obj7 && obj7 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg10 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj7)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj7;
          arg10 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj8) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj8 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg4) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,SWIG_STD_MOVE(arg10),arg11);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg8);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg9 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg8);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg9 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Polygonize(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  OGRLayerShadow *arg3 = 0 ;
  int arg4 ;
  char **arg5 = NULL ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Polygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_FPolygonize(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  OGRLayerShadow *arg3 = 0 ;
  int arg4 ;
  char **arg5 = NULL ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FPolygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FPolygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FPolygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FPolygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FPolygonize" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)FPolygonize(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_FillNodata(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  double arg3 ;
  int arg4 ;
  char **arg5 = NULL ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"targetBand",  (char *)"maskBand",  (char *)"maxSearchDist",  (char *)"smoothingIterations",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FillNodata", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj5) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
      {
        if( PyLong_AsLong(obj5) == 0 )
        {
          obj5 = Py_None;
        }
      }
      
      if (obj5 && obj5 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj5)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj5;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj6) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj6 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  GDALRasterBandShadow *arg3 = 0 ;
  int arg4 ;
  int arg5 = 4 ;
  char **arg6 = NULL ;
  GDALProgressFunc arg7 = NULL ;
  void *arg8 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"maskBand",  (char *)"dstBand",  (char *)"threshold",  (char *)"connectedness",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg8 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOOO:SieveFilter", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  if (obj4) {
    ecode5 = SWIG_AsVal_int(obj4, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  if (obj5) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( obj5 ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj5 ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj6) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
      {
        if( PyLong_AsLong(obj6) == 0 )
        {
          obj6 = Py_None;
        }
      }
      
      if (obj6 && obj6 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg7 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj6)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj6;
          arg7 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj7) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj7 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,SWIG_STD_MOVE(arg7),arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  GDALRasterBandShadow **arg3 = 0 ;
  char *arg4 = (char *)"average" ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"overviewBandCount",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
    if ( !PySequence_Check(obj1) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(obj1);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALRasterBandShadow**) VSIMalloc(arg2*sizeof(GDALRasterBandShadow*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(obj1,i);
      GDALRasterBandShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  if (obj2) {
    res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
    }
    arg4 = reinterpret_cast< char * >(buf4);
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg3 );
  }
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg3 );
  }
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  char *arg3 = (char *)"average" ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"overviewBand",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverview", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  if (obj2) {
    res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  double *arg5 = 0 ;
  int arg6 ;
  double arg7 ;
  OGRLayerShadow *arg8 = 0 ;
  int arg9 ;
  int arg10 ;
  GDALProgressFunc arg11 = NULL ;
  void *arg12 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"contourInterval",  (char *)"contourBase",  (char *)"fixedLevelCount",  (char *)"useNoData",  (char *)"noDataValue",  (char *)"dstLayer",  (char *)"idField",  (char *)"elevField",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg12 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO|OO:ContourGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    arg5 = CreateCDoubleListFromSequence(obj3, &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
  }
  arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
  ecode9 = SWIG_AsVal_int(obj7, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_int(obj8, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  if (obj9) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj9) || PyInt_Check(obj9) )
      {
        if( PyLong_AsLong(obj9) == 0 )
        {
          obj9 = Py_None;
        }
      }
      
      if (obj9 && obj9 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj9,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg11 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj9)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj9;
          arg11 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj10) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj10 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg8) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,SWIG_STD_MOVE(arg11),arg12);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg5);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ContourGenerateEx(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  OGRLayerShadow *arg2 = 0 ;
  char **arg3 = NULL ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"dstLayer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ContourGenerateEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerateEx" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourGenerateEx" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)ContourGenerateEx(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_ViewshedGenerate(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  char **arg4 = 0 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double arg10 ;
  double arg11 ;
  double arg12 ;
  double arg13 ;
  GDALViewshedMode arg14 ;
  double arg15 ;
  GDALProgressFunc arg16 = NULL ;
  void *arg17 = NULL ;
  GDALViewshedOutputType arg18 = GVOT_NORMAL ;
  char **arg19 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  double val15 ;
  int ecode15 = 0 ;
  int val18 ;
  int ecode18 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  PyObject * obj15 = 0 ;
  PyObject * obj16 = 0 ;
  PyObject * obj17 = 0 ;
  PyObject * obj18 = 0 ;
  char * kwnames[] = {
    (char *)"srcBand",  (char *)"driverName",  (char *)"targetRasterName",  (char *)"creationOptions",  (char *)"observerX",  (char *)"observerY",  (char *)"observerHeight",  (char *)"targetHeight",  (char *)"visibleVal",  (char *)"invisibleVal",  (char *)"outOfRangeVal",  (char *)"noDataVal",  (char *)"dfCurvCoeff",  (char *)"mode",  (char *)"maxDistance",  (char *)"callback",  (char *)"callback_data",  (char *)"heightMode",  (char *)"options",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg17 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOOOOOO|OOOO:ViewshedGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15, &obj16, &obj17, &obj18)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewshedGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewshedGenerate" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewshedGenerate" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    /* %typemap(in) char **dict */
    arg4 = NULL;
    if ( PySequence_Check( obj3 ) ) {
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( obj3 ) ) {
      int bErr = FALSE;
      arg4 = CSLFromPyMapping(obj3, &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ViewshedGenerate" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ViewshedGenerate" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ViewshedGenerate" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ViewshedGenerate" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_double(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ViewshedGenerate" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = static_cast< double >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ViewshedGenerate" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "ViewshedGenerate" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ViewshedGenerate" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "ViewshedGenerate" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  ecode14 = SWIG_AsVal_int(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "ViewshedGenerate" "', argument " "14"" of type '" "GDALViewshedMode""'");
  } 
  arg14 = static_cast< GDALViewshedMode >(val14);
  ecode15 = SWIG_AsVal_double(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "ViewshedGenerate" "', argument " "15"" of type '" "double""'");
  } 
  arg15 = static_cast< double >(val15);
  if (obj15) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj15) || PyInt_Check(obj15) )
      {
        if( PyLong_AsLong(obj15) == 0 )
        {
          obj15 = Py_None;
        }
      }
      
      if (obj15 && obj15 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj15,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg16 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj15)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj15;
          arg16 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj16) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj16 ;
    }
  }
  if (obj17) {
    ecode18 = SWIG_AsVal_int(obj17, &val18);
    if (!SWIG_IsOK(ecode18)) {
      SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "ViewshedGenerate" "', argument " "18"" of type '" "GDALViewshedOutputType""'");
    } 
    arg18 = static_cast< GDALViewshedOutputType >(val18);
  }
  if (obj18) {
    {
      /* %typemap(in) char **dict */
      arg19 = NULL;
      if ( PySequence_Check( obj18 ) ) {
        int bErr = FALSE;
        arg19 = CSLFromPySequence(obj18, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj18 ) ) {
        int bErr = FALSE;
        arg19 = CSLFromPyMapping(obj18, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)ViewshedGenerate(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,SWIG_STD_MOVE(arg16),arg17,arg18,arg19);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg19 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg19 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_IsLineOfSightVisible(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterBandShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  bool *arg8 = 0 ;
  int *arg9 = 0 ;
  int *arg10 = 0 ;
  char **arg11 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  bool visible8 = 0 ;
  int nxintersection8 = 0 ;
  int nyintersection8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  char * kwnames[] = {
    (char *)"band",  (char *)"xA",  (char *)"yA",  (char *)"zA",  (char *)"xB",  (char *)"yB",  (char *)"zB",  (char *)"options",  NULL 
  };
  
  {
    /* %typemap(in) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection) */
    arg8 = &visible8;
    arg9 = &nxintersection8;
    arg10 = &nyintersection8;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO|O:IsLineOfSightVisible", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsLineOfSightVisible" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IsLineOfSightVisible" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IsLineOfSightVisible" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IsLineOfSightVisible" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IsLineOfSightVisible" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IsLineOfSightVisible" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IsLineOfSightVisible" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  if (obj7) {
    {
      /* %typemap(in) char **dict */
      arg11 = NULL;
      if ( PySequence_Check( obj7 ) ) {
        int bErr = FALSE;
        arg11 = CSLFromPySequence(obj7, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj7 ) ) {
        int bErr = FALSE;
        arg11 = CSLFromPyMapping(obj7, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      IsLineOfSightVisible(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection)  */
    PyObject *r = PyTuple_New( 3 );
    PyTuple_SetItem( r, 0, PyBool_FromLong(*arg8) );
    PyTuple_SetItem( r, 1, PyLong_FromLong(*arg9) );
    PyTuple_SetItem( r, 2, PyLong_FromLong(*arg10) );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg11 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg11 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  GDALResampleAlg arg4 = GRA_NearestNeighbour ;
  double arg5 = 0.0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AutoCreateWarpedVRT", 1, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  if (swig_obj[3]) {
    ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
    } 
    arg4 = static_cast< GDALResampleAlg >(val4);
  }
  if (swig_obj[4]) {
    ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreatePansharpenedVRT(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  int arg3 ;
  GDALRasterBandShadow **arg4 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreatePansharpenedVRT", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreatePansharpenedVRT" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreatePansharpenedVRT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
    if ( !PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (GDALRasterBandShadow**) VSIMalloc(arg3*sizeof(GDALRasterBandShadow*));
    if( !arg4) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[2],i);
      GDALRasterBandShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
        SWIG_fail;
      }
      arg4[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)CreatePansharpenedVRT((char const *)arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
    CPLFree( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetTranformerOptionList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetTranformerOptionList", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALGetGenImgProjTranformerOptionList();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALTransformerInfoShadow(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTransformerInfoShadow *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTransformerInfoShadow" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALTransformerInfoShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTransformerInfoShadow *arg1 = 0 ;
  int arg2 ;
  double *arg3 = (double *)0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double argin3[3] ;
  int result;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) (double argin3[ANY]) */
    arg3 = argin3;
    if (! PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t seq_size = PySequence_Size(swig_obj[2]);
    if ( seq_size != 3 ) {
      PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
      SWIG_fail;
    }
    for (unsigned int i=0; i<3; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[2],i);
      double val;
      if ( !PyArg_Parse(o, "d", &val ) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg3[i] =  val;
      Py_DECREF(o);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,0);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTransformerInfoShadow *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 = 0.0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[3] ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int result;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if ((nobjs < 4) || (nobjs > 5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
  ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  if (swig_obj[4]) {
    ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "6"" of type '" "double""'");
    } 
    arg6 = static_cast< double >(val6);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,0);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoint", 0, 5, argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(self, argc, argv);
        }
      }
    }
  }
  if ((argc >= 4) && (argc <= 5)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            if (argc <= 4) {
              return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
            }
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GDALTransformerInfoShadow_TransformPoint'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    GDALTransformerInfoShadow::TransformPoint(int,double [3])\n"
    "    GDALTransformerInfoShadow::TransformPoint(double [3],int,double,double,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoints(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTransformerInfoShadow *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = 0 ;
  double *arg5 = 0 ;
  double *arg6 = 0 ;
  int *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoints", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
    if ( !PySequence_Check(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (double*) VSIMalloc(arg3*sizeof(double));
    arg5 = (double*) VSIMalloc(arg3*sizeof(double));
    arg6 = (double*) VSIMalloc(arg3*sizeof(double));
    arg7 = (int*) VSIMalloc(arg3*sizeof(int));
    
    if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
      SWIG_fail;
    }
    
    if (!DecomposeSequenceOfCoordinates(swig_obj[2],arg3,arg4,arg5,arg6)) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
    Py_DECREF(resultobj);
    PyObject *xyz = PyList_New( arg3 );
    if( !xyz ) {
      SWIG_fail;
    }
    PyObject *success = PyList_New( arg3 );
    if( !success ) {
      Py_DECREF(xyz);
      SWIG_fail;
    }
    for( int i=0; i< arg3; i++ ) {
      PyObject *tuple = PyTuple_New( 3 );
      PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
      PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
      PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
      PyList_SetItem( xyz, i, tuple );
      PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
    }
    resultobj = PyTuple_New( 2 );
    PyTuple_SetItem( resultobj, 0, xyz );
    PyTuple_SetItem( resultobj, 1, success );
  }
  {
    /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
    VSIFree(arg4);
    VSIFree(arg5);
    VSIFree(arg6);
    VSIFree(arg7);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
    VSIFree(arg4);
    VSIFree(arg5);
    VSIFree(arg6);
    VSIFree(arg7);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformGeolocations(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTransformerInfoShadow *arg1 = 0 ;
  GDALRasterBandShadow *arg2 = 0 ;
  GDALRasterBandShadow *arg3 = 0 ;
  GDALRasterBandShadow *arg4 = 0 ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  char **arg7 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"xBand",  (char *)"yBand",  (char *)"zBand",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
  };
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:GDALTransformerInfoShadow_TransformGeolocations", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
  }
  arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  if (obj6) {
    {
      /* %typemap(in) char **dict */
      arg7 = NULL;
      if ( PySequence_Check( obj6 ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPySequence(obj6, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj6 ) ) {
        int bErr = FALSE;
        arg7 = CSLFromPyMapping(obj6, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg4) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg7 );
  }
  return NULL;
}


SWIGINTERN PyObject *GDALTransformerInfoShadow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Transformer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  char **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[3] ;
  GDALTransformerInfoShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Transformer", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  {
    /* %typemap(in) char **dict */
    arg3 = NULL;
    if ( PySequence_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALTransformerInfoShadow *)Transformer(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_WarpGetOptionList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "WarpGetOptionList", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALWarpGetOptionList();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_width_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_width_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->width);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_height_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_height_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int) ((arg1)->height);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmin_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->xmin);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymin_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->ymin);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmax_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->xmax);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymax_get(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (double) ((arg1)->ymax);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_SuggestedWarpOutputRes(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuggestedWarpOutputRes" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_SuggestedWarpOutputRes(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_GetGeotransform(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  SuggestedWarpOutputRes *arg1 = 0 ;
  double *arg2 = (double *)0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_GetGeotransform" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
  }
  arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      SuggestedWarpOutputRes_GetGeotransform(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,1);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *SuggestedWarpOutputRes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromTransformer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALTransformerInfoShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  SuggestedWarpOutputRes *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromTransformer", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "2"" of type '" "GDALTransformerInfoShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALTransformerInfoShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromTransformer(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  SuggestedWarpOutputRes *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromOptions", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromOptions" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromOptions(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap__ApplyVerticalShiftGrid(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  bool arg3 = false ;
  double arg4 = 1.0 ;
  double arg5 = 1.0 ;
  char **arg6 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"src_ds",  (char *)"grid_ds",  (char *)"inverse",  (char *)"srcUnitToMeter",  (char *)"dstUnitToMeter",  (char *)"options",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOO:_ApplyVerticalShiftGrid", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ApplyVerticalShiftGrid" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_ApplyVerticalShiftGrid" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  if (obj2) {
    ecode3 = SWIG_AsVal_bool(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_ApplyVerticalShiftGrid" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
  }
  if (obj3) {
    ecode4 = SWIG_AsVal_double(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_ApplyVerticalShiftGrid" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
  }
  if (obj4) {
    ecode5 = SWIG_AsVal_double(obj4, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_ApplyVerticalShiftGrid" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
  }
  if (obj5) {
    {
      /* %typemap(in) char **dict */
      arg6 = NULL;
      if ( PySequence_Check( obj5 ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPySequence(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj5 ) ) {
        int bErr = FALSE;
        arg6 = CSLFromPyMapping(obj5, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)ApplyVerticalShiftGrid(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg6 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetGlobalAlgorithmRegistry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmRegistryHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetGlobalAlgorithmRegistry", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmRegistryHS *)GDALGetGlobalAlgorithmRegistry();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArgTypeIsList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeIsList" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
  } 
  arg1 = static_cast< GDALAlgorithmArgType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgTypeIsList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArgTypeName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeName" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
  } 
  arg1 = static_cast< GDALAlgorithmArgType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_AlgorithmArg(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmArg" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALAlgorithmArgHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALAlgorithmArgType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmArgType)GDALAlgorithmArgHS_GetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDescription(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetDescription(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetShortName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetShortName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetShortName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAliases(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAliases" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmArgHS_GetAliases(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetaVar(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetaVar" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetMetaVar(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetCategory(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetCategory" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetCategory(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsPositional(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsPositional" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsPositional(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsRequired(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsRequired" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsRequired(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMinCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMinCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetMinCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMaxCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMaxCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetMaxCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetPackedValuesAllowed(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetPackedValuesAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_GetPackedValuesAllowed(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetRepeatedArgAllowed(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetRepeatedArgAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_GetRepeatedArgAllowed(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetChoices(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetChoices" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmArgHS_GetChoices(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetadataItem(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_GetMetadataItem", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmArgHS_GetMetadataItem(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsExplicitlySet(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsExplicitlySet" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsExplicitlySet(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_HasDefaultValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_HasDefaultValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_HasDefaultValue(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsBoolean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_GetDefaultAsBoolean(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetDefaultAsString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsInteger(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetDefaultAsInteger(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDALAlgorithmArgHS_GetDefaultAsDouble(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsStringList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmArgHS_GetDefaultAsStringList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsIntegerList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int *arg2 = 0 ;
  int **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  int *pList2 = NULL ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
    arg2 = &nLen2;
    arg3 = &pList2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAlgorithmArgHS_GetDefaultAsIntegerList(arg1,arg2,(int const **)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const int **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg2 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<*arg2; i++ ) {
      PyObject *val = PyInt_FromLong( (*arg3)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsDoubleList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int *arg2 = 0 ;
  double **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  double *pList2 = NULL ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
    arg2 = &nLen2;
    arg3 = &pList2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAlgorithmArgHS_GetDefaultAsDoubleList(arg1,arg2,(double const **)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const double **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg2 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<*arg2; i++ ) {
      PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHidden(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHidden" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsHidden(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForCLI(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsHiddenForCLI(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForAPI(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForAPI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsHiddenForAPI(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsInput(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsInput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsInput(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOutput(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOutput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_IsOutput(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetDatasetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetInputFlags(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetInputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetDatasetInputFlags(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetOutputFlags(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetOutputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetDatasetOutputFlags(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMutualExclusionGroup(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMutualExclusionGroup" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetMutualExclusionGroup(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsBoolean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_GetAsBoolean(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmArgHS_GetAsString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsInteger(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALAlgorithmArgHS_GetAsInteger(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDALAlgorithmArgHS_GetAsDouble(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDatasetValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALArgDatasetValueHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALArgDatasetValueHS *)GDALAlgorithmArgHS_GetAsDatasetValue(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsStringList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmArgHS_GetAsStringList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsIntegerList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int *arg2 = 0 ;
  int **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  int *pList2 = NULL ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
    arg2 = &nLen2;
    arg3 = &pList2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAlgorithmArgHS_GetAsIntegerList(arg1,arg2,(int const **)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const int **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg2 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<*arg2; i++ ) {
      PyObject *val = PyInt_FromLong( (*arg3)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDoubleList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int *arg2 = 0 ;
  double **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  double *pList2 = NULL ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
    arg2 = &nLen2;
    arg3 = &pList2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAlgorithmArgHS_GetAsDoubleList(arg1,arg2,(double const **)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const double **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg2 );
    if( !out ) {
      SWIG_fail;
    }
    for( int i=0; i<*arg2; i++ ) {
      PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsBoolean(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsBoolean", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsBoolean(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsString", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsString" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsString(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsInteger(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsInteger", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsInteger(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDouble", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsDouble(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDatasetValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  GDALArgDatasetValueHS *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDatasetValue", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "2"" of type '" "GDALArgDatasetValueHS *""'"); 
  }
  arg2 = reinterpret_cast< GDALArgDatasetValueHS * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsDatasetValue(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsStringList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsStringList", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsStringList(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsIntegerList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int arg2 ;
  int *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsIntegerList", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsIntegerList(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDoubleList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int arg2 ;
  double *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDoubleList", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetAsDoubleList(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDataset", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDataset" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetDataset(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasets(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  int arg2 ;
  GDALDatasetShadow **arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasets", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasets" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALDatasetShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetDatasets(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasetNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmArgHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasetNames", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasetNames" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmArgHS_SetDatasetNames(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *AlgorithmArg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_Algorithm(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Algorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALAlgorithmHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetName" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetDescription(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmHS_GetDescription(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetLongDescription(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetLongDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmHS_GetLongDescription(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetHelpFullURL(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetHelpFullURL" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALAlgorithmHS_GetHelpFullURL(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_HasSubAlgorithms(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_HasSubAlgorithms" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmHS_HasSubAlgorithms(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetSubAlgorithmNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetSubAlgorithmNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmHS_GetSubAlgorithmNames(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_InstantiateSubAlgorithm(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALAlgorithmHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Algorithm_InstantiateSubAlgorithm", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmHS *)GDALAlgorithmHS_InstantiateSubAlgorithm(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_ParseCommandLineArguments(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  char **arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseCommandLineArguments", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseCommandLineArguments" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmHS_ParseCommandLineArguments(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetActualAlgorithm(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALAlgorithmHS *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetActualAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmHS *)GDALAlgorithmHS_GetActualAlgorithm(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_Run(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  GDALProgressFunc arg2 = NULL ;
  void *arg3 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  bool result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg3 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Algorithm_Run", 1, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Run" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[1]) || PyInt_Check(swig_obj[1]) )
      {
        if( PyLong_AsLong(swig_obj[1]) == 0 )
        {
          swig_obj[1] = Py_None;
        }
      }
      
      if (swig_obj[1] && swig_obj[1] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[1],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg2 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[1])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[1];
          arg2 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[2]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[2] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmHS_Run(arg1,SWIG_STD_MOVE(arg2),arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_Finalize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Finalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmHS_Finalize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_ParseRunAndFinalize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  char **arg2 = 0 ;
  GDALProgressFunc arg3 = NULL ;
  void *arg4 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[4] ;
  bool result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg4 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseRunAndFinalize", 2, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseRunAndFinalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (swig_obj[2]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[2]) || PyInt_Check(swig_obj[2]) )
      {
        if( PyLong_AsLong(swig_obj[2]) == 0 )
        {
          swig_obj[2] = Py_None;
        }
      }
      
      if (swig_obj[2] && swig_obj[2] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[2],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg3 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[2])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[2];
          arg3 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[3]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[3] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)GDALAlgorithmHS_ParseRunAndFinalize(arg1,arg2,SWIG_STD_MOVE(arg3),arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetUsageAsJSON(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetUsageAsJSON" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALAlgorithmHS_GetUsageAsJSON(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetArgNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmHS_GetArgNames(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetArg(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALAlgorithmArgHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArg", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArg" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArg" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArg(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Algorithm_GetArgNonConst(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALAlgorithmArgHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArgNonConst", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNonConst" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArgNonConst" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArgNonConst(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *Algorithm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_AlgorithmRegistry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmRegistryHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmRegistry" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALAlgorithmRegistryHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmRegistry_GetAlgNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmRegistryHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_GetAlgNames" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALAlgorithmRegistryHS_GetAlgNames(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AlgorithmRegistry_InstantiateAlg(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALAlgorithmRegistryHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  GDALAlgorithmHS *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AlgorithmRegistry_InstantiateAlg", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALAlgorithmHS *)GDALAlgorithmRegistryHS_InstantiateAlg(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *AlgorithmRegistry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ArgDatasetValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALArgDatasetValueHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArgDatasetValue" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALArgDatasetValueHS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALArgDatasetValueHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALArgDatasetValueHS_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALArgDatasetValueHS *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)GDALArgDatasetValueHS_GetDataset(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALArgDatasetValueHS *arg1 = 0 ;
  char *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetName" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALArgDatasetValueHS_SetName(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALArgDatasetValueHS *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetDataset", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
  }
  arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALArgDatasetValueHS_SetDataset(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ArgDatasetValue_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double *arg1 = (double *)0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = 0 ;
  double *arg5 = 0 ;
  double argin1[6] ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ApplyGeoTransform", 3, 3, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (double argin1[ANY]) */
    arg1 = argin1;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
    if ( seq_size != 6 ) {
      PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
      SWIG_fail;
    }
    for (unsigned int i=0; i<6; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      double val;
      if ( !PyArg_Parse(o, "d", &val ) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg1[i] =  val;
      Py_DECREF(o);
    }
  }
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)), 1);
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags), 1);
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)), 1);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags), 1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double *arg1 = (double *)0 ;
  double *arg2 = (double *)0 ;
  double argin1[6] ;
  double argout2[6] ;
  PyObject *swig_obj[1] ;
  RETURN_NONE result;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (double argin1[ANY]) */
    arg1 = argin1;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
    if ( seq_size != 6 ) {
      PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
      SWIG_fail;
    }
    for (unsigned int i=0; i<6; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      double val;
      if ( !PyArg_Parse(o, "d", &val ) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg1[i] =  val;
      Py_DECREF(o);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (RETURN_NONE)GDALInvGeoTransform(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  /*%typemap(out) IF_FALSE_RETURN_NONE */
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,0);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  {
    /* %typemap(ret) IF_FALSE_RETURN_NONE */
    if (result == 0 ) {
      Py_XDECREF( resultobj );
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
    if (resultobj == 0) {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ApplyHomography(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double *arg1 = (double *)0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = 0 ;
  double *arg5 = 0 ;
  double argin1[9] ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ApplyHomography", 3, 3, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (double argin1[ANY]) */
    arg1 = argin1;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
    if ( seq_size != 9 ) {
      PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
      SWIG_fail;
    }
    for (unsigned int i=0; i<9; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      double val;
      if ( !PyArg_Parse(o, "d", &val ) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg1[i] =  val;
      Py_DECREF(o);
    }
  }
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyHomography" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyHomography" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALApplyHomography(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags), 0);
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)), 0);
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags), 0);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_InvHomography(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double *arg1 = (double *)0 ;
  double *arg2 = (double *)0 ;
  double argin1[9] ;
  double argout2[9] ;
  PyObject *swig_obj[1] ;
  RETURN_NONE result;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) (double argin1[ANY]) */
    arg1 = argin1;
    if (! PySequence_Check(swig_obj[0]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
    if ( seq_size != 9 ) {
      PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
      SWIG_fail;
    }
    for (unsigned int i=0; i<9; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[0],i);
      double val;
      if ( !PyArg_Parse(o, "d", &val ) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg1[i] =  val;
      Py_DECREF(o);
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (RETURN_NONE)GDALInvHomography(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  /*%typemap(out) IF_FALSE_RETURN_NONE */
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 9 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,0);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  {
    /* %typemap(ret) IF_FALSE_RETURN_NONE */
    if (result == 0 ) {
      Py_XDECREF( resultobj );
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
    if (resultobj == 0) {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *)"VERSION_NUM" ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VersionInfo", 0, 1, swig_obj)) SWIG_fail;
  if (swig_obj[0]) {
    res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = reinterpret_cast< char * >(buf1);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALVersionInfo((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_AllRegister(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "AllRegister", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALAllRegister();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GDALDestroyDriverManager", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALDestroyDriverManager();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GIntBig result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetCacheMax", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = wrapper_GDALGetCacheMax();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GIntBig result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetCacheUsed", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = wrapper_GDALGetCacheUsed();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GIntBig arg1 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    arg1 = (GIntBig)PyLong_AsLongLong(swig_obj[0]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      wrapper_GDALSetCacheMax(SWIG_STD_MOVE(arg1));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALGetDataTypeSizeBits(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDataTypeSizeBits(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALGetDataTypeSizeBits(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDataTypeSizeBytes(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALGetDataTypeSizeBytes(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALDataTypeIsComplex(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALGetDataTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDataType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataTypeUnion(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  GDALDataType arg2 ;
  PyObject *swig_obj[2] ;
  GDALDataType result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "DataTypeUnion", 2, 2, swig_obj)) SWIG_fail;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[1], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg2 = static_cast<GDALDataType>(val);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALDataTypeUnion(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataTypeUnionWithValue(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDataType arg1 ;
  double arg2 ;
  bool arg3 ;
  double val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  GDALDataType result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "DataTypeUnionWithValue", 3, 3, swig_obj)) SWIG_fail;
  {
    // %typemap(in) GDALDataType
    int val = 0;
    int ecode = SWIG_AsVal_int(swig_obj[0], &val);
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
    }
    if( val < GDT_Unknown || val >= GDT_TypeCount )
    {
      SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
    }
    arg1 = static_cast<GDALDataType>(val);
  }
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataTypeUnionWithValue" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DataTypeUnionWithValue" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDataType)GDALDataTypeUnionWithValue(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALColorInterp arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
  } 
  arg1 = static_cast< GDALColorInterp >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALGetColorInterpretationName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetColorInterpretationByName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALColorInterp result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetColorInterpretationByName" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALColorInterp)GDALGetColorInterpretationByName((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALPaletteInterp arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
  } 
  arg1 = static_cast< GDALPaletteInterp >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALGetPaletteInterpretationName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 ;
  char *arg2 = 0 ;
  int arg3 = 2 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  char *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "DecToDMS", 2, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDALPackedDMSToDec(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)GDALDecToPackedDMS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  CPLXMLNode *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLXMLNode *)CPLParseXMLString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (CPLXMLNode*) */
    
    CPLXMLNode *psXMLTree = result;
    int         bFakeRoot = FALSE;
    
    if( psXMLTree != NULL && psXMLTree->psNext != NULL )
    {
      CPLXMLNode *psFirst = psXMLTree;
      
      /* create a "pseudo" root if we have multiple elements */
      psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
      psXMLTree->psChild = psFirst;
      bFakeRoot = TRUE;
    }
    
    resultobj = XMLTreeToPyList( psXMLTree );
    
    if( bFakeRoot )
    {
      psXMLTree->psChild = NULL;
      CPLDestroyXMLNode( psXMLTree );
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(ret) (CPLXMLNode*) */
    if ( result ) CPLDestroyXMLNode( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  CPLXMLNode *arg1 = 0 ;
  PyObject *swig_obj[1] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
    arg1 = PyListToXMLTree( swig_obj[0] );
    if ( !arg1 ) SWIG_fail;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) (CPLXMLNode *xmlnode) */
    CPLDestroyXMLNode( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (CPLXMLNode *xmlnode) */
    CPLDestroyXMLNode( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetJPEG2000Structure(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[2] ;
  CPLXMLNode *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000Structure", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000Structure" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLXMLNode *)GDALGetJPEG2000Structure((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (CPLXMLNode*) */
    
    CPLXMLNode *psXMLTree = result;
    int         bFakeRoot = FALSE;
    
    if( psXMLTree != NULL && psXMLTree->psNext != NULL )
    {
      CPLXMLNode *psFirst = psXMLTree;
      
      /* create a "pseudo" root if we have multiple elements */
      psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
      psXMLTree->psChild = psFirst;
      bFakeRoot = TRUE;
    }
    
    resultobj = XMLTreeToPyList( psXMLTree );
    
    if( bFakeRoot )
    {
      psXMLTree->psChild = NULL;
      CPLDestroyXMLNode( psXMLTree );
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(ret) (CPLXMLNode*) */
    if ( result ) CPLDestroyXMLNode( result );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetJPEG2000StructureAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000StructureAsString", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000StructureAsString" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GetJPEG2000StructureAsString((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_HasTriangulation(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "HasTriangulation", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GDALHasTriangulation();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetDriverCount();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDriverShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriver(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDriverShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDriverShadow *)GetDriver(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Open(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALAccess arg2 = GA_ReadOnly ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Open", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    {
      // %typemap(in) GDALAccess
      int val = 0;
      int ecode = SWIG_AsVal_int(swig_obj[1], &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
      }
      if( val != GA_ReadOnly && val != GA_Update )
      {
        SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
      }
      arg2 = static_cast<GDALAccess>(val);
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if( result == NULL && bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bLocalUseExceptions ) {
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_OpenEx(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  unsigned int arg2 = 0 ;
  char **arg3 = NULL ;
  char **arg4 = NULL ;
  char **arg5 = NULL ;
  int bToFree1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"utf8_path",  (char *)"nOpenFlags",  (char *)"allowed_drivers",  (char *)"open_options",  (char *)"sibling_files",  NULL 
  };
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:OpenEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenEx" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj4 ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(obj4, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)OpenEx((char const *)arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if( result == NULL && bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bLocalUseExceptions ) {
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_OpenShared(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALAccess arg2 = GA_ReadOnly ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "OpenShared", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    {
      // %typemap(in) GDALAccess
      int val = 0;
      int ecode = SWIG_AsVal_int(swig_obj[1], &val);
      if (!SWIG_IsOK(ecode)) {
        SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
      }
      if( val != GA_ReadOnly && val != GA_Update )
      {
        SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
      }
      arg2 = static_cast<GDALAccess>(val);
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if( result == NULL && bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bLocalUseExceptions ) {
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = NULL ;
  int bToFree1 = 0 ;
  PyObject *swig_obj[2] ;
  GDALDriverShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "IdentifyDriver", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_IdentifyDriverEx(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  unsigned int arg2 = 0 ;
  char **arg3 = NULL ;
  char **arg4 = NULL ;
  int bToFree1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"utf8_path",  (char *)"nIdentifyFlags",  (char *)"allowed_drivers",  (char *)"sibling_files",  NULL 
  };
  GDALDriverShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:IdentifyDriverEx", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IdentifyDriverEx" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDriverShadow *)IdentifyDriverEx((char const *)arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  int arg2 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GeneralCmdLineProcessor(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALInfoOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALInfoOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALInfoOptions *)new_GDALInfoOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALInfoOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALInfoOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALInfoOptions" "', argument " "1"" of type '" "GDALInfoOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALInfoOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALInfoOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALInfoOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_InfoInternal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALInfoOptions *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "InfoInternal", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALInfoOptions, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InfoInternal" "', argument " "2"" of type '" "GDALInfoOptions *""'"); 
  }
  arg2 = reinterpret_cast< GDALInfoOptions * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALInfo(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALVectorInfoOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALVectorInfoOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALVectorInfoOptions *)new_GDALVectorInfoOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALVectorInfoOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALVectorInfoOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorInfoOptions" "', argument " "1"" of type '" "GDALVectorInfoOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALVectorInfoOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALVectorInfoOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALVectorInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorInfoOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALVectorInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_VectorInfoInternal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALVectorInfoOptions *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "VectorInfoInternal", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALVectorInfoOptions, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorInfoInternal" "', argument " "2"" of type '" "GDALVectorInfoOptions *""'"); 
  }
  arg2 = reinterpret_cast< GDALVectorInfoOptions * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALVectorInfo(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALMultiDimInfoOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALMultiDimInfoOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMultiDimInfoOptions *)new_GDALMultiDimInfoOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALMultiDimInfoOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMultiDimInfoOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimInfoOptions" "', argument " "1"" of type '" "GDALMultiDimInfoOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALMultiDimInfoOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALMultiDimInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALMultiDimInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_MultiDimInfoInternal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALMultiDimInfoOptions *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MultiDimInfoInternal", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiDimInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMultiDimInfoOptions, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiDimInfoInternal" "', argument " "2"" of type '" "GDALMultiDimInfoOptions *""'"); 
  }
  arg2 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)GDALMultiDimInfo(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALTranslateOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALTranslateOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALTranslateOptions *)new_GDALTranslateOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALTranslateOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTranslateOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTranslateOptions" "', argument " "1"" of type '" "GDALTranslateOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALTranslateOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALTranslateOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALTranslateOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_TranslateInternal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALTranslateOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "TranslateInternal", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TranslateInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTranslateOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TranslateInternal" "', argument " "3"" of type '" "GDALTranslateOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALTranslateOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALTranslate((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALWarpAppOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALWarpAppOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALWarpAppOptions *)new_GDALWarpAppOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALWarpAppOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALWarpAppOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALWarpAppOptions" "', argument " "1"" of type '" "GDALWarpAppOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALWarpAppOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALWarpAppOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALWarpAppOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALWarpAppOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALWarpAppOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  int arg2 ;
  GDALDatasetShadow **arg3 = 0 ;
  GDALWarpAppOptions *arg4 = 0 ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestDS", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALWarpDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALDatasetShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestDS" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
  }
  arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALWarpDestDS(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 ;
  GDALDatasetShadow **arg3 = 0 ;
  GDALWarpAppOptions *arg4 = 0 ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  int bToFree1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALDatasetShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestName" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
  }
  arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALWarpDestName((char const *)arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALVectorTranslateOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALVectorTranslateOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALVectorTranslateOptions *)new_GDALVectorTranslateOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALVectorTranslateOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALVectorTranslateOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorTranslateOptions" "', argument " "1"" of type '" "GDALVectorTranslateOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALVectorTranslateOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALVectorTranslateOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALVectorTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALVectorTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALVectorTranslateOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestDS", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALVectorTranslateDestDS(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALVectorTranslateOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALVectorTranslateDestName((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALDEMProcessingOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDEMProcessingOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDEMProcessingOptions *)new_GDALDEMProcessingOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALDEMProcessingOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDEMProcessingOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALDEMProcessingOptions" "', argument " "1"" of type '" "GDALDEMProcessingOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALDEMProcessingOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALDEMProcessingOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALDEMProcessingOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALDEMProcessingOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_DEMProcessingInternal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  char *arg3 = 0 ;
  char *arg4 = 0 ;
  GDALDEMProcessingOptions *arg5 = 0 ;
  GDALProgressFunc arg6 = NULL ;
  void *arg7 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[7] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "DEMProcessingInternal", 5, 7, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DEMProcessingInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DEMProcessingInternal" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DEMProcessingInternal" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_GDALDEMProcessingOptions, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DEMProcessingInternal" "', argument " "5"" of type '" "GDALDEMProcessingOptions *""'"); 
  }
  arg5 = reinterpret_cast< GDALDEMProcessingOptions * >(argp5);
  if (swig_obj[5]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[5]) || PyInt_Check(swig_obj[5]) )
      {
        if( PyLong_AsLong(swig_obj[5]) == 0 )
        {
          swig_obj[5] = Py_None;
        }
      }
      
      if (swig_obj[5] && swig_obj[5] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[5],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[5])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[5];
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[6]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[6] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg3) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALDEMProcessing((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALNearblackOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALNearblackOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALNearblackOptions *)new_GDALNearblackOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALNearblackOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALNearblackOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALNearblackOptions" "', argument " "1"" of type '" "GDALNearblackOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALNearblackOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALNearblackOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALNearblackOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALNearblackOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALNearblackOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALNearblackOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestDS", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALNearblackDestDS(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALNearblackOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestName" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALNearblackDestName((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALGridOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALGridOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALGridOptions *)new_GDALGridOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALGridOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALGridOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALGridOptions" "', argument " "1"" of type '" "GDALGridOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALGridOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALGridOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALGridOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALGridOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALGridOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_GridInternal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALGridOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GridInternal", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALGridOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridInternal" "', argument " "3"" of type '" "GDALGridOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALGridOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALGrid((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALContourOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALContourOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALContourOptions *)new_GDALContourOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALContourOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALContourOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALContourOptions" "', argument " "1"" of type '" "GDALContourOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALContourOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALContourOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALContourOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALContourOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALContourOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALContourOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestDS", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALContourDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestDS" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALContourDestDS(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALContourOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestName" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALContourDestName((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALRasterizeOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALRasterizeOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALRasterizeOptions *)new_GDALRasterizeOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALRasterizeOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALRasterizeOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALRasterizeOptions" "', argument " "1"" of type '" "GDALRasterizeOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALRasterizeOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALRasterizeOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALRasterizeOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterizeOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALRasterizeOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALRasterizeOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestDS", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALRasterizeDestDS(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALRasterizeOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALRasterizeDestName((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALFootprintOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALFootprintOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALFootprintOptions *)new_GDALFootprintOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALFootprintOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALFootprintOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALFootprintOptions" "', argument " "1"" of type '" "GDALFootprintOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALFootprintOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALFootprintOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALFootprintOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALFootprintOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALFootprintOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALDatasetShadow *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALFootprintOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestDS", 3, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)wrapper_GDALFootprintDestDS(arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  GDALDatasetShadow *arg2 = 0 ;
  GDALFootprintOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
  }
  arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestName" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALFootprintDestName((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALBuildVRTOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALBuildVRTOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALBuildVRTOptions *)new_GDALBuildVRTOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALBuildVRTOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALBuildVRTOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALBuildVRTOptions" "', argument " "1"" of type '" "GDALBuildVRTOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALBuildVRTOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALBuildVRTOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALBuildVRTOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALBuildVRTOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALBuildVRTOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_BuildVRTInternalObjects(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 ;
  GDALDatasetShadow **arg3 = 0 ;
  GDALBuildVRTOptions *arg4 = 0 ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  int bToFree1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalObjects", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALDatasetShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BuildVRTInternalObjects" "', argument " "4"" of type '" "GDALBuildVRTOptions *""'"); 
  }
  arg4 = reinterpret_cast< GDALBuildVRTOptions * >(argp4);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_objects((char const *)arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_BuildVRTInternalNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = 0 ;
  GDALBuildVRTOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalNames", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BuildVRTInternalNames" "', argument " "3"" of type '" "GDALBuildVRTOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALBuildVRTOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_names((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALTileIndexOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALTileIndexOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALTileIndexOptions *)new_GDALTileIndexOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALTileIndexOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALTileIndexOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTileIndexOptions" "', argument " "1"" of type '" "GDALTileIndexOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALTileIndexOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALTileIndexOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALTileIndexOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALTileIndexOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALTileIndexOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_TileIndexInternalNames(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  char **arg2 = 0 ;
  GDALTileIndexOptions *arg3 = 0 ;
  GDALProgressFunc arg4 = NULL ;
  void *arg5 = NULL ;
  int bToFree1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg5 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "TileIndexInternalNames", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTileIndexOptions, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TileIndexInternalNames" "', argument " "3"" of type '" "GDALTileIndexOptions *""'"); 
  }
  arg3 = reinterpret_cast< GDALTileIndexOptions * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg4 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg4 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_TileIndex_names((char const *)arg1,arg2,arg3,SWIG_STD_MOVE(arg4),arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GDALMultiDimTranslateOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALMultiDimTranslateOptions *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALMultiDimTranslateOptions *)new_GDALMultiDimTranslateOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GDALMultiDimTranslateOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMultiDimTranslateOptions *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimTranslateOptions" "', argument " "1"" of type '" "GDALMultiDimTranslateOptions *""'"); 
  }
  arg1 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_GDALMultiDimTranslateOptions(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj = NULL;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_wrapper_GDALMultiDimTranslateDestName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = 0 ;
  int arg2 ;
  GDALDatasetShadow **arg3 = 0 ;
  GDALMultiDimTranslateOptions *arg4 = 0 ;
  GDALProgressFunc arg5 = NULL ;
  void *arg6 = NULL ;
  int bToFree1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[5] ;
  GDALDatasetShadow *result = 0 ;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALMultiDimTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    {
      arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
    if ( !PySequence_Check(swig_obj[1]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[1]);
    if( size > (Py_ssize_t)INT_MAX ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
    if( !arg3) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      GDALDatasetShadow* rawobjectpointer = NULL;
      CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
      if (!rawobjectpointer) {
        Py_DECREF(o);
        PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
        SWIG_fail;
      }
      arg3[i] = rawobjectpointer;
      Py_DECREF(o);
      
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALMultiDimTranslateOptions, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALMultiDimTranslateDestName" "', argument " "4"" of type '" "GDALMultiDimTranslateOptions *""'"); 
  }
  arg4 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp4);
  if (swig_obj[3]) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
      {
        if( PyLong_AsLong(swig_obj[3]) == 0 )
        {
          swig_obj[3] = Py_None;
        }
      }
      
      if (swig_obj[3] && swig_obj[3] != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(swig_obj[3])) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = swig_obj[3];
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (swig_obj[4]) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = swig_obj[4] ;
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_NullReferenceError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)wrapper_GDALMultiDimTranslateDestName((char const *)arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  {
    /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
    CPLFree( arg3 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
	 { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
	 { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
	 { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
	 { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
	 { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
	 { "VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, "VSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int"},
	 { "VSIGetMemFileBuffer_unsafe", _wrap_VSIGetMemFileBuffer_unsafe, METH_O, "VSIGetMemFileBuffer_unsafe(char const * utf8_path)"},
	 { "Debug", _wrap_Debug, METH_VARARGS, "Debug(char const * msg_class, char const * message)"},
	 { "SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, "SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
	 { "SetCurrentErrorHandlerCatchDebug", _wrap_SetCurrentErrorHandlerCatchDebug, METH_O, "SetCurrentErrorHandlerCatchDebug(int bCatchDebug)"},
	 { "PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, "PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
	 { "PopErrorHandler", _wrap_PopErrorHandler, METH_NOARGS, "PopErrorHandler()"},
	 { "Error", _wrap_Error, METH_VARARGS, "Error(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg=\"error\")"},
	 { "GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_O, "GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"},
	 { "GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, "GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"},
	 { "GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, "GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"},
	 { "ErrorReset", _wrap_ErrorReset, METH_NOARGS, "ErrorReset()"},
	 { "wrapper_EscapeString", (PyCFunction)(void(*)(void))_wrap_wrapper_EscapeString, METH_VARARGS|METH_KEYWORDS, "wrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *"},
	 { "EscapeBinary", (PyCFunction)(void(*)(void))_wrap_EscapeBinary, METH_VARARGS|METH_KEYWORDS, "EscapeBinary(int len, int scheme=CPLES_SQL)"},
	 { "GetLastErrorNo", _wrap_GetLastErrorNo, METH_NOARGS, "GetLastErrorNo() -> int"},
	 { "GetLastErrorType", _wrap_GetLastErrorType, METH_NOARGS, "GetLastErrorType() -> int"},
	 { "GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_NOARGS, "GetLastErrorMsg() -> char const *"},
	 { "GetErrorCounter", _wrap_GetErrorCounter, METH_NOARGS, "GetErrorCounter() -> unsigned int"},
	 { "VSIGetLastErrorNo", _wrap_VSIGetLastErrorNo, METH_NOARGS, "VSIGetLastErrorNo() -> int"},
	 { "VSIGetLastErrorMsg", _wrap_VSIGetLastErrorMsg, METH_NOARGS, "VSIGetLastErrorMsg() -> char const *"},
	 { "VSIErrorReset", _wrap_VSIErrorReset, METH_NOARGS, "VSIErrorReset()"},
	 { "PushFinderLocation", _wrap_PushFinderLocation, METH_O, "PushFinderLocation(char const * utf8_path)"},
	 { "PopFinderLocation", _wrap_PopFinderLocation, METH_NOARGS, "PopFinderLocation()"},
	 { "FinderClean", _wrap_FinderClean, METH_NOARGS, "FinderClean()"},
	 { "FindFile", _wrap_FindFile, METH_VARARGS, "FindFile(char const * pszClass, char const * utf8_path) -> char const *"},
	 { "ReadDir", _wrap_ReadDir, METH_VARARGS, "ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **"},
	 { "ReadDirRecursive", _wrap_ReadDirRecursive, METH_O, "ReadDirRecursive(char const * utf8_path) -> char **"},
	 { "OpenDir", _wrap_OpenDir, METH_VARARGS, "OpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *"},
	 { "DirEntry_name_get", _wrap_DirEntry_name_get, METH_O, "DirEntry_name_get(DirEntry self) -> char *"},
	 { "DirEntry_mode_get", _wrap_DirEntry_mode_get, METH_O, "DirEntry_mode_get(DirEntry self) -> int"},
	 { "DirEntry_size_get", _wrap_DirEntry_size_get, METH_O, "DirEntry_size_get(DirEntry self) -> GIntBig"},
	 { "DirEntry_mtime_get", _wrap_DirEntry_mtime_get, METH_O, "DirEntry_mtime_get(DirEntry self) -> GIntBig"},
	 { "DirEntry_modeKnown_get", _wrap_DirEntry_modeKnown_get, METH_O, "DirEntry_modeKnown_get(DirEntry self) -> bool"},
	 { "DirEntry_sizeKnown_get", _wrap_DirEntry_sizeKnown_get, METH_O, "DirEntry_sizeKnown_get(DirEntry self) -> bool"},
	 { "DirEntry_mtimeKnown_get", _wrap_DirEntry_mtimeKnown_get, METH_O, "DirEntry_mtimeKnown_get(DirEntry self) -> bool"},
	 { "DirEntry_extra_get", _wrap_DirEntry_extra_get, METH_O, "DirEntry_extra_get(DirEntry self) -> char **"},
	 { "new_DirEntry", _wrap_new_DirEntry, METH_O, "new_DirEntry(DirEntry entryIn) -> DirEntry"},
	 { "delete_DirEntry", _wrap_delete_DirEntry, METH_O, "delete_DirEntry(DirEntry self)"},
	 { "DirEntry_IsDirectory", _wrap_DirEntry_IsDirectory, METH_O, "DirEntry_IsDirectory(DirEntry self) -> bool"},
	 { "DirEntry_swigregister", DirEntry_swigregister, METH_O, NULL},
	 { "DirEntry_swiginit", DirEntry_swiginit, METH_VARARGS, NULL},
	 { "GetNextDirEntry", _wrap_GetNextDirEntry, METH_O, "GetNextDirEntry(VSIDIR * dir) -> DirEntry"},
	 { "CloseDir", _wrap_CloseDir, METH_O, "CloseDir(VSIDIR * dir)"},
	 { "SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, "\n"
		"SetConfigOption(char const * pszKey, char const * pszValue)\n"
		"\n"
		"\n"
		"Set the value of a configuration option for all threads.\n"
		"See :cpp:func:`CPLSetConfigOption`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszKey : str\n"
		"    name of the configuration option\n"
		"pszValue : str\n"
		"    value of the configuration option\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`SetThreadLocalConfigOption`\n"
		":py:func:`config_option`\n"
		":py:func:`config_options`\n"
		"\n"
		"\n"
		""},
	 { "SetThreadLocalConfigOption", _wrap_SetThreadLocalConfigOption, METH_VARARGS, "\n"
		"SetThreadLocalConfigOption(char const * pszKey, char const * pszValue)\n"
		"\n"
		"\n"
		"Set the value of a configuration option for the current thread.\n"
		"See :cpp:func:`CPLSetThreadLocalConfigOption`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszKey : str\n"
		"    name of the configuration option\n"
		"pszValue : str\n"
		"    value of the configuration option\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`SetConfigOption`\n"
		":py:func:`config_option`\n"
		":py:func:`config_options`\n"
		"\n"
		""},
	 { "GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, "\n"
		"GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
		"\n"
		"\n"
		"Return the value of a configuration option.\n"
		"See :cpp:func:`CPLGetConfigOption`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszKey : str\n"
		"    name of the configuration option\n"
		"pszDefault : str, optional\n"
		"    default value to return if the option has not been set\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`GetConfigOptions`\n"
		":py:func:`GetThreadLocalConfigOption`\n"
		"\n"
		""},
	 { "GetGlobalConfigOption", _wrap_GetGlobalConfigOption, METH_VARARGS, "\n"
		"GetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
		"\n"
		"\n"
		"Return the value of a global (not thread-local) configuration option.\n"
		"See :cpp:func:`CPLGetGlobalConfigOption`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszKey : str\n"
		"    name of the configuration option\n"
		"pszDefault : str, optional\n"
		"    default value to return if the option has not been set\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		""},
	 { "GetThreadLocalConfigOption", _wrap_GetThreadLocalConfigOption, METH_VARARGS, "\n"
		"GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
		"\n"
		"\n"
		"Return the value of a thread-local configuration option.\n"
		"See :cpp:func:`CPLGetThreadLocalConfigOption`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszKey : str\n"
		"    name of the configuration option\n"
		"pszDefault : str, optional\n"
		"    default value to return if the option has not been set\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"\n"
		""},
	 { "GetConfigOptions", _wrap_GetConfigOptions, METH_NOARGS, "\n"
		"GetConfigOptions() -> char **\n"
		"\n"
		"\n"
		"Return a dictionary of currently set configuration options.\n"
		"See :cpp:func:`CPLGetConfigOptions`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"dict\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.config_options({'A': '3', 'B': '4'}):\n"
		"...     gdal.SetConfigOption('C', '5')\n"
		"...     gdal.GetConfigOptions()\n"
		"...\n"
		"{'C': '5', 'A': '3', 'B': '4'}\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`GetConfigOption`\n"
		":py:func:`GetGlobalConfigOptions`\n"
		"\n"
		""},
	 { "SetPathSpecificOption", _wrap_SetPathSpecificOption, METH_VARARGS, "SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
	 { "SetCredential", _wrap_SetCredential, METH_VARARGS, "SetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
	 { "GetCredential", _wrap_GetCredential, METH_VARARGS, "GetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
	 { "GetPathSpecificOption", _wrap_GetPathSpecificOption, METH_VARARGS, "GetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
	 { "ClearCredentials", _wrap_ClearCredentials, METH_VARARGS, "ClearCredentials(char const * pszPathPrefix=None)"},
	 { "ClearPathSpecificOptions", _wrap_ClearPathSpecificOptions, METH_VARARGS, "ClearPathSpecificOptions(char const * pszPathPrefix=None)"},
	 { "CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_O, "CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"},
	 { "CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, "CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"},
	 { "FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, "FileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL"},
	 { "Unlink", _wrap_Unlink, METH_O, "Unlink(char const * utf8_path) -> VSI_RETVAL"},
	 { "UnlinkBatch", _wrap_UnlinkBatch, METH_O, "UnlinkBatch(char ** files) -> bool"},
	 { "HasThreadSupport", _wrap_HasThreadSupport, METH_NOARGS, "HasThreadSupport() -> int"},
	 { "GetCurrentThreadCount", _wrap_GetCurrentThreadCount, METH_NOARGS, "GetCurrentThreadCount() -> int"},
	 { "Mkdir", _wrap_Mkdir, METH_VARARGS, "Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL"},
	 { "Rmdir", _wrap_Rmdir, METH_O, "Rmdir(char const * utf8_path) -> VSI_RETVAL"},
	 { "MkdirRecursive", _wrap_MkdirRecursive, METH_VARARGS, "MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL"},
	 { "RmdirRecursive", _wrap_RmdirRecursive, METH_O, "RmdirRecursive(char const * utf8_path) -> VSI_RETVAL"},
	 { "Rename", _wrap_Rename, METH_VARARGS, "Rename(char const * old_path, char const * new_path) -> VSI_RETVAL"},
	 { "Move", (PyCFunction)(void(*)(void))_wrap_Move, METH_VARARGS|METH_KEYWORDS, "Move(char const * old_path, char const * new_path, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> VSI_RETVAL"},
	 { "Sync", (PyCFunction)(void(*)(void))_wrap_Sync, METH_VARARGS|METH_KEYWORDS, "Sync(char const * pszSource, char const * pszTarget, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
	 { "AbortPendingUploads", _wrap_AbortPendingUploads, METH_O, "AbortPendingUploads(char const * utf8_path) -> bool"},
	 { "CopyFile", (PyCFunction)(void(*)(void))_wrap_CopyFile, METH_VARARGS|METH_KEYWORDS, "CopyFile(char const * pszSource, char const * pszTarget, VSILFILE fpSource=None, GIntBig nSourceSize=-1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "CopyFileRestartable", _wrap_CopyFileRestartable, METH_VARARGS, "CopyFileRestartable(char const * pszSource, char const * pszTarget, char const * pszInputPayload, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None)"},
	 { "MoveFile", _wrap_MoveFile, METH_VARARGS, "MoveFile(char const * pszSource, char const * pszTarget) -> int"},
	 { "GetActualURL", _wrap_GetActualURL, METH_O, "GetActualURL(char const * utf8_path) -> char const *"},
	 { "GetSignedURL", _wrap_GetSignedURL, METH_VARARGS, "GetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *"},
	 { "GetFileSystemsPrefixes", _wrap_GetFileSystemsPrefixes, METH_NOARGS, "GetFileSystemsPrefixes() -> char **"},
	 { "GetFileSystemOptions", _wrap_GetFileSystemOptions, METH_O, "GetFileSystemOptions(char const * utf8_path) -> char const *"},
	 { "VSILFILE_swigregister", VSILFILE_swigregister, METH_O, NULL},
	 { "StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_O, "StatBuf_mode_get(StatBuf self) -> int"},
	 { "StatBuf_size_get", _wrap_StatBuf_size_get, METH_O, "StatBuf_size_get(StatBuf self) -> GIntBig"},
	 { "StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_O, "StatBuf_mtime_get(StatBuf self) -> GIntBig"},
	 { "new_StatBuf", _wrap_new_StatBuf, METH_O, "new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
	 { "delete_StatBuf", _wrap_delete_StatBuf, METH_O, "delete_StatBuf(StatBuf self)"},
	 { "StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_O, "StatBuf_IsDirectory(StatBuf self) -> int"},
	 { "StatBuf_swigregister", StatBuf_swigregister, METH_O, NULL},
	 { "StatBuf_swiginit", StatBuf_swiginit, METH_VARARGS, NULL},
	 { "VSIStatL", _wrap_VSIStatL, METH_VARARGS, "VSIStatL(char const * utf8_path, int nFlags=0) -> int"},
	 { "GetFileMetadata", _wrap_GetFileMetadata, METH_VARARGS, "GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **"},
	 { "SetFileMetadata", _wrap_SetFileMetadata, METH_VARARGS, "SetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool"},
	 { "VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, "VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE"},
	 { "VSIFOpenExL", _wrap_VSIFOpenExL, METH_VARARGS, "VSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE"},
	 { "VSIFEofL", _wrap_VSIFEofL, METH_O, "VSIFEofL(VSILFILE fp) -> int"},
	 { "VSIFErrorL", _wrap_VSIFErrorL, METH_O, "VSIFErrorL(VSILFILE fp) -> int"},
	 { "VSIFClearErrL", _wrap_VSIFClearErrL, METH_O, "VSIFClearErrL(VSILFILE fp)"},
	 { "VSIFFlushL", _wrap_VSIFFlushL, METH_O, "VSIFFlushL(VSILFILE fp) -> int"},
	 { "VSIFCloseL", _wrap_VSIFCloseL, METH_O, "VSIFCloseL(VSILFILE fp) -> VSI_RETVAL"},
	 { "VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, "VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int"},
	 { "VSIFTellL", _wrap_VSIFTellL, METH_O, "VSIFTellL(VSILFILE fp) -> GIntBig"},
	 { "VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, "VSIFTruncateL(VSILFILE fp, GIntBig length) -> int"},
	 { "VSISupportsSparseFiles", _wrap_VSISupportsSparseFiles, METH_O, "VSISupportsSparseFiles(char const * utf8_path) -> int"},
	 { "VSIFGetRangeStatusL", _wrap_VSIFGetRangeStatusL, METH_VARARGS, "VSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int"},
	 { "VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, "VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int"},
	 { "CPLReadLineL", _wrap_CPLReadLineL, METH_O, "CPLReadLineL(VSILFILE fp) -> char const *"},
	 { "VSICurlClearCache", _wrap_VSICurlClearCache, METH_NOARGS, "VSICurlClearCache()"},
	 { "VSICurlPartialClearCache", _wrap_VSICurlPartialClearCache, METH_O, "VSICurlPartialClearCache(char const * utf8_path)"},
	 { "NetworkStatsReset", _wrap_NetworkStatsReset, METH_NOARGS, "NetworkStatsReset()"},
	 { "NetworkStatsGetAsSerializedJSON", _wrap_NetworkStatsGetAsSerializedJSON, METH_VARARGS, "NetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *"},
	 { "ParseCommandLine", _wrap_ParseCommandLine, METH_O, "ParseCommandLine(char const * utf8_path) -> char **"},
	 { "GetNumCPUs", _wrap_GetNumCPUs, METH_NOARGS, "\n"
		"GetNumCPUs() -> int\n"
		"\n"
		"\n"
		"Return the number of processors detected by GDAL.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"\n"
		""},
	 { "GetUsablePhysicalRAM", _wrap_GetUsablePhysicalRAM, METH_NOARGS, "GetUsablePhysicalRAM() -> GIntBig"},
	 { "MultipartUploadGetCapabilities", _wrap_MultipartUploadGetCapabilities, METH_O, "MultipartUploadGetCapabilities(char const * pszFilename)"},
	 { "MultipartUploadStart", _wrap_MultipartUploadStart, METH_VARARGS, "MultipartUploadStart(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
	 { "MultipartUploadAddPart", _wrap_MultipartUploadAddPart, METH_VARARGS, "MultipartUploadAddPart(char const * pszFilename, char const * pszUploadId, int nPartNumber, GUIntBig nFileOffset, size_t nDataLength, char ** options=None) -> retStringAndCPLFree *"},
	 { "MultipartUploadEnd", _wrap_MultipartUploadEnd, METH_VARARGS, "MultipartUploadEnd(char const * pszFilename, char const * pszUploadId, char ** partIds, GUIntBig nTotalSize, char ** options=None) -> bool"},
	 { "MultipartUploadAbort", _wrap_MultipartUploadAbort, METH_VARARGS, "MultipartUploadAbort(char const * pszFilename, char const * pszUploadId, char ** options=None) -> bool"},
	 { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
	 { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
	 { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
	 { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
	 { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
	 { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
		"MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
		"MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
		""},
	 { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
	 { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
	 { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
	 { "Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_O, "\n"
		"Driver_ShortName_get(Driver self) -> char const *\n"
		"\n"
		"The short name of a :py:class:`Driver` that can be passed to\n"
		":py:func:`GetDriverByName`.\n"
		"See :cpp:func:`GDALGetDriverShortName`.\n"
		"\n"
		""},
	 { "Driver_LongName_get", _wrap_Driver_LongName_get, METH_O, "\n"
		"Driver_LongName_get(Driver self) -> char const *\n"
		"\n"
		"The long name of the driver.\n"
		"See :cpp:func:`GDALGetDriverLongName`.\n"
		"\n"
		""},
	 { "Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_O, "\n"
		"Driver_HelpTopic_get(Driver self) -> char const *\n"
		"\n"
		"The URL for driver documentation, relative to the GDAL documentation directory.\n"
		"See :cpp:func:`GDALGetDriverHelpTopic`.\n"
		"\n"
		""},
	 { "Driver_Create", (PyCFunction)(void(*)(void))_wrap_Driver_Create, METH_VARARGS|METH_KEYWORDS, "\n"
		"Driver_Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset\n"
		"\n"
		"\n"
		"Create a new :py:class:`Dataset` with this driver.\n"
		"See :cpp:func:`GDALDriver::Create`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"   Path of the dataset to create.\n"
		"xsize : int\n"
		"   Width of created raster in pixels. Set to zero for vector datasets.\n"
		"ysize : int\n"
		"   Height of created raster in pixels. Set to zero for vector datasets.\n"
		"bands : int, default = 1\n"
		"    Number of bands. Set to zero for vector datasets.\n"
		"eType : int or numpy.dtype, default = :py:const:`GDT_Byte`\n"
		"    Raster data type. Set to :py:const:`GDT_Unknown` for vector datasets.\n"
		"options : list or dict\n"
		"    List of driver-specific options\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.GetDriverByName('GTiff').Create('test.tif', 12, 4, 2, gdal.GDT_Float32, {'COMPRESS': 'DEFLATE'}) as ds:\n"
		"...     print(gdal.Info(ds))\n"
		"...\n"
		"Driver: GTiff/GeoTIFF\n"
		"Files: test.tif\n"
		"Size is 12, 4\n"
		"Image Structure Metadata:\n"
		"  INTERLEAVE=PIXEL\n"
		"Corner Coordinates:\n"
		"Upper Left  (    0.0,    0.0)\n"
		"Lower Left  (    0.0,    4.0)\n"
		"Upper Right (   12.0,    0.0)\n"
		"Lower Right (   12.0,    4.0)\n"
		"Center      (    6.0,    2.0)\n"
		"Band 1 Block=12x4 Type=Float32, ColorInterp=Gray\n"
		"Band 2 Block=12x4 Type=Float32, ColorInterp=Undefined\n"
		"\n"
		">>> with gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown) as ds:\n"
		"...     print(gdal.VectorInfo(ds))\n"
		"...\n"
		"INFO: Open of `test.shp'\n"
		"      using driver `ESRI Shapefile' successful.\n"
		"\n"
		""},
	 { "Driver_CreateVector", (PyCFunction)(void(*)(void))_wrap_Driver_CreateVector, METH_VARARGS|METH_KEYWORDS, "\n"
		"Driver_CreateVector(Driver self, char const * utf8_path, char ** options=None) -> Dataset\n"
		"\n"
		"\n"
		"Create a new vector :py:class:`Dataset` with this driver.\n"
		"This method is an alias for ``Create(name, 0, 0, 0, gdal.GDT_Unknown)``.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"   Path of the dataset to create.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.GetDriverByName('ESRI Shapefile').CreateVector('test.shp') as ds:\n"
		"...     print(ds.GetLayerCount())\n"
		"... \n"
		"0\n"
		"\n"
		"\n"
		""},
	 { "Driver_CreateMultiDimensional", (PyCFunction)(void(*)(void))_wrap_Driver_CreateMultiDimensional, METH_VARARGS|METH_KEYWORDS, "\n"
		"Driver_CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset\n"
		"\n"
		"\n"
		"Create a new multidimensional dataset.\n"
		"See :cpp:func:`GDALDriver::CreateMultiDimensional`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"   Path of the dataset to create.\n"
		"root_group_options : list or dict\n"
		"   Driver-specific options regarding the creation of the\n"
		"   root group.\n"
		"options : list or dict\n"
		"   List of driver-specific options regarding the creation\n"
		"   of the Dataset.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset\n"
		"\n"
		"Examples\n"
		"--------\n"
		".. testsetup::\n"
		"   >>> if gdal.GetDriverByName('netCDF') is None:\n"
		"   ...     pytest.skip()\n"
		"\n"
		">>> with gdal.GetDriverByName('netCDF').CreateMultiDimensional('test.nc') as ds:\n"
		"...     gdal.MultiDimInfo(ds)\n"
		"...\n"
		"{'type': 'group', 'driver': 'netCDF', 'name': '/', 'attributes': {'Conventions': 'CF-1.6'}, 'structural_info': {'NC_FORMAT': 'NETCDF4'}}\n"
		"\n"
		"\n"
		""},
	 { "Driver_CreateCopy", (PyCFunction)(void(*)(void))_wrap_Driver_CreateCopy, METH_VARARGS|METH_KEYWORDS, "\n"
		"Driver_CreateCopy(Driver self, char const * utf8_path, Dataset src, int strict=1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset\n"
		"\n"
		"\n"
		"Create a copy of a :py:class:`Dataset`.\n"
		"See :cpp:func:`GDALDriver::CreateCopy`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"   Path of the dataset to create.\n"
		"src : Dataset\n"
		"   The dataset being duplicated.\n"
		"strict : bool, default=1\n"
		"   Indicates whether the copy must be strictly equivalent or if\n"
		"   it may be adapted as needed for the output format.\n"
		"options : list or dict\n"
		"   List of driver-specific options\n"
		"callback : callable, optional\n"
		"   A progress callback function\n"
		"callback_data : any, optional\n"
		"   Optional data to be passed to callback function\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset\n"
		"\n"
		""},
	 { "Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, "\n"
		"Driver_Delete(Driver self, char const * utf8_path) -> CPLErr\n"
		"\n"
		"Delete a :py:class:`Dataset`.\n"
		"See :cpp:func:`GDALDriver::Delete`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"   Path of the dataset to delete.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, "\n"
		"Driver_Rename(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
		"\n"
		"Rename a :py:class:`Dataset`.\n"
		"See :cpp:func:`GDALDriver::Rename`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"newName : str\n"
		"    new path for the dataset\n"
		"oldName : str\n"
		"    old path for the dataset\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, "\n"
		"Driver_CopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
		"\n"
		"Copy all the files associated with a :py:class:`Dataset`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"newName : str\n"
		"    new path for the dataset\n"
		"oldName : str\n"
		"    old path for the dataset\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Driver_HasOpenOption", _wrap_Driver_HasOpenOption, METH_VARARGS, "\n"
		"Driver_HasOpenOption(Driver self, char const * openOptionName) -> bool\n"
		"\n"
		"\n"
		"Reports whether the driver supports a specified open option.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"openOptionName : str\n"
		"   The name of the option to test\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"   ``True``, if the option is supported by this driver, ``False`` otherwise.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.GetDriverByName('GPKG').HasOpenOption('PRELUDE_STATEMENTS')\n"
		"True\n"
		">>> gdal.GetDriverByName('GPKG').HasOpenOption('CLOSING_STATEMENTS')\n"
		"False\n"
		"\n"
		"\n"
		""},
	 { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "\n"
		"Driver_TestCapability(Driver self, char const * cap) -> bool\n"
		"\n"
		"\n"
		"Check whether the driver supports a specified capability\n"
		"(:py:const:`ogr.ODrCCreateDataSource` or\n"
		":py:const:`ogr.ODrCDeleteDataSource`)`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"cap : str\n"
		"    The name of the capability to test\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"   ``True`` if the driver supports the capability, ``False`` otherwise.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.GetDriverByName('ESRI Shapefile').TestCapability(ogr.ODrCCreateDataSource)\n"
		"True\n"
		">>> gdal.GetDriverByName('GTiff').TestCapability(ogr.ODrCCreateDataSource)\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "Driver_Register", _wrap_Driver_Register, METH_O, "\n"
		"Driver_Register(Driver self) -> int\n"
		"\n"
		"Register the driver for use.\n"
		"See :cpp:func:`GDALDriverManager::RegisterDriver`.\n"
		"\n"
		""},
	 { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "\n"
		"Driver_Deregister(Driver self)\n"
		"\n"
		"Deregister the driver.\n"
		"See :cpp:func:`GDALDriverManager::DeregisterDriver`.\n"
		"\n"
		""},
	 { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
	 { "ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, "ColorEntry_c1_set(ColorEntry self, short c1)"},
	 { "ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_O, "ColorEntry_c1_get(ColorEntry self) -> short"},
	 { "ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, "ColorEntry_c2_set(ColorEntry self, short c2)"},
	 { "ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_O, "ColorEntry_c2_get(ColorEntry self) -> short"},
	 { "ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, "ColorEntry_c3_set(ColorEntry self, short c3)"},
	 { "ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_O, "ColorEntry_c3_get(ColorEntry self) -> short"},
	 { "ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, "ColorEntry_c4_set(ColorEntry self, short c4)"},
	 { "ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_O, "ColorEntry_c4_get(ColorEntry self) -> short"},
	 { "ColorEntry_swigregister", ColorEntry_swigregister, METH_O, NULL},
	 { "GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, "GCP_GCPX_set(GCP self, double GCPX)"},
	 { "GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_O, "GCP_GCPX_get(GCP self) -> double"},
	 { "GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, "GCP_GCPY_set(GCP self, double GCPY)"},
	 { "GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_O, "GCP_GCPY_get(GCP self) -> double"},
	 { "GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, "GCP_GCPZ_set(GCP self, double GCPZ)"},
	 { "GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_O, "GCP_GCPZ_get(GCP self) -> double"},
	 { "GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, "GCP_GCPPixel_set(GCP self, double GCPPixel)"},
	 { "GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_O, "GCP_GCPPixel_get(GCP self) -> double"},
	 { "GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, "GCP_GCPLine_set(GCP self, double GCPLine)"},
	 { "GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_O, "GCP_GCPLine_get(GCP self) -> double"},
	 { "GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, "GCP_Info_set(GCP self, char * Info)"},
	 { "GCP_Info_get", _wrap_GCP_Info_get, METH_O, "GCP_Info_get(GCP self) -> char *"},
	 { "GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, "GCP_Id_set(GCP self, char * Id)"},
	 { "GCP_Id_get", _wrap_GCP_Id_get, METH_O, "GCP_Id_get(GCP self) -> char *"},
	 { "new_GCP", _wrap_new_GCP, METH_VARARGS, "new_GCP(double x=0.0, double y=0.0, double z=0.0, double pixel=0.0, double line=0.0, char const * info=\"\", char const * id=\"\") -> GCP"},
	 { "delete_GCP", _wrap_delete_GCP, METH_O, "delete_GCP(GCP self)"},
	 { "GCP_swigregister", GCP_swigregister, METH_O, NULL},
	 { "GCP_swiginit", GCP_swiginit, METH_VARARGS, NULL},
	 { "GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_O, "GDAL_GCP_GCPX_get(GCP gcp) -> double"},
	 { "GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, "GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
	 { "GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_O, "GDAL_GCP_GCPY_get(GCP gcp) -> double"},
	 { "GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, "GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
	 { "GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_O, "GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
	 { "GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, "GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
	 { "GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_O, "GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
	 { "GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, "GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
	 { "GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_O, "GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
	 { "GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, "GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
	 { "GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_O, "GDAL_GCP_Info_get(GCP gcp) -> char const *"},
	 { "GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, "GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"},
	 { "GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_O, "GDAL_GCP_Id_get(GCP gcp) -> char const *"},
	 { "GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, "GDAL_GCP_Id_set(GCP gcp, char const * pszId)"},
	 { "GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, "GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"},
	 { "GCPsToHomography", _wrap_GCPsToHomography, METH_O, "GCPsToHomography(int nGCPs) -> RETURN_NONE"},
	 { "delete_VirtualMem", _wrap_delete_VirtualMem, METH_O, "delete_VirtualMem(VirtualMem self)"},
	 { "VirtualMem_GetAddr", _wrap_VirtualMem_GetAddr, METH_O, "VirtualMem_GetAddr(VirtualMem self)"},
	 { "VirtualMem_Pin", _wrap_VirtualMem_Pin, METH_VARARGS, "VirtualMem_Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"},
	 { "VirtualMem_swigregister", VirtualMem_swigregister, METH_O, NULL},
	 { "delete_AsyncReader", _wrap_delete_AsyncReader, METH_O, "delete_AsyncReader(AsyncReader self)"},
	 { "AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, "AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
	 { "AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_O, "AsyncReader_GetBuffer(AsyncReader self)"},
	 { "AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, "AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
	 { "AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_O, "AsyncReader_UnlockBuffer(AsyncReader self)"},
	 { "AsyncReader_swigregister", AsyncReader_swigregister, METH_O, NULL},
	 { "Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_O, "\n"
		"Dataset_RasterXSize_get(Dataset self) -> int\n"
		"\n"
		"\n"
		"Raster width in pixels. See :cpp:func:`GDALGetRasterXSize`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_O, "\n"
		"Dataset_RasterYSize_get(Dataset self) -> int\n"
		"\n"
		"\n"
		"Raster height in pixels. See :cpp:func:`GDALGetRasterYSize`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_O, "\n"
		"Dataset_RasterCount_get(Dataset self) -> int\n"
		"\n"
		"\n"
		"The number of bands in this dataset.\n"
		"\n"
		"\n"
		""},
	 { "delete_Dataset", _wrap_delete_Dataset, METH_O, "delete_Dataset(Dataset self)"},
	 { "Dataset_MarkSuppressOnClose", _wrap_Dataset_MarkSuppressOnClose, METH_O, "Dataset_MarkSuppressOnClose(Dataset self)"},
	 { "Dataset_Close", _wrap_Dataset_Close, METH_O, "\n"
		"Dataset_Close(Dataset self) -> CPLErr\n"
		"\n"
		"Closes opened dataset and releases allocated resources.\n"
		"\n"
		"This method can be used to force the dataset to close\n"
		"when one more references to the dataset are still\n"
		"reachable. If :py:meth:`Close` is never called, the dataset will\n"
		"be closed automatically during garbage collection.\n"
		"\n"
		"In most cases, it is preferable to open or create a dataset\n"
		"using a context manager instead of calling :py:meth:`Close`\n"
		"directly.\n"
		"\n"
		"\n"
		""},
	 { "Dataset__RunCloseWithoutDestroying", _wrap_Dataset__RunCloseWithoutDestroying, METH_O, "Dataset__RunCloseWithoutDestroying(Dataset self) -> CPLErr"},
	 { "Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_O, "\n"
		"Dataset_GetDriver(Dataset self) -> Driver\n"
		"\n"
		"\n"
		"Fetch the driver used to open or create this :py:class:`Dataset`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, "\n"
		"Dataset_GetRasterBand(Dataset self, int nBand) -> Band\n"
		"\n"
		"\n"
		"Fetch a :py:class:`Band` band from a :py:class:`Dataset`. See :cpp:func:`GDALGetRasterBand`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nBand : int\n"
		"    the index of the band to fetch, from 1 to :py:attr:`RasterCount`\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Band\n"
		"    the :py:class:`Band`, or ``None`` on error.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_IsThreadSafe", _wrap_Dataset_IsThreadSafe, METH_VARARGS, "Dataset_IsThreadSafe(Dataset self, int nScopeFlags) -> bool"},
	 { "Dataset_GetThreadSafeDataset", _wrap_Dataset_GetThreadSafeDataset, METH_VARARGS, "Dataset_GetThreadSafeDataset(Dataset self, int nScopeFlags) -> Dataset"},
	 { "Dataset_GetRootGroup", _wrap_Dataset_GetRootGroup, METH_O, "\n"
		"Dataset_GetRootGroup(Dataset self) -> Group\n"
		"\n"
		"\n"
		"Return the root :py:class:`Group` of this dataset.\n"
		"Only value for multidimensional datasets.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Group\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_O, "\n"
		"Dataset_GetProjection(Dataset self) -> char const *\n"
		"\n"
		"\n"
		"Return a WKT representation of the dataset spatial reference.\n"
		"Equivalent to :py:meth:`GetProjectionRef`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_O, "\n"
		"Dataset_GetProjectionRef(Dataset self) -> char const *\n"
		"\n"
		"\n"
		"Return a WKT representation of the dataset spatial reference.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetRefCount", _wrap_Dataset_GetRefCount, METH_O, "Dataset_GetRefCount(Dataset self) -> int"},
	 { "Dataset_GetSummaryRefCount", _wrap_Dataset_GetSummaryRefCount, METH_O, "Dataset_GetSummaryRefCount(Dataset self) -> int"},
	 { "Dataset_GetSpatialRef", _wrap_Dataset_GetSpatialRef, METH_O, "\n"
		"Dataset_GetSpatialRef(Dataset self) -> SpatialReference\n"
		"\n"
		"\n"
		"Fetch the spatial reference for this dataset.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"SpatialReference\n"
		"\n"
		"\n"
		""},
	 { "Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, "\n"
		"Dataset_SetProjection(Dataset self, char const * prj) -> CPLErr\n"
		"\n"
		"\n"
		"Set the spatial reference system for this dataset.\n"
		"\n"
		"See :cpp:func:`GDALDataset::SetProjection`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"prj : str\n"
		"   The projection string in OGC WKT or PROJ.4 format\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_SetSpatialRef", _wrap_Dataset_SetSpatialRef, METH_VARARGS, "\n"
		"Dataset_SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr\n"
		"\n"
		"\n"
		"Set the spatial reference system for this dataset.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"srs : SpatialReference\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetGeoTransform", (PyCFunction)(void(*)(void))_wrap_Dataset_GetGeoTransform, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_GetGeoTransform(Dataset self, int * can_return_null=None)\n"
		"\n"
		"\n"
		"Fetch the affine transformation coefficients.\n"
		"\n"
		"See :cpp:func:`GDALGetGeoTransform`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"can_return_null : bool, default=False\n"
		"    if ``True``, return ``None`` instead of the default transformation\n"
		"    if the transformation for this :py:class:`Dataset` has not been defined.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple\n"
		"    a 6-member tuple representing the transformation coefficients\n"
		"\n"
		"\n"
		"\n"
		""},
	 { "Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, "\n"
		"Dataset_SetGeoTransform(Dataset self, double [6] argin) -> CPLErr\n"
		"\n"
		"\n"
		"Set the affine transformation coefficients.\n"
		"\n"
		"See :py:meth:`GetGeoTransform` for details on the meaning of the coefficients.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"argin : tuple\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetExtent", (PyCFunction)(void(*)(void))_wrap_Dataset_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_GetExtent(Dataset self, SpatialReference srs=None)\n"
		"\n"
		"Get the extent of the dataset.\n"
		"\n"
		"See :cpp:func:`GDALDataset::GetExtent`\n"
		"\n"
		".. versionadded:: 3.12\n"
		"\n"
		".. warning:: Check the return order of the bounds.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"srs : SpatialReference, optional\n"
		"   Optional spatial reference in which the bounds should be \n"
		"   returned. Defaults to ``None``.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple or None\n"
		"    tuple of (minx, maxx, miny, maxy) or None if the extent cannot be\n"
		"    determined in the specified spatial reference system\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> # Get extent in native SRS (NAD27 / UTM 11N)\n"
		">>> with gdal.Open('byte.tif') as ds:\n"
		"...     ds.GetExtent()\n"
		"(440720.0, 441920.0, 3750120.0, 3751320.0)\n"
		"\n"
		">>> # Get extent in US National Atlas Equal Area\n"
		">>> with gdal.Open('byte.tif') as ds:\n"
		"...     ds.GetExtent(osr.SpatialReference(epsg=9311))\n"
		"... \n"
		"(-1621603.0, -1620214.9, -1064263.1, -1062837.1)\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`GetExtentWGS84LongLat`\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetExtentWGS84LongLat", _wrap_Dataset_GetExtentWGS84LongLat, METH_O, "\n"
		"Dataset_GetExtentWGS84LongLat(Dataset self)\n"
		"\n"
		"\n"
		"Return the extent of the dataset in WGS84, with the x-axis representing\n"
		"longitude and the y-axis representing latitude.\n"
		"\n"
		"See :cpp:func:`GDALDataset::GetExtentWGS84LongLat`\n"
		"\n"
		".. versionadded:: 3.12\n"
		"\n"
		".. warning:: Check the return order of the bounds.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple or None\n"
		"    tuple of (minlon, maxlon, minlat, maxlat) or None if the extent cannot be\n"
		"    determined in WGS84\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.Open('byte.tif') as ds:\n"
		"...     ds.GetExtentWGS84LongLat()\n"
		"... \n"
		"(-117.642, -117.629, 33.892, 33.902)\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`GetExtent`\n"
		"\n"
		"\n"
		"\n"
		""},
	 { "Dataset_BuildOverviews", (PyCFunction)(void(*)(void))_wrap_Dataset_BuildOverviews, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_BuildOverviews(Dataset self, char const * resampling=\"NEAREST\", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int\n"
		"\n"
		"\n"
		"Build raster overview(s) for all bands.\n"
		"\n"
		"See :cpp:func:`GDALDataset::BuildOverviews`\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"resampling : str, optional\n"
		"             The resampling method to use. See :cpp:func:`GDALDataset::BuildOverviews`.\n"
		"overviewlist : list\n"
		"             A list of overview levels (decimation factors) to build, or an\n"
		"             empty list to clear existing overviews.\n"
		"callback : callable, optional\n"
		"             A progress callback function\n"
		"callback_data : any, optional\n"
		"             Optional data to be passed to callback function\n"
		"options : dict or list, optional\n"
		"             A dict or list of key=value options\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    :py:const:`CE_Failure` if an error occurs, otherwise\n"
		"    :py:const:`CE_None`.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> import numpy as np\n"
		">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 12, 12)\n"
		">>> ds.GetRasterBand(1).WriteArray(np.arange(12*12).reshape((12, 12)))\n"
		"0\n"
		">>> ds.BuildOverviews('AVERAGE', [2, 4])\n"
		"0\n"
		">>> ds.GetRasterBand(1).GetOverviewCount()\n"
		"2\n"
		">>> ds.BuildOverviews(overviewlist=[])\n"
		"0\n"
		">>> ds.GetRasterBand(1).GetOverviewCount()\n"
		"0\n"
		"\n"
		""},
	 { "Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_O, "\n"
		"Dataset_GetGCPCount(Dataset self) -> int\n"
		"\n"
		"\n"
		"Get number of GCPs. See :cpp:func:`GDALGetGCPCount`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_O, "\n"
		"Dataset_GetGCPProjection(Dataset self) -> char const *\n"
		"\n"
		"\n"
		"Return a WKT representation of the GCP spatial reference.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetGCPSpatialRef", _wrap_Dataset_GetGCPSpatialRef, METH_O, "\n"
		"Dataset_GetGCPSpatialRef(Dataset self) -> SpatialReference\n"
		"\n"
		"\n"
		"Get output spatial reference system for GCPs.\n"
		"\n"
		"See :cpp:func:`GDALGetGCPSpatialRef`\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_O, "\n"
		"Dataset_GetGCPs(Dataset self)\n"
		"\n"
		"\n"
		"Get the GCPs. See :cpp:func:`GDALGetGCPs`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple\n"
		"    a tuple of :py:class:`GCP` objects.\n"
		"\n"
		"\n"
		""},
	 { "Dataset__SetGCPs", _wrap_Dataset__SetGCPs, METH_VARARGS, "\n"
		"Dataset__SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr\n"
		"\n"
		"\n"
		""},
	 { "Dataset__SetGCPs2", _wrap_Dataset__SetGCPs2, METH_VARARGS, "Dataset__SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr"},
	 { "Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_O, "\n"
		"Dataset_FlushCache(Dataset self) -> CPLErr\n"
		"\n"
		"\n"
		"Flush all write-cached data to disk.\n"
		"\n"
		"See :cpp:func:`GDALDataset::FlushCache`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    `gdal.CE_None` in case of success\n"
		"\n"
		""},
	 { "Dataset_AddBand", (PyCFunction)(void(*)(void))_wrap_Dataset_AddBand, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_AddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr\n"
		"\n"
		"\n"
		"Adds a band to a :py:class:`Dataset`.\n"
		"\n"
		"Not supported by all drivers.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"datatype : int\n"
		"    the data type of the pixels in the new band\n"
		"options : dict or list, optional\n"
		"    an optional dict or list of format-specific ``NAME=VALUE`` option strings.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds=gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
		">>> ds.RasterCount\n"
		"1\n"
		">>> ds.AddBand(gdal.GDT_Float32)\n"
		"0\n"
		">>> ds.RasterCount\n"
		"2\n"
		"\n"
		""},
	 { "Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, "\n"
		"Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr\n"
		"\n"
		"\n"
		"Adds a mask band to the dataset.\n"
		"\n"
		"See :cpp:func:`GDALDataset::CreateMaskBand`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"flags : int\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    :py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_O, "\n"
		"Dataset_GetFileList(Dataset self) -> char **\n"
		"\n"
		"\n"
		"Returns a list of files believed to be part of this dataset.\n"
		"See :cpp:func:`GDALGetFileList`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_WriteRaster", (PyCFunction)(void(*)(void))_wrap_Dataset_WriteRaster, METH_VARARGS|METH_KEYWORDS, "Dataset_WriteRaster(Dataset self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GIntBig * buf_band_space=None) -> CPLErr"},
	 { "Dataset_AdviseRead", _wrap_Dataset_AdviseRead, METH_VARARGS, "\n"
		"Dataset_AdviseRead(Dataset self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, char ** options=None) -> CPLErr\n"
		"\n"
		"\n"
		"Advise driver of upcoming read requests.\n"
		"\n"
		"See :cpp:func:`GDALDataset::AdviseRead`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_BeginAsyncReader", (PyCFunction)(void(*)(void))_wrap_Dataset_BeginAsyncReader, METH_VARARGS|METH_KEYWORDS, "Dataset_BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, size_t buf_len, int buf_xsize, int buf_ysize, GDALDataType bufType=(GDALDataType) 0, int band_list=0, int nPixelSpace=0, int nLineSpace=0, int nBandSpace=0, char ** options=None) -> AsyncReader"},
	 { "Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, "Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
	 { "Dataset_GetVirtualMem", (PyCFunction)(void(*)(void))_wrap_Dataset_GetVirtualMem, METH_VARARGS|METH_KEYWORDS, "Dataset_GetVirtualMem(Dataset self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, int band_list, int bIsBandSequential, size_t nCacheSize, size_t nPageSizeHint, char ** options=None) -> VirtualMem"},
	 { "Dataset_GetTiledVirtualMem", (PyCFunction)(void(*)(void))_wrap_Dataset_GetTiledVirtualMem, METH_VARARGS|METH_KEYWORDS, "Dataset_GetTiledVirtualMem(Dataset self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, int band_list, GDALTileOrganization eTileOrganization, size_t nCacheSize, char ** options=None) -> VirtualMem"},
	 { "Dataset_CreateLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_CreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\n"
		"\n"
		"\n"
		"Create a new layer in a vector Dataset.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"       the name for the new layer.  This should ideally not\n"
		"       match any existing layer on the datasource.\n"
		"srs : SpatialReference, optional\n"
		"      The coordinate system to use for the new layer,\n"
		"      or ``None`` if no coordinate system is available. Defaults to ``None``.\n"
		"geom_type : int, default = :py:const:`ogr.wkbUnknown`\n"
		"      geometry type for the layer.  Use :py:const:`ogr.wkbUnknown` if there\n"
		"      are no constraints on the types geometry to be written.\n"
		"options : dict or list, optional\n"
		"      Driver-specific dict or list of name=value options\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Layer or None\n"
		"    The layer object if successful, or ``None`` on failure.\n"
		"\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.GetDriverByName('GPKG').Create('test.gpkg', 0, 0)\n"
		">>> ds.GetLayerCount()\n"
		"0\n"
		">>> lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon)\n"
		">>> ds.GetLayerCount()\n"
		"1\n"
		"\n"
		"\n"
		""},
	 { "Dataset_CreateLayerFromGeomFieldDefn", _wrap_Dataset_CreateLayerFromGeomFieldDefn, METH_VARARGS, "Dataset_CreateLayerFromGeomFieldDefn(Dataset self, char const * name, GeomFieldDefn geom_field, char ** options=None) -> Layer"},
	 { "Dataset_CopyLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
		"\n"
		"\n"
		"Duplicate an existing :py:class:`ogr.Layer`.\n"
		"\n"
		"See :cpp:func:`GDALDataset::CopyLayer`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"src_layer : Layer\n"
		"            source layer\n"
		"new_name : str\n"
		"           name of the layer to create\n"
		"options : dict or list\n"
		"          a dict or list of name=value driver-specific creation options\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Layer or None\n"
		"    A layer if successful, or ``None`` if an error occurs.\n"
		"\n"
		""},
	 { "Dataset_DeleteLayer", _wrap_Dataset_DeleteLayer, METH_VARARGS, "Dataset_DeleteLayer(Dataset self, int index) -> OGRErr"},
	 { "Dataset_IsLayerPrivate", _wrap_Dataset_IsLayerPrivate, METH_VARARGS, "\n"
		"Dataset_IsLayerPrivate(Dataset self, int index) -> bool\n"
		"\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"index : int\n"
		"        Index o layer to check\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"     ``True`` if the layer is a private or system table, ``False`` otherwise\n"
		"\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetNextFeature", (PyCFunction)(void(*)(void))_wrap_Dataset_GetNextFeature, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_GetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature\n"
		"\n"
		"\n"
		"Fetch the next available feature from this dataset.\n"
		"\n"
		"This method is intended for the few drivers where\n"
		":py:meth:`OGRLayer.GetNextFeature` is not efficient, but in general\n"
		":py:meth:`OGRLayer.GetNextFeature` is a more natural API.\n"
		"\n"
		"See :cpp:func:`GDALDataset::GetNextFeature`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Feature\n"
		"\n"
		"\n"
		""},
	 { "Dataset_TestCapability", _wrap_Dataset_TestCapability, METH_VARARGS, "\n"
		"Dataset_TestCapability(Dataset self, char const * cap) -> bool\n"
		"\n"
		"\n"
		"Test if a capability is available.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"cap : str\n"
		"   Name of the capability (e.g., :py:const:`ogr.ODsCTransactions`)\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    ``True`` if the capability is available, ``False`` if invalid or unavailable\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown)\n"
		">>> ds.TestCapability(ogr.ODsCTransactions)\n"
		"False\n"
		">>> ds.TestCapability(ogr.ODsCMeasuredGeometries)\n"
		"True\n"
		">>> ds.TestCapability(gdal.GDsCAddRelationship)\n"
		"False\n"
		"\n"
		"\n"
		""},
	 { "Dataset_ExecuteSQL", (PyCFunction)(void(*)(void))_wrap_Dataset_ExecuteSQL, METH_VARARGS|METH_KEYWORDS, "Dataset_ExecuteSQL(Dataset self, char const * statement, Geometry spatialFilter=None, char const * dialect=\"\") -> Layer"},
	 { "Dataset_ReleaseResultSet", _wrap_Dataset_ReleaseResultSet, METH_VARARGS, "Dataset_ReleaseResultSet(Dataset self, Layer layer)"},
	 { "Dataset_GetStyleTable", _wrap_Dataset_GetStyleTable, METH_O, "\n"
		"Dataset_GetStyleTable(Dataset self) -> StyleTable\n"
		"\n"
		"\n"
		"Returns dataset style table.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"StyleTable\n"
		"\n"
		"\n"
		""},
	 { "Dataset_SetStyleTable", _wrap_Dataset_SetStyleTable, METH_VARARGS, "\n"
		"Dataset_SetStyleTable(Dataset self, StyleTable table)\n"
		"\n"
		"\n"
		"Set dataset style table\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"table : StyleTable\n"
		"\n"
		""},
	 { "Dataset_GetLayerByIndex", _wrap_Dataset_GetLayerByIndex, METH_VARARGS, "\n"
		"Dataset_GetLayerByIndex(Dataset self, int index=0) -> Layer\n"
		"\n"
		"\n"
		"Fetch a layer by index.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"index : int\n"
		"    A layer number between 0 and ``GetLayerCount() - 1``\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Layer or None\n"
		"    An layer if successful, or ``None`` on error.\n"
		"\n"
		""},
	 { "Dataset_GetLayerByName", _wrap_Dataset_GetLayerByName, METH_VARARGS, "Dataset_GetLayerByName(Dataset self, char const * layer_name) -> Layer"},
	 { "Dataset_ResetReading", _wrap_Dataset_ResetReading, METH_O, "\n"
		"Dataset_ResetReading(Dataset self)\n"
		"\n"
		"\n"
		"Reset feature reading to start on the first feature.\n"
		"\n"
		"This affects :py:meth:`GetNextFeature`.\n"
		"\n"
		"Depending on drivers, this may also have the side effect of calling\n"
		":py:meth:`OGRLayer.ResetReading` on the layers of this dataset.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetLayerCount", _wrap_Dataset_GetLayerCount, METH_O, "\n"
		"Dataset_GetLayerCount(Dataset self) -> int\n"
		"\n"
		"\n"
		"Get the number of layers in this dataset.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"\n"
		"\n"
		""},
	 { "Dataset_AbortSQL", _wrap_Dataset_AbortSQL, METH_O, "\n"
		"Dataset_AbortSQL(Dataset self) -> OGRErr\n"
		"\n"
		"\n"
		"Abort any SQL statement running in the data store.\n"
		"\n"
		"Not implemented by all drivers. See :cpp:func:`GDALDataset::AbortSQL`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    :py:const:`ogr.OGRERR_NONE` on success, or\n"
		"    :py:const:`ogr.OGRERR_UNSUPPORTED_OPERATION` if AbortSQL is not supported\n"
		"    for this dataset.\n"
		"\n"
		""},
	 { "Dataset_StartTransaction", (PyCFunction)(void(*)(void))_wrap_Dataset_StartTransaction, METH_VARARGS|METH_KEYWORDS, "\n"
		"Dataset_StartTransaction(Dataset self, int force=FALSE) -> OGRErr\n"
		"\n"
		"\n"
		"Creates a transaction. See :cpp:func:`GDALDataset::StartTransaction`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    If starting the transaction fails, will return\n"
		"    :py:const:`ogr.OGRERR_FAILURE`. Datasources which do not support transactions will\n"
		"    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_CommitTransaction", _wrap_Dataset_CommitTransaction, METH_O, "\n"
		"Dataset_CommitTransaction(Dataset self) -> OGRErr\n"
		"\n"
		"Commits a transaction, for `Datasets` that support transactions.\n"
		"\n"
		"See :cpp:func:`GDALDataset::CommitTransaction`.\n"
		"\n"
		""},
	 { "Dataset_RollbackTransaction", _wrap_Dataset_RollbackTransaction, METH_O, "\n"
		"Dataset_RollbackTransaction(Dataset self) -> OGRErr\n"
		"\n"
		"\n"
		"Roll back a Dataset to its state before the start of the current transaction.\n"
		"\n"
		"For datasets that support transactions.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    If no transaction is active, or the rollback fails, will return\n"
		"    :py:const:`OGRERR_FAILURE`. Datasources which do not support transactions will\n"
		"    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_ClearStatistics", _wrap_Dataset_ClearStatistics, METH_O, "\n"
		"Dataset_ClearStatistics(Dataset self)\n"
		"\n"
		"\n"
		"Clear statistics\n"
		"\n"
		"See :cpp:func:`GDALDataset::ClearStatistics`.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetFieldDomainNames", _wrap_Dataset_GetFieldDomainNames, METH_VARARGS, "\n"
		"Dataset_GetFieldDomainNames(Dataset self, char ** options=None) -> char **\n"
		"\n"
		"\n"
		"Get a list of the names of all field domains stored in the dataset.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"options : dict or list, optional\n"
		"         Driver-specific options determining how attributes should\n"
		"         be retrieved.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list or None\n"
		"    ``None`` if no field domains are stored in the dataset.\n"
		"\n"
		""},
	 { "Dataset_GetFieldDomain", _wrap_Dataset_GetFieldDomain, METH_VARARGS, "\n"
		"Dataset_GetFieldDomain(Dataset self, char const * name) -> FieldDomain\n"
		"\n"
		"\n"
		"Get a field domain from its name.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"      The name of the field domain\n"
		"\n"
		"Returns\n"
		"-------\n"
		"FieldDomain or None\n"
		"    An FieldDomain instance if found, or ``None`` if it is not found.\n"
		"\n"
		""},
	 { "Dataset_AddFieldDomain", _wrap_Dataset_AddFieldDomain, METH_VARARGS, "\n"
		"Dataset_AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
		"\n"
		"\n"
		"Add a :py:class:`ogr.FieldDomain` to the dataset.\n"
		"\n"
		"Only a few drivers support this operation. See :cpp:func:`GDALDataset::AddFieldDomain`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"fieldDomain : FieldDomain\n"
		"    The field domain to add\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    ``True`` if the field domain was added, ``False`` in case of error.\n"
		"\n"
		"\n"
		"\n"
		""},
	 { "Dataset_DeleteFieldDomain", _wrap_Dataset_DeleteFieldDomain, METH_VARARGS, "\n"
		"Dataset_DeleteFieldDomain(Dataset self, char const * name) -> bool\n"
		"\n"
		"\n"
		"Removes a field domain from the Dataset.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"       Name of the field domain to delete\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"     ``True`` if the field domain was removed, otherwise ``False``.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_UpdateFieldDomain", _wrap_Dataset_UpdateFieldDomain, METH_VARARGS, "\n"
		"Dataset_UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
		"\n"
		"\n"
		"Update an existing field domain by replacing its definition.\n"
		"\n"
		"The existing field domain with matching name will be replaced.\n"
		"\n"
		"Requires the :py:const:`ogr.ODsCUpdateFieldDomain` dataset capability.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"fieldDomain : FieldDomain\n"
		"    Updated field domain.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    ``True`` in case of success\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetRelationshipNames", _wrap_Dataset_GetRelationshipNames, METH_VARARGS, "\n"
		"Dataset_GetRelationshipNames(Dataset self, char ** options=None) -> char **\n"
		"\n"
		"\n"
		"Get a list of the names of all relationships stored in the dataset.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"options : dict or list, optional\n"
		"    driver-specific options determining how the relationships should be retrieved\n"
		"\n"
		"\n"
		""},
	 { "Dataset_GetRelationship", _wrap_Dataset_GetRelationship, METH_VARARGS, "\n"
		"Dataset_GetRelationship(Dataset self, char const * name) -> Relationship\n"
		"\n"
		"\n"
		"Get a relationship from its name.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Relationship, or ``None`` if not found.\n"
		"\n"
		""},
	 { "Dataset_AddRelationship", _wrap_Dataset_AddRelationship, METH_VARARGS, "\n"
		"Dataset_AddRelationship(Dataset self, Relationship relationship) -> bool\n"
		"\n"
		"\n"
		"Add a :py:class:`Relationship` to the dataset.\n"
		"\n"
		"See :cpp:func:`GDALDataset::AddRelationship`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"relationship : Relationship\n"
		"               The relationship to add\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    ``True`` if the field domain was added, ``False`` in case of error.\n"
		"\n"
		"\n"
		""},
	 { "Dataset_DeleteRelationship", _wrap_Dataset_DeleteRelationship, METH_VARARGS, "\n"
		"Dataset_DeleteRelationship(Dataset self, char const * name) -> bool\n"
		"\n"
		"\n"
		"Removes a relationship from the Dataset.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"       Name of the relationship to remove.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"     ``True`` if the relationship  was removed, otherwise ``False``.\n"
		"\n"
		"\n"
		"\n"
		""},
	 { "Dataset_UpdateRelationship", _wrap_Dataset_UpdateRelationship, METH_VARARGS, "\n"
		"Dataset_UpdateRelationship(Dataset self, Relationship relationship) -> bool\n"
		"\n"
		"\n"
		"Update an existing relationship by replacing its definition.\n"
		"\n"
		"The existing relationship with matching name will be replaced.\n"
		"\n"
		"Requires the :py:const:`gdal.GDsCUpdateFieldDomain` dataset capability.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"relationship : Relationship\n"
		"    Updated relationship\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    ``True`` in case of success\n"
		"\n"
		"\n"
		""},
	 { "Dataset_AsMDArray", _wrap_Dataset_AsMDArray, METH_VARARGS, "Dataset_AsMDArray(Dataset self, char ** options=None) -> MDArray"},
	 { "Dataset_ReadRaster1", (PyCFunction)(void(*)(void))_wrap_Dataset_ReadRaster1, METH_VARARGS|METH_KEYWORDS, "Dataset_ReadRaster1(Dataset self, double xoff, double yoff, double xsize, double ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GIntBig * buf_band_space=None, GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour, GDALProgressFunc callback=0, void * callback_data=None, void * inputOutputBuf=None) -> CPLErr"},
	 { "Dataset_swigregister", Dataset_swigregister, METH_O, NULL},
	 { "RATDateTime_nYear_set", _wrap_RATDateTime_nYear_set, METH_VARARGS, "RATDateTime_nYear_set(RATDateTime self, int nYear)"},
	 { "RATDateTime_nYear_get", _wrap_RATDateTime_nYear_get, METH_O, "RATDateTime_nYear_get(RATDateTime self) -> int"},
	 { "RATDateTime_nMonth_set", _wrap_RATDateTime_nMonth_set, METH_VARARGS, "RATDateTime_nMonth_set(RATDateTime self, int nMonth)"},
	 { "RATDateTime_nMonth_get", _wrap_RATDateTime_nMonth_get, METH_O, "RATDateTime_nMonth_get(RATDateTime self) -> int"},
	 { "RATDateTime_nDay_set", _wrap_RATDateTime_nDay_set, METH_VARARGS, "RATDateTime_nDay_set(RATDateTime self, int nDay)"},
	 { "RATDateTime_nDay_get", _wrap_RATDateTime_nDay_get, METH_O, "RATDateTime_nDay_get(RATDateTime self) -> int"},
	 { "RATDateTime_nHour_set", _wrap_RATDateTime_nHour_set, METH_VARARGS, "RATDateTime_nHour_set(RATDateTime self, int nHour)"},
	 { "RATDateTime_nHour_get", _wrap_RATDateTime_nHour_get, METH_O, "RATDateTime_nHour_get(RATDateTime self) -> int"},
	 { "RATDateTime_nMinute_set", _wrap_RATDateTime_nMinute_set, METH_VARARGS, "RATDateTime_nMinute_set(RATDateTime self, int nMinute)"},
	 { "RATDateTime_nMinute_get", _wrap_RATDateTime_nMinute_get, METH_O, "RATDateTime_nMinute_get(RATDateTime self) -> int"},
	 { "RATDateTime_fSecond_set", _wrap_RATDateTime_fSecond_set, METH_VARARGS, "RATDateTime_fSecond_set(RATDateTime self, float fSecond)"},
	 { "RATDateTime_fSecond_get", _wrap_RATDateTime_fSecond_get, METH_O, "RATDateTime_fSecond_get(RATDateTime self) -> float"},
	 { "RATDateTime_nTimeZoneHour_set", _wrap_RATDateTime_nTimeZoneHour_set, METH_VARARGS, "RATDateTime_nTimeZoneHour_set(RATDateTime self, int nTimeZoneHour)"},
	 { "RATDateTime_nTimeZoneHour_get", _wrap_RATDateTime_nTimeZoneHour_get, METH_O, "RATDateTime_nTimeZoneHour_get(RATDateTime self) -> int"},
	 { "RATDateTime_nTimeZoneMinute_set", _wrap_RATDateTime_nTimeZoneMinute_set, METH_VARARGS, "RATDateTime_nTimeZoneMinute_set(RATDateTime self, int nTimeZoneMinute)"},
	 { "RATDateTime_nTimeZoneMinute_get", _wrap_RATDateTime_nTimeZoneMinute_get, METH_O, "RATDateTime_nTimeZoneMinute_get(RATDateTime self) -> int"},
	 { "RATDateTime_bPositiveTimeZone_set", _wrap_RATDateTime_bPositiveTimeZone_set, METH_VARARGS, "RATDateTime_bPositiveTimeZone_set(RATDateTime self, bool bPositiveTimeZone)"},
	 { "RATDateTime_bPositiveTimeZone_get", _wrap_RATDateTime_bPositiveTimeZone_get, METH_O, "RATDateTime_bPositiveTimeZone_get(RATDateTime self) -> bool"},
	 { "RATDateTime_bIsValid_set", _wrap_RATDateTime_bIsValid_set, METH_VARARGS, "RATDateTime_bIsValid_set(RATDateTime self, bool bIsValid)"},
	 { "RATDateTime_bIsValid_get", _wrap_RATDateTime_bIsValid_get, METH_O, "RATDateTime_bIsValid_get(RATDateTime self) -> bool"},
	 { "new_RATDateTime", _wrap_new_RATDateTime, METH_NOARGS, "new_RATDateTime() -> RATDateTime"},
	 { "delete_RATDateTime", _wrap_delete_RATDateTime, METH_O, "delete_RATDateTime(RATDateTime self)"},
	 { "RATDateTime_swigregister", RATDateTime_swigregister, METH_O, NULL},
	 { "RATDateTime_swiginit", RATDateTime_swiginit, METH_VARARGS, NULL},
	 { "new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_NOARGS, "new_RasterAttributeTable() -> RasterAttributeTable"},
	 { "delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_O, "delete_RasterAttributeTable(RasterAttributeTable self)"},
	 { "RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_O, "\n"
		"RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable\n"
		"\n"
		"\n"
		"Create a copy of the RAT.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"RasterAttributeTable\n"
		"    A Python proxy of a :cpp:class:`GDALRasterAttributeTable`\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_O, "\n"
		"RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int\n"
		"\n"
		"\n"
		"Return the number of columns in the RAT. \n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetColumnCount`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    The number of columns in the RAT\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.Open('testrat.tif') as ds:\n"
		"...     ds.GetRasterBand(1).GetDefaultRAT().GetColumnCount()\n"
		"... \n"
		"9\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, "\n"
		"RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *\n"
		"\n"
		"\n"
		"Get the name of a specified column (0-indexed).\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetNameOfCol`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iCol : int\n"
		"    The index of the column (starting at 0)\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"    The name of the column\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> [rat.GetNameOfCol(i) for i in range(rat.GetColumnCount())]\n"
		"['VALUE', 'COUNT', 'CLASS', 'Red', 'Green', 'Blue', 'OtherInt', 'OtherReal', 'OtherStr']\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, "\n"
		"RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage\n"
		"\n"
		"\n"
		"Return the usage of a column in the RAT.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetUsageOfCol`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iCol : int\n"
		"    The index of the column (starting at 0)\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    Usage code for the specified column\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> [rat.GetUsageOfCol(i) for i in range(rat.GetColumnCount())]\n"
		"[5, 1, 2, 6, 7, 8, 0, 0, 0]\n"
		">>> [rat.GetUsageOfCol(i) == gdal.GFU_Red for i in range(rat.GetColumnCount())]\n"
		"[False, False, False, True, False, False, False, False, False]\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, "\n"
		"RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType\n"
		"\n"
		"\n"
		"Return the data type of a column in the RAT (one of :py:const:`GFT_Integer`, :py:const:`GFT_Real`, or :py:const:`GFT_String`).\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetTypeOfCol`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iCol : int\n"
		"    The index of the column (starting at 0)\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    type code for the specified column\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> rat.GetTypeOfCol(2) == gdal.GFT_String\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, "\n"
		"RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int\n"
		"\n"
		"\n"
		"Return the first column of a specified usage the a RAT.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetColOfUsage`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"eUsage : int\n"
		"    Usage code such as :py:const:`gdal.GFU_Red`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    Index of the column, or -1 if no such column can be found.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> rat.GetColOfUsage(gdal.GFU_Name)\n"
		"2\n"
		">>> rat.GetColOfUsage(gdal.GFU_RedMin)\n"
		"-1\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_O, "\n"
		"RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int\n"
		"\n"
		"\n"
		"Return the number of rows in the RAT. \n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetRowCount`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    The number of rows in the RAT\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.Open('testrat.tif') as ds:\n"
		"...     ds.GetRasterBand(1).GetDefaultRAT().GetRowCount()\n"
		"... \n"
		"2\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, "\n"
		"RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *\n"
		"\n"
		"\n"
		"Get the value of a single cell in the RAT.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iRow : int\n"
		"    Row index (0-based)\n"
		"iCol : int\n"
		"    Column index (0-based)\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, "\n"
		"RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int\n"
		"\n"
		"\n"
		"Get the value of a single cell in the RAT.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iRow : int\n"
		"    Row index (0-based)\n"
		"iCol : int\n"
		"    Column index (0-based)\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, "\n"
		"RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double\n"
		"\n"
		"\n"
		"Get the value of a single cell in the RAT.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iRow : int\n"
		"    Row index (0-based)\n"
		"iCol : int\n"
		"    Column index (0-based)\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetValueAsBoolean", _wrap_RasterAttributeTable_GetValueAsBoolean, METH_VARARGS, "RasterAttributeTable_GetValueAsBoolean(RasterAttributeTable self, int iRow, int iCol) -> bool"},
	 { "RasterAttributeTable_GetValueAsDateTime", _wrap_RasterAttributeTable_GetValueAsDateTime, METH_VARARGS, "RasterAttributeTable_GetValueAsDateTime(RasterAttributeTable self, int iRow, int iCol) -> RATDateTime"},
	 { "RasterAttributeTable_GetValueAsWKBGeometry", _wrap_RasterAttributeTable_GetValueAsWKBGeometry, METH_VARARGS, "RasterAttributeTable_GetValueAsWKBGeometry(RasterAttributeTable self, int iRow, int iCol) -> CPLErr"},
	 { "RasterAttributeTable_SetValueAsWKBGeometry", _wrap_RasterAttributeTable_SetValueAsWKBGeometry, METH_VARARGS, "RasterAttributeTable_SetValueAsWKBGeometry(RasterAttributeTable self, int iRow, int iCol, int nLen) -> CPLErr"},
	 { "RasterAttributeTable_ReadValuesIOAsString", _wrap_RasterAttributeTable_ReadValuesIOAsString, METH_VARARGS, "\n"
		"RasterAttributeTable_ReadValuesIOAsString(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
		"\n"
		"\n"
		"Read a single column of a RAT into a list of strings.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iField : int\n"
		"    The index of the column (starting at 0)\n"
		"iStartRow : int, default = 0\n"
		"    The index of the first row to read (starting at 0)\n"
		"iLength : int, default = None\n"
		"    The number of rows to read \n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> rat.ReadValuesIOAsString(2, 0, 2)\n"
		"['my class', 'my class2']\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`ReadAsArray`\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_ReadValuesIOAsInteger", _wrap_RasterAttributeTable_ReadValuesIOAsInteger, METH_VARARGS, "\n"
		"RasterAttributeTable_ReadValuesIOAsInteger(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
		"\n"
		"\n"
		"Read a single column of a RAT into a list of ints.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iField : int\n"
		"    The index of the column (starting at 0)\n"
		"iStartRow : int, default = 0\n"
		"    The index of the first row to read (starting at 0)\n"
		"iLength : int, default = None\n"
		"    The number of rows to read \n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> rat.ReadValuesIOAsInteger(3, 0, 2)\n"
		"[26, 26]\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`ReadAsArray`\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_ReadValuesIOAsDouble", _wrap_RasterAttributeTable_ReadValuesIOAsDouble, METH_VARARGS, "\n"
		"RasterAttributeTable_ReadValuesIOAsDouble(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
		"\n"
		"\n"
		"Read a single column of a RAT into a list of floats.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iField : int\n"
		"    The index of the column (starting at 0)\n"
		"iStartRow : int, default = 0\n"
		"    The index of the first row to read (starting at 0)\n"
		"iLength : int, default = None\n"
		"    The number of rows to read \n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> rat.ReadValuesIOAsDouble(3, 0, 2)\n"
		"[26.0, 26.0]\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`ReadAsArray`\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_ReadValuesIOAsBoolean", _wrap_RasterAttributeTable_ReadValuesIOAsBoolean, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsBoolean(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
	 { "RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, "\n"
		"RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)\n"
		"\n"
		"\n"
		"Set the value of a single cell in the RAT.\n"
		"\n"
		"If ``iRow`` is equal to the number of rows in the table, the table\n"
		"size will be increased by one. However, it is more efficient to\n"
		"call :py:meth:`SetRowCount` before repeated insertions.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iRow : int\n"
		"    Row index (0-based)\n"
		"iCol : int\n"
		"    Column index (0-based)\n"
		"pszValue : str\n"
		"    Cell value\n"
		"\n"
		""},
	 { "RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, "\n"
		"RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)\n"
		"\n"
		"\n"
		"Set the value of a single cell in the RAT.\n"
		"\n"
		"If ``iRow`` is equal to the number of rows in the table, the table\n"
		"size will be increased by one. However, it is more efficient to\n"
		"call :py:meth:`SetRowCount` before repeated insertions.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iRow : int\n"
		"    Row index (0-based)\n"
		"iCol : int\n"
		"    Column index (0-based)\n"
		"nValue : int\n"
		"    Cell value\n"
		"\n"
		""},
	 { "RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, "\n"
		"RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)\n"
		"\n"
		"\n"
		"Set the value of a single cell in the RAT.\n"
		"\n"
		"If ``iRow`` is equal to the number of rows in the table, the table\n"
		"size will be increased by one. However, it is more efficient to\n"
		"call :py:meth:`SetRowCount` before repeated insertions.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"iRow : int\n"
		"    Row index (0-based)\n"
		"iCol : int\n"
		"    Column index (0-based)\n"
		"dfValue : float\n"
		"    Cell value\n"
		"\n"
		""},
	 { "RasterAttributeTable_SetValueAsBoolean", _wrap_RasterAttributeTable_SetValueAsBoolean, METH_VARARGS, "RasterAttributeTable_SetValueAsBoolean(RasterAttributeTable self, int iRow, int iCol, bool value)"},
	 { "RasterAttributeTable_SetValueAsDateTime", _wrap_RasterAttributeTable_SetValueAsDateTime, METH_VARARGS, "RasterAttributeTable_SetValueAsDateTime(RasterAttributeTable self, int iRow, int iCol, RATDateTime value)"},
	 { "RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, "\n"
		"RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)\n"
		"\n"
		"\n"
		"Resizes the table to include the indicated number of rows. Newly created\n"
		"rows will be initialized to '' for strings and zero for numeric fields.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::SetRowCount`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nCount : int\n"
		"   The number of rows in the resized table\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, "\n"
		"RasterAttributeTable_CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int\n"
		"\n"
		"\n"
		"Create a new column in the RAT.\n"
		"\n"
		"If the table already has rows, all row values for the new column will\n"
		"be initialized to the default value ('', or zero).  The new column is\n"
		"always created as the last column.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszName : str\n"
		"    Name of the new column\n"
		"eType : int\n"
		"    Data type of the new column (one of :py:const:`GFT_Integer`, :py:const:`GFT_Real`, or :py:const:`GFT_String`).\n"
		"eUsage : int\n"
		"    Usage of the new column (see :cpp:enum:`GDALRATFieldUsage`)\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_O, "\n"
		"RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool\n"
		"\n"
		"\n"
		"Get linear binning information, if any.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetLinearBinning`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"   a three-element list indicating whether linear binning information\n"
		"   is available, the minimum value associated with the smallest bin,\n"
		"   and the size of each bin.\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, "\n"
		"RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int\n"
		"\n"
		"\n"
		"Set linear binning information.\n"
		"\n"
		"This can be used to provide optimized table look-ups (via\n"
		":py:meth:`GetRowOfValue`) when the rows of the table represent\n"
		"uniformly sized bins. \n"
		"\n"
		"It is the responsibility of the user to actually define the \n"
		"appropriate bins. If the bins do not correspond to the provided\n"
		"binning information, lookup values will be incorrect.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::SetLinearBinning`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"dfRow0Min : float\n"
		"    Minimum value associated with the smallest bin   \n"
		"dfBinSize : float\n"
		"    Size of each bin\n"
		"\n"
		""},
	 { "RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, "\n"
		"RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int\n"
		"\n"
		"\n"
		"Return the index of the row that applies to a specific value,\n"
		"or -1 of no such row exists.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetRowOfValue`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"dfValue : float\n"
		"    Value for which a row should be found\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    Index of the row (0-based), or -1 of no row was found\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('testrat.tif')\n"
		">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
		">>> rat.GetValueAsString(rat.GetRowOfValue(2), 2)\n"
		"'my class2'\n"
		">>> rat.GetValueAsString(rat.GetRowOfValue(802), 2)\n"
		"''\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`SetLinearBinning`\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_ChangesAreWrittenToFile", _wrap_RasterAttributeTable_ChangesAreWrittenToFile, METH_O, "RasterAttributeTable_ChangesAreWrittenToFile(RasterAttributeTable self) -> int"},
	 { "RasterAttributeTable_DumpReadable", _wrap_RasterAttributeTable_DumpReadable, METH_O, "\n"
		"RasterAttributeTable_DumpReadable(RasterAttributeTable self)\n"
		"\n"
		"\n"
		"Return an XML representation of the RAT.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_SetTableType", _wrap_RasterAttributeTable_SetTableType, METH_VARARGS, "\n"
		"RasterAttributeTable_SetTableType(RasterAttributeTable self, GDALRATTableType eTableType)\n"
		"\n"
		"\n"
		"Set the type of the RAT (thematic or athematic).\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"eTableType : int\n"
		"   Table type (:py:const:`GRTT_THEMATIC` or :py:const:`GRTT_ATHEMATIC`)    \n"
		"\n"
		""},
	 { "RasterAttributeTable_GetTableType", _wrap_RasterAttributeTable_GetTableType, METH_O, "\n"
		"RasterAttributeTable_GetTableType(RasterAttributeTable self) -> GDALRATTableType\n"
		"\n"
		"\n"
		"Returns the type of the RAT (:py:const:`GRTT_THEMATIC` or :py:const:`GRTT_ATHEMATIC`).\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::GetTableType`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    table type code\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_RemoveStatistics", _wrap_RasterAttributeTable_RemoveStatistics, METH_O, "\n"
		"RasterAttributeTable_RemoveStatistics(RasterAttributeTable self)\n"
		"\n"
		"\n"
		"Remove statistics information, such as a histogram, from the RAT.\n"
		"\n"
		"See :cpp:func:`GDALRasterAttributeTable::RemoveStatistics`.\n"
		"\n"
		"\n"
		""},
	 { "RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_O, NULL},
	 { "RasterAttributeTable_swiginit", RasterAttributeTable_swiginit, METH_VARARGS, NULL},
	 { "delete_Group", _wrap_delete_Group, METH_O, "delete_Group(Group self)"},
	 { "Group_GetName", _wrap_Group_GetName, METH_O, "Group_GetName(Group self) -> char const *"},
	 { "Group_GetFullName", _wrap_Group_GetFullName, METH_O, "Group_GetFullName(Group self) -> char const *"},
	 { "Group_GetMDArrayNames", _wrap_Group_GetMDArrayNames, METH_VARARGS, "Group_GetMDArrayNames(Group self, char ** options=None) -> char **"},
	 { "Group_GetMDArrayFullNamesRecursive", _wrap_Group_GetMDArrayFullNamesRecursive, METH_VARARGS, "Group_GetMDArrayFullNamesRecursive(Group self, char ** groupOptions=None, char ** arrayOptions=None) -> char **"},
	 { "Group_OpenMDArray", _wrap_Group_OpenMDArray, METH_VARARGS, "Group_OpenMDArray(Group self, char const * name, char ** options=None) -> MDArray"},
	 { "Group_OpenMDArrayFromFullname", _wrap_Group_OpenMDArrayFromFullname, METH_VARARGS, "Group_OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray"},
	 { "Group_ResolveMDArray", _wrap_Group_ResolveMDArray, METH_VARARGS, "Group_ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray"},
	 { "Group_GetGroupNames", _wrap_Group_GetGroupNames, METH_VARARGS, "Group_GetGroupNames(Group self, char ** options=None) -> char **"},
	 { "Group_OpenGroup", _wrap_Group_OpenGroup, METH_VARARGS, "Group_OpenGroup(Group self, char const * name, char ** options=None) -> Group"},
	 { "Group_OpenGroupFromFullname", _wrap_Group_OpenGroupFromFullname, METH_VARARGS, "Group_OpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group"},
	 { "Group_GetVectorLayerNames", _wrap_Group_GetVectorLayerNames, METH_VARARGS, "Group_GetVectorLayerNames(Group self, char ** options=None) -> char **"},
	 { "Group_OpenVectorLayer", _wrap_Group_OpenVectorLayer, METH_VARARGS, "Group_OpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer"},
	 { "Group_GetDimensions", _wrap_Group_GetDimensions, METH_VARARGS, "Group_GetDimensions(Group self, char ** options=None)"},
	 { "Group_GetAttribute", _wrap_Group_GetAttribute, METH_VARARGS, "Group_GetAttribute(Group self, char const * name) -> Attribute"},
	 { "Group_GetAttributes", _wrap_Group_GetAttributes, METH_VARARGS, "Group_GetAttributes(Group self, char ** options=None)"},
	 { "Group_GetStructuralInfo", _wrap_Group_GetStructuralInfo, METH_O, "Group_GetStructuralInfo(Group self) -> char **"},
	 { "Group_CreateGroup", (PyCFunction)(void(*)(void))_wrap_Group_CreateGroup, METH_VARARGS|METH_KEYWORDS, "Group_CreateGroup(Group self, char const * name, char ** options=None) -> Group"},
	 { "Group_DeleteGroup", _wrap_Group_DeleteGroup, METH_VARARGS, "Group_DeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr"},
	 { "Group_CreateDimension", (PyCFunction)(void(*)(void))_wrap_Group_CreateDimension, METH_VARARGS|METH_KEYWORDS, "\n"
		"Group_CreateDimension(Group self, char const * name, char const * dim_type, char const * direction, GUIntBig size, char ** options=None) -> Dimension\n"
		"\n"
		"\n"
		"Create a dimension within a :py:class:`Group`.\n"
		"\n"
		"See :cpp:func:`GDALGroup::CreateDimension`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"    Dimension name\n"
		"dim_type : str\n"
		"    Dimension type (might be empty, and ignored by drivers)\n"
		"direction : str\n"
		"    Dimension direction (might be empty, and ignored by drivers)\n"
		"size : int\n"
		"    Number of values indexed by this dimension. Should be > 0\n"
		"options : dict or list, optional\n"
		"    dict or list of driver specific ``NAME=VALUE`` option strings.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"\n"
		"Dimension\n"
		"    the new :py:class:`Dimension` or ``None`` on failure.\n"
		"\n"
		"Examples\n"
		"--------\n"
		"\n"
		">>> drv = gdal.GetDriverByName('MEM')\n"
		">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
		">>> rg = mem_ds.GetRootGroup()\n"
		">>> dim_band = rg.CreateDimension('band', None, None, 3)\n"
		">>> dim_x = rg.CreateDimension('X', None, None, 2)\n"
		">>> dim_x.GetFullName()\n"
		"'/X'\n"
		">>> lat = rg.CreateDimension('latitude', gdal.DIM_TYPE_HORIZONTAL_X, None, 2)\n"
		">>> lat.GetType()\n"
		"'HORIZONTAL_X'\n"
		"\n"
		""},
	 { "Group_CreateMDArray", _wrap_Group_CreateMDArray, METH_VARARGS, "\n"
		"Group_CreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray\n"
		"\n"
		"\n"
		"Create a multidimensional array within a group.\n"
		"\n"
		"It is recommended that the GDALDimension objects passed in ``dimensions``\n"
		"belong to this group, either by retrieving them with :py:meth:`GetDimensions`\n"
		"or creating a new one with :py:meth:`CreateDimension`.\n"
		"\n"
		"See :cpp:func:`GDALGroup::CreateMDArray`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"    name\n"
		"dimensions : list\n"
		"    List of dimensions, ordered from the slowest varying\n"
		"    dimension first to the fastest varying dimension last.\n"
		"    Might be empty for a scalar array (if supported by driver)\n"
		"data_type : :py:class:`ExtendedDataType`\n"
		"    Array data type\n"
		"options : dict or list, optional\n"
		"    dict or list of driver specific ``NAME=VALUE`` option strings.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"\n"
		"MDArray\n"
		"    the new :py:class:`MDArray` or ``None`` on failure.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> drv = gdal.GetDriverByName('MEM')\n"
		">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
		">>> rg = mem_ds.GetRootGroup()\n"
		">>> dimX = rg.CreateDimension('X', None, None, 3)\n"
		">>> ar = rg.CreateMDArray('ar', [dimX], gdal.ExtendedDataType.Create(gdal.GDT_Byte))\n"
		"\n"
		"\n"
		""},
	 { "Group_DeleteMDArray", _wrap_Group_DeleteMDArray, METH_VARARGS, "Group_DeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr"},
	 { "Group_CreateAttribute", _wrap_Group_CreateAttribute, METH_VARARGS, "\n"
		"Group_CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
		"\n"
		"\n"
		"Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
		"\n"
		"See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"    name\n"
		"dimensions : list\n"
		"    List of dimensions, ordered from the slowest varying\n"
		"    dimension first to the fastest varying dimension last.\n"
		"    Might be empty for a scalar array (if supported by driver)\n"
		"data_type : :py:class:`ExtendedDataType`\n"
		"    Attribute data type\n"
		"options : dict or list, optional\n"
		"    dict or list of driver specific ``NAME=VALUE`` option strings.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"\n"
		"Attribute\n"
		"    the new :py:class:`Attribute` or ``None`` on failure.\n"
		"\n"
		"Examples\n"
		"--------\n"
		"\n"
		">>> drv = gdal.GetDriverByName('MEM')\n"
		">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
		">>> rg = mem_ds.GetRootGroup()\n"
		">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
		">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
		">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
		">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
		"\n"
		"\n"
		""},
	 { "Group_DeleteAttribute", _wrap_Group_DeleteAttribute, METH_VARARGS, "Group_DeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr"},
	 { "Group_Rename", _wrap_Group_Rename, METH_VARARGS, "Group_Rename(Group self, char const * newName) -> CPLErr"},
	 { "Group_SubsetDimensionFromSelection", _wrap_Group_SubsetDimensionFromSelection, METH_VARARGS, "Group_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group"},
	 { "Group_GetDataTypeCount", _wrap_Group_GetDataTypeCount, METH_O, "Group_GetDataTypeCount(Group self) -> size_t"},
	 { "Group_GetDataType", _wrap_Group_GetDataType, METH_VARARGS, "Group_GetDataType(Group self, size_t idx) -> ExtendedDataType"},
	 { "Group_swigregister", Group_swigregister, METH_O, NULL},
	 { "Statistics_min_get", _wrap_Statistics_min_get, METH_O, "Statistics_min_get(Statistics self) -> double"},
	 { "Statistics_max_get", _wrap_Statistics_max_get, METH_O, "Statistics_max_get(Statistics self) -> double"},
	 { "Statistics_mean_get", _wrap_Statistics_mean_get, METH_O, "Statistics_mean_get(Statistics self) -> double"},
	 { "Statistics_std_dev_get", _wrap_Statistics_std_dev_get, METH_O, "Statistics_std_dev_get(Statistics self) -> double"},
	 { "Statistics_valid_count_get", _wrap_Statistics_valid_count_get, METH_O, "Statistics_valid_count_get(Statistics self) -> GIntBig"},
	 { "delete_Statistics", _wrap_delete_Statistics, METH_O, "delete_Statistics(Statistics self)"},
	 { "new_Statistics", _wrap_new_Statistics, METH_NOARGS, "new_Statistics() -> Statistics"},
	 { "Statistics_swigregister", Statistics_swigregister, METH_O, NULL},
	 { "Statistics_swiginit", Statistics_swiginit, METH_VARARGS, NULL},
	 { "delete_RawBlockInfo", _wrap_delete_RawBlockInfo, METH_O, "delete_RawBlockInfo(RawBlockInfo self)"},
	 { "RawBlockInfo_GetOffset", _wrap_RawBlockInfo_GetOffset, METH_O, "RawBlockInfo_GetOffset(RawBlockInfo self) -> GUIntBig"},
	 { "RawBlockInfo_GetSize", _wrap_RawBlockInfo_GetSize, METH_O, "RawBlockInfo_GetSize(RawBlockInfo self) -> GUIntBig"},
	 { "RawBlockInfo_GetFilename", _wrap_RawBlockInfo_GetFilename, METH_O, "RawBlockInfo_GetFilename(RawBlockInfo self) -> char const *"},
	 { "RawBlockInfo_GetInfo", _wrap_RawBlockInfo_GetInfo, METH_O, "RawBlockInfo_GetInfo(RawBlockInfo self) -> char **"},
	 { "RawBlockInfo_GetInlineData", _wrap_RawBlockInfo_GetInlineData, METH_O, "RawBlockInfo_GetInlineData(RawBlockInfo self)"},
	 { "new_RawBlockInfo", _wrap_new_RawBlockInfo, METH_NOARGS, "new_RawBlockInfo() -> RawBlockInfo"},
	 { "RawBlockInfo_swigregister", RawBlockInfo_swigregister, METH_O, NULL},
	 { "RawBlockInfo_swiginit", RawBlockInfo_swiginit, METH_VARARGS, NULL},
	 { "delete_MDArray", _wrap_delete_MDArray, METH_O, "delete_MDArray(MDArray self)"},
	 { "MDArray_GetName", _wrap_MDArray_GetName, METH_O, "MDArray_GetName(MDArray self) -> char const *"},
	 { "MDArray_GetFullName", _wrap_MDArray_GetFullName, METH_O, "MDArray_GetFullName(MDArray self) -> char const *"},
	 { "MDArray_GetTotalElementsCount", _wrap_MDArray_GetTotalElementsCount, METH_O, "MDArray_GetTotalElementsCount(MDArray self) -> GUIntBig"},
	 { "MDArray_GetDimensionCount", _wrap_MDArray_GetDimensionCount, METH_O, "MDArray_GetDimensionCount(MDArray self) -> size_t"},
	 { "MDArray_GetDimensions", _wrap_MDArray_GetDimensions, METH_O, "MDArray_GetDimensions(MDArray self)"},
	 { "MDArray_GetCoordinateVariables", _wrap_MDArray_GetCoordinateVariables, METH_O, "MDArray_GetCoordinateVariables(MDArray self)"},
	 { "MDArray_GetBlockSize", _wrap_MDArray_GetBlockSize, METH_O, "MDArray_GetBlockSize(MDArray self)"},
	 { "MDArray_GetProcessingChunkSize", _wrap_MDArray_GetProcessingChunkSize, METH_VARARGS, "MDArray_GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)"},
	 { "MDArray_GetDataType", _wrap_MDArray_GetDataType, METH_O, "MDArray_GetDataType(MDArray self) -> ExtendedDataType"},
	 { "MDArray_GetStructuralInfo", _wrap_MDArray_GetStructuralInfo, METH_O, "MDArray_GetStructuralInfo(MDArray self) -> char **"},
	 { "MDArray_Resize", _wrap_MDArray_Resize, METH_VARARGS, "MDArray_Resize(MDArray self, int newDimensions, char ** options=None) -> CPLErr"},
	 { "MDArray_Read", _wrap_MDArray_Read, METH_VARARGS, "MDArray_Read(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr"},
	 { "MDArray_WriteStringArray", _wrap_MDArray_WriteStringArray, METH_VARARGS, "MDArray_WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr"},
	 { "MDArray_Write", _wrap_MDArray_Write, METH_VARARGS, "MDArray_Write(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype, GIntBig buf_len) -> CPLErr"},
	 { "MDArray_AdviseRead", _wrap_MDArray_AdviseRead, METH_VARARGS, "MDArray_AdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr"},
	 { "MDArray_GetAttribute", _wrap_MDArray_GetAttribute, METH_VARARGS, "MDArray_GetAttribute(MDArray self, char const * name) -> Attribute"},
	 { "MDArray_GetAttributes", _wrap_MDArray_GetAttributes, METH_VARARGS, "MDArray_GetAttributes(MDArray self, char ** options=None)"},
	 { "MDArray_CreateAttribute", _wrap_MDArray_CreateAttribute, METH_VARARGS, "\n"
		"MDArray_CreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
		"\n"
		"\n"
		"Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
		"\n"
		"See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"    name\n"
		"dimensions : list\n"
		"    List of dimensions, ordered from the slowest varying\n"
		"    dimension first to the fastest varying dimension last.\n"
		"    Might be empty for a scalar array (if supported by driver)\n"
		"data_type : :py:class:`ExtendedDataType`\n"
		"    Attribute data type\n"
		"options : dict or list, optional\n"
		"    dict or list of driver specific ``NAME=VALUE`` option strings.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"\n"
		"Attribute\n"
		"    the new :py:class:`Attribute` or ``None`` on failure.\n"
		"\n"
		"Examples\n"
		"--------\n"
		"\n"
		">>> drv = gdal.GetDriverByName('MEM')\n"
		">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
		">>> rg = mem_ds.GetRootGroup()\n"
		">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
		">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
		">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
		">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
		"\n"
		"\n"
		""},
	 { "MDArray_DeleteAttribute", _wrap_MDArray_DeleteAttribute, METH_VARARGS, "MDArray_DeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr"},
	 { "MDArray_GetNoDataValueAsRaw", _wrap_MDArray_GetNoDataValueAsRaw, METH_O, "MDArray_GetNoDataValueAsRaw(MDArray self) -> CPLErr"},
	 { "MDArray_GetNoDataValueAsDouble", _wrap_MDArray_GetNoDataValueAsDouble, METH_O, "MDArray_GetNoDataValueAsDouble(MDArray self)"},
	 { "MDArray_GetNoDataValueAsInt64", _wrap_MDArray_GetNoDataValueAsInt64, METH_O, "MDArray_GetNoDataValueAsInt64(MDArray self)"},
	 { "MDArray_GetNoDataValueAsUInt64", _wrap_MDArray_GetNoDataValueAsUInt64, METH_O, "MDArray_GetNoDataValueAsUInt64(MDArray self)"},
	 { "MDArray_GetNoDataValueAsString", _wrap_MDArray_GetNoDataValueAsString, METH_O, "MDArray_GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *"},
	 { "MDArray_SetNoDataValueDouble", _wrap_MDArray_SetNoDataValueDouble, METH_VARARGS, "MDArray_SetNoDataValueDouble(MDArray self, double d) -> CPLErr"},
	 { "MDArray_SetNoDataValueInt64", _wrap_MDArray_SetNoDataValueInt64, METH_VARARGS, "MDArray_SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr"},
	 { "MDArray_SetNoDataValueUInt64", _wrap_MDArray_SetNoDataValueUInt64, METH_VARARGS, "MDArray_SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr"},
	 { "MDArray_SetNoDataValueString", _wrap_MDArray_SetNoDataValueString, METH_VARARGS, "MDArray_SetNoDataValueString(MDArray self, char const * nodata) -> CPLErr"},
	 { "MDArray_SetNoDataValueRaw", _wrap_MDArray_SetNoDataValueRaw, METH_VARARGS, "MDArray_SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr"},
	 { "MDArray_DeleteNoDataValue", _wrap_MDArray_DeleteNoDataValue, METH_O, "MDArray_DeleteNoDataValue(MDArray self) -> CPLErr"},
	 { "MDArray_GetOffset", _wrap_MDArray_GetOffset, METH_O, "MDArray_GetOffset(MDArray self)"},
	 { "MDArray_GetOffsetStorageType", _wrap_MDArray_GetOffsetStorageType, METH_O, "MDArray_GetOffsetStorageType(MDArray self) -> GDALDataType"},
	 { "MDArray_GetScale", _wrap_MDArray_GetScale, METH_O, "MDArray_GetScale(MDArray self)"},
	 { "MDArray_GetScaleStorageType", _wrap_MDArray_GetScaleStorageType, METH_O, "MDArray_GetScaleStorageType(MDArray self) -> GDALDataType"},
	 { "MDArray_SetOffset", (PyCFunction)(void(*)(void))_wrap_MDArray_SetOffset, METH_VARARGS|METH_KEYWORDS, "MDArray_SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
	 { "MDArray_SetScale", (PyCFunction)(void(*)(void))_wrap_MDArray_SetScale, METH_VARARGS|METH_KEYWORDS, "MDArray_SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
	 { "MDArray_SetUnit", _wrap_MDArray_SetUnit, METH_VARARGS, "MDArray_SetUnit(MDArray self, char const * unit) -> CPLErr"},
	 { "MDArray_GetUnit", _wrap_MDArray_GetUnit, METH_O, "MDArray_GetUnit(MDArray self) -> char const *"},
	 { "MDArray_SetSpatialRef", _wrap_MDArray_SetSpatialRef, METH_VARARGS, "MDArray_SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr"},
	 { "MDArray_GetSpatialRef", _wrap_MDArray_GetSpatialRef, METH_O, "MDArray_GetSpatialRef(MDArray self) -> SpatialReference"},
	 { "MDArray_GetView", _wrap_MDArray_GetView, METH_VARARGS, "MDArray_GetView(MDArray self, char const * viewExpr) -> MDArray"},
	 { "MDArray_Transpose", _wrap_MDArray_Transpose, METH_VARARGS, "MDArray_Transpose(MDArray self, int axisMap) -> MDArray"},
	 { "MDArray_GetUnscaled", _wrap_MDArray_GetUnscaled, METH_O, "MDArray_GetUnscaled(MDArray self) -> MDArray"},
	 { "MDArray_GetMask", _wrap_MDArray_GetMask, METH_VARARGS, "MDArray_GetMask(MDArray self, char ** options=None) -> MDArray"},
	 { "MDArray_GetGridded", (PyCFunction)(void(*)(void))_wrap_MDArray_GetGridded, METH_VARARGS|METH_KEYWORDS, "MDArray_GetGridded(MDArray self, char const * pszGridOptions, MDArray xArray=None, MDArray yArray=None, char ** options=None) -> MDArray"},
	 { "MDArray_AsClassicDataset", _wrap_MDArray_AsClassicDataset, METH_VARARGS, "MDArray_AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset"},
	 { "MDArray_GetRawBlockInfo", _wrap_MDArray_GetRawBlockInfo, METH_VARARGS, "MDArray_GetRawBlockInfo(MDArray self, int nDims) -> RawBlockInfo"},
	 { "MDArray_GetStatistics", (PyCFunction)(void(*)(void))_wrap_MDArray_GetStatistics, METH_VARARGS|METH_KEYWORDS, "MDArray_GetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) -> Statistics"},
	 { "MDArray_ComputeStatistics", (PyCFunction)(void(*)(void))_wrap_MDArray_ComputeStatistics, METH_VARARGS|METH_KEYWORDS, "MDArray_ComputeStatistics(MDArray self, bool approx_ok=FALSE, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> Statistics"},
	 { "MDArray_GetResampled", _wrap_MDArray_GetResampled, METH_VARARGS, "MDArray_GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray"},
	 { "MDArray_GetMeshGrid", _wrap_MDArray_GetMeshGrid, METH_VARARGS, "MDArray_GetMeshGrid(int nInputArrays, char ** options=None)"},
	 { "MDArray_Cache", _wrap_MDArray_Cache, METH_VARARGS, "MDArray_Cache(MDArray self, char ** options=None) -> bool"},
	 { "MDArray_Rename", _wrap_MDArray_Rename, METH_VARARGS, "MDArray_Rename(MDArray self, char const * newName) -> CPLErr"},
	 { "MDArray_swigregister", MDArray_swigregister, METH_O, NULL},
	 { "delete_Attribute", _wrap_delete_Attribute, METH_O, "delete_Attribute(Attribute self)"},
	 { "Attribute_GetName", _wrap_Attribute_GetName, METH_O, "Attribute_GetName(Attribute self) -> char const *"},
	 { "Attribute_GetFullName", _wrap_Attribute_GetFullName, METH_O, "Attribute_GetFullName(Attribute self) -> char const *"},
	 { "Attribute_GetTotalElementsCount", _wrap_Attribute_GetTotalElementsCount, METH_O, "Attribute_GetTotalElementsCount(Attribute self) -> GUIntBig"},
	 { "Attribute_GetDimensionCount", _wrap_Attribute_GetDimensionCount, METH_O, "Attribute_GetDimensionCount(Attribute self) -> size_t"},
	 { "Attribute_GetDimensionsSize", _wrap_Attribute_GetDimensionsSize, METH_O, "Attribute_GetDimensionsSize(Attribute self)"},
	 { "Attribute_GetDataType", _wrap_Attribute_GetDataType, METH_O, "Attribute_GetDataType(Attribute self) -> ExtendedDataType"},
	 { "Attribute_ReadAsRaw", _wrap_Attribute_ReadAsRaw, METH_O, "Attribute_ReadAsRaw(Attribute self) -> CPLErr"},
	 { "Attribute_ReadAsString", _wrap_Attribute_ReadAsString, METH_O, "Attribute_ReadAsString(Attribute self) -> char const *"},
	 { "Attribute_ReadAsInt", _wrap_Attribute_ReadAsInt, METH_O, "Attribute_ReadAsInt(Attribute self) -> int"},
	 { "Attribute_ReadAsInt64", _wrap_Attribute_ReadAsInt64, METH_O, "Attribute_ReadAsInt64(Attribute self) -> long long"},
	 { "Attribute_ReadAsDouble", _wrap_Attribute_ReadAsDouble, METH_O, "Attribute_ReadAsDouble(Attribute self) -> double"},
	 { "Attribute_ReadAsStringArray", _wrap_Attribute_ReadAsStringArray, METH_O, "Attribute_ReadAsStringArray(Attribute self) -> char **"},
	 { "Attribute_ReadAsIntArray", _wrap_Attribute_ReadAsIntArray, METH_O, "Attribute_ReadAsIntArray(Attribute self)"},
	 { "Attribute_ReadAsInt64Array", _wrap_Attribute_ReadAsInt64Array, METH_O, "Attribute_ReadAsInt64Array(Attribute self)"},
	 { "Attribute_ReadAsDoubleArray", _wrap_Attribute_ReadAsDoubleArray, METH_O, "Attribute_ReadAsDoubleArray(Attribute self)"},
	 { "Attribute_WriteRaw", _wrap_Attribute_WriteRaw, METH_VARARGS, "Attribute_WriteRaw(Attribute self, GIntBig nLen) -> CPLErr"},
	 { "Attribute_WriteString", _wrap_Attribute_WriteString, METH_VARARGS, "Attribute_WriteString(Attribute self, char const * val) -> CPLErr"},
	 { "Attribute_WriteStringArray", _wrap_Attribute_WriteStringArray, METH_VARARGS, "Attribute_WriteStringArray(Attribute self, char ** vals) -> CPLErr"},
	 { "Attribute_WriteInt", _wrap_Attribute_WriteInt, METH_VARARGS, "Attribute_WriteInt(Attribute self, int val) -> CPLErr"},
	 { "Attribute_WriteInt64", _wrap_Attribute_WriteInt64, METH_VARARGS, "Attribute_WriteInt64(Attribute self, long long val) -> CPLErr"},
	 { "Attribute_WriteDouble", _wrap_Attribute_WriteDouble, METH_VARARGS, "Attribute_WriteDouble(Attribute self, double val) -> CPLErr"},
	 { "Attribute_WriteIntArray", _wrap_Attribute_WriteIntArray, METH_VARARGS, "Attribute_WriteIntArray(Attribute self, int nList) -> CPLErr"},
	 { "Attribute_WriteInt64Array", _wrap_Attribute_WriteInt64Array, METH_VARARGS, "Attribute_WriteInt64Array(Attribute self, int nList) -> CPLErr"},
	 { "Attribute_WriteDoubleArray", _wrap_Attribute_WriteDoubleArray, METH_VARARGS, "Attribute_WriteDoubleArray(Attribute self, int nList) -> CPLErr"},
	 { "Attribute_Rename", _wrap_Attribute_Rename, METH_VARARGS, "Attribute_Rename(Attribute self, char const * newName) -> CPLErr"},
	 { "Attribute_swigregister", Attribute_swigregister, METH_O, NULL},
	 { "delete_Dimension", _wrap_delete_Dimension, METH_O, "delete_Dimension(Dimension self)"},
	 { "Dimension_GetName", _wrap_Dimension_GetName, METH_O, "Dimension_GetName(Dimension self) -> char const *"},
	 { "Dimension_GetFullName", _wrap_Dimension_GetFullName, METH_O, "Dimension_GetFullName(Dimension self) -> char const *"},
	 { "Dimension_GetType", _wrap_Dimension_GetType, METH_O, "Dimension_GetType(Dimension self) -> char const *"},
	 { "Dimension_GetDirection", _wrap_Dimension_GetDirection, METH_O, "Dimension_GetDirection(Dimension self) -> char const *"},
	 { "Dimension_GetSize", _wrap_Dimension_GetSize, METH_O, "Dimension_GetSize(Dimension self) -> GUIntBig"},
	 { "Dimension_GetIndexingVariable", _wrap_Dimension_GetIndexingVariable, METH_O, "Dimension_GetIndexingVariable(Dimension self) -> MDArray"},
	 { "Dimension_SetIndexingVariable", _wrap_Dimension_SetIndexingVariable, METH_VARARGS, "Dimension_SetIndexingVariable(Dimension self, MDArray array) -> bool"},
	 { "Dimension_Rename", _wrap_Dimension_Rename, METH_VARARGS, "Dimension_Rename(Dimension self, char const * newName) -> CPLErr"},
	 { "Dimension_swigregister", Dimension_swigregister, METH_O, NULL},
	 { "delete_ExtendedDataType", _wrap_delete_ExtendedDataType, METH_O, "delete_ExtendedDataType(ExtendedDataType self)"},
	 { "ExtendedDataType_Create", _wrap_ExtendedDataType_Create, METH_O, "ExtendedDataType_Create(GDALDataType dt) -> ExtendedDataType"},
	 { "ExtendedDataType_CreateString", _wrap_ExtendedDataType_CreateString, METH_VARARGS, "ExtendedDataType_CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType"},
	 { "ExtendedDataType_CreateCompound", _wrap_ExtendedDataType_CreateCompound, METH_VARARGS, "ExtendedDataType_CreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType"},
	 { "ExtendedDataType_GetName", _wrap_ExtendedDataType_GetName, METH_O, "ExtendedDataType_GetName(ExtendedDataType self) -> char const *"},
	 { "ExtendedDataType_GetClass", _wrap_ExtendedDataType_GetClass, METH_O, "ExtendedDataType_GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass"},
	 { "ExtendedDataType_GetNumericDataType", _wrap_ExtendedDataType_GetNumericDataType, METH_O, "ExtendedDataType_GetNumericDataType(ExtendedDataType self) -> GDALDataType"},
	 { "ExtendedDataType_GetSize", _wrap_ExtendedDataType_GetSize, METH_O, "ExtendedDataType_GetSize(ExtendedDataType self) -> size_t"},
	 { "ExtendedDataType_GetMaxStringLength", _wrap_ExtendedDataType_GetMaxStringLength, METH_O, "ExtendedDataType_GetMaxStringLength(ExtendedDataType self) -> size_t"},
	 { "ExtendedDataType_GetSubType", _wrap_ExtendedDataType_GetSubType, METH_O, "ExtendedDataType_GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType"},
	 { "ExtendedDataType_GetRAT", _wrap_ExtendedDataType_GetRAT, METH_O, "ExtendedDataType_GetRAT(ExtendedDataType self) -> RasterAttributeTable"},
	 { "ExtendedDataType_GetComponents", _wrap_ExtendedDataType_GetComponents, METH_O, "ExtendedDataType_GetComponents(ExtendedDataType self)"},
	 { "ExtendedDataType_CanConvertTo", _wrap_ExtendedDataType_CanConvertTo, METH_VARARGS, "ExtendedDataType_CanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool"},
	 { "ExtendedDataType_Equals", _wrap_ExtendedDataType_Equals, METH_VARARGS, "ExtendedDataType_Equals(ExtendedDataType self, ExtendedDataType other) -> bool"},
	 { "ExtendedDataType_swigregister", ExtendedDataType_swigregister, METH_O, NULL},
	 { "delete_EDTComponent", _wrap_delete_EDTComponent, METH_O, "delete_EDTComponent(EDTComponent self)"},
	 { "EDTComponent_Create", _wrap_EDTComponent_Create, METH_VARARGS, "EDTComponent_Create(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent"},
	 { "EDTComponent_GetName", _wrap_EDTComponent_GetName, METH_O, "EDTComponent_GetName(EDTComponent self) -> char const *"},
	 { "EDTComponent_GetOffset", _wrap_EDTComponent_GetOffset, METH_O, "EDTComponent_GetOffset(EDTComponent self) -> size_t"},
	 { "EDTComponent_GetType", _wrap_EDTComponent_GetType, METH_O, "EDTComponent_GetType(EDTComponent self) -> ExtendedDataType"},
	 { "EDTComponent_swigregister", EDTComponent_swigregister, METH_O, NULL},
	 { "CreateRasterAttributeTableFromMDArrays", _wrap_CreateRasterAttributeTableFromMDArrays, METH_VARARGS, "CreateRasterAttributeTableFromMDArrays(GDALRATTableType eTableType, int nArrays, int nUsages=0) -> RasterAttributeTable"},
	 { "Band_XSize_get", _wrap_Band_XSize_get, METH_O, "Band_XSize_get(Band self) -> int"},
	 { "Band_YSize_get", _wrap_Band_YSize_get, METH_O, "Band_YSize_get(Band self) -> int"},
	 { "Band_DataType_get", _wrap_Band_DataType_get, METH_O, "Band_DataType_get(Band self) -> GDALDataType"},
	 { "Band_GetDataset", _wrap_Band_GetDataset, METH_O, "\n"
		"Band_GetDataset(Band self) -> Dataset\n"
		"\n"
		"\n"
		"Fetch the :py:class:`Dataset` associated with this Band.\n"
		"See :cpp:func:`GDALRasterBand::GetDataset`.\n"
		"\n"
		""},
	 { "Band_GetBand", _wrap_Band_GetBand, METH_O, "\n"
		"Band_GetBand(Band self) -> int\n"
		"\n"
		"\n"
		"Return the index of this band.\n"
		"See :cpp:func:`GDALRasterBand::GetBand`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    the (1-based) index of this band\n"
		"\n"
		""},
	 { "Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_O, "\n"
		"Band_GetBlockSize(Band self)\n"
		"\n"
		"\n"
		"Fetch the natural block size of this band.\n"
		"See :cpp:func:`GDALRasterBand::GetBlockSize`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"    list with the x and y dimensions of a block\n"
		"\n"
		""},
	 { "Band_GetActualBlockSize", _wrap_Band_GetActualBlockSize, METH_VARARGS, "\n"
		"Band_GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)\n"
		"\n"
		"\n"
		"Fetch the actual block size for a given block offset.\n"
		"See :cpp:func:`GDALRasterBand::GetActualBlockSize`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nXBlockOff : int\n"
		"    the horizontal block offset for which to calculate the\n"
		"    number of valid pixels, with zero indicating the left most block, 1 the next\n"
		"    block and so forth.\n"
		"nYBlockOff : int\n"
		"    the vertical block offset, with zero indicating\n"
		"    the top most block, 1 the next block and so forth.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple\n"
		"    tuple with the x and y dimensions of the block\n"
		"\n"
		""},
	 { "Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_O, "\n"
		"Band_GetColorInterpretation(Band self) -> GDALColorInterp\n"
		"\n"
		"\n"
		"Get the :cpp:enum:`GDALColorInterp` value for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"\n"
		""},
	 { "Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_O, "\n"
		"Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp\n"
		"\n"
		"\n"
		"Return the color interpretation code for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    The color interpretation code (default :py:const:`gdal.GCI_Undefined`)\n"
		"\n"
		"\n"
		""},
	 { "Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, "\n"
		"Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
		"\n"
		"\n"
		"Set color interpretation of the band\n"
		"See :cpp:func:`GDALRasterBand::SetColorInterpretation`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"val : int\n"
		"    A color interpretation code such as :py:const:`gdal.GCI_RedBand`\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, "\n"
		"Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
		"\n"
		"Deprecated.  Alternate name for :py:meth:`SetColorInterpretation`.\n"
		"\n"
		""},
	 { "Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_O, "Band_GetNoDataValue(Band self)"},
	 { "Band_GetNoDataValueAsInt64", _wrap_Band_GetNoDataValueAsInt64, METH_O, "\n"
		"Band_GetNoDataValueAsInt64(Band self)\n"
		"\n"
		"\n"
		"Fetch the nodata value for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetNoDataValueAsInt64`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    The nodata value, or ``None`` if it has not been set or\n"
		"    the data type of this band is not :py:const:`gdal.GDT_Int64`.\n"
		"\n"
		"\n"
		""},
	 { "Band_GetNoDataValueAsUInt64", _wrap_Band_GetNoDataValueAsUInt64, METH_O, "\n"
		"Band_GetNoDataValueAsUInt64(Band self)\n"
		"\n"
		"\n"
		"Fetch the nodata value for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetNoDataValueAsUInt64`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    The nodata value, or ``None`` if it has not been set or\n"
		"    the data type of this band is not :py:const:`gdal.GDT_UInt64`.\n"
		"\n"
		"\n"
		""},
	 { "Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, "Band_SetNoDataValue(Band self, double d) -> CPLErr"},
	 { "Band_SetNoDataValueAsInt64", _wrap_Band_SetNoDataValueAsInt64, METH_VARARGS, "Band_SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr"},
	 { "Band_SetNoDataValueAsUInt64", _wrap_Band_SetNoDataValueAsUInt64, METH_VARARGS, "Band_SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr"},
	 { "Band_DeleteNoDataValue", _wrap_Band_DeleteNoDataValue, METH_O, "\n"
		"Band_DeleteNoDataValue(Band self) -> CPLErr\n"
		"\n"
		"\n"
		"Remove the nodata value for this band.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "Band_GetUnitType", _wrap_Band_GetUnitType, METH_O, "\n"
		"Band_GetUnitType(Band self) -> char const *\n"
		"\n"
		"\n"
		"Return a name for the units of this raster's values.\n"
		"See :cpp:func:`GDALRasterBand::GetUnitType`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
		">>> ds.GetRasterBand(1).SetUnitType('ft')\n"
		"0\n"
		">>> ds.GetRasterBand(1).GetUnitType()\n"
		"'ft'\n"
		"\n"
		""},
	 { "Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, "\n"
		"Band_SetUnitType(Band self, char const * val) -> CPLErr\n"
		"\n"
		"\n"
		"Set unit type.\n"
		"See :cpp:func:`GDALRasterBand::SetUnitType`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"val : str\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_O, "\n"
		"Band_GetRasterCategoryNames(Band self) -> char **\n"
		"\n"
		"\n"
		"Fetch the list of category names for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"    The list of names, or ``None`` if no names exist.\n"
		"\n"
		"\n"
		""},
	 { "Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, "\n"
		"Band_SetRasterCategoryNames(Band self, char ** names) -> CPLErr\n"
		"\n"
		"Deprecated.  Alternate name for :py:meth:`SetCategoryNames`.\n"
		"\n"
		""},
	 { "Band_GetMinimum", _wrap_Band_GetMinimum, METH_O, "\n"
		"Band_GetMinimum(Band self)\n"
		"\n"
		"\n"
		"Fetch a previously stored maximum value for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetMinimum`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"float\n"
		"    The stored minimum value, or ``None`` if no value\n"
		"    has been stored.\n"
		"\n"
		"\n"
		""},
	 { "Band_GetMaximum", _wrap_Band_GetMaximum, METH_O, "\n"
		"Band_GetMaximum(Band self)\n"
		"\n"
		"\n"
		"Fetch a previously stored maximum value for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetMaximum`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"float\n"
		"    The stored maximum value, or ``None`` if no value\n"
		"    has been stored.\n"
		"\n"
		"\n"
		""},
	 { "Band_GetOffset", _wrap_Band_GetOffset, METH_O, "\n"
		"Band_GetOffset(Band self)\n"
		"\n"
		"\n"
		"Fetch the raster value offset.\n"
		"See :cpp:func:`GDALRasterBand::GetOffset`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"double\n"
		"    The offset value, or ``0.0``.\n"
		"\n"
		"\n"
		""},
	 { "Band_GetScale", _wrap_Band_GetScale, METH_O, "\n"
		"Band_GetScale(Band self)\n"
		"\n"
		"\n"
		"Fetch the band scale value.\n"
		"See :cpp:func:`GDALRasterBand::GetScale`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"double\n"
		"    The scale value, or ``1.0``.\n"
		"\n"
		""},
	 { "Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, "\n"
		"Band_SetOffset(Band self, double val) -> CPLErr\n"
		"\n"
		"\n"
		"Set scaling offset.\n"
		"See :cpp:func:`GDALRasterBand::SetOffset`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"val : float\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`SetScale`\n"
		"\n"
		""},
	 { "Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, "\n"
		"Band_SetScale(Band self, double val) -> CPLErr\n"
		"\n"
		"Set scaling ratio.\n"
		"See :cpp:func:`GDALRasterBand::SetScale`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"val : float\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`SetOffset`\n"
		"\n"
		""},
	 { "Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, "\n"
		"Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr\n"
		"\n"
		"\n"
		"Return the minimum, maximum, mean, and standard deviation of all pixel values\n"
		"in this band.\n"
		"See :cpp:func:`GDALRasterBand::GetStatistics`\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"approx_ok : bool\n"
		"    If ``True``, allow overviews or a subset of image tiles to be used in\n"
		"    computing the statistics.\n"
		"force : bool\n"
		"    If ``False``, only return a result if it can be obtained without scanning\n"
		"    the image, i.e. from pre-existing metadata.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"   a list with the min, max, mean, and standard deviation of values\n"
		"   in the Band.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`ComputeBandStats`\n"
		":py:meth:`ComputeRasterMinMax`\n"
		":py:meth:`GetMaximum`\n"
		":py:meth:`GetMinimum`\n"
		":py:meth:`GetStatistics`\n"
		"\n"
		""},
	 { "Band_ComputeStatistics", (PyCFunction)(void(*)(void))_wrap_Band_ComputeStatistics, METH_VARARGS|METH_KEYWORDS, "Band_ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr"},
	 { "Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, "\n"
		"Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr\n"
		"\n"
		"\n"
		"Set statistics on band.\n"
		"See :cpp:func:`GDALRasterBand::SetStatistics`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"min : float\n"
		"max : float\n"
		"mean : float\n"
		"stdev : float\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on apparent success or :py:const:`CE_Failure` on\n"
		"   failure.  This method cannot detect whether metadata will be properly saved and\n"
		"   so may return :py:const:`gdal.`CE_None` even if the statistics will never be\n"
		"   saved.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`ComputeBandStats`\n"
		":py:meth:`ComputeRasterMinMax`\n"
		":py:meth:`ComputeStatistics`\n"
		":py:meth:`GetMaximum`\n"
		":py:meth:`GetMinimum`\n"
		":py:meth:`GetStatistics`\n"
		"\n"
		""},
	 { "Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_O, "\n"
		"Band_GetOverviewCount(Band self) -> int\n"
		"\n"
		"\n"
		"Return the number of overview layers available.\n"
		"See :cpp:func:`GDALRasterBand::GetOverviewCount`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"\n"
		"\n"
		""},
	 { "Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, "\n"
		"Band_GetOverview(Band self, int i) -> Band\n"
		"\n"
		"\n"
		"Fetch a raster overview.\n"
		"See :cpp:func:`GDALRasterBand::GetOverview`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i : int\n"
		"    Overview index between 0 and ``GetOverviewCount() - 1``.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Band\n"
		"\n"
		"\n"
		""},
	 { "Band_GetSampleOverview", _wrap_Band_GetSampleOverview, METH_VARARGS, "Band_GetSampleOverview(Band self, GUIntBig nDesiredSamples) -> Band"},
	 { "Band_Checksum", (PyCFunction)(void(*)(void))_wrap_Band_Checksum, METH_VARARGS|METH_KEYWORDS, "\n"
		"Band_Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int\n"
		"\n"
		"\n"
		"Computes a checksum from a region of a RasterBand.\n"
		"See :cpp:func:`GDALChecksumImage`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"xoff : int, default=0\n"
		"   The pixel offset to left side of the region of the band to\n"
		"   be read. This would be zero to start from the left side.\n"
		"yoff : int, default=0\n"
		"   The line offset to top side of the region of the band to\n"
		"   be read. This would be zero to start from the top side.\n"
		"xsize : int, optional\n"
		"     The number of pixels to read in the x direction. By default,\n"
		"     equal to the number of columns in the raster.\n"
		"ysize : int, optional\n"
		"     The number of rows to read in the y direction. By default,\n"
		"     equal to the number of bands in the raster.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    checksum value, or -1 in case of error\n"
		"\n"
		"\n"
		""},
	 { "Band_ComputeRasterMinMax", (PyCFunction)(void(*)(void))_wrap_Band_ComputeRasterMinMax, METH_VARARGS|METH_KEYWORDS, "Band_ComputeRasterMinMax(Band self, bool approx_ok=False, bool can_return_none=False)"},
	 { "Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, "\n"
		"Band_ComputeBandStats(Band self, int samplestep=1)\n"
		"\n"
		"\n"
		"Computes the mean and standard deviation of values in this Band.\n"
		"See :cpp:func:`GDALComputeBandStats`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"samplestep : int, default=1\n"
		"    Step between scanlines used to compute statistics.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple\n"
		"    tuple of length 2 with value of mean and standard deviation\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`ComputeRasterMinMax`\n"
		":py:meth:`ComputeStatistics`\n"
		":py:meth:`GetMaximum`\n"
		":py:meth:`GetMinimum`\n"
		":py:meth:`GetStatistics`\n"
		":py:meth:`SetStatistics`\n"
		"\n"
		""},
	 { "Band_Fill", _wrap_Band_Fill, METH_VARARGS, "\n"
		"Band_Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr\n"
		"\n"
		"\n"
		"Fill this band with a constant value.\n"
		"See :cpp:func:`GDALRasterBand::Fill`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"real_fill : float\n"
		"    real component of the fill value\n"
		"imag_fill : float, default = 0.0\n"
		"    imaginary component of the fill value\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "Band_WriteRaster", (PyCFunction)(void(*)(void))_wrap_Band_WriteRaster, METH_VARARGS|METH_KEYWORDS, "Band_WriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None) -> CPLErr"},
	 { "Band_FlushCache", _wrap_Band_FlushCache, METH_O, "\n"
		"Band_FlushCache(Band self)\n"
		"\n"
		"\n"
		"Flush raster data cache.\n"
		"See :cpp:func:`GDALRasterBand::FlushCache`.\n"
		"\n"
		""},
	 { "Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_O, "\n"
		"Band_GetRasterColorTable(Band self) -> ColorTable\n"
		"\n"
		"\n"
		"Fetch the color table associated with this band.\n"
		"See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"ColorTable\n"
		"    The :py:class:`ColorTable`, or ``None`` if it has not been defined.\n"
		"\n"
		""},
	 { "Band_GetColorTable", _wrap_Band_GetColorTable, METH_O, "\n"
		"Band_GetColorTable(Band self) -> ColorTable\n"
		"\n"
		"\n"
		"Get the color table associated with this band.\n"
		"See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"ColorTable or ``None``\n"
		"\n"
		""},
	 { "Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, "\n"
		"Band_SetRasterColorTable(Band self, ColorTable arg) -> int\n"
		"\n"
		"Deprecated. Alternate name for :py:meth:`SetColorTable`.\n"
		"\n"
		""},
	 { "Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, "\n"
		"Band_SetColorTable(Band self, ColorTable arg) -> int\n"
		"\n"
		"\n"
		"Set the raster color table.\n"
		"See :cpp:func:`GDALRasterBand::SetColorTable`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"arg : ColorTable\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_O, "Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
	 { "Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, "Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
	 { "Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_O, "\n"
		"Band_GetMaskBand(Band self) -> Band\n"
		"\n"
		"\n"
		"Return the mask band associated with this band.\n"
		"See :cpp:func:`GDALRasterBand::GetMaskBand`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Band\n"
		"\n"
		"\n"
		""},
	 { "Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_O, "\n"
		"Band_GetMaskFlags(Band self) -> int\n"
		"\n"
		"\n"
		"Return the status flags of the mask band.\n"
		"See :cpp:func:`GDALRasterBand::GetMaskFlags`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> import numpy as np\n"
		">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
		">>> band = ds.GetRasterBand(1)\n"
		">>> band.GetMaskFlags() == gdal.GMF_ALL_VALID\n"
		"True\n"
		">>> band.SetNoDataValue(22)\n"
		"0\n"
		">>> band.WriteArray(np.array([[22]]))\n"
		"0\n"
		">>> band.GetMaskBand().ReadAsArray(win_xsize=2,win_ysize=2)\n"
		"array([[  0, 255],\n"
		"       [255, 255]], dtype=uint8)\n"
		">>> band.GetMaskFlags() == gdal.GMF_NODATA\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, "\n"
		"Band_CreateMaskBand(Band self, int nFlags) -> CPLErr\n"
		"\n"
		"\n"
		"Add a mask band to the current band.\n"
		"See :cpp:func:`GDALRasterBand::CreateMaskBand`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nFlags : int\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"\n"
		""},
	 { "Band_IsMaskBand", _wrap_Band_IsMaskBand, METH_O, "\n"
		"Band_IsMaskBand(Band self) -> bool\n"
		"\n"
		"\n"
		"Returns whether the band is a mask band.\n"
		"See :cpp:func:`GDALRasterBand::IsMaskBand`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"\n"
		""},
	 { "Band_GetHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
		"Band_GetHistogram(Band self, double min=-0.5, double max=255.5, int buckets=256, int include_out_of_range=0, int approx_ok=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr\n"
		"\n"
		"\n"
		"Compute raster histogram.\n"
		"See :cpp:func:`GDALRasterBand::GetHistogram`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"min : float, default=-0.05\n"
		"    the lower bound of the histogram\n"
		"max : float, default=255.5\n"
		"    the upper bound of the histogram\n"
		"buckets : int, default=256\n"
		"    the number of buckets int he histogram\n"
		"include_out_of_range : bool, default=False\n"
		"    if ``True``, add out-of-range values into the first and last buckets\n"
		"approx_ok : bool, default=True\n"
		"    if ``True``, compute an approximate histogram by using subsampling or overviews\n"
		"callback : callable, optional\n"
		"             A progress callback function\n"
		"callback_data : any, optional\n"
		"             Optional data to be passed to callback function\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"    list with length equal to ``buckets``. If ``approx_ok`` is ``False``, each\n"
		"    the value of each list item will equal the number of pixels in that bucket.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> np.random.seed(123)\n"
		">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10, eType=gdal.GDT_Float32)\n"
		">>> ds.WriteArray(np.random.normal(size=100).reshape(10, 10))\n"
		"0\n"
		">>> ds.GetRasterBand(1).GetHistogram(min=-3.5, max=3.5, buckets=13, approx_ok=False)\n"
		"[0, 2, 1, 6, 17, 18, 13, 14, 16, 8, 5, 0, 0]\n"
		"\n"
		""},
	 { "Band_GetDefaultHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetDefaultHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
		"Band_GetDefaultHistogram(Band self, double * min_ret=None, double * max_ret=None, int * buckets_ret=None, GUIntBig ** ppanHistogram=None, int force=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr\n"
		"\n"
		"\n"
		"Fetch the default histogram for this band.\n"
		"See :cpp:func:`GDALRasterBand::GetDefaultHistogram`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"    List with the following four elements:\n"
		"    - lower bound of histogram\n"
		"    - upper bound of histogram\n"
		"    - number of buckets in histogram\n"
		"    - tuple with counts for each bucket\n"
		"\n"
		""},
	 { "Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, "\n"
		"Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr\n"
		"\n"
		"\n"
		"Set default histogram.\n"
		"See :cpp:func:`GDALRasterBand::SetDefaultHistogram`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"min : float\n"
		"    minimum value\n"
		"max : float\n"
		"    maximum value\n"
		"buckets_in : list\n"
		"    list of pixel counts for each bucket\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:meth:`SetHistogram`\n"
		"\n"
		""},
	 { "Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_O, "\n"
		"Band_HasArbitraryOverviews(Band self) -> bool\n"
		"\n"
		"\n"
		"Check for arbitrary overviews.\n"
		"See :cpp:func:`GDALRasterBand::HasArbitraryOverviews`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"\n"
		""},
	 { "Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_O, "\n"
		"Band_GetCategoryNames(Band self) -> char **\n"
		"\n"
		"\n"
		"Fetch the list of category names for this raster.\n"
		"See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"    A list of category names, or ``None``\n"
		"\n"
		""},
	 { "Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, "\n"
		"Band_SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr\n"
		"\n"
		"\n"
		"Set the category names for this band.\n"
		"See :cpp:func:`GDALRasterBand::SetCategoryNames`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"papszCategoryNames : list\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		""},
	 { "Band_GetVirtualMem", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMem, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, size_t nCacheSize, size_t nPageSizeHint, char ** options=None) -> VirtualMem"},
	 { "Band_GetVirtualMemAuto", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMemAuto, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"},
	 { "Band_GetTiledVirtualMem", (PyCFunction)(void(*)(void))_wrap_Band_GetTiledVirtualMem, METH_VARARGS|METH_KEYWORDS, "Band_GetTiledVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, size_t nCacheSize, char ** options=None) -> VirtualMem"},
	 { "Band_GetDataCoverageStatus", _wrap_Band_GetDataCoverageStatus, METH_VARARGS, "\n"
		"Band_GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int\n"
		"\n"
		"\n"
		"Determine whether a sub-window of the Band contains only data, only empty blocks, or a mix of both.\n"
		"See :cpp:func:`GDALRasterBand::GetDataCoverageStatus`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nXOff : int\n"
		"nYOff : int\n"
		"nXSize : int\n"
		"nYSize : int\n"
		"nMaskFlagStop : int, default=0\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"    First value represents a bitwise-or value of the following constants\n"
		"    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_DATA`\n"
		"    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_EMPTY`\n"
		"    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED`\n"
		"    Second value represents the approximate percentage in [0, 100] of pixels in the window that have valid values\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> import numpy as np\n"
		">>> # Create a raster with four blocks\n"
		">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 64, 64, options = {'SPARSE_OK':True, 'TILED':True, 'BLOCKXSIZE':32, 'BLOCKYSIZE':32})\n"
		">>> band = ds.GetRasterBand(1)\n"
		">>> # Write some data to upper-left block\n"
		">>> band.WriteArray(np.array([[1, 2], [3, 4]]))\n"
		"0\n"
		">>> # Check status of upper-left block\n"
		">>> flags, pct = band.GetDataCoverageStatus(0, 0, 32, 32)\n"
		">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA\n"
		"True\n"
		">>> pct\n"
		"100.0\n"
		">>> # Check status of upper-right block\n"
		">>> flags, pct = band.GetDataCoverageStatus(32, 0, 32, 32)\n"
		">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
		"True\n"
		">>> pct\n"
		"0.0\n"
		">>> # Check status of window touching all four blocks\n"
		">>> flags, pct = band.GetDataCoverageStatus(16, 16, 32, 32)\n"
		">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
		"True\n"
		">>> pct\n"
		"25.0\n"
		"\n"
		""},
	 { "Band_AdviseRead", _wrap_Band_AdviseRead, METH_VARARGS, "Band_AdviseRead(Band self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, char ** options=None) -> CPLErr"},
	 { "Band_InterpolateAtPoint", _wrap_Band_InterpolateAtPoint, METH_VARARGS, "Band_InterpolateAtPoint(Band self, double pixel, double line, GDALRIOResampleAlg interpolation) -> CPLErr"},
	 { "Band_InterpolateAtGeolocation", _wrap_Band_InterpolateAtGeolocation, METH_VARARGS, "Band_InterpolateAtGeolocation(Band self, double geolocX, double geolocY, SpatialReference srs, GDALRIOResampleAlg interpolation, char ** transformerOptions=None) -> CPLErr"},
	 { "Band_ComputeMinMaxLocation", _wrap_Band_ComputeMinMaxLocation, METH_O, "Band_ComputeMinMaxLocation(Band self) -> CPLErr"},
	 { "Band_AsMDArray", _wrap_Band_AsMDArray, METH_O, "Band_AsMDArray(Band self) -> MDArray"},
	 { "Band__EnablePixelTypeSignedByteWarning", _wrap_Band__EnablePixelTypeSignedByteWarning, METH_VARARGS, "Band__EnablePixelTypeSignedByteWarning(Band self, bool b)"},
	 { "Band_UnaryOp", _wrap_Band_UnaryOp, METH_VARARGS, "Band_UnaryOp(Band self, GDALRasterAlgebraUnaryOperation op) -> ComputedBand"},
	 { "Band_BinaryOpBand", _wrap_Band_BinaryOpBand, METH_VARARGS, "Band_BinaryOpBand(Band self, GDALRasterAlgebraBinaryOperation op, Band other) -> ComputedBand"},
	 { "Band_BinaryOpDouble", _wrap_Band_BinaryOpDouble, METH_VARARGS, "Band_BinaryOpDouble(Band self, GDALRasterAlgebraBinaryOperation op, double constant) -> ComputedBand"},
	 { "Band_BinaryOpDoubleToBand", _wrap_Band_BinaryOpDoubleToBand, METH_VARARGS, "Band_BinaryOpDoubleToBand(double constant, GDALRasterAlgebraBinaryOperation op, Band band) -> ComputedBand"},
	 { "Band_IfThenElse", _wrap_Band_IfThenElse, METH_VARARGS, "Band_IfThenElse(Band condBand, Band thenBand, Band elseBand) -> ComputedBand"},
	 { "Band_AsType", _wrap_Band_AsType, METH_VARARGS, "Band_AsType(Band self, GDALDataType dt) -> ComputedBand"},
	 { "Band_MaximumOfNBands", _wrap_Band_MaximumOfNBands, METH_O, "Band_MaximumOfNBands(int band_count) -> ComputedBand"},
	 { "Band_MaxConstant", _wrap_Band_MaxConstant, METH_VARARGS, "Band_MaxConstant(Band self, double constant) -> ComputedBand"},
	 { "Band_MinimumOfNBands", _wrap_Band_MinimumOfNBands, METH_O, "Band_MinimumOfNBands(int band_count) -> ComputedBand"},
	 { "Band_MinConstant", _wrap_Band_MinConstant, METH_VARARGS, "Band_MinConstant(Band self, double constant) -> ComputedBand"},
	 { "Band_MeanOfNBands", _wrap_Band_MeanOfNBands, METH_O, "Band_MeanOfNBands(int band_count) -> ComputedBand"},
	 { "Band_ReadRaster1", (PyCFunction)(void(*)(void))_wrap_Band_ReadRaster1, METH_VARARGS|METH_KEYWORDS, "Band_ReadRaster1(Band self, double xoff, double yoff, double xsize, double ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour, GDALProgressFunc callback=0, void * callback_data=None, void * inputOutputBuf=None) -> CPLErr"},
	 { "Band_ReadBlock", (PyCFunction)(void(*)(void))_wrap_Band_ReadBlock, METH_VARARGS|METH_KEYWORDS, "Band_ReadBlock(Band self, int xoff, int yoff, void * buf_obj=None) -> CPLErr"},
	 { "Band_swigregister", Band_swigregister, METH_O, NULL},
	 { "delete_ComputedBand", _wrap_delete_ComputedBand, METH_O, "delete_ComputedBand(ComputedBand self)"},
	 { "ComputedBand_swigregister", ComputedBand_swigregister, METH_O, NULL},
	 { "new_ColorTable", (PyCFunction)(void(*)(void))_wrap_new_ColorTable, METH_VARARGS|METH_KEYWORDS, "new_ColorTable(GDALPaletteInterp palette=GPI_RGB) -> ColorTable"},
	 { "delete_ColorTable", _wrap_delete_ColorTable, METH_O, "delete_ColorTable(ColorTable self)"},
	 { "ColorTable_Clone", _wrap_ColorTable_Clone, METH_O, "ColorTable_Clone(ColorTable self) -> ColorTable"},
	 { "ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_O, "ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
	 { "ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_O, "ColorTable_GetCount(ColorTable self) -> int"},
	 { "ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, "ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
	 { "ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, "ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
	 { "ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, "ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
	 { "ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"},
	 { "ColorTable_swigregister", ColorTable_swigregister, METH_O, NULL},
	 { "ColorTable_swiginit", ColorTable_swiginit, METH_VARARGS, NULL},
	 { "delete_SubdatasetInfo", _wrap_delete_SubdatasetInfo, METH_O, "delete_SubdatasetInfo(SubdatasetInfo self)"},
	 { "SubdatasetInfo_GetPathComponent", _wrap_SubdatasetInfo_GetPathComponent, METH_O, "SubdatasetInfo_GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
	 { "SubdatasetInfo_GetSubdatasetComponent", _wrap_SubdatasetInfo_GetSubdatasetComponent, METH_O, "SubdatasetInfo_GetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
	 { "SubdatasetInfo_ModifyPathComponent", _wrap_SubdatasetInfo_ModifyPathComponent, METH_VARARGS, "SubdatasetInfo_ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *"},
	 { "SubdatasetInfo_swigregister", SubdatasetInfo_swigregister, METH_O, NULL},
	 { "GetSubdatasetInfo", _wrap_GetSubdatasetInfo, METH_O, "GetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *"},
	 { "new_Relationship", _wrap_new_Relationship, METH_VARARGS, "new_Relationship(char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> Relationship"},
	 { "delete_Relationship", _wrap_delete_Relationship, METH_O, "delete_Relationship(Relationship self)"},
	 { "Relationship_GetName", _wrap_Relationship_GetName, METH_O, "Relationship_GetName(Relationship self) -> char const *"},
	 { "Relationship_GetCardinality", _wrap_Relationship_GetCardinality, METH_O, "Relationship_GetCardinality(Relationship self) -> GDALRelationshipCardinality"},
	 { "Relationship_GetLeftTableName", _wrap_Relationship_GetLeftTableName, METH_O, "Relationship_GetLeftTableName(Relationship self) -> char const *"},
	 { "Relationship_GetRightTableName", _wrap_Relationship_GetRightTableName, METH_O, "Relationship_GetRightTableName(Relationship self) -> char const *"},
	 { "Relationship_GetMappingTableName", _wrap_Relationship_GetMappingTableName, METH_O, "Relationship_GetMappingTableName(Relationship self) -> char const *"},
	 { "Relationship_SetMappingTableName", _wrap_Relationship_SetMappingTableName, METH_VARARGS, "Relationship_SetMappingTableName(Relationship self, char const * pszName)"},
	 { "Relationship_GetLeftTableFields", _wrap_Relationship_GetLeftTableFields, METH_O, "Relationship_GetLeftTableFields(Relationship self) -> char **"},
	 { "Relationship_GetRightTableFields", _wrap_Relationship_GetRightTableFields, METH_O, "Relationship_GetRightTableFields(Relationship self) -> char **"},
	 { "Relationship_SetLeftTableFields", _wrap_Relationship_SetLeftTableFields, METH_VARARGS, "Relationship_SetLeftTableFields(Relationship self, char ** pFields)"},
	 { "Relationship_SetRightTableFields", _wrap_Relationship_SetRightTableFields, METH_VARARGS, "Relationship_SetRightTableFields(Relationship self, char ** pFields)"},
	 { "Relationship_GetLeftMappingTableFields", _wrap_Relationship_GetLeftMappingTableFields, METH_O, "Relationship_GetLeftMappingTableFields(Relationship self) -> char **"},
	 { "Relationship_GetRightMappingTableFields", _wrap_Relationship_GetRightMappingTableFields, METH_O, "Relationship_GetRightMappingTableFields(Relationship self) -> char **"},
	 { "Relationship_SetLeftMappingTableFields", _wrap_Relationship_SetLeftMappingTableFields, METH_VARARGS, "Relationship_SetLeftMappingTableFields(Relationship self, char ** pFields)"},
	 { "Relationship_SetRightMappingTableFields", _wrap_Relationship_SetRightMappingTableFields, METH_VARARGS, "Relationship_SetRightMappingTableFields(Relationship self, char ** pFields)"},
	 { "Relationship_GetType", _wrap_Relationship_GetType, METH_O, "Relationship_GetType(Relationship self) -> GDALRelationshipType"},
	 { "Relationship_SetType", _wrap_Relationship_SetType, METH_VARARGS, "Relationship_SetType(Relationship self, GDALRelationshipType type)"},
	 { "Relationship_GetForwardPathLabel", _wrap_Relationship_GetForwardPathLabel, METH_O, "Relationship_GetForwardPathLabel(Relationship self) -> char const *"},
	 { "Relationship_SetForwardPathLabel", _wrap_Relationship_SetForwardPathLabel, METH_VARARGS, "Relationship_SetForwardPathLabel(Relationship self, char const * pszLabel)"},
	 { "Relationship_GetBackwardPathLabel", _wrap_Relationship_GetBackwardPathLabel, METH_O, "Relationship_GetBackwardPathLabel(Relationship self) -> char const *"},
	 { "Relationship_SetBackwardPathLabel", _wrap_Relationship_SetBackwardPathLabel, METH_VARARGS, "Relationship_SetBackwardPathLabel(Relationship self, char const * pszLabel)"},
	 { "Relationship_GetRelatedTableType", _wrap_Relationship_GetRelatedTableType, METH_O, "Relationship_GetRelatedTableType(Relationship self) -> char const *"},
	 { "Relationship_SetRelatedTableType", _wrap_Relationship_SetRelatedTableType, METH_VARARGS, "Relationship_SetRelatedTableType(Relationship self, char const * pszType)"},
	 { "Relationship_swigregister", Relationship_swigregister, METH_O, NULL},
	 { "Relationship_swiginit", Relationship_swiginit, METH_VARARGS, NULL},
	 { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
	 { "ComputeMedianCutPCT", (PyCFunction)(void(*)(void))_wrap_ComputeMedianCutPCT, METH_VARARGS|METH_KEYWORDS, "ComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "DitherRGB2PCT", (PyCFunction)(void(*)(void))_wrap_DitherRGB2PCT, METH_VARARGS|METH_KEYWORDS, "DitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "ReprojectImage", (PyCFunction)(void(*)(void))_wrap_ReprojectImage, METH_VARARGS|METH_KEYWORDS, "\n"
		"ReprojectImage(Dataset src_ds, Dataset dst_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double WarpMemoryLimit=0.0, double maxerror=0.0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> CPLErr\n"
		"\n"
		"\n"
		"Reproject image.\n"
		"\n"
		"See :cpp:func:`GDALReprojectImage`.\n"
		"\n"
		"Consider using :py:func:`osgeo.gdal.Warp` and :py:func:`osgeo.gdal.WarpOptions` instead\n"
		"\n"
		""},
	 { "ComputeProximity", (PyCFunction)(void(*)(void))_wrap_ComputeProximity, METH_VARARGS|METH_KEYWORDS, "ComputeProximity(Band srcBand, Band proximityBand, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "RasterizeLayer", (PyCFunction)(void(*)(void))_wrap_RasterizeLayer, METH_VARARGS|METH_KEYWORDS, "RasterizeLayer(Dataset dataset, int bands, Layer layer, void * pfnTransformer=None, void * pTransformArg=None, int burn_values=0, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "Polygonize", (PyCFunction)(void(*)(void))_wrap_Polygonize, METH_VARARGS|METH_KEYWORDS, "Polygonize(Band srcBand, Band maskBand, Layer outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "FPolygonize", (PyCFunction)(void(*)(void))_wrap_FPolygonize, METH_VARARGS|METH_KEYWORDS, "FPolygonize(Band srcBand, Band maskBand, Layer outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "FillNodata", (PyCFunction)(void(*)(void))_wrap_FillNodata, METH_VARARGS|METH_KEYWORDS, "\n"
		"FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int\n"
		"\n"
		"\n"
		"Fill selected raster regions by interpolation from the edges.\n"
		"\n"
		"This algorithm will interpolate values for all designated\n"
		"nodata pixels (marked by zeros in ``maskBand``). For each pixel\n"
		"a four direction conic search is done to find values to interpolate\n"
		"from (using inverse distance weighting by default). Once all values are\n"
		"interpolated, zero or more smoothing iterations (3x3 average\n"
		"filters on interpolated pixels) are applied to smooth out\n"
		"artifacts.\n"
		"\n"
		"This algorithm is generally suitable for interpolating missing\n"
		"regions of fairly continuously varying rasters (such as elevation\n"
		"models for instance). It is also suitable for filling small holes\n"
		"and cracks in more irregularly varying images (like airphotos). It\n"
		"is generally not so great for interpolating a raster from sparse\n"
		"point data. See :py:func:`Grid` for that case.\n"
		"\n"
		"See :cpp:func:`GDALFillNodata`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"targetBand : Band\n"
		"    Band containing values to fill. Will be modified in-place.\n"
		"maskBand : Band\n"
		"    Mask band with a value of 0 indicating values that should be filled.\n"
		"    If not specified, the mask band associated with ``targetBand`` will be used.\n"
		"maxSearchDist : float\n"
		"    the maximum number of pixels to search in all directions to find values to interpolate from.\n"
		"smoothingIterations : int\n"
		"    the number of 3x3 smoothing filter passes to run (0 or more)\n"
		"options : dict or list, optional\n"
		"    A dict or list of name=value options. Available options are\n"
		"    described in :cpp:func:`GDALFillNodata`.\n"
		"callback : callable, optional\n"
		"   A progress callback function\n"
		"callback_data : any, optional\n"
		"   Optional data to be passed to callback function\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> import numpy as np\n"
		">>> data = np.array([[1, 2], [9, 9], [9, 9], [3, 4]], dtype=np.float32)\n"
		">>> ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Float32)\n"
		">>> ds.WriteArray(data)\n"
		"0\n"
		">>> mask = data != 9  # replace pixels with value = 9\n"
		">>> mask_ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Byte)\n"
		">>> mask_ds.WriteArray(mask)\n"
		"0\n"
		">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0)\n"
		"0\n"
		">>> ds.ReadAsArray()\n"
		"array([[1.       , 2.       ],\n"
		"       [2.1485982, 2.6666667],\n"
		"       [2.721169 , 3.3333333],\n"
		"       [3.       , 4.       ]], dtype=float32)\n"
		">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0, {'INTERPOLATION':'NEAREST'})\n"
		"0\n"
		">>> ds.ReadAsArray()\n"
		"array([[1., 2.],\n"
		"       [1., 2.],\n"
		"       [3., 4.],\n"
		"       [3., 4.]], dtype=float32)\n"
		"\n"
		"\n"
		""},
	 { "SieveFilter", (PyCFunction)(void(*)(void))_wrap_SieveFilter, METH_VARARGS|METH_KEYWORDS, "SieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, int connectedness=4, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "RegenerateOverviews", (PyCFunction)(void(*)(void))_wrap_RegenerateOverviews, METH_VARARGS|METH_KEYWORDS, "RegenerateOverviews(Band srcBand, int overviewBandCount, char const * resampling=\"average\", GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "RegenerateOverview", (PyCFunction)(void(*)(void))_wrap_RegenerateOverview, METH_VARARGS|METH_KEYWORDS, "RegenerateOverview(Band srcBand, Band overviewBand, char const * resampling=\"average\", GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "ContourGenerate", (PyCFunction)(void(*)(void))_wrap_ContourGenerate, METH_VARARGS|METH_KEYWORDS, "ContourGenerate(Band srcBand, double contourInterval, double contourBase, int fixedLevelCount, int useNoData, double noDataValue, Layer dstLayer, int idField, int elevField, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "ContourGenerateEx", (PyCFunction)(void(*)(void))_wrap_ContourGenerateEx, METH_VARARGS|METH_KEYWORDS, "ContourGenerateEx(Band srcBand, Layer dstLayer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "ViewshedGenerate", (PyCFunction)(void(*)(void))_wrap_ViewshedGenerate, METH_VARARGS|METH_KEYWORDS, "ViewshedGenerate(Band srcBand, char const * driverName, char const * targetRasterName, char ** creationOptions, double observerX, double observerY, double observerHeight, double targetHeight, double visibleVal, double invisibleVal, double outOfRangeVal, double noDataVal, double dfCurvCoeff, GDALViewshedMode mode, double maxDistance, GDALProgressFunc callback=0, void * callback_data=None, GDALViewshedOutputType heightMode=GVOT_NORMAL, char ** options=None) -> Dataset"},
	 { "IsLineOfSightVisible", (PyCFunction)(void(*)(void))_wrap_IsLineOfSightVisible, METH_VARARGS|METH_KEYWORDS, "\n"
		"IsLineOfSightVisible(Band band, int xA, int yA, double zA, int xB, int yB, double zB, char ** options=None)\n"
		"\n"
		"\n"
		"Check Line of Sight between two points.\n"
		"Both input coordinates must be within the raster coordinate bounds.\n"
		"\n"
		" See :cpp:func:`GDALIsLineOfSightVisible`.\n"
		"\n"
		".. versionadded:: 3.9\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"band : Band\n"
		"    The band to read the DEM data from. This must NOT be null.\n"
		"xA : int\n"
		"    The X location (raster column) of the first point to check on the raster.\n"
		"yA : int\n"
		"    The Y location (raster row) of the first point to check on the raster.\n"
		"zA : float\n"
		"    The Z location (height) of the first point to check.\n"
		"xB : int\n"
		"    The X location (raster column) of the second point to check on the raster.\n"
		"yB : int\n"
		"    The Y location (raster row) of the second point to check on the raster.\n"
		"zB : float\n"
		"    The Z location (height) of the second point to check.\n"
		"options : dict or list, optional\n"
		"    A dict or list of name=value of options for the line of sight algorithm (currently ignored).\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple\n"
		"    A named tuple with the following fields:\n"
		"\n"
		"    - ``is_visible`` (bool): True if the two points are within Line of Sight.\n"
		"    - ``col_intersection`` (int): Raster column index where the LOS line intersects terrain.\n"
		"      Will be set in the future; currently -1.\n"
		"    - ``row_intersection`` (int): Raster row index where the LOS line intersects terrain.\n"
		"      Will be set in the future; currently -1.\n"
		"\n"
		""},
	 { "AutoCreateWarpedVRT", _wrap_AutoCreateWarpedVRT, METH_VARARGS, "AutoCreateWarpedVRT(Dataset src_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double maxerror=0.0) -> Dataset"},
	 { "CreatePansharpenedVRT", _wrap_CreatePansharpenedVRT, METH_VARARGS, "CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset"},
	 { "GetTranformerOptionList", _wrap_GetTranformerOptionList, METH_NOARGS, "GetTranformerOptionList() -> char const *"},
	 { "delete_GDALTransformerInfoShadow", _wrap_delete_GDALTransformerInfoShadow, METH_O, "delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow self)"},
	 { "GDALTransformerInfoShadow_TransformPoint", _wrap_GDALTransformerInfoShadow_TransformPoint, METH_VARARGS, "\n"
		"GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int\n"
		"GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int\n"
		""},
	 { "GDALTransformerInfoShadow_TransformPoints", _wrap_GDALTransformerInfoShadow_TransformPoints, METH_VARARGS, "GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int"},
	 { "GDALTransformerInfoShadow_TransformGeolocations", (PyCFunction)(void(*)(void))_wrap_GDALTransformerInfoShadow_TransformGeolocations, METH_VARARGS|METH_KEYWORDS, "GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow self, Band xBand, Band yBand, Band zBand, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int"},
	 { "GDALTransformerInfoShadow_swigregister", GDALTransformerInfoShadow_swigregister, METH_O, NULL},
	 { "Transformer", _wrap_Transformer, METH_VARARGS, "Transformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow"},
	 { "WarpGetOptionList", _wrap_WarpGetOptionList, METH_NOARGS, "WarpGetOptionList() -> char const *"},
	 { "SuggestedWarpOutputRes_width_get", _wrap_SuggestedWarpOutputRes_width_get, METH_O, "SuggestedWarpOutputRes_width_get(SuggestedWarpOutputRes self) -> int"},
	 { "SuggestedWarpOutputRes_height_get", _wrap_SuggestedWarpOutputRes_height_get, METH_O, "SuggestedWarpOutputRes_height_get(SuggestedWarpOutputRes self) -> int"},
	 { "SuggestedWarpOutputRes_xmin_get", _wrap_SuggestedWarpOutputRes_xmin_get, METH_O, "SuggestedWarpOutputRes_xmin_get(SuggestedWarpOutputRes self) -> double"},
	 { "SuggestedWarpOutputRes_ymin_get", _wrap_SuggestedWarpOutputRes_ymin_get, METH_O, "SuggestedWarpOutputRes_ymin_get(SuggestedWarpOutputRes self) -> double"},
	 { "SuggestedWarpOutputRes_xmax_get", _wrap_SuggestedWarpOutputRes_xmax_get, METH_O, "SuggestedWarpOutputRes_xmax_get(SuggestedWarpOutputRes self) -> double"},
	 { "SuggestedWarpOutputRes_ymax_get", _wrap_SuggestedWarpOutputRes_ymax_get, METH_O, "SuggestedWarpOutputRes_ymax_get(SuggestedWarpOutputRes self) -> double"},
	 { "delete_SuggestedWarpOutputRes", _wrap_delete_SuggestedWarpOutputRes, METH_O, "delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes self)"},
	 { "SuggestedWarpOutputRes_GetGeotransform", _wrap_SuggestedWarpOutputRes_GetGeotransform, METH_O, "SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes self)"},
	 { "SuggestedWarpOutputRes_swigregister", SuggestedWarpOutputRes_swigregister, METH_O, NULL},
	 { "SuggestedWarpOutputFromTransformer", _wrap_SuggestedWarpOutputFromTransformer, METH_VARARGS, "SuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes"},
	 { "SuggestedWarpOutputFromOptions", _wrap_SuggestedWarpOutputFromOptions, METH_VARARGS, "SuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes"},
	 { "_ApplyVerticalShiftGrid", (PyCFunction)(void(*)(void))_wrap__ApplyVerticalShiftGrid, METH_VARARGS|METH_KEYWORDS, "_ApplyVerticalShiftGrid(Dataset src_ds, Dataset grid_ds, bool inverse=False, double srcUnitToMeter=1.0, double dstUnitToMeter=1.0, char ** options=None) -> Dataset"},
	 { "GetGlobalAlgorithmRegistry", _wrap_GetGlobalAlgorithmRegistry, METH_NOARGS, "\n"
		"GetGlobalAlgorithmRegistry() -> AlgorithmRegistry\n"
		"\n"
		"\n"
		"Return the default algorithm registry.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"AlgorithmRegistry\n"
		"\n"
		"\n"
		""},
	 { "AlgorithmArgTypeIsList", _wrap_AlgorithmArgTypeIsList, METH_O, "\n"
		"AlgorithmArgTypeIsList(GDALAlgorithmArgType type) -> bool\n"
		"\n"
		"\n"
		"Test whether an argument type represents a list.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"type : int\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.AlgorithmArgTypeIsList(gdal.GAAT_REAL)\n"
		"False\n"
		">>> gdal.AlgorithmArgTypeIsList(gdal.GAAT_REAL_LIST)\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "AlgorithmArgTypeName", _wrap_AlgorithmArgTypeName, METH_O, "\n"
		"AlgorithmArgTypeName(GDALAlgorithmArgType type) -> char const *\n"
		"\n"
		"\n"
		"Return a text representation of an argument type code.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"type : int\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.AlgorithmArgTypeName(gdal.GAAT_REAL)\n"
		"'real'\n"
		"\n"
		"\n"
		""},
	 { "delete_AlgorithmArg", _wrap_delete_AlgorithmArg, METH_O, "delete_AlgorithmArg(AlgorithmArg self)"},
	 { "AlgorithmArg_GetName", _wrap_AlgorithmArg_GetName, METH_O, "AlgorithmArg_GetName(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetType", _wrap_AlgorithmArg_GetType, METH_O, "AlgorithmArg_GetType(AlgorithmArg self) -> GDALAlgorithmArgType"},
	 { "AlgorithmArg_GetDescription", _wrap_AlgorithmArg_GetDescription, METH_O, "AlgorithmArg_GetDescription(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetShortName", _wrap_AlgorithmArg_GetShortName, METH_O, "AlgorithmArg_GetShortName(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetAliases", _wrap_AlgorithmArg_GetAliases, METH_O, "AlgorithmArg_GetAliases(AlgorithmArg self) -> char **"},
	 { "AlgorithmArg_GetMetaVar", _wrap_AlgorithmArg_GetMetaVar, METH_O, "AlgorithmArg_GetMetaVar(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetCategory", _wrap_AlgorithmArg_GetCategory, METH_O, "AlgorithmArg_GetCategory(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_IsPositional", _wrap_AlgorithmArg_IsPositional, METH_O, "AlgorithmArg_IsPositional(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_IsRequired", _wrap_AlgorithmArg_IsRequired, METH_O, "AlgorithmArg_IsRequired(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetMinCount", _wrap_AlgorithmArg_GetMinCount, METH_O, "AlgorithmArg_GetMinCount(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetMaxCount", _wrap_AlgorithmArg_GetMaxCount, METH_O, "AlgorithmArg_GetMaxCount(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetPackedValuesAllowed", _wrap_AlgorithmArg_GetPackedValuesAllowed, METH_O, "AlgorithmArg_GetPackedValuesAllowed(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetRepeatedArgAllowed", _wrap_AlgorithmArg_GetRepeatedArgAllowed, METH_O, "AlgorithmArg_GetRepeatedArgAllowed(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetChoices", _wrap_AlgorithmArg_GetChoices, METH_O, "AlgorithmArg_GetChoices(AlgorithmArg self) -> char **"},
	 { "AlgorithmArg_GetMetadataItem", _wrap_AlgorithmArg_GetMetadataItem, METH_VARARGS, "AlgorithmArg_GetMetadataItem(AlgorithmArg self, char const * item) -> char **"},
	 { "AlgorithmArg_IsExplicitlySet", _wrap_AlgorithmArg_IsExplicitlySet, METH_O, "AlgorithmArg_IsExplicitlySet(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_HasDefaultValue", _wrap_AlgorithmArg_HasDefaultValue, METH_O, "AlgorithmArg_HasDefaultValue(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetDefaultAsBoolean", _wrap_AlgorithmArg_GetDefaultAsBoolean, METH_O, "AlgorithmArg_GetDefaultAsBoolean(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetDefaultAsString", _wrap_AlgorithmArg_GetDefaultAsString, METH_O, "AlgorithmArg_GetDefaultAsString(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetDefaultAsInteger", _wrap_AlgorithmArg_GetDefaultAsInteger, METH_O, "AlgorithmArg_GetDefaultAsInteger(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetDefaultAsDouble", _wrap_AlgorithmArg_GetDefaultAsDouble, METH_O, "AlgorithmArg_GetDefaultAsDouble(AlgorithmArg self) -> double"},
	 { "AlgorithmArg_GetDefaultAsStringList", _wrap_AlgorithmArg_GetDefaultAsStringList, METH_O, "AlgorithmArg_GetDefaultAsStringList(AlgorithmArg self) -> char **"},
	 { "AlgorithmArg_GetDefaultAsIntegerList", _wrap_AlgorithmArg_GetDefaultAsIntegerList, METH_O, "AlgorithmArg_GetDefaultAsIntegerList(AlgorithmArg self)"},
	 { "AlgorithmArg_GetDefaultAsDoubleList", _wrap_AlgorithmArg_GetDefaultAsDoubleList, METH_O, "AlgorithmArg_GetDefaultAsDoubleList(AlgorithmArg self)"},
	 { "AlgorithmArg_IsHidden", _wrap_AlgorithmArg_IsHidden, METH_O, "AlgorithmArg_IsHidden(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_IsHiddenForCLI", _wrap_AlgorithmArg_IsHiddenForCLI, METH_O, "AlgorithmArg_IsHiddenForCLI(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_IsHiddenForAPI", _wrap_AlgorithmArg_IsHiddenForAPI, METH_O, "AlgorithmArg_IsHiddenForAPI(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_IsInput", _wrap_AlgorithmArg_IsInput, METH_O, "AlgorithmArg_IsInput(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_IsOutput", _wrap_AlgorithmArg_IsOutput, METH_O, "AlgorithmArg_IsOutput(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetDatasetType", _wrap_AlgorithmArg_GetDatasetType, METH_O, "AlgorithmArg_GetDatasetType(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetDatasetInputFlags", _wrap_AlgorithmArg_GetDatasetInputFlags, METH_O, "AlgorithmArg_GetDatasetInputFlags(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetDatasetOutputFlags", _wrap_AlgorithmArg_GetDatasetOutputFlags, METH_O, "AlgorithmArg_GetDatasetOutputFlags(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetMutualExclusionGroup", _wrap_AlgorithmArg_GetMutualExclusionGroup, METH_O, "AlgorithmArg_GetMutualExclusionGroup(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetAsBoolean", _wrap_AlgorithmArg_GetAsBoolean, METH_O, "AlgorithmArg_GetAsBoolean(AlgorithmArg self) -> bool"},
	 { "AlgorithmArg_GetAsString", _wrap_AlgorithmArg_GetAsString, METH_O, "AlgorithmArg_GetAsString(AlgorithmArg self) -> char const *"},
	 { "AlgorithmArg_GetAsInteger", _wrap_AlgorithmArg_GetAsInteger, METH_O, "AlgorithmArg_GetAsInteger(AlgorithmArg self) -> int"},
	 { "AlgorithmArg_GetAsDouble", _wrap_AlgorithmArg_GetAsDouble, METH_O, "AlgorithmArg_GetAsDouble(AlgorithmArg self) -> double"},
	 { "AlgorithmArg_GetAsDatasetValue", _wrap_AlgorithmArg_GetAsDatasetValue, METH_O, "AlgorithmArg_GetAsDatasetValue(AlgorithmArg self) -> ArgDatasetValue"},
	 { "AlgorithmArg_GetAsStringList", _wrap_AlgorithmArg_GetAsStringList, METH_O, "AlgorithmArg_GetAsStringList(AlgorithmArg self) -> char **"},
	 { "AlgorithmArg_GetAsIntegerList", _wrap_AlgorithmArg_GetAsIntegerList, METH_O, "AlgorithmArg_GetAsIntegerList(AlgorithmArg self)"},
	 { "AlgorithmArg_GetAsDoubleList", _wrap_AlgorithmArg_GetAsDoubleList, METH_O, "AlgorithmArg_GetAsDoubleList(AlgorithmArg self)"},
	 { "AlgorithmArg_SetAsBoolean", _wrap_AlgorithmArg_SetAsBoolean, METH_VARARGS, "AlgorithmArg_SetAsBoolean(AlgorithmArg self, bool value) -> bool"},
	 { "AlgorithmArg_SetAsString", _wrap_AlgorithmArg_SetAsString, METH_VARARGS, "AlgorithmArg_SetAsString(AlgorithmArg self, char const * value) -> bool"},
	 { "AlgorithmArg_SetAsInteger", _wrap_AlgorithmArg_SetAsInteger, METH_VARARGS, "AlgorithmArg_SetAsInteger(AlgorithmArg self, int value) -> bool"},
	 { "AlgorithmArg_SetAsDouble", _wrap_AlgorithmArg_SetAsDouble, METH_VARARGS, "AlgorithmArg_SetAsDouble(AlgorithmArg self, double value) -> bool"},
	 { "AlgorithmArg_SetAsDatasetValue", _wrap_AlgorithmArg_SetAsDatasetValue, METH_VARARGS, "AlgorithmArg_SetAsDatasetValue(AlgorithmArg self, ArgDatasetValue value) -> bool"},
	 { "AlgorithmArg_SetAsStringList", _wrap_AlgorithmArg_SetAsStringList, METH_VARARGS, "AlgorithmArg_SetAsStringList(AlgorithmArg self, char ** value) -> bool"},
	 { "AlgorithmArg_SetAsIntegerList", _wrap_AlgorithmArg_SetAsIntegerList, METH_VARARGS, "AlgorithmArg_SetAsIntegerList(AlgorithmArg self, int nList) -> bool"},
	 { "AlgorithmArg_SetAsDoubleList", _wrap_AlgorithmArg_SetAsDoubleList, METH_VARARGS, "AlgorithmArg_SetAsDoubleList(AlgorithmArg self, int nList) -> bool"},
	 { "AlgorithmArg_SetDataset", _wrap_AlgorithmArg_SetDataset, METH_VARARGS, "AlgorithmArg_SetDataset(AlgorithmArg self, Dataset ds) -> bool"},
	 { "AlgorithmArg_SetDatasets", _wrap_AlgorithmArg_SetDatasets, METH_VARARGS, "AlgorithmArg_SetDatasets(AlgorithmArg self, int object_list_count) -> bool"},
	 { "AlgorithmArg_SetDatasetNames", _wrap_AlgorithmArg_SetDatasetNames, METH_VARARGS, "AlgorithmArg_SetDatasetNames(AlgorithmArg self, char ** names) -> bool"},
	 { "AlgorithmArg_swigregister", AlgorithmArg_swigregister, METH_O, NULL},
	 { "delete_Algorithm", _wrap_delete_Algorithm, METH_O, "delete_Algorithm(Algorithm self)"},
	 { "Algorithm_GetName", _wrap_Algorithm_GetName, METH_O, "\n"
		"Algorithm_GetName(Algorithm self) -> char const *\n"
		"\n"
		"\n"
		"Get the name of the algorithm.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.Algorithm(\"raster\", \"info\").GetName()\n"
		"'info'\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetDescription", _wrap_Algorithm_GetDescription, METH_O, "\n"
		"Algorithm_GetDescription(Algorithm self) -> char const *\n"
		"\n"
		"\n"
		"Get a human-readable description of the Algorithm.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
		">>> alg.GetDescription()\n"
		"'Convert a raster dataset.'\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetLongDescription", _wrap_Algorithm_GetLongDescription, METH_O, "\n"
		"Algorithm_GetLongDescription(Algorithm self) -> char const *\n"
		"\n"
		"\n"
		":meta private:\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetHelpFullURL", _wrap_Algorithm_GetHelpFullURL, METH_O, "\n"
		"Algorithm_GetHelpFullURL(Algorithm self) -> char const *\n"
		"\n"
		"\n"
		"Get a URL for the algorithm's documentation.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
		">>> alg.GetHelpFullURL()\n"
		"'https://gdal.org/programs/gdal_raster_convert.html'\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_HasSubAlgorithms", _wrap_Algorithm_HasSubAlgorithms, METH_O, "\n"
		"Algorithm_HasSubAlgorithms(Algorithm self) -> bool\n"
		"\n"
		"\n"
		"Returns whether the algorithm has sub-algorithms.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\")\n"
		">>> alg.HasSubAlgorithms()\n"
		"True\n"
		">>> subalg = alg.InstantiateSubAlgorithm(\"convert\")\n"
		">>> subalg.HasSubAlgorithms()\n"
		"False\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetSubAlgorithmNames", _wrap_Algorithm_GetSubAlgorithmNames, METH_O, "\n"
		"Algorithm_GetSubAlgorithmNames(Algorithm self) -> char **\n"
		"\n"
		"\n"
		"Return a list of names of sub-algorithms.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list or None\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\")\n"
		">>> alg.GetSubAlgorithmNames()\n"
		"['as-features', 'aspect', ..., 'viewshed', 'zonal-stats']\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_InstantiateSubAlgorithm", _wrap_Algorithm_InstantiateSubAlgorithm, METH_VARARGS, "\n"
		"Algorithm_InstantiateSubAlgorithm(Algorithm self, char const * algName) -> Algorithm\n"
		"\n"
		"\n"
		"Instantiate a sub-algorithm if available.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Algorithm or None\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\")\n"
		">>> alg.InstantiateSubAlgorithm(\"convert\")\n"
		"<osgeo.gdal.Algorithm; proxy of <Swig Object of type 'GDALAlgorithmHS *' at ...> >\n"
		">>> subalg = alg.InstantiateSubAlgorithm(\"does_not_exist\")\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_ParseCommandLineArguments", _wrap_Algorithm_ParseCommandLineArguments, METH_VARARGS, "\n"
		"Algorithm_ParseCommandLineArguments(Algorithm self, char ** args) -> bool\n"
		"\n"
		"\n"
		"Parse a list of arguments for the algorithm, setting the appropriate parameters. May only be called once per algorithm.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"args : list\n"
		"    List of named or positional arguments\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    Whether the arguments were successfully parsed\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"vector\", \"info\")\n"
		">>> alg.ParseCommandLineArguments(['poly.shp', '--format', 'text'])\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetActualAlgorithm", _wrap_Algorithm_GetActualAlgorithm, METH_O, "\n"
		"Algorithm_GetActualAlgorithm(Algorithm self) -> Algorithm\n"
		"\n"
		"\n"
		"Return the actual algorithm that is going to be invoked, if the\n"
		"current algorithm has sub-algorithms.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Algorithm\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg(\"raster\")\n"
		">>> alg.ParseCommandLineArguments([\"convert\" ,\"--input\", \"byte.tif\", \"--output\",  \"/tmp/byte.png\"])\n"
		"True\n"
		">>> alg.GetActualAlgorithm().GetDescription()\n"
		"'Convert a raster dataset.'\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_Run", _wrap_Algorithm_Run, METH_VARARGS, "Algorithm_Run(Algorithm self, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
	 { "Algorithm_Finalize", _wrap_Algorithm_Finalize, METH_O, "\n"
		"Algorithm_Finalize(Algorithm self) -> bool\n"
		"\n"
		"\n"
		"Close any dataset arguments or outputs of the algorithm.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_ParseRunAndFinalize", _wrap_Algorithm_ParseRunAndFinalize, METH_VARARGS, "\n"
		"Algorithm_ParseRunAndFinalize(Algorithm self, char ** args, GDALProgressFunc callback=0, void * callback_data=None) -> bool\n"
		"\n"
		"\n"
		"Convenience method that calls :py:meth:`ParseCommandLineArguments`, :py:meth:`Run`, and :py:meth:`Finalize`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"args : list\n"
		"    List of command line arguments\n"
		"callback : callable, optional\n"
		"    Optional progress callback function\n"
		"callback_data\n"
		"    Optional value to be provided as final argument to callback function\n"
		"\n"
		"Returns\n"
		"-------\n"
		"bool\n"
		"    ``True`` if the algorithm succeeded, ``False`` otherwise\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetUsageAsJSON", _wrap_Algorithm_GetUsageAsJSON, METH_O, "\n"
		"Algorithm_GetUsageAsJSON(Algorithm self) -> retStringAndCPLFree *\n"
		"\n"
		"\n"
		"Returns a JSON representation of an algorithm's usage information, serialized to a string.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> import json\n"
		">>> import pprint\n"
		">>> usage = json.loads(gdal.Algorithm(\"vector\", \"info\").GetUsageAsJSON())\n"
		">>> pprint.pprint(usage)\n"
		"{'description': 'Return information on a vector dataset.',\n"
		" 'full_path': ['gdal', 'vector', 'info'],\n"
		" 'input_arguments': [{'category': 'Base',\n"
		"                      'choices': ['json', 'text'],\n"
		"                      'description': 'Output format',\n"
		"                      'name': 'output-format',\n"
		"                      'required': False,\n"
		"                      'type': 'string'},\n"
		"                     {'category': 'Advanced',\n"
		"                      'description': 'Open options',\n"
		"                      'max_count': 2147483647,\n"
		"                      'metavar': '<KEY>=<VALUE>',\n"
		"                      'min_count': 0,\n"
		"                      'name': 'open-option',\n"
		"                      'packed_values_allowed': False,\n"
		"                      'repeated_arg_allowed': True,\n"
		"                      'required': False,\n"
		"                      'type': 'string_list'},\n"
		"                     {'category': 'Advanced',\n"
		"                      'description': 'Input formats',\n"
		"                      'max_count': 2147483647,\n"
		"                      'metadata': {'required_capabilities': ['DCAP_VECTOR']},\n"
		"                      'min_count': 0,\n"
		"                      'name': 'input-format',\n"
		"                      'packed_values_allowed': True,\n"
		"                      'repeated_arg_allowed': True,\n"
		"                      'required': False,\n"
		"                      'type': 'string_list'},\n"
		"                     {'category': 'Base',\n"
		"                      'dataset_type': ['vector'],\n"
		"                      'description': 'Input vector datasets',\n"
		"                      'input_flags': ['name', 'dataset'],\n"
		"                      'max_count': 2147483647,\n"
		"                      'min_count': 0,\n"
		"                      'name': 'input',\n"
		"                      'packed_values_allowed': False,\n"
		"                      'repeated_arg_allowed': True,\n"
		"                      'required': True,\n"
		"                      'type': 'dataset_list'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'Input layer name',\n"
		"                      'max_count': 2147483647,\n"
		"                      'min_count': 0,\n"
		"                      'mutual_exclusion_group': 'layer-sql',\n"
		"                      'name': 'input-layer',\n"
		"                      'packed_values_allowed': True,\n"
		"                      'repeated_arg_allowed': True,\n"
		"                      'required': False,\n"
		"                      'type': 'string_list'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'List all features (beware of RAM '\n"
		"                                     'consumption on large layers)',\n"
		"                      'mutual_exclusion_group': 'summary-features',\n"
		"                      'name': 'features',\n"
		"                      'required': False,\n"
		"                      'type': 'boolean'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'List the layer names and the geometry '\n"
		"                                     'type',\n"
		"                      'mutual_exclusion_group': 'summary-features',\n"
		"                      'name': 'summary',\n"
		"                      'required': False,\n"
		"                      'type': 'boolean'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'Limit the number of features per layer '\n"
		"                                     '(implies --features)',\n"
		"                      'metavar': 'FEATURE-COUNT',\n"
		"                      'min_value': 0,\n"
		"                      'min_value_is_included': True,\n"
		"                      'name': 'limit',\n"
		"                      'required': False,\n"
		"                      'type': 'integer'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'Execute the indicated SQL statement and '\n"
		"                                     'return the result',\n"
		"                      'metavar': '<statement>|@<filename>',\n"
		"                      'mutual_exclusion_group': 'layer-sql',\n"
		"                      'name': 'sql',\n"
		"                      'required': False,\n"
		"                      'type': 'string'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'Attribute query in a restricted form of '\n"
		"                                     'the queries used in the SQL WHERE '\n"
		"                                     'statement',\n"
		"                      'metavar': '<WHERE>|@<filename>',\n"
		"                      'name': 'where',\n"
		"                      'required': False,\n"
		"                      'type': 'string'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'SQL dialect',\n"
		"                      'name': 'dialect',\n"
		"                      'required': False,\n"
		"                      'type': 'string'},\n"
		"                     {'category': 'Base',\n"
		"                      'description': 'Open the dataset in update mode',\n"
		"                      'name': 'update',\n"
		"                      'required': False,\n"
		"                      'type': 'boolean'}],\n"
		" 'input_output_arguments': [],\n"
		" 'name': 'info',\n"
		" 'output_arguments': [{'category': 'Base',\n"
		"                       'description': 'Output string, in which the result is '\n"
		"                                      'placed',\n"
		"                       'name': 'output-string',\n"
		"                       'required': False,\n"
		"                       'type': 'string'}],\n"
		" 'short_url': '/programs/gdal_vector_info.html',\n"
		" 'sub_algorithms': [],\n"
		" 'supports_streamed_output': True,\n"
		" 'url': 'https://gdal.org/programs/gdal_vector_info.html'}\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetArgNames", _wrap_Algorithm_GetArgNames, METH_O, "\n"
		"Algorithm_GetArgNames(Algorithm self) -> char **\n"
		"\n"
		"\n"
		"Get a list of arguments understood by the Algorithm.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
		">>> sorted(alg.GetArgNames())\n"
		"['append', 'config', 'creation-option', ..., 'progress', 'quiet']\n"
		"\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetArg", _wrap_Algorithm_GetArg, METH_VARARGS, "\n"
		"Algorithm_GetArg(Algorithm self, char const * argName) -> AlgorithmArg\n"
		"\n"
		"\n"
		"Get an :py:class:`AlgorithmArg` object that can be queried for information about an argument.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"argName : str\n"
		"\n"
		"Returns\n"
		"-------\n"
		"AlgorithmArg\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> alg = gdal.Algorithm(\"raster\", \"polygonize\")\n"
		">>> arg = alg.GetArg(\"connect-diagonal-pixels\")\n"
		">>> arg.GetDescription()\n"
		"'Consider diagonal pixels as connected'\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_GetArgNonConst", _wrap_Algorithm_GetArgNonConst, METH_VARARGS, "\n"
		"Algorithm_GetArgNonConst(Algorithm self, char const * argName) -> AlgorithmArg\n"
		"\n"
		"\n"
		":meta private:\n"
		"\n"
		"\n"
		""},
	 { "Algorithm_swigregister", Algorithm_swigregister, METH_O, NULL},
	 { "delete_AlgorithmRegistry", _wrap_delete_AlgorithmRegistry, METH_O, "delete_AlgorithmRegistry(AlgorithmRegistry self)"},
	 { "AlgorithmRegistry_GetAlgNames", _wrap_AlgorithmRegistry_GetAlgNames, METH_O, "\n"
		"AlgorithmRegistry_GetAlgNames(AlgorithmRegistry self) -> char **\n"
		"\n"
		"\n"
		"Return the names of available algorithms.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.GetGlobalAlgorithmRegistry().GetAlgNames()\n"
		"['convert', 'dataset', 'info', 'mdim', 'pipeline', 'raster', 'vector', 'vsi']\n"
		"\n"
		"\n"
		""},
	 { "AlgorithmRegistry_InstantiateAlg", _wrap_AlgorithmRegistry_InstantiateAlg, METH_VARARGS, "\n"
		"AlgorithmRegistry_InstantiateAlg(AlgorithmRegistry self, char const * algName) -> Algorithm\n"
		"\n"
		"\n"
		"Instantiate an :py:class:`Algorithm`.\n"
		"\n"
		"Most useful algorithms are accessed as a sub-algorithm of another algorithm.\n"
		"For example, ``polygonize`` is a sub-algorithm of ``raster`` and can be\n"
		"instantiated by first instantiating the primary algorithm, then using\n"
		":py:meth:`Algorithm.InstantiateSubAlgorithm`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Algorithm\n"
		"\n"
		"Examples\n"
		"--------\n"
		"\n"
		">>> alg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg('pipeline')    # or alg= gdal.Algorithm(\"pipeline\")\n"
		">>> alg.GetName()\n"
		"'pipeline'\n"
		">>> alg.GetArgNames()\n"
		"['help', 'help-doc', 'json-usage', 'config', 'quiet', 'progress', 'input', 'output', 'output-format', 'pipeline', 'output-string', 'stdout']\n"
		"\n"
		">>> subalg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg('raster').InstantiateSubAlgorithm('polygonize')\n"
		">>> subalg.GetArgNames()\n"
		"['help', 'help-doc', 'json-usage', 'config', 'quiet', 'progress', 'input-format', 'open-option', 'input', 'output-format', 'output-open-option', 'output', 'creation-option', 'layer-creation-option', 'overwrite', 'update', 'overwrite-layer', 'append', 'output-layer', 'band', 'attribute-name', 'connect-diagonal-pixels', 'commit-interval']\n"
		"\n"
		"\n"
		""},
	 { "AlgorithmRegistry_swigregister", AlgorithmRegistry_swigregister, METH_O, NULL},
	 { "delete_ArgDatasetValue", _wrap_delete_ArgDatasetValue, METH_O, "delete_ArgDatasetValue(ArgDatasetValue self)"},
	 { "ArgDatasetValue_GetName", _wrap_ArgDatasetValue_GetName, METH_O, "ArgDatasetValue_GetName(ArgDatasetValue self) -> char const *"},
	 { "ArgDatasetValue_GetDataset", _wrap_ArgDatasetValue_GetDataset, METH_O, "ArgDatasetValue_GetDataset(ArgDatasetValue self) -> Dataset"},
	 { "ArgDatasetValue_SetName", _wrap_ArgDatasetValue_SetName, METH_VARARGS, "ArgDatasetValue_SetName(ArgDatasetValue self, char const * name)"},
	 { "ArgDatasetValue_SetDataset", _wrap_ArgDatasetValue_SetDataset, METH_VARARGS, "ArgDatasetValue_SetDataset(ArgDatasetValue self, Dataset ds)"},
	 { "ArgDatasetValue_swigregister", ArgDatasetValue_swigregister, METH_O, NULL},
	 { "ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, "\n"
		"ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)\n"
		"\n"
		"\n"
		"Apply a geotransform to convert a (col, row) location\n"
		"into a georeferenced (x, y) coordinate. To perform the\n"
		"inverse transformation, see :py:func:`InvGeoTransform`.\n"
		"\n"
		"See :cpp:func:`GDALApplyGeoTransform`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gt : tuple\n"
		"   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
		"dfPixel : float\n"
		"   (Fractional) column in image coordinates (0.0 at the left edge of the image)\n"
		"dfLine : float\n"
		"   (Fractional) row in image coordinates (0.0 at the top of the image)\n"
		"\n"
		"Returns\n"
		"-------\n"
		"List\n"
		"   x, y values corresponding to the input location\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('byte.tif')\n"
		">>> gt = ds.GetGeoTransform()\n"
		">>> gdal.ApplyGeoTransform(gt, 5, 7)\n"
		"[441020.0, 3750900.0]\n"
		"\n"
		"\n"
		""},
	 { "InvGeoTransform", _wrap_InvGeoTransform, METH_O, "\n"
		"InvGeoTransform(double [6] gt_in) -> RETURN_NONE\n"
		"\n"
		"\n"
		"Invert a geotransform array so that it represents a conversion\n"
		"from georeferenced (x, y) coordinates to image (col, row) coordinates.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gt : tuple\n"
		"   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"tuple\n"
		"   Geotransform array representing the inverse transformation\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ds = gdal.Open('byte.tif')\n"
		">>> inv_gt = gdal.InvGeoTransform(ds.GetGeoTransform())\n"
		">>> inv_gt\n"
		"(-7345.333333333333, 0.016666666666666666, 0.0, 62522.0, 0.0, -0.016666666666666666)\n"
		">>> gdal.ApplyGeoTransform(inv_gt, 441020, 3750900)\n"
		"[5.0, 7.0]\n"
		"\n"
		"\n"
		""},
	 { "ApplyHomography", _wrap_ApplyHomography, METH_VARARGS, "ApplyHomography(double [9] padfHomography, double dfPixel, double dfLine) -> int"},
	 { "InvHomography", _wrap_InvHomography, METH_O, "InvHomography(double [9] h_in) -> RETURN_NONE"},
	 { "VersionInfo", _wrap_VersionInfo, METH_VARARGS, "VersionInfo(char const * request=\"VERSION_NUM\") -> char const *"},
	 { "AllRegister", _wrap_AllRegister, METH_NOARGS, "\n"
		"AllRegister()\n"
		"\n"
		"\n"
		"Register all known configured GDAL drivers.\n"
		"Automatically called when the :py:mod:`gdal` module is loaded.\n"
		"Does not need to be called in user code unless a driver was\n"
		"deregistered and needs to be re-registered.\n"
		"See :cpp:func:`GDALAllRegister`.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`Driver.Register`\n"
		"\n"
		""},
	 { "GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_NOARGS, "GDALDestroyDriverManager()"},
	 { "GetCacheMax", _wrap_GetCacheMax, METH_NOARGS, "\n"
		"GetCacheMax() -> GIntBig\n"
		"\n"
		"\n"
		"Get the maximum size of the block cache.\n"
		"See :cpp:func:`GDALGetCacheMax`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    maximum cache size in bytes\n"
		"\n"
		""},
	 { "GetCacheUsed", _wrap_GetCacheUsed, METH_NOARGS, "\n"
		"GetCacheUsed() -> GIntBig\n"
		"\n"
		"\n"
		"Get the number of bytes in used by the block cache.\n"
		"See :cpp:func:`GDALGetCacheUsed`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    cache size in bytes\n"
		"\n"
		""},
	 { "SetCacheMax", _wrap_SetCacheMax, METH_O, "\n"
		"SetCacheMax(GIntBig nBytes)\n"
		"\n"
		"\n"
		"Set the maximum size of the block cache.\n"
		"See :cpp:func:`GDALSetCacheMax`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nBytes : int\n"
		"    Cache size in bytes\n"
		"\n"
		"See Also\n"
		"--------\n"
		":config:`GDAL_CACHEMAX`\n"
		"\n"
		""},
	 { "GetDataTypeSize", _wrap_GetDataTypeSize, METH_O, "GetDataTypeSize(GDALDataType eDataType) -> int"},
	 { "GetDataTypeSizeBits", _wrap_GetDataTypeSizeBits, METH_O, "GetDataTypeSizeBits(GDALDataType eDataType) -> int"},
	 { "GetDataTypeSizeBytes", _wrap_GetDataTypeSizeBytes, METH_O, "GetDataTypeSizeBytes(GDALDataType eDataType) -> int"},
	 { "DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_O, "DataTypeIsComplex(GDALDataType eDataType) -> int"},
	 { "GetDataTypeName", _wrap_GetDataTypeName, METH_O, "\n"
		"GetDataTypeName(GDALDataType eDataType) -> char const *\n"
		"\n"
		"\n"
		"Return the name of the data type.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"eDataType : int\n"
		"    data type code\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.GetDataTypeName(gdal.GDT_Int16)\n"
		"'Int16'\n"
		">>> gdal.GetDataTypeName(gdal.GDT_Float64)\n"
		"'Float64'\n"
		"\n"
		""},
	 { "GetDataTypeByName", _wrap_GetDataTypeByName, METH_O, "\n"
		"GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType\n"
		"\n"
		"\n"
		"Return the data type for a given name.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pszDataTypeName : str\n"
		"    data type name\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int\n"
		"    data type code\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> gdal.GetDataTypeByName('Int16') == gdal.GDT_Int16\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "DataTypeUnion", _wrap_DataTypeUnion, METH_VARARGS, "DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType"},
	 { "DataTypeUnionWithValue", _wrap_DataTypeUnionWithValue, METH_VARARGS, "DataTypeUnionWithValue(GDALDataType a, double val, bool isComplex) -> GDALDataType"},
	 { "GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_O, "GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"},
	 { "GetColorInterpretationByName", _wrap_GetColorInterpretationByName, METH_O, "GetColorInterpretationByName(char const * pszColorInterpName) -> GDALColorInterp"},
	 { "GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_O, "GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"},
	 { "DecToDMS", _wrap_DecToDMS, METH_VARARGS, "DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"},
	 { "PackedDMSToDec", _wrap_PackedDMSToDec, METH_O, "PackedDMSToDec(double dfPacked) -> double"},
	 { "DecToPackedDMS", _wrap_DecToPackedDMS, METH_O, "DecToPackedDMS(double dfDec) -> double"},
	 { "ParseXMLString", _wrap_ParseXMLString, METH_O, "ParseXMLString(char * pszXMLString) -> CPLXMLNode *"},
	 { "SerializeXMLTree", _wrap_SerializeXMLTree, METH_O, "SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"},
	 { "GetJPEG2000Structure", _wrap_GetJPEG2000Structure, METH_VARARGS, "GetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *"},
	 { "GetJPEG2000StructureAsString", _wrap_GetJPEG2000StructureAsString, METH_VARARGS, "GetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
	 { "HasTriangulation", _wrap_HasTriangulation, METH_NOARGS, "HasTriangulation() -> int"},
	 { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "\n"
		"GetDriverCount() -> int\n"
		"\n"
		"\n"
		"Return the number of registered drivers.\n"
		"See :cpp:func:`GDALGetDriverCount`.\n"
		"\n"
		"Examples\n"
		"--------\n"
		"\n"
		".. testsetup::\n"
		"    >>> pytest.skip()\n"
		"\n"
		">>> gdal.GetDriverCount()\n"
		">>> 124\n"
		">>> gdal.GetDriverByName('MapInfo File').Deregister()\n"
		">>> gdal.GetDriverCount()\n"
		">>> 123\n"
		"\n"
		""},
	 { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
	 { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int i) -> Driver"},
	 { "Open", _wrap_Open, METH_VARARGS, "\n"
		"Open(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
		"\n"
		"\n"
		"Opens a raster file as a :py:class:`Dataset` using default options.\n"
		"See :cpp:func:`GDALOpen`.\n"
		"For more control over how the file is opened, use :py:func:`OpenEx`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"    name of the file to open\n"
		"eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset or None\n"
		"    A dataset if successful, or ``None`` on failure.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`OpenEx`\n"
		":py:func:`OpenShared`\n"
		"\n"
		"\n"
		""},
	 { "OpenEx", (PyCFunction)(void(*)(void))_wrap_OpenEx, METH_VARARGS|METH_KEYWORDS, "\n"
		"OpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset\n"
		"\n"
		"\n"
		"Open a raster or vector file as a :py:class:`Dataset`.\n"
		"See :cpp:func:`GDALOpenEx`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"    name of the file to open\n"
		"flags : int\n"
		"        Flags controlling how the Dataset is opened. Multiple ``gdal.OF_XXX`` flags\n"
		"        may be combined using the ``|`` operator. See :cpp:func:`GDALOpenEx`.\n"
		"allowed_drivers : list, optional\n"
		"        A list of the names of drivers that may attempt to open the dataset.\n"
		"open_options : dict or list, optional\n"
		"        A dict or list of name=value driver-specific opening options.\n"
		"sibling_files : list, optional\n"
		"        A list of filenames that are auxiliary to the main filename\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset or None\n"
		"    A dataset if successful, or ``None`` on failure.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`Open`\n"
		":py:func:`OpenShared`\n"
		"\n"
		"\n"
		""},
	 { "OpenShared", _wrap_OpenShared, METH_VARARGS, "\n"
		"OpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
		"\n"
		"\n"
		"Open a raster file as a :py:class:`Dataset`. If the file has already been\n"
		"opened in the current thread, return a reference to the already-opened\n"
		":py:class:`Dataset`.  See :cpp:func:`GDALOpenShared`.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"    name of the file to open\n"
		"eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset or None\n"
		"    A dataset if successful, or ``None`` on failure.\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`Open`\n"
		":py:func:`OpenEx`\n"
		"\n"
		"\n"
		""},
	 { "IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, "IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"},
	 { "IdentifyDriverEx", (PyCFunction)(void(*)(void))_wrap_IdentifyDriverEx, METH_VARARGS|METH_KEYWORDS, "IdentifyDriverEx(char const * utf8_path, unsigned int nIdentifyFlags=0, char ** allowed_drivers=None, char ** sibling_files=None) -> Driver"},
	 { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
	 { "new_GDALInfoOptions", _wrap_new_GDALInfoOptions, METH_O, "new_GDALInfoOptions(char ** options) -> GDALInfoOptions"},
	 { "delete_GDALInfoOptions", _wrap_delete_GDALInfoOptions, METH_O, "delete_GDALInfoOptions(GDALInfoOptions self)"},
	 { "GDALInfoOptions_swigregister", GDALInfoOptions_swigregister, METH_O, NULL},
	 { "GDALInfoOptions_swiginit", GDALInfoOptions_swiginit, METH_VARARGS, NULL},
	 { "InfoInternal", _wrap_InfoInternal, METH_VARARGS, "InfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *"},
	 { "new_GDALVectorInfoOptions", _wrap_new_GDALVectorInfoOptions, METH_O, "new_GDALVectorInfoOptions(char ** options) -> GDALVectorInfoOptions"},
	 { "delete_GDALVectorInfoOptions", _wrap_delete_GDALVectorInfoOptions, METH_O, "delete_GDALVectorInfoOptions(GDALVectorInfoOptions self)"},
	 { "GDALVectorInfoOptions_swigregister", GDALVectorInfoOptions_swigregister, METH_O, NULL},
	 { "GDALVectorInfoOptions_swiginit", GDALVectorInfoOptions_swiginit, METH_VARARGS, NULL},
	 { "VectorInfoInternal", _wrap_VectorInfoInternal, METH_VARARGS, "VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *"},
	 { "new_GDALMultiDimInfoOptions", _wrap_new_GDALMultiDimInfoOptions, METH_O, "new_GDALMultiDimInfoOptions(char ** options) -> GDALMultiDimInfoOptions"},
	 { "delete_GDALMultiDimInfoOptions", _wrap_delete_GDALMultiDimInfoOptions, METH_O, "delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions self)"},
	 { "GDALMultiDimInfoOptions_swigregister", GDALMultiDimInfoOptions_swigregister, METH_O, NULL},
	 { "GDALMultiDimInfoOptions_swiginit", GDALMultiDimInfoOptions_swiginit, METH_VARARGS, NULL},
	 { "MultiDimInfoInternal", _wrap_MultiDimInfoInternal, METH_VARARGS, "MultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *"},
	 { "new_GDALTranslateOptions", _wrap_new_GDALTranslateOptions, METH_O, "new_GDALTranslateOptions(char ** options) -> GDALTranslateOptions"},
	 { "delete_GDALTranslateOptions", _wrap_delete_GDALTranslateOptions, METH_O, "delete_GDALTranslateOptions(GDALTranslateOptions self)"},
	 { "GDALTranslateOptions_swigregister", GDALTranslateOptions_swigregister, METH_O, NULL},
	 { "GDALTranslateOptions_swiginit", GDALTranslateOptions_swiginit, METH_VARARGS, NULL},
	 { "TranslateInternal", _wrap_TranslateInternal, METH_VARARGS, "TranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALWarpAppOptions", _wrap_new_GDALWarpAppOptions, METH_O, "new_GDALWarpAppOptions(char ** options) -> GDALWarpAppOptions"},
	 { "delete_GDALWarpAppOptions", _wrap_delete_GDALWarpAppOptions, METH_O, "delete_GDALWarpAppOptions(GDALWarpAppOptions self)"},
	 { "GDALWarpAppOptions_swigregister", GDALWarpAppOptions_swigregister, METH_O, NULL},
	 { "GDALWarpAppOptions_swiginit", GDALWarpAppOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALWarpDestDS", _wrap_wrapper_GDALWarpDestDS, METH_VARARGS, "wrapper_GDALWarpDestDS(Dataset dstDS, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "wrapper_GDALWarpDestName", _wrap_wrapper_GDALWarpDestName, METH_VARARGS, "wrapper_GDALWarpDestName(char const * dest, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALVectorTranslateOptions", _wrap_new_GDALVectorTranslateOptions, METH_O, "new_GDALVectorTranslateOptions(char ** options) -> GDALVectorTranslateOptions"},
	 { "delete_GDALVectorTranslateOptions", _wrap_delete_GDALVectorTranslateOptions, METH_O, "delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions self)"},
	 { "GDALVectorTranslateOptions_swigregister", GDALVectorTranslateOptions_swigregister, METH_O, NULL},
	 { "GDALVectorTranslateOptions_swiginit", GDALVectorTranslateOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALVectorTranslateDestDS", _wrap_wrapper_GDALVectorTranslateDestDS, METH_VARARGS, "wrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "wrapper_GDALVectorTranslateDestName", _wrap_wrapper_GDALVectorTranslateDestName, METH_VARARGS, "wrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALDEMProcessingOptions", _wrap_new_GDALDEMProcessingOptions, METH_O, "new_GDALDEMProcessingOptions(char ** options) -> GDALDEMProcessingOptions"},
	 { "delete_GDALDEMProcessingOptions", _wrap_delete_GDALDEMProcessingOptions, METH_O, "delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions self)"},
	 { "GDALDEMProcessingOptions_swigregister", GDALDEMProcessingOptions_swigregister, METH_O, NULL},
	 { "GDALDEMProcessingOptions_swiginit", GDALDEMProcessingOptions_swiginit, METH_VARARGS, NULL},
	 { "DEMProcessingInternal", _wrap_DEMProcessingInternal, METH_VARARGS, "DEMProcessingInternal(char const * dest, Dataset dataset, char const * pszProcessing, char const * pszColorFilename, GDALDEMProcessingOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALNearblackOptions", _wrap_new_GDALNearblackOptions, METH_O, "new_GDALNearblackOptions(char ** options) -> GDALNearblackOptions"},
	 { "delete_GDALNearblackOptions", _wrap_delete_GDALNearblackOptions, METH_O, "delete_GDALNearblackOptions(GDALNearblackOptions self)"},
	 { "GDALNearblackOptions_swigregister", GDALNearblackOptions_swigregister, METH_O, NULL},
	 { "GDALNearblackOptions_swiginit", GDALNearblackOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALNearblackDestDS", _wrap_wrapper_GDALNearblackDestDS, METH_VARARGS, "wrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "wrapper_GDALNearblackDestName", _wrap_wrapper_GDALNearblackDestName, METH_VARARGS, "wrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALGridOptions", _wrap_new_GDALGridOptions, METH_O, "new_GDALGridOptions(char ** options) -> GDALGridOptions"},
	 { "delete_GDALGridOptions", _wrap_delete_GDALGridOptions, METH_O, "delete_GDALGridOptions(GDALGridOptions self)"},
	 { "GDALGridOptions_swigregister", GDALGridOptions_swigregister, METH_O, NULL},
	 { "GDALGridOptions_swiginit", GDALGridOptions_swiginit, METH_VARARGS, NULL},
	 { "GridInternal", _wrap_GridInternal, METH_VARARGS, "GridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALContourOptions", _wrap_new_GDALContourOptions, METH_O, "new_GDALContourOptions(char ** options) -> GDALContourOptions"},
	 { "delete_GDALContourOptions", _wrap_delete_GDALContourOptions, METH_O, "delete_GDALContourOptions(GDALContourOptions self)"},
	 { "GDALContourOptions_swigregister", GDALContourOptions_swigregister, METH_O, NULL},
	 { "GDALContourOptions_swiginit", GDALContourOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALContourDestDS", _wrap_wrapper_GDALContourDestDS, METH_VARARGS, "wrapper_GDALContourDestDS(Dataset dstDS, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "wrapper_GDALContourDestName", _wrap_wrapper_GDALContourDestName, METH_VARARGS, "wrapper_GDALContourDestName(char const * dest, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALRasterizeOptions", _wrap_new_GDALRasterizeOptions, METH_O, "new_GDALRasterizeOptions(char ** options) -> GDALRasterizeOptions"},
	 { "delete_GDALRasterizeOptions", _wrap_delete_GDALRasterizeOptions, METH_O, "delete_GDALRasterizeOptions(GDALRasterizeOptions self)"},
	 { "GDALRasterizeOptions_swigregister", GDALRasterizeOptions_swigregister, METH_O, NULL},
	 { "GDALRasterizeOptions_swiginit", GDALRasterizeOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALRasterizeDestDS", _wrap_wrapper_GDALRasterizeDestDS, METH_VARARGS, "wrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "wrapper_GDALRasterizeDestName", _wrap_wrapper_GDALRasterizeDestName, METH_VARARGS, "wrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALFootprintOptions", _wrap_new_GDALFootprintOptions, METH_O, "new_GDALFootprintOptions(char ** options) -> GDALFootprintOptions"},
	 { "delete_GDALFootprintOptions", _wrap_delete_GDALFootprintOptions, METH_O, "delete_GDALFootprintOptions(GDALFootprintOptions self)"},
	 { "GDALFootprintOptions_swigregister", GDALFootprintOptions_swigregister, METH_O, NULL},
	 { "GDALFootprintOptions_swiginit", GDALFootprintOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALFootprintDestDS", _wrap_wrapper_GDALFootprintDestDS, METH_VARARGS, "wrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
	 { "wrapper_GDALFootprintDestName", _wrap_wrapper_GDALFootprintDestName, METH_VARARGS, "wrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALBuildVRTOptions", _wrap_new_GDALBuildVRTOptions, METH_O, "new_GDALBuildVRTOptions(char ** options) -> GDALBuildVRTOptions"},
	 { "delete_GDALBuildVRTOptions", _wrap_delete_GDALBuildVRTOptions, METH_O, "delete_GDALBuildVRTOptions(GDALBuildVRTOptions self)"},
	 { "GDALBuildVRTOptions_swigregister", GDALBuildVRTOptions_swigregister, METH_O, NULL},
	 { "GDALBuildVRTOptions_swiginit", GDALBuildVRTOptions_swiginit, METH_VARARGS, NULL},
	 { "BuildVRTInternalObjects", _wrap_BuildVRTInternalObjects, METH_VARARGS, "BuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "BuildVRTInternalNames", _wrap_BuildVRTInternalNames, METH_VARARGS, "BuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALTileIndexOptions", _wrap_new_GDALTileIndexOptions, METH_O, "new_GDALTileIndexOptions(char ** options) -> GDALTileIndexOptions"},
	 { "delete_GDALTileIndexOptions", _wrap_delete_GDALTileIndexOptions, METH_O, "delete_GDALTileIndexOptions(GDALTileIndexOptions self)"},
	 { "GDALTileIndexOptions_swigregister", GDALTileIndexOptions_swigregister, METH_O, NULL},
	 { "GDALTileIndexOptions_swiginit", GDALTileIndexOptions_swiginit, METH_VARARGS, NULL},
	 { "TileIndexInternalNames", _wrap_TileIndexInternalNames, METH_VARARGS, "TileIndexInternalNames(char const * dest, char ** source_filenames, GDALTileIndexOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { "new_GDALMultiDimTranslateOptions", _wrap_new_GDALMultiDimTranslateOptions, METH_O, "new_GDALMultiDimTranslateOptions(char ** options) -> GDALMultiDimTranslateOptions"},
	 { "delete_GDALMultiDimTranslateOptions", _wrap_delete_GDALMultiDimTranslateOptions, METH_O, "delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions self)"},
	 { "GDALMultiDimTranslateOptions_swigregister", GDALMultiDimTranslateOptions_swigregister, METH_O, NULL},
	 { "GDALMultiDimTranslateOptions_swiginit", GDALMultiDimTranslateOptions_swiginit, METH_VARARGS, NULL},
	 { "wrapper_GDALMultiDimTranslateDestName", _wrap_wrapper_GDALMultiDimTranslateDestName, METH_VARARGS, "wrapper_GDALMultiDimTranslateDestName(char const * dest, int object_list_count, GDALMultiDimTranslateOptions multiDimTranslateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
	 { NULL, NULL, 0, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_GDALComputedRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *) (GDALRasterBandShadow *) ((GDALComputedRasterBandShadow *) x));
}
static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
}
static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
}
static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
}
static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
}
static void *_p_GDALComputedRasterBandShadowTo_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALRasterBandShadow *)  ((GDALComputedRasterBandShadow *) x));
}
static void *_p_p_GDALComputedRasterBandShadowTo_p_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALRasterBandShadow **)  ((GDALComputedRasterBandShadow **) x));
}
static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CPLVirtualMemShadow = {"_p_CPLVirtualMemShadow", "CPLVirtualMemShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DirEntry = {"_p_DirEntry", "DirEntry *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALAlgorithmArgHS = {"_p_GDALAlgorithmArgHS", "GDALAlgorithmArgHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALAlgorithmHS = {"_p_GDALAlgorithmHS", "GDALAlgorithmHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALAlgorithmRegistryHS = {"_p_GDALAlgorithmRegistryHS", "GDALAlgorithmRegistryHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALArgDatasetValueHS = {"_p_GDALArgDatasetValueHS", "GDALArgDatasetValueHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALAttributeHS = {"_p_GDALAttributeHS", "GDALAttributeHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALBuildVRTOptions = {"_p_GDALBuildVRTOptions", "GDALBuildVRTOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALComputedRasterBandShadow = {"_p_GDALComputedRasterBandShadow", "GDALComputedRasterBandShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALContourOptions = {"_p_GDALContourOptions", "GDALContourOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALDEMProcessingOptions = {"_p_GDALDEMProcessingOptions", "GDALDEMProcessingOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALDimensionHS = {"_p_GDALDimensionHS", "GDALDimensionHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALEDTComponentHS = {"_p_GDALEDTComponentHS", "GDALEDTComponentHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALExtendedDataTypeClass = {"_p_GDALExtendedDataTypeClass", "GDALExtendedDataTypeClass *|enum GDALExtendedDataTypeClass *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALExtendedDataTypeHS = {"_p_GDALExtendedDataTypeHS", "GDALExtendedDataTypeHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALExtendedDataTypeSubType = {"_p_GDALExtendedDataTypeSubType", "GDALExtendedDataTypeSubType *|enum GDALExtendedDataTypeSubType *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALFootprintOptions = {"_p_GDALFootprintOptions", "GDALFootprintOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALGridOptions = {"_p_GDALGridOptions", "GDALGridOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALGroupHS = {"_p_GDALGroupHS", "GDALGroupHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALInfoOptions = {"_p_GDALInfoOptions", "GDALInfoOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALMDArrayHS = {"_p_GDALMDArrayHS", "GDALMDArrayHS *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALMDArrayRawBlockInfo = {"_p_GDALMDArrayRawBlockInfo", "GDALMDArrayRawBlockInfo *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALMultiDimInfoOptions = {"_p_GDALMultiDimInfoOptions", "GDALMultiDimInfoOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALMultiDimTranslateOptions = {"_p_GDALMultiDimTranslateOptions", "GDALMultiDimTranslateOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALNearblackOptions = {"_p_GDALNearblackOptions", "GDALNearblackOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRATDateTime = {"_p_GDALRATDateTime", "GDALRATDateTime *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRasterAlgebraBinaryOperation = {"_p_GDALRasterAlgebraBinaryOperation", "GDALRasterAlgebraBinaryOperation *|enum GDALRasterAlgebraBinaryOperation *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRasterAlgebraUnaryOperation = {"_p_GDALRasterAlgebraUnaryOperation", "GDALRasterAlgebraUnaryOperation *|enum GDALRasterAlgebraUnaryOperation *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRasterizeOptions = {"_p_GDALRasterizeOptions", "GDALRasterizeOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALRelationshipShadow = {"_p_GDALRelationshipShadow", "GDALRelationshipShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALSubdatasetInfo = {"_p_GDALSubdatasetInfo", "GDALSubdatasetInfoShadow *|GDALSubdatasetInfo *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALTileIndexOptions = {"_p_GDALTileIndexOptions", "GDALTileIndexOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALTranslateOptions = {"_p_GDALTranslateOptions", "GDALTranslateOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALVectorInfoOptions = {"_p_GDALVectorInfoOptions", "GDALVectorInfoOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALVectorTranslateOptions = {"_p_GDALVectorTranslateOptions", "GDALVectorTranslateOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALViewshedMode = {"_p_GDALViewshedMode", "GDALViewshedMode *|enum GDALViewshedMode *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALViewshedOutputType = {"_p_GDALViewshedOutputType", "GDALViewshedOutputType *|enum GDALViewshedOutputType *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALWarpAppOptions = {"_p_GDALWarpAppOptions", "GDALWarpAppOptions *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GUIntBig = {"_p_GUIntBig", "GUIntBig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_SuggestedWarpOutputRes = {"_p_SuggestedWarpOutputRes", "SuggestedWarpOutputRes *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_VSIDIR = {"_p_VSIDIR", "VSIDIR *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_VSILFILE = {"_p_VSILFILE", "VSILFILE *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "retStringAndCPLFree *|char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "CPLErr *|GDALAccess *|GDALAlgorithmArgType *|GDALAsyncStatusType *|GDALColorInterp *|GDALDataType *|GDALPaletteInterp *|GDALRATFieldType *|GDALRATFieldUsage *|GDALRATTableType *|GDALRIOResampleAlg *|GDALRWFlag *|GDALRelationshipCardinality *|GDALRelationshipType *|GDALResampleAlg *|GDALTileOrganization *|OGRAxisOrientation *|OGRErr *|OGRFieldDomainMergePolicy *|OGRFieldDomainSplitPolicy *|OGRFieldDomainType *|OGRFieldSubType *|OGRFieldType *|OGRJustification *|OGRwkbByteOrder *|OGRwkbGeometryType *|OSRAxisMappingStrategy *|RETURN_NONE *|int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GByte = {"_p_p_GByte", "GByte **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GDALDatasetShadow = {"_p_p_GDALDatasetShadow", "GDALDatasetShadow **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GDALDimensionHS = {"_p_p_GDALDimensionHS", "GDALDimensionHS **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GDALEDTComponentHS = {"_p_p_GDALEDTComponentHS", "GDALEDTComponentHS **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GDALMDArrayHS = {"_p_p_GDALMDArrayHS", "GDALMDArrayHS **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GDALComputedRasterBandShadow = {"_p_p_GDALComputedRasterBandShadow", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GUIntBig = {"_p_p_GUIntBig", "GUIntBig **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_long_long = {"_p_p_long_long", "long long **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_p_GDALAttributeHS = {"_p_p_p_GDALAttributeHS", "GDALAttributeHS ***", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_p_GDALDimensionHS = {"_p_p_p_GDALDimensionHS", "GDALDimensionHS ***", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_p_GDALEDTComponentHS = {"_p_p_p_GDALEDTComponentHS", "GDALEDTComponentHS ***", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_p_GDALMDArrayHS = {"_p_p_p_GDALMDArrayHS", "GDALMDArrayHS ***", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_vsi_l_offset = {"_p_vsi_l_offset", "vsi_l_offset *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_CPLErrorHandler,
  &_swigt__p_CPLVirtualMemShadow,
  &_swigt__p_CPLXMLNode,
  &_swigt__p_DirEntry,
  &_swigt__p_GByte,
  &_swigt__p_GDALAlgorithmArgHS,
  &_swigt__p_GDALAlgorithmHS,
  &_swigt__p_GDALAlgorithmRegistryHS,
  &_swigt__p_GDALArgDatasetValueHS,
  &_swigt__p_GDALAsyncReaderShadow,
  &_swigt__p_GDALAttributeHS,
  &_swigt__p_GDALBuildVRTOptions,
  &_swigt__p_GDALColorEntry,
  &_swigt__p_GDALColorTableShadow,
  &_swigt__p_GDALComputedRasterBandShadow,
  &_swigt__p_GDALContourOptions,
  &_swigt__p_GDALDEMProcessingOptions,
  &_swigt__p_GDALDatasetShadow,
  &_swigt__p_GDALDimensionHS,
  &_swigt__p_GDALDriverShadow,
  &_swigt__p_GDALEDTComponentHS,
  &_swigt__p_GDALExtendedDataTypeClass,
  &_swigt__p_GDALExtendedDataTypeHS,
  &_swigt__p_GDALExtendedDataTypeSubType,
  &_swigt__p_GDALFootprintOptions,
  &_swigt__p_GDALGridOptions,
  &_swigt__p_GDALGroupHS,
  &_swigt__p_GDALInfoOptions,
  &_swigt__p_GDALMDArrayHS,
  &_swigt__p_GDALMDArrayRawBlockInfo,
  &_swigt__p_GDALMajorObjectShadow,
  &_swigt__p_GDALMultiDimInfoOptions,
  &_swigt__p_GDALMultiDimTranslateOptions,
  &_swigt__p_GDALNearblackOptions,
  &_swigt__p_GDALProgressFunc,
  &_swigt__p_GDALRATDateTime,
  &_swigt__p_GDALRasterAlgebraBinaryOperation,
  &_swigt__p_GDALRasterAlgebraUnaryOperation,
  &_swigt__p_GDALRasterAttributeTableShadow,
  &_swigt__p_GDALRasterBandShadow,
  &_swigt__p_GDALRasterizeOptions,
  &_swigt__p_GDALRelationshipShadow,
  &_swigt__p_GDALSubdatasetInfo,
  &_swigt__p_GDALTileIndexOptions,
  &_swigt__p_GDALTransformerInfoShadow,
  &_swigt__p_GDALTranslateOptions,
  &_swigt__p_GDALVectorInfoOptions,
  &_swigt__p_GDALVectorTranslateOptions,
  &_swigt__p_GDALViewshedMode,
  &_swigt__p_GDALViewshedOutputType,
  &_swigt__p_GDALWarpAppOptions,
  &_swigt__p_GDAL_GCP,
  &_swigt__p_GIntBig,
  &_swigt__p_GUIntBig,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDomainShadow,
  &_swigt__p_OGRGeomFieldDefnShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OGRStyleTableShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_StatBuf,
  &_swigt__p_Statistics,
  &_swigt__p_SuggestedWarpOutputRes,
  &_swigt__p_VSIDIR,
  &_swigt__p_VSILFILE,
  &_swigt__p_bool,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_f_double_p_q_const__char_p_void__int,
  &_swigt__p_int,
  &_swigt__p_long_long,
  &_swigt__p_p_GByte,
  &_swigt__p_p_GDALComputedRasterBandShadow,
  &_swigt__p_p_GDALDatasetShadow,
  &_swigt__p_p_GDALDimensionHS,
  &_swigt__p_p_GDALEDTComponentHS,
  &_swigt__p_p_GDALMDArrayHS,
  &_swigt__p_p_GDALRasterBandShadow,
  &_swigt__p_p_GDAL_GCP,
  &_swigt__p_p_GUIntBig,
  &_swigt__p_p_OGRLayerShadow,
  &_swigt__p_p_OSRSpatialReferenceShadow,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
  &_swigt__p_p_long_long,
  &_swigt__p_p_p_GDALAttributeHS,
  &_swigt__p_p_p_GDALDimensionHS,
  &_swigt__p_p_p_GDALEDTComponentHS,
  &_swigt__p_p_p_GDALMDArrayHS,
  &_swigt__p_p_void,
  &_swigt__p_size_t,
  &_swigt__p_vsi_l_offset,
};

static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CPLVirtualMemShadow[] = {  {&_swigt__p_CPLVirtualMemShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DirEntry[] = {  {&_swigt__p_DirEntry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALAlgorithmArgHS[] = {  {&_swigt__p_GDALAlgorithmArgHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALAlgorithmHS[] = {  {&_swigt__p_GDALAlgorithmHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALAlgorithmRegistryHS[] = {  {&_swigt__p_GDALAlgorithmRegistryHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALArgDatasetValueHS[] = {  {&_swigt__p_GDALArgDatasetValueHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALAttributeHS[] = {  {&_swigt__p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALBuildVRTOptions[] = {  {&_swigt__p_GDALBuildVRTOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALComputedRasterBandShadow[] = {  {&_swigt__p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALContourOptions[] = {  {&_swigt__p_GDALContourOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALDEMProcessingOptions[] = {  {&_swigt__p_GDALDEMProcessingOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALDimensionHS[] = {  {&_swigt__p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALEDTComponentHS[] = {  {&_swigt__p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALExtendedDataTypeClass[] = {  {&_swigt__p_GDALExtendedDataTypeClass, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALExtendedDataTypeHS[] = {  {&_swigt__p_GDALExtendedDataTypeHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALExtendedDataTypeSubType[] = {  {&_swigt__p_GDALExtendedDataTypeSubType, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALFootprintOptions[] = {  {&_swigt__p_GDALFootprintOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALGridOptions[] = {  {&_swigt__p_GDALGridOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALGroupHS[] = {  {&_swigt__p_GDALGroupHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALInfoOptions[] = {  {&_swigt__p_GDALInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMDArrayHS[] = {  {&_swigt__p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMDArrayRawBlockInfo[] = {  {&_swigt__p_GDALMDArrayRawBlockInfo, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = {  {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0},  {&_swigt__p_GDALComputedRasterBandShadow, _p_GDALComputedRasterBandShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALDatasetShadow, _p_GDALDatasetShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALDriverShadow, _p_GDALDriverShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALRasterBandShadow, _p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_OGRLayerShadow, _p_OGRLayerShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMultiDimInfoOptions[] = {  {&_swigt__p_GDALMultiDimInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMultiDimTranslateOptions[] = {  {&_swigt__p_GDALMultiDimTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALNearblackOptions[] = {  {&_swigt__p_GDALNearblackOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRATDateTime[] = {  {&_swigt__p_GDALRATDateTime, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRasterAlgebraBinaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraBinaryOperation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRasterAlgebraUnaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraUnaryOperation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},  {&_swigt__p_GDALComputedRasterBandShadow, _p_GDALComputedRasterBandShadowTo_p_GDALRasterBandShadow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRasterizeOptions[] = {  {&_swigt__p_GDALRasterizeOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRelationshipShadow[] = {  {&_swigt__p_GDALRelationshipShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALSubdatasetInfo[] = {  {&_swigt__p_GDALSubdatasetInfo, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALTileIndexOptions[] = {  {&_swigt__p_GDALTileIndexOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALTranslateOptions[] = {  {&_swigt__p_GDALTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALVectorInfoOptions[] = {  {&_swigt__p_GDALVectorInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALVectorTranslateOptions[] = {  {&_swigt__p_GDALVectorTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALViewshedMode[] = {  {&_swigt__p_GDALViewshedMode, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALViewshedOutputType[] = {  {&_swigt__p_GDALViewshedOutputType, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALWarpAppOptions[] = {  {&_swigt__p_GDALWarpAppOptions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GUIntBig[] = {  {&_swigt__p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SuggestedWarpOutputRes[] = {  {&_swigt__p_SuggestedWarpOutputRes, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VSIDIR[] = {  {&_swigt__p_VSIDIR, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VSILFILE[] = {  {&_swigt__p_VSILFILE, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = {  {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GByte[] = {  {&_swigt__p_p_GByte, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDALDatasetShadow[] = {  {&_swigt__p_p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDALDimensionHS[] = {  {&_swigt__p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDALComputedRasterBandShadow[] = {{&_swigt__p_p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},  {&_swigt__p_p_GDALComputedRasterBandShadow, _p_p_GDALComputedRasterBandShadowTo_p_p_GDALRasterBandShadow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GUIntBig[] = {  {&_swigt__p_p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_long_long[] = {  {&_swigt__p_p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_p_GDALAttributeHS[] = {  {&_swigt__p_p_p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_p_GDALDimensionHS[] = {  {&_swigt__p_p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_vsi_l_offset[] = {  {&_swigt__p_vsi_l_offset, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_CPLErrorHandler,
  _swigc__p_CPLVirtualMemShadow,
  _swigc__p_CPLXMLNode,
  _swigc__p_DirEntry,
  _swigc__p_GByte,
  _swigc__p_GDALAlgorithmArgHS,
  _swigc__p_GDALAlgorithmHS,
  _swigc__p_GDALAlgorithmRegistryHS,
  _swigc__p_GDALArgDatasetValueHS,
  _swigc__p_GDALAsyncReaderShadow,
  _swigc__p_GDALAttributeHS,
  _swigc__p_GDALBuildVRTOptions,
  _swigc__p_GDALColorEntry,
  _swigc__p_GDALColorTableShadow,
  _swigc__p_GDALComputedRasterBandShadow,
  _swigc__p_GDALContourOptions,
  _swigc__p_GDALDEMProcessingOptions,
  _swigc__p_GDALDatasetShadow,
  _swigc__p_GDALDimensionHS,
  _swigc__p_GDALDriverShadow,
  _swigc__p_GDALEDTComponentHS,
  _swigc__p_GDALExtendedDataTypeClass,
  _swigc__p_GDALExtendedDataTypeHS,
  _swigc__p_GDALExtendedDataTypeSubType,
  _swigc__p_GDALFootprintOptions,
  _swigc__p_GDALGridOptions,
  _swigc__p_GDALGroupHS,
  _swigc__p_GDALInfoOptions,
  _swigc__p_GDALMDArrayHS,
  _swigc__p_GDALMDArrayRawBlockInfo,
  _swigc__p_GDALMajorObjectShadow,
  _swigc__p_GDALMultiDimInfoOptions,
  _swigc__p_GDALMultiDimTranslateOptions,
  _swigc__p_GDALNearblackOptions,
  _swigc__p_GDALProgressFunc,
  _swigc__p_GDALRATDateTime,
  _swigc__p_GDALRasterAlgebraBinaryOperation,
  _swigc__p_GDALRasterAlgebraUnaryOperation,
  _swigc__p_GDALRasterAttributeTableShadow,
  _swigc__p_GDALRasterBandShadow,
  _swigc__p_GDALRasterizeOptions,
  _swigc__p_GDALRelationshipShadow,
  _swigc__p_GDALSubdatasetInfo,
  _swigc__p_GDALTileIndexOptions,
  _swigc__p_GDALTransformerInfoShadow,
  _swigc__p_GDALTranslateOptions,
  _swigc__p_GDALVectorInfoOptions,
  _swigc__p_GDALVectorTranslateOptions,
  _swigc__p_GDALViewshedMode,
  _swigc__p_GDALViewshedOutputType,
  _swigc__p_GDALWarpAppOptions,
  _swigc__p_GDAL_GCP,
  _swigc__p_GIntBig,
  _swigc__p_GUIntBig,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDomainShadow,
  _swigc__p_OGRGeomFieldDefnShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OGRStyleTableShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_StatBuf,
  _swigc__p_Statistics,
  _swigc__p_SuggestedWarpOutputRes,
  _swigc__p_VSIDIR,
  _swigc__p_VSILFILE,
  _swigc__p_bool,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_f_double_p_q_const__char_p_void__int,
  _swigc__p_int,
  _swigc__p_long_long,
  _swigc__p_p_GByte,
  _swigc__p_p_GDALComputedRasterBandShadow,
  _swigc__p_p_GDALDatasetShadow,
  _swigc__p_p_GDALDimensionHS,
  _swigc__p_p_GDALEDTComponentHS,
  _swigc__p_p_GDALMDArrayHS,
  _swigc__p_p_GDALRasterBandShadow,
  _swigc__p_p_GDAL_GCP,
  _swigc__p_p_GUIntBig,
  _swigc__p_p_OGRLayerShadow,
  _swigc__p_p_OSRSpatialReferenceShadow,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
  _swigc__p_p_long_long,
  _swigc__p_p_p_GDALAttributeHS,
  _swigc__p_p_p_GDALDimensionHS,
  _swigc__p_p_p_GDALEDTComponentHS,
  _swigc__p_p_p_GDALMDArrayHS,
  _swigc__p_p_void,
  _swigc__p_size_t,
  _swigc__p_vsi_l_offset,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{ SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is made tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast dependencies. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns.
 *
 * We loop through the cast[] array associated with the type and mark casts
 * which have not been defined in previously loaded modules by assigning
 * cast pointer value to cast->next. We also hash cast->type->name string
 * and store the value in the cast->value field. If we encounter swig_cast_info
 * structure that represents a cast to self we move it to the beginning
 * of the cast array. One trick we need to do is making sure the type pointer
 * in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the list (because the cast->type) pointer will
 *     be correct.
 *
 * Once the cast array has been set up AND it does have new casts that need
 * to be added we sort non-self cast entries to move filtered out entries
 * to the end of the array and to arrange the rest in the increasing order
 * of their type pointer values. We store the index of the last added entry
 * in the cast->value field of the entry[0] (overwriting the name hash). Then
 * we sort <next|value> fields of the remaining entries to arrange hash values
 * in the increasing order. This way cast->next->type->name field matches
 * the cast->value hash.
 *
 * Example:
 * Array of casts for type stored at 0x5000, cast to type stored at 0x3000
 * has already been loaded
 *
 *      After sweep-and-hash:   After sort-by-type:    After sort-by-hash:
 *        ________________       ________________       ________________
 *       |                |     |                |     |                |
 * Entry |  type = 0x5000 |     |  type = 0x5000 |     |  type = 0x5000 |
 *   0   |                |     |                |     |                |
 *       |  next = Entry0 |     |  next = Entry0 |     |  next = Entry0 |
 *       | value = 1212   |     | value = 3      |     | value = 3      |
 *       |                |     |                |     |                |
 *       |================|     |================|     |================|
 *       |                |     |                |     |                |
 * Entry |  type = 0x2000 |     |  type = 0x1000 |     |  type = 0x1000 |
 *   1   |                |     |                |     |                |
 *       |  next = Entry1 |     |  next = Entry1 |     |  next = Entry3 |
 *       | value = 3434   |     | value = 4545   |     | value = 2323   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x3000 |     |  type = 0x2000 |     |  type = 0x2000 |
 *   2   |                |     |                |     |                |
 *       |  next = 0      |     |  next = Entry2 |     |  next = Entry2 |
 *       | value = 0      |     | value = 3434   |     | value = 3434   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x1000 |     |  type = 0x4000 |     |  type = 0x4000 |
 *   3   |                |     |                |     |                |
 *       |  next = Entry3 |     |  next = Entry3 |     |  next = Entry1 |
 *       | value = 4545   |     | value = 2323   |     | value = 4545   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x4000 |     |  type = 0x3000 |     |  type = 0x3000 |
 *   4   |                |     |                |     |                |
 *       |  next = Entry4 |     |  next = 0      |     |  next = 0      |
 *       | value = 2323   |     | value = 0      |     | value = 0      |
 *       |________________|     |________________|     |________________|
 *
 * Once the cast array has been initialized, we use cast[0]->next field to link
 * it into the list of cast arrays for the type.
 *              ____    ____    ____
 * type->cast->|next|->|next|->|next|->0
 *             |----|  |----|  |----|
 *             |----|  |----|  |----|
 *             |----|  |----|  |----|
 *
 * Subsequent cast resolution works as follows:
 *
 * 1. Check whether the type matches the first entry in the current cast array.
 * 2. If not, then do a binary search over the (0:cast->value] interval using
 *    either type address or the hash value of the type name.
 * 3. If not found, then move over to the next cast array (cast[0]->next).
 *
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif

#ifndef SWIG_INIT_CLIENT_DATA_TYPE
#define SWIG_INIT_CLIENT_DATA_TYPE void *
#endif

/*
 * Sort function that puts cast entries with nonzero 'next' at the front
 * of the array while ordering them by addresses of their 'type' structs.
 */
SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb) {
  swig_cast_info *pca = (swig_cast_info *)pa;
  swig_cast_info *pcb = (swig_cast_info *)pb;
  if (pca->type < pcb->type)
  return (pca->next || pcb->next == 0) ? -1 : 1;
  if (pca->type > pcb->type)
  return (pcb->next || pca->next == 0) ? 1 : -1;
  return 0;
}

/*
 * Shell-sort 'next' and 'value' field pairs to order them by 'value'.
 */
SWIGINTERN void SWIG_CastHashSort(swig_cast_info *cast, int size) {
  const int hmax = size/9;
  int h, i;
  for(h = 1; h <= hmax; h = 3*h+1);
  for(; h > 0; h /= 3)
  {
    for(i = h; i < size; ++i)
    {
      swig_cast_info *p = cast[i].next;
      unsigned int hash = cast[i].value;
      int j = i;
      while(j >= h && hash < cast[j-h].value)
      {
        cast[j].next = cast[j-h].next;
        cast[j].value = cast[j-h].value;
        j -= h;
      }
      cast[j].next = p;
      cast[j].value = hash;
    }
  }
}

SWIGRUNTIME void
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *target_type;
    swig_cast_info *cast, *first;
    int num_mapped = 0;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = first = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      target_type = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        target_type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
        if (target_type) {
          /* Target type already defined in another module */
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: found cast %s\n", target_type->name);
#endif
          if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
            printf("SWIG_InitializeModule: skip old type %s\n", target_type->name);
#endif
            cast->type = target_type;
            target_type = 0;
          } else {
            /* Check if this cast is already in the list */
            swig_cast_info *ocast = SWIG_TypeCheck(target_type->name, type);
#ifdef SWIGRUNTIME_DEBUG
            if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", target_type->name);
#endif
            if (!ocast) target_type = 0;
          }
        }
      }
      
      if (!target_type) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        /* Set inclusion mark for sorting */
        cast->next = cast;
        num_mapped++;
        
        if (type == cast->type) {
#ifdef SWIGRUNTIME_DEBUG
          printf("%s : self cast at pos [%li]\n", type->name, cast - first);
#endif
          if (cast - first) {
            /* Move cast to itself to the first entry in the array */
            
            swig_cast_info tmp = *cast;
            *cast = *first;
            *first = tmp;
          }
          first++;
          
        } else {
          cast->value = SWIG_Hash(cast->type->name, (unsigned int)strlen(cast->type->name));
        }
      }
      cast++;
    }
    
    if (num_mapped) {
      if (cast - first) {
        swig_cast_info *tmp;
        
        /* Sort casts by type address for binary search in SWIG_TypeCheckStruct */
        qsort(first, cast - first, sizeof(swig_cast_info), SWIG_CastCmpStruct);
        
        /* Remap back links for added entries */
        cast = swig_module.cast_initial[i] + num_mapped;
        for (tmp = first; tmp < cast; tmp++) {
          tmp->next = tmp;
        }
      }
      
      /* Set the value field of the first entry to the index of the last added entry */
      cast = swig_module.cast_initial[i];
      cast->value = num_mapped - 1;
      
      num_mapped -= (int)(first - cast);
      if (num_mapped > 1) {
        /* Sort <'next','value'> pairs by 'value' for binary search in SWIG_TypeCheck */
        
        SWIG_CastHashSort(first, num_mapped);
      }
      
      first = type->cast;
      if (first) {
        /* Link the current set into the list of cast arrays */
        cast->next = first->next;
        first->next = cast;
      } else {
        cast->next = 0;
        type->cast = cast;
      }
    }
    
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      swig_cast_info *head, *cast;
      head = swig_module.types[i]->cast;
      while (head) {
        for (cast = head; (cast - head) <= head->value; cast++) {
          if (!cast->converter) {
            if (cast->type && !cast->type->clientdata)
            SWIG_TypeClientData(cast->type, swig_module.types[i]->clientdata);
          }
        }
        head = head->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        SWIG_Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------
   * Patch %callback methods' docstrings to hold the callback ptrs
   * -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods, const swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (!c) continue;
      c = strstr(c, "swig_ptr: ");
      if (c) {
        int j;
        const swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              memcpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              memcpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif




/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

SWIGINTERN int SWIG_mod_exec(PyObject *module);

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
#if PY_VERSION_HEX >= 0x03000000
  static PyModuleDef_Slot SwigSlots[] = {
    {
      Py_mod_exec, (void *)SWIG_mod_exec 
    },
#ifdef SWIGPYTHON_NOGIL
#ifdef Py_GIL_DISABLED
    {
      Py_mod_gil, Py_MOD_GIL_NOT_USED 
    },
#endif
#endif
    {
      0, NULL 
    }
  };
  
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    SWIG_name,
    NULL,
    0,
    SwigMethods,
    SwigSlots,
    NULL,
    NULL,
    NULL
  };
  
  return PyModuleDef_Init(&SWIG_module);
#else
  PyObject *m = Py_InitModule(SWIG_name, SwigMethods);
  if (m && SWIG_mod_exec(m) != 0) {
    Py_DECREF(m);
  }
#endif
}

SWIGINTERN int SWIG_mod_exec(PyObject *m) {
  PyObject *d, *md, *globals;
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    SwigPyObject_own,
    SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  PyTypeObject *swigpyobject;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  PyObject *self = 0;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  (void)self;
  
  /* Metaclass is used to implement static member variables */
  metatype = SwigPyObjectType_Type();
  assert(metatype);
  
  SwigPyStaticVar_Type();
#endif
  
  (void)globals;
  
  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
  SWIG_runtime_data_module();
  SWIG_This();
  SWIG_Python_TypeCache();
  SwigPyPacked_Type();
  SwigVarLink_Type();
#ifndef SWIGPYTHON_BUILTIN
  SwigPyObject_Type();
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#ifdef SWIGPYTHON_NOGIL
#ifdef Py_GIL_DISABLED
  PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  swigpyobject = SwigPyObject_TypeOnce();
  
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = swigpyobject;
  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
    return -1;
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_Type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_Type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  SWIG_Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  SWIG_Python_SetConstant(d, "GRAUO_LOGICAL_NOT",SWIG_From_int(static_cast< int >(GRAUO_LOGICAL_NOT)));
  SWIG_Python_SetConstant(d, "GRAUO_ABS",SWIG_From_int(static_cast< int >(GRAUO_ABS)));
  SWIG_Python_SetConstant(d, "GRAUO_SQRT",SWIG_From_int(static_cast< int >(GRAUO_SQRT)));
  SWIG_Python_SetConstant(d, "GRAUO_LOG",SWIG_From_int(static_cast< int >(GRAUO_LOG)));
  SWIG_Python_SetConstant(d, "GRAUO_LOG10",SWIG_From_int(static_cast< int >(GRAUO_LOG10)));
  SWIG_Python_SetConstant(d, "GRABO_ADD",SWIG_From_int(static_cast< int >(GRABO_ADD)));
  SWIG_Python_SetConstant(d, "GRABO_SUB",SWIG_From_int(static_cast< int >(GRABO_SUB)));
  SWIG_Python_SetConstant(d, "GRABO_MUL",SWIG_From_int(static_cast< int >(GRABO_MUL)));
  SWIG_Python_SetConstant(d, "GRABO_DIV",SWIG_From_int(static_cast< int >(GRABO_DIV)));
  SWIG_Python_SetConstant(d, "GRABO_POW",SWIG_From_int(static_cast< int >(GRABO_POW)));
  SWIG_Python_SetConstant(d, "GRABO_GT",SWIG_From_int(static_cast< int >(GRABO_GT)));
  SWIG_Python_SetConstant(d, "GRABO_GE",SWIG_From_int(static_cast< int >(GRABO_GE)));
  SWIG_Python_SetConstant(d, "GRABO_LT",SWIG_From_int(static_cast< int >(GRABO_LT)));
  SWIG_Python_SetConstant(d, "GRABO_LE",SWIG_From_int(static_cast< int >(GRABO_LE)));
  SWIG_Python_SetConstant(d, "GRABO_EQ",SWIG_From_int(static_cast< int >(GRABO_EQ)));
  SWIG_Python_SetConstant(d, "GRABO_NE",SWIG_From_int(static_cast< int >(GRABO_NE)));
  SWIG_Python_SetConstant(d, "GRABO_LOGICAL_AND",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_AND)));
  SWIG_Python_SetConstant(d, "GRABO_LOGICAL_OR",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_OR)));
  
  /* gdal_python.i %init code */
  if ( GDALGetDriverCount() == 0 ) {
    GDALAllRegister();
  }
  // Will be turned on for GDAL 4.0
  // UseExceptions();
  
  
  SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
  SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
  SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
  SWIG_Python_SetConstant(d, "VSI_STAT_SET_ERROR_FLAG",SWIG_From_int(static_cast< int >(0x8)));
  SWIG_Python_SetConstant(d, "VSI_STAT_CACHE_ONLY",SWIG_From_int(static_cast< int >(0x10)));
  SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_DATA",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_HOLE",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "GEDTST_NONE",SWIG_From_int(static_cast< int >(GEDTST_NONE)));
  SWIG_Python_SetConstant(d, "GEDTST_JSON",SWIG_From_int(static_cast< int >(GEDTST_JSON)));
  SWIG_Python_SetConstant(d, "GEDTC_NUMERIC",SWIG_From_int(static_cast< int >(GEDTC_NUMERIC)));
  SWIG_Python_SetConstant(d, "GEDTC_STRING",SWIG_From_int(static_cast< int >(GEDTC_STRING)));
  SWIG_Python_SetConstant(d, "GEDTC_COMPOUND",SWIG_From_int(static_cast< int >(GEDTC_COMPOUND)));
  
  SWIG_Python_SetConstant(d, "GVM_Diagonal",SWIG_From_int(static_cast< int >(GVM_Diagonal)));
  SWIG_Python_SetConstant(d, "GVM_Edge",SWIG_From_int(static_cast< int >(GVM_Edge)));
  SWIG_Python_SetConstant(d, "GVM_Max",SWIG_From_int(static_cast< int >(GVM_Max)));
  SWIG_Python_SetConstant(d, "GVM_Min",SWIG_From_int(static_cast< int >(GVM_Min)));
  SWIG_Python_SetConstant(d, "GVOT_NORMAL",SWIG_From_int(static_cast< int >(GVOT_NORMAL)));
  SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_DEM",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_DEM)));
  SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_GROUND",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_GROUND)));
  
  /* Initialize threading */
  SWIG_PYTHON_INITIALIZE_THREADS;
  return 0;
}

