/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.25
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#define SWIGPYTHON

#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#endif

/***********************************************************************
 *
 *  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
#  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__) || defined(__ICC)
#   define SWIGUNUSED __attribute__ ((unused)) 
# else
#   define 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 for Windows DLLs */
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   define SWIGEXPORT
# endif
#endif

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



#include <Python.h>

/***********************************************************************
 * swigrun.swg
 *
 *     This file contains generic CAPI 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 "2"

/* 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 is strictly necessary, ie, if you have problems
  with your compiler or so.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

/* Structure to store inforomation 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 */
} 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 cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} 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 (int)(*f1 - *f2);
  }
  return (l1 - f1) - (l2 - f2);
}

/*
  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) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  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_TypeCompare(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}


/* think of this as a c++ template<> or a scheme macro */
#define SWIG_TypeCheck_Template(comparison, ty)         \
  if (ty) {                                             \
    swig_cast_info *iter = ty->cast;                    \
    while (iter) {                                      \
      if (comparison) {                                 \
        if (iter == ty->cast) return iter;              \
        /* Move iter to the top of the linked list */   \
        iter->prev->next = iter->next;                  \
        if (iter->next)                                 \
          iter->next->prev = iter->prev;                \
        iter->next = ty->cast;                          \
        iter->prev = 0;                                 \
        if (ty->cast) ty->cast->prev = iter;            \
        ty->cast = iter;                                \
        return iter;                                    \
      }                                                 \
      iter = iter->next;                                \
    }                                                   \
  }                                                     \
  return 0

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
}

/* Same as previous function, except strcmp is replaced with a pointer comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
  SWIG_TypeCheck_Template(iter->type == from, into);
}

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

/* 
   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.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  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) {
  if (!ti->clientdata) {
    swig_cast_info *cast = ti->cast;
    /* if (ti->clientdata == clientdata) return; */
    ti->clientdata = clientdata;
    
    while (cast) {
      if (!cast->converter)
	SWIG_TypeClientData(cast->type, clientdata);
      cast = cast->next;
    }
  }
}

/*
  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) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register 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 {
      register 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";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register 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) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu = 0;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (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 API. Portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * for internal method declarations
 * ----------------------------------------------------------------------------- */

#ifndef SWIGINTERN
#  define SWIGINTERN static SWIGUNUSED
#endif

#ifndef SWIGINTERNINLINE
#  define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/*
  Exception handling in wrappers
*/
#define SWIG_fail                goto fail
#define SWIG_arg_fail(arg)       SWIG_Python_ArgFail(arg)
#define SWIG_append_errmsg(msg)   SWIG_Python_AddErrMesg(msg,0)
#define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1)
#define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj)
#define SWIG_null_ref(type)       SWIG_Python_NullRef(type)

/*
  Contract support
*/
#define SWIG_contract_assert(expr, msg) \
 if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else

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

/* Constant Types */
#define SWIG_PY_INT     1
#define SWIG_PY_FLOAT   2
#define SWIG_PY_STRING  3
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

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


/* -----------------------------------------------------------------------------
 * Alloc. memory flags
 * ----------------------------------------------------------------------------- */
#define SWIG_OLDOBJ  1
#define SWIG_NEWOBJ  SWIG_OLDOBJ + 1
#define SWIG_PYSTR   SWIG_NEWOBJ + 1

#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.
 *
 * Author : David Beazley (beazley@cs.uchicago.edu)
 ************************************************************************/

/* Common SWIG API */
#define SWIG_ConvertPtr(obj, pp, type, flags)    SWIG_Python_ConvertPtr(obj, pp, type, flags)
#define SWIG_NewPointerObj(p, type, flags)       SWIG_Python_NewPointerObj(p, type, flags)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
 

/* Python-specific SWIG API */
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags)   SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
#define SWIG_NewPackedObj(ptr, sz, type)              SWIG_Python_NewPackedObj(ptr, sz, type)

/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */
/*
  Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent
  C/C++ pointers in the python side. Very useful for debugging, but
  not always safe.
*/
#if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)
#  define SWIG_COBJECT_TYPES
#endif

/* Flags for pointer conversion */
#define SWIG_POINTER_EXCEPTION     0x1
#define SWIG_POINTER_DISOWN        0x2


/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
#define PyOS_snprintf snprintf
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Create a new pointer string 
 * ----------------------------------------------------------------------------- */
#ifndef SWIG_BUFFER_SIZE
#define SWIG_BUFFER_SIZE 1024
#endif

#if defined(SWIG_COBJECT_TYPES)
#if !defined(SWIG_COBJECT_PYTHON)
/* -----------------------------------------------------------------------------
 * Implements a simple Swig Object type, and use it instead of PyCObject
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *ptr;
  const char *desc;
} PySwigObject;

/* Declarations for objects of type PySwigObject */

SWIGRUNTIME int
PySwigObject_print(PySwigObject *v, FILE *fp, int flags)
{
  char result[SWIG_BUFFER_SIZE];
  flags = flags;
  if (SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result))) {
    fputs("<Swig Object at ", fp); fputs(result, fp); fputs(">", fp);
    return 0; 
  } else {
    return 1; 
  }
}
  
SWIGRUNTIME PyObject *
PySwigObject_repr(PySwigObject *v)
{
  char result[SWIG_BUFFER_SIZE];
  return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ?
    PyString_FromFormat("<Swig Object at %s>", result) : 0;
}

SWIGRUNTIME PyObject *
PySwigObject_str(PySwigObject *v)
{
  char result[SWIG_BUFFER_SIZE];
  return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ?
    PyString_FromString(result) : 0;
}

SWIGRUNTIME PyObject *
PySwigObject_long(PySwigObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
PySwigObject_format(const char* fmt, PySwigObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args && (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0)) {
    PyObject *ofmt = PyString_FromString(fmt);
    if (ofmt) {
      res = PyString_Format(ofmt,args);
      Py_DECREF(ofmt);
    }
    Py_DECREF(args);
  }  
  return res;
}

SWIGRUNTIME PyObject *
PySwigObject_oct(PySwigObject *v)
{
  return PySwigObject_format("%o",v);
}

SWIGRUNTIME PyObject *
PySwigObject_hex(PySwigObject *v)
{
  return PySwigObject_format("%x",v);
}

SWIGRUNTIME int
PySwigObject_compare(PySwigObject *v, PySwigObject *w)
{
  int c = strcmp(v->desc, w->desc);
  if (c) {
    return (c > 0) ? 1 : -1;
  } else {
    void *i = v->ptr;
    void *j = w->ptr;
    return (i < j) ? -1 : ((i > j) ? 1 : 0);
  }
}

SWIGRUNTIME void
PySwigObject_dealloc(PySwigObject *self)
{
  PyObject_DEL(self);
}

SWIGRUNTIME PyTypeObject*
PySwigObject_type(void) {
  static char pyswigobject_type__doc__[] = 
    "Swig object carries a C/C++ instance pointer";
  
  static PyNumberMethods PySwigObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    (binaryfunc)0, /*nb_divide*/
    (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*/
    (coercion)0,   /*nb_coerce*/
    (unaryfunc)PySwigObject_long, /*nb_int*/
    (unaryfunc)PySwigObject_long, /*nb_long*/
    (unaryfunc)0,                 /*nb_float*/
    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
#if PY_VERSION_HEX >= 0x02000000
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ 
#endif
  };

  static PyTypeObject pyswigobject_type
#if !defined(__cplusplus)
  ;  
  static int type_init = 0;
  if (!type_init) {
    PyTypeObject tmp
#endif
    = {
    PyObject_HEAD_INIT(&PyType_Type)
    0,					/*ob_size*/
    (char *)"PySwigObject",		/*tp_name*/
    sizeof(PySwigObject),		/*tp_basicsize*/
    0,					/*tp_itemsize*/
    /* methods */
    (destructor)PySwigObject_dealloc,	/*tp_dealloc*/
    (printfunc)PySwigObject_print,	/*tp_print*/
    (getattrfunc)0,			/*tp_getattr*/
    (setattrfunc)0,			/*tp_setattr*/
    (cmpfunc)PySwigObject_compare,	/*tp_compare*/
    (reprfunc)PySwigObject_repr,	/*tp_repr*/
    &PySwigObject_as_number,	        /*tp_as_number*/
    0,					/*tp_as_sequence*/
    0,					/*tp_as_mapping*/
    (hashfunc)0,			/*tp_hash*/
    (ternaryfunc)0,			/*tp_call*/
    (reprfunc)PySwigObject_str,		/*tp_str*/
    /* Space for future expansion */
    0,0,0,0,
    pyswigobject_type__doc__, 	        /* Documentation string */
#if PY_VERSION_HEX >= 0x02000000
    0,                                  /* tp_traverse */
    0,                                  /* tp_clear */
#endif
#if PY_VERSION_HEX >= 0x02010000
    0,                                  /* tp_richcompare */
    0,                                  /* tp_weaklistoffset */
#endif
#if PY_VERSION_HEX >= 0x02020000
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
    0,                                  /* tp_del */
#endif
#ifdef COUNT_ALLOCS
    0,0,0,0                             /* tp_alloc -> tp_next */
#endif
    };
#if !defined(__cplusplus)
    pyswigobject_type = tmp;
    type_init = 1;
  }
#endif
  return &pyswigobject_type;
}

SWIGRUNTIME PyObject *
PySwigObject_FromVoidPtrAndDesc(void *ptr, const char *desc)
{
  PySwigObject *self = PyObject_NEW(PySwigObject, PySwigObject_type());
  if (self) {
    self->ptr = ptr;
    self->desc = desc;
  }
  return (PyObject *)self;
}

SWIGRUNTIMEINLINE void *
PySwigObject_AsVoidPtr(PyObject *self)
{
  return ((PySwigObject *)self)->ptr;
}

SWIGRUNTIMEINLINE const char *
PySwigObject_GetDesc(PyObject *self)
{
  return ((PySwigObject *)self)->desc;
}

SWIGRUNTIMEINLINE int
PySwigObject_Check(PyObject *op) {
  return ((op)->ob_type == PySwigObject_type()) 
    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
}

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

typedef struct {
  PyObject_HEAD
  void *pack;
  const char *desc;
  size_t size;
} PySwigPacked;

SWIGRUNTIME int
PySwigPacked_print(PySwigPacked *v, FILE *fp, int flags)
{
  char result[SWIG_BUFFER_SIZE];
  flags = flags;
  fputs("<Swig Packed ", fp); 
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    fputs("at ", fp); 
    fputs(result, fp); 
  }
  fputs(v->desc,fp); 
  fputs(">", fp);
  return 0; 
}
  
SWIGRUNTIME PyObject *
PySwigPacked_repr(PySwigPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->desc);
  } else {
    return PyString_FromFormat("<Swig Packed %s>", v->desc);
  }  
}

SWIGRUNTIME PyObject *
PySwigPacked_str(PySwigPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return PyString_FromFormat("%s%s", result, v->desc);
  } else {
    return PyString_FromFormat("%s", v->desc);
  }  
}

SWIGRUNTIME int
PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
{
  int c = strcmp(v->desc, w->desc);
  if (c) {
    return (c > 0) ? 1 : -1;
  } else {
    size_t i = v->size;
    size_t j = w->size;
    int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
    return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
  }
}

SWIGRUNTIME void
PySwigPacked_dealloc(PySwigPacked *self)
{
  free(self->pack);
  PyObject_DEL(self);
}

SWIGRUNTIME PyTypeObject*
PySwigPacked_type(void) {
  static char pyswigpacked_type__doc__[] = 
    "Swig object carries a C/C++ instance pointer";
  static PyTypeObject pyswigpacked_type
#if !defined(__cplusplus)
  ;
  static int type_init = 0;  
  if (!type_init) {
    PyTypeObject tmp
#endif
    = {
    PyObject_HEAD_INIT(&PyType_Type)
    0,					/*ob_size*/
    (char *)"PySwigPacked",		/*tp_name*/
    sizeof(PySwigPacked),		/*tp_basicsize*/
    0,					/*tp_itemsize*/
    /* methods */
    (destructor)PySwigPacked_dealloc,	/*tp_dealloc*/
    (printfunc)PySwigPacked_print,	/*tp_print*/
    (getattrfunc)0,			/*tp_getattr*/
    (setattrfunc)0,			/*tp_setattr*/
    (cmpfunc)PySwigPacked_compare,	/*tp_compare*/
    (reprfunc)PySwigPacked_repr,	/*tp_repr*/
    0,	                                /*tp_as_number*/
    0,					/*tp_as_sequence*/
    0,					/*tp_as_mapping*/
    (hashfunc)0,			/*tp_hash*/
    (ternaryfunc)0,			/*tp_call*/
    (reprfunc)PySwigPacked_str,		/*tp_str*/
    /* Space for future expansion */
    0,0,0,0,
    pyswigpacked_type__doc__, 	        /* Documentation string */
#if PY_VERSION_HEX >= 0x02000000
    0,                                  /* tp_traverse */
    0,                                  /* tp_clear */
#endif
#if PY_VERSION_HEX >= 0x02010000
    0,                                  /* tp_richcompare */
    0,                                  /* tp_weaklistoffset */
#endif
#if PY_VERSION_HEX >= 0x02020000         
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
    0,                                  /* tp_del */
#endif
#ifdef COUNT_ALLOCS
    0,0,0,0                             /* tp_alloc -> tp_next */
#endif
    };
#if !defined(__cplusplus)
    pyswigpacked_type = tmp;
    type_init = 1;
  }
#endif
  return &pyswigpacked_type;
}

SWIGRUNTIME PyObject *
PySwigPacked_FromDataAndDesc(void *ptr, size_t size, const char *desc)
{
  PySwigPacked *self = PyObject_NEW(PySwigPacked, PySwigPacked_type());
  if (self == NULL) {
    return NULL;
  } else {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      self->pack = pack;
      self->desc = desc;
      self->size = size;
      return (PyObject *) self;
    }
    return NULL;
  }
}

SWIGRUNTIMEINLINE const char *
PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  PySwigPacked *self = (PySwigPacked *)obj;
  if (self->size != size) return 0;
  memcpy(ptr, self->pack, size);
  return self->desc;
}

SWIGRUNTIMEINLINE const char *
PySwigPacked_GetDesc(PyObject *self)
{
  return ((PySwigPacked *)self)->desc;
}

SWIGRUNTIMEINLINE int
PySwigPacked_Check(PyObject *op) {
  return ((op)->ob_type == PySwigPacked_type()) 
    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
}

#else
/* -----------------------------------------------------------------------------
 * Use the old Python PyCObject instead of PySwigObject
 * ----------------------------------------------------------------------------- */

#define PySwigObject_GetDesc(obj)	           PyCObject_GetDesc(obj)
#define PySwigObject_Check(obj)	           PyCObject_Check(obj)
#define PySwigObject_AsVoidPtr(obj)	   PyCObject_AsVoidPtr(obj)
#define PySwigObject_FromVoidPtrAndDesc(p, d)  PyCObject_FromVoidPtrAndDesc(p, d, NULL)

#endif

#endif

/* -----------------------------------------------------------------------------
 * errors manipulation
 * ----------------------------------------------------------------------------- */

SWIGRUNTIME void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
  if (type) {
#if defined(SWIG_COBJECT_TYPES)
    if (obj && PySwigObject_Check(obj)) {
      const char *otype = (const char *) PySwigObject_GetDesc(obj);
      if (otype) {
	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
		     type, otype);
	return;
      }
    } else 
#endif      
    {
      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
      if (otype) {
	PyObject *str = PyObject_Str(obj);
	const char *cstr = str ? PyString_AsString(str) : 0;
	if (cstr) {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
		       type, otype, cstr);
	} else {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
		       type, otype);
	}
	Py_XDECREF(str);
	return;
      }
    }   
    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  } else {
    PyErr_Format(PyExc_TypeError, "unexpected type is received");
  }
}

SWIGRUNTIMEINLINE void
SWIG_Python_NullRef(const char *type)
{
  if (type) {
    PyErr_Format(PyExc_TypeError, "null reference of type '%s' was received",type);
  } else {
    PyErr_Format(PyExc_TypeError, "null reference was received");
  }
}

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);
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
      } else {
	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
      }
      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;
  }
}


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

/* Convert a pointer value */
SWIGRUNTIME int
SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
  swig_cast_info *tc;
  const char *c = 0;
  static PyObject *SWIG_this = 0;
  int    newref = 0;
  PyObject  *pyobj = 0;
  void *vptr;
  
  if (!obj) return 0;
  if (obj == Py_None) {
    *ptr = 0;
    return 0;
  }

#ifdef SWIG_COBJECT_TYPES
  if (!(PySwigObject_Check(obj))) {
    if (!SWIG_this)
      SWIG_this = PyString_FromString("this");
    pyobj = obj;
    obj = PyObject_GetAttr(obj,SWIG_this);
    newref = 1;
    if (!obj) goto type_error;
    if (!PySwigObject_Check(obj)) {
      Py_DECREF(obj);
      goto type_error;
    }
  }  
  vptr = PySwigObject_AsVoidPtr(obj);
  c = (const char *) PySwigObject_GetDesc(obj);
  if (newref) { Py_DECREF(obj); }
  goto type_check;
#else
  if (!(PyString_Check(obj))) {
    if (!SWIG_this)
      SWIG_this = PyString_FromString("this");
    pyobj = obj;
    obj = PyObject_GetAttr(obj,SWIG_this);
    newref = 1;
    if (!obj) goto type_error;
    if (!PyString_Check(obj)) {
      Py_DECREF(obj);
      goto type_error;
    }
  } 
  c = PyString_AS_STRING(obj);
  /* Pointer values must start with leading underscore */
  c = SWIG_UnpackVoidPtr(c, &vptr, ty->name);
  if (newref) { Py_DECREF(obj); }
  if (!c) goto type_error;
#endif

type_check:
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) goto type_error;
    *ptr = SWIG_TypeCast(tc,vptr);
  } else {
    *ptr = vptr;
  }
  if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
    PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
  }
  return 0;

type_error:
  PyErr_Clear();
  if (pyobj && !obj) {    
    obj = pyobj;
    if (PyCFunction_Check(obj)) {
      /* here we get the method pointer for callbacks */
      char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
      c = doc ? strstr(doc, "swig_ptr: ") : 0;
      if (c) {
	c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
	if (!c) goto type_error;
	goto type_check;
      }
    }
  }
  if (flags & SWIG_POINTER_EXCEPTION) {
    if (ty) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    } else {
      SWIG_Python_TypeError("C/C++ pointer", obj);
    }
  }
  return -1;
}

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

/* Convert a packed value value */
SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
  swig_cast_info *tc;
  const char *c = 0;

#if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
  c = PySwigPacked_UnpackData(obj, ptr, sz);
#else
  if ((!obj) || (!PyString_Check(obj))) goto type_error;
  c = PyString_AS_STRING(obj);
  /* Pointer values must start with leading underscore */
  c = SWIG_UnpackDataName(c, ptr, sz, ty->name);
#endif
  if (!c) goto type_error;
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) goto type_error;
  }
  return 0;

type_error:
  PyErr_Clear();
  if (flags & SWIG_POINTER_EXCEPTION) {
    if (ty) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    } else {
      SWIG_Python_TypeError("C/C++ packed data", obj);
    }
  }
  return -1;
}  

/* Create a new array object */
SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
  PyObject *robj = 0;
  if (!type) {
    if (!PyErr_Occurred()) {
      PyErr_Format(PyExc_TypeError, "Swig: null type passed to NewPointerObj");
    }
    return robj;
  }
  if (!ptr) {
    Py_INCREF(Py_None);
    return Py_None;
  }
#ifdef SWIG_COBJECT_TYPES
  robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)type->name);
#else
  {
    char result[SWIG_BUFFER_SIZE];
    robj = SWIG_PackVoidPtr(result, ptr, type->name, sizeof(result)) ?
      PyString_FromString(result) : 0;
  }
#endif
  if (!robj || (robj == Py_None)) return robj;
  if (type->clientdata) {
    PyObject *inst;
    PyObject *args = Py_BuildValue((char*)"(O)", robj);
    Py_DECREF(robj);
    inst = PyObject_CallObject((PyObject *) type->clientdata, args);
    Py_DECREF(args);
    if (inst) {
      if (own) {
        PyObject_SetAttrString(inst,(char*)"thisown",Py_True);
      }
      robj = inst;
    }
  }
  return robj;
}

SWIGRUNTIME PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  PyObject *robj = 0;
  if (!ptr) {
    Py_INCREF(Py_None);
    return Py_None;
  }
#if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON)
  robj = PySwigPacked_FromDataAndDesc((void *) ptr, sz, (char *)type->name);
#else
  {
    char result[SWIG_BUFFER_SIZE];
    robj = SWIG_PackDataName(result, ptr, sz, type->name, sizeof(result)) ?
      PyString_FromString(result) : 0;
  }
#endif
  return robj;
}

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

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

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
  }
#endif
  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */

  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				   swig_empty_runtime_method_table);
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, NULL);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  }
}

#ifdef __cplusplus
}
#endif


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

#define SWIGTYPE_p_CPLErrorHandler swig_types[0]
#define SWIGTYPE_p_CPLXMLNode swig_types[1]
#define SWIGTYPE_p_GDALColorEntry swig_types[2]
#define SWIGTYPE_p_GDALColorTable swig_types[3]
#define SWIGTYPE_p_GDALDatasetShadow swig_types[4]
#define SWIGTYPE_p_GDALDriverShadow swig_types[5]
#define SWIGTYPE_p_GDALMajorObjectShadow swig_types[6]
#define SWIGTYPE_p_GDALRasterBandShadow swig_types[7]
#define SWIGTYPE_p_GDAL_GCP swig_types[8]
#define SWIGTYPE_p_char swig_types[9]
#define SWIGTYPE_p_double swig_types[10]
#define SWIGTYPE_p_int swig_types[11]
#define SWIGTYPE_p_p_GDAL_GCP swig_types[12]
#define SWIGTYPE_p_p_char swig_types[13]
#define SWIGTYPE_ptrdiff_t swig_types[14]
#define SWIGTYPE_size_t swig_types[15]
#define SWIGTYPE_std__ptrdiff_t swig_types[16]
#define SWIGTYPE_std__size_t swig_types[17]
static swig_type_info *swig_types[18];
static swig_module_info swig_module = {swig_types, 18, 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) -------- */


/*-----------------------------------------------
              @(target):= _gdal.so
  ------------------------------------------------*/
#define SWIG_init    init_gdal

#define SWIG_name    "_gdal"

#include <iostream>
using namespace std;

#include "cpl_port.h"
#include "cpl_string.h"

#include "gdal.h"
#include "gdal_priv.h"
#include "gdal_alg.h"
#include "gdalwarper.h"

typedef void GDALMajorObjectShadow;
typedef void GDALDriverShadow;
typedef void GDALDatasetShadow;
typedef void GDALRasterBandShadow;

typedef int FALSE_IS_ERR;



int bUseExceptions=0;
int bErrorHappened=0;

void PythonErrorHandler(CPLErr eclass, int code, const char *msg ) {
  bErrorHappened = 1;
}


void UseExceptions() {
  bUseExceptions = 1;
  bErrorHappened = 0;
  CPLSetErrorHandler( (CPLErrorHandler)PythonErrorHandler );
}

void DontUseExceptions() {
  bUseExceptions = 0;
  bErrorHappened = 0;
  CPLSetErrorHandler( CPLDefaultErrorHandler );
}


#define  SWIG_MemoryError    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_UnknownError  99


SWIGINTERN void SWIG_exception_(int code, const char *msg) {
  switch(code) {
  case SWIG_MemoryError:
    PyErr_SetString(PyExc_MemoryError,msg);
    break;
  case SWIG_IOError:
    PyErr_SetString(PyExc_IOError,msg);
    break;
  case SWIG_RuntimeError:
    PyErr_SetString(PyExc_RuntimeError,msg);
    break;
  case SWIG_IndexError:
    PyErr_SetString(PyExc_IndexError,msg);
    break;
  case SWIG_TypeError:
    PyErr_SetString(PyExc_TypeError,msg);
    break;
  case SWIG_DivisionByZero:
    PyErr_SetString(PyExc_ZeroDivisionError,msg);
    break;
  case SWIG_OverflowError:
    PyErr_SetString(PyExc_OverflowError,msg);
    break;
  case SWIG_SyntaxError:
    PyErr_SetString(PyExc_SyntaxError,msg);
    break;
  case SWIG_ValueError:
    PyErr_SetString(PyExc_ValueError,msg);
    break;
  case SWIG_SystemError:
    PyErr_SetString(PyExc_SystemError,msg);
    break;
  default:
    PyErr_SetString(PyExc_RuntimeError,msg);
    break;
  }
}

#define SWIG_exception(a,b) { SWIG_exception_(a,b); SWIG_fail; }


#include <stdexcept>


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

  CPLErr PushErrorHandler( char const * pszCallbackName = "CPLQuietErrorHandler" ) {
    CPLErrorHandler pfnHandler = NULL;
    if( EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
      pfnHandler = CPLQuietErrorHandler;
    else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
      pfnHandler = CPLDefaultErrorHandler;
    else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
      pfnHandler = CPLLoggingErrorHandler;

    if ( pfnHandler == NULL )
      return CE_Fatal;

    CPLPushErrorHandler( pfnHandler );

    return CE_None;
  }



/* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
{
  static swig_type_info* pchar_info = 0;
  char* vptr = 0;
  if (!pchar_info) pchar_info = SWIG_TypeQuery("char *");
  if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) {
    if (cptr) *cptr = vptr;
    if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
    return SWIG_OLDOBJ;
  } else {
    PyErr_Clear();
    if (PyString_Check(obj)) {
      if (cptr) {
	*cptr = PyString_AS_STRING(obj);
	if (psize) {
	  *psize = PyString_GET_SIZE(obj) + 1;
	}
      }
      return SWIG_PYSTR;
    }
  }
  if (cptr) {
    SWIG_type_error("char *", obj);
  }
  return 0;
}


SWIGINTERNINLINE int
SWIG_AsCharPtr(PyObject *obj, char **val)
{
  if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
    return 1;
  }
  if (val) {
    PyErr_Clear();
    SWIG_type_error("char *", obj);
  }
  return 0;
}


#include <limits.h>


SWIGINTERN int
  SWIG_CheckLongInRange(long value, long min_value, long max_value,
			const char *errmsg)
{
  if (value < min_value) {
    if (errmsg) {
      PyErr_Format(PyExc_OverflowError, 
		   "value %ld is less than '%s' minimum %ld", 
		   value, errmsg, min_value);
    }
    return 0;    
  } else if (value > max_value) {
    if (errmsg) {
      PyErr_Format(PyExc_OverflowError,
		   "value %ld is greater than '%s' maximum %ld", 
		   value, errmsg, max_value);
    }
    return 0;
  }
  return 1;
}


SWIGINTERN int
  SWIG_AsVal_long(PyObject * obj, long* val)
{
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AS_LONG(obj);
    return 1;
  }
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return 1;
    } else {
      if (!val) PyErr_Clear();
      return 0;
    }
  }
  if (val) {
    SWIG_type_error("long", obj);
  }
  return 0;
 }


#if INT_MAX != LONG_MAX
SWIGINTERN int
  SWIG_AsVal_int(PyObject *obj, int *val)
{ 
  const char* errmsg = val ? "int" : (char*)0;
  long v;
  if (SWIG_AsVal_long(obj, &v)) {
    if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) {
      if (val) *val = (int)(v);
      return 1;
    } else {
      return 0;
    }
  } else {
    PyErr_Clear();
  }
  if (val) {
    SWIG_type_error(errmsg, obj);
  }
  return 0;    
}
#else
SWIGINTERNINLINE int
  SWIG_AsVal_int(PyObject *obj, int *val)
{
  return SWIG_AsVal_long(obj,(long*)val);
}
#endif


SWIGINTERNINLINE int
SWIG_As_int(PyObject* obj)
{
  int v;
  if (!SWIG_AsVal_int(obj, &v)) {
    /*
      this is needed to make valgrind/purify happier. 
     */
    memset((void*)&v, 0, sizeof(int));
  }
  return v;
}

  
SWIGINTERNINLINE int
SWIG_Check_int(PyObject* obj)
{
  return SWIG_AsVal_int(obj, (int*)0);
}


  /*@/home/kruland/opt/share/swig/1.3.25/python/pymacros.swg,66,SWIG_define@*/
#define SWIG_From_int PyInt_FromLong
/*@@*/


SWIGINTERN PyObject *
SWIG_FromCharPtr(const char* cptr)
{ 
  if (cptr) {
    size_t size = strlen(cptr);
    if (size > INT_MAX) {
      return SWIG_NewPointerObj((char*)(cptr), 
				SWIG_TypeQuery("char *"), 0);
    } else {
      if (size != 0) {
	return PyString_FromStringAndSize(cptr, size);
      } else {
	return PyString_FromString(cptr);
      }
    }
  }
  Py_INCREF(Py_None);
  return Py_None;
}

static char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    return GDALGetDescription( self );
  }
static void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    GDALSetDescription( self, pszNewDesc );
  }
static char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
static char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
static CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    return GDALSetMetadata( self, papszMetadata, pszDomain );
  }
static 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 );
  }
static GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *name,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate( self, name, xsize, ysize, bands, eType, options );
    return ds;
  }
static GDALDatasetShadow *GDALDriverShadow_CreateCopy(GDALDriverShadow *self,char const *name,GDALDatasetShadow *src,int strict=1,char **options=0){
    GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(self, name, src, strict, 0, 0, 0 );
    return ds;
  }
static int GDALDriverShadow_Delete(GDALDriverShadow *self,char const *name){
    return GDALDeleteDataset( self, name );
  }

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_double(PyObject *obj, double *val)
{
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AS_DOUBLE(obj);
    return 1;
  }  
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AS_LONG(obj);
    return 1;
  }
  if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return 1;
    } else {
      if (!val) PyErr_Clear();
      return 0;
    }
  }
  if (val) {
    SWIG_type_error("double", obj);
  }
  return 0;
}


SWIGINTERNINLINE double
SWIG_As_double(PyObject* obj)
{
  double v;
  if (!SWIG_AsVal_double(obj, &v)) {
    /*
      this is needed to make valgrind/purify happier. 
     */
    memset((void*)&v, 0, sizeof(double));
  }
  return v;
}

  
SWIGINTERNINLINE int
SWIG_Check_double(PyObject* obj)
{
  return SWIG_AsVal_double(obj, (double*)0);
}


  /*@/home/kruland/opt/share/swig/1.3.25/python/pymacros.swg,66,SWIG_define@*/
#define SWIG_From_double PyFloat_FromDouble
/*@@*/

static 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;
  }
static 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 *h ) {
  return h->dfGCPX;
}
void GDAL_GCP_GCPX_set( GDAL_GCP *h, double val ) {
  h->dfGCPX = val;
}
double GDAL_GCP_GCPY_get( GDAL_GCP *h ) {
  return h->dfGCPY;
}
void GDAL_GCP_GCPY_set( GDAL_GCP *h, double val ) {
  h->dfGCPY = val;
}
double GDAL_GCP_GCPZ_get( GDAL_GCP *h ) {
  return h->dfGCPZ;
}
void GDAL_GCP_GCPZ_set( GDAL_GCP *h, double val ) {
  h->dfGCPZ = val;
}
double GDAL_GCP_GCPPixel_get( GDAL_GCP *h ) {
  return h->dfGCPPixel;
}
void GDAL_GCP_GCPPixel_set( GDAL_GCP *h, double val ) {
  h->dfGCPPixel = val;
}
double GDAL_GCP_GCPLine_get( GDAL_GCP *h ) {
  return h->dfGCPLine;
}
void GDAL_GCP_GCPLine_set( GDAL_GCP *h, double val ) {
  h->dfGCPLine = val;
}
const char * GDAL_GCP_Info_get( GDAL_GCP *h ) {
  return h->pszInfo;
}
void GDAL_GCP_Info_set( GDAL_GCP *h, const char * val ) {
  if ( h->pszInfo ) 
    CPLFree( h->pszInfo );
  h->pszInfo = CPLStrdup(val);
}
const char * GDAL_GCP_Id_get( GDAL_GCP *h ) {
  return h->pszId;
}
void GDAL_GCP_Id_set( GDAL_GCP *h, const char * val ) {
  if ( h->pszId ) 
    CPLFree( h->pszId );
  h->pszId = CPLStrdup(val);
}



/* Duplicate, but transposed names for C# because 
*  the C# module outputs backwards names
*/
double GDAL_GCP_get_GCPX( GDAL_GCP *h ) {
  return h->dfGCPX;
}
void GDAL_GCP_set_GCPX( GDAL_GCP *h, double val ) {
  h->dfGCPX = val;
}
double GDAL_GCP_get_GCPY( GDAL_GCP *h ) {
  return h->dfGCPY;
}
void GDAL_GCP_set_GCPY( GDAL_GCP *h, double val ) {
  h->dfGCPY = val;
}
double GDAL_GCP_get_GCPZ( GDAL_GCP *h ) {
  return h->dfGCPZ;
}
void GDAL_GCP_set_GCPZ( GDAL_GCP *h, double val ) {
  h->dfGCPZ = val;
}
double GDAL_GCP_get_GCPPixel( GDAL_GCP *h ) {
  return h->dfGCPPixel;
}
void GDAL_GCP_set_GCPPixel( GDAL_GCP *h, double val ) {
  h->dfGCPPixel = val;
}
double GDAL_GCP_get_GCPLine( GDAL_GCP *h ) {
  return h->dfGCPLine;
}
void GDAL_GCP_set_GCPLine( GDAL_GCP *h, double val ) {
  h->dfGCPLine = val;
}
const char * GDAL_GCP_get_Info( GDAL_GCP *h ) {
  return h->pszInfo;
}
void GDAL_GCP_set_Info( GDAL_GCP *h, const char * val ) {
  if ( h->pszInfo ) 
    CPLFree( h->pszInfo );
  h->pszInfo = CPLStrdup(val);
}
const char * GDAL_GCP_get_Id( GDAL_GCP *h ) {
  return h->pszId;
}
void GDAL_GCP_set_Id( GDAL_GCP *h, const char * val ) {
  if ( h->pszId ) 
    CPLFree( h->pszId );
  h->pszId = CPLStrdup(val);
}



SWIGINTERN PyObject*
t_output_helper(PyObject* target, PyObject* o) {
  if (!target) {
    target = o;
  } else if (target == Py_None) {  
    Py_DECREF(target);
    target = o;
  } else {
    if (!PyList_Check(target)) {
      PyObject *o2 = target;
      target = PyList_New(1);
      PyList_SetItem(target, 0, o2);
    }
    PyList_Append(target,o);
    Py_DECREF(o);
    }
  return target;
}


static PyObject *
CreateTupleFromDoubleArray( double *first, unsigned int 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;
}

static void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    if ( GDALDereferenceDataset( self ) <= 0 ) {
      GDALClose(self);
    }
  }
static GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    return (GDALDriverShadow*) GDALGetDatasetDriver( self );
  }
static GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
  }
static char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    return GDALGetProjectionRef( self );
  }
static char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    return GDALGetProjectionRef( self );
  }
static CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    return GDALSetProjection( self, prj );
  }
static void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6]){
    if ( GDALGetGeoTransform( self, argout ) != 0 ) {
      argout[0] = 0.0;
      argout[1] = 1.0;
      argout[2] = 0.0;
      argout[3] = 0.0;
      argout[4] = 0.0;
      argout[5] = 1.0;
    }
  }
static CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    return GDALSetGeoTransform( self, argin );
  }
static int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0){
    return GDALBuildOverviews( self, resampling, overviewlist, pOverviews, 0, 0, 0, 0);
  }
static int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    return GDALGetGCPCount( self );
  }
static char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    return GDALGetGCPProjection( self );
  }
static void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    *nGCPs = GDALGetGCPCount( self );
    *pGCPs = GDALGetGCPs( self );
  }
static CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
  }
static void GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    GDALFlushCache( self );
  }
static CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    return GDALAddBand( self, datatype, options );
  }
static CPLErr GDALDatasetShadow_WriteRaster(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,int 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){
    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 ) - 1;
      ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    }
    bool myBandList = false;
    int nBandCount;
    int *pBandList;
    if ( band_list != 0 ) {
      myBandList = false;
      nBandCount = band_list;
      pBandList = pband_list;
    }
    else {
      myBandList = true;
      nBandCount = GDALGetRasterCount( self );
      pBandList = (int*) CPLMalloc( sizeof(int) * nBandCount );
      for( int i = 0; i< nBandCount; ++i ) {
        pBandList[i] = i;
      }
    }
    return GDALDatasetRasterIO( self, GF_Write, xoff, yoff, xsize, ysize,
                                (void*) buf_string, nxsize, nysize, ntype,
                                band_list, pband_list, 0, 0, 0 );
    if ( myBandList ) {
       CPLFree( pBandList );
    }
  }

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 );
}


static
CPLErr ReadRaster_internal( GDALRasterBandShadow *obj, 
                            int xoff, int yoff, int xsize, int ysize,
                            int buf_xsize, int buf_ysize,
                            GDALDataType buf_type,
                            int *buf_size, char **buf )
{

  *buf_size = buf_xsize * buf_ysize * GDALGetDataTypeSize( buf_type ) / 8;
  *buf = (char*) malloc( *buf_size );
  CPLErr result =  GDALRasterIO( obj, GF_Read, xoff, yoff, xsize, ysize,
                                 (void *) *buf, buf_xsize, buf_ysize,
                                 buf_type, 0, 0 );
  if ( result != CE_None ) {
    free( *buf );
    *buf = 0;
    *buf_size = 0;
  }
  return result;
}

static
CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
                             int xoff, int yoff, int xsize, int ysize,
                             int buf_xsize, int buf_ysize,
                             GDALDataType buf_type,
                             int buf_size, char *buffer )
{
    if ( buf_size < buf_xsize * buf_ysize * GDALGetDataTypeSize( buf_type) /8 ) {
      return CE_Failure;
    }

    return GDALRasterIO( obj, GF_Write, xoff, yoff, xsize, ysize, 
		        (void *) buffer, buf_xsize, buf_ysize, buf_type, 0, 0 );
}

static GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    return GDALGetRasterColorInterpretation( self );
  }
static CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    return GDALSetRasterColorInterpretation( self, val );
  }
static void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterNoDataValue( self, hasval );
  }
static CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    return GDALSetRasterNoDataValue( self, d );
  }
static void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterMinimum( self, hasval );
  }
static void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterMaximum( self, hasval );
  }
static void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterOffset( self, hasval );
  }
static void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterScale( self, hasval );
  }
static int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    return GDALGetOverviewCount( self );
  }
static GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    return (GDALRasterBandShadow*) GDALGetOverview( self, i );
  }
static 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 );
  }
static void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int approx_ok=0){
    GDALComputeRasterMinMax( self, approx_ok, argout );
  }
static CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    return GDALFillRaster( self, real_fill, imag_fill );
  }
static CPLErr GDALRasterBandShadow_ReadRaster(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,int *buf_len,char **buf,int *buf_xsize=0,int *buf_ysize=0,int *buf_type=0){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
                                        : (GDALDataType)*buf_type;
    return ReadRaster_internal( self, xoff, yoff, xsize, ysize,
                                nxsize, nysize, ntype, buf_len, buf );
  }
static CPLErr GDALRasterBandShadow_WriteRaster(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,int buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,int *buf_type=0){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
                                        : (GDALDataType)*buf_type;
    return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
                                 nxsize, nysize, ntype, buf_len, buf_string );
  }
static void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    GDALFlushRasterCache( self );
  }
static GDALColorTable *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    return (GDALColorTable*) GDALGetRasterColorTable( self );
  }
static int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTable *arg){
    return GDALSetRasterColorTable( self, arg );
  }

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 );
}


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

    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;
    CPLXMLNode *psThisNode;
    CPLXMLNode *psChild;
    char       *pszText = NULL;

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

    PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType );
    PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText );
    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;
}


int GetDriverCount() {
  return GDALGetDriverCount();
}


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


GDALDatasetShadow* Open( char const* name, GDALAccess eAccess = GA_ReadOnly ) {
  GDALDatasetShadow *ds = GDALOpen( name, eAccess );
  return (GDALDatasetShadow*) ds;
}


GDALDatasetShadow* OpenShared( char const* name, GDALAccess eAccess = GA_ReadOnly ) {
  GDALDatasetShadow *ds = GDALOpenShared( name, eAccess );
  return (GDALDatasetShadow*) ds;
}


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();
  }
  return ds;
  
}

#ifdef __cplusplus
extern "C" {
#endif
static PyObject *_wrap_UseExceptions(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":UseExceptions")) goto fail;
    UseExceptions();
    
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_DontUseExceptions(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) goto fail;
    DontUseExceptions();
    
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Debug(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Debug",&obj0,&obj1)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            Debug((char const *)arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Error(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    CPLErr arg1 = (CPLErr) CE_Failure ;
    int arg2 = (int) 0 ;
    char *arg3 = (char *) "error" ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    {
        /* %typemap(python,arginit) CPLErr */
        resultobj = 0;
    }
    if(!PyArg_ParseTuple(args,(char *)"|OOO:Error",&obj0,&obj1,&obj2)) goto fail;
    if (obj0) {
        {
            arg1 = (CPLErr)(SWIG_As_int(obj0)); 
            if (SWIG_arg_fail(1)) SWIG_fail;
        }
    }
    if (obj1) {
        {
            arg2 = (int)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(2)) SWIG_fail;
        }
    }
    if (obj2) {
        if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
            SWIG_arg_fail(3);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            Error(arg1,arg2,(char const *)arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_PushErrorHandler__SWIG_0(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) "CPLQuietErrorHandler" ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"|O:PushErrorHandler",&obj0)) goto fail;
    if (obj0) {
        if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
            SWIG_arg_fail(1);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)PushErrorHandler((char const *)arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_PushErrorHandler__SWIG_1(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    CPLErrorHandler arg1 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:PushErrorHandler",&obj0)) goto fail;
    {
        CPLErrorHandler * argp;
        SWIG_Python_ConvertPtr(obj0, (void **)&argp, SWIGTYPE_p_CPLErrorHandler, SWIG_POINTER_EXCEPTION);
        if (SWIG_arg_fail(1)) SWIG_fail;
        if (argp == NULL) {
            SWIG_null_ref("CPLErrorHandler");
        }
        if (SWIG_arg_fail(1)) SWIG_fail;
        arg1 = *argp;
    }
    {
        {
            bErrorHappened = 0;
            CPLPushErrorHandler(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_PushErrorHandler(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[2];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 1); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if ((argc >= 0) && (argc <= 1)) {
        int _v;
        if (argc <= 0) {
            return _wrap_PushErrorHandler__SWIG_0(self,args);
        }
        _v = SWIG_AsCharPtr(argv[0], (char **)(0));
        if (_v) {
            return _wrap_PushErrorHandler__SWIG_0(self,args);
        }
    }
    if (argc == 1) {
        int _v;
        {
            void *ptr = 0;
            if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_CPLErrorHandler, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            } else {
                _v = (ptr != 0);
            }
        }
        if (_v) {
            return _wrap_PushErrorHandler__SWIG_1(self,args);
        }
    }
    
    PyErr_SetString(PyExc_NotImplementedError,"No matching function for overloaded 'PushErrorHandler'");
    return NULL;
}


static PyObject *_wrap_PopErrorHandler(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":PopErrorHandler")) goto fail;
    {
        {
            bErrorHappened = 0;
            CPLPopErrorHandler();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ErrorReset(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":ErrorReset")) goto fail;
    {
        {
            bErrorHappened = 0;
            CPLErrorReset();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetLastErrorNo(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":GetLastErrorNo")) goto fail;
    {
        {
            bErrorHappened = 0;
            result = (int)CPLGetLastErrorNo();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetLastErrorType(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    CPLErr result;
    
    if(!PyArg_ParseTuple(args,(char *)":GetLastErrorType")) goto fail;
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)CPLGetLastErrorType();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetLastErrorMsg(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *result;
    
    if(!PyArg_ParseTuple(args,(char *)":GetLastErrorMsg")) goto fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)CPLGetLastErrorMsg();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_PushFinderLocation(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:PushFinderLocation",&obj0)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            CPLPushFinderLocation((char const *)arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_PopFinderLocation(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":PopFinderLocation")) goto fail;
    {
        {
            bErrorHappened = 0;
            CPLPopFinderLocation();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_FinderClean(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":FinderClean")) goto fail;
    {
        {
            bErrorHappened = 0;
            CPLFinderClean();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_FindFile(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:FindFile",&obj0,&obj1)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_SetConfigOption(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:SetConfigOption",&obj0,&obj1)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            CPLSetConfigOption((char const *)arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetConfigOption(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GetConfigOption",&obj0,&obj1)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)CPLGetConfigOption((char const *)arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_MajorObject_GetDescription(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:MajorObject_GetDescription",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALMajorObjectShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_MajorObject_SetDescription(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:MajorObject_SetDescription",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALMajorObjectShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) "" ;
    char **result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_Dict",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALMajorObjectShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
            SWIG_arg_fail(2);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) char **dict */
        char **stringarray = result;
        resultobj = PyDict_New();
        if ( stringarray != NULL ) {
            while (*stringarray != NULL ) {
                char const *valptr;
                char *keyptr;
                valptr = CPLParseNameValue( *stringarray, &keyptr );
                if ( valptr != 0 ) {
                    PyObject *nm = PyString_FromString( keyptr );
                    PyObject *val = PyString_FromString( valptr );
                    PyDict_SetItem(resultobj, nm, val );
                    CPLFree( keyptr );
                }
                stringarray++;
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) "" ;
    char **result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_List",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALMajorObjectShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
            SWIG_arg_fail(2);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) char ** -> ( string ) */
        char **stringarray = result;
        if ( stringarray == NULL ) {
            resultobj = Py_None;
            Py_INCREF( resultobj );
        }
        else {
            int len = CSLCount( stringarray );
            resultobj = PyList_New( len );
            for ( int i = 0; i < len; ++i, ++stringarray ) {
                PyObject *o = PyString_FromString( *stringarray );
                PyList_SetItem(resultobj, i, o );
            }
            CSLDestroy( result );
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    char *arg3 = (char *) "" ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALMajorObjectShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        /* %typemap(in) char **dict */
        arg2 = NULL;
        if ( PySequence_Check( obj1 ) ) {
            int size = PySequence_Size(obj1);
            for (int i = 0; i < size; i++) {
                char *pszItem = NULL;
                if ( ! PyArg_Parse( PySequence_GetItem(obj1,i), "s", &pszItem ) ) {
                    PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
                    SWIG_fail;
                }
                arg2 = CSLAddString( arg2, pszItem );
            }
        }
        else if ( PyMapping_Check( obj1 ) ) {
            /* We need to use the dictionary form. */
            int size = PyMapping_Length( obj1 );
            if ( size > 0 ) {
                PyObject *item_list = PyMapping_Items( obj1 );
                for( int i=0; i<size; i++ ) {
                    PyObject *it = PySequence_GetItem( item_list, i );
                    char *nm;
                    char *val;
                    PyArg_ParseTuple( it, "ss", &nm, &val );
                    arg2 = CSLAddNameValue( arg2, nm, val );
                }
            }
        }
        else {
            PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
            SWIG_fail;
        }
    }
    if (obj2) {
        if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
            SWIG_arg_fail(3);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(freearg) char **dict */
        CSLDestroy( arg2 );
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) char **dict */
        CSLDestroy( arg2 );
    }
    return NULL;
}


static PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) "" ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALMajorObjectShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    if (obj2) {
        if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
            SWIG_arg_fail(3);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[4];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 3); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if ((argc >= 2) && (argc <= 3)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_GDALMajorObjectShadow, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            } else {
                _v = 1;
            }
        }
        if (_v) {
            {
                /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
                _v = (PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) ? 1 : 0;
            }
            if (_v) {
                if (argc <= 2) {
                    return _wrap_MajorObject_SetMetadata__SWIG_0(self,args);
                }
                _v = SWIG_AsCharPtr(argv[2], (char **)(0));
                if (_v) {
                    return _wrap_MajorObject_SetMetadata__SWIG_0(self,args);
                }
            }
        }
    }
    if ((argc >= 2) && (argc <= 3)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_GDALMajorObjectShadow, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            } else {
                _v = 1;
            }
        }
        if (_v) {
            _v = SWIG_AsCharPtr(argv[1], (char **)(0));
            if (_v) {
                if (argc <= 2) {
                    return _wrap_MajorObject_SetMetadata__SWIG_1(self,args);
                }
                _v = SWIG_AsCharPtr(argv[2], (char **)(0));
                if (_v) {
                    return _wrap_MajorObject_SetMetadata__SWIG_1(self,args);
                }
            }
        }
    }
    
    PyErr_SetString(PyExc_NotImplementedError,"No matching function for overloaded 'MajorObject_SetMetadata'");
    return NULL;
}


static PyObject * MajorObject_swigregister(PyObject *, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_GDALMajorObjectShadow, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_Driver_ShortName_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Driver_ShortName_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDriverShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDriverShadow_ShortName_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Driver_LongName_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Driver_LongName_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDriverShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDriverShadow_LongName_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Driver_HelpTopic_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Driver_HelpTopic_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDriverShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Driver_Create(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    int arg4 ;
    int arg5 = (int) 1 ;
    GDALDataType arg6 = (GDALDataType) GDT_Byte ;
    char **arg7 = (char **) 0 ;
    GDALDatasetShadow *result;
    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 *) "name",(char *) "xsize",(char *) "ysize",(char *) "bands",(char *) "eType",(char *) "options", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Driver_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDriverShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        arg3 = (int)(SWIG_As_int(obj2)); 
        if (SWIG_arg_fail(3)) SWIG_fail;
    }
    {
        arg4 = (int)(SWIG_As_int(obj3)); 
        if (SWIG_arg_fail(4)) SWIG_fail;
    }
    if (obj4) {
        {
            arg5 = (int)(SWIG_As_int(obj4)); 
            if (SWIG_arg_fail(5)) SWIG_fail;
        }
    }
    if (obj5) {
        {
            arg6 = (GDALDataType)(SWIG_As_int(obj5)); 
            if (SWIG_arg_fail(6)) SWIG_fail;
        }
    }
    if (obj6) {
        {
            /* %typemap(in) char **options */
            /* Check if is a list */
            if ( ! PySequence_Check(obj6)) {
                PyErr_SetString(PyExc_TypeError,"not a sequence");
                SWIG_fail;
            }
            
            int size = PySequence_Size(obj6);
            for (int i = 0; i < size; i++) {
                char *pszItem = NULL;
                if ( ! PyArg_Parse( PySequence_GetItem(obj6,i), "s", &pszItem ) ) {
                    PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
                    SWIG_fail;
                }
                arg7 = CSLAddString( arg7, pszItem );
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDatasetShadow, 1);
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg7 );
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg7 );
    }
    return NULL;
}


static PyObject *_wrap_Driver_CreateCopy(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
    int arg4 = (int) 1 ;
    char **arg5 = (char **) 0 ;
    GDALDatasetShadow *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    char *kwnames[] = {
        (char *) "self",(char *) "name",(char *) "src",(char *) "strict",(char *) "options", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:Driver_CreateCopy",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDriverShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    SWIG_Python_ConvertPtr(obj2, (void **)&arg3, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(3)) SWIG_fail;
    if (obj3) {
        {
            arg4 = (int)(SWIG_As_int(obj3)); 
            if (SWIG_arg_fail(4)) SWIG_fail;
        }
    }
    if (obj4) {
        {
            /* %typemap(in) char **options */
            /* Check if is a list */
            if ( ! PySequence_Check(obj4)) {
                PyErr_SetString(PyExc_TypeError,"not a sequence");
                SWIG_fail;
            }
            
            int size = PySequence_Size(obj4);
            for (int i = 0; i < size; i++) {
                char *pszItem = NULL;
                if ( ! PyArg_Parse( PySequence_GetItem(obj4,i), "s", &pszItem ) ) {
                    PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
                    SWIG_fail;
                }
                arg5 = CSLAddString( arg5, pszItem );
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDatasetShadow, 1);
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg5 );
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg5 );
    }
    return NULL;
}


static PyObject *_wrap_Driver_Delete(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Driver_Delete",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDriverShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDriverShadow_Delete(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject * Driver_swigregister(PyObject *, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_GDALDriverShadow, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_GCP_GCPX_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPX_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPX_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPX_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_GCPX_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPX_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPY_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPY_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPY_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPY_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_GCPY_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPY_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPZ_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPZ_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPZ_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPZ_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_GCPZ_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPZ_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPPixel_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPPixel_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPPixel_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPPixel_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_GCPPixel_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPPixel_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPLine_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPLine_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPLine_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_GCPLine_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_GCPLine_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPLine_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_Info_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_Info_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_Info_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_Info_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_Info_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDAL_GCP_Info_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_Id_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GCP_Id_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_Id_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCP_Id_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GCP_Id_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDAL_GCP_Id_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_GCP(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    double arg1 = (double) 0.0 ;
    double arg2 = (double) 0.0 ;
    double arg3 = (double) 0.0 ;
    double arg4 = (double) 0.0 ;
    double arg5 = (double) 0.0 ;
    char *arg6 = (char *) "" ;
    char *arg7 = (char *) "" ;
    GDAL_GCP *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    PyObject * obj5 = 0 ;
    PyObject * obj6 = 0 ;
    char *kwnames[] = {
        (char *) "x",(char *) "y",(char *) "z",(char *) "pixel",(char *) "line",(char *) "info",(char *) "id", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOO:new_GCP",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
    if (obj0) {
        {
            arg1 = (double)(SWIG_As_double(obj0)); 
            if (SWIG_arg_fail(1)) SWIG_fail;
        }
    }
    if (obj1) {
        {
            arg2 = (double)(SWIG_As_double(obj1)); 
            if (SWIG_arg_fail(2)) SWIG_fail;
        }
    }
    if (obj2) {
        {
            arg3 = (double)(SWIG_As_double(obj2)); 
            if (SWIG_arg_fail(3)) SWIG_fail;
        }
    }
    if (obj3) {
        {
            arg4 = (double)(SWIG_As_double(obj3)); 
            if (SWIG_arg_fail(4)) SWIG_fail;
        }
    }
    if (obj4) {
        {
            arg5 = (double)(SWIG_As_double(obj4)); 
            if (SWIG_arg_fail(5)) SWIG_fail;
        }
    }
    if (obj5) {
        if (!SWIG_AsCharPtr(obj5, (char**)&arg6)) {
            SWIG_arg_fail(6);SWIG_fail;
        }
    }
    if (obj6) {
        if (!SWIG_AsCharPtr(obj6, (char**)&arg7)) {
            SWIG_arg_fail(7);SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDAL_GCP, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_GCP(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_GCP",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            delete_GDAL_GCP(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject * GCP_swigregister(PyObject *, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_GDAL_GCP, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPX_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPX_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPX_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPX_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPY_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPY_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPY_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPY_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPZ_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPZ_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPZ_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPZ_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPPixel_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPPixel_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPPixel_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPPixel_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPLine_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_GCPLine_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPLine_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_GCPLine_set(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_Info_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Info_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDAL_GCP_Info_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_Info_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Info_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_Info_set(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_Id_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Id_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDAL_GCP_Id_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_Id_set(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Id_set",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_Id_set(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_GCPX(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPX",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_get_GCPX(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_GCPX(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPX",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_GCPX(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_GCPY(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPY",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_get_GCPY(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_GCPY(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPY",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_GCPY(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_GCPZ(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPZ",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_get_GCPZ(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_GCPZ(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPZ",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_GCPZ(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_GCPPixel(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPPixel",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_get_GCPPixel(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_GCPPixel(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPPixel",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_GCPPixel(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_GCPLine(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPLine",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (double)GDAL_GCP_get_GCPLine(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_GCPLine(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPLine",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_GCPLine(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_Info(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Info",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDAL_GCP_get_Info(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_Info(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Info",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_Info(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_get_Id(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Id",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDAL_GCP_get_Id(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GDAL_GCP_set_Id(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Id",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDAL_GCP_set_Id(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GCPsToGeoTransform(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    int arg1 ;
    GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
    double *arg3 ;
    int arg4 = (int) 1 ;
    FALSE_IS_ERR result;
    GDAL_GCP *tmpGCPList1 ;
    double argout3[6] ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    {
        /* %typemap(in,numinputs=0) (double argout3[ANY]) */
        arg3 = argout3;
        resultobj = 0;
    }
    if(!PyArg_ParseTuple(args,(char *)"O|O:GCPsToGeoTransform",&obj0,&obj1)) goto fail;
    {
        /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
        /* check if is List */
        if ( !PySequence_Check(obj0) ) {
            PyErr_SetString(PyExc_TypeError, "not a sequence");
            SWIG_fail;
        }
        arg1 = PySequence_Size(obj0);
        tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
        arg2 = tmpGCPList1;
        for( int i = 0; i<arg1; i++ ) {
            PyObject *o = PySequence_GetItem(obj0,i);
            GDAL_GCP *item = 0;
            SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
            if ( ! item ) {
                SWIG_fail;
            }
            memcpy( (void*) item, (void*) tmpGCPList1, sizeof( GDAL_GCP ) );
            ++tmpGCPList1;
        }
    }
    if (obj1) {
        {
            arg4 = (int)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(4)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) IF_FALSE_RETURN_NONE */
        resultobj = 0;
    }
    {
        /* %typemap(argout) (double argout[ANY]) */
        PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
        resultobj = t_output_helper(resultobj,out);
    }
    {
        /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
        if (arg2) {
            free( (void*) 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);
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
        if (arg2) {
            free( (void*) arg2 );
        }
    }
    return NULL;
}


static PyObject *_wrap_Dataset_RasterXSize_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterXSize_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_RasterYSize_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterYSize_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_RasterCount_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterCount_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDatasetShadow_RasterCount_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_Dataset(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_Dataset",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            delete_GDALDatasetShadow(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetDriver(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    GDALDriverShadow *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetDriver",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDriverShadow, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetRasterBand(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int arg2 ;
    GDALRasterBandShadow *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Dataset_GetRasterBand",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALRasterBandShadow, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetProjection(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjection",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDatasetShadow_GetProjection(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetProjectionRef(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjectionRef",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_SetProjection(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetProjection",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetGeoTransform(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    double *arg2 ;
    double argout2[6] ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(in,numinputs=0) (double argout2[ANY]) */
        arg2 = argout2;
        resultobj = 0;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGeoTransform",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALDatasetShadow_GetGeoTransform(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(argout) (double argout[ANY]) */
        PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
        resultobj = t_output_helper(resultobj,out);
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_SetGeoTransform(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    double *arg2 ;
    CPLErr result;
    double argin2[6] ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetGeoTransform",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        /* %typemap(in) (double argin2[ANY]) */
        arg2 = argin2;
        if (! PySequence_Check(obj1) ) {
            PyErr_SetString(PyExc_TypeError, "not a sequence");
            SWIG_fail;
        }
        int seq_size = PySequence_Size(obj1);
        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(obj1,i);
            double val;
            PyArg_Parse(o, "d", &val );
            arg2[i] =  val;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_BuildOverviews(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *arg2 = (char *) "NEAREST" ;
    int arg3 = (int) 0 ;
    int *arg4 = (int *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    char *kwnames[] = {
        (char *) "self",(char *) "resampling",(char *) "overviewlist", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Dataset_BuildOverviews",kwnames,&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
            SWIG_arg_fail(2);SWIG_fail;
        }
    }
    if (obj2) {
        {
            /* %typemap(in,numinputs=1) (int nList, int* pList)*/
            /* check if is List */
            if ( !PySequence_Check(obj2) ) {
                PyErr_SetString(PyExc_TypeError, "not a sequence");
                SWIG_fail;
            }
            arg3 = PySequence_Size(obj2);
            arg4 = (int*) malloc(arg3*sizeof(int));
            for( int i = 0; i<arg3; i++ ) {
                PyObject *o = PySequence_GetItem(obj2,i);
                if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
                    SWIG_fail;
                }
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    {
        /* %typemap(freearg) (int nList, int* pList) */
        if (arg4) {
            free((void*) arg4);
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) (int nList, int* pList) */
        if (arg4) {
            free((void*) arg4);
        }
    }
    return NULL;
}


static PyObject *_wrap_Dataset_GetGCPCount(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPCount",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDatasetShadow_GetGCPCount(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetGCPProjection(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPProjection",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_GetGCPs(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
    int nGCPs2 = 0 ;
    GDAL_GCP *pGCPs2 = 0 ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
        arg2 = &nGCPs2;
        arg3 = &pGCPs2;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPs",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %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;
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_SetGCPs(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int arg2 ;
    GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
    char *arg4 = (char *) 0 ;
    CPLErr result;
    GDAL_GCP *tmpGCPList2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:Dataset_SetGCPs",&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
        /* check if is List */
        if ( !PySequence_Check(obj1) ) {
            PyErr_SetString(PyExc_TypeError, "not a sequence");
            SWIG_fail;
        }
        arg2 = PySequence_Size(obj1);
        tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
        arg3 = tmpGCPList2;
        for( int i = 0; i<arg2; i++ ) {
            PyObject *o = PySequence_GetItem(obj1,i);
            GDAL_GCP *item = 0;
            SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
            if ( ! item ) {
                SWIG_fail;
            }
            memcpy( (void*) item, (void*) tmpGCPList2, sizeof( GDAL_GCP ) );
            ++tmpGCPList2;
        }
    }
    if (!SWIG_AsCharPtr(obj2, (char**)&arg4)) {
        SWIG_arg_fail(4);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
        if (arg3) {
            free( (void*) arg3 );
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
        if (arg3) {
            free( (void*) arg3 );
        }
    }
    return NULL;
}


static PyObject *_wrap_Dataset_FlushCache(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Dataset_FlushCache",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALDatasetShadow_FlushCache(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Dataset_AddBand(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    GDALDataType arg2 = (GDALDataType) GDT_Byte ;
    char **arg3 = (char **) 0 ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    char *kwnames[] = {
        (char *) "self",(char *) "datatype",(char *) "options", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Dataset_AddBand",kwnames,&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        {
            arg2 = (GDALDataType)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(2)) SWIG_fail;
        }
    }
    if (obj2) {
        {
            /* %typemap(in) char **options */
            /* Check if is a list */
            if ( ! PySequence_Check(obj2)) {
                PyErr_SetString(PyExc_TypeError,"not a sequence");
                SWIG_fail;
            }
            
            int size = PySequence_Size(obj2);
            for (int i = 0; i < size; i++) {
                char *pszItem = NULL;
                if ( ! PyArg_Parse( PySequence_GetItem(obj2,i), "s", &pszItem ) ) {
                    PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
                    SWIG_fail;
                }
                arg3 = CSLAddString( arg3, pszItem );
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg3 );
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg3 );
    }
    return NULL;
}


static PyObject *_wrap_Dataset_WriteRaster(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int arg6 ;
    char *arg7 = (char *) 0 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    GDALDataType *arg10 = (GDALDataType *) 0 ;
    int arg11 = (int) 0 ;
    int *arg12 = (int *) 0 ;
    CPLErr result;
    int val8 ;
    int val9 ;
    int val10 ;
    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 *) "self",(char *) "xoff",(char *) "yoff",(char *) "xsize",(char *) "ysize",(char *) "buf_len",(char *) "buf_xsize",(char *) "buf_ysize",(char *) "buf_type",(char *) "band_list", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOO:Dataset_WriteRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        arg3 = (int)(SWIG_As_int(obj2)); 
        if (SWIG_arg_fail(3)) SWIG_fail;
    }
    {
        arg4 = (int)(SWIG_As_int(obj3)); 
        if (SWIG_arg_fail(4)) SWIG_fail;
    }
    {
        arg5 = (int)(SWIG_As_int(obj4)); 
        if (SWIG_arg_fail(5)) SWIG_fail;
    }
    {
        /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
        PyString_AsStringAndSize(obj5, &arg7, &arg6 );
    }
    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) (int *optional_##int) */
            if ( obj8 == Py_None ) {
                arg10 = 0;
            }
            else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
                arg10 = (GDALDataType *) &val10;
            }
            else {
                PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
                SWIG_fail;
            }
        }
    }
    if (obj9) {
        {
            /* %typemap(in,numinputs=1) (int nList, int* pList)*/
            /* check if is List */
            if ( !PySequence_Check(obj9) ) {
                PyErr_SetString(PyExc_TypeError, "not a sequence");
                SWIG_fail;
            }
            arg11 = PySequence_Size(obj9);
            arg12 = (int*) malloc(arg11*sizeof(int));
            for( int i = 0; i<arg11; i++ ) {
                PyObject *o = PySequence_GetItem(obj9,i);
                if ( !PyArg_Parse(o,"i",&arg12[i]) ) {
                    SWIG_fail;
                }
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(freearg) (int nList, int* pList) */
        if (arg12) {
            free((void*) arg12);
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) (int nList, int* pList) */
        if (arg12) {
            free((void*) arg12);
        }
    }
    return NULL;
}


static PyObject * Dataset_swigregister(PyObject *, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_GDALDatasetShadow, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_Band_XSize_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_XSize_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALRasterBandShadow_XSize_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_YSize_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_YSize_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALRasterBandShadow_YSize_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_DataType_get(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALDataType result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_DataType_get",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorInterp result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorInterpretation",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorInterp arg2 ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorInterpretation",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (GDALColorInterp)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetNoDataValue(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    double tmpval2 ;
    int tmphasval2 ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
        arg2 = &tmpval2;
        arg3 = &tmphasval2;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetNoDataValue",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(python,argout) (double *val, int*hasval) */
        PyObject *r;
        if ( !*arg3 ) {
            Py_INCREF(Py_None);
            r = Py_None;
            resultobj = t_output_helper(resultobj,r);
        }
        else {
            r = PyFloat_FromDouble( *arg2 );
            resultobj = t_output_helper(resultobj,r);
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_SetNoDataValue(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double arg2 ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Band_SetNoDataValue",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetMinimum(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    double tmpval2 ;
    int tmphasval2 ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
        arg2 = &tmpval2;
        arg3 = &tmphasval2;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetMinimum",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(python,argout) (double *val, int*hasval) */
        PyObject *r;
        if ( !*arg3 ) {
            Py_INCREF(Py_None);
            r = Py_None;
            resultobj = t_output_helper(resultobj,r);
        }
        else {
            r = PyFloat_FromDouble( *arg2 );
            resultobj = t_output_helper(resultobj,r);
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetMaximum(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    double tmpval2 ;
    int tmphasval2 ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
        arg2 = &tmpval2;
        arg3 = &tmphasval2;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetMaximum",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(python,argout) (double *val, int*hasval) */
        PyObject *r;
        if ( !*arg3 ) {
            Py_INCREF(Py_None);
            r = Py_None;
            resultobj = t_output_helper(resultobj,r);
        }
        else {
            r = PyFloat_FromDouble( *arg2 );
            resultobj = t_output_helper(resultobj,r);
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetOffset(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    double tmpval2 ;
    int tmphasval2 ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
        arg2 = &tmpval2;
        arg3 = &tmphasval2;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetOffset",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(python,argout) (double *val, int*hasval) */
        PyObject *r;
        if ( !*arg3 ) {
            Py_INCREF(Py_None);
            r = Py_None;
            resultobj = t_output_helper(resultobj,r);
        }
        else {
            r = PyFloat_FromDouble( *arg2 );
            resultobj = t_output_helper(resultobj,r);
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetScale(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    double tmpval2 ;
    int tmphasval2 ;
    PyObject * obj0 = 0 ;
    
    {
        /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
        arg2 = &tmpval2;
        arg3 = &tmphasval2;
    }
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetScale",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(python,argout) (double *val, int*hasval) */
        PyObject *r;
        if ( !*arg3 ) {
            Py_INCREF(Py_None);
            r = Py_None;
            resultobj = t_output_helper(resultobj,r);
        }
        else {
            r = PyFloat_FromDouble( *arg2 );
            resultobj = t_output_helper(resultobj,r);
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetOverviewCount(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetOverviewCount",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetOverview(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 ;
    GDALRasterBandShadow *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Band_GetOverview",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALRasterBandShadow, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_Checksum(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 = (int) 0 ;
    int arg3 = (int) 0 ;
    int *arg4 = (int *) 0 ;
    int *arg5 = (int *) 0 ;
    int result;
    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 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Band_Checksum",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        {
            arg2 = (int)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(2)) SWIG_fail;
        }
    }
    if (obj2) {
        {
            arg3 = (int)(SWIG_As_int(obj2)); 
            if (SWIG_arg_fail(3)) SWIG_fail;
        }
    }
    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;
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 ;
    int arg3 = (int) 0 ;
    double argout2[2] ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    {
        /* %typemap(in,numinputs=0) (double argout2[ANY]) */
        arg2 = argout2;
        resultobj = 0;
    }
    if(!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeRasterMinMax",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        {
            arg3 = (int)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(3)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    {
        /* %typemap(argout) (double argout[ANY]) */
        PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
        resultobj = t_output_helper(resultobj,out);
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_Fill(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double arg2 ;
    double arg3 = (double) 0.0 ;
    CPLErr result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:Band_Fill",&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (double)(SWIG_As_double(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    if (obj2) {
        {
            arg3 = (double)(SWIG_As_double(obj2)); 
            if (SWIG_arg_fail(3)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_ReadRaster(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int *arg6 = (int *) 0 ;
    char **arg7 = (char **) 0 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    int *arg10 = (int *) 0 ;
    CPLErr result;
    int nLen6 = 0 ;
    char *pBuf6 = 0 ;
    int val8 ;
    int val9 ;
    int val10 ;
    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 *) "xoff",(char *) "yoff",(char *) "xsize",(char *) "ysize",(char *) "buf_xsize",(char *) "buf_ysize",(char *) "buf_type", NULL 
    };
    
    {
        /* %typemap(in,numinputs=0) (int *nLen6, char **pBuf6 ) */
        arg6 = &nLen6;
        arg7 = &pBuf6;
    }
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOO:Band_ReadRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        arg3 = (int)(SWIG_As_int(obj2)); 
        if (SWIG_arg_fail(3)) SWIG_fail;
    }
    {
        arg4 = (int)(SWIG_As_int(obj3)); 
        if (SWIG_arg_fail(4)) SWIG_fail;
    }
    {
        arg5 = (int)(SWIG_As_int(obj4)); 
        if (SWIG_arg_fail(5)) SWIG_fail;
    }
    if (obj5) {
        {
            /* %typemap(in) (int *optional_##int) */
            if ( obj5 == Py_None ) {
                arg8 = 0;
            }
            else if ( PyArg_Parse( obj5,"i" ,&val8 ) ) {
                arg8 = (int *) &val8;
            }
            else {
                PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
                SWIG_fail;
            }
        }
    }
    if (obj6) {
        {
            /* %typemap(in) (int *optional_##int) */
            if ( obj6 == Py_None ) {
                arg9 = 0;
            }
            else if ( PyArg_Parse( obj6,"i" ,&val9 ) ) {
                arg9 = (int *) &val9;
            }
            else {
                PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
                SWIG_fail;
            }
        }
    }
    if (obj7) {
        {
            /* %typemap(in) (int *optional_##int) */
            if ( obj7 == Py_None ) {
                arg10 = 0;
            }
            else if ( PyArg_Parse( obj7,"i" ,&val10 ) ) {
                arg10 = (int *) &val10;
            }
            else {
                PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
                SWIG_fail;
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALRasterBandShadow_ReadRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(argout) (int *nLen, char **pBuf ) */
        Py_XDECREF(resultobj);
        resultobj = PyString_FromStringAndSize( *arg7, *arg6 );
    }
    {
        /* %typemap(freearg) (int *nLen, char **pBuf ) */
        if( *arg6 ) {
            free( *arg7 );
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    {
        /* %typemap(freearg) (int *nLen, char **pBuf ) */
        if( *arg6 ) {
            free( *arg7 );
        }
    }
    return NULL;
}


static PyObject *_wrap_Band_WriteRaster(PyObject *, PyObject *args, PyObject *kwargs) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int arg6 ;
    char *arg7 = (char *) 0 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    int *arg10 = (int *) 0 ;
    CPLErr result;
    int val8 ;
    int val9 ;
    int val10 ;
    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 *) "self",(char *) "xoff",(char *) "yoff",(char *) "xsize",(char *) "ysize",(char *) "buf_len",(char *) "buf_xsize",(char *) "buf_ysize",(char *) "buf_type", NULL 
    };
    
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOO:Band_WriteRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        arg3 = (int)(SWIG_As_int(obj2)); 
        if (SWIG_arg_fail(3)) SWIG_fail;
    }
    {
        arg4 = (int)(SWIG_As_int(obj3)); 
        if (SWIG_arg_fail(4)) SWIG_fail;
    }
    {
        arg5 = (int)(SWIG_As_int(obj4)); 
        if (SWIG_arg_fail(5)) SWIG_fail;
    }
    {
        /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
        PyString_AsStringAndSize(obj5, &arg7, &arg6 );
    }
    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) (int *optional_##int) */
            if ( obj8 == Py_None ) {
                arg10 = 0;
            }
            else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
                arg10 = (int *) &val10;
            }
            else {
                PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
                SWIG_fail;
            }
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) CPLErr */
        if ( bUseExceptions == 1 && result >= CE_Failure ) {
            int errcode = CPLGetLastErrorNo();
            const char *errmsg = CPLGetLastErrorMsg();
            PyErr_Format( PyExc_RuntimeError, "CPLErr %d: %s", errcode, (char*) errmsg );
            SWIG_fail;
        }
    }
    {
        /* %typemap(ret) CPLErr */
        if ( bUseExceptions == 0 ) {
            /* We're not using exceptions.  The test in the out typemap means that
                   we know we have a valid return value.  Test if there are any return
                   values set by argout typemaps.
                */
            if ( resultobj == 0 ) {
                /* No other return values set so return None */
                resultobj = PyInt_FromLong(result);
            }
        }
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_FlushCache(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_FlushCache",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            GDALRasterBandShadow_FlushCache(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_GetRasterColorTable(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorTable *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorTable",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (GDALColorTable *)GDALRasterBandShadow_GetRasterColorTable(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALColorTable, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Band_SetRasterColorTable(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorTable *arg2 = (GDALColorTable *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorTable",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(2)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject * Band_swigregister(PyObject *, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_GDALRasterBandShadow, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_ColorTable(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
    GDALColorTable *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"|O:new_ColorTable",&obj0)) goto fail;
    if (obj0) {
        {
            arg1 = (GDALPaletteInterp)(SWIG_As_int(obj0)); 
            if (SWIG_arg_fail(1)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALColorTable *)new GDALColorTable(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALColorTable, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_ColorTable(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_ColorTable",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            delete arg1;
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ColorTable_Clone(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    GDALColorTable *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:ColorTable_Clone",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (GDALColorTable *)((GDALColorTable const *)arg1)->Clone();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALColorTable, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    GDALPaletteInterp result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetPaletteInterpretation",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (GDALPaletteInterp)((GDALColorTable const *)arg1)->GetPaletteInterpretation();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ColorTable_GetCount(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetCount",&obj0)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        {
            bErrorHappened = 0;
            result = (int)((GDALColorTable const *)arg1)->GetColorEntryCount();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ColorTable_GetColorEntry(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int arg2 ;
    GDALColorEntry *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:ColorTable_GetColorEntry",&obj0,&obj1)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALColorEntry *)(arg1)->GetColorEntry(arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(out) GDALColorEntry* */
        resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int arg2 ;
    GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_GetColorEntryAsRGB",&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        /* %typemap(in) GDALColorEntry* */
        
        GDALColorEntry ce = {
            255,255,255,255
        };
        int size = PySequence_Size(obj2);
        if ( size > 4 ) {
            PyErr_SetString(PyExc_TypeError, "sequence too long");
            SWIG_fail;
        }
        PyArg_ParseTuple( obj2,"hhh|h", &ce.c1, &ce.c2, &ce.c3, &ce.c4 );
        arg3 = &ce;
    }
    {
        {
            bErrorHappened = 0;
            result = (int)((GDALColorTable const *)arg1)->GetColorEntryAsRGB(arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ColorTable_SetColorEntry(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int arg2 ;
    GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_SetColorEntry",&obj0,&obj1,&obj2)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALColorTable, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    {
        arg2 = (int)(SWIG_As_int(obj1)); 
        if (SWIG_arg_fail(2)) SWIG_fail;
    }
    {
        /* %typemap(in) GDALColorEntry* */
        
        GDALColorEntry ce = {
            255,255,255,255
        };
        int size = PySequence_Size(obj2);
        if ( size > 4 ) {
            PyErr_SetString(PyExc_TypeError, "sequence too long");
            SWIG_fail;
        }
        PyArg_ParseTuple( obj2,"hhh|h", &ce.c1, &ce.c2, &ce.c3, &ce.c4 );
        arg3 = &ce;
    }
    {
        {
            bErrorHappened = 0;
            (arg1)->SetColorEntry(arg2,(GDALColorEntry const *)arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject * ColorTable_swigregister(PyObject *, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_GDALColorTable, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_AllRegister(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    
    if(!PyArg_ParseTuple(args,(char *)":AllRegister")) goto fail;
    {
        {
            bErrorHappened = 0;
            GDALAllRegister();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetCacheMax(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":GetCacheMax")) goto fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALGetCacheMax();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_SetCacheMax(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    int arg1 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:SetCacheMax",&obj0)) goto fail;
    {
        arg1 = (int)(SWIG_As_int(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            GDALSetCacheMax(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetCacheUsed(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":GetCacheUsed")) goto fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GDALGetCacheUsed();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetDataTypeSize(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDataType arg1 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GetDataTypeSize",&obj0)) goto fail;
    {
        arg1 = (GDALDataType)(SWIG_As_int(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (int)GDALGetDataTypeSize(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_DataTypeIsComplex(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDataType arg1 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:DataTypeIsComplex",&obj0)) goto fail;
    {
        arg1 = (GDALDataType)(SWIG_As_int(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (int)GDALDataTypeIsComplex(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetDataTypeName(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDataType arg1 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GetDataTypeName",&obj0)) goto fail;
    {
        arg1 = (GDALDataType)(SWIG_As_int(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALGetDataTypeName(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetDataTypeByName(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    GDALDataType result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GetDataTypeByName",&obj0)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetColorInterpretationName(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALColorInterp arg1 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GetColorInterpretationName",&obj0)) goto fail;
    {
        arg1 = (GDALColorInterp)(SWIG_As_int(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALGetColorInterpretationName(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetPaletteInterpretationName(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALPaletteInterp arg1 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GetPaletteInterpretationName",&obj0)) goto fail;
    {
        arg1 = (GDALPaletteInterp)(SWIG_As_int(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALGetPaletteInterpretationName(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_DecToDMS(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    double arg1 ;
    char *arg2 = (char *) 0 ;
    int arg3 = (int) 2 ;
    char *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:DecToDMS",&obj0,&obj1,&obj2)) goto fail;
    {
        arg1 = (double)(SWIG_As_double(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
        SWIG_arg_fail(2);SWIG_fail;
    }
    if (obj2) {
        {
            arg3 = (int)(SWIG_As_int(obj2)); 
            if (SWIG_arg_fail(3)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_PackedDMSToDec(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    double arg1 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:PackedDMSToDec",&obj0)) goto fail;
    {
        arg1 = (double)(SWIG_As_double(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (double)GDALPackedDMSToDec(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_DecToPackedDMS(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    double arg1 ;
    double result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:DecToPackedDMS",&obj0)) goto fail;
    {
        arg1 = (double)(SWIG_As_double(obj0)); 
        if (SWIG_arg_fail(1)) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (double)GDALDecToPackedDMS(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_double((double)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_ParseXMLString(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    CPLXMLNode *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:ParseXMLString",&obj0)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (CPLXMLNode *)CPLParseXMLString(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        /* %typemap(python,out) (CPLXMLNode*) */
        resultobj = XMLTreeToPyList( result );
    }
    {
        /* %typemap(python,ret) (CPLXMLNode*) */
        if ( result ) CPLDestroyXMLNode( result );
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_SerializeXMLTree(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:SerializeXMLTree",&obj0)) goto fail;
    {
        /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
        arg1 = PyListToXMLTree( obj0 );
        if ( !arg1 ) SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (char *)CPLSerializeXMLTree(arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_FromCharPtr(result);
    {
        /* %typemap(python,freearg) (CPLXMLNode *xmlnode) */
        if ( arg1 ) CPLDestroyXMLNode( arg1 );
    }
    return resultobj;
    fail:
    {
        /* %typemap(python,freearg) (CPLXMLNode *xmlnode) */
        if ( arg1 ) CPLDestroyXMLNode( arg1 );
    }
    return NULL;
}


static PyObject *_wrap_GetDriverCount(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":GetDriverCount")) goto fail;
    {
        {
            bErrorHappened = 0;
            result = (int)GetDriverCount();
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    {
        resultobj = SWIG_From_int((int)(result)); 
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_GetDriverByName(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    GDALDriverShadow *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDriverShadow, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_Open(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
    GDALDatasetShadow *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:Open",&obj0,&obj1)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    if (obj1) {
        {
            arg2 = (GDALAccess)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(2)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDatasetShadow, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_OpenShared(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    char *arg1 = (char *) 0 ;
    GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
    GDALDatasetShadow *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:OpenShared",&obj0,&obj1)) goto fail;
    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
        SWIG_arg_fail(1);SWIG_fail;
    }
    if (obj1) {
        {
            arg2 = (GDALAccess)(SWIG_As_int(obj1)); 
            if (SWIG_arg_fail(2)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDatasetShadow, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_AutoCreateWarpedVRT(PyObject *, PyObject *args) {
    PyObject *resultobj = NULL;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
    double arg5 = (double) 0.0 ;
    GDALDatasetShadow *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|OOOO:AutoCreateWarpedVRT",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0);
    if (SWIG_arg_fail(1)) SWIG_fail;
    if (obj1) {
        if (!SWIG_AsCharPtr(obj1, (char**)&arg2)) {
            SWIG_arg_fail(2);SWIG_fail;
        }
    }
    if (obj2) {
        if (!SWIG_AsCharPtr(obj2, (char**)&arg3)) {
            SWIG_arg_fail(3);SWIG_fail;
        }
    }
    if (obj3) {
        {
            arg4 = (GDALResampleAlg)(SWIG_As_int(obj3)); 
            if (SWIG_arg_fail(4)) SWIG_fail;
        }
    }
    if (obj4) {
        {
            arg5 = (double)(SWIG_As_double(obj4)); 
            if (SWIG_arg_fail(5)) SWIG_fail;
        }
    }
    {
        {
            bErrorHappened = 0;
            result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
            
            if ( bErrorHappened ) {
                SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
            }
        }
    }
    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_GDALDatasetShadow, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, NULL},
	 { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, NULL},
	 { (char *)"Debug", _wrap_Debug, METH_VARARGS, NULL},
	 { (char *)"Error", _wrap_Error, METH_VARARGS, NULL},
	 { (char *)"PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, NULL},
	 { (char *)"PopErrorHandler", _wrap_PopErrorHandler, METH_VARARGS, NULL},
	 { (char *)"ErrorReset", _wrap_ErrorReset, METH_VARARGS, NULL},
	 { (char *)"GetLastErrorNo", _wrap_GetLastErrorNo, METH_VARARGS, NULL},
	 { (char *)"GetLastErrorType", _wrap_GetLastErrorType, METH_VARARGS, NULL},
	 { (char *)"GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_VARARGS, NULL},
	 { (char *)"PushFinderLocation", _wrap_PushFinderLocation, METH_VARARGS, NULL},
	 { (char *)"PopFinderLocation", _wrap_PopFinderLocation, METH_VARARGS, NULL},
	 { (char *)"FinderClean", _wrap_FinderClean, METH_VARARGS, NULL},
	 { (char *)"FindFile", _wrap_FindFile, METH_VARARGS, NULL},
	 { (char *)"SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, NULL},
	 { (char *)"GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, NULL},
	 { (char *)"MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_VARARGS, NULL},
	 { (char *)"MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, NULL},
	 { (char *)"MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, NULL},
	 { (char *)"MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, NULL},
	 { (char *)"MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, NULL},
	 { (char *)"MajorObject_swigregister", MajorObject_swigregister, METH_VARARGS, NULL},
	 { (char *)"Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_VARARGS, NULL},
	 { (char *)"Driver_LongName_get", _wrap_Driver_LongName_get, METH_VARARGS, NULL},
	 { (char *)"Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_VARARGS, NULL},
	 { (char *)"Driver_Create", (PyCFunction) _wrap_Driver_Create, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Driver_CreateCopy", (PyCFunction) _wrap_Driver_CreateCopy, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, NULL},
	 { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, NULL},
	 { (char *)"GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_VARARGS, NULL},
	 { (char *)"GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, NULL},
	 { (char *)"GCP_Info_get", _wrap_GCP_Info_get, METH_VARARGS, NULL},
	 { (char *)"GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, NULL},
	 { (char *)"GCP_Id_get", _wrap_GCP_Id_get, METH_VARARGS, NULL},
	 { (char *)"new_GCP", (PyCFunction) _wrap_new_GCP, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"delete_GCP", _wrap_delete_GCP, METH_VARARGS, NULL},
	 { (char *)"GCP_swigregister", GCP_swigregister, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_GCPX", _wrap_GDAL_GCP_get_GCPX, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_GCPX", _wrap_GDAL_GCP_set_GCPX, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_GCPY", _wrap_GDAL_GCP_get_GCPY, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_GCPY", _wrap_GDAL_GCP_set_GCPY, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_GCPZ", _wrap_GDAL_GCP_get_GCPZ, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_GCPZ", _wrap_GDAL_GCP_set_GCPZ, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_GCPPixel", _wrap_GDAL_GCP_get_GCPPixel, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_GCPPixel", _wrap_GDAL_GCP_set_GCPPixel, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_GCPLine", _wrap_GDAL_GCP_get_GCPLine, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_GCPLine", _wrap_GDAL_GCP_set_GCPLine, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_Info", _wrap_GDAL_GCP_get_Info, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_Info", _wrap_GDAL_GCP_set_Info, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_get_Id", _wrap_GDAL_GCP_get_Id, METH_VARARGS, NULL},
	 { (char *)"GDAL_GCP_set_Id", _wrap_GDAL_GCP_set_Id, METH_VARARGS, NULL},
	 { (char *)"GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, NULL},
	 { (char *)"Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_VARARGS, NULL},
	 { (char *)"Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_VARARGS, NULL},
	 { (char *)"Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_VARARGS, NULL},
	 { (char *)"delete_Dataset", _wrap_delete_Dataset, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_VARARGS, NULL},
	 { (char *)"Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetGeoTransform", _wrap_Dataset_GetGeoTransform, METH_VARARGS, NULL},
	 { (char *)"Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, NULL},
	 { (char *)"Dataset_BuildOverviews", (PyCFunction) _wrap_Dataset_BuildOverviews, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_VARARGS, NULL},
	 { (char *)"Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_VARARGS, NULL},
	 { (char *)"Dataset_SetGCPs", _wrap_Dataset_SetGCPs, METH_VARARGS, NULL},
	 { (char *)"Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_VARARGS, NULL},
	 { (char *)"Dataset_AddBand", (PyCFunction) _wrap_Dataset_AddBand, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Dataset_WriteRaster", (PyCFunction) _wrap_Dataset_WriteRaster, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Dataset_swigregister", Dataset_swigregister, METH_VARARGS, NULL},
	 { (char *)"Band_XSize_get", _wrap_Band_XSize_get, METH_VARARGS, NULL},
	 { (char *)"Band_YSize_get", _wrap_Band_YSize_get, METH_VARARGS, NULL},
	 { (char *)"Band_DataType_get", _wrap_Band_DataType_get, METH_VARARGS, NULL},
	 { (char *)"Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_VARARGS, NULL},
	 { (char *)"Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, NULL},
	 { (char *)"Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_VARARGS, NULL},
	 { (char *)"Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, NULL},
	 { (char *)"Band_GetMinimum", _wrap_Band_GetMinimum, METH_VARARGS, NULL},
	 { (char *)"Band_GetMaximum", _wrap_Band_GetMaximum, METH_VARARGS, NULL},
	 { (char *)"Band_GetOffset", _wrap_Band_GetOffset, METH_VARARGS, NULL},
	 { (char *)"Band_GetScale", _wrap_Band_GetScale, METH_VARARGS, NULL},
	 { (char *)"Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_VARARGS, NULL},
	 { (char *)"Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, NULL},
	 { (char *)"Band_Checksum", (PyCFunction) _wrap_Band_Checksum, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Band_ComputeRasterMinMax", _wrap_Band_ComputeRasterMinMax, METH_VARARGS, NULL},
	 { (char *)"Band_Fill", _wrap_Band_Fill, METH_VARARGS, NULL},
	 { (char *)"Band_ReadRaster", (PyCFunction) _wrap_Band_ReadRaster, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Band_WriteRaster", (PyCFunction) _wrap_Band_WriteRaster, METH_VARARGS | METH_KEYWORDS, NULL},
	 { (char *)"Band_FlushCache", _wrap_Band_FlushCache, METH_VARARGS, NULL},
	 { (char *)"Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_VARARGS, NULL},
	 { (char *)"Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, NULL},
	 { (char *)"Band_swigregister", Band_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_ColorTable", _wrap_new_ColorTable, METH_VARARGS, NULL},
	 { (char *)"delete_ColorTable", _wrap_delete_ColorTable, METH_VARARGS, NULL},
	 { (char *)"ColorTable_Clone", _wrap_ColorTable_Clone, METH_VARARGS, NULL},
	 { (char *)"ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_VARARGS, NULL},
	 { (char *)"ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_VARARGS, NULL},
	 { (char *)"ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, NULL},
	 { (char *)"ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, NULL},
	 { (char *)"ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, NULL},
	 { (char *)"ColorTable_swigregister", ColorTable_swigregister, METH_VARARGS, NULL},
	 { (char *)"AllRegister", _wrap_AllRegister, METH_VARARGS, NULL},
	 { (char *)"GetCacheMax", _wrap_GetCacheMax, METH_VARARGS, NULL},
	 { (char *)"SetCacheMax", _wrap_SetCacheMax, METH_VARARGS, NULL},
	 { (char *)"GetCacheUsed", _wrap_GetCacheUsed, METH_VARARGS, NULL},
	 { (char *)"GetDataTypeSize", _wrap_GetDataTypeSize, METH_VARARGS, NULL},
	 { (char *)"DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_VARARGS, NULL},
	 { (char *)"GetDataTypeName", _wrap_GetDataTypeName, METH_VARARGS, NULL},
	 { (char *)"GetDataTypeByName", _wrap_GetDataTypeByName, METH_VARARGS, NULL},
	 { (char *)"GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_VARARGS, NULL},
	 { (char *)"GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_VARARGS, NULL},
	 { (char *)"DecToDMS", _wrap_DecToDMS, METH_VARARGS, NULL},
	 { (char *)"PackedDMSToDec", _wrap_PackedDMSToDec, METH_VARARGS, NULL},
	 { (char *)"DecToPackedDMS", _wrap_DecToPackedDMS, METH_VARARGS, NULL},
	 { (char *)"ParseXMLString", _wrap_ParseXMLString, METH_VARARGS, NULL},
	 { (char *)"SerializeXMLTree", _wrap_SerializeXMLTree, METH_VARARGS, NULL},
	 { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, NULL},
	 { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, NULL},
	 { (char *)"Open", _wrap_Open, METH_VARARGS, NULL},
	 { (char *)"OpenShared", _wrap_OpenShared, METH_VARARGS, NULL},
	 { (char *)"AutoCreateWarpedVRT", _wrap_AutoCreateWarpedVRT, METH_VARARGS, NULL},
	 { NULL, NULL, 0, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x) {
    return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
}
static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x) {
    return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
}
static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x) {
    return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
}
static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, 0};
static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, 0};
static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, 0};
static swig_type_info _swigt__p_GDALColorTable = {"_p_GDALColorTable", "GDALColorTable *", 0, 0, 0};
static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, 0};
static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, 0};
static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, 0};
static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, 0};
static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|GDALPaletteInterp *", 0, 0, 0};
static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, 0};
static swig_type_info _swigt__ptrdiff_t = {"_ptrdiff_t", "ptrdiff_t", 0, 0, 0};
static swig_type_info _swigt__size_t = {"_size_t", "size_t", 0, 0, 0};
static swig_type_info _swigt__std__ptrdiff_t = {"_std__ptrdiff_t", "std::ptrdiff_t", 0, 0, 0};
static swig_type_info _swigt__std__size_t = {"_std__size_t", "std::size_t", 0, 0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_CPLErrorHandler,
  &_swigt__p_CPLXMLNode,
  &_swigt__p_GDALColorEntry,
  &_swigt__p_GDALColorTable,
  &_swigt__p_GDALDatasetShadow,
  &_swigt__p_GDALDriverShadow,
  &_swigt__p_GDALMajorObjectShadow,
  &_swigt__p_GDALRasterBandShadow,
  &_swigt__p_GDAL_GCP,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_int,
  &_swigt__p_p_GDAL_GCP,
  &_swigt__p_p_char,
  &_swigt__ptrdiff_t,
  &_swigt__size_t,
  &_swigt__std__ptrdiff_t,
  &_swigt__std__size_t,
};

static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 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_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALColorTable[] = {  {&_swigt__p_GDALColorTable, 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_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = {  {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0},  {&_swigt__p_GDALDriverShadow, _p_GDALDriverShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALDatasetShadow, _p_GDALDatasetShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALRasterBandShadow, _p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 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_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_int[] = {  {&_swigt__p_int, 0, 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_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__ptrdiff_t[] = {  {&_swigt__ptrdiff_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__size_t[] = {  {&_swigt__size_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__std__ptrdiff_t[] = {  {&_swigt__std__ptrdiff_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__std__size_t[] = {  {&_swigt__std__size_t, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_CPLErrorHandler,
  _swigc__p_CPLXMLNode,
  _swigc__p_GDALColorEntry,
  _swigc__p_GDALColorTable,
  _swigc__p_GDALDatasetShadow,
  _swigc__p_GDALDriverShadow,
  _swigc__p_GDALMajorObjectShadow,
  _swigc__p_GDALRasterBandShadow,
  _swigc__p_GDAL_GCP,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_int,
  _swigc__p_p_GDAL_GCP,
  _swigc__p_p_char,
  _swigc__ptrdiff_t,
  _swigc__size_t,
  _swigc__std__ptrdiff_t,
  _swigc__std__size_t,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/*************************************************************************
 * Type initialization:
 * This problem is 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 staticly to an initial 
 * array. We just loop though 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 linked list. 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. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last 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 linked list (because the cast->type) pointer will
 *     be correct.
**/

#ifdef __cplusplus
extern "C" {
#endif
    
    SWIGRUNTIME void
    SWIG_InitializeModule(void *clientdata) {
        swig_type_info *type, *ret;
        swig_cast_info *cast;
        size_t i;
        swig_module_info *module_head;
        static int init_run = 0;
        
        clientdata = clientdata;
        
        if (init_run) return;
        init_run = 1;
        
        /* Initialize the swig_module */
        swig_module.type_initial = swig_type_initial;
        swig_module.cast_initial = swig_cast_initial;
        
        /* Try and load any already created modules */
        module_head = SWIG_GetModule(clientdata);
        if (module_head) {
            swig_module.next = module_head->next;
            module_head->next = &swig_module;
        } else {
            /* This is the first module loaded */
            swig_module.next = &swig_module;
            SWIG_SetModule(clientdata, &swig_module);
        }
        
        /* Now work on filling in swig_module.types */
        for (i = 0; i < swig_module.size; ++i) {
            type = 0;
            
            /* 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 */
                if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata;
            } else {
                type = swig_module.type_initial[i];
            }
            
            /* Insert casting types */
            cast = swig_module.cast_initial[i];
            while (cast->type) {
                /* Don't need to add information already in the list */
                ret = 0;
                if (swig_module.next != &swig_module) {
                    ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
                }
                if (ret && type == swig_module.type_initial[i]) {
                    cast->type = ret;
                    ret = 0;
                }
                
                if (!ret) {
                    if (type->cast) {
                        type->cast->prev = cast;
                        cast->next = type->cast;
                    }
                    type->cast = cast;
                }
                
                cast++;
            }
            
            /* Set entry in modules->types array equal to the type */
            swig_module.types[i] = type;
        }
    }
    
    /* 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;
        swig_cast_info *equiv;
        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) {
                equiv = swig_module.types[i]->cast;
                while (equiv) {
                    if (!equiv->converter) {
                        if (equiv->type && !equiv->type->clientdata)
                        SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
                    }
                    equiv = equiv->next;
                }
            }
        }
    }
    
#ifdef __cplusplus
}
#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 *
    swig_varlink_repr(swig_varlinkobject *v) {
        v = v;
        return PyString_FromString("<Swig global variables>");
    }
    
    SWIGINTERN int
    swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
        swig_globalvar  *var;
        flags = flags;
        fprintf(fp,"Swig global variables { ");
        for (var = v->vars; var; var=var->next) {
            fprintf(fp,"%s", var->name);
            if (var->next) fprintf(fp,", ");
        }
        fprintf(fp," }\n");
        return 0;
    }
    
    SWIGINTERN PyObject *
    swig_varlink_getattr(swig_varlinkobject *v, char *n) {
        swig_globalvar *var = v->vars;
        while (var) {
            if (strcmp(var->name,n) == 0) {
                return (*var->get_attr)();
            }
            var = var->next;
        }
        PyErr_SetString(PyExc_NameError,"Unknown C global variable");
        return NULL;
    }
    
    SWIGINTERN int
    swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
        swig_globalvar *var = v->vars;
        while (var) {
            if (strcmp(var->name,n) == 0) {
                return (*var->set_attr)(p);
            }
            var = var->next;
        }
        PyErr_SetString(PyExc_NameError,"Unknown C global variable");
        return 1;
    }
    
    SWIGINTERN PyTypeObject*
    swig_varlink_type(void) {
        static char varlink__doc__[] = "Swig var link object";
        static PyTypeObject varlink_type
#if !defined(__cplusplus)
        ;
        static int type_init = 0;  
        if (!type_init) {
            PyTypeObject tmp
#endif
            = {
                PyObject_HEAD_INIT(&PyType_Type)
                0,                                  /* Number of items in variable part (ob_size) */
                (char *)"swigvarlink",              /* Type name (tp_name) */
                sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
                0,                                  /* Itemsize (tp_itemsize) */
                0,                                  /* Deallocator (tp_dealloc) */ 
                (printfunc) swig_varlink_print,     /* Print (tp_print) */
                (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
                (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
                0,                                  /* tp_compare */
                (reprfunc) swig_varlink_repr,       /* tp_repr */
                0,                                  /* tp_as_number */
                0,                                  /* tp_as_sequence */
                0,                                  /* tp_as_mapping */
                0,                                  /* tp_hash */
                0,                                  /* tp_call */
                0,                                  /* tp_str */
                0,                                  /* tp_getattro */
                0,                                  /* tp_setattro */
                0,                                  /* tp_as_buffer */
                0,                                  /* tp_flags */
                varlink__doc__,                     /* tp_doc */
#if PY_VERSION_HEX >= 0x02000000
                0,                                  /* tp_traverse */
                0,                                  /* tp_clear */
#endif
#if PY_VERSION_HEX >= 0x02010000
                0,                                  /* tp_richcompare */
                0,                                  /* tp_weaklistoffset */
#endif
#if PY_VERSION_HEX >= 0x02020000
                0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
                0,                                  /* tp_del */
#endif
#ifdef COUNT_ALLOCS
                0,0,0,0                             /* tp_alloc -> tp_next */
#endif
            };
#if !defined(__cplusplus)
            varlink_type = tmp;
            type_init = 1;
        }
#endif
        return &varlink_type;
    }
    
    /* Create a variable linking object for use later */
    SWIGINTERN PyObject *
    SWIG_Python_newvarlink(void) {
        swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
        if (result) {
            result->vars = 0;
        }
        return ((PyObject*) result);
    }
    
    SWIGINTERN void 
    SWIG_Python_addvarlink(PyObject *p, 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) {
                strncpy(gv->name,name,size);
                gv->get_attr = get_attr;
                gv->set_attr = set_attr;
                gv->next = v->vars;
            }
        }
        v->vars = gv;
    }
    
    /* -----------------------------------------------------------------------------
     * 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_INT:
                obj = PyInt_FromLong(constants[i].lvalue);
                break;
                case SWIG_PY_FLOAT:
                obj = PyFloat_FromDouble(constants[i].dvalue);
                break;
                case SWIG_PY_STRING:
                if (constants[i].pvalue) {
                    obj = PyString_FromString((char *) constants[i].pvalue);
                } else {
                    Py_INCREF(Py_None);
                    obj = Py_None;
                }
                break;
                case SWIG_PY_POINTER:
                obj = SWIG_NewPointerObj(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);
                Py_DECREF(obj);
            }
        }
    }
    
    /* -----------------------------------------------------------------------------*/
    /* Fix SwigMethods to carry the callback ptrs when needed */
    /* -----------------------------------------------------------------------------*/
    
    SWIGINTERN void
    SWIG_Python_FixMethods(PyMethodDef *methods,
    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) {
            char *c = methods[i].ml_doc;
            if (c && (c = strstr(c, "swig_ptr: "))) {
                int j;
                swig_const_info *ci = 0;
                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) {
                    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;
                        void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
                        if (ptr) {
                            strncpy(buff, methods[i].ml_doc, ldoc);
                            buff += ldoc;
                            strncpy(buff, "swig_ptr: ", 10);
                            buff += 10;
                            SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
                            methods[i].ml_doc = ndoc;
                        }
                    }
                }
            }
        }
    }
    
    /* -----------------------------------------------------------------------------*
     *  Initialize type list
     * -----------------------------------------------------------------------------*/
    
#if PY_MAJOR_VERSION < 2
    /* PyModule_AddObject function was introduced in Python 2.0.  The following function
    is copied out of Python/modsupport.c in python version 2.3.4 */
    SWIGINTERN int
    PyModule_AddObject(PyObject *m, char *name, PyObject *o)
    {
        PyObject *dict;
        if (!PyModule_Check(m)) {
            PyErr_SetString(PyExc_TypeError,
            "PyModule_AddObject() needs module as first arg");
            return -1;
        }
        if (!o) {
            PyErr_SetString(PyExc_TypeError,
            "PyModule_AddObject() needs non-NULL value");
            return -1;
        }
        
        dict = PyModule_GetDict(m);
        if (dict == NULL) {
            /* Internal error -- modules must have a dict! */
            PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
            PyModule_GetName(m));
            return -1;
        }
        if (PyDict_SetItemString(dict, name, o))
        return -1;
        Py_DECREF(o);
        return 0;
    }
#endif
    
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT void SWIG_init(void) {
    static PyObject *SWIG_globals = 0; 
    PyObject *m, *d;
    if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
    
    /* Fix SwigMethods to carry the callback ptrs when needed */
    SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
    
    m = Py_InitModule((char *) SWIG_name, SwigMethods);
    d = PyModule_GetDict(m);
    
    SWIG_InitializeModule(0);
    SWIG_InstallConstants(d,swig_const_table);
    
    
    if ( GDALGetDriverCount() == 0 ) {
        GDALAllRegister();
    }
    
}

